From c37a05b4f92423b98c545df11ee5de28469e31cf Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Dec 23 2020 23:08:50 +0000 Subject: [PATCH 1/3] README: preformatted text for tag options --- diff --git a/README.md b/README.md index 47049b5..b08aeeb 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,5 @@ Koji plugin to automatically regenerate distrepos on tag operations It uses the following options on a tag to control behaviour: -- tag2distrepo.enabled: set to "true" to enable automatic distrepos -- tag2distrepo.keys: set to a space-separated list of keys to use for distrepos +- `tag2distrepo.enabled`: set to "true" to enable automatic distrepos +- `tag2distrepo.keys`: set to a space-separated list of keys to use for distrepos From d26f6ede4e0ab1f78d94a4998267ba14955c77be Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Dec 23 2020 23:10:17 +0000 Subject: [PATCH 2/3] README: note arches requirement --- diff --git a/README.md b/README.md index b08aeeb..360a1a5 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,5 @@ It uses the following options on a tag to control behaviour: - `tag2distrepo.enabled`: set to "true" to enable automatic distrepos - `tag2distrepo.keys`: set to a space-separated list of keys to use for distrepos + +The tag must have at least one arch configured on it. From 4c4b72fcc444cebde49f314b605e62882792ff2f Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Dec 23 2020 23:46:28 +0000 Subject: [PATCH 3/3] README: add examples --- diff --git a/README.md b/README.md index 360a1a5..da8fb20 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,46 @@ It uses the following options on a tag to control behaviour: - `tag2distrepo.keys`: set to a space-separated list of keys to use for distrepos The tag must have at least one arch configured on it. + +# Installing plugin on Koji Hub + +1. Copy `tag2distrepo.py` to `/usr/lib/koji-hub-plugins` + +2. Edit the following settings in `/etc/koji-hub/hub.conf` to enable the plugin: + + PluginPath = /usr/lib/koji-hub-plugins + Plugins = tag2distrepo + +3. Reload Apache + + systemctl reload httpd + +# Example usage + +Here is an example of enabling the plugin on an "f33-infra" tag. Create the tag and ensure it has at least one arch and a package list (direct or inherited) so we can tag packages into it. + + koji add-tag f33-infra --arches=x86_64 + kojidev add-pkg --owner kdreyer f33-infra bash + +Set the extra options on the tag so the plugin will generate the repository: + + koji edit-tag -x tag2distrepo.enabled=True -x tag2distrepo.keys=47dd8ef9 f33-infra + +Tag a new build to trigger the plugin: + + kojidev tag f33-infra bash-5.0.17-2.fc33 + +The hub will immediately queue a new distRepo task, using the tagBuild task host as the distRepo task owner. When the distRepo task completes, you can find the new repository under the ``topurl`` for your Koji instance. + +To confirm that the tag has the correct options set, use the `koji taginfo` command: + + koji taginfo f33-infra + Tag: f33-infra [18680] + Arches: x86_64 + Tag options: + tag2distrepo.enabled : 'true' + tag2distrepo.keys : '47dd8ef9' + +To disable the plugin for the same tag: + + koji edit-tag -r tag2distrepo.enabled -r tag2distrepo.keys f33-infra