Bug 92165

Summary: colord-session: Add a systemd user service corresponding to the D-Bus session service
Product: colord Reporter: Simon McVittie <smcv>
Component: clientAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: low Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Add a systemd user service corresponding to the D-Bus session service
Add a systemd user service corresponding to the D-Bus session service

Description Simon McVittie 2015-09-28 13:26:09 UTC
Created attachment 118496 [details] [review]
Add a systemd user service corresponding to the D-Bus session service

This ensures that it ends up in its own cgroup under systemd user
sessions where dbus-daemon uses systemd activation, rather than
being treated as part of dbus.service.

---

This is basically Bug #44735, but for the session bus (where the use of systemd activation is quite a new thing) rather than the system bus.

For simplicity and readability, I haven't added a --with-systemduserservicedir configure option, and I've used a slightly more comprehensible name for the variable. It is correct to install in ${prefix}/lib/systemd/user even on platforms where ${libdir} is /usr/lib64 (Red Hat etc.) or /usr/lib/x86_64-linux-gnu (Debian etc.) instead of /usr/lib, or where the system parts of systemd are in /lib instead of /usr/lib (Debian again).

This deliberately does not configure the systemd unit to be started on login: it is still only launched on-demand via D-Bus activation, just like it always was.
Comment 1 Richard Hughes 2015-09-28 14:42:07 UTC
I think you might have attached the wrong patch to this bug; if you could do a pull request on https://github.com/hughsie/colord that would be awesome. Thanks.
Comment 2 Simon McVittie 2015-09-28 16:58:33 UTC
Created attachment 118497 [details] [review]
Add a systemd user service corresponding to the D-Bus session service

---

Sorry, here's the right patch. As you might have gathered, I'm doing this to a lot of services in parallel, so it was only a matter of time before I got confused :-(

I'll try to put together a pull request later, but I'm currently working from packages (tarballs) rather than git source.
Comment 3 Richard Hughes 2015-09-29 13:56:10 UTC
Pushed to master, thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.