[Qa-jenkins-scm] [jenkins.debian.net] 03/05: reproducible: build: refactor: WIP: something exp+untested to avoid dcmd file back and forth, let's use --buildresult option of pbuilder to put resulted file directly where we want them
Holger Levsen
holger at moszumanska.debian.org
Sat Apr 18 15:31:09 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 7a63cfc90fddad946064da3d82b47694624ee286
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Mon Apr 6 00:53:27 2015 +0200
reproducible: build: refactor: WIP: something exp+untested to avoid dcmd file back and forth, let's use --buildresult option of pbuilder to put resulted file directly where we want them
---
bin/reproducible_build.sh | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 4c0a148..b0cf478 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -269,20 +269,15 @@ check_suitability
NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
FTBFS=1
TMPLOG=$(mktemp)
+ mkdir b1 b2
printf "BUILDUSERID=1111\nBUILDUSERNAME=pbuilder1\n" > $TMPCFG
( timeout 12h nice ionice -c 3 sudo \
DEB_BUILD_OPTIONS="parallel=$NUM_CPU" \
TZ="/usr/share/zoneinfo/Etc/GMT+12" \
- pbuilder --build --configfile $TMPCFG --debbuildopts "-b" --basetgz /var/cache/pbuilder/$SUITE-reproducible-base.tgz --distribution ${SUITE} ${SRCPACKAGE}_*.dsc
+ pbuilder --build --configfile $TMPCFG --debbuildopts "-b" --basetgz /var/cache/pbuilder/$SUITE-reproducible-base.tgz --buildresult b1 --distribution ${SUITE} ${SRCPACKAGE}_*.dsc
) 2>&1 | tee ${TMPLOG}
set +x
- if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
- mkdir b1 b2
- dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes b1
- # the .changes file might not contain the original sources archive
- # 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}_${ARCH}.changes
+ if [ -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
echo "============================================================================="
echo "Re-building ${SRCPACKAGE} in ${SUITE} on ${ARCH} now."
echo "============================================================================="
@@ -294,16 +289,11 @@ check_suitability
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 --configfile $TMPCFG --hookdir /etc/pbuilder/rebuild-hooks \
- --debbuildopts "-b" --basetgz /var/cache/pbuilder/$SUITE-reproducible-base.tgz --distribution ${SUITE} ${SRCPACKAGE}_${EVERSION}.dsc
+ --debbuildopts "-b" --basetgz /var/cache/pbuilder/$SUITE-reproducible-base.tgz --buildresult b2 --distribution ${SUITE} ${SRCPACKAGE}_${EVERSION}.dsc
) 2>&1 | tee -a ${RBUILDLOG}
set +x
- if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
+ if [ -f b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
FTBFS=0
- dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes b2
- # and again (see comment 5 lines above)
- sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}.dsc
- sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes
- cat b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes | tee -a ${RBUILDLOG}
cleanup_userContent
mv $RBUILDLOG /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
RBUIlDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
--
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