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 |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-wireless/bluez')
12 files changed, 579 insertions, 0 deletions
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest new file mode 100644 index 000000000000..8f2f4ab15546 --- /dev/null +++ b/net-wireless/bluez/Manifest @@ -0,0 +1,14 @@ +AUX 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch 1907 SHA256 4c07ccb23953e83d805b8b0c726a08121dc17deb26f7571bca32dfafe7bd2881 SHA512 17a0967ac291be3822e2be73912ab4c1720564bdce0765582e54bc0347d0477d38f82dbf0db9d660f982c35b3c2ea13dd37b22e18223d36745306c4c9d859423 WHIRLPOOL 67a3ab27c5f6bb15894f1fb55c9947fd97c9e64c380fe0f52540887c12f7052d54b34c2cbda3f62bcf27888c2400ddac9b239a138383f74ad28616aebefdae84 +AUX 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch 1252 SHA256 86e3d24527f44c5a225e6d92457be52026481a7ac0d7944700ef4445d8afc8b4 SHA512 774f1d9cd49dd3fc0e9f02ad93876c59d78f88f149591f384cf5d2e3541d237ce390552c8bc2cb4d4ad7e5dcc295df49220565f0b0e686a2f8b3404f68323d32 WHIRLPOOL a88e1a061ed3989251a7e350e5a2f44b3d83ca388456652e28408a37e474e6afbd3b48e25b0ebc27b90e515d62987bac05a99087d5fe337ab2ec245c2d4edd3c +AUX 0002-autopair-Don-t-handle-the-iCade.patch 1412 SHA256 219c595ea7d022abc70221f99861815b248c46f45eef66006e7a77a0c9bd8911 SHA512 7911d0461a2720a083369c03038d6a6c69218756733c72f79eccd2e13821ecdba30649cd38a5e2427e1b79473809610020bd16a6aab55b35ac4136319c5832b3 WHIRLPOOL b9e7f4dbb48bde12259d75a3a4e65d1284415a70047776f52588c795ed7216c634b31b559545425dcd44b41454327ce50bd95289be5bb94132e6ed245c2bfa97 +AUX 0004-agent-Assert-possible-infinite-loop.patch 583 SHA256 7164b3c2e759336f926210b923b917ee5b3098024fd7a46d39cfe0c0e463ddb3 SHA512 f3af46b27180f500c3f978799633b7a01a9d7720eafdb7a9fb108684161616b976b42d135a2358785830c26642ef7c2175d0f1fa3d6df898fe3bd5e77f6a191d WHIRLPOOL 4c6ecb787db4e3922652433940e734de9c1755be9cd73a27cd0e1b62ca470c76962fef666aff1b2932e306772b5879f34bae366619bb173ae1f92a0cfeff5e3f +AUX bluetooth-init.d-r4 283 SHA256 7fef67f1f0965aa08fd65408d2cd8c3fcefaec0ef627a2a0e1f1372c15e011b2 SHA512 155ec9c0deb82b1fc2218a0d23297ea1390b1ce0bcfffaf4b5ffbf5ee13fe4179b763edfcc6dec48c7a731a852d5307966090f35cc5caf28bbb8bee7dd01714a WHIRLPOOL 3d5c40c61b4830d47a4925f22f100af9477becae9482c5c7cc89a14e21e88854b1e847a694e8acd9c67a0b675885dba10357ef3ece686f7a0dda0dcac2f8cf9d +AUX bluez-5.39-systemd-quote.patch 1298 SHA256 cde26bd9fe5c2abea0f770588bb0d39b9ed3e2d5069feb34ed5d37508345a9dd SHA512 a31a93934b3ad5d55633ab8ac0878f3cd8bda0ca7836a8912b444f88fe8c71183d25a6e3f36d962cc68da6d2776837b4bf660efb17d379c4003a092c313e69ba WHIRLPOOL 61f9b5dc79c8ecd99d52a6e0ae1729277b35ca4d5c8e27268fdb5e587487904c667b65b789c97cdebc6066e159b852915f45e4f4a0b81c009c9aafe1b0d71903 +AUX bluez-plugdev.patch 469 SHA256 ec3f06f24f530574edf5eef308afcf16bb7e0a88336a454a0b24698d2491f5f2 SHA512 b7e23b6f52e6f638e6d5deed4e901136c40bc1cbfb302ada8d85873e1792b4e3605802a2c5f786d5d6d53bf4651fc5b611396aaafe5eff90578650c448a5a7a2 WHIRLPOOL 6364590d80d811e55e2f696ba0b57c0173bac859e69de284bbcc3b511c7ea639d48dd7451e5a4abe8746b8c0986867cb680b291880e6a6ada03004e0c72c2583 +AUX bluez-udevadm-path.patch 568 SHA256 894f3e8ae0088b07687cebe54130bdf228a37717c652a0ec9ec2e76a58ca7eaf SHA512 a1af572809ec71a1796ec66fa1d2fcea6fb7624bdb9a629791707b182310bf41d1a109cc19e0fe034f4b4ae5e5816d809ece2eb4410e7f47827ec1b86c82b3a1 WHIRLPOOL 06f187a6deb3f1775dab4f300adfdf70b5a28cb7574f462ee48e8285ab3a24d51e061d20988e4705a472d3c89997c6ca868b3e2dfb3575cd4530f0da3801672a +AUX rfcomm-init.d-r2 546 SHA256 0bd7f4a3e05c781f4cd24ef7d6702fbd7e621100bcd1e281f0ee15bb134f96b5 SHA512 bcbb6a78c4c25ad797dc1d45180382909a052e9be32439eec85772082a01799f45181e8a90be89b952a68b7276f6ac1cef98fc3f4d0a5e5c8075089a29f3ddd1 WHIRLPOOL 8e4eb7d2b0f170f356fecebfeeb402cf4c959e3af1e1367415205a55d7aa0312194463ae282da77345bd486f2a59650a8cd4784170446cf3edd811ec429f4461 +DIST bluez-5.47.tar.xz 1718920 SHA256 cf75bf7cd5d564f21cc4a2bd01d5c39ce425397335fd47d9bbe43af0a58342c8 SHA512 86fa1baae1593d4824038db8418358b0be624c81fc23ee8f96ec08979d309a2377be3924ab53cc0fcb712aec8e696360e9a9f4de4c12cc31b14de5cf495a11a6 WHIRLPOOL c3b2999ea73804f905b81222db9e5f3df0e9b3b7b4ed888a9b7ce760f831c335080ef35368b62d837f2d2d1695cf18d845a1259bb6d76ee8d6ff17b5197abf01 +EBUILD bluez-5.47-r1.ebuild 8003 SHA256 1ab0e6930ab65880ea8cdd18677bae2c74424e095ab11e2a0f2492da9e0f82d7 SHA512 e307de7b0805f1d37755ae1355a25f993ac1e870bdc0276e582e66f26a7916c0cd829cceb185796930ecb95ea26b8c74c45f6bf8c47673b90ff922eb72fe2baf WHIRLPOOL e2c1668190698766d874c8adad6f445d3452d6195480757342871a2b6093d76fb9a1fd3095880ec101ca85fa59e24cfc61715ef6c664956d43757518ca399876 +MISC ChangeLog 12931 SHA256 2329a3cb5c3ff5a5780c2e9a31fc9ace98a9bd8ce5d22df582f93a9add0b8d6a SHA512 0e4a8c4e4092746afd813e120d7a7db3706b4e0b1169e5a27cdd3a94c92d749e5006c35881c1909dba09f20bc0f176d5d7516e4ddbe3c3f5b4ba69cda194ec94 WHIRLPOOL 986e5e6b816aec7a3e7a812a45200ea4b35e3f98f1931f2ae0a79695859bb9cc8a04cceaba55b620d94e6d8bdf98a03db023bdaf0d29ac4a3c857376692a3303 +MISC ChangeLog-2015 42901 SHA256 46a801bbfd319232fec0bd53a826e6ea4792686acf33861ea7032fbefedeb6d2 SHA512 023aa473651be01f4418c7e27619e06c17869937cf77ba594afc097327d5f55e5feb5701ae29e61d662b0fa657a15a634b2040f1bc886683f176e1929a80e7b9 WHIRLPOOL 8630f6e9943f7aea483dc3f49a8ff51e21661ef127d59c1f0c6e33980a2324a3cd03cd121ed8ca8df1d5e2d9dc756b6a9792cf845c1506aeb82b33dc3c99c21c +MISC metadata.xml 1123 SHA256 fb86631ceabe4f37e7f3bb7d190550ef18e8529f3005f25e2932fbf9b5a1efa8 SHA512 be4e0c9c8e589d9c2c1f1f8bc2119da6239d726201ce35979996a6364b02fae8782a9b44742a601e14342eb1501734d68b032bceb26d1f2628782dc9ab5d7f93 WHIRLPOOL 6e3c1849549297f6dba99baeec1fcb03c7cfddf19bed2143ea7541b16c526bed49d26a6d2c3f42597c092558a75bc6952c3a2c9bfadd22e50d915dbf3c4a38ac diff --git a/net-wireless/bluez/bluez-5.47-r1.ebuild b/net-wireless/bluez/bluez-5.47-r1.ebuild new file mode 100644 index 000000000000..43945ba07db2 --- /dev/null +++ b/net-wireless/bluez/bluez-5.47-r1.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit autotools ltprune multilib python-single-r1 readme.gentoo-r1 systemd udev user multilib-minimal + +DESCRIPTION="Bluetooth Tools and System Daemons for Linux" +HOMEPAGE="http://www.bluez.org" +SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz" + +LICENSE="GPL-2+ LGPL-2.1+" +SLOT="0/3" +KEYWORDS="amd64 arm ~arm64 hppa ~mips ppc ppc64 x86" +IUSE="alsa cups doc debug deprecated extra-tools experimental +mesh +obex +readline selinux systemd test test-programs +udev user-session" + +# Since this release all remaining extra-tools need readline support, but this could +# change in the future, hence, this REQUIRED_USE constraint could be dropped +# again in the future. +REQUIRED_USE=" + extra-tools? ( deprecated readline ) + test? ( ${PYTHON_REQUIRED_USE} ) + test-programs? ( ${PYTHON_REQUIRED_USE} ) + user-session? ( systemd ) +" + +CDEPEND=" + >=dev-libs/glib-2.28:2[${MULTILIB_USEDEP}] + >=sys-apps/dbus-1.6:=[user-session=] + >=sys-apps/hwids-20121202.2 + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups:= ) + mesh? ( + dev-libs/json-c:= + sys-libs/readline:0= ) + obex? ( dev-libs/libical:= ) + readline? ( sys-libs/readline:0= ) + systemd? ( sys-apps/systemd ) + udev? ( >=virtual/udev-172 ) +" +TEST_DEPS="${PYTHON_DEPS} + >=dev-python/dbus-python-1[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] +" + +DEPEND="${CDEPEND} + virtual/pkgconfig + test? ( ${TEST_DEPS} ) +" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-bluetooth ) + test-programs? ( ${TEST_DEPS} ) +" +DOC_CONTENTS=" + If you want to control your bluetooth devices as a non-root user, + please remember to add you to plugdev group. + + If you want to use rfcomm as a normal user, you need to add the user + to the uucp group. +" + +PATCHES=( + # Use static group "plugdev" to not force people to become root for + # controlling the devices. + "${FILESDIR}"/bluez-plugdev.patch + + # Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844) + # http://www.spinics.net/lists/linux-bluetooth/msg58739.html + "${FILESDIR}"/bluez-udevadm-path.patch + + # build: Quote systemd variable names, bug #527432 + # http://article.gmane.org/gmane.linux.bluez.kernel/67230 + "${FILESDIR}"/bluez-5.39-systemd-quote.patch + + # Fedora patches + # http://www.spinics.net/lists/linux-bluetooth/msg40136.html + "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch + + # http://www.spinics.net/lists/linux-bluetooth/msg41264.html + "${FILESDIR}"/0002-autopair-Don-t-handle-the-iCade.patch + + # ??? + "${FILESDIR}"/0004-agent-Assert-possible-infinite-loop.patch +) + +pkg_setup() { + enewgroup plugdev + + if use test || use test-programs; then + python-single-r1_pkg_setup + fi + + if ! use udev; then + ewarn + ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth" + ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work," + ewarn "and hid2hci will not be available." + ewarn + fi +} + +src_prepare() { + default + + # http://www.spinics.net/lists/linux-bluetooth/msg38490.html + ! use user-session && eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch + + if use cups; then + sed -i \ + -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \ + Makefile.{in,tools} || die + fi + + # Broken test https://bugzilla.kernel.org/show_bug.cgi?id=196621 + sed -i -e '/unit_tests += unit\/test-gatt\b/d' Makefile.am || die + + eautoreconf + + multilib_copy_sources +} + +multilib_src_configure() { + local myconf=( + # readline is automagic when client is enabled + # --enable-client always needs readline, bug #504038 + # --enable-mesh is handled in the same way + ac_cv_header_readline_readline_h=$(multilib_native_usex readline) + ac_cv_header_readline_readline_h=$(multilib_native_usex mesh) + ) + + if ! multilib_is_native_abi; then + myconf+=( + # deps not used for the library + {DBUS,GLIB}_{CFLAGS,LIBS}=' ' + ) + fi + + econf \ + --localstatedir=/var \ + --disable-android \ + --enable-datafiles \ + --enable-experimental \ + --enable-optimization \ + $(use_enable debug) \ + --enable-pie \ + --enable-threads \ + --enable-library \ + --enable-tools \ + --enable-manpages \ + --enable-monitor \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ + $(multilib_native_use_enable alsa midi) \ + $(multilib_native_use_enable cups) \ + $(multilib_native_use_enable deprecated) \ + $(multilib_native_use_enable experimental) \ + $(multilib_native_use_enable mesh) \ + $(multilib_native_use_enable obex) \ + $(multilib_native_use_enable readline client) \ + $(multilib_native_use_enable systemd) \ + $(multilib_native_use_enable test-programs test) \ + $(multilib_native_use_enable udev) \ + $(multilib_native_use_enable udev sixaxis) +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake -f Makefile -f - libs \ + <<<'libs: $(lib_LTLIBRARIES)' + fi +} + +multilib_src_test() { + multilib_is_native_abi && default +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + + # Only install extra-tools when relevant USE flag is enabled + if use extra-tools; then + ewarn "Upstream doesn't support using this tools and their bugs are" + ewarn "likely to be ignored forever, also that tools can break" + ewarn "without previous announcement." + ewarn "Upstream also states all this tools are not really needed," + ewarn "then, if you still need to rely on them, you must ask them" + ewarn "to either install that tool by default or add the needed" + ewarn "functionality to the existing 'official' tools." + ewarn "Please report this issues to:" + ewarn "http://www.bluez.org/development/lists/" + + # Upstream doesn't install this, bug #524640 + # http://permalink.gmane.org/gmane.linux.bluez.kernel/53115 + # http://comments.gmane.org/gmane.linux.bluez.kernel/54564 + # gatttool is only built with readline, bug #530776 + dobin attrib/gatttool + dobin tools/btmgmt + fi + + # Unittests are not that useful once installed, so make them optional + if use test-programs; then + # example-gatt-client is the only one needing + # python3, the others are python2 only. Remove + # until we see how to pull in python2 and python3 + # for runtime + rm "${ED}"/usr/$(get_libdir)/bluez/test/example-gatt-server || die + rm "${ED}"/usr/$(get_libdir)/bluez/test/example-gatt-client || die + python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test + for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do + dosym "${i}" /usr/bin/bluez-"${i##*/}" + done + fi + else + emake DESTDIR="${D}" \ + install-includeHEADERS \ + install-libLTLIBRARIES \ + install-pkgconfigDATA + fi +} + +multilib_src_install_all() { + # We need to ensure obexd can be spawned automatically by systemd + # when user-session is enabled: + # http://marc.info/?l=linux-bluetooth&m=148096094716386&w=2 + # https://bugs.gentoo.org/show_bug.cgi?id=577842 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804908 + # https://bugs.archlinux.org/task/45816 + # https://bugzilla.redhat.com/show_bug.cgi?id=1318441 + # https://bugzilla.redhat.com/show_bug.cgi?id=1389347 + use user-session && ln -s "${ED}"/usr/lib/systemd/user/obex.service "${ED}"/usr/lib/systemd/user/dbus-org.bluez.obex.service + + prune_libtool_files --modules + + keepdir /var/lib/bluetooth + + # Upstream don't want people to play with them + # But we keep installing them due to 'historical' reasons + insinto /etc/bluetooth + local d + for d in input network; do + doins profiles/${d}/${d}.conf + done + doins src/main.conf + + newinitd "${FILESDIR}"/bluetooth-init.d-r4 bluetooth + newinitd "${FILESDIR}"/rfcomm-init.d-r2 rfcomm + + einstalldocs + use doc && dodoc doc/*.txt + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + use udev && udev_reload + systemd_reenable bluetooth.service + + has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp." +} 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 $? +} diff --git a/net-wireless/bluez/metadata.xml b/net-wireless/bluez/metadata.xml new file mode 100644 index 000000000000..45d6538bf366 --- /dev/null +++ b/net-wireless/bluez/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>pacho@gentoo.org</email> + <name>Pacho Ramos</name> + </maintainer> +<use> + <flag name="deprecated">Build deprecated plugins</flag> + <flag name="experimental">Build experimental plugins</flag> + <flag name="extra-tools">Install tools that upstream doesn't install on + purpose by default. All this tools shouldn't be used. Then, please + notify upstream about you still need them to let them know the + situation.</flag> + <flag name="mesh">Add support for Bluetooth Mesh control application and advertising + bearer.</flag> + <flag name="obex">Enable OBEX transfer support.</flag> + <flag name="test-programs">Install tools for testing of + various Bluetooth functions</flag> + <flag name="user-session">Allow compatibility with user-session semantics for session bus under systemd</flag> +</use> +<upstream> + <remote-id type="cpe">cpe:/a:bluez:bluez</remote-id> + <remote-id type="cpe">cpe:/a:bluez:bluez-libs</remote-id> +</upstream> +</pkgmetadata> |