mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 06:28:00 +02:00
bus: use ln -fs to enable dbus in systemd, not $(LN_S)
Using $(LN_S) is inappropriate because it could in theory mean either ln -s, ln or cp -p depending on autoconf checks. Not using -f breaks reinstallation directly from source (DESTDIR unset), because the symlinks will already exist. Because systemd isn't currently portable to non-Linux, let alone non-SUS-compliant systems, it seems safe to assume that ln -fs behaves as specified by SUS if systemd was found. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37870 Reviewed-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
f0d4e0fc97
commit
3b82500b1b
1 changed files with 6 additions and 4 deletions
|
|
@ -204,14 +204,16 @@ install-data-hook:
|
|||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
|
||||
if HAVE_SYSTEMD
|
||||
# Install dbus.socket as default implementation of a D-Bus stack
|
||||
# Install dbus.socket as default implementation of a D-Bus stack.
|
||||
# Deliberately not using $(LN_S) here: ln -fs is not universally portable,
|
||||
# but neither is systemd, so it's OK to assume here that ln complies with SUS.
|
||||
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
|
||||
$(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
|
||||
ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
|
||||
# Unconditionally enable D-Bus on systemd installations
|
||||
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
|
||||
$(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
|
||||
ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
|
||||
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
|
||||
$(LN_S) ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
|
||||
ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
|
||||
endif
|
||||
|
||||
if DBUS_UNIX
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue