diff --git a/utils/bluez/Makefile b/utils/bluez/Makefile index a836685a49..948c285d2f 100644 --- a/utils/bluez/Makefile +++ b/utils/bluez/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bluez -PKG_VERSION:=5.72 -PKG_RELEASE:=3 +PKG_VERSION:=5.83 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/ -PKG_HASH:=499d7fa345a996c1bb650f5c6749e1d929111fa6ece0be0e98687fee6124536e +PKG_HASH:=108522d909d220581399bfec93daab62035539ceef3dda3e79970785c63bd24c PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING diff --git a/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch b/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch index 9465ddc704..f6d2ee4663 100644 --- a/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch +++ b/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch @@ -9,7 +9,7 @@ Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant --- a/tools/hciattach.c +++ b/tools/hciattach.c -@@ -1078,6 +1078,9 @@ struct uart_t uart[] = { +@@ -1079,6 +1079,9 @@ struct uart_t uart[] = { { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000, FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL }, diff --git a/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch b/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch index ec13dd7f2f..3f2adb6693 100644 --- a/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch +++ b/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch @@ -9,7 +9,7 @@ Subject: [PATCH 3/4] Increase firmware load timeout to 30s --- a/tools/hciattach.c +++ b/tools/hciattach.c -@@ -1227,7 +1227,7 @@ int main(int argc, char *argv[]) +@@ -1228,7 +1228,7 @@ int main(int argc, char *argv[]) { struct uart_t *u = NULL; int detach, printpid, raw, opt, i, n, ld, err; diff --git a/utils/bluez/patches/010-adapter-Fix-up-address-type-when-loading-keys.patch b/utils/bluez/patches/010-adapter-Fix-up-address-type-when-loading-keys.patch deleted file mode 100644 index d43dbefff9..0000000000 --- a/utils/bluez/patches/010-adapter-Fix-up-address-type-when-loading-keys.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 366a8c522b648f47147de4852c5c030d69b916b3 Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz -Date: Wed, 28 Aug 2024 11:30:16 -0400 -Subject: [PATCH] adapter: Fix up address type when loading keys - -Due to kernel change 59b047bc9808 -("Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE") -some keys maybe store using the wrong/invalid address type as per MGMT -API, so this attempts to fix them up. - -Fixes: https://github.com/bluez/bluez/issues/875 ---- - src/adapter.c | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - ---- a/src/adapter.c -+++ b/src/adapter.c -@@ -4989,12 +4989,28 @@ static void load_devices(struct btd_adap - goto free; - } - -- if (key_info) -+ if (key_info) { -+ /* Fix up address type if it was stored with the wrong -+ * address type since Load Link Keys are only meant to -+ * work with BR/EDR addresses as per MGMT documentation. -+ */ -+ if (key_info->bdaddr_type != BDADDR_BREDR) -+ key_info->bdaddr_type = BDADDR_BREDR; -+ - adapter->load_keys = g_slist_append(adapter->load_keys, - key_info); -+ } -+ -+ if (ltk_info) { -+ /* Fix up address type if it was stored with the wrong -+ * address type since Load Long Term Keys are only meant -+ * to work with LE addresses as per MGMT documentation. -+ */ -+ if (ltk_info->bdaddr_type == BDADDR_BREDR) -+ ltk_info->bdaddr_type = BDADDR_LE_PUBLIC; - -- if (ltk_info) - ltks = g_slist_append(ltks, ltk_info); -+ } - - if (peripheral_ltk_info) - ltks = g_slist_append(ltks, peripheral_ltk_info); diff --git a/utils/bluez/patches/201-readline.patch b/utils/bluez/patches/201-readline.patch index 7f6051abc4..f823211c2b 100644 --- a/utils/bluez/patches/201-readline.patch +++ b/utils/bluez/patches/201-readline.patch @@ -1,7 +1,7 @@ --- a/Makefile.tools +++ b/Makefile.tools -@@ -16,7 +16,7 @@ client_bluetoothctl_SOURCES = client/mai - client/mgmt.h client/mgmt.c +@@ -18,7 +18,7 @@ client_bluetoothctl_SOURCES = client/mai + client/hci.h client/hci.c client_bluetoothctl_LDADD = lib/libbluetooth-internal.la \ gdbus/libgdbus-internal.la src/libshared-glib.la \ - $(GLIB_LIBS) $(DBUS_LIBS) -lreadline @@ -9,7 +9,7 @@ endif if ZSH_COMPLETIONS -@@ -382,7 +382,7 @@ tools_meshctl_SOURCES = tools/meshctl.c +@@ -380,7 +380,7 @@ tools_meshctl_SOURCES = tools/meshctl.c tools/mesh-gatt/onoff-model.c tools_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \ lib/libbluetooth-internal.la \ @@ -18,7 +18,7 @@ EXTRA_DIST += tools/mesh-gatt/local_node.json tools/mesh-gatt/prov_db.json endif -@@ -401,7 +401,7 @@ tools_mesh_cfgclient_SOURCES = tools/mes +@@ -399,7 +399,7 @@ tools_mesh_cfgclient_SOURCES = tools/mes mesh/crypto.h mesh/crypto.c tools_mesh_cfgclient_LDADD = lib/libbluetooth-internal.la src/libshared-ell.la \ @@ -27,7 +27,7 @@ bin_PROGRAMS += tools/mesh-cfgtest -@@ -507,7 +507,7 @@ noinst_PROGRAMS += tools/btmgmt tools/ob +@@ -506,7 +506,7 @@ noinst_PROGRAMS += tools/btmgmt tools/ob tools_obex_client_tool_SOURCES = $(gobex_sources) $(btio_sources) \ tools/obex-client-tool.c tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \ @@ -36,7 +36,7 @@ tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \ tools/obex-server-tool.c -@@ -518,16 +518,16 @@ tools_bluetooth_player_SOURCES = tools/b +@@ -517,16 +517,16 @@ tools_bluetooth_player_SOURCES = tools/b client/player.c tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \ src/libshared-glib.la \ @@ -56,7 +56,7 @@ if DEPRECATED noinst_PROGRAMS += attrib/gatttool -@@ -537,7 +537,7 @@ attrib_gatttool_SOURCES = attrib/gatttoo +@@ -536,7 +536,7 @@ attrib_gatttool_SOURCES = attrib/gatttoo attrib/utils.c src/log.c client/display.c \ client/display.h attrib_gatttool_LDADD = lib/libbluetooth-internal.la \ @@ -65,7 +65,7 @@ endif endif -@@ -583,5 +583,5 @@ tools/btpclient.$(OBJEXT): src/libshared +@@ -586,5 +586,5 @@ tools/btpclient.$(OBJEXT): src/libshared tools_btpclientctl_SOURCES = tools/btpclientctl.c client/display.c tools_btpclientctl_LDADD = src/libshared-mainloop.la src/libshared-glib.la \ diff --git a/utils/bluez/patches/203-obexd_without_systemd.patch b/utils/bluez/patches/203-obexd_without_systemd.patch deleted file mode 100644 index c2f23c1417..0000000000 --- a/utils/bluez/patches/203-obexd_without_systemd.patch +++ /dev/null @@ -1,49 +0,0 @@ -Submitted By: Armin K. -Date: 2013-04-29 -Initial Package Version: 5.17 -Upstream Status: unknown -Origin: Arch Linux (Giovanni Campagna) -Description: Allow using obexd without systemd in the user session - -Not all sessions run systemd --user (actually, the majority -doesn't), so the dbus daemon must be able to spawn obexd -directly, and to do so it needs the full path of the daemon. ---- - Makefile.obexd | 4 ++-- - obexd/src/org.bluez.obex.service | 4 ---- - obexd/src/org.bluez.obex.service.in | 4 ++++ - 3 files changed, 6 insertions(+), 6 deletions(-) - delete mode 100644 obexd/src/org.bluez.obex.service - create mode 100644 obexd/src/org.bluez.obex.service.in - ---- a/Makefile.obexd -+++ b/Makefile.obexd -@@ -2,12 +2,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 - ---- a/obexd/src/org.bluez.obex.service -+++ /dev/null -@@ -1,4 +0,0 @@ --[D-BUS Service] --Name=org.bluez.obex --Exec=/bin/false --SystemdService=dbus-org.bluez.obex.service ---- /dev/null -+++ b/obexd/src/org.bluez.obex.service.in -@@ -0,0 +1,4 @@ -+[D-BUS Service] -+Name=org.bluez.obex -+Exec=@libexecdir@/obexd -+SystemdService=dbus-org.bluez.obex.service diff --git a/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch b/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch index 18fb44f73d..9b451167af 100644 --- a/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch +++ b/utils/bluez/patches/205-refresh_adv_manager_for_non-LE_devices.patch @@ -34,7 +34,7 @@ This commit prevents the call to btd_adv_manager_refresh for non-LE devices. --- a/src/adapter.c +++ b/src/adapter.c -@@ -643,7 +643,9 @@ static void settings_changed(struct btd_ +@@ -661,7 +661,9 @@ static void settings_changed(struct btd_ */ if (!adapter->discovery_discoverable) store_adapter_info(adapter); @@ -43,5 +43,5 @@ This commit prevents the call to btd_adv_manager_refresh for non-LE devices. + if (adapter->supported_settings & MGMT_SETTING_LE) + btd_adv_manager_refresh(adapter->adv_manager); } - - if (changed_mask & MGMT_SETTING_BONDABLE) { + if (changed_mask & MGMT_SETTING_CONNECTABLE) + g_dbus_emit_property_changed(dbus_conn, adapter->path, diff --git a/utils/bluez/patches/206-sync.patch b/utils/bluez/patches/206-sync.patch index 265400e646..38d03cc39f 100644 --- a/utils/bluez/patches/206-sync.patch +++ b/utils/bluez/patches/206-sync.patch @@ -1,6 +1,6 @@ --- a/obexd/client/sync.c +++ b/obexd/client/sync.c -@@ -209,7 +209,7 @@ static void sync_remove(struct obc_sessi +@@ -210,7 +210,7 @@ static void sync_remove(struct obc_sessi g_dbus_unregister_interface(conn, path, SYNC_INTERFACE); } @@ -9,7 +9,7 @@ .service = "SYNC", .uuid = SYNC_UUID, .target = OBEX_SYNC_UUID, -@@ -228,7 +228,7 @@ int sync_init(void) +@@ -229,7 +229,7 @@ int sync_init(void) if (!conn) return -EIO; @@ -18,7 +18,7 @@ if (err < 0) { dbus_connection_unref(conn); conn = NULL; -@@ -245,5 +245,5 @@ void sync_exit(void) +@@ -246,5 +246,5 @@ void sync_exit(void) dbus_connection_unref(conn); conn = NULL; diff --git a/utils/bluez/patches/207-gcc14.patch b/utils/bluez/patches/207-gcc14.patch deleted file mode 100644 index f2ef1e44d8..0000000000 --- a/utils/bluez/patches/207-gcc14.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/tools/hex2hcd.c -+++ b/tools/hex2hcd.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - static ssize_t process_record(int fd, const char *line, uint16_t *upper_addr) - { -@@ -289,6 +290,7 @@ static void ver_parse_entry(const char * - { - struct stat st; - int fd; -+ char *pncopy = strdup(pathname); - - fd = open(pathname, O_RDONLY); - if (fd < 0) { -@@ -302,7 +304,7 @@ static void ver_parse_entry(const char * - } - - if (S_ISREG(st.st_mode)) { -- ver_parse_file(basename(pathname)); -+ ver_parse_file(basename(pncopy)); - goto done; - } - -@@ -329,6 +331,7 @@ static void ver_parse_entry(const char * - - done: - close(fd); -+ free(pncopy); - } - - static void ver_print_table(int argc, char *argv[])