Bug 92402

Summary: dbus user units should be static
Product: dbus Reporter: Tom Yan <tom.ty89>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED FIXED QA Contact: D-Bus Maintainers <dbus>
Severity: trivial    
Priority: medium CC: dh.herrmann, lennart
Version: git masterKeywords: NEEDINFO, patch
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tom Yan 2015-10-10 16:22:11 UTC
https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/dbus&id=ab5051bd76578544f4c849d7025879cfa3051018

I notice that when dbus is built with  --enable-user-session, dbus.socket will be symlinked in /usr/lib/systemd/user/sockets.target.wants/.

In this case the socket unit should be static since it does not need to be enabled explicitly.

Since the [Install] section in the service unit is only for aliasing, it should be gone as well.

Otherwise, dbus.socket will be marked as "disabled" in `systemctl --global list-unit-files`, which could be confusing.

P.S. If for some reason the change will be symlinking dbus.socket in /etc instead, Also=dbus.service is not necessary in dbus.socket since the [Install] section in dbus.service is only for aliasing, as mentioned above.
Comment 1 Simon McVittie 2015-10-26 11:55:18 UTC
systemd experts: what's the preferred resolution for this one? Install the symlink and lose the [Install] section as Tom suggests?

For a system service I'd say "don't install the symlink and expect the distribution packages to enable it", but D-Bus is OS plumbing that is used by systemd on non-kdbus systems, so it's a bit special anyway; and distributions don't typically have infrastructure for enabling user services like they do for enabling system services, AIUI.
Comment 2 Simon McVittie 2015-10-26 11:56:25 UTC
I'm not going to touch how this works in 1.10, because stable branches shouldn't contain surprises; but I'm happy to make it correct in 1.11, if we can agree what the most correct thing is (even if that requires distributors to change their packaging).
Comment 3 Simon McVittie 2015-11-07 11:59:07 UTC
(In reply to Simon McVittie from comment #1)
> systemd experts: what's the preferred resolution for this one? Install the
> symlink and lose the [Install] section as Tom suggests?

Lennart says we should indeed do that.
Comment 4 Simon McVittie 2015-11-07 12:15:57 UTC
Fixed in git for 1.11.0.

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.