summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-29 16:07:14 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-29 16:07:14 +0200
commit11b71c2c8a1070f3df3cde6158bd17ea01471259 (patch)
tree589784a756939091ddacf89393b6d717c8950b65
parent68100e3f0bfe5d00cfaf502c179dc8296de695b1 (diff)
downloadjenkins.debian.net-11b71c2c8a1070f3df3cde6158bd17ea01471259.tar.xz
reproducible: preserve pbuilder logs for packages ftbfs and link those logs from the stats page
-rwxr-xr-xbin/reproducible_build.sh6
-rwxr-xr-xbin/reproducible_stats.sh14
2 files changed, 16 insertions, 4 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 24128f48..35213643 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -18,7 +18,7 @@ fi
# create dirs for results
mkdir -p results/_success
-mkdir -p /var/lib/jenkins/userContent/diffp/
+mkdir -p /var/lib/jenkins/userContent/diffp/ /var/lib/jenkins/userContent/pbuilder/
# create sqlite db
PACKAGES_DB=/var/lib/jenkins/reproducible.db
@@ -108,12 +108,13 @@ for SRCPACKAGE in $PACKAGES ; do
SKIPPED="${SRCPACKAGE} ${SKIPPED}"
continue
fi
- sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc
+ sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc | tee ${SRCPACKAGE}_${VERSION}.pbuilder.log
RESULT=$?
if [ $RESULT = 0 ] ; then
mkdir b1 b2
dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b1
sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes
+ rm ${SRCPACKAGE}_${VERSION}.pbuilder.log /var/lib/jenkins/userContent/pbuilder/${SRCPACKAGE}_*.pbuilder.log
sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc
dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes b2
sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_*.changes
@@ -144,6 +145,7 @@ for SRCPACKAGE in $PACKAGES ; do
rm b1 b2 -rf
else
sqlite3 -init $INIT $PACKAGES_DB "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"FTBFS\", \"$DATE\", \"\")"
+ mv ${SRCPACKAGE}_${VERSION}.pbuilder.log /var/lib/jenkins/userContent/pbuilder/
fi
dcmd rm ${SRCPACKAGE}_*.dsc
diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh
index 20889c02..fd0a3466 100755
--- a/bin/reproducible_stats.sh
+++ b/bin/reproducible_stats.sh
@@ -37,7 +37,6 @@ GUESS_GOOD=$(echo "$PERCENT_GOOD*$AMOUNT/100" | bc)
htmlecho() {
echo "$1" >> index.html
}
-rm index.html
htmlecho "<html><body>" > index.html
htmlecho "<h2>Statistics for reproducible builds</h2>"
@@ -52,7 +51,18 @@ for PKG in $BAD ; do
done
htmlecho "</code></p>"
htmlecho
-htmlecho "<p>$COUNT_UGLY packages failed to build from source: <code>${UGLY}</code></p>"
+htmlecho "<p>$COUNT_UGLY packages failed to build from source: <code>"
+for PKG in $UGLY ; do
+ VERSION=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT version FROM source_packages WHERE name = \"$PKG\"")
+ # remove epoch
+ VERSION=$(echo $VERSION | cut -d ":" -f2)
+ if [ -f /var/lib/jenkins/userContent/pbuilder/${PKG}_${VERSION}.pbuilder.log ] ; then
+ htmlecho "<a href=\"$JENKINS_URL/userContent/pbuilder/${PKG}_${VERSION}.pbuilder.log\">$PKG </a> "
+ else
+ htmlecho "$PKG "
+ fi
+done
+htmlecho "</code></p>"
if [ $COUNT_SOURCELESS -gt 0 ] ; then
htmlecho "<p>$COUNT_SOURCELESS packages which don't exist in sid and need investigation: <code>$SOURCELESS</code></p>"
fi