[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible freebsd: remove traces of /usr/obj usage

Holger Levsen holger at moszumanska.debian.org
Fri Aug 28 07:40:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 70eeae24c66c30e96e3b03fc2f8149501e6a74f9
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Aug 28 09:39:27 2015 +0200

    reproducible freebsd: remove traces of /usr/obj usage
---
 TODO                                        |  1 -
 bin/reproducible_freebsd.sh                 | 14 +++++---------
 hosts/freebsd-jenkins/usr/local/etc/sudoers |  8 +++-----
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/TODO b/TODO
index 0393211..71f2588 100644
--- a/TODO
+++ b/TODO
@@ -371,7 +371,6 @@ properties:
 ** adduser jenkins (with bash as default shell)
 ** mkdir -p /srv/reproducible-results
 ** chown -R jenkins:jenkins /srv/
-** ln -s /srv/ /usr/obj/srv
 
 ==== reproducible...
 
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index adee5d8..a3bae83 100755
--- a/bin/reproducible_freebsd.sh
+++ b/bin/reproducible_freebsd.sh
@@ -17,7 +17,7 @@ cleanup_tmpdirs() {
 	$RSSH "sudo chflags -R noschg $TMPDIR"
 	$RSSH "rm -r $TMPDIR"
 	rm $TMPDIR -r
-	$RSSH 'sudo rm -r /usr/src /usr/obj'
+	$RSSH 'sudo rm -rf /usr/src'
 }
 
 create_results_dirs() {
@@ -26,6 +26,9 @@ create_results_dirs() {
 
 save_freebsd_results(){
 	local RUN=$1
+	echo "============================================================================="
+	echo "$(date -u) - Saving freebsd ${FREEBSD_VERSION} artifacts for $RUN."
+	echo "============================================================================="
 	mkdir -p $TMPDIR/$RUN/
 	# copy results over
 	DUMMY_DATE="$(date -u +'%Y-%m-%d')T00:00:00Z"
@@ -42,7 +45,7 @@ FREEBSD_TARGET="release/10.2.0"
 RSSH="ssh freebsd-jenkins.debian.net"
 RSCP="scp -r freebsd-jenkins.debian.net"
 TMPBUILDDIR=/usr/src
-$RSSH 'sudo rm -r /usr/src /usr/obj ; sudo mkdir /usr/src /usr/obj ; sudo chown jenkins /usr/src /usr/obj'  ### 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
 TMPDIR=$($RSSH 'TMPDIR=/srv/reproducible-results mktemp -d')  # used to compare results
 DATE=$(date -u +'%Y-%m-%d')
 START=$(date +'%s')
@@ -78,10 +81,6 @@ $RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG DESTDIR=$TMPDIR sudo make -j $NUM_CPU
 # save results in b1
 save_freebsd_results b1
 
-echo "============================================================================="
-echo "$(date -u) - Building freebsd ${FREEBSD_VERSION} - cleaning up between builds."
-echo "============================================================================="
-$RSSH "sudo rm -r /usr/obj/ ; sudo mkdir /usr/obj ; sudo chown jenkins /usr/src /usr/obj"
 
 echo "============================================================================="
 echo "$(date -u) - Building freebsd - second build run."
@@ -109,9 +108,6 @@ export TZ="/usr/share/zoneinfo/UTC"
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:"
 umask 0022
 
-# cleanup on the node
-$RSSH 'sudo rm -r /usr/src /usr/obj'
-
 # run diffoscope on the results
 TIMEOUT="30m"
 DBDSUITE="unstable"
diff --git a/hosts/freebsd-jenkins/usr/local/etc/sudoers b/hosts/freebsd-jenkins/usr/local/etc/sudoers
index d09b669..978b0b8 100644
--- a/hosts/freebsd-jenkins/usr/local/etc/sudoers
+++ b/hosts/freebsd-jenkins/usr/local/etc/sudoers
@@ -97,13 +97,11 @@ 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 -r /usr/src /usr/obj, \
-	/bin/rm -r /usr/obj, \
+	/bin/rm -rf /usr/src, \
 	/bin/rm -r /srv/reproducible-results/* /srv/reproducible-results/*.tar.xz, \
 	/bin/chflags -R noschg /srv/reproducible-results/*, \
-	/bin/mkdir /usr/obj, \
-	/bin/mkdir /usr/src /usr/obj, \
-	/usr/sbin/chown jenkins /usr/src /usr/obj, \
+	/bin/mkdir /usr/src, \
+	/usr/sbin/chown jenkins /usr/src, \
 	/usr/bin/find /srv/reproducible-results/* -newer /srv/reproducible-results/* -exec touch *, \
 	/usr/bin/find /srv/reproducible-results/* -print0, \
 	/usr/bin/tar --null -T - --no-recursion -cJf *.tar.xz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list