---
name: "rpmbuild-config"
section: "5"
platform: "linux"
package: "rpm-tools"
version: "6.0.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rpmbuild-config"
---

# rpmbuild-config(5)

rpmbuild macro configuration

## NAME

**rpmbuild-config** - rpmbuild macro configuration

## SYNOPSIS

*NAME* *VALUE*

## DESCRIPTION

The primary configuration mechanism in **rpmbuild** is [**rpm-macros**(7)](/rpm-macros/7.md). See [**rpm-config**(5)](/rpm-config/5.md) for the description of the general mechanism, this manual only describes the configurables affecting **rpmbuild** operation.

## CONFIGURATION

The following configurables are supported for the **rpm** build operation, typically invoked through the **rpmbuild** command.

### Locations and filenames

**%\_builddir** *DIRECTORY*

The directory where the per-package build directories will be placed when building.

**%\_fileattrsdir** *DIRECTORY*

The directory where the file classifier configuration is located.

**%\_rpmdir** *DIRECTORY*

The directory where newly built binary packages will be written.

**%\_rpmfilename** *TEMPLATE*

The output binary package filename query format used when building binary packages, as described by [**rpm-queryformat**(7)](/rpm-queryformat/7.md). The filename is considered relative to **%\_rpmdir**.

**%\_sourcedir** *DIRECTORY*

The directory where the sources and patches are found when building.

**%\_srcrpmdir** *DIRECTORY*

The directory where newly built source packages will be written.

**%\_topdir** *DIRECTORY*

The toplevel directory under which the package build directories reside by default.

### Informational tags

These are a special group of macros that if defined, behave as if the corresponding tag had been used in a specfile. This allows changing the values without modifying thousands of specfiles.

**%bugurl** *URL*

Configurable bug URL, same as BugURL: tag in a specfile. If set, should point to a website for searching for existing and filing new issues for this package.

**%distribution** *STRING*

Configurable distribution informationsame as Distribution: tag in a specfile.

**%disturl** *URL*

Configurable distribution URL, same as DistURL: tag in a specfile.

**%disttag** *STRING*

Configurable distribution tag, same as DistTag: tag in a specfile.

**%modularitylabel** *STRING*

Configurable modularity label, same as ModularityLabel: in a specfile. Obsolete.

**%packager** *STRING*

Configurable packager information, same as Packager: in a specfile.

**%translationurl** *URL*

Configurable translation URL, same as TranslationURL: in a specfile.

**%upstreamreleases** *URL*

Configurable URL for checking for newer upstream releases, same as UpstreamReleases: in a specfile.

**%vendor** *STRING*

Configurable vendor information, same as Vendor: in a specfile.

### Build operation

These settings affect various aspects of the build and can cause a build to fail or succeed, but have no direct impact on the produced packages.

**%\_build\_pkgcheck** *EXECUTABLE*

A program to call for each successfully built and written binary package, such as **rpmlint**. The path to the package is passed to the program as a command-line argument.

**%\_build\_pkgcheck\_set** *EXECUTABLE*

A program to call for the whole binary package set after a successfully build, such as **rpmlint**. The paths to the package set are passed to the program as command-line arguments.

**%\_build\_pkgcheck\_srpm** *EXECUTABLE*

A program to call for each successfully built and written source package, such as **rpmlint**. The path to the package is passed to the program as a command-line argument.

**%\_default\_patch\_flags** *STRING*

Set of default options on all **%patch** applications.

**%\_default\_patch\_fuzz** *NUMBER*

Default fuzz level for patch application in spec file. See [**patch**(1)](/patch/1.md) for details.

**%\_smp\_ncpus\_max** *NUMBER*

A hard limit for maximum number of CPU's to use in parallel during a package build. Zero means unlimited.

**%\_smp\_nthreads\_max** *NUMBER*

A hard limit for maximum number of threads to use in parallel during a package build. Zero means unlimited.

**%\_smp\_tasksize\_proc** *NUMBER*

Assumed task size of build processes (during compilation). Used for tuning the amount of parallelism based on available memory.

**%\_smp\_tasksize\_thread** *NUMBER*

