Trying to call distRepo from event driven hub plugin
by Robert Callicotte
Hello,
I am using koji version 1.16.2 for centos 7 and I'm having issues getting the following code to succeed:
################################################
import sys
import logging
import koji
from koji.plugin import callback
koji_hub_path = '/usr/share/koji-hub'
sys.path.insert(0, koji_hub_path)
import kojihub
logger = logging.getLogger('koji.plugins')
@callback('postTag')
def mycallback(cbtype, *args, **kwargs):
# Get the tag name from the buildroot map
opts = {}
taskOpts = {}
tag = kwargs['tag']['name']
keys = None
repo_id = 3
taskOpts['priority'] = koji.PRIO_DEFAULT
taskOpts['channel'] = 'createrepo'
taskOpts['owner'] = 3 #This is the kojiadmin account
taskOpts['arch'] = 'x86_64'
opts['tag'] = tag
opts['keys'] = keys
opts['allow_missing_signatures'] = True
opts['skip_missing_signatures'] = True
opts['latest'] = True
if tag == 'local7':
logging.getLogger('koji.plugin.mycallback').error('Executing mycallback.')
print 'Variable dump: ', args
print 'Expected tag is local7. mytag is: ', tag
print 'Starting dist repo generator for %s...' % tag
return kojihub.make_task('distRepo', [tag, keys], **taskOpts)
The above code always fails with the following exception:
koji.hub: Cannot parse parameters: ['local7', None] of distRepo task
Is make_task the correct function to call in this instance? What should the arguments passed to make_task look like?
Regards,
Robby
4 years, 10 months
New Mock release
by Miroslav Suchý
Hi,
I just released new Mock. From the release notes:
https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.15
Released on 2019-04-22.
Mock new features:
Mock supports Dynamic Build Requires. There is still ongoing work in rpmbuild; therefore you cannot use it yet. Once
the new rpmbuild lands in Fedora you can immediately use it with Mock. [GH#245]
I have seen people who do not know about setup. Now, when you are not in the mock group, and Mock asks you via
consolehelper for root password, it prints this banner: You are not in the mock group. See
https://github.com/rpm-software-management/mock/wiki#setup [GH#244]
Previously when Mock executed DNF, then Mock disabled DNF plugin local. Now the list of plugins which will be
disabled can be configured via:
config_opts['dnf_disable_plugins'] = ['local', 'spacewalk']
The above is the new default, i.e., the plugin spacewalk is now disabled as well. [GH#210]
This change simplified dnf_common_opts default, which is now:
config_opts['dnf_common_opts'] = ['--setopt=deltarpm=False']
Bugfixes:
In Flatpak, the method distro.version() returns float, which produced fatal error in Mock. This is now fixed
[RHBZ#1690374]
new rpm library now returns strings instead of bytes. Mock has been altered that it can accept both types [RHBZ#1693759]
Mock used FileNotFoundError class for a error handling. This class is not defined in Python 2 and caused a traceback
during an error handling [RHBZ#1696234]
Known issues:
On Fedora 30+, the createrepo_c prints its output to STDERR, which is fatal to mockchain. For the time being, I
changed the mockchain behavior and creterepo_c errors are not fatal. However, mockchain print them as an error even
there is no error at all. GH#249
Following contributors contributed to this release:
Igor Gnatenko
Jeroen van Meeuwen (Kolab Systems)
Jo Shields
Martin Kutlák
Neal Gompa
Pat Riehecky
Toshio Kuratomi
Thank you.
Miroslav
4 years, 11 months
preparing for new Mock release
by Miroslav Suchý
Hi,
I would like to do release of new Mock version in few days. If you are working on something then please send it now or
it will go to next version.
Additionally, testing of nightly builds is welcomed as well.
Miroslav
4 years, 11 months