Bug 209581 - obstacles to using mock as a non-500:500 user
obstacles to using mock as a non-500:500 user
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Clark Williams
Depends On:
  Show dependency treegraph
Reported: 2006-10-06 02:32 EDT by Alexandre Oliva
Modified: 2013-01-09 23:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-29 17:04:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2006-10-06 02:32:04 EDT
My userid is 404, I belong to group mock (408), but I run into numerous problems
attempting to use mock to build packages:

- mock init fails to write to builddir/.rpmmacros, because builddir is created
with mode 700 user 500, and I don't have permission to access or write to that

- mock init fails to write to etc/yum.conf, even if I add myself to group
mockbuild, if (umask&0020)!=0

- mock rebuild fails to copy the src.rpm file to builddir/build/originals,
because it doesn't have permission to write to that directory.  Adding self to
the mockbuild group and adjusting umask doesn't help.

There might be more, but at this point I gave up trying to use mock as non-root.

Version-Release number of selected component (if applicable):
Comment 1 Alexandre Oliva 2006-10-06 02:33:23 EDT
Only to find out a moment later that mock doesn't want to run as root either :-(
Comment 2 Jesse Keating 2006-10-06 10:02:03 EDT
Did you add yourself to the mock group, as per the directions?  You add yourself
to mock group, then you can call mock and mockhelper to build packages and do
things in the chroots...
Comment 3 Alexandre Oliva 2006-10-06 13:05:40 EDT
Yes, I thought that would be implied, otherwise I wouldn't have got anywhere as
far as I did.

In the end, I had to create a user with uid 500 gid 500, add *that* user to
group mock and use it in order to get mock to work.
Comment 4 Jesse Keating 2006-10-06 13:38:57 EDT
Strange.  I'll let Clark take a look at this...
Comment 5 Clark Williams 2006-12-14 17:23:17 EST
yes, very strange.

Alex, what release/kernel(s) are you using? Have you seen this change behavior
between kernel releases?

Comment 6 Clark Williams 2007-12-14 10:01:34 EST

I believe the current version of mock (0.8.15+) addresses these issues, although
I'm not positive that they're all fixed. Would you please see if it still fails
for you?

Comment 7 Clark Williams 2008-02-29 17:04:20 EST

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