diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-08-28 09:39:27 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-08-28 09:40:35 +0200 |
commit | 70eeae24c66c30e96e3b03fc2f8149501e6a74f9 (patch) | |
tree | 5e6ad49742314ada6a63e5759196ac38cad332fb | |
parent | c81964fb9b3e70edcfdfb700b8e2f92d06e3ee56 (diff) | |
download | jenkins.debian.net-70eeae24c66c30e96e3b03fc2f8149501e6a74f9.tar.xz |
reproducible freebsd: remove traces of /usr/obj usage
-rw-r--r-- | TODO | 1 | ||||
-rwxr-xr-x | bin/reproducible_freebsd.sh | 14 | ||||
-rw-r--r-- | hosts/freebsd-jenkins/usr/local/etc/sudoers | 8 |
3 files changed, 8 insertions, 15 deletions
@@ -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 adee5d8d..a3bae834 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 d09b6696..978b0b84 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 |