diff --git a/dbus-glib-0.73-ignore-namespaces-and-children.patch b/dbus-glib-0.73-ignore-namespaces-and-children.patch new file mode 100644 index 0000000..dbd4e38 --- /dev/null +++ b/dbus-glib-0.73-ignore-namespaces-and-children.patch @@ -0,0 +1,83 @@ +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.73-ignore-namespaces.patch b/dbus-glib-0.73-ignore-namespaces.patch deleted file mode 100644 index 0857fcf..0000000 --- a/dbus-glib-0.73-ignore-namespaces.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/dbus/dbus-gparser.c b/dbus/dbus-gparser.c -index f296f96..cdd4e53 100644 ---- a/dbus/dbus-gparser.c -+++ b/dbus/dbus-gparser.c -@@ -128,13 +128,17 @@ locate_attributes (const char *element_name, - - 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 *parser, - } - 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 -+ g_set_error (error, G_MARKUP_ERROR, -+ G_MARKUP_ERROR_PARSE, -+ _("Element <%s> not recognized"), -+ element_name); - } - - return TRUE; -@@ -844,6 +853,11 @@ 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 - g_assert_not_reached (); /* should have had an error on start_element */ - - diff --git a/dbus-glib.spec b/dbus-glib.spec index d7163f6..aa691f7 100644 --- a/dbus-glib.spec +++ b/dbus-glib.spec @@ -8,14 +8,14 @@ Summary: GLib bindings for D-Bus Name: dbus-glib Version: 0.73 -Release: 6%{?dist} +Release: 7%{?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.patch +Patch2: dbus-glib-0.73-ignore-namespaces-and-children.patch License: AFL/GPL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +119,9 @@ rm -rf %{buildroot} %endif %changelog +* Wed Mar 19 2008 Dan Williams - 0.73-7 +- Ignore children of namespaced nodes too + * Tue Feb 12 2008 Dan Williams - 0.73-6 - Ignore namespaces in introspection XML