Skip to contentSkip to conversation

bluez5: upgrade 5.79 -> 5.80

PATCH Superseded Guðni Már Gilbert 3 participants 8 messages Mar 22, 2025 – Mar 28, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluez5: upgrade 5.79 -> 5.80

Changes relevant for the build:
* Four patches are dropped because they are included in 5.80.
* Removed changes to etc/bluetooth directory permission bits. They are now set correctly in 5.80 [1].
* AMP code has been removed [2]. This means "tools/amptest" can be removed from NOINST_TOOLS_BT

[1] - https://github.com/bluez/bluez/commit/b1fd409960001a77cda2a09ecc00147ebd9c3667
[2] - https://github.com/bluez/bluez/commit/1474c11618bc1092f7dd4b304d3768ce9da02b13

Changelog:

Fix issue with handling address type for all types of keys. Fix issue with handling maximum number of GATT channels. Fix issue with handling MTU auto-tuning feature.
Fix issue with handling AVRCP volume in reconfigured transports. Fix issue with handling VCP volume setting requests. Fix issue with handling VCP connection management. Fix issue with handling MAP qualification.
Fix issue with handling PBAP qualification.
Fix issue with handling BNEP qualification.
Add support for PreferredBearer device property.
Add support for SupportedTypes Message Access property. Add support for HFP, A2DP, AVRCP, AVCTP and MAP latest versions.

---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  9 ---
 ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 34 -----------
 ...-shared-ad-fix-std-c23-build-failure.patch | 34 -----------
 .../0001-test-gatt-Fix-hung-issue.patch       |  2 +-
 ...et-for-building-tests-without-runnin.patch |  6 +-
 ...ared-shell-fix-std-c23-build-failure.patch | 34 -----------
 ...tt-helpers-fix-std-c23-build-failure.patch | 58 -------------------
 .../bluez5/{bluez5_5.79.bb => bluez5_5.80.bb} |  3 +-
 8 files changed, 5 insertions(+), 175 deletions(-)
 delete mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-gdbus-define-MAX_INPUT-for-musl.patch
 delete mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-shared-ad-fix-std-c23-build-failure.patch
 delete mode 100644 meta/recipes-connectivity/bluez5/bluez5/0002-shared-shell-fix-std-c23-build-failure.patch
 delete mode 100644 meta/recipes-connectivity/bluez5/bluez5/0003-shared-gatt-helpers-fix-std-c23-build-failure.patch
 rename meta/recipes-connectivity/bluez5/{bluez5_5.79.bb => bluez5_5.80.bb} (93%)
meta/recipes-connectivity/bluez5/bluez5.inc +0 -9
index d626872103..a81f317a37 100644
@@ -69,10 +69,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://run-ptest \
            file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
            file://0001-test-gatt-Fix-hung-issue.patch \
-           file://0001-gdbus-define-MAX_INPUT-for-musl.patch \
-           file://0001-shared-ad-fix-std-c23-build-failure.patch \
-           file://0002-shared-shell-fix-std-c23-build-failure.patch \
-           file://0003-shared-gatt-helpers-fix-std-c23-build-failure.patch \
            "
 S = "${WORKDIR}/bluez-${PV}"
 
@@ -113,11 +109,6 @@ do_install:append() {
 	for f in ${NOINST_TOOLS} ; do
 		install -m 755 ${B}/$f ${D}${bindir}
 	done
-
-	# Fix the /etc/bluetooth directory permissions when systemd is disabled
-	if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'false', 'true', d)}; then
-		chmod 0755 ${D}${sysconfdir}/bluetooth
-	fi
 }
 
 PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
