Whilst the RPM format is the same across different
Linux distributions, the detailed conventions and guidelines may vary across them.
Package filename and label An RPM is delivered in a single file, normally with a filename in the format: : for source packages, or : for binaries. For example, in the package filename , the is , the is , the is , and the is . The associated source package would be named RPMs with the extension do not depend on a particular CPU architecture. For example, these RPMs may contain graphics and text for other programs to use. They may also contain
shell scripts or programs written in other interpreted programming languages such as
Python. The RPM contents also include a
package label, which contains the following pieces of information: • software name • software version (the version taken from original
upstream source of the software) • package release (the number of times the package has been rebuilt using the same version of the software). This field is also often used for indicating the specific distribution the package is intended for by appending strings like "mdv" (formerly, "mdk") (
Mandriva Linux), "mga" (
Mageia), "fc4" (
Fedora Core 4), "rh9" (
Red Hat Linux 9), "suse100" (
SUSE Linux 10.0) etc. • architecture for which the package was built (i386, i686, x86_64, ppc, etc.) The package label fields do not need to match the filename.
Library packaging Libraries are distributed in two separate packages for each version. One contains the precompiled code for use at run-time, while the second one contains the related development files such as headers, etc. Those packages have "-devel" appended to their name field. The system administrator should ensure that the versions of the binary and development packages match.
Binary format The format is binary and consists of four sections: • The Linux Standard Base requires the use of gzip, but Fedora 30 packages are
xz-compressed and Fedora 31 packages might be
zstd-compressed. Recent versions of RPM can also use
bzip2,
lzip, or
lzma compression. • RPM 5.0 format supports using
xar for archiving.
SPEC file The "Recipe" for creating an RPM package is a spec file. Spec files end in the ".spec" suffix and contain the package name, version, RPM revision number, steps to build, install, and clean a package, and a changelog. Multiple packages can be built from a single RPM spec file, if desired. RPM packages are created from RPM spec files using the rpmbuild tool. Spec files are usually distributed within SRPM files, which contain the spec file packaged along with the source code.
SRPM A typical RPM is pre-compiled software ready for direct installation. The corresponding source code can also be distributed. This is done in an SRPM, which also includes the "SPEC" file describing the software and how it is built. The SRPM also allows the user to compile, and perhaps modify, the code itself. A software package could contain only platform independent scripts. In such a case, the developer could provide only an SRPM, which is still an installable RPM.
NOSRC This is a special version of SRPM. It contains "SPEC" file and optionally patches, but does not include sources (usually because of license). == Forks ==