GNOME Bugzilla – Bug 755760
gvfs: add systemd user services corresponding to the D-Bus session services
Last modified: 2015-10-12 18:38:46 UTC
Similar to Bug #755740, it would be nice to put each session service in its own cgroup.
Created attachment 312328 [details] [review] Use conventional naming for D-Bus session services This naming is mandatory for the system bus, but is also recommended for the session bus. The D-Bus maintainers recommend that all activatable session services' service files are named according to the bus name, so that any conflict is resolved in a deterministic way. If the services are in different directories (precedence levels) the result is the same as it is now: the higher precedence "wins". If the services are in the same directory, either one overwrites the other and consistently "wins", or a packaging system like dpkg prevents co-installation. If the service files were named differently, it would be possible to have two implementations for the same name. dbus-daemon resolves this by choosing one arbitrarily, not necessarily the same one every time. systemd's kdbus support is more strict (or less concerned with backwards compatibility), and treats this situation as an error.
Created attachment 312329 [details] [review] Add a corresponding systemd user service for every D-Bus session service When using "systemd --user" in conjunction with "dbus-daemon --session --systemd-activation", this ensures that each daemon is correctly placed in its own cgroup, instead of being treated as part of dbus.service. --- Depends on Attachment #312328 [details] (which is good to have anyway), to move the D-Bus services out of the way, so that the systemd services can take over the short names (which are conventional for systemd).
(In reply to Simon McVittie from comment #2) > Add a corresponding systemd user service for every D-Bus session service This is correct for 1.24.x (which I'm working against at the moment) but needs trivial adjustments for 1.26, because org.gtk.Private.* have been renamed to org.gtk.vfs.*.
Alex, can you look at please?
Sorry, I don't currently have a GNOME 3.18 development environment, so there'll be a bit of a lead time before I can adjust the second patch for 1.26. I think the first patch should be branch-independent.
Review of attachment 312329 [details] [review]: ::: monitor/gdu/Makefile.am @@ +56,2 @@ clean-local: rm -f *~ *.loT $(BUILT_SOURCES) $(service_DATA) Philip Withnall points out that this clean-local rule can go away now that its contents are in CLEANFILES. ::: monitor/gphoto2/Makefile.am @@ -86,1 @@ -EXTRA_DIST = hal-marshal.list $(service_in_files) gphoto2.monitor Philip also pointed out that this incorrectly loses hal-marshal.list from EXTRA_DIST, which I need to fix.
Created attachment 312371 [details] [review] Use conventional naming for D-Bus session services This naming is mandatory for the system bus, but is also recommended for the session bus. The D-Bus maintainers recommend that all activatable session services' service files are named according to the bus name, so that any conflict is resolved in a deterministic way. If the services are in different directories (precedence levels) the result is the same as it is now: the higher precedence "wins". If the services are in the same directory, either one overwrites the other and consistently "wins", or a packaging system like dpkg prevents co-installation. If the service files were named differently, it would be possible to have two implementations for the same name. dbus-daemon resolves this by choosing one arbitrarily, not necessarily the same one every time. systemd's kdbus support is more strict (or less concerned with backwards compatibility), and treats this situation as an error. --- Rebased on master (just after 1.26.0)
Created attachment 312372 [details] [review] Add a corresponding systemd user service for every D-Bus session service When using "systemd --user" in conjunction with "dbus-daemon --session --systemd-activation", this ensures that each daemon is correctly placed in its own cgroup, instead of being treated as part of dbus.service. --- Rebased on master (just after 1.26.0)
Created attachment 312373 [details] [review] [1.24-compatible] Add a corresponding systemd user service for every D-Bus session service --- Fixed version of the original 1.24-compatible patch, in case anyone wants that.
All three patches now look good to me, for what it’s worth.
Review of attachment 312372 [details] [review]: looks good to me
Review of attachment 312371 [details] [review]: looks good to me
Pushed to master as commit 957fff5 and commit dc7040d. Thanks!
Comment on attachment 312373 [details] [review] [1.24-compatible] Add a corresponding systemd user service for every D-Bus session service This one is unlikely to be merged; it's only here for people who might want to backport this feature. Marking as rejected.
Those patches break our test suite, following commit is needed to fix it: commit ff92ef3aa4b09a648bd38152cc61ddfb99f41895