Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79
@ 2024-12-10 16:22 Fiona Klute via buildroot
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 2/4] package/bluez5_utils: fix dbusconfdir Fiona Klute via buildroot
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Fiona Klute via buildroot @ 2024-12-10 16:22 UTC (permalink / raw)
  To: buildroot
  Cc: Fiona Klute, Grzegorz Blach, Marcin Bis, Fabrice Fontaine,
	Thomas Petazzoni

From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

Upstream changelog:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36

Patch for musl compatibility taken from upstream "master".

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
 .../bluez5_utils-headers.mk                   |  2 +-
 ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++
 package/bluez5_utils/bluez5_utils.hash        |  2 +-
 package/bluez5_utils/bluez5_utils.mk          |  2 +-
 4 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch

diff --git a/package/bluez5_utils-headers/bluez5_utils-headers.mk b/package/bluez5_utils-headers/bluez5_utils-headers.mk
index 1fd4e0fff3..7acf62b226 100644
--- a/package/bluez5_utils-headers/bluez5_utils-headers.mk
+++ b/package/bluez5_utils-headers/bluez5_utils-headers.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 # Keep the version and patches in sync with bluez5_utils
-BLUEZ5_UTILS_HEADERS_VERSION = 5.78
+BLUEZ5_UTILS_HEADERS_VERSION = 5.79
 BLUEZ5_UTILS_HEADERS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
 BLUEZ5_UTILS_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
 BLUEZ5_UTILS_HEADERS_DL_SUBDIR = bluez5_utils
diff --git a/package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch b/package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch
new file mode 100644
index 0000000000..dc823e9277
--- /dev/null
+++ b/package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch
@@ -0,0 +1,33 @@
+From 9d69dba21f1e46b34cdd8ae27fec11d0803907ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= <gudni.m.g@gmail.com>
+Date: Sat, 2 Nov 2024 16:10:18 +0000
+Subject: [PATCH] gdbus: define MAX_INPUT for musl
+
+This is the same solution as was done in src/shared/util.c
+
+Upstream: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=9d69dba21f1e46b34cdd8ae27fec11d0803907ee
+Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
+---
+ gdbus/object.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/gdbus/object.c b/gdbus/object.c
+index 84f116bf1..7b0476f1a 100644
+--- a/gdbus/object.c
++++ b/gdbus/object.c
+@@ -20,6 +20,12 @@
+ #include <dbus/dbus.h>
+ 
+ #include "gdbus.h"
++
++/* define MAX_INPUT for musl */
++#ifndef MAX_INPUT
++#define MAX_INPUT _POSIX_MAX_INPUT
++#endif
++
+ #include "src/shared/util.h"
+ 
+ #define info(fmt...)
+-- 
+2.45.2
+
diff --git a/package/bluez5_utils/bluez5_utils.hash b/package/bluez5_utils/bluez5_utils.hash
index 41e39e0b5c..9b39b19c08 100644
--- a/package/bluez5_utils/bluez5_utils.hash
+++ b/package/bluez5_utils/bluez5_utils.hash
@@ -1,5 +1,5 @@
 # From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc:
-sha256  830fed1915c5d375b8de0f5e6f45fcdea0dcc5ff5ffb3d31db6ed0f00d73c5e3  bluez-5.78.tar.xz
+sha256  4164a5303a9f71c70f48c03ff60be34231b568d93a9ad5e79928d34e6aa0ea8a  bluez-5.79.tar.xz
 # Locally computed
 sha256  b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259  COPYING
 sha256  ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5  COPYING.LIB
diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index 717c10e870..1695aeb210 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 # Keep the version and patches in sync with bluez5_utils-headers
-BLUEZ5_UTILS_VERSION = 5.78
+BLUEZ5_UTILS_VERSION = 5.79
 BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
 BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
 BLUEZ5_UTILS_INSTALL_STAGING = YES
