Bug 518706

Summary: exim doesn't take its reserved group ID and gets a dynamic one, can conflict with mock GID
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
Component: eximAssignee: David Woodhouse <dwmw2>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 11CC: dcantrell, dwmw2, mebrown, mlichvar, sheltren, williams
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: 2010-06-28 14:13:38 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 Stephen Gallagher 2009-08-21 18:39:28 UTC
Description of problem:
When attempting to run mock, it sets up the chroot, does a yum checkout and then attempts to create a group with gid 498. However, this gid is already taken by the exim group.

===== BUILDING FEDORA 11 i586 =====
INFO: mock.py version 0.9.16 starting...
State Changed: init plugins
State Changed: start
INFO: Start(sssd-2009082114-0.fc11.src.rpm)  Config(fedora-11-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: init
State Changed: lock buildroot
Mock Version: 0.9.16
INFO: Mock Version: 0.9.16
INFO: enabled root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
ERROR: Exception(sssd-2009082114-0.fc11.src.rpm) Config(fedora-11-i386) 0 minutes 55 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-11-i386/result
ERROR: Command failed. See logs for output.
 # ['/usr/sbin/groupadd', '-g', '498', 'mockbuild']


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


How reproducible:
Every time

Steps to Reproduce:
1. Run mock
  
Actual results:
Mock exits with the error listed above

Expected results:
Mock runs to completion

Additional info:
I manually changed the gid of the 'mock' group on the host to 200 and it completed successfully. Mock needs to ensure that no other package steals the mock gid during yum setup.

Comment 1 Jesse Keating 2009-08-21 19:17:47 UTC
This is most likely a package in the F11 set that incorrectly allocates its group ID, and thus tramples on the one that mock needs.  I'll need to know what package took that GID in the chroot.

Comment 2 Stephen Gallagher 2009-08-21 19:21:35 UTC
As mentioned in the original summary, the "exim" package is taking over that GID.

Comment 3 Jesse Keating 2009-08-21 19:41:22 UTC
Bingo.  The exim package has UID/GID of 93 reserved, but doesn't actually create the exim group with ID 93 during package install, instead letting useradd pick one for it.  This needs to be fixed in exim, both in F-11 and devel.

Comment 4 David Woodhouse 2009-08-31 13:00:22 UTC
By just adding 'groupadd -g 93 exim' to the %pre script, then adding '-g exim' to the existing useradd command?

Both of those commands are run unconditionally -- is that right? Other packages seem to do the same.

@@ -329,7 +332,8 @@ touch $RPM_BUILD_ROOT/%_var/spool/exim/d
 rm -rf $RPM_BUILD_ROOT

 %pre
-%{_sbindir}/useradd -d %{_var}/spool/exim -s /sbin/nologin -G mail -M -r -u 93 exim 2>/dev/null
+%{_sbindir}/groupadd -g 93 exim 2>&1
+%{_sbindir}/useradd -d %{_var}/spool/exim -s /sbin/nologin -G mail -M -r -u 93 -g exim exim 2>/dev/null
 # Copy TLS certs from old location to new -- don't move them, because the
 # config file may be modified and may be pointing to the old location.

Comment 5 Jesse Keating 2009-08-31 16:24:10 UTC
that seems like it would do it, although I would use the variables to detect if this is the initial install of exim vs an upgrade.  You don't need to add users/groups on upgrades, just the first install.

Comment 6 Bug Zapper 2010-04-28 09:52:58 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2010-06-28 14:13:38 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.