From 95374ea1d21824ab970abbf07346272483696fcb Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 3 Aug 2010 07:16:10 -0400 Subject: [PATCH 01/19] * Tue Aug 03 2010 Matthew Barnes - 2.31.6-1.fc14 - Update to 2.31.6 - Drop dbus-glib requirement. - Bump glib2 requirement to 2.25.12. - Add clutter-gtk requirement (for express mode). - Remove gtk-compat macro patch (fixed upstream). --- .gitignore | 1 + evolution-2.31.5-gtk-compat-crash.patch | 24 ------------------------ evolution.spec | 21 ++++++++++++--------- sources | 2 +- 4 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 evolution-2.31.5-gtk-compat-crash.patch diff --git a/.gitignore b/.gitignore index a151a6e..81c6130 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ evolution-2.31.5.tar.bz2 +evolution-2.31.6.tar.bz2 diff --git a/evolution-2.31.5-gtk-compat-crash.patch b/evolution-2.31.5-gtk-compat-crash.patch deleted file mode 100644 index bedcf0d..0000000 --- a/evolution-2.31.5-gtk-compat-crash.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up evolution-2.31.5/e-util/gtk-compat.h.gtk-compat-crash evolution-2.31.5/e-util/gtk-compat.h ---- evolution-2.31.5/e-util/gtk-compat.h.gtk-compat-crash 2010-07-11 18:26:08.000000000 -0400 -+++ evolution-2.31.5/e-util/gtk-compat.h 2010-07-22 11:51:55.076484868 -0400 -@@ -55,15 +55,15 @@ typedef enum { - #define gdk_region_get_rectangles(region, rectangles, n_rectangles) \ - G_STMT_START { \ - GdkRectangle *__rects; \ -- gint __i, __n; \ -+ gint __i, __nrects; \ - \ -- __n = cairo_region_num_rectangles (region); \ -- __rects = g_new (GdkRectangle, __n); \ -+ __nrects = cairo_region_num_rectangles (region); \ -+ __rects = g_new (GdkRectangle, __nrects); \ - \ -- for (__i = 0; __i < __n; __i++) \ -+ for (__i = 0; __i < __nrects; __i++) \ - cairo_region_get_rectangle ((region), __i, &__rects[__i]); \ - \ -- *(n_rectangles) = __n; \ -+ *(n_rectangles) = __nrects; \ - *(rectangles) = __rects; \ - } G_STMT_END - diff --git a/evolution.spec b/evolution.spec index 6870f2b..b76d4d4 100644 --- a/evolution.spec +++ b/evolution.spec @@ -1,6 +1,5 @@ -%define dbus_glib_version 0.70 %define dbus_version 1.0 -%define glib2_version 2.22.0 +%define glib2_version 2.25.12 %define gnome_desktop_version 2.26.0 %define gnome_doc_utils_version 0.8.0 %define gnome_icon_theme_version 2.19.91 @@ -9,6 +8,7 @@ %define intltool_version 0.35.5 %define libgdata_version 0.6.3 %define libgweather_version 2.25.4 +%define clutter_gtk_version 0.10 %define soup_version 2.4.0 %define evo_base_version 3.0 @@ -32,8 +32,8 @@ ### Abstract ### Name: evolution -Version: 2.31.5 -Release: 2%{?dist} +Version: 2.31.6 +Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -55,9 +55,6 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch -# Fixes a crash in gtk-compat.h macros -Patch14: evolution-2.31.5-gtk-compat-crash.patch - ## Dependencies ### Requires(pre): GConf2 @@ -78,8 +75,8 @@ BuildRequires: atk-devel BuildRequires: autoconf >= 2.59 BuildRequires: automake >= 1.9 BuildRequires: bison +BuildRequires: clutter-gtk-devel >= %{clutter_gtk_version} BuildRequires: dbus-devel >= %{dbus_version} -BuildRequires: dbus-glib-devel >= %{dbus_glib_version} BuildRequires: desktop-file-utils BuildRequires: evolution-data-server-devel >= %{version} BuildRequires: gettext @@ -210,7 +207,6 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents -%patch14 -p1 -b .gtk-compat-crash mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -618,6 +614,13 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 03 2010 Matthew Barnes - 2.31.6-1.fc14 +- Update to 2.31.6 +- Drop dbus-glib requirement. +- Bump glib2 requirement to 2.25.12. +- Add clutter-gtk requirement (for express mode). +- Remove gtk-compat macro patch (fixed upstream). + * Thu Jul 22 2010 Matthew Barnes - 2.31.5-2.fc14 - Add patch to fix startup crash in gtk-compat macros. diff --git a/sources b/sources index 7cb2a79..c46e87b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59a9c75d808788fa9eacce4a757b04fe evolution-2.31.5.tar.bz2 +8522c7a972be2629924f985981911655 evolution-2.31.6.tar.bz2 From e82c640a656cc5ba0c890831ad27d2892fabc8ef Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 6 Aug 2010 12:09:00 -0400 Subject: [PATCH 02/19] Roll back evo_base_version. --- evolution.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evolution.spec b/evolution.spec index b76d4d4..562f85c 100644 --- a/evolution.spec +++ b/evolution.spec @@ -11,7 +11,7 @@ %define clutter_gtk_version 0.10 %define soup_version 2.4.0 -%define evo_base_version 3.0 +%define evo_base_version 2.32 %define last_anjal_version 0.3.2-3 %define last_libgal2_version 2:2.5.3-2 @@ -618,6 +618,7 @@ rm -rf $RPM_BUILD_ROOT - Update to 2.31.6 - Drop dbus-glib requirement. - Bump glib2 requirement to 2.25.12. +- Roll back evo_base_version to 2.32. - Add clutter-gtk requirement (for express mode). - Remove gtk-compat macro patch (fixed upstream). From 200b480af6aec2a8a1159d539b7c9b2cda9edf58 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 6 Aug 2010 14:50:59 -0400 Subject: [PATCH 03/19] Remove leftover dbus-glib calls. --- evolution-2.31.6-no-dbus-glib.patch | 33 +++++++++++++++++++++++++++++ evolution.spec | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 evolution-2.31.6-no-dbus-glib.patch diff --git a/evolution-2.31.6-no-dbus-glib.patch b/evolution-2.31.6-no-dbus-glib.patch new file mode 100644 index 0000000..b6f27ca --- /dev/null +++ b/evolution-2.31.6-no-dbus-glib.patch @@ -0,0 +1,33 @@ +diff -up evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c.no-dbus-glib evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c +--- evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c.no-dbus-glib 2010-08-06 14:48:18.324805041 -0400 ++++ evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c 2010-08-06 14:48:49.018582948 -0400 +@@ -57,7 +57,6 @@ main (gint argc, gchar **argv) + textdomain (GETTEXT_PACKAGE); + + g_thread_init (NULL); +- dbus_g_thread_init (); + + #ifdef G_OS_WIN32 + path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL); +diff -up evolution-2.31.6/capplet/anjal-settings-main.c.no-dbus-glib evolution-2.31.6/capplet/anjal-settings-main.c +--- evolution-2.31.6/capplet/anjal-settings-main.c.no-dbus-glib 2010-08-06 14:48:25.502555241 -0400 ++++ evolution-2.31.6/capplet/anjal-settings-main.c 2010-08-06 14:48:54.586593625 -0400 +@@ -225,7 +225,6 @@ main (gint argc, gchar *argv[]) + + if (!g_thread_get_initialized ()) + g_thread_init (NULL); +- dbus_g_thread_init (); + + client = gconf_client_get_default(); + +diff -up evolution-2.31.6/shell/main.c.no-dbus-glib evolution-2.31.6/shell/main.c +--- evolution-2.31.6/shell/main.c.no-dbus-glib 2010-08-06 14:48:34.018804548 -0400 ++++ evolution-2.31.6/shell/main.c 2010-08-06 14:48:59.620635199 -0400 +@@ -492,7 +492,6 @@ main (gint argc, gchar **argv) + g_type_init (); + if (!g_thread_get_initialized ()) + g_thread_init (NULL); +- dbus_g_thread_init (); + + #ifdef G_OS_WIN32 + path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL); diff --git a/evolution.spec b/evolution.spec index 562f85c..4021e77 100644 --- a/evolution.spec +++ b/evolution.spec @@ -55,6 +55,9 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch +# Remove leftover dbus-glib calls. +Patch14: evolution-2.31.6-no-dbus-glib.patch + ## Dependencies ### Requires(pre): GConf2 @@ -207,6 +210,7 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents +%patch14 -p1 -b .no-dbus-glib mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib From fbb4f8fcc94b6ff99bea749d4d7ffeae60028228 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 6 Aug 2010 16:32:36 -0400 Subject: [PATCH 04/19] Fix handling of migrated signature files. --- evolution-2.31.6-signature-migration.patch | 50 ++++++++++++++++++++++ evolution.spec | 9 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 evolution-2.31.6-signature-migration.patch diff --git a/evolution-2.31.6-signature-migration.patch b/evolution-2.31.6-signature-migration.patch new file mode 100644 index 0000000..de5f456 --- /dev/null +++ b/evolution-2.31.6-signature-migration.patch @@ -0,0 +1,50 @@ +diff -up evolution-2.31.6/e-util/e-signature.c.signature-migration evolution-2.31.6/e-util/e-signature.c +--- evolution-2.31.6/e-util/e-signature.c.signature-migration 2010-08-02 18:50:02.000000000 -0400 ++++ evolution-2.31.6/e-util/e-signature.c 2010-08-06 16:30:18.702805091 -0400 +@@ -493,28 +493,27 @@ e_signature_set_from_xml (ESignature *si + } + break; + } +- +- /* If the signature is not a script, replace the directory +- * part with the current signatures directory. This makes +- * moving the signatures directory transparent. */ +- if (!e_signature_get_is_script (signature)) { +- const gchar *user_data_dir; +- gchar *basename; +- gchar *filename; +- +- user_data_dir = e_get_user_data_dir (); +- +- filename = signature->priv->filename; +- basename = g_path_get_basename (filename); +- signature->priv->filename = g_build_filename ( +- user_data_dir, "signatures", basename, NULL); +- g_free (basename); +- g_free (filename); +- } +- + cur = cur->next; + } + ++ /* If the signature is not a script, replace the directory ++ * part with the current signatures directory. This makes ++ * moving the signatures directory transparent. */ ++ if (!e_signature_get_is_script (signature)) { ++ const gchar *user_data_dir; ++ gchar *basename; ++ gchar *filename; ++ ++ user_data_dir = e_get_user_data_dir (); ++ ++ filename = signature->priv->filename; ++ basename = g_path_get_basename (filename); ++ signature->priv->filename = g_build_filename ( ++ user_data_dir, "signatures", basename, NULL); ++ g_free (basename); ++ g_free (filename); ++ } ++ + xmlFreeDoc (doc); + + return changed; diff --git a/evolution.spec b/evolution.spec index 4021e77..db54cac 100644 --- a/evolution.spec +++ b/evolution.spec @@ -33,7 +33,7 @@ Name: evolution Version: 2.31.6 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -58,6 +58,9 @@ Patch13: evolution-2.30.1-help-contents.patch # Remove leftover dbus-glib calls. Patch14: evolution-2.31.6-no-dbus-glib.patch +# Fix handling of migrated signature files. +Patch15: evolution-2.31.6-signature-migration.patch + ## Dependencies ### Requires(pre): GConf2 @@ -211,6 +214,7 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents %patch14 -p1 -b .no-dbus-glib +%patch15 -p1 -b .signature-migration mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -618,6 +622,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Aug 06 2010 Matthew Barnes - 2.31.6-2.fc14 +- Fix handling of migrated signature files. + * Tue Aug 03 2010 Matthew Barnes - 2.31.6-1.fc14 - Update to 2.31.6 - Drop dbus-glib requirement. From 738b3cd7feea40a49a298b3bc00a7303f9ae1d2c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 16 Aug 2010 18:16:10 -0400 Subject: [PATCH 05/19] Update to 2.31.90 --- .gitignore | 1 + evolution-2.31.6-no-dbus-glib.patch | 33 -------------- evolution-2.31.6-signature-migration.patch | 50 ---------------------- evolution.spec | 15 +++---- sources | 1 + 5 files changed, 7 insertions(+), 93 deletions(-) delete mode 100644 evolution-2.31.6-no-dbus-glib.patch delete mode 100644 evolution-2.31.6-signature-migration.patch diff --git a/.gitignore b/.gitignore index 81c6130..203381b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ evolution-2.31.5.tar.bz2 evolution-2.31.6.tar.bz2 +evolution-2.31.90.tar.bz2 diff --git a/evolution-2.31.6-no-dbus-glib.patch b/evolution-2.31.6-no-dbus-glib.patch deleted file mode 100644 index b6f27ca..0000000 --- a/evolution-2.31.6-no-dbus-glib.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c.no-dbus-glib evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c ---- evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c.no-dbus-glib 2010-08-06 14:48:18.324805041 -0400 -+++ evolution-2.31.6/calendar/gui/alarm-notify/notify-main.c 2010-08-06 14:48:49.018582948 -0400 -@@ -57,7 +57,6 @@ main (gint argc, gchar **argv) - textdomain (GETTEXT_PACKAGE); - - g_thread_init (NULL); -- dbus_g_thread_init (); - - #ifdef G_OS_WIN32 - path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL); -diff -up evolution-2.31.6/capplet/anjal-settings-main.c.no-dbus-glib evolution-2.31.6/capplet/anjal-settings-main.c ---- evolution-2.31.6/capplet/anjal-settings-main.c.no-dbus-glib 2010-08-06 14:48:25.502555241 -0400 -+++ evolution-2.31.6/capplet/anjal-settings-main.c 2010-08-06 14:48:54.586593625 -0400 -@@ -225,7 +225,6 @@ main (gint argc, gchar *argv[]) - - if (!g_thread_get_initialized ()) - g_thread_init (NULL); -- dbus_g_thread_init (); - - client = gconf_client_get_default(); - -diff -up evolution-2.31.6/shell/main.c.no-dbus-glib evolution-2.31.6/shell/main.c ---- evolution-2.31.6/shell/main.c.no-dbus-glib 2010-08-06 14:48:34.018804548 -0400 -+++ evolution-2.31.6/shell/main.c 2010-08-06 14:48:59.620635199 -0400 -@@ -492,7 +492,6 @@ main (gint argc, gchar **argv) - g_type_init (); - if (!g_thread_get_initialized ()) - g_thread_init (NULL); -- dbus_g_thread_init (); - - #ifdef G_OS_WIN32 - path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL); diff --git a/evolution-2.31.6-signature-migration.patch b/evolution-2.31.6-signature-migration.patch deleted file mode 100644 index de5f456..0000000 --- a/evolution-2.31.6-signature-migration.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up evolution-2.31.6/e-util/e-signature.c.signature-migration evolution-2.31.6/e-util/e-signature.c ---- evolution-2.31.6/e-util/e-signature.c.signature-migration 2010-08-02 18:50:02.000000000 -0400 -+++ evolution-2.31.6/e-util/e-signature.c 2010-08-06 16:30:18.702805091 -0400 -@@ -493,28 +493,27 @@ e_signature_set_from_xml (ESignature *si - } - break; - } -- -- /* If the signature is not a script, replace the directory -- * part with the current signatures directory. This makes -- * moving the signatures directory transparent. */ -- if (!e_signature_get_is_script (signature)) { -- const gchar *user_data_dir; -- gchar *basename; -- gchar *filename; -- -- user_data_dir = e_get_user_data_dir (); -- -- filename = signature->priv->filename; -- basename = g_path_get_basename (filename); -- signature->priv->filename = g_build_filename ( -- user_data_dir, "signatures", basename, NULL); -- g_free (basename); -- g_free (filename); -- } -- - cur = cur->next; - } - -+ /* If the signature is not a script, replace the directory -+ * part with the current signatures directory. This makes -+ * moving the signatures directory transparent. */ -+ if (!e_signature_get_is_script (signature)) { -+ const gchar *user_data_dir; -+ gchar *basename; -+ gchar *filename; -+ -+ user_data_dir = e_get_user_data_dir (); -+ -+ filename = signature->priv->filename; -+ basename = g_path_get_basename (filename); -+ signature->priv->filename = g_build_filename ( -+ user_data_dir, "signatures", basename, NULL); -+ g_free (basename); -+ g_free (filename); -+ } -+ - xmlFreeDoc (doc); - - return changed; diff --git a/evolution.spec b/evolution.spec index db54cac..8ecc07e 100644 --- a/evolution.spec +++ b/evolution.spec @@ -32,8 +32,8 @@ ### Abstract ### Name: evolution -Version: 2.31.6 -Release: 2%{?dist} +Version: 2.31.90 +Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -55,12 +55,6 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch -# Remove leftover dbus-glib calls. -Patch14: evolution-2.31.6-no-dbus-glib.patch - -# Fix handling of migrated signature files. -Patch15: evolution-2.31.6-signature-migration.patch - ## Dependencies ### Requires(pre): GConf2 @@ -213,8 +207,6 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents -%patch14 -p1 -b .no-dbus-glib -%patch15 -p1 -b .signature-migration mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -622,6 +614,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Aug 16 2010 Matthew Barnes - 2.31.90-1.fc14 +- Update to 2.31.90 + * Fri Aug 06 2010 Matthew Barnes - 2.31.6-2.fc14 - Fix handling of migrated signature files. diff --git a/sources b/sources index c46e87b..c11109e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 8522c7a972be2629924f985981911655 evolution-2.31.6.tar.bz2 +47529ba95ef77881f9aea6f9f98cf9fa evolution-2.31.90.tar.bz2 From afba71d706f786532f872bda851c8e21d8975503 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 26 Aug 2010 18:30:29 +0200 Subject: [PATCH 06/19] Remove old source file from 'sources' --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index c11109e..3413bc4 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -8522c7a972be2629924f985981911655 evolution-2.31.6.tar.bz2 47529ba95ef77881f9aea6f9f98cf9fa evolution-2.31.90.tar.bz2 From 2fc195f7f67e6a5dbf31278ca6c7ba1f6a1ae224 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 30 Aug 2010 10:29:18 +0200 Subject: [PATCH 07/19] Update to 2.31.91 --- .gitignore | 1 + evolution.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 203381b..3c7313e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ evolution-2.31.5.tar.bz2 evolution-2.31.6.tar.bz2 evolution-2.31.90.tar.bz2 +/evolution-2.31.91.tar.bz2 diff --git a/evolution.spec b/evolution.spec index 8ecc07e..9c21a00 100644 --- a/evolution.spec +++ b/evolution.spec @@ -32,7 +32,7 @@ ### Abstract ### Name: evolution -Version: 2.31.90 +Version: 2.31.91 Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME @@ -614,6 +614,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Aug 30 2010 Milan Crha - 2.31.91-1.fc14 +- Update to 2.31.91 + * Mon Aug 16 2010 Matthew Barnes - 2.31.90-1.fc14 - Update to 2.31.90 diff --git a/sources b/sources index 3413bc4..bb4a999 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -47529ba95ef77881f9aea6f9f98cf9fa evolution-2.31.90.tar.bz2 +cd5ccfdccf48ec8a41f48d9ac4b3e983 evolution-2.31.91.tar.bz2 From 0e58157c3282829b946f8317f33d248890d9ea75 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 1 Sep 2010 08:47:33 +0200 Subject: [PATCH 08/19] Remove msgmerge calls due to a floating point exception there --- evolution.spec | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/evolution.spec b/evolution.spec index 9c21a00..8cb5b5f 100644 --- a/evolution.spec +++ b/evolution.spec @@ -252,15 +252,16 @@ make %{?_smp_mflags} LIBTOOL=/usr/bin/libtool CFLAGS="$CFLAGS -fno-strict-aliasi # Strip unneeded translations from .mo files. # This reduces the RPM size by several megabytes. -cd po -grep -v ".*[.]desktop[.]in[.]in$" POTFILES.in > POTFILES.keep -mv POTFILES.keep POTFILES.in -intltool-update --gettext-package=%{name}-%{evo_base_version} --pot -for p in *.po; do - msgmerge $p %{name}-%{evo_base_version}.pot > $p.out - msgfmt -o `basename $p .po`.gmo $p.out -done -cd - +#disabled since 2.31.91 because of a msgmerge floating point exception (see RH bug 628073) +#cd po +#grep -v ".*[.]desktop[.]in[.]in$" POTFILES.in > POTFILES.keep +#mv POTFILES.keep POTFILES.in +#intltool-update --gettext-package=%{name}-%{evo_base_version} --pot +#for p in *.po; do +# msgmerge $p %{name}-%{evo_base_version}.pot > $p.out +# msgfmt -o `basename $p .po`.gmo $p.out +#done +#cd - # Replace identical images in the help by links. # This reduces the RPM size by several megabytes. @@ -616,6 +617,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon Aug 30 2010 Milan Crha - 2.31.91-1.fc14 - Update to 2.31.91 +- Remove msgmerge calls due to a floating point exception there * Mon Aug 16 2010 Matthew Barnes - 2.31.90-1.fc14 - Update to 2.31.90 From a0f37aa437c4e165d2d3bd8cac9577e19dff6a5a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 13 Sep 2010 13:05:42 +0200 Subject: [PATCH 09/19] Update to 2.31.92 --- .gitignore | 1 + evolution.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3c7313e..cf50db8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ evolution-2.31.5.tar.bz2 evolution-2.31.6.tar.bz2 evolution-2.31.90.tar.bz2 /evolution-2.31.91.tar.bz2 +/evolution-2.31.92.tar.bz2 diff --git a/evolution.spec b/evolution.spec index 8cb5b5f..90dc467 100644 --- a/evolution.spec +++ b/evolution.spec @@ -4,7 +4,7 @@ %define gnome_doc_utils_version 0.8.0 %define gnome_icon_theme_version 2.19.91 %define gtk2_version 2.20.0 -%define gtkhtml_version 3.31.2 +%define gtkhtml_version 3.31.92 %define intltool_version 0.35.5 %define libgdata_version 0.6.3 %define libgweather_version 2.25.4 @@ -32,7 +32,7 @@ ### Abstract ### Name: evolution -Version: 2.31.91 +Version: 2.31.92 Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME @@ -615,6 +615,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Sep 13 2010 Milan Crha - 2.31.92.fc14 +- Update to 2.31.92 + * Mon Aug 30 2010 Milan Crha - 2.31.91-1.fc14 - Update to 2.31.91 - Remove msgmerge calls due to a floating point exception there diff --git a/sources b/sources index bb4a999..6e02d17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd5ccfdccf48ec8a41f48d9ac4b3e983 evolution-2.31.91.tar.bz2 +90d84ddb24daecd27bc5b1553064bc46 evolution-2.31.92.tar.bz2 From 6d55933ea138eb608d8f8149d45cf71fd65dd63d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 14 Sep 2010 15:59:19 +0200 Subject: [PATCH 10/19] Add patch for Gnome bug #626066 (login to NSS on demand) Add patch for Gnome bug #626066 (login to NSS on demand)# with '#' will be ignored, and an empty message aborts the commit. --- evolution-2.31.92-gn626066.patch | 137 +++++++++++++++++++++++++++++++ evolution.spec | 7 +- 2 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 evolution-2.31.92-gn626066.patch diff --git a/evolution-2.31.92-gn626066.patch b/evolution-2.31.92-gn626066.patch new file mode 100644 index 0000000..5d25293 --- /dev/null +++ b/evolution-2.31.92-gn626066.patch @@ -0,0 +1,137 @@ +From c33a84d443f6a340fc247531b6bc8c9997b52aba Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Mon, 13 Sep 2010 20:00:25 +0000 +Subject: Bug 626066 - log in to NSS database on demand for changing trust + +--- +diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c +index 9c87c66..66ce69b 100644 +--- a/smime/gui/cert-trust-dialog.c ++++ b/smime/gui/cert-trust-dialog.c +@@ -73,7 +73,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data) + e_cert_trust_add_peer_trust (&trust, FALSE, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (data->trust_button)), + FALSE); +- CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust); ++ e_cert_db_change_cert_trust (icert, &trust); + break; + case GTK_RESPONSE_ACCEPT: { + /* just *what on earth* was chris thinking here!?!?! copied from certificate-manager.c */ +@@ -101,7 +101,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data) + trust_email, + trust_objsign); + +- CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), icert, &trust); ++ e_cert_db_change_cert_trust (icert, &trust); + } + + gtk_widget_destroy (dialog); +diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c +index d0823b8..5a5b204 100644 +--- a/smime/gui/certificate-manager.c ++++ b/smime/gui/certificate-manager.c +@@ -679,7 +679,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm) + trust_email, + trust_objsign); + +- CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust); ++ e_cert_db_change_cert_trust (icert, &trust); + } + + gtk_widget_destroy (dialog); +@@ -1097,18 +1097,13 @@ certificate_manager_config_new (EPreferencesWindow *window) + GtkWidget *parent; + GtkWidget *widget; + CertificateManagerData *cfm_data; +- PK11SlotInfo* slot; +- ECertDB *cert_db; + + shell = e_preferences_window_get_shell (window); + + g_return_val_if_fail (E_IS_SHELL (shell), NULL); + + /* We need to peek the db here to make sure it (and NSS) are fully initialized. */ +- +- cert_db = e_cert_db_peek(); +- slot = PK11_GetInternalKeySlot(); +- e_cert_db_login_to_slot(cert_db, slot); ++ e_cert_db_peek (); + + cfm_data = g_new0 (CertificateManagerData, 1); + +diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c +index 2e23df2..48458fa 100644 +--- a/smime/lib/e-cert-db.c ++++ b/smime/lib/e-cert-db.c +@@ -936,7 +936,18 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) + nickname, + &trust); + +- if (srv != SECSuccess && PORT_GetError() != SEC_ERROR_TOKEN_NOT_LOGGED_IN) { ++ /* ++ If this fails with SEC_ERROR_TOKEN_NOT_LOGGED_IN, it seems ++ that the import *has* worked, but the setting of trust bits ++ failed -- so only set the trust. This *has* to be an NSS bug? ++ */ ++ if (srv != SECSuccess && ++ PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN && ++ e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot())) ++ srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), ++ tmpCert, &trust); ++ ++ if (srv != SECSuccess) { + set_nss_error (error); + return FALSE; + } +@@ -971,6 +982,27 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) + return TRUE; + } + } ++gboolean e_cert_db_change_cert_trust(CERTCertificate *cert, CERTCertTrust *trust) ++{ ++ SECStatus srv; ++ ++ srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), ++ cert, trust); ++ if (srv != SECSuccess && ++ PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN && ++ e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot())) ++ srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), ++ cert, trust); ++ ++ if (srv != SECSuccess) { ++ glong err = PORT_GetError (); ++ g_warning ("CERT_ChangeCertTrust() failed: %s\n", ++ nss_error_to_string(err)); ++ return FALSE; ++ } ++ return TRUE; ++} ++ + + /* deleting certificates */ + gboolean +@@ -998,8 +1030,7 @@ e_cert_db_delete_cert (ECertDB *certdb, + CERTCertTrust trust; + + e_cert_trust_init_with_values (&trust, 0, 0, 0); +- CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), +- cert, &trust); ++ e_cert_db_change_cert_trust (cert, &trust); + } + + return TRUE; +diff --git a/smime/lib/e-cert-db.h b/smime/lib/e-cert-db.h +index 7d5f185..6e1bc5a 100644 +--- a/smime/lib/e-cert-db.h ++++ b/smime/lib/e-cert-db.h +@@ -142,4 +142,7 @@ gboolean e_cert_db_export_pkcs12_file (ECertDB *cert_db, + gboolean e_cert_db_login_to_slot (ECertDB *cert_db, + PK11SlotInfo *slot); + ++gboolean e_cert_db_change_cert_trust (CERTCertificate *cert, ++ CERTCertTrust *trust); ++ + #endif /* _E_CERT_DB_H_ */ +-- +cgit v0.8.3.1 diff --git a/evolution.spec b/evolution.spec index 90dc467..f462b0b 100644 --- a/evolution.spec +++ b/evolution.spec @@ -55,6 +55,9 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch +# RH bug #626066 +Patch14: evolution-2.31.92-gn626066.patch + ## Dependencies ### Requires(pre): GConf2 @@ -207,6 +210,7 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents +%patch14 -p1 -b .gn626066 mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -615,8 +619,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Mon Sep 13 2010 Milan Crha - 2.31.92.fc14 +* Mon Sep 13 2010 Milan Crha - 2.31.92-1.fc14 - Update to 2.31.92 +- Add patch for Gnome bug #626066 (login to NSS on demand) * Mon Aug 30 2010 Milan Crha - 2.31.91-1.fc14 - Update to 2.31.91 From f3065f8b9600ebf2971947eb748f5987eed33a8a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Sep 2010 09:58:56 +0200 Subject: [PATCH 11/19] Add patch for RH bug #629753/Gnome bug #630700 (crash on message send) --- evolution-2.31.92-gn630700.patch | 16 ++++++++++++++++ evolution.spec | 11 +++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 evolution-2.31.92-gn630700.patch diff --git a/evolution-2.31.92-gn630700.patch b/evolution-2.31.92-gn630700.patch new file mode 100644 index 0000000..d479ea1 --- /dev/null +++ b/evolution-2.31.92-gn630700.patch @@ -0,0 +1,16 @@ +diff --git a/mail/mail-ops.c b/mail/mail-ops.c +index 1303dae..6b9ae79 100644 +--- a/mail/mail-ops.c ++++ b/mail/mail-ops.c +@@ -603,8 +603,9 @@ mail_send_message (struct _send_queue_msg *m, + g_string_append_printf ( + err, _("Failed to append to %s: %s\n" + "Appending to local 'Sent' folder instead."), +- sent_folder_uri, local_error->message); +- g_clear_error (&local_error); ++ sent_folder_uri, local_error ? local_error->message : _("Unknown error")); ++ if (local_error) ++ g_clear_error (&local_error); + } + } + diff --git a/evolution.spec b/evolution.spec index f462b0b..9c43e12 100644 --- a/evolution.spec +++ b/evolution.spec @@ -33,7 +33,7 @@ Name: evolution Version: 2.31.92 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -55,9 +55,12 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch -# RH bug #626066 +# GN bug #626066 Patch14: evolution-2.31.92-gn626066.patch +# GN bug #630700 +Patch15: evolution-2.31.92-gn630700.patch + ## Dependencies ### Requires(pre): GConf2 @@ -211,6 +214,7 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents %patch14 -p1 -b .gn626066 +%patch15 -p1 -b .gn630700 mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -619,6 +623,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Sep 27 2010 Milan Crha - 2.31.92-2.fc14 +- Add patch for Gnome bug #630700 (crash on message send) + * Mon Sep 13 2010 Milan Crha - 2.31.92-1.fc14 - Update to 2.31.92 - Add patch for Gnome bug #626066 (login to NSS on demand) From 9d607200b61ae09b30fdddfe148fcb317f6c2b11 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Sep 2010 17:32:59 +0200 Subject: [PATCH 12/19] Update to 2.32.0 --- .gitignore | 1 + evolution-2.31.92-gn626066.patch | 137 ------------------------------- evolution.spec | 14 ++-- sources | 2 +- 4 files changed, 9 insertions(+), 145 deletions(-) delete mode 100644 evolution-2.31.92-gn626066.patch diff --git a/.gitignore b/.gitignore index cf50db8..de2684c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ evolution-2.31.6.tar.bz2 evolution-2.31.90.tar.bz2 /evolution-2.31.91.tar.bz2 /evolution-2.31.92.tar.bz2 +/evolution-2.32.0.tar.bz2 diff --git a/evolution-2.31.92-gn626066.patch b/evolution-2.31.92-gn626066.patch deleted file mode 100644 index 5d25293..0000000 --- a/evolution-2.31.92-gn626066.patch +++ /dev/null @@ -1,137 +0,0 @@ -From c33a84d443f6a340fc247531b6bc8c9997b52aba Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Mon, 13 Sep 2010 20:00:25 +0000 -Subject: Bug 626066 - log in to NSS database on demand for changing trust - ---- -diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c -index 9c87c66..66ce69b 100644 ---- a/smime/gui/cert-trust-dialog.c -+++ b/smime/gui/cert-trust-dialog.c -@@ -73,7 +73,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data) - e_cert_trust_add_peer_trust (&trust, FALSE, - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (data->trust_button)), - FALSE); -- CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust); -+ e_cert_db_change_cert_trust (icert, &trust); - break; - case GTK_RESPONSE_ACCEPT: { - /* just *what on earth* was chris thinking here!?!?! copied from certificate-manager.c */ -@@ -101,7 +101,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data) - trust_email, - trust_objsign); - -- CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), icert, &trust); -+ e_cert_db_change_cert_trust (icert, &trust); - } - - gtk_widget_destroy (dialog); -diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c -index d0823b8..5a5b204 100644 ---- a/smime/gui/certificate-manager.c -+++ b/smime/gui/certificate-manager.c -@@ -679,7 +679,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm) - trust_email, - trust_objsign); - -- CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust); -+ e_cert_db_change_cert_trust (icert, &trust); - } - - gtk_widget_destroy (dialog); -@@ -1097,18 +1097,13 @@ certificate_manager_config_new (EPreferencesWindow *window) - GtkWidget *parent; - GtkWidget *widget; - CertificateManagerData *cfm_data; -- PK11SlotInfo* slot; -- ECertDB *cert_db; - - shell = e_preferences_window_get_shell (window); - - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - /* We need to peek the db here to make sure it (and NSS) are fully initialized. */ -- -- cert_db = e_cert_db_peek(); -- slot = PK11_GetInternalKeySlot(); -- e_cert_db_login_to_slot(cert_db, slot); -+ e_cert_db_peek (); - - cfm_data = g_new0 (CertificateManagerData, 1); - -diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c -index 2e23df2..48458fa 100644 ---- a/smime/lib/e-cert-db.c -+++ b/smime/lib/e-cert-db.c -@@ -936,7 +936,18 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) - nickname, - &trust); - -- if (srv != SECSuccess && PORT_GetError() != SEC_ERROR_TOKEN_NOT_LOGGED_IN) { -+ /* -+ If this fails with SEC_ERROR_TOKEN_NOT_LOGGED_IN, it seems -+ that the import *has* worked, but the setting of trust bits -+ failed -- so only set the trust. This *has* to be an NSS bug? -+ */ -+ if (srv != SECSuccess && -+ PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN && -+ e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot())) -+ srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), -+ tmpCert, &trust); -+ -+ if (srv != SECSuccess) { - set_nss_error (error); - return FALSE; - } -@@ -971,6 +982,27 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) - return TRUE; - } - } -+gboolean e_cert_db_change_cert_trust(CERTCertificate *cert, CERTCertTrust *trust) -+{ -+ SECStatus srv; -+ -+ srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), -+ cert, trust); -+ if (srv != SECSuccess && -+ PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN && -+ e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot())) -+ srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), -+ cert, trust); -+ -+ if (srv != SECSuccess) { -+ glong err = PORT_GetError (); -+ g_warning ("CERT_ChangeCertTrust() failed: %s\n", -+ nss_error_to_string(err)); -+ return FALSE; -+ } -+ return TRUE; -+} -+ - - /* deleting certificates */ - gboolean -@@ -998,8 +1030,7 @@ e_cert_db_delete_cert (ECertDB *certdb, - CERTCertTrust trust; - - e_cert_trust_init_with_values (&trust, 0, 0, 0); -- CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), -- cert, &trust); -+ e_cert_db_change_cert_trust (cert, &trust); - } - - return TRUE; -diff --git a/smime/lib/e-cert-db.h b/smime/lib/e-cert-db.h -index 7d5f185..6e1bc5a 100644 ---- a/smime/lib/e-cert-db.h -+++ b/smime/lib/e-cert-db.h -@@ -142,4 +142,7 @@ gboolean e_cert_db_export_pkcs12_file (ECertDB *cert_db, - gboolean e_cert_db_login_to_slot (ECertDB *cert_db, - PK11SlotInfo *slot); - -+gboolean e_cert_db_change_cert_trust (CERTCertificate *cert, -+ CERTCertTrust *trust); -+ - #endif /* _E_CERT_DB_H_ */ --- -cgit v0.8.3.1 diff --git a/evolution.spec b/evolution.spec index 9c43e12..093ef4c 100644 --- a/evolution.spec +++ b/evolution.spec @@ -32,14 +32,14 @@ ### Abstract ### Name: evolution -Version: 2.31.92 -Release: 2%{?dist} +Version: 2.32.0 +Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL URL: http://projects.gnome.org/evolution/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -Source: http://download.gnome.org/sources/%{name}/2.31/%{name}-%{version}.tar.bz2 +Source: http://download.gnome.org/sources/%{name}/2.32/%{name}-%{version}.tar.bz2 Obsoletes: anjal <= %{last_anjal_version} Obsoletes: libgal2 <= %{last_libgal2_version} @@ -55,9 +55,6 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch -# GN bug #626066 -Patch14: evolution-2.31.92-gn626066.patch - # GN bug #630700 Patch15: evolution-2.31.92-gn630700.patch @@ -213,7 +210,6 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents -%patch14 -p1 -b .gn626066 %patch15 -p1 -b .gn630700 mkdir -p krb5-fakeprefix/include @@ -623,6 +619,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Sep 27 2010 Milan Crha - 2.32.0-1.fc14 +- Update to 2.32.0 +- Remove patch for Gnome bug #626066 (fixed upstream) + * Mon Sep 27 2010 Milan Crha - 2.31.92-2.fc14 - Add patch for Gnome bug #630700 (crash on message send) diff --git a/sources b/sources index 6e02d17..aee7929 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -90d84ddb24daecd27bc5b1553064bc46 evolution-2.31.92.tar.bz2 +c74fdd472efed42d9876aa905961b53d evolution-2.32.0.tar.bz2 From 270ad19e16863d830212e02da7518477aa138e19 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 29 Sep 2010 09:53:20 +0200 Subject: [PATCH 13/19] Add patch for Gnome bug #629972 (restore from backup doesn't work) --- evolution-2.32.0-gn629972.patch | 468 ++++++++++++++++++++++++++++++++ evolution.spec | 9 +- 2 files changed, 476 insertions(+), 1 deletion(-) create mode 100644 evolution-2.32.0-gn629972.patch diff --git a/evolution-2.32.0-gn629972.patch b/evolution-2.32.0-gn629972.patch new file mode 100644 index 0000000..f8a5929 --- /dev/null +++ b/evolution-2.32.0-gn629972.patch @@ -0,0 +1,468 @@ +diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c +index 42cff1e..e90c73d 100644 +--- a/plugins/backup-restore/backup.c ++++ b/plugins/backup-restore/backup.c +@@ -27,9 +27,13 @@ + #include + #include + ++#include + #include ++#include + #include + ++#include ++ + #ifdef G_OS_WIN32 + #ifdef DATADIR + #undef DATADIR +@@ -50,10 +54,9 @@ + #define EVOUSERDATADIR_MAGIC "#EVO_USERDATADIR#" + + #define EVOLUTION "evolution" +-#define EVOLUTION_DIR "$HOME/.evolution/" +-#define EVOLUTION_DIR_BACKUP "$HOME/.evolution-old/" ++#define EVOLUTION_DIR "$DATADIR/" ++#define EVOLUTION_DIR_FILE EVOLUTION ".dir" + #define GCONF_DUMP_FILE "backup-restore-gconf.xml" +-#define GCONF_DUMP_PATH EVOLUTION_DIR GCONF_DUMP_FILE + #define GCONF_DIR "/apps/evolution" + #define ARCHIVE_NAME "evolution-backup.tar.gz" + +@@ -93,7 +96,7 @@ static GOptionEntry options[] = { + #define print_and_run(x) G_STMT_START { g_message ("%s", x); system (x); } G_STMT_END + #define CANCEL(x) if (x) return; + +-static gboolean check (const gchar *filename); ++static gboolean check (const gchar *filename, gboolean *is_new_format); + + static GString * + replace_string (const gchar *text, const gchar *find, const gchar *replace) +@@ -111,7 +114,7 @@ replace_string (const gchar *text, const gchar *find, const gchar *replace) + + p = text; + while (next = strstr (p, find), next) { +- if (p + 1 < next) ++ if (p < next) + g_string_append_len (str, p, next - p); + + if (replace && *replace) +@@ -125,6 +128,64 @@ replace_string (const gchar *text, const gchar *find, const gchar *replace) + return str; + } + ++static const gchar * ++strip_home_dir (const gchar *dir) ++{ ++ const gchar *home_dir, *res; ++ ++ g_return_val_if_fail (dir != NULL, NULL); ++ ++ home_dir = g_get_home_dir (); ++ g_return_val_if_fail (home_dir != NULL, dir); ++ g_return_val_if_fail (*home_dir != '\0', dir); ++ ++ res = dir; ++ if (g_str_has_prefix (res, home_dir)) ++ res += strlen (home_dir); ++ ++ if (*res == G_DIR_SEPARATOR) ++ res++; ++ ++ return res; ++} ++ ++static GString * ++replace_variables (const gchar *str) ++{ ++ GString *res = NULL, *use; ++ const gchar *strip_datadir, *strip_configdir; ++ ++ g_return_val_if_fail (str != NULL, NULL); ++ ++ strip_datadir = strip_home_dir (e_get_user_data_dir ()); ++ strip_configdir = strip_home_dir (e_get_user_config_dir ()); ++ ++ #define repl(_find, _replace) \ ++ use = replace_string (res ? res->str : str, _find, _replace); \ ++ g_return_val_if_fail (use != NULL, NULL); \ ++ if (res) \ ++ g_string_free (res, TRUE); \ ++ res = use; ++ ++ repl ("$HOME", g_get_home_dir ()); ++ repl ("$TMP", g_get_tmp_dir ()); ++ repl ("$DATADIR", e_get_user_data_dir ()); ++ repl ("$CONFIGDIR", e_get_user_config_dir ()); ++ repl ("$STRIPDATADIR", strip_datadir); ++ repl ("$STRIPCONFIGDIR", strip_configdir); ++ ++ #undef repl ++ ++ g_return_val_if_fail (res != NULL, NULL); ++ ++ /* remove trailing dir separator */ ++ while (res->len > 0 && res->str[res->len - 1] == G_DIR_SEPARATOR) { ++ g_string_truncate (res, res->len - 1); ++ } ++ ++ return res; ++} ++ + static void + replace_in_file (const gchar *filename, const gchar *find, const gchar *replace) + { +@@ -137,11 +198,11 @@ replace_in_file (const gchar *filename, const gchar *find, const gchar *replace) + g_return_if_fail (*find); + g_return_if_fail (replace != NULL); + +- if (strstr (filename, "$HOME")) { +- filenamestr = replace_string (filename, "$HOME", g_get_home_dir ()); ++ if (strstr (filename, "$")) { ++ filenamestr = replace_variables (filename); + + if (!filenamestr) { +- g_warning ("%s: Replace string on $HOME failed!", G_STRFUNC); ++ g_warning ("%s: Replace variables in '%s' failed!", G_STRFUNC, filename); + return; + } + +@@ -178,9 +239,9 @@ run_cmd (const gchar *cmd) + if (!cmd) + return; + +- if (strstr (cmd, "$HOME") != NULL) { ++ if (strstr (cmd, "$") != NULL) { + /* read the doc for g_get_home_dir to know why replacing it here */ +- GString *str = replace_string (cmd, "$HOME", g_get_home_dir ()); ++ GString *str = replace_variables (cmd); + + if (str) { + print_and_run (str->str); +@@ -191,6 +252,32 @@ run_cmd (const gchar *cmd) + } + + static void ++write_dir_file (void) ++{ ++ GString *content, *filename; ++ GError *error = NULL; ++ ++ filename = replace_variables ("$HOME/" EVOLUTION_DIR_FILE); ++ g_return_if_fail (filename != NULL); ++ ++ content = replace_variables ( ++ "[dirs]\n" ++ "data=$STRIPDATADIR\n" ++ "config=$STRIPCONFIGDIR\n"); ++ g_return_if_fail (content != NULL); ++ ++ g_file_set_contents (filename->str, content->str, content->len, &error); ++ ++ if (error) { ++ g_warning ("Failed to write file '%s': %s\n", filename->str, error->message); ++ g_error_free (error); ++ } ++ ++ g_string_free (filename, TRUE); ++ g_string_free (content, TRUE); ++} ++ ++static void + backup (const gchar *filename) + { + gchar *command; +@@ -204,13 +291,15 @@ backup (const gchar *filename) + /* FIXME Will the versioned setting always work? */ + run_cmd (EVOLUTION " --quit"); + +- run_cmd ("rm $HOME/.evolution/.running"); ++ run_cmd ("rm $DATADIR/.running"); + + CANCEL (complete); + txt = _("Backing Evolution accounts and settings"); +- run_cmd ("gconftool-2 --dump " GCONF_DIR " > " GCONF_DUMP_PATH); ++ run_cmd ("gconftool-2 --dump " GCONF_DIR " > " EVOLUTION_DIR GCONF_DUMP_FILE); + +- replace_in_file (GCONF_DUMP_PATH, e_get_user_data_dir (), EVOUSERDATADIR_MAGIC); ++ replace_in_file (EVOLUTION_DIR GCONF_DUMP_FILE, e_get_user_data_dir (), EVOUSERDATADIR_MAGIC); ++ ++ write_dir_file (); + + CANCEL (complete); + txt = _("Backing Evolution data (Mails, Contacts, Calendar, Tasks, Memos)"); +@@ -219,11 +308,13 @@ backup (const gchar *filename) + /* FIXME compression type?" */ + /* FIXME date/time stamp?" */ + /* FIXME backup location?" */ +- command = g_strdup_printf ("cd $HOME && tar chf - .evolution .camel_certs | gzip > %s", quotedfname); ++ command = g_strdup_printf ("cd $HOME && tar chf - $STRIPDATADIR $STRIPCONFIGDIR .camel_certs " EVOLUTION_DIR_FILE " | gzip > %s", quotedfname); + run_cmd (command); + g_free (command); + g_free (quotedfname); + ++ run_cmd ("rm $HOME/" EVOLUTION_DIR_FILE); ++ + txt = _("Backup complete"); + + if (restart_arg) { +@@ -238,24 +329,68 @@ backup (const gchar *filename) + } + + static void ++extract_backup_dirs (const gchar *filename, gchar **data_dir, gchar **config_dir) ++{ ++ GKeyFile *key_file; ++ GError *error = NULL; ++ ++ g_return_if_fail (filename != NULL); ++ g_return_if_fail (data_dir != NULL); ++ g_return_if_fail (config_dir != NULL); ++ ++ key_file = g_key_file_new (); ++ g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, &error); ++ ++ if (error) { ++ g_warning ("Failed to read '%s': %s", filename, error->message); ++ g_error_free (error); ++ } else { ++ gchar *tmp; ++ ++ tmp = g_key_file_get_value (key_file, "dirs", "data", NULL); ++ if (tmp) ++ *data_dir = g_shell_quote (tmp); ++ g_free (tmp); ++ ++ tmp = g_key_file_get_value (key_file, "dirs", "config", NULL); ++ if (tmp) ++ *config_dir = g_shell_quote (tmp); ++ g_free (tmp); ++ } ++ ++ g_key_file_free (key_file); ++} ++ ++static gint ++get_dir_level (const gchar *dir) ++{ ++ gint res = 0, i; ++ ++ g_return_val_if_fail (dir != NULL, -1); ++ ++ for (i = 0; dir[i]; i++) { ++ if (dir[i] == '/' || dir[i] == '\\') ++ res++; ++ } ++ ++ if (i > 0) ++ res++; ++ ++ return res; ++} ++ ++static void + restore (const gchar *filename) + { + gchar *command; + gchar *quotedfname; ++ gboolean is_new_format = FALSE; + + g_return_if_fail (filename && *filename); + +- if (!check (filename)) { ++ if (!check (filename, &is_new_format)) { + g_message ("Cannot restore from an incorrect archive '%s'.", filename); +- +- if (restart_arg) { +- CANCEL (complete); +- txt = _("Restarting Evolution"); +- complete=TRUE; +- run_cmd (EVOLUTION); +- } +- +- return; ++ goto end; + } + + quotedfname = g_shell_quote(filename); +@@ -267,51 +402,117 @@ restore (const gchar *filename) + + CANCEL (complete); + txt = _("Back up current Evolution data"); +- run_cmd ("mv " EVOLUTION_DIR " " EVOLUTION_DIR_BACKUP); +- run_cmd ("mv $HOME/.camel_certs ~/.camel_certs_old"); ++ run_cmd ("mv $DATADIR $DATADIR_old"); ++ run_cmd ("mv $CONFIGDIR $CONFIGDIR_old"); ++ run_cmd ("mv $HOME/.camel_certs $HOME/.camel_certs_old"); + + CANCEL (complete); + txt = _("Extracting files from backup"); +- command = g_strdup_printf ("cd $HOME && gzip -cd %s| tar xf -", quotedfname); +- run_cmd (command); +- g_free (command); ++ ++ if (is_new_format) { ++ GString *dir_fn; ++ gchar *data_dir = NULL, *config_dir = NULL; ++ ++ command = g_strdup_printf ("cd $TMP && tar xzf %s " EVOLUTION_DIR_FILE, quotedfname); ++ run_cmd (command); ++ g_free (command); ++ ++ dir_fn = replace_variables ("$TMP" G_DIR_SEPARATOR_S EVOLUTION_DIR_FILE); ++ if (!dir_fn) { ++ g_warning ("Failed to create evolution's dir filename"); ++ goto end; ++ } ++ ++ /* data_dir and config_dir are quoted inside extract_backup_dirs */ ++ extract_backup_dirs (dir_fn->str, &data_dir, &config_dir); ++ ++ g_unlink (dir_fn->str); ++ g_string_free (dir_fn, TRUE); ++ ++ if (!data_dir || !config_dir) { ++ g_warning ("Failed to get old data_dir (%p)/config_dir (%p)", data_dir, config_dir); ++ g_free (data_dir); ++ g_free (config_dir); ++ goto end; ++ } ++ ++ g_mkdir_with_parents (e_get_user_data_dir (), 0700); ++ g_mkdir_with_parents (e_get_user_config_dir (), 0700); ++ ++ command = g_strdup_printf ("cd $DATADIR && tar xzf %s %s --strip-components=%d", quotedfname, data_dir, get_dir_level (data_dir)); ++ run_cmd (command); ++ g_free (command); ++ ++ command = g_strdup_printf ("cd $CONFIGDIR && tar xzf %s %s --strip-components=%d", quotedfname, config_dir, get_dir_level (config_dir)); ++ run_cmd (command); ++ g_free (command); ++ ++ command = g_strdup_printf ("cd $HOME && tar xzf %s .camel_certs", quotedfname); ++ run_cmd (command); ++ g_free (command); ++ ++ g_free (data_dir); ++ g_free (config_dir); ++ } else { ++ run_cmd ("mv $HOME/.evolution $HOME/.evolution_old"); ++ ++ command = g_strdup_printf ("cd $HOME && gzip -cd %s | tar xf -", quotedfname); ++ run_cmd (command); ++ g_free (command); ++ } ++ + g_free (quotedfname); + + CANCEL (complete); + txt = _("Loading Evolution settings"); + +- replace_in_file (GCONF_DUMP_PATH, EVOUSERDATADIR_MAGIC, e_get_user_data_dir ()); +- +- run_cmd ("gconftool-2 --load " GCONF_DUMP_PATH); ++ if (is_new_format) { ++ /* new format has it in DATADIR... */ ++ replace_in_file (EVOLUTION_DIR GCONF_DUMP_FILE, EVOUSERDATADIR_MAGIC, e_get_user_data_dir ()); ++ run_cmd ("gconftool-2 --load " EVOLUTION_DIR GCONF_DUMP_FILE); ++ run_cmd ("rm " EVOLUTION_DIR GCONF_DUMP_FILE); ++ } else { ++ /* ... old format in ~/.evolution */ ++ replace_in_file ("$HOME/.evolution/" GCONF_DUMP_FILE, EVOUSERDATADIR_MAGIC, e_get_user_data_dir ()); ++ run_cmd ("gconftool-2 --load " "$HOME/.evolution/" GCONF_DUMP_FILE); ++ run_cmd ("rm " "$HOME/.evolution/" GCONF_DUMP_FILE); ++ } + + CANCEL (complete); + txt = _("Removing temporary backup files"); +- run_cmd ("rm -rf " GCONF_DUMP_PATH); +- run_cmd ("rm -rf " EVOLUTION_DIR_BACKUP); ++ run_cmd ("rm -rf $DATADIR_old"); ++ run_cmd ("rm -rf $CONFIGDIR_old"); + run_cmd ("rm -rf $HOME/.camel_certs_old"); +- run_cmd ("rm $HOME/.evolution/.running"); ++ run_cmd ("rm $DATADIR/.running"); ++ ++ if (!is_new_format) ++ run_cmd ("rm -rf $HOME/.evolution_old"); + + CANCEL (complete); + txt = _("Ensuring local sources"); + ++ end: + if (restart_arg) { + CANCEL (complete); + txt = _("Restarting Evolution"); + complete=TRUE; + run_cmd (EVOLUTION); + } +- + } + + static gboolean +-check (const gchar *filename) ++check (const gchar *filename, gboolean *is_new_format) + { + gchar *command; + gchar *quotedfname; ++ gboolean is_new = TRUE; + + g_return_val_if_fail (filename && *filename, FALSE); + quotedfname = g_shell_quote(filename); + ++ if (is_new_format) ++ *is_new_format = FALSE; ++ + command = g_strdup_printf ("tar ztf %s 1>/dev/null", quotedfname); + result = system (command); + g_free (command); +@@ -322,16 +523,30 @@ check (const gchar *filename) + return FALSE; + } + +- command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/$\"", quotedfname); ++ command = g_strdup_printf ("tar ztf %s | grep -e \"%s$\"", quotedfname, EVOLUTION_DIR_FILE); + result = system (command); + g_free (command); + ++ if (result) { ++ command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/$\"", quotedfname); ++ result = system (command); ++ g_free (command); ++ is_new = FALSE; ++ } ++ + g_message ("Second result %d", result); + if (result) { + g_free (quotedfname); + return FALSE; + } + ++ if (is_new) { ++ if (is_new_format) ++ *is_new_format = TRUE; ++ g_free (quotedfname); ++ return TRUE; ++ } ++ + command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/%s$\"", quotedfname, GCONF_DUMP_FILE); + result = system (command); + g_free (command); +@@ -363,7 +578,7 @@ thread_start (gpointer data) + else if (restore_op) + restore (res_file); + else if (check_op) +- check (chk_file); ++ check (chk_file, NULL); + + complete = TRUE; + +@@ -582,7 +797,7 @@ main (gint argc, gchar **argv) + gtk_widget_show_all (progress_dialog); + } else if (check_op) { + /* For sanity we don't need gui */ +- check (chk_file); ++ check (chk_file, NULL); + exit (result == 0 ? 0 : 1); + } + diff --git a/evolution.spec b/evolution.spec index 093ef4c..920030f 100644 --- a/evolution.spec +++ b/evolution.spec @@ -33,7 +33,7 @@ Name: evolution Version: 2.32.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -58,6 +58,9 @@ Patch13: evolution-2.30.1-help-contents.patch # GN bug #630700 Patch15: evolution-2.31.92-gn630700.patch +# GN bug #629972 +Patch16: evolution-2.32.0-gn629972.patch + ## Dependencies ### Requires(pre): GConf2 @@ -211,6 +214,7 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents %patch15 -p1 -b .gn630700 +%patch16 -p1 -b .gn629972 mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -619,6 +623,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Sep 29 2010 Milan Crha - 2.32.0-2.fc14 +- Add patch for Gnome bug #629972 (restore from backup doesn't work) + * Mon Sep 27 2010 Milan Crha - 2.32.0-1.fc14 - Update to 2.32.0 - Remove patch for Gnome bug #626066 (fixed upstream) From f7453fdd8e269cd6b70066734c9c3b2ae81d3d63 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 29 Sep 2010 22:13:56 -0700 Subject: [PATCH 14/19] - Rebuilt for gcc bug 634757 --- evolution.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evolution.spec b/evolution.spec index 920030f..ce40f19 100644 --- a/evolution.spec +++ b/evolution.spec @@ -33,7 +33,7 @@ Name: evolution Version: 2.32.0 -Release: 2%{?dist} +Release: 2%{?dist}.1 Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -623,6 +623,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 29 2010 jkeating - 2.32.0-2.1 +- Rebuilt for gcc bug 634757 + * Mon Sep 29 2010 Milan Crha - 2.32.0-2.fc14 - Add patch for Gnome bug #629972 (restore from backup doesn't work) From 0bc7cd91429f5958b86b703b14855178ae213da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 30 Sep 2010 16:51:48 +0200 Subject: [PATCH 15/19] don't exclude NM support on s390(x) --- evolution.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/evolution.spec b/evolution.spec index ce40f19..414f363 100644 --- a/evolution.spec +++ b/evolution.spec @@ -21,11 +21,7 @@ %define libnotify_support 1 %define libpst_support 1 %define krb5_support 1 -%ifnarch s390 s390x %define nm_support 1 -%else -%define nm_support 0 -%endif %define evo_plugin_dir %{_libdir}/evolution/%{evo_base_version}/plugins From e44562c45d8f4ce851063d3a828a66115ed3a8e6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 15 Nov 2010 17:07:08 +0100 Subject: [PATCH 16/19] Update to 2.32.1 --- .gitignore | 1 + evolution-2.31.92-gn630700.patch | 16 -- evolution-2.32.0-gn629972.patch | 468 ------------------------------- evolution.spec | 17 +- sources | 2 +- 5 files changed, 9 insertions(+), 495 deletions(-) delete mode 100644 evolution-2.31.92-gn630700.patch delete mode 100644 evolution-2.32.0-gn629972.patch diff --git a/.gitignore b/.gitignore index de2684c..94d445c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ evolution-2.31.90.tar.bz2 /evolution-2.31.91.tar.bz2 /evolution-2.31.92.tar.bz2 /evolution-2.32.0.tar.bz2 +/evolution-2.32.1.tar.bz2 diff --git a/evolution-2.31.92-gn630700.patch b/evolution-2.31.92-gn630700.patch deleted file mode 100644 index d479ea1..0000000 --- a/evolution-2.31.92-gn630700.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/mail/mail-ops.c b/mail/mail-ops.c -index 1303dae..6b9ae79 100644 ---- a/mail/mail-ops.c -+++ b/mail/mail-ops.c -@@ -603,8 +603,9 @@ mail_send_message (struct _send_queue_msg *m, - g_string_append_printf ( - err, _("Failed to append to %s: %s\n" - "Appending to local 'Sent' folder instead."), -- sent_folder_uri, local_error->message); -- g_clear_error (&local_error); -+ sent_folder_uri, local_error ? local_error->message : _("Unknown error")); -+ if (local_error) -+ g_clear_error (&local_error); - } - } - diff --git a/evolution-2.32.0-gn629972.patch b/evolution-2.32.0-gn629972.patch deleted file mode 100644 index f8a5929..0000000 --- a/evolution-2.32.0-gn629972.patch +++ /dev/null @@ -1,468 +0,0 @@ -diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c -index 42cff1e..e90c73d 100644 ---- a/plugins/backup-restore/backup.c -+++ b/plugins/backup-restore/backup.c -@@ -27,9 +27,13 @@ - #include - #include - -+#include - #include -+#include - #include - -+#include -+ - #ifdef G_OS_WIN32 - #ifdef DATADIR - #undef DATADIR -@@ -50,10 +54,9 @@ - #define EVOUSERDATADIR_MAGIC "#EVO_USERDATADIR#" - - #define EVOLUTION "evolution" --#define EVOLUTION_DIR "$HOME/.evolution/" --#define EVOLUTION_DIR_BACKUP "$HOME/.evolution-old/" -+#define EVOLUTION_DIR "$DATADIR/" -+#define EVOLUTION_DIR_FILE EVOLUTION ".dir" - #define GCONF_DUMP_FILE "backup-restore-gconf.xml" --#define GCONF_DUMP_PATH EVOLUTION_DIR GCONF_DUMP_FILE - #define GCONF_DIR "/apps/evolution" - #define ARCHIVE_NAME "evolution-backup.tar.gz" - -@@ -93,7 +96,7 @@ static GOptionEntry options[] = { - #define print_and_run(x) G_STMT_START { g_message ("%s", x); system (x); } G_STMT_END - #define CANCEL(x) if (x) return; - --static gboolean check (const gchar *filename); -+static gboolean check (const gchar *filename, gboolean *is_new_format); - - static GString * - replace_string (const gchar *text, const gchar *find, const gchar *replace) -@@ -111,7 +114,7 @@ replace_string (const gchar *text, const gchar *find, const gchar *replace) - - p = text; - while (next = strstr (p, find), next) { -- if (p + 1 < next) -+ if (p < next) - g_string_append_len (str, p, next - p); - - if (replace && *replace) -@@ -125,6 +128,64 @@ replace_string (const gchar *text, const gchar *find, const gchar *replace) - return str; - } - -+static const gchar * -+strip_home_dir (const gchar *dir) -+{ -+ const gchar *home_dir, *res; -+ -+ g_return_val_if_fail (dir != NULL, NULL); -+ -+ home_dir = g_get_home_dir (); -+ g_return_val_if_fail (home_dir != NULL, dir); -+ g_return_val_if_fail (*home_dir != '\0', dir); -+ -+ res = dir; -+ if (g_str_has_prefix (res, home_dir)) -+ res += strlen (home_dir); -+ -+ if (*res == G_DIR_SEPARATOR) -+ res++; -+ -+ return res; -+} -+ -+static GString * -+replace_variables (const gchar *str) -+{ -+ GString *res = NULL, *use; -+ const gchar *strip_datadir, *strip_configdir; -+ -+ g_return_val_if_fail (str != NULL, NULL); -+ -+ strip_datadir = strip_home_dir (e_get_user_data_dir ()); -+ strip_configdir = strip_home_dir (e_get_user_config_dir ()); -+ -+ #define repl(_find, _replace) \ -+ use = replace_string (res ? res->str : str, _find, _replace); \ -+ g_return_val_if_fail (use != NULL, NULL); \ -+ if (res) \ -+ g_string_free (res, TRUE); \ -+ res = use; -+ -+ repl ("$HOME", g_get_home_dir ()); -+ repl ("$TMP", g_get_tmp_dir ()); -+ repl ("$DATADIR", e_get_user_data_dir ()); -+ repl ("$CONFIGDIR", e_get_user_config_dir ()); -+ repl ("$STRIPDATADIR", strip_datadir); -+ repl ("$STRIPCONFIGDIR", strip_configdir); -+ -+ #undef repl -+ -+ g_return_val_if_fail (res != NULL, NULL); -+ -+ /* remove trailing dir separator */ -+ while (res->len > 0 && res->str[res->len - 1] == G_DIR_SEPARATOR) { -+ g_string_truncate (res, res->len - 1); -+ } -+ -+ return res; -+} -+ - static void - replace_in_file (const gchar *filename, const gchar *find, const gchar *replace) - { -@@ -137,11 +198,11 @@ replace_in_file (const gchar *filename, const gchar *find, const gchar *replace) - g_return_if_fail (*find); - g_return_if_fail (replace != NULL); - -- if (strstr (filename, "$HOME")) { -- filenamestr = replace_string (filename, "$HOME", g_get_home_dir ()); -+ if (strstr (filename, "$")) { -+ filenamestr = replace_variables (filename); - - if (!filenamestr) { -- g_warning ("%s: Replace string on $HOME failed!", G_STRFUNC); -+ g_warning ("%s: Replace variables in '%s' failed!", G_STRFUNC, filename); - return; - } - -@@ -178,9 +239,9 @@ run_cmd (const gchar *cmd) - if (!cmd) - return; - -- if (strstr (cmd, "$HOME") != NULL) { -+ if (strstr (cmd, "$") != NULL) { - /* read the doc for g_get_home_dir to know why replacing it here */ -- GString *str = replace_string (cmd, "$HOME", g_get_home_dir ()); -+ GString *str = replace_variables (cmd); - - if (str) { - print_and_run (str->str); -@@ -191,6 +252,32 @@ run_cmd (const gchar *cmd) - } - - static void -+write_dir_file (void) -+{ -+ GString *content, *filename; -+ GError *error = NULL; -+ -+ filename = replace_variables ("$HOME/" EVOLUTION_DIR_FILE); -+ g_return_if_fail (filename != NULL); -+ -+ content = replace_variables ( -+ "[dirs]\n" -+ "data=$STRIPDATADIR\n" -+ "config=$STRIPCONFIGDIR\n"); -+ g_return_if_fail (content != NULL); -+ -+ g_file_set_contents (filename->str, content->str, content->len, &error); -+ -+ if (error) { -+ g_warning ("Failed to write file '%s': %s\n", filename->str, error->message); -+ g_error_free (error); -+ } -+ -+ g_string_free (filename, TRUE); -+ g_string_free (content, TRUE); -+} -+ -+static void - backup (const gchar *filename) - { - gchar *command; -@@ -204,13 +291,15 @@ backup (const gchar *filename) - /* FIXME Will the versioned setting always work? */ - run_cmd (EVOLUTION " --quit"); - -- run_cmd ("rm $HOME/.evolution/.running"); -+ run_cmd ("rm $DATADIR/.running"); - - CANCEL (complete); - txt = _("Backing Evolution accounts and settings"); -- run_cmd ("gconftool-2 --dump " GCONF_DIR " > " GCONF_DUMP_PATH); -+ run_cmd ("gconftool-2 --dump " GCONF_DIR " > " EVOLUTION_DIR GCONF_DUMP_FILE); - -- replace_in_file (GCONF_DUMP_PATH, e_get_user_data_dir (), EVOUSERDATADIR_MAGIC); -+ replace_in_file (EVOLUTION_DIR GCONF_DUMP_FILE, e_get_user_data_dir (), EVOUSERDATADIR_MAGIC); -+ -+ write_dir_file (); - - CANCEL (complete); - txt = _("Backing Evolution data (Mails, Contacts, Calendar, Tasks, Memos)"); -@@ -219,11 +308,13 @@ backup (const gchar *filename) - /* FIXME compression type?" */ - /* FIXME date/time stamp?" */ - /* FIXME backup location?" */ -- command = g_strdup_printf ("cd $HOME && tar chf - .evolution .camel_certs | gzip > %s", quotedfname); -+ command = g_strdup_printf ("cd $HOME && tar chf - $STRIPDATADIR $STRIPCONFIGDIR .camel_certs " EVOLUTION_DIR_FILE " | gzip > %s", quotedfname); - run_cmd (command); - g_free (command); - g_free (quotedfname); - -+ run_cmd ("rm $HOME/" EVOLUTION_DIR_FILE); -+ - txt = _("Backup complete"); - - if (restart_arg) { -@@ -238,24 +329,68 @@ backup (const gchar *filename) - } - - static void -+extract_backup_dirs (const gchar *filename, gchar **data_dir, gchar **config_dir) -+{ -+ GKeyFile *key_file; -+ GError *error = NULL; -+ -+ g_return_if_fail (filename != NULL); -+ g_return_if_fail (data_dir != NULL); -+ g_return_if_fail (config_dir != NULL); -+ -+ key_file = g_key_file_new (); -+ g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, &error); -+ -+ if (error) { -+ g_warning ("Failed to read '%s': %s", filename, error->message); -+ g_error_free (error); -+ } else { -+ gchar *tmp; -+ -+ tmp = g_key_file_get_value (key_file, "dirs", "data", NULL); -+ if (tmp) -+ *data_dir = g_shell_quote (tmp); -+ g_free (tmp); -+ -+ tmp = g_key_file_get_value (key_file, "dirs", "config", NULL); -+ if (tmp) -+ *config_dir = g_shell_quote (tmp); -+ g_free (tmp); -+ } -+ -+ g_key_file_free (key_file); -+} -+ -+static gint -+get_dir_level (const gchar *dir) -+{ -+ gint res = 0, i; -+ -+ g_return_val_if_fail (dir != NULL, -1); -+ -+ for (i = 0; dir[i]; i++) { -+ if (dir[i] == '/' || dir[i] == '\\') -+ res++; -+ } -+ -+ if (i > 0) -+ res++; -+ -+ return res; -+} -+ -+static void - restore (const gchar *filename) - { - gchar *command; - gchar *quotedfname; -+ gboolean is_new_format = FALSE; - - g_return_if_fail (filename && *filename); - -- if (!check (filename)) { -+ if (!check (filename, &is_new_format)) { - g_message ("Cannot restore from an incorrect archive '%s'.", filename); -- -- if (restart_arg) { -- CANCEL (complete); -- txt = _("Restarting Evolution"); -- complete=TRUE; -- run_cmd (EVOLUTION); -- } -- -- return; -+ goto end; - } - - quotedfname = g_shell_quote(filename); -@@ -267,51 +402,117 @@ restore (const gchar *filename) - - CANCEL (complete); - txt = _("Back up current Evolution data"); -- run_cmd ("mv " EVOLUTION_DIR " " EVOLUTION_DIR_BACKUP); -- run_cmd ("mv $HOME/.camel_certs ~/.camel_certs_old"); -+ run_cmd ("mv $DATADIR $DATADIR_old"); -+ run_cmd ("mv $CONFIGDIR $CONFIGDIR_old"); -+ run_cmd ("mv $HOME/.camel_certs $HOME/.camel_certs_old"); - - CANCEL (complete); - txt = _("Extracting files from backup"); -- command = g_strdup_printf ("cd $HOME && gzip -cd %s| tar xf -", quotedfname); -- run_cmd (command); -- g_free (command); -+ -+ if (is_new_format) { -+ GString *dir_fn; -+ gchar *data_dir = NULL, *config_dir = NULL; -+ -+ command = g_strdup_printf ("cd $TMP && tar xzf %s " EVOLUTION_DIR_FILE, quotedfname); -+ run_cmd (command); -+ g_free (command); -+ -+ dir_fn = replace_variables ("$TMP" G_DIR_SEPARATOR_S EVOLUTION_DIR_FILE); -+ if (!dir_fn) { -+ g_warning ("Failed to create evolution's dir filename"); -+ goto end; -+ } -+ -+ /* data_dir and config_dir are quoted inside extract_backup_dirs */ -+ extract_backup_dirs (dir_fn->str, &data_dir, &config_dir); -+ -+ g_unlink (dir_fn->str); -+ g_string_free (dir_fn, TRUE); -+ -+ if (!data_dir || !config_dir) { -+ g_warning ("Failed to get old data_dir (%p)/config_dir (%p)", data_dir, config_dir); -+ g_free (data_dir); -+ g_free (config_dir); -+ goto end; -+ } -+ -+ g_mkdir_with_parents (e_get_user_data_dir (), 0700); -+ g_mkdir_with_parents (e_get_user_config_dir (), 0700); -+ -+ command = g_strdup_printf ("cd $DATADIR && tar xzf %s %s --strip-components=%d", quotedfname, data_dir, get_dir_level (data_dir)); -+ run_cmd (command); -+ g_free (command); -+ -+ command = g_strdup_printf ("cd $CONFIGDIR && tar xzf %s %s --strip-components=%d", quotedfname, config_dir, get_dir_level (config_dir)); -+ run_cmd (command); -+ g_free (command); -+ -+ command = g_strdup_printf ("cd $HOME && tar xzf %s .camel_certs", quotedfname); -+ run_cmd (command); -+ g_free (command); -+ -+ g_free (data_dir); -+ g_free (config_dir); -+ } else { -+ run_cmd ("mv $HOME/.evolution $HOME/.evolution_old"); -+ -+ command = g_strdup_printf ("cd $HOME && gzip -cd %s | tar xf -", quotedfname); -+ run_cmd (command); -+ g_free (command); -+ } -+ - g_free (quotedfname); - - CANCEL (complete); - txt = _("Loading Evolution settings"); - -- replace_in_file (GCONF_DUMP_PATH, EVOUSERDATADIR_MAGIC, e_get_user_data_dir ()); -- -- run_cmd ("gconftool-2 --load " GCONF_DUMP_PATH); -+ if (is_new_format) { -+ /* new format has it in DATADIR... */ -+ replace_in_file (EVOLUTION_DIR GCONF_DUMP_FILE, EVOUSERDATADIR_MAGIC, e_get_user_data_dir ()); -+ run_cmd ("gconftool-2 --load " EVOLUTION_DIR GCONF_DUMP_FILE); -+ run_cmd ("rm " EVOLUTION_DIR GCONF_DUMP_FILE); -+ } else { -+ /* ... old format in ~/.evolution */ -+ replace_in_file ("$HOME/.evolution/" GCONF_DUMP_FILE, EVOUSERDATADIR_MAGIC, e_get_user_data_dir ()); -+ run_cmd ("gconftool-2 --load " "$HOME/.evolution/" GCONF_DUMP_FILE); -+ run_cmd ("rm " "$HOME/.evolution/" GCONF_DUMP_FILE); -+ } - - CANCEL (complete); - txt = _("Removing temporary backup files"); -- run_cmd ("rm -rf " GCONF_DUMP_PATH); -- run_cmd ("rm -rf " EVOLUTION_DIR_BACKUP); -+ run_cmd ("rm -rf $DATADIR_old"); -+ run_cmd ("rm -rf $CONFIGDIR_old"); - run_cmd ("rm -rf $HOME/.camel_certs_old"); -- run_cmd ("rm $HOME/.evolution/.running"); -+ run_cmd ("rm $DATADIR/.running"); -+ -+ if (!is_new_format) -+ run_cmd ("rm -rf $HOME/.evolution_old"); - - CANCEL (complete); - txt = _("Ensuring local sources"); - -+ end: - if (restart_arg) { - CANCEL (complete); - txt = _("Restarting Evolution"); - complete=TRUE; - run_cmd (EVOLUTION); - } -- - } - - static gboolean --check (const gchar *filename) -+check (const gchar *filename, gboolean *is_new_format) - { - gchar *command; - gchar *quotedfname; -+ gboolean is_new = TRUE; - - g_return_val_if_fail (filename && *filename, FALSE); - quotedfname = g_shell_quote(filename); - -+ if (is_new_format) -+ *is_new_format = FALSE; -+ - command = g_strdup_printf ("tar ztf %s 1>/dev/null", quotedfname); - result = system (command); - g_free (command); -@@ -322,16 +523,30 @@ check (const gchar *filename) - return FALSE; - } - -- command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/$\"", quotedfname); -+ command = g_strdup_printf ("tar ztf %s | grep -e \"%s$\"", quotedfname, EVOLUTION_DIR_FILE); - result = system (command); - g_free (command); - -+ if (result) { -+ command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/$\"", quotedfname); -+ result = system (command); -+ g_free (command); -+ is_new = FALSE; -+ } -+ - g_message ("Second result %d", result); - if (result) { - g_free (quotedfname); - return FALSE; - } - -+ if (is_new) { -+ if (is_new_format) -+ *is_new_format = TRUE; -+ g_free (quotedfname); -+ return TRUE; -+ } -+ - command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/%s$\"", quotedfname, GCONF_DUMP_FILE); - result = system (command); - g_free (command); -@@ -363,7 +578,7 @@ thread_start (gpointer data) - else if (restore_op) - restore (res_file); - else if (check_op) -- check (chk_file); -+ check (chk_file, NULL); - - complete = TRUE; - -@@ -582,7 +797,7 @@ main (gint argc, gchar **argv) - gtk_widget_show_all (progress_dialog); - } else if (check_op) { - /* For sanity we don't need gui */ -- check (chk_file); -+ check (chk_file, NULL); - exit (result == 0 ? 0 : 1); - } - diff --git a/evolution.spec b/evolution.spec index 414f363..aabf9c6 100644 --- a/evolution.spec +++ b/evolution.spec @@ -28,8 +28,8 @@ ### Abstract ### Name: evolution -Version: 2.32.0 -Release: 2%{?dist}.1 +Version: 2.32.1 +Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL @@ -51,12 +51,6 @@ Patch12: evolution-2.9.1-im-context-reset.patch # RH bug #589555 Patch13: evolution-2.30.1-help-contents.patch -# GN bug #630700 -Patch15: evolution-2.31.92-gn630700.patch - -# GN bug #629972 -Patch16: evolution-2.32.0-gn629972.patch - ## Dependencies ### Requires(pre): GConf2 @@ -209,8 +203,6 @@ This package contains the plugin to import Microsoft Personal Storage Table %patch10 -p1 -b .ldaphack %patch12 -p1 -b .im-context-reset %patch13 -p1 -b .help-contents -%patch15 -p1 -b .gn630700 -%patch16 -p1 -b .gn629972 mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/lib @@ -619,6 +611,11 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Nov 15 2010 Milan Crha - 2.32.1-1.fc14 +- Update to 2.32.1 +- Remove patch for Gnome bug #630700 (fixed upstream) +- Remove patch for Gnome bug #629972 (fixed upstream) + * Wed Sep 29 2010 jkeating - 2.32.0-2.1 - Rebuilt for gcc bug 634757 diff --git a/sources b/sources index aee7929..78bedd8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c74fdd472efed42d9876aa905961b53d evolution-2.32.0.tar.bz2 +47c1d45366aaa69e79a320f351ef065d evolution-2.32.1.tar.bz2 From e30e176d9c7bbcfcbca72b93d8cbd93790c8cc8e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 7 Feb 2011 11:03:02 +0100 Subject: [PATCH 17/19] Update to 2.32.2 --- evolution.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evolution.spec b/evolution.spec index aabf9c6..098632b 100644 --- a/evolution.spec +++ b/evolution.spec @@ -28,7 +28,7 @@ ### Abstract ### Name: evolution -Version: 2.32.1 +Version: 2.32.2 Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME @@ -611,6 +611,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Feb 07 2011 Milan Crha - 2.32.2-1.fc14 +- Update to 2.32.2 + * Mon Nov 15 2010 Milan Crha - 2.32.1-1.fc14 - Update to 2.32.1 - Remove patch for Gnome bug #630700 (fixed upstream) From 2312e5b5e932071f343d40d4f57fc4f6eba8eed8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 7 Feb 2011 16:24:46 +0100 Subject: [PATCH 18/19] Update also sources file, which failed to happen the first time --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 94d445c..0a515e6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ evolution-2.31.90.tar.bz2 /evolution-2.31.92.tar.bz2 /evolution-2.32.0.tar.bz2 /evolution-2.32.1.tar.bz2 +/evolution-2.32.2.tar.bz2 diff --git a/sources b/sources index 78bedd8..af9de7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -47c1d45366aaa69e79a320f351ef065d evolution-2.32.1.tar.bz2 +9bdf73b69f90ca87e4b66a9c7f871325 evolution-2.32.2.tar.bz2 From a03bb8da7962590f4504cddd6c0ff1384966e97e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 21 Apr 2011 18:15:01 -0400 Subject: [PATCH 19/19] 2.32.3 --- .gitignore | 1 + evolution.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0a515e6..c9b12ac 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ evolution-2.31.90.tar.bz2 /evolution-2.32.0.tar.bz2 /evolution-2.32.1.tar.bz2 /evolution-2.32.2.tar.bz2 +/evolution-2.32.3.tar.bz2 diff --git a/evolution.spec b/evolution.spec index 098632b..91decf4 100644 --- a/evolution.spec +++ b/evolution.spec @@ -28,7 +28,7 @@ ### Abstract ### Name: evolution -Version: 2.32.2 +Version: 2.32.3 Release: 1%{?dist} Group: Applications/Productivity Summary: Mail and calendar client for GNOME @@ -611,6 +611,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Apr 21 2011 Matthew Barnes - 2.32.3-1.fc14 +- Update to 2.32.3 + * Mon Feb 07 2011 Milan Crha - 2.32.2-1.fc14 - Update to 2.32.2 diff --git a/sources b/sources index af9de7d..b5dddfa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9bdf73b69f90ca87e4b66a9c7f871325 evolution-2.32.2.tar.bz2 +ad68ffc12c7153b4a7cdb066521af07a evolution-2.32.3.tar.bz2