Skip to content

Support dynamic build requires on CentOS 9

Steve Traylen requested to merge straylen/rpmci:dynamic_builddeps into LOS-877

Background:

https://fedoraproject.org/wiki/Changes/DynamicBuildRequires

Example of package failing that should not:

https://gitlab.cern.ch/ai-config-team/stomppy/python-stomppy5/-/pipelines/3519837

python3-wheel is correctly not a BuildRequire because it is it is only autogenerated during the %prep phase of the .spec file.

koji and mock should be fine with this and do the correct thing already.

However rpmbuild needs an extra phase.

rpmbuild -br builds a nosrc.rpm package with the BuildRequires in and this has its build dependencies installed in the normal way.

For reference this is what mock does:

https://github.com/rpm-software-management/mock/blob/fd5b30e6481be986922d5c517057cb14f0e38052/mock/py/mockbuild/backend.py#L724

Edited by Steve Traylen

Merge request reports