From d91e1fe81b507399f404b8090f6412b94eca0fd5 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 24 2020 10:46:44 +0000 Subject: align option naming with mock Related: https://pagure.io/koji/issue/84 --- diff --git a/builder/kojid b/builder/kojid index 104dc63..4266ecf 100755 --- a/builder/kojid +++ b/builder/kojid @@ -295,14 +295,14 @@ class BuildRoot(object): # Append opts['plugin_conf'] to enable Mock package signing if 'mock.plugin_conf.sign_enable' in self.config['extra']: # check rest of configuration - if ('mock.plugin_conf.sign_cmd' not in self.config['extra'] or - 'mock.plugin_conf.sign_opts' not in self.config['extra']): + if ('mock.plugin_conf.sign_opts.cmd' not in self.config['extra'] or + 'mock.plugin_conf.sign_opts.opts' not in self.config['extra']): raise koji.GenericError("Tag is not configured properly for mock's sign plugin'") opts['plugin_conf'] = { 'sign_enable': self.config['extra']['mock.plugin_conf.sign_enable'], 'sign_opts': { - 'cmd': self.config['extra']['mock.plugin_conf.sign_cmd'], - 'opts': self.config['extra']['mock.plugin_conf.sign_opts'], + 'cmd': self.config['extra']['mock.plugin_conf.sign_opts.cmd'], + 'opts': self.config['extra']['mock.plugin_conf.sign_opts.opts'], } } if self.internal_dev_setup is not None: diff --git a/docs/source/using_the_koji_build_system.rst b/docs/source/using_the_koji_build_system.rst index bce87d8..128fec1 100644 --- a/docs/source/using_the_koji_build_system.rst +++ b/docs/source/using_the_koji_build_system.rst @@ -436,14 +436,14 @@ environment follows: * `mock signing plugin `__ - - Options ``mock.plugin_conf.sign_enable``, ``mock.plugin_conf.sign_cmd`` and - ``mock.plugin_conf.sign_opts`` are propagated to mock conf to be used by this - plugin. Note, that these tools are run outside of the jailed env. Note, that - this functionality doesn't interfere with koji's standard signing commands - (``import-sig``, ``write-signed-rpm``, etc.). Note, that rpmsign vs gpg must - be configured correctly. If it is not it a) can silently ignore problems - during signing b) can hang forever when e.g. gpg password store is not - accessible. + Options ``mock.plugin_conf.sign_enable``, ``mock.plugin_conf.sign_opts.cmd`` + and ``mock.plugin_conf.sign_opts.opts`` are propagated to mock conf to be used + by this plugin. Note, that these tools are run outside of the jailed env. + Note, that this functionality doesn't interfere with koji's standard signing + commands (``import-sig``, ``write-signed-rpm``, etc.). Note, that rpmsign vs + gpg must be configured correctly. If it is not it a) can silently ignore + problems during signing b) can hang forever when e.g. gpg password store is + not accessible. You may also specify per-tag environment variables for mock to use. For example, to set the CC environment variable to clang, you could