Hello again,
I'm trying to understand how Koji does things in order to migrate from our previous home-made build system with svn repositories to Koji. Most of our stuff is in svn as source files, not tarballs, so I'll have to implement a "make sources". I was looking in the Fedora git repositories, but couldn't see how this is actually done. I can see how it _used_ to be done: with a common package containing a Makefile.common. However that doesn't seem to be available any more.
I've found fedora-packager and fedpkg; there was a thread here in 2010 (http://www.mail-archive.com/buildsys@lists.fedoraproject.org/msg00619.html) which suggested that they configured Koji to issue the command to get the sources. However, that's "allowed_scms" in kojid.conf, and I can't see anything in either package now which modifies that.
So basically I'd really like to know the steps that Fedora's Koji goes through to build packages like anaconda - which has an old Makefile, and has no URL to say where to find the sources.
Moray. "To err is human; to purr, feline."
On Fri, 2012-04-20 at 17:34 +0100, Moray Henderson wrote:
I've found fedora-packager and fedpkg; there was a thread here in 2010 (http://www.mail-archive.com/buildsys@lists.fedoraproject.org/msg00619.html) which suggested that they configured Koji to issue the command to get the sources. However, that's "allowed_scms" in kojid.conf, and I can't see anything in either package now which modifies that.
I wouldn't assume that the baseline configuration of the koji package in Fedora necessarily matches how Fedora's koji instance is deployed.
So basically I'd really like to know the steps that Fedora's Koji goes through to build packages like anaconda - which has an old Makefile, and has no URL to say where to find the sources.
Well, the way you do this as a fedpkg user is just run "fedpkg sources", which grabs tarballs from the lookaside server based on the names and md5sums in the 'sources' file in the checked-out package. Which is how "make sources" used to work, too.
From a quick look at the kojid source I'd assume you'd want to override the 'source_cmd' attribute of the SCM to do whatever's appropriate.
- ajax
On 04/20/2012 12:34 PM, Moray Henderson wrote:
So basically I'd really like to know the steps that Fedora's Koji goes through to build packages like anaconda - which has an old Makefile, and has no URL to say where to find the sources.
The allowed_scms option in kojid specifies which scms can be used and how kojid should use them. The format of the option is:
""" a space-separated list of host:repository[:use_common[:source_cmd]] tuples. Incorrectly-formatted tuples will be ignored.
If use_common is not present, kojid will attempt to checkout a common/ directory from the repository. If use_common is set to no, off, false, or 0, it will not attempt to checkout a common/ directory.
source_cmd is a shell command (args separated with commas instead of spaces) to run before building the srpm. It is generally used to retrieve source files from a remote location. If no source_cmd is specified, "make sources" is run by default. """
So... - if you were using an old dist-cvs setup, you'd set use_common to yes and leave source_cmd as the default. - with a dist-git setup, you'd set use_common to no and source_cmd to fedpkg,sources - for simpler setups, you might simply set use_common to no, leave source_cmd as the default, and ensure that each package to be built includes a Makefile with a sources target that does the right thing.
Which of these options is best depends greatly on your situation.
Thanks everyone - your replies have been very helpful.
Moray. "To err is human; to purr, feline."
OM International Limited - Unit B Clifford Court, Cooper Way - Carlisle CA3 0JG - United Kingdom Charity reg no: 1112655 - Company reg no: 5649412 (England and Wales)
buildsys@lists.fedoraproject.org