#!/bin/bash
# Copyright 2014 Holger Levsen This page is updated every three hours. Results are obtained from several build jobs running on jenkins.debian.net. Thanks to Profitbricks for donating the virtual machine it's running on! $COUNT_TOTAL packages attempted to build so far, that's $PERCENT_TOTAL% of $AMOUNT source packages in Debian $SUITE currently. Out of these, $PERCENT_GOOD% were successful, so quite wildly guessing this roughy means about $GUESS_GOOD packages should be reproducibly buildable! Join $COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly: A β sign after a package name indicates that no .buildinfo file was generated. $COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source: $COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages where the source could not be downloaded. $COUNT_NOTFORUS ($PERCENT_NOTFORUS%) packages which are neither Architecture: 'any' nor 'all' nor 'amd64' nor 'linux-amd64': $COUNT_BLACKLISTED packages are blacklisted and will never be tested here: $COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly:
" >> $NAVI
}
link_packages() {
for PKG in $@ ; do
RESULT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT build_date,version FROM source_packages WHERE name = \"$PKG\"")
BUILD_DATE=$(echo $RESULT|cut -d "|" -f1)
VERSION=$(echo $RESULT|cut -d "|" -f2)
# remove epoch
EVERSION=$(echo $VERSION | cut -d ":" -f2)
if $EXTRA_STAR && [ ! -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then
STAR[$PKG]="β" # used to be a star...
fi
# only build $PKG pages if they don't exist or are older than $BUILD_DATE
NAVI="/var/lib/jenkins/userContent/rb-pkg/${PKG}_navigation.html"
FILE=$(find $(dirname $NAVI) -name $(basename $NAVI) ! -newermt "$BUILD_DATE" 2>/dev/null || true)
if [ ! -f $NAVI ] || [ "$FILE" != "" ] ; then
MAINLINK=""
init_navi_frame "$PKG" "$VERSION" "$BUILD_DATE"
if [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then
append2navi_frame " buildinfo "
MAINLINK="$JENKINS_URL/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo"
fi
if [ -f "/var/lib/jenkins/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html" ] ; then
append2navi_frame " debbindiff "
MAINLINK="$JENKINS_URL/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html"
fi
RBUILD_LOG="rbuild/${PKG}_${EVERSION}.rbuild.log"
if [ -f "/var/lib/jenkins/userContent/${RBUILD_LOG}" ] ; then
SIZE=$(du -sh "/var/lib/jenkins/userContent/${RBUILD_LOG}" |cut -f1)
append2navi_frame " rbuild ($SIZE) "
if [ "$MAINLINK" = "" ] ; then
MAINLINK="$JENKINS_URL/userContent/${RBUILD_LOG}"
fi
fi
append2navi_frame " PTS "
append2navi_frame " BTS "
append2navi_frame " sources "
append2navi_frame " debian/rules "
finish_navi_frame
write_pkg_frameset "$PKG" "$MAINLINK"
fi
if [ -f "/var/lib/jenkins/userContent/rbuild/${PKG}_${EVERSION}.rbuild.log" ] ; then
write_summary " $PKG${STAR[$PKG]} "
else
write_summary " $PKG "
fi
done
}
echo "Starting to write statistics index page."
echo
SUMMARY=index.html
rm -f $SUMMARY
write_summary ""
write_summary ""
write_summary ""
write_summary "$1 " >> $NAVI
echo "($2) " >> $NAVI
echo "at $3: " >> $NAVI
}
append2navi_frame() {
echo "$1" >> $NAVI
}
finish_navi_frame() {
echo " stats for reproducible builds Statistics for reproducible builds
"
write_summary "#debian-reproducible
on OFTC to get support for making sure your packages build reproducibly too!"
EXTRA_STAR=true
link_packages $BAD
EXTRA_STAR=false
write_summary "
"
link_packages $UGLY
write_summary "
$SOURCELESS
$NOTFORUS
$BLACKLISTED
"
link_packages $GOOD
write_summary "
Packages which failed to build reproducibly, sorted by Maintainers: and Uploaders: fields
"
write_summary "$(echo $BAD | dd-list -i)
Static URL for this page. Last modified: $(date). Copyright 2014 Holger Levsen, GPL-2 licensed. About jenkins.debian.net" write_summary "
" echo # job output cp $SUMMARY /var/lib/jenkins/userContent/reproducible.html rm $SUMMARY