diff --git a/.NetworkManager.metadata b/.NetworkManager.metadata index 95d4404..36d0016 100644 --- a/.NetworkManager.metadata +++ b/.NetworkManager.metadata @@ -1 +1 @@ -adbe8e9eef649ac73c4fbaefd71a1335d4d016cd SOURCES/NetworkManager-1.36.0.tar.xz +c2cad9754b9e5b0a3e1adb84a59e456d2c0c230d SOURCES/NetworkManager-1.37.2.tar.xz diff --git a/.gitignore b/.gitignore index db48e32..d417adb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/NetworkManager-1.36.0.tar.xz +SOURCES/NetworkManager-1.37.2.tar.xz diff --git a/SOURCES/1001-wwan-dns-fix-rh2059138.patch b/SOURCES/1001-wwan-dns-fix-rh2059138.patch deleted file mode 100644 index fbfcf88..0000000 --- a/SOURCES/1001-wwan-dns-fix-rh2059138.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 7ba52fdcfeeb1e5400bcecb9fa93b3099dcccb47 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Fri, 25 Feb 2022 10:06:48 +0100 -Subject: [PATCH] core: initialize l3cd dns-priority for ppp and wwan - -For devices that configure IP by themselves (by returning -"->ready_for_ip_config() = TRUE" and implementing -->act_stage3_ip_config()), we skip manual configuration. Currently, -manual configuration is the only one that sets flag HAS_DNS_PRIORITY -into the resulting l3cd. - -So, the merged l3cd for such devices misses a dns-priority and is -ignored by the DNS manager. - -Explicitly initialize the priority to 0; in this way, the default -value for the device will be set in the final l3cd during the merge. - -Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/931 -(cherry picked from commit b2e559fab2fa5adbf4e159fc1c2cadd3d965b01b) -(cherry picked from commit bfd3216584e9fe1eb0b6f3f81e3eb75a40877775) ---- - src/core/devices/wwan/nm-modem-broadband.c | 2 ++ - src/core/ppp/nm-ppp-manager.c | 1 + - 2 files changed, 3 insertions(+) - -diff --git a/src/core/devices/wwan/nm-modem-broadband.c b/src/core/devices/wwan/nm-modem-broadband.c -index f5336d3750..b585652e5d 100644 ---- a/src/core/devices/wwan/nm-modem-broadband.c -+++ b/src/core/devices/wwan/nm-modem-broadband.c -@@ -1032,6 +1032,7 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho - l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET), - ifindex, - NM_IP_CONFIG_SOURCE_WWAN); -+ nm_l3_config_data_set_dns_priority(l3cd, AF_INET, 0); - - address = (NMPlatformIP4Address){ - .address = address_network, -@@ -1118,6 +1119,7 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho - l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET), - ifindex, - NM_IP_CONFIG_SOURCE_WWAN); -+ nm_l3_config_data_set_dns_priority(l3cd, AF_INET6, 0); - - do_auto = TRUE; - -diff --git a/src/core/ppp/nm-ppp-manager.c b/src/core/ppp/nm-ppp-manager.c -index dd6b1bc7f0..5761d59d39 100644 ---- a/src/core/ppp/nm-ppp-manager.c -+++ b/src/core/ppp/nm-ppp-manager.c -@@ -545,6 +545,7 @@ impl_ppp_manager_set_ip4_config(NMDBusObject *obj, - NM_IP_CONFIG_SOURCE_PPP); - - nm_l3_config_data_set_mtu(l3cd, mtu); -+ nm_l3_config_data_set_dns_priority(l3cd, AF_INET, 0); - - address = (NMPlatformIP4Address){ - .plen = 32, --- -2.34.1 - diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 2fab53b..558fa08 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -5,18 +5,17 @@ %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 2 +%global rpm_version 1.37.2 +%global real_version 1.37.2 +%global release_version 1 %global snapshot %{nil} %global git_sha %{nil} %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} @@ -148,9 +147,15 @@ %endif %if 0%{?rhel} > 8 || 0%{?fedora} > 32 -%global config_plugins_default keyfile,ifcfg-rh +%global config_plugins_default_ifcfg_rh 0 %else -%global config_plugins_default ifcfg-rh +%global config_plugins_default_ifcfg_rh 1 +%endif + +%if 0%{?rhel} > 9 || 0%{?fedora} > 35 +%global split_ifcfg_rh 1 +%else +%global split_ifcfg_rh 0 %endif %if 0%{?fedora} @@ -194,7 +199,7 @@ Patch1: 0001-cloud-setup-systemd-unit-rh1791758.patch Patch2: 0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch # Bugfixes that are only relevant until next rebase of the package. -Patch1001: 1001-wwan-dns-fix-rh2059138.patch +# Patch1001: 1001-some.patch # The pregenerated docs contain default values and paths that depend # on the configure options when creating the source tarball. @@ -224,6 +229,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 @@ -533,6 +541,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 @@ -557,6 +568,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 @@ -690,7 +714,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 \ @@ -707,7 +730,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} \ @@ -826,7 +851,6 @@ intltoolize --automake --copy --force --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 \ @@ -848,7 +872,9 @@ intltoolize --automake --copy --force --disable-firewalld-zone \ %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} \ @@ -919,7 +945,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. @@ -1007,7 +1033,9 @@ fi %{dbus_sys_dir}/org.freedesktop.NetworkManager.conf %{dbus_sys_dir}/nm-dispatcher.conf %exclude %{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 @@ -1030,7 +1058,9 @@ fi %exclude %{_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 @@ -1048,8 +1078,11 @@ 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 +%if 0%{?split_ifcfg_rh} == 0 %dir %{_sysconfdir}/sysconfig/network-scripts +%endif %{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service %{_datadir}/dbus-1/system-services/org.freedesktop.nm_priv_helper.service %{_datadir}/polkit-1/actions/*.policy @@ -1058,10 +1091,10 @@ 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 -%exclude %{systemd_dir}/nm-priv-helper.service +%{_unitdir}/NetworkManager.service +%{_unitdir}/NetworkManager-wait-online.service +%{_unitdir}/NetworkManager-dispatcher.service +%exclude %{_unitdir}/nm-priv-helper.service %dir %{_datadir}/doc/NetworkManager/examples %{_datadir}/doc/NetworkManager/examples/server.conf %doc NEWS AUTHORS README CONTRIBUTING.md TODO @@ -1106,7 +1139,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 @@ -1177,11 +1210,19 @@ fi %endif +%if 0%{?split_ifcfg_rh} +%files initscripts-ifcfg-rh +%dir %{_sysconfdir}/sysconfig/network-scripts +%{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* @@ -1196,6 +1237,14 @@ fi %changelog +* 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 #2035519) +- core: fix ovs bridge deletion (rh #1935026) +- 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)