[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: dont use sudo if -u root works equally well

Holger Levsen holger at layer-acht.org
Sat Dec 9 16:34:42 UTC 2017


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 f049c47b9f35db08ab2bfce9d419c70ec77bc117
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Dec 9 16:34:39 2017 +0000

    reproducible Arch Linux: dont use sudo if -u root works equally well
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 751f781..3aa5838 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -146,9 +146,9 @@ first_build() {
 	# 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
 	# remove possible lock in our local session (happens when root maintenance update running while session starts)
-	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo rm -f /var/lib/pacman/db.lck 2>&1 | tee -a $LOG
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -u root -- rm -f /var/lib/pacman/db.lck 2>&1 | tee -a $LOG
 	# update before pulling new dependencies
-	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo pacman -Syu --noconfirm 2>&1 | tee -a $LOG
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -u root -- pacman -Syu --noconfirm 2>&1 | tee -a $LOG
 	# determine the version of the package being build
 	source "$BUILDDIR/$ACTUAL_SRCPACKAGE/trunk/PKGBUILD"
 	if [ -n "$epoch" ] ; then
@@ -227,9 +227,9 @@ second_build() {
 	umask 0002
 	__END__
 	# remove possible lock in our local session (happens when root maintenance update running while session starts)
-	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo rm -f /var/lib/pacman/db.lck 2>&1 | tee -a $LOG
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -u root -- rm -f /var/lib/pacman/db.lck 2>&1 | tee -a $LOG
 	# update before pulling new dependencies
-	schroot --run-session -c $SESSION --directory "$BUILDDIR" -- sudo pacman -Syu --noconfirm 2>&1 | tee -a $LOG
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -u root -- pacman -Syu --noconfirm 2>&1 | tee -a $LOG
 	# determine the version of the package being build
 	source "$BUILDDIR/$ACTUAL_SRCPACKAGE/trunk/PKGBUILD"
 	if [ -n "$epoch" ] ; then

-- 
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