#2527: Udev rule audit
----------------------------------------+-----------------------------------
Reporter: br...@… | Owner: lfs-b...@…
Type: task | Status: new
Priority: low | Milestone: 6.6
Component: Book | Version: SVN
Severity: minor | Keywords:
----------------------------------------+-----------------------------------
Comment(by br...@…):
> My limited box here shows /dev/snd/{control*,pcm*,timer} devices owned
by 'audio' without any rules in 55-lfs.rules.
While the 'audio' group is interesting (and you found the reason why), the
/dev/snd/* naming is what I was thinking we didn't need to set anymore.
(Which was why I started talking about never setting NAME.) If it works
without rules, the kernel must be sending the snd!controlC0 name now, or
something like that...
Ah. That's not how it works anymore, but it's close. Looking in
/sys/class/sound/controlC0/uevent shows "DEVNAME=snd/controlC0" (along
with MAJOR and MINOR); these can't be set from userspace, and must be
coming from the kernel somewhere. (Though I can't see where. Oh well.)
udev must use DEVNAME by default.
> All rules in 55-lfs.rules that set the GROUP can safely be dropped,
aside from the ISDN ones.
What about 61-cdrom.rules? Looks like the replacement will work fine with
SCSI (and libata, I think) CD drives, but probably not plain old IDE. It
depends on the "type" attribute in sysfs, which I believe is only valid
with SCSI. Doesn't look like there's anything else, but I'm not sure
since I moved to libata quite a while ago; I can't test plain-old-IDE
anymore...
(Debian seems to do what we have today in 61-cdrom.rules, FWIW: use
ENV{ID_CDROM} instead of SYSFS{type}.)
Although given the number of people not using libata, this is probably not
used enough to worry; let's just remove it and see if anyone complains.
:-)
> I don't have any ISDN devices to test this on, but I note that
40-gentoo.rules contain similar rules to ours. I wonder why they've not
been merged to the default Udev ruleset; are they really the right thing
to do?
I don't remember for sure what happened last time this one came up on
linux-hotplug; I think it only got as far as unifying the capi* devices.
And I don't know if /dev/ippp* or /dev/isdn* or /dev/dcbri* devices are
even created anymore; it's possible that all of this was yanked out to be
replaced by something different...
Hmm, looks like at least ippp* devices are used by some kind of pppd;
you'd want this if you run pppd as non-root (and it still uses those).
> I think we want to keep the RTC rules around so that the clock is set
early on
Yes.
> I can't see anything that duplicates our symlink from "/dev/input/mice"
to "/dev/mouse". Is this still required by anything?
No idea...
I *think* /dev/input/mice became the widely-accepted default around the
time people moved to kernel 2.6, where (...I *think*!) PS/2 mice moved to
the generic input subsystem, and to one of the /dev/input/mouseX nodes, as
well. So the /dev/mouse generic symlink that people used to configure
which mouse would be used by X/gpm is no longer required; /dev/input/mice
is always "all mice".
Er, except serial mice. Hmm. OTOH, if you have a serial mouse, you'll
have to change the rules to be able to use /dev/mouse anyway -- as-is, a
USB mouse will blow away any manual /dev/mouse symlink to /dev/ttyS* that
the admin made.
...
All things considered, it's probably safe to kill it.
One more comment:
> create_floppy_devices is now correct upstream; the override we have is
no longer required
This is no longer true in udev-150. Should be fixed in -151.
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2527#comment:5>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page