Compare commits

..

3 Commits

Author SHA1 Message Date
0b97281940 Import from AlmaLinux stable repository 2024-05-31 17:34:34 +00:00
CentOS Sources
4ad9855835 import evolution-data-server-3.28.5-20.el8 2022-11-08 12:20:37 +00:00
CentOS Sources
5d9b8a8f43 import evolution-data-server-3.28.5-19.el8_6.1 2022-06-28 10:59:23 +00:00
4 changed files with 216 additions and 11 deletions

View File

@ -1 +0,0 @@
85025da5aeda52b9bb9506cb89c7985d1cb9083c SOURCES/evolution-data-server-3.28.5.tar.xz

View File

@ -0,0 +1,53 @@
diff -up evolution-data-server-3.28.5/src/libedataserverui/e-credentials-prompter-impl-oauth2.c.oauth2-enable-html5-features evolution-data-server-3.28.5/src/libedataserverui/e-credentials-prompter-impl-oauth2.c
--- evolution-data-server-3.28.5/src/libedataserverui/e-credentials-prompter-impl-oauth2.c.oauth2-enable-html5-features 2018-07-30 15:17:06.000000000 +0200
+++ evolution-data-server-3.28.5/src/libedataserverui/e-credentials-prompter-impl-oauth2.c 2024-01-11 16:00:50.316053801 +0100
@@ -571,7 +571,9 @@ e_credentials_prompter_impl_oauth2_show_
GtkScrolledWindow *scrolled_window;
GtkWindow *dialog_parent;
ECredentialsPrompter *prompter;
+ WebKitCookieManager *cookie_manager;
WebKitSettings *webkit_settings;
+ WebKitWebContext *web_context;
gchar *title, *uri;
GString *info_markup;
gint row = 0;
@@ -670,16 +672,28 @@ e_credentials_prompter_impl_oauth2_show_
webkit_settings = webkit_settings_new_with_settings (
"auto-load-images", TRUE,
"default-charset", "utf-8",
- "enable-html5-database", FALSE,
"enable-dns-prefetching", FALSE,
- "enable-html5-local-storage", FALSE,
+ "enable-html5-database", TRUE,
+ "enable-html5-local-storage", TRUE,
"enable-offline-web-application-cache", FALSE,
"enable-page-cache", FALSE,
"enable-plugins", FALSE,
"media-playback-allows-inline", FALSE,
NULL);
- widget = webkit_web_view_new_with_settings (webkit_settings);
+ web_context = webkit_web_context_new ();
+ #if WEBKIT_CHECK_VERSION(2, 40, 0)
+ webkit_web_context_set_sandbox_enabled (web_context, TRUE);
+ #endif
+
+ cookie_manager = webkit_web_context_get_cookie_manager (web_context);
+ webkit_cookie_manager_set_accept_policy (cookie_manager, WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
+
+ widget = g_object_new (WEBKIT_TYPE_WEB_VIEW,
+ "settings", webkit_settings,
+ "web-context", web_context,
+ NULL);
+
g_object_set (
G_OBJECT (widget),
"hexpand", TRUE,
@@ -689,6 +703,7 @@ e_credentials_prompter_impl_oauth2_show_
NULL);
gtk_container_add (GTK_CONTAINER (scrolled_window), widget);
g_object_unref (webkit_settings);
+ g_object_unref (web_context);
prompter_oauth2->priv->web_view = WEBKIT_WEB_VIEW (widget);

View File

@ -0,0 +1,101 @@
diff -up evolution-data-server-3.28.5/src/libedataserver/e-oauth2-service-google.c.google-oauth2 evolution-data-server-3.28.5/src/libedataserver/e-oauth2-service-google.c
--- evolution-data-server-3.28.5/src/libedataserver/e-oauth2-service-google.c.google-oauth2 2018-07-30 15:17:06.000000000 +0200
+++ evolution-data-server-3.28.5/src/libedataserver/e-oauth2-service-google.c 2022-05-04 18:57:08.059385307 +0200
@@ -24,6 +24,7 @@
#include "e-oauth2-service-google.h"
/* https://developers.google.com/identity/protocols/OAuth2InstalledApp */
+/* https://developers.google.com/identity/protocols/oauth2/native-app */
/* Forward Declarations */
static void e_oauth2_service_google_oauth2_service_init (EOAuth2ServiceInterface *iface);
@@ -74,14 +75,60 @@ static const gchar *
eos_google_get_authentication_uri (EOAuth2Service *service,
ESource *source)
{
- return "https://accounts.google.com/o/oauth2/auth";
+ return "https://accounts.google.com/o/oauth2/v2/auth";
}
static const gchar *
eos_google_get_refresh_uri (EOAuth2Service *service,
ESource *source)
{
- return "https://www.googleapis.com/oauth2/v3/token";
+ return "https://oauth2.googleapis.com/token";
+}
+
+static const gchar *
+eos_google_get_redirect_uri (EOAuth2Service *service,
+ ESource *source)
+{
+ G_LOCK_DEFINE_STATIC (redirect_uri);
+ const gchar *key_name = "oauth2-google-redirect-uri";
+ gchar *value;
+
+ G_LOCK (redirect_uri);
+
+ value = g_object_get_data (G_OBJECT (service), key_name);
+ if (!value) {
+ const gchar *client_id = eos_google_get_client_id (service, source);
+
+ if (client_id) {
+ GPtrArray *array;
+ gchar **strv;
+ gchar *joinstr;
+ guint ii;
+
+ strv = g_strsplit (client_id, ".", -1);
+ array = g_ptr_array_new ();
+
+ for (ii = 0; strv[ii]; ii++) {
+ g_ptr_array_insert (array, 0, strv[ii]);
+ }
+
+ g_ptr_array_add (array, NULL);
+
+ joinstr = g_strjoinv (".", (gchar **) array->pdata);
+ /* Use reverse-DNS of the client ID with the below path */
+ value = g_strconcat (joinstr, ":/oauth2redirect", NULL);
+
+ g_ptr_array_free (array, TRUE);
+ g_strfreev (strv);
+ g_free (joinstr);
+
+ g_object_set_data_full (G_OBJECT (service), key_name, value, g_free);
+ }
+ }
+
+ G_UNLOCK (redirect_uri);
+
+ return value;
}
static void
@@ -143,13 +190,13 @@ eos_google_extract_authorization_code (E
params = soup_form_decode (query);
if (params) {
- const gchar *response;
+ const gchar *code;
- response = g_hash_table_lookup (params, "response");
- if (response && g_ascii_strncasecmp (response, "code=", 5) == 0) {
- *out_authorization_code = g_strdup (response + 5);
+ code = g_hash_table_lookup (params, "code");
+ if (code && *code) {
+ *out_authorization_code = g_strdup (code);
known = TRUE;
- } else if (response && g_ascii_strncasecmp (response, "error", 5) == 0) {
+ } else if (g_hash_table_lookup (params, "error")) {
known = TRUE;
}
@@ -177,6 +224,7 @@ e_oauth2_service_google_oauth2_service_i
iface->get_client_secret = eos_google_get_client_secret;
iface->get_authentication_uri = eos_google_get_authentication_uri;
iface->get_refresh_uri = eos_google_get_refresh_uri;
+ iface->get_redirect_uri = eos_google_get_redirect_uri;
iface->prepare_authentication_uri_query = eos_google_prepare_authentication_uri_query;
iface->extract_authorization_code = eos_google_extract_authorization_code;
}

View File

@ -32,7 +32,7 @@
Name: evolution-data-server Name: evolution-data-server
Version: 3.28.5 Version: 3.28.5
Release: 19%{?dist} Release: 24%{?dist}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: Backend data server for Evolution Summary: Backend data server for Evolution
License: LGPLv2+ License: LGPLv2+
@ -45,6 +45,8 @@ Obsoletes: evolution-webcal < 2.24.0
# RH-bug #1362477 # RH-bug #1362477
Recommends: pinentry-gtk Recommends: pinentry-gtk
Recommends: %{name}-ui
%if 0%{?fedora} %if 0%{?fedora}
# From rhughes-f20-gnome-3-12 copr # From rhughes-f20-gnome-3-12 copr
Obsoletes: compat-evolution-data-server310-libcamel < 3.12 Obsoletes: compat-evolution-data-server310-libcamel < 3.12
@ -103,6 +105,11 @@ Patch16: evolution-data-server-3.28.5-nonstandard-uuencode-encoding.patch
# RH bug #1938533 # RH bug #1938533
Patch17: evolution-data-server-3.28.5-secret-monitor-warnings.patch Patch17: evolution-data-server-3.28.5-secret-monitor-warnings.patch
# RH bug #2081746
Patch18: evolution-data-server-3.28.5-google-oauth2.patch
Patch19: 0019-oauth2-enable-html5-features.patch
### Dependencies ### ### Dependencies ###
Requires: dconf Requires: dconf
@ -119,7 +126,7 @@ BuildRequires: gtk-doc >= %{gtk_doc_version}
BuildRequires: intltool >= %{intltool_version} BuildRequires: intltool >= %{intltool_version}
BuildRequires: libdb-devel BuildRequires: libdb-devel
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: %{_bindir}/python3 BuildRequires: python3-devel
BuildRequires: vala BuildRequires: vala
BuildRequires: vala-tools BuildRequires: vala-tools
BuildRequires: sendmail BuildRequires: sendmail
@ -175,12 +182,27 @@ Requires: pkgconfig(libical) >= %{libical_version}
Requires: pkgconfig(libsecret-unstable) >= %{libsecret_version} Requires: pkgconfig(libsecret-unstable) >= %{libsecret_version}
Requires: pkgconfig(libsoup-2.4) >= %{libsoup_version} Requires: pkgconfig(libsoup-2.4) >= %{libsoup_version}
Requires: pkgconfig(sqlite3) >= %{sqlite_version} Requires: pkgconfig(sqlite3) >= %{sqlite_version}
Requires: pkgconfig(webkit2gtk-4.0) >= %{webkit2gtk_version}
Requires: pkgconfig(json-glib-1.0) >= %{json_glib_version} Requires: pkgconfig(json-glib-1.0) >= %{json_glib_version}
%description devel %description devel
Development files needed for building things which link against %{name}. Development files needed for building things which link against %{name}.
%package ui
Summary: libedataserverui library from %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description ui
libedataserverui library files from %{name}.
%package ui-devel
Summary: Development files for building against libedataserverui from %{name}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-ui%{?_isa} = %{version}-%{release}
Requires: pkgconfig(webkit2gtk-4.0) >= %{webkit2gtk_version}
%description ui-devel
Development files needed for building things which link against libedataserverui from %{name}.
%package langpacks %package langpacks
Summary: Translations for %{name} Summary: Translations for %{name}
BuildArch: noarch BuildArch: noarch
@ -239,6 +261,8 @@ the functionality of the installed %{name} package.
%patch15 -p1 -b .calbackendfile-interval-tree-destroy %patch15 -p1 -b .calbackendfile-interval-tree-destroy
%patch16 -p1 -b .nonstandard-uuencode-encoding %patch16 -p1 -b .nonstandard-uuencode-encoding
%patch17 -p1 -b .secret-monitor-warnings %patch17 -p1 -b .secret-monitor-warnings
%patch18 -p1 -b .google-oauth2
%patch19 -p1 -b .oauth2-enable-html5-features
%build %build
@ -350,13 +374,11 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_libdir}/libedata-book-1.2.so.* %{_libdir}/libedata-book-1.2.so.*
%{_libdir}/libedata-cal-1.2.so.* %{_libdir}/libedata-cal-1.2.so.*
%{_libdir}/libedataserver-1.2.so.* %{_libdir}/libedataserver-1.2.so.*
%{_libdir}/libedataserverui-1.2.so.*
%{_libdir}/girepository-1.0/Camel-1.2.typelib %{_libdir}/girepository-1.0/Camel-1.2.typelib
%{_libdir}/girepository-1.0/EBook-1.2.typelib %{_libdir}/girepository-1.0/EBook-1.2.typelib
%{_libdir}/girepository-1.0/EBookContacts-1.2.typelib %{_libdir}/girepository-1.0/EBookContacts-1.2.typelib
%{_libdir}/girepository-1.0/EDataServer-1.2.typelib %{_libdir}/girepository-1.0/EDataServer-1.2.typelib
%{_libdir}/girepository-1.0/EDataServerUI-1.2.typelib
%{_libexecdir}/camel-gpg-photo-saver %{_libexecdir}/camel-gpg-photo-saver
%{_libexecdir}/camel-index-control-1.2 %{_libexecdir}/camel-index-control-1.2
@ -440,12 +462,18 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{modules_dir}/module-oauth2-services.so %{modules_dir}/module-oauth2-services.so
%{modules_dir}/module-outlook-backend.so %{modules_dir}/module-outlook-backend.so
%{modules_dir}/module-secret-monitor.so %{modules_dir}/module-secret-monitor.so
%{modules_dir}/module-trust-prompt.so
%{modules_dir}/module-webdav-backend.so %{modules_dir}/module-webdav-backend.so
%{modules_dir}/module-yahoo-backend.so %{modules_dir}/module-yahoo-backend.so
%files devel %files devel
%{_includedir}/evolution-data-server %{_includedir}/evolution-data-server/camel
%{_includedir}/evolution-data-server/libebackend
%{_includedir}/evolution-data-server/libebook
%{_includedir}/evolution-data-server/libebook-contacts
%{_includedir}/evolution-data-server/libecal
%{_includedir}/evolution-data-server/libedata-book
%{_includedir}/evolution-data-server/libedata-cal
%{_includedir}/evolution-data-server/libedataserver
%{_libdir}/libcamel-1.2.so %{_libdir}/libcamel-1.2.so
%{_libdir}/libebackend-1.2.so %{_libdir}/libebackend-1.2.so
%{_libdir}/libebook-1.2.so %{_libdir}/libebook-1.2.so
@ -454,7 +482,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_libdir}/libedata-book-1.2.so %{_libdir}/libedata-book-1.2.so
%{_libdir}/libedata-cal-1.2.so %{_libdir}/libedata-cal-1.2.so
%{_libdir}/libedataserver-1.2.so %{_libdir}/libedataserver-1.2.so
%{_libdir}/libedataserverui-1.2.so
%{_libdir}/pkgconfig/camel-1.2.pc %{_libdir}/pkgconfig/camel-1.2.pc
%{_libdir}/pkgconfig/evolution-data-server-1.2.pc %{_libdir}/pkgconfig/evolution-data-server-1.2.pc
%{_libdir}/pkgconfig/libebackend-1.2.pc %{_libdir}/pkgconfig/libebackend-1.2.pc
@ -464,12 +491,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_libdir}/pkgconfig/libedata-book-1.2.pc %{_libdir}/pkgconfig/libedata-book-1.2.pc
%{_libdir}/pkgconfig/libedata-cal-1.2.pc %{_libdir}/pkgconfig/libedata-cal-1.2.pc
%{_libdir}/pkgconfig/libedataserver-1.2.pc %{_libdir}/pkgconfig/libedataserver-1.2.pc
%{_libdir}/pkgconfig/libedataserverui-1.2.pc
%{_datadir}/gir-1.0/Camel-1.2.gir %{_datadir}/gir-1.0/Camel-1.2.gir
%{_datadir}/gir-1.0/EBook-1.2.gir %{_datadir}/gir-1.0/EBook-1.2.gir
%{_datadir}/gir-1.0/EBookContacts-1.2.gir %{_datadir}/gir-1.0/EBookContacts-1.2.gir
%{_datadir}/gir-1.0/EDataServer-1.2.gir %{_datadir}/gir-1.0/EDataServer-1.2.gir
%{_datadir}/gir-1.0/EDataServerUI-1.2.gir
%{_datadir}/vala/vapi/camel-1.2.deps %{_datadir}/vala/vapi/camel-1.2.deps
%{_datadir}/vala/vapi/camel-1.2.vapi %{_datadir}/vala/vapi/camel-1.2.vapi
%{_datadir}/vala/vapi/libebook-1.2.deps %{_datadir}/vala/vapi/libebook-1.2.deps
@ -478,6 +503,17 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_datadir}/vala/vapi/libebook-contacts-1.2.vapi %{_datadir}/vala/vapi/libebook-contacts-1.2.vapi
%{_datadir}/vala/vapi/libedataserver-1.2.deps %{_datadir}/vala/vapi/libedataserver-1.2.deps
%{_datadir}/vala/vapi/libedataserver-1.2.vapi %{_datadir}/vala/vapi/libedataserver-1.2.vapi
%files ui
%{_libdir}/libedataserverui-1.2.so.*
%{_libdir}/girepository-1.0/EDataServerUI-1.2.typelib
%{modules_dir}/module-trust-prompt.so
%files ui-devel
%{_includedir}/evolution-data-server/libedataserverui
%{_libdir}/libedataserverui-1.2.so
%{_libdir}/pkgconfig/libedataserverui-1.2.pc
%{_datadir}/gir-1.0/EDataServerUI-1.2.gir
%{_datadir}/vala/vapi/libedataserverui-1.2.deps %{_datadir}/vala/vapi/libedataserverui-1.2.deps
%{_datadir}/vala/vapi/libedataserverui-1.2.vapi %{_datadir}/vala/vapi/libedataserverui-1.2.vapi
@ -500,6 +536,22 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_datadir}/installed-tests %{_datadir}/installed-tests
%changelog %changelog
* Thu Jan 11 2024 Milan Crha <mcrha@redhat.com> - 3.28.5-24
- Resolves: RHEL-21362 (OAuth2: Enable HTML5 database and local storage features for web view)
* Wed Oct 11 2023 Milan Crha <mcrha@redhat.com> - 3.28.5-23
- Resolves: RHEL-12398 (Move WebKitGTK parts in Evolution Data Server into optional subpackage)
- Add requirement on ui subpackage into ui-devel subpackage
* Tue Oct 10 2023 Milan Crha <mcrha@redhat.com> - 3.28.5-22
- Resolves: RHEL-12398 (Move WebKitGTK parts in Evolution Data Server into optional subpackage)
* Tue Sep 05 2023 Milan Crha <mcrha@redhat.com> - 3.28.5-21
- Resolves: RHEL-2219 (Correct BuildRequires for python3)
* Wed May 04 2022 Milan Crha <mcrha@redhat.com> - 3.28.5-20
- Resolves: #2081746 (Backport patch for Google OAuth2 change)
* Mon Nov 22 2021 Milan Crha <mcrha@redhat.com> - 3.28.5-19 * Mon Nov 22 2021 Milan Crha <mcrha@redhat.com> - 3.28.5-19
- Resolves: #1938533 (secret-monitor: Turn runtime warnings into debug prints) - Resolves: #1938533 (secret-monitor: Turn runtime warnings into debug prints)