RPM Package Manager

Last updated
RPM Package Manager (RPM)
Original author(s) Erik Troan, Marc Ewing, [1] Red Hat
Developer(s) Community & Red Hat [2] [3]
Initial release1997;26 years ago (1997) [1]
Stable release
4.19.1 / 12 December 2023;11 days ago (2023-12-12)
Repository
Written in C, Perl [4]
Operating system Linux, Unix-like
Available in40 languages [5]
Type Package management system
License GPL
Website rpm.org

RPM Package Manager (RPM) (originally Red Hat Package Manager, now a recursive acronym) is a free and open-source package management system. [6] The name RPM refers to the .rpm file format and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base.

Contents

Although it was created for use in Red Hat Linux, RPM is now used in many Linux distributions such as PCLinuxOS, Fedora, AlmaLinux, CentOS, openSUSE, OpenMandriva and Oracle Linux. It has also been ported to some other operating systems, such as Novell NetWare (as of version 6.5 SP3), IBM's AIX (as of version 4), [7] IBM i, [8] and ArcaOS. [9]

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 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).

History

RPM was originally written in 1997 by Erik Troan and Marc Ewing, [1] based on pms, rpp, and pm experiences.

pm was written by Rik Faith and Doug Hoffman in May 1995 for Red Hat Software, its design and implementations influenced greatly by pms, a package management system by Faith and Kevin Martin in the fall of 1993 for the Bogus Linux Distribution. pm preserves the "Pristine Sources + patches" paradigm of pms, while adding features and eliminating arbitrary limitations present in the implementation. pm provides greatly enhanced database support for tracking and verifying installed packages. [4] [10] [11]

Features

For a system administrator 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 as the backend database although since 4.15 in 2019, it supports building rpm packages without Berkeley DB (–disable-bdb). [12]

Features of RPM include:

Local operations

Packages may come from within a particular distribution (for example Red Hat Enterprise Linux) or be built for it by other parties (for example RPM Fusion for Fedora Linux). [13] Circular dependencies among mutually dependent RPMs (so-called "dependency hell") can be problematic; [14] 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:

Local RPM installation database

Working behind the scenes of the package manager is the RPM database, stored in /var/lib/rpm. It uses Berkeley DB as its back-end. It consists of a single database (Packages) 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 rpm --rebuilddb command. [17]

Description

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:

<name>-<version>-<release>.src.rpm for source packages, or
<name>-<version>-<release>.<architecture>.rpm for binaries.

For example, in the package filename libgnomeuimm-2.0-2.0.0_3.i386.rpm, the <name> is libgnomeuimm, the <version> is 2.0, the <release> is 2.0.0_3, and the <architecture> is i386. The associated source package would be named libgnomeuimm-2.0-2.0.0_3.src.rpm

RPMs with the noarch.rpm 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:

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: [6]

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). [21]

Forks

As of June 2010, 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 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, Red Hat Enterprise Linux and derivatives, openSUSE, SUSE Linux Enterprise, Unity Linux, Mageia, [22] OpenEmbedded, Tizen and OpenMandriva Lx (formerly Mandriva).

RPM v5 (Defunct)

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 was used by distributions such as Wind River Linux (until Wind River Linux 10), Rosa Linux, and OpenMandriva Lx (former Mandriva Linux which switched to rpm5 in 2011 [23] ) and also by the OpenPKG project which provides packages for other common UNIX-platforms.

OpenMandriva Lx has switched back to rpm.org [24] for 4.0 release.[ needs update ]

OpenEmbedded, the last major user of RPM5, switched back to rpm.org due to issues in RPM5. [25] [26]

See also

Related Research Articles

<span class="mw-page-title-main">Linux distribution</span> Operating system based on the Linux kernel

A Linux distribution 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 one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to powerful supercomputers.

<span class="mw-page-title-main">Mandriva Linux</span> Linux distribution

Mandriva Linux is a discontinued Linux distribution developed by Mandriva S.A.

