Mock hangs - why

Al Pacifico adpacifico at yahoo.com
Thu Aug 17 00:21:47 UTC 2006


I have fifteen CPAN packages that I'm packaging as
RPMs for FC5, and one (and just one) of them seems to
hang mock (mock-0.6-4.fc5). All of them check out with
rpmlint and all build using rpmbuild. All SRPMs except
'perl-DBIx-Migration-0.05-1.fc5.src.rpm' build
flawlessly with mock. 

But 'mock perl-DBIx-Migration-0.05-1.fc5.src.rpm'
seems to hang. Adding the --debug option, the screen
output (and root log) of 'mock
perl-DBIx-Migration-0.05-1.fc5.src.rpm' ends with:

Executing /usr/sbin/mock-helper chroot
/var/lib/mock/fedora-5-i386-core/root /sbin/runuser -
root -c "cd /;/sbin/runuser -c 'rpmbuild --rebuild
--target i386 --nodeps
/builddir/build/SRPMS/perl-DBIx-Migration-0.05-1.fc5.src.rpm'
mockbuild"

Then, the command prompt never comes back and when I
interrupt mock with ctrl-C (I've left my machine
running mock with this SRPM for over a day, so I don't
think it's an impatience thing), keystrokes are
retyped at the console after a long delay and many
keystrokes, if at all.

With my other 14 packages, if using the --debug
option, this command is followed by the usual rpmbuild
output at this point, the usual mock 'Results and/or
logs  in: /var/lib/mock/fedora-5-i386-core/result'
message, and then the command prompt.

I solicited advice from Jesse Keating who suggested
trying the mock shell, and what I learned is that 'su
- mockbuild' prompts for a password even though I'm in
the chroot'ed shell as 'root'. What is puzzling is
that this is before trying to rebuild the SRPM, so
it's not that this package alters the behavior of mock
(as I had previously thought).

So, I tried the following (on Jesse's advice):
[build at powell SRPMS]$ mock init
init
clean
prep
This may take a while
ending
done
Finished initializing root
[build at powell SRPMS]$ mock shell
init
mock-chroot> id
uid=0(root) gid=501 groups=101,501
context=user_u:system_r:unconfined_t:s0
mock-chroot> su - mockbuild
Password:
su: incorrect password

This leads me to believe that when I try to rebuild
this SRPM using 'mock
perl-DBIx-Migration-0.05-1.fc5.src.rpm', mock is
prompting me for a password for user 'mockbuild' and
therefore appears to hang.

I have no idea why this does not happen with the other
fourteen SRPM's and just with this one or when using
'mock shell'.

Google offered a tantalizing clue on the
fedora-selinux list (last post in the thread is at
URL:
http://listman.redhat.com/archives/fedora-selinux-list/2006-August/msg00073.html)
which described mock hanging at the same place on
older versions of Fedora Core, related to older
versions of selinux.

Output of rpm -V mock is:
[build at powell SRPMS]$ rpm -V mock
S.5....T. c /etc/mock/fedora-5-i386-core.cfg
[build at powell SRPMS]$

which is exactly what I'd expect, and other packages
build fine under mock:
[build at powell SRPMS]$ mock
perl-Tie-RegexpHash-0.15-1.src.rpm
init
clean
prep
This may take a while
setup
build
ending
done
Results and/or logs in:
/var/lib/mock/fedora-5-i386-core/result

... so mock is not goofed up.

My /etc/mock/default.cfg points to a slightly tweaked
configuration script, which basically just changes the
repositories to local mirrors. I've attached it to
this message.

Couple of questions:
1. Can someone check on his/her box that 'su
mockbuild' from the chroot'ed shell has the same
behavior and post back?
2. Would a mock guru out there have any suggestions?
-al







__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fedora-5-i386-core.cfg
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20060816/513f706b/attachment.ksh>


More information about the Fedora-buildsys-list mailing list