diff mbox series

[BlueZ,10/10] build: install dbus-org.bluez.obex.service symlink

Message ID 20240116-autofoo-v1-10-626f6b54bd06@gmail.com
State Superseded
Headers show
Series Autotools papercuts, linker GC, symlink dbus-org.bluez.obex.service | expand

Commit Message

Emil Velikov via B4 Relay Jan. 16, 2024, 1:52 p.m. UTC
From: Emil Velikov <emil.velikov@collabora.com>

obex.service has an alias(dbus-org.bluez.obex.service) which is created
as it's enabled. At the same time, the dbus service references the alias
itself.

Thus the dbus socket activation can happen, only when the service is
already enabled/running... Which defeats the whole purpose.

Create/install the respective symlink/alias, so that any user looking
for the dbus will start it.

Note: we need a hook here instead of LN_S to create the in-tree file,
since `install' aggressively dereferences it.
---
 Makefile.obexd | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/Makefile.obexd b/Makefile.obexd
index c2b5c6d7a..363295d0e 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -3,6 +3,12 @@  if SYSTEMD
 systemduserunitdir = $(SYSTEMD_USERUNITDIR)
 systemduserunit_DATA = obexd/src/obex.service
 
+install-data-hook:
+	$(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
+
+uninstall-hook:
+	rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
+
 dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
 dbussessionbus_DATA = obexd/src/org.bluez.obex.service
 endif