Update to 1.10.6 release

This commit is contained in:
Thomas Haller 2018-03-12 14:11:34 +01:00
parent 9c37f0c674
commit 17941a667b
7 changed files with 8 additions and 205 deletions

1
.gitignore vendored
View File

@ -342,3 +342,4 @@ network-manager-applet-0.8.1.tar.bz2
/NetworkManager-1.8.4.tar.xz
/NetworkManager-1.10.2.tar.xz
/NetworkManager-1.10.4.tar.xz
/NetworkManager-1.10.6.tar.xz

View File

@ -1,48 +0,0 @@
From 640673f75ba4bcc40989b3bf1c03738b562ea2fc Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Sun, 28 Jan 2018 08:51:25 +0100
Subject: [PATCH 1/2] build: fix configure check for CC support of _Generic()
and __auto_type
autotools' AC_LANG_PROGRAM() generates a main() function which triggers
a compiler warning (for which we fail with -WError).
conftest.c:92:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
main ()
^~~~
cc1: all warnings being treated as errors
Fixes: 557d83bf2ddf832828a9b85ffffcad0b7d88272a
(cherry picked from commit a43bf33888a639671bb7b7c7d37f416f1ef8dd79)
---
configure.ac | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index e263738f5..ab2ded77b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1224,16 +1224,16 @@ fi
AC_SUBST(SANITIZERS, [$sanitizers])
AC_MSG_CHECKING([CC support C11 _Generic()])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(void); int foo() { int a = 0; int b = _Generic (a, int: 4); return b + a; }]],
- [[foo();]])],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int foo(void); int foo() { int a = 0; int b = _Generic (a, int: 4); return b + a; }]],
+ [[foo();]])],
[cc_support_generic=1],
[cc_support_generic=0])
AC_MSG_RESULT($cc_support_generic)
AC_DEFINE_UNQUOTED(_NM_CC_SUPPORT_GENERIC, $cc_support_generic, [Define whether the compiler supports C11 _Generic()])
AC_MSG_CHECKING([CC support gcc __auto_type])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(void); int foo() { int a = 0; __auto_type b = a; return b + a; }]],
- [[foo();]])],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int foo(void); int foo() { int a = 0; __auto_type b = a; return b + a; }]],
+ [[foo();]])],
[cc_support_auto_type=1],
[cc_support_auto_type=0])
AC_MSG_RESULT($cc_support_auto_type)
--
2.14.3

View File

@ -1,63 +0,0 @@
From 5159c34ea8923bf0c17fd31e183c5803b72b97f3 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Mon, 5 Feb 2018 13:10:24 +0100
Subject: [PATCH 2/2] ovs: fix compiler error for passing NMDevice pointer to
NM_DEVICE_OVS_INTERFACE_GET_PRIVATE()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NM_DEVICE_OVS_INTERFACE_GET_PRIVATE() is implemented via the _NM_GET_PRIVATE()
macro. This macro uses C11's _Generic() to provide additional compiler checks
when casting from an incompatible pointer type.
As such,
NMDevice *device = ...;
NMDeviceOvsInterfacePrivate *priv;
priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE (device);
causes a compilation error:
error: _Generic selector of type NMDevice * {aka struct _NMDevice *} is not compatible with any association
One workaround would be to cast the pointer first:
priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE ((NMDeviceOvsInterface *) device);
A better fix is to mark NMDevice as a compatible pointer in _NM_GET_PRIVATE(),
which this patch does.
Previously, this went unnoticed, because due to bug "a43bf3388 build: fix configure
check for CC support of _Generic() and __auto_type", we failed to detect support
for _Generic() when compiling with -Werror. That essentially disables this check,
and NM_DEVICE_OVS_INTERFACE_GET_PRIVATE() would do a direct cast.
A workaround for this build failure might be to build with -Werror, which accidentally
results in not using _Generic().
https://bugzilla.gnome.org/show_bug.cgi?id=793183
Fixes: 8ad310f8e3cb0157cfa5fa8ff10f313555cf8e3c
(cherry picked from commit 782578122c6cb23bdbee0b01eddceee1b967a673)
---
src/devices/ovs/nm-device-ovs-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/devices/ovs/nm-device-ovs-interface.c b/src/devices/ovs/nm-device-ovs-interface.c
index e746a3fd2..ce32c2dd7 100644
--- a/src/devices/ovs/nm-device-ovs-interface.c
+++ b/src/devices/ovs/nm-device-ovs-interface.c
@@ -50,7 +50,7 @@ struct _NMDeviceOvsInterfaceClass {
G_DEFINE_TYPE (NMDeviceOvsInterface, nm_device_ovs_interface, NM_TYPE_DEVICE)
-#define NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceOvsInterface, NM_IS_DEVICE_OVS_INTERFACE)
+#define NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceOvsInterface, NM_IS_DEVICE_OVS_INTERFACE, NMDevice)
/*****************************************************************************/
--
2.14.3

View File

@ -1,37 +0,0 @@
From 9777492dde8ad40882b804fcda332cb3e1f46271 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 7 Feb 2018 11:23:08 +0100
Subject: [PATCH] m4: disable -Wcast-function-type
This fixes the GCC 8 build. It disables the warning conditionally so that we
get the warning back if glib gets fixed.
(cherry picked from commit 631982a796a0eeb412551c61469a1cfb83e3f438)
---
m4/compiler_options.m4 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4
index ccb51f5e6..2350571e2 100644
--- a/m4/compiler_options.m4
+++ b/m4/compiler_options.m4
@@ -127,6 +127,16 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
[union { int a[1]; int b[2]; } c = { 0 }]
)
+ dnl a new warning in gcc 8, glib 2.55 doesn't play nice yet
+ NM_COMPILER_WARNING([cast-function-type],
+ [#include <glib-object.h>]
+ [typedef struct { GObject parent; } NMObject;]
+ [typedef struct { GObjectClass parent; } NMObjectClass;]
+ [static void nm_object_init (NMObject *object) { } ]
+ [static void nm_object_class_init (NMObjectClass *object) { }]
+ [G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)]
+ )
+
CFLAGS="$CFLAGS_MORE_WARNINGS $CFLAGS"
else
AC_MSG_RESULT(no)
--
2.14.3

View File

@ -1,45 +0,0 @@
From fbff058fcdf92bd84331259078f02d1d27509680 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.com>
Date: Tue, 6 Mar 2018 13:04:00 +0000
Subject: [PATCH 1/1] policy: fix blocking autoconnect for no-secrets
The condition was obviosly inverted, blocking autoconnect when
it should not, and not blocking it when it should.
[thaller@redhat.com: modified original patch and rewrite commit message]
Fixes: e2c8ef45ac9fba8d4f5722ab10831bf42085a110
https://bugzilla.gnome.org/show_bug.cgi?id=794014
(cherry picked from commit d2f019409d0906814ccd2050ce39609903f879f7)
(cherry picked from commit 0824a327039d7fe7f9723f316da30538c7b688d0)
---
src/nm-policy.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 4d0ef91a1..b73e04cb2 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1758,10 +1758,16 @@ device_state_changed (NMDevice *device,
* been consulted, and it may be able to provide the secrets.
*
* We detect this by using a version-id of the agent-manager, which increments
- * whenever new agents register. */
+ * whenever new agents register. Note that the agent-manager's version-id is
+ * never zero and strictly increasing.
+ *
+ * A connection's version-id of zero means that the connection never tried to request secrets.
+ * That can happen when nm_settings_connection_get_secrets() fails early without actually
+ * consulting any agents.
+ */
con_v = nm_settings_connection_get_last_secret_agent_version_id (connection);
if ( con_v == 0
- || con_v != nm_agent_manager_get_agent_version_id (priv->agent_mgr))
+ || con_v == nm_agent_manager_get_agent_version_id (priv->agent_mgr))
block_no_secrets = TRUE;
}
--
2.14.3

View File

@ -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.10.4
%global real_version 1.10.4
%global release_version 2
%global rpm_version 1.10.6
%global real_version 1.10.6
%global release_version 1
%global snapshot %{nil}
%global git_sha %{nil}
@ -91,10 +91,6 @@ Source2: 00-server.conf
Source3: 20-connectivity-fedora.conf
#Patch1: 0001-some.patch
Patch1: 0001-build-fix-configure-check-for-CC-support-of-_Generic.patch
Patch2: 0002-ovs-fix-compiler-error-for-passing-NMDevice-pointer-.patch
Patch3: 0003-m4-disable-Wcast-function-type.patch
Patch4: 0004-policy-fix-blocking-autoconnect-for-no-secrets-rh1553773.patch
Requires(post): systemd
Requires(preun): systemd
@ -363,10 +359,6 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
%setup -q -n NetworkManager-%{real_version}
#%patch1 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%if %{with regen_docs}
@ -718,6 +710,9 @@ fi
%endif
%changelog
* Mon Mar 12 2018 Thomas Haller <thaller@redhat.com> - 1:1.10.6-1
- Update to 1.10.6 release
* Fri Mar 9 2018 Thomas Haller <thaller@redhat.com> - 1:1.10.4-2
- policy: fix blocking autoconnect for no-secrets (rh #1553773)

View File

@ -1 +1 @@
SHA512 (NetworkManager-1.10.4.tar.xz) = d093a028eeb0e4d28de0e030a2f37d2a600651918ecae667cd5bb585377932fc9b905c9cca4aaffbad72ea95362750aa8851c56afe9b9a58723ec335f4984009
SHA512 (NetworkManager-1.10.6.tar.xz) = 8406ed561efff13b63dc218babdd2ad9e2816bcc829ba3ef2ce942bb5fa027640de28660381203016fa9cddb61412d3cd5102b7cbd29d0e284b5cb8d13dd8610