Show Table of Contents

Chapter 12. Package Management with RPM

The RPM Package Manager (RPM) is an open packaging arrangement, which runs on Red Hat Enterprise Linux as well as other Linux and UNIX systems. Cherry-red Chapeau, Inc. encourages other vendors to use RPM for their own products. RPM is distributed under the terms of the GPL.

The utility works merely with packages built for processing by the rpm packet. For the finish user, RPM makes organization updates easy. Installing, uninstalling, and upgrading RPM packages can be accomplished with brusk commands. RPM maintains a database of installed packages and their files, so you can invoke powerful queries and verifications on your system. If you adopt a graphical interface, you can apply the Package Management Tool to perform many RPM commands. Refer to Chapter 13, Bundle Direction Tool for details.

When installing a bundle, please ensure it is compatible with your operating arrangement and architecture. This can commonly be adamant past checking the parcel name.

During upgrades, RPM handles configuration files carefully, and then that you never lose your customizations — something that you cannot reach with regular .tar.gz files.

For the developer, RPM allows yous to take software source code and bundle it into source and binary packages for end users. This procedure is quite simple and is driven from a single file and optional patches that y'all create. This clear depiction between pristine sources and your patches along with build instructions eases the maintenance of the package as new versions of the software are released.

Because RPM makes changes to your organisation, you must be logged in equally root to install, remove, or upgrade an RPM parcel.

12.1. RPM Design Goals

To sympathize how to use RPM, information technology tin be helpful to empathize the blueprint goals of RPM:

Upgradability

With RPM, yous tin upgrade individual components of your system without completely reinstalling. When y'all get a new release of an operating organization based on RPM (such equally Red Hat Enterprise Linux), you lot do not need to reinstall on your machine (as you lot do with operating systems based on other packaging systems). RPM allows intelligent, fully-automated, in-place upgrades of your organisation. Configuration files in packages are preserved across upgrades, so y'all practice not lose your customizations. At that place are no special upgrade files needed to upgrade a bundle because the same RPM file is used to install and upgrade the package on your system.

Powerful Querying

RPM is designed to provide powerful querying options. You can do searches through your entire database for packages or only for certain files. You lot can besides hands find out what parcel a file belongs to and from where the bundle came. The files an RPM package contains are in a compressed archive, with a custom binary header containing useful information near the package and its contents, allowing you to query individual packages quickly and easily.

System Verification

Another powerful RPM feature is the ability to verify packages. If you are worried that you deleted an important file for some package, you can verify the package. Y'all are then notified of any anomalies, if any — at which indicate, you lot can reinstall the package if necessary. Any configuration files that you lot modified are preserved during reinstallation.

Pristine Sources

A crucial design goal was to allow the use of pristine software sources, as distributed by the original authors of the software. With RPM, you lot have the pristine sources along with any patches that were used, plus consummate build instructions. This is an important advantage for several reasons. For instance, if a new version of a program is released, you do non necessarily have to get-go from scratch to become information technology to compile. You tin look at the patch to run into what you might demand to practise. All the compiled-in defaults, and all of the changes that were made to go the software to build properly, are easily visible using this technique.

The goal of keeping sources pristine may seem of import only for developers, simply it results in higher quality software for finish users, likewise.