Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump BlueZ to v5.79, sync package with upstream #79

Merged
merged 10 commits into from
Feb 26, 2025
2 changes: 1 addition & 1 deletion package/bluez5_utils-headers/bluez5_utils-headers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################

# Keep the version and patches in sync with bluez5_utils
BLUEZ5_UTILS_HEADERS_VERSION = 5.75
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
Expand Down
41 changes: 0 additions & 41 deletions package/bluez5_utils/0001-configure.ac-Fix-disable-cups.patch

This file was deleted.

33 changes: 33 additions & 0 deletions package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 9d69dba21f1e46b34cdd8ae27fec11d0803907ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= <[email protected]>
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 <[email protected]>
---
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

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From b1fd409960001a77cda2a09ecc00147ebd9c3667 Mon Sep 17 00:00:00 2001
From: Fiona Klute <[email protected]>
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/[email protected]/T/
Reviewed-by: Bastien Nocera <[email protected]>
Upstream: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=b1fd409960001a77cda2a09ecc00147ebd9c3667
Signed-off-by: Fiona Klute (WIWA) <[email protected]>
---
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

16 changes: 12 additions & 4 deletions package/bluez5_utils/S40bluetoothd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion package/bluez5_utils/bluez5_utils.hash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc:
sha256 988cb3c4551f6e3a667708a578f5ca9f93fc896508f98f08709be4f8ab033c2f bluez-5.75.tar.xz
sha256 4164a5303a9f71c70f48c03ff60be34231b568d93a9ad5e79928d34e6aa0ea8a bluez-5.79.tar.xz
# Locally computed
sha256 b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259 COPYING
sha256 ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5 COPYING.LIB
13 changes: 9 additions & 4 deletions package/bluez5_utils/bluez5_utils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
################################################################################

# Keep the version and patches in sync with bluez5_utils-headers
BLUEZ5_UTILS_VERSION = 5.75
BLUEZ5_UTILS_VERSION = 5.79
BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
# 0001-configure.ac-Fix-disable-cups.patch
BLUEZ5_UTILS_AUTORECONF = YES
BLUEZ5_UTILS_INSTALL_STAGING = YES
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) \
Expand All @@ -29,7 +30,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
Expand Down Expand Up @@ -68,15 +69,19 @@ endif
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AUDIO),y)
BLUEZ5_UTILS_CONF_OPTS += \
--enable-a2dp \
--enable-asha \
--enable-avrcp \
--enable-bap \
--enable-bass \
--enable-mcp \
--enable-vcp
else
BLUEZ5_UTILS_CONF_OPTS += \
--disable-a2dp \
--disable-asha \
--disable-avrcp \
--disable-bap \
--disable-bass \
--disable-mcp \
--disable-vcp
endif
Expand Down