Description of problem: Due to some previous operations my system ended up without /etc/resolv.conf. Running mock on such system ends with traceback. This is unexpected, since the rest of the system and apps work just fine! Version-Release number of selected component (if applicable): mock-1.2.7-1.fc21.noarch How reproducible: always Steps to Reproduce: 1. start mock on system without /etc/resolv.conf Actual results: $ fedpkg mockbuild --root fedora-rawhide-x86_64-bind-9.10 Wrote: /home/thozza/devel/fedora/dhcp/dhcp-4.3.2-0.5b1.fc23.2.src.rpm INFO: mock.py version 1.2.7 starting (python version = 2.7.8)... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run INFO: Start(/home/thozza/devel/fedora/dhcp/dhcp-4.3.2-0.5b1.fc23.2.src.rpm) Config(fedora-rawhide-x86_64) Start: clean chroot Finish: clean chroot Start: chroot init INFO: calling preinit hooks INFO: enabled root cache INFO: root cache aged out! cache will be rebuilt INFO: enabled yum cache Start: cleaning yum metadata Finish: cleaning yum metadata INFO: enabled ccache Mock Version: 1.2.7 INFO: Mock Version: 1.2.7 ERROR: Exception(/home/thozza/devel/fedora/dhcp/dhcp-4.3.2-0.5b1.fc23.2.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 5 seconds INFO: Results and/or logs in: /home/thozza/devel/fedora/dhcp/results_dhcp/4.3.2/0.5b1.fc23.2 INFO: Cleaning up build root ('cleanup_on_failure=True') Start: clean chroot Finish: clean chroot ERROR: [Errno 2] No such file or directory: '/etc/resolv.conf' Traceback (most recent call last): File "/usr/sbin/mock", line 829, in <module> main() File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 650, in main run_command(options, args, config_opts, commands, buildroot, state) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 725, in run_command do_rebuild(config_opts, commands, buildroot, args) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 496, in do_rebuild post=post_build, clean=clean) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/sbin/mock", line 440, in rebuild_generic commands.init(prebuild=not config_opts.get('short_circuit')) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 122, in init self.buildroot.initialize(**kwargs) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 80, in initialize self._init(prebuild=prebuild, do_log=do_log) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 135, in _init self._setup_resolver_config() File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 180, in _setup_resolver_config self._copy_config('resolv.conf') File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 84, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 175, in _copy_config shutil.copy2(os.path.join('/etc', filename), etcdir) File "/usr/lib64/python2.7/shutil.py", line 130, in copy2 copyfile(src, dst) File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/etc/resolv.conf' Could not run mockbuild: Command '['mock', '-r', 'fedora-rawhide-x86_64-bind-9.10', '--resultdir', '/home/thozza/devel/fedora/dhcp/results_dhcp/4.3.2/0.5b1.fc23.2', '--rebuild', '/home/thozza/devel/fedora/dhcp/dhcp-4.3.2-0.5b1.fc23.2.src.rpm']' returned non-zero exit status 1 Expected results: No traceback and mock working as normally. Additional info: The rest of the system is able to deal with the non-existence of /etc/resolv.conf. Even firefox is able to resolve names, since there is still DNS resolver running on 127.0.0.1
Fixed in: * 62a4ca4 missing config file should not be fatal [RHBZ#1195749]
mock-1.2.8-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc22
mock-1.2.8-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc21
mock-1.2.8-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc20
mock-1.2.8-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.8-1.el7
mock-1.2.8-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.8-1.el6
Package mock-1.2.8-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.8-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6057/mock-1.2.8-1.el7 then log in and leave karma (feedback).
mock-1.2.8-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.8-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.8-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.10-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.10-1.el7
mock-1.2.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.10-1.el6
mock-1.2.10-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.
mock-1.2.10-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.