[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible rpms: use mock and sudo correctly
Holger Levsen
holger at moszumanska.debian.org
Mon Dec 7 19:05:53 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 ece2032911c5668cf137cf43e3abbaad4e75209a
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Dec 7 20:05:48 2015 +0100
reproducible rpms: use mock and sudo correctly
---
TODO | 3 +--
bin/reproducible_setup_mock.sh | 2 +-
hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins | 3 +--
update_jdn.sh | 4 ++--
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/TODO b/TODO
index e0c6d9b..3258119 100644
--- a/TODO
+++ b/TODO
@@ -304,8 +304,7 @@ This is about Debian, below are more todo entries for other projects…
* then use yumdownloader to download rpms: 'yumdownloader --source sudo'
** https://mirrors.fedoraproject.org/metalink?repo=fedora-23&arch=X86_64 has a list of repos
* then configure+use mock to build:
-** 'sudo mock -r fedora-20-x86_64 --init'
-** 'sudo mock -r fedora-20-x86_64 sudo-1.8.14p3-1.fc23.src.rpm'
+** 'mock -r fedora-20-x86_64 sudo-1.8.14p3-1.fc23.src.rpm'
* baseurl=http://fedora.mirrors.telekom.ro/pub/fedora/linux/development/23/source/SRPMS is really not so good…
* more notes:
diff --git a/bin/reproducible_setup_mock.sh b/bin/reproducible_setup_mock.sh
index 711d2d9..2385693 100755
--- a/bin/reproducible_setup_mock.sh
+++ b/bin/reproducible_setup_mock.sh
@@ -19,5 +19,5 @@ DISTRO=$1
ARCHITECTURE=$2
echo "$(date -u) - starting to configure mock for ${DISTRO} on ${ARCHITECTURE} now."
-sudo /usr/bin/mock -r ${DISTRO}-${ARCHITECTURE} --init
+mock -r ${DISTRO}-${ARCHITECTURE} --init
echo "$(date -u) - mock configured for ${DISTRO} on ${ARCHITECTURE} now."
diff --git a/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins
index cb0c4e6..f59860d 100644
--- a/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins
+++ b/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins
@@ -9,8 +9,7 @@ jenkins ALL= \
/bin/rm -rf --one-file-system /srv/live-build/*, \
/bin/mv /schroots/* /schroots/*, \
/bin/umount -l /schroots/*, \
- /bin/mount --bind *, \
- /usr/bin/mock -r * --init
+ /bin/mount --bind *
# keep these environment variables
Defaults env_keep += "http_proxy", env_reset
diff --git a/update_jdn.sh b/update_jdn.sh
index 40605a3..48fe973 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -312,8 +312,8 @@ fi
#
if [ "$HOSTNAME" = "profitbricks-build3-amd64" ] ; then
if ! grep mock /etc/group ; then
- groupadd --system mock
- usermod -a -G mock jenkins
+ sudo groupadd --system mock
+ sudo usermod -a -G mock jenkins
fi
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