Hello Moray, As Andreas pointed out there are a lot of pieces involved in getting koji to build from git or hg or other revision control systems. I'll try to explain the process from my POV as I've now done it a few times. The project I work on is called GoOSe Linux, it's a similar project to what CentOS is doing. It's possible I'm going into too much information, but I figured it could not hurt to give you the pieces, included the makefile and makefile.common parts.
Essentially, we have all of our rpms separated into two basic components. First, we have a git repository for all of the rpms we wish to build. They can be found at http://github.com/gooselinux/<repo>. These consist of the spec, patch and Makefiles along with a file called sources. This is exactly similar to the method Andreas described in the previous mail. The other part is the lookaside cache which holds the actual upstream source code, usually in a tarball or zip file. These are all of the pieces you need to make koji work properly. Assuming you have your koji system setup and the package tagged, you just have to tell koji to build your package. This can be done simply by running 'koji build gl6-alpha git://github.com/gooselinux/anaconda.git#HEAD' (your koji build line will vary). As other discussions have probably explained, there's a lot of magic that happens here, so I'll go through it step by step. What happens next is that koji sets up a mock build environment to build the source rpm. Once the mock environment is initialized, make sources is called. Koji then takes the url you provided and checks it out into the mock build environment. Then, the lookaside cache is downloaded. You should have a look at our Makefile.common at https://github.com/gooselinux/common. There is also a Makefile for each rpm we have koji build, using anaconda as an example, you can find the Makefile at https://github.com/gooselinux/anaconda. The Makefile downloads the tarball from the lookaside cache and verifies the sha256sum from the 'sources' file in the anaconda git repository previously mentioned. If all of that completes successfully, then mock builds the source rpm. After building the source rpm, koji then creates the mock environment(s) to build the binary rpm(s). The rpm(s) is/are built from the source rpm (SRPM) built in the previous explanation. A couple things you mentioned about kojid.conf and the allowed_scms variable. I've attached a copy of my kojid.conf from one of the builders to help you along your way. Additionally, Andreas' Makefile.common is pretty long and does a lot of things, it's likely got some very nice checking and additional things that the goose Makefile.common doesn't. Ours is rather simple and just does the bare minimum to make things work. I sure hope this explanation and files has helped you on your way to using Koji to build rpms! Cheers, Clint On Fri, Apr 20, 2012 at 1:47 PM, Andreas Mack <[email protected]> wrote: > Here's the Makefile.common that I use. > > Andreas > > >> > > > -- > buildsys mailing list > [email protected] > https://admin.fedoraproject.org/mailman/listinfo/buildsys
kojid.conf
Description: Binary data
-- buildsys mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/buildsys
