RPM Package Manager

From Wikipedia, the free encyclopedia

(Redirected from Red Hat Package Manager)
Jump to: navigation, search
RPM Package Manager
Platform Linux, Unix-like
License GPL
Website rpm.org

RPM Package Manager (originally Red Hat Package Manager, abbreviated RPM) is a package management system. 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 5.

"RPM" as it is used today is an example of a recursive initialism.

Contents

Working behind the scenes of the package manager is the RPM database, stored in /var/lib/rpm. It consists of a single database (Packages) containing all of the meta information of the installed rpms and multiple databases used for indexing purposes. The database is used to keep track of all files that are changed and created when a user installs a program and thus allows rpm to remove packages. 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.[1]

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:

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

libgnomeuimm2.0-2.0.0-3.src.rpm

Additionally, libraries are distributed in two separate packages for each version. One containing the precompiled code and one containing the development files such as header 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 a higher-level programming language, such as Python programs and shell scripts.

RPM packages have many often-cited advantages over other package management systems:

  • They present a uniform way for the user to install programs.
  • Uninstalling programs is simple.
  • It is popular: the typical rpm repository contains thousands of free applications.
  • Non-interactive installation makes it easy to automate.
  • Original source archive (e.g. .tar.gz, .tar.bz2) are included in SRPMs, making verification easier.
  • Packages can be cryptographically verified with GPG and MD5.
  • DeltaRPMs, the RPM equivalent of a patch file, can incrementally update RPM-installed software without needing the original package.

RPM has also been criticized for a lack of consistency in package names and content (termed 'dependency hell') 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, SUSE, 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 urpmi, yum or apt can perform automatic dependency checking.

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.

The package is a binary format 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 including package name, version, architecture, file list, etc..
  • A file archive, which usually is cpio compressed with gzip. In more recent versions of RPM you can also use star for archive and bzip2 or lzma for compression. RPM 5.0 format will have support and by default using xar for archiving.

See also: List of Linux distributions#RPM-based free distributions

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

There are several front ends to RPM that resolve dependencies.

The best-known ones are:

As of the 31st of May, 2007, there are two versions of RPM in development. The first is led by long-time (since 1999) RPM maintainer, Jeff Johnson ('JBJ'), who continued his development efforts after departing Red Hat. It has combined recently with efforts of OpenPKG and added a new website rpm5 tine of the fork. The 'JBJ' variant is used by Mandriva, PLD Linux Distribution and supported by OpenPKG. Jeff Johnson formerly worked for Red Hat before a controversy.

The other effort is led by Red Hat recent hire (2007) staff member Panu Matilainen. The Red Hat RPM tine of the fork which issued its first major code revision in July 2007, is used by Fedora, Red Hat Enterprise Linux, Novell's openSUSE and CentOS. Matilainen has also worked on an apt-like front end for package management for RPM previously; apt-get is a Debian Linux management tool.

The displaced former RPM website content is archived by its long time maintainer at oldrpm web archive. On December 14, 2006, Red Hat decided to take complete control of editorial content at the formerly community maintained website which content was maintainted in an 'open to the community' process manner.

  • APT - package management system used by Debian
  • Portage - package management system used by Gentoo
  • Autopackage - a "complimentary" package management system
  • pkg-config - queries libraries to compile software from its source code

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.