[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible freebsd: run 'make buildworld' with sudo as it needs to write to /usr/obj
Holger Levsen
holger at moszumanska.debian.org
Fri Jul 24 11:13:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 9f7e744f66e42824cd7d66063b8ebcab915733e7
Author: Holger Levsen <holger at layer-acht.org>
Date: Fri Jul 24 13:13:05 2015 +0200
reproducible freebsd: run 'make buildworld' with sudo as it needs to write to /usr/obj
---
bin/reproducible_freebsd.sh | 4 ++--
hosts/freebsd-jenkins/usr/local/etc/sudoers | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index 8ddc470..8437120 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 b6670c1..3999cde 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list