Bug 400161

Summary: shell doesn't work anymore
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: mockAssignee: David Cantrell <dcantrell>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: mebrown
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.8.15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-10 23:06:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2007-11-26 21:19:22 UTC
Description of problem:

$ mock -r fedora-devel-x86_64 --no-clean shell
INFO: mock.py version 0.8.9 starting...
State Changed: init plugins
State Changed: start
ERROR: Cannot find/open srpm: shell. Error: Unable to open file

$ mock -r fedora-devel-i386 shell
INFO: mock.py version 0.8.9 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
State Changed: clean
ERROR: Cannot find/open srpm: shell. Error: Unable to open file

Also, I really think "--no-clean" should be the default for "shell" (it was
before).  I mostly use it for debugging failed builds.

Version-Release number of selected component (if applicable):
mock-0.8.9-1.fc8

Comment 1 Jesse Keating 2007-11-26 21:30:23 UTC
I can confirm this.  This broke between 0.8.7 and 0.8.9.

Comment 2 Michael E Brown 2007-11-26 21:38:20 UTC
oops. My unit test cases use 'chroot'. I forgot to add 'shell' to the list.

Line 109, mock.py, add 'shell' to the list. I've checked this in for 0.8.10.


Comment 3 Orion Poplawski 2007-11-26 21:47:24 UTC
Having trouble with chroot too:

$ mock -r fedora-devel-x86_64 --no-clean chroot
INFO: mock.py version 0.8.9 starting...
State Changed: init plugins
State Changed: start
State Changed: init
State Changed: lock buildroot
State Changed: enabled yum cache, cleaning yum metadata
State Changed: enabled root cache
State Changed: running yum
ERROR: Error performing yum command: /usr/bin/yum --installroot
/var/lib/mock/fedora-development-x86_64/root update
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/mock/backend.py", line 448, in _yum
    output = mock.util.do(cmd, returnOutput=returnOutput,
personality=self.personality)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.5/site-packages/mock/trace_decorator.py", line 24, in trace
    result = f(*args, **kw)
  File "/usr/lib/python2.5/site-packages/mock/util.py", line 260, in do
    raise mock.exception.Error, "Command(%s) failed. See logs for output." % command
Error: Command(/usr/bin/yum --installroot
/var/lib/mock/fedora-development-x86_64/root update) failed. See logs for output.
ERROR: Error performing yum command: /usr/bin/yum --installroot
/var/lib/mock/fedora-development-x86_64/root update


$ mock -r fedora-devel-i386 chroot
INFO: mock.py version 0.8.9 starting...
State Changed: init plugins
State Changed: start
State Changed: init
State Changed: lock buildroot
State Changed: enabled yum cache, cleaning yum metadata
State Changed: enabled root cache
State Changed: running yum
ERROR: Could not find useradd in chroot, maybe the install failed?

Comment 4 Orion Poplawski 2007-11-26 21:58:47 UTC
Okay, first was an issue with automount and mock.  Mounted the needed directory
and it worked.

Second shows why --no-clean should be the default I think.

Next -  are builds no longer run in a login shell?  It appears that $QTDIR is
not getting set by /etc/profile.d/qt.sh for builds.

Comment 5 Michael E Brown 2007-11-27 00:54:51 UTC
0.8.10 is in rawhide and is set to be pushed to F7/F8 testing repos shortly to
fix the 'shell' problem.

For the qtdir problem, that would be a separate issue, but the current answer is
that we exec rpmbuild directly, so no, no login shell.