Skip to contentSkip to conversation

bluez5: upgrade to 5.37

PATCH Superseded Maxin B. John 4 participants 4 messages Jan 5, 2016

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bluez5: upgrade to 5.37

5.36 -> 5.37

Remove the backported patch:
core-profile-Fix-possible-crash-when-registering-pro.patch

Blacklist bluez5 only recipes when bluez4 is in DISTRO_FEATURES

---
 ...e-Fix-possible-crash-when-registering-pro.patch | 54 ----------------------
 .../bluez5/{bluez5_5.36.bb => bluez5_5.37.bb}      |  7 +--
 2 files changed, 4 insertions(+), 57 deletions(-)
 delete mode 100644 meta/recipes-connectivity/bluez5/bluez5/core-profile-Fix-possible-crash-when-registering-pro.patch
 rename meta/recipes-connectivity/bluez5/{bluez5_5.36.bb => bluez5_5.37.bb} (78%)
meta/recipes-connectivity/bluez5/bluez5/core-profile-Fix-possible-crash-when-registering-pro.patch deleted +0 -54
deleted file mode 100644
index 5c6cee1..0000000
@@ -1,54 +0,0 @@
-From bc4dbda3362d3654447d8ae6525cac1540b7d705 Mon Sep 17 00:00:00 2001
-From: Luiz Augusto von Dentz <[email protected]>
-Date: Thu, 5 Nov 2015 15:14:50 +0200
-Subject: [PATCH] core/profile: Fix possible crash when registering profiles
-
-Upstream-Status: Backport
-
-Profiles under ext_profiles are local and should no be mixed with other
-external profiles since its type is different which can may cause invalid
-memory when accessing member of ext_profile struct.
----
- src/profile.c | 14 ++------------
- 1 file changed, 2 insertions(+), 12 deletions(-)
-
-diff --git a/src/profile.c b/src/profile.c
-index 49445d7..5a4f09c 100644
---- a/src/profile.c
-+++ b/src/profile.c
-@@ -719,19 +719,13 @@ void btd_profile_foreach(void (*func)(struct btd_profile *p, void *data),
- 
- int btd_profile_register(struct btd_profile *profile)
- {
--	if (profile->external)
--		ext_profiles = g_slist_append(ext_profiles, profile);
--	else
--		profiles = g_slist_append(profiles, profile);
-+	profiles = g_slist_append(profiles, profile);
- 	return 0;
- }
- 
- void btd_profile_unregister(struct btd_profile *profile)
- {
--	if (profile->external)
--		ext_profiles = g_slist_remove(ext_profiles, profile);
--	else
--		profiles = g_slist_remove(profiles, profile);
-+	profiles = g_slist_remove(profiles, profile);
- }
- 
- static struct ext_profile *find_ext_profile(const char *owner,
-@@ -742,10 +736,6 @@ static struct ext_profile *find_ext_profile(const char *owner,
- 	for (l = ext_profiles; l != NULL; l = g_slist_next(l)) {
- 		struct ext_profile *ext = l->data;
- 
--		/*
--		 * Owner and path can be NULL if profile was registered by a
--		 * plugin using external flag.
--		 */
- 		if (g_strcmp0(ext->owner, owner))
- 			continue;
- 
--- 
-2.5.0
-
meta/recipes-connectivity/bluez5/bluez5_5.37.bb renamed from meta/recipes-connectivity/bluez5/bluez5_5.36.bb +4 -3
similarity index 78%
rename from meta/recipes-connectivity/bluez5/bluez5_5.36.bb
rename to meta/recipes-connectivity/bluez5/bluez5_5.37.bb
index 884bb77..a0a4e32 100644
@@ -1,8 +1,9 @@
 require bluez5.inc
 
-SRC_URI += "file://core-profile-Fix-possible-crash-when-registering-pro.patch"
-SRC_URI[md5sum] = "9a0ee479cacc44fac68f6a65b1cd3eba"
-SRC_URI[sha256sum] = "a343ea1aeb53d3bd139087f3b1c1e1fb70db452d9762cc7a3d23e75962e578f2"
+PNBLACKLIST[bluez5] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez4', 'bluez5 conflicts with bluez4 and bluez4 is selected in DISTRO_FEATURES', '', d)}"
+
+SRC_URI[md5sum] = "33177e5743e24b2b3738f72be64e3ffb"
+SRC_URI[sha256sum] = "c14ba9ddcb0055522073477b8fd8bf1ddf5d219e75fdfd4699b7e0ce5350d6b0"
 
 # noinst programs in Makefile.tools that are conditional on READLINE
 # support
Signature · 1 line
2.4.0
#1 lore raw
Quoted 6 lines · Maxin B. John

5.36 -> 5.37

Remove the backported patch:
core-profile-Fix-possible-crash-when-registering-pro.patch

Blacklist bluez5 only recipes when bluez4 is in DISTRO_FEATURES

LGTM

thanks

#2 lore raw
In reply to Maxin B. John

Just a quick question regarding this:

Quoted 1 line · Maxin B. John

+PNBLACKLIST[bluez5] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez4', 'bluez5 conflicts with bluez4 and bluez4 is selected in DISTRO_FEATURES', '', d)}"

Is 'bluez4' a user's custom distro feature, because it doesn't seem to be part of the standard distro features. What poky.git at current master has is 'bluetooth' and 'bluez5' as distro features and those are used by bluetooth.bbclass to set BLUEZ variable as follows:

"" if bluetooth is not in DISTRO_FEATURES
else "bluez5" if bluez5 is in DISTRO_FEATURES
else "bluez4"

So BLUEZ variable may be equal to 'bluez4' but an unmodified poky distro will never have 'bluez4' as distro feature.

Am I missing something obvious?

Signature · 3 lines
Regards,

Javier Viguera
#3 lore raw
Quoted 5 lines · Javier Viguera

Is 'bluez4' a user's custom distro feature, because it doesn't seem to be part of the standard distro features. What poky.git at current master has is 'bluetooth' and 'bluez5' as distro features and those are used by bluetooth.bbclass to set BLUEZ variable as follows:

Right, the logic should be "blacklist if distro features doesn't contain bluez5".

Ross