RPM Package Manager
Encyclopedia
RPM Package Manager is a package management system
Package management system
In software, a package management system, also called package manager, is a collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages for a computer's operating system in a consistent manner...

. The name RPM variously refers to the .rpm file format
File format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...

, files in this format, software packaged in such files, and the package manager itself. RPM was intended primarily for GNU/Linux distributions; the file format is the baseline package format of the Linux Standard Base
Linux Standard Base
The Linux Standard Base is 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, used with Linux operating system...

.

Originally developed by Ethan "E$" Cohen at Red Hat
Red Hat
Red Hat, Inc. is an S&P 500 company in the free and open source software sector, and a major Linux distribution vendor. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North Carolina with satellite offices worldwide....

 for Red Hat Linux
Red Hat Linux
Red Hat Linux, assembled by the company Red Hat, was a popular Linux based operating system until its discontinuation in 2004.Red Hat Linux 1.0 was released on November 3, 1994...

, RPM is now used by many GNU/Linux distributions. It has also been ported to some other operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s, such as Novell NetWare
Novell NetWare
NetWare is a network operating system developed by Novell, Inc. It initially used cooperative multitasking to run various services on a personal computer, with network protocols based on the archetypal Xerox Network Systems stack....

 (as of version 6.5 SP3) and IBM's AIX
