summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/defaults.cfg27
-rw-r--r--mock.py10
2 files changed, 12 insertions, 25 deletions
diff --git a/etc/defaults.cfg b/etc/defaults.cfg
index f9a57ed..5f8ff22 100644
--- a/etc/defaults.cfg
+++ b/etc/defaults.cfg
@@ -1,26 +1,9 @@
# mock defaults
#
-# Define default values here.
-# These values are overwritten in the /etc/mock/CHROOT.cfg files.
-#
-# Example:
+# This config file is for site-specific default values that apply across all
+# configurations. Options specified in this config file can be overridden in
+# the individual mock config files.
#
+# Entries in this file follow the same format as other mock config files.
# config_opts['foo'] = bar
-config_opts['basedir'] = '/var/lib/mock/'
-config_opts['chrootuser'] = 'mockbuild'
-config_opts['chrootgroup'] = 'mockbuild'
-config_opts['chroothome'] = '/builddir'
-config_opts['clean'] = True
-
-import grp
-config_opts['chrootuid'] = os.geteuid()
-config_opts['chrootgid'] = grp.getgrnam("mock")[2]
-
-# copy the host resolv.conf to the chroot
-config_opts['use_host_resolv'] = True
-
-# caching related options
-config_opts['rebuild_cache'] = False
-config_opts['use_cache'] = True
-config_opts['cache_topdir'] = "root-cache"
-config_opts['max_cache_age_days'] = 15
+#
diff --git a/mock.py b/mock.py
index c304c72..d40b4ee 100644
--- a/mock.py
+++ b/mock.py
@@ -877,8 +877,12 @@ def setup_default_config_opts(config_opts):
config_opts['chroot_setup_cmd'] = 'install buildsys-build'
config_opts['chrootuser'] = 'mockbuild'
config_opts['chrootgroup'] = 'mockbuild'
- config_opts['chrootuid'] = 500
- config_opts['chrootgid'] = 500
+ config_opts['use_host_resolv'] = True
+
+ import grp
+ config_opts['chrootuid'] = os.geteuid()
+ config_opts['chrootgid'] = grp.getgrnam("mock")[2]
+
config_opts['chroothome'] = '/builddir'
config_opts['clean'] = True
config_opts['debug'] = False
@@ -897,7 +901,7 @@ def setup_default_config_opts(config_opts):
# caching-related config options
config_opts['rebuild_cache'] = False
- config_opts['use_cache'] = False
+ config_opts['use_cache'] = True
config_opts['pack_cmd'] = "/usr/sbin/mock-helper pack"
config_opts['unpack_cmd'] = "/usr/sbin/mock-helper unpack"
config_opts['cache_ext'] = ".tar.gz"