diff --git a/backport-evolution-data-server-OAuth2-use-WebKitNetworkSession-to-manage-proxy.patch b/backport-evolution-data-server-OAuth2-use-WebKitNetworkSession-to-manage-proxy.patch new file mode 100644 index 0000000000000000000000000000000000000000..4330a0c03718683b83ff17fdc1e886a6ae34f43f --- /dev/null +++ b/backport-evolution-data-server-OAuth2-use-WebKitNetworkSession-to-manage-proxy.patch @@ -0,0 +1,121 @@ +From 02703b28d798931afccebf79c842b54625a8dcd0 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Wed, 1 Feb 2023 13:46:15 -0600 +Subject: [PATCH] M!114 - OAuth2: use WebKitNetworkSession to manage proxy + settings + +With WebKitGTK 2.39.6, network proxy settings moved from +WebKitWebsiteDataManager to WebKitNetworkSession. +--- + .../e-credentials-prompter-impl-oauth2.c | 40 +++++++++++++++++-- + 1 file changed, 36 insertions(+), 4 deletions(-) + +diff --git a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +index 7a1f40e106..9a3918b617 100644 +--- a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c ++++ b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +@@ -679,7 +679,12 @@ credentials_prompter_impl_oauth2_sanitize_host (gchar *host) + } + + static void +-credentials_prompter_impl_oauth2_set_proxy (WebKitWebContext *web_context, ++credentials_prompter_impl_oauth2_set_proxy ( ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ WebKitNetworkSession *network_session, ++#else ++ WebKitWebsiteDataManager *data_manager, ++#endif + ESourceRegistry *registry, + ESource *auth_source) + { +@@ -704,7 +709,6 @@ credentials_prompter_impl_oauth2_set_proxy (WebKitWebContext *web_context, + + if (proxy_source && e_source_has_extension (proxy_source, E_SOURCE_EXTENSION_PROXY)) { + ESourceProxy *proxy; +- WebKitWebsiteDataManager *data_manager; + WebKitNetworkProxySettings *proxy_settings = NULL; + GUri *guri; + gchar **ignore_hosts = NULL; +@@ -712,11 +716,14 @@ credentials_prompter_impl_oauth2_set_proxy (WebKitWebContext *web_context, + guint16 port; + + proxy = e_source_get_extension (proxy_source, E_SOURCE_EXTENSION_PROXY); +- data_manager = webkit_web_context_get_website_data_manager (web_context); + + switch (e_source_proxy_get_method (proxy)) { + case E_PROXY_METHOD_DEFAULT: ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ webkit_network_session_set_proxy_settings (network_session, WEBKIT_NETWORK_PROXY_MODE_DEFAULT, NULL); ++#else + webkit_website_data_manager_set_network_proxy_settings (data_manager, WEBKIT_NETWORK_PROXY_MODE_DEFAULT, NULL); ++#endif + break; + case E_PROXY_METHOD_MANUAL: + ignore_hosts = e_source_proxy_dup_ignore_hosts (proxy); +@@ -770,13 +777,21 @@ credentials_prompter_impl_oauth2_set_proxy (WebKitWebContext *web_context, + } + g_free (tmp); + ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ webkit_network_session_set_proxy_settings (network_session, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, proxy_settings); ++#else + webkit_website_data_manager_set_network_proxy_settings (data_manager, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, proxy_settings); ++#endif + break; + case E_PROXY_METHOD_AUTO: + /* not supported by WebKitGTK */ + break; + case E_PROXY_METHOD_NONE: ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ webkit_network_session_set_proxy_settings (network_session, WEBKIT_NETWORK_PROXY_MODE_NO_PROXY, proxy_settings); ++#else + webkit_website_data_manager_set_network_proxy_settings (data_manager, WEBKIT_NETWORK_PROXY_MODE_NO_PROXY, NULL); ++#endif + break; + } + +@@ -899,6 +914,11 @@ e_credentials_prompter_impl_oauth2_show_dialog (ECredentialsPrompterImplOAuth2 * + GtkWidget *progress_bar; + WebKitSettings *webkit_settings; + WebKitWebContext *web_context; ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ WebKitNetworkSession *network_session; ++#else ++ WebKitWebsiteDataManager *data_manager; ++#endif + #endif /* WITH_WEBKITGTK */ + gchar *title, *uri; + GString *info_markup; +@@ -1213,9 +1233,18 @@ e_credentials_prompter_impl_oauth2_show_dialog (ECredentialsPrompterImplOAuth2 * + #if !GTK_CHECK_VERSION(4, 0, 0) || !WEBKIT_CHECK_VERSION(2, 39, 5) + webkit_web_context_set_sandbox_enabled (web_context, TRUE); + #endif +- credentials_prompter_impl_oauth2_set_proxy (web_context, e_credentials_prompter_get_registry (prompter), prompter_oauth2->priv->auth_source); ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ network_session = webkit_network_session_new (NULL, NULL); ++ credentials_prompter_impl_oauth2_set_proxy (network_session, e_credentials_prompter_get_registry (prompter), prompter_oauth2->priv->auth_source); ++#else ++ data_manager = webkit_web_context_get_website_data_manager (web_context); ++ credentials_prompter_impl_oauth2_set_proxy (data_manager, e_credentials_prompter_get_registry (prompter), prompter_oauth2->priv->auth_source); ++#endif + + widget = g_object_new (WEBKIT_TYPE_WEB_VIEW, ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ "network-session", network_session, ++#endif + "settings", webkit_settings, + "web-context", web_context, + NULL); +@@ -1231,6 +1260,9 @@ e_credentials_prompter_impl_oauth2_show_dialog (ECredentialsPrompterImplOAuth2 * + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), widget); + #else + gtk_container_add (GTK_CONTAINER (scrolled_window), widget); ++#endif ++#if GTK_CHECK_VERSION(4, 0, 0) && WEBKIT_CHECK_VERSION(2, 39, 6) ++ g_object_unref (network_session); + #endif + g_object_unref (webkit_settings); + g_object_unref (web_context); +-- +GitLab + diff --git a/backport-evolution-data-server-Update-for-removal-of-WebKitGTK-sandbox-API.patch b/backport-evolution-data-server-Update-for-removal-of-WebKitGTK-sandbox-API.patch new file mode 100644 index 0000000000000000000000000000000000000000..28c714f4753c24ccf0ce4dcd8b5e0a47f00f8f29 --- /dev/null +++ b/backport-evolution-data-server-Update-for-removal-of-WebKitGTK-sandbox-API.patch @@ -0,0 +1,56 @@ +From 6f4d38537ec2192d7066a7ba145ca7ab0f607e56 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Thu, 19 Jan 2023 20:12:04 -0600 +Subject: [PATCH] M!112 - Update for removal of WebKitGTK sandbox API + +WebKitGTK 2.39.5 contains an ABI break. The sandbox is now mandatory, so +the function to enable/disable it has been removed. +--- + src/libedataserverui/e-credentials-prompter-impl-oauth2.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +index 099a8f20c6..0e5fb582f6 100644 +--- a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c ++++ b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +@@ -1149,7 +1149,9 @@ e_credentials_prompter_impl_oauth2_show_dialog (ECredentialsPrompterImplOAuth2 * + NULL); + + web_context = webkit_web_context_new (); ++#if !WEBKIT_CHECK_VERSION(2, 39, 5) + webkit_web_context_set_sandbox_enabled (web_context, TRUE); ++#endif + credentials_prompter_impl_oauth2_set_proxy (web_context, e_credentials_prompter_get_registry (prompter), prompter_oauth2->priv->auth_source); + + widget = g_object_new (WEBKIT_TYPE_WEB_VIEW, +-- +GitLab + +From 9317117ce9d7eba6265642803266cdd1f0d0ee98 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Fri, 20 Jan 2023 15:27:45 -0600 +Subject: [PATCH] M!113 - Don't accidentally disable sandbox for GTK 3 users + +In !112 I removed the sandbox enable call because it's gone in the GTK 4 +API where the sandbox is now mandatory. But this code is built for GTK 3 +as well, so where the call is still required. +--- + src/libedataserverui/e-credentials-prompter-impl-oauth2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +index 0e5fb582f6..e2346b16fb 100644 +--- a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c ++++ b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +@@ -1149,7 +1149,7 @@ e_credentials_prompter_impl_oauth2_show_dialog (ECredentialsPrompterImplOAuth2 * + NULL); + + web_context = webkit_web_context_new (); +-#if !WEBKIT_CHECK_VERSION(2, 39, 5) ++#if !GTK_CHECK_VERSION(4, 0, 0) || !WEBKIT_CHECK_VERSION(2, 39, 5) + webkit_web_context_set_sandbox_enabled (web_context, TRUE); + #endif + credentials_prompter_impl_oauth2_set_proxy (web_context, e_credentials_prompter_get_registry (prompter), prompter_oauth2->priv->auth_source); +-- +GitLab + diff --git a/backport-evolution-data-server-try-harder-to-support-webkitgtk-6.0.patch b/backport-evolution-data-server-try-harder-to-support-webkitgtk-6.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..b81f1dd239dd6ea338560883f70d00ddf8e199bc --- /dev/null +++ b/backport-evolution-data-server-try-harder-to-support-webkitgtk-6.0.patch @@ -0,0 +1,44 @@ +From 8d29b0bded2e4e3700ce08e9db2eaeac4400528a Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Mon, 21 Nov 2022 17:49:29 +0000 +Subject: [PATCH] M!108 - Try harder to support webkitgtk-6.0 + +The cdb16f26f63f5093479a43cab32012845bcf33ed attempted to handle WebKitGTK +API changes, but I forgot the header file name changed as well. + +Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/108 +--- + src/libedataserverui/e-credentials-prompter-impl-oauth2.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +index 2415947c34..b99ac4e601 100644 +--- a/src/libedataserverui/e-credentials-prompter-impl-oauth2.c ++++ b/src/libedataserverui/e-credentials-prompter-impl-oauth2.c +@@ -32,21 +32,19 @@ + #if GTK_CHECK_VERSION(4, 0, 0) + #ifdef ENABLE_OAUTH2_WEBKITGTK4 + #define WITH_WEBKITGTK 1 ++#include + #else + #undef WITH_WEBKITGTK + #endif + #else + #ifdef ENABLE_OAUTH2_WEBKITGTK + #define WITH_WEBKITGTK 1 ++#include + #else + #undef WITH_WEBKITGTK + #endif + #endif + +-#ifdef WITH_WEBKITGTK +-#include +-#endif /* WITH_WEBKITGTK */ +- + struct _ECredentialsPrompterImplOAuth2Private { + GMutex property_lock; + +-- +GitLab + diff --git a/backport-evolution-data-server-use-webkitgtk-6.0-api.patch b/backport-evolution-data-server-use-webkitgtk-6.0-api.patch new file mode 100644 index 0000000000000000000000000000000000000000..094bcdead14fe907729a7160df549f400792ddcb --- /dev/null +++ b/backport-evolution-data-server-use-webkitgtk-6.0-api.patch @@ -0,0 +1,28 @@ +From cdb16f26f63f5093479a43cab32012845bcf33ed Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Tue, 15 Nov 2022 08:58:38 +0000 +Subject: [PATCH] M!107 - Use webkitgtk-6.0 API version + +In WebKitGTK 2.39.1, the GTK 4 API version has been renamed from webkit2gtk-5.0 to webkitgtk-6.0. + +Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/107 +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3ce7c1dd5..c575acd3e3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -426,7 +426,7 @@ if(ENABLE_GTK4) + + if(ENABLE_OAUTH2_WEBKITGTK4) + pkg_check_modules_for_option(ENABLE_OAUTH2_WEBKITGTK4 "WebKitGTK gtk4 for built-in OAuth2 authentications" OAUTH2_WEBKITGTK4 +- webkit2gtk-5.0>=${webkit2gtk4_minimum_version} ++ webkitgtk-6.0>=${webkit2gtk4_minimum_version} + ) + endif(ENABLE_OAUTH2_WEBKITGTK4) + endif(ENABLE_GTK4) +-- +GitLab + diff --git a/evolution-data-server.spec b/evolution-data-server.spec index 82b2c479c84fe03b9fcb9ec672bb186be9fd3763..1a4b619c4f195af5bc13e852e22a589713646b83 100644 --- a/evolution-data-server.spec +++ b/evolution-data-server.spec @@ -37,13 +37,15 @@ Name: evolution-data-server Version: 3.46.2 -Release: 4 +Release: 5 Summary: Backend data server for Evolution License: LGPL-2.1-or-later URL: https://wiki.gnome.org/Apps/Evolution Source: https://download.gnome.org/sources/%{name}/3.46/%{name}-%{version}.tar.xz - -#Patch0: webkitgtk-6.0.patch +Patch6001: backport-evolution-data-server-use-webkitgtk-6.0-api.patch +Patch6002: backport-evolution-data-server-try-harder-to-support-webkitgtk-6.0.patch +Patch6003: backport-evolution-data-server-Update-for-removal-of-WebKitGTK-sandbox-API.patch +Patch6004: backport-evolution-data-server-OAuth2-use-WebKitNetworkSession-to-manage-proxy.patch Provides: evolution-webcal = %{version} Obsoletes: evolution-webcal < 2.24.0 compat-evolution-data-server310-libcamel < 3.12 @@ -78,7 +80,7 @@ BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(nss) >= %{nss_version} BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} BuildRequires: pkgconfig(webkit2gtk-4.1) >= %{webkit2gtk_version} -BuildRequires: pkgconfig(webkit2gtk-5.0) >= %{webkit2gtk4_version} +BuildRequires: pkgconfig(webkitgtk-6.0) >= %{webkit2gtk4_version} BuildRequires: pkgconfig(json-glib-1.0) >= %{json_glib_version} BuildRequires: pkgconfig(libcanberra-gtk3) BuildRequires: openldap-devel >= 2.0.11 @@ -107,7 +109,7 @@ Requires: pkgconfig(libsecret-unstable) >= %{libsecret_version} Requires: pkgconfig(libsoup-3.0) >= %{libsoup_version} Requires: pkgconfig(sqlite3) >= %{sqlite_version} Requires: pkgconfig(webkit2gtk-4.1) >= %{webkit2gtk_version} -Requires: pkgconfig(webkit2gtk-5.0) >= %{webkit2gtk4_version} +Requires: pkgconfig(webkitgtk-6.0) >= %{webkit2gtk4_version} Requires: pkgconfig(json-glib-1.0) >= %{json_glib_version} Provides: evolution-data-server-tests @@ -398,6 +400,9 @@ echo "%{_libdir}/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libexecdir}/evolution-data-server/csv2vcard %changelog +* Sun Feb 23 2025 Funda Wang - 3.46.2-5 +- use webkitgtk-6.0 api + * Tue Feb 18 2025 Funda Wang - 3.46.2-4 - adopt to new cmake macro