From 11b71c2c8a1070f3df3cde6158bd17ea01471259 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 29 Sep 2014 16:07:14 +0200 Subject: reproducible: preserve pbuilder logs for packages ftbfs and link those logs from the stats page --- bin/reproducible_build.sh | 6 ++++-- bin/reproducible_stats.sh | 14 ++++++++++++-- 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 "" > index.html htmlecho "

Statistics for reproducible builds

" @@ -52,7 +51,18 @@ for PKG in $BAD ; do done htmlecho "

" htmlecho -htmlecho "

$COUNT_UGLY packages failed to build from source: ${UGLY}

" +htmlecho "

$COUNT_UGLY packages failed to build from source: " +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 "$PKG " + else + htmlecho "$PKG " + fi +done +htmlecho "

" if [ $COUNT_SOURCELESS -gt 0 ] ; then htmlecho "

$COUNT_SOURCELESS packages which don't exist in sid and need investigation: $SOURCELESS

" fi -- cgit v1.2.3-70-g09d2