From a087ff5ed320edd44f8c1d6cf3f56f7cd942e3ac Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 11 Mar 2010 13:36:10 -0800 Subject: Revert "Use -N flag with useradd, but not in EPEL #495734" This reverts commit e99adc9492ab1087018c630f68f75ebe79f56a76. -n still works on Fedora, and trying to override -N with -n in epel configs fails for things like koji generated configs. Falling back to -n until that stops working for us. --- etc/mock/epel-4-i386.cfg | 1 - etc/mock/epel-4-ppc.cfg | 1 - etc/mock/epel-4-x86_64.cfg | 1 - etc/mock/epel-5-i386.cfg | 1 - etc/mock/epel-5-ppc.cfg | 1 - etc/mock/epel-5-x86_64.cfg | 1 - etc/mock/site-defaults.cfg | 2 +- py/mock.py | 2 +- 8 files changed, 2 insertions(+), 8 deletions(-) diff --git a/etc/mock/epel-4-i386.cfg b/etc/mock/epel-4-i386.cfg index 04f6d1e..a2b8a7c 100644 --- a/etc/mock/epel-4-i386.cfg +++ b/etc/mock/epel-4-i386.cfg @@ -1,7 +1,6 @@ config_opts['root'] = 'epel-4-i386' config_opts['target_arch'] = 'i386' config_opts['chroot_setup_cmd'] = 'install buildsys-build' -config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['dist'] = 'el4' # only useful for --resultdir variable subst # ccache not available on epel4 diff --git a/etc/mock/epel-4-ppc.cfg b/etc/mock/epel-4-ppc.cfg index 88e5fce..88f75b9 100644 --- a/etc/mock/epel-4-ppc.cfg +++ b/etc/mock/epel-4-ppc.cfg @@ -1,7 +1,6 @@ config_opts['root'] = 'epel-4-ppc' config_opts['target_arch'] = 'ppc' config_opts['chroot_setup_cmd'] = 'install buildsys-build' -config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['dist'] = 'el4' # only useful for --resultdir variable subst # ccache not available on epel4 diff --git a/etc/mock/epel-4-x86_64.cfg b/etc/mock/epel-4-x86_64.cfg index 39d84c0..354c0da 100644 --- a/etc/mock/epel-4-x86_64.cfg +++ b/etc/mock/epel-4-x86_64.cfg @@ -1,7 +1,6 @@ config_opts['root'] = 'epel-4-x86_64' config_opts['target_arch'] = 'x86_64' config_opts['chroot_setup_cmd'] = 'install buildsys-build' -config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['dist'] = 'el4' # only useful for --resultdir variable subst # ccache not available on epel4 diff --git a/etc/mock/epel-5-i386.cfg b/etc/mock/epel-5-i386.cfg index 061759a..58551e3 100644 --- a/etc/mock/epel-5-i386.cfg +++ b/etc/mock/epel-5-i386.cfg @@ -1,7 +1,6 @@ config_opts['root'] = 'epel-5-i386' config_opts['target_arch'] = 'i386' config_opts['chroot_setup_cmd'] = 'install buildsys-build' -config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['dist'] = 'el5' # only useful for --resultdir variable subst config_opts['yum.conf'] = """ diff --git a/etc/mock/epel-5-ppc.cfg b/etc/mock/epel-5-ppc.cfg index fda17a9..5c25011 100644 --- a/etc/mock/epel-5-ppc.cfg +++ b/etc/mock/epel-5-ppc.cfg @@ -1,7 +1,6 @@ config_opts['root'] = 'epel-5-ppc' config_opts['target_arch'] = 'ppc' config_opts['chroot_setup_cmd'] = 'install buildsys-build' -config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['dist'] = 'el5' # only useful for --resultdir variable subst config_opts['yum.conf'] = """ diff --git a/etc/mock/epel-5-x86_64.cfg b/etc/mock/epel-5-x86_64.cfg index 966546d..199fcfe 100644 --- a/etc/mock/epel-5-x86_64.cfg +++ b/etc/mock/epel-5-x86_64.cfg @@ -1,7 +1,6 @@ config_opts['root'] = 'epel-5-x86_64' config_opts['target_arch'] = 'x86_64' config_opts['chroot_setup_cmd'] = 'install buildsys-build' -config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['dist'] = 'el5' # only useful for --resultdir variable subst config_opts['yum.conf'] = """ diff --git a/etc/mock/site-defaults.cfg b/etc/mock/site-defaults.cfg index 3e432b5..6da9290 100644 --- a/etc/mock/site-defaults.cfg +++ b/etc/mock/site-defaults.cfg @@ -99,4 +99,4 @@ # config_opts['files']['path/name/no/leading/slash'] = "put file contents here." # config_opts['chrootuid'] = os.getuid() # config_opts['chrootgid'] = grp.getgrnam("mock")[2] -# config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -N %(user)s' # Fedora/RedHat +# config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' # Fedora/RedHat diff --git a/py/mock.py b/py/mock.py index 9c3a4fe..eea493c 100755 --- a/py/mock.py +++ b/py/mock.py @@ -264,7 +264,7 @@ def setup_default_config_opts(config_opts, unprivUid): # dependent on guest OS config_opts['useradd'] = \ - '/usr/sbin/useradd -o -m -u %(uid)s -g %(gid)s -d %(home)s -N %(user)s' + '/usr/sbin/useradd -o -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' config_opts['use_host_resolv'] = True config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build' config_opts['target_arch'] = 'i386' -- cgit