From 3b82500b1b768d880100ed5ea98afcac26286257 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 7 Jun 2011 14:01:39 +0100 Subject: 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 --- bus/Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bus/Makefile.am b/bus/Makefile.am index bb895e2a..9761c27c 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -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 -- cgit v1.2.3 From 73e259322de5d4e46bbac8113ab5dcb38c69dd94 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 8 Jun 2011 11:35:22 +0100 Subject: NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index d0b3420c..4d0f3b16 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ Changes: • Use #!/bin/sh for run-with-tmp-session-bus.sh, making it work on *BSD (fd.o #35880, Timothy Redaelli) +• Use ln -fs to set up dbus for systemd, which should fix reinstallation + when not using a DESTDIR (fd.o #37870, Simon McVittie) + • Windows-specific changes: · don't try to build dbus-daemon-launch-helper (fd.o #37838, Mark Brand) -- cgit v1.2.3