Bug 1108265

Summary: mockchain.py sets up default config with group id instead of user id
Product: [Fedora] Fedora EPEL Reporter: Robert Hamrick <rhamrick>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: el6CC: jdisnard, mattias.ellert, mebrown, msuchy, rhamrick, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: mock-1.1.41-3.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-20 03:24:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
getuid patch none

Description Robert Hamrick 2014-06-11 15:53:06 UTC
Created attachment 907713 [details]
getuid patch

Description of problem:

Mockchain sets up the default config opts with os.getgid instead of os.getuid.  Is that intentional?

In some environments, a user's primary gid might differ from her uid.  Furthermore, that gid might not have a corresponding uid or, even if it does, the uid that corresponds to that primary gid might not belong to the mock group.  In those cases, mockchain will build rpms but will not be able to copy them to the resultdir since the rpms are not owned by that user and the resultdir is not owned by the mock group.

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

I looks like this was added with commit 2135337301164fe3e82c75fe86eead82abeb80ff.

How reproducible:

Always, in an environment like the one described.

Steps to Reproduce:
1. set up user that belongs to mock group but whose primary gid does not correspond to any uid
2. build a package with mockchain as that user

Actual results:

Mockchain builds the rpms but does not copy them to the resultdir.

Expected results:

Mockchain copies the rpms to the resultdir.

Additional info:

Comment 1 Miroslav Suchý 2014-06-12 12:21:49 UTC
Commited as fc12d16 to msuchy-work branch.
Thanks for the report.

Comment 2 Robert Hamrick 2014-06-13 17:05:20 UTC
Thanks for fixing!

Comment 3 Miroslav Suchý 2014-07-17 08:28:35 UTC
*** Bug 1111251 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2014-07-18 02:13:20 UTC
mock-1.1.40-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.40-2.fc20

Comment 5 Fedora Update System 2014-07-18 02:13:47 UTC
mock-1.1.40-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.40-2.fc19

Comment 6 Fedora Update System 2014-07-18 02:14:09 UTC
mock-1.1.40-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.40-2.el6

Comment 7 Fedora Update System 2014-07-18 17:45:27 UTC
mock-1.1.41-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.41-1.fc20

Comment 8 Fedora Update System 2014-07-18 17:45:54 UTC
mock-1.1.41-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.41-1.fc19

Comment 9 Fedora Update System 2014-07-18 17:46:20 UTC
mock-1.1.41-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.41-1.el6

Comment 10 Fedora Update System 2014-07-19 05:58:10 UTC
Package mock-1.1.41-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.41-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8492/mock-1.1.41-1.fc20
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2014-07-20 03:24:36 UTC
mock-1.1.41-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-07-22 18:07:55 UTC
mock-1.1.41-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.

Comment 13 Fedora Update System 2014-09-16 16:46:55 UTC
mock-1.1.41-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.41-2.fc19

Comment 14 Fedora Update System 2014-09-30 09:00:10 UTC
mock-1.1.41-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.41-3.fc19

Comment 15 Fedora Update System 2014-10-10 16:04:19 UTC
mock-1.1.41-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.