RPM Cookbook

Targets are the most commonly manipulated option in the rpm.versions system. Targets are a way to enable and disable a group of RPMs.

Disable a Target

To disable a specific target, you must set the target_settings to uninstalled for that target. The following example demonstrates how to disable bandmin:

  1. Run the following script:
    /scripts/update_local_rpm_versions --edit target_settings.bandmin uninstalled
  2. Then, run the following script:
    /scripts/check_cpanel_rpms --fix --targets=bandmin

If you completed this process with no local.versions file in /var/cpanel/rpm.versions.d then the newly created local.versions file should resemble the following:

  version: 2
  bandmin: uninstalled

How to Override a cPanel-provided RPM With Your Own Custom RPM

If you wish to provide you own custom RPM, you need to indicate to the rpm.versions system where to retreieve your custom RPM. The following command demonstrates how to tell the rpm.versions system to use the MySQL55-5.5.29-1.custom RPM instead of the cPanel-provided RPM:

/scripts/update_local_rpm_versions --edit url_templates.mylocal 'http://myserver.com/RPM/11.36/[% rpm_dist %]/[% rpm_dist_ver %]/[% rpm_arch %]/[% package %]-[% package_version %]-[% package_revision %].[% rpm_arch %].rpm'
/scripts/update_local_rpm_versions --edit srpm_versions.MySQL55 5.5.29-1.custom
/scripts/update_local_rpm_versions --edit rpm_locations.MySQL55 mylocal

Related documentation

How to Build and Install Custom RPMs — This document provides steps to allow you to customize, rebuild, and install any of the cPanel-provided RPMs.

Topic revision: r4 - 08 Aug 2013 - 15:50:22 - Main.SarahHaney