AIX operating system
AIX AIX AIX (Advanced Interactive eXecutive, pronounced "a i ex" is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms...

 as of version 4.

Whereas an RPM typically contains the compiled version of the software, an SRPM contains either the source code corresponding to that RPM or the scripts of a non-compiled software package.

Originally standing for Red Hat Package Manager, RPM now stands for "RPM Package Manager", a recursive acronym
Recursive acronym
A recursive acronym is an acronym or initialism that refers to itself in the expression for which it stands...

.

Features

For a system administrator
System administrator
A system administrator, IT systems administrator, systems administrator, or sysadmin is a person employed to maintain and operate a computer system and/or network...

 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.

A typical RPM repository
Software repository
A software repository is a storage location from which software packages may be retrieved and installed on a computer.- Discussion :Many software publishers and other organizations maintain servers on the Internet for this purpose, either free of charge or for a subscription fee...

 (the place where the packages are made available publicly) contains thousands of free applications.

Features of RPM include:
  • RPM packages can be cryptographically verified with GPG
    GNU Privacy Guard
    GNU Privacy Guard is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP...

     and MD5
    MD5
    The MD5 Message-Digest Algorithm is a widely used cryptographic hash function that produces a 128-bit hash value. Specified in RFC 1321, MD5 has been employed in a wide variety of security applications, and is also commonly used to check data integrity...

  • Original source archive(s) (e.g. .tar.gz, .tar.bz2) are included in SRPMs, making verification easier
  • PatchRPMs and DeltaRPMs, the RPM equivalent of a patch
    Patch (computing)
    A patch is a piece of software designed to fix problems with, or update a computer program or its supporting data. This includes fixing security vulnerabilities and other bugs, and improving the usability or performance...

     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 Linux
Red Hat Linux
Red Hat Linux, assembled by the company Red Hat, was a popular Linux based operating system until its discontinuation in 2004.Red Hat Linux 1.0 was released on November 3, 1994...

) or be built for it by other parties (for example RPM Fusion for Fedora). Circular dependencies among mutually dependent RPMs (so-called "dependency hell
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. This was mainly attributable to old Linux package managers...

") can be problematic; in such cases a single installation command needs to specify all the relevant packages.

Front ends

There are several front ends to RPM that ease the process of obtaining and installing RPMs and in resolving their dependencies. These include:
  • yum
    Yellow dog Updater, Modified
    The Yellowdog Updater, Modified is an open-source command-line package-management utility for RPM-compatible Linux operating systems and has been released under the GNU General Public License. It was developed by Seth Vidal and a group of volunteer programmers...

     used in Fedora
    Fedora (operating system)
    Fedora is a RPM-based, general purpose collection of software, including an operating system based on the Linux kernel, developed by the community-supported Fedora Project and sponsored by Red Hat...

    , CentOS
    CentOS
    CentOS is a free operating system based on Red Hat Enterprise Linux . It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution...

    -5, Red Hat Enterprise Linux
    Red Hat Enterprise Linux
    Red Hat Enterprise Linux is a Linux-based operating system developed by Red Hat and targeted toward the commercial market. Red Hat Enterprise Linux is released in server versions for x86, x86-64, Itanium, PowerPC and IBM System z, and desktop versions for x86 and x86-64...

     5 and above, Scientific Linux
    Scientific Linux
    Scientific Linux is a Linux distribution produced by Fermi National Accelerator Laboratory and the European Organization for Nuclear Research...

    , Yellow Dog Linux
    Yellow Dog Linux
    Yellow Dog Linux, also known as YDL, is a free and open source operating system for high performance computing on multicore architectures. It focuses on GPU systems and computers using the Power Architecture . YDL is currently developed by Fixstars...

     and Oracle Linux.
  • up2date
    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 the RPM Package Manager and adds advanced features such as...

     used in Red Hat Enterprise Linux
    Red Hat Enterprise Linux
    Red Hat Enterprise Linux is a Linux-based operating system developed by Red Hat and targeted toward the commercial market. Red Hat Enterprise Linux is released in server versions for x86, x86-64, Itanium, PowerPC and IBM System z, and desktop versions for x86 and x86-64...

     and CentOS
    CentOS
    CentOS is a free operating system based on Red Hat Enterprise Linux . It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution...

     (CentOS-3 and CentOS-4).
  • Synaptic Package Manager
    Synaptic Package Manager
    Synaptic is a computer program which is a GTK+ graphical user interface front-end to the Advanced Packaging Tool for the Debian package management system. Synaptic is usually used on systems based on deb packages but can also be used on systems based on RPM packages...

     used in PCLinuxOS
    PCLinuxOS
    PCLinuxOS, often shortened to PCLOS, is a GNU/Linux distribution, with KDE Plasma Desktop as its default user interface. It is a primarily free software operating system for personal computers aimed at ease of use...

  • Zypper used in MeeGo
    MeeGo
    MeeGo is a Linux-based open source mobile operating system project. Primarily targeted at mobile devices and information appliances in the consumer electronics market, MeeGo is designed to act as an operating system for hardware platforms such as netbooks, entry-level desktops, nettops, tablet...

    , openSUSE
    OpenSUSE
    openSUSE is a general purpose operating system built on top of the Linux kernel, developed by the community-supported openSUSE Project and sponsored by SUSE...

     and SUSE Linux Enterprise
    SUSE Linux distributions
    SUSE Linux is a computer operating system. It is built on top of the open source Linux kernel and is distributed with system and application software from other open source projects. SUSE Linux is of German origin and mainly developed in Europe. The first version appeared in early 1994, making...

  • urpmi
    Urpmi
    urpmi is a Mandriva Linux package management tool for installing, removing, updating and querying software packages of local or remote media. It wraps around the package manager rpm with the aim that the user should not have to suffer the often-encountered dependency hell...

     used in Mandriva Linux
    Mandriva Linux
    Mandriva Linux is a Linux distribution distributed by Mandriva. It uses the RPM Package Manager...

     and Mageia
    Mageia
    Mageia is the name of a non-profit organization and Linux distribution. The first release of the distribution was made on 1 June 2011.-Name:The term "mageia" — μαγεία in Greek — means "magic" in English...

  • apt-rpm
    Apt-rpm
    APT-RPM is a version of the Advanced Packaging Tool modified to work with the RPM Package Manager. It was originally ported to RPM by Alfredo Kojima and then further developed and improved by Gustavo Niemeyer, both working for the Conectiva Linux distribution at the time.In March 2005 the...

    , a port of Debian's Advanced Packaging Tool
    Advanced Packaging Tool
    The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux distribution and its variants...

     (APT) is used in Ark Linux
    Ark Linux
    Ark Linux is a Linux distribution maintained by a group of volunteers and aims to be easy to install and use. Its default desktop environment is KDE.Ark Linux is available both as an installable CD and as a Live CD, and is free software.-Principles:...

  • Smart Package Manager, used in Unity Linux, available for many distributions including Fedora
    Fedora (operating system)
    Fedora is a RPM-based, general purpose collection of software, including an operating system based on the Linux kernel, developed by the community-supported Fedora Project and sponsored by Red Hat...


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
Berkeley DB
Berkeley DB is a computer software library that provides a high-performance embedded database for key/value data. Berkeley DB is a programmatic software library written in C with API bindings for C++, PHP, Java, Perl, Python, Ruby, Tcl, Smalltalk, and most other programming languages...

 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 kill
Kill (Unix)
In computing, kill is a command that is used in several popular operating systems to send signals to running processes, for example to request the termination of this process.-Unix and Unix-like:...

ed), the index databases can be recreated with the rpm --rebuilddb command.

