diff --git a/.evolution-data-server.metadata b/.evolution-data-server.metadata
new file mode 100644
index 0000000..31a47f0
--- /dev/null
+++ b/.evolution-data-server.metadata
@@ -0,0 +1 @@
+8b720f6bdc01ec0ba22c6f82e25c222b9f89d6fa SOURCES/evolution-data-server-3.8.5.tar.xz
diff --git a/README.md b/README.md
deleted file mode 100644
index 0e7897f..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-The master branch has no content
-
-Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6
-
-If you find this file in a distro specific branch, it means that no content has been checked in yet
diff --git a/SOURCES/evolution-data-server-1.11.5-fix-64bit-acinclude.patch b/SOURCES/evolution-data-server-1.11.5-fix-64bit-acinclude.patch
new file mode 100644
index 0000000..0ee2106
--- /dev/null
+++ b/SOURCES/evolution-data-server-1.11.5-fix-64bit-acinclude.patch
@@ -0,0 +1,56 @@
+diff -up evolution-data-server-2.27.91/m4/evo_ldap_check.m4.fix-64bit-acinclude evolution-data-server-2.27.91/m4/evo_ldap_check.m4
+--- evolution-data-server-2.27.91/m4/evo_ldap_check.m4.fix-64bit-acinclude 2009-08-24 12:45:52.000000000 +0200
++++ evolution-data-server-2.27.91/m4/evo_ldap_check.m4 2009-08-24 12:48:08.000000000 +0200
+@@ -14,6 +14,18 @@ AC_DEFUN([EVO_LDAP_CHECK],[
+ [AS_HELP_STRING([--with-static-ldap],
+ [Link LDAP support statically into evolution])])
+ AC_CACHE_CHECK([for OpenLDAP], [ac_cv_with_openldap], [ac_cv_with_openldap="${with_openldap:=$default}"])
++
++ AC_MSG_CHECKING(for multilib subdirectory)
++ if test "$GCC" = "yes" ; then
++ multilibsubdir=`$CC -print-multi-os-directory 2> /dev/null`
++ fi
++ multilibsubdir=${multilibsubdir:-.}
++ AC_MSG_RESULT($multilibsubdir)
++ AC_MSG_CHECKING(for lib subdirectory)
++ libsubdir=`echo lib/${multilibsubdir} | sed -re 's,lib/../([[^/]]*),\1,g'`
++ libsubdir=${libsubdir:-lib}
++ AC_MSG_RESULT($libsubdir)
++
+ case $ac_cv_with_openldap in
+ no|"")
+ with_openldap=no
+@@ -24,7 +36,7 @@ AC_DEFUN([EVO_LDAP_CHECK],[
+ *)
+ with_openldap=$ac_cv_with_openldap
+ LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
+- LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
++ LDAP_LDFLAGS="-L$ac_cv_with_openldap/$libsubdir"
+ ;;
+ esac
+
+@@ -60,20 +72,20 @@ AC_DEFUN([EVO_LDAP_CHECK],[
+ AC_CHECK_LIB(nsl, gethostbyaddr, [LDAP_LIBS="$LDAP_LIBS -lnsl"])
+ AC_CHECK_LIB(lber, ber_get_tag, [
+ if test "$with_static_ldap" = "yes"; then
+- LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS"
++ LDAP_LIBS="$with_openldap/$libsubdir/liblber.a $LDAP_LIBS"
+
+ # libldap might depend on OpenSSL... We need to pull
+ # in the dependency libs explicitly here since we're
+ # not using libtool for the configure test.
+- if test -f $with_openldap/lib/libldap.la; then
+- LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
++ if test -f $with_openldap/$libsubdir/libldap.la; then
++ LDAP_LIBS="`. $with_openldap/$libsubdir/libldap.la; echo $dependency_libs` $LDAP_LIBS"
+ fi
+ else
+ LDAP_LIBS="-llber $LDAP_LIBS"
+ fi
+ AC_CHECK_LIB(ldap, ldap_open, [
+ if test $with_static_ldap = "yes"; then
+- LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS"
++ LDAP_LIBS="$with_openldap/$libsubdir/libldap.a $LDAP_LIBS"
+ else
+ LDAP_LIBS="-lldap $LDAP_LIBS"
+ fi],
diff --git a/SOURCES/evolution-data-server-3.8.5-cert-viewer-crash.patch b/SOURCES/evolution-data-server-3.8.5-cert-viewer-crash.patch
new file mode 100644
index 0000000..1294ef9
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-cert-viewer-crash.patch
@@ -0,0 +1,12 @@
+diff -up evolution-data-server-3.8.5/modules/trust-prompt/certificate-viewer.c.cert-viewer-crash evolution-data-server-3.8.5/modules/trust-prompt/certificate-viewer.c
+--- evolution-data-server-3.8.5/modules/trust-prompt/certificate-viewer.c.cert-viewer-crash 2013-07-23 13:57:38.000000000 +0200
++++ evolution-data-server-3.8.5/modules/trust-prompt/certificate-viewer.c 2013-08-12 09:14:19.814379827 +0200
+@@ -538,7 +538,7 @@ get_window_title (CERTCertificate *cert)
+ return title;
+ }
+
+- return cert->subjectName;
++ return g_strdup (cert->subjectName);
+ }
+
+ GtkWidget *
diff --git a/SOURCES/evolution-data-server-3.8.5-google-caldav-v2.patch b/SOURCES/evolution-data-server-3.8.5-google-caldav-v2.patch
new file mode 100644
index 0000000..bde13dd
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-google-caldav-v2.patch
@@ -0,0 +1,685 @@
+diff -up evolution-data-server-3.8.5/calendar/backends/caldav/e-cal-backend-caldav.c.google-caldav-v2 evolution-data-server-3.8.5/calendar/backends/caldav/e-cal-backend-caldav.c
+--- evolution-data-server-3.8.5/calendar/backends/caldav/e-cal-backend-caldav.c.google-caldav-v2 2013-07-23 07:58:13.000000000 -0400
++++ evolution-data-server-3.8.5/calendar/backends/caldav/e-cal-backend-caldav.c 2013-08-16 06:46:04.137343301 -0400
+@@ -958,6 +958,32 @@ parse_propfind_response (SoupMessage *me
+ /* Authentication helpers for libsoup */
+
+ static void
++soup_authenticate_bearer (SoupSession *session,
++ SoupMessage *message,
++ SoupAuth *auth,
++ ESource *source)
++{
++ gchar *access_token = NULL;
++ gint expires_in_seconds = -1;
++ GError *local_error = NULL;
++
++ e_source_get_oauth2_access_token_sync (
++ source, NULL, &access_token,
++ &expires_in_seconds, &local_error);
++
++ e_soup_auth_bearer_set_access_token (
++ E_SOUP_AUTH_BEARER (auth),
++ access_token, expires_in_seconds);
++
++ if (local_error != NULL) {
++ g_warning ("%s: %s", G_STRFUNC, local_error->message);
++ g_error_free (local_error);
++ }
++
++ g_free (access_token);
++}
++
++static void
+ soup_authenticate (SoupSession *session,
+ SoupMessage *msg,
+ SoupAuth *auth,
+@@ -975,8 +1001,14 @@ soup_authenticate (SoupSession *session,
+ extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
+ auth_extension = e_source_get_extension (source, extension_name);
+
++ if (retrying)
++ return;
++
++ if (E_IS_SOUP_AUTH_BEARER (auth)) {
++ soup_authenticate_bearer (session, msg, auth, source);
++
+ /* do not send same password twice, but keep it for later use */
+- if (!retrying && cbdav->priv->password != NULL) {
++ } else if (cbdav->priv->password != NULL) {
+ gchar *user;
+
+ user = e_source_authentication_dup_user (auth_extension);
+@@ -5210,6 +5242,8 @@ cal_backend_caldav_constructed (GObject
+ static void
+ e_cal_backend_caldav_init (ECalBackendCalDAV *cbdav)
+ {
++ SoupSessionFeature *feature;
++
+ cbdav->priv = E_CAL_BACKEND_CALDAV_GET_PRIVATE (cbdav);
+ cbdav->priv->session = soup_session_sync_new ();
+ g_object_set (
+@@ -5219,6 +5253,16 @@ e_cal_backend_caldav_init (ECalBackendCa
+ SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
+ NULL);
+
++ /* XXX SoupAuthManager is public API as of libsoup 2.42, but
++ * this isn't worth bumping our libsoup requirement over.
++ * So get the SoupAuthManager GType by its type name. */
++ feature = soup_session_get_feature (
++ cbdav->priv->session,
++ g_type_from_name ("SoupAuthManager"));
++
++ /* Add the "Bearer" auth type to support OAuth 2.0. */
++ soup_session_feature_add_feature (feature, E_TYPE_SOUP_AUTH_BEARER);
++
+ cbdav->priv->proxy = e_proxy_new ();
+ e_proxy_setup_proxy (cbdav->priv->proxy);
+ g_signal_connect (cbdav->priv->proxy, "changed", G_CALLBACK (proxy_settings_changed), cbdav->priv);
+diff -up evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-docs.xml.google-caldav-v2 evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-docs.xml
+--- evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-docs.xml.google-caldav-v2 2013-03-17 08:46:02.000000000 -0400
++++ evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-docs.xml 2013-08-16 06:46:04.131343499 -0400
+@@ -34,6 +34,7 @@
+
Miscellaneous Utilities
+
+
++
+
+
+
+diff -up evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-sections.txt.google-caldav-v2 evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-sections.txt
+--- evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-sections.txt.google-caldav-v2 2013-08-11 07:26:26.000000000 -0400
++++ evolution-data-server-3.8.5/docs/reference/libebackend/libebackend-sections.txt 2013-08-16 06:46:04.132343461 -0400
+@@ -397,6 +397,24 @@ EServerSideSourcePrivate
+
+
+
++e-soup-auth-bearer
++ESoupAuthBearer
++ESoupAuthBearer
++e_soup_auth_bearer_set_access_token
++
++E_SOUP_AUTH_BEARER
++E_IS_SOUP_AUTH_BEARER
++E_TYPE_SOUP_AUTH_BEARER
++E_SOUP_AUTH_BEARER_CLASS
++E_IS_SOUP_AUTH_BEARER_CLASS
++E_SOUP_AUTH_BEARER_GET_CLASS
++ESoupAuthBearerClass
++e_soup_auth_bearer_get_type
++
++ESoupAuthBearerPrivate
++
++
++
+ e-source-registry-server
+ ESourceRegistryServer
+ E_SOURCE_REGISTRY_SERVER_OBJECT_PATH
+diff -up evolution-data-server-3.8.5/docs/reference/libebackend/libebackend.types.google-caldav-v2 evolution-data-server-3.8.5/docs/reference/libebackend/libebackend.types
+--- evolution-data-server-3.8.5/docs/reference/libebackend/libebackend.types.google-caldav-v2 2013-08-11 07:26:26.000000000 -0400
++++ evolution-data-server-3.8.5/docs/reference/libebackend/libebackend.types 2013-08-16 06:46:04.134343391 -0400
+@@ -15,6 +15,7 @@ e_module_get_type
+ e_oauth2_support_get_type
+ e_offline_listener_get_type
+ e_server_side_source_get_type
++e_soup_auth_bearer_get_type
+ e_source_registry_server_get_type
+ e_user_prompter_get_type
+ e_user_prompter_server_get_type
+diff -up evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.c.google-caldav-v2 evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.c
+--- evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.c.google-caldav-v2 2013-08-16 06:46:04.135343359 -0400
++++ evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.c 2013-08-16 06:46:04.135343359 -0400
+@@ -0,0 +1,196 @@
++/*
++ * e-soup-auth-bearer.c
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) version 3.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with the program; if not, see
++ *
++ */
++
++/**
++ * SECTION: e-soup-auth-bearer
++ * @include: libebackend/libebackend.h
++ * @short_description: OAuth 2.0 support for libsoup
++ *
++ * #ESoupAuthBearer adds libsoup support for the use of bearer tokens in
++ * HTTP requests to access OAuth 2.0 protected resources, as defined in
++ * RFC 6750.
++ *
++ * An #EBackend should integrate #ESoupAuthBearer first by adding it as a
++ * feature to a #SoupSession's #SoupAuthManager, then from a #SoupSession
++ * #SoupSession::authenticate handler call e_source_get_oauth2_access_token()
++ * and pass the results to e_soup_auth_bearer_set_access_token().
++ **/
++
++#include "e-soup-auth-bearer.h"
++
++#include
++
++#define E_SOUP_AUTH_BEARER_GET_PRIVATE(obj) \
++ (G_TYPE_INSTANCE_GET_PRIVATE \
++ ((obj), E_TYPE_SOUP_AUTH_BEARER, ESoupAuthBearerPrivate))
++
++#define AUTH_STRENGTH 1
++
++#define EXPIRY_INVALID ((time_t) -1)
++
++struct _ESoupAuthBearerPrivate {
++ gchar *access_token;
++ time_t expiry;
++};
++
++G_DEFINE_TYPE (
++ ESoupAuthBearer,
++ e_soup_auth_bearer,
++ SOUP_TYPE_AUTH)
++
++static gboolean
++e_soup_auth_bearer_is_expired (ESoupAuthBearer *bearer)
++{
++ gboolean expired = FALSE;
++
++ if (bearer->priv->expiry != EXPIRY_INVALID)
++ expired = (bearer->priv->expiry < time (NULL));
++
++ return expired;
++}
++
++static void
++e_soup_auth_bearer_finalize (GObject *object)
++{
++ ESoupAuthBearerPrivate *priv;
++
++ priv = E_SOUP_AUTH_BEARER_GET_PRIVATE (object);
++
++ g_free (priv->access_token);
++
++ /* Chain up to parent's finalize() method. */
++ G_OBJECT_CLASS (e_soup_auth_bearer_parent_class)->finalize (object);
++}
++
++static gboolean
++e_soup_auth_bearer_update (SoupAuth *auth,
++ SoupMessage *message,
++ GHashTable *auth_header)
++{
++ /* XXX Not sure what to do here. Discard the access token? */
++
++ return TRUE;
++}
++
++static GSList *
++e_soup_auth_bearer_get_protection_space (SoupAuth *auth,
++ SoupURI *source_uri)
++{
++ /* XXX Not sure what to do here. Need to return something. */
++
++ return g_slist_prepend (NULL, g_strdup (""));
++}
++
++static gboolean
++e_soup_auth_bearer_is_authenticated (SoupAuth *auth)
++{
++ ESoupAuthBearer *bearer;
++ gboolean authenticated = FALSE;
++
++ bearer = E_SOUP_AUTH_BEARER (auth);
++
++ if (!e_soup_auth_bearer_is_expired (bearer))
++ authenticated = (bearer->priv->access_token != NULL);
++
++ return authenticated;
++}
++
++static gchar *
++e_soup_auth_bearer_get_authorization (SoupAuth *auth,
++ SoupMessage *message)
++{
++ ESoupAuthBearer *bearer;
++
++ bearer = E_SOUP_AUTH_BEARER (auth);
++
++ return g_strdup_printf ("Bearer %s", bearer->priv->access_token);
++}
++
++static void
++e_soup_auth_bearer_class_init (ESoupAuthBearerClass *class)
++{
++ GObjectClass *object_class;
++ SoupAuthClass *auth_class;
++
++ g_type_class_add_private (class, sizeof (ESoupAuthBearerPrivate));
++
++ /* Keep the "e" prefix on private methods
++ * so we don't step on libsoup's namespace. */
++
++ object_class = G_OBJECT_CLASS (class);
++ object_class->finalize = e_soup_auth_bearer_finalize;
++
++ auth_class = SOUP_AUTH_CLASS (class);
++ auth_class->scheme_name = "Bearer";
++ auth_class->strength = AUTH_STRENGTH;
++ auth_class->update = e_soup_auth_bearer_update;
++ auth_class->get_protection_space = e_soup_auth_bearer_get_protection_space;
++ auth_class->is_authenticated = e_soup_auth_bearer_is_authenticated;
++ auth_class->get_authorization = e_soup_auth_bearer_get_authorization;
++}
++
++static void
++e_soup_auth_bearer_init (ESoupAuthBearer *bearer)
++{
++ bearer->priv = E_SOUP_AUTH_BEARER_GET_PRIVATE (bearer);
++ bearer->priv->expiry = EXPIRY_INVALID;
++}
++
++/**
++ * e_soup_auth_bearer_set_access_token:
++ * @bearer: an #ESoupAuthBearer
++ * @access_token: an OAuth 2.0 access token
++ * @expires_in_seconds: expiry for @access_token, or 0 if unknown
++ *
++ * This function is analogous to soup_auth_authenticate() for "Basic" HTTP
++ * authentication, except it takes an OAuth 2.0 access token instead of a
++ * username and password.
++ *
++ * If @expires_in_seconds is greater than zero, soup_auth_is_authenticated()
++ * will return %FALSE after the given number of seconds have elapsed.
++ *
++ * Since: 3.10
++ **/
++void
++e_soup_auth_bearer_set_access_token (ESoupAuthBearer *bearer,
++ const gchar *access_token,
++ gint expires_in_seconds)
++{
++ gboolean was_authenticated;
++ gboolean now_authenticated;
++
++ g_return_if_fail (E_IS_SOUP_AUTH_BEARER (bearer));
++
++ was_authenticated = soup_auth_is_authenticated (SOUP_AUTH (bearer));
++
++ g_free (bearer->priv->access_token);
++ bearer->priv->access_token = g_strdup (access_token);
++
++ if (expires_in_seconds > 0)
++ bearer->priv->expiry = time (NULL) + expires_in_seconds;
++ else
++ bearer->priv->expiry = EXPIRY_INVALID;
++
++ now_authenticated = soup_auth_is_authenticated (SOUP_AUTH (bearer));
++
++ if (was_authenticated != now_authenticated)
++ g_object_notify (
++ G_OBJECT (bearer),
++ SOUP_AUTH_IS_AUTHENTICATED);
++}
++
+diff -up evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.h.google-caldav-v2 evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.h
+--- evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.h.google-caldav-v2 2013-08-16 06:46:04.135343359 -0400
++++ evolution-data-server-3.8.5/libebackend/e-soup-auth-bearer.h 2013-08-16 06:46:04.135343359 -0400
+@@ -0,0 +1,79 @@
++/*
++ * e-soup-auth-bearer.h
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) version 3.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with the program; if not, see
++ *
++ */
++
++#if !defined (__LIBEBACKEND_H_INSIDE__) && !defined (LIBEBACKEND_COMPILATION)
++#error "Only should be included directly."
++#endif
++
++#ifndef E_SOUP_AUTH_BEARER_H
++#define E_SOUP_AUTH_BEARER_H
++
++#include
++
++/* Standard GObject macros */
++#define E_TYPE_SOUP_AUTH_BEARER \
++ (e_soup_auth_bearer_get_type ())
++#define E_SOUP_AUTH_BEARER(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST \
++ ((obj), E_TYPE_SOUP_AUTH_BEARER, ESoupAuthBearer))
++#define E_SOUP_AUTH_BEARER_CLASS(cls) \
++ (G_TYPE_CHECK_CLASS_CAST \
++ ((cls), E_TYPE_SOUP_AUTH_BEARER, ESoupAuthBearerClass))
++#define E_IS_SOUP_AUTH_BEARER(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE \
++ ((obj), E_TYPE_SOUP_AUTH_BEARER))
++#define E_IS_SOUP_AUTH_BEARER_CLASS(cls) \
++ (G_TYPE_CHECK_CLASS_TYPE \
++ ((cls), E_TYPE_SOUP_AUTH_BEARER))
++#define E_SOUP_AUTH_BEARER_GET_CLASS(obj) \
++ (G_TYPE_INSTANCE_GET_CLASS \
++ ((obj), E_TYPE_SOUP_AUTH_BEARER, ESoupAuthBearerClass))
++
++G_BEGIN_DECLS
++
++typedef struct _ESoupAuthBearer ESoupAuthBearer;
++typedef struct _ESoupAuthBearerClass ESoupAuthBearerClass;
++typedef struct _ESoupAuthBearerPrivate ESoupAuthBearerPrivate;
++
++/**
++ * ESoupAuthBearer:
++ *
++ * Contains only private data that should be read and manipulated using the
++ * functions below.
++ *
++ * Since: 3.10
++ **/
++struct _ESoupAuthBearer {
++ SoupAuth parent;
++ ESoupAuthBearerPrivate *priv;
++};
++
++struct _ESoupAuthBearerClass {
++ SoupAuthClass parent_class;
++};
++
++GType e_soup_auth_bearer_get_type (void) G_GNUC_CONST;
++void e_soup_auth_bearer_set_access_token
++ (ESoupAuthBearer *bearer,
++ const gchar *access_token,
++ gint expires_in_seconds);
++
++G_END_DECLS
++
++#endif /* E_SOUP_AUTH_BEARER_H */
++
+diff -up evolution-data-server-3.8.5/libebackend/libebackend.h.google-caldav-v2 evolution-data-server-3.8.5/libebackend/libebackend.h
+--- evolution-data-server-3.8.5/libebackend/libebackend.h.google-caldav-v2 2013-07-23 07:57:40.000000000 -0400
++++ evolution-data-server-3.8.5/libebackend/libebackend.h 2013-08-16 06:46:04.135343359 -0400
+@@ -42,6 +42,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+ #include
+ #include
+diff -up evolution-data-server-3.8.5/libebackend/Makefile.am.google-caldav-v2 evolution-data-server-3.8.5/libebackend/Makefile.am
+--- evolution-data-server-3.8.5/libebackend/Makefile.am.google-caldav-v2 2013-04-18 11:33:59.000000000 -0400
++++ evolution-data-server-3.8.5/libebackend/Makefile.am 2013-08-16 06:46:04.134343391 -0400
+@@ -35,6 +35,7 @@ libebackend_1_2_la_CPPFLAGS = \
+ $(E_BACKEND_CFLAGS) \
+ $(GCR_BASE_CFLAGS) \
+ $(GIO_UNIX_CFLAGS) \
++ $(SOUP_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
+ $(NULL)
+
+@@ -56,6 +57,7 @@ libebackend_1_2_la_SOURCES = \
+ e-db3-utils.c \
+ e-module.c \
+ e-server-side-source.c \
++ e-soup-auth-bearer.c \
+ e-source-registry-server.c \
+ e-sqlite3-vfs.c \
+ e-user-prompter.c \
+@@ -71,6 +73,7 @@ libebackend_1_2_la_LIBADD = \
+ $(SQLITE3_LIBS) \
+ $(GCR_BASE_LIBS) \
+ $(GIO_UNIX_LIBS) \
++ $(SOUP_LIBS) \
+ $(DB_LIBS)
+
+ libebackend_1_2_la_LDFLAGS = \
+@@ -100,6 +103,7 @@ libebackendinclude_HEADERS = \
+ e-dbhash.h \
+ e-module.h \
+ e-server-side-source.h \
++ e-soup-auth-bearer.h \
+ e-source-registry-server.h \
+ e-sqlite3-vfs.h \
+ e-user-prompter.h \
+diff -up evolution-data-server-3.8.5/libedataserver/e-source-webdav.c.google-caldav-v2 evolution-data-server-3.8.5/libedataserver/e-source-webdav.c
+--- evolution-data-server-3.8.5/libedataserver/e-source-webdav.c.google-caldav-v2 2013-07-23 07:57:32.000000000 -0400
++++ evolution-data-server-3.8.5/libedataserver/e-source-webdav.c 2013-08-16 06:46:04.130343539 -0400
+@@ -108,15 +108,39 @@ source_webdav_user_to_method (GBinding *
+ GValue *target_value,
+ gpointer user_data)
+ {
++ GObject *target_object;
++ ESourceAuthentication *extension;
+ const gchar *user;
++ gchar *method;
++ gboolean success = TRUE;
++
++ target_object = g_binding_get_target (binding);
++ extension = E_SOURCE_AUTHENTICATION (target_object);
++ method = e_source_authentication_dup_method (extension);
++ g_return_val_if_fail (method != NULL, FALSE);
++
++ /* Be careful not to stomp on a custom method name.
++ * Only change it under the following conditions:
++ *
++ * 1) If "user" is empty, set "method" to "none".
++ * 2) If "user" is not empty and "method" is "none",
++ * set "method" to "plain/password" (corresponds
++ * to HTTP Basic authentication).
++ * 3) Otherwise preserve the current "method" value.
++ */
+
+ user = g_value_get_string (source_value);
+- if (user == NULL || *user == '\0')
++ if (user == NULL || *user == '\0') {
+ g_value_set_string (target_value, "none");
+- else
++ } else if (g_str_equal (method, "none")) {
+ g_value_set_string (target_value, "plain/password");
++ } else {
++ success = FALSE;
++ }
++
++ g_free (method);
+
+- return TRUE;
++ return success;
+ }
+
+ static void
+diff -up evolution-data-server-3.8.5/modules/google-backend/module-google-backend.c.google-caldav-v2 evolution-data-server-3.8.5/modules/google-backend/module-google-backend.c
+--- evolution-data-server-3.8.5/modules/google-backend/module-google-backend.c.google-caldav-v2 2013-07-23 07:57:38.000000000 -0400
++++ evolution-data-server-3.8.5/modules/google-backend/module-google-backend.c 2013-08-16 06:46:04.371341485 -0400
+@@ -45,10 +45,16 @@
+
+ /* Calendar Configuration Details */
+ #define GOOGLE_CALENDAR_BACKEND_NAME "caldav"
+-#define GOOGLE_CALENDAR_HOST "www.google.com"
+-#define GOOGLE_CALENDAR_CALDAV_PATH "/calendar/dav/%s/events"
+ #define GOOGLE_CALENDAR_RESOURCE_ID "Calendar"
+
++/* CalDAV v1 Configuration Details */
++#define GOOGLE_CALDAV_V1_HOST "www.google.com"
++#define GOOGLE_CALDAV_V1_PATH "/calendar/dav/%s/events"
++
++/* CalDAV v2 Configuration Details */
++#define GOOGLE_CALDAV_V2_HOST "apidata.googleusercontent.com"
++#define GOOGLE_CALDAV_V2_PATH "/caldav/v2/%s/events"
++
+ /* Contacts Configuration Details */
+ #define GOOGLE_CONTACTS_BACKEND_NAME "google"
+ #define GOOGLE_CONTACTS_HOST "www.google.com"
+@@ -95,24 +101,68 @@ G_DEFINE_DYNAMIC_TYPE (
+ E_TYPE_COLLECTION_BACKEND_FACTORY)
+
+ static void
+-google_backend_contacts_update_auth_method (ESource *source)
++google_backend_calendar_update_auth_method (ESource *source)
+ {
+ EOAuth2Support *oauth2_support;
+- ESourceAuthentication *extension;
++ ESourceAuthentication *auth_extension;
++ ESourceWebdav *webdav_extension;
+ const gchar *extension_name;
+-
+- extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
+- extension = e_source_get_extension (source, extension_name);
++ const gchar *host;
++ const gchar *method;
++ const gchar *path_format;
++ gchar *path;
++ gchar *user;
+
+ oauth2_support = e_server_side_source_ref_oauth2_support (
+ E_SERVER_SIDE_SOURCE (source));
++
++ /* The host name and WebDAV resource path depend on the
++ * authentication method used, so update those here too. */
++
+ if (oauth2_support != NULL) {
+- e_source_authentication_set_method (extension, "OAuth2");
+- g_object_unref (oauth2_support);
+- return;
++ method = "OAuth2";
++ host = GOOGLE_CALDAV_V2_HOST;
++ path_format = GOOGLE_CALDAV_V2_PATH;
++ } else {
++ method = "plain/password";
++ host = GOOGLE_CALDAV_V1_HOST;
++ path_format = GOOGLE_CALDAV_V1_PATH;
+ }
+
+- e_source_authentication_set_method (extension, "ClientLogin");
++ extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
++ auth_extension = e_source_get_extension (source, extension_name);
++ e_source_authentication_set_host (auth_extension, host);
++ e_source_authentication_set_method (auth_extension, method);
++
++ extension_name = E_SOURCE_EXTENSION_WEBDAV_BACKEND;
++ webdav_extension = e_source_get_extension (source, extension_name);
++
++ user = e_source_authentication_dup_user (auth_extension);
++ path = g_strdup_printf (path_format, (user != NULL) ? user : "");
++ e_source_webdav_set_resource_path (webdav_extension, path);
++ g_free (path);
++ g_free (user);
++
++ g_clear_object (&oauth2_support);
++}
++
++static void
++google_backend_contacts_update_auth_method (ESource *source)
++{
++ EOAuth2Support *oauth2_support;
++ ESourceAuthentication *extension;
++ const gchar *extension_name;
++ const gchar *method;
++
++ oauth2_support = e_server_side_source_ref_oauth2_support (
++ E_SERVER_SIDE_SOURCE (source));
++
++ extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
++ extension = e_source_get_extension (source, extension_name);
++ method = (oauth2_support != NULL) ? "OAuth2" : "ClientLogin";
++ e_source_authentication_set_method (extension, method);
++
++ g_clear_object (&oauth2_support);
+ }
+
+ static void
+@@ -125,14 +175,16 @@ google_backend_add_calendar (ECollection
+ ESourceCollection *collection_extension;
+ const gchar *backend_name;
+ const gchar *extension_name;
+- const gchar *identity;
+ const gchar *resource_id;
+- gchar *path;
+
+ /* FIXME As a future enhancement, we should query Google
+ * for a list of user calendars and add them to the
+ * collection with matching display names and colors. */
+
++ /* NOTE: Host name and WebDAV resource path are set in
++ * google_backend_calendar_update_auth_method(),
++ * since they depend on the auth method used. */
++
+ collection_source = e_backend_get_source (E_BACKEND (backend));
+
+ resource_id = GOOGLE_CALENDAR_RESOURCE_ID;
+@@ -155,15 +207,15 @@ google_backend_add_calendar (ECollection
+ extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
+ extension = e_source_get_extension (source, extension_name);
+
+- e_source_authentication_set_host (
+- E_SOURCE_AUTHENTICATION (extension),
+- GOOGLE_CALENDAR_HOST);
+-
+ g_object_bind_property (
+ collection_extension, "identity",
+ extension, "user",
+ G_BINDING_SYNC_CREATE);
+
++ /* Make sure the WebDAV resource path is up-to-date, since
++ * it's built from the "user" property that we just set. */
++ google_backend_calendar_update_auth_method (source);
++
+ extension_name = E_SOURCE_EXTENSION_SECURITY;
+ extension = e_source_get_extension (source, extension_name);
+
+@@ -178,19 +230,11 @@ google_backend_add_calendar (ECollection
+
+ g_get_current_time (&today_tv);
+ today = g_time_val_to_iso8601 (&today_tv);
+- e_source_alarms_set_last_notified (E_SOURCE_ALARMS (extension), today);
++ e_source_alarms_set_last_notified (
++ E_SOURCE_ALARMS (extension), today);
+ g_free (today);
+ }
+
+- extension_name = E_SOURCE_EXTENSION_WEBDAV_BACKEND;
+- extension = e_source_get_extension (source, extension_name);
+-
+- identity = e_source_collection_get_identity (collection_extension);
+- path = g_strdup_printf (GOOGLE_CALENDAR_CALDAV_PATH, identity);
+- e_source_webdav_set_resource_path (
+- E_SOURCE_WEBDAV (extension), path);
+- g_free (path);
+-
+ server = e_collection_backend_ref_server (backend);
+ e_source_registry_server_add_source (server, source);
+ g_object_unref (server);
+@@ -337,6 +381,20 @@ google_backend_child_added (ECollectionB
+ collection_identity);
+ }
+
++ /* Keep the calendar authentication method up-to-date.
++ *
++ * XXX Not using a property binding here in case I end up adding
++ * other "support" interfaces which influence authentication.
++ * Many-to-one property bindinds tend not to work so well. */
++ extension_name = E_SOURCE_EXTENSION_CALENDAR;
++ if (e_source_has_extension (child_source, extension_name)) {
++ google_backend_calendar_update_auth_method (child_source);
++ g_signal_connect (
++ child_source, "notify::oauth2-support",
++ G_CALLBACK (google_backend_calendar_update_auth_method),
++ NULL);
++ }
++
+ /* Keep the contacts authentication method up-to-date.
+ *
+ * XXX Not using a property binding here in case I end up adding
diff --git a/SOURCES/evolution-data-server-3.8.5-imapx-connect-store.patch b/SOURCES/evolution-data-server-3.8.5-imapx-connect-store.patch
new file mode 100644
index 0000000..227593e
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-imapx-connect-store.patch
@@ -0,0 +1,103 @@
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-store.c.imapx-connect-store evolution-data-server-3.8.5/camel/camel-imapx-store.c
+--- evolution-data-server-3.8.5/camel/camel-imapx-store.c.imapx-connect-store 2013-10-14 17:15:00.129077116 +0200
++++ evolution-data-server-3.8.5/camel/camel-imapx-store.c 2013-10-14 17:16:40.005070287 +0200
+@@ -1461,12 +1461,6 @@ imapx_store_get_folder_info_sync (CamelS
+ return fi;
+ }
+
+- if (!camel_service_connect_sync (
+- CAMEL_SERVICE (store), cancellable, error)) {
+- g_mutex_unlock (&istore->get_finfo_lock);
+- return NULL;
+- }
+-
+ if (*top && flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST) {
+ fi = get_folder_info_offline (store, top, flags, error);
+ g_mutex_unlock (&istore->get_finfo_lock);
+diff -up evolution-data-server-3.8.5/camel/camel-store.c.imapx-connect-store evolution-data-server-3.8.5/camel/camel-store.c
+--- evolution-data-server-3.8.5/camel/camel-store.c.imapx-connect-store 2013-07-23 13:57:42.000000000 +0200
++++ evolution-data-server-3.8.5/camel/camel-store.c 2013-10-14 17:17:46.438065744 +0200
+@@ -38,6 +38,7 @@
+ #include "camel-debug.h"
+ #include "camel-folder.h"
+ #include "camel-marshal.h"
++#include "camel-offline-store.h"
+ #include "camel-session.h"
+ #include "camel-store.h"
+ #include "camel-store-settings.h"
+@@ -276,6 +277,39 @@ store_get_special (CamelStore *store,
+ return folder;
+ }
+
++static gboolean
++store_maybe_connect_sync (CamelStore *store,
++ GCancellable *cancellable,
++ GError **error)
++{
++ CamelService *service;
++ CamelServiceConnectionStatus status;
++ gboolean connect = FALSE;
++ gboolean success = TRUE;
++
++ /* This is meant to recover from dropped connections
++ * when the CamelService is online but disconnected. */
++
++ service = CAMEL_SERVICE (store);
++ status = camel_service_get_connection_status (service);
++ connect = (status != CAMEL_SERVICE_CONNECTED);
++
++ if (CAMEL_IS_OFFLINE_STORE (store)) {
++ CamelOfflineStore *offline_store;
++
++ offline_store = CAMEL_OFFLINE_STORE (store);
++ if (!camel_offline_store_get_online (offline_store))
++ connect = FALSE;
++ }
++
++ if (connect) {
++ success = camel_service_connect_sync (
++ service, cancellable, error);
++ }
++
++ return success;
++}
++
+ static void
+ store_finalize (GObject *object)
+ {
+@@ -2099,6 +2133,12 @@ camel_store_get_folder_info_sync (CamelS
+ cancellable, _("Scanning folders in '%s'"), name);
+ g_free (name);
+
++ /* Recover from a dropped connection, unless we're offline. */
++ if (!store_maybe_connect_sync (store, cancellable, error)) {
++ camel_operation_pop_message (cancellable);
++ return NULL;
++ }
++
+ info = class->get_folder_info_sync (
+ store, top, flags, cancellable, error);
+ if (!(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED))
+diff -up evolution-data-server-3.8.5/camel/providers/nntp/camel-nntp-store.c.imapx-connect-store evolution-data-server-3.8.5/camel/providers/nntp/camel-nntp-store.c
+--- evolution-data-server-3.8.5/camel/providers/nntp/camel-nntp-store.c.imapx-connect-store 2013-08-03 09:57:21.000000000 +0200
++++ evolution-data-server-3.8.5/camel/providers/nntp/camel-nntp-store.c 2013-10-14 17:15:00.131077116 +0200
+@@ -1292,17 +1292,8 @@ nntp_get_folder_info_online (CamelStore
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelService *service;
+- CamelFolderInfo *info = NULL;
+-
+- service = CAMEL_SERVICE (store);
+-
+- /* Reconnect if necessary. */
+- if (camel_service_connect_sync (service, cancellable, error))
+- info = nntp_get_folder_info (
+- store, top, flags, TRUE, cancellable, error);
+-
+- return info;
++ return nntp_get_folder_info (
++ store, top, flags, TRUE, cancellable, error);
+ }
+
+ static CamelFolderInfo *
diff --git a/SOURCES/evolution-data-server-3.8.5-imapx-server-dispose-block.patch b/SOURCES/evolution-data-server-3.8.5-imapx-server-dispose-block.patch
new file mode 100644
index 0000000..9fa71f6
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-imapx-server-dispose-block.patch
@@ -0,0 +1,45 @@
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-server.c.eds evolution-data-server-3.8.5/camel/camel-imapx-server.c
+--- evolution-data-server-3.8.5/camel/camel-imapx-server.c.eds 2013-11-07 09:46:45.524877569 +0100
++++ evolution-data-server-3.8.5/camel/camel-imapx-server.c 2013-11-07 09:48:20.332871086 +0100
+@@ -6963,13 +6963,8 @@ imapx_parser_thread (gpointer d)
+
+ g_clear_error (&local_error);
+
+- return NULL;
+-}
++ g_object_unref (is);
+
+-static gpointer
+-join_helper (gpointer thread)
+-{
+- g_thread_join (thread);
+ return NULL;
+ }
+
+@@ -7041,14 +7036,8 @@ imapx_server_dispose (GObject *object)
+ }
+ QUEUE_UNLOCK (server);
+
+- if (server->parser_thread) {
+- if (server->parser_thread == g_thread_self ()) {
+- GThread *thread;
+-
+- thread = g_thread_new (NULL, join_helper, server->parser_thread);
+- g_thread_unref (thread);
+- } else
+- g_thread_join (server->parser_thread);
++ if (server->parser_thread != NULL) {
++ g_thread_unref (server->parser_thread);
+ server->parser_thread = NULL;
+ }
+
+@@ -7288,7 +7277,8 @@ camel_imapx_server_connect (CamelIMAPXSe
+ if (!imapx_reconnect (is, cancellable, error))
+ return FALSE;
+
+- is->parser_thread = g_thread_new (NULL, (GThreadFunc) imapx_parser_thread, is);
++ is->parser_thread = g_thread_new (
++ NULL, (GThreadFunc) imapx_parser_thread, g_object_ref (is));
+
+ return TRUE;
+ }
diff --git a/SOURCES/evolution-data-server-3.8.5-kill-imapx-conn-manager.patch b/SOURCES/evolution-data-server-3.8.5-kill-imapx-conn-manager.patch
new file mode 100644
index 0000000..cd82c23
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-kill-imapx-conn-manager.patch
@@ -0,0 +1,1936 @@
+diff -up evolution-data-server-3.8.5/camel/camel.h.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel.h
+--- evolution-data-server-3.8.5/camel/camel.h.kill-imapx-conn-manager 2013-07-23 07:57:56.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel.h 2013-09-12 15:51:33.362412243 -0400
+@@ -144,7 +144,6 @@
+ #include
+ #include
+ #include
+-#include
+ #include
+ #include
+ #include
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-conn-manager.c.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-conn-manager.c
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-conn-manager.h.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-conn-manager.h
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-folder.c.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-folder.c
+--- evolution-data-server-3.8.5/camel/camel-imapx-folder.c.kill-imapx-conn-manager 2013-07-23 08:01:51.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel-imapx-folder.c 2013-09-12 15:51:33.323412254 -0400
+@@ -178,7 +178,7 @@ static void
+ imapx_folder_dispose (GObject *object)
+ {
+ CamelIMAPXFolder *folder = CAMEL_IMAPX_FOLDER (object);
+- CamelStore *parent_store;
++ CamelStore *store;
+
+ if (folder->cache != NULL) {
+ g_object_unref (folder->cache);
+@@ -190,10 +190,10 @@ imapx_folder_dispose (GObject *object)
+ folder->search = NULL;
+ }
+
+- parent_store = camel_folder_get_parent_store (CAMEL_FOLDER (folder));
+- if (parent_store) {
++ store = camel_folder_get_parent_store (CAMEL_FOLDER (folder));
++ if (store != NULL) {
+ camel_store_summary_disconnect_folder_summary (
+- (CamelStoreSummary *) ((CamelIMAPXStore *) parent_store)->summary,
++ (CamelStoreSummary *) ((CamelIMAPXStore *) store)->summary,
+ CAMEL_FOLDER (folder)->summary);
+ }
+
+@@ -283,15 +283,17 @@ static void
+ imapx_search_free (CamelFolder *folder,
+ GPtrArray *uids)
+ {
+- CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
++ CamelIMAPXFolder *imapx_folder;
+
+- g_return_if_fail (ifolder->search);
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
+
+- g_mutex_lock (&ifolder->search_lock);
++ g_return_if_fail (imapx_folder->search);
+
+- camel_folder_search_free_result (ifolder->search, uids);
++ g_mutex_lock (&imapx_folder->search_lock);
+
+- g_mutex_unlock (&ifolder->search_lock);
++ camel_folder_search_free_result (imapx_folder->search, uids);
++
++ g_mutex_unlock (&imapx_folder->search_lock);
+ }
+
+ static GPtrArray *
+@@ -301,48 +303,37 @@ imapx_search_by_uids (CamelFolder *folde
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXFolder *ifolder;
+- CamelIMAPXSearch *isearch;
+- CamelIMAPXServer *server = NULL;
+- CamelStore *parent_store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXFolder *imapx_folder;
++ CamelIMAPXSearch *imapx_search;
++ CamelIMAPXServer *imapx_server;
++ CamelStore *store;
+ GPtrArray *matches;
+- const gchar *folder_name;
+- gboolean online;
+
+ if (uids->len == 0)
+ return g_ptr_array_new ();
+
+- ifolder = CAMEL_IMAPX_FOLDER (folder);
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+-
+- online = camel_offline_store_get_online (
+- CAMEL_OFFLINE_STORE (parent_store));
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
++ store = camel_folder_get_parent_store (folder);
+
+- if (online) {
+- /* do not panic when the server cannot be reached for whatever reason,
+- * show offline data at least */
+- server = camel_imapx_store_get_server (
+- CAMEL_IMAPX_STORE (parent_store),
+- folder_name, cancellable, NULL);
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, NULL);
+
+- g_mutex_lock (&ifolder->search_lock);
++ g_mutex_lock (&imapx_folder->search_lock);
+
+- isearch = CAMEL_IMAPX_SEARCH (ifolder->search);
+- camel_imapx_search_set_server (isearch, server);
++ imapx_search = CAMEL_IMAPX_SEARCH (imapx_folder->search);
++ camel_imapx_search_set_server (imapx_search, imapx_server);
+
+- camel_folder_search_set_folder (ifolder->search, folder);
++ camel_folder_search_set_folder (imapx_folder->search, folder);
+
+ matches = camel_folder_search_search (
+- ifolder->search, expression, uids, cancellable, error);
++ imapx_folder->search, expression, uids, cancellable, error);
+
+- camel_imapx_search_set_server (isearch, NULL);
++ camel_imapx_search_set_server (imapx_search, NULL);
+
+- g_mutex_unlock (&ifolder->search_lock);
++ g_mutex_unlock (&imapx_folder->search_lock);
+
+- if (server != NULL)
+- g_object_unref (server);
++ g_clear_object (&imapx_server);
+
+ return matches;
+ }
+@@ -353,45 +344,34 @@ imapx_count_by_expression (CamelFolder *
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXFolder *ifolder;
+- CamelIMAPXSearch *isearch;
+- CamelIMAPXServer *server = NULL;
+- CamelStore *parent_store;
+- const gchar *folder_name;
+- gboolean online;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXFolder *imapx_folder;
++ CamelIMAPXSearch *imapx_search;
++ CamelIMAPXServer *imapx_server;
++ CamelStore *store;
+ guint32 matches;
+
+- ifolder = CAMEL_IMAPX_FOLDER (folder);
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+-
+- online = camel_offline_store_get_online (
+- CAMEL_OFFLINE_STORE (parent_store));
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
++ store = camel_folder_get_parent_store (folder);
+
+- if (online) {
+- /* do not panic when the server cannot be reached for whatever reason,
+- * show offline data at least */
+- server = camel_imapx_store_get_server (
+- CAMEL_IMAPX_STORE (parent_store),
+- folder_name, cancellable, NULL);
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, NULL);
+
+- g_mutex_lock (&ifolder->search_lock);
++ g_mutex_lock (&imapx_folder->search_lock);
+
+- isearch = CAMEL_IMAPX_SEARCH (ifolder->search);
+- camel_imapx_search_set_server (isearch, server);
++ imapx_search = CAMEL_IMAPX_SEARCH (imapx_folder->search);
++ camel_imapx_search_set_server (imapx_search, imapx_server);
+
+- camel_folder_search_set_folder (ifolder->search, folder);
++ camel_folder_search_set_folder (imapx_folder->search, folder);
+
+ matches = camel_folder_search_count (
+- ifolder->search, expression, cancellable, error);
++ imapx_folder->search, expression, cancellable, error);
+
+- camel_imapx_search_set_server (isearch, NULL);
++ camel_imapx_search_set_server (imapx_search, NULL);
+
+- g_mutex_unlock (&ifolder->search_lock);
++ g_mutex_unlock (&imapx_folder->search_lock);
+
+- if (server != NULL)
+- g_object_unref (server);
++ g_clear_object (&imapx_server);
+
+ return matches;
+ }
+@@ -402,45 +382,34 @@ imapx_search_by_expression (CamelFolder
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXFolder *ifolder;
+- CamelIMAPXSearch *isearch;
+- CamelIMAPXServer *server = NULL;
+- CamelStore *parent_store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXFolder *imapx_folder;
++ CamelIMAPXSearch *imapx_search;
++ CamelIMAPXServer *imapx_server;
++ CamelStore *store;
+ GPtrArray *matches;
+- const gchar *folder_name;
+- gboolean online;
+-
+- ifolder = CAMEL_IMAPX_FOLDER (folder);
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+
+- online = camel_offline_store_get_online (
+- CAMEL_OFFLINE_STORE (parent_store));
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
++ store = camel_folder_get_parent_store (folder);
+
+- if (online) {
+- /* do not panic when the server cannot be reached for whatever reason,
+- * show offline data at least */
+- server = camel_imapx_store_get_server (
+- CAMEL_IMAPX_STORE (parent_store),
+- folder_name, cancellable, NULL);
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, NULL);
+
+- g_mutex_lock (&ifolder->search_lock);
++ g_mutex_lock (&imapx_folder->search_lock);
+
+- isearch = CAMEL_IMAPX_SEARCH (ifolder->search);
+- camel_imapx_search_set_server (isearch, server);
++ imapx_search = CAMEL_IMAPX_SEARCH (imapx_folder->search);
++ camel_imapx_search_set_server (imapx_search, imapx_server);
+
+- camel_folder_search_set_folder (ifolder->search, folder);
++ camel_folder_search_set_folder (imapx_folder->search, folder);
+
+ matches = camel_folder_search_search (
+- ifolder->search, expression, NULL, cancellable, error);
++ imapx_folder->search, expression, NULL, cancellable, error);
+
+- camel_imapx_search_set_server (isearch, NULL);
++ camel_imapx_search_set_server (imapx_search, NULL);
+
+- g_mutex_unlock (&ifolder->search_lock);
++ g_mutex_unlock (&imapx_folder->search_lock);
+
+- if (server != NULL)
+- g_object_unref (server);
++ g_clear_object (&imapx_server);
+
+ return matches;
+ }
+@@ -450,9 +419,12 @@ imapx_get_filename (CamelFolder *folder,
+ const gchar *uid,
+ GError **error)
+ {
+- CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) folder;
++ CamelIMAPXFolder *imapx_folder;
++
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
+
+- return camel_data_cache_get_filename (ifolder->cache, "cache", uid);
++ return camel_data_cache_get_filename (
++ imapx_folder->cache, "cache", uid);
+ }
+
+ static gboolean
+@@ -463,32 +435,27 @@ imapx_append_message_sync (CamelFolder *
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ store = camel_folder_get_parent_store (folder);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- if (appended_uid)
++ if (appended_uid != NULL)
+ *appended_uid = NULL;
+
+- server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
+- if (server) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_append_message (
+- server, folder, message, info, appended_uid, cancellable, error);
+- g_object_unref (server);
++ imapx_server, folder, message, info,
++ appended_uid, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ return success;
+ }
+
+@@ -497,33 +464,23 @@ imapx_expunge_sync (CamelFolder *folder,
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ store = camel_folder_get_parent_store (folder);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_expunge (
+- server, folder, cancellable, error);
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++ imapx_server, folder, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ return success;
+ }
+
+@@ -534,38 +491,23 @@ imapx_fetch_messages_sync (CamelFolder *
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelService *service;
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
+- service = CAMEL_SERVICE (parent_store);
++ store = camel_folder_get_parent_store (folder);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- if (!camel_service_connect_sync (service, cancellable, error))
+- return FALSE;
+-
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_fetch_messages (
+- server, folder, type, limit, cancellable, error);
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++ imapx_server, folder, type, limit, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ return success;
+ }
+
+@@ -577,17 +519,13 @@ imapx_get_message_sync (CamelFolder *fol
+ {
+ CamelMimeMessage *msg = NULL;
+ CamelStream *stream = NULL;
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) folder;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXFolder *imapx_folder;
+ const gchar *path = NULL;
+ gboolean offline_message = FALSE;
+
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
++ store = camel_folder_get_parent_store (folder);
+
+ if (!strchr (uid, '-'))
+ path = "cur";
+@@ -596,8 +534,10 @@ imapx_get_message_sync (CamelFolder *fol
+ offline_message = TRUE;
+ }
+
+- stream = camel_data_cache_get (ifolder->cache, path, uid, NULL);
++ stream = camel_data_cache_get (imapx_folder->cache, path, uid, NULL);
+ if (stream == NULL) {
++ CamelIMAPXServer *imapx_server;
++
+ if (offline_message) {
+ g_set_error (
+ error, CAMEL_FOLDER_ERROR,
+@@ -606,23 +546,15 @@ imapx_get_message_sync (CamelFolder *fol
+ return NULL;
+ }
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return NULL;
+- }
++ imapx_server = camel_imapx_store_ref_server (
++ CAMEL_IMAPX_STORE (store), error);
+
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server == NULL)
+- return NULL;
++ if (imapx_server != NULL) {
++ stream = camel_imapx_server_get_message (
++ imapx_server, folder, uid, cancellable, error);
++ }
+
+- stream = camel_imapx_server_get_message (
+- server, folder, uid, cancellable, error);
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++ g_clear_object (&imapx_server);
+ }
+
+ if (stream != NULL) {
+@@ -630,14 +562,14 @@ imapx_get_message_sync (CamelFolder *fol
+
+ msg = camel_mime_message_new ();
+
+- g_mutex_lock (&ifolder->stream_lock);
++ g_mutex_lock (&imapx_folder->stream_lock);
+ success = camel_data_wrapper_construct_from_stream_sync (
+ CAMEL_DATA_WRAPPER (msg), stream, cancellable, error);
+ if (!success) {
+ g_object_unref (msg);
+ msg = NULL;
+ }
+- g_mutex_unlock (&ifolder->stream_lock);
++ g_mutex_unlock (&imapx_folder->stream_lock);
+ g_object_unref (stream);
+ }
+
+@@ -670,26 +602,27 @@ imapx_get_quota_info_sync (CamelFolder *
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXServer *server;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ CamelFolderQuotaInfo *quota_info = NULL;
+ const gchar *folder_name;
+ gchar **quota_root_names;
+ gboolean success = FALSE;
+
++ store = camel_folder_get_parent_store (folder);
+ folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+
+- server = camel_imapx_store_get_server (
+- CAMEL_IMAPX_STORE (parent_store),
+- folder_name, cancellable, error);
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_update_quota_info (
+- server, folder_name, cancellable, error);
+- g_object_unref (server);
++ imapx_server, folder_name, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ if (!success)
+ return NULL;
+
+@@ -699,7 +632,7 @@ imapx_get_quota_info_sync (CamelFolder *
+ /* XXX Just return info for the first quota root name, I guess. */
+ if (quota_root_names != NULL && quota_root_names[0] != NULL)
+ quota_info = camel_imapx_store_dup_quota_info (
+- CAMEL_IMAPX_STORE (parent_store),
++ CAMEL_IMAPX_STORE (store),
+ quota_root_names[0]);
+
+ g_strfreev (quota_root_names);
+@@ -729,44 +662,29 @@ imapx_refresh_info_sync (CamelFolder *fo
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelService *service;
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
+- service = CAMEL_SERVICE (parent_store);
++ store = camel_folder_get_parent_store (folder);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- if (!camel_service_connect_sync (service, cancellable, error))
+- return FALSE;
+-
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_refresh_info (
+- server, folder, cancellable, error);
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++ imapx_server, folder, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ return success;
+ }
+
+ /* Helper for imapx_synchronize_sync() */
+ static gboolean
+-imapx_move_to_real_junk (CamelIMAPXServer *server,
++imapx_move_to_real_junk (CamelIMAPXServer *imapx_server,
+ CamelFolder *folder,
+ GCancellable *cancellable,
+ gboolean *out_need_to_expunge,
+@@ -782,7 +700,7 @@ imapx_move_to_real_junk (CamelIMAPXServe
+ uids_to_copy = g_ptr_array_new_with_free_func (
+ (GDestroyNotify) camel_pstring_free);
+
+- settings = camel_imapx_server_ref_settings (server);
++ settings = camel_imapx_server_ref_settings (imapx_server);
+ if (camel_imapx_settings_get_use_real_junk_path (settings)) {
+ real_junk_path =
+ camel_imapx_settings_dup_real_junk_path (settings);
+@@ -795,7 +713,7 @@ imapx_move_to_real_junk (CamelIMAPXServe
+ CamelFolder *destination = NULL;
+ CamelIMAPXStore *store;
+
+- store = camel_imapx_server_ref_store (server);
++ store = camel_imapx_server_ref_store (imapx_server);
+
+ if (real_junk_path != NULL) {
+ destination = camel_store_get_folder_sync (
+@@ -814,7 +732,8 @@ imapx_move_to_real_junk (CamelIMAPXServe
+ success = TRUE;
+ } else if (destination != NULL) {
+ success = camel_imapx_server_copy_message (
+- server, folder, destination,
++ imapx_server,
++ folder, destination,
+ uids_to_copy, TRUE,
+ cancellable, error);
+ *out_need_to_expunge = success;
+@@ -839,7 +758,7 @@ imapx_move_to_real_junk (CamelIMAPXServe
+
+ /* Helper for imapx_synchronize_sync() */
+ static gboolean
+-imapx_move_to_real_trash (CamelIMAPXServer *server,
++imapx_move_to_real_trash (CamelIMAPXServer *imapx_server,
+ CamelFolder *folder,
+ GCancellable *cancellable,
+ gboolean *out_need_to_expunge,
+@@ -855,7 +774,7 @@ imapx_move_to_real_trash (CamelIMAPXServ
+ uids_to_copy = g_ptr_array_new_with_free_func (
+ (GDestroyNotify) camel_pstring_free);
+
+- settings = camel_imapx_server_ref_settings (server);
++ settings = camel_imapx_server_ref_settings (imapx_server);
+ if (camel_imapx_settings_get_use_real_trash_path (settings)) {
+ real_trash_path =
+ camel_imapx_settings_dup_real_trash_path (settings);
+@@ -868,7 +787,7 @@ imapx_move_to_real_trash (CamelIMAPXServ
+ CamelFolder *destination = NULL;
+ CamelIMAPXStore *store;
+
+- store = camel_imapx_server_ref_store (server);
++ store = camel_imapx_server_ref_store (imapx_server);
+
+ if (real_trash_path != NULL) {
+ destination = camel_store_get_folder_sync (
+@@ -887,7 +806,8 @@ imapx_move_to_real_trash (CamelIMAPXServ
+ success = TRUE;
+ } else if (destination != NULL) {
+ success = camel_imapx_server_copy_message (
+- server, folder, destination,
++ imapx_server,
++ folder, destination,
+ uids_to_copy, TRUE,
+ cancellable, error);
+ *out_need_to_expunge = success;
+@@ -916,42 +836,32 @@ imapx_synchronize_sync (CamelFolder *fol
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ store = camel_folder_get_parent_store (folder);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ gboolean need_to_expunge;
+
+ success = camel_imapx_server_sync_changes (
+- server, folder, cancellable, error);
++ imapx_server, folder, cancellable, error);
+
+ if (success) {
+ success = imapx_move_to_real_junk (
+- server, folder, cancellable,
++ imapx_server, folder, cancellable,
+ &need_to_expunge, error);
+ expunge |= need_to_expunge;
+ }
+
+ if (success) {
+ success = imapx_move_to_real_trash (
+- server, folder, cancellable,
++ imapx_server, folder, cancellable,
+ &need_to_expunge, error);
+ expunge |= need_to_expunge;
+ }
+@@ -961,12 +871,11 @@ imapx_synchronize_sync (CamelFolder *fol
+
+ if (success && expunge)
+ success = camel_imapx_server_expunge (
+- server, folder, cancellable, error);
+-
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++ imapx_server, folder, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ return success;
+ }
+
+@@ -976,33 +885,23 @@ imapx_synchronize_message_sync (CamelFol
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- folder_name = camel_folder_get_full_name (folder);
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ store = camel_folder_get_parent_store (folder);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_sync_message (
+- server, folder, uid, cancellable, error);
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++ imapx_server, folder, uid, cancellable, error);
+ }
+
++ g_clear_object (&imapx_server);
++
+ return success;
+ }
+
+@@ -1015,39 +914,29 @@ imapx_transfer_messages_to_sync (CamelFo
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
+- CamelIMAPXServer *server;
+- const gchar *folder_name;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = FALSE;
+
+- folder_name = camel_folder_get_full_name (source);
+- parent_store = camel_folder_get_parent_store (source);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ store = camel_folder_get_parent_store (source);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (istore))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (
+- istore, folder_name, cancellable, error);
+- if (server != NULL) {
++ if (imapx_server != NULL) {
+ success = camel_imapx_server_copy_message (
+- server, source, dest, uids,
++ imapx_server, source, dest, uids,
+ delete_originals, cancellable, error);
+- camel_imapx_store_op_done (istore, server, folder_name);
+- g_object_unref (server);
++
++ /* Update destination folder only if it's not frozen,
++ * to avoid updating for each "move" action on a single
++ * message while filtering. */
++ if (!camel_folder_is_frozen (dest))
++ imapx_refresh_info_sync (dest, cancellable, NULL);
+ }
+
+- /* update destination folder only if not frozen, to not update
+- * for each single message transfer during filtering
+- */
+- if (!camel_folder_is_frozen (dest))
+- imapx_refresh_info_sync (dest, cancellable, NULL);
++ g_clear_object (&imapx_server);
+
+ return success;
+ }
+@@ -1056,15 +945,15 @@ static void
+ imapx_rename (CamelFolder *folder,
+ const gchar *new_name)
+ {
+- CamelStore *parent_store;
+- CamelIMAPXStore *istore;
++ CamelStore *store;
++ CamelIMAPXStore *imapx_store;
+ const gchar *folder_name;
+
+- parent_store = camel_folder_get_parent_store (folder);
+- istore = CAMEL_IMAPX_STORE (parent_store);
++ store = camel_folder_get_parent_store (folder);
++ imapx_store = CAMEL_IMAPX_STORE (store);
+
+ camel_store_summary_disconnect_folder_summary (
+- CAMEL_STORE_SUMMARY (istore->summary),
++ CAMEL_STORE_SUMMARY (imapx_store->summary),
+ folder->summary);
+
+ /* Chain up to parent's rename() method. */
+@@ -1074,7 +963,7 @@ imapx_rename (CamelFolder *folder,
+ folder_name = camel_folder_get_full_name (folder);
+
+ camel_store_summary_connect_folder_summary (
+- CAMEL_STORE_SUMMARY (istore->summary),
++ CAMEL_STORE_SUMMARY (imapx_store->summary),
+ folder_name, folder->summary);
+ }
+
+@@ -1182,7 +1071,7 @@ camel_imapx_folder_new (CamelStore *stor
+ CamelFolder *folder;
+ CamelService *service;
+ CamelSettings *settings;
+- CamelIMAPXFolder *ifolder;
++ CamelIMAPXFolder *imapx_folder;
+ const gchar *short_name;
+ gchar *state_file;
+ gboolean filter_all;
+@@ -1217,12 +1106,9 @@ camel_imapx_folder_new (CamelStore *stor
+ "display-name", short_name,
+ "full_name", folder_name,
+ "parent-store", store, NULL);
+- ifolder = (CamelIMAPXFolder *) folder;
+-
+- ((CamelIMAPXFolder *) folder)->raw_name = g_strdup (folder_name);
+
+ folder->summary = camel_imapx_summary_new (folder);
+- if (!folder->summary) {
++ if (folder->summary == NULL) {
+ g_set_error (
+ error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ _("Could not create folder summary for %s"),
+@@ -1230,8 +1116,9 @@ camel_imapx_folder_new (CamelStore *stor
+ return NULL;
+ }
+
+- ifolder->cache = camel_data_cache_new (folder_dir, error);
+- if (!ifolder->cache) {
++ imapx_folder = CAMEL_IMAPX_FOLDER (folder);
++ imapx_folder->cache = camel_data_cache_new (folder_dir, error);
++ if (imapx_folder->cache == NULL) {
+ g_prefix_error (
+ error, _("Could not create cache for %s: "),
+ short_name);
+@@ -1243,25 +1130,33 @@ camel_imapx_folder_new (CamelStore *stor
+ g_free (state_file);
+ camel_object_state_read (CAMEL_OBJECT (folder));
+
+- ifolder->search = camel_imapx_search_new ();
+- g_mutex_init (&ifolder->search_lock);
+- g_mutex_init (&ifolder->stream_lock);
+- ifolder->ignore_recent = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
+- ifolder->exists_on_server = 0;
+- ifolder->unread_on_server = 0;
+- ifolder->modseq_on_server = 0;
+- ifolder->uidnext_on_server = 0;
++ imapx_folder->search = camel_imapx_search_new ();
++ g_mutex_init (&imapx_folder->search_lock);
++ g_mutex_init (&imapx_folder->stream_lock);
++ imapx_folder->ignore_recent = g_hash_table_new_full (
++ (GHashFunc) g_str_hash,
++ (GEqualFunc) g_str_equal,
++ (GDestroyNotify) g_free,
++ (GDestroyNotify) NULL);
++ imapx_folder->exists_on_server = 0;
++ imapx_folder->unread_on_server = 0;
++ imapx_folder->modseq_on_server = 0;
++ imapx_folder->uidnext_on_server = 0;
++
++ if (filter_all)
++ folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
+
+- if (!g_ascii_strcasecmp (folder_name, "INBOX")) {
+- if (filter_inbox || filter_all)
++ if (g_ascii_strcasecmp (folder_name, "INBOX") == 0) {
++ if (filter_inbox)
+ folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
++
+ if (filter_junk)
+ folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
+ } else {
+ if (filter_junk && !filter_junk_inbox)
+ folder->folder_flags |= CAMEL_FOLDER_FILTER_JUNK;
+
+- if (filter_all || imapx_folder_get_apply_filters (ifolder))
++ if (imapx_folder_get_apply_filters (imapx_folder))
+ folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
+ }
+
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-folder.h.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-folder.h
+--- evolution-data-server-3.8.5/camel/camel-imapx-folder.h.kill-imapx-conn-manager 2013-07-23 07:57:54.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel-imapx-folder.h 2013-09-12 15:51:33.331412252 -0400
+@@ -62,7 +62,6 @@ struct _CamelIMAPXFolder {
+ CamelOfflineFolder parent;
+ CamelIMAPXFolderPrivate *priv;
+
+- gchar *raw_name;
+ CamelDataCache *cache;
+ CamelFolderSearch *search;
+
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-server.c.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-server.c
+--- evolution-data-server-3.8.5/camel/camel-imapx-server.c.kill-imapx-conn-manager 2013-07-23 07:57:58.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel-imapx-server.c 2013-09-12 15:51:33.348412247 -0400
+@@ -351,14 +351,6 @@ enum {
+ PROP_STORE
+ };
+
+-enum {
+- SELECT_CHANGED,
+- SHUTDOWN,
+- LAST_SIGNAL
+-};
+-
+-static guint signals[LAST_SIGNAL];
+-
+ static void imapx_uidset_init (struct _uidset_state *ss,
+ gint total,
+ gint limit);
+@@ -2297,9 +2289,7 @@ imapx_untagged_bye (CamelIMAPXServer *is
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *imapx_store;
+- CamelService *service;
+- CamelServiceConnectionStatus status;
++ CamelIMAPXStore *store;
+ guchar *token = NULL;
+
+ g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE);
+@@ -2317,18 +2307,11 @@ imapx_untagged_bye (CamelIMAPXServer *is
+
+ is->state = IMAPX_SHUTDOWN;
+
+- imapx_store = camel_imapx_server_ref_store (is);
+- service = CAMEL_SERVICE (imapx_store);
+- status = camel_service_get_connection_status (service);
+-
+- /* Do not disconnect the service if we're still connecting.
+- * camel_service_disconnect_sync() will cancel the connect
+- * operation and the server message will get replaced with
+- * a generic "Operation was cancelled" message. */
+- if (status == CAMEL_SERVICE_CONNECTED)
+- camel_service_disconnect_sync (service, FALSE, NULL, NULL);
+-
+- g_object_unref (imapx_store);
++ /* Disconnect the CamelIMAPXStore. */
++ store = camel_imapx_server_ref_store (is);
++ camel_service_disconnect_sync (
++ CAMEL_SERVICE (store), FALSE, NULL, NULL);
++ g_object_unref (store);
+
+ return FALSE;
+ }
+@@ -3469,7 +3452,6 @@ imapx_command_select_done (CamelIMAPXSer
+ GCancellable *cancellable,
+ GError **error)
+ {
+- const gchar *selected_folder = NULL;
+ gboolean success = TRUE;
+ GError *local_error = NULL;
+
+@@ -3580,7 +3562,6 @@ imapx_command_select_done (CamelIMAPXSer
+ ;
+ }
+ ifolder->uidvalidity_on_server = is->uidvalidity;
+- selected_folder = camel_folder_get_full_name (folder);
+
+ if (is->uidvalidity && is->uidvalidity != ((CamelIMAPXSummary *) folder->summary)->validity)
+ invalidate_local_cache (ifolder, is->uidvalidity);
+@@ -3599,8 +3580,6 @@ imapx_command_select_done (CamelIMAPXSer
+
+ camel_imapx_command_unref (ic);
+
+- g_signal_emit (is, signals[SELECT_CHANGED], 0, selected_folder);
+-
+ return success;
+ }
+
+@@ -6874,6 +6853,7 @@ imapx_parser_thread (gpointer d)
+ {
+ CamelIMAPXServer *is = d;
+ CamelIMAPXStream *stream;
++ CamelIMAPXStore *store;
+ GCancellable *cancellable;
+ gboolean have_stream;
+ GError *local_error = NULL;
+@@ -6965,8 +6945,6 @@ imapx_parser_thread (gpointer d)
+
+ cancel_all_jobs (is, local_error);
+
+- g_clear_error (&local_error);
+-
+ QUEUE_LOCK (is);
+ if (is->cancellable != NULL) {
+ g_object_unref (is->cancellable);
+@@ -6976,7 +6954,14 @@ imapx_parser_thread (gpointer d)
+ QUEUE_UNLOCK (is);
+
+ is->parser_quit = FALSE;
+- g_signal_emit (is, signals[SHUTDOWN], 0);
++
++ /* Disconnect the CamelService. */
++ store = camel_imapx_server_ref_store (is);
++ camel_service_disconnect_sync (
++ CAMEL_SERVICE (store), FALSE, NULL, NULL);
++ g_object_unref (store);
++
++ g_clear_error (&local_error);
+
+ return NULL;
+ }
+@@ -7141,9 +7126,6 @@ camel_imapx_server_class_init (CamelIMAP
+ object_class->dispose = imapx_server_dispose;
+ object_class->constructed = imapx_server_constructed;
+
+- class->select_changed = NULL;
+- class->shutdown = NULL;
+-
+ g_object_class_install_property (
+ object_class,
+ PROP_STREAM,
+@@ -7167,32 +7149,6 @@ camel_imapx_server_class_init (CamelIMAP
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
+- /**
+- * CamelIMAPXServer::select_changed
+- * @server: the #CamelIMAPXServer which emitted the signal
+- **/
+- signals[SELECT_CHANGED] = g_signal_new (
+- "select_changed",
+- G_OBJECT_CLASS_TYPE (class),
+- G_SIGNAL_RUN_FIRST,
+- G_STRUCT_OFFSET (CamelIMAPXServerClass, select_changed),
+- NULL, NULL,
+- g_cclosure_marshal_VOID__STRING,
+- G_TYPE_NONE, 1, G_TYPE_STRING);
+-
+- /**
+- * CamelIMAPXServer::shutdown
+- * @server: the #CamelIMAPXServer which emitted the signal
+- **/
+- signals[SHUTDOWN] = g_signal_new (
+- "shutdown",
+- G_OBJECT_CLASS_TYPE (class),
+- G_SIGNAL_RUN_FIRST,
+- G_STRUCT_OFFSET (CamelIMAPXServerClass, shutdown),
+- NULL, NULL,
+- g_cclosure_marshal_VOID__VOID,
+- G_TYPE_NONE, 0);
+-
+ class->tagprefix = 'A';
+ }
+
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-server.h.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-server.h
+--- evolution-data-server-3.8.5/camel/camel-imapx-server.h.kill-imapx-conn-manager 2013-07-23 07:57:54.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel-imapx-server.h 2013-09-12 15:51:33.350412247 -0400
+@@ -164,11 +164,6 @@ struct _CamelIMAPXServer {
+ struct _CamelIMAPXServerClass {
+ CamelObjectClass parent_class;
+
+- /* Signals */
+- void (*select_changed) (CamelIMAPXServer *is,
+- const gchar *selected_folder);
+- void (*shutdown) (CamelIMAPXServer *is);
+-
+ gchar tagprefix;
+ };
+
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-store.c.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-store.c
+--- evolution-data-server-3.8.5/camel/camel-imapx-store.c.kill-imapx-conn-manager 2013-07-23 07:57:57.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel-imapx-store.c 2013-09-12 15:51:33.358412244 -0400
+@@ -57,6 +57,10 @@
+ ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStorePrivate))
+
+ struct _CamelIMAPXStorePrivate {
++ CamelIMAPXServer *connected_server;
++ CamelIMAPXServer *connecting_server;
++ GMutex server_lock;
++
+ GHashTable *quota_info;
+ GMutex quota_info_lock;
+ };
+@@ -189,24 +193,10 @@ imapx_store_dispose (GObject *object)
+ {
+ CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (object);
+
+- /* Force disconnect so we dont have it run later,
+- * after we've cleaned up some stuff. */
+- if (imapx_store->con_man != NULL) {
+- camel_service_disconnect_sync (
+- CAMEL_SERVICE (imapx_store), TRUE, NULL, NULL);
+- g_object_unref (imapx_store->con_man);
+- imapx_store->con_man = NULL;
+- }
+-
+- if (imapx_store->authenticating_server != NULL) {
+- g_object_unref (imapx_store->authenticating_server);
+- imapx_store->authenticating_server = NULL;
+- }
+-
+- if (imapx_store->summary != NULL) {
+- g_object_unref (imapx_store->summary);
+- imapx_store->summary = NULL;
+- }
++ g_clear_object (&imapx_store->summary);
++
++ g_clear_object (&imapx_store->priv->connected_server);
++ g_clear_object (&imapx_store->priv->connecting_server);
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (camel_imapx_store_parent_class)->dispose (object);
+@@ -219,6 +209,8 @@ imapx_store_finalize (GObject *object)
+
+ g_mutex_clear (&imapx_store->get_finfo_lock);
+
++ g_mutex_clear (&imapx_store->priv->server_lock);
++
+ g_hash_table_destroy (imapx_store->priv->quota_info);
+ g_mutex_clear (&imapx_store->priv->quota_info_lock);
+
+@@ -257,42 +249,48 @@ imapx_get_name (CamelService *service,
+ return name;
+ }
+
+-CamelIMAPXServer *
+-camel_imapx_store_get_server (CamelIMAPXStore *istore,
+- const gchar *folder_name,
+- GCancellable *cancellable,
+- GError **error)
+-{
+- return camel_imapx_conn_manager_get_connection (
+- istore->con_man, folder_name, cancellable, error);
+-}
+-
+-void
+-camel_imapx_store_op_done (CamelIMAPXStore *istore,
+- CamelIMAPXServer *server,
+- const gchar *folder_name)
+-{
+- g_return_if_fail (server != NULL);
+-
+- camel_imapx_conn_manager_update_con_info (
+- istore->con_man, server, folder_name);
+-}
+-
+ static gboolean
+ imapx_connect_sync (CamelService *service,
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) service;
+- CamelIMAPXServer *server;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
++ gboolean success;
+
+- server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
+- if (server) {
+- g_object_unref (server);
+- return TRUE;
++ imapx_store = CAMEL_IMAPX_STORE (service);
++ imapx_server = camel_imapx_server_new (imapx_store);
++
++ g_mutex_lock (&imapx_store->priv->server_lock);
++
++ /* We need to share the CamelIMAPXServer instance with the
++ * authenticate_sync() method, but we don't want other parts
++ * getting at it just yet. So stash it in a special private
++ * variable while connecting to the IMAP server. */
++ g_warn_if_fail (imapx_store->priv->connecting_server == NULL);
++ imapx_store->priv->connecting_server = g_object_ref (imapx_server);
++
++ g_mutex_unlock (&imapx_store->priv->server_lock);
++
++ success = camel_imapx_server_connect (
++ imapx_server, cancellable, error);
++
++ g_mutex_lock (&imapx_store->priv->server_lock);
++
++ g_warn_if_fail (imapx_store->priv->connecting_server == imapx_server);
++ g_clear_object (&imapx_store->priv->connecting_server);
++
++ if (success) {
++ g_clear_object (&imapx_store->priv->connected_server);
++ imapx_store->priv->connected_server = imapx_server;
++ g_object_ref (imapx_server);
+ }
+
+- return FALSE;
++ g_mutex_unlock (&imapx_store->priv->server_lock);
++
++ g_clear_object (&imapx_server);
++
++ return success;
+ }
+
+ static gboolean
+@@ -301,15 +299,16 @@ imapx_disconnect_sync (CamelService *ser
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = CAMEL_IMAPX_STORE (service);
+- CamelServiceClass *service_class;
++ CamelIMAPXStore *imapx_store;
+
+- service_class = CAMEL_SERVICE_CLASS (camel_imapx_store_parent_class);
+- if (!service_class->disconnect_sync (service, clean, cancellable, error))
+- return FALSE;
++ imapx_store = CAMEL_IMAPX_STORE (service);
++
++ g_mutex_lock (&imapx_store->priv->server_lock);
+
+- if (istore->con_man != NULL)
+- camel_imapx_conn_manager_close_connections (istore->con_man);
++ g_warn_if_fail (imapx_store->priv->connecting_server == NULL);
++ g_clear_object (&imapx_store->priv->connected_server);
++
++ g_mutex_unlock (&imapx_store->priv->server_lock);
+
+ return TRUE;
+ }
+@@ -320,23 +319,23 @@ imapx_authenticate_sync (CamelService *s
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = CAMEL_IMAPX_STORE (service);
+- CamelIMAPXServer *server;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
++ CamelAuthenticationResult result;
++
++ imapx_store = CAMEL_IMAPX_STORE (service);
++
++ /* This should have been set for us by connect_sync(). */
++ g_mutex_lock (&imapx_store->priv->server_lock);
++ imapx_server = g_object_ref (imapx_store->priv->connecting_server);
++ g_mutex_unlock (&imapx_store->priv->server_lock);
++
++ result = camel_imapx_server_authenticate (
++ imapx_server, mechanism, cancellable, error);
+
+- /* CamelIMAPXConnManager sets this before calling
+- * camel_imapx_server_connect()(), and then clears it
+- * immediately after, all while holding the recursive
+- * connection lock (CAMEL_SERVICE_REC_CONNECT_LOCK).
+- * Otherwise we'd have no way of knowing which server
+- * is trying to authenticate. */
+- server = istore->authenticating_server;
+-
+- g_return_val_if_fail (
+- CAMEL_IS_IMAPX_SERVER (server),
+- CAMEL_AUTHENTICATION_REJECTED);
++ g_clear_object (&imapx_server);
+
+- return camel_imapx_server_authenticate (
+- server, mechanism, cancellable, error);
++ return result;
+ }
+
+ CamelServiceAuthType camel_imapx_password_authtype = {
+@@ -650,62 +649,64 @@ imapx_mark_folder_subscribed (CamelIMAPX
+
+ static gboolean
+ imapx_subscribe_folder (CamelStore *store,
+- const gchar *folder_name,
++ const gchar *folder_path,
+ gboolean emit_signal,
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+- CamelIMAPXServer *server;
+- gboolean success;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
++ gboolean success = FALSE;
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store)))
+- return TRUE;
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
+- if (!server)
+- return FALSE;
++ if (folder_path != NULL && *folder_path == '/')
++ folder_path++;
+
+- if (folder_name && *folder_name == '/')
+- folder_name++;
++ if (imapx_server != NULL) {
++ success = camel_imapx_server_manage_subscription (
++ imapx_server, folder_path, TRUE, cancellable, error);
++ }
+
+- success = camel_imapx_server_manage_subscription (
+- server, folder_name, TRUE, cancellable, error);
+- g_object_unref (server);
++ if (success) {
++ imapx_mark_folder_subscribed (
++ imapx_store, folder_path, emit_signal);
++ }
+
+- if (success)
+- imapx_mark_folder_subscribed (istore, folder_name, emit_signal);
++ g_clear_object (&imapx_server);
+
+ return success;
+ }
+
+ static gboolean
+ imapx_unsubscribe_folder (CamelStore *store,
+- const gchar *folder_name,
++ const gchar *folder_path,
+ gboolean emit_signal,
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+- CamelIMAPXServer *server;
+- gboolean success;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
++ gboolean success = FALSE;
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store)))
+- return TRUE;
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
+- if (!server)
+- return FALSE;
++ if (folder_path != NULL && *folder_path == '/')
++ folder_path++;
+
+- if (folder_name && *folder_name == '/')
+- folder_name++;
++ if (imapx_server != NULL) {
++ success = camel_imapx_server_manage_subscription (
++ imapx_server, folder_path, FALSE, cancellable, error);
++ }
+
+- success = camel_imapx_server_manage_subscription (
+- server, folder_name, FALSE, cancellable, error);
+- g_object_unref (server);
++ if (success) {
++ imapx_unmark_folder_subscribed (
++ imapx_store, folder_path, emit_signal);
++ }
+
+- if (success)
+- imapx_unmark_folder_subscribed (istore, folder_name, emit_signal);
++ g_clear_object (&imapx_server);
+
+ return success;
+ }
+@@ -1043,7 +1044,7 @@ get_namespaces (CamelIMAPXStore *istore)
+ }
+
+ static GHashTable *
+-fetch_folders_for_namespaces (CamelIMAPXStore *istore,
++fetch_folders_for_namespaces (CamelIMAPXStore *imapx_store,
+ const gchar *pattern,
+ gboolean sync,
+ GCancellable *cancellable,
+@@ -1053,15 +1054,15 @@ fetch_folders_for_namespaces (CamelIMAPX
+ GHashTable *folders = NULL;
+ GList *namespaces = NULL, *l;
+
+- server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
+- if (!server)
++ server = camel_imapx_store_ref_server (imapx_store, error);
++
++ if (server == NULL)
+ return NULL;
+
+ folders = g_hash_table_new (folder_hash, folder_eq);
+- namespaces = get_namespaces (istore);
++ namespaces = get_namespaces (imapx_store);
+
+- for (l = namespaces; l != NULL; l = g_list_next (l))
+- {
++ for (l = namespaces; l != NULL; l = g_list_next (l)) {
+ CamelIMAPXStoreNamespace *ns = l->data;
+
+ while (ns) {
+@@ -1085,7 +1086,7 @@ fetch_folders_for_namespaces (CamelIMAPX
+
+ flags |= CAMEL_STORE_FOLDER_INFO_RECURSIVE;
+ if (!fetch_folders_for_pattern (
+- istore, server, pat, flags, list_ext,
++ imapx_store, server, pat, flags, list_ext,
+ folders, cancellable, error)) {
+ g_free (pat);
+ goto exception;
+@@ -1095,7 +1096,7 @@ fetch_folders_for_namespaces (CamelIMAPX
+ * issue LSUB to list the subscribed folders separately */
+ flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
+ if (!fetch_folders_for_pattern (
+- istore, server, pat, flags, NULL,
++ imapx_store, server, pat, flags, NULL,
+ folders, cancellable, error)) {
+ g_free (pat);
+ goto exception;
+@@ -1578,29 +1579,24 @@ imapx_store_create_folder_sync (CamelSto
+ {
+ CamelStoreInfo *si;
+ CamelIMAPXStoreNamespace *ns;
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+- CamelIMAPXServer *server;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gchar *real_name, *full_name, *parent_real;
+ CamelFolderInfo *fi = NULL;
+ gchar dir_sep = 0;
+ gboolean success;
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return NULL;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- server = camel_imapx_store_get_server (istore, NULL, cancellable, error);
+- if (!server)
++ if (imapx_server == NULL)
+ return NULL;
+
+- if (!parent_name)
++ if (parent_name == NULL)
+ parent_name = "";
+
+- ns = camel_imapx_store_summary_namespace_find_path (istore->summary, parent_name);
++ ns = camel_imapx_store_summary_namespace_find_path (
++ imapx_store->summary, parent_name);
+ if (ns)
+ dir_sep = ns->sep;
+
+@@ -1613,47 +1609,56 @@ imapx_store_create_folder_sync (CamelSto
+ CAMEL_FOLDER_ERROR_INVALID_PATH,
+ _("The folder name \"%s\" is invalid because it contains the character \"%c\""),
+ folder_name, dir_sep);
+- g_object_unref (server);
+- return NULL;
++ goto exit;
+ }
+
+- parent_real = camel_imapx_store_summary_full_from_path (istore->summary, parent_name);
++ parent_real = camel_imapx_store_summary_full_from_path (
++ imapx_store->summary, parent_name);
+ if (parent_real == NULL) {
+ g_set_error (
+ error, CAMEL_FOLDER_ERROR,
+ CAMEL_FOLDER_ERROR_INVALID_STATE,
+ _("Unknown parent folder: %s"), parent_name);
+- g_object_unref (server);
+- return NULL;
++ goto exit;
+ }
+
+- si = camel_store_summary_path ((CamelStoreSummary *) istore->summary, parent_name);
++ si = camel_store_summary_path (
++ (CamelStoreSummary *) imapx_store->summary, parent_name);
+ if (si && si->flags & CAMEL_STORE_INFO_FOLDER_NOINFERIORS) {
+ g_set_error (
+ error, CAMEL_FOLDER_ERROR,
+ CAMEL_FOLDER_ERROR_INVALID_STATE,
+ _("The parent folder is not allowed to contain subfolders"));
+- g_object_unref (server);
+- return NULL;
++ goto exit;
+ }
+
+ if (si)
+- camel_store_summary_info_free ((CamelStoreSummary *) istore->summary, si);
++ camel_store_summary_info_free (
++ (CamelStoreSummary *) imapx_store->summary, si);
+
+- real_name = camel_imapx_store_summary_path_to_full (istore->summary, folder_name, dir_sep);
+- full_name = imapx_concat (istore, parent_real, real_name);
++ real_name = camel_imapx_store_summary_path_to_full (
++ imapx_store->summary, folder_name, dir_sep);
++ full_name = imapx_concat (imapx_store, parent_real, real_name);
+ g_free (real_name);
+
+ success = camel_imapx_server_create_folder (
+- server, full_name, cancellable, error);
+- g_object_unref (server);
++ imapx_server, full_name, cancellable, error);
++ g_object_unref (imapx_server);
+
+ if (success) {
++ CamelStoreSummary *summary;
+ CamelIMAPXStoreInfo *si;
++ const gchar *folder_path;
+
+- si = camel_imapx_store_summary_add_from_full (istore->summary, full_name, dir_sep);
+- camel_store_summary_save ((CamelStoreSummary *) istore->summary);
+- fi = imapx_build_folder_info (istore, camel_store_info_path (istore->summary, si));
++ summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
++
++ si = camel_imapx_store_summary_add_from_full (
++ imapx_store->summary, full_name, dir_sep);
++ camel_store_summary_save (summary);
++ folder_path = camel_store_info_path (
++ summary, (CamelStoreInfo *) si);
++ fi = imapx_build_folder_info (
++ imapx_store, folder_path);
+ fi->flags |= CAMEL_FOLDER_NOCHILDREN;
+ camel_store_folder_created (store, fi);
+ }
+@@ -1661,6 +1666,9 @@ imapx_store_create_folder_sync (CamelSto
+ g_free (full_name);
+ g_free (parent_real);
+
++exit:
++ g_clear_object (&imapx_server);
++
+ return fi;
+ }
+
+@@ -1670,29 +1678,23 @@ imapx_store_delete_folder_sync (CamelSto
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+- CamelIMAPXServer *server;
+- gboolean success;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
++ gboolean success = FALSE;
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
++
++ if (imapx_server != NULL) {
++ success = camel_imapx_server_delete_folder (
++ imapx_server, folder_name, cancellable, error);
+ }
+- /* Use INBOX connection as the implementation would try to select inbox to ensure
+- * we are not selected on the folder being deleted */
+- server = camel_imapx_store_get_server (istore, "INBOX", cancellable, error);
+- if (!server)
+- return FALSE;
+
+- success = camel_imapx_server_delete_folder (
+- server, folder_name, cancellable, error);
+- g_object_unref (server);
++ if (success) {
++ imapx_delete_folder_from_cache (imapx_store, folder_name);
++ }
+
+- if (success)
+- imapx_delete_folder_from_cache (istore, folder_name);
++ g_clear_object (&imapx_server);
+
+ return success;
+ }
+@@ -1704,12 +1706,11 @@ imapx_store_rename_folder_sync (CamelSto
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+- CamelIMAPXServer *server;
+ CamelService *service;
+ CamelSettings *settings;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ const gchar *user_cache_dir;
+- gchar *oldpath, *newpath, *storage_path;
+ gboolean use_subscriptions;
+ gboolean success = FALSE;
+
+@@ -1723,52 +1724,52 @@ imapx_store_rename_folder_sync (CamelSto
+
+ g_object_unref (settings);
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))) {
+- g_set_error (
+- error, CAMEL_SERVICE_ERROR,
+- CAMEL_SERVICE_ERROR_UNAVAILABLE,
+- _("You must be working online to complete this operation"));
+- return FALSE;
+- }
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, error);
+
+- if (use_subscriptions)
+- imapx_unsubscribe_folder (store, old, FALSE, cancellable, NULL);
++ if (imapx_server != NULL) {
++ gchar *oldpath;
++ gchar *newpath;
++ gchar *storage_path;
++
++ if (use_subscriptions)
++ imapx_unsubscribe_folder (
++ store, old, FALSE, cancellable, NULL);
+
+- /* Use INBOX connection as the implementation would try to select inbox to ensure
+- * we are not selected on the folder being renamed */
+- server = camel_imapx_store_get_server (istore, "INBOX", cancellable, error);
+- if (server) {
+ success = camel_imapx_server_rename_folder (
+- server, old, new, cancellable, error);
+- g_object_unref (server);
+- }
+-
+- if (!success) {
+- imapx_subscribe_folder (store, old, FALSE, cancellable, NULL);
+- return FALSE;
+- }
++ imapx_server, old, new, cancellable, error);
+
+- /* rename summary, and handle broken server */
+- rename_folder_info (istore, old, new);
++ if (!success) {
++ imapx_subscribe_folder (
++ store, old, FALSE, cancellable, NULL);
++ goto exit;
++ }
+
+- if (use_subscriptions)
+- success = imapx_subscribe_folder (
+- store, new, FALSE, cancellable, error);
++ /* Rename summary, and handle broken server. */
++ rename_folder_info (imapx_store, old, new);
+
+- storage_path = g_build_filename (user_cache_dir, "folders", NULL);
+- oldpath = imapx_path_to_physical (storage_path, old);
+- newpath = imapx_path_to_physical (storage_path, new);
+- g_free (storage_path);
++ if (use_subscriptions)
++ success = imapx_subscribe_folder (
++ store, new, FALSE, cancellable, error);
++
++ storage_path = g_build_filename (user_cache_dir, "folders", NULL);
++ oldpath = imapx_path_to_physical (storage_path, old);
++ newpath = imapx_path_to_physical (storage_path, new);
++ g_free (storage_path);
++
++ /* So do we care if this didn't work? Its just a cache? */
++ if (g_rename (oldpath, newpath) == -1) {
++ g_warning (
++ "Could not rename message cache '%s' to '%s': %s: cache reset",
++ oldpath, newpath, g_strerror (errno));
++ }
+
+- /* So do we care if this didn't work? Its just a cache? */
+- if (g_rename (oldpath, newpath) == -1) {
+- g_warning (
+- "Could not rename message cache '%s' to '%s': %s: cache reset",
+- oldpath, newpath, g_strerror (errno));
++ g_free (oldpath);
++ g_free (newpath);
+ }
+
+- g_free (oldpath);
+- g_free (newpath);
++exit:
++ g_clear_object (&imapx_server);
+
+ return success;
+ }
+@@ -1778,25 +1779,21 @@ imapx_store_noop_sync (CamelStore *store
+ GCancellable *cancellable,
+ GError **error)
+ {
+- CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+- GList *list, *link;
++ CamelIMAPXStore *imapx_store;
++ CamelIMAPXServer *imapx_server;
+ gboolean success = TRUE;
+
+- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store)))
+- return TRUE;
++ /* If we're not connected then this truly is a no-op. */
+
+- list = camel_imapx_conn_manager_get_connections (istore->con_man);
++ imapx_store = CAMEL_IMAPX_STORE (store);
++ imapx_server = camel_imapx_store_ref_server (imapx_store, NULL);
+
+- for (link = list; link != NULL; link = g_list_next (link)) {
+- CamelIMAPXServer *server = CAMEL_IMAPX_SERVER (link->data);
+-
+- /* we just return last noops value, technically not correct though */
+- success = camel_imapx_server_noop (server, NULL, cancellable, error);
+- if (!success)
+- break;
++ if (imapx_server != NULL) {
++ success = camel_imapx_server_noop (
++ imapx_server, NULL, cancellable, error);
+ }
+
+- g_list_free_full (list, (GDestroyNotify) g_object_unref);
++ g_clear_object (&imapx_server);
+
+ return success;
+ }
+@@ -2026,7 +2023,8 @@ camel_imapx_store_init (CamelIMAPXStore
+ g_mutex_init (&store->get_finfo_lock);
+ store->last_refresh_time = time (NULL) - (FINFO_REFRESH_INTERVAL + 10);
+ store->dir_sep = '/';
+- store->con_man = camel_imapx_conn_manager_new (CAMEL_STORE (store));
++
++ g_mutex_init (&store->priv->server_lock);
+
+ store->priv->quota_info = g_hash_table_new_full (
+ (GHashFunc) g_str_hash,
+@@ -2042,6 +2040,50 @@ camel_imapx_store_init (CamelIMAPXStore
+ G_CALLBACK (imapx_store_update_store_flags), NULL);
+ }
+
++/**
++ * camel_imapx_store_ref_server:
++ * @store: a #CamelIMAPXStore
++ * @error: return location for a #GError, or %NULL
++ *
++ * Returns the #CamelIMAPXServer for @store, if available.
++ *
++ * As a convenience, if the @store is not currently connected to an IMAP
++ * server, the function sets @error to %CAMEL_SERVER_ERROR_UNAVAILABLE and
++ * returns %NULL. If an operation can possibly be executed while offline,
++ * pass %NULL for @error.
++ *
++ * The returned #CamelIMAPXServer is referenced for thread-safety and must
++ * be unreferenced with g_object_unref() when finished with it.
++ *
++ * Returns: a #CamelIMAPXServer, or %NULL
++ *
++ * Since: 3.10
++ **/
++CamelIMAPXServer *
++camel_imapx_store_ref_server (CamelIMAPXStore *store,
++ GError **error)
++{
++ CamelIMAPXServer *server = NULL;
++
++ g_return_val_if_fail (CAMEL_IS_IMAPX_STORE (store), NULL);
++
++ g_mutex_lock (&store->priv->server_lock);
++
++ if (store->priv->connected_server != NULL) {
++ server = g_object_ref (store->priv->connected_server);
++ } else {
++ g_set_error (
++ error, CAMEL_SERVICE_ERROR,
++ CAMEL_SERVICE_ERROR_UNAVAILABLE,
++ _("You must be working online "
++ "to complete this operation"));
++ }
++
++ g_mutex_unlock (&store->priv->server_lock);
++
++ return server;
++}
++
+ CamelFolderQuotaInfo *
+ camel_imapx_store_dup_quota_info (CamelIMAPXStore *store,
+ const gchar *quota_root_name)
+diff -up evolution-data-server-3.8.5/camel/camel-imapx-store.h.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/camel-imapx-store.h
+--- evolution-data-server-3.8.5/camel/camel-imapx-store.h.kill-imapx-conn-manager 2013-07-23 07:57:56.000000000 -0400
++++ evolution-data-server-3.8.5/camel/camel-imapx-store.h 2013-09-12 15:51:33.360412244 -0400
+@@ -32,7 +32,6 @@
+
+ #include "camel-imapx-server.h"
+ #include "camel-imapx-store-summary.h"
+-#include "camel-imapx-conn-manager.h"
+
+ /* Standard GObject macros */
+ #define CAMEL_TYPE_IMAPX_STORE \
+@@ -63,9 +62,6 @@ struct _CamelIMAPXStore {
+ CamelOfflineStore parent;
+ CamelIMAPXStorePrivate *priv;
+
+- CamelIMAPXConnManager *con_man;
+- CamelIMAPXServer *authenticating_server;
+-
+ CamelIMAPXStoreSummary *summary; /* in-memory list of folders */
+ gchar dir_sep;
+
+@@ -91,13 +87,8 @@ struct _CamelIMAPXStoreClass {
+
+ GType camel_imapx_store_get_type (void);
+ CamelIMAPXServer *
+- camel_imapx_store_get_server (CamelIMAPXStore *store,
+- const gchar *folder_name,
+- GCancellable *cancellable,
++ camel_imapx_store_ref_server (CamelIMAPXStore *store,
+ GError **error);
+-void camel_imapx_store_op_done (CamelIMAPXStore *istore,
+- CamelIMAPXServer *server,
+- const gchar *folder_name);
+ CamelFolderQuotaInfo *
+ camel_imapx_store_dup_quota_info
+ (CamelIMAPXStore *store,
+diff -up evolution-data-server-3.8.5/camel/Makefile.am.kill-imapx-conn-manager evolution-data-server-3.8.5/camel/Makefile.am
+--- evolution-data-server-3.8.5/camel/Makefile.am.kill-imapx-conn-manager 2013-04-18 11:33:59.000000000 -0400
++++ evolution-data-server-3.8.5/camel/Makefile.am 2013-09-12 15:51:33.270412271 -0400
+@@ -180,7 +180,6 @@ libcamel_1_2_la_SOURCES = \
+ camel-vee-summary.c \
+ camel-vtrash-folder.c \
+ camel-imapx-command.c \
+- camel-imapx-conn-manager.c \
+ camel-imapx-folder.c \
+ camel-imapx-job.c \
+ camel-imapx-search.c \
+@@ -315,7 +314,6 @@ libcamelinclude_HEADERS = \
+ camel-vee-summary.h \
+ camel-vtrash-folder.h \
+ camel-imapx-command.h \
+- camel-imapx-conn-manager.h \
+ camel-imapx-folder.h \
+ camel-imapx-job.h \
+ camel-imapx-search.h \
+diff -up evolution-data-server-3.8.5/docs/reference/camel/camel-docs.sgml.kill-imapx-conn-manager evolution-data-server-3.8.5/docs/reference/camel/camel-docs.sgml
+--- evolution-data-server-3.8.5/docs/reference/camel/camel-docs.sgml.kill-imapx-conn-manager 2013-03-17 08:46:02.000000000 -0400
++++ evolution-data-server-3.8.5/docs/reference/camel/camel-docs.sgml 2013-09-12 15:51:33.397412234 -0400
+@@ -202,7 +202,6 @@
+
+ Extensible IMAP
+
+-
+
+
+
+diff -up evolution-data-server-3.8.5/docs/reference/camel/camel-sections.txt.kill-imapx-conn-manager evolution-data-server-3.8.5/docs/reference/camel/camel-sections.txt
+--- evolution-data-server-3.8.5/docs/reference/camel/camel-sections.txt.kill-imapx-conn-manager 2013-08-11 07:26:25.000000000 -0400
++++ evolution-data-server-3.8.5/docs/reference/camel/camel-sections.txt 2013-09-12 15:51:33.407412231 -0400
+@@ -770,29 +770,6 @@ camel_imapx_command_queue_delete_link
+
+
+
+-camel-imapx-conn-manager
+-CamelIMAPXConnManager
+-CamelIMAPXConnManager
+-camel_imapx_conn_manager_new
+-camel_imapx_conn_manager_ref_store
+-camel_imapx_conn_manager_get_connection
+-camel_imapx_conn_manager_close_connections
+-camel_imapx_conn_manager_get_connections
+-camel_imapx_conn_manager_update_con_info
+-
+-CAMEL_IMAPX_CONN_MANAGER
+-CAMEL_IS_IMAPX_CONN_MANAGER
+-CAMEL_TYPE_IMAPX_CONN_MANAGER
+-CAMEL_IMAPX_CONN_MANAGER_CLASS
+-CAMEL_IS_IMAPX_CONN_MANAGER_CLASS
+-CAMEL_IMAPX_CONN_MANAGER_GET_CLASS
+-CamelIMAPXConnManagerClass
+-camel_imapx_conn_manager_get_type
+-
+-CamelIMAPXConnManagerPrivate
+-
+-
+-
+ camel-imapx-folder
+ CamelIMAPXFolder
+ CamelIMAPXFolder
+@@ -970,8 +947,7 @@ CamelIMAPXSettingsPrivate
+ camel-imapx-store
+ CamelIMAPXStore
+ CamelIMAPXStore
+-camel_imapx_store_get_server
+-camel_imapx_store_op_done
++camel_imapx_store_ref_server
+ camel_imapx_store_dup_quota_info
+ camel_imapx_store_set_quota_info
+
+diff -up evolution-data-server-3.8.5/docs/reference/camel/camel.types.kill-imapx-conn-manager evolution-data-server-3.8.5/docs/reference/camel/camel.types
+--- evolution-data-server-3.8.5/docs/reference/camel/camel.types.kill-imapx-conn-manager 2013-08-11 07:26:25.000000000 -0400
++++ evolution-data-server-3.8.5/docs/reference/camel/camel.types 2013-09-12 15:51:33.417412228 -0400
+@@ -16,7 +16,6 @@ camel_folder_search_get_type
+ camel_folder_summary_get_type
+ camel_gpg_context_get_type
+ camel_html_parser_get_type
+-camel_imapx_conn_manager_get_type
+ camel_imapx_folder_get_type
+ camel_imapx_search_get_type
+ camel_imapx_server_get_type
diff --git a/SOURCES/evolution-data-server-3.8.5-maildir-tmp-autocreate.patch b/SOURCES/evolution-data-server-3.8.5-maildir-tmp-autocreate.patch
new file mode 100644
index 0000000..05a4811
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-maildir-tmp-autocreate.patch
@@ -0,0 +1,18 @@
+diff -up evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c.maildir-tmp-autocreate evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c
+--- evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c.maildir-tmp-autocreate 2013-07-23 13:57:51.000000000 +0200
++++ evolution-data-server-3.8.5/camel/providers/local/camel-maildir-store.c 2013-08-12 10:31:18.600063994 +0200
+@@ -506,9 +506,11 @@ scan_fi (CamelStore *store,
+ cur = g_build_filename (path, dir_name, "cur", NULL);
+ new = g_build_filename (path, dir_name, "new", NULL);
+
+- if (!(g_stat (tmp, &st) == 0 && S_ISDIR (st.st_mode)
+- && g_stat (cur, &st) == 0 && S_ISDIR (st.st_mode)
+- && g_stat (new, &st) == 0 && S_ISDIR (st.st_mode)))
++ if (!(g_stat (cur, &st) == 0 && S_ISDIR (st.st_mode)
++ && g_stat (new, &st) == 0 && S_ISDIR (st.st_mode)
++ /* Create 'tmp' dir on demand, if other directories are there,
++ because some backup tools can drop the 'tmp' directory. */
++ && ((g_stat (tmp, &st) == 0 && S_ISDIR (st.st_mode)) || g_mkdir (tmp, 0700) == 0)))
+ fi->flags |= CAMEL_FOLDER_NOSELECT;
+
+ g_free (new);
diff --git a/SOURCES/evolution-data-server-3.8.5-vcard-param-parsing-too-strict.patch b/SOURCES/evolution-data-server-3.8.5-vcard-param-parsing-too-strict.patch
new file mode 100644
index 0000000..8970dcd
--- /dev/null
+++ b/SOURCES/evolution-data-server-3.8.5-vcard-param-parsing-too-strict.patch
@@ -0,0 +1,20 @@
+diff -up evolution-data-server-3.8.5/addressbook/libebook-contacts/e-vcard.c.vcard-param-parsing-too-strict evolution-data-server-3.8.5/addressbook/libebook-contacts/e-vcard.c
+--- evolution-data-server-3.8.5/addressbook/libebook-contacts/e-vcard.c.vcard-param-parsing-too-strict 2013-07-23 13:58:03.000000000 +0200
++++ evolution-data-server-3.8.5/addressbook/libebook-contacts/e-vcard.c 2013-10-03 11:14:44.437054165 +0200
+@@ -489,9 +489,13 @@ read_attribute_params (EVCardAttribute *
+ }
+ if (colon)
+ break;
+- }
+- else {
+- g_warning ("invalid character found in parameter spec");
++ } else if (param) {
++ /* reading param value, which is SAFE-CHAR, aka
++ any character except CTLs, DQUOTE, ";", ":", "," */
++ g_string_append_unichar (str, g_utf8_get_char (lp));
++ lp = g_utf8_next_char (lp);
++ } else {
++ g_warning ("invalid character (%c/0x%02x) found in parameter spec (%s)", *lp, *lp, lp);
+ g_string_assign (str, "");
+ /* skip_until (&lp, ":;"); */
+
diff --git a/SPECS/evolution-data-server.spec b/SPECS/evolution-data-server.spec
new file mode 100644
index 0000000..ab7f088
--- /dev/null
+++ b/SPECS/evolution-data-server.spec
@@ -0,0 +1,1729 @@
+%define ldap_support 1
+%define static_ldap 0
+%define krb5_support 1
+%define nntp_support 1
+%define largefile_support 1
+
+%define glib2_version 2.34.0
+%define gtk3_version 3.2.0
+%define gcr_version 3.4
+%define gtk_doc_version 1.9
+%define intltool_version 0.35.5
+%define libsecret_version 0.5
+%define libgdata_version 0.10.0
+%define libgweather_version 3.5.0
+%define libical_version 0.46
+%define libsoup_version 2.40.3
+%define sqlite_version 3.5
+%define nss_version 3.14
+
+%define eds_base_version 3.8
+
+%define camel_provider_dir %{_libdir}/evolution-data-server/camel-providers
+%define ebook_backends_dir %{_libdir}/evolution-data-server/addressbook-backends
+%define ecal_backends_dir %{_libdir}/evolution-data-server/calendar-backends
+%define modules_dir %{_libdir}/evolution-data-server/registry-modules
+
+### Abstract ###
+
+Name: evolution-data-server
+Version: 3.8.5
+Release: 8%{?dist}
+Group: System Environment/Libraries
+Summary: Backend data server for Evolution
+License: LGPLv2+
+URL: http://projects.gnome.org/evolution/
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Source: http://download.gnome.org/sources/%{name}/3.8/%{name}-%{version}.tar.xz
+
+Provides: evolution-webcal = %{version}
+Obsoletes: evolution-webcal < 2.24.0
+
+### Patches ###
+
+# RH bug #243296
+Patch01: evolution-data-server-1.11.5-fix-64bit-acinclude.patch
+
+# RH bug #995516
+Patch02: evolution-data-server-3.8.5-cert-viewer-crash.patch
+
+# RH bug #995702
+Patch03: evolution-data-server-3.8.5-maildir-tmp-autocreate.patch
+
+# RH bug #997407
+Patch04: evolution-data-server-3.8.5-google-caldav-v2.patch
+
+# Remove CamelIMAPXConnManager. See commit message for justification.
+# https://git.gnome.org/browse/evolution-data-server/commit/?id=5484498
+Patch05: evolution-data-server-3.8.5-kill-imapx-conn-manager.patch
+
+# RH bug #1014683
+Patch06: evolution-data-server-3.8.5-vcard-param-parsing-too-strict.patch
+
+# RH bug #1016436
+Patch08: evolution-data-server-3.8.5-imapx-connect-store.patch
+
+# RH bug #1027219
+Patch09: evolution-data-server-3.8.5-imapx-server-dispose-block.patch
+
+### Build Dependencies ###
+
+BuildRequires: libdb-devel
+BuildRequires: gcr-devel >= %{gcr_version}
+BuildRequires: gettext
+BuildRequires: glib2-devel >= %{glib2_version}
+BuildRequires: gnome-common
+BuildRequires: gnome-online-accounts-devel
+BuildRequires: gnutls-devel
+BuildRequires: gperf
+BuildRequires: gtk-doc >= %{gtk_doc_version}
+BuildRequires: gtk3-devel >= %{gtk3_version}
+BuildRequires: intltool >= %{intltool_version}
+BuildRequires: libgdata-devel >= %{libgdata_version}
+BuildRequires: libgweather-devel >= %{libgweather_version}
+BuildRequires: libical-devel >= %{libical_version}
+BuildRequires: libsecret-devel >= %{libsecret_version}
+BuildRequires: libsoup-devel >= %{libsoup_version}
+BuildRequires: libtool
+BuildRequires: nspr-devel
+BuildRequires: nss-devel >= %{nss_version}
+BuildRequires: sqlite-devel >= %{sqlite_version}
+BuildRequires: vala
+BuildRequires: vala-tools
+
+%if %{ldap_support}
+%if %{static_ldap}
+BuildRequires: openldap-devel%{?_isa}
+BuildRequires: openssl-devel
+%else
+BuildRequires: openldap-devel >= 2.0.11
+%endif
+%endif
+
+%if %{krb5_support}
+BuildRequires: krb5-devel
+# tweak for krb5 1.2 vs 1.3
+%define krb5dir /usr/kerberos
+#define krb5dir `pwd`/krb5-fakeprefix
+%endif
+
+%description
+The %{name} package provides a unified backend for programs that work
+with contacts, tasks, and calendar information.
+
+It was originally developed for Evolution (hence the name), but is now used
+by other packages.
+
+%package devel
+Summary: Development files for building against %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: gnome-online-accounts-devel
+Requires: libgdata-devel
+Requires: libgweather-devel
+Requires: libical-devel
+Requires: libsecret-devel
+Requires: libsoup-devel
+Requires: sqlite-devel
+
+%description devel
+Development files needed for building things which link against %{name}.
+
+%package doc
+Summary: Documentation files for %{name}
+Group: Development/Libraries
+BuildArch: noarch
+
+%description doc
+This package contains developer documentation for %{name}.
+
+%prep
+%setup -q
+
+%patch01 -p1 -b .fix-64bit-acinclude
+%patch02 -p1 -b .cert-viewer-crash
+%patch03 -p1 -b .maildir-tmp-autocreate
+%patch04 -p1 -b .google-caldav-v2
+%patch05 -p1 -b .kill-imapx-conn-manager
+%patch06 -p1 -b .vcard-param-parsing-too-strict
+%patch08 -p1 -b .imapx-connect-store
+%patch09 -p1 -b .imapx-server-dispose-block
+
+mkdir -p krb5-fakeprefix/include
+mkdir -p krb5-fakeprefix/lib
+mkdir -p krb5-fakeprefix/%{_lib}
+
+%build
+%if %{ldap_support}
+
+%if %{static_ldap}
+%define ldap_flags --with-openldap=yes --with-static-ldap
+# Set LIBS so that configure will be able to link with static LDAP libraries,
+# which depend on Cyrus SASL and OpenSSL. XXX Is the "else" clause necessary?
+if pkg-config openssl ; then
+ export LIBS="-lsasl2 `pkg-config --libs openssl`"
+else
+ export LIBS="-lsasl2 -lssl -lcrypto"
+fi
+# newer versions of openldap are built with Mozilla NSS crypto, so also need
+# those libs to link with the static ldap libs
+if pkg-config nss ; then
+ export LIBS="$LIBS `pkg-config --libs nss`"
+else
+ export LIBS="$LIBS -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
+fi
+%else
+%define ldap_flags --with-openldap=yes
+%endif
+
+%else
+%define ldap_flags --without-openldap
+%endif
+
+%if %{krb5_support}
+%define krb5_flags --with-krb5=%{krb5dir}
+%else
+%define krb5_flags --without-krb5
+%endif
+
+%if %{nntp_support}
+%define nntp_flags --enable-nntp=yes
+%else
+%define nntp_flags --enable-nntp=no
+%endif
+
+%if %{largefile_support}
+%define largefile_flags --enable-largefile
+%else
+%define largefile_flags --disable-largefile
+%endif
+
+%define ssl_flags --enable-smime=yes
+
+if ! pkg-config --exists nss; then
+ echo "Unable to find suitable version of nss to use!"
+ exit 1
+fi
+
+export CPPFLAGS="-I%{_includedir}/et"
+export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED -fPIC -I%{_includedir}/et"
+
+# Regenerate configure to pick up configure.in and acinclude.m4 changes..
+aclocal -I m4
+autoheader
+automake --add-missing
+libtoolize
+intltoolize --force
+autoconf
+
+# See Ross Burton's blog entry for why we want --with-libdb.
+# http://www.burtonini.com/blog//computers/eds-libdb-2006-07-18-10-40
+
+%configure \
+ --disable-maintainer-mode \
+ --disable-uoa \
+ --with-libdb=/usr \
+ --enable-file-locking=fcntl \
+ --enable-dot-locking=no \
+ --enable-gtk-doc \
+ --enable-introspection=yes \
+ --enable-vala-bindings \
+ %ldap_flags %krb5_flags %nntp_flags %ssl_flags \
+ %largefile_flags
+export tagname=CC
+
+# Do not build in parallel. The libedata-book and libedata-cal directories
+# each produce a shared library and an executable binary that links to the
+# shared library. If the executable binary finishes first the build fails.
+# There may be other similar cases in the source tree.
+#make %{?_smp_mflags} LIBTOOL=/usr/bin/libtool
+make LIBTOOL=/usr/bin/libtool
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export tagname=CC
+make DESTDIR=$RPM_BUILD_ROOT LIBTOOL=/usr/bin/libtool install
+
+# remove libtool archives for importers and the like
+find $RPM_BUILD_ROOT/%{_libdir} -name '*.la' -exec rm {} \;
+rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/evolution-data-server/camel-providers/*.a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/evolution-data-server/addressbook-backends/*.a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/evolution-data-server/calendar-backends/*.a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/evolution-data-server/registry-modules/*.a
+
+# give the libraries some executable bits
+find $RPM_BUILD_ROOT -name '*.so.*' -exec chmod +x {} \;
+
+%find_lang %{name}-%{eds_base_version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+if [ $1 -eq 0 ] ; then
+ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+fi
+
+%posttrans
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+
+%files -f %{name}-%{eds_base_version}.lang
+%defattr(-,root,root,-)
+%doc README COPYING ChangeLog NEWS AUTHORS
+%{_libdir}/libcamel-1.2.so.*
+%{_libdir}/libebackend-1.2.so.*
+%{_libdir}/libebook-1.2.so.*
+%{_libdir}/libebook-contacts-1.2.so.*
+%{_libdir}/libecal-1.2.so.*
+%{_libdir}/libedata-book-1.2.so.*
+%{_libdir}/libedata-cal-1.2.so.*
+%{_libdir}/libedataserver-1.2.so.*
+
+%{_libdir}/girepository-1.0/EBook-1.2.typelib
+%{_libdir}/girepository-1.0/EBookContacts-1.2.typelib
+%{_libdir}/girepository-1.0/EDataServer-1.2.typelib
+
+%{_libexecdir}/camel-index-control-1.2
+%{_libexecdir}/camel-lock-helper-1.2
+%{_libexecdir}/evolution-addressbook-factory
+%{_libexecdir}/evolution-calendar-factory
+%{_libexecdir}/evolution-source-registry
+%{_libexecdir}/evolution-user-prompter
+
+# GSettings schemas:
+%{_datadir}/GConf/gsettings/libedataserver.convert
+%{_datadir}/GConf/gsettings/evolution-data-server.convert
+%{_datadir}/glib-2.0/schemas/org.gnome.Evolution.DefaultSources.gschema.xml
+%{_datadir}/glib-2.0/schemas/org.gnome.evolution-data-server.addressbook.gschema.xml
+%{_datadir}/glib-2.0/schemas/org.gnome.evolution-data-server.calendar.gschema.xml
+%{_datadir}/glib-2.0/schemas/org.gnome.evolution.eds-shell.gschema.xml
+%{_datadir}/glib-2.0/schemas/org.gnome.evolution.shell.network-config.gschema.xml
+
+%{_datadir}/evolution-data-server
+%{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.AddressBook.service
+%{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.Calendar.service
+%{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.Sources.service
+%{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.UserPrompter.service
+%{_datadir}/pixmaps/evolution-data-server
+
+%dir %{_libdir}/evolution-data-server
+%dir %{camel_provider_dir}
+%dir %{ebook_backends_dir}
+%dir %{ecal_backends_dir}
+%dir %{modules_dir}
+
+# Camel providers:
+%{camel_provider_dir}/libcamelimapx.so
+%{camel_provider_dir}/libcamelimapx.urls
+
+%{camel_provider_dir}/libcamellocal.so
+%{camel_provider_dir}/libcamellocal.urls
+
+%{camel_provider_dir}/libcamelnntp.so
+%{camel_provider_dir}/libcamelnntp.urls
+
+%{camel_provider_dir}/libcamelpop3.so
+%{camel_provider_dir}/libcamelpop3.urls
+
+%{camel_provider_dir}/libcamelsendmail.so
+%{camel_provider_dir}/libcamelsendmail.urls
+
+%{camel_provider_dir}/libcamelsmtp.so
+%{camel_provider_dir}/libcamelsmtp.urls
+
+# e-d-s extensions:
+%{ebook_backends_dir}/libebookbackendfile.so
+%{ebook_backends_dir}/libebookbackendgoogle.so
+%{ebook_backends_dir}/libebookbackendldap.so
+%{ebook_backends_dir}/libebookbackendwebdav.so
+%{ebook_backends_dir}/module-data-book-factory-goa.so
+%{ecal_backends_dir}/libecalbackendcaldav.so
+%{ecal_backends_dir}/libecalbackendcontacts.so
+%{ecal_backends_dir}/libecalbackendfile.so
+%{ecal_backends_dir}/libecalbackendhttp.so
+%{ecal_backends_dir}/libecalbackendweather.so
+%{ecal_backends_dir}/module-data-cal-factory-goa.so
+%{modules_dir}/module-cache-reaper.so
+%{modules_dir}/module-google-backend.so
+%{modules_dir}/module-gnome-online-accounts.so
+%{modules_dir}/module-owncloud-backend.so
+%{modules_dir}/module-trust-prompt.so
+%{modules_dir}/module-yahoo-backend.so
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/evolution-data-server
+%{_libdir}/libcamel-1.2.so
+%{_libdir}/libebackend-1.2.so
+%{_libdir}/libebook-1.2.so
+%{_libdir}/libebook-contacts-1.2.so
+%{_libdir}/libecal-1.2.so
+%{_libdir}/libedata-book-1.2.so
+%{_libdir}/libedata-cal-1.2.so
+%{_libdir}/libedataserver-1.2.so
+%{_libdir}/pkgconfig/camel-1.2.pc
+%{_libdir}/pkgconfig/evolution-data-server-1.2.pc
+%{_libdir}/pkgconfig/libebackend-1.2.pc
+%{_libdir}/pkgconfig/libebook-1.2.pc
+%{_libdir}/pkgconfig/libebook-contacts-1.2.pc
+%{_libdir}/pkgconfig/libecal-1.2.pc
+%{_libdir}/pkgconfig/libedata-book-1.2.pc
+%{_libdir}/pkgconfig/libedata-cal-1.2.pc
+%{_libdir}/pkgconfig/libedataserver-1.2.pc
+%{_datadir}/gir-1.0/EBook-1.2.gir
+%{_datadir}/gir-1.0/EBookContacts-1.2.gir
+%{_datadir}/gir-1.0/EDataServer-1.2.gir
+%{_datadir}/vala/vapi/libebook-1.2.deps
+%{_datadir}/vala/vapi/libebook-1.2.vapi
+%{_datadir}/vala/vapi/libebook-contacts-1.2.deps
+%{_datadir}/vala/vapi/libebook-contacts-1.2.vapi
+%{_datadir}/vala/vapi/libedataserver-1.2.deps
+%{_datadir}/vala/vapi/libedataserver-1.2.vapi
+
+%files doc
+%defattr(-,root,root,-)
+%{_datadir}/gtk-doc/html/camel
+%{_datadir}/gtk-doc/html/libebackend
+%{_datadir}/gtk-doc/html/libebook
+%{_datadir}/gtk-doc/html/libebook-contacts
+%{_datadir}/gtk-doc/html/libecal
+%{_datadir}/gtk-doc/html/libedata-book
+%{_datadir}/gtk-doc/html/libedata-cal
+%{_datadir}/gtk-doc/html/libedataserver
+
+%changelog
+* Thu Nov 07 2013 Milan Crha - 3.8.5-8
+- Add patch for RH bug #1027219 (IMAPx blocks on server's dispose)
+
+* Tue Nov 05 2013 Milan Crha - 3.8.5-7
+- Remove patch for RH bug #1017164 (it caused sever regressions)
+
+* Tue Oct 15 2013 Milan Crha - 3.8.5-6
+- Add patch for RH bug #1016436 (IMAPx doesn't connect)
+
+* Thu Oct 10 2013 Milan Crha - 3.8.5-5
+- Add patch for RH bug #1017164 (IMAPx summary can vanish on error)
+
+* Thu Oct 03 2013 Milan Crha - 3.8.5-4
+- Add patch for RH bug #1014683 (vCard param value parsing too strict)
+
+* Thu Sep 12 2013 Matthew Barnes - 3.8.5-3
+- Add evolution-data-server-3.8.5-kill-imapx-conn-manager.patch.
+
+* Fri Aug 16 2013 Matthew Barnes - 3.8.5-2
+- Backport support for Google CalDAV v2 from E-D-S 3.9 (RH bug #997407).
+
+* Mon Aug 12 2013 Milan Crha - 3.8.5-1
+- Update to 3.8.5
+- Bump nss version requirement to 3.14
+- Add patch for RH bug #995516 (Crash in certificate viewer)
+- Add patch for RH bug #995702 (Autocreate 'tmp' in maildir)
+
+* Wed Jul 24 2013 Milan Crha - 3.8.4-1
+- Update to 3.8.4
+
+* Mon Jun 10 2013 Milan Crha - 3.8.3-1
+- Update to 3.8.3
+
+* Sun May 12 2013 Matthew Barnes - 3.8.2-1
+- Update to 3.8.2
+- Remove patch for RH bug 956908 (fixed upstream).
+
+* Thu May 02 2013 Milan Crha - 3.8.1-2
+- Add patch for Red Hat bug #956908 (GOA accounts forgotten on GOA crash)
+
+* Sun Apr 14 2013 Matthew Barnes - 3.8.1-1
+- Update to 3.8.1
+- Remove stuck message retrieval patch (fixed upstream).
+
+* Mon Apr 08 2013 Matthew Barnes - 3.8.0-2
+- Add patch to (hopefully) fix stuck message retrievals in IMAPX.
+ (evolution-data-server-3.8.0-imapx-stuck-get-message.patch)
+
+* Mon Mar 25 2013 Milan Crha - 3.8.0-1
+- Update to 3.8.0
+
+* Mon Mar 18 2013 Milan Crha - 3.7.92-1
+- Update to 3.7.92
+
+* Mon Mar 04 2013 Milan Crha - 3.7.91-1
+- Update to 3.7.91
+- Remove an upstream .pc files fix for a libebook split (fixed upstream)
+- Remove patch gor GNOME bug #693101 (fixed upstream)
+- Remove patch for Red Hat bug #912503 (fixed upstream)
+
+* Thu Feb 21 2013 Milan Crha - 3.7.90-3
+- Add patch gor GNOME bug #693101 (IMAPx vanishes folder summary)
+- Add patch for Red Hat bug #912503 (incorrect G_BEGIN/END_DECLS)
+
+* Mon Feb 18 2013 Milan Crha - 3.7.90-2
+- Add an upstream .pc files fix for a libebook split
+
+* Mon Feb 18 2013 Milan Crha - 3.7.90-1
+- Update to 3.7.90
+
+* Mon Feb 04 2013 Milan Crha - 3.7.5-1
+- Update to 3.7.5
+
+* Mon Jan 14 2013 Milan Crha - 3.7.4-1
+- Update to 3.7.4
+- Add --add-missing to automake call
+
+* Thu Dec 20 2012 Kalev Lember - 3.7.3-2
+- Rebuilt for libgweather 3.7.3 soname bump
+
+* Tue Dec 18 2012 Matthew Barnes - 3.7.3-1
+- Update to 3.7.3
+- Remove obsolete BuildRequires:
+ bison
+ dbus-glib-devel
+ libgnome-keyring-devel
+ liboauth-devel
+
+* Mon Nov 19 2012 Milan Crha - 3.7.2.1-1
+- Update to 3.7.2.1
+
+* Mon Oct 22 2012 Milan Crha - 3.7.1-1
+- Update to 3.7.1
+
+* Mon Sep 17 2012 Milan Crha - 3.5.92-1
+- Update to 3.5.92
+
+* Mon Sep 03 2012 Milan Crha - 3.5.91-1
+- Update to 3.5.91
+
+* Mon Aug 20 2012 Milan Crha - 3.5.90-1
+- Update to 3.5.90
+
+* Mon Aug 06 2012 Milan Crha - 3.5.5-1
+- Update to 3.5.5
+- Remove patch for less memory usage from vTrash camel folders (fixed upstream)
+
+* Thu Jul 26 2012 Milan Crha - 3.5.4-3
+- Add patch for less memory usage from vTrash camel folders
+
+* Thu Jul 19 2012 Fedora Release Engineering - 3.5.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Mon Jul 16 2012 Milan Crha - 3.5.4-1
+- Update to 3.5.4
+- Change dependency from db4 to libdb
+
+* Sun Jul 1 2012 Matthew Barnes - 3.5.3.1-1
+- Update to 3.5.3.1
+
+* Wed Jun 27 2012 Matthew Barnes - 3.5.3-3
+- Avoid exposing in a public header file.
+
+* Wed Jun 27 2012 Matthias Clasen - 3.5.3-2
+- Build against libgweather 3.5
+
+* Mon Jun 25 2012 Matthew Barnes - 3.5.3-1
+- Update to 3.5.3
+- Add BR: gcr-devel >= 3.4
+- Drop BR: GConf2-devel \o/
+
+* Mon Jun 04 2012 Milan Crha - 3.5.2-1
+- Update to 3.5.2
+
+* Sun Apr 29 2012 Matthew Barnes - 3.5.1-1
+- Update to 3.5.1
+
+* Tue Apr 24 2012 Kalev Lember - 3.4.1-2
+- Silence rpm scriptlet output
+
+* Mon Apr 16 2012 Richard Hughes - 3.4.1-1
+- Update to 3.4.1
+
+* Mon Mar 26 2012 Milan Crha - 3.4.0-1
+- Update to 3.4.0
+
+* Mon Mar 19 2012 Milan Crha - 3.3.92-1
+- Update to 3.3.92
+
+* Tue Mar 06 2012 Milan Crha - 3.3.91-1
+- Update to 3.3.91
+
+* Mon Feb 20 2012 Milan Crha - 3.3.90-1
+- Update to 3.3.90
+
+* Mon Feb 06 2012 Milan Crha - 3.3.5-1
+- Update to 3.3.5
+
+* Mon Jan 16 2012 Milan Crha - 3.3.4-1
+- Update to 3.3.4
+
+* Fri Jan 13 2012 Fedora Release Engineering - 3.3.3-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Fri Dec 30 2011 Matthew Barnes - 3.3.3-2
+- Require libgnome-keyring-devel instead of gnome-keyring-devel.
+
+* Mon Dec 19 2011 Milan Crha - 3.3.3-1
+- Update to 3.3.3
+
+* Mon Nov 21 2011 Milan Crha - 3.3.2-1
+- Update to 3.3.2
+- Remove patch to not call g_thread_init() (fixed upstream)
+
+* Mon Oct 24 2011 Milan Crha - 3.3.1-1
+- Update to 3.3.1
+- Add patch to not call g_thread_init()
+
+* Mon Sep 26 2011 Milan Crha - 3.2.0-1
+- Update to 3.2.0
+
+* Mon Sep 19 2011 Milan Crha - 3.1.92-1
+- Update to 3.1.92
+
+* Mon Sep 05 2011 Milan Crha - 3.1.91-1
+- Update to 3.1.91
+- Enable introspection and vala bindings
+
+* Mon Aug 29 2011 Milan Crha - 3.1.90-1
+- Update to 3.1.90
+
+* Mon Aug 15 2011 Milan Crha - 3.1.5-1
+- Update to 3.1.5
+
+* Sat Jul 23 2011 Matthew Barnes - 3.1.4-1
+- Update to 3.1.4
+
+* Mon Jul 04 2011 Matthew Barnes - 3.1.3-1
+- Update to 3.1.3
+- Remove patch for libgdata-0.9.0 (fixed upstream).
+- Disable SMP flags; some source directories are racy.
+- Remove keyring option; gnome-keyring is mandatory now.
+- Add BR: gnome-online-accounts-devel and liboauth-devel
+
+* Tue Jun 14 2011 Milan Crha - 3.1.2-1
+- Update to 3.1.2
+- Add patch by Philip Withnall to build against libgdata-0.9.0
+
+* Mon May 09 2011 Milan Crha - 3.1.1-1
+- Update to 3.1.1
+- Drop groupwise backends, as it was split out upstream
+
+* Mon Apr 04 2011 Milan Crha - 3.0.0-1
+- Update to 3.0.0
+
+* Mon Mar 21 2011 Milan Crha - 2.91.92-1
+- Update to 2.91.92
+
+* Mon Mar 07 2011 Milan Crha - 2.91.91-1
+- Update to 2.91.91
+
+* Mon Feb 21 2011 Milan Crha - 2.91.90-1
+- Update to 2.91.90
+
+* Fri Feb 11 2011 Matthias Clasen 2.91.6-4
+- Rebuild against newer gtk
+
+* Tue Feb 08 2011 Fedora Release Engineering - 2.91.6-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Wed Feb 2 2011 Matthias Clasen - 2.91.6-2
+- Rebuild
+
+* Mon Jan 31 2011 Milan Crha - 2.91.6-1
+- Update to 2.91.6
+- Requires gtk3.
+
+* Mon Jan 31 2011 Caolánc McNamara - 2.91.5-4
+- Rebuild against new libgweather
+
+* Tue Jan 18 2011 Matthias Clasen - 2.91.5-3
+- Rebuild against new libgdata
+
+* Thu Jan 13 2011 Matthias Clasen - 2.91.5-2
+- Move girs to -devel
+
+* Mon Jan 10 2011 Milan Crha - 2.91.5-1
+- Update to 2.91.5
+
+* Mon Dec 20 2010 Milan Crha - 2.91.4-1
+- Update to 2.91.4
+
+* Mon Nov 29 2010 Milan Crha - 2.91.3-1
+- Update to 2.91.3
+
+* Mon Nov 08 2010 Milan Crha - 2.91.2-1
+- Update to 2.91.2
+
+* Fri Nov 05 2010 Milan Crha - 2.91.1-2
+- Rebuild against newer libxml2
+
+* Mon Oct 18 2010 Milan Crha - 2.91.1-1
+- Update to 2.91.1
+
+* Mon Oct 11 2010 Milan Crha - 2.91.0-1
+- Update to 2.91.0
+
+* Wed Sep 29 2010 jkeating - 2.31.92-2
+- Rebuilt for gcc bug 634757
+
+* Mon Sep 13 2010 Milan Crha - 2.31.92-1.fc15
+- Update to 2.31.92
+
+* 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
+
+* Mon Aug 02 2010 Matthew Barnes - 2.31.6-1.fc14
+- Update to 2.31.6
+- Resume GSEAL usage.
+- Drop dbus-glib requirement.
+- Bump glib2 requirement to 2.25.12.
+- Roll back eds_base_version to 2.32.
+
+* Tue Jul 13 2010 Milan Crha - 2.31.5-1.fc14
+- Update to 2.31.5
+
+* Mon Jun 07 2010 Milan Crha - 2.31.3-1.fc14
+- Update to 2.31.3
+
+* Tue May 25 2010 Matthew Barnes - 2.31.2-2.fc14
+- Enable largefile support in Camel, to help debug GNOME bug #612082.
+ Debian turned this on recently and is experiencing problems, and I
+ want to get to the bottom of it and finally break this 2 GB barrier.
+
+* Mon May 24 2010 Milan Crha - 2.31.2-1.fc14
+- Update to 2.31.2
+- libecalbackendgoogle dropped.
+
+* Mon May 03 2010 Milan Crha - 2.31.1-1.fc14
+- Update to 2.31.1
+- Update BuildRequires.
+- Remove imap4 camel provider support (dropped upstream).
+
+* Tue Feb 09 2010 Milan Crha - 2.29.90-3.fc13
+- Return back BuildRequires: libglade2-devel.
+
+* Mon Feb 08 2010 Matthew Barnes - 2.29.90-2.fc13
+- Rebuild to hopefully fix pkgconfig auto-provides glitch.
+
+* Mon Feb 08 2010 Milan Crha - 2.29.90-1.fc13
+- Update to 2.29.90
+- Removed unneeded BuildRequires.
+
+* Mon Jan 25 2010 Milan Crha - 2.29.6-1.fc13
+- Update to 2.29.6
+
+* Tue Jan 12 2010 Milan Crha - 2.29.5-1.fc13
+- Update to 2.29.5
+- Correct Source URL
+
+* Mon Dec 21 2009 Milan Crha - 2.29.4-1.fc13
+- Update to 2.29.4
+- Remove patch for GNOME bug #487988 (fixed upstream).
+
+* Wed Dec 09 2009 Bastien Nocera 2.29.3-3
+- Remove libgnome and libgnomeui requirements
+
+* Wed Dec 02 2009 Matthew Barnes - 2.29.3-2.fc13
+- Devel subpackage does not need to require doc subpackage.
+
+* Mon Nov 30 2009 Milan Crha - 2.29.3-1.fc13
+- Update to 2.29.3
+
+* Mon Nov 16 2009 Milan Crha - 2.29.2-1.fc13
+- Update to 2.29.2
+
+* Tue Oct 27 2009 Matthew Barnes - 2.29.1-1.fc13
+- Update to 2.29.1
+- Bump eds_base_version to 2.30.
+- Add dbus-glib build requirement.
+- Drop Bonobo + ORBit dependency (yay!).
+- Remove option to use OpenSSL instead of NSS.
+- Drop eds_api_version definition since it will never change.
+- Remove patch for GNOME bug #373146 (deviates from upstream).
+
+* Mon Sep 21 2009 Milan Crha - 2.28.0-1.fc12
+- Update to 2.28.0
+
+* Mon Sep 07 2009 Milan Crha - 2.27.92-1.fc12
+- Update to 2.27.92
+
+* Thu Aug 27 2009 Matthew Barnes - 2.27.91-3.fc12
+- Rebuild with old OpenSSL, er something...
+
+* Thu Aug 27 2009 Tomas Mraz - 2.27.91-2.fc12
+- rebuilt with new openssl
+
+* Mon Aug 24 2009 Milan Crha - 2.27.91-1.fc12
+- Update to 2.27.91
+
+* Mon Aug 10 2009 Milan Crha - 2.27.90-1.fc12
+- Update to 2.27.90
+
+* Mon Jul 27 2009 Milan Crha - 2.27.5-1.fc12
+- Update to 2.27.5
+
+* Fri Jul 24 2009 Fedora Release Engineering - 2.27.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Jul 13 2009 Matthew Barnes - 2.27.4-1.fc12
+- Update to 2.27.4
+- Remove patch for RH bug #505661 (fixed upstream).
+
+* Thu Jul 02 2009 Matthew Barnes - 2.27.3-3.fc12
+- Add patch for RH bug #505661 (crash on startup).
+
+* Wed Jul 01 2009 Milan Crha - 2.27.3-2.fc12
+- Rebuild against newer gcc
+
+* Mon Jun 15 2009 Matthew Barnes - 2.27.3-1.fc12
+- Update to 2.27.3
+
+* Mon May 25 2009 Matthew Barnes - 2.27.2-1.fc12
+- Update to 2.27.2
+- Remove strict_build_settings since the settings are used upstream now.
+
+* Mon May 04 2009 Matthew Barnes - 2.27.1-1.fc12
+- Update to 2.27.1
+- Bump evo_major to 2.28.
+
+* Wed Apr 15 2009 Matthew Barnes - 2.26.1.1-1.fc11
+- Update to 2.26.1.1
+
+* Mon Apr 13 2009 Matthew Barnes - 2.26.1-1.fc11
+- Update to 2.26.1
+
+* Mon Mar 16 2009 Matthew Barnes - 2.26.0-1.fc11
+- Update to 2.26.0
+- Remove patch for RH bug #568332 (fixed upstream).
+- Remove patch for GNOME bug #573240 (reverted upstream).
+
+* Fri Mar 13 2009 Matthew Barnes - 2.25.92-4.fc11
+- Revise patch for RH bug #568332 to match upstream commit.
+
+* Thu Mar 12 2009 Matthew Barnes - 2.25.92-3.fc11
+- Add patch for RH bug #568332 (thread leak in fsync() rate limiting).
+
+* Sat Mar 07 2009 Matthew Barnes - 2.25.92-2.fc11
+- Add patch to revert GNOME bug #573240 (IMAP message loading regressions).
+
+* Mon Mar 02 2009 Matthew Barnes - 2.25.92-1.fc11
+- Update to 2.25.92
+
+* Tue Feb 24 2009 Matthias Clasen 2.25.91-3
+- Make -doc noarch
+
+* Tue Feb 24 2009 Fedora Release Engineering - 2.25.91-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Mon Feb 16 2009 Matthew Barnes - 2.25.91-1.fc11
+- Update to 2.25.91
+
+* Fri Feb 06 2009 Matthew Barnes - 2.25.90-5.fc11
+- Update BuildRoot, License, Source and URL tags.
+- Require gnome-common so we don't have to patch it out.
+
+* Wed Feb 04 2009 Matthew Barnes - 2.25.90-4.fc11
+- ... and fix our own includes too.
+
+* Wed Feb 04 2009 Matthew Barnes - 2.25.90-3.fc11
+- Work around libical's broken pkg-config file.
+
+* Mon Feb 02 2009 Matthew Barnes - 2.25.90-2.fc11
+- Forgot the libical requirement in devel subpackage.
+
+* Mon Feb 02 2009 Matthew Barnes - 2.25.90-1.fc11
+- Update to 2.25.90
+- Add libical build requirement.
+
+* Mon Jan 19 2009 Matthew Barnes - 2.25.5-1.fc11
+- Update to 2.25.5
+- Bump gtk2_version to 2.14.0.
+
+* Fri Jan 16 2009 Tomas Mraz - 2.25.4-2.fc11
+- rebuild with new openssl
+
+* Mon Jan 05 2009 Matthew Barnes - 2.25.4-1.fc11
+- Update to 2.25.4
+
+* Mon Dec 15 2008 Matthew Barnes - 2.25.3-1.fc11
+- Update to 2.25.3
+- New BR: libgweather-devel
+
+* Thu Dec 04 2008 Matthew Barnes - 2.25-2-2.fc11
+- Rebuild due to recent pkg-config breakage.
+
+* Mon Dec 01 2008 Matthew Barnes - 2.25.2-1.fc11
+- Update to 2.25.2
+
+* Thu Nov 27 2008 Matthew Barnes - 2.25.1-2.fc11
+- Obsolete the evolution-webcal package (RH bug #468855).
+
+* Mon Nov 03 2008 Matthew Barnes - 2.25.1-1.fc11
+- Update to 2.25.1
+- Bump eds_base_version to 2.26.
+- Remove patch for RH bug #467804 (fixed upstream).
+
+* Thu Oct 23 2008 Matthew Barnes - 2.24.1-2.fc10
+- Add patch for RH bug #467804 (remove console spew).
+
+* Tue Oct 21 2008 Matthew Barnes - 2.24.1-1.fc10
+- Update to 2.24.1
+
+* Mon Sep 22 2008 Matthew Barnes - 2.24.0-1.fc10
+- Update to 2.24.0
+
+* Mon Sep 08 2008 Matthew Barnes - 2.23.92-1.fc10
+- Update to 2.23.92
+
+* Mon Sep 01 2008 Matthew Barnes - 2.23.91-1.fc10
+- Update to 2.23.91
+
+* Wed Aug 20 2008 Matthew Barnes - 2.23.90.1-1.fc10
+- Update to 2.23.90.1
+
+* Mon Aug 04 2008 Matthew Barnes - 2.23.6-3.fc10
+- Add sqlite3 requirement to devel subpackage.
+
+* Mon Aug 04 2008 Matthew Barnes - 2.23.6-2.fc10
+- Add sqlite3 to Camel's pkgconfig requirements.
+
+* Mon Aug 04 2008 Matthew Barnes - 2.23.6-1.fc10
+- Update to 2.23.6
+- Add build requirement for sqlite.
+
+* Mon Jul 21 2008 Matthew Barnes - 2.23.5-1.fc10
+- Update to 2.23.5
+- Remove patch for RH bug #534080 (fixed upstream).
+
+* Fri Jul 18 2008 Tom "spot" Callaway 2.23.4-3
+- fix license tag
+
+* Thu Jul 03 2008 Matthew Barnes - 3.23.4-2.fc10
+- Add patch for RH bug #534080 (fix attachment saving).
+
+* Mon Jun 16 2008 Matthew Barnes - 3.23.4-1.fc10
+- Update to 2.23.4
+
+* Mon Jun 02 2008 Matthew Barnes - 3.23.3-1.fc10
+- Update to 2.23.3
+- Remove patch for GNOME bug #531439 (fixed upstream).
+
+* Sun May 18 2008 Matthew Barnes - 2.23.2-3.fc10
+- Add patch for GNOME bug #531439 (GPG passphrases destroy passwords).
+
+* Tue May 13 2008 Matthew Barnes - 2.23.2-2.fc10
+- Fix some third-party package breakage caused by libebackend.
+
+* Mon May 12 2008 Matthew Barnes - 2.23.2-1.fc10
+- Update to 2.23.2
+- Add files for new libebackend library.
+- Remove patch for RH bug #202309 (fixed upstream).
+
+* Mon Apr 21 2008 Matthew Barnes - 2.23.1-1.fc10
+- Update to 2.23.1
+- Bump eds_base_version to 2.24.
+- Bump glib2 requirement to 2.16.1.
+- Drop gnome-vfs2 requirement.
+
+* Mon Apr 07 2008 Matthew Barnes - 2.22.1-1.fc9
+- Update to 2.22.1
+- Remove patch for RH bug #296671 (fixed upstream).
+- Remove patch for GNOME bug #523023 (fixed upstream).
+
+* Mon Mar 24 2008 Matthew Barnes - 2.22.0-3.fc9
+- Add patch for GNOME bug #523023 (EFolder leak in evo-ex-storage).
+
+* Tue Mar 11 2008 Matthew Barnes - 2.22.0-2.fc9
+- Add patch for RH bug #296671 (GC servers may not support NTLM).
+
+* Mon Mar 10 2008 Matthew Barnes - 2.22.0-1.fc9
+- Update to 2.22.0
+
+* Mon Feb 25 2008 Matthew Barnes - 2.21.92-1.fc9
+- Update to 2.21.92
+- Remove patch for GNOME bug #516074 (fixed upstream).
+
+* Thu Feb 14 2008 Matthew Barnes - 2.21.91-3.fc9
+- Try removing the ancient "ldap-x86_64-hack" patch.
+
+* Wed Feb 13 2008 Matthew Barnes - 2.21.91-2.fc9
+- Rebuild against libsoup 2.3.2.
+
+* Mon Feb 11 2008 Matthew Barnes - 2.21.91-1.fc9
+- Update to 2.21.91
+- Add patch for GNOME bug #516074 (latest glibc breaks Camel).
+
+* Mon Jan 28 2008 Matthew Barnes - 2.21.90-1.fc9
+- Update to 2.21.90
+- Remove patch for GNOME bug #509644 (fixed upstream).
+
+* Thu Jan 17 2008 Matthew Barnes - 2.21.5-3.fc9
+- Rename evolution-1.4.4-ldap-x86_64-hack.patch to avoid namespace
+ collision with similarly named patch in evolution (RH bug #395551).
+
+* Wed Jan 16 2008 Matthew Barnes - 2.21.5-2.fc9
+- Add patch for GNOME bug #509644 (password dialog breakage).
+- Remove patch for RH bug #384741 (fixed upstream).
+- Remove patch for GNOME bug #363695 (obsolete).
+- Remove patch for GNOME bug #376991 (obsolete).
+
+* Mon Jan 14 2008 Matthew Barnes - 2.21.5-1.fc9
+- Update to 2.21.5
+
+* Mon Dec 17 2007 Matthew Barnes - 2.21.4-1.fc9
+- Update to 2.21.4
+- Require gtk-doc >= 1.9.
+
+* Tue Dec 4 2007 Matthias Clasen - 2.21.3-2
+- Rebuild against openssl
+
+* Mon Dec 03 2007 Matthew Barnes - 2.21.3-1.fc9
+- Update to 2.21.3
+
+* Thu Nov 15 2007 Matthew Barnes - 2.21.2-2.fc9
+- Add patch for RH bug #384741 (authentication crash).
+
+* Mon Nov 12 2007 Matthew Barnes - 2.21.2-1.fc9
+- Update to 2.21.2
+
+* Mon Oct 29 2007 Matthew Barnes - 2.21.1-1.fc9
+- Update to 2.21.1
+- Bump eds_base_version to 2.22.
+- Remove patch for RH bug #212106 (fixed upstream).
+- Remove patch for GNOME bug #417999 (fixed upstream).
+
+* Fri Oct 26 2007 Matthew Barnes - 1.12.1-4.fc9
+- Remove the use_gtk_doc macro.
+- Remove redundant requirements.
+- Use the name tag where appropriate.
+- Add an evolution-data-server-doc subpackage.
+
+* Thu Oct 18 2007 Matthew Barnes - 1.12.1-3.fc9
+- Porting a couple patches over from RHEL5:
+- Add patch for RH bug #212106 (address book error on fresh install).
+- Add patch for RH bug #215702 (bad search filter for LDAP address books).
+
+* Tue Oct 16 2007 Matthew Barnes - 1.12.1-2.fc8
+- Disable patch for GNOME bug #376991 for now. It may be contributing
+ to password prompting problems as described in RH bug #296671.
+
+* Mon Oct 15 2007 Milan Crha - 1.12.1-1.fc8
+- Update to 1.12.1
+
+* Mon Sep 17 2007 Matthew Barnes - 1.12.0-1.fc8
+- Update to 1.12.0
+
+* Mon Sep 03 2007 Matthew Barnes - 1.11.92-1.fc8
+- Update to 1.11.92
+
+* Tue Aug 28 2007 Milan Crha - 1.11.91-1.fc8
+- Update to 1.11.91
+- Removed patch for RH bug #215634 (fixed upstream).
+- Removed patch for GNOME bug #466987 (fixed upstream).
+
+* Wed Aug 22 2007 Adam Jackson 1.11.90-4.fc8
+- Add Requires: glib2 >= 2.14.0, since it's in the buildroot now, and
+ forcibly introduces deps on symbols that don't exist in 2.13. If
+ only we had working symbol versioning.
+
+* Mon Aug 20 2007 Matthew Barnes - 1.11.90-3.fc8
+- Revise patch for GNOME bug #417999 to fix GNOME bug #447591
+ (Automatic Contacts combo boxes don't work).
+
+* Mon Aug 13 2007 Matthew Barnes - 1.11.90-2.fc8
+- Re-enable the --with-libdb configure option.
+
+* Mon Aug 13 2007 Matthew Barnes - 1.11.90-1.fc8
+- Update to 1.11.90
+- Add patch for GNOME bug #466987 (glibc redefines "open").
+- Remove patch for GNOME bug #415891 (fixed upstream).
+
+* Wed Aug 08 2007 Matthew Barnes - 1.11.6.1-1.fc8
+- Update to 1.11.6.1
+
+* Tue Jul 31 2007 Matthew Barnes - 1.11.6-1.fc8
+- Update to 1.11.6
+- Remove patch for GNOME bug #380534 (fixed upstream).
+
+* Fri Jul 27 2007 Matthew Barnes - 1.11.5-3.fc8
+- Add patch for GNOME bug #380534 (clarify version requirements).
+
+* Tue Jul 17 2007 Matthew Barnes - 1.11.5-2.fc8
+- Add patch for RH bug #243296 (fix LDAP configuration).
+
+* Mon Jul 09 2007 Matthew Barnes - 1.11.5-1.fc8
+- Update to 1.11.5
+
+* Mon Jun 18 2007 Matthew Barnes - 1.11.4-1.fc8
+- Update to 1.11.4
+- Remove patch for RH bug #202309 (fixed upstream).
+- Remove patch for GNOME bug #312854 (fixed upstream).
+- Remove patch for GNOME bug #447414 (fixed upstream).
+
+* Fri Jun 15 2007 Matthew Barnes - 1.11.3-3.fc8
+- Add patch for GNOME bug #224277 (Camel IMAP security flaw).
+
+* Thu Jun 14 2007 Matthew Barnes - 1.11.3-2.fc8
+- Add patch for GNOME bug #312584 (renaming Exchange folders).
+
+* Mon Jun 04 2007 Matthew Barnes - 1.11.3-1.fc8
+- Update to 1.11.3
+- Remove patch for GNOME bug #415922 (fixed upstream).
+
+* Thu May 31 2007 Matthew Barnes - 1.11.2-3.fc8
+- Revise patch for GNOME bug #376991 to fix RH bug #241974.
+
+* Mon May 21 2007 Matthew Barnes - 1.11.2-2.fc8
+- Store account passwords in GNOME Keyring.
+
+* Fri May 18 2007 Matthew Barnes - 1.11.2-1.fc8
+- Update to 1.11.2
+- Bump eds_base_version to 1.12.
+- Add patch to fix implicit function declarations.
+- Remove patch for RH bug #203058 (fixed upstream).
+- Remove patch for RH bug #210142 (fixed upstream).
+- Remove patch for RH bug #235290 (fixed upstream).
+- Remove patch for GNOME bug #360240 (fixed upstream).
+- Remove patch for GNOME bug #360619 (fixed upstream).
+- Remove patch for GNOME bug #373117 (fixed upstream).
+- Revise patch for GNOME bug #415891 (partially fixed upstream).
+
+* Wed May 09 2007 Matthew Barnes - 1.10.1-6.fc7
+- Add patch for RH bug #215634 (read NSS certificates more reliably).
+
+* Tue May 08 2007 Matthew Barnes - 1.10.1-5.fc7
+- Add patch for GNOME bug #373146 (spam message triggers crash).
+
+* Mon May 07 2007 Matthew Barnes - 1.10.1-4.fc7
+- Add patch to fix a dangling pointer in e-source-group.c.
+
+* Mon Apr 30 2007 Matthew Barnes - 1.10.1-3.fc7
+- Revise patch for RH bug #235290 to not break string freeze.
+
+* Tue Apr 24 2007 Matthew Barnes - 1.10.1-2.fc7
+- Add patch for RH bug #235290 (APOP authentication vulnerability).
+
+* Mon Apr 09 2007 Matthew Barnes - 1.10.1-1.fc7
+- Update to 1.10.1
+- Remove evolution-data-server-1.10.0-no-more-beeps.patch (fixed upstream).
+
+* Wed Apr 04 2007 Matthew Barnes - 1.10.0-6.fc7
+- Revise patch for GNOME bug #417999 (another ESourceComboBox goof).
+
+* Mon Apr 02 2007 Matthew Barnes - 1.10.0-5.fc7
+- Make the new ESourceComboBox widget work properly (RH bug #234760).
+
+* Tue Mar 27 2007 Matthew Barnes - 1.10.0-4.fc7
+- Link to static evolution-openldap library (RH bug #210126).
+- Require openssl-devel when statically linking against openldap.
+- Add -Wdeclaration-after-statement to strict build settings.
+
+* Thu Mar 22 2007 Matthew Barnes - 1.10.0-3.fc7
+- Stop beeping at me!
+
+* Wed Mar 14 2007 Matthew Barnes - 1.10.0-2.fc7
+- Modify patch for GNOME bug #376991 to fix RH bug #231994.
+- Add patch for GNOME bug #417999 (avoid deprecated GTK+ symbols).
+- Remove evolution-data-server-1.0.2-workaround-cal-backend-leak.patch.
+- Remove evolution-data-server-1.2.2-fix_open_calendar_declaration.patch.
+- Remove evolution-data-server-1.3.8-fix-implicit-function-declarations.
+
+* Mon Mar 12 2007 Matthew Barnes - 1.10.0-1.fc7
+- Update to 1.10.0
+- Remove patch for GNOME bug #301363 (fixed upstream).
+
+* Fri Mar 09 2007 Matthew Barnes - 1.9.92-4.fc7
+- Add patch for GNOME bug #415922 (support MS ISA Server 2004).
+- Patch by Kenny Root.
+
+* Thu Mar 08 2007 Matthew Barnes - 1.9.92-3.fc7
+- Add patch for GNOME bug #415891 (introduce EFlag API).
+- Add patch for GNOME bug #376991 (refactor password handling).
+
+* Tue Mar 06 2007 Matthew Barnes - 1.9.92-2.fc7
+- Add patch for GNOME bug #301363 (update timezones).
+
+* Mon Feb 26 2007 Matthew Barnes - 1.9.92-1.fc7
+- Update to 1.9.92
+- Remove patch for GNOME bug #356177 (fixed upstream).
+- Add minimum version to intltool requirement (current >= 0.35.5).
+
+* Mon Feb 12 2007 Matthew Barnes - 1.9.91-1.fc7
+- Update to 1.9.91
+- Add flag to disable deprecated Pango symbols.
+- Remove patch for GNOME bug #359979 (fixed upstream).
+
+* Sun Jan 21 2007 Matthew Barnes - 1.9.5-4.fc7
+- Revise evolution-data-server-1.8.0-no-gnome-common.patch so that we no
+ longer have to run autoconf before building.
+
+* Wed Jan 10 2007 Matthew Barnes - 1.9.5-3.fc7
+- Add patch for GNOME bug #359979 (change EMsgPort semantics).
+
+* Tue Jan 09 2007 Matthew Barnes - 1.9.5-2.fc7
+- Require libsoup-devel in devel subpackage (RH bug #152482).
+
+* Mon Jan 08 2007 Matthew Barnes - 1.9.5-1.fc7
+- Update to 1.9.5
+- Remove patch for GNOME bug #362638 (fixed upstream).
+- Remove patch for GNOME bug #387638 (fixed upstream).
+
+* Tue Dec 19 2006 Matthew Barnes - 1.9.4-1.fc7
+- Update to 1.9.4
+- Add patch for GNOME bug #373117 (storing color settings).
+- Add patch for GNOME bug #387638 (implicit function declaration).
+
+* Mon Dec 04 2006 Matthew Barnes - 1.9.3-1.fc7
+- Update to 1.9.3
+- Remove patch for GNOME bug #353924 (fixed upstream).
+
+* Fri Nov 10 2006 Matthew Barnes - 1.9.2-3.fc7
+- Add patch for RH bug #210142 (calendar crash in indic locales).
+
+* Wed Nov 08 2006 Matthew Barnes - 1.9.2-2.fc7
+- Add patch for RH bug #203058 (name selector dialog glitch).
+
+* Mon Nov 06 2006 Matthew Barnes - 1.9.2-1.fc7
+- Update to 1.9.2
+- Remove patch for Gnome.org bugs #369168, #369259, and #369261
+ (fixed upstream).
+
+* Thu Nov 2 2006 Matthew Barnes - 1.9.1-4.fc7
+- Add patch for Gnome.org bug #369168, #369259, and #369261
+ (misc camel bugs reported by Hans Petter Jansson).
+
+* Wed Nov 1 2006 Matthew Barnes - 1.9.1-3.fc7
+- Add patch for Gnome.org bug #353924 (category sorting).
+
+* Fri Oct 27 2006 Matthew Barnes - 1.9.1-2.fc7
+- Rebuild
+
+* Fri Oct 27 2006 Matthew Barnes - 1.9.1-2.fc7
+- Update to 1.9.1
+- Add patch for Gnome.org bug #356177 (deprecate EMutex).
+- Add patch for Gnome.org bug #363695 (deprecate EMemPool, EStrv, EPoolv).
+- Remove Jerusalem.ics timezone file (fixed upstream).
+- Remove patch for RH bug #198935 (fixed upstream).
+
+* Mon Oct 16 2006 Matthew Barnes - 1.8.1-1.fc7
+- Update to 1.8.1
+- Use stricter build settings.
+- Add patch for Gnome.org bug #360240 ("unused variable" warnings).
+- Add patch for Gnome.org bug #360619 ("incompatible pointer type" warnings).
+- Add patch for Gnome.org bug #362638 (deprecate EThread).
+- Remove patch for RH bug #198935 (fixed upstream).
+- Remove patch for RH bug #205187 (fixed upstream).
+- Remove patch for Gnome.org bug #353478 (fixed upstream).
+- Remove patch for Gnome.org bug #356828 (fixed upstream).
+- Remove patch for Gnome.org bug #357666 (fixed upstream).
+
+* Tue Sep 26 2006 Matthew Barnes - 1.8.0-11.fc6
+- Add patch for RH bug #203915 (fix dangerous mallocs in camel).
+
+* Mon Sep 25 2006 Matthew Barnes - 1.8.0-10.fc6
+- Add patch for Gnome.org bug #357666.
+
+* Thu Sep 21 2006 Matthew Barnes - 1.8.0-9.fc6
+- Revise patch for RH bug #198935 (fix a crash reported in bug #207446).
+
+* Wed Sep 20 2006 Matthew Barnes - 1.8.0-8.fc6
+- Revise patch for RH bug #198935 (fix a typo).
+
+* Wed Sep 20 2006 Matthias Clasen - 1.8.0-7.fc6
+- Fix the timezone info for Jerusalem (#207161)
+
+* Wed Sep 20 2006 Matthew Barnes - 1.8.0-6.fc6
+- Add patch for Gnome.org bug #356828 (lingering file on uninstall).
+
+* Mon Sep 18 2006 Matthew Barnes - 1.8.0-5.fc6
+- Revise patch for RH bug #205187 (use upstream's version).
+
+* Sat Sep 16 2006 Matthew Barnes - 1.8.0-4.fc6
+- Add patch for RH bug #205187 (crash on startup).
+
+* Fri Sep 15 2006 Matthew Barnes - 1.8.0-3.fc6
+- Revise patch for RH bug #198935 to eliminate a race condition.
+
+* Tue Sep 12 2006 Matthew Barnes - 1.8.0-2.fc6
+- Add patch for RH bug #198935.
+
+* Mon Sep 4 2006 Matthew Barnes - 1.8.0-1.fc6
+- Update to 1.8.0
+- Remove evolution-data-server-1.5.4-make_imap4_optional.patch (fixed upstream)
+ and save remaining hunk as evolution-data-server-1.8.0-no-gnome-common.patch.
+- Remove patch for RH bug #202329 (fixed upstream).
+- Remove patch for Gnome.org bug #349847 (fixed upstream).
+
+* Tue Aug 29 2006 Matthew Barnes - 1.7.92-4.fc6
+- Revise patch for RH bug #198935.
+- Add patch for Gnome.org bug #353478.
+
+* Mon Aug 28 2006 Ray Strode - 1.7.92-3.fc6
+- Add patch from Veerapuram Varadhan to fix fd leak (bug 198935).
+
+* Tue Aug 22 2006 Matthew Barnes - 1.7.92-2
+- Add patch for Gnome.org bug #349847.
+
+* Mon Aug 21 2006 Matthew Barnes - 1.7.92-1
+- Update to 1.7.92
+
+* Wed Aug 16 2006 Ray Strode - 1.7.91-3
+- Add fix from Matthias Clasen that might help bug 202309.
+
+* Mon Aug 14 2006 Matthew Barnes - 1.7.91-2
+- Add patch for RH bug #202329.
+
+* Mon Aug 7 2006 Matthew Barnes - 1.7.91-1
+- Update to 1.7.91
+- Remove patch for Gnome.org bug #348725 (fixed upstream).
+
+* Fri Aug 4 2006 Matthew Barnes - 1.7.90.1-5
+- Update to 1.7.90.1 (again)
+
+* Thu Aug 3 2006 Matthew Barnes - 1.7.4-5
+- Remove patches for Gnome.org bug #309079 (rejected upstream).
+- One of these patches was causing RH bug #167157.
+
+* Thu Aug 3 2006 Matthew Barnes - 1.7.4-4
+- No longer packaging unused patches.
+
+* Mon Jul 31 2006 Matthew Barnes - 1.7.4-3
+- Revert to version 1.7.4 to prevent API/ABI breakage.
+- Add back patch to make --with-libdb configure option work.
+
+* Mon Jul 31 2006 Ray Strode - 1.7.90.1-4
+- add executable bits to libs
+
+* Mon Jul 31 2006 Matthias Clasen