From 176c28dc5ac0875d54e34509189d8c718bccc9cd Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 16 Jun 2026 11:05:39 +0200 Subject: [PATCH] Update to 5.87 pre-release snapshot Resolves: RHEL-169988 --- 0001-Add-missing-mesh-gatt-JSON-files.patch | 125 ------------------ ...dp-connect-source-profile-after-sink.patch | 35 ----- ...ed-to-set-default-system-config-star.patch | 47 ------- ...Work-around-possible-string-overflow.patch | 39 ++++++ ...tools-btmgmt-Fix-btmgmt-help-hanging.patch | 32 ----- big-endian-5.86.patch | 41 ------ bluetoothctl-no-output.patch | 79 ----------- bluez.spec | 32 ++--- sources | 2 +- 9 files changed, 57 insertions(+), 375 deletions(-) delete mode 100644 0001-Add-missing-mesh-gatt-JSON-files.patch delete mode 100644 0001-a2dp-connect-source-profile-after-sink.patch delete mode 100644 0001-adapter-Fix-Failed-to-set-default-system-config-star.patch create mode 100644 0001-hci-tester-Work-around-possible-string-overflow.patch delete mode 100644 0001-tools-btmgmt-Fix-btmgmt-help-hanging.patch delete mode 100644 big-endian-5.86.patch delete mode 100644 bluetoothctl-no-output.patch diff --git a/0001-Add-missing-mesh-gatt-JSON-files.patch b/0001-Add-missing-mesh-gatt-JSON-files.patch deleted file mode 100644 index 27fd678..0000000 --- a/0001-Add-missing-mesh-gatt-JSON-files.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 669de134aa19fbd6b7ac59575446a064bbf27565 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 14 Feb 2024 16:51:14 +0100 -Subject: [PATCH] Add missing mesh-gatt JSON files - ---- - tools/mesh-gatt/local_node.json | 61 +++++++++++++++++++++++++++++++++ - tools/mesh-gatt/prov_db.json | 37 ++++++++++++++++++++ - 2 files changed, 98 insertions(+) - create mode 100644 tools/mesh-gatt/local_node.json - create mode 100644 tools/mesh-gatt/prov_db.json - -diff --git a/tools/mesh-gatt/local_node.json b/tools/mesh-gatt/local_node.json -new file mode 100644 -index 000000000000..5ffa7ada1f65 ---- /dev/null -+++ b/tools/mesh-gatt/local_node.json -@@ -0,0 +1,61 @@ -+{ -+ "$schema":"file:\/\/\/BlueZ\/Mesh\/local_schema\/mesh.jsonschema", -+ "meshName":"BT Mesh", -+ "netKeys":[ -+ { -+ "index": 0, -+ "keyRefresh": 0 -+ } -+ ], -+ "appKeys":[ -+ { -+ "index": 0, -+ "boundNetKey": 0 -+ }, -+ { -+ "index": 1, -+ "boundNetKey": 0 -+ } -+ ], -+"node": { -+ "IVindex":"00000005", -+ "IVupdate":"0", -+ "sequenceNumber": 0, -+ "composition": { -+ "cid": "0002", -+ "pid": "0010", -+ "vid": "0001", -+ "crpl": "000a", -+ "features": { -+ "relay": false, -+ "proxy": true, -+ "friend": false, -+ "lowPower": false -+ }, -+ "elements": [ -+ { -+ "elementIndex": 0, -+ "location": "0001", -+ "models": ["0000", "0001", "1001"] -+ } -+ ] -+ }, -+ "configuration":{ -+ "netKeys": [0], -+ "appKeys": [ 0, 1], -+ "defaultTTL": 10, -+ "elements": [ -+ { -+ "elementIndex": 0, -+ "unicastAddress":"0077", -+ "models": [ -+ { -+ "modelId": "1001", -+ "bind": [1] -+ } -+ ] -+ } -+ ] -+ } -+ } -+} -diff --git a/tools/mesh-gatt/prov_db.json b/tools/mesh-gatt/prov_db.json -new file mode 100644 -index 000000000000..74a03128d4d5 ---- /dev/null -+++ b/tools/mesh-gatt/prov_db.json -@@ -0,0 +1,37 @@ -+{ -+ "$schema":"file:\/\/\/BlueZ\/Mesh\/schema\/mesh.jsonschema", -+ "meshName":"BT Mesh", -+ "IVindex":5, -+ "IVupdate":0, -+ "netKeys":[ -+ { -+ "index":0, -+ "keyRefresh":0, -+ "key":"18eed9c2a56add85049ffc3c59ad0e12" -+ } -+ ], -+ "appKeys":[ -+ { -+ "index":0, -+ "boundNetKey":0, -+ "key":"4f68ad85d9f48ac8589df665b6b49b8a" -+ }, -+ { -+ "index":1, -+ "boundNetKey":0, -+ "key":"2aa2a6ded5a0798ceab5787ca3ae39fc" -+ } -+ ], -+ "provisioners":[ -+ { -+ "provisionerName":"BT Mesh Provisioner", -+ "unicastAddress":"0077", -+ "allocatedUnicastRange":[ -+ { -+ "lowAddress":"0100", -+ "highAddress":"7fff" -+ } -+ ] -+ } -+ ], -+} --- -2.43.0 - diff --git a/0001-a2dp-connect-source-profile-after-sink.patch b/0001-a2dp-connect-source-profile-after-sink.patch deleted file mode 100644 index 26a8986..0000000 --- a/0001-a2dp-connect-source-profile-after-sink.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 066a164a524e4983b850f5659b921cb42f84a0e0 Mon Sep 17 00:00:00 2001 -From: Pauli Virtanen -Date: Mon, 16 Feb 2026 18:17:08 +0200 -Subject: [PATCH] a2dp: connect source profile after sink - -Since cdcd845f87ee the order in which profiles with the same priority -are connected is the same order as btd_profile_register() is called, -instead of being the opposite order. When initiating connections, we -want to prefer a2dp-sink profile over a2dp-source, as connecting both at -the same time does not work currently. - -Add .after_services to specify the order. - -Fixes: https://github.com/bluez/bluez/issues/1898 ---- - profiles/audio/a2dp.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c -index 7a37003a2b25..c7e0fc75c09e 100644 ---- a/profiles/audio/a2dp.c -+++ b/profiles/audio/a2dp.c -@@ -3769,6 +3769,9 @@ static struct btd_profile a2dp_source_profile = { - - .adapter_probe = a2dp_sink_server_probe, - .adapter_remove = a2dp_sink_server_remove, -+ -+ /* Connect source after sink, to prefer sink when conflicting */ -+ .after_services = BTD_PROFILE_UUID_CB(NULL, A2DP_SINK_UUID), - }; - - static struct btd_profile a2dp_sink_profile = { --- -2.53.0 - diff --git a/0001-adapter-Fix-Failed-to-set-default-system-config-star.patch b/0001-adapter-Fix-Failed-to-set-default-system-config-star.patch deleted file mode 100644 index 138b06a..0000000 --- a/0001-adapter-Fix-Failed-to-set-default-system-config-star.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b9a72fef5cd51f849ce01c9f2775d129a687d855 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 19 Mar 2026 11:52:06 +0100 -Subject: [PATCH] adapter: Fix "Failed to set default system config" startup - warning - -When using a stock configuration, there will be nothing in the list of -configuration changes to apply to the Bluetooth adapter, which since -5e5b46c5c0cc ("adapter: Do not send empty default system parameter -list") would throw an error, as sending an empty list to the adapter -didn't generate one. - -bluetoothd[3291147]: Bluetooth daemon 5.86 -bluetoothd[3291147]: Starting SDP server -bluetoothd[3291147]: Using external plugins is not officially supported. -bluetoothd[3291147]: Consider upstreaming your plugins into the BlueZ project. -bluetoothd[3291147]: Bluetooth management interface 1.23 initialized -bluetoothd[3291147]: Battery Provider Manager created -bluetoothd[3291147]: Failed to set default system config for hci0 - -Fixes: 5e5b46c5c0cc ("adapter: Do not send empty default system parameter list") -Signed-off-by: Luiz Augusto von Dentz ---- - src/adapter.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/adapter.c b/src/adapter.c -index 4e5ff219fe8b..04568dae6e98 100644 ---- a/src/adapter.c -+++ b/src/adapter.c -@@ -4963,8 +4963,11 @@ static void load_defaults(struct btd_adapter *adapter) - if (!load_le_defaults(adapter, list, &btd_opts.defaults.le)) - goto done; - -- if (mgmt_tlv_list_size(list) == 0) -- goto done; -+ /* No changes from defaults */ -+ if (mgmt_tlv_list_size(list) == 0) { -+ mgmt_tlv_list_free(list); -+ return; -+ } - - err = mgmt_send_tlv(adapter->mgmt, MGMT_OP_SET_DEF_SYSTEM_CONFIG, - adapter->dev_id, list, NULL, NULL, NULL); --- -2.53.0 - diff --git a/0001-hci-tester-Work-around-possible-string-overflow.patch b/0001-hci-tester-Work-around-possible-string-overflow.patch new file mode 100644 index 0000000..2470b9a --- /dev/null +++ b/0001-hci-tester-Work-around-possible-string-overflow.patch @@ -0,0 +1,39 @@ +From 8440635a802cc4a8f529f9b1f6933a5fad2aa8d4 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Tue, 16 Jun 2026 10:52:58 +0200 +Subject: [PATCH] hci-tester: Work-around possible string overflow + +Quiet overflow warning by checking for a non-NULL destination. + +In function 'memcpy', + inlined from 'test_pre_setup_lt_address' at tools/hci-tester.c:67:2: +/usr/include/bits/string_fortified.h:29:10: warning: '__builtin_memcpy' writing 6 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=] + 29 | return __builtin___memcpy_chk (__dest, __src, __len, + | ^ +--- + tools/hci-tester.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/hci-tester.c b/tools/hci-tester.c +index b8446ee83ccf..c9e7c58d2e95 100644 +--- a/tools/hci-tester.c ++++ b/tools/hci-tester.c +@@ -12,6 +12,7 @@ + #include + #endif + ++#include + #include + #include + +@@ -57,6 +58,7 @@ static void test_pre_setup_lt_address(const void *data, uint8_t size, + struct user_data *user = tester_get_data(); + const struct bt_hci_rsp_read_bd_addr *rsp = data; + ++ assert(user); + if (rsp->status) { + tester_warn("Read lower tester address failed (0x%02x)", + rsp->status); +-- +2.54.0 + diff --git a/0001-tools-btmgmt-Fix-btmgmt-help-hanging.patch b/0001-tools-btmgmt-Fix-btmgmt-help-hanging.patch deleted file mode 100644 index 17071f0..0000000 --- a/0001-tools-btmgmt-Fix-btmgmt-help-hanging.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 37f62e78dc3925625c7aaa083dcc410d9bac4940 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 11 Mar 2026 11:48:45 +0100 -Subject: [PATCH] tools/btmgmt: Fix btmgmt --help hanging - -btmgmt when run interactively would wait for commands on its prompt, but -that prompt is never setup when the help output is requested. - -Handle --help through bt_shell_handle_non_interactive_help() so that the -application exits as soon as the help content has been printed, like -other interactive apps in bluez. ---- - tools/btmgmt.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/btmgmt.c b/tools/btmgmt.c -index 0f3de2880014..762a3a141c4a 100644 ---- a/tools/btmgmt.c -+++ b/tools/btmgmt.c -@@ -47,6 +47,9 @@ int main(int argc, char *argv[]) - bt_shell_init(argc, argv, &opt); - - mgmt_add_submenu(); -+ -+ bt_shell_handle_non_interactive_help(); -+ - mgmt_set_index(index_option); - bt_shell_attach(fileno(stdin)); - status = bt_shell_run(); --- -2.53.0 - diff --git a/big-endian-5.86.patch b/big-endian-5.86.patch deleted file mode 100644 index a0f83e4..0000000 --- a/big-endian-5.86.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 3a5c4d311755910f07e60fd30d4736ac98bea8eb Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Tue, 10 Feb 2026 10:06:28 +0100 -Subject: [PATCH] emulator: Fix compilation on big endian systems -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes the build on big endian systems like s390x: - -Remove the "static" so the array doesn't need to be initialised -with constants. - -emulator/bthost.c: In function ‘bthost_setup_sco’: -./src/shared/util.h:43:26: error: initializer element is not constant - 43 | #define cpu_to_le32(val) bswap_32(val) - | ^~~~~~~~ -etc. - -Fixes: 85888a8357ea ("bthost: add bthost_setup_sco() and accept -incoming eSCO") ---- - emulator/bthost.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/emulator/bthost.c b/emulator/bthost.c -index d09ad1e76c50..53b12f828675 100644 ---- a/emulator/bthost.c -+++ b/emulator/bthost.c -@@ -3560,7 +3560,7 @@ void bthost_hci_disconnect(struct bthost *bthost, uint16_t handle, - int bthost_setup_sco(struct bthost *bthost, uint16_t acl_handle, - uint16_t setting) - { -- static const struct bt_hci_cmd_setup_sync_conn settings[] = { -+ const struct bt_hci_cmd_setup_sync_conn settings[] = { - { - .tx_bandwidth = cpu_to_le32(0x00001f40), - .rx_bandwidth = cpu_to_le32(0x00001f40), --- -2.52.0 - diff --git a/bluetoothctl-no-output.patch b/bluetoothctl-no-output.patch deleted file mode 100644 index 11a184b..0000000 --- a/bluetoothctl-no-output.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 33dd33a23ff250902eafa94fce5ea8178de50112 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Fri, 27 Feb 2026 12:07:14 +0100 -Subject: [PATCH 1/2] Revert "shared/shell: Don't init input for - non-interactive shells" - -This reverts commit e73bf582dae60356641a32fc27ae03d359ec4c47. - -The fix caused "bluetoothctl list" to not output any text, breaking -a lot of existing scripts. - -Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2440346 ---- - src/shared/shell.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/shared/shell.c b/src/shared/shell.c -index 78d58c513d3e..b061f8001414 100644 ---- a/src/shared/shell.c -+++ b/src/shared/shell.c -@@ -1642,13 +1642,13 @@ static bool shell_quit(void *data) - - bool bt_shell_attach(int fd) - { -- if (data.mode == MODE_INTERACTIVE) { -- struct input *input; -+ struct input *input; - -- input = input_new(fd); -- if (!input) -- return false; -+ input = input_new(fd); -+ if (!input) -+ return false; - -+ if (data.mode == MODE_INTERACTIVE) { - io_set_read_handler(input->io, input_read, input, NULL); - io_set_disconnect_handler(input->io, input_hup, input, NULL); - --- -2.53.0 - - -From 0178bc8bda31cf60837fcce91b33e009bc3f7d7d Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Fri, 27 Feb 2026 12:24:13 +0100 -Subject: [PATCH 2/2] tools: Work-around broken stdin handling in home-made - mainloop - -bluetoothd has 3 mainloop implementations, one relying on ell, one -relying on glib, and another home-made. - -The home-made mainloop handler use epoll() without any fallbacks, and -will hang if one tries to epoll() an stdin that redirects from -/dev/null. - -Closes: https://github.com/bluez/bluez/issues/700 ---- - Makefile.tools | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.tools b/Makefile.tools -index 589f7c94f9df..7c52e053ffee 100644 ---- a/Makefile.tools -+++ b/Makefile.tools -@@ -531,8 +531,8 @@ tools_obexctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \ - - tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c \ - client/mgmt.c --tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \ -- -lreadline -+tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-glib.la \ -+ $(GLIB_LIBS) -lreadline - if DEPRECATED - noinst_PROGRAMS += attrib/gatttool - --- -2.53.0 - diff --git a/bluez.spec b/bluez.spec index 5ff2bd7..ec48cd1 100644 --- a/bluez.spec +++ b/bluez.spec @@ -4,9 +4,15 @@ %bcond_with deprecated %endif +# Snapshot generated with: +# export SHA=`git rev-parse --short HEAD` ; export VERSION=5.86 ; git archive --format=tar.xz -o bluez-$VERSION+1.git$SHA.tar.xz --prefix=bluez-$VERSION+1.git$SHA/ HEAD +# as a post-release snapshot, see: +# https://fedoraproject.org/wiki/PackagingDrafts/TildeVersioning +%global gitsha 220f102c8db9 + Name: bluez -Version: 5.86 -Release: 2%{?dist} +Version: 5.86+1.git%{gitsha} +Release: 1%{?dist} Summary: Bluetooth utilities License: GPLv2+ URL: http://www.bluez.org/ @@ -16,18 +22,8 @@ Source1: bluez.gitignore # https://github.com/hadess/bluez/commits/obex-5.46 Patch1: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch -# https://patchwork.kernel.org/project/bluetooth/patch/20240214155019.325715-1-hadess@hadess.net/ -Patch2: 0001-Add-missing-mesh-gatt-JSON-files.patch -# https://patchwork.kernel.org/project/bluetooth/list/?series=1052631 -Patch3: big-endian-5.86.patch -# https://patchwork.kernel.org/project/bluetooth/patch/ba0e71b91a24557f088b015a349c6ccee6260ec2.1771258477.git.pav@iki.fi/ -Patch4: 0001-a2dp-connect-source-profile-after-sink.patch -# https://patchwork.kernel.org/project/bluetooth/list/?series=1058931 -Patch5: bluetoothctl-no-output.patch -# https://patchwork.kernel.org/project/bluetooth/patch/20260311111540.2170373-2-hadess@hadess.net/ -Patch6: 0001-tools-btmgmt-Fix-btmgmt-help-hanging.patch -# https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=b9a72fef5cd51f849ce01c9f2775d129a687d855 -Patch7: 0001-adapter-Fix-Failed-to-set-default-system-config-star.patch +# https://patchwork.kernel.org/project/bluetooth/patch/20260616085538.3568474-1-hadess@hadess.net/ +Patch2: 0001-hci-tester-Work-around-possible-string-overflow.patch BuildRequires: dbus-devel >= 1.6 BuildRequires: glib2-devel @@ -156,6 +152,7 @@ Object Exchange daemon for sharing files, contacts etc over bluetooth autoreconf -vif %configure --enable-tools --enable-library --disable-optimization \ --enable-deprecated \ + --enable-external-ell \ --enable-sixaxis --enable-cups --enable-nfc --enable-mesh \ --enable-hid2hci --enable-testing \ --with-systemdsystemunitdir=%{_unitdir} \ @@ -184,7 +181,7 @@ install -m0755 tools/avinfo $RPM_BUILD_ROOT%{_bindir} # some issues and to set the MAC address on HCIs which don't have their # MAC address configured install -m0755 tools/btmgmt $RPM_BUILD_ROOT%{_bindir} -install -m0644 doc/btmgmt.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +rst2man doc/btmgmt.rst --no-datestamp --no-generator $RPM_BUILD_ROOT%{_mandir}/man1/btmgmt.1 # Remove libtool archive find $RPM_BUILD_ROOT -name '*.la' -delete @@ -309,6 +306,7 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_mandir}/man1/isotest.1.* %{_mandir}/man1/rctest.1.* %{_mandir}/man5/org.bluez.*.5.* +%{_mandir}/man7/btsnoop.7.* %{_mandir}/man7/hci.7.* %{_mandir}/man7/iso.7.* %{_mandir}/man7/l2cap.7.* @@ -348,6 +346,10 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_userunitdir}/obex.service %changelog +* Thu Jul 02 2026 Bastien Nocera - 5.86+1.git220f102c8db9-1 +- Update to 5.87 pre-release snapshot + Resolves: RHEL-169988 + * Fri Mar 27 2026 Bastien Nocera - 5.86-2 - Fix startup warning Resolves: RHEL-161518 diff --git a/sources b/sources index 1eafce8..34a41c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bluez-5.86.tar.xz) = d3268be43ad869dabd9d9eabc7a0da699837bb5432ecf61e1756e03f9b867a1d989299db1493bd349d73b495d736f55d7518fbb9ee664de49e5d1cf7c2156df7 +SHA512 (bluez-5.86+1.git220f102c8db9.tar.xz) = 7385d7b41f19a3cdbc3b51bdf47dabad0dc78d63a67b247e78ab4717e7c34fddc46ef535a3df4062a212cecc95ae5d0cb82db999b0d60747cf54113cb3f1b81f