Description

Whilst the RPM format is the same across different Linux distribution
Linux distribution
A Linux distribution is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications...

s, 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:
--..rpm

such as:
libgnomeuimm-2.0-2.0.0-3.i386.rpm


Source code may also be distributed in RPM packages; the architecture part is specified as :
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
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 programs and shell script
Shell script
A shell script is a script written for the shell, or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language...

s.

The RPM contents also include a package label, which contains the following pieces of information:
  • the software name
  • the software version (the version taken from original "upstream" source of the software)
  • the 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
    Mandriva Linux is a Linux distribution distributed by Mandriva. It uses the RPM Package Manager...

    ), "mga" (Mageia
    Mageia
    Mageia is the name of a non-profit organization and Linux distribution. The first release of the distribution was made on 1 June 2011.-Name:The term "mageia" — μαγεία in Greek — means "magic" in English...

    ), "fc4" (Fedora Core
    Fedora (operating system)
    Fedora is a RPM-based, general purpose collection of software, including an operating system based on the Linux kernel, developed by the community-supported Fedora Project and sponsored by Red Hat...

     4), "rhl9" (Red Hat Linux 9), "suse100" (SUSE Linux 10.0) etc.
  • the architecture the package was built for (i386, i686, athlon, ppc, etc.)


The package label does not necessarily need to match the name of the file.

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:
  • The lead 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 contains metadata
    Metadata
    The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

     including package name, version, architecture, file list, etc..
  • A file archive, which usually is in cpio
    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 Workbench , and has been a component of virtually every...

     format, compressed with gzip
    Gzip
    Gzip is any of several software applications used for file compression and decompression. The term usually refers to the GNU Project's implementation, "gzip" standing for GNU zip. It is based on the DEFLATE algorithm, which is a combination of Lempel-Ziv and Huffman coding...

    . The rpm2cpio tool enables retrieval of the cpio file without needing to install the RPM package.
    • More recent versions of RPM can also use bzip2
      Bzip2
      bzip2 is a free and open source implementation of the Burrows–Wheeler algorithm. It is developed and maintained by Julian Seward. Seward made the first public release of bzip2, version 0.15, in July 1996.-Compression efficiency:...

      , lzma
      LZMA
      The Lempel–Ziv–Markov chain algorithm is an algorithm used to perform data compression. It has been under development since 1998 and was first used in the 7z format of the 7-Zip archiver...

       or xz
      Xz
      xz is a lossless data compression file format incorporating the LZMA2 compression algorithm. Like gzip and bzip2, concatenation is supported to compress multiple files, but the convention is to bundle a file that is an archive itself, such as those created by the tar or cpio Unix...

       compression.
    • RPM 5.0 format supports using xar
      Xar (archiver)
      Xar is an open source file archiver and the archiver’s file format. It was created within the OpenDarwin project and is used in Mac OS X 10.5 for software installation routines, as well as browser extensions in Safari 5.0...

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

, 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
Software maintainer
In free and open source software, a software maintainer is usually one or more people who build source code into a binary package for distribution, commit patches, or organize code in a source repository....

 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, and 4.9 in March 2011.

This version is used by distributions such as Fedora
Fedora (operating system)
Fedora is a RPM-based, general purpose collection of software, including an operating system based on the Linux kernel, developed by the community-supported Fedora Project and sponsored by Red Hat...

