Koji Usage

From SME Server
Jump to navigationJump to search

This howto is for using the Koozali.org Koji Build Farm (http://koji.koozali.org/koji).


Important.png Note:
Warning: The Koji farm is still in development and locked inside the koozali compound, so you will need to have VPN access until we open it up to the world.


Official Koji documentation can be found at: https://docs.pagure.org/koji/


We are slowliy migrating smeserver to newer build tools, which includes git for source management and koji for managing the builds.

Here we will try to explain how to setup and use Koji within the development process.

Web Interface

The web interface is available to everyone for read-only access to the status of builds the configuration of the farm.

Developers and Admins have additional rights after they login.

<<We'll add a bit more here>>

Developers

As a developer, you will need access to koji to be able to initiate builds, add new packages and tweak settings.

Please ask in the Development Forum or via the #buildsys channel on Rocket Chat.

A koji user will be created and you'll be given a 'bundle' (koji-<userid>-bundle.tgz) that contains your koji config and keys.

Please extract this in your home directory on your development workstation.

 tar -xzf koji-<userid>-bundle.tgz
 ls ~/.koji
 client.crt  config  <userid>_browser_cert.p12  serverca.crt

Install the koji client ('sudo dnf install koji' or equivalent on your flavour of linux)

  • on fedora do
 dnf install koji-tool -y
  • on centos 7 do
 yum install koji -y

Check that you can connect

koji moshimoshi

And you should receive a welcome message, telling you that you've connected.

Build from git

For now, this is the only way we can do a build from git on koji, but in the future this will be incorporated into the 'make build'.

koji build dist-sme<ver>-<target> git+https://src.koozali.org/<org>/<pkg>.git?#<tag>

Where:

  • <ver> = 10,11 or 12
  • <target> = os or contribs
  • <org> = smeserver or smecontribs
  • <pkg> = your package (e.g. smeserver-php)
  • <tag> = version tag to be built (3.0.0)

Example:

koji build dist-sme11-os git+https://src.koozali.org/smeserver/daemontools.git?#0.76-6

Advanced commands

to add a rpm to the base rpm to install in a mock environment :


koji add-group-pkg dist-sme11-os-build build perl-Module-Install


to list rpms in the mock environment:


koji list-groups dist-sme11-os-build build