Location of system socket

Felipe Gasper felipe at felipegasper.com
Mon Dec 17 15:50:32 UTC 2018


> On Dec 17, 2018, at 7:30 AM, Simon McVittie <smcv at collabora.com> wrote:
> 
> On Sun, 16 Dec 2018 at 17:27:33 -0800, Thiago Macieira wrote:
>> On Sunday, 16 December 2018 13:20:04 PST Felipe Gasper wrote:
>>> My MacPorts dbus install puts the system socket at
>>> /opt/local/var/run/dbus/system_bus_socket. That path is hard-coded into
>>> libdbus but doesn’t appear to be available to any other client library.
>>> 
>>> Is this a bug in the MacPorts installation, then?
>> 
>> If all libraries agree on whatever the path is, no.
> 
> The location of the well-known D-Bus system bus socket is really a
> feature of the operating system design, not D-Bus, in the same way
> that "you can find the executables in /usr/bin" is a feature of the OS
> design (which is also untrue in MacPorts). Environments for "foreign"
> software built over an existing OS (like Cygwin on Windows and MacPorts
> on macOS) are basically half an operating system built on top of a different
> operating system, so it's up to the MacPorts maintainers how they design
> their half-an-OS. As long as they're consistent (for example configuring
> the same system bus socket for libdbus, GLib's GDBus and any other D-Bus
> implementations they ship), the result works.

… but then, of course, anything that MacPorts *doesn’t* ship breaks, which seems to defeat the point of having a defined standard. There are not a few ground-up D-Bus implementations out there (including my own).

> If the MacPorts maintainers are *not* consistent about how they set up
> the system bus socket for libdbus and GLib's GDBus, then that's a bug
> (or perhaps an unsupported feature, if they don't intend to provide a
> system bus) in either their dbus package, their GLib package or both.

They appear not to be consistent, in fact; their gdbus binary fails on connect/ENOENT.

I’m going to see if they’ll set DBUS_SYSTEM_BUS_ADDRESS in the same manner that they set DBUS_LAUNCHD_SESSION_BUS_SOCKET. That would align to the standard without potentially breaking things that expect MacPorts’s custom system bus socket location.

-FG


More information about the dbus mailing list