diff --git a/.bluez.metadata b/.bluez.metadata index 5ef4085..336bb06 100644 --- a/.bluez.metadata +++ b/.bluez.metadata @@ -1 +1 @@ -ad4823acf2906e38b77305a329654e1f0bce0263 SOURCES/bluez-5.83.tar.xz +d3d7b3a461826d09115b3f737d124bc449af6fd1 SOURCES/bluez-5.87+1.git30db66dc971b.tar.xz diff --git a/.gitignore b/.gitignore index 7b5e7d4..eafa083 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/bluez-5.83.tar.xz +SOURCES/bluez-5.87+1.git30db66dc971b.tar.xz diff --git a/SOURCES/0001-Add-missing-mesh-gatt-JSON-files.patch b/SOURCES/0001-Add-missing-mesh-gatt-JSON-files.patch deleted file mode 100644 index 27fd678..0000000 --- a/SOURCES/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/SOURCES/0001-hci-tester-Work-around-possible-string-overflow.patch b/SOURCES/0001-hci-tester-Work-around-possible-string-overflow.patch new file mode 100644 index 0000000..2470b9a --- /dev/null +++ b/SOURCES/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/SOURCES/5.83-fixes.patch b/SOURCES/5.83-fixes.patch deleted file mode 100644 index 4df039f..0000000 --- a/SOURCES/5.83-fixes.patch +++ /dev/null @@ -1,174 +0,0 @@ -From a3a1298c0f4e2387694ad7ecd952cbd0a0b82c83 Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz -Date: Thu, 3 Jul 2025 13:30:22 -0400 -Subject: [PATCH 1/2] shared/shell: Fix not calling pre_run for main menu - -When calling bt_shell_run the main menu pre_run was not being called -which cause tools with just one menu to not work as intended. - -Fixes: https://github.com/bluez/bluez/issues/1319 ---- - src/shared/shell.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/shared/shell.c b/src/shared/shell.c -index 3e5959fc1868..c69748594955 100644 ---- a/src/shared/shell.c -+++ b/src/shared/shell.c -@@ -1449,6 +1449,9 @@ int bt_shell_run(void) - int status; - const struct queue_entry *submenu; - -+ if (data.menu && data.menu->pre_run) -+ data.menu->pre_run(data.menu); -+ - for (submenu = queue_get_entries(data.submenus); submenu; - submenu = submenu->next) { - struct bt_shell_menu *menu = submenu->data; --- -2.50.1 - - -From a7ce88a861a0a26b50987ff455f0bb61379aa89c Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz -Date: Mon, 7 Jul 2025 09:39:43 -0400 -Subject: [PATCH 2/2] shared/shell: Fix not running pre_run on - MODE_NON_INTERACTIVE - -If a command is given to be run in non-interactive mode the code would -not attempt to execute .pre_run first since some (sub)menus requires that -in order to properly initialize things. - -Fixes: https://github.com/bluez/bluez/issues/1394 -Fixes: https://github.com/bluez/bluez/issues/1317 ---- - src/shared/shell.c | 33 +++++++++++++++++++++++---------- - 1 file changed, 23 insertions(+), 10 deletions(-) - -diff --git a/src/shared/shell.c b/src/shared/shell.c -index c69748594955..694ddc0007f5 100644 ---- a/src/shared/shell.c -+++ b/src/shared/shell.c -@@ -423,7 +423,8 @@ static void cmd_script(int argc, char *argv[]) - return bt_shell_noninteractive_quit(EXIT_SUCCESS); - } - --static const struct bt_shell_menu_entry default_menu[] = { -+static const struct bt_shell_menu default_menu = { -+ .entries = { - { "back", NULL, cmd_back, "Return to main menu", NULL, - NULL, cmd_back_exists }, - { "menu", "", cmd_menu, "Select submenu", -@@ -437,7 +438,7 @@ static const struct bt_shell_menu_entry default_menu[] = { - { "export", NULL, cmd_export, - "Print environment variables" }, - { "script", "", cmd_script, "Run script" }, -- { } -+ {} }, - }; - - static void shell_print_help(void) -@@ -480,7 +481,7 @@ static void shell_print_menu(void) - print_menu(entry->cmd, entry->arg ? : "", entry->desc ? : ""); - } - -- for (entry = default_menu; entry->cmd; entry++) { -+ for (entry = default_menu.entries; entry->cmd; entry++) { - if (entry->exists && !entry->exists(data.menu)) - continue; - -@@ -495,7 +496,7 @@ static void shell_print_menu_zsh_complete(void) - for (entry = data.menu->entries; entry->cmd; entry++) - printf("%s:%s\n", entry->cmd, entry->desc ? : ""); - -- for (entry = default_menu; entry->cmd; entry++) { -+ for (entry = default_menu.entries; entry->cmd; entry++) { - if (entry->exists && !entry->exists(data.menu)) - continue; - -@@ -627,9 +628,11 @@ fail: - return -EINVAL; - } - --static int menu_exec(const struct bt_shell_menu_entry *entry, -+static int menu_exec(const struct bt_shell_menu *menu, - int argc, char *argv[]) - { -+ const struct bt_shell_menu_entry *entry = menu->entries; -+ - for (; entry->cmd; entry++) { - if (strcmp(argv[0], entry->cmd)) - continue; -@@ -642,6 +645,9 @@ static int menu_exec(const struct bt_shell_menu_entry *entry, - if (data.menu == data.main && !strcmp(entry->cmd, "back")) - continue; - -+ if (data.mode == MODE_NON_INTERACTIVE && menu->pre_run) -+ menu->pre_run(menu); -+ - return cmd_exec(entry, argc, argv); - } - -@@ -673,7 +679,7 @@ static int submenu_exec(int argc, char *argv[]) - memmove(argv[0], argv[0] + len + 1, tlen - len - 1); - memset(argv[0] + tlen - len - 1, 0, len + 1); - -- return menu_exec(submenu->entries, argc, argv); -+ return menu_exec(submenu, argc, argv); - } - - static int shell_exec(int argc, char *argv[]) -@@ -686,9 +692,9 @@ static int shell_exec(int argc, char *argv[]) - if (!argsisutf8(argc, argv)) - return -EINVAL; - -- err = menu_exec(default_menu, argc, argv); -+ err = menu_exec(&default_menu, argc, argv); - if (err == -ENOENT) { -- err = menu_exec(data.menu->entries, argc, argv); -+ err = menu_exec(data.menu, argc, argv); - if (err == -ENOENT) { - err = submenu_exec(argc, argv); - if (err == -ENOENT) { -@@ -980,7 +986,7 @@ static char *cmd_generator(const char *text, int state) - } - - if (default_menu_enabled) { -- cmd = find_cmd(text, default_menu, &index); -+ cmd = find_cmd(text, default_menu.entries, &index); - if (cmd) { - return cmd; - } else { -@@ -1171,7 +1177,7 @@ static char **shell_completion(const char *text, int start, int end) - if (wordexp(rl_line_buffer, &w, WRDE_NOCMD)) - return NULL; - -- matches = menu_completion(default_menu, text, w.we_wordc, -+ matches = menu_completion(default_menu.entries, text, w.we_wordc, - w.we_wordv[0]); - if (!matches) { - matches = menu_completion(data.menu->entries, text, -@@ -1449,6 +1455,12 @@ int bt_shell_run(void) - int status; - const struct queue_entry *submenu; - -+ /* Check if on non-interactive mode skip pre-run since that is on-demand -+ * by shell_exec() only for the menu in use. -+ */ -+ if (data.mode == MODE_NON_INTERACTIVE) -+ goto done; -+ - if (data.menu && data.menu->pre_run) - data.menu->pre_run(data.menu); - -@@ -1460,6 +1472,7 @@ int bt_shell_run(void) - menu->pre_run(menu); - } - -+done: - status = mainloop_run_with_signal(signal_callback, NULL); - - bt_shell_cleanup(); --- -2.50.1 - diff --git a/SPECS/bluez.spec b/SPECS/bluez.spec index 14794eb..1ad6f2a 100644 --- a/SPECS/bluez.spec +++ b/SPECS/bluez.spec @@ -4,9 +4,16 @@ %bcond_with deprecated %endif +# Snapshot generated with: +# git config tar.tar.xz.command "xz -c" +# 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 30db66dc971b + Name: bluez -Version: 5.83 -Release: 2%{?dist} +Version: 5.87+1.git%{gitsha} +Release: 1%{?dist} Summary: Bluetooth utilities License: GPLv2+ URL: http://www.bluez.org/ @@ -16,10 +23,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 -# Upstream fixes -Patch3: 5.83-fixes.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 @@ -148,6 +153,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} \ @@ -176,6 +182,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} +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 @@ -251,8 +258,8 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_bindir}/mpris-proxy %{_mandir}/man1/bluetoothctl.1.* %{_mandir}/man1/bluetoothctl-*.1.* -%{_mandir}/man1/btattach.1.* %{_mandir}/man1/btmgmt.1.* +%{_mandir}/man1/btattach.1.* %{_mandir}/man1/btmon.1.* %{_mandir}/man1/l2ping.1.* %{_mandir}/man8/bluetoothd.8.* @@ -300,7 +307,9 @@ 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.* %{_mandir}/man7/mgmt.7.* %{_mandir}/man7/rfcomm.7.* @@ -338,6 +347,29 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_userunitdir}/obex.service %changelog +* Thu Jul 16 2026 Bastien Nocera - 5.87+1.git30db66dc971b-1 +- Update to 5.87 post-release snapshot + Resolves: RHEL-193095 + +* 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 + +* Tue Feb 10 2026 Bastien Nocera - 5.86-1 +- Update to 5.86 +- Re-add btmgmt as it does not require bluetoothd to be running, + unlike bluetoothctl mgmt +- Fix audio output not working in some circumstances + Resolves: RHEL-147734 + +* Mon Jan 26 2026 Bastien Nocera - 5.85-1 +- Update to 5.85 + Resolves: RHEL-142552 + * Mon Aug 18 2025 Bastien Nocera - 5.83-1 - Fix problem with menu handling Resolves: RHEL-103966