RPM Package Manager (RPM) (originally Red Hat Package Manager, now a
recursive acronym
A recursive acronym is an acronym that refers to itself, and appears most frequently in computer programming. The term was first used in print in 1979 in Douglas Hofstadter's book '' Gödel, Escher, Bach: An Eternal Golden Braid'', in which Hof ...
) is a
free and open-source
Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
package management system
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals w ...
.
The name RPM refers to the
file format
A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
and the package manager program itself. RPM was intended primarily for
Linux distribution
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading on ...
s; the file format is the baseline package format of the
Linux Standard Base
The Linux Standard Base (LSB) was a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the software system structure, including the Filesystem Hierarchy Standard used in the Li ...
.
Although it was created for use in
Red Hat Linux
Red Hat Linux was a widely used commercial open-source Linux distribution created by Red Hat until its discontinuation in 2004.
Early releases of Red Hat Linux were called Red Hat Commercial Linux. Red Hat published the first non-beta release ...
, RPM is now used in many
Linux distributions
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading on ...
such as
PCLinuxOS
PCLinuxOS, often shortened to PCLOS, is an x86-64 Linux distribution, with KDE Plasma Desktop, MATE and XFCE as its default user interfaces. It is primarily free software operating system for personal computers aimed at ease of use. It is cons ...
,
Fedora
A fedora () is a hat with a soft brim and indented crown.Kilgour, Ruth Edwards (1958). ''A Pageant of Hats Ancient and Modern''. R. M. McBride Company. It is typically creased lengthwise down the crown and "pinched" near the front on both sides ...
,
AlmaLinux
AlmaLinux is a free and open source Linux distribution, created originally by CloudLinux to provide a community-supported, production-grade enterprise operating system that is binary-compatible with Red Hat Enterprise Linux (RHEL). The first st ...
,
CentOS,
openSUSE
openSUSE () is a free and open source RPM-based Linux distribution developed by the openSUSE project.
The initial release of the community project was a beta version of SUSE Linux 10.0.
Additionally the project creates a variety of tools, s ...
,
OpenMandriva
OpenMandriva Lx is a Linux distribution forked from Mandriva Linux. It is maintained by the OpenMandriva Association.
History Origin of the distribution
OpenMandriva Lx is a community Linux distribution. Originally an offering of Mandriva Linux ...
and
Oracle Linux
Oracle Linux (abbreviated OL, formerly known as Oracle Enterprise Linux or OEL) is a Linux distribution packaged and freely distributed by Oracle, available partially under the GNU General Public License since late 2006. It is compiled from Red ...
. It has also been ported to some other
operating systems
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
, such as
Novell NetWare
NetWare is a discontinued computer network operating system developed by Novell, Inc. It initially used cooperative multitasking to run various services on a personal computer, using the IPX network protocol.
The original NetWare product in ...
(as of version 6.5 SP3),
IBM's AIX (as of version 4),
IBM i
IBM i (the ''i'' standing for ''integrated'') is an operating system developed by IBM for IBM Power Systems. It was originally released in 1988 as OS/400, as the sole operating system of the IBM AS/400 line of systems. It was renamed to i5/OS i ...
, and
ArcaOS
ArcaOS is an operating system based on OS/2, developed and marketed by Arca Noae, LLC under license from IBM. It was codenamed Blue Lion during its development. It builds on OS/2 Warp 4.52 by adding support for new hardware, fixing defects and l ...
.
An RPM package can contain an arbitrary set of files. Most RPM files are “binary RPMs” (or BRPMs) containing the compiled version of some software. There are also “source RPMs” (or SRPMs) containing the
source code
In computing, source code, or simply code, is any collection of code, with or without comment (computer programming), comments, written using a human-readable programming language, usually as plain text. The source code of a Computer program, p ...
used to build a binary package. These have an appropriate tag in the file header that distinguishes them from normal (B)RPMs, causing them to be extracted to /usr/src on installation. SRPMs customarily carry the file extension “.src.rpm” (.spm on file systems limited to 3 extension characters, e.g. old DOS
FAT
In nutrition, biology, and chemistry, fat usually means any ester of fatty acids, or a mixture of such compounds, most commonly those that occur in living beings or in food.
The term often refers specifically to triglycerides (triple es ...
).
History
RPM was originally written in 1997 by Erik Troan and Marc Ewing,
based on , , and experiences.
was written by Rik Faith and Doug Hoffman in May 1995 for Red Hat Software, its design and implementations influenced greatly by , a package management system by Faith and Kevin Martin in the fall of 1993 for the Bogus Linux Distribution. preserves the "
Pristine Sources
Pristine Sources is a software management concept coined by the developers of the short-lived Bogus Linux distribution and popularized by Marc Ewing, co-founder of Red Hat Inc, after he adopted it and RPM Package Manager as a development philosop ...
+ patches" paradigm of , while adding features and eliminating arbitrary limitations present in the implementation. provides greatly enhanced database support for tracking and verifying installed packages
Features
For a
system administrator
A system administrator, or sysadmin, or admin is a person who is responsible for the upkeep, configuration, and reliable operation of computer systems, especially multi-user computers, such as servers. The system administrator seeks to en ...
performing software installation and maintenance, the use of package management rather than manual building has advantages such as simplicity, consistency and the ability for these processes to be automated and non-interactive. rpm uses
Berkeley DB
Berkeley DB (BDB) is an unmaintained embedded database software library for key/value data, historically significant in open source software. Berkeley DB is written in C with API bindings for many other programming languages. BDB stores arbit ...
as the backend database although since 4.15 in 2019, it supports building rpm packages without Berkeley DB (
–disable-bdb
).
Features of RPM include:
* RPM packages can be cryptographically verified with
GPG and
MD5
* Original source archive(s) (e.g. , ) are included in SRPMs, making verification easier
*
Delta update
A delta update is a software update that only requires the user to download those parts of the software's code which are new, or have been changed from their previous state, in contrast to having to download the entire program. The use of del ...
: PatchRPMs and DeltaRPMs, the RPM equivalent of a
patch
Patch or Patches may refer to:
Arts, entertainment and media
* Patch Johnson, a fictional character from ''Days of Our Lives''
* Patch (''My Little Pony''), a toy
* "Patches" (Dickey Lee song), 1962
* "Patches" (Chairmen of the Board song ...
file, can incrementally update RPM-installed software
* Automatic build-time dependency evaluation.
Local operations
Packages may come from within a particular distribution (for example
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a Commercial software, commercial Open-source software, open-source Linux distribution developed by Red Hat for the commerce, commercial market. Red Hat Enterprise Linux is released in server versions for x86-6 ...
) or be built for it by other parties (for example
RPM Fusion for Fedora Linux). Circular dependencies among mutually dependent RPMs (so-called "
dependency hell Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.
The dependency issue arises when several packages have ...
") can be problematic; in such cases a single installation command needs to specify all the relevant packages.
Repositories
RPMs are often collected centrally in one or more
repositories on the internet. A site often has its own RPM repositories which may either act as local mirrors of such internet repositories or be locally maintained collections of useful RPMs.
Front ends
Several
front-ends to RPM ease the process of obtaining and installing RPMs from repositories and help in resolving their dependencies. These include:
*
yum used in
Fedora Linux
Fedora Linux is a Linux distribution developed by the Fedora Project. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of open-source technologies. Fedora is the upstream (softwa ...
,
CentOS 5 and above,
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a Commercial software, commercial Open-source software, open-source Linux distribution developed by Red Hat for the commerce, commercial market. Red Hat Enterprise Linux is released in server versions for x86-6 ...
5 and above,
Scientific Linux
Scientific Linux (SL) was a Linux distribution produced by Fermilab, CERN, DESY and by ETH Zurich. It is a free and open-source operating system based on Red Hat Enterprise Linux.
This product is derived from the free and open-source software m ...
,
Yellow Dog Linux
Yellow Dog Linux (YDL) is a discontinued free and open-source operating system for high-performance computing on multi-core processor computer architectures, focusing on GPU systems and computers using the POWER7 processor. The original devel ...
and
Oracle Linux
Oracle Linux (abbreviated OL, formerly known as Oracle Enterprise Linux or OEL) is a Linux distribution packaged and freely distributed by Oracle, available partially under the GNU General Public License since late 2006. It is compiled from Red ...
*
DNF, introduced in
Fedora Linux
Fedora Linux is a Linux distribution developed by the Fedora Project. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of open-source technologies. Fedora is the upstream (softwa ...
18 (default since
22),
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a Commercial software, commercial Open-source software, open-source Linux distribution developed by Red Hat for the commerce, commercial market. Red Hat Enterprise Linux is released in server versions for x86-6 ...
8,
AlmaLinux
AlmaLinux is a free and open source Linux distribution, created originally by CloudLinux to provide a community-supported, production-grade enterprise operating system that is binary-compatible with Red Hat Enterprise Linux (RHEL). The first st ...
8, and
CentOS Linux 8.
*
up2date
up2date, also known as the Red Hat Update Agent, is a tool used by older versions of Red Hat Enterprise Linux, CentOS and Fedora Core that downloads and installs new software and upgrades the operating system. It functions as a front-end to th ...
used in
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a Commercial software, commercial Open-source software, open-source Linux distribution developed by Red Hat for the commerce, commercial market. Red Hat Enterprise Linux is released in server versions for x86-6 ...
,
CentOS 3 and 4, and
Oracle Linux
Oracle Linux (abbreviated OL, formerly known as Oracle Enterprise Linux or OEL) is a Linux distribution packaged and freely distributed by Oracle, available partially under the GNU General Public License since late 2006. It is compiled from Red ...
*
Zypper
ZYpp (or libzypp; ''"Zen / YaST Packages Patches Patterns Products"'') is a package manager engine that powers Linux applications like YaST, Zypper and the implementation of PackageKit for openSUSE and SUSE Linux Enterprise. Unlike some more bas ...
used in
Mer (and thus Sailfish OS),
MeeGo
MeeGo is a discontinued Linux distribution hosted by the Linux Foundation, using source code from the operating systems Moblin (produced by Intel) and Maemo (produced by Nokia). Primarily targeted at mobile devices and information appliances ...
,
openSUSE
openSUSE () is a free and open source RPM-based Linux distribution developed by the openSUSE project.
The initial release of the community project was a beta version of SUSE Linux 10.0.
Additionally the project creates a variety of tools, s ...
and
SUSE Linux Enterprise
SUSE Linux Enterprise (often abbreviated to SLE) is a Linux-based operating system developed by SUSE. It is available in two editions, suffixed with Server (SLES) for servers and mainframes, and Desktop (SLED) for workstations and desktop compu ...
*
urpmi used in
Mandriva Linux
Mandriva Linux (a fusion of the French distribution Mandrake Linux and the Brazilian distribution Conectiva Linux) is a discontinued Linux distribution developed by Mandriva S.A.
Each release lifetime was 18 months for base updates (Linux, syst ...
,
ROSA Linux and
Mageia
*
apt-rpm, a port of Debian's
Advanced Packaging Tool
Advanced package tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian, and Debian-based Linux distributions. APT simplifies the process of managing softwar ...
(APT) used in Ark Linux,
PCLinuxOS
PCLinuxOS, often shortened to PCLOS, is an x86-64 Linux distribution, with KDE Plasma Desktop, MATE and XFCE as its default user interfaces. It is primarily free software operating system for personal computers aimed at ease of use. It is cons ...
and
ALT Linux
*
Smart Package Manager, used in Unity Linux, available for many distributions including
Fedora Linux
Fedora Linux is a Linux distribution developed by the Fedora Project. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of open-source technologies. Fedora is the upstream (softwa ...
.
* , a command-line utility available in (for example) Red Hat Enterprise Linux
* , for
Sailfish OS
Sailfish OS is a Linux-based operating system based on free software, and open source projects such as Mer as well as including a closed source UI. The project is being developed by the Finnish company Jolla.
The OS first shipped with the ...
Local RPM installation database
Working behind the scenes of the package manager is the RPM database, stored in . It uses
Berkeley DB
Berkeley DB (BDB) is an unmaintained embedded database software library for key/value data, historically significant in open source software. Berkeley DB is written in C with API bindings for many other programming languages. BDB stores arbit ...
as its back-end. It consists of a single database () containing all of the meta information of the installed RPMs. Multiple databases are created for indexing purposes, replicating data to speed up queries. The database is used to keep track of all files that are changed and created when a user (using RPM) installs a package, thus enabling the user (via RPM) to reverse the changes and remove the package later. If the database gets corrupted (which is possible if the RPM client is
killed), the index databases can be recreated with the command.
Description
Whilst the RPM format is the same across different
Linux distribution
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading on ...
s, 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 script
A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manip ...
s 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
Upstream may refer to:
* Upstream (bioprocess)
* ''Upstream'' (film), a 1927 film by John Ford
* Upstream (networking)
* ''Upstream'' (newspaper), a newspaper covering the oil and gas industry
* Upstream (petroleum industry)
* Upstream (software ...
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
Mandriva Linux (a fusion of the French distribution Mandrake Linux and the Brazilian distribution Conectiva Linux) is a discontinued Linux distribution developed by Mandriva S.A.
Each release lifetime was 18 months for base updates (Linux, syst ...
), "mga" (
Mageia), "fc4" (
Fedora Core
Fedora Linux is a Linux distribution developed by the Fedora Project. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of open-source technologies. Fedora is the upstream source ...
4), "rhl9" (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 lead, which identifies the file as an RPM file and contains some obsolete headers.
* The signature, which can be used to ensure integrity and/or authenticity.
* The header, which contains
metadata including package name, version, architecture, file list, etc.
* A file archive (the
payload
Payload is the object or the entity which is being carried by an aircraft or launch vehicle. Sometimes payload also refers to the carrying capacity of an aircraft or launch vehicle, usually measured in terms of weight. Depending on the nature of ...
), which usually is in
cpio
cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. The software utility was originally intended as a tape archiving program as part of the Programmer's Work ...
format, compressed with
gzip
gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
. The tool enables retrieval of the cpio file without needing to install the RPM package.
** 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
lzip is a free, command-line tool for the compression of data; it employs the Lempel–Ziv–Markov chain algorithm (LZMA) with a user interface that is familiar to users of usual Unix compression tools, such as gzip and bzip2.
Like gzip ...
, or
lzma compression.
** RPM 5.0 format supports using
xar Xar may refer to:
* Xar (graphics), a file format used with vector graphics
* XAR, a file archiver and its associated file format
* Michael Portnoy, who uses the stage name XAR
* The ICAO
The International Civil Aviation Organization (ICAO ...
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
, there are two versions of RPM in development: one led by the Fedora Project and Red Hat, and the other by a separate group led by a previous
maintainer
Maintenance may refer to:
Biological science
* Maintenance of an organism
* Maintenance respiration
Non-technical maintenance
* Alimony, also called ''maintenance'' in British English
* Champerty and maintenance, two related legal doctrine ...
of RPM, a former employee of Red Hat.
RPM.org
The ''rpm.org'' community's first major code revision was in July 2007; version 4.8 was released in January 2010, version 4.9 in March 2011, 4.10 in May 2012, 4.11 in January 2013, 4.12 in September 2014 and 4.13 in July 2015.
This version is used by distributions such as
Fedora Linux
Fedora Linux is a Linux distribution developed by the Fedora Project. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of open-source technologies. Fedora is the upstream (softwa ...
,
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a Commercial software, commercial Open-source software, open-source Linux distribution developed by Red Hat for the commerce, commercial market. Red Hat Enterprise Linux is released in server versions for x86-6 ...
and
derivatives
The derivative of a function is the rate of change of the function's output relative to its input value.
Derivative may also refer to:
In mathematics and economics
*Brzozowski derivative in the theory of formal languages
*Formal derivative, an ...
,
openSUSE
openSUSE () is a free and open source RPM-based Linux distribution developed by the openSUSE project.
The initial release of the community project was a beta version of SUSE Linux 10.0.
Additionally the project creates a variety of tools, s ...
,
SUSE Linux Enterprise
SUSE Linux Enterprise (often abbreviated to SLE) is a Linux-based operating system developed by SUSE. It is available in two editions, suffixed with Server (SLES) for servers and mainframes, and Desktop (SLED) for workstations and desktop compu ...
,
Unity Linux,
Mageia,
OpenEmbedded
OpenEmbedded is a build automation framework and cross-compile environment used to create Linux distributions for embedded devices. The OpenEmbedded framework is developed by the OpenEmbedded community, which was formally established in 2003. O ...
,
Tizen
Tizen () is a Linux-based mobile operating system backed by the Linux Foundation, mainly developed and used primarily by Samsung Electronics.
The project was originally conceived as an HTML5-based platform for mobile devices to succeed MeeGo ...
and
OpenMandriva Lx (formerly
Mandriva
Mandriva S.A. was a public software company specializing in Linux and open-source software. Its corporate headquarters was in Paris, and it had development centers in Metz, France and Curitiba, Brazil. Mandriva, S.A. was the developer and mainta ...
).
RPM v5
Jeff Johnson, the RPM maintainer since 1999, continued development efforts together with participants from several other distributions. RPM version 5 was released in May 2007.
This version is used by distributions such as
Wind River Linux (until Wind River Linux 10), Rosa Linux, and
OpenMandriva Lx (former
Mandriva Linux
Mandriva Linux (a fusion of the French distribution Mandrake Linux and the Brazilian distribution Conectiva Linux) is a discontinued Linux distribution developed by Mandriva S.A.
Each release lifetime was 18 months for base updates (Linux, syst ...
which switched to rpm5 in 2011) and also by the
OpenPKG project which provides packages for other common UNIX-platforms.
OpenMandriva Lx is going to switch back to rpm.org for 4.0 release.
OpenEmbedded
OpenEmbedded is a build automation framework and cross-compile environment used to create Linux distributions for embedded devices. The OpenEmbedded framework is developed by the OpenEmbedded community, which was formally established in 2003. O ...
, the last major user of RPM5, switched back to rpm.org due to issues in RPM5.
See also
*
Autopackage — a "complementary" package management system
*
Delta ISO — an ISO image which contains RPM Package Manager files
*
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is a ...
— package management system used by Debian and its derivatives
*
List of RPM-based Linux distributions
*
pkg-config
pkg-config is a computer program that defines and supports a unified interface for querying installed libraries for the purpose of compiling software that depends on them. It allows programmers and installation scripts to work without explicit kn ...
— queries libraries to compile software from its source code
References
*
External links
RPM.org project home pageRPM and DPKG command reference
The story of RPMby Matt Frye i
Red Hat Magazine
Video tutorials for Building and Patching the RPMsPackaging software with RPM, Part 1: Building and distributing packages
{{DEFAULTSORT:Rpm Package Manager
Archive formats
Free package management systems
Linux package management-related software
Red Hat software