From Fedora Project Wiki

Revision as of 11:45, 4 March 2022 by Vondruch (talk | contribs) (Vondruch moved page User:Vondruch/Bootsrap guidelines to Archive:Vondruch/Bootsrap guidelines)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Bootstrapping

If your package introduces build time circular dependencies, you should use this macro to bootstrap your package:

# When we are bootstrapping, we drop some dependencies, and/or build time tests.
%{?_with_bootstrap: %global bootstrap 1}

[...]

%if ! 0%{?bootstrap}
# dependencies for %%check
BuildRequires: foo
%endif

[...]

%if ! 0%{?bootstrap}
%check
make check
%endif

If your package explicitly Provides: some functionality that is missing when bootstrapped, then that Provides: should look like:

%if ! 0%{?bootstrap}
Provides: bar(some_functionality)
%endif

Please note that usage of pre-built binaries in bootstrap still needs an exception from the Packaging Committee as stated in Packaging:Guidelines#Exceptions