From e63787d11d171df98781c0384d7bf57a8415af19 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 5 Oct 2014 02:23:14 +0200 Subject: reproducible: move debbindiff.git repo cloning to _setup.sh --- bin/reproducible_build.sh | 12 +----------- bin/reproducible_setup.sh | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index c55dc0b1..c3aaaa54 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -14,16 +14,6 @@ if [ ! -f $PACKAGES_DB ] ; then exit 1 fi -# FIXME: needed as long as #763328 (RFP: /usr/bin/diffp) is unfixed... -# fetch git repo for the diffp command used later -if [ -d debbindiff.git ] ; then - cd debbindiff.git - git pull - cd .. -else - git clone git://git.debian.org/git/reproducible/debbindiff.git debbindiff.git -fi - # create dirs for results mkdir -p results/ mkdir -p /var/lib/jenkins/userContent/diffp/ /var/lib/jenkins/userContent/pbuilder/ @@ -169,7 +159,7 @@ for SRCPACKAGE in ${PACKAGES} ; do LOGFILE=$(ls ${SRCPACKAGE}_${EVERSION}.dsc) LOGFILE=$(echo ${LOGFILE%.dsc}.diffp.html) rm -f ./results/${LOGFILE} > /dev/null 2>&1 - ./debbindiff.git/debbindiff.py --html ./results/${LOGFILE} b1/${SRCPACKAGE}_${EVERSION}_amd64.changes b2/${SRCPACKAGE}_${EVERSION}_amd64.changes || true + /var/lib/jenkins/debbindiff.git/debbindiff.py --html ./results/${LOGFILE} b1/${SRCPACKAGE}_${EVERSION}_amd64.changes b2/${SRCPACKAGE}_${EVERSION}_amd64.changes || true if [ ! -f ./results/${LOGFILE} ] ; then rm -f /var/lib/jenkins/userContent/diffp/${SRCPACKAGE}_*.diffp.log > /dev/null 2>&1 rm -f /var/lib/jenkins/userContent/diffp/${SRCPACKAGE}_*.diffp.html > /dev/null 2>&1 diff --git a/bin/reproducible_setup.sh b/bin/reproducible_setup.sh index 1e15d21f..845a516b 100755 --- a/bin/reproducible_setup.sh +++ b/bin/reproducible_setup.sh @@ -38,8 +38,27 @@ cat >/var/lib/jenkins/reproducible.init <<-EOF .timeout 30000 EOF +# FIXME: needed as long as there is no backport for debbindiff +# or as long as we dont run it within pbuilder... +# fetch git repo for the debbindiff command used in reproducible_build.sh +WORKSPACE=$PWD +cd /var/lib/jenkins +if [ -d debbindiff.git ] ; then + cd debbindiff.git + git pull +else + git clone git://git.debian.org/git/reproducible/debbindiff.git debbindiff.git +fi +cd $WORKSPACE + +# +# finally, setup pbuilder +# TMPFILE=$(mktemp) cat > ${TMPFILE} <<- EOF +# +# this script is run within the pbuilder environment to further customize it +# echo "-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.12 (GNU/Linux) @@ -77,7 +96,9 @@ dpkg -l echo for i in \$(dpkg -l |grep ^ii |awk -F' ' '{print \$2}'); do apt-cache madison "\$i" | head -1 | grep reproducible.alioth.debian.org || true ; done EOF - +# +# actually setup pbuilder +# sudo rm /var/cache/pbuilder/base-reproducible.tgz || true sudo pbuilder --create --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid sudo pbuilder --execute --save-after-exec --basetgz /var/cache/pbuilder/base-reproducible.tgz -- ${TMPFILE} -- cgit v1.2.3-70-g09d2