RPM-RPMRC(5)

πŸŽ€ rpm-rpmrc β€” the rpm platform compatibility configuration page, bestie edition ✨

okay so this is the manual for rpm-rpmrc, which is literally the platform compatibility configuration for rpm. it's filed under File Formats Manual, and honestly? it's giving ancient scrolls. let's get into it πŸ’…


🌸 SYNOPSIS 🌸

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

that's the shape of the thing, no cap. two flavors, both slay.


πŸ¦‹ FILES πŸ¦‹

  • /usr/lib/rpm/rpmrc
  • /usr/lib/rpm/<vendor>/rpmrc
  • /etc/rpmrc
  • ~/.config/rpm/rpmrc

these are the spots, in order-ish, iykyk πŸ’–


✨ DESCRIPTION ✨

so the low-level machine architecture and OS configuration inside rpm gets managed by a whole set of rpmrc files, as defined by the rpmrc path. and like β€” most users never need to look at these, much less touch them. genuinely. hands off the rpmrc, babe πŸ™ˆ

every single file in that colon separated rpmrc path gets read sequentially by rpm, grabbing configuration info as it goes. tildes get expanded to the value of the environment variable HOME. and here's the rule: the first file in the path must exist β€” the others are considered optional. iconic hierarchy behavior fr fr.

if a value is defined multiple times, the last entry wins. the default rpmrc path uses exactly this to build a whole hierarchy of platform configuration:

  1. Generic rpm factory defaults
  2. Vendor (distribution) specific configuration
  3. Host specific configuration
  4. User specific configuration

and okay, a little lore for you ⭐ β€” in older rpm versions the path of per-user rpmrc was ~/.rpmrc. that one is still processed if it exists and the new configuration directory does not exist. legacy queen behavior, we respect it 🫢


πŸ‘‘ CONFIGURATION πŸ‘‘

ARCH and OS relate to uname(2) machine and operating system information, but they are not 1:1 equivalent. noted πŸ“

the following directives are supported in the rpmrc files:

arch_canon ARCH: CANON_ARCH ARCH_NUM

names and numbers of known architectures, so different spellings can alias to one canonical one. CANON_ARCH is what the ARCH entries in other rpmrc directives refer to.

and the number? not used for any calculations by rpm, but it must be present for historical reasons. it's just there. vibing. πŸ’€

arch_compat: ARCH: COMPAT_ARCH ...

declares compatibility between machine architectures β€” ie. ARCH machines can install packages for COMPAT_ARCH architecture.

archcolor: ARCH COLOR

declares 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

color-coded bitness, very aesthetic 🌈

buildarch_compat: ARCH: COMPAT_ARCH ...

declares compatibility between build architectures targets β€” ie. ARCH machines can produce COMPAT_ARCH binaries.

buildarchtranslate: ARCH: TRANSLATE_ARCH

automatically translates the detected host architecture ARCH to TRANSLATE_ARCH when building packages. this is what maps 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. main character architecture energy, honestly πŸ‘‘

optflags: ARCH OPTFLAGS

compiler flags to use when building packages for the ARCH architecture. the OPTFLAGS value is available as the %{optflags} macro in spec files. yes bestie, that macro. that one. πŸ”₯

os_canon: OS: CANON_OS OS_NUM

names and numbers of known operating systems, so different spellings alias to a canonical one. CANON_OS is what the OS entries in other rpmrc directives refer to.

and again β€” the number is not used for any calculations by rpm, it just must be present for historical reasons. it's a decorative little number πŸ’…

os_compat: OS: COMPAT_OS ...

declares compatibility between operating systems β€” ie. an OS machine can install packages for COMPAT_OS operating system.


πŸ’œ ENVIRONMENT πŸ’œ

if the XDG_CONFIG_HOME environment variable is set, it replaces ~/.config in the rpmrc path. that's the whole thing, that's the env var, periodt ✨


🌟 SEE ALSO 🌟

rpm(8), rpm-common(8), rpm-config(5), rpm-macros(7)


that's the page bestie, you ate it up πŸ“ and for the cute sign-off: this was RPM 6.1.0, dated 2026-08-20, out of the File Formats Manual β€” RPM-RPMRC(5) β€” love you, go forth and never touch these files πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from