RPM Package Manager

RPM Package Manager (RPM)
Original author(s) Erik Troan, Marc Ewing,[1] Red Hat
Developer(s) Community & Red Hat[2][3]
Initial release 1997 (1997)[1]
Stable release 4.13 / 5 August 2015 (2015-08-05)
Written in C, Perl[4]
Operating system Linux, Unix-like
Type Package management system
License GPL
Website www.rpm.org

RPM Package Manager (RPM) (originally Red Hat Package Manager; now a recursive acronym) is a package management system.[5] The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base.

Even though it was created for use in Red Hat Linux, RPM is now used in many Linux distributions. It has also been ported to some other operating systems, such as Novell NetWare (as of version 6.5 SP3) and IBM's AIX (as of version 4).

An RPM package can contain an arbitrary set of files. The larger part of RPM files encountered are “binary RPMs” (or BRPMs) containing the compiled version of some software. There are also “source RPMs” (or SRPMs) files containing the source code used to produce a 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(1), 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][6][7]

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.

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).[8] Circular dependencies among mutually dependent RPMs (so-called "dependency hell") can be problematic;[9] 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.[12]

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 in the format:

<name>-<version>-<release>.<architecture>.rpm

such as:

libgnomeuimm-2.0-2.0.0-3.i386.rpm

where <name> is libgnomeuimm-2.0.

Source code may also be distributed in RPM packages; the <architecture> part is specified as src:

libgnomeuimm-2.0-2.0.0-3.src.rpm

RPMs with the noarch.rpm extension refer to packages which do not depend on a certain computer's architecture. These include graphics and text for another program to use, and programs written in interpreted programming languages such as Python programs and shell scripts.

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.

Format

The format is binary and consists of four sections:[5]

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 may contain only scripts that are architecture-independent. In such a case only an SRPM may be available; this is still an installable RPM.

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, Red Hat Enterprise Linux, openSUSE and SUSE Linux Enterprise, Unity Linux, Mageia,[15] and formerly Mandriva (until 2010).

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, Rosa Linux, and OpenMandriva Lx (former Mandriva Linux which switched to rpm5 in 2011[16]) and also by the OpenPKG project which provides packages for other common UNIX-platforms. OpenMandriva Lx considered switching back to rpm.org[17] before folding.

See also

References

  1. 1 2 3 "RPM Project Roadmap". rpm5.org. Retrieved 2011-12-11.
  2. "RPM -- plans, goals, etc.". Max Spevack <mspevack redhat com>. Retrieved 2011-01-20.
  3. "RPM.org FAQ". 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. Retrieved 2013-08-13.
  5. 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. Retrieved 2010-11-22.
  6. "RPM Guide-RPM - Design Goals". Retrieved 2014-04-14.
  7. "BOGUS Announce". Retrieved 2014-04-14.
  8. "RPM Fusion". rpmfusion.org. Retrieved 2010-11-22.
  9. "An Analysis of RPM Validation Drift" (PDF). USENIX Association. Retrieved 2011-03-15.
  10. "Zypper - MeeGo wiki". Retrieved 2014-04-14.
  11. "FAQs: About the Projects". Ark Linux Official Site. Archived from the original on 2012-02-11. Retrieved 2014-04-14.
  12. "Repair an RPM database safely". Retrieved 2011-11-11.
  13. "Supplemental Packaging Software". Fedora Project. Retrieved 2011-11-11.
  14. "Add lzip support". Retrieved 2013-10-24.
  15. "Mageia 3 Release Notes: Package management". mageia.org. 2013-05-19. Retrieved 2014-04-14.
  16. Bodnar, Ladislav & Smith, Jesse (2010-11-22). "DistroWatch Weekly". DistroWatch. Retrieved 2010-11-22.
  17. "Sailfish Alliance? Also some plans and thoughts of where to go in future direction..". Retrieved 2016-04-06.

External links

This article is issued from Wikipedia - version of the Thursday, May 05, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.