summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_freebsd.sh4
-rw-r--r--hosts/freebsd-jenkins/usr/local/etc/sudoers9
2 files changed, 9 insertions, 4 deletions
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index 8ddc4705..8437120f 100755
--- a/bin/reproducible_freebsd.sh
+++ b/bin/reproducible_freebsd.sh
@@ -60,9 +60,9 @@ echo "$(date -u) - Building freebsd ${FREEBSD_VERSION} - first build run."
echo "============================================================================="
export TZ="/usr/share/zoneinfo/Etc/GMT+12"
# actually build everything
-$RSSH "cd $TMPBUILDDIR/freebsd ; TZ=$TZ make buildworld" || true
+$RSSH "cd $TMPBUILDDIR/freebsd ; TZ=$TZ sudo make buildworld" || true
# try again, to work around failure in cleanup (stage 2.1)
-$RSSH "cd $TMPBUILDDIR/freebsd ; TZ=$TZ make buildworld"
+$RSSH "cd $TMPBUILDDIR/freebsd ; TZ=$TZ sudo make buildworld"
# save results in b1
save_freebsd_results b1
# cleanup ...
diff --git a/hosts/freebsd-jenkins/usr/local/etc/sudoers b/hosts/freebsd-jenkins/usr/local/etc/sudoers
index b6670c1a..3999cde4 100644
--- a/hosts/freebsd-jenkins/usr/local/etc/sudoers
+++ b/hosts/freebsd-jenkins/usr/local/etc/sudoers
@@ -34,7 +34,7 @@
##
## Uncomment if needed to preserve environmental variables related to the
## FreeBSD pkg_* utilities and fetch.
-# Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE"
+Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE"
##
## Additionally uncomment if needed to preserve environmental variables
## related to portupgrade
@@ -44,7 +44,9 @@
## when running commands via sudo.
##
## Locale settings
-# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
+Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
+# for reproducible builds:
+Defaults env_keep += "TZ"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file. Note that other programs use HOME to find
@@ -89,6 +91,9 @@ root ALL=(ALL) ALL
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL
+# for reproducible builds:
+jenkins ALL= NOPASSWD: /usr/bin/make buildworld
+
## 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).
# Defaults targetpw # Ask for the password of the target user