Line 4: |
Line 4: |
| | | |
| Official Koji documentation can be found at: https://docs.pagure.org/koji/ | | Official Koji documentation can be found at: https://docs.pagure.org/koji/ |
| + | |
| | | |
| | | |
Line 18: |
Line 19: |
| | | |
| == Developers == | | == Developers == |
− | As a developer, you will need access to koji to be able to initiate builds . | + | 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 [https://forums.koozali.org/index.php/board,32.0.html Development Forum] or via the #buildsys channel on Rocket Chat. | | Please ask in the [https://forums.koozali.org/index.php/board,32.0.html Development Forum] or via the #buildsys channel on Rocket Chat. |
Line 25: |
Line 26: |
| | | |
| Please extract this in your home directory on your development workstation. | | 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) | | 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<syntaxhighlight lang="shell"> |
| + | #!/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 |
| + | |
| + | </syntaxhighlight> |
| | | |
| Check that you can connect<syntaxhighlight lang="bash"> | | Check that you can connect<syntaxhighlight lang="bash"> |
| koji moshimoshi | | koji moshimoshi |
| </syntaxhighlight>And you should receive a welcome message, telling you that you've connected. | | </syntaxhighlight>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'. <syntaxhighlight lang="bash"> |
| + | 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> |
| + | </syntaxhighlight>Where: |
| + | |
| + | * <pkg> = your package (e.g. smeserver-php) |
| + | * <tag> = version tag to be built (3_0-1) |
| + | |
| + | Example:<syntaxhighlight lang="bash"> |
| + | koji build sme11-test git+https://src.koozali.org/smeserver/smeserver-php.git?#3_0-1 |
| + | </syntaxhighlight> |
| + | |
| + | == 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> -> sme11-test (dist-sme11-os-testing) -> dist-sme11-updates-testing -> dist-sme11-updates |
| + | * smecontribs/<pkg>-<tag> -> sme11-contribs-test (dist-sme11-contribs-testing) -> dist-sme11-contribs |
| + | {{Note box|There is a target of sme11-os that will build into dist-sme11-os, but this should ONLY be used for tthe initial load of the smeos repository}} |
| + | There is ONLY 1 build tag for sme11 which is used by all targets (dist-sme11-build) as all sme11 builds use the same external repos and settings. |
| + | |
| + | |
| + | The repos align with the repos available to dnf in smeserver: |
| + | |
| + | * smeos (dist-sme11-os) |
| + | * smetest (dist-sme11-os-test) |
| + | * smeupdates-test (dist-sme11-updates-testing) |
| + | * smeupdates (dist-sme11-updates) |
| + | * smecontribs-test (dist-sme11-contribs-testing) |
| + | * smecontribs (dist-sme11-contribs) |
| + | *smeaddons (dist-sme11-addons) |
| + | |
| + | ==Advanced commands == |
| + | to add a rpm to the base rpm 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 updates-testing-) |
| + | koji tag-build dist-sme11-updates-testing smeserver-updaye-11.0.0-7.el8.sme |
| + | |
| + | to populate an external repo for use by dnf |
| + | koji dist-repo dist-sme11-testing --allow-missing-signatures |
| + | koji dist-repo dist-sme11-updates-testing --allow-missing-signatures |
| + | koji dist-repo dist-sme11-os --allow-missing-signatures |
| + | koji dist-repo dist-sme11-contribs-testing --allow-missing-signatures |
| + | koji dist-repo dist-sme11-contribs --allow-missing-signatures |
| + | |
| + | [[Category:Developer]] |