obs-build
obs-build copied to clipboard
Allow specifying buildtype specific Required/Support/etc.
Currently the project configuration needs content like this:
Required: rpm-build
# Build all packages with -pie enabled
Required: gcc-PIE
# the basic stuff
Support: perl
Support: build-mkbaselibs compat-usrmerge-build
Prefer: build-mkbaselibs
Support: brp-check-suse
Support: post-build-checks
All of those are only relevant for RPM builds, but they are also evaluated for other kinds of builds, such as docker or kiwi. Currently this means that e.g. gcc and perl with their dependencies end up in the build system for image builds.
Having something like
%if "%_type" = "spec"
Required: rpm-build
%endif
would be ideal.
Having something like
%if "%_type" = "spec" Required: rpm-build %endif
would be ideal.
That won't actually work for the main usecase, which is when the type is set at the end of the project config, e.g. in a separate project. Then the project config would have to be evaluated twice... Something like Required(spec): rpm-build
or Required: spec:rpm-build
might be more in line with existing syntax.