diff options
author | Pacho Ramos <pacho@gentoo.org> | 2014-02-16 19:17:40 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2014-02-16 19:17:40 +0000 |
commit | 59f5fa16e3efbde537e8260bdb5806dd00e0a7a6 (patch) | |
tree | 75219ed71da0cb0119fcbea84cee99c92133f297 /net-wireless | |
parent | Version bump. (diff) | |
download | gentoo-2-59f5fa16e3efbde537e8260bdb5806dd00e0a7a6.tar.gz gentoo-2-59f5fa16e3efbde537e8260bdb5806dd00e0a7a6.tar.bz2 gentoo-2-59f5fa16e3efbde537e8260bdb5806dd00e0a7a6.zip |
Apply some Fedora patches that also fix Logitech DiNovo Edge keyboard (#501120 by manwe)
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/bluez/ChangeLog | 12 | ||||
-rw-r--r-- | net-wireless/bluez/bluez-5.14-r1.ebuild (renamed from net-wireless/bluez/bluez-5.14.ebuild) | 17 | ||||
-rw-r--r-- | net-wireless/bluez/files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch | 38 | ||||
-rw-r--r-- | net-wireless/bluez/files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch | 29 | ||||
-rw-r--r-- | net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch | 47 | ||||
-rw-r--r-- | net-wireless/bluez/files/0004-agent-Assert-possible-infinite-loop.patch | 25 |
6 files changed, 165 insertions, 3 deletions
diff --git a/net-wireless/bluez/ChangeLog b/net-wireless/bluez/ChangeLog index 3e6f64ed72ab..90c98e7b372e 100644 --- a/net-wireless/bluez/ChangeLog +++ b/net-wireless/bluez/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-wireless/bluez # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/ChangeLog,v 1.186 2014/02/09 09:10:28 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/ChangeLog,v 1.187 2014/02/16 19:17:40 pacho Exp $ + +*bluez-5.14-r1 (16 Feb 2014) + + 16 Feb 2014; Pacho Ramos <pacho@gentoo.org> +bluez-5.14-r1.ebuild, + +files/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch, + +files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch, + +files/0002-autopair-Don-t-handle-the-iCade.patch, + +files/0004-agent-Assert-possible-infinite-loop.patch, -bluez-5.14.ebuild: + Apply some Fedora patches that also fix Logitech DiNovo Edge keyboard (#501120 + by manwe) *bluez-5.14 (09 Feb 2014) diff --git a/net-wireless/bluez/bluez-5.14.ebuild b/net-wireless/bluez/bluez-5.14-r1.ebuild index 64399c323689..195524d900fd 100644 --- a/net-wireless/bluez/bluez-5.14.ebuild +++ b/net-wireless/bluez/bluez-5.14-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-5.14.ebuild,v 1.1 2014/02/09 09:10:28 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-5.14-r1.ebuild,v 1.1 2014/02/16 19:17:40 pacho Exp $ EAPI=5 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} ) @@ -52,9 +52,22 @@ src_prepare() { # Use static group "plugdev" if there is no ConsoleKit (or systemd logind) epatch "${FILESDIR}"/bluez-plugdev.patch - # Fedora patch for better compat with non-full systemd setups + # Fedora patches + # http://www.spinics.net/lists/linux-bluetooth/msg38490.html epatch "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch + # http://www.spinics.net/lists/linux-bluetooth/msg40136.html + epatch "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch + + # http://www.spinics.net/lists/linux-bluetooth/msg41264.html + epatch "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch + + # ??? + epatch "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch + + # Ubuntu workaround for bug #501120 + epatch "${FILESDIR}"/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch + if use cups; then sed -i \ -e "s:cupsdir = \$(libdir)/cups:cupsdir = `cups-config --serverbin`:" \ 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/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch b/net-wireless/bluez/files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch new file mode 100644 index 000000000000..e583320eccb3 --- /dev/null +++ b/net-wireless/bluez/files/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch @@ -0,0 +1,29 @@ +From aa73bf5039dfd2cf0a52dd6fd22501d955cc1a00 Mon Sep 17 00:00:00 2001 +From: Tommy <mesilliac@gmail.com> +Date: Thu, 10 Jan 2013 09:18:43 +0100 +Subject: [PATCH] work around Logitech diNovo Edge keyboard firmware issue + +https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/269851 +--- + tools/hid2hci.rules | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/tools/hid2hci.rules b/tools/hid2hci.rules +index db6bb03..7db4572 100644 +--- a/tools/hid2hci.rules ++++ b/tools/hid2hci.rules +@@ -11,7 +11,10 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt + RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" + + # Logitech devices +-KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ ++KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[3bc]", \ ++ RUN+="hid2hci --method=logitech-hid --devpath=%p" ++# Logitech, Inc. diNovo Edge Keyboard ++KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c714", \ + RUN+="hid2hci --method=logitech-hid --devpath=%p" + + ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" +-- +1.8.0.1 + 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 + |