[Qa-jenkins-scm] [jenkins.debian.net] 01/04: reproducible: build: move all env variable to the temporary pbuilderrc
Holger Levsen
holger at moszumanska.debian.org
Tue Jun 16 09:38:21 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 bcf7c0d7522dfb019a48974989202bad4d3acb6b
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Tue Jun 16 09:53:27 2015 +0200
reproducible: build: move all env variable to the temporary pbuilderrc
---
bin/reproducible_build.sh | 24 ++++++++++++++++--------
etc/pbuilderrc | 7 -------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index e0270a1..1adee96 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -367,11 +367,14 @@ check_suitability() {
first_build(){
local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR)
set -x
- printf "BUILDUSERID=1111\nBUILDUSERNAME=pbuilder1\n" > $TMPCFG
+ cat > "$TMPCFG" << EOF
+BUILDUSERID=1111
+BUILDUSERNAME=pbuilder1
+DEB_BUILD_OPTIONS="parallel=$NUM_CPU"
+TZ="/usr/share/zoneinfo/Etc/GMT+12"
+EOF
# remember to change the sudoers setting if you change the following command
( sudo timeout -k 12.1h 12h /usr/bin/ionice -c 3 /usr/bin/nice \
- DEB_BUILD_OPTIONS="parallel=$NUM_CPU" \
- TZ="/usr/share/zoneinfo/Etc/GMT+12" \
pbuilder --build \
--configfile $TMPCFG \
--debbuildopts "-b" \
@@ -426,13 +429,18 @@ build_rebuild() {
echo "============================================================================="
set -x
local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR)
- printf "BUILDUSERID=2222\nBUILDUSERNAME=pbuilder2\n" > $TMPCFG
+ cat > "$TMPCFG" << EOF
+BUILDUSERID=2222
+BUILDUSERNAME=pbuilder2
+DEB_BUILD_OPTIONS="parallel=$(echo $NUM_CPU-1|bc)"
+TZ="/usr/share/zoneinfo/Etc/GMT-14"
+LANG="fr_CH.UTF-8"
+LC_ALL="fr_CH.UTF-8"
+PATH="${PATHH:+"$PATH:"}/i/capture/the/path"
+umask 0002
+EOF
# remember to change the sudoers setting if you change the following command
( sudo timeout -k 12.1h 12h /usr/bin/ionice -c 3 /usr/bin/nice \
- DEB_BUILD_OPTIONS="parallel=$(echo $NUM_CPU-1|bc)" \
- TZ="/usr/share/zoneinfo/Etc/GMT-14" \
- LANG="fr_CH.UTF-8" \
- LC_ALL="fr_CH.UTF-8" \
/usr/bin/linux64 --uname-2.6 \
/usr/bin/unshare --uts -- \
/usr/sbin/pbuilder --build \
diff --git a/etc/pbuilderrc b/etc/pbuilderrc
index 84dbc47..4ddfd10 100644
--- a/etc/pbuilderrc
+++ b/etc/pbuilderrc
@@ -15,12 +15,5 @@ export -n http_proxy
BINDMOUNTS="$BINDMOUNTS /sys"
# set PATH to predictable values, see #780729 and #780725
PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
-# Use a different umask, but only do so when the UTS namespace differs from pid 1's UTS namespace.
-# This is only the case for the 2nd pbuilder run, which is started by bin/reproducible_build.sh
-# using 'unshare --uts'...
-if [ "$(readlink /proc/1/ns/uts)" != "$(readlink /proc/self/ns/uts)" ]; then
- umask 0002
- PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path"
-fi
USEDEVSHM=yes
--
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