Feature Highlight: Noarch Subpackages

Florian Festi ffesti at redhat.com
Wed Feb 11 09:54:07 UTC 2009

With version 4.6.0 RPM supports noarch subpackages. This means that
adding "BuildArch: noarch" to a subpackage section makes this
subpackage noarch even if the main package is arch dependent. This
allows to make documentation, language or data subpackages noarch
without packaging the same sources twice or other workarounds.


Spec files using this feature cannot be built on previous RPM
versions. The resulting binary rpms are fully backward compatible as
they are just normal noarch packages. Though packagers that need to
build their spec files on different and older distributions should
avoid using noarch subpackages . Distributions that build their spec
files with a defined version of RPM or software vendors that target
different distributions but use only on version of RPM for building
should consider noarch subpackages.

RPM based distributions should check their build systems whether they
can cope with builds on different architectures returning the same
noarch subpackages.


Noarch subpackages allow to increase the percentage of content
packaged in noarch packages with very little changes to spec
files. For distributions that build for several different arches this
can reduce the overall size of their repositories as long as noarch
packages are shared between the different arches. Distributions that
want to make massive use of this feature should also consider how they
can make sure that this benefit does actually apply. Possible
solutions are using hard links or to introduce a noarch repository
that is used by all arches.

For multilib installations noarch subpackages can also reduce the
amount of data that has to be stored, downloaded and installed twice.


All - or at least most - arch independent content should be in noarch
packages. Expect more features to make that possible in future
releases of RPM.

More information about the Rpm-list mailing list