summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 00:53:27 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:08 +0200
commit7a63cfc90fddad946064da3d82b47694624ee286 (patch)
treefbe2d8e2ae42298207f75eb4d6a001b32871a3de /bin
parent82e9538ce93f2c4912f71c582a2cd531661e8aed (diff)
downloadjenkins.debian.net-7a63cfc90fddad946064da3d82b47694624ee286.tar.xz
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh20
1 files changed, 5 insertions, 15 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 4c0a1484..b0cf478f 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