From e99adc9492ab1087018c630f68f75ebe79f56a76 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 22 Dec 2009 12:33:06 -0800 Subject: Use -N flag with useradd, but not in EPEL #495734 EL doesn't support -N, but uses -n instead. So use -N by default, but in the EL configs revert back to -n. --- 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 +- 7 files changed, 7 insertions(+), 1 deletion(-) (limited to 'etc/mock') diff --git a/etc/mock/epel-4-i386.cfg b/etc/mock/epel-4-i386.cfg index a2b8a7c..04f6d1e 100644 --- a/etc/mock/epel-4-i386.cfg +++ b/etc/mock/epel-4-i386.cfg @@ -1,6 +1,7 @@ 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 88f75b9..88e5fce 100644 --- a/etc/mock/epel-4-ppc.cfg +++ b/etc/mock/epel-4-ppc.cfg @@ -1,6 +1,7 @@ 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 354c0da..39d84c0 100644 --- a/etc/mock/epel-4-x86_64.cfg +++ b/etc/mock/epel-4-x86_64.cfg @@ -1,6 +1,7 @@ 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 58551e3..061759a 100644 --- a/etc/mock/epel-5-i386.cfg +++ b/etc/mock/epel-5-i386.cfg @@ -1,6 +1,7 @@ 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 5c25011..fda17a9 100644 --- a/etc/mock/epel-5-ppc.cfg +++ b/etc/mock/epel-5-ppc.cfg @@ -1,6 +1,7 @@ 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 199fcfe..966546d 100644 --- a/etc/mock/epel-5-x86_64.cfg +++ b/etc/mock/epel-5-x86_64.cfg @@ -1,6 +1,7 @@ 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 6da9290..3e432b5 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 -- cgit