#!/bin/bash # Copyright 2014-2015 Holger Levsen # released under the GPLv=2 DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" # common code . /srv/jenkins/bin/reproducible_common.sh # # create the webpage # DATE=$(date -u +'%Y-%m-%d') ARCHBASE=$BASE/archlinux cd $ARCHBASE PAGE=archlinux.html echo "$(date -u) - starting to build $PAGE" cat > $PAGE <<- EOF Repoducible Arch Linux ?!

Reproducible Arch Linux?!

EOF write_page_intro 'Arch Linux' write_explaination_table 'Arch Linux' write_page " " for PKG in $(find $ARCHBASE/* -maxdepth 1 -type d -exec basename {} \;) ; do write_page " " write_page " " write_page " " write_page " " for LOG in build1.log build2.log ; do if [ -f $ARCHBASE/$PKG/$LOG ] ; then write_page " " else write_page " " fi done write_page " " done write_page "
source packagetest resulttest date1st build log2nd build log
$PKG" if [ -z "$(cd $ARCHBASE/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then if [ ! -z "$(grep '==> ERROR: Could not resolve all dependencies' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " could not resolve dependencies" elif [ ! -z "$(egrep '==> ERROR: .pacman. failed to install missing dependencies.' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " failed to install dependencies" elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " failed to build from source" elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " failed to build from source, while running tests" elif [ ! -z "$(egrep '==> ERROR: Failure while downloading' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " failed to download source" elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " failed to verify source" elif [ ! -z "$(egrep 'makepkg was killed by timeout after 4h' $ARCHBASE/$PKG/build1.log)" ] ; then write_page " failed to build, killed by timeout after 4h" else write_page " probably failed to build from source, please investigate" fi else for ARTIFACT in $(cd $ARCHBASE/$PKG/ ; ls *.pkg.tar.xz.html) ; do write_page " ${ARTIFACT:0:-5}is unreproducible
" done fi write_page "
$(ls -dl $ARCHBASE/$PKG/build1.log|cut -d " " -f6-8)$LOG 
" write_page "
" write_page_footer 'Arch Linux' echo "$(date -u) - enjoy $REPRODUCIBLE_URL/archlinux/$PAGE"