summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-05 14:01:05 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-05 14:01:05 +0200
commit195c87d6605970a4da35cc420637b6d2d39faf38 (patch)
tree85f20d7c78f21e7be1dde5a29535df0107369b38
parent5af45de3cf5d9a718d80af5e274b8209ee8d79d8 (diff)
downloadjenkins.debian.net-195c87d6605970a4da35cc420637b6d2d39faf38.tar.xz
reproducible: preserve .buildinfo files
-rwxr-xr-xbin/reproducible_build.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 762c5743..d41ed539 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -15,7 +15,7 @@ if [ ! -f $PACKAGES_DB ] ; then
fi
# create dirs for results
-mkdir -p /var/lib/jenkins/userContent/dbd/ /var/lib/jenkins/userContent/pbuilder/
+mkdir -p /var/lib/jenkins/userContent/dbd/ /var/lib/jenkins/userContent/buildinfo/ /var/lib/jenkins/userContent/pbuilder/
# this needs sid entries in sources.list:
grep deb-src /etc/apt/sources.list | grep sid
@@ -89,6 +89,13 @@ cleanup_all() {
rm -r $TMPDIR
}
+cleanup_userContent() {
+ # FIXME: remove this first rm once all diffp.log files are gone
+ rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.diffp.log > /dev/null 2>&1
+ rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.debbindiff.html > /dev/null 2>&1
+ rm -f /var/lib/jenkins/userContent/buildinfo/${SRCPACKAGE}_*.buildinfo > /dev/null 2>&1
+}
+
TMPDIR=$(mktemp --tmpdir=$PWD -d)
NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
COUNT_TOTAL=0
@@ -157,10 +164,11 @@ for SRCPACKAGE in ${PACKAGES} ; do
cat b1/${SRCPACKAGE}_${EVERSION}_amd64.changes
LOGFILE=$(ls ${SRCPACKAGE}_${EVERSION}.dsc)
LOGFILE=$(echo ${LOGFILE%.dsc}.debbindiff.html)
+ BUILDINFO=${SRCPACKAGE}_${EVERSION}_amd64.buildinfo
/var/lib/jenkins/debbindiff.git/debbindiff.py --html ./${LOGFILE} b1/${SRCPACKAGE}_${EVERSION}_amd64.changes b2/${SRCPACKAGE}_${EVERSION}_amd64.changes || true
- if [ ! -f ./${LOGFILE} ] ; then
- rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.diffp.log > /dev/null 2>&1
- rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.debbindiff.html > /dev/null 2>&1
+ if [ ! -f ./${LOGFILE} ] || [ ! -f b1/${BUILD_INFO} ] ; then
+ cleanup_userContent
+ cp b1/${BUILD_INFO} /var/lib/jenkins/userContent/buildinfo/ || true
figlet ${SRCPACKAGE}
echo
echo "${SRCPACKAGE} built successfully and reproducibly."
@@ -168,8 +176,8 @@ for SRCPACKAGE in ${PACKAGES} ; do
let "COUNT_GOOD=COUNT_GOOD+1"
GOOD="${SRCPACKAGE} ${GOOD}"
else
- rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.diffp.log > /dev/null 2>&1
- rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.debbindiff.html > /dev/null 2>&1
+ cleanup_userContent
+ cp b1/${BUILD_INFO} /var/lib/jenkins/userContent/buildinfo/
mv ./${LOGFILE} /var/lib/jenkins/userContent/dbd/
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"unreproducible\", \"$DATE\")"
set +x