10.1 About RPM Packaging

On Oracle Linux, the RPM package manager provides the infrastructure for installation, upgrade, and removal of packages. Typically, each package bundles an application along with all the necessary binaries and documentation associated with that application. For example, the Apache Web server comes with a number of configuration files, a large set of documentation files, and the Apache Web server itself. All of this fits into one RPM package. One of the main advantages of the RPM system is that each rpm file holds a complete package.

For example, consider the package file that contains the GNU Compiler Collection is named gcc-4.4.6-4.el6.x86_64.rpm, where the package version is 4.4.6, the build number is 4, and the supported architecture and operating system are x86-64 and Oracle Linux 6.

You can use the RPM manager to copy an rpm file to another Linux system and install it, display the complete contents of the package, or remove or update the package.

An RPM file usually contains four sections:

  • An identification area, which contains information about the RPM package including the version of the RPM packing system.

  • A signature, which contains size, checksums, and other information that can be used to check the authenticity and integrity of a package.

  • A preamble, which contains tagged data that provides information about the contents of the package. The tags in this section contains mandatory and optional information. For example, the mandatory NAME tag defines the package name, and the optional PRE tag defines a pre-installation script that the rpm command runs before installing the files. The tags have the format: tag:data. Types of tag that are typically found in an RPM package include:

    • Architecture-specific tags

    • Dependency tags

    • Descriptive tags

    • Directory-related tags

    • Operating system tag

    • Package naming tags

    • Source and patch tags

    For example, the Dependency tag category includes tags such as requires, conflicts, and provides.

  • The payload section specifies the files to be installed on the target system.