koji initialization, docs

Oliver Falk oliver at linux-kernel.at
Thu Sep 20 19:18:36 UTC 2007


Mike McLean schrieb:
> aberoham at gmail.com wrote:
>> Note: kojira must be running and must have repo perms (perm_id 3)
>> 1. import all srpms from the upstream RHEL/Fedora distribution, use
>> --create-build
>>     koji import --create-build [SRPM]
> 
> In Koji, builds are named after the srpm, i.e they use the e:n-v-r of
> the source rpm. Because the SOURCERPM field of the rpm does not include
> an epoch the system cannot be sure it has the correct data for the build
> entry. So, by default, it only creates the build entry when importing an
> srpm.
> 
> The --create-build option causes import to create a build entry for an
> rpm even if its srpm is not in the import batch. It will use the n-v-r
> from the SOURCERPM field, and assume the epoch of the (missing) srpm is
> the same as the epoch of the rpm.
> 
> So --create-build should only be necessary when your import is missing
> srpms. If you're importing Fedora content, I would hope this is not the
> case.
>     
>> 2. imprt all binary rpms (for each arch)
>>     koji import [RPM]
> 
> The current import code in the koji cli will sort the srpms on the
> command line into groups based on their srpm. It will automatically
> import the srpms first and if there are rpms that do not have a
> corresponding srpm or existing build entry (and --create-build is not
> specified) it will warn and exit before taking any action.
> 
> So, you should be able to collapse 1 and 2 into one command.
> 
> I should also point out: if you're importing a large number of [s]rpms
> that are already on the same filesystem as your koji store, then the
> --link option may save you a lot of time. It requires that your (local)
> user have permission to write to the koji work directory. It bypasses
> the upload and instead simply hardlinks the file into the work directory
> (where it would have been uploaded to anyway).
> 
>> 3. create a tag, we'll call it mydist
>>      koji add-tag mydist
>>     koji edit-tag mydist --arches="x86_64 i386"
> 
> add-tag supports a --arches argument to specify the initial arch list.
> 
>> 4. add all untagged builds to that tag
>>     (use koji list-untagged to get the list)
>>     koji tag-pkg [package-n-v-r ... package-n-v-r] --force --nowait
> 
> heh, that's a clever way to generate the n-v-r list during bootstrap :)
> 
>> 9. add each host listed in "koji list-hosts" to createrepo channel
>>     # koji list-hosts
>>     # koji add-host-to-channel <name of builder> createrepo
> 
> We put the repo tasks on a special channel because we found that some
> hosts in our system were particularly slow at it. By leaving those hosts
> out of the createrepo channel, we found we could improve overall repo
> regeneration speed.
> 
> It's also conceivable that you might want to keep some hosts out of the
> createrepo pool simply to reduce load on them.

You might also want to take a look at
http://wiki.linux-kernel.at/index.php/Koji

:-)

Best,
 Oliver




More information about the Fedora-buildsys-list mailing list