Hi, I've created a new draft proposal on https://fedorahosted.org/fpc/ticket/608
It would be nice to have a new dynamic macro for tracking fpc (Free Pascal Compiler) supported architectures. Currently all packages which depend on fpc to build must list in the .spec file the ExclusiveArch entry. Having an ExclusiveArch: %{fpc_arches} macro would be easier and future proof since in future there will be no need of manual intervention if fpc will become available on more architectures.
This has been proposed in a recent review request https://bugzilla.redhat.com/show_bug.cgi?id=1299127#c6
Thanks Mattia
Mattia Verga wrote:
It would be nice to have a new dynamic macro for tracking fpc (Free Pascal Compiler) supported architectures. Currently all packages which depend on fpc to build must list in the .spec file the ExclusiveArch entry. Having an ExclusiveArch: %{fpc_arches} macro would be easier and future proof since in future there will be no need of manual intervention if fpc will become available on more architectures.
You'll want to put that macro in a file in /usr/lib/rpm/macros.d. Name the file macros.fpc-srpm to follow the convention, and package it in a separate package named fpc-srpm-macros. Then ask the maintainers of redhat-rpm-config to require fpc-srpm-macros.
The macro must be either in redhat-rpm-config or in a package that redhat-rpm-config requires so that it's always present, because ExclusiveArch is evaluated before BuildRequires takes effect. A separate package has the advantage that the same people who maintain the Free Pascal Compiler can also maintain the macro.
The package should have absolutely minimal dependencies to avoid bloating a minimal installation, and minimal build-time dependencies to avoid complicating bootstrapping on new architectures.
As far as I know no special permission is required to do this. The Packaging Committee discussed taking control of these macros some time ago, but no decision has been made that I have seen.
Björn Persson
Thanks Björn, the problem is... I have no idea how to make that macro. :-)
Mine was a suggestion, in the hope that someone can do that. I'm not able to make it myself.
Mattia Verga wrote:
Thanks Björn, the problem is... I have no idea how to make that macro. :-)
Assuming that the list of architectures in your virtualplanet.spec is correct, macros.fpc-srpm would have the following content:
%fpc_arches %{ix86} %{arm} x86_64 # fpc_arches lists the architectures where the Free Pascal Compiler is # available in Fedora.
Here's how I did it: https://pkgs.fedoraproject.org/cgit/rpms/gnat-srpm-macros.git/tree/
Björn Persson
Ah, thanks, I thought it was much more complicated, like reading in some database if fpc was available in a specific architecture and return a go/no-go.
I will do the macro and ask the fpc maintainer to join.
Thanks again for the help.
packaging@lists.fedoraproject.org