Bug 522505 - --unpriv only works with --chroot
Summary: --unpriv only works with --chroot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: el5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-10 14:50 UTC by Bill Nottingham
Modified: 2014-03-17 03:20 UTC (History)
4 users (show)

Fixed In Version: mock-1.1.10-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-26 01:05:04 UTC


Attachments (Terms of Use)

Description Bill Nottingham 2009-09-10 14:50:18 UTC
Description of problem:

It would be *really really nice if it worked with --shell.

Version-Release number of selected component (if applicable):

mock-0.9.14-1.el5.noarch

How reproducible:

100%

Comment 1 Bill Nottingham 2010-01-18 19:23:59 UTC
Failing that, it would be nice if it threw an error, so it didn't make you *think* it works.

Comment 2 Clark Williams 2010-01-18 20:18:26 UTC
I've queued up the following for mock-1.0.3-1:

diff --git a/py/mock.py b/py/mock.py
index 46ffbbb..f4794ac 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -574,7 +574,11 @@ def main(ret):
             chroot._setupDev()
             chroot._mountall()
             cmd = ' '.join(args)
-            status = os.system("PS1='mock-chroot> ' /usr/sbin/chroot %s %s" % (
+            if options.unpriv:
+                arg = '--userspec=%s:%s' % (chroot.chrootuid, chroot.chrootgid)
+            else:
+                arg = ''
+            status = os.system("PS1='mock-chroot> ' /usr/sbin/chroot %s %s %s" 
             ret['exitStatus'] = os.WEXITSTATUS(status)
 
         finally:

Tested with:

$ mock -r fedora-11-x86_64 --unpriv --shell
INFO: mock.py version 1.0.2 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
mock-chroot> id
uid=101(mockbuild) gid=484(mockbuild) groups=71,484(mockbuild),485,495,496,497
mock-chroot>

Comment 3 Fedora Update System 2010-01-18 23:07:24 UTC
mock-1.0.3-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mock-1.0.3-1.fc12

Comment 4 Fedora Update System 2010-01-18 23:08:09 UTC
mock-1.0.3-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mock-1.0.3-1.el5

Comment 5 Fedora Update System 2010-01-18 23:08:47 UTC
mock-1.0.3-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/mock-1.0.3-1.fc11

Comment 6 Fedora Update System 2010-01-19 19:42:17 UTC
mock-1.0.3-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0779

Comment 7 Fedora Update System 2010-01-19 19:45:00 UTC
mock-1.0.3-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-0792

Comment 8 Fedora Update System 2010-01-19 22:57:40 UTC
mock-1.0.3-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/EL-5/FEDORA-EPEL-2010-0089

Comment 9 Fedora Update System 2010-08-03 22:29:03 UTC
mock-1.0.10-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mock-1.0.10-1.el5

Comment 10 Fedora Update System 2010-08-03 22:30:08 UTC
mock-1.0.10-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mock-1.0.10-1.fc12

Comment 11 Fedora Update System 2010-08-04 23:04:39 UTC
mock-1.0.10-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mock-1.0.10-1.el5

Comment 12 Fedora Update System 2010-08-05 23:37:40 UTC
mock-1.0.10-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mock-1.0.10-1.fc12

Comment 13 Fedora Update System 2010-08-19 17:33:41 UTC
mock-1.0.11-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mock-1.0.11-1.fc12

Comment 14 Fedora Update System 2010-08-19 17:34:57 UTC
mock-1.0.11-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mock-1.0.11-1.el5

Comment 15 Fedora Update System 2010-08-19 22:00:56 UTC
mock-1.0.11-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mock-1.0.11-1.el5

Comment 16 Fedora Update System 2010-08-26 01:03:49 UTC
mock-1.0.11-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2010-09-20 14:43:47 UTC
mock-1.0.12-1.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/mock-1.0.12-1.fc12

Comment 18 Fedora Update System 2010-09-20 14:45:19 UTC
mock-1.0.12-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.12-1.el5

Comment 19 Fedora Update System 2010-10-20 15:45:41 UTC
mock-1.0.13-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.13-1.el5

Comment 20 Fedora Update System 2010-10-20 15:47:50 UTC
mock-1.0.13-1.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/mock-1.0.13-1.fc12

Comment 21 Fedora Update System 2010-12-14 16:15:51 UTC
mock-1.0.14-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.14-1.el5

Comment 22 Fedora Update System 2011-01-18 20:06:07 UTC
mock-1.0.15-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.15-1.el5

Comment 23 Fedora Update System 2011-02-20 02:28:16 UTC
mock-1.1.9-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc13

Comment 24 Fedora Update System 2011-02-20 02:31:16 UTC
mock-1.0.16-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5

Comment 25 Fedora Update System 2011-02-20 02:34:03 UTC
mock-1.1.9-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.el6

Comment 26 Fedora Update System 2011-02-20 02:36:52 UTC
mock-1.1.9-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc14

Comment 27 Fedora Update System 2011-03-03 08:27:17 UTC
mock-1.1.9-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2011-03-03 08:35:44 UTC
mock-1.1.9-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 29 Fedora Update System 2011-05-13 20:36:12 UTC
mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15

Comment 30 Fedora Update System 2011-05-13 20:40:25 UTC
mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14

Comment 31 Fedora Update System 2011-05-13 20:44:39 UTC
mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5

Comment 32 Fedora Update System 2011-05-13 20:48:57 UTC
mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13

Comment 33 Fedora Update System 2011-05-13 20:53:21 UTC
mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6

Comment 34 Fedora Update System 2011-05-19 04:37:35 UTC
mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 Fedora Update System 2011-05-25 02:44:47 UTC
mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 36 Fedora Update System 2011-05-25 03:18:56 UTC
mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 37 Fedora Update System 2011-06-02 19:08:56 UTC
mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 38 Fedora Update System 2011-06-02 19:18:46 UTC
mock-1.1.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.