summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-27 21:18:02 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-27 21:18:52 +0200
commit188d2760384247dd41d4f0936a297245af90a7fd (patch)
treeee3eb70fe9626f95e0b2abcc5ea133a083e29206 /bin
parent120c669810b9a9d1f22998c73289115213436f75 (diff)
downloadjenkins.debian.net-188d2760384247dd41d4f0936a297245af90a7fd.tar.xz
reproducible freebsd: vary LANG and LC_ALL now too and correctly describe what's varied on FreeBSD and what not
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.sh26
-rwxr-xr-xbin/reproducible_freebsd.sh37
2 files changed, 36 insertions, 27 deletions
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 "<tr><td>hostname</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
write_page "<tr><td>domainname</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
fi
- export CAPTURE_ENVIRONMENT="I capture the environment"
- write_page "<tr><td>env CAPTURE_ENVIRONMENT</td><td><em>not set</em></td><td>CAPTURE_ENVIRONMENT=\"I capture the environment\"</td></tr>"
+ if [ "$1" != "FreeBSD" ] ; then
+ write_page "<tr><td>env CAPTURE_ENVIRONMENT</td><td><em>not set</em></td><td>CAPTURE_ENVIRONMENT=\"I capture the environment\"</td></tr>"
+ fi
write_page "<tr><td>env TZ</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT+12\"</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"</td></tr>"
write_page "<tr><td>env LANG</td><td>LANG=\"en_GB.UTF-8\"</td><td>LANG=\"fr_CH.UTF-8\"</td></tr>"
write_page "<tr><td>env LC_ALL</td><td><em>not set</em></td><td>LC_ALL=\"fr_CH.UTF-8\"</td></tr>"
- write_page "<tr><td>env PATH</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"</td></tr>"
+ if [ "$1" != "FreeBSD" ] ; then
+ write_page "<tr><td>env PATH</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"</td></tr>"
+ else
+ write_page "<tr><td>env PATH</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.\"</td><td>is not yet varied between rebuilds of $1.\"</td></tr>"
+ fi
if [ "$1" = "debian" ] ; then
write_page "<tr><td>env BUILDUSERID</td><td>BUILDUSERID=\"1111\"</td><td>BUILDUSERID=\"2222\"</td></tr>"
write_page "<tr><td>env BUILDUSERNAME</td><td>BUILDUSERNAME=\"pbuilder1\"</td><td>BUILDUSERNAME=\"pbuilder2\"</td></tr>"
@@ -311,10 +316,17 @@ write_explaination_table() {
write_page "<tr><td>env USER</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
write_page "<tr><td>uid</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
write_page "<tr><td>gid</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
- write_page "<tr><td>UTS namespace</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
+ if [ "$1" != "FreeBSD" ] ; then
+ write_page "<tr><td>UTS namespace</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
+ fi
+ fi
+ if [ "$1" != "FreeBSD" ] ; then
+ write_page "<tr><td>kernel version, modified using /usr/bin/linux64 --uname-2.6</td><td>$(uname -sr)</td><td>$(/usr/bin/linux64 --uname-2.6 uname -sr)</td></tr>"
+ write_page "<tr><td>umask</td><td>0022<td>0002</td><tr>"
+ else
+ write_page "<tr><td>FreeBSD kernel version</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
+ write_page "<tr><td>umask</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td><tr>"
fi
- write_page "<tr><td>kernel version, modified using /usr/bin/linux64 --uname-2.6</td><td>$(uname -sr)</td><td>$(/usr/bin/linux64 --uname-2.6 uname -sr)</td></tr>"
- write_page "<tr><td>umask</td><td>0022<td>0002</td><tr>"
write_page "<tr><td>CPU type</td><td>$(cat /proc/cpuinfo|grep 'model name'|head -1|cut -d ":" -f2-)</td><td>same for both builds (currently, work in progress)</td></tr>"
write_page "<tr><td>year, month, date</td><td>today ($DATE)</td><td>same for both builds (currently, work in progress)</td></tr>"
if [ "$1" != "FreeBSD" ] ; then
@@ -322,7 +334,7 @@ write_explaination_table() {
write_page "<tr><td>Filesystem</td><td>tmpfs</td><td>same for both builds (currently, <a href=\"https://tracker.debian.org/disorderfs\">work in progress</a>)</td></tr>"
else
write_page "<tr><td>hour, minute</td><td>hour and minute will probably vary between two builds...</td><td>but this is not enforced systematically...)</td></tr>"
- write_page "<tr><td>Filesystem</td><td>ufs</td><td>same for both builds</td></tr>"
+ write_page "<tr><td>filesystem of the build directory</td><td>ufs</td><td>same for both builds</td></tr>"
fi
if [ "$1" = "debian" ] ; then
write_page "<tr><td><em>everything else...</em></td><td colspan=\"2\">is likely the same. So far, this is just about the <em>prospects</em> of <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds of Debian</a> - there will be more variations in the wild.</td></tr>"
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