]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-{ansible,installer}-rpm: use "sg" for mock group 600/head
authorKen Dreyer <kdreyer@redhat.com>
Thu, 15 Dec 2016 19:41:24 +0000 (12:41 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Thu, 15 Dec 2016 19:44:26 +0000 (12:44 -0700)
The previous commit (0d90b3c5fec43fe66fc1e9c3856519f91e4454cf) attempted
to use newgrp to refresh groups, but I did not realize that this just
spawns a new shell (at least in my experiments in a bash interactive
shell), and it is ineffective on our JNLP slaves.

Use the approach we implemented for Docker (in
f9cc49aec026c2ae17b1db2603d262f5cb1c8a00), and run mock through "sg" to
set the group.

ceph-ansible-rpm/build/build
ceph-installer-rpm/build/build

index ae0958ef4e2290f479250feab252fcd4c45a0d7b..85376ed66d4a13cd3557f4c9a7db0d2266509a6f 100644 (file)
@@ -14,10 +14,9 @@ sudo yum -y install fedpkg
 
 # Add the Jenkins slave UID to the mock group.
 sudo usermod -a -G mock $(whoami)
-newgrp mock
 
 # Attempt the build. If it fails, print the mock logs to STDOUT.
-make rpm || ( tail -n +1 {root,build}.log && exit 1 )
+sg mock -c "make rpm" || ( tail -n +1 {root,build}.log && exit 1 )
 
 # Chacra time
 
index ae0958ef4e2290f479250feab252fcd4c45a0d7b..85376ed66d4a13cd3557f4c9a7db0d2266509a6f 100644 (file)
@@ -14,10 +14,9 @@ sudo yum -y install fedpkg
 
 # Add the Jenkins slave UID to the mock group.
 sudo usermod -a -G mock $(whoami)
-newgrp mock
 
 # Attempt the build. If it fails, print the mock logs to STDOUT.
-make rpm || ( tail -n +1 {root,build}.log && exit 1 )
+sg mock -c "make rpm" || ( tail -n +1 {root,build}.log && exit 1 )
 
 # Chacra time