[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible arch: run commands via bash to get the proxy settings

Holger Levsen holger at moszumanska.debian.org
Sat Oct 17 23:03:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit f92562f023b955f8b85277994bf0abe1701ab6aa
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Oct 18 01:02:24 2015 +0200

    reproducible arch: run commands via bash to get the proxy settings
---
 TODO                                   |  1 -
 bin/reproducible_arch_schroot_setup.sh | 14 +++++++-------
 bin/reproducible_build_arch_pkg.sh     |  4 ++--
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/TODO b/TODO
index 50f3c65..507c8af 100644
--- a/TODO
+++ b/TODO
@@ -290,7 +290,6 @@ properties:
 ==== reproducible Arch Linux
 
 * job, to bootstrap an arch schroot needs to be made idempotent
-** pacman+abs should be called via bash to get the proxy settings
 ** 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:
diff --git a/bin/reproducible_arch_schroot_setup.sh b/bin/reproducible_arch_schroot_setup.sh
index 4594667..4beae5d 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 pacman-key --init
-$ROOTCMD pacman-key --populate archlinux
+$ROOTCMD bash -c pacman-key --init
+$ROOTCMD bash -c pacman-key --populate archlinux
 echo "Server = $ARCH_MIRROR/\$repo/os/\$arch" | tee -a $SCHROOT_BASE/$TARGET/etc/pacman.d/mirrorlist
-$ROOTCMD pacman -Syu --noconfirm
-$ROOTCMD pacman -S --noconfirm base-devel devtools abs
+$ROOTCMD bash -c pacman -Syu --noconfirm
+$ROOTCMD bash -c pacman -S --noconfirm base-devel devtools abs
 # configure abs
-$ROOTCMD abs core extra
+$ROOTCMD bash -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 gpg --check-trustdb # first run will create ~/.gnupg/gpg.conf
-$USERCMD gpg --recv-keys 0x091AB856069AAA1C
+$USERCMD bash -c gpg --check-trustdb # first run will create ~/.gnupg/gpg.conf
+$USERCMD bash -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 cb66eff..bb6e16a 100755
--- a/bin/reproducible_build_arch_pkg.sh
+++ b/bin/reproducible_build_arch_pkg.sh
@@ -52,7 +52,7 @@ 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/
-	schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- makepkg --syncdeps --noconfirm --skippgpcheck 2>&1 | tee -a $LOG
+	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,7 +72,7 @@ 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/
-	schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- makepkg --syncdeps --noconfirm --skippgpcheck 2>&1 | tee -a $LOG
+	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
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list