also fix unittest: test_profiles
notes: since the test won't read config files anymore, lift the loop number from 20 -> 256 to increase the probability of hitting the multithread issue
fixes: #1786
Some files in the tree had bits of code that you could run if you
executed the files directly as scripts. Now that we have unit tests and
the "fakehub" tool, we do not need this code.
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
When creating a builder with the default settings and a small root
partition "/", kojid will fail to come up because /var/lib/mock is on
the root partition.
Prior to this change, kojid would log a messages to the systemd journal
about the insufficent disk space, but it did not make it obvious which
directory should have more disk space. Add the buildroot location to
this log message, so the administrator can more easily understand what
to change.
These functions are now fully provided by hashlib. Commit removes their
usage from koji's codebase and leaves deprecation message in lib.
Final removal from lib is scheduled to 1.21.
Fixes: https://pagure.io/koji/issue/1487
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>
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