diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-06-13 02:15:39 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-06-13 02:15:39 +0200 |
commit | 1d035b83d0a35a2a3021d7fb349abd9d517a15f9 (patch) | |
tree | 83a4469650d5319b47c91e70a424260602b5b901 /bin | |
parent | 602b1a8c751e66bbd324ec1832a1035f8d25dfe9 (diff) | |
download | jenkins.debian.net-1d035b83d0a35a2a3021d7fb349abd9d517a15f9.tar.xz |
reproducible openwrt: add css and logo (derived from http://luci.subsignal.org/trac/browser/luci/trunk/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css?rev=6304), adopt html. build .ipk packages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_openwrt.sh | 54 |
2 files changed, 29 insertions, 27 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index c8abb7b8..1352b5db 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -195,7 +195,7 @@ write_page_header() { if [ "$1" = "dd-list" ] || [ "$1" = "stats" ] ; then write_page "<p>Join <code>#debian-reproducible</code> on OFTC" write_page " or <a href="mailto:reproducible-builds@lists.alioth.debian.org">send us an email</a>" - write_page " to get support for making sure your packages build reproducibly too. Also, we care about free software in general, so if you are an upstream developer or working on another distribution, we'd love to hear from you! Just now We've started to regularily test <a href=\"/coreboot/\">coreboot</a> and <a href=\"/openwrt/\">OpenWRT</a>!" + write_page " to get support for making sure your packages build reproducibly too. Also, we care about free software in general, so if you are an upstream developer or working on another distribution, we'd love to hear from you! Just now we've started to programatically test <a href=\"/coreboot/\">coreboot</a> and <a href=\"/openwrt/\">OpenWRT</a>!" write_page "</p>" fi write_page "<ul><li>Have a look at:</li>" diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index 9a2bcde7..6bfb3e8a 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -70,11 +70,18 @@ save_openwrt_results(){ cd bin for i in * ; do cd $i + # save images mkdir -p $TMPDIR/$RUN/$i - for j in $(find . -name "*.bin") ; do + for j in $(find . -name "*.bin" -exec basename \{\} \; ) ; do cp -p $j $TMPDIR/$RUN/$i/ done - cd .. + # save packages + cd packages + for j in $(find * -name "*.ipk") ; do + mkdir -p $TMPDIR/$RUN/$i/ipk/$(dirname $j) + cp -p $j $TMPDIR/$RUN/$i/ipk/$(dirname $j) + done + cd ../.. done cd .. } @@ -125,7 +132,7 @@ ionice -c 3 nice \ ionice -c 3 nice \ make -j $NUM_CPU package/cleanup ionice -c 3 nice \ - make -j $NUM_CPU package/compile + make -j $NUM_CPU package/compile || true # don't let some packages fail the whole build ionice -c 3 nice \ make -j $NUM_CPU package/install ionice -c 3 nice \ @@ -160,7 +167,7 @@ ionice -c 3 nice \ make -j $NEW_NUM_CPU package/cleanup ionice -c 3 nice \ linux64 --uname-2.6 \ - make -j $NEW_NUM_CPU package/compile + make -j $NEW_NUM_CPU package/compile || true # don't let some packages fail the whole build ionice -c 3 nice \ linux64 --uname-2.6 \ make -j $NEW_NUM_CPU package/install @@ -186,12 +193,12 @@ save_openwrt_results b2 # TOOLCHAIN_HTML=$(mktemp) TARGET=$(ls -1d staging_dir/toolchain*|cut -d "-" -f2-|xargs echo) -echo "<table><tr><th>Contents of <pre>build_dir/host/</pre></th></tr>" > $TOOLCHAIN_HTML +echo "<table><tr><th>Contents of <code>build_dir/host/</code></th></tr>" > $TOOLCHAIN_HTML for i in $(ls -1 build_dir/host/) ; do echo " <tr><td>$i</td></tr>" >> $TOOLCHAIN_HTML done echo "</table>" >> $TOOLCHAIN_HTML -echo "<table><tr><th>Downloaded software built for <pre>$TARGET</pre></th></tr>" >> $TOOLCHAIN_HTML +echo "<table><tr><th>Downloaded software built for <code>$TARGET</code></th></tr>" >> $TOOLCHAIN_HTML for i in $(ls -1 dl/) ; do echo " <tr><td>$i</td></tr>" >> $TOOLCHAIN_HTML done @@ -215,14 +222,14 @@ echo "========================================================================== echo "$(date -u) - Running $DBDVERSION on openwrt images now" echo "=============================================================================" IMAGES_HTML=$(mktemp) -echo " <ul>" > $IMAGES_HTML +echo " <table><tr><th>Images for <code>$TARGET</code></th></tr>" > $IMAGES_HTML GOOD_IMAGES=0 ALL_IMAGES=0 create_results_dirs cd $TMPDIR/b1 for i in * ; do cd $i - for j in $(find . -name "*.bin"|sort -u ) ; do + for j in $(find . -name "*.bin" -exec basename \{\} \; |sort -u ) ; do let ALL_IMAGES+=1 call_debbindiff $i $j SIZE="$(du -h -b $j | cut -f1)" @@ -230,17 +237,17 @@ for i in * ; do if [ -f $TMPDIR/$i/$j.html ] ; then mkdir -p $BASE/openwrt/dbd/$i mv $TMPDIR/$i/$j.html $BASE/openwrt/dbd/$i/$j.html - echo " <li><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> (${SIZE}K) is unreproducible.</li>" >> $IMAGES_HTML + echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> (${SIZE}K) is unreproducible.</td></tr>" >> $IMAGES_HTML else SHASUM=$(sha256sum $j|cut -d " " -f1) - echo " <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, ${SIZE}K) is reproducible.</li>" >> $IMAGES_HTML + echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, ${SIZE}K) is reproducible.</td></tr>" >> $IMAGES_HTML let GOOD_IMAGES+=1 rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed fi done cd .. done -echo " </ul>" >> $IMAGES_HTML +echo " </table>" >> $IMAGES_HTML GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_IMAGES*100/$ALL_IMAGES)" | bc) # @@ -255,22 +262,17 @@ cat > $PAGE <<- EOF <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <title>openwrt</title> - <!-- link rel='stylesheet' id='twentyfourteen-style-css' href='landing_style.css?ver=4.0' type='text/css' media='all' /--> + <link rel='stylesheet' id='kamikaze-style-css' href='cascading.css?ver=4.0' type='text/css' media='all'> </head> <body> - <div class="content"> - <div class="page-content"> - <p> </p> - <p><center><img src="logo.png" alt="openwrt logo"" /><br /> - <blockquote> - <br /> - <strong>OpenWRT</strong>: <em>reproducible</em> wireless freedom? - </blockquote> - <pre> + <div id="header"> + <p><center> + <code> EOF cat $(find openwrt/build_dir/ -name banner | grep etc/banner|head -1) >> $PAGE -write_page " </pre></center></p>" -write_page " <h1>Reproducible OpenWRT</h1>" +write_page " </code></center></p>" +write_page " </div><div id=\"main-content\">" +write_page " <h1>Reproducible OpenWRT - <em>reproducible</em> wireless freedom?</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 workarounds and solutions are known.<br />" write_page " <em>Reproducible OpenWRT</em> is an effort to apply this to OpenWRT. Thus each OpenWR target is build twice, with a few varitations added and then the resulting images from the two builds 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_openwrt/\">jenkins job</a> to test the <code>master</code> branch of <a href=\"git://git.openwrt.org/openwrt.git\">openwrt.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_openwrt.sh\">reproducible_openwrt.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>" @@ -278,11 +280,11 @@ write_page " <p>$GOOD_IMAGES ($GOOD_PERCENT%) out of $ALL_IMAGES built ope write_page " These tests were last run on $DATE for version ${OPENWRT_VERSION}.</p>" write_explaination_table OpenWRT cat $IMAGES_HTML >> $PAGE -write_page " <p><pre>" +write_page " <table><tr><th>git commit built</th></tr><tr><td>><code>" echo -n "$OPENWRT" >> $PAGE -write_page " </pre></p>" +write_page " </code></td></tr></table>" cat $TOOLCHAIN_HTML >> $PAGE -write_page " </div></div>" +write_page " </div>" write_page_footer OpenWRT publish_page rm -f $IMAGES_HTML $TOOLCHAIN_HTML |