diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 8b5e97aa1..efbf53d77 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -1,5 +1,5 @@ # SPEC file to build NetworkManager for testing. It aims for a similar -# configuration as rhel-7.0 and Fedora rawhide +# configuration as RHEL and Fedora Rawhide # # This spec file is not used as is to create official packages for RHEL, Fedora or any # other distribution. @@ -78,7 +78,7 @@ %bcond_with test %endif %if "%{?bcond_default_lto}" == "" -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 +%if 0%{?fedora} || 0%{?rhel} >= 9 %bcond_without lto %else %bcond_with lto @@ -96,44 +96,21 @@ %else %bcond_with connectivity_fedora %endif -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} %bcond_without connectivity_redhat %else %bcond_with connectivity_redhat %endif -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 -%bcond_without crypto_gnutls -%else -%bcond_with crypto_gnutls -%endif %if 0%{?rhel} %bcond_with iwd %else %bcond_without iwd %endif -%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8 -%bcond_without firewalld_zone -%else -%bcond_with firewalld_zone -%endif ############################################################################### -%if 0%{?fedora} || 0%{?rhel} >= 8 %global dbus_version 1.9.18 %global dbus_sys_dir %{_datadir}/dbus-1/system.d -%else -%global dbus_version 1.1 -%global dbus_sys_dir %{_sysconfdir}/dbus-1/system.d -%endif - -# Older libndp versions use select() (rh#1933041). On well known distros, -# choose a version that has the necessary fix. -%if 0%{?rhel} && 0%{?rhel} == 8 -%global libndp_version 1.7-4 -%else -%global libndp_version %{nil} -%endif %if %{with bluetooth} || %{with wwan} %global with_modem_manager_1 1 @@ -141,23 +118,11 @@ %global with_modem_manager_1 0 %endif -%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8 -%global dhcp_default internal -%else -%global dhcp_default dhclient -%endif - -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global logging_backend_default journal %if 0%{?fedora} || 0%{?rhel} >= 9 %global dns_rc_manager_default auto %else %global dns_rc_manager_default symlink %endif -%else -%global logging_backend_default syslog -%global dns_rc_manager_default file -%endif %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 %bcond_with default_ifcfg_rh @@ -229,9 +194,7 @@ Source9: readme-ifcfg-rh-migrated.txt #Patch1: 0001-some.patch Requires(post): systemd -%if 0%{?fedora} || 0%{?rhel} >= 8 Requires(post): systemd-udev -%endif Requires(post): /usr/sbin/update-alternatives Requires(preun): systemd Requires(preun): /usr/sbin/update-alternatives @@ -240,13 +203,17 @@ Requires(postun): systemd Requires: dbus >= %{dbus_version} Requires: glib2 >= %{glib2_version} Requires: %{name}-libnm%{?_isa} = %{epoch}:%{version}-%{release} -%if "%{libndp_version}" != "" -Requires: libndp >= %{libndp_version} + +%if 0%{?rhel} == 8 +# Older libndp versions use select() (rh#1933041). On well known distros, +# choose a version that has the necessary fix. +Requires: libndp >= 1.7-4 %endif + Obsoletes: NetworkManager < %{obsoletes_device_plugins} Obsoletes: NetworkManager < %{obsoletes_ppp_plugin} Obsoletes: NetworkManager-wimax < 1:1.2 -%if 0%{?rhel} && 0%{?rhel} == 8 +%if 0%{?rhel} == 8 Suggests: NetworkManager-initscripts-updown %endif Obsoletes: NetworkManager < %{obsoletes_initscripts_updown} @@ -254,12 +221,7 @@ Obsoletes: NetworkManager < %{obsoletes_initscripts_updown} Obsoletes: NetworkManager < %{obsoletes_ifcfg_rh} %endif -%if 0%{?rhel} && 0%{?rhel} <= 7 -# Kept for RHEL to ensure that wired 802.1x works out of the box -Requires: wpa_supplicant >= 1:1.1 -%endif - -%if 0%{?rhel} && 0%{?rhel} >= 10 +%if 0%{?rhel} >= 10 %if 0%{without team} Obsoletes: NetworkManager-team < 1:1.47.5-3 %endif @@ -272,7 +234,7 @@ 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 +%if 0%{?rhel} >= 10 %if 0%{without team} Conflicts: NetworkManager-team <= 1:1.47.5-3 %endif @@ -298,11 +260,7 @@ BuildRequires: gobject-introspection-devel >= 0.10.3 %if %{with ppp} BuildRequires: ppp-devel >= 2.4.5 %endif -%if %{with crypto_gnutls} BuildRequires: gnutls-devel >= 2.12 -%else -BuildRequires: nss-devel >= 3.11.7 -%endif BuildRequires: readline-devel BuildRequires: audit-libs-devel %if %{with regen_docs} @@ -340,17 +298,11 @@ BuildRequires: polkit-devel BuildRequires: jansson-devel %if %{with sanitizer} BuildRequires: libasan -%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: libubsan %endif -%endif -%if %{with firewalld_zone} BuildRequires: firewalld-filesystem -%endif BuildRequires: iproute -%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: iproute-tc -%endif Provides: %{name}-dispatcher%{?_isa} = %{epoch}:%{version}-%{release} @@ -393,12 +345,7 @@ Summary: Bluetooth device plugin for NetworkManager Group: System Environment/Base Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: NetworkManager-wwan = %{epoch}:%{version}-%{release} -%if 0%{?rhel} && 0%{?rhel} <= 7 -# No Requires:bluez to prevent it being installed when updating -# to the split NM package -%else Requires: bluez >= 4.101-5 -%endif Obsoletes: NetworkManager < %{obsoletes_device_plugins} %description bluetooth @@ -413,12 +360,10 @@ Group: System Environment/Base BuildRequires: teamd-devel Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: NetworkManager < %{obsoletes_device_plugins} -%if 0%{?fedora} || 0%{?rhel} >= 8 # Team was split from main NM binary between 0.9.10 and 1.0 # We need this Obsoletes in addition to the one above # (git:3aede801521ef7bff039e6e3f1b3c7b566b4338d). Obsoletes: NetworkManager < 1:1.0.0 -%endif %description team This package contains NetworkManager support for team devices. @@ -437,13 +382,10 @@ Requires: wireless-regdb Requires: crda %endif -%if %{with iwd} && (0%{?fedora} >= 25 || 0%{?rhel} >= 8) +%if %{with iwd} Requires: (wpa_supplicant >= %{wpa_supplicant_version} or iwd) Suggests: wpa_supplicant %else -# Just require wpa_supplicant on platforms that don't support boolean -# dependencies even though the plugin supports both supplicant and -# iwd backend. Requires: wpa_supplicant >= %{wpa_supplicant_version} %endif @@ -459,12 +401,7 @@ This package contains NetworkManager support for Wifi and OLPC devices. Summary: Mobile broadband device plugin for NetworkManager Group: System Environment/Base Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} -%if 0%{?rhel} && 0%{?rhel} <= 7 -# No Requires:ModemManager to prevent it being installed when updating -# to the split NM package -%else Requires: ModemManager -%endif Obsoletes: NetworkManager < %{obsoletes_device_plugins} %description wwan @@ -659,12 +596,7 @@ Preferably use nmcli instead. -Ddhclient=%{_sbindir}/dhclient \ -Ddhcpcanon=no \ -Ddhcpcd=no \ - -Dconfig_dhcp_default=%{dhcp_default} \ -%if %{with crypto_gnutls} -Dcrypto=gnutls \ -%else - -Dcrypto=nss \ -%endif %if %{with debug} -Dmore_logging=true \ -Dmore_asserts=10000 \ @@ -766,11 +698,6 @@ Preferably use nmcli instead. -Dpppd_plugin_dir="%{_libdir}/pppd/%{ppp_version}" \ %else -Dppp=false \ -%endif -%if %{with firewalld_zone} - -Dfirewalld_zone=true \ -%else - -Dfirewalld_zone=false \ %endif -Ddist_version=%{version}-%{release} \ %if %{with default_ifcfg_rh} @@ -782,7 +709,7 @@ Preferably use nmcli instead. -Dresolvconf=no \ -Dnetconfig=no \ -Dconfig_dns_rc_manager_default=%{dns_rc_manager_default} \ - -Dconfig_logging_backend_default=%{logging_backend_default} + -Dconfig_logging_backend_default=journal %meson_build @@ -801,19 +728,10 @@ autoreconf --install --force --with-dhclient=%{_sbindir}/dhclient \ --with-dhcpcd=no \ --with-dhcpcanon=no \ - --with-config-dhcp-default=%{dhcp_default} \ -%if %{with crypto_gnutls} --with-crypto=gnutls \ -%else - --with-crypto=nss \ -%endif %if %{with sanitizer} --with-address-sanitizer=exec \ -%if 0%{?fedora} || 0%{?rhel} >= 8 --enable-undefined-sanitizer=yes \ -%else - --enable-undefined-sanitizer=no \ -%endif %else --with-address-sanitizer=no \ --enable-undefined-sanitizer=no \ @@ -919,11 +837,7 @@ autoreconf --install --force %else --enable-ppp=no \ %endif -%if %{with firewalld_zone} --enable-firewalld-zone=yes \ -%else - --enable-firewalld-zone=no \ -%endif --with-dist-version=%{version}-%{release} \ %if %{with default_ifcfg_rh} --with-config-plugins-default=ifcfg-rh \ @@ -934,7 +848,7 @@ autoreconf --install --force --with-resolvconf=no \ --with-netconfig=no \ --with-config-dns-rc-manager-default=%{dns_rc_manager_default} \ - --with-config-logging-backend-default=%{logging_backend_default} \ + --with-config-logging-backend-default=journal \ --disable-autotools-deprecation %make_build @@ -1033,9 +947,7 @@ if [ -S /run/udev/control ]; then /usr/bin/udevadm control --reload-rules || : /usr/bin/udevadm trigger --subsystem-match=net || : fi -%if %{with firewalld_zone} %firewalld_reload -%endif %systemd_post %{systemd_units} @@ -1086,19 +998,11 @@ fi %postun /usr/bin/udevadm control --reload-rules || : /usr/bin/udevadm trigger --subsystem-match=net || : -%if %{with firewalld_zone} %firewalld_reload -%endif %systemd_postun %{systemd_units} -%if (0%{?fedora} && 0%{?fedora} < 28) || 0%{?rhel} -%post libnm -p /sbin/ldconfig -%postun libnm -p /sbin/ldconfig -%endif - - %if %{with nm_cloud_setup} %postun cloud-setup %systemd_postun %{systemd_units_cloud_setup} @@ -1166,9 +1070,7 @@ fi %{_datadir}/dbus-1/system-services/org.freedesktop.nm_priv_helper.service %{_datadir}/polkit-1/actions/*.policy %{_prefix}/lib/udev/rules.d/*.rules -%if %{with firewalld_zone} %{_prefix}/lib/firewalld/zones/nm-shared.xml -%endif # systemd stuff %{_unitdir}/NetworkManager.service %{_unitdir}/NetworkManager-wait-online.service