Difference between revisions of "Koji Usage"
m (→Structure) |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This howto is for using the Koozali.org Koji Build Farm (http://koji.koozali.org/koji). | This howto is for using the Koozali.org Koji Build Farm (http://koji.koozali.org/koji). | ||
− | {{Note box| | + | {{Note box|Koji is now publicly available for read-only, but you are advised to get a login in order that you can fully utilise it. |
+ | |||
+ | Developers should be following the guide at [[Howto interact with gitea and koji to do an rpm build for SME11]]. | ||
+ | |||
+ | This wiki page is for interacting directly with koji.}} | ||
Official Koji documentation can be found at: https://docs.pagure.org/koji/ | Official Koji documentation can be found at: https://docs.pagure.org/koji/ | ||
+ | We are slowly 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 and interact directly with Koji. | ||
− | + | Please read [[Howto interact with gitea and koji to do an rpm build for SME11|here]] for the normal development process. | |
− | + | This page is primarily focussed on understanding the koji backend and how to interact with it directly. | |
== Web Interface == | == Web Interface == | ||
Line 31: | Line 37: | ||
Install the koji client ('sudo dnf install koji' or equivalent on your flavour of linux) | Install the koji client ('sudo dnf install koji' or equivalent on your flavour of linux) | ||
− | * on fedora do | + | * on fedora do |
dnf install koji-tool -y | dnf install koji-tool -y | ||
* on centos 7 do | * on centos 7 do | ||
Line 52: | Line 58: | ||
=== Build from git === | === Build from git === | ||
− | + | Building of rpms is usually done via a make build within your dev environment, but you can trigger a build via the koji client <syntaxhighlight lang="bash"> | |
koji build sme11-test git+https://src.koozali.org/smeserver/<pkg>.git?#<tag> | koji build sme11-test git+https://src.koozali.org/smeserver/<pkg>.git?#<tag> | ||
koji build sme11-contribs-test git+https://src.koozali.org/smecontribs/<pkg>.git?#<tag> | koji build sme11-contribs-test git+https://src.koozali.org/smecontribs/<pkg>.git?#<tag> | ||
Line 58: | Line 64: | ||
* <pkg> = your package (e.g. smeserver-php) | * <pkg> = your package (e.g. smeserver-php) | ||
− | * <tag> = version tag to be built (3_0-1) | + | * <tag> = git version tag to be built (3_0-1.el8.sme) |
Example:<syntaxhighlight lang="bash"> | Example:<syntaxhighlight lang="bash"> | ||
− | koji build | + | koji build smeserver11 git+https://src.koozali.org/smeserver/smeserver-php.git?#3_0-1.el8.sme |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 67: | Line 73: | ||
We have created build targets that align with the standard development practice of building into test, then migrating that build through the different environments | We have created build targets that align with the standard development practice of building into test, then migrating that build through the different environments | ||
− | * smeserver/<pkg>-<tag> -> | + | * smeserver/<pkg>-<tag> -> smeserver11 (smeserver11-test) -> smeserver11 |
− | * smecontribs/<pkg>-<tag> -> | + | * smecontribs/<pkg>-<tag> -> smecontribs11 (smecontribs11-testing) -> smecontribs11 |
− | + | There is 1 build tag for each of smeserver and smecontribs to allow for the use of different external repos and settings. | |
+ | |||
The repos align with the repos available to dnf in smeserver: | The repos align with the repos available to dnf in smeserver: | ||
− | * smeos ( | + | * smeos (smeserver11) |
− | * smetest ( | + | * smetest (smeserver11-test) |
− | * | + | * smecontribs (smecontribs11) |
− | + | * smecontribs-test (smecontribs11-testing) | |
− | * smecontribs-test ( | ||
− | |||
− | |||
==Advanced commands == | ==Advanced commands == | ||
− | to add a rpm to the | + | If adding a new package, it needs to be added to the parent tag for that Stream/Release:<syntaxhighlight lang="bash"> |
+ | koji add-pkg --owner kojiadmin smecontribs11 smeserver-my-new-contrib | ||
+ | </syntaxhighlight>to add a rpm to the build group to install in a mock environment : | ||
koji add-group-pkg dist-sme11-build build perl-Module-Install | koji add-group-pkg dist-sme11-build build perl-Module-Install | ||
Line 94: | Line 100: | ||
koji add-pkg --owner jpp dist-sme12-os smeserver-manager-jsquery | koji add-pkg --owner jpp dist-sme12-os smeserver-manager-jsquery | ||
− | to | + | to tag and existing build against a new tag (e.g. copy from testing to os) |
− | koji | + | koji tag-build dist-sme11-os smeserver-update-11.0.0-7.el8.sme |
− | koji dist-repo dist-sme11 | + | |
− | koji dist-repo dist-sme11-os | + | to manually populate an external repo for use by dnf (external repos should be automatically generated when a new build is attached to that tag) |
− | koji dist-repo | + | koji dist-repo dist-sme11-testing <gpg key> |
− | koji dist-repo | + | koji dist-repo dist-sme11-os <gpg key> |
− | + | koji dist-repo smecontribs11-testing <gpg key> | |
− | + | koji dist-repo smecontribs11 <gpg key> | |
+ | |||
+ | |||
+ | [[Category:Developer]] |
Latest revision as of 01:24, 1 October 2024
This howto is for using the Koozali.org Koji Build Farm (http://koji.koozali.org/koji).
Official Koji documentation can be found at: https://docs.pagure.org/koji/
We are slowly 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 and interact directly with Koji.
Please read here for the normal development process.
This page is primarily focussed on understanding the koji backend and how to interact with it directly.
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
- On Rocky 8
#!/bin/sh dnf -y install epel-release dnf -y install policycoreutils-python-utils dnf -y install setools-console dnf -y install rsyslog dnf -y install setroubleshoot-server dnf -y install koji
Check that you can connect
koji moshimoshi
And you should receive a welcome message, telling you that you've connected.
Build from git
Building of rpms is usually done via a make build within your dev environment, but you can trigger a build via the koji client
koji build sme11-test git+https://src.koozali.org/smeserver/<pkg>.git?#<tag>
koji build sme11-contribs-test git+https://src.koozali.org/smecontribs/<pkg>.git?#<tag>
Where:
- <pkg> = your package (e.g. smeserver-php)
- <tag> = git version tag to be built (3_0-1.el8.sme)
Example:
koji build smeserver11 git+https://src.koozali.org/smeserver/smeserver-php.git?#3_0-1.el8.sme
Structure
We have created build targets that align with the standard development practice of building into test, then migrating that build through the different environments
- smeserver/<pkg>-<tag> -> smeserver11 (smeserver11-test) -> smeserver11
- smecontribs/<pkg>-<tag> -> smecontribs11 (smecontribs11-testing) -> smecontribs11
There is 1 build tag for each of smeserver and smecontribs to allow for the use of different external repos and settings.
The repos align with the repos available to dnf in smeserver:
- smeos (smeserver11)
- smetest (smeserver11-test)
- smecontribs (smecontribs11)
- smecontribs-test (smecontribs11-testing)
Advanced commands
If adding a new package, it needs to be added to the parent tag for that Stream/Release:
koji add-pkg --owner kojiadmin smecontribs11 smeserver-my-new-contrib
to add a rpm to the build group to install in a mock environment :
koji add-group-pkg dist-sme11-build build perl-Module-Install
to list rpms in the mock environment:
koji list-groups dist-sme11-build build
to add a package to build list
koji add-pkg --owner jpp dist-sme10-os smeserver-manager-jsquery koji add-pkg --owner jpp dist-sme11-os smeserver-manager-jsquery koji add-pkg --owner jpp dist-sme12-os smeserver-manager-jsquery
to tag and existing build against a new tag (e.g. copy from testing to os)
koji tag-build dist-sme11-os smeserver-update-11.0.0-7.el8.sme
to manually populate an external repo for use by dnf (external repos should be automatically generated when a new build is attached to that tag)
koji dist-repo dist-sme11-testing <gpg key> koji dist-repo dist-sme11-os <gpg key> koji dist-repo smecontribs11-testing <gpg key> koji dist-repo smecontribs11 <gpg key>