RPM-RPMRC(5) File Formats Manual RPM-RPMRC(5)

# [NAME](#NAME)

**rpm-rpmrc** - rpm platform compatibility configuration

# [SYNOPSIS](#SYNOPSIS)

*VARIABLE*: {*ARCH*|*OS*}: *VALUE* ...

*VARIABLE*: *ARCH* *VALUE*

# [FILES](#FILES)

*/usr/lib/rpm/rpmrc*  
*/usr/lib/rpm/&lt;vendor&gt;/rpmrc*  
*/etc/rpmrc*  
*~/.config/rpm/rpmrc*

# [DESCRIPTION](#DESCRIPTION)

The low-level machine architecture and OS configuration in **rpm** is managed via a set of rpmrc files as defined by the *rpmrc path*. Most users never need to look at, much less touch these files.

Each file in the colon separated *rpmrc path* is read sequentially by **rpm** for configuration information. Tildes will be expanded to the value of the environment variable **HOME**. The first file in the path must exist, others are considered optional.

If a value is defined multiple times, the last entry wins. The default *rpmrc path* uses this to achieve the following hierarchy of platform configuration:

1\.

Generic **rpm** factory defaults

2\.

Vendor (distribution) specific configuration

3\.

Host specific configuration

4\.

User specific configuration

In older rpm versions the path of per-user rpmrc was *~/.rpmrc*. This is still processed if it exists and the new configuration directory does not exist.

# [CONFIGURATION](#CONFIGURATION)

*ARCH* and *OS* relate to [**uname**(2)](/man/os/rpm/uname.2) machine and operating system information, but are not 1:1 equivalent. The following directives are supported in the rpmrc files:

**arch\_canon** *ARCH*: *CANON\_ARCH* *ARCH\_NUM*

Names and numbers of known architectures to alias different spellings to a canonical one. *CANON\_ARCH* is what the *ARCH* entries in other rpmrc directives refer to.

The number is not used for any calculations by **rpm** but must be present for historical reasons.

**arch\_compat**: *ARCH*: *COMPAT\_ARCH* ...

Declare compatibility between machine architectures, ie. *ARCH* machines can install packages for *COMPAT\_ARCH* architecture.

**archcolor**: *ARCH* *COLOR*

Declare the "color" of *ARCH*. The color relates to the word length aka bitness of the architecture:

- **0** means none (noarch packages and similar)
- **1** means 32-bit
- **2** means 64-bit

**buildarch\_compat**: *ARCH*: *COMPAT\_ARCH* ...

Declare compatibility between build architectures targets, ie. *ARCH* machines can produce *COMPAT\_ARCH* binaries.

**buildarchtranslate**: *ARCH*: *TRANSLATE\_ARCH*

Automatically translate detected host architecture *ARCH* to *TRANSLATE\_ARCH* when building packages. This is used to map sub-architectures to a main one, for example when building on a **x86\_64\_v2** host we typically want the generated package to be of the main **x86\_64** architecture.

**optflags**: *ARCH* *OPTFLAGS*

Compiler flags to use when building packages for *ARCH* architecture. The *OPTFLAGS* value is available as **%{optflags}** macro in spec files.

**os\_canon**: *OS*: *CANON\_OS* *OS\_NUM*

Names and numbers of known operating systems to alias different spellings to a canonical one. *CANON\_OS* is what the *OS* entries in other rpmrc directives refer to.

The number is not used for any calculations by **rpm** but must be present for historical reasons.

**os\_compat**: *OS*: *COMPAT\_OS* ...

Declare compatibility between operating systems, ie. *OS* machine can install packages for *COMPAT\_OS* operating system.

# [ENVIRONMENT](#ENVIRONMENT)

If **XDG\_CONFIG\_HOME** environment variable is set, it replaces *~/.config* in the *rpmrc path*.

# [SEE ALSO](#SEE_ALSO)

[**rpm**(8)](/man/os/rpm/rpm.8), [**rpm-common**(8)](/man/os/rpm/rpm-common.8), [**rpm-config**(5)](/man/os/rpm/rpm-config.5), [**rpm-macros**(7)](/man/os/rpm/rpm-macros.7)

2026-08-31 RPM 6.1.0

---

Document: rpm-rpmrc(5) from rpm 6.1.0-r1 (Chainguard OS)
Source: https://github.com/rpm-software-management/rpm
