Bug 1544951

Summary: rhel5 fails on usermod command
Product: [Fedora] Fedora Reporter: thomas.swan
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: jdisnard, jkeating, mebrown, msimacek, msuchy, 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: 2018-02-14 11:51:48 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:
Bug Depends On:    
Bug Blocks: 1554957    
Attachments:
Description Flags
patch to reorder options on usermod command none

Description thomas.swan 2018-02-13 20:24:36 UTC
Created attachment 1395642 [details]
patch to reorder options on usermod command

Description of problem:
Once installed we receive a failed on command /usr/sbin/usermod --non-unique...
Reordering the command arguments resolves the issue.  Patch provided.

Version-Release number of selected component (if applicable):
mock-1.4.8-1.fc27.noarch

How reproducible:
Always

Steps to Reproduce:
1. mock -r epel-5-x86_64 --shell
2. mock -r epel-5-x86_64 --shell

Actual results:
failed

Expected results:
second attempt should give a shell in mock.  This applies to other commands
such as rebuild or install and is not limited to shell.

Additional info:
There appears to be a bug in a release of EL5's /usr/sbin/usermod command which fails if --non-unique is specified before the -u (uid) option to the command. Moving the --non-unique option to the end resolves the issue.

epel-5-x86_64.cfg:
config_opts['root'] = 'epel-5-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'install buildsys-build buildsys-macros'
config_opts['dist'] = 'el5'  # only useful for --resultdir variable subst
if 'macros' not in config_opts:  config_opts['macros'] = {}
config_opts['macros']['%__arch_install_post'] = '%{nil}'
config_opts['releasever'] = '5'
config_opts['use_nspawn'] = False

Comment 1 Miroslav Suchý 2018-02-14 11:51:48 UTC

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