table of contents
| RPM-CONFIG(5) | File Formats Manual | RPM-CONFIG(5) |
NAME¶
rpm-config - rpm runtime macro configuration
SYNOPSIS¶
NAME VALUE
FILES¶
/usr/lib/rpm/macros
/usr/lib/rpm/macros.d/macros.*
/usr/lib/rpm/platform/%{_target}/macros
/usr/lib/rpm/fileattrs/*.attr
/usr/lib/rpm/<vendor>/macros
/etc/rpm/macros.*
/etc/rpm/macros
/etc/rpm/%{_target}/macros
~/.config/rpm/macros
DESCRIPTION¶
The primary configuration mechanism in rpm is rpm-macros(7). On startup, rpm reads a set of rpm-macrofile(5) files determined by the macro path.
Each file or glob(7) pattern in the colon-separated macro path is read sequentially by rpm for macro definitions. %{_target} is expanded to the detected <arch>-<os> platform. Tildes are expanded to the value of the environment variable HOME.
If a macro is defined multiple times, the last entry wins. The default macro path uses this to achieve the following hierarchy of settings:
- 1.
- Generic rpm factory defaults
- 2.
- Platform-specific rpm factory defaults
- 3.
- Vendor (distribution) specific settings
- 4.
- Host specific settings
- 5.
- User specific settings
- 6.
- Command-line override settings
The default macro path can be inspected with rpm --showrc|grep ^Macro.
In older versions of rpm, the path of per-user macros was ~/.rpmmacros. This is still processed if it exists and the new configuration directory does not exist.
CONFIGURATION¶
The following configurables are supported for the rpm runtime (as opposed to just package building) parts:
%_color_output MODE
%_db_backend BACKEND
- dummy: Dummy backend (no actual functionality)
- bdb_ro: Berkeley DB (read-only)
- ndb: Native database (no external dependencies)
- sqlite: Sqlite database
%_dbpath DIRECTORY
%_excludedocs VALUE
%_flush_io VALUE
%_group_path PATH
%_httpport PORT
%_httpproxy HOSTNAME
%_install_langs LOCALES
%_install_script_path PATH
%_keyring BACKEND
- fs: Plain ASCII files in a directory
- openpgp: Shared OpenPGP certificate directory
- rpmdb: Pseudo-packages in the rpmdb
%_keyringpath DIRECTORY
%_minimize_writes VALUE
- 0: disable
- 1: enable
- -1: (or undefined) autodetect on platforms where supported, otherwise default to disabled
%_netsharedpath PATH
%_passwd_path PATH
%_pkgverify_digests HASHALGOS
%_pkgverify_flags VSFLAGS
%_pkgverify_level MODE
- all: require valid digest(s) and signature(s)
- signature: require valid signature(s)
- digest: require valid digest(s)
- none: legacy rpm behavior, nothing required
%_prefer_color VALUE
- 0: disabled
- 1: prefer 32-bit packages
- 2: prefer 64-bit packages
%__plugindir DIRECTORY
%_query_all_fmt FORMAT
%_rpmlock_path FILE
%_tmppath PATH
%__urlhelpercmd EXECUTABLE
%__urlhelperopts OPTIONS
%__urlhelper_localopts OPTIONS
%__urlhelper_proxyopts OPTIONS
%_urlhelper COMMAND
%_transaction_color VALUE
- 0: do not consider "colors", only use arch compatibility map
- 1: only allow 32-bit packages
- 2: only allow 64-bit packages
- 3: allow 32- and 64-bit packages to share files
%_vsflags_erase VSFLAGS
%_vsflags_install VSFLAGS
%_vsflags_query VSFLAGS
%_vsflags_rebuilddb VSFLAGS
%_vsflags_verify VSFLAGS
Verification flags¶
Digest/signature verification flags for various rpm operations are controlled by a bitmask known as VSFLAGS. These flags control various aspects of digital checksum and signature verification when reading rpm package files and their headers.
VSFLAGS is formed by bitwise or'ing the individual flags:
- 0x00001 (RPMVSF_NOHDRCHK): don't verify headers from rpmdb
- 0x00100 (RPMVSF_NOSHA1HEADER): don't verify header SHA1 digest
- 0x00200 (RPMVSF_NOSHA256HEADER): don't verify header SHA256 digest
- 0x00400 (RPMVSF_NODSAHEADER): don't verify header DSA signature(s)
- 0x00800 (RPMVSF_NORSAHEADER): don't verify header RSA signature(s)
- 0x01000 (RPMVSF_NOOPENPGP): don't verify header OpenPGP signature(s)
- 0x02000 (RPMVSF_NOSHA3_256HEADER): don't verify header SHA3_256 digest
- 0x10000 (RPMVSF_NOSHA256PAYLOAD): don't verify package payload SHA256 digest
- 0x20000 (RPMVSF_NOMD5): don't verify legacy header+payload MD5 digest
- 0x40000 (RPMVSF_NODSA): don't verify legacy header+payload DSA signature
- 0x80000 (RPMVSF_NORSA): don't verify legacy header+payload RSA signature
RPM's Python bindings can be helpful for working with these values, for example:
>>> import rpm >>> hex(rpm.RPMVSF_NOSHA1HEADER) '0x100' >>> hex(rpm.RPMVSF_NOSHA1HEADER|rpm.RPMVSF_NOMD5) '0x20100' >>>
Hash algorithms¶
The following hash algorithms (denoted by HASHALGO) are known to rpm, but availability can vary depending how rpm and it's underlying libraries have been built:
- 1: MD5 (obsolete)
- 2: SHA1 (obsolete)
- 8: SHA256
- 9: SHA384
- 10: SHA512
- 12: SHA3-256
- 14: SHA3-512
ENVIRONMENT¶
If XDG_CONFIG_HOME environment variable is set, it replaces ~/.config in the macro path.
SEE ALSO¶
rpm(8), rpm-common(8), rpm-macrofile(5), rpm-rpmrc(5), rpm-macros(7)
| 2025-11-07 | RPM 6.0.0 |