From 613f16de518deedb4fc20b788c82c7a6343716d0 Mon Sep 17 00:00:00 2001 From: Stanislas FAYE Date: Thu, 23 May 2024 10:26:16 +0200 Subject: [PATCH 1/3] rpm: Disable team and ifcfg-rh only in rhel distros and rhel-10+ Resolves: https://issues.redhat.com/browse/RHEL-32948 --- contrib/fedora/rpm/NetworkManager.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index e59e7c800..437ecc7c0 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -26,6 +26,9 @@ %global obsoletes_ppp_plugin 1:1.5.3 %global obsoletes_initscripts_updown 1:1.36.0-0.6 %global obsoletes_ifcfg_rh 1:1.36.2 +%global obsoletes_team 1:1.47.5-3 +%global obsoletes_initscripts_ifcfg_rh 1:1.47.5-3 +%global obsoletes_dispatcher_routing_rules 1:1.47.5-3 %global nmlibdir %{_prefix}/lib/%{name} %global nmplugindir %{_libdir}/%{name}/%{version}-%{release} @@ -259,11 +262,22 @@ Obsoletes: NetworkManager < %{obsoletes_ifcfg_rh} Requires: wpa_supplicant >= 1:1.1 %endif +%if 0%{?rhel} && 0%{?rhel} >= 10 +Obsoletes: NetworkManager-team < %{obsoletes_team} +Obsoletes: NetworkManager-initscripts-ifcfg-rh < %{obsoletes_initscripts_ifcfg_rh} +Obsoletes: NetworkManager-dispatcher-routing-rules < %{obsoletes_dispatcher_routing_rules} +%endif + Conflicts: NetworkManager-vpnc < 1:0.7.0.99-1 Conflicts: NetworkManager-openvpn < 1:0.7.0.99-1 Conflicts: NetworkManager-pptp < 1:0.7.0.99-1 Conflicts: NetworkManager-openconnect < 0:0.7.0.99-1 Conflicts: kde-plasma-networkmanagement < 1:0.9-0.49.20110527git.nm09 +%if 0%{?rhel} && 0%{?rhel} >= 10 +Conflicts: NetworkManager-team <= 1:1.47.5-3 +Conflicts: NetworkManager-initscripts-ifcfg-rh <= 1:1.47.5-3 +Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3 +%endif BuildRequires: make BuildRequires: gcc From 3f3472c971cce6113e306c07275d521752bae9ef Mon Sep 17 00:00:00 2001 From: Stanislas FAYE Date: Mon, 27 May 2024 14:46:09 +0200 Subject: [PATCH 2/3] Use the versions number from which packages are obsoleted directly instead of using global variables --- contrib/fedora/rpm/NetworkManager.spec | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 437ecc7c0..80ce34d1a 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -26,9 +26,6 @@ %global obsoletes_ppp_plugin 1:1.5.3 %global obsoletes_initscripts_updown 1:1.36.0-0.6 %global obsoletes_ifcfg_rh 1:1.36.2 -%global obsoletes_team 1:1.47.5-3 -%global obsoletes_initscripts_ifcfg_rh 1:1.47.5-3 -%global obsoletes_dispatcher_routing_rules 1:1.47.5-3 %global nmlibdir %{_prefix}/lib/%{name} %global nmplugindir %{_libdir}/%{name}/%{version}-%{release} @@ -263,9 +260,9 @@ Requires: wpa_supplicant >= 1:1.1 %endif %if 0%{?rhel} && 0%{?rhel} >= 10 -Obsoletes: NetworkManager-team < %{obsoletes_team} -Obsoletes: NetworkManager-initscripts-ifcfg-rh < %{obsoletes_initscripts_ifcfg_rh} -Obsoletes: NetworkManager-dispatcher-routing-rules < %{obsoletes_dispatcher_routing_rules} +Obsoletes: NetworkManager-team < 1:1.47.5-3 +Obsoletes: NetworkManager-initscripts-ifcfg-rh < 1:1.47.5-3 +Obsoletes: NetworkManager-dispatcher-routing-rules < 1:1.47.5-3 %endif Conflicts: NetworkManager-vpnc < 1:0.7.0.99-1 From 10d4557720f7f9624a38e037334a36b9a5d2faf5 Mon Sep 17 00:00:00 2001 From: Stanislas FAYE Date: Mon, 27 May 2024 16:37:58 +0200 Subject: [PATCH 3/3] Make team obsoletes in rhel-10 only if NM-team is not enabled in the rpm --- contrib/fedora/rpm/NetworkManager.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 80ce34d1a..ee67a05d3 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -260,7 +260,9 @@ Requires: wpa_supplicant >= 1:1.1 %endif %if 0%{?rhel} && 0%{?rhel} >= 10 +%if 0%{without team} Obsoletes: NetworkManager-team < 1:1.47.5-3 +%endif Obsoletes: NetworkManager-initscripts-ifcfg-rh < 1:1.47.5-3 Obsoletes: NetworkManager-dispatcher-routing-rules < 1:1.47.5-3 %endif @@ -271,7 +273,9 @@ Conflicts: NetworkManager-pptp < 1:0.7.0.99-1 Conflicts: NetworkManager-openconnect < 0:0.7.0.99-1 Conflicts: kde-plasma-networkmanagement < 1:0.9-0.49.20110527git.nm09 %if 0%{?rhel} && 0%{?rhel} >= 10 +%if 0%{without team} Conflicts: NetworkManager-team <= 1:1.47.5-3 +%endif Conflicts: NetworkManager-initscripts-ifcfg-rh <= 1:1.47.5-3 Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3 %endif