Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1745506

Summary: mock no longer works, complaints about not finding the mock group
Product: [Fedora] Fedora Reporter: Wouter Verhelst <w>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, jkeating, mebrown, msuchy, philip.wyett, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-26 12:33:29 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:

Description Wouter Verhelst 2019-08-26 09:39:40 UTC
Description of problem:

Running mock in a docker container, as root, fails with an error message related to the mock group not existing

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

mock-1.4.16-2.fc30.noarch
mock-core-configs-31.1-1.fc30.noarch

How reproducible:

Always

Steps to Reproduce:
1. docker run -ti fedora:latest /bin/bash
2. inside the docker container, run "dnf -y install mock git", and wait for it to complete
3. run "getent group mock"
4. run "mock", without arguments (or with arguments, it doesn't matter)

Actual results:

"getent group mock" produces no output. "mock" produces the following output:

ERROR: "getgrnam(): name not found: 'mock'"
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 977, in <module>
    main()
  File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 644, in main
    mockgid = grp.getgrnam('mock').gr_gid
KeyError: "getgrnam(): name not found: 'mock'"


Expected results:

Either the mock group should exist after installing the package, or mock should be able to continue without it.

Additional info:

Comment 1 Miroslav Suchý 2019-08-26 12:33:29 UTC

*** This bug has been marked as a duplicate of bug 1740545 ***