https://pagure.io/koji/pull-request/323 introduced option to force an
arch for noarch packages. Nevertheless, it is only task architecture and
not buildroot one. So, if builder can provide more possible archs (32/64
bit), it will pick one of these randomly and can go against preferred arch.
Patch introduces "preferred_arch" option for find_arch and use the
task's one when it works with noarch rpm.
Fixes: https://pagure.io/koji/issue/789
Discussions with Son_Goku (from Mageia) on IRC revealed that they need
per tag/target macro support in Koji. We store tag macros in 'Extra Options'
and macro has to start with '%'.
Example:
% koji taginfo f29
Tag: f29 [11]
Arches: riscv64
Groups:
Required permission: 'admin'
Tag options:
%mymacro : 'value123'
%packager : 'Fedora Project RISC-V'
mock.package_manager : 'dnf'
[..]
Tag macros can be added using koji edit-tag.
The tag macros are allowed to overwrite macros set in koji.genMockConfig.
For example, %packager is set in koji.genMockConfig by default. The mock
configuration generated by kojid was:
[..]
config_opts['macros']['%_host'] = 'riscv64-koji-linux-gnu'
config_opts['macros']['%mymacro'] = 'value123'
config_opts['macros']['%_host_cpu'] = 'riscv64'
config_opts['macros']['%vendor'] = 'Fedora Project'
config_opts['macros']['%distribution'] = 'Fedora Project'
config_opts['macros']['%_topdir'] = '/builddir/build'
config_opts['macros']['%_rpmfilename'] = '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'
config_opts['macros']['%packager'] = 'Fedora Project RISC-V'
[..]
This two-line change was tested on Fedora RISC-V koji instance.
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
We are using percent signs in host_principal_format. As python3 replaced
ConfigParser with SafeConfigParser, parsing now fails.
Fixes: https://pagure.io/koji/issue/1543
The '--koji' mode of mergerepo_c implies --all, and thats what we want
for bare mode as well. The default merge mode is 'repo' which uses the
first found package by name if multiple packages with the same name are
in the multiple repos. This causes chaos with rhel8 repos as GA and
updates content are in the same repo and if it hits an old version of
one package and an update of another that depends on the new version
it blows up.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
New field in tag extra 'mock.yum.module_hotfixes' can be used to set
module_hotfixes=0/1 in yum.conf's inside mock's buildroots.
Fixes: https://pagure.io/koji/issue/1521
New task rebuildSRPM for srpms uploaded to koji. If policy
'rebuild_srpm' returns True, build task will spawn rebuildSRPM task
first to recreate SRPM with updated buildroot macros, typically 'dist'.
Policy has access to same data as build_from_srpm and build_from_repo_id
policies. (user_id, source, task_id, build_tag, skip_tag, target, tag)
Fixes: https://pagure.io/koji/issue/1396
alt_sources_dir
In the RPM layout, it's possible that the SOURCES directory might be
completely empty save for the lookaside payload. In this case a SOURCES
directory wouldn't exist in SCM, and wouldn't be created until the
sources command is run.
We have pretty slow connection from s390x koji which helped to uncover
this part. Kojid downloads all files from repomd.xml (incl. filelists)
which is really big. What we really want is just find location of
'origin' (used later in the code).
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
createrepo_update is currently reusing only old repos from same tag.
Nevertheless, for first newRepo there is no old data, but there is a
high chance, that we inherit something. This inherited repo can be used
also for significant speedup.
Fixes: https://pagure.io/koji/issue/1354