From 1b0249a1a4e2f263bb74b9b8a8c54c48fc86fab3 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 5 Jun 2008 19:57:44 +0000 Subject: [PATCH] - New upstream 0.76 - Drop all upstreamed patches --- .cvsignore | 2 +- ...-0.73-ignore-namespaces-and-children.patch | 83 ----- dbus-glib-0.74-export-getall.patch | 311 ------------------ ....74-fix-call-cancel-on-proxy-dispose.patch | 41 --- dbus-glib-0.74-freeze-abi.patch | 211 ------------ dbus-glib-0.74-handle-unknown-property.patch | 17 - dbus-glib-0.74-leak-fix.patch | 20 -- ...b-0.74-set-default-timeout-for-proxy.patch | 114 ------- dbus-glib-proxy-signals-once.patch | 22 -- dbus-glib.spec | 32 +- sources | 2 +- 11 files changed, 9 insertions(+), 846 deletions(-) delete mode 100644 dbus-glib-0.73-ignore-namespaces-and-children.patch delete mode 100644 dbus-glib-0.74-export-getall.patch delete mode 100644 dbus-glib-0.74-fix-call-cancel-on-proxy-dispose.patch delete mode 100644 dbus-glib-0.74-freeze-abi.patch delete mode 100644 dbus-glib-0.74-handle-unknown-property.patch delete mode 100644 dbus-glib-0.74-leak-fix.patch delete mode 100644 dbus-glib-0.74-set-default-timeout-for-proxy.patch delete mode 100644 dbus-glib-proxy-signals-once.patch diff --git a/.cvsignore b/.cvsignore index 8f1abef..60c9c47 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -dbus-glib-0.74.tar.gz +dbus-glib-0.76.tar.gz diff --git a/dbus-glib-0.73-ignore-namespaces-and-children.patch b/dbus-glib-0.73-ignore-namespaces-and-children.patch deleted file mode 100644 index dbd4e38..0000000 --- a/dbus-glib-0.73-ignore-namespaces-and-children.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -up dbus-glib-0.73/dbus/dbus-gparser.c.ignore-namespaces dbus-glib-0.73/dbus/dbus-gparser.c ---- dbus-glib-0.73/dbus/dbus-gparser.c.ignore-namespaces 2006-09-27 08:27:24.000000000 -0400 -+++ dbus-glib-0.73/dbus/dbus-gparser.c 2008-03-13 08:54:14.000000000 -0400 -@@ -128,13 +128,17 @@ locate_attributes (const char *element_ - - if (!found) - { -- g_set_error (error, -- G_MARKUP_ERROR, -- G_MARKUP_ERROR_PARSE, -- _("Attribute \"%s\" is invalid on <%s> element in this context"), -- attribute_names[i], element_name); -- retval = FALSE; -- goto out; -+ /* We want to passthrough namespaced XML nodes that we don't know anything about. */ -+ if (strchr (attribute_names[i], ':') == NULL) -+ { -+ g_set_error (error, -+ G_MARKUP_ERROR, -+ G_MARKUP_ERROR_PARSE, -+ _("Attribute \"%s\" is invalid on <%s> element in this context"), -+ attribute_names[i], element_name); -+ retval = FALSE; -+ goto out; -+ } - } - - ++i; -@@ -177,6 +181,7 @@ struct Parser - PropertyInfo *property; - ArgInfo *arg; - gboolean in_annotation; -+ guint unknown_namespaced_depth; - }; - - Parser* -@@ -791,10 +796,14 @@ parser_start_element (Parser *parse - } - else - { -- g_set_error (error, G_MARKUP_ERROR, -- G_MARKUP_ERROR_PARSE, -- _("Element <%s> not recognized"), -- element_name); -+ if (strchr (element_name, ':') != NULL) -+ /* Passthrough XML-namespaced nodes */ -+ parser->unknown_namespaced_depth += 1; -+ else if (parser->unknown_namespaced_depth == 0) -+ g_set_error (error, G_MARKUP_ERROR, -+ G_MARKUP_ERROR_PARSE, -+ _("Element <%s> not recognized"), -+ element_name); - } - - return TRUE; -@@ -844,6 +853,15 @@ parser_end_element (Parser *parser, - if (parser->node_stack == NULL) - parser->result = top; /* We are done, store the result */ - } -+ else if (strchr (element_name, ':') != NULL) -+ { -+ /* Passthrough XML-namespaced nodes */ -+ parser->unknown_namespaced_depth -= 1; -+ } -+ else if (parser->unknown_namespaced_depth > 0) -+ { -+ /* pass through unknown elements underneath a namespace */ -+ } - else - g_assert_not_reached (); /* should have had an error on start_element */ - -diff -up dbus-glib-0.73/dbus/dbus-glib-tool.c.ignore-namespaces dbus-glib-0.73/dbus/dbus-glib-tool.c ---- dbus-glib-0.73/dbus/dbus-glib-tool.c.ignore-namespaces 2008-03-13 08:31:21.000000000 -0400 -+++ dbus-glib-0.73/dbus/dbus-glib-tool.c 2008-03-13 08:32:15.000000000 -0400 -@@ -414,7 +414,7 @@ main (int argc, char **argv) - &error); - if (node == NULL) - { -- lose_gerror (_("Unable to load \"%s\""), error); -+ lose (_("Unable to load \"%s\": %s"), filename, error->message); - } - else - { diff --git a/dbus-glib-0.74-export-getall.patch b/dbus-glib-0.74-export-getall.patch deleted file mode 100644 index 6706d35..0000000 --- a/dbus-glib-0.74-export-getall.patch +++ /dev/null @@ -1,311 +0,0 @@ -From: David Zeuthen -Date: Sat, 15 Mar 2008 20:51:48 +0000 (-0400) -Subject: Export the recently added GetAll() method on org.fd.DBus.Properties -X-Git-Url: http://gitweb.freedesktop.org/?p=dbus/dbus-glib.git;a=commitdiff;h=09b0fc5818812d0167243bae9fd52cdaf67f0af0 - -Export the recently added GetAll() method on org.fd.DBus.Properties - -Because round-trip city is a bad place. ---- - ---- a/dbus/dbus-gobject.c -+++ b/dbus/dbus-gobject.c -@@ -612,7 +612,7 @@ handle_introspect (DBusConnection *conne - g_string_append (xml, " \n"); - g_string_append (xml, " \n"); - -- /* We support get/set properties */ -+ /* We support get/set/getall properties */ - g_string_append_printf (xml, " \n", DBUS_INTERFACE_PROPERTIES); - g_string_append (xml, " \n"); - g_string_append_printf (xml, " \n", DBUS_TYPE_STRING_AS_STRING); -@@ -624,6 +624,17 @@ handle_introspect (DBusConnection *conne - g_string_append_printf (xml, " \n", DBUS_TYPE_STRING_AS_STRING); - g_string_append_printf (xml, " \n", DBUS_TYPE_VARIANT_AS_STRING); - g_string_append (xml, " \n"); -+ g_string_append (xml, " \n"); -+ g_string_append_printf (xml, " \n", DBUS_TYPE_STRING_AS_STRING); -+ g_string_append_printf (xml, " \n", -+ DBUS_TYPE_ARRAY_AS_STRING -+ DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING -+ DBUS_TYPE_STRING_AS_STRING -+ DBUS_TYPE_VARIANT_AS_STRING -+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING -+ ); -+ -+ g_string_append (xml, " \n"); - g_string_append (xml, " \n"); - - introspect_interfaces (object, xml); -@@ -752,6 +763,113 @@ get_object_property (DBusConnection *con - return ret; - } - -+static DBusMessage* -+get_all_object_properties (DBusConnection *connection, -+ DBusMessage *message, -+ const DBusGObjectInfo *object_info, -+ GObject *object) -+{ -+ DBusMessage *ret; -+ DBusMessageIter iter_ret; -+ DBusMessageIter iter_dict; -+ DBusMessageIter iter_dict_entry; -+ DBusMessageIter iter_dict_value; -+ const char *p; -+ -+ ret = dbus_message_new_method_return (message); -+ if (ret == NULL) -+ goto oom; -+ -+ dbus_message_iter_init_append (ret, &iter_ret); -+ -+ if (!dbus_message_iter_open_container (&iter_ret, -+ DBUS_TYPE_ARRAY, -+ DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING -+ DBUS_TYPE_STRING_AS_STRING -+ DBUS_TYPE_VARIANT_AS_STRING -+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING, -+ &iter_dict)) -+ goto oom; -+ -+ p = object_info->exported_properties; -+ while (p != NULL && *p != '\0') -+ { -+ const char *prop_ifname; -+ const char *prop_name; -+ GParamSpec *pspec; -+ GType value_gtype; -+ GValue value = {0, }; -+ gchar *variant_sig; -+ -+ prop_ifname = p; -+ -+ while (*p != '\0') -+ p++; -+ p++; -+ if (*p == '\0') { -+ g_warning ("malformed exported_properties in object_info"); -+ break; -+ } -+ prop_name = p; -+ while (*p != '\0') -+ p++; -+ p++; -+ -+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), prop_name); -+ if (pspec == NULL) -+ { -+ g_warning ("introspection data references non-existing property %s", prop_name); -+ continue; -+ } -+ -+ g_value_init (&value, pspec->value_type); -+ g_object_get_property (object, pspec->name, &value); -+ -+ variant_sig = _dbus_gvalue_to_signature (&value); -+ if (variant_sig == NULL) -+ { -+ value_gtype = G_VALUE_TYPE (&value); -+ g_warning ("Cannot marshal type \"%s\" in variant", g_type_name (value_gtype)); -+ g_value_unset (&value); -+ continue; -+ } -+ -+ if (!dbus_message_iter_open_container (&iter_dict, -+ DBUS_TYPE_DICT_ENTRY, -+ NULL, -+ &iter_dict_entry)) -+ goto oom; -+ if (!dbus_message_iter_append_basic (&iter_dict_entry, DBUS_TYPE_STRING, &prop_name)) -+ goto oom; -+ -+ if (!dbus_message_iter_open_container (&iter_dict_entry, -+ DBUS_TYPE_VARIANT, -+ variant_sig, -+ &iter_dict_value)) -+ goto oom; -+ -+ if (!_dbus_gvalue_marshal (&iter_dict_value, &value)) -+ goto oom; -+ -+ if (!dbus_message_iter_close_container (&iter_dict_entry, -+ &iter_dict_value)) -+ goto oom; -+ if (!dbus_message_iter_close_container (&iter_dict, &iter_dict_entry)) -+ goto oom; -+ -+ g_value_unset (&value); -+ g_free (variant_sig); -+ } -+ -+ if (!dbus_message_iter_close_container (&iter_ret, &iter_dict)) -+ goto oom; -+ -+ return ret; -+ -+ oom: -+ g_error ("out of memory"); -+} -+ - static gboolean - lookup_object_and_method (GObject *object, - DBusMessage *message, -@@ -1278,12 +1396,14 @@ gobject_message_function (DBusConnection - GObject *object; - gboolean setter; - gboolean getter; -+ gboolean getall; - char *s; - const char *wincaps_propname; - /* const char *wincaps_propiface; */ - DBusMessageIter iter; - const DBusGMethodInfo *method; - const DBusGObjectInfo *object_info; -+ DBusMessage *ret; - - object = G_OBJECT (user_data); - -@@ -1291,8 +1411,9 @@ gobject_message_function (DBusConnection - DBUS_INTERFACE_INTROSPECTABLE, - "Introspect")) - return handle_introspect (connection, message, object); -- -+ - /* Try the metainfo, which lets us invoke methods */ -+ object_info = NULL; - if (lookup_object_and_method (object, message, &object_info, &method)) - return invoke_object_method (object, object_info, method, connection, message); - -@@ -1301,6 +1422,7 @@ gobject_message_function (DBusConnection - */ - getter = FALSE; - setter = FALSE; -+ getall = FALSE; - if (dbus_message_is_method_call (message, - DBUS_INTERFACE_PROPERTIES, - "Get")) -@@ -1309,10 +1431,16 @@ gobject_message_function (DBusConnection - DBUS_INTERFACE_PROPERTIES, - "Set")) - setter = TRUE; -+ else if (dbus_message_is_method_call (message, -+ DBUS_INTERFACE_PROPERTIES, -+ "GetAll")) -+ getall = TRUE; - -- if (!(setter || getter)) -+ if (!(setter || getter || getall)) - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - -+ ret = NULL; -+ - dbus_message_iter_init (message, &iter); - - if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRING) -@@ -1326,59 +1454,65 @@ gobject_message_function (DBusConnection - /* dbus_message_iter_get_basic (&iter, &wincaps_propiface); */ - dbus_message_iter_next (&iter); - -- if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRING) -+ if (getall) - { -- g_warning ("Property get or set does not have a property name string as second arg\n"); -- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+ if (object_info != NULL) -+ ret = get_all_object_properties (connection, message, object_info, object); -+ else -+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -- dbus_message_iter_get_basic (&iter, &wincaps_propname); -- dbus_message_iter_next (&iter); -- -- s = _dbus_gutils_wincaps_to_uscore (wincaps_propname); -+ else if (getter || setter) -+ { -+ if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRING) -+ { -+ g_warning ("Property get or set does not have a property name string as second arg\n"); -+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+ } -+ dbus_message_iter_get_basic (&iter, &wincaps_propname); -+ dbus_message_iter_next (&iter); - -- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), -- s); -+ s = _dbus_gutils_wincaps_to_uscore (wincaps_propname); - -- g_free (s); -+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), -+ s); - -- if (pspec != NULL) -- { -- DBusMessage *ret; -+ g_free (s); - -- if (setter) -+ if (pspec != NULL) - { -- if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_VARIANT) -+ if (setter) - { -- g_warning ("Property set does not have a variant value as third arg\n"); -- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+ if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_VARIANT) -+ { -+ g_warning ("Property set does not have a variant value as third arg\n"); -+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+ } -+ -+ ret = set_object_property (connection, message, &iter, -+ object, pspec); -+ dbus_message_iter_next (&iter); -+ } -+ else if (getter) -+ { -+ ret = get_object_property (connection, message, -+ object, pspec); -+ } -+ else -+ { -+ g_assert_not_reached (); -+ ret = NULL; - } -- -- ret = set_object_property (connection, message, &iter, -- object, pspec); -- dbus_message_iter_next (&iter); -- } -- else if (getter) -- { -- ret = get_object_property (connection, message, -- object, pspec); -- } -- else -- { -- g_assert_not_reached (); -- ret = NULL; - } -+ } - -- g_assert (ret != NULL); -- -- if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_INVALID) -- g_warning ("Property get or set had too many arguments\n"); -+ g_assert (ret != NULL); - -- dbus_connection_send (connection, ret, NULL); -- dbus_message_unref (ret); -- return DBUS_HANDLER_RESULT_HANDLED; -- } -+ if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_INVALID) -+ g_warning ("Property get, set or set all had too many arguments\n"); - -- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -+ dbus_connection_send (connection, ret, NULL); -+ dbus_message_unref (ret); -+ return DBUS_HANDLER_RESULT_HANDLED; - } - - static const DBusObjectPathVTable gobject_dbus_vtable = { diff --git a/dbus-glib-0.74-fix-call-cancel-on-proxy-dispose.patch b/dbus-glib-0.74-fix-call-cancel-on-proxy-dispose.patch deleted file mode 100644 index 1dda794..0000000 --- a/dbus-glib-0.74-fix-call-cancel-on-proxy-dispose.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 2cf62d7ff7d3a7bc450d0b60bb81a8365ffd310b -Author: Ross Burton -Date: Wed Feb 27 14:19:48 2008 +0000 - - Fix pending call cancelling in proxy dispose - - The dispose treated the hash values as DBusGProxyCall objects, but they are - DBusPendingCall (thanks Dafyd Harries). - -diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c -index 3d5a0c5..1244151 100644 ---- a/dbus/dbus-gproxy.c -+++ b/dbus/dbus-gproxy.c -@@ -1419,13 +1419,14 @@ dbus_g_proxy_class_init (DBusGProxyClass *klass) - G_TYPE_NONE, 2, DBUS_TYPE_MESSAGE, G_TYPE_POINTER); - } - --static void -+static gboolean - cancel_pending_call (gpointer key, gpointer val, gpointer data) - { -- DBusGProxyCall *call = key; -- DBusGProxy *proxy = data; -+ DBusPendingCall *pending = val; - -- dbus_g_proxy_cancel_call (proxy, call); -+ dbus_pending_call_cancel (pending); -+ -+ return TRUE; - } - - static void -@@ -1440,7 +1441,7 @@ dbus_g_proxy_dispose (GObject *object) - } - - /* Cancel outgoing pending calls */ -- g_hash_table_foreach (priv->pending_calls, cancel_pending_call, proxy); -+ g_hash_table_foreach_remove (priv->pending_calls, cancel_pending_call, NULL); - g_hash_table_destroy (priv->pending_calls); - priv->pending_calls = NULL; - diff --git a/dbus-glib-0.74-freeze-abi.patch b/dbus-glib-0.74-freeze-abi.patch deleted file mode 100644 index 3236f76..0000000 --- a/dbus-glib-0.74-freeze-abi.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 8fe656de630e851bc512bbd7e7a6c18c53aecb61 Mon Sep 17 00:00:00 2001 -From: Simon McVittie -Date: Mon, 14 Apr 2008 12:56:43 +0100 -Subject: [PATCH] Freeze error ABI at the ABI used in Fedora 8 and Ubuntu gutsy. - -This avoids getting a different ABI depending on the version of libdbus -we're compiled against. fd.o #15430, Debian #476080. ---- - dbus/dbus-glib.h | 34 ++++++++++++++++- - dbus/dbus-gobject.c | 72 ++++++++++++++++++++++++++++++++++- - dbus/make-dbus-glib-error-enum.sh | 25 +------------ - dbus/make-dbus-glib-error-switch.sh | 29 +------------- - 4 files changed, 106 insertions(+), 54 deletions(-) - -diff --git a/dbus/dbus-glib.h b/dbus/dbus-glib.h -index b1084ba..c4049f3 100644 ---- a/dbus/dbus-glib.h -+++ b/dbus/dbus-glib.h -@@ -60,7 +60,39 @@ GQuark dbus_g_error_quark (void); - - typedef enum - { --#include "dbus-glib-error-enum.h" -+DBUS_GERROR_FAILED, -+DBUS_GERROR_NO_MEMORY, -+DBUS_GERROR_SERVICE_UNKNOWN, -+DBUS_GERROR_NAME_HAS_NO_OWNER, -+DBUS_GERROR_NO_REPLY, -+DBUS_GERROR_IO_ERROR, -+DBUS_GERROR_BAD_ADDRESS, -+DBUS_GERROR_NOT_SUPPORTED, -+DBUS_GERROR_LIMITS_EXCEEDED, -+DBUS_GERROR_ACCESS_DENIED, -+DBUS_GERROR_AUTH_FAILED, -+DBUS_GERROR_NO_SERVER, -+DBUS_GERROR_TIMEOUT, -+DBUS_GERROR_NO_NETWORK, -+DBUS_GERROR_ADDRESS_IN_USE, -+DBUS_GERROR_DISCONNECTED, -+DBUS_GERROR_INVALID_ARGS, -+DBUS_GERROR_FILE_NOT_FOUND, -+DBUS_GERROR_FILE_EXISTS, -+DBUS_GERROR_UNKNOWN_METHOD, -+DBUS_GERROR_TIMED_OUT, -+DBUS_GERROR_MATCH_RULE_NOT_FOUND, -+DBUS_GERROR_MATCH_RULE_INVALID, -+DBUS_GERROR_SPAWN_EXEC_FAILED, -+DBUS_GERROR_SPAWN_FORK_FAILED, -+DBUS_GERROR_SPAWN_CHILD_EXITED, -+DBUS_GERROR_SPAWN_CHILD_SIGNALED, -+DBUS_GERROR_SPAWN_FAILED, -+DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN, -+DBUS_GERROR_INVALID_SIGNATURE, -+DBUS_GERROR_INVALID_FILE_CONTENT, -+DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, -+DBUS_GERROR_REMOTE_EXCEPTION - } DBusGError; - - gboolean dbus_g_error_has_name (GError *error, -diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c -index dae2dac..6596309 100644 ---- a/dbus/dbus-gobject.c -+++ b/dbus/dbus-gobject.c -@@ -1668,7 +1668,77 @@ export_signals (DBusGConnection *connection, const GList *info_list, GObject *ob - } - } - --#include "dbus-glib-error-switch.h" -+static gint -+dbus_error_to_gerror_code (const char *derr) -+{ -+ if (0) ; -+ else if (!strcmp (derr, DBUS_ERROR_FAILED )) -+ return DBUS_GERROR_FAILED ; -+ else if (!strcmp (derr, DBUS_ERROR_NO_MEMORY )) -+ return DBUS_GERROR_NO_MEMORY ; -+ else if (!strcmp (derr, DBUS_ERROR_SERVICE_UNKNOWN )) -+ return DBUS_GERROR_SERVICE_UNKNOWN ; -+ else if (!strcmp (derr, DBUS_ERROR_NAME_HAS_NO_OWNER )) -+ return DBUS_GERROR_NAME_HAS_NO_OWNER ; -+ else if (!strcmp (derr, DBUS_ERROR_NO_REPLY )) -+ return DBUS_GERROR_NO_REPLY ; -+ else if (!strcmp (derr, DBUS_ERROR_IO_ERROR )) -+ return DBUS_GERROR_IO_ERROR ; -+ else if (!strcmp (derr, DBUS_ERROR_BAD_ADDRESS )) -+ return DBUS_GERROR_BAD_ADDRESS ; -+ else if (!strcmp (derr, DBUS_ERROR_NOT_SUPPORTED )) -+ return DBUS_GERROR_NOT_SUPPORTED ; -+ else if (!strcmp (derr, DBUS_ERROR_LIMITS_EXCEEDED )) -+ return DBUS_GERROR_LIMITS_EXCEEDED ; -+ else if (!strcmp (derr, DBUS_ERROR_ACCESS_DENIED )) -+ return DBUS_GERROR_ACCESS_DENIED ; -+ else if (!strcmp (derr, DBUS_ERROR_AUTH_FAILED )) -+ return DBUS_GERROR_AUTH_FAILED ; -+ else if (!strcmp (derr, DBUS_ERROR_NO_SERVER )) -+ return DBUS_GERROR_NO_SERVER ; -+ else if (!strcmp (derr, DBUS_ERROR_TIMEOUT )) -+ return DBUS_GERROR_TIMEOUT ; -+ else if (!strcmp (derr, DBUS_ERROR_NO_NETWORK )) -+ return DBUS_GERROR_NO_NETWORK ; -+ else if (!strcmp (derr, DBUS_ERROR_ADDRESS_IN_USE )) -+ return DBUS_GERROR_ADDRESS_IN_USE ; -+ else if (!strcmp (derr, DBUS_ERROR_DISCONNECTED )) -+ return DBUS_GERROR_DISCONNECTED ; -+ else if (!strcmp (derr, DBUS_ERROR_INVALID_ARGS )) -+ return DBUS_GERROR_INVALID_ARGS ; -+ else if (!strcmp (derr, DBUS_ERROR_FILE_NOT_FOUND )) -+ return DBUS_GERROR_FILE_NOT_FOUND ; -+ else if (!strcmp (derr, DBUS_ERROR_FILE_EXISTS )) -+ return DBUS_GERROR_FILE_EXISTS ; -+ else if (!strcmp (derr, DBUS_ERROR_UNKNOWN_METHOD )) -+ return DBUS_GERROR_UNKNOWN_METHOD ; -+ else if (!strcmp (derr, DBUS_ERROR_TIMED_OUT )) -+ return DBUS_GERROR_TIMED_OUT ; -+ else if (!strcmp (derr, DBUS_ERROR_MATCH_RULE_NOT_FOUND )) -+ return DBUS_GERROR_MATCH_RULE_NOT_FOUND ; -+ else if (!strcmp (derr, DBUS_ERROR_MATCH_RULE_INVALID )) -+ return DBUS_GERROR_MATCH_RULE_INVALID ; -+ else if (!strcmp (derr, DBUS_ERROR_SPAWN_EXEC_FAILED )) -+ return DBUS_GERROR_SPAWN_EXEC_FAILED ; -+ else if (!strcmp (derr, DBUS_ERROR_SPAWN_FORK_FAILED )) -+ return DBUS_GERROR_SPAWN_FORK_FAILED ; -+ else if (!strcmp (derr, DBUS_ERROR_SPAWN_CHILD_EXITED )) -+ return DBUS_GERROR_SPAWN_CHILD_EXITED ; -+ else if (!strcmp (derr, DBUS_ERROR_SPAWN_CHILD_SIGNALED )) -+ return DBUS_GERROR_SPAWN_CHILD_SIGNALED ; -+ else if (!strcmp (derr, DBUS_ERROR_SPAWN_FAILED )) -+ return DBUS_GERROR_SPAWN_FAILED ; -+ else if (!strcmp (derr, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN )) -+ return DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN ; -+ else if (!strcmp (derr, DBUS_ERROR_INVALID_SIGNATURE )) -+ return DBUS_GERROR_INVALID_SIGNATURE ; -+ else if (!strcmp (derr, DBUS_ERROR_INVALID_FILE_CONTENT )) -+ return DBUS_GERROR_INVALID_FILE_CONTENT ; -+ else if (!strcmp (derr, DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN )) -+ return DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN ; -+ else -+ return DBUS_GERROR_REMOTE_EXCEPTION; -+} - - /** - * dbus_set_g_error: -diff --git a/dbus/make-dbus-glib-error-enum.sh b/dbus/make-dbus-glib-error-enum.sh -index 1646333..1d7929a 100755 ---- a/dbus/make-dbus-glib-error-enum.sh -+++ b/dbus/make-dbus-glib-error-enum.sh -@@ -1,25 +1,2 @@ - #!/bin/sh -- --SRC=$1 --DEST=$2 -- --die() --{ -- echo $1 1>&2 -- /bin/rm $DEST.tmp -- exit 1 --} -- --cat $SRC | grep '#define DBUS_ERROR' | sed -e 's/#define //g' | \ -- sed -e 's/".*//g' | sed -e 's/DBUS_ERROR/DBUS_GERROR/g' | sed -e 's/ *$/,/g' > $DEST.tmp -- --if test ! -s $DEST.tmp ; then -- die "$DEST.tmp is empty, something went wrong, see any preceding error message" --fi --echo "DBUS_GERROR_REMOTE_EXCEPTION" >> $DEST.tmp -- --echo "#ifndef DBUS_INSIDE_DBUS_GLIB_H" >> $DEST.tmp --echo '#error "' "$DEST" 'may only be included by dbus-glib.h"' >> $DEST.tmp --echo "#endif" >> $DEST.tmp -- --mv $DEST.tmp $DEST || die "could not move $DEST.tmp to $DEST" -+echo "#error This header makes no sense - see bugs.freedesktop.org 15430" >$2 -diff --git a/dbus/make-dbus-glib-error-switch.sh b/dbus/make-dbus-glib-error-switch.sh -index 602cf99..1d7929a 100755 ---- a/dbus/make-dbus-glib-error-switch.sh -+++ b/dbus/make-dbus-glib-error-switch.sh -@@ -1,29 +1,2 @@ - #!/bin/sh -- --SRC=$1 --DEST=$2 -- --die() --{ -- echo $1 1>&2 -- /bin/rm $DEST.tmp -- exit 1 --} -- --echo 'static gint' > $DEST.tmp --echo 'dbus_error_to_gerror_code (const char *derr)' >> $DEST.tmp --echo '{' >> $DEST.tmp --echo ' if (0) ; ' >> $DEST.tmp -- --cat $SRC | grep '#define DBUS_ERROR' | sed -e 's/#define //g' | \ -- sed -e 's/".*//g' | \ -- (while read line; do \ -- echo ' else if (!strcmp (derr, ' "$line" ' )) '; \ -- echo ' return ' `echo $line | sed -e 's/DBUS_ERROR/DBUS_GERROR/g'` ';'; \ -- done; \ -- ) >> $DEST.tmp --echo ' else' >> $DEST.tmp --echo ' return DBUS_GERROR_REMOTE_EXCEPTION;' >> $DEST.tmp --echo '}' >> $DEST.tmp -- --mv $DEST.tmp $DEST || die "could not move $DEST.tmp to $DEST" -+echo "#error This header makes no sense - see bugs.freedesktop.org 15430" >$2 --- -1.5.5 - diff --git a/dbus-glib-0.74-handle-unknown-property.patch b/dbus-glib-0.74-handle-unknown-property.patch deleted file mode 100644 index 80082e8..0000000 --- a/dbus-glib-0.74-handle-unknown-property.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c -index 6596309..3744d84 100644 ---- a/dbus/dbus-gobject.c -+++ b/dbus/dbus-gobject.c -@@ -1503,6 +1503,12 @@ gobject_message_function (DBusConnection *connection, - ret = NULL; - } - } -+ else -+ { -+ ret = dbus_message_new_error_printf (message, -+ DBUS_ERROR_INVALID_ARGS, -+ "No such property %s", wincaps_propname); -+ } - } - - g_assert (ret != NULL); diff --git a/dbus-glib-0.74-leak-fix.patch b/dbus-glib-0.74-leak-fix.patch deleted file mode 100644 index 2c272f0..0000000 --- a/dbus-glib-0.74-leak-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 8e024ae2252e6e948c28203f07aa416df3dac0b8 -Author: Ross Burton -Date: Wed Feb 27 14:02:36 2008 +0000 - - Unref the connection and message on dbus_g_return_error - -diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c -index df26e3b..17855bf 100644 ---- a/dbus/dbus-gobject.c -+++ b/dbus/dbus-gobject.c -@@ -2073,6 +2073,9 @@ dbus_g_method_return_error (DBusGMethodInvocation *context, GError *error) - reply = gerror_to_dbus_error_message (context->object, dbus_g_message_get_message (context->message), error); - dbus_connection_send (dbus_g_connection_get_connection (context->connection), reply, NULL); - dbus_message_unref (reply); -+ -+ dbus_g_connection_unref (context->connection); -+ dbus_g_message_unref (context->message); - g_free (context); - } - diff --git a/dbus-glib-0.74-set-default-timeout-for-proxy.patch b/dbus-glib-0.74-set-default-timeout-for-proxy.patch deleted file mode 100644 index 06e09a3..0000000 --- a/dbus-glib-0.74-set-default-timeout-for-proxy.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: David Zeuthen -Date: Sat, 15 Mar 2008 19:32:56 +0000 (-0400) -Subject: Add new function to specify the default timeout for a proxy -X-Git-Url: http://gitweb.freedesktop.org/?p=dbus/dbus-glib.git;a=commitdiff;h=bf0c9b3d6adc95863d5b5a4ce6ca994fd7fdc137 - -Add new function to specify the default timeout for a proxy - -Without a function like this the generated client glue code is -unusable for D-Bus methods that take a long time to complete (such as -disk operations like mkfs and partitioning). - -Also add some missing _with_timeout functions on DBusGProxy to the gtk -docs. ---- - ---- a/dbus/dbus-glib.h -+++ b/dbus/dbus-glib.h -@@ -252,6 +252,9 @@ DBusGProxyCall * dbus_g_proxy_begin_call - GType first_arg_type, - ...); - -+void dbus_g_proxy_set_default_timeout (DBusGProxy *proxy, -+ int timeout); -+ - gboolean dbus_g_proxy_end_call (DBusGProxy *proxy, - DBusGProxyCall *call, - GError **error, ---- a/dbus/dbus-gproxy.c -+++ b/dbus/dbus-gproxy.c -@@ -73,6 +73,8 @@ struct _DBusGProxyPrivate - GData *signal_signatures; /**< D-BUS signatures for each signal */ - - GHashTable *pending_calls; /**< Calls made on this proxy which have not yet returned */ -+ -+ int default_timeout; /**< Default timeout to use, see dbus_g_proxy_set_default_timeout */ - }; - - static void dbus_g_proxy_init (DBusGProxy *proxy); -@@ -1315,6 +1317,7 @@ dbus_g_proxy_init (DBusGProxy *proxy) - (GDestroyNotify) dbus_pending_call_unref); - priv->name_call = 0; - priv->associated = FALSE; -+ priv->default_timeout = -1; - } - - static GObject * -@@ -2377,6 +2380,7 @@ dbus_g_proxy_begin_call (DBusGProxy - guint call_id; - va_list args; - GValueArray *arg_values; -+ DBusGProxyPrivate *priv = DBUS_G_PROXY_GET_PRIVATE(proxy); - - g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), NULL); - g_return_val_if_fail (!DBUS_G_PROXY_DESTROYED (proxy), NULL); -@@ -2385,7 +2389,7 @@ dbus_g_proxy_begin_call (DBusGProxy - - DBUS_G_VALUE_ARRAY_COLLECT_ALL (arg_values, first_arg_type, args); - -- call_id = dbus_g_proxy_begin_call_internal (proxy, method, notify, user_data, destroy, arg_values,-1); -+ call_id = dbus_g_proxy_begin_call_internal (proxy, method, notify, user_data, destroy, arg_values, priv->default_timeout); - - g_value_array_free (arg_values); - -@@ -2515,15 +2519,18 @@ dbus_g_proxy_call (DBusGProxy *pr - guint call_id; - va_list args; - GValueArray *in_args; -+ DBusGProxyPrivate *priv; - - g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), FALSE); - g_return_val_if_fail (!DBUS_G_PROXY_DESTROYED (proxy), FALSE); - -+ priv = DBUS_G_PROXY_GET_PRIVATE(proxy); -+ - va_start (args, first_arg_type); - - DBUS_G_VALUE_ARRAY_COLLECT_ALL (in_args, first_arg_type, args); - -- call_id = dbus_g_proxy_begin_call_internal (proxy, method, NULL, NULL, NULL, in_args,-1); -+ call_id = dbus_g_proxy_begin_call_internal (proxy, method, NULL, NULL, NULL, in_args, priv->default_timeout); - - g_value_array_free (in_args); - -@@ -2889,6 +2896,30 @@ dbus_g_proxy_disconnect_signal (DBusGPro - g_free (name); - } - -+/** -+ * dbus_g_proxy_set_default_timeout: -+ * @proxy: a proxy for a remote interface -+ * @timeout: specify the timeout in milliseconds -+ * -+ * Sets the default timeout to use for a proxy. This timeout will be -+ * used in calls where the timeout is not specified. -+ * -+ * Since: 0.75 -+ */ -+void -+dbus_g_proxy_set_default_timeout (DBusGProxy *proxy, -+ int timeout) -+{ -+ DBusGProxyPrivate *priv; -+ -+ g_return_if_fail (DBUS_IS_G_PROXY (proxy)); -+ g_return_if_fail (!DBUS_G_PROXY_DESTROYED (proxy)); -+ -+ priv = DBUS_G_PROXY_GET_PRIVATE(proxy); -+ priv->default_timeout = timeout; -+} -+ -+ - /** @} End of DBusGLib public */ - - #ifdef DBUS_BUILD_TESTS diff --git a/dbus-glib-proxy-signals-once.patch b/dbus-glib-proxy-signals-once.patch deleted file mode 100644 index 2cdcf1f..0000000 --- a/dbus-glib-proxy-signals-once.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up dbus-glib-0.73/dbus/dbus-gproxy.c.foo dbus-glib-0.73/dbus/dbus-gproxy.c ---- dbus-glib-0.73/dbus/dbus-gproxy.c.foo 2007-02-08 20:59:39.000000000 -0500 -+++ dbus-glib-0.73/dbus/dbus-gproxy.c 2007-09-24 14:54:39.000000000 -0400 -@@ -1232,8 +1235,15 @@ dbus_g_proxy_manager_filter (DBusConnect - dbus_message_get_interface (message)); - - owner_list = g_hash_table_lookup (manager->proxy_lists, tri); -- if (owner_list != NULL) -- full_list = g_slist_concat (full_list, g_slist_copy (owner_list->proxies)); -+ if (owner_list != NULL) { -+ GSList *elt; -+ -+ /* Ignore duplicates when adding to full_list */ -+ for (elt = owner_list->proxies; elt; elt = g_slist_next (elt)) { -+ if (!g_slist_find (full_list, elt->data)) -+ full_list = g_slist_append (full_list, elt->data); -+ } -+ } - g_free (tri); - } - } - diff --git a/dbus-glib.spec b/dbus-glib.spec index 03f36fd..3a533a5 100644 --- a/dbus-glib.spec +++ b/dbus-glib.spec @@ -7,27 +7,13 @@ Summary: GLib bindings for D-Bus Name: dbus-glib -Version: 0.74 -Release: 9%{?dist} +Version: 0.76 +Release: 1%{?dist} URL: http://www.freedesktop.org/software/dbus/ Source0: http://dbus.freedesktop.org/releases/dbus-glib/%{name}-%{version}.tar.gz Source1: dbus-bus-introspect.xml -Patch0: broken-xml.patch -Patch1: dbus-glib-proxy-signals-once.patch -# https://bugs.freedesktop.org/show_bug.cgi?id=14429 -Patch2: dbus-glib-0.73-ignore-namespaces-and-children.patch -Patch3: dbus-glib-0.74-set-default-timeout-for-proxy.patch -Patch4: dbus-glib-0.74-export-getall.patch -# http://bugs.freedesktop.org/show_bug.cgi?id=15430 -Patch5: dbus-glib-0.74-freeze-abi.patch -# https://bugs.freedesktop.org/show_bug.cgi?id=16079 -Patch6: dbus-glib-0.74-handle-unknown-property.patch # https://bugs.freedesktop.org/show_bug.cgi?id=16114 Patch7: dbus-glib-0.74-getall-wincaps-to-uscore.patch -# Upstream; 8e024ae2252e6e948c28203f07aa416df3dac0b8 -Patch8: dbus-glib-0.74-leak-fix.patch -# Upstream; 2cf62d7ff7d3a7bc450d0b60bb81a8365ffd310b -Patch9: dbus-glib-0.74-fix-call-cancel-on-proxy-dispose.patch License: AFL and GPLv2+ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -73,16 +59,8 @@ D-Bus tools written using the gtk+ GUI libaries %prep %setup -q -%patch0 -p1 -b .broken-xml -%patch1 -p1 -b .proxy-signals-once -%patch2 -p1 -b .ignore-namespaces -%patch3 -p1 -b .set-default-timeout -%patch4 -p1 -b .export-getall -%patch5 -p1 -b .freeze-abi -%patch6 -p1 -b .handle-unknown-property + %patch7 -p1 -b .getall-wincaps-to-uscore -%patch8 -p1 -b .leak-fix -%patch9 -p1 -b .fix-call-cancel-on-proxy-dispose %build @@ -138,6 +116,10 @@ rm -rf %{buildroot} %endif %changelog +* Thu Jun 05 2008 Colin Walters - 0.76-1 +- New upstream 0.76 +- Drop all upstreamed patches + * Tue May 27 2008 Dan Williams - 0.74-9 - Handle unknown object properties without asserting (fdo #16079) - Handle GetAll() property names correctly (fdo #16114) diff --git a/sources b/sources index 3b44436..da6aca1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0923d825a0aff2e4eb23338b630286fb dbus-glib-0.74.tar.gz +d3b716a7e798faa1c6a867675f00306a dbus-glib-0.76.tar.gz