Mock fails with the ERROR below when the mock config directory doesn't contain a site-defaults.cfg file. The tool does, however, succeed when the file exists but is empty. Requiring that an empty file exist unnecessarily complicates Mock setup and makes it harder to use than it needs to be. The command should treat a missing site-defaults.cfg the same as an empty file. The following steps show the Mock failure and the steps required to make it work with a non-default config directory. (Copying the logging.ini file is also inconvenient. It would make it easier if Mock fell back to the same or some other reasonable defaults when the logging.ini file didn't exist.) $ (dir=$PWD/mock-config; mkdir -p $dir && cp /etc/mock/logging.ini $dir/logging.ini && rhpkg mock-config > $dir/$(basename $PWD).cfg) ... $ mock --configdir=$PWD/mock-config --no-cleanup-after -r patchutils --resultdir mock-results --rebuild $(rhpkg srpm | sed -n "s/^ *Wrote: *\(.*\)/\1/p") ERROR: Could not find required config file: /home/msebor/rhel/patchutils/mock-config/site-defaults.cfg ERROR: If you're trying to specify a path, include the .cfg extension, e.g. -r ./target.cfg ... $ : > mock-config/site-defaults.cfgpatchutils$ mock --configdir=$PWD/mock-config --no-cleanup-after -r patchutils --resultdir mock-results --rebuild $(rhpkg srpm | sed -n "s/^ *Wrote: *\(.*\)/\1/p") INFO: mock.py version 1.2.4 starting (python version = 2.7.8)... INFO: Start: init plugins INFO: selinux enabled INFO: Finish: init plugins INFO: Start: run INFO: Start(/home/msebor/rhel/patchutils/patchutils-0.3.3-4.el7.src.rpm) Config(rhel-7.1-candidate-x86_64) INFO: Start: clean chroot ...
Created attachment 986401 [details] patch 1: no error if site-default.cfg does not exist
Created attachment 986402 [details] use default ligging cfg if non-default does not exist
Commited as: * 8c72ad5 use default logging.ini if non-default does not exist [RHBZ#1187727] * 098b901 simplify condition * d91c76f no error when site-default.cfg does not exist [RHBZ#1187727] Thanks for contribution.
mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6
mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7
mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20
mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21
Package mock-1.2.6-1.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.2.6-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0617/mock-1.2.6-1.el7 then log in and leave karma (feedback).
mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.6-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.6-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.