[Fedora-packaging] To noarch or arch for arch specific script packages?

Michael Schwendt bugs.michael at gmx.net
Wed Jul 12 10:14:38 UTC 2006


On Mon, 10 Jul 2006 13:01:39 -0400, Jesse Keating wrote:

> There exists packages that are written in say python, but are used for arch 
> specific task.  Consider python scripts that deal with grub (i386/x86_64), or 
> other such things.  Do we want to continue considering these 'noarch' 
> packages, or do we want to mark them as arch specific?  They'll already have 
> the ExclusiveArch: i386 x86_64 or ExcludeArch in the spec.
> 
> The reason I bring this up as it has tickled a possible bug in Brew, Red Hat's 
> build software.  Currently brew will look at BuildArch and ExclusiveArch / 
> ExcludeArch, and the configured arches for a build target to decide where to 
> build the package at.  In one package case, it has BuildArch: noarch, and 
> ExclusiveArch: i386 x86_64.  Combining the two, brew is complaining that 
> Architecture is not included 'noarch'. 

This is a big mess, IMO.

We've had it recently with freenx/nx, where a noarch package depends on an
arch-specific package, which is not available for some archs. Since we
copy noarch packages to all archs, this has lead to a broken dep. The
enhanced push script evaluates ExcludeArch, but not ExclusiveArch, of the
src.rpm and thereby complements the buildsys.

"BuildArch: noarch" means it does not matter on which architecture the
package may be built. And it enforces a ".noarch" marker in the package
file name, which means that the package is for no particular arch. It
can be installed without restrictions.

All three tags, BuildArch, ExclusiveArch and ExcludeArch are build-time
input.

ExclusiveArch and ExcludeArch information is lost after rpmbuild. It does
not enter the .noarch.rpm headers and remains only in the src.rpm.

If the package is "ExclusiveArch: i386 x86_64", you cannot even build it
as "noarch" on a different arch like ppc.

It is like saying "the package contents are arch-independent but only for
i386 and x86_64, since we tried that and know it doesn't work on ppc,
ppc64, sparc and any other arch". What the heck? Then it is not noarch!

Instead of combining BuildArch noarch and ExclusiveArch, just drop
BuildArch noarch and create arch-specific packages. Especially if there
is a dependency on other arch-specific packages.

Else it would be abuse of tags. The only vaguely valid case is combining
BuildArch noarch and ExcludeArch, which is like saying "by nature, the
package contents are arch-independent, but we know that there is a problem
on the N excluded archs".




More information about the Fedora-packaging mailing list