{"id":259,"date":"2021-07-23T12:26:42","date_gmt":"2021-07-23T12:26:42","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-override-the-rpm-versions-system\/"},"modified":"2021-07-23T12:26:42","modified_gmt":"2021-07-23T12:26:42","slug":"how-to-override-the-rpm-versions-system","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-override-the-rpm-versions-system\/","title":{"rendered":"How to Override the rpm.versions System"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>This document explains the files in the <code>\/var\/cpanel\/rpm.versions.d\/<\/code> directory, which system administrators and third-party developers can use to modify cPanel-provided RPM management.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>All of the rpm.versions system\u2019s <code>.versions<\/code> files are stored in<br \/>\nthe YAML format.<\/li>\n<li>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 <code>\/scripts\/update_local_rpm_versions<\/code> script to edit the <code>\/var\/cpanel\/rpm.versions.d\/local.versions<\/code> file. For more information, read our The update_local_rpm_versions Script documentation.<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"files\">Files<\/h2>\n<p>The <code>\/usr\/local\/cpanel\/etc\/rpm.versions<\/code> file contains cPanel-provided settings for the rpm.versions system, based on the version of cPanel &#038; WHM that your server runs. However, the rpm.versions system allows any <code>.versions<\/code> files in the <code>\/var\/cpanel\/rpm.versions.d<\/code> directory to override these settings.<\/p>\n<p>The following table lists information about the files from which the rpm.versions system retrieves information:<\/p>\n<table>\n<thead>\n<tr>\n<th>Source of changes<\/th>\n<th>Location<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>cPanel, L.L.C.<\/td>\n<td><code>\/usr\/local\/cpanel\/etc\/rpm.versions<\/code><\/td>\n<td>cPanel, L.L.C. provides these settings based on the version of cPanel &#038; WHM that your server runs. You should <strong>never<\/strong> directly edit this file, because you will lose your changes when you perform an upgrade.<\/td>\n<\/tr>\n<tr>\n<td>Third-party developers<\/td>\n<td><code>\/var\/cpanel\/rpm.versions.d\/*.versions<\/code><\/td>\n<td>We encourage third-party developers who wish to override the <code>\/usr\/local\/cpanel\/etc\/rpm.versions<\/code> file to create their own <code>*.versions<\/code> files in the <code>\/var\/cpanel\/rpm.versions.d\/<\/code> directory. These settings override the cPanel-provided settings. If multiple <code>*.versions<\/code> files on a server list an RPM target, conflicts may occur. For more information, read the Third-party conflicts section below.<\/td>\n<\/tr>\n<tr>\n<td>System administrators<\/td>\n<td><code>\/var\/cpanel\/rpm.versions.d\/local.versions<\/code><\/td>\n<td>These settings override <strong>all<\/strong> other settings.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"third-party-conflicts\">Third-party conflicts<\/h3>\n<p>If a conflict exists between two or more third-party files in the <code>\/var\/cpanel\/rpm.versions.d\/<\/code> directory, no RPM updates will take place.<\/p>\n<p>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:<\/p>\n<ol>\n<li>If the <code>\/var\/cpanel\/rpm.versions.d\/local.versions<\/code> file contains a modification to the same setting that caused the conflict between the vendor files, the setting that the <code>\/var\/cpanel\/rpm.versions.d\/local.versions<\/code> file specifies will override the conflict.<\/li>\n<li>The vendors can resolve the conflict through changes to their respective files in the <code>\/var\/cpanel\/rpm.versions.d\/<\/code> directory.<\/li>\n<\/ol>\n<h2 id=\"file-format\">File format<\/h2>\n<p>The files in the <code>\/var\/cpanel\/rpm.versions.d\/<\/code> directory use the YAML format, and follow a structure that resembles the <code>\/usr\/local\/cpanel\/etc\/rpm.versions<\/code> file. However, these files should only contain the values that you wish to specifically override in the rpm.versions system.<\/p>\n<div class=\"callout callout-cpanel\">\n<div class=\"callout-heading\">More:<\/div>\n<div class=\"callout-content\">\n<p>For more information about this file format, read our The rpm.versions File documentation.<\/p>\n<\/p><\/div>\n<\/div>\n<p>A file in the <code>\/var\/cpanel\/rpm.versions.d\/<\/code> directory that overrides only one RPM target will appear similar to the following example:<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 5\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 6\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 7\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 8\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 9\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">10\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">11\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">12\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">13\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">14\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">15\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">16\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">17\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">18\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">file_format<\/span>:\n  <span style=\"color:#a6e22e\">version<\/span>: <span style=\"color:#ae81ff\">2<\/span>\n<span style=\"color:#a6e22e\">install_targets<\/span>: {}\n\n<span style=\"color:#a6e22e\">rpm_groups<\/span>: {}\n\n<span style=\"color:#a6e22e\">deferred_settings<\/span>: {}\n\n<span style=\"color:#a6e22e\">deferred_optional<\/span>: {}\n\n<span style=\"color:#a6e22e\">rpm_locations<\/span>: {}\n\n<span style=\"color:#a6e22e\">srpm_sub_packages<\/span>: {}\n\n<span style=\"color:#a6e22e\">srpm_versions<\/span>: {}\n<span style=\"color:#a6e22e\">target_settings<\/span>:\n  <span style=\"color:#a6e22e\">pure<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">ftpd<\/span>: <span style=\"color:#a6e22e\">unmanaged<\/span>\n<span style=\"color:#a6e22e\">url_templates<\/span>: {}<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview 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. Note: All of the rpm.versions system\u2019s .versions files 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, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":260,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/259"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/260"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}