noarch subpackages

Michael Schwendt mschwendt at gmail.com
Fri Jul 10 10:23:52 UTC 2009


On Thu, 9 Jul 2009 10:10:09 +0200, yersinia wrote:

> > > %if 0%{?fedora} > 9
> > > BuildArch: noarch
> > > %endif
> > >
> >
> > Excellent. That's what I was looking for.
> >
> 
> No, it is not right for me. The BuildArch issue depends on the RPM version
> and not from from distro version. It is simply bad style, IMHO, defining
> in the SPEC file something that depends from the "distribution" (in the
> large sense not only fedora). I never see
> this style in RHEL package (appart some little package for the rpm keys
> ecc). Ok is SUSE yes but, again, i don't like define a dependency based on
> a "distro" version, if possible anyway.

First of all, the original question was about "non-Fedora and older
distributions (pre F10)". Above conditional does its job and enables a
noarch sub-pkg only for Fedora > 9.

"0%{?rhel} > 5" may be more future-proof, okay, but isn't true yet for any
existing build-target.

Also, as far as I know, %rhel and %dist are specific to koji/Plague EPEL
builds, as stock RHEL and CentOS don't ship those macros. One needs the
buildsys-macros package. In case I'm mistaken, and I don't have the time
to verify that, what package defines those macros for RHEL?

Finally, I don't agree with parts of the complaints. Either rpmbuild
predefines a variables one can evaluate to check for a certain feature, or
it doesn't. If it doesn't, I don't consider it "bad style" to eval
%fedora/%rhel and make explicit what a conditional is trying to
achieve. Even for a feature like this, that's better than hiding the
details in a macro. Btw, we're miles away from clean multi-dist spec
files, not only due to different package names. My experience with
multi-dist spec files is that very often the packager loses overview due
to overuse of conditionals and the added difficult of keeping changes in
all conditional spec sections in sync with eachother.




More information about the fedora-devel-list mailing list