GNU bug report logs -
#76924
31.0.50; Wrong install location for systemd user unit file
Previous Next
Reported by: Ulrich Müller <ulm <at> gentoo.org>
Date: Mon, 10 Mar 2025 18:57:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 31.1
Done: Ulrich Müller <ulm <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Ulrich Müller <ulm <at> gentoo.org>
> Date: Mon, 10 Mar 2025 19:56:05 +0100
>
> The top-level Makefile.in defines systemdunitdir=$(libdir)/systemd/user
> where libdir is taken from the --libdir configure option, so typically
> it will be /usr/local/lib64 or /usr/lib64 on a 64-bit system.
>
> This appears to be wrong, the file should be installed in a fixed "lib"
> location, not $(libdir).
>
> Reference:
> https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#id-1.8.5
>
> Table 2 lists these locations:
> /usr/local/lib/systemd/user User units installed by the administrator
> /usr/lib/systemd/user User units installed by the distribution package manager
>
>
> Possible solutions:
> - Install in systemdunitdir=$(prefix)/lib/systemd/user
> - Add a --with-systemduserunitdir option (this was already suggested
> in bug #16507 message #28)
The comment there says:
# Where the etc/emacs.service file is to be installed.
# The system value (typically /usr/lib/systemd/user) can be
# obtained with: pkg-config --variable=systemduserunitdir systemd
# but that does not respect configure's prefix.
# It is not clear where we should install this file when
# prefix != /usr (or /usr/local?) (eg for non-root installs).
# Other options include ~/.config/systemd/user/,
# $XDG_RUNTIME_DIR/systemd/user/
# It seems the user may end up having to make a manual link...
systemdunitdir=$(libdir)/systemd/user
So this isn't a simple mistake, but a deliberate decision. We should
do more research before we override this. For example: what do
distros do with this? do they really all use what you suggest?
Or maybe we should use pkg-config, at least if no --prefix was
specified at configure time?
This bug report was last modified 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.