From b9da5c72d7cc5eebb1840a7318f5ace51ba56444b0d16cf9dde1b4f1b0810f3d Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 11 Feb 2021 12:16:28 +0000 Subject: [PATCH] Accepting request 870965 from home:pmonrealgonzalez:branches:GNOME:Factory - Disable tls_interaction-test until resolved upstream * See https://gitlab.gnome.org/GNOME/libsoup/issues/120 - Add libsoup-skip-tls_interaction-test.patch - Fix tests: fix SSL test with glib-networking >= 2.65.90 * See https://gitlab.gnome.org/GNOME/libsoup/issues/201 - Add libsoup-fix-SSL-test.patch - Remove patches: * libsoup-disable-ssl-tests.patch * libsoup-disable-hsts-tests.patch OBS-URL: https://build.opensuse.org/request/show/870965 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libsoup?expand=0&rev=253 --- libsoup-disable-hsts-tests.patch | 13 ---- libsoup-disable-ssl-tests.patch | 12 ---- libsoup-fix-SSL-test.patch | 86 +++++++++++++++++++++++++ libsoup-skip-tls_interaction-test.patch | 14 ++++ libsoup.changes | 17 +++++ libsoup.spec | 24 ++++--- 6 files changed, 128 insertions(+), 38 deletions(-) delete mode 100644 libsoup-disable-hsts-tests.patch delete mode 100644 libsoup-disable-ssl-tests.patch create mode 100644 libsoup-fix-SSL-test.patch create mode 100644 libsoup-skip-tls_interaction-test.patch diff --git a/libsoup-disable-hsts-tests.patch b/libsoup-disable-hsts-tests.patch deleted file mode 100644 index 83e8e13..0000000 --- a/libsoup-disable-hsts-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libsoup-2.70.0/tests/meson.build -=================================================================== ---- libsoup-2.70.0.orig/tests/meson.build -+++ libsoup-2.70.0/tests/meson.build -@@ -35,8 +35,6 @@ tests = [ - ['date', true, []], - ['forms', true, []], - ['header-parsing', true, []], -- ['hsts', true, []], -- ['hsts-db', true, []], - ['misc', true, []], - ['multipart', true, []], - ['no-ssl', true, []], diff --git a/libsoup-disable-ssl-tests.patch b/libsoup-disable-ssl-tests.patch deleted file mode 100644 index 045e420..0000000 --- a/libsoup-disable-ssl-tests.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: libsoup-2.70.0/tests/meson.build -=================================================================== ---- libsoup-2.70.0.orig/tests/meson.build -+++ libsoup-2.70.0/tests/meson.build -@@ -48,7 +48,6 @@ tests = [ - ['server', true, []], - ['sniffing', true, []], - ['socket', true, []], -- ['ssl', true, []], - ['streaming', true, []], - ['timeout', true, []], - ['tld', true, []], diff --git a/libsoup-fix-SSL-test.patch b/libsoup-fix-SSL-test.patch new file mode 100644 index 0000000..28c1f8b --- /dev/null +++ b/libsoup-fix-SSL-test.patch @@ -0,0 +1,86 @@ +From af574cf8bebbcb234b05a2919cad53f8d7c8c645 Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos +Date: Wed, 9 Sep 2020 14:44:25 +0200 +Subject: [PATCH] tests: fix SSL test with glib-networking >= 2.65.90 + +To make SSL tests fail with our testing certificate we create and empty +GTlsDatabase passing /dev/null to g_tls_file_database_new(). This no +longer works with newer glib-networking, since an empty file is +considered an error by gnutls and +g_tls_file_database_gnutls_populate_trust_list() now handles gnutls +errors properly. Instead, we can just use the system CA file that won't +contain our testing certificate for sure. + +Fixes #201 +--- + tests/ssl-test.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/tests/ssl-test.c b/tests/ssl-test.c +index 735ba416..2c93ca85 100644 +--- a/tests/ssl-test.c ++++ b/tests/ssl-test.c +@@ -3,7 +3,6 @@ + #include "test-utils.h" + + SoupURI *uri; +-GTlsDatabase *null_tlsdb; + + static void + do_properties_test_for_session (SoupSession *session) +@@ -37,7 +36,7 @@ do_async_properties_tests (void) + + session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); + g_object_set (G_OBJECT (session), +- SOUP_SESSION_TLS_DATABASE, null_tlsdb, ++ SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, + SOUP_SESSION_SSL_STRICT, FALSE, + NULL); + do_properties_test_for_session (session); +@@ -53,7 +52,7 @@ do_sync_properties_tests (void) + + session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL); + g_object_set (G_OBJECT (session), +- SOUP_SESSION_TLS_DATABASE, null_tlsdb, ++ SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, + SOUP_SESSION_SSL_STRICT, FALSE, + NULL); + do_properties_test_for_session (session); +@@ -106,7 +105,7 @@ do_strictness_test (gconstpointer data) + } + if (!test->with_ca_list) { + g_object_set (G_OBJECT (session), +- SOUP_SESSION_TLS_DATABASE, null_tlsdb, ++ SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, + NULL); + } + +@@ -433,7 +432,6 @@ main (int argc, char **argv) + { + SoupServer *server = NULL; + int i, ret; +- GError *error = NULL; + + test_init (argc, argv, NULL); + +@@ -441,9 +439,6 @@ main (int argc, char **argv) + server = soup_test_server_new (SOUP_TEST_SERVER_IN_THREAD); + soup_server_add_handler (server, NULL, server_handler, NULL, NULL); + uri = soup_test_server_get_uri (server, "https", "127.0.0.1"); +- +- null_tlsdb = g_tls_file_database_new ("/dev/null", &error); +- g_assert_no_error (error); + } else + uri = NULL; + +@@ -463,7 +458,6 @@ main (int argc, char **argv) + if (tls_available) { + soup_uri_free (uri); + soup_test_server_quit_unref (server); +- g_object_unref (null_tlsdb); + } + + test_cleanup (); +-- +GitLab + diff --git a/libsoup-skip-tls_interaction-test.patch b/libsoup-skip-tls_interaction-test.patch new file mode 100644 index 0000000..fc690d1 --- /dev/null +++ b/libsoup-skip-tls_interaction-test.patch @@ -0,0 +1,14 @@ +Index: libsoup-2.72.0/tests/ssl-test.c +=================================================================== +--- libsoup-2.72.0.orig/tests/ssl-test.c ++++ libsoup-2.72.0/tests/ssl-test.c +@@ -370,6 +370,9 @@ do_tls_interaction_test (void) + + SOUP_TEST_SKIP_IF_NO_TLS; + ++ g_test_skip ("Not reliable? See https://gitlab.gnome.org/GNOME/libsoup/issues/120"); ++ return; ++ + service = g_threaded_socket_service_new (1); + address = g_inet_socket_address_new_from_string ("127.0.0.1", 0); + g_socket_listener_add_address (G_SOCKET_LISTENER (service), address, diff --git a/libsoup.changes b/libsoup.changes index 112f5da..ef04689 100644 --- a/libsoup.changes +++ b/libsoup.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Feb 8 13:58:50 UTC 2021 - Pedro Monreal + +- Disable tls_interaction-test until resolved upstream + * See https://gitlab.gnome.org/GNOME/libsoup/issues/120 +- Add libsoup-skip-tls_interaction-test.patch + +------------------------------------------------------------------- +Mon Feb 8 13:07:03 UTC 2021 - Pedro Monreal + +- Fix tests: fix SSL test with glib-networking >= 2.65.90 + * See https://gitlab.gnome.org/GNOME/libsoup/issues/201 +- Add libsoup-fix-SSL-test.patch +- Remove patches: + * libsoup-disable-ssl-tests.patch + * libsoup-disable-hsts-tests.patch + ------------------------------------------------------------------- Thu Nov 12 14:30:45 UTC 2020 - Dominique Leuenberger diff --git a/libsoup.spec b/libsoup.spec index 1837726..f20a834 100644 --- a/libsoup.spec +++ b/libsoup.spec @@ -1,7 +1,7 @@ # # spec file for package libsoup # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,12 +25,10 @@ Group: Development/Libraries/GNOME URL: https://wiki.gnome.org/Projects/libsoup Source0: https://download.gnome.org/sources/libsoup/2.72/%{name}-%{version}.tar.xz Source99: baselibs.conf - -# PATCH-FIX-OPENSUSE libsoup-disable-hsts-tests.patch mgorse@suse.com -- disable hsts tests. -Patch0: libsoup-disable-hsts-tests.patch -# PATCH-FIX-OPENSUSE libsoup-disable-ssl-tests.patch glgo#GNOME/libsoup#188 -- Disable ssl tests -Patch2: libsoup-disable-ssl-tests.patch - +# PATCH-FIX-UPSTREAM tests: fix SSL test with glib-networking >= 2.65.90 +Patch0: libsoup-fix-SSL-test.patch +# PATCH-FIX-OPENSUSE disable tls_interaction-test https://gitlab.gnome.org/GNOME/libsoup/issues/120 +Patch1: libsoup-skip-tls_interaction-test.patch BuildRequires: glib-networking BuildRequires: meson >= 0.50 BuildRequires: pkgconfig @@ -124,12 +122,12 @@ translation-update-upstream po libsoup %build %meson \ - -Dgssapi=enabled \ - -Dkrb5_config="$(which krb5-config)" \ - -Dvapi=enabled \ - -Dgtk_doc=true \ - -Dntlm=disabled \ - -Dsysprof=disabled \ + -Dgssapi=enabled \ + -Dkrb5_config="$(which krb5-config)" \ + -Dvapi=enabled \ + -Dgtk_doc=true \ + -Dntlm=disabled \ + -Dsysprof=disabled \ %{nil} %meson_build