Bug 209581

Summary: obstacles to using mock as a non-500:500 user
Product: [Retired] Fedora Hosted Projects Reporter: Alexandre Oliva <oliva>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dcantrell, extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-29 22:04:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2006-10-06 06:32:04 UTC
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
directory.

- 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):
mock-0.6.5-1.fc6

Comment 1 Alexandre Oliva 2006-10-06 06:33:23 UTC
Only to find out a moment later that mock doesn't want to run as root either :-(

Comment 2 Jesse Keating 2006-10-06 14:02:03 UTC
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 17:05:40 UTC
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 17:38:57 UTC
Strange.  I'll let Clark take a look at this...

Comment 5 Clark Williams 2006-12-14 22:23:17 UTC
yes, very strange.

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

Clark


Comment 6 Clark Williams 2007-12-14 15:01:34 UTC
Alex,

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?

Clark

Comment 7 Clark Williams 2008-02-29 22:04:20 UTC
closing