Bug 495734

Summary: useradd '-n' obsolete option
Product: [Fedora] Fedora Reporter: Peter Vrabec <pvrabec>
Component: mockAssignee: David Cantrell <dcantrell>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dcantrell, mebrown, opensource, williams
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mock-1.0.5-1.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-28 22:45:02 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 Peter Vrabec 2009-04-14 14:42:26 UTC
Description of problem:
Could you please fix mock, so it will use useradd '-N' option instead of 'n'. '-n' is obsolete.

thnx.

etc/mock/site-defaults.cfg:# config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' # Fedora/RedHat
py/mock.py:    config_opts['useradd'] = \
py/mock.py:        '/usr/sbin/useradd -o -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s'
py/mock/backend.py:        self.useradd = config['useradd']
py/mock/backend.py:        if not os.path.exists(self.makeChrootPath('usr/sbin/useradd')):
py/mock/backend.py:            raise mock.exception.RootError, "Could not find useradd in chroot, maybe the install failed?"
py/mock/backend.py:        self.doChroot(self.useradd % dets, shell=True)

Comment 1 Bug Zapper 2009-06-09 13:48:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Jesse Keating 2009-12-22 19:59:05 UTC
Looking at this, the EL5/4 useradd doesn't support -N, so we'd have to do a different call in the configs for EL4/5.  Checking with Clark if he's OK with that.

Comment 3 Jesse Keating 2009-12-22 20:37:06 UTC
Change pushed upstream.

Comment 4 Fedora Update System 2010-02-18 21:16:03 UTC
mock-1.0.5-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mock-1.0.5-1.fc12

Comment 5 Fedora Update System 2010-02-18 21:16:08 UTC
mock-1.0.5-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/mock-1.0.5-1.fc11

Comment 6 Fedora Update System 2010-02-18 21:16:13 UTC
mock-1.0.5-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/mock-1.0.5-1.fc13

Comment 7 Fedora Update System 2010-02-18 21:16:17 UTC
mock-1.0.5-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mock-1.0.5-1.el5

Comment 8 Fedora Update System 2010-02-20 00:06:45 UTC
mock-1.0.5-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-1083

Comment 9 Fedora Update System 2010-02-20 00:10:30 UTC
mock-1.0.5-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1306

Comment 10 Fedora Update System 2010-02-20 00:10:49 UTC
mock-1.0.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F13/FEDORA-2010-1374

Comment 11 Fedora Update System 2010-02-22 22:39:21 UTC
mock-1.0.5-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/EL-5/FEDORA-EPEL-2010-2289

Comment 12 Till Maas 2010-03-04 00:27:48 UTC
(In reply to comment #2)
> Looking at this, the EL5/4 useradd doesn't support -N, so we'd have to do a
> different call in the configs for EL4/5.  Checking with Clark if he's OK with
> that.    

This means that people updating on Fedora need to manually merge their config for EPEL, but the update details do not mention this.

Comment 13 Fedora Update System 2010-03-04 01:34:41 UTC
mock-1.0.5-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2010-03-04 21:01:17 UTC
mock-1.0.5-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2010-03-06 03:37:57 UTC
mock-1.0.5-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2010-03-06 03:51:40 UTC
mock-1.0.5-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Jesse Keating 2010-03-11 21:35:33 UTC
Ok, this is going south in a hurry.  Peter, how long until Fedora's useradd no longer accepts -n?  The problem with using -N is that EL useradd doesn't support it, and for things like koji generated configs we can't have a default that won't work.  Since -n works everywhere currently I'd like to keep it as -n.

Comment 18 Bug Zapper 2010-03-15 12:31:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 19 Jesse Keating 2010-05-28 22:45:02 UTC
We're still using -n, and will for a while until there are no consumers of -N needed by mock.