<span class="mw-page-title-main">Red Hat Linux</span> Linux distribution

Red Hat Linux was a widely used commercial open-source Linux distribution created by Red Hat until its discontinuation in 2004.

yum (software) Free and open-source command-line package management utility

The Yellowdog Updater Modified (YUM) is a free and open-source command-line package-management utility for computers running the Linux operating system using the RPM Package Manager. Though YUM has a command-line interface, several other tools provide graphical user interfaces to YUM functionality.

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 the RPM Package Manager and adds advanced features such as automatic dependency resolution. The file /etc/sysconfig/rhn/sources specifies where up2date will search for packages.

Technical variations of Linux distributions include support for different hardware devices and systems or software package configurations. Organizational differences may be motivated by historical reasons. Other criteria include security, including how quickly security upgrades are available; ease of package management; and number of packages available.

<span class="mw-page-title-main">Red Hat Enterprise Linux derivatives</span>

Red Hat Enterprise Linux derivatives are Linux distributions that are based on the source code of Red Hat Enterprise Linux (RHEL).

openSUSE Community-supported Linux distribution

openSUSE is a free and open source Linux distribution developed by the openSUSE project. It is offered in two main variations: Tumbleweed, an upstream rolling release distribution, and Leap, a stable release distribution which is sourced from SUSE Linux Enterprise.

BioLinux is a term used in a variety of projects involved in making access to bioinformatics software on a Linux platform easier using one or more of the following methods:

<span class="mw-page-title-main">Fedora Linux</span> Linux distribution by Fedora Project

Fedora Linux is a Linux distribution developed by the Fedora Project. It was originally developed in 2003 as a continuation of the Red Hat Linux project. It contains software distributed under various free and open-source licenses and aims to be on the leading edge of open-source technologies. It is now the upstream source for CentOS Stream and Red Hat Enterprise Linux.

<span class="mw-page-title-main">Liberation fonts</span> Open-source font superfamily

Liberation is the collective name of four TrueType font families: Liberation Sans, Liberation Sans Narrow, Liberation Serif, and Liberation Mono. These fonts are metrically compatible with the most popular fonts on the Microsoft Windows operating system and the Microsoft Office software package, for which Liberation is intended as a free substitute. The fonts are default in LibreOffice.

<span class="mw-page-title-main">ZYpp</span> Linux package management library

ZYpp 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 basic package managers, it provides a satisfiability solver to compute package dependencies. It is a free and open-source software project sponsored by SUSE and licensed under the terms of the GNU General Public License v2 or later. ZYpp is implemented mostly in the programming language C++.

<span class="mw-page-title-main">Linux-libre</span> Version of the Linux kernel without proprietary code

According to the Free Software Foundation Latin America, Linux-libre is a modified version of the Linux kernel that contains no binary blobs, obfuscated code, or code released under proprietary licenses. In the Linux kernel, they are mostly used for proprietary firmware images. While generally redistributable, binary blobs do not give the user the freedom to audit, modify, or, consequently, redistribute their modified versions. The GNU Project keeps Linux-libre in synchronization with the mainline Linux kernel.

<span class="mw-page-title-main">KVIrc</span> IRC Client

KVIrc is a graphical IRC client for Linux, Unix, Mac OS and Windows. The name is an acronym of K Visual IRC in which the K stands for a dependency to KDE, which became optional from version 2.0.0. The software is based on the Qt framework and its code is released under a modified GNU General Public License.

A delta update is a software update that requires the user to download only those parts of the software's code that are new, or have been changed from their previous state, in contrast to having to download the entire program. The use of delta updates can save significant amounts of time and computing bandwidth. The name "delta" derives from the mathematical science use of the Greek letter delta, Δ or δ to denote change.

Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

dracut (software) Software to automate the Linux boot process

Dracut is a set of tools that provide enhanced functionality for automating the Linux boot process. The tool named dracut is used to create a Linux boot image (initramfs) by copying tools and files from an installed system and combining it with the Dracut framework, which is usually found in /usr/lib/dracut/modules.d.

