RPM Packaging Guide
This is an RPM Packaging Guide.
Many of the guides I have found around the internet are either too detailed, not detailed enough, or are simply showing their age and contain old, incorrect or outdated information. My hope here is to provide a guide that can be maintained and expanded upon over time.
The document is now being converted to AsciiDoc and its draft is published at https://rpm-packaging-guide.github.io/. Note that this is a work in progress.
You can find the document topic pages in
source in this git repository. The
rhel directories contain index pages for an upstream community
version and a RHEL 7 downstream version, respectively.
In order to render it, first make sure you have asciidoctor installed.
To render the community version, run:
To render the RHEL 7 version, run:
The publishing mechanism uses a single configuration file in
and is based on a GitHub+Travis CI+Asciidoctor container+GitHub
Pages toolchain, an idea taken from
Each commit pushed to the
publish branch automatically triggers a community
version build, so you don't need an extra tool installed locally in order to
publish an update to the document. When the Asciidoctor container running in
Travis CI successfully finishes the build, Travis CI pushes the resulting HTML
and PDF to a staging repo
and GitHub Pages then publishes the HTML and PDF to
To make licensing easier, license headers in the source files will be a single line reference to Unique License Identifiers as defined by the Linux Foundation's SPDX project.
For example, in a source file the full "GPL v2.0 or later" header text will be replaced by a single line:
Or alternatively, in a source file the full "CC-BY-SA-4.0" header text will be replaced by a single line:
the license terms of all files in the source tree should be defined by such License Identifiers; in no case a file can contain more than one such License Identifier list.
SPDX-License-Identifier: line references more than one Unique
License Identifier, then this means that the respective file can be
used under the terms of either of these licenses, i. e. with
SPDX-License-Identifier: GPL-2.0+ LGPL-2.1+
All SPDX Unique License Identifiers available here.