Skip to contentSkip to conversation

bluez5: upgrade 5.72 -> 5.77

PATCH Superseded Guðni Már Gilbert 2 participants 7 messages Jul 10, 2024 – Jul 11, 2024

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluez5: upgrade 5.72 -> 5.77

Changelog:
* https://github.com/bluez/bluez/releases/tag/5.77
* https://github.com/bluez/bluez/releases/tag/5.76
* https://github.com/bluez/bluez/releases/tag/5.75
* https://github.com/bluez/bluez/releases/tag/5.74
* https://github.com/bluez/bluez/releases/tag/5.73

---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 -
 ...d-without-systemd-in-the-user-sessio.patch | 56 -------------------
 .../0001-test-gatt-Fix-hung-issue.patch       |  7 +--
 ...et-for-building-tests-without-runnin.patch |  7 +--
 ...shared-util.c-include-linux-limits.h.patch |  5 +-
 .../bluez5/{bluez5_5.72.bb => bluez5_5.77.bb} |  2 +-
 6 files changed, 9 insertions(+), 69 deletions(-)
 delete mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
 rename meta/recipes-connectivity/bluez5/{bluez5_5.72.bb => bluez5_5.77.bb} (94%)
meta/recipes-connectivity/bluez5/bluez5.inc +0 -1
index a1ffdeef8c..4071f26e68 100644
@@ -51,7 +51,6 @@ PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,python3-docutils
 SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://init \
            file://run-ptest \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
            file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
            file://0001-test-gatt-Fix-hung-issue.patch \
            file://0004-src-shared-util.c-include-linux-limits.h.patch \
meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch deleted +0 -56

56 lines not on this page · raw message

meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch +3 -4
index b1e93dbe19..2ef1a5b7eb 100644
@@ -1,4 +1,4 @@
-From fb583a57f9f4ab956a09e9bb96d89aa13553bf21 Mon Sep 17 00:00:00 2001
+From 17aab548be412ebd9a930415a201f1e7f45940be 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
@@ -21,16 +21,15 @@ no action.
 Upstream-Status: Submitted [https://marc.info/?l=linux-bluetooth&m=153508881804635&w=2]
 
 Signed-off-by: Mingli Yu <[email protected]>
-
 ---
  unit/test-gatt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/unit/test-gatt.c b/unit/test-gatt.c
-index 5e06d4e..4864d36 100644
+index 1613fbc..25dd614 100644
 --- a/unit/test-gatt.c
 +++ b/unit/test-gatt.c
-@@ -4546,7 +4546,7 @@ int main(int argc, char *argv[])
+@@ -4547,7 +4547,7 @@ int main(int argc, char *argv[])
  			test_server, service_db_1, NULL,
  			raw_pdu(0x03, 0x00, 0x02),
  			raw_pdu(0xbf, 0x00),
meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch +3 -4
index 881494a354..d39b5c4ce9 100644
@@ -1,20 +1,19 @@
-From 738e73b386352fd90f1f26cc1ee75427cf4dc23b Mon Sep 17 00:00:00 2001
+From cf197d0e087f3612e92ddcd146d74d675c896946 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
 
 Upstream-Status: Inappropriate [oe specific]
 Signed-off-by: Alexander Kanavin <[email protected]>
-
 ---
  Makefile.am | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/Makefile.am b/Makefile.am
-index e738eb3..dab17dd 100644
+index 0ae7211..c8bcaca 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -710,6 +710,9 @@ endif
+@@ -713,6 +713,9 @@ endif
  TESTS = $(unit_tests)
  AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69
  
meta/recipes-connectivity/bluez5/bluez5/0004-src-shared-util.c-include-linux-limits.h.patch +2 -3
index 516d859069..e186f85f47 100644
@@ -1,4 +1,4 @@
-From b53df61b41088b68c127ac76cc71683ac3453b9d Mon Sep 17 00:00:00 2001
+From 26f9a70911c6a80443df73f19bfe2007f9f10266 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Mon, 12 Dec 2022 13:10:19 +0100
 Subject: [PATCH] src/shared/util.c: include linux/limits.h
@@ -8,13 +8,12 @@ systems such as those using musl.
 
 Upstream-Status: Submitted [to [email protected],[email protected],[email protected]]
 Signed-off-by: Alexander Kanavin <[email protected]>
-
 ---
  src/shared/util.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/src/shared/util.c b/src/shared/util.c
-index c0c2c4a..036dc0d 100644
+index 6e7634a..45fcd6a 100644
 --- a/src/shared/util.c
 +++ b/src/shared/util.c
 @@ -23,6 +23,7 @@
meta/recipes-connectivity/bluez5/bluez5_5.77.bb renamed from meta/recipes-connectivity/bluez5/bluez5_5.72.bb +1 -1
similarity index 94%
rename from meta/recipes-connectivity/bluez5/bluez5_5.72.bb
rename to meta/recipes-connectivity/bluez5/bluez5_5.77.bb
index 9fda960ea7..55264fd6b7 100644
@@ -1,6 +1,6 @@
 require bluez5.inc
 
-SRC_URI[sha256sum] = "499d7fa345a996c1bb650f5c6749e1d929111fa6ece0be0e98687fee6124536e"
+SRC_URI[sha256sum] = "5d032fdc1d4a085813554f57591e2e1fb0ceb2b3616ee56f689bc00e1d150812"
 
 CVE_STATUS[CVE-2020-24490] = "cpe-incorrect: This issue has kernel fixes rather than bluez fixes"
 
Signature · 1 line
2.34.1
#2 lore raw
In reply to Guðni Már Gilbert
Quoted 8 lines · Guðni Már Gilbert via lists.openembedded.org

Changelog:
* https://github.com/bluez/bluez/releases/tag/5.77
* https://github.com/bluez/bluez/releases/tag/5.76
* https://github.com/bluez/bluez/releases/tag/5.75
* https://github.com/bluez/bluez/releases/tag/5.74
* https://github.com/bluez/bluez/releases/tag/5.73

Thanks for the patch. I didn't see any fix for the permissions issue in here? We need to fix that before we run this on the test infrastructure again as it caused a lot of problems last time :(

We should be able to tweak things in a do_install:append function?

Cheers,

Richard

#3 lore raw
Quoted 1 line

Thanks for the patch. I didn't see any fix for the permissions issue in

here? We need to fix that before we run this on the test infrastructure again as it caused a lot of problems last time :(

Quoted 1 line

We should be able to tweak things in a do_install:append function?

You’re right, it’s not included yet. I want to run a runtime test first as I’m not sure if the systemd service will complain: https://github.com/bluez/bluez/blob/4ca662fcea1604e937bde1bddd5de2c50bcb6e00/src/bluetooth.service.in#L25

It uses ConfigurationDirectoryMode=0555

I’ll look into it over the next few days. If I can get this to build/install on Scarthgap then I can run some extensive bluetooth runtime testing.

#4 lore raw

Minor status update

I can confirm building with libc and musl doesn't fail anymore (with no additional patches applied). I used TCLIBC = "musl" in local.conf to build BlueZ with musl.

Furthermore, I noticed that the permission bits to /etc/bluetooth directory are set to 555 ONLY when systemd packageconfig is not enabled. This gives me the idea in do_install we simply check if systemd is in PACKAGECONFIG and if not, we modify the bits to 655.

Anyone against this idea?

For reference: https://github.com/bluez/bluez/blob/7a45038dc1e505afbaa49f8dd64fd41dab627f23/Makefile.am#L429

#5 lore raw

I'm seeing a very weird bug in Bitbake and I'm not sure if it is just my environment. Sharing this in case anyone knows what is going on... I've isolated the issue to something between when *do_install* finishes and when Bitbake worker teardown process starts.

For whatever reason, after running *bitbake -v -DD -c do_install bluez5* , the permission for the /etc/bluetooth folder is changed to 755 when it should be 555. The owner also changes from root to user (in my case 'builder'). I've ruled out the BlueZ recipe and the make build. The make file correctly installs the directory with 555 permissions.

I've been trying to debug this by adding:

try:
logger.debug("HELLO")
logger.debug("HELLO WORLD")
logger.debug(subprocess.check_output(['/usr/bin/ls -la /home/builder/yocto/build/tmp-musl/work/core2-64-oe-linux-musl/bluez5/5.77/image/etc/bluetooth'], stderr=subprocess.STDOUT, shell=True).decode('ascii')) except Exception as e:
pass

next to various bitbake logs to track down the issue.

I'm open for any ideas / suggestions to debug this further. I'm thinking about adding to my docker container tools to watch the directory somehow...

I'm using the latest master branch for everything at the time of writing this.

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

I'm seeing a very weird bug in Bitbake and I'm not sure if it is just my environment. Sharing this in case anyone knows what is going on... I've isolated the issue to something between when do_install finishes and when Bitbake worker teardown process starts.

For whatever reason, after running bitbake -v -DD -c do_install bluez5, the permission for the /etc/bluetooth folder is changed to 755 when it should be 555. The owner also changes from root to user (in my case 'builder'). I've ruled out the BlueZ recipe and the make build. The make file correctly installs the directory with 555 permissions.

I've been trying to debug this by adding:

        try:
            logger.debug("HELLO")
            logger.debug("HELLO WORLD") logger.debug(subprocess.check_output(['/usr/bin/ls -la /home/builder/yocto/build/tmp-musl/work/core2-64-oe-linux- musl/bluez5/5.77/image/etc/bluetooth'], stderr=subprocess.STDOUT, shell=True).decode('ascii'))
        except Exception as e:
            pass

Quoted 8 lines

next to various bitbake logs to track down the issue.

I'm open for any ideas / suggestions to debug this further. I'm thinking about adding to my docker container tools to watch the directory somehow...

I'm using the latest master branch for everything at the time of writing this.

do_install taskes run under our fakeroot emulator, pseudo. Our builds don't have root privileges so it stores our emulated owners/modes in a sqlite database (see ${WORKDIR}/pseudo). This is why as a normal user you'd see something different to what the task sees when the fakeroot emulation is running. "bitbake bluez -c devshell" will drop you into that fakeroot context assuming you have a terminal setup that works with devshell.

Cheers,

Richard