[Fedora-packaging] arched BuildRequires?

Susi Lehtola jussilehtola at fedoraproject.org
Thu Jun 13 22:14:16 UTC 2013


On Thu, 13 Jun 2013 22:49:11 +0200
Mattias Ellert <mattias.ellert at fysast.uu.se> wrote:
> tor 2013-06-13 klockan 11:53 -0700 skrev Toshio Kuratomi:
> 
> > The FPC discussed this today and added a prohibition to using
> > %{_isa} in BuildRequires to the Guidelines:
> 
> Please reconsider this. A specfile without isa in BuildRequires is
> broken for exactly the same reason a binary rpm without isa in
> Requires is broken. Not all packages the provide the BR are suitable
> to fulfil it for the purpose of providing the resources necessary for
> doing the build.

The difference is that BuildRequires are only relevant on the build
system, where the correct architecture will be pulled in by the
BuildRequire. Remember, the build environment is prepped separately for
each build.

Also, as is noted in the guidelines
https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_and_.25.7B_isa.7D
if you use %_isa in the BuildRequires, then e.g. a srpm built on x86_64
won't work on i386.


For binary RPMs the situation is very different - you can't assume
anything about the state of the system. %_isa is needed for the case
where the system already has, say libfoo(x86-32) installed, and then
you install foo(x86-64) that dlopens libfoo. You need the %_isa in the
binary rpm requires to make sure that the compatible library gets
installed, although the libfoo package already is present on the system.

On Thu, 13 Jun 2013 22:44:53 +0200
Mattias Ellert <mattias.ellert at fysast.uu.se> wrote:
> It is VERY EASY to construct such an example.
> 
> Consider a package containing the following BRs:

... which is the same case as here.
-- 
Susi Lehtola
Fedora Project Contributor
jussilehtola at fedoraproject.org


More information about the packaging mailing list