#rpm #cli #changelog #specification #config-file #gzip #usr-share #manpage #rpms

app rpm-builder

A simple Rust CLI utility for creating simple RPMs

2 unstable releases

Uses new Rust 2024

0.2.0 Sep 17, 2025
0.1.0 Sep 17, 2025

#147 in Compression

Apache-2.0

32KB
433 lines

rpm-builder

Build rpms without SPEC files. This is written in pure Rust, so it should be easy to do static linking.

Example

rpm-builder \
  --exec-file "path/to/binary:/usr/bin/awesome-bin" \
  --config-file "path/to/config-file:/etc/awesome/config.json" \
  --doc-file "path/to/doc-file:/usr/share/man/awesome/manpage.1.gz" \
  --compression gzip \
  --changelog "me:was awesome, eh?:2018-01-02" \
  --changelog "you:yeah:2018-01-02" \
  --requires "wget >= 1.0.0" \
  --obsoletes "rpmbuild" \
  awesome
# creates a file called awesome.rpm in version 1.0.0, release 1, license is MIT.

Additional Flags

Flag Description
arch Specify the target architecture
changelog Add a changelog entry to the rpm. The entry has the form <author>:<content>:<yyyy-mm-dd> (time is in utc)
compression Specify the compression algorithm. Currently only gzip, zstd, and "none" are supported
config-file Add a config-file to the rpm
conflicts Indicates that the rpm conflicts with another package. Use the format ` [>
summary Give a basic description of the package (will also be used for package "description")
dir Add a directory and all its files to the rpm
doc-dir Add a directory of documentation and all its files to the rpm
enhances Indicates that the rpm enhances another package. Use the format ` [>
config-dir Add a directory of config files to the rpm
doc-file Add a documentation-file to the rpm
exec-file Add a executable-file to the rpm
file Add a regular file to the rpm
license Specify a license
name Specify the name of your package
obsoletes Indicates that the rpm obsoletes another package. Use the format ` [>
out Specify an out file
provides Indicates that the rpm provides another package. Use the format ` [>
release Specify release number of the package
recommends Indicates that the rpm recommends another package. Use the format ` [>
requires Indicates that the rpm requires another package. Use the format ` [>
version Specify a version
sign-with-pgp-asc Sign package with the specified pgp key
suggests Indicates that the rpm suggests another package. Use the format ` [>
supplements Indicates that the rpm supplements another package. Use the format ` [>

Dependencies

~32MB
~553K SLoC