From 6bc612ab67c7bd9d613c5ebcef76b367c7815f78141270522153d7ef082a8646 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 25 Apr 2018 11:59:47 +0000 Subject: [PATCH] Accepting request 600988 from home:iznogood:branches:GNOME:Factory Add upstream bug fixes OBS-URL: https://build.opensuse.org/request/show/600988 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libsoup?expand=0&rev=210 --- ...Cookie-fix-instrospection-annotation.patch | 35 +++++++++++++++++++ ...oup-soup-socket-fix-critical-warning.patch | 29 +++++++++++++++ libsoup-xmlrpc-server-dont-count-null.patch | 35 +++++++++++++++++++ libsoup.changes | 9 +++++ libsoup.spec | 9 +++++ 5 files changed, 117 insertions(+) create mode 100644 libsoup-SoupCookie-fix-instrospection-annotation.patch create mode 100644 libsoup-soup-socket-fix-critical-warning.patch create mode 100644 libsoup-xmlrpc-server-dont-count-null.patch diff --git a/libsoup-SoupCookie-fix-instrospection-annotation.patch b/libsoup-SoupCookie-fix-instrospection-annotation.patch new file mode 100644 index 0000000..9e0853e --- /dev/null +++ b/libsoup-SoupCookie-fix-instrospection-annotation.patch @@ -0,0 +1,35 @@ +From eba6193cd1235a2ae2c08a09c1564bef3faf0fdd Mon Sep 17 00:00:00 2001 +From: Claudio Saavedra +Date: Wed, 11 Apr 2018 11:10:34 +0300 +Subject: SoupCookie: fix the instrospection annotation for get_expires() + +The value returned can be NULL so reflect that in the introspection +annotation. + +https://bugzilla.gnome.org/show_bug.cgi?id=795135 +--- + libsoup/soup-cookie.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c +index d97b23f..1d0dde3 100644 +--- a/libsoup/soup-cookie.c ++++ b/libsoup/soup-cookie.c +@@ -598,10 +598,11 @@ soup_cookie_set_max_age (SoupCookie *cookie, int max_age) + * soup_cookie_get_expires: + * @cookie: a #SoupCookie + * +- * Gets @cookie's expiration time ++ * Gets @cookie's expiration time. + * +- * Return value: (transfer none): @cookie's expiration time, which is +- * owned by @cookie and should not be modified or freed. ++ * Return value: (nullable) (transfer none): @cookie's expiration ++ * time, which is owned by @cookie and should not be modified or ++ * freed. + * + * Since: 2.32 + **/ +-- +cgit v0.12 + diff --git a/libsoup-soup-socket-fix-critical-warning.patch b/libsoup-soup-socket-fix-critical-warning.patch new file mode 100644 index 0000000..ef3fa38 --- /dev/null +++ b/libsoup-soup-socket-fix-critical-warning.patch @@ -0,0 +1,29 @@ +From 703b9eb0760e3d7d4e1a87ad79812258ca7d4960 Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos +Date: Fri, 20 Apr 2018 12:14:55 +0200 +Subject: soup-socket: fix critical warning when the peer-certificate changes + after disconnect + +(process:15586): GLib-GIO-CRITICAL **: 12:14:39.627: g_tls_connection_get_peer_certificate_errors: assertion 'G_IS_TLS_CONNECTION (conn)' failed + +We should disconnect the signal on disconnect_internal before clearing +the connection object. +--- + libsoup/soup-socket.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c +index 5363dc7..311c627 100644 +--- a/libsoup/soup-socket.c ++++ b/libsoup/soup-socket.c +@@ -188,6 +188,7 @@ disconnect_internal (SoupSocket *sock, gboolean close) + g_clear_object (&priv->gsock); + if (priv->conn && close) { + g_io_stream_close (priv->conn, NULL, NULL); ++ g_signal_handlers_disconnect_by_data (priv->conn, sock); + g_clear_object (&priv->conn); + } + +-- +cgit v0.12 + diff --git a/libsoup-xmlrpc-server-dont-count-null.patch b/libsoup-xmlrpc-server-dont-count-null.patch new file mode 100644 index 0000000..e0a7012 --- /dev/null +++ b/libsoup-xmlrpc-server-dont-count-null.patch @@ -0,0 +1,35 @@ +From 45526b6b26a118ff7d91d587e89fff779b2a97a0 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Thu, 11 Jan 2018 20:22:58 +0100 +Subject: xmlrpc-server.php: Don't try to count NULL params +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Trying to count something uncountable causes PHP ≥7.2 to emit a warning +before returning zero. + +I assume that the ping() function's $params is NULL when there are no +parameters. + +https://bugzilla.gnome.org/show_bug.cgi?id=795111 +--- + tests/xmlrpc-server.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/xmlrpc-server.php b/tests/xmlrpc-server.php +index 4025f95..f315b6d 100644 +--- a/tests/xmlrpc-server.php ++++ b/tests/xmlrpc-server.php +@@ -71,7 +71,7 @@ function echo_ ($method_name, $params, $app_data) + + function ping ($method_name, $params, $app_data) + { +- if (count ($params) == 0) ++ if (is_null ($params) or count ($params) == 0) + return "pong"; + else + return paramfault (); +-- +cgit v0.12 + diff --git a/libsoup.changes b/libsoup.changes index 5b21850..b1477d3 100644 --- a/libsoup.changes +++ b/libsoup.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Apr 25 11:29:38 UTC 2018 - bjorn.lie@gmail.com + +- Add upstream bug fix patches: + + libsoup-SoupCookie-fix-instrospection-annotation.patch + (bgo#795135). + + libsoup-xmlrpc-server-dont-count-null.patch (bgo#795111). + + libsoup-soup-socket-fix-critical-warning.patch. + ------------------------------------------------------------------- Mon Apr 9 20:58:45 UTC 2018 - bjorn.lie@gmail.com diff --git a/libsoup.spec b/libsoup.spec index 434e244..4292785 100644 --- a/libsoup.spec +++ b/libsoup.spec @@ -25,6 +25,12 @@ Group: Development/Libraries/GNOME URL: https://wiki.gnome.org/Projects/libsoup Source: http://download.gnome.org/sources/libsoup/2.62/%{name}-%{version}.tar.xz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM libsoup-SoupCookie-fix-instrospection-annotation.patch bgo#795135 -- SoupCookie: fix the instrospection annotation for get_expires() +Patch0: libsoup-SoupCookie-fix-instrospection-annotation.patch +# PATCH-FIX-UPSTREAM libsoup-xmlrpc-server-dont-count-null.patch bgo#795111 -- xmlrpc-server.php: Don't try to count NULL params +Patch1: libsoup-xmlrpc-server-dont-count-null.patch +# PATCH-FIX-UPSTREAM libsoup-soup-socket-fix-critical-warning.patch -- soup-socket: fix critical warning when the peer-certificate changes after disconnect +Patch2: libsoup-soup-socket-fix-critical-warning.patch BuildRequires: glib-networking BuildRequires: intltool >= 0.35.0 BuildRequires: pkgconfig @@ -114,6 +120,9 @@ Features: %prep %setup -q translation-update-upstream +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %configure\