diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-09-24 13:58:02 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2016-09-26 12:58:27 +0200 |
commit | 9103a70c72d7f4aed0959963fc18b0f597af6572 (patch) | |
tree | fbc1b6264e59a2c9a0e871949bf86655f4088940 /src/dbus/server/server.am | |
parent | e126bd500e0fd3eba4a29c1ffaa37a78d910f02b (diff) |
Add a systemd user service as a backend for the D-Bus session services
On systems with a systemd user session and a D-Bus user bus that
uses it for activation, this ensures that syncevo-dbus-server ends
up in its own cgroup, instead of being treated as part of dbus.service.
If org._01.pim.contacts and org.syncevolution are activated in quick
succession, it also prevents a race condition that would make one of
the activations fail, similar to
<https://bugs.freedesktop.org/show_bug.cgi?id=53220> in
telepathy-mission-control.
Diffstat (limited to 'src/dbus/server/server.am')
-rw-r--r-- | src/dbus/server/server.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dbus/server/server.am b/src/dbus/server/server.am index 8ecfe64d..18c631fe 100644 --- a/src/dbus/server/server.am +++ b/src/dbus/server/server.am @@ -117,6 +117,7 @@ src_dbus_server_libsyncevodbushelper_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(C # Deal with .service, .desktop and startup script files. CLEANFILES += \ $(src_dbus_server_service_files) \ + $(src_dbus_server_systemd_files) \ $(src_dbus_server_desktop) \ $(src_dbus_server_script) @@ -137,10 +138,18 @@ src_dbus_server_service_files_in = src/dbus/server/org.syncevolution.service.in src_dbus_server_service_files = $(src_dbus_server_service_files_in:.service.in=.service) src_dbus_server_servicedir = $(DBUS_SERVICES_DIR) src_dbus_server_service_DATA = $(src_dbus_server_service_files) + +src_dbus_server_systemd_files_in = src/dbus/server/syncevo-dbus-server.service.in +src_dbus_server_systemd_files = $(src_dbus_server_systemd_files_in:.service.in=.service) +src_dbus_server_systemddir = $(prefix)/lib/systemd/user +src_dbus_server_systemd_DATA = $(src_dbus_server_systemd_files) + +# this works for both dbus and systemd service files src/dbus/server/%.service: src/dbus/server/%.service.in @sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@SYNCEVO_DBUS_SERVER_ARGS\@|$(SYNCEVO_DBUS_SERVER_ARGS)|" $< >$@ if COND_DBUS_PIM +# this shares syncevo-dbus-server.service src_dbus_server_service_files_in += \ src/dbus/server/pim/org._01.pim.contacts.service.in @@ -175,6 +184,7 @@ endif # COND_DBUS_PIM dist_noinst_DATA += \ $(src_dbus_server_service_files_in) \ + $(src_dbus_server_systemd_files_in) \ $(src_dbus_server_script_in) \ $(src_dbus_server_desktop_in) |