1 |
On Wed, Mar 14, 2012 at 12:03 PM, Pandu Poluan <pandu@××××××.info> wrote: |
2 |
> |
3 |
> On Mar 15, 2012 12:25 AM, "Canek Peláez Valdés" <caneko@×××××.com> wrote: |
4 |
>> |
5 |
> |
6 |
> ---- >8 snip |
7 |
> |
8 |
>> |
9 |
>> That if I connect a USB wi-fi dongle, and it appears with the name |
10 |
>> wlan23, I want *every* time that dongle to have the wlan23 name .Good |
11 |
>> luck doing that without a database. |
12 |
>> |
13 |
> |
14 |
> That could -- should -- be handled by a script or a program that looks up |
15 |
> the database, do the checks, and rename the node accordingly. |
16 |
> |
17 |
> All the device manager got to do is to plug in into the hotplug kernel knob, |
18 |
> whereby it will be invoked on every hotplug event, and depending on the |
19 |
> nature if the device (which, in your example, fits the pattern "wlan*") |
20 |
> fires the script/program which performs the lookup+rename part. |
21 |
> |
22 |
> mdev can do that. |
23 |
|
24 |
udev already does it. |
25 |
|
26 |
>> Bluetooth keyboards. Done, you made my system unbootable when I need |
27 |
>> to run fsck by hand after a power failure. |
28 |
>> |
29 |
> |
30 |
> Put it under /bin |
31 |
> |
32 |
> Done. |
33 |
|
34 |
Yeah, right. And put LVM2 binaries in /bin. And wpa_supplicant (maybe |
35 |
I need a wireless connected NFS share). And... |
36 |
|
37 |
Not scalable. Doesn't solve the general case. You are seeing too small. |
38 |
|
39 |
>> Alan, the "vast majority" of Linux users right now are phone users. |
40 |
>> That was my initial point some mails ago. What *you* believe are |
41 |
>> "regular" users (people like you, or maybe even me), stopped being |
42 |
>> true a couple of years ago. The days of the Unix admin and workstation |
43 |
>> user are going the way of the dodo. |
44 |
>> |
45 |
>> At least, that's how I see it. |
46 |
>> |
47 |
> |
48 |
> The vast majority of Linux users, be they using PCs or smartphones, only |
49 |
> need a mechanism to handle hotplugs. |
50 |
> |
51 |
> udev can do it, but so can mdev (with the help of helper scripts/programs). |
52 |
|
53 |
udev can do it *right now*, no hacks involved. Go and hack mdev until |
54 |
it handles *ALL* the cases udev handles, and see how complex it gets. |
55 |
|
56 |
>> Again, think about phones. And tablets. And TVs. And |
57 |
>> [insert-here-cool-gadgets-from-the-future]. |
58 |
>> |
59 |
> |
60 |
> See above. |
61 |
> |
62 |
>> No, it's not a matter of "that's the way forward". It's a matter of |
63 |
>> trying to solve the general problem. And since the general solution |
64 |
>> also solves the simple cases, I don't see a reason to waste my |
65 |
>> time/resources in a solution that in the end will not solve the |
66 |
>> general problem. |
67 |
>> |
68 |
> |
69 |
> It will always be simpler -- and easier to debug -- if we separate the |
70 |
> hotplug handler (whose function is merely to create a dev node with the |
71 |
> proper permissions and (optionally) fire up a 'configurator') from the |
72 |
> configurator itself. |
73 |
|
74 |
Been there, tried that. What do you think devfs was? We tried this |
75 |
path already: it doesn't work, it doesn't scale. You couple together |
76 |
the device manager and the database handling and the firing of |
77 |
associated scripts because that's the technical correct solution. It |
78 |
*is* more complex, for sure, but so it's the general problem we are |
79 |
trying to solve. |
80 |
|
81 |
> udev is going the kitchen sink route. mdev stays the lego brick path. |
82 |
|
83 |
And guess what? I don't want a toy solution built with lego blocks. I |
84 |
want a robust, general solution, that it is bound to work *now* and in |
85 |
the future. |
86 |
|
87 |
>> Of course, as I have been saying from the beginning, this is |
88 |
>> OpenSource. Want to pour some effort into solving the simple cases |
89 |
>> that will not help all the community, and that it will only help in |
90 |
>> fact a minority, that's your prerogative (and Walt's, and Vapier's, |
91 |
>> and everyone else that don't like the "complex" but complete |
92 |
>> solution). Go nuts with it if you want. |
93 |
>> |
94 |
> |
95 |
> The code is there; it's called mdev. But your emails are nothing short of |
96 |
> denigrating the code. |
97 |
|
98 |
It's not my intention to "denigrate" anything. Just stating my opinion. |
99 |
|
100 |
> Talk about double standards :-) |
101 |
|
102 |
When I hear Walt saying that mdev handles GNOME/KDE/XFCE/LVM2, you may |
103 |
say that. Right *now*, Walt says mdev doesn't handle those cases. |
104 |
|
105 |
>> But please don't dismiss the general solution as "unnecessary" complex |
106 |
>> when it's not the case, and don't think that the "simple" setups |
107 |
>> (whatever that means) are the majority. Again, think phones and |
108 |
>> tablets: those *are* the majority. |
109 |
>> |
110 |
> |
111 |
> Again, see above. |
112 |
> |
113 |
>> Oh, for sure you can modify LVM2 to work under mdev. Also |
114 |
>> GNOME/KDE/XFCE, and everything under the sun. You have the source; you |
115 |
>> can do *anything* you want with it. |
116 |
>> |
117 |
>> But the effort wasted^^^^^Hpoured in that excercise will only serve a |
118 |
>> handful of users, and it will be never accepted upstream, because |
119 |
>> upstream is (rightfully) concerned with the general problem. |
120 |
>> |
121 |
> |
122 |
> And as I have explained, based on what Alan had posted, LVM2 (for an |
123 |
> example) probably only needs certain device nodes to exist, while mdev's |
124 |
> default behavior is to not change anything unless explicitly told. |
125 |
> |
126 |
> Solvable easily, IMO. |
127 |
|
128 |
Go and solve it then. I will keep using udev, which works right now, thank you. |
129 |
|
130 |
>> I'm more interested in the general solution that will work not only |
131 |
>> for my current machines, but also for the ones I'm planning to have in |
132 |
>> the future. I'm dying to get a tablet where I can put GNOME 3 on it; I |
133 |
>> can bet you another beer that mdev will be not enough to handle that. |
134 |
>> |
135 |
> |
136 |
> Unfortunately I don't have any Gentoo with GUI, so I can't take up on your |
137 |
> offer :-( |
138 |
> |
139 |
>> With all due respect, Alan (and this is completely sincere, in this |
140 |
>> list you are of the guys I respect the most), I believe you are |
141 |
>> thinking too small. |
142 |
>> |
143 |
> |
144 |
> With all due respect, I believe *you* are too defensive in regards to udev. |
145 |
|
146 |
I'm not defending anything; just stating my opinion. You are free to |
147 |
disagree, of course. |
148 |
|
149 |
>> Right now Linux runs in my phone, my TV's, my routers and every |
150 |
>> computer I own. I have a couple of Windows installations, which I use |
151 |
>> once or twice every three months (I ported a PyGTK program to Windows |
152 |
>> last week, so I had to boot into Windows for the first time this |
153 |
>> year). I want Linux running on *everything*, and what is more: I don't |
154 |
>> want android in my handhelds, I want the full GNOME experience. |
155 |
>> |
156 |
>> To accomplish that we need udev; mdev it's just not enough. |
157 |
>> |
158 |
> |
159 |
> Again, not necessarily. What exactly in Gnome requires udev? Is it merely |
160 |
> expecting some device nodes to exist while mdev's default behavior doesn't |
161 |
> do that? That would be simple to solve. |
162 |
|
163 |
Go and code if it's really easy and simple and doable. Me? I will |
164 |
stick with udev, 'cause it works. And it works *right now*, in all my |
165 |
use cases and even some I don't plan to have in the near future. |
166 |
|
167 |
> A bit more difficult is if Gnome communicates with udev via libudev; but |
168 |
> busybox devs have looked into the code of libudev, and found that the |
169 |
> functions provided by that lib is can be emulated relatively quickly [1]. |
170 |
> But he then added that he won't do that, because that would make busybox too |
171 |
> complex. |
172 |
> |
173 |
> [1] http://lists.busybox.net/pipermail/busybox/2011-September/076689.html |
174 |
> |
175 |
> Again, it's a matter of perspective. We can work around the problem by |
176 |
> having the emulated libudev call mdev indirectly via an "mdev helper |
177 |
> program", thus not needing mdev to be a kitchen sink. |
178 |
> |
179 |
> In fact, a post [2] slightly tangential to the thread of the above post, did |
180 |
> just that: provide a way for mdev to be able to link onto netlink without |
181 |
> having to make mdev a daemon. |
182 |
> |
183 |
> [2] http://lists.busybox.net/pipermail/busybox/2011-September/076740.html |
184 |
|
185 |
You keep saying is easy/simple/doable; code talks. Right now, the guy |
186 |
doing some coding and not only talking (Walter) says |
187 |
GNOME/KDE/XFCE/LVM2 doesn't work with mdev. *Maybe* they could be made |
188 |
to work with mdev, but someone has to actually *write the code* for |
189 |
that to happen. Until then, talking is easy. |
190 |
|
191 |
Right now, mdev is not enough, period. Maybe we can (as you yourself |
192 |
say) "work around" the "problem", but that is work that someone has to |
193 |
do. |
194 |
|
195 |
If someone is willing (and able) to do it, good for him/she/them. I'm |
196 |
sticking with udev, and if at some point mdev does everything udev |
197 |
does right now, I again bet a beer that the first would be as complex |
198 |
as the second. |
199 |
|
200 |
Regards. |
201 |
-- |
202 |
Canek Peláez Valdés |
203 |
Posgrado en Ciencia e Ingeniería de la Computación |
204 |
Universidad Nacional Autónoma de México |