Browse Source

Merge pull request #5988 from diizzyy/patch-9

bluez: Update to 5.49
lilik-openwrt-22.03
Hannu Nyman 7 years ago
committed by GitHub
parent
commit
f73f39eed1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 93 additions and 59 deletions
  1. +11
    -9
      utils/bluez/Makefile
  2. +0
    -1
      utils/bluez/files/audio.conf
  3. +0
    -37
      utils/bluez/files/bluetooth.dbus
  4. +1
    -0
      utils/bluez/files/bluetoothd.init
  5. +10
    -12
      utils/bluez/patches/201-readline.patch
  6. +10
    -0
      utils/bluez/patches/202-fix-endianness.patch
  7. +61
    -0
      utils/bluez/patches/203-obexd_without_systemd.patch

+ 11
- 9
utils/bluez/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez
PKG_VERSION:=5.47
PKG_VERSION:=5.49
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
PKG_HASH:=cf75bf7cd5d564f21cc4a2bd01d5c39ce425397335fd47d9bbe43af0a58342c8
PKG_HASH:=33301d7a514c73d535ee1f91c2aed1af1f2e53efe11d3ac06bcf0d7abed2ce95
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
@ -55,7 +55,7 @@ $(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utilities
DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
endef
define Package/bluez-daemon
@ -70,10 +70,13 @@ define Package/bluez-daemon/conffiles
/etc/bluetooth/main.conf
/etc/bluetooth/network.conf
/etc/bluetooth/input.conf
/etc/bluetooth/audio.conf
/etc/bluetooth/keys
/etc/config/bluetooth
endef
TARGET_CFLAGS += -D_GNU_SOURCE -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
CONFIGURE_ARGS += \
--enable-static \
--enable-shared \
@ -94,9 +97,6 @@ CONFIGURE_ARGS += \
--disable-udev \
--enable-deprecated
TARGET_CPPFLAGS += \
-D_GNU_SOURCE
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
@ -120,6 +120,7 @@ define Package/bluez-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
@ -130,6 +131,7 @@ define Package/bluez-utils/install
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
@ -144,12 +146,12 @@ define Package/bluez-daemon/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
$(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
$(INSTALL_DIR) $(1)/etc/bluetooth
$(INSTALL_DIR) $(1)/etc/bluetooth/keys
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
$(INSTALL_DATA) ./files/audio.conf $(1)/etc/bluetooth/audio.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
endef


+ 0
- 1
utils/bluez/files/audio.conf View File

@ -1 +0,0 @@
Enable=Source,Sink,Media,Socket

+ 0
- 37
utils/bluez/files/bluetooth.dbus View File

@ -1,37 +0,0 @@
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
</policy>
<policy at_console="true">
<allow send_path="/"/>
<allow send_path="/org/bluez"/>
<allow send_destination="org.bluez.Manager"/>
<allow receive_sender="org.bluez.Manager"/>
<allow send_destination="org.bluez.Adapter"/>
<allow receive_sender="org.bluez.Adapter"/>
<allow send_destination="org.bluez.Device"/>
<allow receive_sender="org.bluez.Device"/>
<allow send_destination="org.bluez.Service"/>
<allow receive_sender="org.bluez.Service"/>
<allow send_destination="org.bluez.Database"/>
<allow receive_sender="org.bluez.Database"/>
<allow send_destination="org.bluez.Security"/>
<allow receive_sender="org.bluez.Security"/>
</policy>
</busconfig>

+ 1
- 0
utils/bluez/files/bluetoothd.init View File

@ -7,6 +7,7 @@ USE_PROCD=1
PROG=/usr/bin/bluetoothd
start_service() {
ln -snf /etc/bluetooth/keys/ /var/lib/bluetooth
procd_open_instance
procd_set_param command "$PROG" -n
procd_close_instance


+ 10
- 12
utils/bluez/patches/201-readline.patch View File

@ -1,7 +1,7 @@
--- a/Makefile.in 2017-09-14 11:47:06.000000000 +0200
+++ b/Makefile.in 2017-09-15 02:52:39.315926972 +0200
@@ -2447,7 +2447,7 @@
@CLIENT_TRUE@ monitor/uuid.h monitor/uuid.c
@@ -2472,7 +2472,7 @@
@CLIENT_TRUE@ client/gatt.h client/gatt.c
@CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
-@CLIENT_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
@ -9,7 +9,7 @@
@MESH_TRUE@mesh_meshctl_SOURCES = mesh/main.c \
@MESH_TRUE@ mesh/mesh-net.h \
@@ -2468,7 +2468,7 @@
@@ -2491,7 +2491,7 @@
@MESH_TRUE@mesh_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
@MESH_TRUE@ lib/libbluetooth-internal.la \
@ -18,7 +18,7 @@
@MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
@MONITOR_TRUE@ monitor/display.h monitor/display.c \
@@ -2724,7 +2724,7 @@
@@ -2747,7 +2747,7 @@
@READLINE_TRUE@ tools/obex-client-tool.c
@READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
@ -27,17 +27,15 @@
@READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-server-tool.c
@@ -2734,17 +2734,17 @@
@READLINE_TRUE@ client/display.h client/display.c
@@ -2756,15 +2756,15 @@
@READLINE_TRUE@tools_bluetooth_player_SOURCES = tools/bluetooth-player.c
@READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
@READLINE_TRUE@ src/libshared-glib.la \
-@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses
@READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c \
@READLINE_TRUE@ client/display.h client/display.c
@READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la \
@READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c
@READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
-@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses
@ -48,7 +46,7 @@
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
@DEPRECATED_TRUE@@READLINE_TRUE@ attrib/gattrib.c btio/btio.c \
@@ -2753,7 +2753,7 @@
@@ -2773,7 +2773,7 @@
@DEPRECATED_TRUE@@READLINE_TRUE@ client/display.h
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \


+ 10
- 0
utils/bluez/patches/202-fix-endianness.patch View File

@ -0,0 +1,10 @@
--- a/src/shared/util.h.old 2016-09-26 07:29:00.000000000 -0500
+++ b/src/shared/util.h 2017-12-27 22:49:50.538716424 -0600
@@ -26,6 +26,7 @@
#include <alloca.h>
#include <byteswap.h>
#include <string.h>
+#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define le16_to_cpu(val) (val)

+ 61
- 0
utils/bluez/patches/203-obexd_without_systemd.patch View File

@ -0,0 +1,61 @@
Submitted By: Armin K. <krejzi at email dot com>
Date: 2013-04-29
Initial Package Version: 5.17
Upstream Status: unknown
Origin: Arch Linux (Giovanni Campagna)
Description: 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
--- a/Makefile.obexd
+++ b/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
--- a/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
+++ b/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

Loading…
Cancel
Save