diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-wireless/bluez/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-wireless/bluez/files')
9 files changed, 276 insertions, 0 deletions
diff --git a/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch new file mode 100644 index 000000000000..1ea3e6f3e0c1 --- /dev/null +++ b/net-wireless/bluez/files/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch @@ -0,0 +1,58 @@ +From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001 +From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org> +Date: Sat, 12 Oct 2013 17:45:25 +0200 +Subject: [PATCH] Allow using obexd without systemd in the user session + +Not all sessions run systemd --user (actually, the majority +doesn't), so the dbus daemon must be able to spawn obexd +directly, and to do so it needs the full path of the daemon. +--- + Makefile.obexd | 4 ++-- + obexd/src/org.bluez.obex.service | 4 ---- + obexd/src/org.bluez.obex.service.in | 4 ++++ + 3 files changed, 6 insertions(+), 6 deletions(-) + delete mode 100644 obexd/src/org.bluez.obex.service + create mode 100644 obexd/src/org.bluez.obex.service.in + +diff --git a/Makefile.obexd b/Makefile.obexd +index 3760867..142e7c3 100644 +--- a/Makefile.obexd ++++ b/Makefile.obexd +@@ -2,12 +2,12 @@ + if SYSTEMD + systemduserunitdir = @SYSTEMD_USERUNITDIR@ + systemduserunit_DATA = obexd/src/obex.service ++endif + + dbussessionbusdir = @DBUS_SESSIONBUSDIR@ + dbussessionbus_DATA = obexd/src/org.bluez.obex.service +-endif + +-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service ++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in + + obex_plugindir = $(libdir)/obex/plugins + +diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service +deleted file mode 100644 +index a538088..0000000 +--- a/obexd/src/org.bluez.obex.service ++++ /dev/null +@@ -1,4 +0,0 @@ +-[D-BUS Service] +-Name=org.bluez.obex +-Exec=/bin/false +-SystemdService=dbus-org.bluez.obex.service +diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in +new file mode 100644 +index 0000000..9c815f2 +--- /dev/null ++++ b/obexd/src/org.bluez.obex.service.in +@@ -0,0 +1,4 @@ ++[D-BUS Service] ++Name=org.bluez.obex ++Exec=@libexecdir@/obexd ++SystemdService=dbus-org.bluez.obex.service +-- +1.8.3.1 + 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 new file mode 100644 index 000000000000..004a3895aa09 --- /dev/null +++ b/net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch @@ -0,0 +1,38 @@ +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/0002-autopair-Don-t-handle-the-iCade.patch b/net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch new file mode 100644 index 000000000000..68751ae7b60f --- /dev/null +++ b/net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch @@ -0,0 +1,47 @@ +From c16ae7041c7511d8d1ed8441f696716fa6a9117e Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Tue, 19 Nov 2013 14:11:39 +0100 +Subject: [PATCH 2/5] autopair: Don't handle the iCade + +We can't easily enter digits other than 1 through 4 (inclusive) +so leave it up to the agent to figure out a good passcode +for the iCade. + +Note that we can not use the VID/PID of the device, as it is not +yet known at that point. +--- + plugins/autopair.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/plugins/autopair.c b/plugins/autopair.c +index 8c98c12..5d2f6f7 100644 +--- a/plugins/autopair.c ++++ b/plugins/autopair.c +@@ -57,13 +57,23 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter, + { + char addr[18]; + char pinstr[7]; ++ char name[25]; + uint32_t class; + + ba2str(device_get_address(device), addr); + + class = btd_device_get_class(device); + +- DBG("device %s 0x%x", addr, class); ++ device_get_name(device, name, sizeof(name)); ++ name[sizeof(name) - 1] = 0; ++ ++ DBG("device %s (%s) 0x%x", addr, name, class); ++ ++ g_message ("vendor 0x%X product: 0x%X", btd_device_get_vendor (device), btd_device_get_product (device)); ++ ++ /* The iCade shouldn't use random PINs like normal keyboards */ ++ if (name != NULL && strstr(name, "iCade") != NULL) ++ return 0; + + /* This is a class-based pincode guesser. Ignore devices with an + * unknown class. +-- +1.8.4.2 + diff --git a/net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch b/net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch new file mode 100644 index 000000000000..2746e0cdd2cb --- /dev/null +++ b/net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch @@ -0,0 +1,25 @@ +From 67e5477687a2753d3f7b300bcfdc74464d8ad41f Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Mon, 9 Dec 2013 18:04:56 +0100 +Subject: [PATCH 4/5] agent: Assert possible infinite loop + +--- + src/agent.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/agent.c b/src/agent.c +index bcba969..b292881 100644 +--- a/src/agent.c ++++ b/src/agent.c +@@ -203,6 +203,8 @@ void agent_unref(struct agent *agent) + if (agent->ref > 0) + return; + ++ g_assert (agent->ref == 0); ++ + if (agent->request) { + DBusError err; + agent_pincode_cb pincode_cb; +-- +1.8.4.2 + diff --git a/net-wireless/bluez/files/bluetooth-init.d-r4 b/net-wireless/bluez/files/bluetooth-init.d-r4 new file mode 100755 index 000000000000..97cf500008e0 --- /dev/null +++ b/net-wireless/bluez/files/bluetooth-init.d-r4 @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/run/bluetoothd.pid" +command="/usr/libexec/bluetooth/bluetoothd" +command_background=1 + +depend() { + after coldplug + need dbus localmount hostname +} diff --git a/net-wireless/bluez/files/bluez-5.39-systemd-quote.patch b/net-wireless/bluez/files/bluez-5.39-systemd-quote.patch new file mode 100644 index 000000000000..d23c877eef8d --- /dev/null +++ b/net-wireless/bluez/files/bluez-5.39-systemd-quote.patch @@ -0,0 +1,38 @@ +From f554e152715a3c06a69954d9d4f15415c798e083 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Sun, 3 Apr 2016 14:30:02 -0400 +Subject: [PATCH] build: Quote systemd variable names + +If the systemd-m4 package has been installed, SYSTEMD_USERUNITDIR is +defined as a macro. Quote this name to prevent macro expansion. + +Bug: https://bugs.gentoo.org/527432 +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1679a47..4664003 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -216,7 +216,7 @@ if (test "${enable_systemd}" != "no" && test -z "${path_systemunitdir}"); then + fi + AC_MSG_RESULT([${path_systemunitdir}]) + fi +-AC_SUBST(SYSTEMD_SYSTEMUNITDIR, [${path_systemunitdir}]) ++AC_SUBST([SYSTEMD_SYSTEMUNITDIR], [${path_systemunitdir}]) + + AC_ARG_WITH([systemduserunitdir], + AC_HELP_STRING([--with-systemduserunitdir=DIR], +@@ -230,7 +230,7 @@ if (test "${enable_systemd}" != "no" && test -z "${path_userunitdir}"); then + fi + AC_MSG_RESULT([${path_userunitdir}]) + fi +-AC_SUBST(SYSTEMD_USERUNITDIR, [${path_userunitdir}]) ++AC_SUBST([SYSTEMD_USERUNITDIR], [${path_userunitdir}]) + + AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles], + [do not install configuration and data files]), +-- +2.8.0 + diff --git a/net-wireless/bluez/files/bluez-plugdev.patch b/net-wireless/bluez/files/bluez-plugdev.patch new file mode 100644 index 000000000000..726838a5132f --- /dev/null +++ b/net-wireless/bluez/files/bluez-plugdev.patch @@ -0,0 +1,14 @@ +diff -Nurp bluez-4.39.orig/src/bluetooth.conf bluez-4.39/src/bluetooth.conf +--- bluez-4.39.orig/src/bluetooth.conf 2008-12-20 20:18:10.000000000 +0100 ++++ bluez-4.39/src/bluetooth.conf 2009-09-05 13:30:34.411581498 +0200 +@@ -17,6 +17,10 @@ + <allow send_destination="org.bluez"/> + </policy> + ++ <policy group="plugdev"> ++ <allow send_destination="org.bluez"/> ++ </policy> ++ + <policy context="default"> + <deny send_destination="org.bluez"/> + </policy> diff --git a/net-wireless/bluez/files/bluez-udevadm-path.patch b/net-wireless/bluez/files/bluez-udevadm-path.patch new file mode 100644 index 000000000000..f9bbac5b9879 --- /dev/null +++ b/net-wireless/bluez/files/bluez-udevadm-path.patch @@ -0,0 +1,10 @@ +--- a/tools/hid2hci.rules ++++ b/tools/hid2hci.rules +@@ -20,6 +20,7 @@ + # Unfortunately the only event seen is the BT device disappearing, so the mouse + # device needs to be chased down on the USB bus. + ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \ ++ ENV{REMOVE_CMD}="/usr/bin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" \ + ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" + + # CSR devices diff --git a/net-wireless/bluez/files/rfcomm-init.d-r2 b/net-wireless/bluez/files/rfcomm-init.d-r2 new file mode 100644 index 000000000000..3bfb010d60b9 --- /dev/null +++ b/net-wireless/bluez/files/rfcomm-init.d-r2 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need bluetooth +} + +checkconfig() { + if [ -z "${ADDRESS}" ]; then + eerror "ADDRESS must be set" + return 1 + fi + + return 0 +} + +start() { + local DEVICE=${RC_SVCNAME#*.} + + checkconfig || return 1 + + ebegin "Starting ${RC_SVCNAME}" + rfcomm bind "${DEVICE}" "${ADDRESS}" ${CHANNEL} + eend $? +} + +stop() { + local DEVICE=${RC_SVCNAME#*.} + + ebegin "Shutting down ${RC_SVCNAME}" + rfcomm release "${DEVICE}" + eend $? +} |