Using rpm.versions.local to manage RPMs

For WHM version 11.38

As of cPanel & WHM 11.30, cPanel-managed RPMs are specific to versions of cPanel. This means that your cPanel-managed RPMs update only when cPanel & WHM updates.

cPanel-managed RPMs will be maintained based on the contents of /usr/local/cpanel/etc/rpm.versions, which will specify which version of an RPM is supported. This file only changes when cPanel updates.

To override any of the supported versions specified in rpm.versions, you will need to create the file /usr/local/cpanel/etc/rpm.versions.local.

  • You should format this file similarly to rpm.versions.
  • The system will not install or upgrade RPMs past the versions mentioned in rpm.versions.local.

ALERT! Warning: If you choose this method to manage your RPMs, you may inadvertently block your cPanel version from upgrading. This can happen if you block RPMs that cPanel requires in order to update.

  • Example: If you specify that you wish to support a custom Exim RPM, and the new version of cPanel requires Exim 4.72 for DKIM support, then cPanel will not upgrade until you resolve this conflict manually.

How do I format rpm.versions.local?

You must follow a specific format when modifying the rpm.versions.local file. The line format must adhere to the following example:

tag|identifier|URL

note Note: Each section of the entry is pipe-delimited (|).

In the example above:

Term Description
tag The tag is the identifier used by cPanel to find the RPM it needs. For example, you could specify exim here if you wanted to maintain a specific version of Exim. You can find the appropriate tag for any given RPM by examining /usr/local/cpanel/etc/rpm.versions.
identifier This value is a unique identifier for the specific version of the RPM you wish to use. The input should be the same as the output from running rpm -qa. Example:
admin@host [~]# rpm -qa exim
exim-4.69-23.1_cpanel_maildir
URL The URL at which your server can download the RPM. The URL is templated so that it can apply to all supported architectures. See below for more details.

How do I format the templated URL?

The URL must follow this template:

http://[% httpupdate %]/RPM01/[% rpm_dist %]/[% rpm_dist_ver %]/[% rpm_arch %]/MySQL-client-5.1.56-0.glibc23.[% rpm_arch %].rpm

Each element in the URL contained within brackets ([ ]) is a variable that holds information about the system. Ultimately, these variables specify where the system will download the RPM. You can use any variable in /var/cpanel/sysinfo.config to create the URL. Only the following 4 variables are required:

Variable Description
[% httpupdate %] The hostname at which the server can access the RPM (httpupdate.cpanel.net or a preferred mirror)
[% rpm_dist %] The server's operating system distribution (centos, redhat, cloudlinux)
[% rpm_dist_ver %] The operating system distribution's major version number (4, 5, or 6)
[% rpm_arch %] The server's architecture (i386 or x86_64)

Example

The following is an example of what you would need to put into the rpm.versions.local file in order to maintain the MySQL version 5.1.56.

mysql51_client|MySQL-client-5.1.56-0.glibc23|http://[% httpupdate %]/RPM01/[% rpm_dist %]/[% rpm_dist_ver %]/[% rpm_arch %]/MySQL-client-5.1.56-0.glibc23.[% rpm_arch %].rpm

PICK Remember: Each main section of the entry is pipe-delimited (|).

In the example above:

Element Term
mysql51_client The RPM's tag for maintaining the MySQL 5.1 client
MySQL-client-5.1.56-0.glibc23 The RPM identifier for the MySQL 5.1.51 client
http://[% httpupdate %]/RPM01/[% rpm_dist %]/[% rpm_dist_ver %]/[% rpm_arch %]/MySQL-client-5.1.56-0.glibc23.[% rpm_arch %].rpm The URL at which the server can download the MySQL client RPM. Each value contained within brackets ([ ]) will be looked up by the system.

Topic revision: r15 - 25 Jan 2013 - 18:55:38 - Main.LaurenceSimon
AllDocumentation/WHMDocs.RpmVersionsLocal moved from Sandbox.RpmVersionsLocal on 12 May 2011 - 22:58 by Main.JustinSchaefer - put it back