diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-08-21 13:04:10 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-08-21 13:04:10 +0000 |
commit | 2e719fa2a06eb1c137afe07c8f75c351ac4e31ac (patch) | |
tree | 9e869cafb566e300526cbee80665251c53a876e7 /net-wireless | |
parent | added app-admin/busybox-sysklogd. (diff) | |
download | gentoo-2-2e719fa2a06eb1c137afe07c8f75c351ac4e31ac.tar.gz gentoo-2-2e719fa2a06eb1c137afe07c8f75c351ac4e31ac.tar.bz2 gentoo-2-2e719fa2a06eb1c137afe07c8f75c351ac4e31ac.zip |
Include some upstream fixes for networking, this also solves PAN connection allowing it to work with NetworkManager again (and allowing me to commit this ;)) without getting 'Error connecting with bluez: Method Connect with signature s on interface org.bluez.Network doesn't exist'.
(Portage version: 2.1.11.10/cvs/Linux x86_64)
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/bluez/ChangeLog | 12 | ||||
-rw-r--r-- | net-wireless/bluez/bluez-4.101-r3.ebuild | 176 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-4.101-network1.patch | 48 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-4.101-network2.patch | 17 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-4.101-network3.patch | 34 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-4.101-network4.patch | 84 |
6 files changed, 370 insertions, 1 deletions
diff --git a/net-wireless/bluez/ChangeLog b/net-wireless/bluez/ChangeLog index 5a294b8d0f2f..c935b8387833 100644 --- a/net-wireless/bluez/ChangeLog +++ b/net-wireless/bluez/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-wireless/bluez # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/ChangeLog,v 1.141 2012/08/10 08:48:24 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/ChangeLog,v 1.142 2012/08/21 13:04:10 pacho Exp $ + +*bluez-4.101-r3 (21 Aug 2012) + + 21 Aug 2012; Pacho Ramos <pacho@gentoo.org> +bluez-4.101-r3.ebuild, + +files/bluez-4.101-network1.patch, +files/bluez-4.101-network2.patch, + +files/bluez-4.101-network3.patch, +files/bluez-4.101-network4.patch: + Include some upstream fixes for networking, this also solves PAN connection + allowing it to work with NetworkManager again (and allowing me to commit this + ;)) without getting 'Error connecting with bluez: Method Connect with + signature s on interface org.bluez.Network doesn't exist'. *bluez-4.101-r2 (10 Aug 2012) diff --git a/net-wireless/bluez/bluez-4.101-r3.ebuild b/net-wireless/bluez/bluez-4.101-r3.ebuild new file mode 100644 index 000000000000..f1437f20f2f2 --- /dev/null +++ b/net-wireless/bluez/bluez-4.101-r3.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.101-r3.ebuild,v 1.1 2012/08/21 13:04:10 pacho Exp $ + +EAPI="4" +PYTHON_DEPEND="test-programs? 2" + +inherit multilib eutils systemd python user + +DESCRIPTION="Bluetooth Tools and System Daemons for Linux" +HOMEPAGE="http://www.bluez.org/" + +# Because of oui.txt changing from time to time without noticement, we need to supply it +# ourselves instead of using http://standards.ieee.org/regauth/oui/oui.txt directly. +# See bugs #345263 and #349473 for reference. +OUIDATE="20120623" +SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz + http://dev.gentoo.org/~pacho/bluez/oui-${OUIDATE}.txt.xz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" +IUSE="alsa +consolekit cups debug gstreamer selinux pcmcia test-programs usb readline" + +CDEPEND=" + >=dev-libs/glib-2.28:2 + >=sys-apps/dbus-1.4 + >=sys-fs/udev-169 + alsa? ( + media-libs/alsa-lib[alsa_pcm_plugins_extplug(+),alsa_pcm_plugins_ioplug(+)] + media-libs/libsndfile + ) + cups? ( net-print/cups ) + gstreamer? ( + >=media-libs/gstreamer-0.10:0.10 + >=media-libs/gst-plugins-base-0.10:0.10 + ) + selinux? ( sec-policy/selinux-bluetooth ) + usb? ( virtual/libusb:0 ) + readline? ( sys-libs/readline ) +" +DEPEND="${CDEPEND} + virtual/pkgconfig + sys-devel/flex + test-programs? ( >=dev-libs/check-0.9.6 ) +" +RDEPEND="${CDEPEND} + !net-wireless/bluez-libs + !net-wireless/bluez-utils + consolekit? ( + || ( sys-auth/consolekit + >=sys-apps/systemd-37 ) + ) + test-programs? ( + dev-python/dbus-python + dev-python/pygobject:2 + ) +" + +DOCS=( AUTHORS ChangeLog README ) + +pkg_setup() { + if ! use consolekit; then + enewgroup plugdev + fi + + if use test-programs; then + python_pkg_setup + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-network{1,2,3,4}.patch + + if ! use consolekit; then + # No consolekit for at_console etc, so we grant plugdev the rights + epatch "${FILESDIR}/bluez-plugdev.patch" + fi + + if use cups; then + sed -i \ + -e "s:cupsdir = \$(libdir)/cups:cupsdir = `cups-config --serverbin`:" \ + Makefile.tools Makefile.in || die + fi +} + +src_configure() { + use readline || export ac_cv_header_readline_readline_h=no + + econf \ + --disable-silent-rules \ + --enable-hid2hci \ + --enable-audio \ + --enable-bccmd \ + --enable-datafiles \ + --enable-dfutool \ + --enable-input \ + --enable-network \ + --enable-serial \ + --enable-service \ + --enable-tools \ + --disable-hal \ + --localstatedir=/var \ + --with-systemdunitdir="$(systemd_get_unitdir)" \ + $(use_enable alsa) \ + $(use_enable cups) \ + $(use_enable debug) \ + $(use_enable gstreamer) \ + $(use_enable pcmcia) \ + $(use_enable test-programs test) \ + $(use_enable usb) \ + --enable-health \ + --enable-maemo6 \ + --enable-pnat \ + --enable-wiimote +} + +src_install() { + default + + if use test-programs ; then + cd "${S}/test" + dobin simple-agent simple-service monitor-bluetooth + newbin list-devices list-bluetooth-devices + rm test-textfile.{c,o} || die # bug #356529 + for b in hsmicro hsplay test-* ; do + newbin "${b}" "bluez-${b}" + done + insinto /usr/share/doc/${PF}/test-services + doins service-* + + python_convert_shebangs -r 2 "${ED}" + cd "${S}" + fi + + insinto /etc/bluetooth + doins \ + input/input.conf \ + audio/audio.conf \ + network/network.conf \ + serial/serial.conf + + newinitd "${FILESDIR}/bluetooth-init.d-r2" bluetooth + newinitd "${FILESDIR}/rfcomm-init.d" rfcomm + newconfd "${FILESDIR}/rfcomm-conf.d" rfcomm + + # Install oui.txt as requested in bug #283791 and approved by upstream + insinto /var/lib/misc + newins "${WORKDIR}/oui-${OUIDATE}.txt" oui.txt + + prune_libtool_files --all +} + +pkg_postinst() { + udevadm control --reload-rules + + if ! has_version "net-dialup/ppp"; then + elog "To use dial up networking you must install net-dialup/ppp." + fi + + if use consolekit; then + elog "If you want to use rfcomm as a normal user, you need to add the user" + elog "to the uucp group." + else + elog "Since you have the consolekit use flag disabled, you will only be able to run" + elog "bluetooth clients as root. If you want to be able to run bluetooth clientes as " + elog "a regular user, you need to enable the consolekit use flag for this package or" + elog "to add the user to the plugdev group." + fi + + if [ "$(rc-config list default | grep bluetooth)" = "" ] ; then + elog "You will need to add bluetooth service to default runlevel" + elog "for getting your devices detected. For that please run:" + elog "'rc-update add bluetooth default'" + fi +} diff --git a/net-wireless/bluez/files/bluez-4.101-network1.patch b/net-wireless/bluez/files/bluez-4.101-network1.patch new file mode 100644 index 000000000000..cf75d07bfe5f --- /dev/null +++ b/net-wireless/bluez/files/bluez-4.101-network1.patch @@ -0,0 +1,48 @@ +X-Git-Url: http://git.kernel.org/?p=bluetooth%2Fbluez.git;a=blobdiff_plain;f=profiles%2Fnetwork%2Fserver.c;h=8ae608cdb6e699ad78cd7476e26c60f8883a214f;hp=480c7e2c5f6ab1cc7c494a3bcc37d1a0026a0ce4;hb=2b44cd2fba6e9a8590f30e68db0f6b92e8fcdb94;hpb=04be4fe0c0126f8816d55a7d3a8ff9e6dd27f73f + +diff --git a/profiles/network/server.c b/profiles/network/server.c +index 480c7e2..8ae608c 100644 +--- a/profiles/network/server.c ++++ b/profiles/network/server.c +@@ -301,7 +301,10 @@ static uint16_t bnep_setup_chk(uint16_t dst_role, uint16_t src_role) + static uint16_t bnep_setup_decode(struct bnep_setup_conn_req *req, + uint16_t *dst_role, uint16_t *src_role) + { ++ const uint8_t bt_base[] = { 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, ++ 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }; + uint8_t *dest, *source; ++ uint32_t val; + + dest = req->service; + source = req->service + req->uuid_size; +@@ -311,10 +314,27 @@ static uint16_t bnep_setup_decode(struct bnep_setup_conn_req *req, + *dst_role = bt_get_be16(dest); + *src_role = bt_get_be16(source); + break; +- case 4: /* UUID32 */ + case 16: /* UUID128 */ +- *dst_role = bt_get_be32(dest); +- *src_role = bt_get_be32(source); ++ /* Check that the bytes in the UUID, except the service ID ++ * itself, are correct. The service ID is checked in ++ * bnep_setup_chk(). */ ++ if (memcmp(&dest[4], bt_base, sizeof(bt_base)) != 0) ++ return BNEP_CONN_INVALID_DST; ++ if (memcmp(&source[4], bt_base, sizeof(bt_base)) != 0) ++ return BNEP_CONN_INVALID_SRC; ++ ++ /* Intentional no-break */ ++ ++ case 4: /* UUID32 */ ++ val = bt_get_be32(dest); ++ if (val > 0xffff) ++ return BNEP_CONN_INVALID_DST; ++ *dst_role = val; ++ ++ val = bt_get_be32(source); ++ if (val > 0xffff) ++ return BNEP_CONN_INVALID_SRC; ++ *src_role = val; + break; + default: + return BNEP_CONN_INVALID_SVC; diff --git a/net-wireless/bluez/files/bluez-4.101-network2.patch b/net-wireless/bluez/files/bluez-4.101-network2.patch new file mode 100644 index 000000000000..807eb1912b96 --- /dev/null +++ b/net-wireless/bluez/files/bluez-4.101-network2.patch @@ -0,0 +1,17 @@ +X-Git-Url: http://git.kernel.org/?p=bluetooth%2Fbluez.git;a=blobdiff_plain;f=network%2Fconnection.c;h=59423a900b2fba9ec99115dec421a3113bc2d834;hp=544ec3a9c643bc8fada6d683d428a8165a4b052f;hb=57170b311f1468330f4a9961dc0b3ac45f97bc13;hpb=c1d662075288d475ee6e1740d39ac84fe806542a + +diff --git a/network/connection.c b/network/connection.c +index 544ec3a..59423a9 100644 +--- a/network/connection.c ++++ b/network/connection.c +@@ -554,7 +554,9 @@ static void path_unregister(void *data) + + static const GDBusMethodTable connection_methods[] = { + { GDBUS_ASYNC_METHOD("Connect", +- NULL, NULL, connection_connect) }, ++ GDBUS_ARGS({"uuid", "s"}), ++ GDBUS_ARGS({"interface", "s"}), ++ connection_connect) }, + { GDBUS_METHOD("Disconnect", + NULL, NULL, connection_disconnect) }, + { GDBUS_METHOD("GetProperties", diff --git a/net-wireless/bluez/files/bluez-4.101-network3.patch b/net-wireless/bluez/files/bluez-4.101-network3.patch new file mode 100644 index 000000000000..7f9afb01c78a --- /dev/null +++ b/net-wireless/bluez/files/bluez-4.101-network3.patch @@ -0,0 +1,34 @@ +From b57c64f1aa5c51dd785f2572636b8c41ada06d72 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup <praiskup@redhat.com> +Date: Tue, 30 Aug 2011 15:10:46 +0200 +Subject: [PATCH 1/1] network: NULL dereference fix + +Variable ifindex dereferenced on line 242 before null check on line 249. +--- + network/common.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/network/common.c b/network/common.c +index 4704072..a223685 100644 +--- a/network/common.c ++++ b/network/common.c +@@ -240,13 +240,15 @@ int bnep_if_down(const char *devname) + + int bnep_add_to_bridge(const char *devname, const char *bridge) + { +- int ifindex = if_nametoindex(devname); ++ int ifindex; + struct ifreq ifr; + int sk, err; + + if (!devname || !bridge) + return -EINVAL; + ++ ifindex = if_nametoindex(devname); ++ + sk = socket(AF_INET, SOCK_STREAM, 0); + if (sk < 0) + return -1; +-- +1.7.7.6 + diff --git a/net-wireless/bluez/files/bluez-4.101-network4.patch b/net-wireless/bluez/files/bluez-4.101-network4.patch new file mode 100644 index 000000000000..a1166fa4e7af --- /dev/null +++ b/net-wireless/bluez/files/bluez-4.101-network4.patch @@ -0,0 +1,84 @@ +From a66a557038c0e3d21bc4f14090efb497558a12be Mon Sep 17 00:00:00 2001 +From: Lucas De Marchi <lucas.demarchi@profusion.mobi> +Date: Tue, 26 Jun 2012 18:11:25 -0300 +Subject: [PATCH 1/1] Fix GDBus flags after conversion to macros + +Commit "aa3b9016bf444b60e1b7e1804dfc323a23a93c5a Convert GDBus methods +to use macro helpers" converted the previous tables to use the new +macros but some flags were lost. +--- + attrib/client.c | 2 +- + audio/control.c | 2 +- + audio/headset.c | 2 +- + audio/transport.c | 2 +- + src/manager.c | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/attrib/client.c b/attrib/client.c +index 8d119df..b3e3abe 100644 +--- a/attrib/client.c ++++ b/attrib/client.c +@@ -519,7 +519,7 @@ static const GDBusMethodTable char_methods[] = { + { GDBUS_METHOD("GetProperties", + NULL, GDBUS_ARGS({ "properties", "a{sv}" }), + get_properties) }, +- { GDBUS_METHOD("SetProperty", ++ { GDBUS_ASYNC_METHOD("SetProperty", + GDBUS_ARGS({ "name", "s" }, { "value", "v" }), NULL, + set_property) }, + { } +diff --git a/audio/control.c b/audio/control.c +index c5a6a58..187f838 100644 +--- a/audio/control.c ++++ b/audio/control.c +@@ -198,7 +198,7 @@ static DBusMessage *control_get_properties(DBusConnection *conn, + } + + static const GDBusMethodTable control_methods[] = { +- { GDBUS_ASYNC_METHOD("IsConnected", ++ { GDBUS_DEPRECATED_METHOD("IsConnected", + NULL, GDBUS_ARGS({ "connected", "b" }), + control_is_connected) }, + { GDBUS_METHOD("GetProperties", +diff --git a/audio/headset.c b/audio/headset.c +index 729e4dc..b9c6265 100644 +--- a/audio/headset.c ++++ b/audio/headset.c +@@ -2094,7 +2094,7 @@ static const GDBusMethodTable headset_methods[] = { + static const GDBusSignalTable headset_signals[] = { + { GDBUS_DEPRECATED_SIGNAL("Connected", NULL) }, + { GDBUS_DEPRECATED_SIGNAL("Disconnected", NULL) }, +- { GDBUS_DEPRECATED_SIGNAL("AnswerRequested", NULL) }, ++ { GDBUS_SIGNAL("AnswerRequested", NULL) }, + { GDBUS_DEPRECATED_SIGNAL("Stopped", NULL) }, + { GDBUS_DEPRECATED_SIGNAL("Playing", NULL) }, + { GDBUS_DEPRECATED_SIGNAL("SpeakerGainChanged", +diff --git a/audio/transport.c b/audio/transport.c +index b015625..832ad2a 100644 +--- a/audio/transport.c ++++ b/audio/transport.c +@@ -959,7 +959,7 @@ static const GDBusMethodTable transport_methods[] = { + { GDBUS_ASYNC_METHOD("Release", + GDBUS_ARGS({ "access_type", "s" }), NULL, + release ) }, +- { GDBUS_ASYNC_METHOD("SetProperty", ++ { GDBUS_METHOD("SetProperty", + GDBUS_ARGS({ "name", "s" }, { "value", "v" }), + NULL, set_property) }, + { }, +diff --git a/src/manager.c b/src/manager.c +index 385354d..7061f64 100644 +--- a/src/manager.c ++++ b/src/manager.c +@@ -207,7 +207,7 @@ static const GDBusMethodTable manager_methods[] = { + GDBUS_ARGS({ "pattern", "s" }), + GDBUS_ARGS({ "adapter", "o" }), + find_adapter) }, +- { GDBUS_ASYNC_METHOD("ListAdapters", ++ { GDBUS_DEPRECATED_METHOD("ListAdapters", + NULL, GDBUS_ARGS({ "adapters", "ao" }), + list_adapters) }, + { } +-- +1.7.7.6 + |