diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-07-24 13:56:25 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-07-24 11:17:34 -0400 |
commit | 0b4d9e94923280e5e836105a8b82e9b01f1714d0 (patch) | |
tree | d277c6decdc74ff9fd5a61695f12beb7063e06d2 | |
parent | 6ce10306075e0348821da03975c6fc7952016903 (diff) | |
download | jenkins.debian.net-0b4d9e94923280e5e836105a8b82e9b01f1714d0.tar.xz |
reproducible_lede: move resulting images into targets dir
Make the structure more clean when packages are seperate from
images
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | bin/reproducible_lede.sh | 66 | ||||
-rw-r--r-- | bin/reproducible_openwrt_common.sh | 4 |
2 files changed, 37 insertions, 33 deletions
diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh index 176c58aa..8705277b 100755 --- a/bin/reproducible_lede.sh +++ b/bin/reproducible_lede.sh @@ -100,40 +100,44 @@ DBD_BAD_PKGS_HTML=$(mktemp --tmpdir=$TMPDIR) GOOD_IMAGES=0 ALL_IMAGES=0 SIZE="" -cd $TMPDIR/b1 +cd $TMPDIR/b1/targets tree . -for i in * ; do - cd $i - - # search images in both paths to find non-existing ones - IMGS1=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u ) - pushd $TMPDIR/b2/$i - IMGS2=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u ) - popd - - echo " <table><tr><th>Images for <code>$i</code></th></tr>" >> $DBD_HTML - for j in $(printf "$IMGS1\n$IMGS2" | sort -u ) ; do - let ALL_IMAGES+=1 - if [ ! -f $TMPDIR/b1/$i/$j -o ! -f $TMPDIR/b2/$i/$j ] ; then - echo " <tr><td><img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> $j (${SIZE}) failed to build.</td></tr>" >> $DBD_HTML - rm -f $BASE/lede/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed - continue - fi - call_diffoscope $i $j - get_filesize $j - if [ -f $TMPDIR/$i/$j.html ] ; then - mkdir -p $BASE/lede/dbd/$i - mv $TMPDIR/$i/$j.html $BASE/lede/dbd/$i/$j.html - echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> (${SIZE}) is unreproducible.</td></tr>" >> $DBD_HTML - else - SHASUM=$(sha256sum $j|cut -d " " -f1) - echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML - let GOOD_IMAGES+=1 - rm -f $BASE/lede/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed - fi +for target in * ; do + cd $target + for subtarget in * ; do + cd $subtarget + + # search images in both paths to find non-existing ones + IMGS1=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u ) + pushd $TMPDIR/b2/targets/$target/$subtarget + IMGS2=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u ) + popd + + echo " <table><tr><th>Images for <code>$target/$subtarget</code></th></tr>" >> $DBD_HTML + for image in $(printf "$IMGS1\n$IMGS2" | sort -u ) ; do + let ALL_IMAGES+=1 + if [ ! -f $TMPDIR/b1/$target/$subtarget/$image -o ! -f $TMPDIR/b2/$target/$subtarget/$image ] ; then + echo " <tr><td><img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> $image (${SIZE}) failed to build.</td></tr>" >> $DBD_HTML + rm -f $BASE/lede/dbd/$target/$subtarget/$image.html # cleanup from previous (unreproducible) tests - if needed + continue + fi + call_diffoscope $target/$subtarget $image + get_filesize $image + if [ -f $TMPDIR/$target/$subtarget/$image.html ] ; then + mkdir -p $BASE/lede/dbd/$target/$subtarget + mv $TMPDIR/$target/$subtarget/$image.html $BASE/lede/dbd/$target/$subtarget/$image.html + echo " <tr><td><a href=\"dbd/$target/$subtarget/$image.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $image</a> (${SIZE}) is unreproducible.</td></tr>" >> $DBD_HTML + else + SHASUM=$(sha256sum $image|cut -d " " -f1) + echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $image ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML + let GOOD_IMAGES+=1 + rm -f $BASE/lede/dbd/$target/$subtarget/$image.html # cleanup from previous (unreproducible) tests - if needed + fi + done + cd .. + echo " </table>" >> $DBD_HTML done cd .. - echo " </table>" >> $DBD_HTML done GOOD_PERCENT_IMAGES=$(echo "scale=1 ; ($GOOD_IMAGES*100/$ALL_IMAGES)" | bc) # run diffoscope on the packages diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh index a678f6a7..2e774b4f 100644 --- a/bin/reproducible_openwrt_common.sh +++ b/bin/reproducible_openwrt_common.sh @@ -41,9 +41,9 @@ save_lede_results() { pushd $subtarget || continue # save firmware images - mkdir -p $TMPDIR/$RUN/$target/$subtarget/ + mkdir -p $TMPDIR/$RUN/targets/$target/$subtarget/ for image in $(find * -name "*.bin" -o -name "*.squashfs") ; do - cp -p $image $TMPDIR/$RUN/$target/$subtarget/ + cp -p $image $TMPDIR/$RUN/targets/$target/$subtarget/ done # save subtarget specific packages |