From 7c7004de1e05fdc36d63e5f4bf1076a0775431a5 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 19 Aug 2015 11:50:29 +0200 Subject: [PATCH] hack for yum repos under dnf-based systems dnf does not seem to implement a setting for changing the location of yum.repos.d so we create a symlink /etc/yum.repos.d -> /etc/yum.myplc.d --- db-config.d/030-conf_files_node_update | 15 +++++++++++++++ nodeconfig/yum/f22/dnf/dnf.conf | 3 +++ 2 files changed, 18 insertions(+) diff --git a/db-config.d/030-conf_files_node_update b/db-config.d/030-conf_files_node_update index b127d9b..9b970d4 100644 --- a/db-config.d/030-conf_files_node_update +++ b/db-config.d/030-conf_files_node_update @@ -26,6 +26,21 @@ conf_files = [ 'preinstall_cmd' : '', 'postinstall_cmd' : '', 'error_cmd' : '', 'ignore_cmd_errors' : False, 'always_update' : False}, + # starting with fedora 22 we need to tweak /etc/dnf/dnf.conf, + # not /etc/yum.conf + { 'enabled' : True, + 'source' : 'yum/yum.php?path=dnf/dnf.conf', + 'dest' : '/etc/dnf/dnf.conf', + 'file_permissions' : '644', 'file_owner' : 'root', 'file_group' : 'root', + # ensure /etc/yum.repos.d is created as a symlink to /etc/yum.myplc.d + # since dnf under fedora22 does not seem to have a means to configure + # this location anymore + 'preinstall_cmd' : '', + 'postinstall_cmd' : 'bash -c "[ -d /etc/yum.repos.d ] || ln -sf /etc/yum.myplc.d /etc/yum.repos.d"', + 'error_cmd' : '', + 'ignore_cmd_errors' : False, + # here again, we need to make sure postinstall is always executed + 'always_update' : True}, # NodeUpdate { 'enabled' : True, diff --git a/nodeconfig/yum/f22/dnf/dnf.conf b/nodeconfig/yum/f22/dnf/dnf.conf index ea07a3c..16c41dc 100644 --- a/nodeconfig/yum/f22/dnf/dnf.conf +++ b/nodeconfig/yum/f22/dnf/dnf.conf @@ -2,4 +2,7 @@ gpgcheck=1 installonly_limit=3 clean_requirements_on_remove=true +# actually this does not seem to be supported by dnf +# see ../../../db-config.d/030-conf_files_node_update +# for how we worked around this issue reposdir=/etc/yum.myplc.d -- 2.43.0