[Git][qa/jenkins.debian.net][master] reproducible Debian CI tests: use diffoscope from the release being tested again

Holger Levsen (@holger) gitlab at salsa.debian.org
Sun Jan 21 18:55:25 GMT 2024



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
57fccefc by Holger Levsen at 2024-01-21T19:54:11+01:00
reproducible Debian CI tests: use diffoscope from the release being tested again

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_build.sh


Changes:

=====================================
bin/reproducible_build.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2023 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2024 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2023 Mattia Rizzolo <mattia at debian.org>
 # released under the GPLv2
 
@@ -342,24 +342,24 @@ call_diffoscope_on_changes_files() {
 	sed -i -e '/^ [a-f0-9]\{32,64\} .*\.buildinfo$/d' b{1,2}/$CHANGES
 	TMPLOG=$(mktemp --tmpdir=$TMPDIR diffoscope-templog.XXXXXXXX)
 	TIMEOUT="150m"  # note that below there is another instance of this + 5 minutes
-	##dbd DBDSUITE=$SUITE
-	##dbd if [ "$SUITE" = "experimental" ] ; then
-	##dbd	# there is no extra diffoscope-schroot for experimental ( because we specical case ghc enough already )
-	##dbd	DBDSUITE="unstable"
-	##dbd fi
+	DBDSUITE=$SUITE
+	if [ "$SUITE" = "experimental" ] || [ "$SUITE" = "buster" ] ; then
+		# there is no extra diffoscope-schroot for experimental ( because we specical case ghc enough already )
+		# also we dont keep buster schroots around anymore, once trixie is stable at at least bullseye here, maybe bookworm too
+		DBDSUITE="unstable"
+	fi
 	# diffoscope temporary files are going to end up in this
 	TEMP=$(mktemp --tmpdir="$TMPDIR" -d dbd-tmp-XXXXXXX)
-	##dbd if ! session=$(schroot --begin-session -c "chroot:jenkins-reproducible-$DBDSUITE-diffoscope" 2>&1) ; then
-	##dbd 	# probably this (and the one below) should not end in a FTBR, but rather some tempfail situation.
-	##dbd 	RESULT=99
-	##dbd 	DIFFOSCOPE="diffoscope (schroot error—uset)"
-	##dbd 	MSG_PART1="The schroot service is not available."
-	##dbd 	handle_ftbr "$MSG_PART1" "Error message:"  "\n" "$session"
-	##dbd 	irc_message debian-reproducible-changes "$MSG_PART1 Please check $RBUILDLOG and $DEBIAN_URL/$SUITE/$ARCH/$SRCPACKAGE"
-	##dbd 	return
-	##dbd fi
-	##dbd if ! diffoscope_version=$(schroot --directory "$TMPDIR" --run-session -c "$session" diffoscope -- --version 2>&1) ; then
-	if ! diffoscope_version=$(diffoscope --version 2>&1) ; then
+	if ! session=$(schroot --begin-session -c "chroot:jenkins-reproducible-$DBDSUITE-diffoscope" 2>&1) ; then
+		# probably this (and the one below) should not end in a FTBR, but rather some tempfail situation.
+		RESULT=99
+		DIFFOSCOPE="diffoscope (schroot error—uset)"
+		MSG_PART1="The schroot service is not available."
+		handle_ftbr "$MSG_PART1" "Error message:"  "\n" "$session"
+		irc_message debian-reproducible-changes "$MSG_PART1 Please check $RBUILDLOG and $DEBIAN_URL/$SUITE/$ARCH/$SRCPACKAGE"
+		return
+	fi
+	if ! diffoscope_version=$(schroot --directory "$TMPDIR" --run-session -c "$session" diffoscope -- --version 2>&1) ; then
 		RESULT=98
 		DIFFOSCOPE="diffoscope (diffoscope error—unset)"
 		MSG_PART1="First call to diffoscope failed."
@@ -378,22 +378,21 @@ call_diffoscope_on_changes_files() {
 	fi
 	# for older suites we only keep diffoscope html output, which saves us >70GB diskspace...
 	case "$SUITE" in
-		# add bullseye here once it becomes LTS and also update this comment then
-		buster)	DIFFOSCOPE_OUTPUT="--html $TMPDIR/${DBDREPORT}"
-				;;
-		*)		DIFFOSCOPE_OUTPUT="--html $TMPDIR/${DBDREPORT} --text $TMPDIR/$DBDTXT --json $TMPDIR/$DBDJSON"
-				;;
+		# once trixie is stable, add bookworm here
+		buster|bullseye)	DIFFOSCOPE_OUTPUT="--html $TMPDIR/${DBDREPORT}"
+					;;
+		*)			DIFFOSCOPE_OUTPUT="--html $TMPDIR/${DBDREPORT} --text $TMPDIR/$DBDTXT --json $TMPDIR/$DBDJSON"
+					;;
 	esac
 	set -x
 	set +e
 	DIFFOSCOPE_STAMP="/var/log/reproducible-builds/diffoscope_stamp_${SRCPACKAGE}_${SUITE}_${ARCH}_$(date -u +%s)"
 	touch ${DIFFOSCOPE_STAMP}
-	##dbd ( timeout 155m nice schroot \
-	##dbd 	--directory $TMPDIR \
-	##dbd 	--run-session \
-	##dbd 	-c "$session" \
-	##dbd 	-- sh -c "export TMPDIR=$TEMP ; timeout $TIMEOUT diffoscope \
-	( timeout 155m nice sh -c "export TMPDIR=$TEMP ; cd $TMPDIR ; timeout $TIMEOUT ionice -n 6 diffoscope \
+	( timeout 155m nice schroot \
+		--directory $TMPDIR \
+		--run-session \
+		-c "$session" \
+		-- sh -c "export TMPDIR=$TEMP ; timeout $TIMEOUT diffoscope \
 			${DIFFOSCOPE_TIMEOUT-} \
 			${DIFFOSCOPE_OUTPUT} \
 			--profile=- \
@@ -404,7 +403,7 @@ call_diffoscope_on_changes_files() {
 	set -e
 	if ! "$DEBUG" ; then set +x ; fi
 	log_file $TMPLOG  # print diffoscope output
-	##dbd schroot --end-session -c "$session"
+	schroot --end-session -c "$session"
 	rm $TMPLOG
 	rm ${DIFFOSCOPE_STAMP}
 	case $RESULT in



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/57fccefcf46a4179828257610fbf1209196da05f

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/57fccefcf46a4179828257610fbf1209196da05f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20240121/93f4dcbd/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list