From 0cf31460831e3f9e26ae7c44df45682be8fd58bc Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 5 Jul 2015 14:44:48 +0200 Subject: reproducible NetBSD: add job and initial script, atm only testing sparc64 --- bin/reproducible_common.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'bin/reproducible_common.sh') diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index fced5980..98301e78 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -224,9 +224,13 @@ write_page_intro() { local PROJECTNAME="$1" local PROJECTURL="https://review.coreboot.org/p/coreboot.git" elif [ "$1" = "OpenWrt" ] ; then - write_page " Reproducible OpenWrt is an effort to apply this to OpenWrt. Thus each OpenWR target is build twice, with a few varitations added and then the resulting images and packages from the two builds are compared using debbindiff, which currently cannot detect .bin files as squashfs filesystems. Thus the resulting debbindiff output is not nearly as clear as it could be - hopefully this limitation will be overcome soon. Also please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.

" + write_page " Reproducible OpenWrt is an effort to apply this to OpenWrt. Thus each OpenWrt target is build twice, with a few varitations added and then the resulting images and packages from the two builds are compared using debbindiff, which currently cannot detect .bin files as squashfs filesystems. Thus the resulting debbindiff output is not nearly as clear as it could be - hopefully this limitation will be overcome soon. Also please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.

" local PROJECTNAME="openwrt" local PROJECTURL="git://git.openwrt.org/openwrt.git" + elif [ "$1" = "NetBSD" ] ; then + write_page " Reproducible NetBSD is an effort to apply this to NetBSD. Thus each NetBSD target is build twice, with a few varitations added and then the resulting files from the two builds are compared using debbindiff. Please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.

" + local PROJECTNAME="NetBSD" + local PROJECTURL="https://github.com/jsonn/src" fi write_page "

There is a monthly run jenkins job to test the master branch of $PROJECTNAME.git. Currently this job is triggered more often though, because this is still under development and brand new. The jenkins job is simply running reproducible_$PROJECTNAME.sh in a Debian environment and this script is solely responsible for creating this page. Feel invited to join #debian-reproducible (on irc.oftc.net) to request job runs whenever sensible. Patches and other feedback are very much appreciated!

" } @@ -235,6 +239,8 @@ write_page_footer() { write_page "

There is more information about jenkins.debian.net and about reproducible builds of Debian available elsewhere. Last update: $(date +'%Y-%m-%d %H:%M %Z'). Copyright 2014-2015 Holger Levsen and others, GPL2 licensed. The weather icons are public domain and have been taken from the Tango Icon Library." if [ "$1" = "coreboot" ] ; then write_page "The Coreboot logo is Copyright © 2008 by Konsult Stuge and coresystems GmbH and can be freely used to refer to the Coreboot project." + elif [ "$1" = "NetBSD" ] ; then + write_page "NetBSD® is a registered trademark of The NetBSD Foundation, Inc." fi write_page "

" } @@ -363,3 +369,45 @@ irc_message() { kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE" || true # don't fail the whole job } +call_debbindiff_on_any_file() { + mkdir -p $TMPDIR/$1/$(dirname $2) + local TMPLOG=(mktemp --tmpdir=$TMPDIR) + local msg="" + set +e + ( timeout $TIMEOUT schroot \ + --directory $TMPDIR \ + -c source:jenkins-reproducible-${DBDSUITE}-debbindiff \ + debbindiff -- \ + --html $TMPDIR/$1/$2.html \ + $TMPDIR/b1/$1/$2 \ + $TMPDIR/b2/$1/$2 2>&1 \ + ) 2>&1 >> $TMPLOG + RESULT=$? + if ! "$DEBUG" ; then set +x ; fi + set -e + cat $TMPLOG # print dbd output + rm -f $TMPLOG + case $RESULT in + 0) echo "$(date -u) - $1/$2 is reproducible, yay!" + ;; + 1) + echo "$(date -u) - $DBDVERSION found issues, please investigate $1/$2" + ;; + 2) + msg="$(date -u) - $DBDVERSION had trouble comparing the two builds. Please investigate $1/$2" + ;; + 124) + if [ ! -s $TMPDIR/$1.html ] ; then + msg="$(date -u) - $DBDVERSION produced no output for $1/$2 and was killed after running into timeout after ${TIMEOUT}..." + else + msg="$DBDVERSION was killed after running into timeout after $TIMEOUT, but there is still $TMPDIR/$1/$2.html" + fi + ;; + *) + msg="$(date -u) - Something weird happened when running $DBDVERSION on $1/$2 (which exited with $RESULT) and I don't know how to handle it." + ;; + esac + if [ ! -z "$msg" ] ; then + echo $msg | tee -a $TMPDIR/$1/$2.html + fi +} -- cgit v1.2.3-70-g09d2