[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 18:19:09 BST 2022



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


Commits:
551e5e39 by Holger Levsen at 2022-08-29T19:18:30+02:00
reproducible Debian: refactoring

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

- - - - -
17e4adb4 by Holger Levsen at 2022-08-29T19:18:51+02:00
reproducible Debian: fix sudoers syntax

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

- - - - -


2 changed files:

- bin/reproducible_debstrap.sh
- hosts/common/etc/sudoers.d/jenkins


Changes:

=====================================
bin/reproducible_debstrap.sh
=====================================
@@ -40,32 +40,33 @@ 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."
-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."
-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}
+for LOOP in "first" "second" ; do
+	case $LOOP in
+		first)	SUBDIR=b1
+			ACTION="Verbosely running"
+			REALTOOL=$TOOL
 			;;
-	*)		echo "Failure: ${TOOL} is unsupported."
-			exit 1
+		second)	SUBDIR=b2
+			ACTION="Running"
+			case $TOOL in
+				mmdebstrap)	REALTOOL="mmdebstrap -v" ;;
+				debootstrap)	REALTOOL="debootstrap --verbose" ;;
+			esac
 			;;
-esac
+	esac
+	output_echo "$ACTION ${TOOL} $SUITE for the $LOOP run."
+	case ${TOOL} in
+		mmdebstrap)	sudo $REALTOOL $SUITE > $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar
+				;;
+		debootstrap)	sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
+				sudo tar --mtime=$SOURCE_DATE_EPOCH --clamp-mtime -C $BUILDDIR/$SUBDIR/${TOOL}/ -cf ${SUITE}.tar ${SUITE}
+				sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
+				;;
+		*)		echo "Failure: ${TOOL} is unsupported."
+				exit 1
+				;;
+	esac
+done
 
 output_echo "Done running ${TOOL} twice."
 


=====================================
hosts/common/etc/sudoers.d/jenkins
=====================================
@@ -15,7 +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/* -cf * \
+	/bin/tar --mtime=* --clamp-mtime -C /srv/workspace/* -cf *, \
 	/usr/sbin/chroot /schroots/*, \
 	/usr/sbin/chroot /chroots/*, \
 	/usr/sbin/chroot /media/*, \



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/ffc5fe4ed9e9bb079f5aa10a515a427ad361e457...17e4adb46ca545b63acc7913cfcf3a52138ae9a8

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/ffc5fe4ed9e9bb079f5aa10a515a427ad361e457...17e4adb46ca545b63acc7913cfcf3a52138ae9a8
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/14b63faa/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list