Submitted Successfully!
To reward your contribution, here is a gift for you: A free trial for our video production service.
Thank you for your contribution! You can also upload a video entry or images related to this topic.
Version Summary Created by Modification Content Size Created at Operation
1 handwiki -- 1561 2022-11-28 01:34:50

Video Upload Options

Do you have a full video?

Confirm

Are you sure to Delete?
Cite
If you have any further questions, please contact Encyclopedia Editorial Office.
HandWiki. Rpm. Encyclopedia. Available online: https://encyclopedia.pub/entry/36805 (accessed on 20 June 2024).
HandWiki. Rpm. Encyclopedia. Available at: https://encyclopedia.pub/entry/36805. Accessed June 20, 2024.
HandWiki. "Rpm" Encyclopedia, https://encyclopedia.pub/entry/36805 (accessed June 20, 2024).
HandWiki. (2022, November 28). Rpm. In Encyclopedia. https://encyclopedia.pub/entry/36805
HandWiki. "Rpm." Encyclopedia. Web. 28 November, 2022.
Rpm
Edit

RPM Package Manager (RPM) (originally Red Hat Package Manager; now a recursive acronym) is a package management system. The name RPM refers to the following: the .rpm file format, files in the .rpm file format, software packaged in such files, and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base. Even though it was created for use in Red Hat Linux, RPM is now used in many Linux distributions. It has also been ported to some other operating systems, such as Novell NetWare (as of version 6.5 SP3), IBM's AIX (as of version 4), CentOS, Fedora (operating system) created jointly between Red Hat and the Fedora community, and Oracle Linux. All versions or variants of the these Linux operating systems use the RPM Package Manager. An RPM package can contain an arbitrary set of files. The larger part of RPM files encountered are “binary RPMs” (or BRPMs) containing the compiled version of some software. There are also “source RPMs” (or SRPMs) files containing the source code used to produce a package. These have an appropriate tag in the file header that distinguishes them from normal (B)RPMs, causing them to be extracted to /usr/src on installation. SRPMs customarily carry the file extension “.src.rpm” (.spm on file systems limited to 3 extension characters, e.g. old DOS FAT).

.src.rpm customarily srpms

1. History

RPM was originally written in 1997 by Erik Troan and Marc Ewing,[1] based on pms, rpp, and pm experiences.

pm was written by Rik Faith and Doug Hoffman in May 1995 for Red Hat Software, its design and implementations influenced greatly by pms, a package management system by Faith and Kevin Martin in the fall of 1993 for the Bogus Linux Distribution. pm preserves the "Pristine Sources + patches" paradigm of pms, while adding features and eliminating arbitrary limitations present in the implementation. pm provides greatly enhanced database support for tracking and verifying installed packages[2][3][4]

2. Features

For a system administrator 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.

Features of RPM include:

  • 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
  • PatchRPMs and DeltaRPMs, the RPM equivalent of a patch file, can incrementally update RPM-installed software
  • Automatic build-time dependency evaluation.

3. Local Operations

Packages may come from within a particular distribution (for example Red Hat Enterprise Linux) or be built for it by other parties (for example RPM Fusion for Fedora).[5] Circular dependencies among mutually dependent RPMs (so-called "dependency hell") can be problematic;[6] in such cases a single installation command needs to specify all the relevant packages.

3.1. Repositories

RPMs are often collected centrally in one or more repositories on the internet. A site often has its own RPM repositories which may either act as local mirrors of such internet repositories or be locally maintained collections of useful RPMs.

3.2. Front Ends

Several front-ends to RPM ease the process of obtaining and installing RPMs from repositories and help in resolving their dependencies. These include:

  • yum used in Fedora, CentOS 5, Red Hat Enterprise Linux 5 and above, Scientific Linux, Yellow Dog Linux and Oracle Linux
  • DNF, introduced in Fedora 18, default since 22.
  • up2date used in Red Hat Enterprise Linux, CentOS 3 and 4, and Oracle Linux
  • Zypper used in MeeGo,[7] openSUSE and SUSE Linux Enterprise
  • urpmi used in Mandriva Linux, ROSA Linux and Mageia
  • apt-rpm, a port of Debian's Advanced Packaging Tool (APT) used in Ark Linux,[8] PCLinuxOS and ALT Linux
  • Smart Package Manager, used in Unity Linux, available for many distributions including Fedora.
  • rpmquery, a command-line utility available in (for example) Red Hat Enterprise Linux

3.3. 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 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.[9]

4. Description

Whilst the RPM format is the same across different Linux distributions, the detailed conventions and guidelines may vary across them.

4.1. Package Filename and Label

An RPM is delivered in a single file, normally with a filename in the format:

<name>-<version>-<release>.src.rpm for source packages, or
<name>-<version>-<release>.<architecture>.rpm for binaries.

For example, in the package filename libgnomeuimm-2.0-2.0.0-3.i386.rpm, the <name> is libgnomeuimm, the <version> is 2.0, the <release> is 2.0.0-3, and the <architecture> is i386. The associated source package would be named libgnomeuimm-2.0-2.0.0-3.src.rpm

RPMs with the noarch.rpm extension refer to binaries 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 or a shell script.

