diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-18 13:44:19 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-18 13:44:19 +0200 |
commit | 34cec783b684139b4b2c9cb371aa8c9204eb9af6 (patch) | |
tree | 3a59d7e0f36d94435300b2971676fd3a6e1d82a6 | |
parent | 9f71b2f181320fb42b4e5fff590074d716756643 (diff) | |
download | jenkins.debian.net-34cec783b684139b4b2c9cb371aa8c9204eb9af6.tar.xz |
reproducible arch: invoke bash as login shell
-rwxr-xr-x | bin/reproducible_arch_schroot_setup.sh | 14 | ||||
-rwxr-xr-x | bin/reproducible_build_arch_pkg.sh | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/bin/reproducible_arch_schroot_setup.sh b/bin/reproducible_arch_schroot_setup.sh index fda9dff1..9aff264a 100755 --- a/bin/reproducible_arch_schroot_setup.sh +++ b/bin/reproducible_arch_schroot_setup.sh @@ -84,13 +84,13 @@ chmod 755 $SCHROOT_BASE/$TARGET/etc/profile.d/proxy.sh echo ". /etc/profile.d/proxy.sh" | tee -a $SCHROOT_BASE/$TARGET/root/.bashrc # configure pacman -$ROOTCMD bash -c 'pacman-key --init' -$ROOTCMD bash -c 'pacman-key --populate archlinux' +$ROOTCMD bash -l -c 'pacman-key --init' +$ROOTCMD bash -l -c 'pacman-key --populate archlinux' echo "Server = $ARCH_MIRROR/\$repo/os/\$arch" | tee -a $SCHROOT_BASE/$TARGET/etc/pacman.d/mirrorlist -$ROOTCMD bash -c 'pacman -Syu --noconfirm' -$ROOTCMD bash -c 'pacman -S --noconfirm base-devel devtools abs' +$ROOTCMD bash -l -c 'pacman -Syu --noconfirm' +$ROOTCMD bash -l -c 'pacman -S --noconfirm base-devel devtools abs' # configure abs -$ROOTCMD bash -c 'abs core extra' +$ROOTCMD bash -l -c 'abs core extra' # configure sudo echo 'jenkins ALL= NOPASSWD: /usr/sbin/pacman *' | $ROOTCMD tee -a /etc/sudoers @@ -98,7 +98,7 @@ echo 'jenkins ALL= NOPASSWD: /usr/sbin/pacman *' | $ROOTCMD tee -a /etc/sudoers $ROOTCMD mkdir /var/lib/jenkins $ROOTCMD chown -R jenkins:jenkins /var/lib/jenkins echo ". /etc/profile.d/proxy.sh" | tee -a $SCHROOT_BASE/$TARGET/var/lib/jenkins/.bashrc -$USERCMD bash -c 'gpg --check-trustdb' # first run will create ~/.gnupg/gpg.conf -$USERCMD bash -c 'gpg --recv-keys 0x091AB856069AAA1C' +$USERCMD bash -l -c 'gpg --check-trustdb' # first run will create ~/.gnupg/gpg.conf +$USERCMD bash -l -c 'gpg --recv-keys 0x091AB856069AAA1C' echo "schroot $TARGET set up successfully in $SCHROOT_BASE/$TARGET - exiting now." diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index d51b9c65..9c72da5d 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -56,7 +56,7 @@ first_build() { echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc # nicely run makepkg with a timeout of 4h timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \ - schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG + schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG @@ -87,7 +87,7 @@ second_build() { echo 'umask 0002' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc # nicely run makepkg with a timeout of 4h timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \ - schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG + schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG |