[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: use sudo -H

Holger Levsen holger at layer-acht.org
Thu Dec 22 20:46:35 UTC 2016


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 00daf62acbaacf60ba330b2f5d0bad9983c134fa
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Dec 22 21:46:21 2016 +0100

    reproducible Debian: use sudo -H
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 update_jdn.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/update_jdn.sh b/update_jdn.sh
index 6b48fa3..a39cdb7 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -687,12 +687,12 @@ fi
 #
 # Create GPG key for jenkins user if they do not already exist (eg. to sign .buildinfo files)
 #
-if sudo -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | cut -d: -f1 | grep -qsFx 'sec' >/dev/null 2>&1 ; then
+if sudo -H -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | cut -d: -f1 | grep -qsFx 'sec' >/dev/null 2>&1 ; then
 	explain "$(date) - Not generating GPG key as one already exists for jenkins user."
 else
 	explain "$(date) - Generating GPG key for jenkins user."
 
-	sudo -u jenkins gpg --no-tty --batch --gen-key <<EOF
+	sudo -H -u jenkins gpg --no-tty --batch --gen-key <<EOF
 Key-Type: RSA
 Key-Length: 4096
 Key-Usage: sign
@@ -704,7 +704,7 @@ Expire-Date: 0
 %commit
 EOF
 
-	GPG_KEY_ID="$(sudo -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | grep '^sec' | cut -d: -f5 | tail -n1)"
+	GPG_KEY_ID="$(sudo -H -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | grep '^sec' | cut -d: -f5 | tail -n1)"
 
 	if [ "$GPG_KEY_ID" = "" ]
 	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