import CS bluez-5.85-1.el9

This commit is contained in:
AlmaLinux RelEng Bot 2026-03-30 11:16:53 -04:00
parent 7a084d8d9d
commit cc91b14671
5 changed files with 38 additions and 187 deletions

View File

@ -1 +1 @@
ad4823acf2906e38b77305a329654e1f0bce0263 SOURCES/bluez-5.83.tar.xz
7528c0df967386e976b58aa5be514a817e6afe18 SOURCES/bluez-5.85.tar.xz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/bluez-5.83.tar.xz
SOURCES/bluez-5.85.tar.xz

View File

@ -0,0 +1,27 @@
From c9ec6137b16aaf371b311f4777a042ec1175719b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 29 Jan 2026 13:40:52 +0100
Subject: [PATCH] build: Don't install btmgmt man page as tool isn't
The btmgmt tool isn't installed through the Makefiles, so the
man page shouldn't be installed either.
---
Makefile.tools | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.tools b/Makefile.tools
index 561b03d0b95b..f0b106fae7ef 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -355,7 +355,7 @@ profiles_iap_iapd_LDADD = gdbus/libgdbus-internal.la $(GLIB_LIBS) $(DBUS_LIBS)
if MANPAGES
man_MANS += tools/rctest.1 tools/l2ping.1 tools/btattach.1 tools/isotest.1 \
- tools/btmgmt.1 client/bluetoothctl.1 \
+ client/bluetoothctl.1 \
client/bluetoothctl-mgmt.1 \
client/bluetoothctl-monitor.1 client/bluetoothctl-admin.1 \
client/bluetoothctl-advertise.1 client/bluetoothctl-endpoint.1 \
--
2.52.0

View File

@ -1,174 +0,0 @@
From a3a1298c0f4e2387694ad7ecd952cbd0a0b82c83 Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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 <luiz.von.dentz@intel.com>
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", "<name>", 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", "<filename>", 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

View File

@ -5,8 +5,8 @@
%endif
Name: bluez
Version: 5.83
Release: 2%{?dist}
Version: 5.85
Release: 1%{?dist}
Summary: Bluetooth utilities
License: GPLv2+
URL: http://www.bluez.org/
@ -18,8 +18,8 @@ Source1: bluez.gitignore
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/20260129125948.2724071-2-hadess@hadess.net/
Patch3: 0001-build-Don-t-install-btmgmt-man-page-as-tool-isn-t.patch
BuildRequires: dbus-devel >= 1.6
BuildRequires: glib2-devel
@ -172,11 +172,6 @@ done
# Red Hat Bugzilla bug #1699680
install -m0755 tools/avinfo $RPM_BUILD_ROOT%{_bindir}
# btmgmt is not installed by "make install", but it is useful for debugging
# 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}
# Remove libtool archive
find $RPM_BUILD_ROOT -name '*.la' -delete
@ -244,7 +239,6 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%{_bindir}/bluemoon
%{_bindir}/bluetoothctl
%{_bindir}/btattach
%{_bindir}/btmgmt
%{_bindir}/btmon
%{_bindir}/hex2hcd
%{_bindir}/l2ping
@ -252,7 +246,6 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%{_mandir}/man1/bluetoothctl.1.*
%{_mandir}/man1/bluetoothctl-*.1.*
%{_mandir}/man1/btattach.1.*
%{_mandir}/man1/btmgmt.1.*
%{_mandir}/man1/btmon.1.*
%{_mandir}/man1/l2ping.1.*
%{_mandir}/man8/bluetoothd.8.*
@ -301,6 +294,7 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%{_mandir}/man1/rctest.1.*
%{_mandir}/man5/org.bluez.*.5.*
%{_mandir}/man7/hci.7.*
%{_mandir}/man7/iso.7.*
%{_mandir}/man7/l2cap.7.*
%{_mandir}/man7/mgmt.7.*
%{_mandir}/man7/rfcomm.7.*
@ -338,6 +332,10 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%{_userunitdir}/obex.service
%changelog
* Mon Jan 26 2026 Bastien Nocera <bnocera@redhat.com> - 5.85-1
- Update to 5.85
Resolves: RHEL-142552
* Mon Aug 18 2025 Bastien Nocera <bnocera@redhat.com> - 5.83-1
- Fix problem with menu handling
Resolves: RHEL-103966