-- 
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 2/4] package/bluez5_utils: fix dbusconfdir
  2024-12-10 16:22 [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Fiona Klute via buildroot
@ 2024-12-10 16:22 ` Fiona Klute via buildroot
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 3/4] package/bluez5_utils: install datafiles with correct permissions Fiona Klute via buildroot
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Fiona Klute via buildroot @ 2024-12-10 16:22 UTC (permalink / raw)
  To: buildroot
  Cc: Fiona Klute, Grzegorz Blach, Marcin Bis, Fabrice Fontaine,
	Thomas Petazzoni

From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

Since D-Bus 1.14.0 installing default policies into sysconfdir (/etc)
is deprecated, they should go into datadir (/usr/share) instead
[1]. Follow that policy.

[1] https://gitlab.freedesktop.org/dbus/dbus/-/blob/8f1e00427f7048f8b24c3a1cfca8903254fe00d4/NEWS#L274-283

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
 package/bluez5_utils/bluez5_utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index 1695aeb210..7725fb94bf 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -28,7 +28,7 @@ BLUEZ5_UTILS_CONF_OPTS = \
 	--disable-lsan \
 	--disable-ubsan \
 	--disable-pie \
-	--with-dbusconfdir=/etc
+	--with-dbusconfdir=/usr/share
 
 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_OBEX),y)
 BLUEZ5_UTILS_CONF_OPTS += --enable-obex
-- 
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 3/4] package/bluez5_utils: install datafiles with correct permissions
  2024-12-10 16:22 [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Fiona Klute via buildroot
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 2/4] package/bluez5_utils: fix dbusconfdir Fiona Klute via buildroot
@ 2024-12-10 16:22 ` Fiona Klute via buildroot
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 4/4] package/bluez5_utils: tidy up the init script Fiona Klute via buildroot
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Fiona Klute via buildroot @ 2024-12-10 16:22 UTC (permalink / raw)
  To: buildroot
  Cc: Fiona Klute, Grzegorz Blach, Marcin Bis, Fabrice Fontaine,
	Thomas Petazzoni

From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

The datafiles include the dbus policy, without which bluetoothd fails
to start (unless it is provided by other means):

# /usr/libexec/bluetooth/bluetoothd -n
bluetoothd[1011]: Bluetooth daemon 5.78
D-Bus setup failed: Connection ":1.7" is not allowed to own the service "org.bluez" due to security policies in the configuration file
bluetoothd[1011]: src/main.c:main() Unable to get on D-Bus

The installation issue 1a8676aa6e4b0e372a1a744eac6e53c90c03bf0e was
meant to fix is the result of upstream incorrectly installing
/etc/bluetooth with 0555 (strictly read-only) permissions.

Fixes: 1a8676aa6e4b0e372a1a744eac6e53c90c03bf0e

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
Changes v1 -> v2:
* Path has been accepted upstream, update patch file and upstream URL.

 ...eave-config-files-writable-for-owner.patch | 35 +++++++++++++++++++
 package/bluez5_utils/bluez5_utils.mk          |  4 ++-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 package/bluez5_utils/0002-Leave-config-files-writable-for-owner.patch

diff --git a/package/bluez5_utils/0002-Leave-config-files-writable-for-owner.patch b/package/bluez5_utils/0002-Leave-config-files-writable-for-owner.patch
new file mode 100644
index 0000000000..09ebe5edf1
--- /dev/null
+++ b/package/bluez5_utils/0002-Leave-config-files-writable-for-owner.patch
@@ -0,0 +1,35 @@
+From b1fd409960001a77cda2a09ecc00147ebd9c3667 Mon Sep 17 00:00:00 2001
+From: Fiona Klute <fiona.klute@gmx.de>
+Date: Mon, 9 Dec 2024 16:40:43 +0100
+Subject: [PATCH BlueZ] build: Leave config files writable for owner
+
+This is needed for builds running as non-root users, so the build
+process and any distribution tools can create/move/delete files in the
+config directory without adjusting permissions separately. Limiting
+writes from the running service needs to be done in the systemd unit
+(already the case) or init script.
+
+See also: https://lore.kernel.org/linux-bluetooth/4d1206df-598b-4a68-8655-74981b62ecca@gmx.de/T/
+Reviewed-by: Bastien Nocera <hadess@hadess.net>
+Upstream: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=b1fd409960001a77cda2a09ecc00147ebd9c3667
+Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 297d0774c..29018a91c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -32,7 +32,7 @@ confdir = $(sysconfdir)/bluetooth
+ statedir = $(localstatedir)/lib/bluetooth
+ 
+ bluetoothd-fix-permissions:
+-	install -dm555 $(DESTDIR)$(confdir)
++	install -dm755 $(DESTDIR)$(confdir)
+ 	install -dm700 $(DESTDIR)$(statedir)
+ 
+ if DATAFILES
+-- 
+2.45.2
+
diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index 7725fb94bf..e3b47e1e80 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -13,6 +13,9 @@ BLUEZ5_UTILS_LICENSE = GPL-2.0+, LGPL-2.1+
 BLUEZ5_UTILS_LICENSE_FILES = COPYING COPYING.LIB
 BLUEZ5_UTILS_CPE_ID_VENDOR = bluez
 BLUEZ5_UTILS_CPE_ID_PRODUCT = bluez
+# required because 0002-Leave-config-files-writable-for-owner.patch
+# modifies Makefile.am
+BLUEZ5_UTILS_AUTORECONF = YES
 
 BLUEZ5_UTILS_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_BLUEZ5_UTILS_HEADERS),bluez5_utils-headers) \
@@ -22,7 +25,6 @@ BLUEZ5_UTILS_DEPENDENCIES = \
 BLUEZ5_UTILS_CONF_OPTS = \
 	--enable-library \
 	--disable-cups \
-	--disable-datafiles \
 	--disable-manpages \
 	--disable-asan \
 	--disable-lsan \
-- 
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 4/4] package/bluez5_utils: tidy up the init script
  2024-12-10 16:22 [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Fiona Klute via buildroot
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 2/4] package/bluez5_utils: fix dbusconfdir Fiona Klute via buildroot
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 3/4] package/bluez5_utils: install datafiles with correct permissions Fiona Klute via buildroot
@ 2024-12-10 16:22 ` Fiona Klute via buildroot
  2024-12-29 22:35 ` [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Thomas Petazzoni via buildroot
  2024-12-31 10:54 ` Thomas Petazzoni
  4 siblings, 0 replies; 8+ messages in thread
From: Fiona Klute via buildroot @ 2024-12-10 16:22 UTC (permalink / raw)
  To: buildroot
  Cc: Fiona Klute, Grzegorz Blach, Marcin Bis, Fabrice Fontaine,
	Thomas Petazzoni

From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

* use long-form options
* consistently use start-stop-daemon with --exec
* wait for process to be gone and delete PID file on stop

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
 package/bluez5_utils/S40bluetoothd | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/package/bluez5_utils/S40bluetoothd b/package/bluez5_utils/S40bluetoothd
index ee4abe8b63..04f3f5ee94 100644
--- a/package/bluez5_utils/S40bluetoothd
+++ b/package/bluez5_utils/S40bluetoothd
@@ -11,7 +11,8 @@ BLUETOOTHD_ARGS="-n"
 start() {
 	printf 'Starting %s: ' "$DAEMON"
 	# shellcheck disable=SC2086 # we need the word splitting
-	start-stop-daemon -S -q -m -b -p "$PIDFILE" -x "/usr/libexec/bluetooth/$DAEMON" \
+	start-stop-daemon --start --background --make-pidfile \
+		--pidfile "$PIDFILE" --exec "/usr/libexec/bluetooth/$DAEMON" \
 		-- $BLUETOOTHD_ARGS
 	status=$?
 	if [ "$status" -eq 0 ]; then
@@ -24,25 +25,32 @@ start() {
 
 stop() {
 	printf 'Stopping %s: ' "$DAEMON"
-	start-stop-daemon -K -q -p "$PIDFILE"
+	start-stop-daemon --stop --pidfile "$PIDFILE" \
+		--exec "/usr/libexec/bluetooth/$DAEMON"
 	status=$?
 	if [ "$status" -eq 0 ]; then
 		echo "OK"
 	else
 		echo "FAIL"
+		return "$status"
 	fi
+	while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
+		--exec "/usr/libexec/bluetooth/$DAEMON"; do
+		sleep 0.1
+	done
+	rm -f "$PIDFILE"
 	return "$status"
 }
 
 restart() {
 	stop
-	sleep 1
 	start
 }
 
 reload() {
 	printf 'Reloading %s: ' "$DAEMON"
-	start-stop-daemon -K -s HUP -q -p "$PIDFILE"
+	start-stop-daemon --stop --signal HUP -q --pidfile "$PIDFILE" \
+		--exec "/usr/libexec/bluetooth/$DAEMON"
 	status=$?
 	if [ "$status" -eq 0 ]; then
 		echo "OK"
-- 
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79
  2024-12-10 16:22 [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Fiona Klute via buildroot
                   ` (2 preceding siblings ...)
  2024-12-10 16:22 ` [Buildroot] [PATCH v2 4/4] package/bluez5_utils: tidy up the init script Fiona Klute via buildroot
@ 2024-12-29 22:35 ` Thomas Petazzoni via buildroot
  2024-12-31 10:54 ` Thomas Petazzoni
  4 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-29 22:35 UTC (permalink / raw)
  To: Fiona Klute via buildroot
  Cc: Fiona Klute, Grzegorz Blach, Marcin Bis, Fabrice Fontaine

On Tue, 10 Dec 2024 17:22:39 +0100
Fiona Klute via buildroot <buildroot@buildroot.org> wrote:

> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
> 
> Upstream changelog:
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36
> 
> Patch for musl compatibility taken from upstream "master".
> 
> Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
> ---
>  .../bluez5_utils-headers.mk                   |  2 +-
>  ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++
>  package/bluez5_utils/bluez5_utils.hash        |  2 +-
>  package/bluez5_utils/bluez5_utils.mk          |  2 +-
>  4 files changed, 36 insertions(+), 3 deletions(-)
>  create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch

Thanks, great patch series, applied!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79
  2024-12-10 16:22 [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Fiona Klute via buildroot
                   ` (3 preceding siblings ...)
  2024-12-29 22:35 ` [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Thomas Petazzoni via buildroot
@ 2024-12-31 10:54 ` Thomas Petazzoni
  2024-12-31 14:59   ` Fiona Klute via buildroot
  4 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2024-12-31 10:54 UTC (permalink / raw)
  To: Fiona Klute via buildroot
  Cc: Fiona Klute, Grzegorz Blach, Marcin Bis, Fabrice Fontaine

Hello Fiona,

On Tue, 10 Dec 2024 17:22:39 +0100
Fiona Klute via buildroot <buildroot@buildroot.org> wrote:

> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
> 
> Upstream changelog:
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36
> 
> Patch for musl compatibility taken from upstream "master".
> 
> Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
> ---
>  .../bluez5_utils-headers.mk                   |  2 +-
>  ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++
>  package/bluez5_utils/bluez5_utils.hash        |  2 +-
>  package/bluez5_utils/bluez5_utils.mk          |  2 +-
>  4 files changed, 36 insertions(+), 3 deletions(-)
>  create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch

It looks like this update is causing a few build failures:

  http://autobuild.buildroot.net/?reason=bluez5_utils-5.79

Like this:

/home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: profiles/input/bluetoothd-hog.o: in function `hog_disconnect':
/home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x3c): undefined reference to `input_get_userspace_hid'
/home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x44): undefined reference to `input_get_userspace_hid'
collect2: error: ld returned 1 exit status

Could you have a look perhaps?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79
  2024-12-31 10:54 ` Thomas Petazzoni
@ 2024-12-31 14:59   ` Fiona Klute via buildroot
  2024-12-31 15:59     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 8+ messages in thread
From: Fiona Klute via buildroot @ 2024-12-31 14:59 UTC (permalink / raw)
  To: Thomas Petazzoni, Fiona Klute via buildroot
  Cc: Grzegorz Blach, Marcin Bis, Fabrice Fontaine

Hi Thomas!

Am 31.12.24 um 12:54 schrieb Thomas Petazzoni:
> Hello Fiona,
>
> On Tue, 10 Dec 2024 17:22:39 +0100
> Fiona Klute via buildroot <buildroot@buildroot.org> wrote:
>
>> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
>>
>> Upstream changelog:
>> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36
>>
>> Patch for musl compatibility taken from upstream "master".
>>
>> Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
>> ---
>>   .../bluez5_utils-headers.mk                   |  2 +-
>>   ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++
>>   package/bluez5_utils/bluez5_utils.hash        |  2 +-
>>   package/bluez5_utils/bluez5_utils.mk          |  2 +-
>>   4 files changed, 36 insertions(+), 3 deletions(-)
>>   create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch
>
> It looks like this update is causing a few build failures:
>
>    http://autobuild.buildroot.net/?reason=bluez5_utils-5.79
>
> Like this:
>
> /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: profiles/input/bluetoothd-hog.o: in function `hog_disconnect':
> /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x3c): undefined reference to `input_get_userspace_hid'
> /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x44): undefined reference to `input_get_userspace_hid'
> collect2: error: ld returned 1 exit status
>
> Could you have a look perhaps?

I can reproduce the failure with the combination of Bluez features
selected in that autobuild run [1]:

> BR2_PACKAGE_BLUEZ5_UTILS=y
>
> #
> # OBEX support needs a toolchain w/ C++
> #
> # BR2_PACKAGE_BLUEZ5_UTILS_CLIENT is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_MONITOR is not set
> BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y
> BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
> # BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AUDIO is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID is not set
> BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG=y
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MESH is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NETWORK is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC is not set
> # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP is not set

The input_get_userspace_hid function is implemented in
profiles/input/device.c, apparently that doesn't get compiled if
BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID is not enabled. If I enable it, the
build completes. That looks like an upstream bug to me, either
--enable-hog needs to be fixed so everything it needs gets compiled, or
it needs to require --enable-hid.

I guess the quick fix for Buildroot would be to add a "depend on/select
BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID" to
BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG, the tricky part is that "select"
would create a loop because BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID already
selects HOG, so it'd probably have to be "depends on". Or we could wrap
them into a combined option, but I think it'd make sense to wait for an
upstream opinion for that.

I'll put making an upstream report on my list for next year, if you or
anyone else wants to do it first please CC me. :-)

Best regards,
Fiona

[1]
http://autobuild.buildroot.net/results/312/312a63b8fee536d345e0e5cbbb0b0c155d81635e//config

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79
  2024-12-31 14:59   ` Fiona Klute via buildroot
@ 2024-12-31 15:59     ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-31 15:59 UTC (permalink / raw)
  To: Fiona Klute
  Cc: Fiona Klute via buildroot, Grzegorz Blach, Marcin Bis,
	Fabrice Fontaine

Hello Fiona,

On Tue, 31 Dec 2024 16:59:55 +0200
Fiona Klute <fiona.klute@gmx.de> wrote:

> The input_get_userspace_hid function is implemented in
> profiles/input/device.c, apparently that doesn't get compiled if
> BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID is not enabled. If I enable it, the
> build completes. That looks like an upstream bug to me, either
> --enable-hog needs to be fixed so everything it needs gets compiled, or
> it needs to require --enable-hid.
> 
> I guess the quick fix for Buildroot would be to add a "depend on/select
> BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID" to
> BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG, the tricky part is that "select"
> would create a loop because BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID already
> selects HOG, so it'd probably have to be "depends on". Or we could wrap
> them into a combined option, but I think it'd make sense to wait for an
> upstream opinion for that.
> 
> I'll put making an upstream report on my list for next year, if you or
> anyone else wants to do it first please CC me. :-)

Thanks for the investigation! I agree it makes sense to report the
issue upstream, and hopefully have a fix soon from them. I don't think
anyone will beat you at doing the upstream bug report though :)

Happy New Year in advance!

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-31 15:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 16:22 [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Fiona Klute via buildroot
2024-12-10 16:22 ` [Buildroot] [PATCH v2 2/4] package/bluez5_utils: fix dbusconfdir Fiona Klute via buildroot
2024-12-10 16:22 ` [Buildroot] [PATCH v2 3/4] package/bluez5_utils: install datafiles with correct permissions Fiona Klute via buildroot
2024-12-10 16:22 ` [Buildroot] [PATCH v2 4/4] package/bluez5_utils: tidy up the init script Fiona Klute via buildroot
2024-12-29 22:35 ` [Buildroot] [PATCH v2 1/4] package/bluez5_utils{, -headers}: bump version to 5.79 Thomas Petazzoni via buildroot
2024-12-31 10:54 ` Thomas Petazzoni
2024-12-31 14:59   ` Fiona Klute via buildroot
2024-12-31 15:59     ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox