Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

rpm

rpm builds an RPM package with rpmbuild. It is available only on Linux. See the format overview for tools and architecture names.

Cargo.toml requirements

FieldRequirement
package.nameASCII letters are lowercased. _ becomes -. Use letters, digits, ., + and -. The first character is a letter or digit.
package.descriptionRequired and single-line. Used as Summary:.
package.licenseRequired and single-line.
package.authors[0]Optional. Used as Vendor:.
package.repositoryOptional. Used as URL:.

Config

Set the shared Linux fields in [linux] as shown in Linux settings, then add options under [formats.rpm].

OptionDefaultDescription
extra-requires[]Extra Requires: lines. Keep entries on one line.
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application"
categories = "Utility"

[formats.rpm]
extra-requires = ["bash", "ca-certificates"]

Install-file roles control the generated file list. See Install files.

Version and output

The Cargo version becomes the RPM version. A suffix after the first - becomes the release: 0.1.0-beta.1 produces version 0.1.0 and release 0.beta.1. Without a suffix, the release is 1. rpmbuild chooses the exact filename, including any .<dist>. part:

myapp-0.1.0-1.<dist>.x86_64.rpm