[Git][qa/jenkins.debian.net][master] reproducible_freebsd.sh: Clean up obj for second build

Holger Levsen (@holger) gitlab at salsa.debian.org
Tue Jan 28 22:06:06 GMT 2025



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


Commits:
08542a23 by Jessica Clarke at 2025-01-28T23:05:54+01:00
reproducible_freebsd.sh: Clean up obj for second build

Otherwise the second build doesn't really do much, and if even that's
not reproducible then something's gone very wrong!

This splits up some of the commands for sudo into two commands so
there's only one version of each, rather than having separate commands
for b1 and b2.

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

- - - - -


2 changed files:

- bin/reproducible_freebsd.sh
- hosts/freebsd-jenkins/usr/local/etc/sudoers


Changes:

=====================================
bin/reproducible_freebsd.sh
=====================================
@@ -16,7 +16,7 @@ cleanup_tmpdirs() {
 	$RSSH "sudo chflags -R noschg $TMPDIR"
 	$RSSH "rm -r $TMPDIR" || true
 	rm $TMPDIR -r
-	$RSSH 'sudo rm -rf /usr/src /usr/obj/usr/src'
+	$RSSH 'sudo rm -rf /usr/src ; sudo rm -rf /usr/obj/usr/src'
 }
 
 create_results_dirs() {
@@ -98,7 +98,8 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
 	RSSH="ssh -o Batchmode=yes freebsd-jenkins.debian.net"
 	RSCP="scp -r freebsd-jenkins.debian.net"
 	TMPBUILDDIR=/usr/src
-	$RSSH 'sudo rm -rf /usr/src /usr/obj/usr/src ; sudo mkdir -p /usr/obj/usr/src ; sudo mkdir /usr/src ; sudo chown jenkins /usr/src /usr/obj/usr/src'  ### this is tmpfs on linux, we should move this to tmpfs on FreeBSD too
+	$RSSH 'sudo rm -rf /usr/src ; sudo mkdir /usr/src ; sudo chown jenkins /usr/src'  ### this is tmpfs on linux, we should move this to tmpfs on FreeBSD too
+	$RSSH 'sudo rm -rf /usr/obj/usr/src ; sudo mkdir -p /usr/obj/usr/src ; sudo chown jenkins /usr/obj/usr/src'
 	# Ensure we start with the correct time on the target
 	$RSSH 'sudo service ntpd stop ; sudo ntpdate -b pool.ntp.org ; sudo service ntpd start'
 	$RSSH 'sudo service ntpd status ; date -u'
@@ -146,6 +147,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
 
 	# set time forward 398 days and some
 	FUTURE_DATE=$(expr $(date +%s) + 34410180)
+	$RSSH 'sudo rm -rf /usr/obj/usr/src ; sudo mkdir -p /usr/obj/usr/src ; sudo chown jenkins /usr/obj/usr/src'
 	$RSSH "sudo service ntpd stop ; sudo date -f %s $FUTURE_DATE ; date"
 	echo "$(date -u) - system is running in the future now."
 


=====================================
hosts/freebsd-jenkins/usr/local/etc/sudoers
=====================================
@@ -102,12 +102,14 @@ jenkins ALL= NOPASSWD: /usr/bin/make -j * buildworld, \
 	/usr/bin/make -j * installworld, \
 	/usr/bin/make -j * installkernel, \
 	/usr/bin/make -j * distribution, \
-	/bin/rm -rf /usr/src /usr/obj/usr/src, \
+	/bin/rm -rf /usr/src, \
+	/bin/rm -rf /usr/obj/usr/src, \
 	/bin/rm -r /srv/reproducible-results/* /srv/reproducible-results/*.tar.xz, \
 	/bin/chflags -R noschg /srv/reproducible-results/*, \
 	/bin/mkdir /usr/src, \
 	/bin/mkdir -p /usr/obj/usr/src, \
-	/usr/sbin/chown jenkins /usr/src /usr/obj/usr/src, \
+	/usr/sbin/chown jenkins /usr/src, \
+	/usr/sbin/chown jenkins /usr/obj/usr/src, \
 	/usr/bin/find /srv/reproducible-results/* -newer /srv/reproducible-results/* -exec touch *, \
 	/usr/bin/find /srv/reproducible-results/* -print0, \
 	/usr/bin/tar --no-recursion --null -T - -cJf *.tar.xz, \



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/08542a237db2e1d6b61a9df0fab613e8bf7c3400
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/20250128/dfec2869/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list