[MacPorts] #39145: glib2, glib2-devel: add MacPorts specific dbus session support to GDbus.

MacPorts noreply at macports.org
Sat May 18 08:13:28 PDT 2013


#39145: glib2, glib2-devel: add MacPorts specific dbus session support to GDbus.
-------------------------+--------------------------
 Reporter:  devans@…     |      Owner:  ryandesign@…
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.1.3
 Keywords:  dbus         |       Port:  glib2
-------------------------+--------------------------
 An increasing number of GNOME and other GTK+ applications emit the
 following error or similar on start up:

 {{{
 Error spawning command line `dbus-launch
 --autolaunch=73b3a03997e9d04800d0112b50b3fbad --binary-syntax --close-
 stderr
 }}}

 This has been an issue for some time (#28077 and more recently #37101).

 The problem appears to be coming from g_dbus_address_get_for_bus_sync() in
 the GIO GDbus interface.  Enabling GDbus address debugging


 {{{
 export G_DBUS_DEBUG=address
 }}}

 shows the following

 {{{
 GDBus-debug:Address: In g_dbus_address_get_for_bus_sync() for bus type
 `session'
 GDBus-debug:Address: env var DBUS_SESSION_BUS_ADDRESS is not set
 GDBus-debug:Address: env var DBUS_SYSTEM_BUS_ADDRESS is not set
 GDBus-debug:Address: env var DBUS_STARTER_BUS_TYPE is not set
 GDBus-debug:Address: Running `dbus-launch
 --autolaunch=73b3a03997e9d04800d0112b50b3fbad --binary-syntax --close-
 stderr' to get bus address (possibly autolaunching)
 }}}

 In fact, a code inspection shows that GDBus only provides support for Unix
 and Windows platforms and shows Mac OS X support as a TODO.

 Attached is a proposed patch that adds MacPorts specific dbus session
 support by using
 launchctl to lookup the dbus session socket and form the appropriate
 address from that.

 After applying this patch, most if not all occurrences seem to be fixed.
 I have seen no problems after upgrading all outstanding GNOME ports to the
 2.32.1 level including gconf.

 Typical debug output is now


 {{{
 GDBus-debug:Address: In g_dbus_address_get_for_bus_sync() for bus type
 `session'
 GDBus-debug:Address: env var DBUS_SESSION_BUS_ADDRESS is not set
 GDBus-debug:Address: env var DBUS_SYSTEM_BUS_ADDRESS is not set
 GDBus-debug:Address: env var DBUS_STARTER_BUS_TYPE is not set
 GDBus-debug:Address: launchctl command line: `launchctl getenv
 DBUS_LAUNCHD_SESSION_BUS_SOCKET'
 GDBus-debug:Address: launchctl stdout:
   0000: 2f 74 6d 70  2f 6c 61 75  6e 63 68 2d  4b 4a 57 39    /tmp/launch-
 KJW9
   0010: 72 7a 2f 75  6e 69 78 5f  64 6f 6d 61  69 6e 5f 6c
 rz/unix_domain_l
   0020: 69 73 74 65  6e 65 72 0a  00                          istener..
 GDBus-debug:Address: Returning address `unix:path=/tmp/launch-
 KJW9rz/unix_domain_listener' for bus type `session'
 }}}


 Submitting as an enhancement since this is not strictly a bug but a lack
 of upstream support.  Propose submitting to upstream after wider testing
 by others.

-- 
Ticket URL: <https://trac.macports.org/ticket/39145>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list