Bug 374141 - Could not find required config file: /etc/mock/default.cfg
Summary: Could not find required config file: /etc/mock/default.cfg
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-10 00:25 UTC by Neal Becker
Modified: 2013-01-10 01:43 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-10 01:30:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Neal Becker 2007-11-10 00:25:35 UTC
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-10 01:30:17 UTC
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-10 01:45:31 UTC
(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-10 01:57:50 UTC
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.