When you create a mock chroot, all the packages you want to install in it need to be available from a yum repostory. I've got the situation where I'm trying to bootstrap a bit, so, I'd like to be able to:
- build a chroot - build a small set of packages - add those packages to the chroot to be used by future builds
Off the top of my head, possibilities include:
(1) creating a base chroot, building the rpms, add the new packages to a yum repo, creating a second chroot that contains the new packages
(2) creating the base chroot, building the rpms, editing the buildroots.xml file and adding in the new packages, updating the yum repo, then run "mock init" again (hoping that the new packages would get added to the chroot)
Are there better ways of doing this?
Thanks.
On Feb 27, 2006, at 6:14 PM, David Smith wrote:
When you create a mock chroot, all the packages you want to install in it need to be available from a yum repostory. I've got the situation where I'm trying to bootstrap a bit, so, I'd like to be able to:
- build a chroot
- build a small set of packages
- add those packages to the chroot to be used by future builds
Off the top of my head, possibilities include:
(1) creating a base chroot, building the rpms, add the new packages to a yum repo, creating a second chroot that contains the new packages
(2) creating the base chroot, building the rpms, editing the buildroots.xml file and adding in the new packages, updating the yum repo, then run "mock init" again (hoping that the new packages would get added to the chroot)
Are there better ways of doing this?
Thanks.
David, I may be missing something, but I think the easiest way would be to create a local directory on your build machine which contains the packages you want included. Run 'createrepo' there, and then reference that directory (now a yum repo) using file:///path/to/rpms in your /etc/mock/whatever.conf file(s). This way you have a local yum repo you can add your "special" packages to. There's no need to edit the buildroots.xml file unless you want these to *always* be installed - otherwise they'll just get pulled in as needed for dependencies.
-Jeff
On Mon, 2006-02-27 at 16:14 -0600, David Smith wrote:
Are there better ways of doing this?
Since mock uses a fresh chroot each time, you should make the packages you build available in a localized yum repo using createrepo. Then when you build the next package, your build root creation can pull from this local yum repo to satisfy the BuildRequires of your given package.
buildsys@lists.fedoraproject.org