gnu: evolution: Update to 3.42.1.

* gnu/packages/gnome.scm (evolution): Update to 3.42.1.  Remove trailing #t.
[source]: Remove patches.
[phases]{adjust-webkitgtk-version}: New phase.
* gnu/packages/patches/evolution-CVE-2020-11879.patch: Delete file.
* gnu/packages/patches/evolution-printableoptions.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register them.
This commit is contained in:
Maxim Cournoyer 2021-11-12 22:37:30 -05:00
parent ce7d93ceda
commit acd827be09
No known key found for this signature in database
GPG key ID: 1260E46482E63562
4 changed files with 8 additions and 187 deletions

View file

@ -1043,8 +1043,6 @@ dist_patch_DATA = \
%D%/packages/patches/esmtp-add-lesmtp.patch \
%D%/packages/patches/eudev-rules-directory.patch \
%D%/packages/patches/evilwm-lost-focus-bug.patch \
%D%/packages/patches/evolution-CVE-2020-11879.patch \
%D%/packages/patches/evolution-printableoptions.patch \
%D%/packages/patches/exercism-disable-self-update.patch \
%D%/packages/patches/extempore-unbundle-external-dependencies.patch \
%D%/packages/patches/extundelete-e2fsprogs-1.44.patch \

View file

@ -10990,7 +10990,7 @@ (define-public libdazzle
(define-public evolution
(package
(name "evolution")
(version "3.34.2")
(version "3.42.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/evolution/"
@ -10998,9 +10998,7 @@ (define-public evolution
"evolution-" version ".tar.xz"))
(sha256
(base32
"164vy8h432pjglafn8y2ms4gsvk3kbgc63h5qp0mk5dv4smsp29c"))
(patches (search-patches "evolution-CVE-2020-11879.patch"
"evolution-printableoptions.patch"))))
"0igfzapdvgfx2gnpwfkjfkn7l5j186wk88ni39vqas1sl7ijlls6"))))
(build-system cmake-build-system)
(arguments
`(#:imported-modules (,@%cmake-build-system-modules
@ -11014,6 +11012,11 @@ (define-public evolution
; in four years and cannot be built.
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'adjust-webkitgtk-version
(lambda _
(substitute* '("CMakeLists.txt" "evolution-shell.pc.in")
(("webkit2gtk-4.0")
"webkit2gtk-4.1"))))
;; The build system attempts to install user interface modules to the
;; output directory of the "evolution-data-server" package. This
;; change redirects that change.
@ -11022,8 +11025,7 @@ (define-public evolution
(substitute* "src/modules/alarm-notify/CMakeLists.txt"
(("\\$\\{edsuimoduledir\\}")
(string-append (assoc-ref outputs "out")
"/lib/evolution-data-server/ui-modules")))
#t))
"/lib/evolution-data-server/ui-modules")))))
(add-after 'install 'glib-or-gtk-compile-schemas
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
(add-after 'install 'glib-or-gtk-wrap

View file

@ -1,122 +0,0 @@
From 6489f20d6905cc797e2b2581c415e558c457caa7 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Wed, 12 Feb 2020 18:59:52 +0100
Subject: [PATCH] I#784 - Warn about and limit what can be attached using
mailto: URI
Closes https://gitlab.gnome.org/GNOME/evolution/issues/784
---
src/composer/e-msg-composer.c | 58 +++++++++++++++++++++++++++++------
src/e-util/e-system.error.xml | 7 ++++-
2 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/src/composer/e-msg-composer.c b/src/composer/e-msg-composer.c
index e4c9ac095e..cd3168d882 100644
--- a/src/composer/e-msg-composer.c
+++ b/src/composer/e-msg-composer.c
@@ -4761,7 +4761,8 @@ handle_mailto (EMsgComposer *composer,
gchar *header, *content, *buf;
gsize nread, nwritten;
const gchar *p;
- gint len, clen;
+ gint len, clen, has_attachments = 0;
+ gboolean has_blacklisted_attachment = FALSE;
table = e_msg_composer_get_header_table (composer);
view = e_msg_composer_get_attachment_view (composer);
@@ -4844,22 +4845,36 @@ handle_mailto (EMsgComposer *composer,
} else if (!g_ascii_strcasecmp (header, "attach") ||
!g_ascii_strcasecmp (header, "attachment")) {
EAttachment *attachment;
+ GFile *file;
camel_url_decode (content);
- if (file_is_blacklisted (content))
- e_alert_submit (
- E_ALERT_SINK (e_msg_composer_get_editor (composer)),
- "mail:blacklisted-file",
- content, NULL);
if (g_ascii_strncasecmp (content, "file:", 5) == 0)
attachment = e_attachment_new_for_uri (content);
else
attachment = e_attachment_new_for_path (content);
- e_attachment_store_add_attachment (store, attachment);
- e_attachment_load_async (
- attachment, (GAsyncReadyCallback)
- e_attachment_load_handle_error, composer);
+ file = e_attachment_ref_file (attachment);
+ if (!file || !g_file_peek_path (file) ||
+ !g_file_test (g_file_peek_path (file), G_FILE_TEST_EXISTS) ||
+ g_file_test (g_file_peek_path (file), G_FILE_TEST_IS_DIR)) {
+ /* Do nothing, simply ignore the attachment request */
+ } else {
+ has_attachments++;
+
+ if (file_is_blacklisted (content)) {
+ has_blacklisted_attachment = TRUE;
+ e_alert_submit (
+ E_ALERT_SINK (e_msg_composer_get_editor (composer)),
+ "mail:blacklisted-file",
+ content, NULL);
+ }
+
+ e_attachment_store_add_attachment (store, attachment);
+ e_attachment_load_async (
+ attachment, (GAsyncReadyCallback)
+ e_attachment_load_handle_error, composer);
+ }
g_object_unref (attachment);
+ g_clear_object (&file);
} else if (!g_ascii_strcasecmp (header, "from")) {
/* Ignore */
} else if (!g_ascii_strcasecmp (header, "reply-to")) {
@@ -4883,6 +4898,29 @@ handle_mailto (EMsgComposer *composer,
g_free (buf);
+ if (has_attachments && !has_blacklisted_attachment) {
+ const gchar *primary;
+ gchar *secondary;
+
+ primary = g_dngettext (GETTEXT_PACKAGE,
+ "Review attachment before sending.",
+ "Review attachments before sending.",
+ has_attachments);
+
+ secondary = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
+ "There had been added %d attachment. Make sure it does not contain any sensitive information before sending the message.",
+ "There had been added %d attachments. Make sure they do not contain any sensitive information before sending the message.",
+ has_attachments),
+ has_attachments);
+
+ e_alert_submit (
+ E_ALERT_SINK (e_msg_composer_get_editor (composer)),
+ "system:generic-warning",
+ primary, secondary, NULL);
+
+ g_free (secondary);
+ }
+
merge_always_cc_and_bcc (table, to, &cc, &bcc);
tov = destination_list_to_vector (to);
diff --git a/src/e-util/e-system.error.xml b/src/e-util/e-system.error.xml
index ddcf989fda..02facb7d26 100644
--- a/src/e-util/e-system.error.xml
+++ b/src/e-util/e-system.error.xml
@@ -1,6 +1,11 @@
<?xml version="1.0"?>
<error-list domain="system">
- <error type="error" id="generic-error">
+ <error id="generic-error" type="error">
+ <primary>{0}</primary>
+ <secondary>{1}</secondary>
+ </error>
+
+ <error id="generic-warning" type="warning">
<primary>{0}</primary>
<secondary>{1}</secondary>
</error>
--
GitLab

View file

@ -1,57 +0,0 @@
Patch adapted from evolution-data-server's
c3915bb99638c1ccf57217097b14b5db69bcac96 upstream patch by Milan Crha:
PrintableOptions.cmake: Correct variable name comparison
CMake 3.20.1 errors out with:
CMake Error at cmake/modules/PrintableOptions.cmake:38 (message):
variable name cannot be empty
Call Stack (most recent call first):
CMakeLists.txt:152 (add_printable_variable)
Change how the parameter value is compared, to fix it.
--- a/cmake/modules/PrintableOptions.cmake
+++ b/cmake/modules/PrintableOptions.cmake
@@ -19,32 +19,32 @@
# prints all the build options previously added with the above functions
macro(add_printable_variable_bare _name)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "variable name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
list(APPEND _printable_options ${_name})
endmacro()
macro(add_printable_option _name _description _default_value)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "option name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
option(${_name} ${_description} ${_default_value})
add_printable_variable_bare(${_name})
endmacro()
macro(add_printable_variable _name _description _default_value)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "variable name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
set(${_name} ${_default_value} CACHE STRING ${_description})
add_printable_variable_bare(${_name})
endmacro()
macro(add_printable_variable_path _name _description _default_value)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "path variable name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
set(${_name} ${_default_value} CACHE PATH ${_description})
add_printable_variable_bare(${_name})
endmacro()