[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: refactoring

Holger Levsen holger at moszumanska.debian.org
Tue Jul 7 09:20:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 40b6833493a340f8162e03623e72e09561031c7c
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Jul 7 11:19:54 2015 +0200

    reproducible: refactoring
---
 bin/reproducible_build.sh    |  4 ++--
 bin/reproducible_common.sh   |  2 +-
 bin/reproducible_coreboot.sh | 44 +-------------------------------------------
 bin/reproducible_netbsd.sh   |  2 +-
 bin/reproducible_openwrt.sh  |  4 ++--
 5 files changed, 7 insertions(+), 49 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 7a0c8bb..58988d2 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -266,7 +266,7 @@ dbd_timeout() {
 	handle_ftbr "$msg"
 }
 
-call_debbindiff() {
+call_debbindiff_on_changes_files() {
 	local TMPLOG=(mktemp --tmpdir=$TMPDIR)
 	echo | tee -a ${RBUILDLOG}
 	local TIMEOUT="30m"
@@ -552,7 +552,7 @@ update_rbuildlog
 if [ $FTBFS -eq 1 ] ; then
 	handle_ftbfs
 elif [ $FTBFS -eq 0 ] ; then
-	call_debbindiff  # defines DBDVERSION, update_db_and_html defines STATUS
+	call_debbindiff_on_changes_files  # defines DBDVERSION, update_db_and_html defines STATUS
 fi
 
 check_for_race_conditions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index c5a3e7a..5a7f51e 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -369,7 +369,7 @@ 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() {
+call_debbindiff() {
 	mkdir -p $TMPDIR/$1/$(dirname $2)
 	local TMPLOG=(mktemp --tmpdir=$TMPDIR)
 	local msg=""
diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index 55794e3..038dd57 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -26,48 +26,6 @@ create_results_dirs() {
 	mkdir -p $BASE/coreboot/dbd
 }
 
-call_debbindiff() {
-	local TMPLOG=(mktemp --tmpdir=$TMPDIR)
-	local msg=""
-	set +e
-	( timeout $TIMEOUT schroot \
-		--directory $TMPDIR \
-		-c source:jenkins-reproducible-${DBDSUITE}-debbindiff \
-		debbindiff -- \
-			--html $TMPDIR/$1.html \
-			$TMPDIR/b1/$1/coreboot.rom \
-			$TMPDIR/b2/$1/coreboot.rom 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/coreboot.rom is reproducible, yay!"
-			;;
-		1)
-			echo "$(date -u) - $DBDVERSION found issues, please investigate $1/coreboot.rom"
-			;;
-		2)
-			msg="$(date -u) - $DBDVERSION had trouble comparing the two builds. Please investigate $1/coreboot.rom"
-			;;
-		124)
-			if [ ! -s $TMPDIR/$1.html ] ; then
-				msg="$(date -u) - $DBDVERSION produced no output for $1/coreboot.rom 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.html"
-			fi
-			;;
-		*)
-			msg="$(date -u) - Something weird happened when running $DBDVERSION on $1/coreboot.rom (which exited with $RESULT) and I don't know how to handle it."
-			;;
-	esac
-	if [ ! -z $msg ] ; then
-		echo $msg | tee -a $TMPDIR/$1.html
-	fi
-}
-
 save_coreboot_results(){
 	RUN=$1
 	cd coreboot-builds
@@ -209,7 +167,7 @@ cd $TMPDIR/b1
 for i in $(ls -1d *| sort -u) ; do
 	let ALL_ROMS+=1
 	if [ -f $i/coreboot.rom ] ; then
-		call_debbindiff $i
+		call_debbindiff $i coreboot.rom
 		get_filesize $i/coreboot.rom
 		if [ -f $TMPDIR/$i.html ] ; then
 			mv $TMPDIR/$i.html $BASE/coreboot/dbd/$i.html
diff --git a/bin/reproducible_netbsd.sh b/bin/reproducible_netbsd.sh
index 9766b67..1d82124 100755
--- a/bin/reproducible_netbsd.sh
+++ b/bin/reproducible_netbsd.sh
@@ -129,7 +129,7 @@ for i in * ; do
 	echo "       <table><tr><th>Release files for <code>$i</code></th></tr>" >> $FILES_HTML
 	for j in $(find * -type f |sort -u ) ; do
 		let ALL_FILES+=1
-		call_debbindiff_on_any_file $i $j
+		call_debbindiff $i $j
 		get_filesize $j
 		if [ -f $TMPDIR/$i/$j.html ] ; then
 			mkdir -p $BASE/netbsd/dbd/$i/$(dirname $j)
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 16d94b1..2d89b92 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -216,7 +216,7 @@ for i in * ; do
 	echo "       <table><tr><th>Images for <code>$i</code></th></tr>" >> $DBD_HTML
 	for j in $(find * -name "*.bin" -o -name "*.squashfs" |sort -u ) ; do
 		let ALL_IMAGES+=1
-		call_debbindiff_on_any_file $i $j
+		call_debbindiff $i $j
 		get_filesize $j
 		if [ -f $TMPDIR/$i/$j.html ] ; then
 			mkdir -p $BASE/openwrt/dbd/$i
@@ -243,7 +243,7 @@ for i in * ; do
 	echo "       <table><tr><th>Packages for <code>$i</code></th></tr>" >> $DBD_HTML
 	for j in $(find * -name "*.ipk" |sort -u ) ; do
 		let ALL_PACKAGES+=1
-		call_debbindiff_on_any_file $i $j
+		call_debbindiff $i $j
 		get_filesize $j
 		if [ -f $TMPDIR/$i/$j.html ] ; then
 			mkdir -p $BASE/openwrt/dbd/$i/$(dirname $j)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list