From a5fc5b14a19c8d2e13f4afba06eb260ee3b1b67c Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Mon, 18 Dec 2023 22:47:20 +0800 Subject: glib-networking: upgrade 2.76.1 -> 2.78.0 (From OE-Core rev: 9f792d1f60c2ba582bc7eceb76923495dbfaa658) Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- ...ts-disable-PKCS-11-tests-if-not-available.patch | 113 --------------------- .../glib-networking/glib-networking/eagain.patch | 20 ++-- .../glib-networking/glib-networking_2.76.1.bb | 46 --------- .../glib-networking/glib-networking_2.78.0.bb | 45 ++++++++ 4 files changed, 59 insertions(+), 165 deletions(-) delete mode 100644 meta/recipes-core/glib-networking/glib-networking/0001-tls-tests-disable-PKCS-11-tests-if-not-available.patch delete mode 100644 meta/recipes-core/glib-networking/glib-networking_2.76.1.bb create mode 100644 meta/recipes-core/glib-networking/glib-networking_2.78.0.bb (limited to 'meta/recipes-core/glib-networking') diff --git a/meta/recipes-core/glib-networking/glib-networking/0001-tls-tests-disable-PKCS-11-tests-if-not-available.patch b/meta/recipes-core/glib-networking/glib-networking/0001-tls-tests-disable-PKCS-11-tests-if-not-available.patch deleted file mode 100644 index 7b003588c8..0000000000 --- a/meta/recipes-core/glib-networking/glib-networking/0001-tls-tests-disable-PKCS-11-tests-if-not-available.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 04728a5b73e870b4695c5e7ba42fa41c00471944 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Fri, 12 May 2023 20:19:35 +0100 -Subject: [PATCH] tls/tests: disable PKCS#11 tests if not available - -GnuTLS can be built without PKCS#11, which means the symbols -gnutls_pkcs11_init and gnutls_pkcs11_add_provider are not part of the -library. - -If these symbols don't exist in GnuTLS then we can't add a mock pkcs#11 -provider for testing, and several tests which need the mock provider -will fail. - -Solve this by checking for the symbols at build time and disabling the -provider and tests which need it. - -Upstream-Status: Backport -Signed-off-by: Ross Burton ---- - meson.build | 4 ++++ - tls/tests/certificate.c | 11 +++++++---- - tls/tests/connection.c | 4 +++- - 3 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/meson.build b/meson.build -index 0fa9027..d2a023a 100644 ---- a/meson.build -+++ b/meson.build -@@ -84,6 +84,10 @@ gnutls_dep = dependency('gnutls', version: '>= 3.7.4', required: get_option('gnu - - if gnutls_dep.found() - backends += ['gnutls'] -+ # test-specific, maybe move to tls/tests -+ if cc.has_function('gnutls_pkcs11_init', prefix: '#include ', dependencies: gnutls_dep) -+ config_h.set10('HAVE_GNUTLS_PKCS11', true) -+ endif - endif - - # *** Checks for OpenSSL *** -diff --git a/tls/tests/certificate.c b/tls/tests/certificate.c -index e820ba1..dd2412b 100644 ---- a/tls/tests/certificate.c -+++ b/tls/tests/certificate.c -@@ -24,6 +24,7 @@ - * Author: Stef Walter - */ - -+#include "config.h" - #include "certificate.h" - - #include -@@ -911,7 +912,7 @@ int - main (int argc, - char *argv[]) - { --#ifdef BACKEND_IS_GNUTLS -+#if defined(BACKEND_IS_GNUTLS) && HAVE_GNUTLS_PKCS11 - char *module_path; - #endif - -@@ -921,7 +922,7 @@ main (int argc, - g_setenv ("GIO_USE_TLS", BACKEND, TRUE); - g_assert_cmpint (g_ascii_strcasecmp (G_OBJECT_TYPE_NAME (g_tls_backend_get_default ()), "GTlsBackend" BACKEND), ==, 0); - --#ifdef BACKEND_IS_GNUTLS -+#if defined(BACKEND_IS_GNUTLS) && HAVE_GNUTLS_PKCS11 - module_path = g_test_build_filename (G_TEST_BUILT, "mock-pkcs11.so", NULL); - g_assert_true (g_file_test (module_path, G_FILE_TEST_EXISTS)); - -@@ -942,12 +943,14 @@ main (int argc, - setup_certificate, test_create_certificate_with_issuer, teardown_certificate); - g_test_add ("/tls/" BACKEND "/certificate/create-with-garbage-input", TestCertificate, NULL, - setup_certificate, test_create_certificate_with_garbage_input, teardown_certificate); -- g_test_add ("/tls/" BACKEND "/certificate/pkcs11", TestCertificate, NULL, -- setup_certificate, test_create_certificate_pkcs11, teardown_certificate); - g_test_add ("/tls/" BACKEND "/certificate/private-key", TestCertificate, NULL, - setup_certificate, test_private_key, teardown_certificate); -+#if HAVE_GNUTLS_PKCS11 -+ g_test_add ("/tls/" BACKEND "/certificate/pkcs11", TestCertificate, NULL, -+ setup_certificate, test_create_certificate_pkcs11, teardown_certificate); - g_test_add ("/tls/" BACKEND "/certificate/private-key-pkcs11", TestCertificate, NULL, - setup_certificate, test_private_key_pkcs11, teardown_certificate); -+#endif - - g_test_add_func ("/tls/" BACKEND "/certificate/create-chain", test_create_certificate_chain); - g_test_add_func ("/tls/" BACKEND "/certificate/create-no-chain", test_create_certificate_no_chain); -diff --git a/tls/tests/connection.c b/tls/tests/connection.c -index 17efe1b..62a7fbb 100644 ---- a/tls/tests/connection.c -+++ b/tls/tests/connection.c -@@ -3376,7 +3376,7 @@ main (int argc, - - g_assert_true (g_ascii_strcasecmp (G_OBJECT_TYPE_NAME (g_tls_backend_get_default ()), "GTlsBackend" BACKEND) == 0); - --#ifdef BACKEND_IS_GNUTLS -+#if defined(BACKEND_IS_GNUTLS) && HAVE_GNUTLS_PKCS11 - module_path = g_test_build_filename (G_TEST_BUILT, "mock-pkcs11.so", NULL); - g_assert_true (g_file_test (module_path, G_FILE_TEST_EXISTS)); - -@@ -3438,8 +3438,10 @@ main (int argc, - setup_connection, test_client_auth_request_fail, teardown_connection); - g_test_add ("/tls/" BACKEND "/connection/client-auth-request-none", TestConnection, NULL, - setup_connection, test_client_auth_request_none, teardown_connection); -+#if HAVE_GNUTLS_PKCS11 - g_test_add ("/tls/" BACKEND "/connection/client-auth-pkcs11", TestConnection, NULL, - setup_connection, test_client_auth_pkcs11_connection, teardown_connection); -+#endif - g_test_add ("/tls/" BACKEND "/connection/no-database", TestConnection, NULL, - setup_connection, test_connection_no_database, teardown_connection); - g_test_add ("/tls/" BACKEND "/connection/failed", TestConnection, NULL, --- -2.34.1 - diff --git a/meta/recipes-core/glib-networking/glib-networking/eagain.patch b/meta/recipes-core/glib-networking/glib-networking/eagain.patch index ee5b6a7beb..062fc0191b 100644 --- a/meta/recipes-core/glib-networking/glib-networking/eagain.patch +++ b/meta/recipes-core/glib-networking/glib-networking/eagain.patch @@ -1,4 +1,8 @@ -In autobuilder testing we regularly see glib-networking ptest fail with: +From 025bb39dfdb81dd2852deaefea228b197ef3cd8d Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Sat, 6 May 2023 12:18:50 +0100 +Subject: [PATCH] In autobuilder testing we regularly see glib-networking ptest + fail with: GLib-Net:ERROR:/usr/src/debug/glib-networking/2.74.0-r0/tls/tests/connection.c:1944:simul_read_thread: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27) Bail out! GLib-Net:ERROR:/usr/src/debug/glib-networking/2.74.0-r0/tls/tests/connection.c:1944:simul_read_thread: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27) @@ -12,11 +16,15 @@ Upstream-Status: Pending [testing to see if patch resolves the issue] Signed-off-by: Richard Purdie -Index: glib-networking-2.74.0/tls/tests/connection.c -=================================================================== ---- glib-networking-2.74.0.orig/tls/tests/connection.c -+++ glib-networking-2.74.0/tls/tests/connection.c -@@ -1941,6 +1941,10 @@ simul_read_thread (gpointer user_data) +--- + tls/tests/connection.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tls/tests/connection.c b/tls/tests/connection.c +index 62a7fbb..3447c80 100644 +--- a/tls/tests/connection.c ++++ b/tls/tests/connection.c +@@ -2210,6 +2210,10 @@ simul_read_thread (gpointer user_data) test->buf + test->nread, MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread), NULL, &error); diff --git a/meta/recipes-core/glib-networking/glib-networking_2.76.1.bb b/meta/recipes-core/glib-networking/glib-networking_2.76.1.bb deleted file mode 100644 index 0f8822e160..0000000000 --- a/meta/recipes-core/glib-networking/glib-networking_2.76.1.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "GLib networking extensions" -DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies." -HOMEPAGE = "https://gitlab.gnome.org/GNOME/glib-networking/" -BUGTRACKER = "http://bugzilla.gnome.org" - -LICENSE = "LGPL-2.1-or-later" -LICENSE:append = "${@bb.utils.contains('PACKAGECONFIG', 'openssl', ' & Glib-Networking-OpenSSL-Exception', '', d)}" -NO_GENERIC_LICENSE[Glib-Networking-OpenSSL-Exception] = "LICENSE_EXCEPTION" - -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://LICENSE_EXCEPTION;md5=0f5be697951b5e71aff00f4a4ce66be8 \ - file://tls/base/gtlsconnection-base.c;beginline=7;endline=22;md5=ab641ac307f3337811008ea9afe7059f" - -SECTION = "libs" -DEPENDS = "glib-2.0-native glib-2.0" - -SRC_URI[archive.sha256sum] = "5c698a9994dde51efdfb1026a56698a221d6250e89dc50ebcddda7b81480a42b" - -# Upstream note that for the openssl backend, half the tests where this backend don't return -# the expected error code or don't work as expected so default to gnutls -PACKAGECONFIG ??= "gnutls environment ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" - -PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" -PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl" -PACKAGECONFIG[environment] = "-Denvironment_proxy=enabled,-Denvironment_proxy=disabled" -PACKAGECONFIG[libproxy] = "-Dlibproxy=enabled,-Dlibproxy=disabled,libproxy" -PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" -PACKAGECONFIG[gnomeproxy] = "-Dgnome_proxy=enabled,-Dgnome_proxy=disabled,gsettings-desktop-schemas" - -inherit gnomebase gettext upstream-version-is-even gio-module-cache ptest-gnome - -SRC_URI += "file://run-ptest" -SRC_URI += "file://eagain.patch" -SRC_URI += "file://0001-tls-tests-disable-PKCS-11-tests-if-not-available.patch" - -FILES:${PN} += "\ - ${libdir}/gio/modules/libgio*.so \ - ${datadir}/dbus-1/services/ \ - ${systemd_user_unitdir} \ - " -FILES:${PN}-dev += "${libdir}/gio/modules/libgio*.la" -FILES:${PN}-staticdev += "${libdir}/gio/modules/libgio*.a" - -RDEPENDS:${PN}-ptest += "bash" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-core/glib-networking/glib-networking_2.78.0.bb b/meta/recipes-core/glib-networking/glib-networking_2.78.0.bb new file mode 100644 index 0000000000..68f9a2ed78 --- /dev/null +++ b/meta/recipes-core/glib-networking/glib-networking_2.78.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "GLib networking extensions" +DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/glib-networking/" +BUGTRACKER = "http://bugzilla.gnome.org" + +LICENSE = "LGPL-2.1-or-later" +LICENSE:append = "${@bb.utils.contains('PACKAGECONFIG', 'openssl', ' & Glib-Networking-OpenSSL-Exception', '', d)}" +NO_GENERIC_LICENSE[Glib-Networking-OpenSSL-Exception] = "LICENSE_EXCEPTION" + +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://LICENSE_EXCEPTION;md5=0f5be697951b5e71aff00f4a4ce66be8 \ + file://tls/base/gtlsconnection-base.c;beginline=7;endline=22;md5=ab641ac307f3337811008ea9afe7059f" + +SECTION = "libs" +DEPENDS = "glib-2.0-native glib-2.0" + +SRC_URI[archive.sha256sum] = "52fe4ce93f7dc51334b102894599858d23c8a65ac4a1110b30920565d68d3aba" + +# Upstream note that for the openssl backend, half the tests where this backend don't return +# the expected error code or don't work as expected so default to gnutls +PACKAGECONFIG ??= "gnutls environment ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" + +PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" +PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl" +PACKAGECONFIG[environment] = "-Denvironment_proxy=enabled,-Denvironment_proxy=disabled" +PACKAGECONFIG[libproxy] = "-Dlibproxy=enabled,-Dlibproxy=disabled,libproxy" +PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" +PACKAGECONFIG[gnomeproxy] = "-Dgnome_proxy=enabled,-Dgnome_proxy=disabled,gsettings-desktop-schemas" + +inherit gnomebase gettext upstream-version-is-even gio-module-cache ptest-gnome + +SRC_URI += "file://run-ptest" +SRC_URI += "file://eagain.patch" + +FILES:${PN} += "\ + ${libdir}/gio/modules/libgio*.so \ + ${datadir}/dbus-1/services/ \ + ${systemd_user_unitdir} \ + " +FILES:${PN}-dev += "${libdir}/gio/modules/libgio*.la" +FILES:${PN}-staticdev += "${libdir}/gio/modules/libgio*.a" + +RDEPENDS:${PN}-ptest += "bash" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf