Red Hat Bugzilla – Bug 1468501
preset override for user-session services missing compared to system service configuration
Last modified: 2017-08-15 04:22:32 EDT
By default, systemd system services are disabled after RPM package installation - unless they ship a preset override file. This is handled by the file "/usr/lib/systemd/system-preset/99-default-disable.preset".
No such policy/preset exists for user session services.
When using the systemd scriptlets from the Packaging Guidelines (in a package which ships a user session service), the "%systemd_user_post" macro is triggered on package installation, and thus enables the service in question for _ALL_ users on the system globally - including root, gdm, and others (which is obviously not the desired behavior).
I suggest shipping a user-preset file equivalent to the "system-preset/99-default-disable.preset" file to prevent this unexpected misbehavior.
Right now, one has to ship a preset file to explicitly prevent user services from being activated, which is exactly the opposite of what has to be done for system services (shipping a preset explicitly enabling it on installation, otherwise it's disabled by default).
Version-Release number of selected component (if applicable):
All systemd versions in fedora 25, 26, rawhide are affected.
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.