From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9FD1D1392EF for ; Mon, 10 Mar 2014 09:59:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 045E6E0A82; Mon, 10 Mar 2014 09:59:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F2A0BE0A6D for ; Mon, 10 Mar 2014 09:59:35 +0000 (UTC) Received: from [10.172.184.64] (85-76-50-206-nat.elisa-mobile.fi [85.76.50.206]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ssuominen) by smtp.gentoo.org (Postfix) with ESMTPSA id CBD8333DA84 for ; Mon, 10 Mar 2014 09:59:34 +0000 (UTC) Message-ID: <531D8C2F.20807@gentoo.org> Date: Mon, 10 Mar 2014 11:55:59 +0200 From: Samuli Suominen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Make udev optional in net-wireless/bluez? References: <531BD08F.1000003@gentoo.org> <1394333701.20819.5.camel@lightboat.digis.net> <531D2FDB.5080303@gentoo.org> <1394430333.22096.27.camel@lightboat.digis.net> <1394434756.22096.44.camel@lightboat.digis.net> <531D7C72.7020709@gentoo.org> In-Reply-To: <531D7C72.7020709@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: a2e2b800-5505-4745-8e64-c819501e3761 X-Archives-Hash: fb39a9b6a66800f116c00e222b208e74 On 10/03/14 10:48, Joshua Kinard wrote: > On 03/10/2014 2:59 AM, Alexandre Rostovtsev wrote: >> On Mon, 2014-03-10 at 01:45 -0400, Alexandre Rostovtsev wrote: >>> On Sun, 2014-03-09 at 23:22 -0400, Joshua Kinard wrote: >>>> On 03/08/2014 9:55 PM, Alexandre Rostovtsev wrote: >>>>> On Sat, 2014-03-08 at 21:23 -0500, Joshua Kinard wrote: >>>>>> So I want to try and play around with a particular network domination tool >>>>>> on my home network, Omphalos. However, its current configure script has a >>>>>> hard dependency on bluetooth.h, part of the net-wireless/bluez package. >>>>>> >>>>>> Currently, net-wireless/bluez has a harddep on virtual/udev, which works >>>>>> great if you use either udev or eudev. I'm using busybox's mdev instead, so >>>>>> the logic of the bluez ebuild needs some changes: >>>>> [...] >>>>>> Thoughts on this? >>>>> Does mdev have any API which is equivalent to libudev's hwdb? See >>>>> http://www.freedesktop.org/software/systemd/libudev/libudev-udev-hwdb.html >>>>> >>>>> If yes, then optimal solution would be to patch bluez to allow using >>>>> mdev's hwdb support, and get the patch upstreamed :) >>>> It's actually not a matter of the hwdb support, it's just the fact that >>>> bluez currently has a harddep on a specific device manager, either udev or >>>> eudev. >>> Bluez does not require an abstract device manager. It requires the >>> libudev library. Or rather, it requires some kind of library which >>> provides the following API: >>> >>> 1. querying hwdb (given a kernel modalias for a device, retrieve >>> corresponding oui, vendor, and model data); and >>> 2. querying the device tree (manually traversing /sys is of course >>> possible, but not very easy to do correctly, so bluez developers are >>> relying on libudev). >> And by "requires", I mean that without libudev, a variety of bluetooth >> devices and adapters will simply fail to work. >> >> So if mdev does not have some equivalent of libudev, a reasonable >> solution would probably be the following: >> >> @@ -14,19 +14,19 @@ >> LICENSE="GPL-2+ LGPL-2.1+" >> SLOT="0/3" >> KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" >> -IUSE="cups debug +obex readline selinux systemd test" >> +IUSE="cups debug +obex readline selinux systemd test +udev" >> REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" >> >> RDEPEND=" >> >=dev-libs/glib-2.28:2 >> >=sys-apps/dbus-1.6:= >> >=sys-apps/hwids-20121202.2 >> - >=virtual/udev-171 >> cups? ( net-print/cups:= ) >> obex? ( dev-libs/libical ) >> readline? ( sys-libs/readline:= ) >> selinux? ( sec-policy/selinux-bluetooth ) >> systemd? ( sys-apps/systemd ) >> + udev? ( >=virtual/udev-171 ) >> " >> DEPEND="${RDEPEND} >> virtual/pkgconfig >> @@ -46,6 +46,11 @@ >> pkg_setup() { >> enewgroup plugdev >> use test && python-any-r1_pkg_setup >> + >> + if ! use udev; then >> + ewarn "You are installing ${P} with USE=-udev. This means various bluetooth" >> + ewarn "devices and adapters from Apple, Dell, Logitech etc. will fail to work." >> + fi >> } >> >> src_prepare() { >> @@ -92,13 +97,13 @@ >> $(use_enable test) \ >> --enable-tools \ >> --enable-monitor \ >> - --enable-udev \ >> + $(use_enable udev) \ >> $(use_enable cups) \ >> $(use_enable obex) \ >> --enable-client \ >> $(use_enable systemd) \ >> $(systemd_with_unitdir) \ >> - --enable-sixaxis >> + $(use_enable udev sixaxis) >> } >> >> src_install() { >> @@ -134,7 +139,7 @@ >> pkg_postinst() { >> readme.gentoo_print_elog >> >> - udev_reload >> + use udev && udev_reload >> >> has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp." >> > Hey, this sounds like it'll work in my case :) > > I don't use bluetooth, nor udev, so the issues surrounding making udev > optional in bluez or not isn't really my concern. Making udev optional was > the easier solution than trying to figure out how to cut out the lib/ folder > from bluez and wrapping it in a separate libbluetooth package. Thought I'd > just suggest the solution to the list for input. > You know, you can have udev installed (to have libudev installed) but still run something else, like mdev It would likely still work for this case even if udevd daemon isn't running And yes, I realize it's not perfect for some embedded systems