mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-03 19:32:57 +02:00
bluez: update to 5.51.
mesh option is under testing
This commit is contained in:
parent
1a95d3e1bb
commit
2316f90584
14 changed files with 456 additions and 103 deletions
3
srcpkgs/bluez/files/bluetooth-meshd/run
Executable file
3
srcpkgs/bluez/files/bluetooth-meshd/run
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
sv check dbus >/dev/null || exit 1
|
||||||
|
exec /usr/libexec/bluetooth/bluetooth-meshd --nodetach >/dev/null
|
|
@ -1,59 +0,0 @@
|
||||||
From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
34
srcpkgs/bluez/patches/0001-enable-dbus-without-systemd.patch
Normal file
34
srcpkgs/bluez/patches/0001-enable-dbus-without-systemd.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
From 2625ab38ae27754205d060f09e3a18f7648d5167 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
From 82099f711ecd8281cebad23b53aadb8c875bc235 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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
|
||||||
|
|
|
@ -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
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
From 32a425c3f9b42a55824c044a6b486c9c12e65a65 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
--- src/bluetooth.conf
|
|
||||||
+++ src/bluetooth.conf
|
|
||||||
@@ -28,6 +28,10 @@
|
|
||||||
<allow send_destination="org.bluez"/>
|
|
||||||
</policy>
|
|
||||||
|
|
||||||
+ <policy group="bluetooth">
|
|
||||||
+ <allow send_destination="org.bluez"/>
|
|
||||||
+ </policy>
|
|
||||||
+
|
|
||||||
<!-- allow users of lp group (printing subsystem) to
|
|
||||||
communicate with bluetoothd -->
|
|
||||||
<policy group="lp">
|
|
|
@ -0,0 +1,129 @@
|
||||||
|
From 2a2eb634d481ab4eed0a444321dc12338de96d6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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 <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <unistd.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
+#include <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#include <linux/if_alg.h>
|
||||||
|
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 <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#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 <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <sys/time.h>
|
||||||
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#include "src/shared/ecc.h"
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
From 9ac712db3c9913d6e00635e120d77541dcc51b6b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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 <fcntl.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
-#include <dirent.h>
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
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 <fcntl.h>
|
||||||
|
#include <ftw.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
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 <dirent.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
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 <dirent.h>
|
||||||
|
#include <ftw.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
|
@ -1,10 +1,20 @@
|
||||||
|
From d1d8408c9a7c7b5ffa30371f246cc18085e11313 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
Date: Thu, 3 Oct 2019 13:00:27 +0700
|
||||||
|
Subject: [PATCH 6/9] musl fix
|
||||||
|
|
||||||
Including <linux/if_bridge.h> causes the inclusion of <linux/in6.h>,
|
Including <linux/if_bridge.h> causes the inclusion of <linux/in6.h>,
|
||||||
which defines 'struct in6_addr', already defined in <netinet/in.h>.
|
which defines 'struct in6_addr', already defined in <netinet/in.h>.
|
||||||
Remove <linux/if_bridge.h> to fix musl build.
|
Remove <linux/if_bridge.h> 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
|
diff --git a/tools/bneptest.c b/tools/bneptest.c
|
||||||
+++ tools/bneptest.c 2017-03-01 19:27:43.579458817 +0100
|
index 8bc7596b6..6b3956cfa 100644
|
||||||
@@ -36,7 +36,6 @@
|
--- a/tools/bneptest.c
|
||||||
|
+++ b/tools/bneptest.c
|
||||||
|
@@ -37,7 +37,6 @@
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <linux/sockios.h>
|
#include <linux/sockios.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@ -12,7 +22,7 @@ Remove <linux/if_bridge.h> to fix musl build.
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@@ -50,6 +49,9 @@
|
@@ -51,6 +50,9 @@
|
||||||
#include "lib/bnep.h"
|
#include "lib/bnep.h"
|
||||||
#include "profiles/network/bnep.h"
|
#include "profiles/network/bnep.h"
|
||||||
|
|
||||||
|
@ -22,3 +32,6 @@ Remove <linux/if_bridge.h> to fix musl build.
|
||||||
enum {
|
enum {
|
||||||
MODE_LISTEN,
|
MODE_LISTEN,
|
||||||
MODE_CONNECT,
|
MODE_CONNECT,
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
25
srcpkgs/bluez/patches/0007-include-string.h.patch
Normal file
25
srcpkgs/bluez/patches/0007-include-string.h.patch
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
From fe1a76a03b9cbc28621d53680eb9ff4a2bd31778 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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 <string.h>
|
||||||
|
+
|
||||||
|
#include "if-main.h"
|
||||||
|
#include "../hal-utils.h"
|
||||||
|
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 05853e46e66868228468fc73d86f221b12edaef1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
||||||
|
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 @@
|
||||||
|
<allow send_interface="org.mpris.MediaPlayer2.Player"/>
|
||||||
|
</policy>
|
||||||
|
|
||||||
|
+ <policy group="bluetooth">
|
||||||
|
+ <allow send_destination="org.bluez"/>
|
||||||
|
+ </policy>
|
||||||
|
+
|
||||||
|
<policy context="default">
|
||||||
|
<allow send_destination="org.bluez"/>
|
||||||
|
</policy>
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
From 3b357802d24ae4f918a1b001b6930280909ef87e Mon Sep 17 00:00:00 2001
|
||||||
|
From: "antoine.belvire@laposte.net" <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=<optimized out>,
|
||||||
|
adapter=0x556fe53f7c70) at src/adapter.c:543
|
||||||
|
2 new_settings_callback (index=<optimized out>, length=<optimized out>,
|
||||||
|
param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573
|
||||||
|
3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0,
|
||||||
|
status=<optimized out>, 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=<optimized out>,
|
||||||
|
user_data=0x556fe53f20c0) at src/shared/mgmt.c:353
|
||||||
|
5 0x0000556fe46396e3 in watch_callback (channel=<optimized out>,
|
||||||
|
cond=<optimized out>, user_data=<optimized out>)
|
||||||
|
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=<optimized out>, argv=<optimized out>)
|
||||||
|
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
|
||||||
|
|
|
@ -1,21 +1,33 @@
|
||||||
# Template file for 'bluez'
|
# Template file for 'bluez'
|
||||||
pkgname=bluez
|
pkgname=bluez
|
||||||
version=5.50
|
version=5.51
|
||||||
revision=5
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-udevdir=/usr/lib/udev --disable-systemd
|
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"
|
hostmakedepends="automake flex libtool pkg-config"
|
||||||
makedepends="cups-devel eudev-libudev-devel libglib-devel libical-devel
|
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"
|
short_desc="Bluetooth tools and daemons"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Doan Tran Cong Danh <congdanhqx@gmail.com>"
|
||||||
license="GPL-2.0-or-later, LGPL-2.1-or-later"
|
license="GPL-2.0-or-later, LGPL-2.1-or-later"
|
||||||
homepage="http://www.bluez.org/"
|
homepage="http://www.bluez.org/"
|
||||||
distfiles="${KERNEL_SITE}/bluetooth/$pkgname-$version.tar.xz"
|
distfiles="${KERNEL_SITE}/bluetooth/$pkgname-$version.tar.xz"
|
||||||
checksum=5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911
|
checksum=ebedfb359f62957940822f1d0b39fcee30422380e435608dad06bb3913d5ebba
|
||||||
conf_files="/etc/bluetooth/main.conf"
|
conf_files="/etc/bluetooth/main.conf"
|
||||||
system_groups="bluetooth"
|
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() {
|
pre_configure() {
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
@ -24,6 +36,9 @@ pre_configure() {
|
||||||
post_install() {
|
post_install() {
|
||||||
vinstall ${wrksrc}/src/main.conf 644 etc/bluetooth
|
vinstall ${wrksrc}/src/main.conf 644 etc/bluetooth
|
||||||
vsv bluetoothd
|
vsv bluetoothd
|
||||||
|
if [ $build_option_mesh ]; then
|
||||||
|
vsv bluetooth-meshd
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
libbluetooth_package() {
|
libbluetooth_package() {
|
||||||
|
@ -68,4 +83,3 @@ bluez-deprecated_package() {
|
||||||
vmove usr/share/man/man1/sdptool.1
|
vmove usr/share/man/man1/sdptool.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue