Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

RPM Package Manager

From Wikipedia, the free encyclopedia
Package management system

RPM Package Manager (RPM)
Original authorsErik Troan,Marc Ewing,[1]Red Hat
DevelopersCommunity &Red Hat[2][3]
Initial release1997; 29 years ago (1997)[1]
Stable release
6.0.1[4] Edit this on Wikidata / 10 December 2025; 2 months ago (10 December 2025)
Written inC,C++,Perl[5]
Operating systemLinux,Unix-like
Available in41 languages[6]
TypePackage management system
LicenseGPL
Websiterpm.orgEdit this at Wikidata
Repository

RPM (originallyRed Hat Package Manager, now arecursive acronym forRPM Package Manager) is afree and open-sourcepackage management system.[7] The name RPM refers to the.rpmfile format and the package manager program itself. RPM was intended primarily forLinux distributions; the file format is the baseline package format of theLinux Standard Base.

Although it was created for use inRed Hat Linux, RPM is now used in manyLinux distributions such asPCLinuxOS,Fedora Linux,AlmaLinux,CentOS,openSUSE,OpenMandriva andOracle Linux. It has also been ported to some otheroperating systems, such asNovell NetWare (as of version 6.5 SP3),IBM's AIX (as of version 4),[8]IBM i,[9] andArcaOS.[10]An RPM package can contain an arbitrary set of files. Most RPM files are "binary RPMs" (or BRPMs) containing the compiled version of some software. There are also "source RPMs" (or SRPMs) containing thesource code used to build a binary 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 DOSFAT).

History

[edit]

RPM was originally written in 1997 by Erik Troan andMarc Ewing,[1] based onpms,rpp, andpm experiences.

pm was written by Rik Faith and Doug Hoffman in May 1995 for Red Hat Software, its design and implementations were influenced greatly bypms, 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 ofpms, while adding features and eliminating arbitrary limitations present in the implementation.pm provides greatly enhanced database support for tracking and verifying installed packages.[5][11][12]

Features

[edit]

For asystem 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. rpm usesBerkeley DB as the backend database although since 4.15 in 2019, it supports building rpm packages without Berkeley DB (–disable-bdb).[13]

Features of RPM include:

  • RPM packages can be cryptographically verified withGPG andMD5
  • Original source archive(s) (e.g..tar.gz,.tar.bz2) are included in SRPMs, making verification easier
  • Delta update: PatchRPMs and DeltaRPMs, the RPM equivalent of apatch file, can incrementally update RPM-installed software
  • Automatic build-time dependency evaluation.

Local operations

[edit]

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

Repositories

[edit]

RPMs are often collected centrally in one or morerepositories 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.

Front ends

[edit]

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

Local RPM installation database

[edit]

Working behind the scenes of the package manager is the RPM database, stored in/var/lib/rpm. It usesBerkeley 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 iskilled), the index databases can be recreated with therpm --rebuilddb command.[18]

Description

[edit]

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

Package filename and label

[edit]

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 filenamelibgnomeuimm-2.0-2.0.0_3.i386.rpm, the<name> islibgnomeuimm, the<version> is2.0, the<release> is2.0.0_3, and the<architecture> isi386.The associated source package would be namedlibgnomeuimm-2.0-2.0.0_3.src.rpm

