From f7b9f85f3251898e8919690efd8f1486f720dfbd Mon Sep 17 00:00:00 2001 From: Doan Tran Cong Danh Date: Thu, 3 Oct 2019 12:41:33 +0700 Subject: [PATCH] bluez: update to 5.51. --- srcpkgs/bluez/files/bluetooth-meshd/run | 3 + ...-without-systemd-in-the-user-session.patch | 59 -------- .../0001-enable-dbus-without-systemd.patch | 34 +++++ ...02-allow-obexd-on-non-systemd-system.patch | 54 ++++++++ .../0002-bluetoothd-dbus-service.patch | 20 --- ...003-allow-mesh-on-non-systemd-system.patch | 29 ++++ .../0003-bluetooth-group-can-use-bluez.patch | 13 -- ...04-include-sys-time.h-for-musl-build.patch | 129 ++++++++++++++++++ ...0005-include-limits.h-for-musl-build.patch | 66 +++++++++ .../{musl.patch => 0006-musl-fix.patch} | 21 ++- .../bluez/patches/0007-include-string.h.patch | 25 ++++ ...-grant-permission-to-bluetooth-group.patch | 27 ++++ ...fresh-adv_manager-for-non-LE-devices.patch | 51 +++++++ srcpkgs/bluez/template | 28 +++- 14 files changed, 456 insertions(+), 103 deletions(-) create mode 100755 srcpkgs/bluez/files/bluetooth-meshd/run delete mode 100644 srcpkgs/bluez/patches/0001-Allow-using-obexd-without-systemd-in-the-user-session.patch create mode 100644 srcpkgs/bluez/patches/0001-enable-dbus-without-systemd.patch create mode 100644 srcpkgs/bluez/patches/0002-allow-obexd-on-non-systemd-system.patch delete mode 100644 srcpkgs/bluez/patches/0002-bluetoothd-dbus-service.patch create mode 100644 srcpkgs/bluez/patches/0003-allow-mesh-on-non-systemd-system.patch delete mode 100644 srcpkgs/bluez/patches/0003-bluetooth-group-can-use-bluez.patch create mode 100644 srcpkgs/bluez/patches/0004-include-sys-time.h-for-musl-build.patch create mode 100644 srcpkgs/bluez/patches/0005-include-limits.h-for-musl-build.patch rename srcpkgs/bluez/patches/{musl.patch => 0006-musl-fix.patch} (52%) create mode 100644 srcpkgs/bluez/patches/0007-include-string.h.patch create mode 100644 srcpkgs/bluez/patches/0008-grant-permission-to-bluetooth-group.patch create mode 100644 srcpkgs/bluez/patches/0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch diff --git a/srcpkgs/bluez/files/bluetooth-meshd/run b/srcpkgs/bluez/files/bluetooth-meshd/run new file mode 100755 index 00000000000..752dbcc37bf --- /dev/null +++ b/srcpkgs/bluez/files/bluetooth-meshd/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +exec /usr/libexec/bluetooth/bluetooth-meshd --nodetach >/dev/null diff --git a/srcpkgs/bluez/patches/0001-Allow-using-obexd-without-systemd-in-the-user-session.patch b/srcpkgs/bluez/patches/0001-Allow-using-obexd-without-systemd-in-the-user-session.patch deleted file mode 100644 index 15da2636673..00000000000 --- a/srcpkgs/bluez/patches/0001-Allow-using-obexd-without-systemd-in-the-user-session.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001 -From: Giovanni Campagna -Date: Sat, 12 Oct 2013 17:45:25 +0200 -Subject: [PATCH] Allow using obexd without systemd in the user session - -Not all sessions run systemd --user (actually, the majority -doesn't), so the dbus daemon must be able to spawn obexd -directly, and to do so it needs the full path of the daemon. ---- - Makefile.obexd | 4 ++-- - obexd/src/org.bluez.obex.service | 4 ---- - obexd/src/org.bluez.obex.service.in | 4 ++++ - 3 files changed, 6 insertions(+), 6 deletions(-) - delete mode 100644 obexd/src/org.bluez.obex.service - create mode 100644 obexd/src/org.bluez.obex.service.in - -diff --git a/Makefile.obexd b/Makefile.obexd -index 3760867..142e7c3 100644 ---- Makefile.obexd -+++ Makefile.obexd -@@ -2,12 +2,12 @@ - if SYSTEMD - systemduserunitdir = @SYSTEMD_USERUNITDIR@ - systemduserunit_DATA = obexd/src/obex.service -+endif - - dbussessionbusdir = @DBUS_SESSIONBUSDIR@ - dbussessionbus_DATA = obexd/src/org.bluez.obex.service --endif - --EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service -+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in - - obex_plugindir = $(libdir)/obex/plugins - -diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service -deleted file mode 100644 -index a538088..0000000 ---- obexd/src/org.bluez.obex.service -+++ /dev/null -@@ -1,4 +0,0 @@ --[D-BUS Service] --Name=org.bluez.obex --Exec=/bin/false --SystemdService=dbus-org.bluez.obex.service -diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in -new file mode 100644 -index 0000000..9c815f2 ---- /dev/null -+++ obexd/src/org.bluez.obex.service.in -@@ -0,0 +1,4 @@ -+[D-BUS Service] -+Name=org.bluez.obex -+Exec=@libexecdir@/obexd -+SystemdService=dbus-org.bluez.obex.service --- -1.8.3.1 - - diff --git a/srcpkgs/bluez/patches/0001-enable-dbus-without-systemd.patch b/srcpkgs/bluez/patches/0001-enable-dbus-without-systemd.patch new file mode 100644 index 00000000000..5b9c7dc708c --- /dev/null +++ b/srcpkgs/bluez/patches/0001-enable-dbus-without-systemd.patch @@ -0,0 +1,34 @@ +From 2625ab38ae27754205d060f09e3a18f7648d5167 Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 12:57:09 +0700 +Subject: [PATCH 1/9] enable dbus without systemd + +--- + Makefile.am | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 404e6a460..0884156fa 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -40,14 +40,14 @@ conf_DATA = + + statedir = $(localstatedir)/lib/bluetooth + state_DATA = ++ ++dbussystembusdir = $(DBUS_SYSTEMBUSDIR) ++dbussystembus_DATA = src/org.bluez.service + endif + + if SYSTEMD + systemdsystemunitdir = $(SYSTEMD_SYSTEMUNITDIR) + systemdsystemunit_DATA = src/bluetooth.service +- +-dbussystembusdir = $(DBUS_SYSTEMBUSDIR) +-dbussystembus_DATA = src/org.bluez.service + endif + + EXTRA_DIST += src/bluetooth.service.in src/org.bluez.service +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0002-allow-obexd-on-non-systemd-system.patch b/srcpkgs/bluez/patches/0002-allow-obexd-on-non-systemd-system.patch new file mode 100644 index 00000000000..4ea752cd685 --- /dev/null +++ b/srcpkgs/bluez/patches/0002-allow-obexd-on-non-systemd-system.patch @@ -0,0 +1,54 @@ +From 82099f711ecd8281cebad23b53aadb8c875bc235 Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 12:57:55 +0700 +Subject: [PATCH 2/9] allow obexd on non-systemd system + +--- + Makefile.obexd | 6 +++--- + .../{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + rename obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} (74%) + +diff --git a/Makefile.obexd b/Makefile.obexd +index d36874770..c9996288c 100644 +--- a/Makefile.obexd ++++ b/Makefile.obexd +@@ -1,12 +1,12 @@ + if SYSTEMD + systemduserunitdir = $(SYSTEMD_USERUNITDIR) + systemduserunit_DATA = obexd/src/obex.service ++endif + + dbussessionbusdir = $(DBUS_SESSIONBUSDIR) + dbussessionbus_DATA = obexd/src/org.bluez.obex.service +-endif + +-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service ++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in + + if OBEX + +@@ -106,6 +106,6 @@ obexd/src/plugin.$(OBJEXT): obexd/src/builtin.h + obexd/src/builtin.h: obexd/src/genbuiltin $(obexd_builtin_sources) + $(AM_V_GEN)$(srcdir)/obexd/src/genbuiltin $(obexd_builtin_modules) > $@ + +-CLEANFILES += obexd/src/builtin.h $(builtin_files) obexd/src/obex.service ++CLEANFILES += obexd/src/builtin.h $(builtin_files) obexd/src/obex.service obexd/src/org.bluez.obex.service + + EXTRA_DIST += obexd/src/genbuiltin +diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service.in +similarity index 74% +rename from obexd/src/org.bluez.obex.service +rename to obexd/src/org.bluez.obex.service.in +index a53808884..543d7bc07 100644 +--- a/obexd/src/org.bluez.obex.service ++++ b/obexd/src/org.bluez.obex.service.in +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=org.bluez.obex +-Exec=/bin/false ++Exec=@pkglibexecdir@/obexd + SystemdService=dbus-org.bluez.obex.service +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0002-bluetoothd-dbus-service.patch b/srcpkgs/bluez/patches/0002-bluetoothd-dbus-service.patch deleted file mode 100644 index b7856185dff..00000000000 --- a/srcpkgs/bluez/patches/0002-bluetoothd-dbus-service.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile.am.orig 2014-07-30 12:30:56.483179384 +0200 -+++ Makefile.am 2014-07-30 12:31:30.858387791 +0200 -@@ -39,14 +39,14 @@ conf_DATA = - - statedir = $(localstatedir)/lib/bluetooth - state_DATA = -+ -+dbussystembusdir = @DBUS_SYSTEMBUSDIR@ -+dbussystembus_DATA = src/org.bluez.service - endif - - if SYSTEMD - systemdsystemunitdir = @SYSTEMD_SYSTEMUNITDIR@ - systemdsystemunit_DATA = src/bluetooth.service -- --dbussystembusdir = @DBUS_SYSTEMBUSDIR@ --dbussystembus_DATA = src/org.bluez.service - endif - - EXTRA_DIST += src/bluetooth.service.in src/org.bluez.service diff --git a/srcpkgs/bluez/patches/0003-allow-mesh-on-non-systemd-system.patch b/srcpkgs/bluez/patches/0003-allow-mesh-on-non-systemd-system.patch new file mode 100644 index 00000000000..2cf6f73442d --- /dev/null +++ b/srcpkgs/bluez/patches/0003-allow-mesh-on-non-systemd-system.patch @@ -0,0 +1,29 @@ +From 32a425c3f9b42a55824c044a6b486c9c12e65a65 Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 12:58:18 +0700 +Subject: [PATCH 3/9] allow mesh on non-systemd system + +--- + Makefile.mesh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.mesh b/Makefile.mesh +index 90979cbc0..9e6e2c2ca 100644 +--- a/Makefile.mesh ++++ b/Makefile.mesh +@@ -2,11 +2,11 @@ if MESH + + if DATAFILES + dbus_DATA += mesh/bluetooth-mesh.conf ++dbussystembus_DATA += mesh/org.bluez.mesh.service + endif + + if SYSTEMD + systemdsystemunit_DATA += mesh/bluetooth-mesh.service +-dbussystembus_DATA += mesh/org.bluez.mesh.service + endif + + mesh_sources = mesh/mesh.h mesh/mesh.c \ +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0003-bluetooth-group-can-use-bluez.patch b/srcpkgs/bluez/patches/0003-bluetooth-group-can-use-bluez.patch deleted file mode 100644 index 7a72e60944e..00000000000 --- a/srcpkgs/bluez/patches/0003-bluetooth-group-can-use-bluez.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- src/bluetooth.conf -+++ src/bluetooth.conf -@@ -28,6 +28,10 @@ - - - -+ -+ -+ -+ - - diff --git a/srcpkgs/bluez/patches/0004-include-sys-time.h-for-musl-build.patch b/srcpkgs/bluez/patches/0004-include-sys-time.h-for-musl-build.patch new file mode 100644 index 00000000000..1cd573cc039 --- /dev/null +++ b/srcpkgs/bluez/patches/0004-include-sys-time.h-for-musl-build.patch @@ -0,0 +1,129 @@ +From 2a2eb634d481ab4eed0a444321dc12338de96d6a Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 12:59:56 +0700 +Subject: [PATCH 4/9] include sys/time.h for musl build + +--- + mesh/appkey.c | 1 + + mesh/crypto.c | 1 + + mesh/friend.c | 1 + + mesh/manager.c | 1 + + mesh/mesh.c | 1 + + mesh/net.c | 2 +- + mesh/pb-adv.c | 1 + + mesh/prov-acceptor.c | 1 + + mesh/prov-initiator.c | 1 + + 9 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/mesh/appkey.c b/mesh/appkey.c +index 6c65454c1..a455c83b6 100644 +--- a/mesh/appkey.c ++++ b/mesh/appkey.c +@@ -22,6 +22,7 @@ + #endif + + #define _GNU_SOURCE ++#include + #include + + #include "mesh/mesh-defs.h" +diff --git a/mesh/crypto.c b/mesh/crypto.c +index cebdffe45..e1689c6d7 100644 +--- a/mesh/crypto.c ++++ b/mesh/crypto.c +@@ -24,6 +24,7 @@ + #define _GNU_SOURCE + #include + #include ++#include + #include + + #include +diff --git a/mesh/friend.c b/mesh/friend.c +index da2772870..ee48a3cc7 100644 +--- a/mesh/friend.c ++++ b/mesh/friend.c +@@ -21,6 +21,7 @@ + #include + #endif + ++#include + #include + + #include "mesh/mesh-defs.h" +diff --git a/mesh/manager.c b/mesh/manager.c +index 501ec10fe..6b6219c56 100644 +--- a/mesh/manager.c ++++ b/mesh/manager.c +@@ -22,6 +22,7 @@ + #endif + + #define _GNU_SOURCE ++#include + #include + + #include "mesh/mesh-defs.h" +diff --git a/mesh/mesh.c b/mesh/mesh.c +index b660a7ef2..3ea8b2cb4 100644 +--- a/mesh/mesh.c ++++ b/mesh/mesh.c +@@ -22,6 +22,7 @@ + #endif + + #define _GNU_SOURCE ++#include + #include + + #include "mesh/mesh-io.h" +diff --git a/mesh/net.c b/mesh/net.c +index 2785039db..740e3c3af 100644 +--- a/mesh/net.c ++++ b/mesh/net.c +@@ -22,7 +22,7 @@ + #endif + + #define _GNU_SOURCE +- ++#include + #include + + #include "mesh/mesh-defs.h" +diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c +index 6b4a70052..481f4ac8d 100644 +--- a/mesh/pb-adv.c ++++ b/mesh/pb-adv.c +@@ -21,6 +21,7 @@ + #include + #endif + ++#include + #include + + #include "mesh/mesh-defs.h" +diff --git a/mesh/prov-acceptor.c b/mesh/prov-acceptor.c +index 57eb1e750..50989b217 100644 +--- a/mesh/prov-acceptor.c ++++ b/mesh/prov-acceptor.c +@@ -21,6 +21,7 @@ + #include + #endif + ++#include + #include + + #include "src/shared/ecc.h" +diff --git a/mesh/prov-initiator.c b/mesh/prov-initiator.c +index eb59f53f1..65cf194e6 100644 +--- a/mesh/prov-initiator.c ++++ b/mesh/prov-initiator.c +@@ -21,6 +21,7 @@ + #include + #endif + ++#include + #include + + #include "src/shared/ecc.h" +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0005-include-limits.h-for-musl-build.patch b/srcpkgs/bluez/patches/0005-include-limits.h-for-musl-build.patch new file mode 100644 index 00000000000..0de1d253c1f --- /dev/null +++ b/srcpkgs/bluez/patches/0005-include-limits.h-for-musl-build.patch @@ -0,0 +1,66 @@ +From 9ac712db3c9913d6e00635e120d77541dcc51b6b Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 13:00:13 +0700 +Subject: [PATCH 5/9] include limits.h for musl build + +--- + mesh/keyring.c | 2 +- + mesh/mesh-config-json.c | 1 + + mesh/node.c | 1 + + mesh/util.c | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/mesh/keyring.c b/mesh/keyring.c +index 3a7f92f9f..d5765983c 100644 +--- a/mesh/keyring.c ++++ b/mesh/keyring.c +@@ -24,9 +24,9 @@ + #define _GNU_SOURCE + #include + #include ++#include + #include + #include +-#include + + #include + +diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c +index cafa2fdd7..74ca49590 100644 +--- a/mesh/mesh-config-json.c ++++ b/mesh/mesh-config-json.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/mesh/node.c b/mesh/node.c +index b6824f505..15dcb977f 100644 +--- a/mesh/node.c ++++ b/mesh/node.c +@@ -23,6 +23,7 @@ + + #define _GNU_SOURCE + #include ++#include + #include + #include + +diff --git a/mesh/util.c b/mesh/util.c +index 1455bdec3..e441a2ed8 100644 +--- a/mesh/util.c ++++ b/mesh/util.c +@@ -24,6 +24,7 @@ + #define _GNU_SOURCE + #include + #include ++#include + #include + #include + #include +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/musl.patch b/srcpkgs/bluez/patches/0006-musl-fix.patch similarity index 52% rename from srcpkgs/bluez/patches/musl.patch rename to srcpkgs/bluez/patches/0006-musl-fix.patch index 033a1165fd5..ab0a588137e 100644 --- a/srcpkgs/bluez/patches/musl.patch +++ b/srcpkgs/bluez/patches/0006-musl-fix.patch @@ -1,10 +1,20 @@ +From d1d8408c9a7c7b5ffa30371f246cc18085e11313 Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 13:00:27 +0700 +Subject: [PATCH 6/9] musl fix + Including causes the inclusion of , which defines 'struct in6_addr', already defined in . Remove to fix musl build. +--- + tools/bneptest.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) ---- tools/bneptest.c.orig 2015-07-30 21:17:18.000000000 +0200 -+++ tools/bneptest.c 2017-03-01 19:27:43.579458817 +0100 -@@ -36,7 +36,6 @@ +diff --git a/tools/bneptest.c b/tools/bneptest.c +index 8bc7596b6..6b3956cfa 100644 +--- a/tools/bneptest.c ++++ b/tools/bneptest.c +@@ -37,7 +37,6 @@ #include #include #include @@ -12,7 +22,7 @@ Remove to fix musl build. #include -@@ -50,6 +49,9 @@ +@@ -51,6 +50,9 @@ #include "lib/bnep.h" #include "profiles/network/bnep.h" @@ -22,3 +32,6 @@ Remove to fix musl build. enum { MODE_LISTEN, MODE_CONNECT, +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0007-include-string.h.patch b/srcpkgs/bluez/patches/0007-include-string.h.patch new file mode 100644 index 00000000000..e1cff41df49 --- /dev/null +++ b/srcpkgs/bluez/patches/0007-include-string.h.patch @@ -0,0 +1,25 @@ +From fe1a76a03b9cbc28621d53680eb9ff4a2bd31778 Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Thu, 3 Oct 2019 16:31:01 +0700 +Subject: [PATCH 7/9] include string.h + +--- + android/client/if-hf-client.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/android/client/if-hf-client.c b/android/client/if-hf-client.c +index f701a814c..b44eb4291 100644 +--- a/android/client/if-hf-client.c ++++ b/android/client/if-hf-client.c +@@ -16,6 +16,8 @@ + */ + + #define _GNU_SOURCE ++#include ++ + #include "if-main.h" + #include "../hal-utils.h" + +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0008-grant-permission-to-bluetooth-group.patch b/srcpkgs/bluez/patches/0008-grant-permission-to-bluetooth-group.patch new file mode 100644 index 00000000000..ec8a1f554af --- /dev/null +++ b/srcpkgs/bluez/patches/0008-grant-permission-to-bluetooth-group.patch @@ -0,0 +1,27 @@ +From 05853e46e66868228468fc73d86f221b12edaef1 Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Fri, 4 Oct 2019 11:36:47 +0700 +Subject: [PATCH 8/9] grant permission to bluetooth group + +--- + src/bluetooth.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/bluetooth.conf b/src/bluetooth.conf +index 8a1e25801..75dd7d670 100644 +--- a/src/bluetooth.conf ++++ b/src/bluetooth.conf +@@ -22,6 +22,10 @@ + + + ++ ++ ++ ++ + + + +-- +2.23.0 + diff --git a/srcpkgs/bluez/patches/0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch b/srcpkgs/bluez/patches/0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch new file mode 100644 index 00000000000..b78dd879800 --- /dev/null +++ b/srcpkgs/bluez/patches/0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch @@ -0,0 +1,51 @@ +From 3b357802d24ae4f918a1b001b6930280909ef87e Mon Sep 17 00:00:00 2001 +From: "antoine.belvire@laposte.net" +Date: Tue, 27 Mar 2018 20:30:26 +0200 +Subject: [PATCH 9/9] adapter: Don't refresh adv_manager for non-LE devices + +btd_adv_manager_refresh is called upon MGMT_SETTING_DISCOVERABLE setting change +but as only LE adapters have an adv_manager, this leads to segmentation fault +for non-LE devices: + +0 btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176 +1 0x0000556fe45fcb02 in settings_changed (settings=, + adapter=0x556fe53f7c70) at src/adapter.c:543 +2 new_settings_callback (index=, length=, + param=, user_data=0x556fe53f7c70) at src/adapter.c:573 +3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0, + status=, opcode=opcode@entry=7, index=index@entry=0, + length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261 +4 0x0000556fe462cd9d in can_read_data (io=, + user_data=0x556fe53f20c0) at src/shared/mgmt.c:353 +5 0x0000556fe46396e3 in watch_callback (channel=, + cond=, user_data=) + at src/shared/io-glib.c:170 +6 0x00007fe351c980e5 in g_main_context_dispatch () + from /usr/lib64/libglib-2.0.so.0 +7 0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0 +8 0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 +9 0x0000556fe45abc75 in main (argc=, argv=) + at src/main.c:770 + +This commit prevents the call to btd_adv_manager_refresh for non-LE devices. +--- + src/adapter.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/adapter.c b/src/adapter.c +index cef25616f..17018ecac 100644 +--- a/src/adapter.c ++++ b/src/adapter.c +@@ -546,7 +546,8 @@ static void settings_changed(struct btd_adapter *adapter, uint32_t settings) + g_dbus_emit_property_changed(dbus_conn, adapter->path, + ADAPTER_INTERFACE, "Discoverable"); + store_adapter_info(adapter); +- btd_adv_manager_refresh(adapter->adv_manager); ++ if (adapter->supported_settings & MGMT_SETTING_LE) ++ btd_adv_manager_refresh(adapter->adv_manager); + } + + if (changed_mask & MGMT_SETTING_BONDABLE) { +-- +2.23.0 + diff --git a/srcpkgs/bluez/template b/srcpkgs/bluez/template index c096e8386f7..9286b93a542 100644 --- a/srcpkgs/bluez/template +++ b/srcpkgs/bluez/template @@ -1,21 +1,33 @@ # Template file for 'bluez' pkgname=bluez -version=5.50 -revision=5 +version=5.51 +revision=1 build_style=gnu-configure configure_args="--with-udevdir=/usr/lib/udev --disable-systemd - --enable-sixaxis --enable-threads --enable-library --enable-deprecated" + --enable-sixaxis --enable-threads --enable-library --enable-deprecated + $(vopt_enable mesh) $(vopt_enable nfc)" hostmakedepends="automake flex libtool pkg-config" makedepends="cups-devel eudev-libudev-devel libglib-devel libical-devel - readline-devel" + readline-devel $(vopt_if mesh json-c-devel)" short_desc="Bluetooth tools and daemons" -maintainer="Orphaned " +maintainer="Doan Tran Cong Danh " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="http://www.bluez.org/" distfiles="${KERNEL_SITE}/bluetooth/$pkgname-$version.tar.xz" -checksum=5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911 +checksum=ebedfb359f62957940822f1d0b39fcee30422380e435608dad06bb3913d5ebba conf_files="/etc/bluetooth/main.conf" system_groups="bluetooth" +build_options="mesh nfc" +patch_args="-Np1" + +post_patch() { + find android -name '*.h' -exec \ + sed -i\ + -e 's/__BEGIN_DECLS/#ifdef __cplusplus\nextern "C" {\n#endif/' \ + -e 's/__END_DECLS/#ifdef __cplusplus\n}\n#endif/' \ + -e '/#include .sys\/cdefs.h/d' \ + {} + +} pre_configure() { autoreconf -fi @@ -24,6 +36,9 @@ pre_configure() { post_install() { vinstall ${wrksrc}/src/main.conf 644 etc/bluetooth vsv bluetoothd + if [ $build_option_mesh ]; then + vsv bluetooth-meshd + fi } libbluetooth_package() { @@ -68,4 +83,3 @@ bluez-deprecated_package() { vmove usr/share/man/man1/sdptool.1 } } -