From 1c819775d37bf9f57a351278273d89cabebf102e Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 12 Jun 2015 15:34:42 +0200 Subject: reproducible openwrt: create toolchain html after toolchain was installed. add openwrt banner --- bin/reproducible_openwrt.sh | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index c87c74f4..7efb53b3 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -93,27 +93,6 @@ echo "========================================================================== make defconfig make -j $NUM_CPU tools/install -# -# create html about toolchain used -# -TOOLCHAIN_HTML=$(mktemp) -TARGET=$(ls -1d staging_dir/toolchain*|cut -d "-" -f2-) -echo "" > $TOOLCHAIN_HTML -for i in $(ls -1 build_dir/host/) ; do - echo " " >> $TOOLCHAIN_HTML -echo "
Contents of
build_dir/host/
$i
" >> $TOOLCHAIN_HTML -echo "" >> $TOOLCHAIN_HTML -for i in $(ls -1 dl/) ; do - echo " " >> $TOOLCHAIN_HTML -echo "
Downloaded software built for
$TARGET
$i
" >> $TOOLCHAIN_HTML -echo "" >> $TOOLCHAIN_HTML -for i in gcc binutils bzip2 flex python perl make findutils grep diff unzip gawk util-linux zlib1g-dev libc6-dev git subversion ; do - echo " " >> $TOOLCHAIN_HTML -done -echo "
Debian $(cat /etc/debian_version) package on $(dpkg --print-architecture)installed version
$i" >> $TOOLCHAIN_HTML - dpkg -s $i|grep '^Version'|cut -d " " -f2 >> $TOOLCHAIN_HTML - echo "
" >> $TOOLCHAIN_HTML - echo "=============================================================================" echo "$(date -u) - Building openwrt ${OPENWRT_VERSION} images now - first build run." echo "=============================================================================" @@ -199,6 +178,27 @@ done cd .. rm bin -r +# +# create html about toolchain used +# +TOOLCHAIN_HTML=$(mktemp) +TARGET=$(ls -1d staging_dir/toolchain*|cut -d "-" -f2-) +echo "" > $TOOLCHAIN_HTML +for i in $(ls -1 build_dir/host/) ; do + echo " " >> $TOOLCHAIN_HTML +echo "
Contents of
build_dir/host/
$i
" >> $TOOLCHAIN_HTML +echo "" >> $TOOLCHAIN_HTML +for i in $(ls -1 dl/) ; do + echo " " >> $TOOLCHAIN_HTML +echo "
Downloaded software built for
$TARGET
$i
" >> $TOOLCHAIN_HTML +echo "" >> $TOOLCHAIN_HTML +for i in gcc binutils bzip2 flex python perl make findutils grep diff unzip gawk util-linux zlib1g-dev libc6-dev git subversion ; do + echo " " >> $TOOLCHAIN_HTML +done +echo "
Debian $(cat /etc/debian_version) package on $(dpkg --print-architecture)installed version
$i" >> $TOOLCHAIN_HTML + dpkg -s $i|grep '^Version'|cut -d " " -f2 >> $TOOLCHAIN_HTML + echo "
" >> $TOOLCHAIN_HTML + # run debbindiff on the results TIMEOUT="30m" DBDSUITE="unstable" @@ -258,8 +258,10 @@ cat > $PAGE <<- EOF
OpenWRT: reproducible wireless freedom? -

+
 EOF
+cat $(find openwrt/build_dir/ -name banner | grep etc/banner|head -1) >> $PAGE
+write_page "       

" write_page "

Reproducible OpenWRT

" write_page "

Reproducible builds 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 reproducible builds on the Debian wiki and on https://reproducible.debian.net. The wiki has a lot more information, eg. why this is useful, what common issues exist and which workarounds and solutions are known.
" write_page " Reproducible OpenWRT 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 debbindiff. 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.

" -- cgit v1.2.3-70-g09d2