Assumed task size of threads (during package generation). Used for tuning the amount of parallelism based on available memory.

### Package generation

These settings affect various aspects of the produced binary and source packages.

**%build\_mtime\_policy** *POLICY*

Define how file timestamps are handled in built packages. Clamping means ensuring the value does not exceed the threshold value.

- •

  **clamp\_to\_buildtime**: Clamp file timestamps to package buildtime.

- •

  **clamp\_to\_source\_date\_epoch**: Clamp file timestamps to the **SOURCE\_DATE\_EPOCH** environment variable.

**%clamp\_mtime\_to\_source\_date\_epoch** *BOOLEAN*

Alias for **%build\_mtime\_policy** **clamp\_to\_source\_date\_epoch**. Do not use. Deprecated and scheduled for removal.

**%source\_date\_epoch\_from\_changelog** *BOOLEAN*

Whether to set the **SOURCE\_DATE\_EPOCH** environment variable from the timestamp of the topmost **%changelog** entry.

**%use\_source\_date\_epoch\_as\_buildtime** *BOOLEAN*

Whether to use the **SOURCE\_DATE\_EPOCH** environment variable value as the buildtime of packages.

**%\_binary\_filedigest\_algorithm** *HASHALGO*

The algorithm to use for generating per-file checksums (aka digests) of binary packages.  See [**rpm-config**(5)](/rpm-config/5.md) for the supported values.

**%\_binary\_payload** *IOFLAGS*

The IO method and compression to use for generating the payload of binary packages. See [**rpm-payloadflags**(7)](/rpm-payloadflags/7.md).

**%\_buildhost** *HOSTNAME*

Use *HOSTNAME* as the package buildhost instead of acquiring the value from [**gethostname**(2)](/gethostname/2.md).

**%\_buildtime** *TIMESTAMP*

Use *TIMESTAMP* as the package buildtime instead of acquiring the value from [**time**(2)](/time/2.md).

**%\_changelog\_trimage** *TIMESTAMP*

Maximum age of preserved changelog entries in binary packages, relative to newest existing entry. Unix timestamp format. The value of zero disables trimming by age.

**%\_changelog\_trimtime** *TIMESTAMP*

An alternative strategy for changelog trimming: trim all changelog entries older than the specified timestamp. Unix timestamp format. The value of zero disables trimming by time.

**%\_docdir\_fmt** *TEMPLATE*

A template for the per-package documentation directory name, ie. the files packaged with **%doc**.

**%\_\_docdir\_path** *PATH*

A colon separated list of directories whose contents should be always considered as documentation.

**%\_openpgp\_autosign\_id** *KEYID*

The OpenPGP key id or fingerprint to use for automatically signing packages after a successful build. See also [**rpmsign**(1)](/rpmsign/1.md).

**%\_rpmformat** *VERSION*

The RPM package format to produce. Supported values are:

- •

  **4**: RPM v4 format

- •

  **6**: RPM v6 format

**%\_source\_filedigest\_algorithm** *HASHALGO*

The algorithm to use for generating per-file checksums (aka digests) of source packages. See [**rpm-config**(5)](/rpm-config/5.md) for the supported values.

**%\_source\_payload**

The IO method and compression to use for generating the payload of source packages. See [**rpm-payloadflags**(7)](/rpm-payloadflags/7.md).

**%\_\_gpg\_reserved\_space** *NUMBER*

The number of bytes to reserve for signatures in the signature header. This reserve helps to speed up package signing significantly.

### Debuginfo generation

Debuginfo sub-packages contain information necessary to debug otherwise release-specification builds with a debugger. These settings determine whether debuginfo packages are generated and various aspects of the generated debugging information.

**%\_build\_id\_links** *MODE*

Defines how and if build\_id links are generated for ELF files. The following settings are supported:

- •

  **none**: No build\_id links are generated.

- •

  **alldebug**: Generate rpm \< 4.14 style build\_id links, ie everything in the -debuginfo package.

- •

  **separate**: Generate build\_id links in binary packages.

- •

  **compat**: Same as **separate** but with a compatibility link(s) in the -debuginfo packages.

**%\_debuginfo\_subpackages** *BOOLEAN*

