- update to evolution-data-server-3.6.4

This commit is contained in:
jasper 2013-03-07 07:53:47 +00:00
parent d6a4b19fd5
commit e359fc7355
5 changed files with 5 additions and 416 deletions

View File

@ -1,12 +1,11 @@
# $OpenBSD: Makefile,v 1.130 2013/02/01 16:21:36 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.131 2013/03/07 07:53:47 jasper Exp $
SHARED_ONLY= Yes
COMMENT= unified backend for PIM programs
GNOME_PROJECT= evolution-data-server
GNOME_VERSION= 3.6.3
REVISION= 2
GNOME_VERSION= 3.6.4
# Only get the first x.y which is needed in the PLIST.
R= ${GNOME_VERSION:C/^([0-9]+\.[0-9]+).*/\1/}
@ -34,7 +33,7 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += ICE SM X11 Xau Xcomposite Xcursor Xdamage Xdmcp
WANTLIB += ICE SM X11 Xcomposite Xcursor Xdamage
WANTLIB += Xext Xfixes Xi Xinerama Xrandr Xrender asn1 atk-1.0
WANTLIB += atk-bridge-2.0 atspi c cairo cairo-gobject com_err
WANTLIB += crypto curl db dbus-1 expat ffi fontconfig freetype

View File

@ -1,2 +1,2 @@
SHA256 (evolution-data-server-3.6.3.tar.xz) = N6DQ1PbIUV5w408efh9Ff0x3NvNboPGMS0vKChfbfeA=
SIZE (evolution-data-server-3.6.3.tar.xz) = 4073908
SHA256 (evolution-data-server-3.6.4.tar.xz) = ULTKIbxX0v5JM+owcr8R1eYGnQ7KrM7QvQ9V8JjQn04=
SIZE (evolution-data-server-3.6.4.tar.xz) = 4079620

View File

