From 5b3203b4972297290982d9813df7eb0a05984aab Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 7 Oct 2014 17:48:10 +0200 Subject: reproducible: refactor --- bin/reproducible_stats.sh | 57 ++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index 7e8812b0..1c4398f5 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -38,8 +38,8 @@ PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc) PERCENT_SOURCELESS=$(echo "scale=1 ; ($COUNT_SOURCELESS*100/$COUNT_TOTAL)" | bc) GUESS_GOOD=$(echo "$PERCENT_GOOD*$AMOUNT/100" | bc) -write_index() { - echo "$1" >> index.html +write_summary() { + echo "$1" >> $SUMMARY echo "$1" | html2text } @@ -119,50 +119,51 @@ link_packages() { write_pkg_frameset "$PKG" "$MAINLINK" fi if [ -f "/var/lib/jenkins/userContent/rbuild/${PKG}_${EVERSION}.rbuild.log" ] ; then - write_index " $PKG$STAR " + write_summary " $PKG$STAR " else - write_index " $PKG " + write_summary " $PKG " fi done } echo "Starting to write statistics index page." echo -rm -f index.html -write_index "" -write_index "" -write_index "" -write_index "

Statistics for reproducible builds

" -write_index "

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_index "

$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_index "

$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly: " +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: " EXTRA_STAR=true link_packages $BAD EXTRA_STAR=false -write_index "

" -write_index "

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

" -write_index -write_index "

$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source: " +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 -write_index "

" +write_summary "

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

$COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages where the source could not be downloaded. $SOURCELESS

" + write_summary "

$COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages where the source could not be downloaded. $SOURCELESS

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

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

" + write_summary "

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

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

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

" + write_summary "

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

" fi -write_index "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly: " +write_summary "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly: " link_packages $GOOD -write_index "

" -write_index "

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

" -write_index "

$(echo $BAD | dd-list -i) 

" -write_index "

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

" +write_summary "

" +write_summary "

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

" +write_summary "

$(echo $BAD | 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 index.html /var/lib/jenkins/userContent/reproducible.html -rm index.html +cp $SUMMARY /var/lib/jenkins/userContent/reproducible.html +rm $SUMMARY -- cgit v1.2.3-70-g09d2