Bug 428861 - Could not find required config file: /etc/mock/default.cfg
Could not find required config file: /etc/mock/default.cfg
Status: CLOSED CURRENTRELEASE
Product: Fedora EPEL
Classification: Fedora
Component: mock (Show other bugs)
el5
All Linux
low Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-15 13:43 EST by Jeremy Hinegardner
Modified: 2013-01-09 20:46 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.9.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-17 09:27:10 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 Jeremy Hinegardner 2008-01-15 13:43:44 EST
Description of problem:

mock assumes the default configuration file name is default.cfg but the one
shipping with mock is 'defaults.cfg'.

% mock init
ERROR:root:Could not find required config file: /etc/mock/default.cfg
ERROR:root:  Did you forget to specify the chroot to use with '-r'?

% ls -l /etc/mock/default*
-rw-r--r-- 1 root root 3821 Nov 20 18:04 /etc/mock/defaults.cfg

Version-Release number of selected component (if applicable):

0.8.9


How reproducible:

Every time

Steps to Reproduce:
1. yum install mock
2. mock init  


Additional info:

There may be a more fundamental issue here too.  This is a stock CentOS 5
machine and after moving defaults.cfg to default.cfg I get this anytime I run a
mock command:

INFO: mock.py version 0.8.9 starting...
ERROR: 'root'
Traceback (most recent call last):
  File "/usr/libexec/mock.py", line 360, in ?
    main(retParams)
  File "/usr/libexec/mock.py", line 299, in main
    chroot = mock.backend.Root(config_opts, uidManager)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 24, in trace
    result = f(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 37, in __init__
    self.sharedRootName = config['root']
KeyError: 'root'

This happens no matter what I try to put for --arch
Comment 1 Jeremy Hinegardner 2008-01-15 14:04:39 EST
Okay, fair bit of user error here...

looks like default.cfg is generally supposed to be linked to one of the other
.cfg's in /etc/mock  It isn't by default and that is what was causing my initial
error.

So change this to just have it figure out a default mock configuration to link to.
Comment 2 Michael E Brown 2008-01-17 09:27:10 EST
For the next release of mock, we have renamed defaults.cfg to site-defaults.cfg
to make this situation clearer.

It is still up to the end-user to make a default.cfg symlink, or use the '-r
CFG' option.

This has been pushed as 0.9.6 in rawhide and will be backported to F7/F8 in Feb.

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