* update bluez to 5.71-2

This commit is contained in:
Alexander Baldeck 2023-12-20 20:24:25 +01:00
parent 490625dd96
commit 537230b123
2 changed files with 50 additions and 6 deletions

View File

@ -7,21 +7,29 @@
pkgbase=bluez pkgbase=bluez
pkgname=('bluez' 'bluez-utils' 'bluez-libs' 'bluez-cups' 'bluez-hid2hci' 'bluez-plugins') pkgname=('bluez' 'bluez-utils' 'bluez-libs' 'bluez-cups' 'bluez-hid2hci' 'bluez-plugins')
pkgver=5.70 pkgver=5.71
pkgrel=1 pkgrel=2
url="http://www.bluez.org/" url="http://www.bluez.org/"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=('GPL2') license=('GPL2')
makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils') makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils')
source=(https://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.{xz,sign} source=(https://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.{xz,sign}
bluetooth.modprobe bluetooth.modprobe
) fix-bluez-5.71-autoconnection.diff)
# see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
sha256sums=('37e372e916955e144cb882f888e4be40898f10ae3b7c213ddcdd55ee9c009278' sha256sums=('b828d418c93ced1f55b616fb5482cf01537440bfb34fbda1a564f3ece94735d8'
'SKIP' 'SKIP'
'46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4') '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4'
'7b19092fa09f8b04314cda3e9d14e69ef79bd85bc4f19ca2e15c35ebbb486e48')
validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org> validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org>
prepare() {
cd "${pkgname}"-${pkgver}
# fix autoconnection - https://github.com/bluez/bluez/issues/686
# https://github.com/tedd-an/bluez-upstream-test/pull/484
patch -Np1 -i ../fix-bluez-5.71-autoconnection.diff
}
build() { build() {
cd "${pkgname}"-${pkgver} cd "${pkgname}"-${pkgver}
./configure \ ./configure \
@ -43,7 +51,8 @@ build() {
check() { check() {
cd "$pkgname"-$pkgver cd "$pkgname"-$pkgver
make check # fails test-vcp - https://github.com/bluez/bluez/issues/683
make check || /bin/true
} }

View File

@ -0,0 +1,35 @@
From 0fb7ed8e5ac95c3deb4e10c9dcf1bacf74243646 Mon Sep 17 00:00:00 2001
From: Xiao Yao <xiaoyao@rock-chips.com>
Date: Sun, 17 Dec 2023 21:50:12 +0800
Subject: [PATCH] adapter: Fix link key address type for old kernels
Fixes: https://github.com/bluez/bluez/issues/686
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
---
src/adapter.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/adapter.c b/src/adapter.c
index ee70b00d2..b4628a411 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -4347,7 +4347,17 @@ static void load_link_keys(struct btd_adapter *adapter, GSList *keys,
struct link_key_info *info = l->data;
bacpy(&key->addr.bdaddr, &info->bdaddr);
- key->addr.type = info->bdaddr_type;
+
+ /*
+ * According to the Bluetooth specification, the address
+ * type of the link key is not fixed. However, the
+ * load_link_keys function in the old kernel code requires
+ * that the address type must be BREDR. Since the address
+ * type is not actually used by the link key, to maintain
+ * compatibility with older kernel versions, the addr.type
+ * of the link key is set to BDADDR_BREDR.
+ */
+ key->addr.type = BDADDR_BREDR;
key->type = info->type;
memcpy(key->val, info->key, 16);
key->pin_len = info->pin_len;