The RPM contents also include a package label, which contains the following pieces of information:

  • software name
  • software version (the version taken from original upstream source of the software)
  • 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), "mga" (Mageia), "fc4" (Fedora Core 4), "rhl9" (Red Hat Linux 9), "suse100" (SUSE Linux 10.0) etc.
  • architecture for which the package was built (i386, i686, x86_64, ppc, etc.)

The package label fields do not need to match the filename.

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

4.3. Binary Format

The format is binary and consists of four sections:[10]

  • The lead, which 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, which contains metadata including package name, version, architecture, file list, etc.
  • A file archive (the payload), which usually is in cpio format, compressed with gzip. The rpm2cpio tool enables retrieval of the cpio file without needing to install the RPM package.[11]
    • More recent versions of RPM can also use bzip2, lzip,[12] lzma, or xz compression.
    • RPM 5.0 format supports using xar for archiving.

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

4.5. 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 could contain only platform independent scripts. In such a case, the developer could provide only an SRPM, which is still an installable RPM.

4.6. NOSRC

This is a special version of SRPM. It contains "SPEC" file and optionally patches, but does not include sources (usually because of license). [13]

5. Forks

(As of June 2010), 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.

5.1. RPM.org

The rpm.org community's first major code revision was in July 2007; version 4.8 was released in January 2010, version 4.9 in March 2011, 4.10 in May 2012, 4.11 in January 2013, 4.12 in September 2014 and 4.13 in July 2015.

This version is used by distributions such as Fedora, Red Hat Enterprise Linux and derivatives, openSUSE, SUSE Linux Enterprise, Unity Linux, Mageia[14], OpenEmbedded, Tizen and OpenMandriva Lx (formerly Mandriva).

5.2. RPM v5

Jeff Johnson, the RPM maintainer since 1999, 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 Wind River Linux (until Wind River Linux 10), Rosa Linux, and OpenMandriva Lx (former Mandriva Linux which switched to rpm5 in 2011[15]) and also by the OpenPKG project which provides packages for other common UNIX-platforms. OpenMandriva Lx is going to switch back to rpm.org[16] for 4.0 release.

OpenEmbedded switched back to rpm.org due to issues in RPM5.[17]

References

  1. "RPM Project Roadmap". rpm5.org. http://rpm5.org/roadmap.php. Retrieved 2011-12-11. 
  2. Bailey, Edward C. (2000). "Chapter 1: An Introduction to Package Management". Maximum RPM: Taking the Red Hat Package Manager to the Limit. Red Hat, Inc. pp. 22–25. ISBN 978-1888172782. http://www.rpm.org/max-rpm/s1-intro-to-rpm-package-management-how.html. Retrieved 2013-08-13. 
  3. "RPM Guide-RPM - Design Goals". https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch01s02.html. Retrieved 2014-04-14. 
  4. "BOGUS Announce". http://ibiblio.org/pub/historic-linux/distributions/bogus-1.0.1/bogus-1.0.1/notes/Announce. Retrieved 2014-04-14. 
  5. "RPM Fusion". rpmfusion.org. http://rpmfusion.org/. Retrieved 2010-11-22. 
  6. "An Analysis of RPM Validation Drift". USENIX Association. http://www.usenix.org/event/lisa02/tech/full_papers/hart/hart.pdf. Retrieved 2011-03-15. 
  7. "Zypper - MeeGo wiki". http://wiki.meego.com/Zypper. 
  8. "FAQs: About the Projects". Ark Linux Official Site. Archived from the original on 2012-02-11. https://web.archive.org/web/20120211234858/http://arklinux.org/?q=node%2F53#rpm. Retrieved 2014-04-14. 
  9. "Repair an RPM database safely". http://www.oldrpm.org/hintskinks/repairdb/. Retrieved 2011-11-11. 
  10. Bailey, Edward C. (2000). "Appendix A: Format of the RPM File". Maximum RPM: Taking the Red Hat Package Manager to the Limit. Red Hat, Inc. pp. 325–336. ISBN 978-1888172782. http://rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html. Retrieved 2010-11-22. 
  11. "Supplemental Packaging Software". Fedora Project. http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-extra-packaging-tools.html#id461860. Retrieved 2011-11-11. 
  12. "[PATCH Add lzip support"]. http://rpm.org/ticket/839. 
  13. "How to package proprietary software". https://developers.redhat.com/blog/2014/12/10/how-to-package-proprietary-software/. 
  14. "Mageia 3 Release Notes: Package management", mageia.org, 2013-05-19, https://wiki.mageia.org/en/Mageia_3_Release_Notes#Package_management, retrieved 2014-04-14 
  15. Bodnar, Ladislav & Smith, Jesse (2010-11-22), "DistroWatch Weekly", DistroWatch, http://distrowatch.com/weekly.php?issue=20101122#news, retrieved 2010-11-22 
  16. "Forum: Switching to RPMv4". https://forum.openmandriva.org/t/switching-to-rpmv4/1702. Retrieved 2018-03-03. 
  17. "YP Core - Pyro 2.3". Yocto Project. 2017-05-12. https://www.yoctoproject.org/downloads/core/pyro23. Retrieved 2017-12-04. 
More
Information
Contributor MDPI registered users' name will be linked to their SciProfiles pages. To register with us, please refer to https://encyclopedia.pub/register :
View Times: 1.1K
Entry Collection: HandWiki
Revision: 1 time (View History)
Update Date: 28 Nov 2022
1000/1000
Video Production Service