How to Override the rpm.versions System
This document explains the files in the
/var/cpanel/rpm.versions.d/ directory, which system administrators and third-party developers can use to modify cPanel-provided RPM management.
- All of the rpm.versions system’s
.versionsfiles are stored in the YAML format.
- Because YAML is space-sensitive, misspelled words are common when system administrators edit a file manually. For this reason, we encourage system administrators to use the
/scripts/update_local_rpm_versionsscript to edit the
/var/cpanel/rpm.versions.d/local.versionsfile. For more information, read our The update_local_rpm_versions Script documentation.
/usr/local/cpanel/etc/rpm.versions file contains cPanel-provided settings for the rpm.versions system, based on the version of cPanel & WHM that your server runs. However, the rpm.versions system allows any
.versions files in the
/var/cpanel/rpm.versions.d directory to override these settings.
The following table lists information about the files from which the rpm.versions system retrieves information:
|Source of changes||Location||Description|
||cPanel, L.L.C. provides these settings based on the version of cPanel & WHM that your server runs. You should never directly edit this file, because you will lose your changes when you perform an upgrade.|
||We encourage third-party developers who wish to override the
||These settings override all other settings.|
If a conflict exists between two or more third-party files in the
/var/cpanel/rpm.versions.d/ directory, no RPM updates will take place.
A conflict can occur if two vendors modify the same setting in a file. You can resolve a conflict in either of the following ways:
- If the
/var/cpanel/rpm.versions.d/local.versionsfile contains a modification to the same setting that caused the conflict between the vendor files, the setting that the
/var/cpanel/rpm.versions.d/local.versionsfile specifies will override the conflict.
- The vendors can resolve the conflict through changes to their respective files in the
The files in the
/var/cpanel/rpm.versions.d/ directory use the YAML format, and follow a structure that resembles the
/usr/local/cpanel/etc/rpm.versions file. However, these files should only contain the values that you wish to specifically override in the rpm.versions system.
For more information about this file format, read our The rpm.versions File documentation.
A file in the
/var/cpanel/rpm.versions.d/ directory that overrides only one RPM target will appear similar to the following example: