bluez icon indicating copy to clipboard operation
bluez copied to clipboard

bluez-5.73 only installs org.bluez.obex.service when systemd support is enabled

Open pacho2 opened this issue 1 year ago • 7 comments

Even after applying: https://github.com/bluez/bluez/commit/b16b19885c5383cd0499503617b98ceb188c898e

Current build system installs dbussessionbus_DATA = obexd/src/org.bluez.obex.service only when systemd is enabled. The following changes would be needed:

--- bluez-5.73.orig/Makefile.obexd	2024-04-02 10:38:48.743419656 +0200
+++ bluez-5.73/Makefile.obexd	2024-04-02 10:40:53.300086281 +0200
@@ -1,13 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0
 if OBEX
 
+dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
+dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+
 if SYSTEMD
 systemduserunitdir = $(SYSTEMD_USERUNITDIR)
 systemduserunit_DATA = obexd/src/obex.service
 
-dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
-dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-
 obexd-add-service-symlink:
 	$(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service

Thanks

pacho2 avatar Apr 07 '24 16:04 pacho2

I think this was working until commit "build: obexd: Fix make distcheck" which moved it back under systemd. @Vudentz ?

joakim-tjernlund avatar Apr 09 '24 16:04 joakim-tjernlund

I think this was working until commit "build: obexd: Fix make distcheck" which moved it back under systemd. @Vudentz ?

Haven't found a way to resolve the build error though, so fill free to propose a change.

Vudentz avatar Apr 09 '24 17:04 Vudentz

I think this was working until commit "build: obexd: Fix make distcheck" which moved it back under systemd. @Vudentz ?

Haven't found a way to resolve the build error though, so fill free to propose a change.

Just tried make distcheck on a clean checkout and I get a bunch of:

n file included from ../../profiles/audio/bap.c:47:
../../src/shared/bap.h:13:10: fatal error: src/shared/bap-defs.h: No such file or directory
   13 | #include "src/shared/bap-defs.h"

Should I do something else before make distcheck ?

joakim-tjernlund avatar Apr 09 '24 20:04 joakim-tjernlund

I think this was working until commit "build: obexd: Fix make distcheck" which moved it back under systemd. @Vudentz ?

Haven't found a way to resolve the build error though, so fill free to propose a change.

Just tried make distcheck on a clean checkout and I get a bunch of:

n file included from ../../profiles/audio/bap.c:47:
../../src/shared/bap.h:13:10: fatal error: src/shared/bap-defs.h: No such file or directory
   13 | #include "src/shared/bap-defs.h"

Should I do something else before make distcheck ?

git clone https://github.com/bluez/bluez.git bluez-github
./bootstrap-configure && make -j23 distcheck
...
============================================
bluez-5.73 archives ready for distribution: 
bluez-5.73.tar.xz
============================================

Vudentz avatar Apr 09 '24 20:04 Vudentz

I think this was working until commit "build: obexd: Fix make distcheck" which moved it back under systemd. @Vudentz ?

Haven't found a way to resolve the build error though, so fill free to propose a change.

Just tried make distcheck on a clean checkout and I get a bunch of:

n file included from ../../profiles/audio/bap.c:47:
../../src/shared/bap.h:13:10: fatal error: src/shared/bap-defs.h: No such file or directory
   13 | #include "src/shared/bap-defs.h"

Should I do something else before make distcheck ?

git clone https://github.com/bluez/bluez.git bluez-github
./bootstrap-configure && make -j23 distcheck
...
============================================
bluez-5.73 archives ready for distribution: 
bluez-5.73.tar.xz
============================================

.... configure: error: ELL source is required or use --enable-external-ell

.... ./bootstrap-configure --enable-external-ell ... make --no-print-directory distdir-am make[2]: *** No rule to make target 'ell/util.h', needed by 'distdir-am'. Stop. make[1]: *** [Makefile:12019: distdir] Error 2 make: *** [Makefile:12099: dist] Error 2

joakim-tjernlund avatar Apr 09 '24 20:04 joakim-tjernlund

Just to add to the discussion here, this is also a problem for the Yocto project. On BlueZ 5.72 this patch is being used: https://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch and it seems to me it is a really old patch (~8 years)

While much of the patch is not relevant anymore I believe this section is still relevant (just needs to be changed for BlueZ 5.73 and newer):

---
 Makefile.obexd                                                | 4 ++--
 .../src/{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
 rename obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} (76%)


diff --git a/Makefile.obexd b/Makefile.obexd
index de59d29..73004a3 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -1,12 +1,12 @@
 if SYSTEMD
 systemduserunitdir = $(SYSTEMD_USERUNITDIR)
 systemduserunit_DATA = obexd/src/obex.service
+endif
 
 dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
 dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-endif
 
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
 
 if OBEX

EDIT:

We'll likely just drop the patch on the Yocto side to proceed with the update. Anyone needing this can submit a new patch. I didn't find any patch upstream.

gudnimg avatar Jun 30 '24 13:06 gudnimg