fix: install the user units where systemd will find them
A build with a prefix of its own put them in $(PREFIX)/lib/systemd/user, which is right for /usr/local and wrong for the one prefix an install without root can use: systemd searches $XDG_DATA_HOME/systemd/user and never ~/.local/lib/systemd/user. An install into ~/.local came out with a working program whose watcher could not be enabled at all. They go under share now, which both a system prefix and a home one are searched for. Nothing changes for the packages - the deb and the rpm pass USERUNITDIR in themselves. That prefix is what an atomic distribution leaves a user, so the readme says how to install on Bazzite: layer the rpm and reboot, or put the whole thing in $HOME, which is where everything it writes ends up anyway.
This commit is contained in:
1 parent
004094ef78
commit
e09b145f3a
2 files changed
+26
-4
No files matched your search
@@ -23,13 +23,17 @@ MANDIR ?= $(DATADIR)/man
|
||||
# distribution that still keeps /lib separate from /usr/lib says so here - and
|
||||
# only guessed at when there is no systemd installed to ask.
|
||||
#
|
||||
# A build with a prefix of its own keeps the units under that prefix instead.
|
||||
# systemd searches $(PREFIX)/lib/systemd/user as well, and a file outside the
|
||||
# prefix it was asked for is not this build's to place.
|
||||
# A build with a prefix of its own keeps the units under that prefix instead,
|
||||
# and under share rather than lib. systemd searches both for a system prefix,
|
||||
# but only share for a home one: $XDG_DATA_HOME/systemd/user is a search path
|
||||
# and ~/.local/lib/systemd/user is not, so an install into ~/.local that put
|
||||
# the units in lib would leave the watcher impossible to enable. That prefix is
|
||||
# the one an atomic distribution leaves a user - there is no writing to /usr on
|
||||
# Bazzite or Silverblue without layering a package and rebooting.
|
||||
ifeq ($(PREFIX),/usr)
|
||||
USERUNITDIR ?= $(shell pkg-config --variable=systemduserunitdir systemd 2>/dev/null || echo /usr/lib/systemd/user)
|
||||
else
|
||||
USERUNITDIR ?= $(PREFIX)/lib/systemd/user
|
||||
USERUNITDIR ?= $(DATADIR)/systemd/user
|
||||
endif
|
||||
|
||||
LINGUAS := de
|
||||
|
||||
Reference in new issue
Block a user