Description of problem: doing a fedora-review -rn <srpm> Version-Release number of selected component: mock-1.1.41-1.fc20 Additional info: reporter: libreport-2.2.3 cmdline: /usr/bin/python -tt /usr/sbin/mock --no-cleanup-after --no-clean --resultdir=/home/build/rpmbuild/dreamchess/results --quiet --shell 'rpm --eval \\\"%{_libdir}\\\"' dso_list: python-libs-2.7.5-13.fc20.x86_64 executable: /usr/sbin/mock kernel: 3.16.2-200.fc20.x86_64 type: Python uid: 0 Truncated backtrace: subprocess.py:1327:_execute_child:OSError: [Errno 2] No such file or directory Traceback (most recent call last): File "/usr/sbin/mock", line 306, in <module> def do_buildsrpm(config_opts, chroot, options, args): File "/usr/sbin/mock", line 570, in main sys.exit(chroot.shell(options, cmd)) File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 815, in shell cmd=cmd) File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 428, in doshell return subprocess.call(cmdstr, preexec_fn=preexec, env=environ, shell=True) File "/usr/lib64/python2.7/subprocess.py", line 524, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Local variables in innermost frame: errread: None c2pread: None gc_was_enabled: True errwrite: None shell: True errpipe_write: 6 to_close: set([]) close_fds: False self: <subprocess.Popen object at 0xcf1b10> env: {'LANG': 'de_DE.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} cwd: None child_exception: OSError(2, 'No such file or directory') args: ['/bin/sh', '-c', '/bin/bash -c "rpm --eval \\"%{_libdir}\\""'] executable: '/bin/sh' c2pwrite: None data: 'cexceptions\nOSError\np0\n(I2\nS\'No such file or directory\'\np1\ntp2\nRp3\n(dp4\nS\'child_traceback\'\np5\nS\'Traceback (most recent call last):\\n File "/usr/lib64/python2.7/subprocess.py", line 1284, in _execute_child\\n File "/usr/lib64/python2.7/os.py", line 353, in execvpe\\n File "/usr/lib64/python2.7/os.py", line 368, in _execvpe\\nOSError: [Errno 2] No such file or directory\\n\'\np6\nsb.' creationflags: 0 errpipe_read: 5 preexec_fn: <mockbuild.util.ChildPreExec object at 0xcf1ad0> p2cread: None startupinfo: None p2cwrite: None _close_in_parent: <function _close_in_parent at 0xc78e60> universal_newlines: False
Created attachment 937291 [details] File: backtrace
Created attachment 937292 [details] File: environ
Created attachment 937293 [details] fedora-review.log with mock crash fedora-review -rn <package>.srpm
Can you reproduce it with mock-1.2 that's available in rawhide (installs fine on f20)? It has additional mechanisms to reinitialize incorrectly inited buildroot
Here is repo for Fedora20 as well: https://copr.fedoraproject.org/coprs/msuchy/mock-dev/
I've faced the same issue. I installed mock-1.2 from the aforementioned copr and while running it produces the error as following: ERROR: Command failed. See logs for output. # /usr/bin/yum --installroot /var/lib/mock/fedora-20-x86_64/root --releasever 20 install @buildsys-build INFO: Re-initializing mock build root INFO: Init command returned error code 1 ERROR: Command failed. See logs for output. # /usr/bin/yum --installroot /var/lib/mock/fedora-20-x86_64/root --releasever 20 install @buildsys-build ERROR: Exception down the road...(logs in /home/D.Wrobel/.cache/fedora-review.log) excerpt from fedora-review.log: Invalid GPG Key from file:///etc/pki/mock/RPM-GPG-KEY-fedora-20-primary: No key found in given key data None Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/FedoraReview/mock.py", line 491, in init self._rpm_eval('%{_libdir}') File "/usr/lib/python2.7/site-packages/FedoraReview/mock.py", line 259, in _rpm_eval return check_output(cmd).decode('utf-8').strip() File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command '['mock', '--no-cleanup-after', '--no-clean', '--resultdir=/home/D.Wrobel/tmp/gnutls/gnutls/results', '--quiet', '--shell', 'rpm --eval \\"%{_libdir}\\"']' returned non-zero exit status 1 10-21 10:04 root INFO Init command returned error code 1 10-21 10:04 root DEBUG Url download completed: 13.581 10-21 10:04 root DEBUG Exception down the road... Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 232, in run self._do_run(outfile) File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 222, in _do_run self._do_report(outfile) File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 96, in _do_report self._run_checks(self.bug.spec_file, self.bug.srpm_file, outfile) File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 105, in _run_checks self.checks = Checks(spec, srpm) File "/usr/lib/python2.7/site-packages/FedoraReview/checks.py", line 271, in __init__ self.spec = SpecFile(spec_file, self.flags) File "/usr/lib/python2.7/site-packages/FedoraReview/spec_file.py", line 91, in __init__ update_macros() File "/usr/lib/python2.7/site-packages/FedoraReview/spec_file.py", line 65, in update_macros expanded = Mock.get_macro(macro, self, flags) File "/usr/lib/python2.7/site-packages/FedoraReview/mock.py", line 346, in get_macro self._macros = self._get_default_macros() File "/usr/lib/python2.7/site-packages/FedoraReview/mock.py", line 134, in _get_default_macros values = self._rpm_eval(tags).split() File "/usr/lib/python2.7/site-packages/FedoraReview/mock.py", line 259, in _rpm_eval return check_output(cmd).decode('utf-8').strip() File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output raise CalledProcessError(retcode, cmd, output=output) However using mock-1.2 directly seems to work properly.
#6 looks to me as just some networking problem during initialization of chroot using yum. And yes, fedora-review should handle that more gracefully. (filed as bug 1155032)
The reproducer from #0 mock -r fedora-20-x86_64 --no-cleanup-after --no-clean --resultdir=/tmp --quiet --shell 'rpm --eval \\\"%{_libdir}\\\"' works for me (with mock-1.2). Therefore I hope this is fixed in mock-1.2. If my hope is false, then feel free to reopen this bug.
*** Bug 1152484 has been marked as a duplicate of this bug. ***