diff --git a/bluez.spec b/bluez.spec index d8340c1..58c6aa3 100644 --- a/bluez.spec +++ b/bluez.spec @@ -6,7 +6,7 @@ Name: bluez Version: 5.72 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Bluetooth utilities License: GPLv2+ URL: http://www.bluez.org/ @@ -18,6 +18,9 @@ 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 +# https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=fdcde2ce2112df852ab3df6e49b158621177f946 +# https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=252883241228f3149566f119336ce2c49a8d861e +Patch3: plugin_init-startup-warnings.patch BuildRequires: dbus-devel >= 1.6 BuildRequires: glib2-devel @@ -326,6 +329,10 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_userunitdir}/obex.service %changelog +* Fri Jan 24 2025 Bastien Nocera - 5.72-4 +- Fix plugin_init() startup warnings + Related: RHEL-68934 + * Wed Jan 22 2025 Bastien Nocera - 5.72-3 - Fix ConfigurationDirectory startup warning Related: RHEL-71798 diff --git a/plugin_init-startup-warnings.patch b/plugin_init-startup-warnings.patch new file mode 100644 index 0000000..4bfef89 --- /dev/null +++ b/plugin_init-startup-warnings.patch @@ -0,0 +1,81 @@ +From 42043c35ac62dcf3b880974b3d0fb762583733ff Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 27 Nov 2024 12:49:52 +0100 +Subject: [PATCH 1/2] profiles/audio: Quiet plug-in warnings + +A normal daemon start should not throw warnings on a system in the +default configuration. Quiet the plug-in warnings that require +experimental features to be enabled. They will still appear in the debug +output. + +bluetoothd[896]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled +--- + profiles/audio/media.c | 2 +- + profiles/audio/micp.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/profiles/audio/media.c b/profiles/audio/media.c +index 1faa1c28969f..efd1d667c270 100644 +--- a/profiles/audio/media.c ++++ b/profiles/audio/media.c +@@ -1214,7 +1214,7 @@ static bool endpoint_init_pac(struct media_endpoint *endpoint, uint8_t type, + char *name; + + if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) { +- warn("D-Bus experimental not enabled"); ++ DBG("D-Bus experimental not enabled"); + *err = -ENOTSUP; + return false; + } +diff --git a/profiles/audio/micp.c b/profiles/audio/micp.c +index 452027c75da2..3f0845dcb328 100644 +--- a/profiles/audio/micp.c ++++ b/profiles/audio/micp.c +@@ -318,7 +318,7 @@ static unsigned int micp_id; + static int micp_init(void) + { + if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) { +- warn("D-Bus experimental not enabled"); ++ DBG("D-Bus experimental not enabled"); + return -ENOTSUP; + } + +-- +2.48.1 + + +From bca2b4b7d69df7158dc1024c4bf7510ff771f189 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 27 Nov 2024 12:49:53 +0100 +Subject: [PATCH 2/2] plugin: Quiet start-up warnings + +It's not an error for a plug-in not to start if the hardware doesn't +support it. Quiet the warnings that require specific hardware. +The messages will still appear in the debug output. + +bluetoothd[896]: src/plugin.c:plugin_init() System does not support csip plugin +bluetoothd[896]: src/plugin.c:plugin_init() System does not support micp plugin +bluetoothd[896]: src/plugin.c:plugin_init() System does not support vcp plugin +bluetoothd[896]: src/plugin.c:plugin_init() System does not support mcp plugin +bluetoothd[896]: src/plugin.c:plugin_init() System does not support bass plugin +bluetoothd[896]: src/plugin.c:plugin_init() System does not support bap plugin +--- + src/plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugin.c b/src/plugin.c +index 80990f8c3c7e..42ed75ab31f3 100644 +--- a/src/plugin.c ++++ b/src/plugin.c +@@ -187,7 +187,7 @@ start: + err = plugin->desc->init(); + if (err < 0) { + if (err == -ENOSYS || err == -ENOTSUP) +- warn("System does not support %s plugin", ++ DBG("System does not support %s plugin", + plugin->desc->name); + else + error("Failed to init %s plugin", +-- +2.48.1 +