, Red Hat Enterprise Linux
Red Hat Enterprise Linux
Red Hat Enterprise Linux is a Linux-based operating system developed by Red Hat and targeted toward the commercial market. Red Hat Enterprise Linux is released in server versions for x86, x86-64, Itanium, PowerPC and IBM System z, and desktop versions for x86 and x86-64...

, SUSE's openSUSE
OpenSUSE
openSUSE is a general purpose operating system built on top of the Linux kernel, developed by the community-supported openSUSE Project and sponsored by SUSE...

 and SUSE Linux Enterprise, CentOS
CentOS
CentOS is a free operating system based on Red Hat Enterprise Linux . It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution...

 and formerly Mandriva
Mandriva
Mandriva S.A. is a publicly traded Linux and open source software company with its headquarters in Paris, France and development center in Curitiba, Brazil. Mandriva, S.A...

 (only for 2009.0 - 2010.2).

RPM v5

The RPM maintainer since 1999, Jeff Johnson, 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 Unity Linux
Unity Linux
Unity Linux is a rolling release GNU/Linux distribution maintained by a group of volunteers and is meant to be a base on which other distributions can build. Its default desktop environment is Openbox...

, Wind River Linux and cAos Linux
CAos Linux
CAOS Linux is an RPM-based Linux distribution. It aspires to be community maintained and managed, but as of 2011-05-04, the timestamp of 2009-12-14 on the is well over a year old. Though Infiscale describes its GravityOS as "[including] the small footprint of Caos" indicating a level of influence...

, and also by the OpenPKG
OpenPKG
OpenPKG is a open source package management system for Unix. It is based on the well known RPM-system and allows easy and unified installation of packages onto common Unix-platforms ....

 project which provides packages for other common UNIX-platforms. Mandriva
Mandriva
Mandriva S.A. is a publicly traded Linux and open source software company with its headquarters in Paris, France and development center in Curitiba, Brazil. Mandriva, S.A...

 has currently switched to it for their development branch, with 2011.0 becoming its first release using it . ArkLinux also announced intention to move to RPM5 for its next release.

See also

  • Autopackage
    Autopackage
    Autopackage is a free computer package management system aimed at making it simple to create a package that can be installed on all Linux distributions.In August 2010, Listaller and Autopackage announced that the projects will merge....

     - a "complementary" package management system
  • Delta ISO
    Delta ISO
    A Delta ISO is used to update an ISO image which contains RPM Package Manager files. It makes use of DeltaRPMs for RPMs which have changed between the old and new versions of the ISO. Delta ISOs can save disk space and download time, as a Delta ISO only contains the things that were updated in the...

     - an ISO image which contains RPM Package Manager files
  • dpkg
    Dpkg
    dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages....

     - package management system used by Debian and its derivatives
  • List of Linux distributions
  • Portage
    Portage (software)
    Portage is a package management system used by Gentoo Linux, based on the concept of ports collections. Gentoo is sometimes referred to as a meta-distribution due to the extreme flexibility of Portage, which makes it operating-system-independent. The Gentoo/Alt project is concerned with using...

     - package management system used by Gentoo
  • Ports and Packages
    FreeBSD Ports
    The FreeBSD Ports collection is a package management system for the FreeBSD operating system, providing an easy and consistent way of installing software packages. As of October 2011, there are over 22,700 ports available in the collection...

     - FreeBSD's package management system
  • pkg-config
    Pkg-config
    pkg-config is computer software that provides a unified interface for querying installed libraries for the purpose of compiling software from its source code. pkg-config was originally designed for Linux but is now also available for the various BSDs, Microsoft Windows, Mac OS X, and Solaris.It...

     - queries libraries to compile software from its source code
  • pkgsrc
    Pkgsrc
    pkgsrc is a package management system for Unix-like operating systems. It was forked from the FreeBSD ports collection in 1997 as the primary package management system for NetBSD. Since then it has evolved independently: in 1999, support for Solaris was added, later followed by support for other...

    - package management system focusing on NetBSD, but available for Solaris, Linux, Darwin (Mac OS X), FreeBSD, OpenBSD, IRIX, BSD/OS, AIX, Interix (Microsoft Windows Services for Unix), DragonFlyBSD, OSF/1, HP-UX, QNX, and Haiku

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK