summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_archlinux.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-18 13:53:59 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-18 13:53:59 +0100
commite0d507dbbf01e50a4df33d57b5e526aad6189be7 (patch)
treed3c8dfe0362a313ccb517f0e4b42810ccd8de3c6 /bin/reproducible_html_archlinux.sh
parent8f4f51c3f5b80ead0bb526db958817cb4b1bb1d9 (diff)
downloadjenkins.debian.net-e0d507dbbf01e50a4df33d57b5e526aad6189be7.tar.xz
reproducible archlinux: detect 403 and 500 errors when downloading sources
Diffstat (limited to 'bin/reproducible_html_archlinux.sh')
-rwxr-xr-xbin/reproducible_html_archlinux.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index 59693136..1226581f 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -20,7 +20,7 @@ for i in 0 1 2 3 4 ; do
done
HTML_FTBR=$(mktemp -t rhtml-archlinux-XXXXXXXX)
HTML_DEPWAIT=$(mktemp -t rhtml-archlinux-XXXXXXXX)
-for i in 0 1 2 3 4 5; do
+for i in 0 1 2 3 4 5 6 7; do
HTML_404[$i]=$(mktemp -t rhtml-archlinux-XXXXXXXX)
done
HTML_GOOD=$(mktemp -t rhtml-archlinux-XXXXXXXX)
@@ -61,17 +61,23 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
if [ ! -z "$(grep 'SSL certificate problem: unable to get local issuer certificate' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
HTML_TARGET=${HTML_404[1]}
EXTRA_REASON="with SSL certificate problem"
- elif [ ! -z "$(grep 'The requested URL returned error: 404 Not Found' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- HTML_TARGET=${HTML_404[2]}
- EXTRA_REASON="with 404 - file not found"
- elif [ ! -z "$(grep 'The requested URL returned error: 503 Service Unavailable' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+ elif [ ! -z "$(grep 'The requested URL returned error: 404' $ARCHBASE/$REPOSITORY/$PKG/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
+ 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
+ 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
+ HTML_TARGET=${HTML_404[5]}
EXTRA_REASON="with 503 - service unavailable"
elif [ ! -z "$(grep 'FAILED (unknown public key' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- HTML_TARGET=${HTML_404[4]}
+ HTML_TARGET=${HTML_404[6]}
EXTRA_REASON="to verify source with PGP due to unknown public key"
elif [ ! -z "$(egrep '==> ERROR: One or more PGP signatures could not be verified' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- HTML_TARGET=${HTML_404[5]}
+ HTML_TARGET=${HTML_404[7]}
EXTRA_REASON="to verify source with PGP signatures"
fi
echo " <img src=\"/userContent/static/weather-severe-alert.png\" alt=\"404 icon\" /> download failed $EXTRA_REASON" >> $HTML_BUFFER
@@ -171,7 +177,7 @@ cat $HTML_REPOSTATS >> $PAGE
rm $HTML_REPOSTATS > /dev/null
write_page " </table>"
write_page " <table><tr><th>repository</th><th>source package</th><th>test result</th><th>test date</th><th>1st build log</th><th>2nd build log</th></tr>"
-for i in $HTML_UNKNOWN $(for j in 0 1 2 3 4 5 ; do echo ${HTML_404[$j]} ; done) $HTML_DEPWAIT $(for j in 0 1 2 3 4 ; do echo ${HTML_FTBFS[$j]} ; done) $HTML_FTBR $HTML_GOOD ; do
+for i in $HTML_UNKNOWN $(for j in 0 1 2 3 4 5 6 7 ; do echo ${HTML_404[$j]} ; done) $HTML_DEPWAIT $(for j in 0 1 2 3 4 ; do echo ${HTML_FTBFS[$j]} ; done) $HTML_FTBR $HTML_GOOD ; do
cat $i >> $PAGE
rm $i > /dev/null
done