summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-06-11 12:55:59 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-11 12:55:59 +0200
commitc458bfeb2c663ba9a84acf53a919f6b450fb5277 (patch)
tree660e1aebedffe97e78e40e1b1e1e1c85c9a683fc
parentffc78ce03bfcf5e18f1e87df4bd8c847180161ae (diff)
downloadjenkins.debian.net-c458bfeb2c663ba9a84acf53a919f6b450fb5277.tar.xz
reproducible coreboot: reorder presentation of results
-rwxr-xr-xbin/reproducible_coreboot.sh79
1 files changed, 43 insertions, 36 deletions
diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index 9843024c..1e45da91 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -195,13 +195,47 @@ cd ..
rm coreboot-builds -r
cd ..
+# run debbindiff on the results
TIMEOUT="30m"
DBDSUITE="unstable"
DBDVERSION="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-debbindiff debbindiff -- --version 2>&1)"
echo "============================================================================="
echo "$(date -u) - Running $DBDVERSION on coreboot images now"
echo "============================================================================="
-# and creating the webpage while we're at it
+ROMS_HTML=$(mktemp)
+echo " <ul>" > $ROMS_HTML
+BAD_ROMS=0
+GOOD_ROMS=0
+ALL_ROMS=0
+create_results_dirs
+cd b1
+for i in * ; do
+ let ALL_ROMS+=1
+ if [ -f $i/coreboot.rom ] ; then
+ call_debbindiff $i
+ SIZE="$(du -h -b $i/coreboot.rom | cut -f1)"
+ SIZE="$(echo $SIZE/1024|bc)"
+ if [ -f $TMPDIR/$i.html ] ; then
+ mv $TMPDIR/$i.html $BASE/coreboot/dbd/$i.html
+ echo " <li><a href=\"dbd/$i.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $i</a> (${SIZE}K) is unreproducible.</li>" >> $ROMS_HTML
+ else
+ SHASUM=$(sha256sum $i/coreboot.rom|cut -d " " -f1)
+ echo " <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $i ($SHASUM, ${SIZE}K) is reproducible.</li>" >> $ROMS_HTML
+ let GOOD_ROMS+=1
+ rm -f $BASE/coreboot/dbd/$i.html # cleanup from previous (unreproducible) tests - if needed
+ fi
+ else
+ echo " <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source.</li>" >> $ROMS_HTML
+ let BAD_ROMS+=1
+ fi
+done
+echo " </ul>" >> $ROMS_HTML
+GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_ROMS*100/$ALL_ROMS)" | bc)
+BAD_PERCENT=$(echo "scale=1 ; ($BAD_ROMS*100/$ALL_ROMS)" | bc)
+
+#
+# finally create the webpage
+#
PAGE=$PWD/coreboot/coreboot.html
cat > $PAGE <<- EOF
<!DOCTYPE html>
@@ -224,45 +258,18 @@ cat > $PAGE <<- EOF
</center></p>
EOF
write_page " <h1>Reproducible Coreboot</h1>"
-write_page " <p><em>Reproducible builds</em> enable anyone to reproduce bit by bit identical binary packages from a given source, so that anyone can verify that a given binary derived from the source it was said to be derived. There is a lot more information about <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds on the Debian wiki</a> and on <a href=\"https://reproducible.debian.net\">https://reproducible.debian.net</a>. The wiki has a lot more information, eg. why this is useful, what common issues exist and which workaround and solutions are known.<br />"
+write_page " <p><em>Reproducible builds</em> enable anyone to reproduce bit by bit identical binary packages from a given source, so that anyone can verify that a given binary derived from the source it was said to be derived. There is a lot more information about <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds on the Debian wiki</a> and on <a href=\"https://reproducible.debian.net\">https://reproducible.debian.net</a>. The wiki has a lot more information, eg. why this is useful, what common issues exist and which workarounds and solutions are known.<br />"
write_page " <em>Reproducible Coreboot</em> is an effort to apply this to coreboot. Thus each coreboot.rom is build twice (without payloads), with a few varitations added and then those two ROMs are compared using <a href=\"https://tracker.debian.org/debbindiff\">debbindiff</a>. Please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.</p>"
write_page " <p>There is a monthly run <a href=\"https://jenkins.debian.net/view/reproducible/job/reproducible_coreboot/\">jenkins job</a> to test the <code>master</code> branch of <a href=\"https://review.coreboot.org/p/coreboot.git\">coreboot.git</a>. Currently this job is triggered more often though, because this is still under development and brand new. The jenkins job is simply running <a href=\"http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/tree/bin/reproducible_coreboot.sh\">reproducible_coreboot.sh</a> in a Debian environemnt and this script is solely responsible for creating this page. Feel invited to join <code>#debian-reproducible</code> (on irc.oftc.net) to request job runs whenever sensible. Patches and other <a href=\"mailto:reproducible-builds@lists.alioth.debian.org\">feedback</a> are very much appreciated!</p>"
-write_page "<p><pre>"
-echo -n "$COREBOOT" >> $PAGE
-write_page " </pre></p>"
+write_page " <p>$GOOD_ROMS ($GOOD_PERCENT%) out of $ALL_ROMS built coreboot images were reproducible in our test setup, while $BAD_ROMS ($BAD_PERCENT%) failed to build from source."
+write_page " These tests were last run on $DATE for version ${COREBOOT_VERSION}.</p>"
write_explaination_table coreboot
-write_page " <ul>"
-BAD_ROMS=0
-GOOD_ROMS=0
-ALL_ROMS=0
-create_results_dirs
-cd b1
-for i in * ; do
- let ALL_ROMS+=1
- if [ -f $i/coreboot.rom ] ; then
- call_debbindiff $i
- SIZE="$(du -h -b $i/coreboot.rom | cut -f1)"
- SIZE="$(echo $SIZE/1024|bc)"
- if [ -f $TMPDIR/$i.html ] ; then
- mv $TMPDIR/$i.html $BASE/coreboot/dbd/$i.html
- write_page " <li><a href=\"dbd/$i.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $i</a> (${SIZE}K) is unreproducible.</li>"
- else
- SHASUM=$(sha256sum $i/coreboot.rom|cut -d " " -f1)
- write_page " <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $i ($SHASUM, ${SIZE}K) is reproducible.</li>"
- let GOOD_ROMS+=1
- rm -f $BASE/coreboot/dbd/$i.html # cleanup from previous (unreproducible) tests - if needed
- fi
- else
- write_page " <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source.</li>"
- let BAD_ROMS+=1
- fi
-done
-GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_ROMS*100/$ALL_ROMS)" | bc)
-BAD_PERCENT=$(echo "scale=1 ; ($BAD_ROMS*100/$ALL_ROMS)" | bc)
-write_page " </ul><p>$GOOD_ROMS ($GOOD_PERCENT%) out of $ALL_ROMS built coreboot images were reproducible in our test setup, while $BAD_ROMS ($BAD_PERCENT%) failed to build from source."
-write_page " These tests were last run on $DATE for version ${COREBOOT_VERSION}.</p>"
+cat $ROMS_HTML >> $PAGE
cat $TOOLCHAIN_HTML >> $PAGE
-rm -f $TOOLCHAIN_HTML
+rm -f $ROMS_HTML $TOOLCHAIN_HTML
+write_page " <p><pre>"
+echo -n "$COREBOOT" >> $PAGE
+write_page " </pre></p>"
write_page " </div></div>"
write_page_footer coreboot
cd ..