RPM Package Manager: Wikis

  

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

Red Hat Package Manager (RPM)
RPM Logo.svg
Original author(s) Red Hat
Developer(s) Red Hat
Stable release 4.8.0 / January 8, 2010
Operating system Linux, Unix-like
Type Package management
License GNU General Public License
Website http://rpm.org/

RPM Package Manager is a package management system[1]. The name RPM refers to two things: a software package file format, and software packaged in this format. RPM was intended primarily for Linux distributions; the file format RPM is the baseline package format of the Linux Standard Base.

Originally developed by Red Hat for Red Hat Linux, RPM is now used by 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.

Originally standing for "Red Hat Package Manager", RPM now stands for "RPM Package Manager", a recursive initialism.

Contents

Advantages and disadvantages of the format

Package managers have many advantages over relying on manual installation such as:

  • They present a uniform, clean way for users to install and remove programs with a single command.
  • There are many popular interfaces, both command-line and graphical.
  • Non-interactive installation makes it easy to automate.

RPM also has a few advantages over some other package managers:

  • It is the Linux (LSB) standard format.
  • It is popular: the typical rpm repository (the place where the packages are made available publicly) contains thousands of free applications.
  • RPM packages can be cryptographically verified with GPG and MD5
  • Original source archive(s) (e.g. .tar.gz, .tar.bz2) are included in SRPMs, making verification easier (for security-critical packages like OpenSSH it is possible to check with md5sum that the sources were not modified).
  • PatchRPMs and DeltaRPMs, the RPM equivalent of a patch file, can incrementally update RPM-installed software without needing the original package.

RPM has been criticized for a lack of consistency in package names and content which can make automatic dependency handling difficult. However, this is not a problem inherent in the RPM format, but rather because of differing packaging guidelines among major Linux distributions that use RPM in packaging such as Fedora, openSUSE, and Mandriva Linux. When using packages that are from a particular distribution (say Red Hat Linux) or built for a particular distribution (for example Freshrpms for Fedora),[2] tools such as yum, urpmi or zypper can perform automatic dependency checking.

Circular dependencies between mutually dependent RPMs cannot be installed with rpm unless the user is aware that he needs to specify both on the rpm installer's parameter list first. This leads to what is known as 'dependency hell', particularly for packages with many dependencies, each of which has its own large set of dependencies, and so on. For this reason, wrappers around the rpm tool have been created to help ameliorate the problem. High level tools like yum, urpmi and zypper are examples of such wrappers. These are similar to wrappers like apt-get and smart in Debian.

The local RPM 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.[3]

Package label

Every RPM package has 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), "fc4" (Fedora Core 4), "rhl9" (Red Hat Linux 9), "suse100" (SUSE Linux 10.0) etc.
  • the architecture the package was built for (i386, i686, athlon, ppc, etc.)

RPM file names normally have the following format:

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

An example:

nano-0.98-2.i386.rpm

A package label is contained within the file and does not necessarily need to match the name of the file. Source code may also be distributed in RPM packages. Such package labels do not have an architecture part and replace it with "src", e.g.:

libgnomeuimm-2.0-2.0.0-3.src.rpm

Additionally, libraries are distributed in two separate packages for each version. One contains the precompiled code, while the second one contains the development files such as headers, static library files, etc. for the library in question. Those packages have "-devel" appended to their name field. Users need to carefully check so that the version of the development package matches that of the binary package, otherwise the library may not work very well.

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

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.

Logical package format

The package is a binary format and consists of four sections:[1]

  • 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 including package name, version, architecture, file list, etc..
  • A file archive, which usually is cpio compressed with gzip. In more recent versions of RPM, star can also be used for archive and bzip2, lzma or xz for compression. RPM 5.0 format supports using xar for archiving.

RPM-based Linux distributions

Several Linux distributions are based on RPM. These include, but are not limited to:

Front ends

There are several front ends to RPM that resolve dependencies.

The best-known ones are:

Forks

As of May 2007, 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. Both projects currently call themselves the "official" version of RPM.

RPM.org

The rpm.org community's RPM is hosted by OSU Open Source Lab, and the majority of content is maintained in the wiki. The maintainer of RPM is Red Hat developer Panu Matilainen. Panu Matilainen is also the current maintainer of apt-rpm. RPM.org issued its first major code revision in July 2007, 4.6 was released on 6 February 2009, featuring cleaned up codebase, bugfixes and several new features such as support for large packages. The preliminary release notes of the new version are available on the rpm.org website, and a preview snapshot version was seen in action in Fedora 10 release. On April 16 2009, RPM 4.7 was released and is included in Fedora 11 release. Major performance improvements, less memory consumption, support for xz aka LZMA compression and several important bugs fixes are part of this release. However, these benefits come at a cost in compatibility: RPM 4.7 introduces new file format extensions, which means that it is not possible to verify the contents of packages it creates on earlier versions.

Its version is used by all major RPM based distributions including Fedora, Red Hat Enterprise Linux, Novell's openSUSE and SUSE Linux Enterprise, Mandriva and CentOS.

RPM v5

The RPM maintainer since 1999, Jeff Johnson, continued his development efforts after leaving Red Hat. Johnson combined with the efforts of OpenPKG and participants from several other distributions in May 2007 to produce RPM version 5. This version is used by distributions like PLD Linux and supported by OpenPKG.

See also

  • Autopackage - a "complementary" package management system
  • dpkg - package management system used by Debian and its derivatives
  • Portage - package management system used by Gentoo
  • pkg-config - queries libraries to compile software from its source code
  • YUM, a command-line package-management utility for RPM-compatible Linux operating systems

References

External links


Simple English

RPM (Package Manager)

Author:Red Hat
Latest release:4.6 /
OS:Linux, Unix-like
Use: Package management

License:GNU General Public License
Website: rpm.org

RPM Package Manager is a package management system[1]. The name RPM refers to two things: a software package file format, and software packaged in this format. RPM was intended mainly for Linux distributions; the file format RPM is the baseline package format of the Linux Standard Base.

RPM-based Linux distributions

See also: List of Linux distributions#RPM-based

Several Linux distributions are based on RPM. These include, but are not limited to:

References








Got something to say? Make a comment.
Your name
Your email address
Message