Red Hat Bugzilla – Bug 374141
Could not find required config file: /etc/mock/default.cfg
Last modified: 2013-01-09 20:43:26 EST
Description of problem:
mock build RPM/SRPMS/qct-1.4-2.fc8.src.rpm
INFO: mock suid wrapper version 0.8.4
ERROR: Could not find required config file: /etc/mock/default.cfg
ERROR: Did you forget to specify the chroot to use with '-r'?
There is no default.cfg, but there IS a defaults.cfg.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
/etc/mock/defaults.cfg == site-wide default configuration option setup. Set
things like default mock root dir, caching options, etc.
/etc/mock/default.cfg == default chroot if no '-r' option specified
Yes, these are stupid names, but we are stuck with them for now because
otherwise it breaks people's existing configs, and I dont want to have to listen
to certain people complain...
If you want to run mock without the '-r' option, make a symlink to the config
you want to use.
Per the docs:
$ man mock
... cut ...
... cut ...
The content of a chroot is specified by the configuration specified
with the -r option. A default configuration file is specified in
/etc/mock/default.cfg, which is usually a symlink to one of the installed
... cut ...
Uses specified chroot configuration as defined in
/etc/mock/<chroot>.cfg If none specified, uses the chroot linked to by
$ head -n 6 etc/defaults.cfg | tail -n3
# 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.
(In reply to comment #1)
1) Last times I installed mock it worked out of the box. Now it doesn't.
Either I did something wrong here, or something needs some more explanation.
2) This is a .fc8 package, but there is no f8 config. There are fedora-7 and
fedora-devel, but not fedora-8.
F8 configs are in updates-testing (mock 0.8.7). Will be in updates next week.
Mock 0.7 had some specfile magic that made symlinks on install, but 1) the spec
was mostly re-written and this feature was dropped.
This also had the effect of silently using the wrong config if user didnt pay
attention. I'd rather let which config is the default be a site-local policy via
admin-created local symlink.