RPMs with thenoarch.rpm extension do not depend on a particular CPU architecture. For example, these RPMs may contain graphics and text for other programs to use. They may also containshell scripts or programs written in other interpreted programming languages such asPython.

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

  • software name
  • software version (the version taken from originalupstream 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), "rh9" (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.

Library packaging

[edit]

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.

Binary format

[edit]

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

  • 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 containsmetadata including package name, version, architecture, file list, etc.
  • A file archive (thepayload), which usually is incpio format, compressed withgzip. Therpm2cpio tool enables retrieval of the cpio file without needing to install the RPM package.[19]
    • The Linux Standard Base requires the use of gzip, but Fedora 30 packages arexz-compressed and Fedora 31 packages might bezstd-compressed.[20] Recent versions of RPM can also usebzip2,lzip,[21] orlzma compression.
    • RPM 5.0 format supports usingxar for archiving.

SPEC file

[edit]

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.[example needed] 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.

SRPM

[edit]

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.

NOSRC

[edit]

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

Forks

[edit]

As of June 2010[update], 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 previousmaintainer of RPM, a former employee of Red Hat.

RPM.org

[edit]

Therpm.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 asFedora Linux,Red Hat Enterprise Linux andderivatives,openSUSE,SUSE Linux Enterprise,Unity Linux,Mageia,[23]OpenEmbedded,Tizen andOpenMandriva Lx (formerlyMandriva).

RPM v5 (Defunct)

[edit]

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 was used by distributions such asWind River Linux (until Wind River Linux 10), Rosa Linux, andOpenMandriva Lx (formerMandriva Linux which switched to rpm5 in 2011[24]) and also by theOpenPKG project which provides packages for other common UNIX-platforms.

OpenMandriva Lx has switched back to rpm.org[25] for 4.0 release.[needs update]

OpenEmbedded, the last major user of RPM5, switched back to rpm.org due to issues in RPM5.[26][27]

See also

[edit]

References

[edit]
  1. ^abc"RPM timeline". rpm.org. Retrieved25 June 2020.
  2. ^Spevack, Max (14 December 2006)."RPM -- plans, goals, etc".fedora-announce-list (Mailing list). Archived fromthe original on 6 October 2012. Retrieved20 January 2011.
  3. ^"RPM.org FAQ".rpm.org. Archived fromthe original on 5 November 2016. Retrieved25 August 2013.
  4. ^"Release 6.0.1". 10 December 2025. Retrieved11 December 2025.
  5. ^abBailey 2000, pp. 22–25, Chapter 1: An Introduction to Package Management
  6. ^"po/LINGUAS".GitHub.Archived from the original on 23 April 2022. Retrieved23 September 2025.
  7. ^abBailey 2000, pp. 325–336, Appendix A: Format of the RPM File
  8. ^Mallayya, Sangamesh; Mishra, Nitish; Rathi, Sanket; Ayappan p (24 October 2018)."Configuring YUM and creating local repositories on IBM AIX".developer.ibm.com. Archived fromthe original on 3 October 2020. Retrieved3 September 2020.
  9. ^Woodie, Alex (18 July 2018)."RPM and Yum are a big deal for IBM i. Here's why".IT Jungle.Archived from the original on 29 June 2019. Retrieved3 September 2020.
  10. ^"Package Manager".arcanoae.com. Archived fromthe original on 25 March 2016. Retrieved4 September 2020.
  11. ^"RPM Design Goals".docs.fedoraproject.org. Archived fromthe original on 21 March 2014. Retrieved14 April 2014.
  12. ^"BOGUS Announce".ibiblio.org.Archived from the original on 4 November 2013. Retrieved14 April 2014.
  13. ^zoujiaqing (29 January 2020)."rpm4 was support for building rpm without Berkeley DB (–disable-bdb)".The FreeBSD Forums.Archived from the original on 23 February 2024. Retrieved18 September 2023.
  14. ^"RPM Fusion". rpmfusion.org.Archived from the original on 11 February 2019. Retrieved22 November 2010.
  15. ^Hart, John; D'Amelia, Jeffrey.An Analysis of RPM Validation Drift(PDF). Proceedings of LISA '02: Sixteenth Systems Administration Conference. Berkeley, CA: USENIX Association. pp. 155–166.Archived(PDF) from the original on 28 July 2011. Retrieved15 March 2011.
  16. ^"Zypper".MeeGo wiki. Archived fromthe original on 25 September 2013. Retrieved14 April 2014.
  17. ^"FAQs: About the Projects". Ark Linux Official Site. Archived fromthe original on 11 February 2012. Retrieved14 April 2014.
  18. ^"Repair an RPM database safely".oldrpm.org. Archived fromthe original on 6 August 2019. Retrieved11 November 2011.
  19. ^"Supplemental Packaging Software". Fedora Project. Archived fromthe original on 10 March 2016. Retrieved11 November 2011.
  20. ^"Switch RPMs to zstd compression".Fedora Project (Wiki).Archived from the original on 2 June 2019. Retrieved2 June 2019.
  21. ^"[PATCH] Add lzip support".rpm.org. Archived fromthe original on 4 March 2016. Retrieved24 October 2013.
  22. ^Suchý, Miroslav (10 December 2014)."How to package proprietary software".Red Hat Developers.Archived from the original on 2 July 2018. Retrieved2 July 2018.
  23. ^"Mageia 3 Release Notes: Package management".mageia.org. 19 May 2013.Archived from the original on 7 February 2014. Retrieved14 April 2014.
  24. ^Bodnar, Ladislav & Smith, Jesse (22 November 2010)."DistroWatch Weekly".DistroWatch.Archived from the original on 23 June 2018. Retrieved22 November 2010.Mandriva looks to abandon the unmaintained RPM 4.x series and replace it with RPM 5.x for better package management.
  25. ^Gajc, Tomasz Paweł."Forum: Switching to RPMv4".forum.openmandriva.org.Archived from the original on 14 January 2022. Retrieved3 March 2018.
  26. ^"YP Core – Pyro 2.3".Yocto Project. 12 May 2017. Archived fromthe original on 5 December 2017. Retrieved4 December 2017.()
  27. ^Kanavin, Alexander (14 February 2017)."[Openembedded-architecture] Changes that switching from smart to dnf will cause".openembedded-architecture (Mailing list).Yocto Project.Archived from the original on 5 November 2018. Retrieved4 November 2018.

External links

[edit]
dpkg
RPM
Embedded systems
  • ipkg
Distribution-agnostic
Others (binary)
Others (source)
Front-ends
Related topics
Major products
Services
Projects
Defunct
People
Mergers and acquisitions
Related
Archiving only
Compressing only
Archiving
and compressing
Software packaging
and distributing
Document packaging
and distributing
Retrieved from "https://en.wikipedia.org/w/index.php?title=RPM_Package_Manager&oldid=1338106651"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp