The rpm.versions File


Overview

The /usr/local/cpanel/etc/rpm.versions file contains all of the cPanel-provided settings for the rpm.versions system. We provide these settings based on the version of cPanel & WHM that your server runs. Your server automatically updates this file whenever cPanel & WHM updates.

The system stores the /usr/local/cpanel/etc/rpm.versions file in the YAML format. The sections below describe each of the file’s headers and their contents.

Warning:

We strongly recommend that you never directly edit this file, because you will lose your changes when you perform an upgrade. Instead, use the /var/cpanel/rpm.versions.d/local.versions file to make changes.

install_targets — Target components and dependencies

The install_targets section of the /usr/local/cpanel/etc/rpm.versions file lists each RPM target with its component RPMs and dependencies.

Each target entry displays information in the following format:

1
2
3
4
5
6
7
rpmtarget:
    components:
      - component_rpm_1
      - component_rpm_2
    dependencies:
      - dependency_1
      - dependency_2

This example uses the following variables:

  • rpmtarget is the name of the RPM target.
  • component_rpm_1 and component_rpm_2 are RPMs that are necessary for the rpmtarget service to function properly.
  • dependency_1 and dependency_2 are additional RPMs on which the component RPMs are dependent.
Note:

Instead of individual RPMs, the components and dependencies sections may also list the names of RPM groups, as the rpm_groups section of the /usr/local/cpanel/etc/rpm.versions file defines.

rpm_groups — RPM groups

The rpm_groups section of the /usr/local/cpanel/etc/rpm.versions file lists groups of RPMs under their assigned group name. In the other sections of the file, this group name represents that list of RPMs, which eliminates the need for repetitive lists of frequently-used RPM names.

Each group entry appears in the following format:

1
2
3
groupname:
    - grouped_rpm_1
    - grouped_rpm_2

This example uses the followng variables:

  • groupname is the name of the RPM group.
  • grouped_rpm_1 and grouped_rpm_2 are the names of individual RPMs that are part of the group.

rpm_locations — RPM file locations

The rpm_locations section of the /usr/local/cpanel/etc/rpm.versions file specifies which URL template the rpm.versions system uses to find that target’s RPMs.

Each file location entry appears in the following format:

RPM: template

This example uses the following variables:

  • RPM is the name of the RPM.
  • template is the name of the URL template, as the file’s url_templates section specifies.

srpm_sub_packages — Source RPM information

The srpm_sub_packages section of the /usr/local/cpanel/etc/rpm.versions file specifies a list of Source RPMs (SRPMs) for each RPM target.

Each SRPM entry appears in the following format:

1
2
3
4
rpmtarget:
    - srpm1
    - srpm2
    - srpm3

This example uses the following variables:

  • rpmtarget is the name of the RPM target.
  • srpm1, srpm2, and srpm3 are the names of the target’s SRPMs.

srpm_versions — Source RPM versions

The srpm_versions section of the /usr/local/cpanel/etc/rpm.versions file specifies the exact version number for each RPM target.

Each SRPM version entry appears in the following format:

rpmtarget: version-revision.distribution

In this example:

  • rpmtarget is the name of the RPM target.
  • version is the exact version number.
  • revision is the revision number for the RPM.
  • distribution corresponds to the major version of cPanel & WHM with which this version was released.

For example, the SRPM version for the MySQL56 target appears similar to the following example:

MySQL56: 5.6.16-4.cp1142

This example uses the following variables:

  • The MySQL® version is 5.6.16.
  • The revision number is 4.
  • The version of cPanel & WHM is version 11.42.

target_settings — Target installation settings

The target_settings section of the /usr/local/cpanel/etc/rpm.version file specifies each RPM target’s default installation status.

For more information about RPM targets, read our RPM Targets documentation.

unsupported_rpms – Unsupported RPMs

The unsupported_rpms section of usr/local/cpanel/etc/rpm.versions file specifies RPMs that an operating system will not install.

The following example from cPanel & WHM version 94 demonstrates this section of the file:

1
2
3
4
redhat6:
  - cpanel-perl-532-Linux-Systemd
redhat8:
  - cpanel-perl-532-Authen-Libwrap

url_templates — URL templates

The url_templates section defines the template that the rpm.versions system uses to find specific RPM files. In the /usr/local/cpanel/etc/rpm.versions file, all of these templates point to locations on cPanel’s httpupdate server.

Each URL template appears in one of the following formats:

1
2
template: 'http://[% httpupdate %]/RPM/version/[% rpm_dist %]/[% rpm_dist_ver %]/[% rpm_arch %]/[% package %]-[% package_version %]-[% package_revision %].[% rpm_arch %].rpm'
noarchtemplate: 'http://[% httpupdate %]/RPM/version/[% rpm_dist %]/[% rpm_dist_ver %]/[% rpm_arch %]/[% package %]-[% package_version %]-[% package_revision %].noarch.rpm'

This example uses the following variables:

  • template and noarchtemplate are the names of RPM file location templates.
  • httpupdate is the hostname at which to download the RPMs.
  • version is the cPanel & WHM major version that first contained that RPM target.
  • rpm_dist is the name of the system’s OS distribution (for example, centos).
  • rpm_dist_ver is the system’s OS distribution’s version number (for example, 5).
  • rpm_arch is the OS’s architecture (for example, i686).
  • package is the name of the RPM.
  • package_version is the RPM version number.
  • package_revision is the RPM revision number.

The presence or absence of .noarch in the RPM’s location indicates differences in the RPM template, which changes how the rpm.versions system generates information, such as RPM filenames, for that RPM.