meta/recipes-connectivity/bluez5/bluez5/0001-gdbus-define-MAX_INPUT-for-musl.patch deleted +0 -34
deleted file mode 100644
index de01dc864e..0000000000
@@ -1,34 +0,0 @@
-From 6f40d44acbfb0021f21bd63e6c0703ba701d19c4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= <[email protected]>
-Date: Sat, 2 Nov 2024 16:03:34 +0000
-Subject: [PATCH] gdbus: define MAX_INPUT for musl
-
-This is the same solution as was done in src/shared/util.c
-
-Upstream-Status: Submitted [https://marc.info/?l=linux-bluetooth&m=173056368428988&w=2]
-
-Signed-off-by: Guðni Már Gilbert  <[email protected]>
----
- gdbus/object.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/gdbus/object.c b/gdbus/object.c
-index 84f116bf1..7b0476f1a 100644
---- a/gdbus/object.c
-+++ b/gdbus/object.c
-@@ -20,6 +20,12 @@
- #include <dbus/dbus.h>
- 
- #include "gdbus.h"
-+
-+/* define MAX_INPUT for musl */
-+#ifndef MAX_INPUT
-+#define MAX_INPUT _POSIX_MAX_INPUT
-+#endif
-+
- #include "src/shared/util.h"
- 
- #define info(fmt...)
--- 
-2.43.0
-
meta/recipes-connectivity/bluez5/bluez5/0001-shared-ad-fix-std-c23-build-failure.patch deleted +0 -34
deleted file mode 100644
index 82eaed7929..0000000000
@@ -1,34 +0,0 @@
-From 5c4cbf5cb95e4fc1a53545af52b420a8008b3ffa Mon Sep 17 00:00:00 2001
-From: Rudi Heitbaum <[email protected]>
-Date: Wed, 20 Nov 2024 13:02:56 +0000
-Subject: [PATCH 1/3] shared/ad: fix -std=c23 build failure
-
-gcc-15 switched to -std=c23 by default:
-
-    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212
-
-As a result `bluez` fails the build as:
-
-    src/shared/ad.c:1090:24: error: incompatible types when returning type '_Bool' but 'const char *' was expected
-     1090 |                 return false;
-          |                        ^~~~~
-
-Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=da5b5b0ecb1ead38676768ef78d46449d404bdc0]
-Signed-off-by: Khem Raj <[email protected]>
----
- src/shared/ad.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/shared/ad.c b/src/shared/ad.c
-index d08ce7a..dac381b 100644
---- a/src/shared/ad.c
-+++ b/src/shared/ad.c
-@@ -1087,7 +1087,7 @@ bool bt_ad_add_name(struct bt_ad *ad, const char *name)
- const char *bt_ad_get_name(struct bt_ad *ad)
- {
- 	if (!ad)
--		return false;
-+		return NULL;
- 
- 	return ad->name;
- }
meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch +1 -1
index 572f5b0be3..90c5ebdcc6 100644
@@ -1,4 +1,4 @@
-From 825e15ddda4aa6d8e37c1c52181f7175d2237f66 Mon Sep 17 00:00:00 2001
+From 0787e67bebbf8492b6c5f03ed816cf881edbea64 Mon Sep 17 00:00:00 2001
 From: Mingli Yu <[email protected]>
 Date: Fri, 24 Aug 2018 12:04:03 +0800
 Subject: [PATCH] test-gatt: Fix hung issue
meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch +3 -3
index f56142ee50..ad04a46a36 100644
@@ -1,4 +1,4 @@
-From 9ce6360d11f0b1252f61ff78ce6f8ef03b150dfd Mon Sep 17 00:00:00 2001
+From b6438d9e6cd5bdbca05b444ff6d955e5b70dbb2e Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Fri, 1 Apr 2016 17:07:34 +0300
 Subject: [PATCH] tests: add a target for building tests without running them
@@ -10,10 +10,10 @@ Signed-off-by: Alexander Kanavin <[email protected]>
  1 file changed, 3 insertions(+)
 
 diff --git a/Makefile.am b/Makefile.am
-index 68bf058..a376d10 100644
+index 0821530..e7cefb5 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -713,6 +713,9 @@ endif
+@@ -723,6 +723,9 @@ endif
  TESTS = $(unit_tests)
  AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69
  
