diff --git a/.gitignore b/.gitignore index 57f77f6..70889bb 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,4 @@ network-manager-applet-0.8.1.tar.bz2 /NetworkManager-1.32.8.tar.xz /NetworkManager-1.32.10.tar.xz /NetworkManager-1.32.12.tar.xz +/NetworkManager-1.35.1.tar.xz diff --git a/0001-core-better-handle-sd-resolved-errors-when-resolving.patch b/0001-core-better-handle-sd-resolved-errors-when-resolving.patch deleted file mode 100644 index 6f0dbd8..0000000 --- a/0001-core-better-handle-sd-resolved-errors-when-resolving.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 61239e69c698b1aff96a3510b6a2324316017693 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Thu, 28 Oct 2021 17:20:12 +0200 -Subject: [PATCH] core: better handle sd-resolved errors when resolving - hostnames - -If NM tries to resolve a link-local address, systemd-resolved returns -error "org.freedesktop.resolve1.NoNameServers" because those addresses -can only be resolved via other protocols like LLMNR or mDNS. - -Previously NM would fall back to spawning the helper, which would ask -again to systemd-resolved via /etc/resolv.conf. In this way, a -synthetic result (or one obtained not from DNS) would be returned. - -We must avoid non-DNS results. When systemd-resolved returns an error -that is not a D-Bus one (as MethodNotFound) but is a -"org.fd.resolve1.*" [1], we can assume that systemd-resolved is -running properly and we shall never fall back to spawning the helper. - -[1] https://www.freedesktop.org/wiki/Software/systemd/resolved/#commonerrors - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/833 -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1006 -(cherry picked from commit d8186b1253a2e0fe88eb06bede17f4892b4270c1) -(cherry picked from commit 77a2a53e8abf25b57fd9dc16ca6a81b6f609d6c1) ---- - src/core/devices/nm-device-utils.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/src/core/devices/nm-device-utils.c b/src/core/devices/nm-device-utils.c -index f40ca570f6..75b803de4f 100644 ---- a/src/core/devices/nm-device-utils.c -+++ b/src/core/devices/nm-device-utils.c -@@ -267,7 +267,18 @@ resolve_addr_resolved_cb(NMDnsSystemdResolved * resolved, - _LOG2D(info, "error resolving via systemd-resolved: %s", error->message); - - dbus_error = g_dbus_error_get_remote_error(error); -- if (nm_streq0(dbus_error, "org.freedesktop.resolve1.DnsError.NXDOMAIN")) { -+ if (NM_STR_HAS_PREFIX(dbus_error, "org.freedesktop.resolve1.")) { -+ /* systemd-resolved is enabled but it couldn't resolve the -+ * address via DNS. Don't fall back to spawning the helper, -+ * because the helper will possibly ask again to -+ * systemd-resolved (via /etc/resolv.conf), potentially using -+ * other protocols than DNS or returning synthetic results. -+ * -+ * Consider the error as the final indication that the address -+ * can't be resolved. -+ * -+ * See: https://www.freedesktop.org/wiki/Software/systemd/resolved/#commonerrors -+ */ - resolve_addr_complete(info, NULL, g_error_copy(error)); - return; - } --- -2.31.1 - diff --git a/NetworkManager.spec b/NetworkManager.spec index e31892a..85bbda6 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -5,9 +5,9 @@ %global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad) %global epoch_version 1 -%global rpm_version 1.32.12 -%global real_version 1.32.12 -%global release_version 2 +%global rpm_version 1.36.0 +%global real_version 1.35.1 +%global release_version 0.1 %global snapshot %{nil} %global git_sha %{nil} @@ -32,7 +32,7 @@ %global real_version_major %(printf '%s' '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[0-9][0-9]*\\)\\.[0-9][0-9]*$/\\1/p') -%global systemd_units NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service +%global systemd_units NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service nm-sudo.service %global systemd_units_cloud_setup nm-cloud-setup.service nm-cloud-setup.timer @@ -185,9 +185,12 @@ Source4: 20-connectivity-fedora.conf Source5: 20-connectivity-redhat.conf Source6: 70-nm-connectivity.conf -Patch0001: 0001-core-better-handle-sd-resolved-errors-when-resolving.patch +# Patch0001: 0001-some.patch Requires(post): systemd +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires(post): systemd-udev +%endif Requires(post): /usr/sbin/update-alternatives Requires(preun): systemd Requires(preun): /usr/sbin/update-alternatives @@ -931,7 +934,7 @@ if [ $1 -eq 0 ]; then /usr/sbin/update-alternatives --remove ifup %{_libexecdir}/nm-ifup >/dev/null 2>&1 || : fi -%systemd_preun NetworkManager-wait-online.service NetworkManager-dispatcher.service +%systemd_preun NetworkManager-wait-online.service NetworkManager-dispatcher.service nm-sudo.service %if %{with nm_cloud_setup} @@ -965,6 +968,7 @@ fi %files %{dbus_sys_dir}/org.freedesktop.NetworkManager.conf %{dbus_sys_dir}/nm-dispatcher.conf +%{dbus_sys_dir}/nm-sudo.conf %{dbus_sys_dir}/nm-ifcfg-rh.conf %{_sbindir}/%{name} %{_bindir}/nmcli @@ -987,9 +991,9 @@ fi %ghost %attr(755, root, root) %{_sbindir}/ifdown %{_libexecdir}/nm-dhcp-helper %{_libexecdir}/nm-dispatcher -%{_libexecdir}/nm-iface-helper %{_libexecdir}/nm-initrd-generator %{_libexecdir}/nm-daemon-helper +%{_libexecdir}/nm-sudo %dir %{_libdir}/%{name} %dir %{nmplugindir} %{nmplugindir}/libnm-settings-plugin*.so @@ -1013,6 +1017,7 @@ fi %dir %{_localstatedir}/lib/NetworkManager %dir %{_sysconfdir}/sysconfig/network-scripts %{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service +%{_datadir}/dbus-1/system-services/org.freedesktop.nm.sudo.service %{_datadir}/polkit-1/actions/*.policy %{_prefix}/lib/udev/rules.d/*.rules %if %{with firewalld_zone} @@ -1022,6 +1027,7 @@ fi %{systemd_dir}/NetworkManager.service %{systemd_dir}/NetworkManager-wait-online.service %{systemd_dir}/NetworkManager-dispatcher.service +%{systemd_dir}/nm-sudo.service %dir %{_datadir}/doc/NetworkManager/examples %{_datadir}/doc/NetworkManager/examples/server.conf %doc NEWS AUTHORS README CONTRIBUTING.md TODO @@ -1149,6 +1155,9 @@ fi %changelog +* Fri Nov 19 2021 Beniamino Galvani - 1:1.36.0-0.1 +- update to an early 1.36 snapshot (1.35.1) + * Fri Oct 29 2021 Beniamino Galvani - 1:1.32.12-2 - better handle systemd-resolved errors when resolving hostnames diff --git a/sources b/sources index 5b4d434..4d5b712 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (NetworkManager-1.32.12.tar.xz) = b8dfa409302781fdab19790afeb7f4396875e282d6983e2c5775294c8c13d3c1036dee69a37bf6e4fb2a2e80504c8e792780b6a9c1262616e57860da5ebc0e61 +SHA512 (NetworkManager-1.35.1.tar.xz) = fc8fe550f56c5b55d86b91527fac6a59c365c5130d2a0282097be28dd86a6d7226284cf4780211764518c0fcc04faeaa16f2286ad1955c3dd6ae8aa78565809e