From 8fcc085fd41a2f107486e3da824ceb668c0fbedf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 31 2020 12:35:45 +0000 Subject: [PATCH 1/2] Start documenting how to install rpmautospec Signed-off-by: Pierre-Yves Chibon --- diff --git a/doc/index.rst b/doc/index.rst index 9b87d13..50b8230 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -13,6 +13,7 @@ the release and changelog fields in RPM spec files that chose to use it. opting-in autorel autochangelog + install diff --git a/doc/install.rst b/doc/install.rst new file mode 100644 index 0000000..778fdd2 --- /dev/null +++ b/doc/install.rst @@ -0,0 +1,54 @@ +Installing rpmautospec +====================== + +rpmautospec is composed of a few elements: +- a python library (which includes a small CLI tool) +- a koji-hub plugin +- a koji-builders plugin + +Each needs to be correctly installed and configured for rpmautospec to work +properly. + +.. Note: This document relies on the premise that koji-hub runs on python2 +while the builders are running in python3. + + +Installing the python library +----------------------------- + +The python library is handled via a traditional ``setup.py`` file. It can +therefore be installed simply by doing: + +`` python setup.py install``. + +.. warning: that the library is python3 only except for a sub-package: + ``rpmautospec.py2compat``. + + +Installing the koji-hub plugin +------------------------------ + +The koji plugin ``rpmautospec_hub`` is meant to be installed on the koji hub +in: ``/usr/lib/koji-hub-plugins/``. +It is python2 compatible and requires the package ``rpmautospec.py2compat``. + +This plugin also requires a configuration file at: +``/etc/koji-hub/plugins/rpmautospec_hub.conf`` + +An example configuration file can be found in the sources at: +``koji_plugins/rpmautospec_hub.conf`` + +The plugin can then be enabled by adding: ``rpmautospec_hub`` in the line +``Plugins`` in the ``/etc/koji-hub/hub.conf`` configuration file for koji hub. + + +Installing the koji-builders plugin +----------------------------------- + +The koji plugin ``rpmautospec_builder`` is meant to be installed on all the +koji builders running the ``buildSRPMFromSCM`` task in: +``/usr/lib/koji-builder-plugins/``. + +The plugin then can be enabled by adding: ``rpmautospec_builder`` in the line +``plugins`` in the ``/etc/kojid/kojid.conf`` configuration file for the koji +builders. From 349d1e1d47bd55b525cddbf1ce33977de6aa2131 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 31 2020 12:35:45 +0000 Subject: [PATCH 2/2] Rename the logger for the hub plugin Signed-off-by: Pierre-Yves Chibon --- diff --git a/koji_plugins/rpmautospec_hub.py b/koji_plugins/rpmautospec_hub.py index a423e3b..754a1e9 100644 --- a/koji_plugins/rpmautospec_hub.py +++ b/koji_plugins/rpmautospec_hub.py @@ -16,7 +16,7 @@ CONFIG = None def autotag_cb(cb_type, **kwargs): global CONFIG - log = logging.getLogger("koji.plugin.tag_in_pagure") + log = logging.getLogger("koji.plugin.rpmautospec_hub") if not CONFIG: try: