Browse Source

bluez-update

pull/76/head
milisarge 1 month ago
parent
commit
5548c87615
15 changed files with 318 additions and 0 deletions
  1. +34
    -0
      talimatname/2/net-utils/bluez#5.54-1/0001-enable-dbus-without-systemd.patch
  2. +54
    -0
      talimatname/2/net-utils/bluez#5.54-1/0002-allow-obexd-on-non-systemd-system.patch
  3. +29
    -0
      talimatname/2/net-utils/bluez#5.54-1/0003-allow-mesh-on-non-systemd-system.patch
  4. +25
    -0
      talimatname/2/net-utils/bluez#5.54-1/0007-include-string.h.patch
  5. +27
    -0
      talimatname/2/net-utils/bluez#5.54-1/0008-grant-permission-to-bluetooth.patch
  6. +51
    -0
      talimatname/2/net-utils/bluez#5.54-1/0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch
  7. +0
    -0
      talimatname/2/net-utils/bluez#5.54-1/bluetooth.modprobe
  8. +51
    -0
      talimatname/2/net-utils/bluez#5.54-1/obexd-init
  9. +44
    -0
      talimatname/2/net-utils/bluez#5.54-1/talimat
  10. +3
    -0
      talimatname/4/bluez#5.50-1/bluetooth.modprobe
  11. +0
    -0
      talimatname/4/bluez#5.50-1/bluez-5.50-obexd_without_systemd-1.patch
  12. +0
    -0
      talimatname/4/bluez#5.50-1/libgerekler
  13. +0
    -0
      talimatname/4/bluez#5.50-1/pktlibler
  14. +0
    -0
      talimatname/4/bluez#5.50-1/refresh_adv_manager_for_non-LE_devices.diff
  15. +0
    -0
      talimatname/4/bluez#5.50-1/talimat

+ 34
- 0
talimatname/2/net-utils/bluez#5.54-1/0001-enable-dbus-without-systemd.patch View 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


+ 54
- 0
talimatname/2/net-utils/bluez#5.54-1/0002-allow-obexd-on-non-systemd-system.patch View File

@@ -0,0 +1,54 @@
From 5f27d3887b60c95cbcdefaeae5dea38f020c390e 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/8] 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 de59d297b..cb04bb1e2 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
@@ -107,6 +107,6 @@ obexd/src/builtin.h: obexd/src/genbuiltin $(obexd_builtin_sources)
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(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


+ 29
- 0
talimatname/2/net-utils/bluez#5.54-1/0003-allow-mesh-on-non-systemd-system.patch View File

@@ -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


+ 25
- 0
talimatname/2/net-utils/bluez#5.54-1/0007-include-string.h.patch View 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


+ 27
- 0
talimatname/2/net-utils/bluez#5.54-1/0008-grant-permission-to-bluetooth.patch View File

@@ -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="wheel">
+ <allow send_destination="org.bluez"/>
+ </policy>
+
<policy context="default">
<allow send_destination="org.bluez"/>
</policy>
--
2.23.0


+ 51
- 0
talimatname/2/net-utils/bluez#5.54-1/0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch View File

@@ -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


talimatname/2/net-utils/bluez#5.50-1/bluetooth.modprobe → talimatname/2/net-utils/bluez#5.54-1/bluetooth.modprobe View File


+ 51
- 0
talimatname/2/net-utils/bluez#5.54-1/obexd-init View File

@@ -0,0 +1,51 @@
#!/bin/sh

. /etc/rc.d/functions

if [ -f "/etc/sysconfig/OBEXD" ]; then
. /etc/sysconfig/OBEXD
fi

OBEXD=/usr/lib/bluetooth/obexd
OPT="--auto-accept"

case "${1}" in
start)
log_info_msg "Starting Obexd daemon..."
pidlist=`pidofproc $OBEXD`

if [ "${?}" = "0" ]; then
log_info_msg2 " Already running"
log_success_msg2
exit 0;
fi
# Start as background process and assume OK
$OBEXD $OPT &
log_success_msg2
;;

stop)
log_info_msg "Stopping Obexd daemon..."
killproc $OBEXD
evaluate_retval
;;

restart)
${0} stop
sleep 1
${0} start
;;

status)
statusproc $OBEXD
;;

*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac

exit 0

# End OBEXD

+ 44
- 0
talimatname/2/net-utils/bluez#5.54-1/talimat View File

@@ -0,0 +1,44 @@
[paket]
tanim = Bluetooth kütüphanesi
paketci = milisarge
grup = ağ
url = http://www.bluez.org

[gerek]
derleme = cups eudev glib libical json-c ell
calisma =

[kaynak]
xz = https://www.kernel.org/pub/linux/bluetooth
dosya = bluetooth.modprobe
dosya = 0001-enable-dbus-without-systemd.patch
dosya = 0002-allow-obexd-on-non-systemd-system.patch
dosya = 0003-allow-mesh-on-non-systemd-system.patch
dosya = 0007-include-string.h.patch
dosya = 0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch
dosya = obexd-init

[sha256]
1 = 68cdab9e63e8832b130d5979dc8c96fdb087b31278f342874d992af3e56656dc

[derle]
yama = 0001-enable-dbus-without-systemd.patch
yama = 0002-allow-obexd-on-non-systemd-system.patch
yama = 0003-allow-mesh-on-non-systemd-system.patch
yama = 0007-include-string.h.patch
yama = 0009-adapter-Don-t-refresh-adv_manager-for-non-LE-devices.patch
betik = rm -rf ell/*
betik = autoreconf -fi
ekconf = --with-udevdir=/usr/lib/udev --disable-systemd --enable-btpclient --enable-sixaxis --enable-midi --enable-threads --enable-library --enable-external-ell --enable-mesh --enable-nfc --enable-deprecated
tip = gnu

[pakur]
tip = gnu
betik = install -dm755 ${PKG}/etc/bluetooth
betik = install -Dm644 src/main.conf ${PKG}/etc/bluetooth/main.conf
betik = install -dm755 ${PKG}/usr/lib/modprobe.d
betik = install -Dm644 ${SRC}/bluetooth.modprobe ${PKG}/usr/lib/modprobe.d/bluetooth-usb.conf
betik = ln -svf /usr/lib/bluetooth/bluetoothd $PKG/usr/bin
betik = echo "# See the rfcomm man page for options" > ${PKG}/etc/bluetooth/rfcomm.conf
betik = echo "# See the hciattach man page for options" > ${PKG}/etc/bluetooth/uart.conf
betik = install -Dm755 ${SRC}/obexd-init ${PKG}/etc/rc.d/init.d/obexd

+ 3
- 0
talimatname/4/bluez#5.50-1/bluetooth.modprobe View File

@@ -0,0 +1,3 @@
# use "reset=1" as default, since it should be safe for recent devices and
# solves all kind of problems.
options btusb reset=1

talimatname/2/net-utils/bluez#5.50-1/bluez-5.50-obexd_without_systemd-1.patch → talimatname/4/bluez#5.50-1/bluez-5.50-obexd_without_systemd-1.patch View File


talimatname/2/net-utils/bluez#5.50-1/libgerekler → talimatname/4/bluez#5.50-1/libgerekler View File


talimatname/2/net-utils/bluez#5.50-1/pktlibler → talimatname/4/bluez#5.50-1/pktlibler View File


talimatname/2/net-utils/bluez#5.50-1/refresh_adv_manager_for_non-LE_devices.diff → talimatname/4/bluez#5.50-1/refresh_adv_manager_for_non-LE_devices.diff View File


talimatname/2/net-utils/bluez#5.50-1/talimat → talimatname/4/bluez#5.50-1/talimat View File


Loading…
Cancel
Save