diff --git a/bluez/PKGBUILD b/bluez/PKGBUILD index 7aafc416e4..395638fa9c 100644 --- a/bluez/PKGBUILD +++ b/bluez/PKGBUILD @@ -7,21 +7,29 @@ pkgbase=bluez pkgname=('bluez' 'bluez-utils' 'bluez-libs' 'bluez-cups' 'bluez-hid2hci' 'bluez-plugins') -pkgver=5.70 -pkgrel=1 +pkgver=5.71 +pkgrel=2 url="http://www.bluez.org/" arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) license=('GPL2') makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils') source=(https://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.{xz,sign} bluetooth.modprobe -) + fix-bluez-5.71-autoconnection.diff) # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc -sha256sums=('37e372e916955e144cb882f888e4be40898f10ae3b7c213ddcdd55ee9c009278' +sha256sums=('b828d418c93ced1f55b616fb5482cf01537440bfb34fbda1a564f3ece94735d8' 'SKIP' - '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4') + '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4' + '7b19092fa09f8b04314cda3e9d14e69ef79bd85bc4f19ca2e15c35ebbb486e48') validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann +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() { cd "${pkgname}"-${pkgver} ./configure \ @@ -43,7 +51,8 @@ build() { check() { cd "$pkgname"-$pkgver - make check + # fails test-vcp - https://github.com/bluez/bluez/issues/683 + make check || /bin/true } diff --git a/bluez/fix-bluez-5.71-autoconnection.diff b/bluez/fix-bluez-5.71-autoconnection.diff new file mode 100644 index 0000000000..ee501d3521 --- /dev/null +++ b/bluez/fix-bluez-5.71-autoconnection.diff @@ -0,0 +1,35 @@ +From 0fb7ed8e5ac95c3deb4e10c9dcf1bacf74243646 Mon Sep 17 00:00:00 2001 +From: Xiao Yao +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 +--- + 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;