From 87e4d30a3730ccfb1eedf2918cf6002c028e6cea Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 7 Oct 2014 18:59:48 +0200 Subject: reproducible: refactor --- bin/reproducible_stats.sh | 75 ++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 34 deletions(-) (limited to 'bin/reproducible_stats.sh') diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index 1c82dc90..d36721e6 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -154,42 +154,49 @@ process_packages ${BAD["all"]} EXTRA_STAR=false process_packages ${UGLY["all"]} ${GOOD["all"]} -echo "Starting to write statistics index page." -echo -SUMMARY=index.html -rm -f $SUMMARY -write_summary "" -write_summary "" -write_summary "" -write_summary "

Statistics for reproducible builds

" -write_summary "

This page is updated every three hours. Results are obtained from several build jobs running on jenkins.debian.net. Thanks to Profitbricks for donating the virtual machine it's running on!

" -write_summary "

$COUNT_TOTAL packages attempted to build so far, that's $PERCENT_TOTAL% of $AMOUNT source packages in Debian $SUITE currently. Out of these, $PERCENT_GOOD% were successful, so quite wildly guessing this roughy means about $GUESS_GOOD packages should be reproducibly buildable! Join #debian-reproducible on OFTC to get support for making sure your packages build reproducibly too!

" -write_summary "

$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly: " -link_packages ${BAD["all"]} -write_summary "

" -write_summary "

A β sign after a package name indicates that no .buildinfo file was generated.

" -write_summary -write_summary "

$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source: " -link_packages ${UGLY["all"]} -write_summary "

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

$COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages where the source could not be downloaded. ${SOURCELESS["all"]}

" -fi -if [ $COUNT_NOTFORUS -gt 0 ] ; then - write_summary "

$COUNT_NOTFORUS ($PERCENT_NOTFORUS%) packages which are neither Architecture: 'any' nor 'all' nor 'amd64' nor 'linux-amd64': ${NOTFORUS["all"]}

" +MAINVIEW="last_24h" +ALLVIEWS="all last_24h last_48h" +for VIEW in $ALLVIEWS ; do + echo "Starting to write statistics index_$VIEW page." + echo + SUMMARY=index_${VIEW}.html + rm -f $SUMMARY + write_summary "" + write_summary "" + write_summary "" + write_summary "

Statistics for reproducible builds

" + write_summary "

This page is updated every three hours. Results are obtained from several build jobs running on jenkins.debian.net. Thanks to Profitbricks for donating the virtual machine it's running on!

" + write_summary "

$COUNT_TOTAL packages attempted to build so far, that's $PERCENT_TOTAL% of $AMOUNT source packages in Debian $SUITE currently. Out of these, $PERCENT_GOOD% were successful, so quite wildly guessing this roughy means about $GUESS_GOOD packages should be reproducibly buildable! Join #debian-reproducible on OFTC to get support for making sure your packages build reproducibly too!

" + write_summary "

$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly: " + link_packages ${BAD[$VIEW]} + write_summary "

" + write_summary "

A β sign after a package name indicates that no .buildinfo file was generated.

" + write_summary + write_summary "

$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source: " + link_packages ${UGLY[$VIEW]} + write_summary "

" + if [ $COUNT_SOURCELESS -gt 0 ] ; then + write_summary "

$COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages where the source could not be downloaded. ${SOURCELESS[$VIEW]}

" + fi + if [ $COUNT_NOTFORUS -gt 0 ] ; then + write_summary "

$COUNT_NOTFORUS ($PERCENT_NOTFORUS%) packages which are neither Architecture: 'any' nor 'all' nor 'amd64' nor 'linux-amd64': ${NOTFORUS[$VIEW]}

" + fi + if [ $COUNT_BLACKLISTED -gt 0 ] ; then + write_summary "

$COUNT_BLACKLISTED packages are blacklisted and will never be tested here: $BLACKLISTED

" + fi + write_summary "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly: " + link_packages ${GOOD[$VIEW]} + write_summary "

" + write_summary "

Packages which failed to build reproducibly, sorted by Maintainers: and Uploaders: fields

" + write_summary "

$(echo ${BAD[$VIEW]} | dd-list -i) 

" + write_summary "

Static URL for this page. Last modified: $(date). Copyright 2014 Holger Levsen, GPL-2 licensed. About jenkins.debian.net" + write_summary "

" fi -if [ $COUNT_BLACKLISTED -gt 0 ] ; then - write_summary "

$COUNT_BLACKLISTED packages are blacklisted and will never be tested here: $BLACKLISTED

" -fi -write_summary "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly: " -link_packages ${GOOD["all"]} -write_summary "

" -write_summary "

Packages which failed to build reproducibly, sorted by Maintainers: and Uploaders: fields

" -write_summary "

$(echo ${BAD["all"]} | dd-list -i) 

" -write_summary "

Static URL for this page. Last modified: $(date). Copyright 2014 Holger Levsen, GPL-2 licensed. About jenkins.debian.net" -write_summary "

" echo # job output -cp $SUMMARY /var/lib/jenkins/userContent/reproducible.html +cp $SUMMARY /var/lib/jenkins/userContent/ +if [ "$VIEW" = "$MAINVIEW" ] ; then + cp $SUMMARY reproducible.html +fi rm $SUMMARY -- cgit v1.2.3-70-g09d2