using mock for chroot builds. WAS [F8/multilib] {, /usr}/{, s}bin64

Clark Williams williams at redhat.com
Tue May 1 21:30:26 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael E Brown wrote:
> On Tue, May 01, 2007 at 01:02:17PM -0400, Bill Nottingham wrote:
>> Michael E Brown (Michael_E_Brown at dell.com) said: 
>>> Today (from memory, since it has been a while since I have done this):
>>>
>>>   $ mock init [ -r mockcfg ]
>>>
>>> This sets up the chroot. Then, you can copy files in and run either
>>> 'mock chroot' or 'mock shell'
>>>
>>> Any suggestions on what you would require to make this process more
>>> painless would be appreciated.
>> I'm not sure. It just seems to compile a random tarball, you
>> either have to have:
>>
>> - a (root) shell open both inside and outside of the chroot
>>
>> or
>>
>> - continually jumping out of the chroot to do mock rpm -Uvh, etc.
>>
>> I don't have any suggestions at the moment - having mock dig
>> through autoconf scripts for dependencies to install doesn't
>> seem right.
> 
> Clark and I (the mock maintainers, though Clark is a bit more active
> than me presently) are on fedora-buildsys list, so if you have
> suggestions, we would definitely like to hear them.
> 
> Off the top of my head, how about something like the following (mockup):
> 
> $ mock init [-r cfg]
> $ mock copyin [-r cfg] mysoft.tar.gz
> $ mock installdeps [-r cfg] --manual_deps foo bar baz
> $ mock shell
> 
> # ./configure
> # make
> 
> Where the last two would be specific to your software. The new commands
> here are 'copyin' to get your tarball into the chroot, and the
> '--manual' option for installdeps.
> 
> --
> Michael
> 

That looks like a good start.

Should we provide a non-root shell option in the chroot or is that just
complicating things too much? Something like:

$ mock -r cfg shell --nonroot

We could automagically set the UID to be mockbuild and start the user
off in the builddir directory.  Probably would want to set the PS1 to
reflect who we are; currently it's set to "mock-chroot> ", but you're
uid=0 and gid is mockbuild.

Dunno whether that would be useful or just more cruft we'd have to lug
along.

Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGN7FyHyuj/+TTEp0RAi9QAJ0SMgIK1naiGgP7Pg2HxSZrdLUj7gCfckXQ
r2J33syevT/dtfa4kQ+MKMQ=
=2V+Y
-----END PGP SIGNATURE-----




More information about the Fedora-maintainers mailing list