meta/recipes-connectivity/bluez5/bluez5/0002-shared-shell-fix-std-c23-build-failure.patch deleted +0 -34
deleted file mode 100644
index 9ea622601b..0000000000
@@ -1,34 +0,0 @@
-From 408510d751e9482fe965e5dd96fbac7f9ee2ef62 Mon Sep 17 00:00:00 2001
-From: Rudi Heitbaum <[email protected]>
-Date: Wed, 20 Nov 2024 13:03:29 +0000
-Subject: [PATCH 2/3] shared/shell: fix -std=c23 build failure
-
-gcc-15 switched to -std=c23 by default:
-
-    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212
-
-As a result `bluez` fails the build as:
-
-    src/shared/shell.c:365:24: error: incompatible types when returning type '_Bool' but 'struct input *' was expected
-      365 |                 return false;
-          |                        ^~~~~
-
-Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=4d60826865c760cc4e5718b6414746a394768110]
-Signed-off-by: Khem Raj <[email protected]>
----
- src/shared/shell.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/shared/shell.c b/src/shared/shell.c
-index a8fa876..aa6c16c 100644
---- a/src/shared/shell.c
-+++ b/src/shared/shell.c
-@@ -362,7 +362,7 @@ static struct input *input_new(int fd)
- 
- 	io = io_new(fd);
- 	if (!io)
--		return false;
-+		return NULL;
- 
- 	input = new0(struct input, 1);
- 	input->io = io;
meta/recipes-connectivity/bluez5/bluez5/0003-shared-gatt-helpers-fix-std-c23-build-failure.patch deleted +0 -58

58 lines not on this page · raw message

meta/recipes-connectivity/bluez5/bluez5_5.80.bb renamed from meta/recipes-connectivity/bluez5/bluez5_5.79.bb +1 -2
similarity index 93%
rename from meta/recipes-connectivity/bluez5/bluez5_5.79.bb
rename to meta/recipes-connectivity/bluez5/bluez5_5.80.bb
index 30ea6d317b..6e5b621971 100644
@@ -1,6 +1,6 @@
 require bluez5.inc
 
-SRC_URI[sha256sum] = "4164a5303a9f71c70f48c03ff60be34231b568d93a9ad5e79928d34e6aa0ea8a"
+SRC_URI[sha256sum] = "a4d0bca3299691f06d5bd9773b854638204a51a5026c42b0ad7f1c6cf16b459a"
 
 CVE_STATUS[CVE-2020-24490] = "cpe-incorrect: This issue has kernel fixes rather than bluez fixes"
 
@@ -41,7 +41,6 @@ NOINST_TOOLS_BT ?= " \
     tools/avinfo \
     tools/avtest \
     tools/scotest \
-    tools/amptest \
     tools/hwdb \
     tools/hcieventmask \
     tools/hcisecfilter \
Signature · 1 line
2.43.0
#1 lore raw
Quoted 28 lines · Guðni Már Gilbert via lists.openembedded.org

Changes relevant for the build:
* Four patches are dropped because they are included in 5.80.
* Removed changes to etc/bluetooth directory permission bits. They are
  now set correctly in 5.80 [1].
* AMP code has been removed [2]. This means "tools/amptest" can be removed from NOINST_TOOLS_BT

[1] -
https://github.com/bluez/bluez/commit/b1fd409960001a77cda2a09ecc00147ebd9c3667
[2] -
https://github.com/bluez/bluez/commit/1474c11618bc1092f7dd4b304d3768ce9da02b13

Changelog:

    Fix issue with handling address type for all types of keys. Fix issue with handling maximum number of GATT channels. Fix issue with handling MTU auto-tuning feature.
    Fix issue with handling AVRCP volume in reconfigured transports. Fix issue with handling VCP volume setting requests. Fix issue with handling VCP connection management. Fix issue with handling MAP qualification.
    Fix issue with handling PBAP qualification.
    Fix issue with handling BNEP qualification.
    Add support for PreferredBearer device property.
    Add support for SupportedTypes Message Access property. Add support for HFP, A2DP, AVRCP, AVCTP and MAP latest versions.

