diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-10-24 19:05:43 -0500 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-10-24 19:05:43 -0500 |
commit | c4ff1593ccb1fe53e057d6930a3fba6a8a639a3d (patch) | |
tree | 60ac2efdb967b66594c7dbb89a3a8d775df276ce | |
parent | e529d4bffb7acdb0e044f172dc2f18a33bbd31fb (diff) | |
parent | 1c055b0ca8b9c37e62c8c921c42986689244582d (diff) | |
download | mock-c4ff1593ccb1fe53e057d6930a3fba6a8a639a3d.tar.gz mock-c4ff1593ccb1fe53e057d6930a3fba6a8a639a3d.tar.xz mock-c4ff1593ccb1fe53e057d6930a3fba6a8a639a3d.zip |
Merge branch 'master' of ssh://mebrown@git.fedoraproject.org/git/hosted/mock
-rw-r--r-- | mock.spec.in | 11 | ||||
-rwxr-xr-x | src/mock.py | 1 | ||||
-rw-r--r-- | src/py-libs/backend.py | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/mock.spec.in b/mock.spec.in index 71a3c4a..5713ba1 100644 --- a/mock.spec.in +++ b/mock.spec.in @@ -1,4 +1,4 @@ -# these are all substituted by autoconf +# next four lines substituted by autoconf %define major @RELEASE_MAJOR@ %define minor @RELEASE_MINOR@ %define sub @RELEASE_SUBLEVEL@ @@ -8,6 +8,15 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +# Compat for RHEL3 build +%if %(test "%{dist}" == ".el3" && echo 1 || echo 0) +# needed for RHEL3 build, python-devel doesnt seem to Require: python in +# RHEL3 +BuildRequires: python +# override sitelib because this messes up on x86_64 +%define python_sitelib %{_exec_prefix}/lib/python2.2/site-packages/ +%endif + Summary: Builds packages inside chroots Name: mock Version: %{release_version} diff --git a/src/mock.py b/src/mock.py index 3ec07d6..cca136a 100755 --- a/src/mock.py +++ b/src/mock.py @@ -139,6 +139,7 @@ def setup_default_config_opts(config_opts): } # dependent on guest OS + config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' # Fedora/RedHat config_opts['use_host_resolv'] = True config_opts['chroot_setup_cmd'] = 'install buildsys-build' config_opts['target_arch'] = 'i386' diff --git a/src/py-libs/backend.py b/src/py-libs/backend.py index 0d4f7c3..36de9c4 100644 --- a/src/py-libs/backend.py +++ b/src/py-libs/backend.py @@ -69,6 +69,7 @@ class Root(object): self.more_buildreqs = config['more_buildreqs'] self.cache_topdir = config['cache_topdir'] self.cachedir = os.path.join(self.cache_topdir, self.sharedRootName) + self.useradd = config['useradd'] self.plugins = config['plugins'] self.pluginConf = config['plugin_conf'] @@ -458,7 +459,7 @@ class Root(object): self.doChroot('/usr/sbin/groupdel %(group)s' % dets, raiseExc=False) self.doChroot('/usr/sbin/groupadd -g %(gid)s %(group)s' % dets) - self.doChroot('/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s' % dets) + self.doChroot(self.useradd % dets) self.doChroot("perl -p -i -e 's/^(%s:)!!/$1/;' /etc/passwd" % (self.chrootuser), raiseExc=True) @traceLog(moduleLog) |