Building SCL packages with mock
bkabrda at redhat.com
Thu Nov 8 06:55:07 UTC 2012
----- Original Message -----
> Eventually, I'd like to build Perl 5.16.x SCL packages with mock
> and/or koji.
> I've built several from the command line by just doing 'rpmbuild -ba
> --define "scl perl514"' but I'm not sure how to do that in a 'mock'
For this, you should have a modified chroot in this way:
1) Start with copy of the chroot you want to use, e.g. epel-6-x86_64.
2) Rename config['root'] to something different, so that it doesn't collide with with the above. I usually use the name of the collection for this.
3) The most important line in the mock config file is
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
which (given your collection is named perl514) you should change to something like
config_opts['chroot_setup_cmd'] = 'install @build scl-utils-build perl514-build'
So all your packages will have a minimal buildroot that will contain the standard setup + scl-utils-build + perl514-build - this is a subpackage of your SCL metapackage (as described in ), which defines the %scl macro (note that the @build can be named differently on different releases of fedora/epel).
4) I also usually add a local repo with the packages that I've already built in the collection. In your case, that would mean adding something like this to mock cfg repos:
5) After each successful build in the collection, you can copy the built RPMs into the local repo and run createrepo to refresh it.
6) As a first package, you must build the metapackage, so that it can be installed into the minimal buildroot for all the other builds.
That should be pretty much all, I think. I hope I covered that well :)
> Doran L. Barton <doran at bluehost.com> - Senior Developer, Bluehost,
> "When passenger of foot heave in sight, tootle the horn. Trumpet him
> melodiously at first, but if he still obstacles your passage then
> him with vigor."
> -- From a brochure of a car rental firm in Tokyo
Bohuslav "Slavek" Kabrda.
More information about the softwarecollections