Skip to content
Snippets Groups Projects
Commit 08542a23 authored by Jessica Clarke's avatar Jessica Clarke Committed by Holger Levsen
Browse files

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: default avatarHolger Levsen <holger@layer-acht.org>
parent 263942fe
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
......@@ -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, \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment