| |
+ Packages with systemd unit files *must* put them into `+%{_unitdir}+` or `+%{_userunitdir}+`. `+%{_unitdir}+` evaluates to /usr/lib/systemd/system on all Fedora systems (F-15+) and `+%{_userunitdir}%+` evaluates to /usr/lib/systemd/user. Unit files are architecture independent (hence, not `+%{_lib}+`) and needed early in the boot process. Most systemd service files should use `+%{_unitdir}+`. However, if the service runs as part of a user session (e.g. pipewire services, gpg-agent, tracker, etc), use `+%{_userunitdir}+` instead.
|
I recently tweaked a package where the service file was installed in system location for systemd, but it needed to be in the user directory. While looking around for the proper macro to use, I noted this guideline implies you can't use
%{_userunitdir}
, so here's a small tweak pointing out this important alternative.