summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_archlinux.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-19 12:40:27 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-19 12:40:27 +0100
commit84640e4619e6e57191450a1e261acea4f5bec99e (patch)
treebe3bc6403cbe269c87a5a1ac6c1966ecda7ab481 /bin/reproducible_html_archlinux.sh
parentb0d2959b211baa981f6abb21122e674f46565ca6 (diff)
downloadjenkins.debian.net-84640e4619e6e57191450a1e261acea4f5bec99e.tar.xz
reproducible archlinux+rpms: refactor
Diffstat (limited to 'bin/reproducible_html_archlinux.sh')
-rwxr-xr-xbin/reproducible_html_archlinux.sh43
1 files changed, 22 insertions, 21 deletions
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index 1774127b..82e6b4a0 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -45,7 +45,8 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
NR_GOOD=0
NR_UNKNOWN=0
for PKG in $(find $ARCHBASE/$REPOSITORY/* -maxdepth 1 -type d -exec basename {} \;|sort -u -f) ; do
- if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls)" ] ; then
+ ARCHLINUX_PKG_PATH=$ARCHBASE/$REPOSITORY/$PKG
+ if [ -z "$(cd $ARCHLINUX_PKG_PATH ; ls)" ] ; then
# directory exists but is empty: package is building…
echo "$(date -u ) - ignoring $PKG from '$REPOSITORY' which is building right now…"
continue
@@ -55,59 +56,59 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
echo " <td>$REPOSITORY</td>" >> $HTML_BUFFER
echo " <td>$PKG</td>" >> $HTML_BUFFER
echo " <td>" >> $HTML_BUFFER
- if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then
- if [ ! -z "$(egrep '^error: failed to prepare transaction \(conflicting dependencies\)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ if [ -z "$(cd $ARCHLINUX_PKG_PATH/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then
+ if [ ! -z "$(egrep '^error: failed to prepare transaction \(conflicting dependencies\)' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_DEPWAIT[0]}
let NR_DEPWAIT+=1
echo " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> could not resolve dependencies as there are conflicts" >> $HTML_BUFFER
- elif [ ! -z "$(egrep '(==> ERROR: Could not resolve all dependencies|==> ERROR: .pacman. failed to install missing dependencies)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '(==> ERROR: Could not resolve all dependencies|==> ERROR: .pacman. failed to install missing dependencies)' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_DEPWAIT[1]}
let NR_DEPWAIT+=1
echo " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> could not resolve dependencies" >> $HTML_BUFFER
- elif [ ! -z "$(egrep '(==> ERROR: Failure while downloading|==> ERROR: One or more PGP signatures could not be verified)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '(==> ERROR: Failure while downloading|==> ERROR: One or more PGP signatures could not be verified)' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[0]}
EXTRA_REASON=""
let NR_404+=1
- if [ ! -z "$(grep 'FAILED (unknown public key' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ if [ ! -z "$(grep 'FAILED (unknown public key' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[6]}
EXTRA_REASON="to verify source with PGP due to unknown public key"
- elif [ ! -z "$(grep 'The requested URL returned error: 404' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(grep 'The requested URL returned error: 404' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[3]}
EXTRA_REASON="with 404 - file not found"
- elif [ ! -z "$(grep 'The requested URL returned error: 403' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(grep 'The requested URL returned error: 403' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[2]}
EXTRA_REASON="with 403 - forbidden"
- elif [ ! -z "$(grep 'The requested URL returned error: 500' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(grep 'The requested URL returned error: 500' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[4]}
EXTRA_REASON="with 500 - internal server error"
- elif [ ! -z "$(grep 'The requested URL returned error: 503' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(grep 'The requested URL returned error: 503' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[5]}
EXTRA_REASON="with 503 - service unavailable"
- elif [ ! -z "$(egrep '==> ERROR: One or more PGP signatures could not be verified' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '==> ERROR: One or more PGP signatures could not be verified' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[7]}
EXTRA_REASON="to verify source with PGP signatures"
- elif [ ! -z "$(grep 'SSL certificate problem: unable to get local issuer certificate' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(grep 'SSL certificate problem: unable to get local issuer certificate' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_404[1]}
EXTRA_REASON="with SSL certificate problem"
fi
echo " <img src=\"/userContent/static/weather-severe-alert.png\" alt=\"404 icon\" /> download failed $EXTRA_REASON" >> $HTML_BUFFER
- elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_FTBFS[0]}
let NR_FTBFS+=1
echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to verify source" >> $HTML_BUFFER
- elif [ ! -z "$(egrep '(==> ERROR: install file .* does not exist or is not a regular file|==> ERROR: The download program wget is not installed)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '(==> ERROR: install file .* does not exist or is not a regular file|==> ERROR: The download program wget is not installed)' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_FTBFS[1]}
let NR_FTBFS+=1
echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, requirements not met" >> $HTML_BUFFER
- elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_FTBFS[2]}
let NR_FTBFS+=1
echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build while running tests" >> $HTML_BUFFER
- elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_FTBFS[3]}
let NR_FTBFS+=1
echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build" >> $HTML_BUFFER
- elif [ ! -z "$(egrep 'makepkg was killed by timeout after' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(egrep 'makepkg was killed by timeout after' $ARCHLINUX_PKG_PATH/build1.log)" ] ; then
HTML_TARGET=${HTML_FTBFS[4]}
let NR_FTBFS+=1
echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout" >> $HTML_BUFFER
@@ -120,15 +121,15 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
else
HTML_TARGET=$HTML_FTBR
let NR_FTBR+=1
- for ARTIFACT in $(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html) ; do
+ for ARTIFACT in $(cd $ARCHLINUX_PKG_PATH/ ; ls *.pkg.tar.xz.html) ; do
echo " <img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> <a href=\"/archlinux/$REPOSITORY/$PKG/$ARTIFACT\">${ARTIFACT:0:-5}</a> is unreproducible<br />" >> $HTML_BUFFER
done
fi
echo " </td>" >> $HTML_BUFFER
- echo " <td>$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$REPOSITORY/$PKG/build1.log | cut -d ' ' -f6 )</td>" >> $HTML_BUFFER
+ echo " <td>$(LANG=C TZ=UTC ls --full-time $ARCHLINUX_PKG_PATH/build1.log | cut -d ' ' -f6 )</td>" >> $HTML_BUFFER
for LOG in build1.log build2.log ; do
- if [ -f $ARCHBASE/$REPOSITORY/$PKG/$LOG ] ; then
- get_filesize $ARCHBASE/$REPOSITORY/$PKG/$LOG
+ if [ -f $ARCHLINUX_PKG_PATH/$LOG ] ; then
+ get_filesize $ARCHLINUX_PKG_PATH/$LOG
echo " <td><a href=\"/archlinux/$REPOSITORY/$PKG/$LOG\">$LOG</a> ($SIZE)</td>" >> $HTML_BUFFER
else
echo " <td>&nbsp;</td>" >> $HTML_BUFFER