Quoted 2 lines

Thanks for the patch! Unfortunately it does appear to trigger a new ptest failures:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/1174/steps/12/logs/stdio

Failed ptests:
{'bluez5': ['test-vcp']}

https://valkyrie.yocto.io/pub/non-release/20250323-67/testresults/qemux86-64-ptest/bluez5.log

This build on an arm host will probably fail too:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/1173

when it gets there.

Cheers,

Richard

#3 lore raw

I managed to reproduce this locally using QEMU. It looks like to me this is not a new issue, see the following two Github issues which are mostly report from users with Alpine Linux using musl:

* https://github.com/bluez/bluez/issues/683
* https://github.com/bluez/bluez/issues/726

There is a theory in one of the Github issues that the problem is related to enabling LTO. I'm not sure how to proceed/debug this exactly but I'll at least add my input into the Github issue in case it helps.

Moving forward... is it acceptable to disable running this test? I don't personally like it as it is likely it won't be enabled again.

For reference, these are the commands I used:

On host machine:

1) source layers/openembedded-core/oe-init-build-env
2) bitbake core-image-ptest-bluez5
3) runqemu qemux86-64 core-image-ptest-bluez5 slirp nographic

Within the QEMU image terminal:
1) ptest-runner bluez5

In local.conf I added:
TCLIBC="musl"
DISTRO_FEATURES:append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs"
IMAGE_FEATURES:append = " allow-empty-password empty-root-password allow-root-login" # (I was having some trouble with the root login, this line seemed to work for QEMU)

Best regards
Gudni

#4 lore raw
Quoted 6 lines · Guðni Már Gilbert via lists.openembedded.org

I managed to reproduce this locally using QEMU. It looks like to me this is not a new issue, see the following two Github issues which are mostly report from users with Alpine Linux using musl:

* https://github.com/bluez/bluez/issues/683
* https://github.com/bluez/bluez/issues/726

Quoted 8 lines


There is a theory in one of the Github issues that the problem is related to enabling LTO. I'm not sure how to proceed/debug this exactly but I'll at least add my input into the Github issue in case it helps.

Moving forward... is it acceptable to disable running this test? I don't personally like it as it is likely it won't be enabled again.

We could patch it out, then we'd see the patch each time we upgrade the recipe. The ideal solution is to fix the underlying problem (or the test).

Quoted 10 lines

For reference, these are the commands I used:

On host machine:

1) source layers/openembedded-core/oe-init-build-env
2) bitbake core-image-ptest-bluez5
3) runqemu qemux86-64 core-image-ptest-bluez5 slirp nographic
Within the QEMU image terminal:
1) ptest-runner bluez5

Quoted 8 lines


In local.conf I added:
TCLIBC="musl"
DISTRO_FEATURES:append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs" IMAGE_FEATURES:append = " allow-empty-password empty-root-password allow-root-login" # (I was having some trouble with the root login, this line seemed to work for QEMU)

We don't use musl on the autobuilder ptests so in theory this should also reproduce with glibc.

Cheers,

Richard

#5 lore raw

I'll try to find time next weekend to submit a v2 with the test disabled. It looks like the issue is timing related as the issue can go away depending on how you are executing the test. No fix in upstream yet.

#6 lore raw

Please make sure upstream is aware of the issue. It's best to include a link to any relevant report/ticket/etc.

Alex

Quoted 11 lines · Guðni Már Gilbert via lists.openembedded.org

I'll try to find time next weekend to submit a v2 with the test disabled. It looks like the issue is timing related as the issue can go away depending on how you are executing the test. No fix in upstream yet.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#213710): https://lists.openembedded.org/g/openembedded-core/message/213710
Mute This Topic: https://lists.openembedded.org/mt/111848497/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-