Description of problem: usermod -a -G mock rpmaker(My account for RPM creating) Then exit root and run command as rpmaker: [rpmaker@fab ~]$ mock shell INFO: mock.py version 1.1.32 starting... Start: init plugins INFO: selinux disabled Finish: init plugins Start: run Start: lock buildroot Start: device setup Finish: device setup Start: shell Finish: shell Traceback (most recent call last): File "/usr/sbin/mock", line 561, in <module> def do_buildsrpm(config_opts, chroot, options, args): File "/usr/sbin/mock", line 822, in main sys.exit(chroot.shell(options, cmd)) File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 765, in shell cmd=cmd) File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 409, in doshell return subprocess.call(cmdstr, preexec_fn=preexec, env=environ, shell=True) File "/usr/lib/python2.7/subprocess.py", line 524, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Version-Release number of selected component: mock-1.1.32-1.fc20 Additional info: cmdline: /usr/bin/python -tt /usr/sbin/mock shell dso_list: python-libs-2.7.4-3.fc20.i686 executable: /usr/sbin/mock kernel: 3.9.0-2.fc20.i686.PAE runlevel: N 5 uid: 0 ureports_counter: 1 Truncated backtrace: subprocess.py:1308:_execute_child:OSError: [Errno 2] No such file or directory Traceback (most recent call last): File "/usr/sbin/mock", line 561, in <module> def do_buildsrpm(config_opts, chroot, options, args): File "/usr/sbin/mock", line 822, in main sys.exit(chroot.shell(options, cmd)) File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 765, in shell cmd=cmd) File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 409, in doshell return subprocess.call(cmdstr, preexec_fn=preexec, env=environ, shell=True) File "/usr/lib/python2.7/subprocess.py", line 524, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1308, 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 executable: '/bin/sh' close_fds: False self: <subprocess.Popen object at 0x95f7f6c> env: {'LANG': 'en_US.utf8', '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 -i -l'] 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/lib/python2.7/subprocess.py", line 1265, in _execute_child\\n File "/usr/lib/python2.7/os.py", line 353, in execvpe\\n File "/usr/lib/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 0x95f7f0c> p2cread: None startupinfo: None p2cwrite: None universal_newlines: False
Created attachment 741754 [details] File: backtrace
Created attachment 741755 [details] File: core_backtrace
Created attachment 741756 [details] File: environ
This bug prevented me from fedora-review.
How did you init the mock environment? With which configuration? I can't reproduce this with mock-1.1.29-1.fc18.noarch on Fedora 18 x86_64.
(In reply to comment #5) > How did you init the mock environment? With which configuration? > I can't reproduce this with mock-1.1.29-1.fc18.noarch on Fedora 18 x86_64. # usermod -a -G mock rpmaker && newgrp mock $ id uid=1000(rpmaker) gid=1000(rpmaker) groups=1000(rpmaker),987(mock)
(In reply to comment #6) > (In reply to comment #5) > > How did you init the mock environment? With which configuration? > > I can't reproduce this with mock-1.1.29-1.fc18.noarch on Fedora 18 x86_64. > > # usermod -a -G mock rpmaker && newgrp mock > > $ id > uid=1000(rpmaker) gid=1000(rpmaker) groups=1000(rpmaker),987(mock) Usually you would run 'mock init' or something like that before you can chroot into the Mock environment.
(In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #5) > > > How did you init the mock environment? With which configuration? > > > I can't reproduce this with mock-1.1.29-1.fc18.noarch on Fedora 18 x86_64. > > > > # usermod -a -G mock rpmaker && newgrp mock > > > > $ id > > uid=1000(rpmaker) gid=1000(rpmaker) groups=1000(rpmaker),987(mock) > > Usually you would run 'mock init' or something like that before you can > chroot into the Mock environment. Fixed by mock init. Thanks Robin!
No, I think now this may be a bug here, seems we need to mock --cleanup and then init again. I think there may have some unfinished jobs and leftovers caused this.
is 'bash' installed on this system? I'm trying to figure out why we get a "no such file or directory" from the subprocess module and one thing that would do it is if /bin/bash doesn't exist.
(In reply to Clark Williams from comment #10) > is 'bash' installed on this system? I'm trying to figure out why we get a > "no such file or directory" from the subprocess module and one thing that > would do it is if /bin/bash doesn't exist. I got this problems a week ago, at that time libselinux has 2 updates and the first one caused many disasters. Roughly summary is that libselinux mess up with different modes. Now selinux is working fine here. This bug can be closed.