diff -Nru evolution-data-server-3.36.4/CMakeLists.txt evolution-data-server-3.36.5/CMakeLists.txt --- evolution-data-server-3.36.4/CMakeLists.txt 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/CMakeLists.txt 2020-08-07 07:20:31.000000000 +0000 @@ -4,7 +4,7 @@ cmake_policy(VERSION 3.1) project(evolution-data-server - VERSION 3.36.4 + VERSION 3.36.5 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 14) set(PROJECT_BUGREPORT "https://gitlab.gnome.org/GNOME/evolution-data-server/issues/") @@ -333,6 +333,8 @@ message(FATAL_ERROR "zlib doesn't provide deflateEnd") endif(NOT deflateEnd_exists) +pkg_check_at_least_version(HAVE_LIBSOUP_2_58 libsoup-2.4 2.58) + pkg_check_modules(GNOME_PLATFORM REQUIRED gio-2.0>=${glib_minimum_version} gmodule-2.0>=${glib_minimum_version} diff -Nru evolution-data-server-3.36.4/config.h.in evolution-data-server-3.36.5/config.h.in --- evolution-data-server-3.36.4/config.h.in 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/config.h.in 2020-08-07 07:20:31.000000000 +0000 @@ -193,3 +193,6 @@ /* evolution-alarm-notify - Define if using Canberra-GTK for sound */ #cmakedefine HAVE_CANBERRA 1 + +/* Define if compiled with libsoup 2.58 and newer */ +#cmakedefine HAVE_LIBSOUP_2_58 1 diff -Nru evolution-data-server-3.36.4/debian/changelog evolution-data-server-3.36.5/debian/changelog --- evolution-data-server-3.36.4/debian/changelog 2020-07-07 10:38:45.000000000 +0000 +++ evolution-data-server-3.36.5/debian/changelog 2021-04-07 18:27:39.000000000 +0000 @@ -1,3 +1,11 @@ +evolution-data-server (3.36.5-0ubuntu1) focal; urgency=medium + + * New stable version (lp: #1922951) + * debian/patches/git_imapx_compat.patch: cherry pick a fix needed for + compatibility with the new iCloud behaviour (lp: #1925742) + + -- Sebastien Bacher Wed, 07 Apr 2021 20:27:39 +0200 + evolution-data-server (3.36.4-0ubuntu1) focal; urgency=medium * New stable version (lp: #1886644), fixes diff -Nru evolution-data-server-3.36.4/debian/control evolution-data-server-3.36.5/debian/control --- evolution-data-server-3.36.4/debian/control 2020-06-11 21:09:07.000000000 +0000 +++ evolution-data-server-3.36.5/debian/control 2021-04-07 18:21:39.000000000 +0000 @@ -6,7 +6,7 @@ Section: gnome Priority: optional Maintainer: Debian GNOME Maintainers -Uploaders: Iain Lane , Jeremy Bicha +Uploaders: Iain Lane , Jeremy Bicha , Sebastien Bacher Build-Depends: cmake, debhelper-compat (= 12), dh-sequence-gir, diff -Nru evolution-data-server-3.36.4/debian/patches/git_imapx_compat.patch evolution-data-server-3.36.5/debian/patches/git_imapx_compat.patch --- evolution-data-server-3.36.4/debian/patches/git_imapx_compat.patch 1970-01-01 00:00:00.000000000 +0000 +++ evolution-data-server-3.36.5/debian/patches/git_imapx_compat.patch 2021-04-07 18:27:39.000000000 +0000 @@ -0,0 +1,56 @@ +From 640f152a330e2592f11a11b2cfc5aa61370d1a4c Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Thu, 22 Apr 2021 14:45:47 +0200 +Subject: [PATCH] I#328 - IMAPx: LIST-STATUS is not an extension of the + LIST-EXTENDED + +Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/328 +--- + src/camel/providers/imapx/camel-imapx-server.c | 8 +++++++- + src/camel/providers/imapx/camel-imapx-utils.c | 7 ------- + 2 files changed, 7 insertions(+), 8 deletions(-) + +Index: evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-server.c +=================================================================== +--- evolution-data-server-3.36.5.orig/src/camel/providers/imapx/camel-imapx-server.c ++++ evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-server.c +@@ -627,6 +627,12 @@ imapx_server_stash_command_arguments (Ca + if (CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, SPECIAL_USE) || CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, X_GM_EXT_1)) + g_string_append_printf (buffer, " SPECIAL-USE"); + is->priv->list_return_opts = g_string_free (buffer, FALSE); ++ } else if (!is->priv->is_broken_cyrus && CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, LIST_STATUS)) { ++ buffer = g_string_new (""); ++ g_string_append_printf ( ++ buffer, "STATUS (%s)", ++ is->priv->status_data_items); ++ is->priv->list_return_opts = g_string_free (buffer, FALSE); + } else { + is->priv->list_return_opts = NULL; + } +@@ -6510,7 +6516,7 @@ camel_imapx_server_list_sync (CamelIMAPX + + camel_imapx_command_unref (ic); + +- if (success && !is->priv->list_return_opts) { ++ if (success && (!is->priv->list_return_opts || CAMEL_IMAPX_LACK_CAPABILITY (is->priv->cinfo, LIST_EXTENDED))) { + ic = camel_imapx_command_new (is, CAMEL_IMAPX_JOB_LSUB, "LSUB \"\" %s", + utf7_pattern ? utf7_pattern : in_pattern); + +Index: evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-utils.c +=================================================================== +--- evolution-data-server-3.36.5.orig/src/camel/providers/imapx/camel-imapx-utils.c ++++ evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-utils.c +@@ -585,13 +585,6 @@ imapx_parse_capability (CamelIMAPXInputS + stream, &token, &len, cancellable, &local_error); + } + +- /* Some capabilities are extensions of other capabilities. +- * Make sure all prerequisite capability flags are present. */ +- +- /* LIST-STATUS is an extension of LIST-EXTENDED. */ +- if (CAMEL_IMAPX_HAVE_CAPABILITY (cinfo, LIST_STATUS)) +- cinfo->capa |= imapx_lookup_capability ("LIST-EXTENDED"); +- + if (local_error != NULL) { + g_propagate_error (error, local_error); + imapx_free_capability (cinfo); diff -Nru evolution-data-server-3.36.4/debian/patches/series evolution-data-server-3.36.5/debian/patches/series --- evolution-data-server-3.36.4/debian/patches/series 2020-06-11 21:09:07.000000000 +0000 +++ evolution-data-server-3.36.5/debian/patches/series 2021-04-07 18:27:39.000000000 +0000 @@ -1,3 +1,3 @@ 01-noinst-libedbus-private.patch ubuntu_gettext_domain.patch - +git_imapx_compat.patch diff -Nru evolution-data-server-3.36.4/NEWS evolution-data-server-3.36.5/NEWS --- evolution-data-server-3.36.4/NEWS 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/NEWS 2020-08-07 07:20:31.000000000 +0000 @@ -1,3 +1,14 @@ +Evolution-Data-Server 3.36.5 2020-08-07 +--------------------------------------- + +Bug Fixes: + I#236 - Uses LC_ADDRESS unconditionally in libphonenumber code (Milan Crha) + I#240 - IMAPx: Disable move to real junk/trash in server-side virtual folders (Milan Crha) + +Miscellaneous: + Fix a memory leak in ebmb_gather_photos_local_filenames() (Milan Crha) + ESoupSession: Provided SoupAuth might not be always used by libsoup (Milan Crha) + Evolution-Data-Server 3.36.4 2020-07-03 --------------------------------------- diff -Nru evolution-data-server-3.36.4/src/addressbook/libebook-contacts/e-phone-number-private.cpp evolution-data-server-3.36.5/src/addressbook/libebook-contacts/e-phone-number-private.cpp --- evolution-data-server-3.36.4/src/addressbook/libebook-contacts/e-phone-number-private.cpp 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/src/addressbook/libebook-contacts/e-phone-number-private.cpp 2020-08-07 07:20:31.000000000 +0000 @@ -118,8 +118,23 @@ /* Extract two-letter country code from current locale id if needed. * From outside this is a C library, so we better consult the * C infrastructure instead of std::locale, which might divert. */ - if (region_code == NULL || region_code[0] == '\0') - return _e_phone_number_cxx_region_code_from_locale (setlocale (LC_ADDRESS, NULL)); + if (region_code == NULL || region_code[0] == '\0') { + const gchar *lcl = NULL; + +#if defined (LC_TELEPHONE) + lcl = setlocale (LC_TELEPHONE, NULL); +#endif + +#if defined (LC_ADDRESS) + if (!lcl || !*lcl || (lcl[0] == 'C' && (!lcl[1] || lcl[1] == '.'))) + lcl = setlocale (LC_ADDRESS, NULL); +#endif + + if (!lcl || !*lcl || (lcl[0] == 'C' && (!lcl[1] || lcl[1] == '.'))) + lcl = setlocale (LC_MESSAGES, NULL); + + return _e_phone_number_cxx_region_code_from_locale (lcl); + } return region_code; } diff -Nru evolution-data-server-3.36.4/src/addressbook/libedata-book/e-book-meta-backend.c evolution-data-server-3.36.5/src/addressbook/libedata-book/e-book-meta-backend.c --- evolution-data-server-3.36.4/src/addressbook/libedata-book/e-book-meta-backend.c 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/src/addressbook/libedata-book/e-book-meta-backend.c 2020-08-07 07:20:31.000000000 +0000 @@ -521,7 +521,7 @@ values = e_vcard_attribute_get_param (attr, EVC_VALUE); if (values && g_ascii_strcasecmp (values->data, "uri") == 0) { - const gchar *url; + gchar *url; url = e_vcard_attribute_get_value (attr); if (url && g_str_has_prefix (url, LOCAL_PREFIX)) { @@ -533,6 +533,8 @@ else g_free (filename); } + + g_free (url); } } diff -Nru evolution-data-server-3.36.4/src/camel/providers/imapx/camel-imapx-conn-manager.c evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-conn-manager.c --- evolution-data-server-3.36.4/src/camel/providers/imapx/camel-imapx-conn-manager.c 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-conn-manager.c 2020-08-07 07:20:31.000000000 +0000 @@ -1882,7 +1882,7 @@ CamelIMAPXJob *job; CamelFolder *folder = NULL; gboolean need_to_expunge = FALSE, expunge = FALSE; - gboolean success; + gboolean success, is_virtual_mailbox; g_return_val_if_fail (CAMEL_IS_IMAPX_CONN_MANAGER (conn_man), FALSE); @@ -1905,14 +1905,24 @@ success = FALSE; } - if (success) { + is_virtual_mailbox = camel_imapx_mailbox_has_attribute (mailbox, CAMEL_IMAPX_LIST_ATTR_ALL) || + camel_imapx_mailbox_has_attribute (mailbox, CAMEL_IMAPX_LIST_ATTR_FLAGGED); + + if (success && is_virtual_mailbox) { + CamelIMAPXFolder *imapx_folder = CAMEL_IMAPX_FOLDER (folder); + + camel_imapx_folder_clear_move_to_real_trash_uids (imapx_folder); + camel_imapx_folder_clear_move_to_real_junk_uids (imapx_folder); + } + + if (success && !is_virtual_mailbox) { success = imapx_conn_manager_move_to_real_junk_sync ( conn_man, folder, cancellable, &need_to_expunge, error); expunge |= need_to_expunge; } - if (success) { + if (success && !is_virtual_mailbox) { success = imapx_conn_manager_move_to_real_trash_sync ( conn_man, folder, cancellable, &need_to_expunge, error); diff -Nru evolution-data-server-3.36.4/src/camel/providers/imapx/camel-imapx-folder.c evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-folder.c --- evolution-data-server-3.36.4/src/camel/providers/imapx/camel-imapx-folder.c 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-folder.c 2020-08-07 07:20:31.000000000 +0000 @@ -1617,6 +1617,30 @@ g_mutex_unlock (&folder->priv->move_to_hash_table_lock); } +void +camel_imapx_folder_clear_move_to_real_trash_uids (CamelIMAPXFolder *folder) +{ + g_return_if_fail (CAMEL_IS_IMAPX_FOLDER (folder)); + + g_mutex_lock (&folder->priv->move_to_hash_table_lock); + + g_hash_table_remove_all (folder->priv->move_to_real_trash_uids); + + g_mutex_unlock (&folder->priv->move_to_hash_table_lock); +} + +void +camel_imapx_folder_clear_move_to_real_junk_uids (CamelIMAPXFolder *folder) +{ + g_return_if_fail (CAMEL_IS_IMAPX_FOLDER (folder)); + + g_mutex_lock (&folder->priv->move_to_hash_table_lock); + + g_hash_table_remove_all (folder->priv->move_to_real_junk_uids); + + g_mutex_unlock (&folder->priv->move_to_hash_table_lock); +} + /** * camel_imapx_folder_invalidate_local_cache: * @folder: a #CamelIMAPXFolder diff -Nru evolution-data-server-3.36.4/src/camel/providers/imapx/camel-imapx-folder.h evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-folder.h --- evolution-data-server-3.36.4/src/camel/providers/imapx/camel-imapx-folder.h 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/src/camel/providers/imapx/camel-imapx-folder.h 2020-08-07 07:20:31.000000000 +0000 @@ -111,6 +111,10 @@ void camel_imapx_folder_claim_move_to_inbox_uids (CamelIMAPXFolder *folder, GPtrArray *out_uids_to_copy); +void camel_imapx_folder_clear_move_to_real_trash_uids + (CamelIMAPXFolder *folder); +void camel_imapx_folder_clear_move_to_real_junk_uids + (CamelIMAPXFolder *folder); void camel_imapx_folder_update_cache_expire (CamelFolder *folder, time_t expire_when); diff -Nru evolution-data-server-3.36.4/src/libedataserver/e-soup-session.c evolution-data-server-3.36.5/src/libedataserver/e-soup-session.c --- evolution-data-server-3.36.4/src/libedataserver/e-soup-session.c 2020-07-03 06:22:31.000000000 +0000 +++ evolution-data-server-3.36.5/src/libedataserver/e-soup-session.c 2020-08-07 07:20:31.000000000 +0000 @@ -70,6 +70,7 @@ SoupMessage *message, SoupAuth *soup_auth) { + SoupAuthManager *auth_manager; SoupSessionFeature *feature; SoupURI *soup_uri; GType auth_type; @@ -106,7 +107,15 @@ } } - soup_auth_manager_use_auth (SOUP_AUTH_MANAGER (feature), soup_uri, soup_auth); + auth_manager = SOUP_AUTH_MANAGER (feature); + +#ifdef HAVE_LIBSOUP_2_58 + /* This will make sure the 'soup_auth' is used regardless of the current 'auth_manager' state. + See https://gitlab.gnome.org/GNOME/libsoup/-/issues/196 for more information. */ + soup_auth_manager_clear_cached_credentials (auth_manager); +#endif /* HAVE_LIBSOUP_2_58 */ + + soup_auth_manager_use_auth (auth_manager, soup_uri, soup_auth); if (!in_soup_uri) soup_uri_free (soup_uri);