From 866c0c89c8e54df7ff53bfb841a436054943cdf6 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 12 Dec 2015 10:35:56 +0100 Subject: reproducible archlinux: sort html results --- bin/reproducible_html_archlinux.sh | 59 ++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 18 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh index 4223efda..a92497b8 100755 --- a/bin/reproducible_html_archlinux.sh +++ b/bin/reproducible_html_archlinux.sh @@ -38,6 +38,14 @@ EOF write_page_intro 'Arch Linux' write_explaination_table 'Arch Linux' write_page " " +HTML_FTBFS=$(mktemp) +HTML_FTBR=$(mktemp) +HTML_DEPWAIT=$(mktemp) +HTML_404=$(mktemp) +HTML_GOOD=$(mktemp) +HTML_UNKNOWN=$(mktemp) +HTML_BUFFER=$(mktemp) +HTML_TARGET="" for REPOSITORY in $ARCHLINUX_REPOS ; do for PKG in $(find $ARCHBASE/$REPOSITORY/* -maxdepth 1 -type d -exec basename {} \;) ; do if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls)" ] ; then @@ -45,46 +53,61 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do echo "$(date -u ) - ignoring $PKG from '$REPOSITORY' which is building right now…" continue fi - write_page " " - write_page " " - write_page " " - write_page " " >> $HTML_BUFFER + echo " " >> $HTML_BUFFER + echo " " >> $HTML_BUFFER + echo " " - write_page " " + echo " " >> $HTML_BUFFER + echo " " >> $HTML_BUFFER for LOG in build1.log build2.log ; do if [ -f $ARCHBASE/$REPOSITORY/$PKG/$LOG ] ; then - write_page " " + echo " " >> $HTML_BUFFER else - write_page " " + echo " " >> $HTML_BUFFER fi done - write_page " " + echo " " >> $HTML_BUFFER + cat $HTML_BUFFER >> $HTML_TARGET + rm $HTML_BUFFER > /dev/null done done +for i in $HTML_UNKNOWN $HTML_FTBFS $HTML_DEPWAIT $HTML_404 $HTML_FTBR $HTML_GOOD ; do + cat $i >> $PAGE + rm $i > /dev/null +done write_page "
repositorysource packagetest resulttest date1st build log2nd build log
$REPOSITORY$PKG" + echo "
$REPOSITORY$PKG" >> $HTML_BUFFER if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then if [ ! -z "$(grep '==> ERROR: Could not resolve all dependencies' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"depwait could not resolve dependencies" + HTML_TARGET=$HTML_DEPWAIT + echo " \"depwait could not resolve dependencies" >> $HTML_BUFFER elif [ ! -z "$(egrep '==> ERROR: .pacman. failed to install missing dependencies.' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"depwait failed to install dependencies" + HTML_TARGET=$HTML_DEPWAIT + echo " \"depwait failed to install dependencies" >> $HTML_BUFFER elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"ftbfs failed to build from source" + HTML_TARGET=$HTML_FTBFS + echo " \"ftbfs failed to build from source" >> $HTML_BUFFER elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"ftbfs failed to build from source, while running tests" + HTML_TARGET=$HTML_FTBFS + echo " \"ftbfs failed to build from source, while running tests" >> $HTML_BUFFER elif [ ! -z "$(egrep '==> ERROR: Failure while downloading' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"404 failed to download source" + HTML_TARGET=$HTML_404 + echo " \"404 failed to download source" >> $HTML_BUFFER elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"ftbfs failed to verify source" + HTML_TARGET=$HTML_FTBFS + echo " \"ftbfs failed to verify source" >> $HTML_BUFFER elif [ ! -z "$(egrep 'makepkg was killed by timeout after 4h' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - write_page " \"ftbfs failed to build, killed by timeout after 4h" + HTML_TARGET=$HTML_FTBFS + echo " \"ftbfs failed to build, killed by timeout after 4h" >> $HTML_BUFFER else - write_page " probably failed to build from source, please investigate" + echo " probably failed to build from source, please investigate" >> $HTML_BUFFER + HTML_TARGET=$HTML_UNKNOWN # or is it reproducible??? fi else + HTML_TARGET=$HTML_FTBR for ARTIFACT in $(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html) ; do - write_page " \"unreproducible ${ARTIFACT:0:-5} is unreproducible
" + echo " \"unreproducible ${ARTIFACT:0:-5} is unreproducible
" >> $HTML_BUFFER done fi - write_page "
$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$REPOSITORY/$PKG/build1.log | cut -d ' ' -f6 )$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$REPOSITORY/$PKG/build1.log | cut -d ' ' -f6 )$LOG$LOG  
" write_page "" write_page_footer 'Arch Linux' -- cgit v1.2.3-70-g09d2