From 79346e034603fbe17c97e602d7463cf128e3655b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 18 Oct 2015 01:17:02 +0200 Subject: reproducible arch: introduce variations of TZ, LANG, LC_ALL, umask --- TODO | 2 +- bin/reproducible_build_arch_pkg.sh | 7 +++++++ bin/reproducible_common.sh | 19 +++++++------------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/TODO b/TODO index 507c8afc..c0e34f05 100644 --- a/TODO +++ b/TODO @@ -293,7 +293,7 @@ properties: ** needs to download bootstrap.tar.gz sig and verify * use regular maintenace job to update the arch schroot: 'schroot --directory /tmp -c source:jenkins-reproducible-arch -u root -- pacman -Syu --noconfirm' * arch build.sh: -** introduce variations: USER, TZ, LANG, LC_ALL, umask +** introduce variations: USER ** 'makepkg --skippgpcheck' should be replaced by 'makepkg' and 'echo "keyserver-options auto-key-retrieve" >> ~/.gnupg/gpg.conf' *** this should make this obselete: 'schroot --directory /tmp -c source:jenkins-reproducible-arch -- grep ^validpgpkeys= $PKG/PKGBUILD|cut -d "'" -f2|xargs schroot --directory /tmp -c source:jenkins-reproducible-arch -- gpg --recv-keys' * create a working scheduler job diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index bb6e16a5..1b2c8539 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -52,6 +52,8 @@ first_build() { echo "MAKEFLAGS=-j$NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/makepkg.conf schroot --run-session -c $SESSION --directory /tmp -- mkdir $BUILDDIR schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE $BUILDDIR/ + # just set timezone in the 1st build + echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -c makepkg --syncdeps --noconfirm --skippgpcheck 2>&1 | tee -a $LOG schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi @@ -72,6 +74,11 @@ second_build() { echo "MAKEFLAGS=-j$NEW_NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/makepkg.conf schroot --run-session -c $SESSION --directory /tmp -- mkdir $BUILDDIR schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE $BUILDDIR/ + # add more variations in the 2nd build: TZ, LANG, LC_ALL, umask + echo 'export TZ="/usr/share/zoneinfo/Etc/GMT-14"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc + echo 'export LANG="fr_CH.UTF-8"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc + echo 'export LC_ALL="fr_CH.UTF-8' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc + echo 'umask 0002' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -c makepkg --syncdeps --noconfirm --skippgpcheck 2>&1 | tee -a $LOG schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 81e58191..63fce79b 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -326,14 +326,13 @@ write_explaination_table() { if [ "$1" != "FreeBSD" ] && [ "$1" != "Archlinux" ] ; then write_page "env CAPTURE_ENVIRONMENTnot setCAPTURE_ENVIRONMENT=\"I capture the environment\"" fi - if [ "$1" != "Archlinux" ] ; then - 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 TZTZ=\"/usr/share/zoneinfo/Etc/GMT+12\"TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"" + if [ "$1" = "Archlinux" ] ; then + write_page "env LANGLANGnot setLANG=\"fr_CH.UTF-8\"" else - write_page "env TZ is not yet varied between rebuilds of $1." - write_page "env LANG is not yet varied between rebuilds of $1." - write_page "env LC_ALL is not yet varied between rebuilds of $1." + write_page "env LANGLANG=\"en_GB.UTF-8\"LANG=\"fr_CH.UTF-8\"" + fi + write_page "env LC_ALLnot setLC_ALL=\"fr_CH.UTF-8\"" fi if [ "$1" != "FreeBSD" ] && [ "$1" != "Archlinux" ] ; 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\"" @@ -364,11 +363,7 @@ write_explaination_table() { else write_page "kernel version is not yet varied between rebuilds of $1." fi - if [ "$1" != "Archlinux" ] ; then - write_page "umask00220002" - else - write_page "umask is not yet varied between rebuilds of $1." - fi + 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." -- cgit v1.2.3-70-g09d2