1 |
On 03/10/2014 2:59 AM, Alexandre Rostovtsev wrote: |
2 |
> On Mon, 2014-03-10 at 01:45 -0400, Alexandre Rostovtsev wrote: |
3 |
>> On Sun, 2014-03-09 at 23:22 -0400, Joshua Kinard wrote: |
4 |
>>> On 03/08/2014 9:55 PM, Alexandre Rostovtsev wrote: |
5 |
>>>> On Sat, 2014-03-08 at 21:23 -0500, Joshua Kinard wrote: |
6 |
>>>>> So I want to try and play around with a particular network domination tool |
7 |
>>>>> on my home network, Omphalos. However, its current configure script has a |
8 |
>>>>> hard dependency on bluetooth.h, part of the net-wireless/bluez package. |
9 |
>>>>> |
10 |
>>>>> Currently, net-wireless/bluez has a harddep on virtual/udev, which works |
11 |
>>>>> great if you use either udev or eudev. I'm using busybox's mdev instead, so |
12 |
>>>>> the logic of the bluez ebuild needs some changes: |
13 |
>>>> [...] |
14 |
>>>>> Thoughts on this? |
15 |
>>>> |
16 |
>>>> Does mdev have any API which is equivalent to libudev's hwdb? See |
17 |
>>>> http://www.freedesktop.org/software/systemd/libudev/libudev-udev-hwdb.html |
18 |
>>>> |
19 |
>>>> If yes, then optimal solution would be to patch bluez to allow using |
20 |
>>>> mdev's hwdb support, and get the patch upstreamed :) |
21 |
>>> |
22 |
>>> It's actually not a matter of the hwdb support, it's just the fact that |
23 |
>>> bluez currently has a harddep on a specific device manager, either udev or |
24 |
>>> eudev. |
25 |
>> |
26 |
>> Bluez does not require an abstract device manager. It requires the |
27 |
>> libudev library. Or rather, it requires some kind of library which |
28 |
>> provides the following API: |
29 |
>> |
30 |
>> 1. querying hwdb (given a kernel modalias for a device, retrieve |
31 |
>> corresponding oui, vendor, and model data); and |
32 |
>> 2. querying the device tree (manually traversing /sys is of course |
33 |
>> possible, but not very easy to do correctly, so bluez developers are |
34 |
>> relying on libudev). |
35 |
> |
36 |
> And by "requires", I mean that without libudev, a variety of bluetooth |
37 |
> devices and adapters will simply fail to work. |
38 |
> |
39 |
> So if mdev does not have some equivalent of libudev, a reasonable |
40 |
> solution would probably be the following: |
41 |
> |
42 |
> @@ -14,19 +14,19 @@ |
43 |
> LICENSE="GPL-2+ LGPL-2.1+" |
44 |
> SLOT="0/3" |
45 |
> KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" |
46 |
> -IUSE="cups debug +obex readline selinux systemd test" |
47 |
> +IUSE="cups debug +obex readline selinux systemd test +udev" |
48 |
> REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
49 |
> |
50 |
> RDEPEND=" |
51 |
> >=dev-libs/glib-2.28:2 |
52 |
> >=sys-apps/dbus-1.6:= |
53 |
> >=sys-apps/hwids-20121202.2 |
54 |
> - >=virtual/udev-171 |
55 |
> cups? ( net-print/cups:= ) |
56 |
> obex? ( dev-libs/libical ) |
57 |
> readline? ( sys-libs/readline:= ) |
58 |
> selinux? ( sec-policy/selinux-bluetooth ) |
59 |
> systemd? ( sys-apps/systemd ) |
60 |
> + udev? ( >=virtual/udev-171 ) |
61 |
> " |
62 |
> DEPEND="${RDEPEND} |
63 |
> virtual/pkgconfig |
64 |
> @@ -46,6 +46,11 @@ |
65 |
> pkg_setup() { |
66 |
> enewgroup plugdev |
67 |
> use test && python-any-r1_pkg_setup |
68 |
> + |
69 |
> + if ! use udev; then |
70 |
> + ewarn "You are installing ${P} with USE=-udev. This means various bluetooth" |
71 |
> + ewarn "devices and adapters from Apple, Dell, Logitech etc. will fail to work." |
72 |
> + fi |
73 |
> } |
74 |
> |
75 |
> src_prepare() { |
76 |
> @@ -92,13 +97,13 @@ |
77 |
> $(use_enable test) \ |
78 |
> --enable-tools \ |
79 |
> --enable-monitor \ |
80 |
> - --enable-udev \ |
81 |
> + $(use_enable udev) \ |
82 |
> $(use_enable cups) \ |
83 |
> $(use_enable obex) \ |
84 |
> --enable-client \ |
85 |
> $(use_enable systemd) \ |
86 |
> $(systemd_with_unitdir) \ |
87 |
> - --enable-sixaxis |
88 |
> + $(use_enable udev sixaxis) |
89 |
> } |
90 |
> |
91 |
> src_install() { |
92 |
> @@ -134,7 +139,7 @@ |
93 |
> pkg_postinst() { |
94 |
> readme.gentoo_print_elog |
95 |
> |
96 |
> - udev_reload |
97 |
> + use udev && udev_reload |
98 |
> |
99 |
> has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp." |
100 |
> |
101 |
|
102 |
Hey, this sounds like it'll work in my case :) |
103 |
|
104 |
I don't use bluetooth, nor udev, so the issues surrounding making udev |
105 |
optional in bluez or not isn't really my concern. Making udev optional was |
106 |
the easier solution than trying to figure out how to cut out the lib/ folder |
107 |
from bluez and wrapping it in a separate libbluetooth package. Thought I'd |
108 |
just suggest the solution to the list for input. |
109 |
|
110 |
-- |
111 |
Joshua Kinard |
112 |
Gentoo/MIPS |
113 |
kumba@g.o |
114 |
4096R/D25D95E3 2011-03-28 |
115 |
|
116 |
"The past tempts us, the present confuses us, the future frightens us. And |
117 |
our lives slip away, moment by moment, lost in that vast, terrible in-between." |
118 |
|
119 |
--Emperor Turhan, Centauri Republic |