From 02adc2539bf4845a22669119dabb706eaf012084 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Dec 16 2021 17:22:48 +0000 Subject: Explicitly permit noarch subpackages for header-only libraries Explicitly requiring only the base package to be arched provides the same benefits as a general prohibition on noarch, while explicitly allowing subpackages, including -devel subpackages, to be noarch allows many header-only library packages to still produce noarch RPMs in practice. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index c8d227a..ace0ff3 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -1607,14 +1607,17 @@ Provides: foo-static = %{version}-%{release} Packages which use the header library must `+BuildRequire: foo-static+`, so that the usage can be tracked. -==== Do not use noarch - -It may be tempting to make the header library package noarch, -since the header files themselves are simply text. -However, a library should have tests which should be run on all architectures. -Also, the install process may modify the installed headers -depending on the build architecture. -For these reasons, header-only packages must not be marked noarch. +==== Use noarch only in subpackages + +The base package for a header library MUST NOT be marked noarch. +This ensures that any tests are run on all architectures, +and makes it possible to detect whether the build or install process +has modified the headers based on the build architecture. + +When the contents of subpackages, including the `+-devel+` package, +are actually architecture-independent, they may still be marked noarch. +Since the base package for a header library typically has no `+%files+` list, +this may result in an arched package that builds only noarch rpms. === Statically Linking Executables