summaryrefslogtreecommitdiff
path: root/net-wireless
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-04 21:03:51 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-04 21:03:51 +0000
commitc4d92ab721dfc646b4a58429d965e9446294ce26 (patch)
tree8c0c331362f99c256c191229ac424b1cc8698005 /net-wireless
parent5565fb7867ee9faddf046e42a0a3a1a207803938 (diff)
gentoo auto-resync : 04:12:2022 - 21:03:51
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/Manifest.gzbin14545 -> 14553 bytes
-rw-r--r--net-wireless/bluez/Manifest6
-rw-r--r--net-wireless/bluez/bluez-5.66.ebuild (renamed from net-wireless/bluez/bluez-5.64.ebuild)32
-rw-r--r--net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch28
-rw-r--r--net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch185
5 files changed, 235 insertions, 16 deletions
diff --git a/net-wireless/Manifest.gz b/net-wireless/Manifest.gz
index 301f65b421b1..a8d3917d0caa 100644
--- a/net-wireless/Manifest.gz
+++ b/net-wireless/Manifest.gz
Binary files differ
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
index a886689dd51f..d5a1427801cb 100644
--- a/net-wireless/bluez/Manifest
+++ b/net-wireless/bluez/Manifest
@@ -4,10 +4,12 @@ AUX 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch 1252 BLAKE2B ce
AUX bluetooth-conf.d 21 BLAKE2B 7c94e499438f441fc18f0b50178e707982ac91871a74b2e7a35c9930d32441a89f742993e993e3003f9bcb5e3ee9adde2ab1cbe33b27245b1b1e91e7c3dc1a0b SHA512 45befd3fb42ea3462fa6e1ee9f3ee9591e197d4925a4c9df6733bacfe44cf44f54ed3aad6fd7a6a2953da54b93460a1cf0ea1cadf0d7e47f811e4c3182af74d5
AUX bluetooth-init.d-r5 313 BLAKE2B 6bad1b9a75de5927ab22a229d6ce18247b32a79b994078338eff33df7f74a7dc4a5266212f6d0150101600e3a864a9b64ce6a576208218750bfbe88bc5911baa SHA512 95aff192be6207047fc01b42754bcd34d5cd7f82c16486fdd81bb1d14be040e4f3e9bafd8dc2f4e8b87bf1eb50f6634f526feaf2b38c0c6807f40784d84dac96
AUX bluez-5.63-musl-limits.patch 558 BLAKE2B 2dd66c54aee0bd8bfe3fd530a4e29139d79f6eb153e06e13680df42f2a361274d6a8f0f80989b7962173d693f37d1cac8b16506267a1319e608382511cf4bfe1 SHA512 b752414c8219befb71e0f0a59fa33be5a0d2add2b89a0c8f90de13aef1815307e5f4b8f076d3778778ab3de6656fd50d59f621af50d9ed39695b5f7978660348
+AUX bluez-5.66-power-state-adapter-property.patch 1085 BLAKE2B 9d76822b8ab649eb322e9511b86d85b912d8a073f15c563b689ad57b12e1c1eb043ed1741b62364dfae3b4a100ad4fdce36e723103f231dd77bf070c4ae0be73 SHA512 df52b4d260e0de6de9ad4bc1201740b2bc37a537c96e2a22d4f8b698caf6fcea81eba1e8d7b152ad6a1237a51e06212e7cfdc429b9b7f7ff66d23a294cbc55e5
+AUX bluez-5.66-transient-hostname-fix.patch 5163 BLAKE2B 6a0f63370634ec7bdc830d8bb26ca47f273194e4a5ebf3c7fc654371f520d117da5112e76b4939e96e0d56ede2a0663ae1414dc809b9315a8bac63045ed70867 SHA512 fe787ec5a2e77da7ca3483797b07b1c4d0dbc133d22095e8b6fb3361a79f7762284af265e3bee54e330e22b110ee95916ad1f4f1f37002af9fc7859b09d1bdd0
AUX bluez-udevadm-path-r1.patch 564 BLAKE2B 0b4dc12f55ab60d254aa3365baf35186a5913026dbfcbc3da41c113b3c423c81189b87016dabcb2c505b684cad376d10d10df9aa17558b8fd022928995931e0e SHA512 d9b0dd452258e425802cf5ad4980a77796be79e94bf6ce641927c5ab7ea1117ce6589063f3a0b96bf25e81303234279a09d58484fec49cfc6aa1db46f245f9c6
-DIST bluez-5.64.tar.xz 2175148 BLAKE2B 828c620330d1993d5c5c2a865f2d27a29425e3583aac01a1a782290a805ee0fd6456b6832c804ad323dd8714fa9329487b2616ed08f1f491ea29403ee05dba2d SHA512 f11f9974b29c5c6fce3890d7e42425c1cb02e42c1b8f49c5cc4b249234e67b64317d0e5e82721e2fbf1b53269c8569a9c869d59ce42b5e927f6622f0753e53cd
DIST bluez-5.65.tar.xz 2208100 BLAKE2B 9d2937e2e14d8d8945183c6436921d9d16a6d3bcb5dbe3e2493554fbc4972bb4c006aabc793c9fb8eae47a7e9f29ae9fdf47551dfc0a238e86f5a76ce7436ae2 SHA512 c20c09a1a75053c77d73b3ce15ac7fd321eb6df5ca1646d57c6848b87c0c9957908bc17dd928da4ef2aacfc8667877cbc7511c1ba43db839bfa9bf1fb8269907
+DIST bluez-5.66.tar.xz 2257288 BLAKE2B af1911cf590461a874daa16bedb8a021a3b2c2af3254360c035d2180e0f355372651bd41da342c26e6d9631d726dd08e0d6a83a22069333b94b6fce6d546718c SHA512 ed0994932687eacf27207867366671b323671f5d5199daf36ea5eff8f254f2bc99ef989ef7df9883b35c06f2af60452be8bad0a06109428a4717cf2b247b4865
DIST power-state-adapter-property.patch 22488 BLAKE2B a46173c0ebe4f4822c67c2f8f2f3e67dab261753f64204f1a61665c3bba1d7a10e0f8511b38ce273d986490ffd262a737bee82694909683df7386b2015301607 SHA512 b039a578454681f291dc3b04079c8d0151b13a84b4b013e290aa3c28aba1538cef2d9e9aadfe88a0dbfb8e4cea1c251cb5043f4175fb32d53526f7b82de0451a
-EBUILD bluez-5.64.ebuild 9384 BLAKE2B 9763e7477924ed3255d85e1f4961e40018b6680b55d6a1eec4afa9c5e35c4e193c67cdb489147d860934d42cbd3da7bd3134eb9f80e85e703d7406b2c637adc1 SHA512 2f40e7a0b95c163c57b579b31b973ee3da519cd3ad4945bd76de674feb070f17cdf134e1b69db00f42ff2a2090deaa5bc78c22679263903f0eaec40b51f2236c
EBUILD bluez-5.65.ebuild 9527 BLAKE2B 2089a41aee0dcf30d070dbe59787e0ea2d69d7d168705086487fcd18910c7f5f233e532eda91adf5353c2b750f13cafb898e0d684aef8093490c0a9e8006311b SHA512 5b11b34f7b93603175a2b83fad3c37c85f2806bf582bd57ba8cb1bf79fc0cd1a48a8a7a346b20876d0de1f1b58447ff7ee2c4a00930a54047c4e16daecf901e4
+EBUILD bluez-5.66.ebuild 9621 BLAKE2B 7c110dffd4eab5911091a299f350729fa9bd024a7b2da96abbfb5ee153f24b91593d4a78aacd3b8b0c924e037d9cce31a488829bf12a2569d8f4243ec4140121 SHA512 71afb0946d9b452404e191ac3ade4f1b64233d4592fa3f0c948ca92d061bbffdd7671ebb675e4582ab29c1e8818fc745039b2f1acbdf6fc5468e7981898a24cf
MISC metadata.xml 1099 BLAKE2B 75b6db1d43b75f9b22ce5fb6ec640e2e06b2f2575ff75441318a2076b8486ed7d81a62714540c61ab3a35198113538546b9aa71d05ef4cd7106c8a7f09c13029 SHA512 6e4a7bba7102b4850a938ba0f6feec9cd12488d4b440b19982751c2a742b33a565933fae3967080c060e5b5eb51d90268abc87a2c0a2efb7f4c773020c29462a
diff --git a/net-wireless/bluez/bluez-5.64.ebuild b/net-wireless/bluez/bluez-5.66.ebuild
index d70099f17051..9a5ea90d88e1 100644
--- a/net-wireless/bluez/bluez-5.64.ebuild
+++ b/net-wireless/bluez/bluez-5.66.ebuild
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
-inherit autotools linux-info python-single-r1 readme.gentoo-r1 systemd udev multilib-minimal
+inherit autotools linux-info python-single-r1 systemd udev multilib-minimal #readme.gentoo-r1
DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
HOMEPAGE="http://www.bluez.org"
@@ -12,7 +12,7 @@ SRC_URI="https://www.kernel.org/pub/linux/bluetooth/${P}.tar.xz"
LICENSE="GPL-2+ LGPL-2.1+"
SLOT="0/3"
-KEYWORDS="amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
IUSE="btpclient cups doc debug deprecated extra-tools experimental +mesh midi +obex +readline selinux systemd test test-programs +udev"
# Since this release all remaining extra-tools need readline support, but this could
@@ -67,12 +67,15 @@ PATCHES=(
# https://github.com/bluez/bluez/issues/268
"${FILESDIR}"/${PN}-udevadm-path-r1.patch
- # https://github.com/bluez/bluez/issues/267
- "${FILESDIR}"/${PN}-5.63-musl-limits.patch
-
# Fedora patches
# http://www.spinics.net/lists/linux-bluetooth/msg40136.html
"${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
+
+ # https://lore.kernel.org/linux-bluetooth/20220901110719.176944-1-hadess@hadess.net/T/#m9c08d004cd5422783ee1d93154f42303bba9169f
+ "${FILESDIR}"/${PN}-5.66-power-state-adapter-property.patch
+
+ # Fixed in next release
+ "${FILESDIR}"/${P}-transient-hostname-fix.patch
)
pkg_setup() {
@@ -273,14 +276,15 @@ multilib_src_install_all() {
einstalldocs
use doc && dodoc doc/*.txt
+ # Upstream dropped the example files
# Install .json files as examples to be used by meshctl
- if use mesh; then
- dodoc tools/mesh-gatt/*.json
- local DOC_CONTENTS="Some example .json files were installed into
- /usr/share/doc/${PF} to be used with meshctl. Feel free to
- uncompress and copy them to ~/.config/meshctl to use them."
- readme.gentoo_create_doc
- fi
+ #if use mesh; then
+ #dodoc tools/mesh-gatt/*.json
+ # local DOC_CONTENTS="Some example .json files were installed into
+ # /usr/share/doc/${PF} to be used with meshctl. Feel free to
+ # uncompress and copy them to ~/.config/meshctl to use them."
+ # readme.gentoo_create_doc
+ #fi
}
pkg_postinst() {
@@ -288,7 +292,7 @@ pkg_postinst() {
systemd_reenable bluetooth.service
has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp"
- use mesh && readme.gentoo_print_elog
+ #use mesh && readme.gentoo_print_elog
}
pkg_postrm() {
diff --git a/net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch b/net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch
new file mode 100644
index 000000000000..566d7c08b591
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch
@@ -0,0 +1,28 @@
+From 70309219acd4c81e3a9e2b3652d2d93eb08b0aee Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Wed, 31 Aug 2022 11:16:34 +0200
+Subject: [PATCH 6/6] adapter: Remove experimental flag for PowerState
+
+Now that the feature has been tested, that the API is deemed adequate
+and the reliability sufficient.
+---
+ src/adapter.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/adapter.c b/src/adapter.c
+index 8fb2acdc8..841096d7f 100644
+--- a/src/adapter.c
++++ b/src/adapter.c
+@@ -3864,8 +3864,7 @@ static const GDBusPropertyTable adapter_properties[] = {
+ { "Alias", "s", property_get_alias, property_set_alias },
+ { "Class", "u", property_get_class },
+ { "Powered", "b", property_get_powered, property_set_powered },
+- { "PowerState", "s", property_get_power_state, NULL, NULL,
+- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
++ { "PowerState", "s", property_get_power_state },
+ { "Discoverable", "b", property_get_discoverable,
+ property_set_discoverable },
+ { "DiscoverableTimeout", "u", property_get_discoverable_timeout,
+--
+2.37.2
+
diff --git a/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch b/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch
new file mode 100644
index 000000000000..fef2776f7a0e
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch
@@ -0,0 +1,185 @@
+From e515f4b6e25c971c47ab79e9cbdfa17119bbde23 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Wed, 9 Nov 2022 16:17:55 +0100
+Subject: [PATCH 1/2] hostname: Add '' around printed strings
+
+Otherwise we can't see whether the string is nul, or empty.
+---
+ plugins/hostname.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/hostname.c b/plugins/hostname.c
+index 1a9513adb..14b6450b5 100644
+--- a/plugins/hostname.c
++++ b/plugins/hostname.c
+@@ -128,7 +128,7 @@ static void property_changed(GDBusProxy *proxy, const char *name,
+
+ dbus_message_iter_get_basic(iter, &str);
+
+- DBG("pretty hostname: %s", str);
++ DBG("pretty hostname: '%s'", str);
+
+ g_free(pretty_hostname);
+ pretty_hostname = g_strdup(str);
+@@ -146,7 +146,7 @@ static void property_changed(GDBusProxy *proxy, const char *name,
+
+ dbus_message_iter_get_basic(iter, &str);
+
+- DBG("static hostname: %s", str);
++ DBG("static hostname: '%s'", str);
+
+ g_free(static_hostname);
+ static_hostname = g_strdup(str);
+@@ -165,7 +165,7 @@ static void property_changed(GDBusProxy *proxy, const char *name,
+
+ dbus_message_iter_get_basic(iter, &str);
+
+- DBG("chassis: %s", str);
++ DBG("chassis: '%s'", str);
+
+ for (i = 0; chassis_table[i].chassis; i++) {
+ if (strcmp(chassis_table[i].chassis, str))
+--
+2.37.3
+
+
+From e2b2b1675f310023862319ea10ffd205a75cc0cb Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Wed, 9 Nov 2022 16:17:56 +0100
+Subject: [PATCH 2/2] hostname: Fallback to transient hostname
+
+After pretty hostname, and static hostname, also support transient
+hostname as a last resort before 'BlueZ X.XX'.
+
+This happens on Fedora's Workstation installation as it calls
+"hostnamectl set-hostname" on startup. In Fedora Silverblue, the default
+hostname is set as fedora in /etc/os-release.
+
+In both cases, we should fall back to that transient hostname, as bad as
+it could be.
+
+Note that the transient hostname needs to be monitored through the
+kernel directly, as explained in:
+https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html
+---
+ plugins/hostname.c | 57 ++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 55 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/hostname.c b/plugins/hostname.c
+index 14b6450b5..51707f07d 100644
+--- a/plugins/hostname.c
++++ b/plugins/hostname.c
+@@ -16,6 +16,8 @@
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <fcntl.h>
++#include <sys/utsname.h>
+
+ #include "lib/bluetooth.h"
+ #include "lib/sdp.h"
+@@ -44,8 +46,10 @@
+ static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS;
+ static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED;
+
+-static char *pretty_hostname = NULL;
+-static char *static_hostname = NULL;
++static char *pretty_hostname = NULL;
++static char *static_hostname = NULL;
++static char *transient_hostname = NULL;
++static guint hostname_id = 0;
+
+ /*
+ * Fallback to static hostname only if empty pretty hostname was already
+@@ -60,6 +64,10 @@ static const char *get_hostname(void)
+ if (static_hostname &&
+ g_str_equal(static_hostname, "") == FALSE)
+ return static_hostname;
++
++ if (transient_hostname &&
++ g_str_equal(transient_hostname, "") == FALSE)
++ return transient_hostname;
+ }
+
+ return NULL;
+@@ -181,6 +189,32 @@ static void property_changed(GDBusProxy *proxy, const char *name,
+ }
+ }
+
++static void read_transient_hostname(void)
++{
++ struct utsname u;
++
++ if (uname(&u) != 0) {
++ g_free(transient_hostname);
++ transient_hostname = NULL;
++ DBG("failed to read transient hostname");
++ return;
++ }
++
++ g_free(transient_hostname);
++ transient_hostname = g_strdup(u.nodename);
++
++ DBG("read transient hostname: '%s'", transient_hostname);
++}
++
++static gboolean hostname_cb(GIOChannel *io, GIOCondition cond,
++ gpointer user_data)
++{
++ DBG("transient hostname changed");
++ read_transient_hostname();
++ adapter_foreach(update_class, NULL);
++ return TRUE;
++}
++
+ static int hostname_probe(struct btd_adapter *adapter)
+ {
+ DBG("");
+@@ -261,9 +295,11 @@ static GDBusProxy *hostname_proxy = NULL;
+ static int hostname_init(void)
+ {
+ DBusConnection *conn = btd_get_dbus_connection();
++ int fd;
+ int err;
+
+ read_dmi_fallback();
++ read_transient_hostname();
+
+ hostname_client = g_dbus_client_new(conn, "org.freedesktop.hostname1",
+ "/org/freedesktop/hostname1");
+@@ -289,6 +325,17 @@ static int hostname_init(void)
+ hostname_client = NULL;
+ }
+
++ fd = open("/proc/sys/kernel/hostname", O_RDONLY);
++ if (fd < 0) {
++ error("open(/proc/sys/kernel/hostname): %s (%d)",
++ strerror(errno), errno);
++ } else {
++ GIOChannel *io = g_io_channel_unix_new(fd);
++
++ hostname_id = g_io_add_watch(io, G_IO_ERR, hostname_cb, NULL);
++ g_io_channel_unref(io);
++ }
++
+ return err;
+ }
+
+@@ -306,8 +353,14 @@ static void hostname_exit(void)
+ hostname_client = NULL;
+ }
+
++ if (hostname_id != 0) {
++ g_source_remove(hostname_id);
++ hostname_id = 0;
++ }
++
+ g_free(pretty_hostname);
+ g_free(static_hostname);
++ g_free(transient_hostname);
+ }
+
+ BLUETOOTH_PLUGIN_DEFINE(hostname, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+--
+2.37.3
+