<span class="mw-page-title-main">DNF (software)</span> RPM package manager

DNF or Dandified YUM is the next-generation version of the Yellowdog Updater, Modified (yum), a package manager for .rpm-based Linux distributions. DNF was introduced in Fedora 18 in 2013; it has been the default package manager since Fedora 22 in 2015, Red Hat Enterprise Linux 8, and OpenMandriva, and is also an alternative package manager for Mageia.

References

  1. 1 2 3 "RPM timeline". rpm.org. Retrieved 2020-06-25.
  2. "RPM -- plans, goals, etc". Max Spevack. Retrieved 2011-01-20.
  3. "RPM.org FAQ". Archived from the original on 2016-11-05. Retrieved 2013-08-25.
  4. 1 2 Bailey, Edward C. (2000). "Chapter 1: An Introduction to Package Management". Maximum RPM: Taking the Red Hat Package Manager to the Limit. Red Hat, Inc. pp. 22–25. ISBN   978-1888172782. Archived from the original on 2016-09-10. Retrieved 2013-08-13.
  5. "po/LINGUAS". GitHub. 2022-04-23.
  6. 1 2 Bailey, Edward C. (2000). "Appendix A: Format of the RPM File". Maximum RPM: Taking the Red Hat Package Manager to the Limit. Red Hat, Inc. pp. 325–336. ISBN   978-1888172782. Archived from the original on 2016-04-21. Retrieved 2010-11-22.
  7. "Configuring YUM and creating local repositories on IBM AIX". 2018-10-24.
  8. "RPM and Yum are a big deal for IBM i. Here's why". 2018-07-18.
  9. "Package Manager" . Retrieved 2020-09-04.
  10. "RPM Guide-RPM - Design Goals". Archived from the original on 2014-03-21. Retrieved 2014-04-14.
  11. "BOGUS Announce" . Retrieved 2014-04-14.
  12. "rpm4 was support for building rpm without Berkeley DB (–disable-bdb)". The FreeBSD Forums. 2020-01-29. Retrieved 2023-09-18.
  13. "RPM Fusion". rpmfusion.org. Retrieved 2010-11-22.
  14. "An Analysis of RPM Validation Drift" (PDF). USENIX Association. Retrieved 2011-03-15.
  15. "Zypper - MeeGo wiki". Archived from the original on 2013-09-25. Retrieved 2014-04-14.
  16. "FAQs: About the Projects". Ark Linux Official Site. Archived from the original on 2012-02-11. Retrieved 2014-04-14.
  17. "Repair an RPM database safely". Archived from the original on 2019-08-06. Retrieved 2011-11-11.
  18. "Supplemental Packaging Software". Fedora Project. Archived from the original on 2016-03-10. Retrieved 2011-11-11.
  19. "Switch RPMs to zstd compression". Fedora Project (Wiki). Retrieved 2019-06-02.
  20. "[PATCH] Add lzip support". Archived from the original on 2016-03-04. Retrieved 2013-10-24.
  21. "How to package proprietary software". 10 December 2014. Retrieved 2018-07-02.
  22. "Mageia 3 Release Notes: Package management". mageia.org. 2013-05-19. Retrieved 2014-04-14.
  23. Bodnar, Ladislav & Smith, Jesse (2010-11-22). "DistroWatch Weekly". DistroWatch . Retrieved 2010-11-22.
  24. "Forum: Switching to RPMv4" . Retrieved 2018-03-03.
  25. "YP Core - Pyro 2.3". Yocto Project. 2017-05-12. Archived from the original on 2017-12-05. Retrieved 2017-12-04.{{cite web}}: CS1 maint: bot: original URL status unknown (link)()
  26. "[Openembedded-architecture] Changes that switching from smart to dnf will cause". Yocto Project. 2017-02-14. Retrieved 2018-11-04.