On Sat, May 31, 2025 at 8:39 AM Björn Persson <Bjorn@rombobjörn.se> wrote:
>
> Peter Lemenkov wrote:
> > The issue is that these
> > macros must be available during the BuildFromSRPM stage, and I have no
> > idea how to make that happen. I looked at the pyproject macros and
> > noticed they use *-macros-srpm package (yet another entirely
> > undocumented detail — why do we need these instead of just
> > *-macros-rpm?).
>
> Macros that need to be present before the SRPM is built must be pulled
> in by something other than the spec file. Usually redhat-rpm-config
> requires these *-srpm-macros packages for exactly this purpose.
>
> $ rpm -q --requires redhat-rpm-config | grep srpm
> ansible-srpm-macros
> build-reproducibility-srpm-macros
> efi-srpm-macros
> fonts-srpm-macros
> forge-srpm-macros
> fpc-srpm-macros
> ghc-srpm-macros
> gnat-srpm-macros
> go-srpm-macros
> kernel-srpm-macros >= 1.0-12
> lua-srpm-macros
> ocaml-srpm-macros
> openblas-srpm-macros
> package-notes-srpm-macros
> perl-srpm-macros
> pyproject-srpm-macros
> python-srpm-macros >= 3.11-7
> qt5-srpm-macros
> qt6-srpm-macros
> rust-srpm-macros
> zig-srpm-macros
>
> You need to make a separate package with minimal dependencies, that
> contains only the macros.*-srpm file, and convince the
> redhat-rpm-config maintainers to require it.
>
> Although, if the only function of those macros is to expand to nothing
> when the real macros are absent, then maybe another solution is to
> reference them in spec files with a question mark to express "if it is
> defined":
>
> %{?buildsystem_rebar3_build foo}
>

This doesn't work for Declarative Build System stuff, because
undefined/empty stuff will fail too.



-- 
真実はいつも一つ!/ Always, there's only one truth!
-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to