From bcf7c0d7522dfb019a48974989202bad4d3acb6b Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 16 Jun 2015 09:53:27 +0200 Subject: reproducible: build: move all env variable to the temporary pbuilderrc --- bin/reproducible_build.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'bin/reproducible_build.sh') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index e0270a18..1adee962 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 \ -- cgit v1.2.3-54-g00ecf