From 188d2760384247dd41d4f0936a297245af90a7fd Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 27 Aug 2015 21:18:02 +0200 Subject: reproducible freebsd: vary LANG and LC_ALL now too and correctly describe what's varied on FreeBSD and what not --- bin/reproducible_common.sh | 26 +++++++++++++++++++------- bin/reproducible_freebsd.sh | 37 +++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 27 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index a206d14b..1d48ab65 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -293,12 +293,17 @@ write_explaination_table() { write_page "hostname is not yet varied between rebuilds of $1." write_page "domainname is not yet varied between rebuilds of $1." fi - export CAPTURE_ENVIRONMENT="I capture the environment" - write_page "env CAPTURE_ENVIRONMENTnot setCAPTURE_ENVIRONMENT=\"I capture the environment\"" + if [ "$1" != "FreeBSD" ] ; then + write_page "env CAPTURE_ENVIRONMENTnot setCAPTURE_ENVIRONMENT=\"I capture the environment\"" + fi write_page "env TZTZ=\"/usr/share/zoneinfo/Etc/GMT+12\"TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"" write_page "env LANGLANG=\"en_GB.UTF-8\"LANG=\"fr_CH.UTF-8\"" write_page "env LC_ALLnot setLC_ALL=\"fr_CH.UTF-8\"" - write_page "env PATHPATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"" + if [ "$1" != "FreeBSD" ] ; then + write_page "env PATHPATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"" + else + write_page "env PATH is not yet varied between rebuilds of $1.\"is not yet varied between rebuilds of $1.\"" + fi if [ "$1" = "debian" ] ; then write_page "env BUILDUSERIDBUILDUSERID=\"1111\"BUILDUSERID=\"2222\"" write_page "env BUILDUSERNAMEBUILDUSERNAME=\"pbuilder1\"BUILDUSERNAME=\"pbuilder2\"" @@ -311,10 +316,17 @@ write_explaination_table() { write_page "env USER is not yet varied between rebuilds of $1." write_page "uid is not yet varied between rebuilds of $1." write_page "gid is not yet varied between rebuilds of $1." - write_page "UTS namespace is not yet varied between rebuilds of $1." + if [ "$1" != "FreeBSD" ] ; then + write_page "UTS namespace is not yet varied between rebuilds of $1." + fi + fi + if [ "$1" != "FreeBSD" ] ; then + write_page "kernel version, modified using /usr/bin/linux64 --uname-2.6$(uname -sr)$(/usr/bin/linux64 --uname-2.6 uname -sr)" + write_page "umask00220002" + else + write_page "FreeBSD kernel version is not yet varied between rebuilds of $1." + write_page "umask is not yet varied between rebuilds of $1." fi - write_page "kernel version, modified using /usr/bin/linux64 --uname-2.6$(uname -sr)$(/usr/bin/linux64 --uname-2.6 uname -sr)" - write_page "umask00220002" write_page "CPU type$(cat /proc/cpuinfo|grep 'model name'|head -1|cut -d ":" -f2-)same for both builds (currently, work in progress)" write_page "year, month, datetoday ($DATE)same for both builds (currently, work in progress)" if [ "$1" != "FreeBSD" ] ; then @@ -322,7 +334,7 @@ write_explaination_table() { write_page "Filesystemtmpfssame for both builds (currently, work in progress)" else write_page "hour, minutehour and minute will probably vary between two builds...but this is not enforced systematically...)" - write_page "Filesystemufssame for both builds" + write_page "filesystem of the build directoryufssame for both builds" fi if [ "$1" = "debian" ] ; then write_page "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." diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh index c0f7cd60..e6a08446 100755 --- a/bin/reproducible_freebsd.sh +++ b/bin/reproducible_freebsd.sh @@ -67,14 +67,14 @@ echo "========================================================================== echo "$(date -u) - Building freebsd ${FREEBSD_VERSION} - first build run." echo "=============================================================================" export TZ="/usr/share/zoneinfo/Etc/GMT+12" +export LANG="en_GB.UTF-8" # actually build everything -NUM_CPU=3 -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NUM_CPU buildworld" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NUM_CPU buildkernel" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NUM_CPU installworld" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NUM_CPU installkernel" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NUM_CPU distribution" - +NUM_CPU=4 # if someone could tell me how to determine this on freebsd, this would be neat +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG sudo make -j $NUM_CPU buildworld" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG sudo make -j $NUM_CPU buildkernel" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG DESTDIR=$TMPDIR sudo make -j $NUM_CPU installworld" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG DESTDIR=$TMPDIR sudo make -j $NUM_CPU installkernel" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG DESTDIR=$TMPDIR sudo make -j $NUM_CPU distribution" # save results in b1 save_freebsd_results b1 @@ -87,21 +87,18 @@ echo "========================================================================== echo "$(date -u) - Building freebsd - second build run." echo "=============================================================================" export TZ="/usr/share/zoneinfo/Etc/GMT-14" -###export LANG="fr_CH.UTF-8" -###export LC_ALL="fr_CH.UTF-8" -###export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" -###export CAPTURE_ENVIRONMENT="I capture the environment" +export LANG="fr_CH.UTF-8" +export LC_ALL="fr_CH.UTF-8" +###export PATH="$PATH:/i/capture/the/path" ###umask 0002 -#### use allmost all cores for second build -###NEW_NUM_CPU=$(echo $NUM_CPU-1|bc) -NEW_NUM_CPU=4 +# use allmost all cores for second build +NEW_NUM_CPU=$(echo $NUM_CPU-1|bc) # actually build everything -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NEW_NUM_CPU buildworld" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ sudo make -j $NEW_NUM_CPU buildkernel" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU installworld" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU installkernel" -$RSSH "cd $TMPBUILDDIR ; TZ=$TZ DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU distribution" - +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG LC_ALL=$LC_ALL sudo make -j $NEW_NUM_CPU buildworld" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG LC_ALL=$LC_ALL sudo make -j $NEW_NUM_CPU buildkernel" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG LC_ALL=$LC_ALL DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU installworld" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG LC_ALL=$LC_ALL DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU installkernel" +$RSSH "cd $TMPBUILDDIR ; TZ=$TZ LANG=$LANG LC_ALL=$LC_ALL DESTDIR=$TMPDIR sudo make -j $NEW_NUM_CPU distribution" # save results in b2 save_freebsd_results b2 -- cgit v1.2.3-70-g09d2