[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian bootstrap jobs: use reproducible value for SOURCE_DATE_EPOCH

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Aug 29 22:32:24 BST 2022



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


Commits:
262045c5 by Holger Levsen at 2022-08-29T23:32:16+02:00
reproducible Debian bootstrap jobs: use reproducible value for SOURCE_DATE_EPOCH

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

- - - - -


2 changed files:

- bin/reproducible_debstrap.sh
- update_jdn.sh


Changes:

=====================================
bin/reproducible_debstrap.sh
=====================================
@@ -43,8 +43,16 @@ cleanup_unreproducible_file(){
 export TOOL="$1"
 export SUITE="$2"
 output_echo "About to bootstrap $SUITE using $TOOL version $(dpkg-query  --showformat='${Version}' --show $TOOL)."
-export SOURCE_DATE_EPOCH="$(date +%s)"
-output_echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
+
+if [ "$SUITE" != "unstable" ] ; then
+	CODENAME=$SUITE
+else
+	CODENAME=sid
+fi
+S_D_E_DATE="$(grep $CODENAME /usr/share/distro-info/debian.csv | awk  -F',' '{print $4}')"
+export SOURCE_DATE_EPOCH="$(date +%s -d $S_D_E_DATE)"
+output_echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH that is $S_D_E_DATE which is when $SUITE was created."
+
 export BUILDDIR=$(mktemp --tmpdir=/srv/workspace/ -d -t ${TOOL}-${SUITE}.XXXXXXXX)
 export RESULTSDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t ${TOOL}-${SUITE}.XXXXXXXX) # accessible in schroots, used to compare results
 


=====================================
update_jdn.sh
=====================================
@@ -382,7 +382,8 @@ if [ -f /etc/debian_version ] ; then
 			# needed for rebuilding Debian (using .buildinfo files)
 			osuosl173-amd64) DEBS="$DEBS libdpkg-perl libwww-mechanize-perl sbuild" 
 					 DEBS="$DEBS live-build"	# needed for live-build
-					 DEBS="$DEBS cdebootstrap"  ;;	# needed for testing just that
+					 DEBS="$DEBS cdebootstrap"  	# needed for testing just that
+					 DEBS="$DEBS distro-info" ;;	# needed for setting S_D_E to a 'good' value
 			# needed for opensuse openbuildservice
 			osuosl174-amd64) DEBS="$DEBS osc obs-build qemu-kvm libarchive-tools libjson-perl libxml-simple-perl" ;;
 			*) ;;



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/262045c58e74cb29e5a71f1b0077281119f94d2d
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/20220829/cbb9b40b/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list