[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible_debian_live_build: Use the new DNS for the snapshot service

Holger Levsen (@holger) gitlab at salsa.debian.org
Sun Sep 5 10:27:04 BST 2021



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


Commits:
2afc5833 by Roland Clobus at 2021-09-05T11:26:31+02:00
reproducible_debian_live_build: Use the new DNS for the snapshot service

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

- - - - -
a9fdeb39 by Roland Clobus at 2021-09-05T11:26:31+02:00
reproducible_debian_live_build: Work around non-reproducible config files by libxml-sax-perl

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

- - - - -


1 changed file:

- bin/reproducible_debian_live_build.sh


Changes:

=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -85,7 +85,7 @@ popd
 
 export LB_OUTPUT=${RESULTSDIR}/lb_output.txt
 # Use the timestamp of the latest mirror snapshot
-wget https://debian.notset.fr/snapshot/mr/timestamp/debian/latest --output-document ${RESULTSDIR}/latest
+wget http://snapshot.notset.fr/mr/timestamp/debian/latest --output-document ${RESULTSDIR}/latest
 #
 # Extract the timestamp from the JSON file
 #
@@ -101,7 +101,7 @@ wget https://debian.notset.fr/snapshot/mr/timestamp/debian/latest --output-docum
 export SNAPSHOT_TIMESTAMP=$(cat ${RESULTSDIR}/latest | awk '/"result":/ { split($0, a, "\""); print a[4] }')
 # Convert SNAPSHOT_TIMESTAMP to Unix time (insert suitable formatting first)
 export SOURCE_DATE_EPOCH=$(date -d $(echo ${SNAPSHOT_TIMESTAMP} | awk '{ printf "%s-%s-%sT%s:%s:%sZ", substr($0,1,4), substr($0,5,2), substr($0,7,2), substr($0,10,2), substr($0,12,2), substr($0,14,2) }') +%s)
-export MIRROR=http://debian.notset.fr/snapshot/archive/debian/${SNAPSHOT_TIMESTAMP}
+export MIRROR=http://snapshot.notset.fr/archive/debian/${SNAPSHOT_TIMESTAMP}
 output_echo "Info: using the snapshot from ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP})"
 
 # Configuration for the smallest live image (mini, without installer)
@@ -266,7 +266,41 @@ then
 fi
 sed -i -e 's|fc-cache -s|LD_PRELOAD=/usr/lib/unrandomize_uuid_generate_random.so fc-cache|' /usr/share/initramfs-tools/hooks/plymouth
 EOF
+cat > config/hooks/normal/1004-reproducible-libxml-sax-perl.hook.chroot << EOF
+#!/bin/sh
+set -e
 
+# update-perl-sax-parsers of libxml-sax-perl creates a file with a random order of its lines
+# A bug report with patch is available at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993444
+# This script duplicates that patch
+
+# Don't run if libxml-sax-perl is not installed
+if [ ! -e /usr/bin/update-perl-sax-parsers ];
+then
+  exit 0
+fi
+
+# If Debian.pm already contains a sort line, there is no need to patch the file
+if grep -q sort /usr/share/perl5/XML/SAX/Debian.pm;
+then
+  exit 0
+fi
+sed -i -e '/foreach my \$key/s/keys/sort keys/' /usr/share/perl5/XML/SAX/Debian.pm
+
+# Regenerate the file that has more than one key-value pair
+update-perl-sax-parsers --remove XML::SAX::Expat
+update-perl-sax-parsers --add XML::SAX::Expat --priority 50
+update-perl-sax-parsers --update
+EOF
+cat > config/hooks/normal/9000-cleanup-ucf-backup-files.hook.chroot << EOF
+#!/bin/sh
+set -e
+
+# Delete all older backups of ucf files
+# The current files are /var/lib/ucf/hashfile and /var/lib/ucf/registry
+rm -f /var/lib/ucf/hashfile.*
+rm -f /var/lib/ucf/registry.*
+EOF
 
 # First build
 sudo lb build | tee -a $LB_OUTPUT



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/e3658b5481d9d41bd046e991d61aa41401829a44...a9fdeb392f65008ef8c1205259eaec6a48cacb5a

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/e3658b5481d9d41bd046e991d61aa41401829a44...a9fdeb392f65008ef8c1205259eaec6a48cacb5a
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/20210905/8d4b790f/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list