Commit 5a5642e6 authored by Holger Levsen's avatar Holger Levsen

reproducible: new page 'repo_stats'

parent 620c5383
......@@ -115,7 +115,6 @@ properties:
=== reproducible
* new job+page: "packages different from sid in our toolchain", not sure yet where to link that...
* run debbindiff against .changes files in current directory, instead of $LONGPATHES (due to #764459)
* reproducible: dont delete userContent/$pkg on build begin..
......
......@@ -155,6 +155,7 @@ html_head_page = Template((tab*2).join("""
<li><a href="/index_last_48h.html">packages tested in the last 48h</a></li>
<li><a href="/index_all_abc.html">all tested packages (sorted alphabetically)</a></li>
<li><a href="/index_dd-list.html">maintainers of unreproducible packages</a></li>
<li><a href="/index_repo_stats.html">apt repository stats</a></li>
<li><a href="/index_pkg_sets.html">package sets stats</a></li>
<li><a href="/index_stats.html">stats</a></li>
</ul>
......
......@@ -163,7 +163,7 @@ init_html() {
SUITE=sid
MAINVIEW="stats"
ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted"
ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list pkg_sets stats"
ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list repo_stats pkg_sets stats"
SPOKENTARGET["reproducible"]="packages which built reproducibly"
SPOKENTARGET["FTBR"]="packages which failed to build reproducibly"
SPOKENTARGET["FTBFS"]="packages which failed to build from source"
......@@ -178,8 +178,9 @@ init_html() {
SPOKENTARGET["last_48h"]="packages tested in the last 48h"
SPOKENTARGET["all_abc"]="all tested packages (sorted alphabetically)"
SPOKENTARGET["dd-list"]="maintainers of unreproducible packages"
SPOKENTARGET["stats"]="various statistics about reproducible builds"
SPOKENTARGET["repo_stats"]="statistics about the reproducible builds apt repository"
SPOKENTARGET["pkg_sets"]="statistics about reproducible builds of specific package sets"
SPOKENTARGET["stats"]="various statistics about reproducible builds"
# query some data we need everywhere
AMOUNT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT count(name) FROM sources")
COUNT_TOTAL=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(name) FROM source_packages")
......@@ -248,6 +249,8 @@ write_page_header() {
SPOKEN_TARGET="currently scheduled"
elif [ "$TARGET" = "pkg_sets" ] ; then
SPOKEN_TARGET="package sets stats"
elif [ "$TARGET" = "repo_stats" ] ; then
SPOKEN_TARGET="apt repository stats"
else
SPOKEN_TARGET=${SPOKENTARGET[$TARGET]}
fi
......
#!/bin/bash
# Copyright 2015 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2
DEBUG=false
. /srv/jenkins/bin/common-functions.sh
common_init "$@"
# common code defining db access
. /srv/jenkins/bin/reproducible_common.sh
set +x
init_html
VIEW=repo_stats
PAGE=index_${VIEW}.html
echo "$(date) - starting to write $PAGE page."
write_page_header $VIEW "Overview of ${SPOKENTARGET[$VIEW]}"
TMPFILE=$(mktemp)
TMPSCRIPT=$(mktemp)
echo "cat /var/lib/apt/lists/reproducible.alioth.debian.org_debian_._Packages" > $TMPSCRIPT
sudo pbuilder --execute --basetgz /var/cache/pbuilder/base-reproducible.tgz $TMPSCRIPT > $TMPFILE
grep -v ^I:\ $TMPFILE > $TMPSCRIPT
mv $TMPSCRIPT $TMPFILE
write_page "<p>The source packages are different from sid in our toolchain. They are available in an apt repository on alioth which is accessable with these sources.lists entries:"
write_page "deb http://reproducible.alioth.debian.org/debian/ ./"
write_page "deb-src http://reproducible.alioth.debian.org/debian/ ./"
write_page "</pre></p>"
write_page "<p><table><th>source package</th><th>version(s)</th>"
SOURCES=$(grep-dctrl -n -s source -FArchitecture amd64 -o -FArchitecture all $TMPFILE | sort -u)
for PKG in $SOURCES ; do
write_page "<tr>td>$PKG</td><td>"
VERSIONS=$(grep-dctrl -n -s version -S $PKG $TMPFILE|sort -u)
BET=""
for VERSION in ${VERSIONS} ; do
if [ "$BET" = "" ] ; then
BET=${VERSION}
continue
elif dpkg --compare-versions "$BET" lt "${VERSION}" ; then
BET=${VERSION}
fi
done
write_page "$BET<br>"
WARNED=false
for VERSION in ${VERSIONS} ; do
if [ "${VERSION}" != "$BET" ] ; then
write_page "${VERSION}<br>"
elif ! $WARNED ; then
echo "Warning: more than one version of $PKG available in our repo, please clean up."
WARNED=true
fi
done
write_page "</td></tr>"
done
write_page "</table></p>"
rm $TMPFILE
write_page_footer
publish_page
......@@ -154,8 +154,12 @@
- job-template:
defaults: reproducible
name: '{name}_html_all_packages'
-
job-template:
- job-template:
defaults: reproducible
name: '{name}_html_repo_stats'
- job-template:
defaults: reproducible
name: '{name}_create_meta_pkg_sets'
......@@ -231,6 +235,11 @@
my_timed: '12 12 30 12 *'
my_shell: '/srv/jenkins/bin/reproducible_html_all_packages.sh'
my_recipients: 'holger@layer-acht.org'
- '{name}_html_repo_stats':
my_description: 'Generate HTML results (repo_stats) for reproducible builds.'
my_timed: '0 1 * * *'
my_shell: '/srv/jenkins/bin/reproducible_html_repo_stats.sh'
my_recipients: 'holger@layer-acht.org'
- '{name}_json':
my_description: 'Generate https://reproducible.debian.net/userContent/reproducible.json for consumption by tracker.debian.org.'
my_timed: '1 * * * *'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment