summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mair-Keimberger <mmk@levelnine.at>2023-08-24 21:26:28 +0200
committerPacho Ramos <pacho@gentoo.org>2023-08-25 15:47:52 +0200
commite9e9b48a11ca7c39ca0ec24f4383a6685949ad66 (patch)
treee7b3016a622e3a5f511dc0b325a32694080b2856
parentnet-wireless/iwd: add 2.8 (diff)
downloadgentoo-e9e9b48a11ca7c39ca0ec24f4383a6685949ad66.tar.gz
gentoo-e9e9b48a11ca7c39ca0ec24f4383a6685949ad66.tar.bz2
gentoo-e9e9b48a11ca7c39ca0ec24f4383a6685949ad66.zip
net-wireless/bluez: remove unused patches
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/32437 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
-rw-r--r--net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch38
-rw-r--r--net-wireless/bluez/files/bluez-5.66-musl-max-input.patch19
-rw-r--r--net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch185
3 files changed, 0 insertions, 242 deletions
diff --git a/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch b/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
deleted file mode 100644
index 004a3895aa09..000000000000
--- a/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From f7861d27fbcbc519f57d8496aa9486f487908821 Mon Sep 17 00:00:00 2001
-From: Bastien Nocera <hadess@hadess.net>
-Date: Sat, 9 Nov 2013 18:13:43 +0100
-Subject: [PATCH 1/5] obex: Use GLib helper function to manipulate paths
-
-Instead of trying to do it by hand. This also makes sure that
-relative paths aren't used by the agent.
----
- obexd/src/manager.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/obexd/src/manager.c b/obexd/src/manager.c
-index cec8a39..f18896e 100644
---- a/obexd/src/manager.c
-+++ b/obexd/src/manager.c
-@@ -651,14 +651,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data)
- DBUS_TYPE_STRING, &name,
- DBUS_TYPE_INVALID)) {
- /* Splits folder and name */
-- const char *slash = strrchr(name, '/');
-+ gboolean is_relative = !g_path_is_absolute(name);
- DBG("Agent replied with %s", name);
-- if (!slash) {
-- agent->new_name = g_strdup(name);
-+ if (is_relative) {
-+ agent->new_name = g_path_get_basename(name);
- agent->new_folder = NULL;
- } else {
-- agent->new_name = g_strdup(slash + 1);
-- agent->new_folder = g_strndup(name, slash - name);
-+ agent->new_name = g_path_get_basename(name);
-+ agent->new_folder = g_path_get_dirname(name);
- }
- }
-
---
-1.8.4.2
-
diff --git a/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch b/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch
deleted file mode 100644
index d8bdb3316e49..000000000000
--- a/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# https://lore.kernel.org/linux-bluetooth/20230131055258.3311810-1-sam@gentoo.org/T/#u
-# musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box.
-# This patch assigns _POSIX_MAX_INPUT to MAX_INPUT.
-# Please refer: https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a
-# https://bugs.gentoo.org/888467
---- a/src/shared/util.c
-+++ b/src/shared/util.c
-@@ -28,6 +28,11 @@
- #include <sys/random.h>
- #endif
-
-+/* define MAX_INPUT for musl */
-+#ifndef MAX_INPUT
-+#define MAX_INPUT _POSIX_MAX_INPUT
-+#endif
-+
- #include "src/shared/util.h"
-
- void *util_malloc(size_t size)
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
deleted file mode 100644
index fef2776f7a0e..000000000000
--- a/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-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
-