Koji/ServerBootstrap

= 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 is properly configured and running, and at least one Koji builder  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.


 * Download all source rpms and binary rpms for the arches you're interested in

$ 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, which hardlinks the files into place, avoiding the need to upload them to the hub and very significantly increasing import speed. When using, you must run as root. It is highly recommended that you use.
 * Import all source rpms


 * Import all binary rpms using the same method as above

$ koji add-tag dist-foo
 * Create a new tag

You can use  to get a list of all of the packages you just imported. $ koji list-pkgs --quiet | xargs koji add-pkg --owner dist-foo $ koji list-untagged | xargs -n 1 koji call tagBuildBypass dist-foo We call the tagBuildBypass method instead of using  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.
 * Tag all of the packages you just imported into the tag you just created

$ koji add-tag --parent dist-foo --arches "i386 x86_64 ppc ppc64" dist-foo-build
 * Create a build tag with the desired arches, and the previously created tag as a parent

$ koji add-target dist-foo dist-foo-build
 * Create a build target that includes the tags you've already created

$ koji add-group dist-foo-build build
 * Create a build group associated with your build tag

You can find out what the current build group for Fedora is by running 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
 * Populate the build group with packages that will be installed into the minimal buildroot


 * Wait for the repo to regenerate, and you should now be able to run a build successfully.