[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian: refactoring

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Aug 29 17:59:56 BST 2022



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


Commits:
535b34bd by Holger Levsen at 2022-08-29T18:45:01+02:00
reproducible Debian: refactoring

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

- - - - -
6294d6df by Holger Levsen at 2022-08-29T18:59:36+02:00
reproducible Debian: adjust debstrap script to support debootstrap and add a job for that

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

- - - - -


5 changed files:

- bin/jenkins_master_wrapper.sh
- bin/jenkins_node_wrapper.sh
- bin/reproducible_debstrap.sh
- hosts/common/etc/sudoers.d/jenkins
- job-cfg/reproducible.yaml


Changes:

=====================================
bin/jenkins_master_wrapper.sh
=====================================
@@ -31,7 +31,7 @@ PARAMS=("$JOB_NAME")
 
 # add some more params if needed,
 case $JOB_NAME in
-	rebootstrap_*|chroot-installation_*|haskell-package-plan|reproducible_*debstrap_*)
+	rebootstrap_*|chroot-installation_*|haskell-package-plan|reproducible_*strap_*)
 		PARAMS+=("$@")
 		;;
 	reproducible_debian_live_build_*)


=====================================
bin/jenkins_node_wrapper.sh
=====================================
@@ -86,7 +86,7 @@ elif [ "$1" = "reproducible_pool_buildinfos" ] ; then
 	exec /srv/jenkins/bin/reproducible_pool_buildinfos.sh ; croak "Exec failed";
 elif [ "$1" = "reproducible_html_builtin-pho" ] ; then
 	exec /srv/jenkins/bin/reproducible_html_builtin-pho.sh ; croak "Exec failed";
-elif [[ "$*" =~ reproducible_.*debstrap.* ]] ; then
+elif [[ "$*" =~ reproducible_.*strap.* ]] ; then
 	exec /srv/jenkins/bin/reproducible_debstrap.sh "$2" "$3" ; croak "Exec failed";
 elif [ "$1" = "janitor-setup-worker" ] ; then
 	shift ; exec /srv/jenkins/bin/janitor_setup_worker.sh ; croak "Exec failed";


=====================================
bin/reproducible_debstrap.sh
=====================================
@@ -40,11 +40,32 @@ delay_start
 # Actual run ${TOOL} twice
 mkdir -p $BUILDDIR/b1/${TOOL}
 mkdir -p $BUILDDIR/b2/${TOOL}
+
 output_echo "Verbosely running ${TOOL} $SUITE for the first run."
-sudo ${TOOL} -v $SUITE > $BUILDDIR/b1/${TOOL}/${SUITE}.tar
+case ${TOOL} in
+	mmdebstrap)	sudo mmdebstrap -v $SUITE > $BUILDDIR/b1/${TOOL}/${SUITE}.tar
+			;;
+	debootstrap)	sudo debootstrap --verbose $SUITE $BUILDDIR/b1/${TOOL}/${SUITE}
+			sudo tar --mtime=$SOURCE_DATE_EPOCH --clamp-mtime -C $BUILDDIR/b1/${TOOL}/ -cf ${SUITE}.tar ${SUITE}
+			sudo rm -rf --one-file-system $BUILDDIR/b1/${TOOL}/${SUITE}
+			;;
+	*)		echo "Failure: ${TOOL} is unsupported."
+			exit 1
+			;;
+esac
 
 output_echo "Running ${TOOL} $SUITE for the second run."
-sudo ${TOOL} $SUITE > $BUILDDIR/b2/${TOOL}/${SUITE}.tar
+case ${TOOL} in
+	mmdebstrap)	sudo mmdebstrap $SUITE > $BUILDDIR/b2/${TOOL}/${SUITE}.tar
+			;;
+	debootstrap)	sudo debootstrap --verbose $SUITE $BUILDDIR/b2/${TOOL}/${SUITE}
+			sudo tar --mtime=$SOURCE_DATE_EPOCH --clamp-mtime -C $BUILDDIR/b2/${TOOL}/ -cf ${SUITE}.tar ${SUITE}
+			sudo rm -rf --one-file-system $BUILDDIR/b2/${TOOL}/${SUITE}
+			;;
+	*)		echo "Failure: ${TOOL} is unsupported."
+			exit 1
+			;;
+esac
 
 output_echo "Done running ${TOOL} twice."
 


=====================================
hosts/common/etc/sudoers.d/jenkins
=====================================
@@ -15,6 +15,7 @@ jenkins ALL=  \
 	/bin/tar -c --exclude ./sys/\* --exclude ./proc/\* -f /schroots/*, \
         /bin/tar xzf archlinux-bootstrap-*tar.gz -C /schroots, \
         /bin/tar xzf ./alpine-minirootfs-*.tar.gz -C /schroots/reproducible-alpine.new, \
+	/bin/tar --mtime=* --clamp-mtime -C /srv/workspace/* -cvf * \
 	/usr/sbin/chroot /schroots/*, \
 	/usr/sbin/chroot /chroots/*, \
 	/usr/sbin/chroot /media/*, \


=====================================
job-cfg/reproducible.yaml
=====================================
@@ -612,12 +612,17 @@
                 - 'mmdebstrap_bookworm':
                     my_description: 'Check mmdebstrap of bookworm is reproducible.'
                     my_shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh mmdebstrap bookworm'
-                    my_timed: '15 7 * * *'
+                    my_timed: '10 7 * * *'
                     my_hname: 'osuosl173'
                 - 'mmdebstrap_bullseye':
                     my_description: 'Check mmdebstrap of bullseye is reproducible.'
                     my_shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh mmdebstrap bullseye'
-                    my_timed: '30 7 1 * *'
+                    my_timed: '15 7 1 * *'
+                    my_hname: 'osuosl173'
+                - 'debootstrap_unstable':
+                    my_description: 'Check debootstrap of unstable is reproducible.'
+                    my_shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh debootstrap unstable'
+                    my_timed: '20 7 * * *'
                     my_hname: 'osuosl173'
                 - 'json':
                     my_description: 'Generate https://reproducible.debian.net/userContent/reproducible.json for consumption by tracker.debian.org.'



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/c9d5e8628ea73da6e05dad9247cb381690846319...6294d6df6e10a366db91ada58fac83cfa821f3c8

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/c9d5e8628ea73da6e05dad9247cb381690846319...6294d6df6e10a366db91ada58fac83cfa821f3c8
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/9d94dafd/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list