@ -1,146 +0,0 @@
$OpenBSD: patch-addressbook_backends_ldap_e-book-backend-ldap_c,v 1.11 2013/01/23 15:36:53 ajacoutot Exp $
From a84d0269dcd3978232cf5dce77ae4a6d7f6107fd Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 22 Jan 2013 19:44:41 +0000
Subject: Bug #692278 - LDAP backend mutex deadlock on finalize
XXX remove when we have a 64-bit time_t
--- addressbook/backends/ldap/e-book-backend-ldap.c.orig Wed Jan 23 16:17:06 2013
+++ addressbook/backends/ldap/e-book-backend-ldap.c Wed Jan 23 16:17:10 2013
@@ -214,7 +214,7 @@ struct _EBookBackendLDAPPrivate {
gboolean marked_for_offline;
/* our operations */
- GStaticRecMutex op_hash_mutex;
+ GStaticRecMutex op_hash_mutex; /* lock also eds_ldap_handler_lock before this lock */
GHashTable *id_to_op;
gint active_ops;
guint poll_timeout;
@@ -1147,6 +1147,7 @@ ldap_op_add (LDAPOp *op,
op->handler = handler;
op->dtor = dtor;
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
if (g_hash_table_lookup (bl->priv->id_to_op, &op->id)) {
g_warning ("conflicting ldap msgid's");
@@ -1161,6 +1162,7 @@ ldap_op_add (LDAPOp *op,
LDAP_POLL_INTERVAL,
(GSourceFunc) poll_ldap, bl);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static void
@@ -1169,6 +1171,7 @@ ldap_op_finished (LDAPOp *op)
EBookBackend *backend = op->backend;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
g_hash_table_remove (bl->priv->id_to_op, &op->id);
@@ -1176,10 +1179,8 @@ ldap_op_finished (LDAPOp *op)
book_view_notify_status (bl, find_book_view (bl), "");
/* should handle errors here */
- g_static_rec_mutex_lock (&eds_ldap_handler_lock);
if (bl->priv->ldap)
ldap_abandon (bl->priv->ldap, op->id);
- g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (op->dtor)
op->dtor (op);
@@ -1193,6 +1194,7 @@ ldap_op_finished (LDAPOp *op)
}
}
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static void
@@ -1202,6 +1204,7 @@ ldap_op_change_id (LDAPOp *op,
EBookBackend *backend = op->backend;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
g_hash_table_remove (bl->priv->id_to_op, &op->id);
@@ -1209,6 +1212,7 @@ ldap_op_change_id (LDAPOp *op,
g_hash_table_insert (bl->priv->id_to_op, &op->id, op);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static GError *
@@ -1272,11 +1276,11 @@ create_dn_from_contact (EContact *contact,
}
dn = g_strdup_printf (
- "%s=%s%s%lu",
+ "%s=%s%s%llu",
get_dn_attribute_name (rootdn),
(cn_part && *cn_part) ? cn_part : "",
(cn_part && *cn_part) ? "." : "",
- time (NULL));
+ (long long)time (NULL));
g_free (cn_part);
@@ -5226,10 +5230,11 @@ ldap_cancel_op (gpointer key,
LDAPOp *op = value;
/* ignore errors, its only best effort? */
- g_static_rec_mutex_lock (&eds_ldap_handler_lock);
+ /* lock is held by the caller */
+ /* g_static_rec_mutex_lock (&eds_ldap_handler_lock); */
if (bl->priv->ldap)
ldap_abandon (bl->priv->ldap, op->id);
- g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
+ /* g_static_rec_mutex_unlock (&eds_ldap_handler_lock); */
}
static void
@@ -5237,9 +5242,11 @@ ldap_cancel_all_operations (EBookBackend *backend)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
g_hash_table_foreach (bl->priv->id_to_op, ldap_cancel_op, bl);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static void
@@ -5533,10 +5540,11 @@ call_dtor (gint msgid,
bl = E_BOOK_BACKEND_LDAP (op->backend);
- g_static_rec_mutex_lock (&eds_ldap_handler_lock);
+ /* lock is held by the caller */
+ /* g_static_rec_mutex_lock (&eds_ldap_handler_lock); */
if (bl->priv->ldap)
ldap_abandon (bl->priv->ldap, op->id);
- g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
+ /* g_static_rec_mutex_unlock (&eds_ldap_handler_lock); */
op->dtor (op);
@@ -5550,10 +5558,12 @@ e_book_backend_ldap_finalize (GObject *object)
priv = E_BOOK_BACKEND_LDAP_GET_PRIVATE (object);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&priv->op_hash_mutex);
g_hash_table_foreach_remove (priv->id_to_op, (GHRFunc) call_dtor, NULL);
g_hash_table_destroy (priv->id_to_op);
g_static_rec_mutex_unlock (&priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
g_static_rec_mutex_free (&priv->op_hash_mutex);
/* Remove the timeout before unbinding to avoid a race. */

View File

@ -1,238 +0,0 @@
$OpenBSD: patch-libedataserver_e-gdbus-templates_c,v 1.1 2013/01/30 07:20:04 ajacoutot Exp $
From 7c52fbd81093c1264e3d8aa6cdcf5c8bdc7b1772 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 25 Jan 2013 16:27:55 +0000
Subject: EGdbusTemplates: Address crash on operation cancel
--- libedataserver/e-gdbus-templates.c.orig Sat Jan 19 18:35:45 2013
+++ libedataserver/e-gdbus-templates.c Wed Jan 30 07:44:05 2013
@@ -844,6 +844,7 @@ e_gdbus_complete_sync_method_uint (gpointer object,
typedef struct _AsyncOpData
{
+ gint ref_count;
EGdbusAsyncOpKeeper *proxy;
guint opid;
@@ -871,27 +872,37 @@ async_op_data_free (AsyncOpData *op_data)
g_return_if_fail (op_data != NULL);
+ pending_ops = e_gdbus_async_op_keeper_get_pending_ops (op_data->proxy);
+
if (op_data->cancel_idle_id) {
GError *error = NULL;
g_source_remove (op_data->cancel_idle_id);
op_data->cancel_idle_id = 0;
+ if (pending_ops)
+ g_hash_table_remove (pending_ops, GUINT_TO_POINTER (op_data->opid));
+
if (!e_gdbus_async_op_keeper_cancel_op_sync (op_data->proxy, op_data->opid, NULL, &error)) {
g_debug ("%s: Failed to cancel operation: %s\n", G_STRFUNC, error ? error->message : "Unknown error");
g_clear_error (&error);
}
+ } else if (pending_ops) {
+ g_hash_table_remove (pending_ops, GUINT_TO_POINTER (op_data->opid));
}
if (op_data->cancellable) {
- if (op_data->cancel_id)
+ if (op_data->cancel_id) {
g_cancellable_disconnect (op_data->cancellable, op_data->cancel_id);
+ op_data->cancel_id = 0;
+ }
g_object_unref (op_data->cancellable);
+ op_data->cancellable = NULL;
}
- pending_ops = e_gdbus_async_op_keeper_get_pending_ops (E_GDBUS_ASYNC_OP_KEEPER (op_data->proxy));
- if (pending_ops)
- g_hash_table_remove (pending_ops, GUINT_TO_POINTER (op_data->opid));
+ if (!g_atomic_int_dec_and_test (&op_data->ref_count))
+ return;
+
g_object_unref (op_data->proxy);
switch (op_data->result_type) {
@@ -919,6 +930,7 @@ async_op_complete (AsyncOpData *op_data,
g_return_if_fail (op_data != NULL);
+ g_atomic_int_inc (&op_data->ref_count);
simple = g_simple_async_result_new (G_OBJECT (op_data->proxy), op_data->async_callback, op_data->async_user_data, op_data->async_source_tag);
g_simple_async_result_set_op_res_gpointer (simple, op_data, (GDestroyNotify) async_op_data_free);
if (error)
@@ -932,13 +944,43 @@ async_op_complete (AsyncOpData *op_data,
g_object_unref (simple);
}
+typedef struct _CancelData
+{
+ EGdbusAsyncOpKeeper *proxy;
+ guint opid;
+ AsyncOpData *op_data;
+} CancelData;
+
+static void
+cancel_data_free (gpointer ptr)
+{
+ CancelData *cd = ptr;
+
+ if (!cd)
+ return;
+
+ g_object_unref (cd->proxy);
+ g_free (cd);
+}
+
static gboolean
e_gdbus_op_cancelled_idle_cb (gpointer user_data)
{
- AsyncOpData *op_data = user_data;
+ CancelData *cd = user_data;
+ AsyncOpData *op_data;
+ GHashTable *pending_ops;
GCancellable *cancellable;
GError *error = NULL;
+ g_return_val_if_fail (cd != NULL, FALSE);
+
+ pending_ops = e_gdbus_async_op_keeper_get_pending_ops (cd->proxy);
+ if (pending_ops && !g_hash_table_lookup (pending_ops, GUINT_TO_POINTER (cd->opid))) {
+ /* got served already */
+ return FALSE;
+ }
+
+ op_data = cd->op_data;
g_return_val_if_fail (op_data != NULL, FALSE);
cancellable = op_data->cancellable;
@@ -961,12 +1003,19 @@ static void
e_gdbus_op_cancelled_cb (GCancellable *cancellable,
AsyncOpData *op_data)
{
+ CancelData *cd;
+
g_return_if_fail (op_data != NULL);
g_return_if_fail (op_data->cancellable == cancellable);
+ cd = g_new0 (CancelData, 1);
+ cd->proxy = g_object_ref (op_data->proxy);
+ cd->opid = op_data->opid;
+ cd->op_data = op_data;
+
/* do this on idle, because this callback should be left
* as soon as possible, with no sync calls being done */
- op_data->cancel_idle_id = g_idle_add (e_gdbus_op_cancelled_idle_cb, op_data);
+ op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
}
static void
@@ -1370,9 +1419,21 @@ e_gdbus_proxy_sync_ready_cb (GObject *proxy,
GAsyncResult *result,
gpointer user_data)
{
- SyncOpData *sync_data = user_data;
+ gint sync_opid = GPOINTER_TO_INT (user_data);
+ gchar *sync_opid_ident;
+ SyncOpData *sync_data;
- g_return_if_fail (sync_data != NULL);
+ sync_opid_ident = g_strdup_printf ("EGdbusTemplates-SyncOp-%d", sync_opid);
+ sync_data = g_object_get_data (proxy, sync_opid_ident);
+ g_free (sync_opid_ident);
+
+ if (!sync_data) {
+ /* already finished operation; it can happen when the operation is cancelled,
+ but the result is already waiting in an idle queue.
+ */
+ return;
+ }
+
g_return_if_fail (sync_data->flag != NULL);
switch (sync_data->out_type) {
@@ -1415,12 +1476,17 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
guint out_type,
gpointer out_value)
{
+ static volatile gint sync_op_counter = 0;
+ gint sync_opid;
+ gchar *sync_opid_ident;
SyncOpData sync_data = { 0 };
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
g_return_val_if_fail (finish_func != NULL, FALSE);
+ g_object_ref (proxy);
+
switch (out_type) {
case E_GDBUS_TYPE_VOID:
sync_data.finish_func.finish_void = finish_func;
@@ -1443,6 +1509,7 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
break;
default:
g_warning ("%s: Unknown 'out' E_GDBUS_TYPE %x", G_STRFUNC, out_type);
+ g_object_unref (proxy);
return FALSE;
}
@@ -1450,30 +1517,37 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
sync_data.error = error;
sync_data.out_type = out_type;
+ sync_opid = g_atomic_int_add (&sync_op_counter, 1);
+ sync_opid_ident = g_strdup_printf ("EGdbusTemplates-SyncOp-%d", sync_opid);
+ g_object_set_data (G_OBJECT (proxy), sync_opid_ident, &sync_data);
+
switch (in_type) {
case E_GDBUS_TYPE_VOID: {
EGdbusCallStartVoid start = start_func;
- start (proxy, cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_BOOLEAN: {
EGdbusCallStartBoolean start = start_func;
- start (proxy, * ((gboolean *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, * ((gboolean *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_STRING: {
EGdbusCallStartString start = start_func;
- start (proxy, (const gchar *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, (const gchar *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_STRV: {
EGdbusCallStartStrv start = start_func;
- start (proxy, (const gchar * const *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, (const gchar * const *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_UINT: {
EGdbusCallStartUint start = start_func;
- start (proxy, * ((guint *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, * ((guint *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
default:
g_warning ("%s: Unknown 'in' E_GDBUS_TYPE %x", G_STRFUNC, in_type);
e_flag_free (sync_data.flag);
+ g_object_set_data (G_OBJECT (proxy), sync_opid_ident, NULL);
+ g_free (sync_opid_ident);
+ g_object_unref (proxy);
return FALSE;
}
@@ -1502,7 +1576,11 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
/* is called in a dedicated thread */
e_flag_wait (sync_data.flag);
}
+ g_object_set_data (G_OBJECT (proxy), sync_opid_ident, NULL);
e_flag_free (sync_data.flag);
+
+ g_free (sync_opid_ident);
+ g_object_unref (proxy);
return sync_data.finish_result;
}

View File

@ -1,26 +0,0 @@
$OpenBSD: patch-libedataserverui_e-name-selector_c,v 1.1 2013/02/01 16:21:36 ajacoutot Exp $
From d92dc8b420cd599143649dca65bed55a035dd5b6 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Thu, 31 Jan 2013 16:33:07 +0000
Subject: Bug #689476 - Slow composer open (ENameSelector object leaks)
--- libedataserverui/e-name-selector.c.orig Sat Jan 19 18:35:45 2013
+++ libedataserverui/e-name-selector.c Fri Feb 1 17:02:15 2013
@@ -331,6 +331,16 @@ name_selector_dispose (GObject *object)
g_array_set_size (priv->source_books, 0);
g_array_set_size (priv->sections, 0);
+ if (priv->dialog) {
+ gtk_widget_destroy (GTK_WIDGET (priv->dialog));
+ priv->dialog = NULL;
+ }
+
+ if (priv->model) {
+ g_object_unref (priv->model);
+ priv->model = NULL;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_name_selector_parent_class)->dispose (object);
}