aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Van Assche <me@dylanvanassche.be>2021-06-11 20:40:15 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2021-06-14 07:46:15 +0000
commitf831f1f963f30f0023cfe7015be0d7a0b03ed911 (patch)
treea8b71a87cbf8e01fc01fef6f0ac29dbb19b10f45
parent8556b2089fe0de547c2551ff0f1bf10a3f3570a3 (diff)
downloadaports-f831f1f963f30f0023cfe7015be0d7a0b03ed911.tar.gz
aports-f831f1f963f30f0023cfe7015be0d7a0b03ed911.tar.bz2
aports-f831f1f963f30f0023cfe7015be0d7a0b03ed911.tar.xz
main/bluez: use phone class for handhelds
postmarketOS phones should advertise them over Bluetooth as phones, not as computers.
-rw-r--r--main/bluez/005-hostname-Use-phone-class-for-handhelds.patch51
-rw-r--r--main/bluez/APKBUILD4
2 files changed, 54 insertions, 1 deletions
diff --git a/main/bluez/005-hostname-Use-phone-class-for-handhelds.patch b/main/bluez/005-hostname-Use-phone-class-for-handhelds.patch
new file mode 100644
index 0000000000..c5ad4bfbcb
--- /dev/null
+++ b/main/bluez/005-hostname-Use-phone-class-for-handhelds.patch
@@ -0,0 +1,51 @@
+From 7960816020bbd94b1c2f0ff75f73b25927717875 Mon Sep 17 00:00:00 2001
+From: Dylan Van Assche <me@dylanvanassche.be>
+Date: Fri, 11 Jun 2021 20:18:44 +0200
+Subject: [PATCH] hostname: Use phone class for handhelds
+
+Advertise devices with chassis type 'handheld'
+as phone instead of computer.
+---
+ plugins/hostname.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/hostname.c b/plugins/hostname.c
+index 1a9513adb..85c342d36 100644
+--- a/plugins/hostname.c
++++ b/plugins/hostname.c
+@@ -31,6 +31,7 @@
+
+ #define MAJOR_CLASS_MISCELLANEOUS 0x00
+ #define MAJOR_CLASS_COMPUTER 0x01
++#define MAJOR_CLASS_PHONE 0x02
+
+ #define MINOR_CLASS_UNCATEGORIZED 0x00
+ #define MINOR_CLASS_DESKTOP 0x01
+@@ -40,6 +41,7 @@
+ #define MINOR_CLASS_PALM_SIZED 0x05
+ #define MINOR_CLASS_WEARABLE 0x06
+ #define MINOR_CLASS_TABLET 0x07
++#define MINOR_CLASS_SMARTPHONE 0x03
+
+ static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS;
+ static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED;
+@@ -106,11 +108,11 @@ static const struct {
+ uint8_t major_class;
+ uint8_t minor_class;
+ } chassis_table[] = {
+- { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP },
+- { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER },
+- { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP },
+- { "handset", MAJOR_CLASS_COMPUTER, MINOR_CLASS_HANDHELD },
+- { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET },
++ { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP },
++ { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER },
++ { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP },
++ { "handset", MAJOR_CLASS_PHONE, MINOR_CLASS_SMARTPHONE },
++ { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET },
+ { }
+ };
+
+--
+2.31.1
+
diff --git a/main/bluez/APKBUILD b/main/bluez/APKBUILD
index b649fbe1f9..a8bced4012 100644
--- a/main/bluez/APKBUILD
+++ b/main/bluez/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bluez
pkgver=5.58
-pkgrel=1
+pkgrel=2
pkgdesc="Tools for the Bluetooth protocol stack"
url="http://www.bluez.org/"
arch="all"
@@ -35,6 +35,7 @@ source="https://www.kernel.org/pub/linux/bluetooth/bluez-$pkgver.tar.xz
002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
003-Increase-firmware-load-timeout-to-30s.patch
004-Move-the-43xx-firmware-into-lib-firmware.patch
+ 005-hostname-Use-phone-class-for-handhelds.patch
disable-lock-test.patch
fix-endianness.patch
musl.patch
@@ -167,6 +168,7 @@ d6766a4992ed4141569d6d82a802a771a5cb4c08873bfb0fdbedeea4d738bf9b56d9e0452ec19b76
d5fd1c962bd846eaa6fff879bab85f753eb367d514f82d133b5d3242e1da989af5eddd942c60a87d5b67783e060f91bfa0f74fb1e8e6699cdee6e5bbe6a431ea 002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
784e9644c8de4e2693e2eeed988a245608b8cb14e1fc0dff8795c60c527b2e8d0c87862cfbfd6b850b47ae80cdf993a5ed3f477078ea1068fd7374899c7a1a77 003-Increase-firmware-load-timeout-to-30s.patch
42ac04044a8c66e07487598b3a75ef52efc32999ebce4e7c63f6198e2f603f4a1442e74600e43a0938cb4f52d4db0298aa99050b18144b84990cda71748e9de5 004-Move-the-43xx-firmware-into-lib-firmware.patch
+ac635f9bca0e983835940572eb1b96ad70cf60fb84d5b0fde38c76ea6d1b13ef7d9adf81468b9fed779c890ab69dd5dfabf21970bff018466115c424668b82fb 005-hostname-Use-phone-class-for-handhelds.patch
04c4889372c8e790bb338dde7ffa76dc32fcf7370025c71b9184fcf17fd01ade4a6613d84d648303af3bbc54043ad489f29fc0cd4679ec8c9029dcb846d7e026 disable-lock-test.patch
118d55183860f395fc4bdc93efffb13902ebf7388cad722b9061cd2860d404333e500af521741c3d92c0f8a161f6810348fbeb6682e49c372383f417aed8c76a fix-endianness.patch
641e425333d269833eed624edec0e29cba04bb0ff6570f6afda178a164fc2bb77456fa88957fe49f36000d3601ac00bb7ba089400977c1577e9c226e74baa3d6 musl.patch