Bug 374141 - Could not find required config file: /etc/mock/default.cfg
Could not find required config file: /etc/mock/default.cfg
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
8
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-09 19:25 EST by Neal Becker
Modified: 2013-01-09 20:43 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-09 20:30:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Neal Becker 2007-11-09 19:25:35 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):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Michael E Brown 2007-11-09 20:30:17 EST
notabug.

/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 ...
DESCRIPTION
       ... 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
configurations.

... cut ...
OPTIONS
       -r CHROOT
              Uses specified chroot configuration as defined in
/etc/mock/<chroot>.cfg If none specified, uses the chroot linked to by
/etc/mock/default.cfg


$ 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.




Comment 2 Neal Becker 2007-11-09 20:45:31 EST
(In reply to comment #1)

2 points:
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.
Comment 3 Michael E Brown 2007-11-09 20:57:50 EST
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.

Note You need to log in before you can comment on or make changes to this bug.