diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2015-01-18 02:36:35 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-01-18 12:44:17 +0100 |
commit | 4ba5acae984a00b7f233b67f984875e7c650b895 (patch) | |
tree | f7903414efb79f7758293eefa0251579dda78163 /bin | |
parent | 0c95a546f22a1b5e3dd94caffa7743ada6c9dc73 (diff) | |
download | jenkins.debian.net-4ba5acae984a00b7f233b67f984875e7c650b895.tar.xz |
Use different BUILDUSERID and BUILDUSERNAME for the two builds
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index ac8627ff..faa15d59 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -14,7 +14,7 @@ common_init "$@" mkdir -p /var/lib/jenkins/userContent/dbd/ /var/lib/jenkins/userContent/buildinfo/ /var/lib/jenkins/userContent/rbuild/ cleanup_all() { - rm -r $TMPDIR + rm -r $TMPDIR $TMPCFG } cleanup_userContent() { @@ -36,6 +36,7 @@ unschedule_from_db() { } TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d) +TMPCFG=$(mktemp -t pbuilderrc_XXXX) trap cleanup_all INT TERM EXIT cd $TMPDIR RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT name,date_scheduled FROM sources_scheduled WHERE date_build_started = '' ORDER BY date_scheduled LIMIT 1") @@ -114,7 +115,8 @@ else set +e set -x NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) - ( timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc ) 2>&1 | tee -a ${RBUILDLOG} + printf "BUILDUSERID=1111\nBUILDUSERNAME=pbuilder1\n" > $TMPCFG + ( timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --configfile $TMPCFG --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc ) 2>&1 | tee -a ${RBUILDLOG} set +x if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes ] ; then mkdir b1 b2 @@ -123,11 +125,12 @@ else # so first delete files from .dsc, then from .changes file sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}.dsc sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes + printf "BUILDUSERID=2222\nBUILDUSERNAME=pbuilder2\n" > $TMPCFG echo "=============================================================================" echo "Re-building ${SRCPACKAGE} now." echo "=============================================================================" set -x - timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" LANG="fr_CH.UTF-8" LC_ALL="fr_CH.UTF-8" pbuilder --build --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_${EVERSION}.dsc + timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" LANG="fr_CH.UTF-8" LC_ALL="fr_CH.UTF-8" pbuilder --build --configfile $TMPCFG --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_${EVERSION}.dsc set +x dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes b2 # and again (see comment 5 lines above) |