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
| Field | Requirement |
|---|---|
package.name | ASCII letters are lowercased. _ becomes -. Use letters, digits, ., + and -. The first character is a letter or digit. |
package.description | Required and single-line. Used as Summary:. |
package.license | Required and single-line. |
package.authors[0] | Optional. Used as Vendor:. |
package.repository | Optional. Used as URL:. |
Config
Set the shared Linux fields in [linux] as shown in
Linux settings, then add options under [formats.rpm].
| Option | Default | Description |
|---|---|---|
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