summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_freebsd.sh11
-rw-r--r--hosts/freebsd-jenkins/usr/local/etc/sudoers7
2 files changed, 13 insertions, 5 deletions
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index e2d13d26..816df076 100755
--- a/bin/reproducible_freebsd.sh
+++ b/bin/reproducible_freebsd.sh
@@ -27,9 +27,11 @@ save_freebsd_results(){
local RUN=$1
mkdir -p $TMPDIR/$RUN/
# copy results over
- $RSCP:$TMPDIR $TMPDIR/$RUN
- $RSSH "rm -r $TMPDIR ; mkdir $TMPDIR"
- find $TMPDIR/$RUN/ -name MD5 -o -name SHA512 -exec rm {} \;
+ DUMMY_DATE="$(date -u +'%Y-%m-%d') 00:00Z"
+ $RSSH "sudo find $TMPDIR --exec touch --date='$DUMMY_DATE'"
+ $RSSH "sudo find $TMPDIR -print0 | LC_ALL=C sort -z | sudo tar --null -T - --no-recursion -cJf $TMPDIR.tar.xz"
+ $RSCP:$TMPDIR.tar.xz $TMPDIR/$RUN
+ $RSSH "sudo rm -r $TMPDIR $TMPDIR.tar.xz ; mkdir $TMPDIR"
}
#
@@ -71,6 +73,7 @@ $RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NUM_CPU buildkernel"
$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NUM_CPU installworld"
$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NUM_CPU installkernel"
$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NUM_CPU distribution"
+
# save results in b1
save_freebsd_results b1
@@ -97,9 +100,9 @@ $RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NEW_NUM_CPU buildkernel"
$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU installworld"
$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU installkernel"
$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU distribution"
+
# save results in b2
save_freebsd_results b2
-# cleanup...
# reset environment to default values again
export LANG="en_GB.UTF-8"
diff --git a/hosts/freebsd-jenkins/usr/local/etc/sudoers b/hosts/freebsd-jenkins/usr/local/etc/sudoers
index 9a139c68..e8bcd2bc 100644
--- a/hosts/freebsd-jenkins/usr/local/etc/sudoers
+++ b/hosts/freebsd-jenkins/usr/local/etc/sudoers
@@ -99,9 +99,14 @@ jenkins ALL= NOPASSWD: /usr/bin/make -j ? buildworld, \
/usr/bin/make -j ? distribution, \
/bin/rm -r /usr/src /usr/obj, \
/bin/rm -r /usr/obj, \
+ /bin/rm -r /srv/reproducible-results/* /srv/reproducible-results/*.tar.xz, \
/bin/mkdir /usr/obj, \
/bin/mkdir /usr/src /usr/obj, \
- /usr/sbin/chown jenkins /usr/src /usr/obj
+ /usr/sbin/chown jenkins /usr/src /usr/obj, \
+ /usr/bin/find /srv/reproducible-results/* -exec touch *, \
+ /usr/bin/find /srv/reproducible-results/* -print0, \
+ /usr/bin/tar --null -T - --no-recursion -cJf *.tar.xz
+
## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).