Deploying DBus on OSX

Pablo Martí Gamboa pmarti at warp.es
Fri May 21 02:20:45 PDT 2010


Hi all,

I would like to discuss DBus deployment experiences/tips on OSX. More and
more apps
from the OSS community depend on DBus for IPC, and a lot of developers would
like to
have their apps working on OSX. At the moment (AFAIK) unless you are a C#
developer
-because of ndesk-dbus- you are pretty much out of luck. I'll explain
myself:

There are two blessed ways of installing apps on OSX

 - Double-click on a .pkg which installs a packaged directory, this is the
install method more
similar to the Linux way of installing packages.[0]
 - Drag and Drop YourApp.app to the Applications folder. YourApp.app is just
a collection of
dirs, executables and libraries that bundles all its dependencies. The
executables and libraries
have been modified with the otool[1] library so they look for their linked
libraries in a path relative
to the main executable of YourApp.app. This makes YourApp.app relocatable,
so it can live
anywhere in your FS and will still work.

Being D&D the preferred one in the OSX world.

Why you are out of luck? Well, deploying plain DBus poses a number of
challenges on OSX:

 - DBus expects having a $prefix/var/lib/machine-id present at startup, if
you compiled DBus
on /opt/foo, and relocated your libs and binaries with otool, is not going
to work without further
user interaction (like having him creating /opt/foo and chown'ing it)
- DBus expects having a $prefix/etc/dbus/{session,system}.d and
$prefix/etc/dbus/{session,system}.conf
leading to further interaction of the user...

I know that this requirements are key to how DBus works (security and all),
I was just wondering
if anyone could share any tips/advices regarding DBus deployment on OSX. Is
it even possible to deploy
a self-contained DBus-powered app on OSX? The day that happens, we'll see
more and more OSS apps
in the OSX land.

For now I'm using packagemaker and distributing my application as a .pkg and
restricting the ability of the
user to specify the install path (otherwise I would face the same problems)

PS: None of this problems would be solved by the lingering patches for OSX
in bugzilla[2]

[0]
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/packagemaker.1.html
[1]
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/otool.1.html
[2] https://bugs.freedesktop.org/show_bug.cgi?id=14259

Thanks a lot for your time and insights

All the best,

-- 
Pablo Martí
http://minimoesfuerzo.org
python -c "print '706d617267616d40676d61696c2e636f6d'.decode('hex')"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100521/d8486e9a/attachment.html>


More information about the dbus mailing list