Whether rpm should create separate debuginfo packages for each subpackage.

**%\_debugsource\_packages** *BOOLEAN*

Whether rpm should put debug source files into their own subpackage.

**%\_enable\_debug\_packages** *BOOLEAN*

Whether rpm should generate debuginfo subpackages.

**%\_include\_gdb\_index** *BOOLEAN*

Include a .gdb\_index section in the .debug files. Requires **%\_enable\_debug\_packages** to be enabled and [**gdb-add-index**(1)](/gdb-add-index/1.md) to be installed.

**%\_include\_minidebuginfo** *BOOLEAN*

Include minimal debug information in build binaries. Requires **%\_enable\_debug\_packages** to be enabled.

**%\_no\_recompute\_build\_ids** *BOOLEAN*

Disable recomputation of build-ids. Cannot be used with **%\_unique\_build\_ids**.

**%\_unique\_build\_ids** *BOOLEAN*

Whether build-ids should be made unique between package version/releases when generating debuginfo packages.

**%\_unique\_debug\_names** *BOOLEAN*

Whether .debug files should be made unique between package version, release and architecture. Requires **%\_unique\_build\_ids** to be enabled.

**%\_unique\_debug\_srcs** *BOOLEAN*

Whether the /usr/debug/src/\<package\> directories should be unique between package version, release and architecture.

**%\_\_find\_debuginfo** *EXECUTABLE*

The location of the debuginfo helper executable.

### Legacy compatibility

These settings deal with several decades of backwards compatibility. Most of them determine whether a particular issue is considered an error or just a warning. Sometimes also useful for temporarily working around issues while packaging.

**%\_binaries\_in\_noarch\_packages\_terminate\_build** *BOOLEAN*

Whether ELF binaries in noarch packages should terminate a build.

**%\_duplicate\_files\_terminate\_build** *BOOLEAN*

Whether duplicate files in **%files** section should terminate a build.

**%\_empty\_manifest\_terminate\_build** *BOOLEAN*

Whether an empty **%files** manifest file should terminate a build.

**%\_invalid\_encoding\_terminates\_build** *BOOLEAN*

Whether a non-UTF8 encoding in package data should terminate a build.

**%\_\_find\_provides** *EXECUTABLE*

The executable to use for rpm 3.x style provides generation. Do not use. Deprecated and scheduled for removal.

**%\_\_find\_requires** *EXECUTABLE*

The executable to use for rpm 3.x style requires generation. Do not use. Deprecated and scheduled for removal.

**%\_missing\_build\_ids\_terminate\_build** *BOOLEAN*

Whether ELF files without build-ids should terminate a build. For historical reasons, this is only applicable if **%\_enable\_debug\_packages** is also enabled.

**%\_missing\_doc\_files\_terminate\_build** *BOOLEAN*

Whether missing %doc files in the build directory should terminate a build.

**%\_unpackaged\_files\_terminate\_build** *BOOLEAN*

Whether unpackaged files in a build root should terminate a build.

**%\_nonzero\_exit\_pkgcheck\_terminate\_build** *BOOLEAN*

Whether the build of packages should fail if package checker (if defined) returns an error? See the **%\_build\_pkgcheck\_\*** macros.

**%\_use\_internal\_dependency\_generator** *BOOLEAN*

If enabled, use rpm 3.x style dependency generation. Do not use. Deprecated and scheduled for removal.

**%\_use\_weak\_usergroup\_deps** *BOOLEAN*

If enabled, dilute user() and group() requires into recommends. Useful when transitioning to sysusers.d based user/group management.

**%\_wrong\_version\_format\_terminate\_build** *BOOLEAN*

Whether invalid version format in dependencies etc should terminate a build.

## SEE ALSO

[**rpmbuild**(1)](/rpmbuild/1.md), [**rpm-common**(8)](/rpm-common/8.md), [**rpm-macrofile**(5)](/rpm-macrofile/5.md), [**rpm-rpmrc**(5)](/rpm-rpmrc/5.md), [**rpm-config**(5)](/rpm-config/5.md), [**rpm-payloadflags**(7)](/rpm-payloadflags/7.md) [**rpm-macros**(7)](/rpm-macros/7.md)
