From 27de39f758494a8464dba0d7c52b5fc1569ad47f Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 15 Aug 2015 14:18:52 +0200 Subject: reproducible freebsd: also run make installworld installkernel distribution --- bin/reproducible_freebsd.sh | 17 ++++++++++------- hosts/freebsd-jenkins/usr/local/etc/sudoers | 8 ++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh index 8e428662..5f08ce59 100755 --- a/bin/reproducible_freebsd.sh +++ b/bin/reproducible_freebsd.sh @@ -26,7 +26,9 @@ create_results_dirs() { save_freebsd_results(){ local RUN=$1 mkdir -p $TMPDIR/$RUN/ - cp -pr /usr/obj/releasedir/ $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 {} \; } @@ -66,14 +68,16 @@ export TZ="/usr/share/zoneinfo/Etc/GMT+12" NUM_CPU=3 $RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NUM_CPU buildworld" $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 sudo make -j $NUM_CPU distribution" # save results in b1 save_freebsd_results b1 echo "=============================================================================" echo "$(date -u) - Building freebsd ${FREEBSD_VERSION} - cleaning up between builds." echo "=============================================================================" -sudo rm -r /usr/obj/releasedir /usr/obj/destdir.* -# we keep the toolchain(s) +$RSSH "sudo rm -r /usr/obj/ ; sudo mkdir /usr/obj" echo "=============================================================================" echo "$(date -u) - Building freebsd - second build run." @@ -90,6 +94,9 @@ NEW_NUM_CPU=4 # actually build everything $RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NEW_NUM_CPU buildworld" $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 sudo make -j $NEW_NUM_CPU distribution" # save results in b2 save_freebsd_results b2 # cleanup... @@ -104,10 +111,6 @@ umask 0022 # cleanup on the node $RSSH 'sudo rm -r /usr/src /usr/obj' -# copy results over -$RSCP:$TMPDIR $TMPDIR -$RSSH "rm -r $TMPDIR" - # run debbindiff 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 3c749c08..a658e049 100644 --- a/hosts/freebsd-jenkins/usr/local/etc/sudoers +++ b/hosts/freebsd-jenkins/usr/local/etc/sudoers @@ -46,7 +46,7 @@ Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKA ## Locale settings Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET" # for reproducible builds: -Defaults env_keep += "TZ" +Defaults env_keep += "TZ DESTDIR" ## ## Run X applications through sudo; HOME is used to find the ## .Xauthority file. Note that other programs use HOME to find @@ -94,8 +94,12 @@ root ALL=(ALL) ALL # for reproducible builds: jenkins ALL= NOPASSWD: /usr/bin/make -j ? buildworld, \ /usr/bin/make -j ? buildkernel, \ + /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/releasedir /usr/obj/destdir.*, \ + /bin/rm -r /usr/obj/, \ + /bin/mkdir /usr/obj, \ /bin/mkdir /usr/src /usr/obj, \ /usr/sbin/chown jenkins /usr/src /usr/obj -- cgit v1.2.3-70-g09d2