From 354ea1ca0d52a3674df7728a21aa0f6ea4362d0c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 Sep 2017 13:32:54 +0200 Subject: [PATCH] Update to 1.8.4 release --- .gitignore | 1 + 0001-dhcp-interface-parsing.patch | 158 ------------------------- 0002-dns-fix-domain-suffix-check.patch | 108 ----------------- NetworkManager.spec | 32 +++-- sources | 2 +- 5 files changed, 23 insertions(+), 278 deletions(-) delete mode 100644 0001-dhcp-interface-parsing.patch delete mode 100644 0002-dns-fix-domain-suffix-check.patch diff --git a/.gitignore b/.gitignore index 6e04bef..fe20a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -339,3 +339,4 @@ network-manager-applet-0.8.1.tar.bz2 /NetworkManager-1.7.92.tar.xz /NetworkManager-1.8.0.tar.xz /NetworkManager-1.8.2.tar.xz +/NetworkManager-1.8.4.tar.xz diff --git a/0001-dhcp-interface-parsing.patch b/0001-dhcp-interface-parsing.patch deleted file mode 100644 index 071736c..0000000 --- a/0001-dhcp-interface-parsing.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 810d243f3ebfe46e78024b239da19ac0cf150801 Mon Sep 17 00:00:00 2001 -From: Jonathan Kang -Date: Thu, 6 Jul 2017 16:20:25 +0800 -Subject: [PATCH 1/2] dhcp/dhclient: improve "interface" statement parsing - -In commit d405cfd9089f9552969e6a3e1a1c4550fc3c1695, parsing "interface" -statement is introduced. But it leads to uncommplete parsing of the -"request" entry, if one of the lines in "request" entry is prefixed with -word "interface". For example, the default configuration of openSUSE -distribution: - -request subnet-mask, broadcast-address, routers, - rfc3442-classless-static-routes, - interface-mtu, host-name, domain-name, domain-search, - domain-name-servers, nis-domain, nis-servers, - nds-context, nds-servers, nds-tree-name, - netbios-name-servers, netbios-dd-server, - netbios-node-type, netbios-scope, ntp-servers; - -Fixes: d405cfd9089f9552969e6a3e1a1c4550fc3c1695 - -https://bugzilla.opensuse.org/show_bug.cgi?id=1047004 -https://mail.gnome.org/archives/networkmanager-list/2017-July/msg00015.html -(cherry picked from commit 3646ed083dda590de1e991915048905b8c784cdd) -(cherry picked from commit 7200906a6202285a97969fea8dea86d5dce9cddf) ---- - src/dhcp/nm-dhcp-dhclient-utils.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/dhcp/nm-dhcp-dhclient-utils.c b/src/dhcp/nm-dhcp-dhclient-utils.c -index 216319b..28c290c 100644 ---- a/src/dhcp/nm-dhcp-dhclient-utils.c -+++ b/src/dhcp/nm-dhcp-dhclient-utils.c -@@ -296,7 +296,8 @@ nm_dhcp_dhclient_create_config (const char *interface, - continue; - - if ( !intf[0] -- && g_str_has_prefix (p, "interface")) { -+ && g_str_has_prefix (p, "interface") -+ && !in_req) { - if (read_interface (p, intf, sizeof (intf))) - continue; - } --- -2.9.3 - -From 3f2821e1d95c0acb6aebd7d91ae5457c1739b664 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Mon, 10 Jul 2017 11:40:43 +0200 -Subject: [PATCH 2/2] dhcp/tests: add test parsing dhclient config - -(cherry picked from commit 0c23191b01fb0582d8f3d470f463afdabc2fdf46) -(cherry picked from commit beeb8df9ac93ad432c9533362d862c0c2466cd5e) ---- - src/dhcp/tests/test-dhcp-dhclient.c | 70 ++++++++++++++++++++++++++++++++----- - 1 file changed, 62 insertions(+), 8 deletions(-) - -diff --git a/src/dhcp/tests/test-dhcp-dhclient.c b/src/dhcp/tests/test-dhcp-dhclient.c -index 40a3e07..3c9760a 100644 ---- a/src/dhcp/tests/test-dhcp-dhclient.c -+++ b/src/dhcp/tests/test-dhcp-dhclient.c -@@ -66,17 +66,16 @@ test_config (const char *orig, - &new_client_id); - g_assert (new != NULL); - --#if DEBUG -- if ( strlen (new) != strlen (expected) -- || strcmp (new, expected)) { -- g_message ("\n- NEW ---------------------------------\n" -+ if (!nm_streq (new, expected)) { -+ g_message ("\n* OLD ---------------------------------\n" - "%s" -- "+ EXPECTED ++++++++++++++++++++++++++++++\n" -+ "\n- NEW -----------------------------------\n" - "%s" -- "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", -- new, expected); -+ "\n+ EXPECTED ++++++++++++++++++++++++++++++\n" -+ "%s" -+ "\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", -+ orig, new, expected); - } --#endif - g_assert_cmpstr (new, ==, expected); - - if (expected_new_client_id) { -@@ -831,6 +830,60 @@ test_interface2 (void) - NULL); - } - -+static void -+test_config_req_intf (void) -+{ -+ static const char *const orig = \ -+ "request subnet-mask, broadcast-address, routers,\n" -+ " rfc3442-classless-static-routes,\n" -+ " interface-mtu, host-name, domain-name, domain-search,\n" -+ " domain-name-servers, nis-domain, nis-servers,\n" -+ " nds-context, nds-servers, nds-tree-name,\n" -+ " netbios-name-servers, netbios-dd-server,\n" -+ " netbios-node-type, netbios-scope, ntp-servers;\n" -+ ""; -+ static const char *const expected = \ -+ "# Created by NetworkManager\n" -+ "# Merged from /path/to/dhclient.conf\n" -+ "\n" -+ "\n" -+ "option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n" -+ "option ms-classless-static-routes code 249 = array of unsigned integer 8;\n" -+ "option wpad code 252 = string;\n" -+ "\n" -+ "request; # override dhclient defaults\n" -+ "also request subnet-mask;\n" -+ "also request broadcast-address;\n" -+ "also request routers;\n" -+ "also request rfc3442-classless-static-routes;\n" -+ "also request interface-mtu;\n" -+ "also request host-name;\n" -+ "also request domain-name;\n" -+ "also request domain-search;\n" -+ "also request domain-name-servers;\n" -+ "also request nis-domain;\n" -+ "also request nis-servers;\n" -+ "also request nds-context;\n" -+ "also request nds-servers;\n" -+ "also request nds-tree-name;\n" -+ "also request netbios-name-servers;\n" -+ "also request netbios-dd-server;\n" -+ "also request netbios-node-type;\n" -+ "also request netbios-scope;\n" -+ "also request ntp-servers;\n" -+ "also request ms-classless-static-routes;\n" -+ "also request static-routes;\n" -+ "also request wpad;\n" -+ "\n"; -+ -+ test_config (orig, expected, -+ FALSE, NULL, FALSE, -+ NULL, -+ NULL, -+ "eth0", -+ NULL); -+} -+ - /*****************************************************************************/ - - static void -@@ -982,6 +1035,7 @@ main (int argc, char **argv) - g_test_add_func ("/dhcp/dhclient/duids", test_duids); - g_test_add_func ("/dhcp/dhclient/interface/1", test_interface1); - g_test_add_func ("/dhcp/dhclient/interface/2", test_interface2); -+ g_test_add_func ("/dhcp/dhclient/config/req_intf", test_config_req_intf); - - g_test_add_func ("/dhcp/dhclient/read_duid_from_leasefile", test_read_duid_from_leasefile); - g_test_add_func ("/dhcp/dhclient/read_commented_duid_from_leasefile", test_read_commented_duid_from_leasefile); --- -2.9.3 - diff --git a/0002-dns-fix-domain-suffix-check.patch b/0002-dns-fix-domain-suffix-check.patch deleted file mode 100644 index f18105d..0000000 --- a/0002-dns-fix-domain-suffix-check.patch +++ /dev/null @@ -1,108 +0,0 @@ -From dd3531f120df2e9d249c6fddc062345c169db58e Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Fri, 14 Jul 2017 07:10:08 +0200 -Subject: [PATCH] dns: perform the public-suffix check only for the - hostname-derived domain - -The DNS manager drops from the search list domains that are public -suffixes to prevent a possible domain hijack when using two-labels -hostnames [1]. - -This is a problem now that every single-label domain can be a TLD -since this means that such domains can't be used in the search list. - -While it's useful to apply such restriction to the domain -automatically derived from the system hostname, it seems wrong to drop -domains specified by users in the configuration or provided by DHCP. - -This commit keeps the public-suffix check only for the -hostname-derived domain - -[1] https://bugzilla.redhat.com/show_bug.cgi?id=812394 - -https://bugzilla.redhat.com/show_bug.cgi?id=1404350 -(cherry picked from commit 5aa22ed8c9c1944f8843442912561dcec83a11b2) -(cherry picked from commit e80163c713cdd911cb79036f3f7b629040297c58) ---- - src/dns/nm-dns-manager.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c -index f443f34..952468e 100644 ---- a/src/dns/nm-dns-manager.c -+++ b/src/dns/nm-dns-manager.c -@@ -158,12 +158,12 @@ G_DEFINE_TYPE (NMDnsManager, nm_dns_manager, NM_TYPE_EXPORTED_OBJECT) - #define NM_DNS_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDnsManager, NM_IS_DNS_MANAGER) - - static gboolean --domain_is_valid (const gchar *domain) -+domain_is_valid (const gchar *domain, gboolean check_public_suffix) - { - if (*domain == '\0') - return FALSE; - #if WITH_LIBPSL -- if (psl_is_public_suffix (psl_builtin (), domain)) -+ if (check_public_suffix && psl_is_public_suffix (psl_builtin (), domain)) - return FALSE; - #endif - return TRUE; -@@ -312,7 +312,7 @@ merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src) - const char *search; - - search = nm_ip4_config_get_search (src, i); -- if (!domain_is_valid (search)) -+ if (!domain_is_valid (search, FALSE)) - continue; - add_string_item (rc->searches, search); - } -@@ -322,7 +322,7 @@ merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src) - const char *domain; - - domain = nm_ip4_config_get_domain (src, i); -- if (!domain_is_valid (domain)) -+ if (!domain_is_valid (domain, FALSE)) - continue; - add_string_item (rc->searches, domain); - } -@@ -382,7 +382,7 @@ merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src, const char *iface) - const char *search; - - search = nm_ip6_config_get_search (src, i); -- if (!domain_is_valid (search)) -+ if (!domain_is_valid (search, FALSE)) - continue; - add_string_item (rc->searches, search); - } -@@ -392,7 +392,7 @@ merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src, const char *iface) - const char *domain; - - domain = nm_ip6_config_get_domain (src, i); -- if (!domain_is_valid (domain)) -+ if (!domain_is_valid (domain, FALSE)) - continue; - add_string_item (rc->searches, domain); - } -@@ -923,7 +923,7 @@ merge_global_dns_config (NMResolvConfData *rc, NMGlobalDnsConfig *global_conf) - options = nm_global_dns_config_get_options (global_conf); - - for (i = 0; searches && searches[i]; i++) { -- if (domain_is_valid (searches[i])) -+ if (domain_is_valid (searches[i], FALSE)) - add_string_item (rc->searches, searches[i]); - } - -@@ -1055,9 +1055,9 @@ _collect_resolv_conf_data (NMDnsManager *self, /* only for logging context, no o - if ( hostdomain - && !nm_utils_ipaddr_valid (AF_UNSPEC, hostname)) { - hostdomain++; -- if (domain_is_valid (hostdomain)) -+ if (domain_is_valid (hostdomain, TRUE)) - add_string_item (rc.searches, hostdomain); -- else if (domain_is_valid (hostname)) -+ else if (domain_is_valid (hostname, TRUE)) - add_string_item (rc.searches, hostname); - } - } --- -2.9.3 - diff --git a/NetworkManager.spec b/NetworkManager.spec index ec00314..5f06f61 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -7,9 +7,9 @@ %global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad) %global epoch_version 1 -%global rpm_version 1.8.2 -%global real_version 1.8.2 -%global release_version 3 +%global rpm_version 1.8.4 +%global real_version 1.8.4 +%global release_version 1 %global snapshot %{nil} %global git_sha %{nil} @@ -30,6 +30,8 @@ %global snap %{?snapshot_dot}%{?git_sha_dot} +%global real_version_major %(printf '%s' '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[1-9][0-9]*\\)\\.[1-9][0-9]*$/\\1/p') + %global is_devel_build %(printf '%s' '%{real_version}' | sed -n 's/^1\\.\\([0-9]*[13579]\\)\\..*/1/p') ############################################################################### @@ -72,18 +74,17 @@ Name: NetworkManager Summary: Network connection manager and user applications Epoch: %{epoch_version} Version: %{rpm_version} -Release: %{release_version}%{?snap}%{?dist}.2 +Release: %{release_version}%{?snap}%{?dist} Group: System Environment/Base License: GPLv2+ URL: http://www.gnome.org/projects/NetworkManager/ -Source: https://download.gnome.org/sources/NetworkManager/1.7/%{name}-%{real_version}.tar.xz +Source: https://download.gnome.org/sources/NetworkManager/%{real_version_major}/%{name}-%{real_version}.tar.xz Source1: NetworkManager.conf Source2: 00-server.conf Source3: 20-connectivity-fedora.conf -Patch1: 0001-dhcp-interface-parsing.patch -Patch2: 0002-dns-fix-domain-suffix-check.patch +#Patch1: 0001-some.patch Requires(post): systemd Requires(preun): systemd @@ -338,8 +339,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %prep %setup -q -n NetworkManager-%{real_version} -%patch1 -p1 -%patch2 -p1 +#%patch1 -p1 %build %if %{with regen_docs} @@ -352,7 +352,11 @@ intltoolize --automake --copy --force --with-dhclient=yes \ --with-dhcpcd=no \ --with-crypto=nss \ +%if %{with test} --enable-more-warnings=error \ +%else + --enable-more-warnings=yes \ +%endif %if %{with sanitizer} --enable-address-sanitizer \ --enable-undefined-sanitizer \ @@ -411,7 +415,11 @@ intltoolize --automake --copy --force --with-systemdsystemunitdir=%{systemd_dir} \ --with-system-ca-path=/etc/pki/tls/cert.pem \ --with-dbus-sys-dir=%{dbus_sys_dir} \ +%if %{with test} --with-tests=yes \ +%else + --with-tests=no \ +%endif --with-valgrind=no \ --enable-ifcfg-rh=yes \ %if %{with ppp} @@ -536,8 +544,6 @@ fi %{systemd_dir}/NetworkManager.service %{systemd_dir}/NetworkManager-wait-online.service %{systemd_dir}/NetworkManager-dispatcher.service -%dir %{systemd_dir}/network-online.target.wants -%{systemd_dir}/network-online.target.wants/NetworkManager-wait-online.service %dir %{_datadir}/doc/NetworkManager/examples %{_datadir}/doc/NetworkManager/examples/server.conf %doc NEWS AUTHORS README CONTRIBUTING TODO @@ -652,6 +658,10 @@ fi %endif %changelog +* Wed Sep 20 2017 Thomas Haller - 1:1.8.4-1 +- Update to 1.8.4 release +- don't install NetworkManager-wait-online in network-online.target.wants (rh#1455704) + * Wed Aug 02 2017 Fedora Release Engineering - 1:1.8.2-3.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index 9917a82..dd75644 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (NetworkManager-1.8.2.tar.xz) = 7bebea66d8f494c052313224e9d5b1b4cf665482f07ee5d93defc3543f32296545a2d1097ab1fff27dbebb58e07a4bc47fbc0101163db92953ae66ac9b95524d +SHA512 (NetworkManager-1.8.4.tar.xz) = e9aa26e2abe4537c6cbba53e281493e32be8a9f0624d5323212848f286d1279ad2ab79a39de34ad0ea188c888b1b61c4ba4d4d053c4d227e68f9236955f69bb1