[Fedora-packaging] arched BuildRequires?

Susi Lehtola jussilehtola at fedoraproject.org
Fri Jun 14 07:29:24 UTC 2013


On Fri, 14 Jun 2013 04:42:06 +0200
Mattias Ellert <mattias.ellert at fysast.uu.se> wrote:
> fre 2013-06-14 klockan 01:14 +0300 skrev Susi Lehtola:
> > 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.
> 
> I disagree with this. The BuildRequires are relevant for users wanting
> to rebuild packages on their own machines. Without isa this is
> severely broken.

A normal user doesn't rebuild packages on their own machines.
And if they do, the normal thing to do is use mock, which works
correctly.

If you rebuild packages, then you're probably enough an expert to see
if your build environment is not fully operational.

> > 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.
> 
> This "won't work" is an exaggeration. There are a few glitches in some
> cases, but these are minor compared to the problems you get by not
> having proper BRs by not using isa.

... uhh, such as?

If you have %_isa in the buildrequires, then you're going to be plain
and simple unable to run rpmbuild --rebuild srpm. What you need to do
is unpack it and then build the spec, instead.

> > 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.
> 
> You can not make assumptions about what packages a user has installed
> on the system where packages are built. Users rebuild packages on the
> same systems as they install binary packages - the same issues arise.

Packages are rebuilt in mock.

> > 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.
> 
> This new guideline is backwards. In order to avoid a few tiny glitches
> caused by rpmbuild doing something weird, you are forcing everyone to
> write severely broken spec files.

Not using mock is going backwards by many years. If you don't use it,
you might end up with packages that get configured in a different
fashion: features that don't exist in the Fedora packages may be turned
on by configure, if the necessary dependency is installed in your
system.
-- 
Susi Lehtola
Fedora Project Contributor
jussilehtola at fedoraproject.org


More information about the packaging mailing list