From f94f2dee99fcf1dd9fbb4ab047f43475abaa0cae Mon Sep 17 00:00:00 2001 From: piernov Date: Sun, 4 Sep 2011 18:05:38 +0200 Subject: dbus-glib 0.94-1 ajout patchs --- extra/dbus-glib/.footprint.i686 | 4 +- extra/dbus-glib/.footprint.x86_64 | 4 +- extra/dbus-glib/.md5sum.i686 | 3 + extra/dbus-glib/.md5sum.x86_64 | 3 + extra/dbus-glib/Pkgfile | 15 +- ...ix-in-marshalling-objects-as-object-paths.patch | 40 +++++ ...-only-listen-for-signals-not-all-messages.patch | 33 ++++ extra/dbus-glib/regression-test-for-fd.o.patch | 168 +++++++++++++++++++++ 8 files changed, 261 insertions(+), 9 deletions(-) create mode 100644 extra/dbus-glib/bugfix-in-marshalling-objects-as-object-paths.patch create mode 100644 extra/dbus-glib/registrations-test-only-listen-for-signals-not-all-messages.patch create mode 100644 extra/dbus-glib/regression-test-for-fd.o.patch (limited to 'extra') diff --git a/extra/dbus-glib/.footprint.i686 b/extra/dbus-glib/.footprint.i686 index 541599a27..517157b04 100644 --- a/extra/dbus-glib/.footprint.i686 +++ b/extra/dbus-glib/.footprint.i686 @@ -13,14 +13,14 @@ drwxr-xr-x root/root usr/include/dbus-1.0/dbus/ -rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-gtype-specialized.h -rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-gvalue-parse-variant.h drwxr-xr-x root/root usr/lib/ +-rwxr-xr-x root/root usr/lib/dbus-bash-completion-helper +-rw-r--r-- root/root usr/lib/libdbus-glib-1.a -rwxr-xr-x root/root usr/lib/libdbus-glib-1.la lrwxrwxrwx root/root usr/lib/libdbus-glib-1.so -> libdbus-glib-1.so.2.2.0 lrwxrwxrwx root/root usr/lib/libdbus-glib-1.so.2 -> libdbus-glib-1.so.2.2.0 -rwxr-xr-x root/root usr/lib/libdbus-glib-1.so.2.2.0 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/dbus-glib-1.pc -drwxr-xr-x root/root usr/libexec/ --rwxr-xr-x root/root usr/libexec/dbus-bash-completion-helper drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/man/ drwxr-xr-x root/root usr/share/man/man1/ diff --git a/extra/dbus-glib/.footprint.x86_64 b/extra/dbus-glib/.footprint.x86_64 index 541599a27..517157b04 100644 --- a/extra/dbus-glib/.footprint.x86_64 +++ b/extra/dbus-glib/.footprint.x86_64 @@ -13,14 +13,14 @@ drwxr-xr-x root/root usr/include/dbus-1.0/dbus/ -rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-gtype-specialized.h -rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-gvalue-parse-variant.h drwxr-xr-x root/root usr/lib/ +-rwxr-xr-x root/root usr/lib/dbus-bash-completion-helper +-rw-r--r-- root/root usr/lib/libdbus-glib-1.a -rwxr-xr-x root/root usr/lib/libdbus-glib-1.la lrwxrwxrwx root/root usr/lib/libdbus-glib-1.so -> libdbus-glib-1.so.2.2.0 lrwxrwxrwx root/root usr/lib/libdbus-glib-1.so.2 -> libdbus-glib-1.so.2.2.0 -rwxr-xr-x root/root usr/lib/libdbus-glib-1.so.2.2.0 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/dbus-glib-1.pc -drwxr-xr-x root/root usr/libexec/ --rwxr-xr-x root/root usr/libexec/dbus-bash-completion-helper drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/man/ drwxr-xr-x root/root usr/share/man/man1/ diff --git a/extra/dbus-glib/.md5sum.i686 b/extra/dbus-glib/.md5sum.i686 index e36b43666..03780d776 100644 --- a/extra/dbus-glib/.md5sum.i686 +++ b/extra/dbus-glib/.md5sum.i686 @@ -1 +1,4 @@ +2a3598342dd25722d452e7beaf21b5f3 bugfix-in-marshalling-objects-as-object-paths.patch e1f1506a6f4941e67bffd614b1ad5af6 dbus-glib-0.94.tar.gz +f7456df33215cdc290afa2aac19597fb registrations-test-only-listen-for-signals-not-all-messages.patch +ea88b12a67991dae3394d328f50d2f44 regression-test-for-fd.o.patch diff --git a/extra/dbus-glib/.md5sum.x86_64 b/extra/dbus-glib/.md5sum.x86_64 index e36b43666..03780d776 100644 --- a/extra/dbus-glib/.md5sum.x86_64 +++ b/extra/dbus-glib/.md5sum.x86_64 @@ -1 +1,4 @@ +2a3598342dd25722d452e7beaf21b5f3 bugfix-in-marshalling-objects-as-object-paths.patch e1f1506a6f4941e67bffd614b1ad5af6 dbus-glib-0.94.tar.gz +f7456df33215cdc290afa2aac19597fb registrations-test-only-listen-for-signals-not-all-messages.patch +ea88b12a67991dae3394d328f50d2f44 regression-test-for-fd.o.patch diff --git a/extra/dbus-glib/Pkgfile b/extra/dbus-glib/Pkgfile index dd50401c2..0a2b03063 100755 --- a/extra/dbus-glib/Pkgfile +++ b/extra/dbus-glib/Pkgfile @@ -8,19 +8,24 @@ name=dbus-glib version=0.94 release=1 -source=( http://dbus.freedesktop.org/releases/$name/$name-$version.tar.gz) - +source=(http://dbus.freedesktop.org/releases/$name/$name-$version.tar.gz + bugfix-in-marshalling-objects-as-object-paths.patch + registrations-test-only-listen-for-signals-not-all-messages.patch + regression-test-for-fd.o.patch) build() { cd $name-$version + patch -p1 < ../bugfix-in-marshalling-objects-as-object-paths.patch + patch -p1 < ../registrations-test-only-listen-for-signals-not-all-messages.patch + patch -p1 < ../regression-test-for-fd.o.patch + ./configure --prefix=/usr \ --mandir=/usr/share/man \ - --infodir=/usr/share/info \ --sysconfdir=/etc \ --localstatedir=/var \ - --enable-static=no + --libexecdir=/usr/lib \ + --enable-bash-completion make make DESTDIR=$PKG install rm -rf $PKG/usr/share/gtk-doc } - diff --git a/extra/dbus-glib/bugfix-in-marshalling-objects-as-object-paths.patch b/extra/dbus-glib/bugfix-in-marshalling-objects-as-object-paths.patch new file mode 100644 index 000000000..246b85550 --- /dev/null +++ b/extra/dbus-glib/bugfix-in-marshalling-objects-as-object-paths.patch @@ -0,0 +1,40 @@ +From 3e0828f57c3925ea9b63d22ab82d991a0fea0536 Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Thu, 02 Jun 2011 12:49:51 +0000 +Subject: Fix regression in marshalling objects as object paths + +This regressed while fixing fd.o #36811. NetworkManager apparently uses +this idiom. + +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37852 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628890 +Tested-by: Michael Biebl +Reviewed-by: Colin Walters +--- +diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c +index 3b0bd17..7ee0b4f 100644 +--- a/dbus/dbus-gobject.c ++++ b/dbus/dbus-gobject.c +@@ -3049,16 +3049,16 @@ out: + const char * + _dbus_gobject_get_path (GObject *obj) + { +- GSList *registrations; ++ ObjectExport *oe; + ObjectRegistration *o; + +- registrations = g_object_get_data (obj, "dbus_glib_object_registrations"); ++ oe = g_object_get_data (obj, "dbus_glib_object_registrations"); + +- if (registrations == NULL) ++ if (oe == NULL || oe->registrations == NULL) + return NULL; + + /* First one to have been registered wins */ +- o = registrations->data; ++ o = oe->registrations->data; + + return o->object_path; + } +-- +cgit v0.8.3-6-g21f6 diff --git a/extra/dbus-glib/registrations-test-only-listen-for-signals-not-all-messages.patch b/extra/dbus-glib/registrations-test-only-listen-for-signals-not-all-messages.patch new file mode 100644 index 000000000..a12e42253 --- /dev/null +++ b/extra/dbus-glib/registrations-test-only-listen-for-signals-not-all-messages.patch @@ -0,0 +1,33 @@ +From f534276eb20d8035566a206d1e38fd651a1eeab9 Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Tue, 31 May 2011 16:03:59 +0000 +Subject: registrations test: only listen for signals, not all messages + +Otherwise, we'd reply with an error to messages not intended for us. + +Reviewed-by: Colin Walters +--- +diff --git a/test/core/registrations.c b/test/core/registrations.c +index 8da8d14..a316313 100644 +--- a/test/core/registrations.c ++++ b/test/core/registrations.c +@@ -232,7 +232,7 @@ test_twice (Fixture *f, + f->object); + + dbus_bus_add_match (dbus_g_connection_get_connection (f->bus), +- "", NULL); ++ "type='signal'", NULL); + mem = dbus_connection_add_filter (dbus_g_connection_get_connection (f->bus), + frobnicate_cb, f, NULL); + g_assert (mem); +@@ -269,7 +269,7 @@ test_clean_slate (Fixture *f, + dbus_bool_t mem; + + dbus_bus_add_match (dbus_g_connection_get_connection (f->bus), +- "", NULL); ++ "type='signal'", NULL); + mem = dbus_connection_add_filter (dbus_g_connection_get_connection (f->bus), + frobnicate_cb, f, NULL); + g_assert (mem); +-- +cgit v0.8.3-6-g21f6 diff --git a/extra/dbus-glib/regression-test-for-fd.o.patch b/extra/dbus-glib/regression-test-for-fd.o.patch new file mode 100644 index 000000000..a65e8a444 --- /dev/null +++ b/extra/dbus-glib/regression-test-for-fd.o.patch @@ -0,0 +1,168 @@ +From 2a85bd434e6d8dba9615a53d288a0a72d6b5e0cf Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Thu, 02 Jun 2011 12:50:20 +0000 +Subject: Regression test for fd.o #37852 + +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37852 +Reviewed-by: Colin Walters +--- +diff --git a/test/core/my-object.c b/test/core/my-object.c +index ec0e301..0ff5562 100644 +--- a/test/core/my-object.c ++++ b/test/core/my-object.c +@@ -23,6 +23,7 @@ enum + enum + { + FROBNICATE, ++ OBJECTIFIED, + SIG0, + SIG1, + SIG2, +@@ -171,6 +172,15 @@ my_object_class_init (MyObjectClass *mobject_class) + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); + ++ signals[OBJECTIFIED] = ++ g_signal_new ("objectified", ++ G_OBJECT_CLASS_TYPE (mobject_class), ++ G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, ++ 0, ++ NULL, NULL, ++ g_cclosure_marshal_VOID__OBJECT, ++ G_TYPE_NONE, 1, G_TYPE_OBJECT); ++ + signals[SIG0] = + g_signal_new ("sig0", + G_OBJECT_CLASS_TYPE (mobject_class), +@@ -866,3 +876,10 @@ my_object_terminate (MyObject *obj, GError **error) + g_main_loop_quit (loop); + return TRUE; + } ++ ++void ++my_object_emit_objectified (MyObject *obj, ++ GObject *other) ++{ ++ g_signal_emit (obj, signals[OBJECTIFIED], 0, other); ++} +diff --git a/test/core/my-object.h b/test/core/my-object.h +index 657140d..3657aa0 100644 +--- a/test/core/my-object.h ++++ b/test/core/my-object.h +@@ -116,4 +116,6 @@ void my_object_async_throw_error (MyObject *obj, DBusGMethodInvocation *context) + + void my_object_unsafe_disable_legacy_property_access (MyObject *obj); + ++void my_object_emit_objectified (MyObject *obj, GObject *other); ++ + #endif +diff --git a/test/core/registrations.c b/test/core/registrations.c +index a316313..d46b15a 100644 +--- a/test/core/registrations.c ++++ b/test/core/registrations.c +@@ -50,6 +50,7 @@ typedef struct { + GObject *object; + DBusMessage *frobnicate1_message; + DBusMessage *frobnicate2_message; ++ gboolean received_objectified; + } Fixture; + + static void +@@ -324,6 +325,71 @@ test_clean_slate (Fixture *f, + f->frobnicate2_message = NULL; + } + ++static DBusHandlerResult ++objectified_cb (DBusConnection *conn, ++ DBusMessage *message, ++ void *user_data) ++{ ++ Fixture *f = user_data; ++ ++ if (dbus_message_is_signal (message, ++ "org.freedesktop.DBus.GLib.Tests.MyObject", "Objectified")) ++ { ++ const char *sender = dbus_message_get_sender (message); ++ const char *path = dbus_message_get_path (message); ++ dbus_bool_t ok; ++ DBusError e; ++ ++ dbus_error_init (&e); ++ ++ g_assert (sender != NULL); ++ g_assert (path != NULL); ++ ++ g_assert_cmpstr (path, ==, "/foo"); ++ g_assert_cmpstr (sender, ==, dbus_bus_get_unique_name ( ++ dbus_g_connection_get_connection (f->bus))); ++ ++ path = NULL; ++ ok = dbus_message_get_args (message, &e, ++ DBUS_TYPE_OBJECT_PATH, &path, ++ DBUS_TYPE_INVALID); ++ ++ if (dbus_error_is_set (&e)) ++ g_error ("%s: %s", e.name, e.message); ++ ++ g_assert (ok); ++ g_assert_cmpstr (path, ==, "/foo"); ++ ++ f->received_objectified = TRUE; ++ } ++ ++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; ++} ++ ++static void ++test_marshal_object (Fixture *f, ++ gconstpointer test_data G_GNUC_UNUSED) ++{ ++ dbus_bool_t mem; ++ ++ g_test_bug ("37852"); ++ ++ dbus_g_connection_register_g_object (f->bus, "/foo", f->object); ++ g_assert (dbus_g_connection_lookup_g_object (f->bus, "/foo") == ++ f->object); ++ ++ dbus_bus_add_match (dbus_g_connection_get_connection (f->bus), ++ "type='signal'", NULL); ++ mem = dbus_connection_add_filter (dbus_g_connection_get_connection (f->bus), ++ objectified_cb, f, NULL); ++ g_assert (mem); ++ ++ my_object_emit_objectified ((MyObject *) f->object, f->object); ++ ++ while (!f->received_objectified) ++ g_main_context_iteration (NULL, TRUE); ++} ++ + int + main (int argc, char **argv) + { +@@ -349,6 +415,8 @@ main (int argc, char **argv) + setup, test_twice, teardown); + g_test_add ("/registrations/clean-slate", Fixture, NULL, + setup, test_clean_slate, teardown); ++ g_test_add ("/registrations/marshal-object", Fixture, NULL, ++ setup, test_marshal_object, teardown); + + return g_test_run (); + } +diff --git a/test/core/test-service-glib.xml b/test/core/test-service-glib.xml +index 94a836a..1b595cc 100644 +--- a/test/core/test-service-glib.xml ++++ b/test/core/test-service-glib.xml +@@ -184,6 +184,10 @@ + + + ++ ++ ++ ++ + + + +-- +cgit v0.8.3-6-g21f6 -- cgit v1.2.3-70-g09d2