Opentopia Directory Encyclopedia Tools

RPM Package Manager

Encyclopedia : R : RP : RPM : RPM Package Manager


The RPM Logo
Enlarge
The RPM Logo

RPM Package Manager (originally Red Hat Package Manager, abbreviated RPM) in the context of package management refers to two things: a software package file format, and the original tool developed to manage those packages. RPM was intended primarily for Linux. The package management tool RPM installs, updates, uninstalls, verifies and queries software. 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 (since version 6.5 SP3) and IBM AIX since version 5, see [RPM homepage] for all supported platforms.

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

The file format

The RPM database

Working behind the scenes of 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 happens easily if the RPM client is killed), the index databases can be recreated with the rpm --rebuilddb command.

Package label

Every RPM package has a package label, which contains the following pieces of information:

and the RPM file would normally have the following format:

--..rpm
An example:

nano-0.98-2.i386.rpm
However, note that 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 very well not work.

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.

Advantages and disadvantages of the format

Advantages of using RPM packages over other ways to acquire and install software often cited are:

Disadvantages often cited include: RPM has also 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 a problem of co-ordination amongst major distributions who use RPM in packaging such as Red Hat Linux, 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 [link] for Red Hat Linux), then automatic dependency checking can work, using tools such as yum or apt (see below). A tool exclusively for Mandriva Linux is urpmi, and can help with the so called 'dependency hell'.

Creating RPMs

The "recipe" for creating an RPM package is a spec file. Spec files end in the ".spec" extension 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.

Examples

rpm -qa --queryformat '%010\t%-%-%\n' lists the installation size of all installed packages.

Supported Linux distributions

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

(See also: List of Linux distributions.)

Related tools

There are several front ends to RPM that resolve dependencies.

The best-known ones are:

External references and links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: