From 995539cd30aafc8b96dd5bf946eeb453f598ce2a Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 10 Aug 2023 11:26:50 +0200 Subject: [PATCH] contrib/rpm: enable ifcfg migration on Fedora 39+ https://fedoraproject.org/wiki/Changes/MigrateIfcfgToKeyfile --- contrib/fedora/rpm/NetworkManager.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 1361acbd7b..73f7eb641d 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -170,6 +170,12 @@ %global ifcfg_warning 0 %endif +%if 0%{?fedora} >= 39 +%global ifcfg_migrate 1 +%else +%global ifcfg_migrate 0 +%endif + %if 0%{?fedora} # Although eBPF would be available on Fedora's kernel, it seems # we often get SELinux denials (rh#1651654). But even aside them, @@ -743,6 +749,9 @@ Preferably use nmcli instead. -Ddist_version=%{version}-%{release} \ %if %{?config_plugins_default_ifcfg_rh} -Dconfig_plugins_default=ifcfg-rh \ +%endif +%if %{?ifcfg_migrate} + -Dconfig_migrate_ifcfg_rh_default=true \ %endif -Dresolvconf=no \ -Dnetconfig=no \ @@ -888,6 +897,9 @@ autoreconf --install --force --with-dist-version=%{version}-%{release} \ %if %{?config_plugins_default_ifcfg_rh} --with-config-plugins-default=ifcfg-rh \ +%endif +%if %{?ifcfg_migrate} + --with-config-migrate-ifcfg-rh-default=yes \ %endif --with-resolvconf=no \ --with-netconfig=no \