Koji/ServerBootstrap

From FedoraProject

Jump to: navigation, search

Bootstrapping a new Koji build environment

These are the steps involved in populating a new Koji server with packages so that it can be used for building. This assumes that the Koji hub is up, appropriate authentication methods have been configured, the Koji repo administration daemon (kojira) is properly configured and running, and at least one Koji builder (kojid) is properly configured and running. All koji cli commands assume that the user is a Koji admin. If you need help with these tasks, see the ServerHowTo .

$ koji import /path/to/package1.src.rpm /path/to/package2.src.rpm ...

If the files are on the same volume as /mnt/koji, you can use koji import --link, which hardlinks the files into place, avoiding the need to upload them to the hub and very significantly increasing import speed. When using --link, you must run as root. It is highly recommended that you use --link.

$ koji add-tag dist-foo

You can use koji list-untagged to get a list of all of the packages you just imported.

$ koji list-pkgs --quiet | xargs koji add-pkg --owner <kojiuser> dist-foo
$ koji list-untagged | xargs -n 1 koji call tagBuildBypass dist-foo

We call the tagBuildBypass method instead of using koji tag-pkg because it doesn't require the builders to process tagBuild tasks one at a time, but does the tagging directly. This will save a significant amount of time, especially when tagging a large number of packages.

$ koji add-tag --parent dist-foo --arches "i386 x86_64 ppc ppc64" dist-foo-build
$ koji add-target dist-foo dist-foo-build
$ koji add-group dist-foo-build build

You can find out what the current build group for Fedora is by running koji list-groups dist-f9-build against the Fedora Koji instance. This is probably a good starting point for your minimal buildroot.

$ koji add-group-pkg dist-foo-build build pkg1
$ koji add-group-pkg dist-foo-build build pkg2