RPM Package Manager
From Wikipedia, the free encyclopedia
| 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.
| This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (September 2007) |
Several Linux distributions support RPM. These include, but are not limited to:
- Fedora
- Mandriva Linux and derivatives:
- PS2 Linux
- Red Flag Linux
- Red Hat Enterprise Linux and derivatives:
- SUSE Linux/openSUSE
- ArkLinux
- Yellow Dog Linux
- PLD Linux Distribution
- Scientific Linux
- Linux XP
- TurboLinux
There are several front ends to RPM that resolve dependencies.
The best-known ones are:
- up2date used in Red Hat Enterprise Linux and CentOS (CentOS-3 and CentOS-4).
- yum used in Fedora, CentOS-5, Red Hat Enterprise Linux 5 and above, Scientific Linux, Yellow Dog Linux and openSUSE Linux
- YaST and Zypper used in openSUSE Linux
- urpmi used in Mandriva Linux
- rpmdrake, a graphical urpmi frontend by Mandriva Linux
- apt-rpm, a port of Debian's Advanced Packaging Tool (APT)
- Smart Package Manager, available for many distributions
- poldek, relatively fast and feature-rich frontend which does not depend on rpmlib. Used by PLD Linux Distribution only
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
- Detailed information on RPM file format
- Foster-Johnson, Eric (2003). Red Hat RPM Guide. ISBN 0-7645-4965-0.
- Red Hat RPM Guide from the Fedora project.
- Fedora's RPM Package Manager homepage
- Jeff Johnson's RPM Package Manager homepage
- Pre December 2006 RPM.org website content
- RPM and DPKG command reference
|
|
|
|---|---|
| Major products | RHEL (clones) · Directory Server · Certification Program · Application Stack · Global File System · Cluster Suite · JBoss · Fedora · Developer Studio |
| Services | Exchange · RHN · Red Hat India |
| Projects | Fedora Project · OLPC Project · Mugshot · Dogtail · Magazine · Exchange · Anaconda · up2date · RPM |
| Defunct products | Red Hat Linux · Red Hat Database · Fedora Legacy |
| Important people | Matthew Szulik · Bob Young · Marc Ewing · Michael Tiemann |
|
|
|
|---|---|
| Archiving only | ar · cpio · shar · tar · LBR |
| Compression only | bzip2 · gzip · LZMA · lzop · rzip · SQ · compress · LZW |
| Archiving and compression | 7z · ACE · ARC · ALZip · ARJ · Cabinet · cpt · DAR · dd · DGCA · .dmg · GCA · kgb · LHA · LZX · PAQ · RAR · qda · sit · SQX · zoo · ZIP |
| Software packaging and distribution | deb · pkg · RPM · MSI · JAR (WAR · RAR (Java) · EAR) |