diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index db7a718..5b4cce8 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -1,22 +1,22 @@ - %global wpa_supplicant_version 1:1.1 %global ppp_version %(sed -n 's/^#define\\s*VERSION\\s*"\\([^\\s]*\\)"$/\\1/p' %{_includedir}/pppd/patchlevel.h 2>/dev/null | grep . || echo bad) %global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad) %global epoch_version 1 -%global rpm_version 1.36.0 -%global real_version 1.36.0 -%global release_version 5 +%global real_version 1.40.0 +%global rpm_version %{real_version} +%global release_version 1 %global snapshot %{nil} %global git_sha %{nil} +%global bcond_default_debug 0 +%global bcond_default_test 0 %global obsoletes_device_plugins 1:0.9.9.95-1 %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 systemd_dir %{_prefix}/lib/systemd/system -%global sysctl_dir %{_prefix}/lib/sysctl.d %global nmlibdir %{_prefix}/lib/%{name} %global nmplugindir %{_libdir}/%{name}/%{version}-%{release} @@ -39,18 +39,6 @@ ############################################################################### -%if "x__BCOND_DEFAULT_DEBUG__" == "x1" || "x__BCOND_DEFAULT_DEBUG__" == "x0" -%global bcond_default_debug __BCOND_DEFAULT_DEBUG__ -%else -%global bcond_default_debug 0 -%endif - -%if "x__BCOND_DEFAULT_TEST__" == "x1" || "x__BCOND_DEFAULT_TEST__" == "x0" -%global bcond_default_test __BCOND_DEFAULT_TEST__ -%else -%global bcond_default_test 0 -%endif - %bcond_with meson %bcond_without adsl %bcond_without bluetooth @@ -83,12 +71,12 @@ %else %bcond_with connectivity_fedora %endif -%if 0%{?rhel} && 0%{?rhel} > 7 +%if 0%{?rhel} && 0%{?rhel} >= 8 %bcond_without connectivity_redhat %else %bcond_with connectivity_redhat %endif -%if 0%{?fedora} > 28 || 0%{?rhel} > 7 +%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 %bcond_without crypto_gnutls %else %bcond_with crypto_gnutls @@ -98,7 +86,7 @@ %else %bcond_without iwd %endif -%if 0%{?fedora} > 31 || 0%{?rhel} > 7 +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8 %bcond_without firewalld_zone %else %bcond_with firewalld_zone @@ -106,7 +94,7 @@ ############################################################################### -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} >= 8 %global dbus_version 1.9.18 %global dbus_sys_dir %{_datadir}/dbus-1/system.d %else @@ -128,15 +116,15 @@ %global with_modem_manager_1 0 %endif -%if 0%{?fedora} >= 31 || 0%{?rhel} > 7 +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8 %global dhcp_default internal %else %global dhcp_default dhclient %endif -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} >= 8 %global logging_backend_default journal -%if 0%{?fedora} || 0%{?rhel} > 8 +%if 0%{?fedora} || 0%{?rhel} >= 9 %global dns_rc_manager_default auto %else %global dns_rc_manager_default symlink @@ -146,10 +134,22 @@ %global dns_rc_manager_default file %endif -%if 0%{?rhel} > 8 || 0%{?fedora} > 32 -%global config_plugins_default keyfile,ifcfg-rh +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 +%global config_plugins_default_ifcfg_rh 0 +%else +%global config_plugins_default_ifcfg_rh 1 +%endif + +%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10 +%global split_ifcfg_rh 1 %else -%global config_plugins_default ifcfg-rh +%global split_ifcfg_rh 0 +%endif + +%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 +%global ifcfg_warning 1 +%else +%global ifcfg_warning 0 %endif %if 0%{?fedora} @@ -185,6 +185,7 @@ Source2: 00-server.conf Source4: 20-connectivity-fedora.conf Source5: 20-connectivity-redhat.conf Source6: 70-nm-connectivity.conf +Source7: readme-ifcfg-rh.txt # RHEL downstream patches that change behavior from upstream. # These are not bugfixes, hence they are also relevant after @@ -192,16 +193,10 @@ Source6: 70-nm-connectivity.conf # Patch0001: 0001-some.patch # Bugfixes that are only relevant until next rebase of the package. -Patch1001: 1001-wwan-dns-fix-rh2059138.patch -Patch1002: 1002-checkpoint-preserve-external-bridge-ports-rh2035519.patch -Patch1003: 1003-fix-ovsdb-removal-ports-rhbz1935026.patch -Patch1004: 1004-n-dhcp4-discard-NAKs-from-other-servers-rhbz2067122.patch -Patch1005: 1005-fix-dhcp-loses-lease-when-restarting-rhbz2094715.patch -Patch1006: 1006-dhcp-routes-src-rh2094778.patch -Patch1007: 1007-platform-workaround-for-preserving-ipv6-address-rhbz2094715.patch +# Patch1001: 1001-some.patch Requires(post): systemd -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} >= 8 Requires(post): systemd-udev %endif Requires(post): /usr/sbin/update-alternatives @@ -222,6 +217,9 @@ Obsoletes: NetworkManager-wimax < 1.2 Suggests: NetworkManager-initscripts-updown %endif Obsoletes: NetworkManager < %{obsoletes_initscripts_updown} +%if 0%{?split_ifcfg_rh} +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 @@ -244,8 +242,7 @@ BuildRequires: meson BuildRequires: automake BuildRequires: autoconf %endif -BuildRequires: intltool -BuildRequires: gettext-devel +BuildRequires: gettext-devel >= 0.19.8 BuildRequires: dbus-devel >= %{dbus_version} BuildRequires: glib2-devel >= 2.40.0 @@ -287,14 +284,16 @@ BuildRequires: mobile-broadband-provider-info-devel BuildRequires: newt-devel %endif BuildRequires: /usr/bin/dbus-launch -%if 0%{?fedora} > 27 || 0%{?rhel} > 7 +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 BuildRequires: python3 BuildRequires: python3-gobject-base BuildRequires: python3-dbus +BuildRequires: python3-pexpect %else BuildRequires: python2 BuildRequires: pygobject3-base BuildRequires: dbus-python +BuildRequires: pexpect %endif BuildRequires: libselinux-devel BuildRequires: polkit-devel @@ -309,7 +308,7 @@ BuildRequires: libubsan BuildRequires: firewalld-filesystem %endif BuildRequires: iproute -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: iproute-tc %endif @@ -398,7 +397,7 @@ Requires: wireless-regdb Requires: crda %endif -%if %{with iwd} && (0%{?fedora} > 24 || 0%{?rhel} > 7) +%if %{with iwd} && (0%{?fedora} >= 25 || 0%{?rhel} >= 8) Requires: (wpa_supplicant >= %{wpa_supplicant_version} or iwd) Suggests: wpa_supplicant %else @@ -531,6 +530,9 @@ deployments. %package dispatcher-routing-rules Summary: NetworkManager dispatcher file for advanced routing rules Group: System Environment/Base +%if 0%{?split_ifcfg_rh} +Requires: %{name}-initscripts-ifcfg-rh +%endif BuildArch: noarch Provides: %{name}-config-routing-rules = %{epoch}:%{version}-%{release} Obsoletes: %{name}-config-routing-rules < 1:1.31.0 @@ -555,6 +557,19 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %endif +%if 0%{?split_ifcfg_rh} +%package initscripts-ifcfg-rh +Summary: NetworkManager plugin for reading and writing connections in ifcfg-rh format +Group: System Environment/Base +Requires: %{name} = %{epoch}:%{version}-%{release} +Obsoletes: NetworkManager < %{obsoletes_ifcfg_rh} + +%description initscripts-ifcfg-rh +Installs a plugin for reading and writing connection profiles using +the Red Hat ifcfg format in /etc/sysconfig/network-scripts/. +%endif + + %if %{with nm_cloud_setup} %package cloud-setup Summary: Automatically configure NetworkManager in cloud @@ -688,7 +703,6 @@ Preferably use nmcli instead. %endif -Dsession_tracking=systemd \ -Dsuspend_resume=systemd \ - -Dsystemdsystemunitdir=%{systemd_dir} \ -Dsystem_ca_path=/etc/pki/tls/cert.pem \ -Ddbus_conf_dir=%{dbus_sys_dir} \ -Dtests=yes \ @@ -705,7 +719,9 @@ Preferably use nmcli instead. -Dfirewalld_zone=false \ %endif -Ddist_version=%{version}-%{release} \ - -Dconfig_plugins_default=%{config_plugins_default} \ +%if %{?config_plugins_default_ifcfg_rh} + -Dconfig_plugins_default=ifcfg-rh \ +%endif -Dresolvconf=no \ -Dnetconfig=no \ -Dconfig_dns_rc_manager_default=%{dns_rc_manager_default} \ @@ -719,11 +735,10 @@ Preferably use nmcli instead. gtkdocize %endif autoreconf --install --force -intltoolize --automake --copy --force %configure \ --with-runstatedir=%{_rundir} \ - --disable-silent-rules \ - --disable-static \ + --enable-silent-rules=no \ + --enable-static=no \ --with-nft=/usr/sbin/nft \ --with-iptables=/usr/sbin/iptables \ --with-dhclient=yes \ @@ -738,26 +753,26 @@ intltoolize --automake --copy --force %if %{with sanitizer} --with-address-sanitizer=exec \ %if 0%{?fedora} || 0%{?rhel} >= 8 - --enable-undefined-sanitizer \ + --enable-undefined-sanitizer=yes \ %else - --disable-undefined-sanitizer \ + --enable-undefined-sanitizer=no \ %endif %else --with-address-sanitizer=no \ - --disable-undefined-sanitizer \ + --enable-undefined-sanitizer=no \ %endif %if %{with debug} - --enable-more-logging \ + --enable-more-logging=yes \ --with-more-asserts=10000 \ %else - --disable-more-logging \ - --without-more-asserts \ + --enable-more-logging=no \ + --with-more-asserts=0 \ %endif - --enable-ld-gc \ + --enable-ld-gc=yes \ %if %{with lto} - --enable-lto \ + --enable-lto=yes \ %else - --disable-lto \ + --enable-lto=no \ %endif --with-libaudit=yes-disabled-by-default \ %if 0%{?with_modem_manager_1} @@ -796,11 +811,11 @@ intltoolize --automake --copy --force --with-nm-cloud-setup=no \ %endif --enable-vala=yes \ - --enable-introspection \ + --enable-introspection=yes \ %if %{with regen_docs} - --enable-gtk-doc \ + --enable-gtk-doc=yes \ %else - --disable-gtk-doc \ + --enable-gtk-doc=no \ %endif %if %{with team} --enable-teamdctl=yes \ @@ -815,16 +830,15 @@ intltoolize --automake --copy --force --with-selinux=yes \ --enable-polkit=yes \ --enable-modify-system=yes \ - --enable-concheck \ + --enable-concheck=yes \ %if 0%{?fedora} - --with-libpsl \ + --with-libpsl=yes \ %else - --without-libpsl \ + --with-libpsl=no \ %endif --with-ebpf=%{ebpf_enabled} \ --with-session-tracking=systemd \ --with-suspend-resume=systemd \ - --with-systemdsystemunitdir=%{systemd_dir} \ --with-system-ca-path=/etc/pki/tls/cert.pem \ --with-dbus-sys-dir=%{dbus_sys_dir} \ --with-tests=yes \ @@ -841,12 +855,14 @@ intltoolize --automake --copy --force --enable-ppp=yes \ %endif %if %{with firewalld_zone} - --enable-firewalld-zone \ + --enable-firewalld-zone=yes \ %else - --disable-firewalld-zone \ + --enable-firewalld-zone=no \ %endif --with-dist-version=%{version}-%{release} \ - --with-config-plugins-default=%{config_plugins_default} \ +%if %{?config_plugins_default_ifcfg_rh} + --with-config-plugins-default=ifcfg-rh \ +%endif --with-resolvconf=no \ --with-netconfig=no \ --with-config-dns-rc-manager-default=%{dns_rc_manager_default} \ @@ -877,6 +893,10 @@ mkdir -p %{buildroot}%{_sysctldir} cp %{SOURCE6} %{buildroot}%{_sysctldir} %endif +%if 0%{?ifcfg_warning} +cp %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts +%endif + cp examples/dispatcher/10-ifcfg-rh-routes.sh %{buildroot}%{nmlibdir}/dispatcher.d/ ln -s ../no-wait.d/10-ifcfg-rh-routes.sh %{buildroot}%{nmlibdir}/dispatcher.d/pre-up.d/ ln -s ../10-ifcfg-rh-routes.sh %{buildroot}%{nmlibdir}/dispatcher.d/no-wait.d/ @@ -917,7 +937,7 @@ make -k %{?_smp_mflags} check || : %pre -if [ -f "%{systemd_dir}/network-online.target.wants/NetworkManager-wait-online.service" ] ; then +if [ -f "%{_unitdir}/network-online.target.wants/NetworkManager-wait-online.service" ] ; then # older versions used to install this file, effectively always enabling # NetworkManager-wait-online.service. We no longer do that and rely on # preset. @@ -1005,7 +1025,9 @@ fi %{dbus_sys_dir}/org.freedesktop.NetworkManager.conf %{dbus_sys_dir}/nm-dispatcher.conf %{dbus_sys_dir}/nm-priv-helper.conf +%if 0%{?split_ifcfg_rh} == 0 %{dbus_sys_dir}/nm-ifcfg-rh.conf +%endif %{_sbindir}/%{name} %{_bindir}/nmcli %{_datadir}/bash-completion/completions/nmcli @@ -1028,7 +1050,9 @@ fi %{_libexecdir}/nm-priv-helper %dir %{_libdir}/%{name} %dir %{nmplugindir} -%{nmplugindir}/libnm-settings-plugin*.so +%if 0%{?split_ifcfg_rh} == 0 +%{nmplugindir}/libnm-settings-plugin-ifcfg-rh.so +%endif %if %{with nmtui} %exclude %{_mandir}/man1/nmtui* %endif @@ -1046,6 +1070,7 @@ fi %{_mandir}/man8/nm-initrd-generator.8.gz %{_mandir}/man8/NetworkManager.8.gz %{_mandir}/man8/NetworkManager-dispatcher.8.gz +%{_mandir}/man8/NetworkManager-wait-online.service.8.gz %dir %{_localstatedir}/lib/NetworkManager %dir %{_sysconfdir}/sysconfig/network-scripts %{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service @@ -1056,13 +1081,16 @@ fi %{_prefix}/lib/firewalld/zones/nm-shared.xml %endif # systemd stuff -%{systemd_dir}/NetworkManager.service -%{systemd_dir}/NetworkManager-wait-online.service -%{systemd_dir}/NetworkManager-dispatcher.service -%{systemd_dir}/nm-priv-helper.service +%{_unitdir}/NetworkManager.service +%{_unitdir}/NetworkManager-wait-online.service +%{_unitdir}/NetworkManager-dispatcher.service +%{_unitdir}/nm-priv-helper.service %dir %{_datadir}/doc/NetworkManager/examples %{_datadir}/doc/NetworkManager/examples/server.conf -%doc NEWS AUTHORS README CONTRIBUTING.md TODO +%if 0%{?ifcfg_warning} +%{_sysconfdir}/sysconfig/network-scripts/readme-ifcfg-rh.txt +%endif +%doc NEWS AUTHORS README.md CONTRIBUTING.md %license COPYING %license COPYING.LGPL %license COPYING.GFDL @@ -1104,7 +1132,7 @@ fi %if %{with ovs} %files ovs %{nmplugindir}/libnm-device-plugin-ovs.so -%{systemd_dir}/NetworkManager.service.d/NetworkManager-ovs.conf +%{_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf %{_mandir}/man7/nm-openvswitch.7* %endif @@ -1175,11 +1203,18 @@ fi %endif +%if 0%{?split_ifcfg_rh} +%files initscripts-ifcfg-rh +%{nmplugindir}/libnm-settings-plugin-ifcfg-rh.so +%{dbus_sys_dir}/nm-ifcfg-rh.conf +%endif + + %if %{with nm_cloud_setup} %files cloud-setup %{_libexecdir}/nm-cloud-setup -%{systemd_dir}/nm-cloud-setup.service -%{systemd_dir}/nm-cloud-setup.timer +%{_unitdir}/nm-cloud-setup.service +%{_unitdir}/nm-cloud-setup.timer %{nmlibdir}/dispatcher.d/90-nm-cloud-setup.sh %{nmlibdir}/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh %{_mandir}/man8/nm-cloud-setup.8* @@ -1194,17 +1229,91 @@ fi %changelog -* Thu Jun 09 2022 Fernando Fernandez Mancera - 1:1.36.0-5 -- Fix DHCP loses lease when restarting (rh #2094715) -- core: set "src" attribute for routes from DHCPv4 (rh #2094778) -- platform: workaround for preserving IPv6 address order (rh #2094715) - -* Fri Apr 01 2022 Fernando Fernandez Mancera - 1:1.36.0-4 -- n-dhcp4: discard NAKs from different servers in SELECTING (rh #2067122) - -* Fri Mar 11 2022 Thomas Haller - 1:1.36.0-3 -- core: preserve external bridge ports during checkpoint rollback (rh #2061711) -- ovs-port: fix removal of ovsdb entry if the interface goes away (rh #2061709) +* Fri Aug 26 2022 Ana Cabral - 1:1.40.0-1 +- Update to 1.40.0 release + +* Tue Aug 16 2022 Ana Cabral - 1:1.39.90-1 +- Update to 1.39.90 release (release candidate) +- Add support for MPTCP (rh #2029636) +- nmcli: fix assertion failure (rh #2092323) +- bond: fix arp_ip_target option (rh #2117202) +- nmci: fix test restart_L2_only_lacp (rh #2092361) + +* Fri Jul 29 2022 Lubomir Rintel - 1:1.39.12-1 +- Update to 1.39.12 release (development) +- bridge: fix reapply support (rh #2092762) + +* Thu Jul 28 2022 Beniamino Galvani - 1:1.39.11-1 +- Update to 1.39.11 release (development) +- core: support nm.debug kernel command line option (rh #2102313) +- ovs: don't ever move unactivated devices to failed state (rh #2077950) +- dhclient: fix EXTENDED DHCP event handling (rh #2109285) +- core: make "nmcli net off/on" more robust (rh #2093175) +- bridge: add reapply support (rh #2092762) +- bridge: don't reset vlan filtering on external connections (rh #2107647) + +* Thu Jul 14 2022 Vojtech Bubela - 1:1.39.10-1 +- Update to 1.39.10 release (development) +- add support for {rto_min,quickack,advmss} route attributes (rh #2068525) +- fix empty hostname for "SaveHostname" and make setting hostname async (rh #2090946) + +* Thu Jun 30 2022 Lubomir Rintel - 1:1.39.8-1 +- Update to 1.39.8 release (development) +- core: make ipv6.addr-gen-mode default configurable (rh #1743161) (rh #2082682) +- dhcpv6: finish DAD before considering a lease to be good (rh #2096386) +- core: add connection.wait-activation-delay property (rh #2008337) + +* Thu Jun 16 2022 Thomas Haller - 1:1.39.7-2 +- fix priority of IPv6 addresses to prefer manual over DHCPv6 over SLAAC (rh #2097293) +- reverse order of priority for static IPv6 addresses in "ipv6.addresses" (rh #2097293) + +* Wed Jun 15 2022 Lubomir Rintel - 1:1.39.7-1 +- Update to 1.39.7 release (development) +- core: cancel the IP check on deactivation (rh #2080928) +- core: ensure DHCP is restarted every time the link goes up (rh #2079406) +- core: fix a leak of L3 configuration memory (rh #2083453) +- ppp: fix a race with pppd when removing addresses (rh #2085382) +- wifi: fix a crash when checking WEP supplicant capability (rh #2092782) + +* Wed Jun 1 2022 Beniamino Galvani - 1:1.39.6-1 +- Update to 1.39.6 release (development) +- Implement ACD (address conflict detection) for DHCPv4 (rh #1713380) + +* Thu May 19 2022 Ana Cabral - 1:1.39.5-1 +- Update to 1.39.5 release (development) +- dhcp: fix ignoring addresses with DHCPv6 otherconf (O flag) (rh #2083968) +- cloud-setup: reorder addresses to honor "primary_ip_address" (rh #2079849) + +* Wed May 4 2022 Wen Liang - 1:1.39.3-1 +- Update to 1.39.3 release (development) +- l3cfg: drop NM_L3_CFG_COMMIT_TYPE_ASSUME and assume_config_once (rh #2050216) + +* Thu Apr 21 2022 Thomas Haller - 1:1.39.2-1 +- Update to 1.39.2 release (development) +- dhcp: set "src" attribute for DHCP routes (rh #1995372) +- dhcp: drop internal DHCPv4 client based on systemd code (rh #2073067) +- core: delay startup complete for DNS update (rh #2049421) +- nmcli: support offline mode to create and edit keyfiles (rh #1361145) + +* Wed Apr 6 2022 Ana Cabral - 1:1.39.0-1 +- Upgrade to 1.39.0 release (development) +- Include a migration tool for ifcfg configuration to NM keyfiles + (rh #2059608) + +* Thu Mar 24 2022 Lubomir Rintel - 1:1.37.3-1 +- Upgrade to 1.37.3 release (development) +- core: allow reapply on autoconnect-slaves property change (rh #2065049) +- wifi: do not advertise channels outside regulatory domain (rh #2062785) +- wifi: warn about WEP being phased out (rh #2030997) +- bond: reject reapply when fail_over_mac was changed (rh #2003214) + +* Wed Mar 9 2022 Beniamino Galvani - 1:1.37.2-1 +- Upgrade to 1.37.2 release (development) +- core: preserve external ports during checkpoint rollback (rh #2061711) +- core: fix ovs bridge deletion (rh #2061709) +- core: shorten hostname when too long (rh #2033643) +- nm-online: bump the timeout upper limit to 2073600 seconds (rh #2025617) +- cloud-setup: fix crash when handling sigterm (rh #2027674) * Mon Feb 28 2022 Beniamino Galvani - 1:1.36.0-2 - core: fix setting DNS from WWAN and PPP (rh #2059138)