From f0a18cab05da1130bf9ac1f634b10cf881fd192a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 6 Jun 2015 19:09:07 +0200 Subject: reproducible: more refactoring. add write_explaination_table() to be used for all tested projects. --- bin/reproducible_common.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'bin/reproducible_common.sh') diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index d6935c76..3eccd806 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -253,6 +253,40 @@ write_page_meta_sign() { write_page "A # sign after the name of a package indicates that a bug is filed against it. Likewise, a + sign indicates there is a patch available. # indicates a closed bug. In cases of several bugs, the symbol is repeated.

" } +write_explaination_table() { + write_page "

" + write_page "" + if [ "$1" = "debian" ] ; then + write_page "" + write_page "" + fi + write_page "" + write_page "" + write_page "" + local NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) + if [ "$1" = "debian" ] ; then + write_page "" + write_page "" + write_page "" + write_page "" + write_page "" + write_page "" + write_page "" + write_page "" + write_page "" + write_page "" + fi + write_page "" + write_page "" + write_page "" + if [ "$1" = "debian" ] ; then + write_page "" + else + write_page "" + fi + write_page "
variationfirst buildsecond build
hostname$(hostname)i-capture-the-hostname
domainname$(hostname -d)i-capture-the-domainname
env TZTZ=\"/usr/share/zoneinfo/Etc/GMT+12\"TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"
env LANGLANG=\"en_GB.UTF-8\"LANG=\"fr_CH.UTF-8\"
env LC_ALLunsetLC_ALL=\"fr_CH.UTF-8\"
env PATHPATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"
env BUILDUSERIDBUILDUSERID=\"1111\"BUILDUSERID=\"2222\"
env BUILDUSERNAMEBUILDUSERNAME=\"pbuilder1\"BUILDUSERNAME=\"pbuilder2\"
env USERUSER=\"pbuilder1\"USER=\"pbuilder2\"
uiduid=1111uid=2222
gidgid=1111gid=2222
env DEB_BUILD_OPTIONSDEB_BUILD_OPTIONS=\"parallel=$NUM_CPU\"DEB_BUILD_OPTIONS=\"parallel=$(echo $NUM_CPU-1|bc)\"
(using a different number of cores is on the agenda)
UTS namespaceshared with the hostmodified using /usr/bin/unshare --uts
kernel version, modified using /usr/bin/linux64 --uname-2.6$(uname -sr)$(/usr/bin/linux64 --uname-2.6 uname -sr)
umask00220002
CPU type$(cat /proc/cpuinfo|grep 'model name'|head -1|cut -d ":" -f2-)same for both builds (currently, work in progress)
year, month, datetoday ($DATE)same for both builds (currently, work in progress)
hour, minutehour is usually the same...usually, the minute differs... (currently, work in progress)
everything else...is likely the same. So far, this is just about the prospects of reproducible builds of Debian - there will be more variations in the wild.
everything else...is likely the same. There will be more variations in the wild.

" +} + publish_page() { if [ "$1" = "" ] ; then if [ "$VIEW" = "$MAINVIEW" ] ; then @@ -314,3 +348,15 @@ gen_packages_html() { cd "$CWD" } +calculate_build_duration() { + END=$(date +'%s') + DURATION=$(( $END - $START )) +} + +print_out_duration() { + local HOUR=$(echo "$DURATION/3600"|bc) + local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc) + local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc) + echo "$(date) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG} +} + -- cgit v1.2.3-54-g00ecf