[Tracker] REVIEW: 'configurable-bus-type' branch



Hello all,

So, there have been various requests¹ for Tracker to be able to run on DBus's session OR system bus and to make that switch configurable. I recently saw a patch for this from someone and thought I would put the effort in to fully test and make sure this works in a more general sense for everyone.

¹ https://mail.gnome.org/archives/tracker-list/2014-January/msg00001.html

I have created a branch here:

  https://git.gnome.org/browse/tracker/log/?h=configurable-bus-type

I've done some testing and it seems to work. As expected, the system bus has some security requirements, so you can't simply run your Tracker binaries with the environment variable:

  export TRACKER_BUS_TYPE=system

You also have to have a DBus policy file. I've attached the file I created to test this. Here is how you make use of it:

1. Copy the file into place:

   $ sudo cp ./org.freedesktop.Tracker1.conf /etc/dbus-1/system.d/

2. Find the existing DBus process with:

   $ pgrep -xl dbus-daemon
   608 dbus-daemon
   2321 dbus-daemon
   ...

3. Tell DBus to re-read it's new configuration:

   $ sudo pkill -HUP dbus-daemon

4. Set the environment and run Tracker processes...

   $ export TRACKER_BUS_TYPE="system"
   $ /path/to/tracker-store -v 3

To check this has worked, you can look at the information at the top of the log output, it should say something like:

   Tracker-DEBUG: tracker-backend.vala:173: Using bus = 'SYSTEM'

Or, use d-feet to see it show up on the system bus.

I should add, if TRACKER_BUS_TYPE is set to complete crap or not set at all, we always default to the SESSION bus.

I plan to merge this to master before the stable releases.
Let me know if there are any comments! :)

Thanks,

--
Regards,
Martyn

Founder & Director @ Lanedo GmbH.
http://www.linkedin.com/in/martynrussell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]