From 0fc190307948b99613573e01264e28b9ac521097 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 17 Jan 2014 09:28:54 -0800 Subject: [PATCH] backport a couple of crash fixes --- evolution-3.11.4-attachment_crash.patch | 37 ++++++++++++++++++++++ evolution-3.11.4-gsettings_crash.patch | 42 +++++++++++++++++++++++++ evolution.spec | 13 +++++++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 evolution-3.11.4-attachment_crash.patch create mode 100644 evolution-3.11.4-gsettings_crash.patch diff --git a/evolution-3.11.4-attachment_crash.patch b/evolution-3.11.4-attachment_crash.patch new file mode 100644 index 0000000..373ff5f --- /dev/null +++ b/evolution-3.11.4-attachment_crash.patch @@ -0,0 +1,37 @@ +From d64150ab966cfd9d661aa06999573fe42fe2671e Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 17 Jan 2014 15:24:42 +0000 +Subject: Bug #702958 - Crash on attachment add or remove + +--- +diff --git a/e-util/e-attachment.c b/e-util/e-attachment.c +index ea4f39c..8230eab 100644 +--- a/e-util/e-attachment.c ++++ b/e-util/e-attachment.c +@@ -334,6 +334,9 @@ attachment_update_icon_column_idle_cb (gpointer weak_ref) + + if (file_info != NULL) { + icon = g_file_info_get_icon (file_info); ++ /* add the reference here, thus the create_system_thumbnail() can unref the *icon. */ ++ if (icon) ++ g_object_ref (icon); + thumbnail_path = g_file_info_get_attribute_byte_string ( + file_info, G_FILE_ATTRIBUTE_THUMBNAIL_PATH); + } +@@ -351,11 +354,11 @@ attachment_update_icon_column_idle_cb (gpointer weak_ref) + /* Nothing to do, just use the icon. */ + + /* Else use the standard icon for the content type. */ +- } else if (icon != NULL) +- g_object_ref (icon); ++ } else if (icon != NULL) { ++ /* Nothing to do, just use the already reffed icon. */ + + /* Last ditch fallback. (GFileInfo not yet loaded?) */ +- else ++ } else + icon = g_themed_icon_new (DEFAULT_ICON_NAME); + + /* Pick an emblem, limit one. Choices listed by priority. */ +-- +cgit v0.9.2 diff --git a/evolution-3.11.4-gsettings_crash.patch b/evolution-3.11.4-gsettings_crash.patch new file mode 100644 index 0000000..53d2c47 --- /dev/null +++ b/evolution-3.11.4-gsettings_crash.patch @@ -0,0 +1,42 @@ +From 5a89422182cc9e5e75af808beef19479bab6e9de Mon Sep 17 00:00:00 2001 +From: Matthew Barnes +Date: Fri, 17 Jan 2014 02:09:20 +0000 +Subject: Prevent GSettings from freaking out over a missing junk filter. + +Boy does GSettings like to abort applications! The default value for +the 'junk-default-plugin' key is 'Bogofilter' but if the key's mapping +function cannot find Evolution's Bogofilter integration module (it is +optional after all, so may not be installed), then indicating failure +will make GSettings abort Evolution. So always indicate success. +--- +diff --git a/modules/settings/e-settings-mail-session.c b/modules/settings/e-settings-mail-session.c +index 4665731..188e325 100644 +--- a/modules/settings/e-settings-mail-session.c ++++ b/modules/settings/e-settings-mail-session.c +@@ -38,7 +38,6 @@ settings_mail_session_name_to_junk_filter (GValue *value, + gpointer user_data) + { + const gchar *filter_name; +- gboolean success = FALSE; + + filter_name = g_variant_get_string (variant, NULL); + +@@ -48,10 +47,14 @@ settings_mail_session_name_to_junk_filter (GValue *value, + junk_filter = e_mail_session_get_junk_filter_by_name ( + E_MAIL_SESSION (user_data), filter_name); + g_value_set_object (value, junk_filter); +- success = (junk_filter != NULL); + } + +- return success; ++ /* XXX Always return success, even if we cannot find a matching ++ * EMailJunkFilter. The default value is 'Bogofilter', but ++ * if the Bogofilter module is not installed then GSettings ++ * will actually abort the program. Nice. */ ++ ++ return TRUE; + } + + static GVariant * +-- +cgit v0.9.2 diff --git a/evolution.spec b/evolution.spec index 21fe6d7..5baf79c 100644 --- a/evolution.spec +++ b/evolution.spec @@ -33,7 +33,7 @@ Name: evolution Version: 3.11.4 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -53,6 +53,12 @@ Patch01: evolution-1.4.4-ldap-x86_64-hack.patch # RH bug #589555 Patch02: evolution-2.30.1-help-contents.patch +# Upstream 5a89422182, crashes if bogofilter is not present +Patch03: evolution-3.11.4-gsettings_crash.patch + +# Upstream d64150ab96, crashes on attachment add/remove +Patch04: evolution-3.11.4-attachment_crash.patch + ## Dependencies ### Requires: gnome-icon-theme >= %{gnome_icon_theme_version} @@ -204,6 +210,8 @@ This package contains the plugin to import Microsoft Personal Storage Table %setup -q -n evolution-%{version} %patch01 -p1 -b .ldaphack %patch02 -p1 -b .help-contents +%patch03 -p1 -b .gsettings_crash +%patch04 -p1 -b .attachment_crash mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -536,6 +544,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Jan 17 2014 Adam Williamson - 3.11.4-2 +- backport a couple of crasher fixes from upstream master + * Mon Jan 13 2014 Milan Crha - 3.11.4-1 - Update to 3.11.4