Moving Ubuntu to upstream udev rules (Part 2)
Have now resync'd with the changes confirmed in the last thread, which leaves just a handful of other bits (some of which mentioned before, some of which I found in the later audit).
(Any differences I don't mention here, I'm happy to drop in favour of upstream without further discussion.)
rules/rules.d/50-udev-default.rules:
- KERNEL=="raw1394*", GROUP="video"
This will still be difficult for me to upload with ;)
- SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n"
+ SUBSYSTEM=="block", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="%k"
I still think we have this round the right way! :-)
- KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
- MODE="0660", OPTIONS+="last_rule"
- KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
- MODE="0660", OPTIONS+="last_rule"
- KERNEL=="ptmx", GROUP="tty", MODE="0666", \
- OPTIONS+="last_rule"
- KERNEL=="tty", GROUP="tty", MODE="0666", \
- OPTIONS+="last_rule"
- KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", \
- OPTIONS+="last_rule"
- KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", \
- OPTIONS+="last_rule"
- KERNEL=="console", MODE="0600", OPTIONS+="last_rule"
+ KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
+ MODE="0660",
+ KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
+ MODE="0660",
+ KERNEL=="ptmx", GROUP="tty", MODE="0666" + KERNEL=="tty", GROUP="tty", MODE="0666" + KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620",
+ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty",
+ KERNEL=="console", MODE="0600"
last_rule on these prevents us from setting the console font or keymap from udev rules, and prevents us from activating console-related things (getty, brltty, etc.) from Upstart
you said it was only there because of the legacy ptys, which we've both disabled now?
- KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+ KERNEL=="tun", NAME="net/%k"
The mode seems rather permissive? Do you really allow any user to make tunnels by default? (Ours is 0600!)
Isn't the ignore_remove already handled by the /lib/udev/devices check? Our /dev/net/tun is in there.
- KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove"
+ KERNEL=="ppp", MODE="0600"
ignore_remove already handled by /lib/udev/devices check?
- KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640" + KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+ KERNEL=="nvram", GROUP="nvram", MODE="0640"
We have the nvram group, no idea why, we just do ;)
- SUBSYSTEM=="block", GROUP="disk"
+ SUBSYSTEM=="block", ATTRS{removable}!="1", GROUP="disk"
+ SUBSYSTEM=="block", ATTRS{removable}=="1", GROUP="floppy"
We put removable block devices in the floppy group, you leave them in disk? (But use the floppy group for real floppies?)
- KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640"
+ SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk", MODE="0640"
+ SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom", MODE="0640"
- KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
+ KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
# eep, needs cdrom_id run earlier (we ran it at 30-* before)
+ ENV{ID_CDROM}=="?*", GROUP="cdrom"
We put CD-ROM drives and similar into the cdrom group, not disk.
+ SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
- KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" + KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
- KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" + KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="tape"
- KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|
nrawqft[0-9]*", GROUP="disk"
+ KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|
nrawqft[0-9]*", GROUP="tape"We put tape drives and similar into the tape group, not disk.
rules/rules.d/80-drivers.rules:
- SUBSYSTEM=="module", KERNEL=="parport_pc", \
- RUN+="/sbin/modprobe -b ppdev"
We don't have this one? What's this for? Is a module missing a dependency?
rules/packages/40-alsa.rules:
KERNEL=="mixer0", SYMLINK+="mixer"
KERNEL=="dsp0", SYMLINK+="dsp"
KERNEL=="audio0", SYMLINK+="audio" Which kernel module/ALSA version creates these? Here I can only see /dev/mixer, /dev/dsp and /dev/audio as devices in their own right. Does a later ALSA version enumerate them, or were these added just in case?
+ SUBSYSTEM=="sound", GROUP="audio"
And we have an "audio" group for them.
rules/packages/40-isdn.rules:
- SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
+ GROUP="uucp"
What uses the /dev/isdn/capi20 symlink? We've never had that, and I've never had any bug reports.
We have a "dialout" group, which we seem to use everywhere you use "uucp". I think that we inherited this from Debian: Marco, do these differences match your rules?
It may make sense for these to be a Debian/Ubuntu diff, or a configure argument?
rules/rules.d/50-udev-default.rules:
- KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" + KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="dialout"
- KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp"
+ KERNEL=="mwave", NAME="modems/mwave", GROUP="dialout"
- KERNEL=="hvc*|hvsi*", GROUP="uucp" + KERNEL=="hvc*|hvsi*", GROUP="dialout"
+ SUBSYSTEM=="slamr", GROUP="dialout"
+ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
+ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
+ MODE="0660", GROUP="dialout"
rules/packages/40-isdn.rules:
- SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
+ SYMLINK+="isdn/capi20", GROUP="dialout"
rules/packages/40-zaptel.rules:
+ SUBSYSTEM=="zaptel", GROUP="dialout"
(or just the GROUP= tagged onto the other rules for consistency)
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Quoted 10 lines · Scott James Remnant
Have now resync'd with the changes confirmed in the last thread, which leaves just a handful of other bits (some of which mentioned before, some of which I found in the later audit).
(Any differences I don't mention here, I'm happy to drop in favour of upstream without further discussion.)
rules/rules.d/50-udev-default.rules:
- KERNEL="raw1394*", GROUP="video"
Hmm, I removed that already, and replied to your other mail:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h¨cf7cf2c7b4c41c14508a808b09a5fa9256a024
Quoted 6 lines
This will still be difficult for me to upload with ;)
- SUBSYSTEM="block", KERNEL="sr[0-9]*", SYMLINK+="scd%n"
+ SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="%k"I still think we have this round the right way! :-)
devices.txt is in no way "right" for everything, that section is from the 2.4 days, and may not mean anything today. I'll wait for the SCSI guys to tell. We should not switch names if there will never be a scd* device in the kernel, because that would mean that sr* is the default, and scd* is the legacy. I'll come back as soon as I got an answer.
Quoted 20 lines
- KERNEL="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
- MODE="0660", OPTIONS+="last_rule"
- KERNEL="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
- MODE="0660", OPTIONS+="last_rule"
- KERNEL="ptmx", GROUP="tty", MODE="0666", \
- OPTIONS+="last_rule"
- KERNEL="tty", GROUP="tty", MODE="0666", \
- OPTIONS+="last_rule"
- KERNEL="tty[0-9]*", GROUP="tty", MODE="0620", \
- OPTIONS+="last_rule"
- KERNEL="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", \
- OPTIONS+="last_rule"
- KERNEL="console", MODE="0600", OPTIONS+="last_rule"
+ KERNEL="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
+ MODE="0660",
+ KERNEL="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
+ MODE="0660",+ KERNEL="ptmx", GROUP="tty", MODE="0666" + KERNEL="tty", GROUP="tty", MODE="0666" + KERNEL="tty[0-9]*", GROUP="tty", MODE="0620",
Quoted 6 lines
+ KERNEL="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty",
+ KERNEL="console", MODE="0600"
last_ruleon these prevents us from setting the console font or keymap from udev rules, and prevents us from activating console-related things (getty, brltty, etc.) from Upstart
Removed "last_rule".
Quoted 2 lines
you said it was only there because of the legacy ptys, which we've both disabled now?
We set them to 0, and they can be requested on the boot command line. We have not heard anyone using it so far. Here is the option:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/kernel-parameters.txt;hàf346d201edb70fae654c55f6be842c4465a5ff;hb=HEAD#l1808
Quoted 5 lines
- KERNEL="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+ KERNEL="tun", NAME="net/%k"The mode seems rather permissive? Do you really allow any user to make tunnels by default? (Ours is 0600!)
Hmm, I don't know. I see Ubuntu users complaining on the net, who use virtualization not running as root. But if it's unsafe we should change that.
Quoted 2 lines
Isn't the
ignore_removealready handled by the/lib/udev/devicescheck? Our/dev/net/tunis in there.
Yeah, because it sets NAME= earlier to place it in the subdirectory. The current check only covers devices which have NAME= set.
Quoted 4 lines
- KERNEL="ppp", MODE="0600", OPTIONS+="ignore_remove"
+ KERNEL="ppp", MODE="0600"
ignore_removealready handled by/lib/udev/devicescheck?
ppp is not set by NAME=. I've added this, which should do it:
ACTION="remove", NAME="", \
TEST="/lib/udev/devices/%k", OPTIONS+="ignore_remove"Quoted 5 lines
- KERNEL="mem|kmem|port|nvram", GROUP="kmem", MODE="0640" + KERNEL="mem|kmem|port", GROUP="kmem", MODE="0640"+ KERNEL="nvram", GROUP="nvram", MODE="0640"
We have the nvram group, no idea why, we just do ;)
Hmm, if there is a good reason. Maybe just drop "nvram", and wait if anybody complains?
Quoted 6 lines
- SUBSYSTEM="block", GROUP="disk"
+ SUBSYSTEM="block", ATTRS{removable}!="1", GROUP="disk"
+ SUBSYSTEM="block", ATTRS{removable}="1", GROUP="floppy"We put removable block devices in the floppy group, you leave them in disk? (But use the floppy group for real floppies?)
Putting gigabyte-big USB hard disks in the "floppy" group? Also some ATA/SCSI storage controller are marked as removable. I don't think we want that in the defaults. :)
Quoted 3 lines
- KERNEL="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640"
+ SUBSYSTEMS="scsi", ATTRS{type}="0", GROUP="disk", MODE="0640"
+ SUBSYSTEMS="scsi", ATTRS{type}="4|5", GROUP="cdrom", MODE="0640"
We do not use "cdrom", but we could. Harald?
Quoted 2 lines
- KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%k"
+ KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
Harald, you have "cdrom", and that's fine ot use?
Quoted 13 lines
# eep, needs
cdrom_idrun earlier (we ran it at 30-* before)
+ ENV{ID_CDROM}="?*", GROUP="cdrom"We put CD-ROM drives and similar into the cdrom group, not disk.
+ SUBSYSTEMS="scsi", ATTRS{type}="1|8", GROUP="tape"
- KERNEL="ht[0-9]*|nht[0-9]*", GROUP="disk" + KERNEL="ht[0-9]*|nht[0-9]*", GROUP="tape"- KERNEL="pt[0-9]*|npt[0-9]*", GROUP="disk" + KERNEL="pt[0-9]*|npt[0-9]*", GROUP="tape"
Quoted 6 lines
- KERNEL="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*| nrawqft[0-9]*", GROUP="disk"
+ KERNEL="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*| nrawqft[0-9]*", GROUP="tape"We put tape drives and similar into the tape group, not disk.
Hmm, we don't have a "tape" group at all. Harald you have?
Quoted 7 lines
rules/rules.d/80-drivers.rules:
- SUBSYSTEM="module", KERNEL="parport_pc", \
- RUN+="/sbin/modprobe -b ppdev"We don't have this one? What's this for? Is a module missing a dependency?
It's for legacy parallel port, yes. Nobody will fix the kernel. Not sure why we needed it and you don't. You have that as a loadable module?
Quoted 10 lines
rules/packages/40-alsa.rules:
KERNEL="mixer0", SYMLINK+="mixer" KERNEL="dsp0", SYMLINK+="dsp" KERNEL="audio0", SYMLINK+="audio"Which kernel module/ALSA version creates these? Here I can only see
/dev/mixer,/dev/dspand/dev/audioas devices in their own right. Does a later ALSA version enumerate them, or were these added just in case?
Not sure. Removed it! /dev/audio should just be just removed from the kernel.
Quoted 3 lines
+ SUBSYSTEM="sound", GROUP="audio"
And we have an "audio" group for them.
Added. Harald, could you please check, that you get an "audio" group too. It's as useful as "video", even when we do not put any "normal" users, but only daemons in it.
Quoted 9 lines
rules/packages/40-isdn.rules:
- SUBSYSTEM="capi", KERNEL="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM="capi", KERNEL="capi", NAME="capi20", \
+ GROUP="uucp"What uses the
/dev/isdn/capi20symlink? We've never had that, and I've never had any bug reports.
The old ISDN drivers are pretty much dead. But I've seen bugs about /dev/capi20, and it seems used:
http://www.google.com/codesearch?hl=en&sa=N&q=/dev/capi20++lang:c&ct=rr&cs_r=lang:c
Quoted 31 lines
We have a "dialout" group, which we seem to use everywhere you use "uucp". I think that we inherited this from Debian: Marco, do these differences match your rules?
It may make sense for these to be a Debian/Ubuntu diff, or a configure argument?
rules/rules.d/50-udev-default.rules:
- KERNEL="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" + KERNEL="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="dialout"- KERNEL="mwave", NAME="modems/mwave", GROUP="uucp"
+ KERNEL="mwave", NAME="modems/mwave", GROUP="dialout"- KERNEL="hvc*|hvsi*", GROUP="uucp" + KERNEL="hvc*|hvsi*", GROUP="dialout"+ SUBSYSTEM="slamr", GROUP="dialout"
+ SUBSYSTEM="usb", ENV{DEVTYPE}="usb_device", \
+ ATTRS{idVendor}="0403", ATTRS{idProduct}="6001", \
+ MODE="0660", GROUP="dialout"rules/packages/40-isdn.rules:
- SUBSYSTEM="capi", KERNEL="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM="capi", KERNEL="capi", NAME="capi20", \
+ SYMLINK+="isdn/capi20", GROUP="dialout"
Quoted 5 lines
rules/packages/40-zaptel.rules:
+ SUBSYSTEM="zaptel", GROUP="dialout"
(or just the GROUP= tagged onto the other rules for consistency)
If we can not agree on a default, we can do an option, but we do nobody a favor who works on an upstream project and who needs to find the differences again. So, I'm all for finding a common solution, For me it would not be a problem to use "dialout" if that is what we want. Harald?
Thanks,
Kay
Quoted 2 lines · Kay Sievers
It's for legacy parallel port, yes. Nobody will fix the kernel.
What should be "fixed" in that area? ppdev is only needed for /dev/parport<x> (mostly accessed by libieee1284), not for printing via /dev/lp<x>. That's why it is not loaded by default if a parallel port is detected -- because it's optional.
Regards,
Bernhard
Quoted 5 lines · Bernhard Walle
Quoted 2 lines · Kay Sievers
It's for legacy parallel port, yes. Nobody will fix the kernel.
What should be "fixed" in that area?
There have been several attempts in the past to integrate the parport infrastructure properly with the driver model. You can have a tree of devices hanging off a parallel port, but that is not properly exported the kernel. The last attempt was done by Hannes a while back, but it never got finished. Legacy parport it's just dead today, and it will never happen, I guess.
Kay
Quoted 6 lines · Kay Sievers
Quoted 5 lines · Scott James Remnant
This will still be difficult for me to upload with ;)
- SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n"
+ SUBSYSTEM=="block", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="%k"
Quoted 8 lines
Quoted 1 line
I still think we have this round the right way! :-)
devices.txt is in no way "right" for everything, that section is from the 2.4 days, and may not mean anything today. I'll wait for the SCSI guys to tell. We should not switch names if there will never be a scd* device in the kernel, because that would mean that sr* is the default, and scd* is the legacy. I'll come back as soon as I got an answer.
No problem, will wait for that :)
Quoted 7 lines
Quoted 2 lines
you said it was only there because of the legacy ptys, which we've both disabled now?
We set them to 0, and they can be requested on the boot command line. We have not heard anyone using it so far. Here is the option:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/kernel-parameters.txt;h=e0f346d201edb70fae654c55f6be842c4465a5ff;hb=HEAD#l1808
We found one, an abandoned "ttyd" project; but so not caring about that.
Quoted 10 lines
Quoted 5 lines
- KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+ KERNEL=="tun", NAME="net/%k"The mode seems rather permissive? Do you really allow any user to make tunnels by default? (Ours is 0600!)
Hmm, I don't know. I see Ubuntu users complaining on the net, who use virtualization not running as root. But if it's unsafe we should change that.
It's an interesting question actually, since you can make an ssh tunnel anyway. Kernel docs say it's ok to be 0666 since you need CAP_NET_ADMIN anyway - so 666 it is.
Quoted 6 lines
Quoted 2 lines
Isn't the
ignore_removealready handled by the/lib/udev/devicescheck? Our/dev/net/tunis in there.Yeah, because it sets NAME= earlier to place it in the subdirectory. The current check only covers devices which have NAME= set.
Slightly confused.
The general ignore_remove rule looks like:
ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", \
OPTIONS+="ignore_remove"Does this mean that this rule does nothing if the name isn't changed? Want to understand where we need the ignore_remove option on rules, or what is caught by this one.
Quoted 9 lines
Quoted 5 lines
- KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640" + KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"+ KERNEL=="nvram", GROUP="nvram", MODE="0640"
We have the nvram group, no idea why, we just do ;)
Hmm, if there is a good reason. Maybe just drop "nvram", and wait if anybody complains?
Yeah, I think I'll probably just do that -- the udev package is what creates the nvram group in the first place, so I suspect this is just something we picked up from Debian once and never threw away.
I'll drop this.
Quoted 11 lines
Quoted 6 lines
- SUBSYSTEM=="block", GROUP="disk"
+ SUBSYSTEM=="block", ATTRS{removable}!="1", GROUP="disk"
+ SUBSYSTEM=="block", ATTRS{removable}=="1", GROUP="floppy"We put removable block devices in the floppy group, you leave them in disk? (But use the floppy group for real floppies?)
Putting gigabyte-big USB hard disks in the "floppy" group? Also some ATA/SCSI storage controller are marked as removable. I don't think we want that in the defaults. :)
Fair point ;) I'll drop this.
(cdrom/tape pending Harald's reply)
Quoted 5 lines
Quoted 5 lines
rules/rules.d/80-drivers.rules:
- SUBSYSTEM=="module", KERNEL=="parport_pc", \
- RUN+="/sbin/modprobe -b ppdev"
Quoted 7 lines
Quoted 2 lines
We don't have this one? What's this for? Is a module missing a dependency?
It's for legacy parallel port, yes. Nobody will fix the kernel. Not sure why we needed it and you don't. You have that as a loadable module?
Figured it out, it's loaded by our "cups" init script. *sigh*
Clearly we need this, then I can eliminate a non-udev call to modprobe.
Quoted 7 lines
Quoted 7 lines
rules/packages/40-isdn.rules:
- SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
+ GROUP="uucp"
Quoted 7 lines
Quoted 2 lines
What uses the
/dev/isdn/capi20symlink? We've never had that, and I've never had any bug reports.The old ISDN drivers are pretty much dead. But I've seen bugs about
/dev/capi20, and it seems used:
http://www.google.com/codesearch?hl=en&sa=N&q=/dev/capi20++lang:c&ct=rr&cs_r=lang:c
Right, but is /dev/isdn/capi20 used? We don't have that symlink right now, just /dev/capi20
(Nit-picky, I know, but the fewer symlinks and the more fixed software the better! :p)
[dialout]
Quoted 6 lines
If we can not agree on a default, we can do an option, but we do nobody a favor who works on an upstream project and who needs to find the differences again. So, I'm all for finding a common solution, For me it would not be a problem to use "dialout" if that is what we want. Harald?
There's enough legacy stuff in Debian and Ubuntu that assumes dialout (the entire PPP script maintenance, etc.) that I wouldn't want to use uucp for it -- especially since dialout is a more descriptive group anyway.
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Quoted 8 lines · Scott James Remnant
Quoted 6 lines · Kay Sievers
Quoted 2 lines
Isn't the
ignore_removealready handled by the/lib/udev/devicescheck? Our/dev/net/tunis in there.Yeah, because it sets NAME= earlier to place it in the subdirectory. The current check only covers devices which have NAME= set.
Quoted 8 lines
Slightly confused.
The general
ignore_removerule looks like:ACTION="remove", NAME="?*", TEST="/lib/udev/devices/$name", \ OPTIONS+="ignore_remove"Does this mean that this rule does nothing if the name isn't changed?
Yes, it was like that until now.
Quoted 2 lines
Want to understand where we need the
ignore_removeoption on rules, or what is caught by this one.
But the last line here, I added after you asked to check, should make it work as expected:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=rules/rules.d/50-udev-default.rules;hÖfdf00bf9a26d6d7b76577b7d11eabdc1d9bebb;hb§cb7d79f787614b9c4ade94a7a95144ef46eacd
Quoted 14 lines
Quoted 7 lines
Quoted 7 lines
rules/packages/40-isdn.rules:
- SUBSYSTEM="capi", KERNEL="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM="capi", KERNEL="capi", NAME="capi20", \
+ GROUP="uucp"Quoted 7 lines
Quoted 2 lines
What uses the
/dev/isdn/capi20symlink? We've never had that, and I've never had any bug reports.The old ISDN drivers are pretty much dead. But I've seen bugs about
/dev/capi20, and it seems used:
http://www.google.com/codesearch?hl=en&sa=N&q=/dev/capi20++lang:c&ct=rr&cs_r=lang:c
Quoted 5 lines
Right, but is
/dev/isdn/capi20used? We don't have that symlink right now, just/dev/capi20(Nit-picky, I know, but the fewer symlinks and the more fixed software the better! :p)
Ah, I mis-read, didn't catch the subdir link. Let's remove it. :)
Quoted 11 lines
[dialout]
Quoted 6 lines
If we can not agree on a default, we can do an option, but we do nobody a favor who works on an upstream project and who needs to find the differences again. So, I'm all for finding a common solution, For me it would not be a problem to use "dialout" if that is what we want. Harald?
There's enough legacy stuff in Debian and Ubuntu that assumes dialout (the entire PPP script maintenance, etc.) that I wouldn't want to use uucp for it -- especially since dialout is a more descriptive group anyway.
Yeah, I like the dialout group better too. SUSE uses that too in some packages.
Kay
Quoted 7 lines · Kay Sievers
Quoted 4 lines
- KERNEL="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+ KERNEL="tun", NAME="net/%k"
The mode seems rather permissive? Do you really allow any user to make tunnels by default? (Ours is 0600!)Hmm, I don't know. I see Ubuntu users complaining on the net, who use virtualization not running as root. But if it's unsafe we should change that.
It's safe with modern kernels, it should be 666 to not anger users.
Quoted 3 lines
Quoted 1 line
We have the nvram group, no idea why, we just do ;)
Hmm, if there is a good reason. Maybe just drop "nvram", and wait if anybody complains?
As I explained, it's a Debianism.
Quoted 1 line
Putting gigabyte-big USB hard disks in the "floppy" group? Also some
Yes, because "floopy" actually means "removable storage devices".
Quoted 1 line
ATA/SCSI storage controller are marked as removable. I don't think we
I like to call these "buggy".
Quoted 5 lines
If we can not agree on a default, we can do an option, but we do nobody a favor who works on an upstream project and who needs to find the differences again. So, I'm all for finding a common solution, For me it would not be a problem to use "dialout" if that is what we want. Harald?
In Debian uucp and dialout are totally unrelated groups: the first one is used by the Taylor UUCP package for its own stuff, the second one means "member users can initiate a dialout connection using SLIP, PPP or a terminal program". I think some distributions overloaded the uucp group with both meanings. Debian cannot merge them.
Signature · 2 lines
ciao, Marco
Quoted 9 lines · Marco d'Itri
Quoted 7 lines · Kay Sievers
Quoted 4 lines
- KERNEL="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+ KERNEL="tun", NAME="net/%k"
The mode seems rather permissive? Do you really allow any user to make tunnels by default? (Ours is 0600!)Hmm, I don't know. I see Ubuntu users complaining on the net, who use virtualization not running as root. But if it's unsafe we should change that.
Quoted 6 lines
It's safe with modern kernels, it should be 666 to not anger users.
Quoted 3 lines
Quoted 1 line
We have the nvram group, no idea why, we just do ;)
Hmm, if there is a good reason. Maybe just drop "nvram", and wait if anybody complains?
As I explained, it's a Debianism.
Yeah, fine, distros who need that can just add it, if it's not "generally useful".
Quoted 2 lines
Quoted 1 line
Putting gigabyte-big USB hard disks in the "floppy" group? Also some
Yes, because "floopy" actually means "removable storage devices".
Yeah, but it is a weird assupmtion today. We have real devices today on USB and not only floppy-like USB sticks.
Quoted 2 lines
Quoted 1 line
ATA/SCSI storage controller are marked as removable. I don't think we
I like to call these "buggy".
Hmm, with buses like SAS, SATA, and enclosures, non-removable devices are really going away. Today almost all stuff can be moved around, and is removable. Some devices need that to force re-validation on open.
Quoted 10 lines
Quoted 5 lines
If we can not agree on a default, we can do an option, but we do nobody a favor who works on an upstream project and who needs to find the differences again. So, I'm all for finding a common solution, For me it would not be a problem to use "dialout" if that is what we want. Harald?
In Debian uucp and dialout are totally unrelated groups: the first one is used by the Taylor UUCP package for its own stuff, the second one means "member users can initiate a dialout connection using SLIP, PPP or a terminal program". I think some distributions overloaded the uucp group with both meanings. Debian cannot merge them.
Yep, I guess we will all go for "dialout", where it fits better and "uucp" is used to today.
Kay
Quoted 2 lines · Kay Sievers
Yeah, but it is a weird assupmtion today. We have real devices today on USB and not only floppy-like USB sticks.
They are still removable.
Signature · 2 lines
ciao, Marco
Quoted 5 lines · Marco d'Itri
Quoted 2 lines · Kay Sievers
Yeah, but it is a weird assupmtion today. We have real devices today on USB and not only floppy-like USB sticks.
They are still removable.
Sure!. What I'm saying is that they are still in no way close to floppies, and should therefore not be in the floppy group.
Thanks,
Kay
Quoted 11 lines · Kay Sievers
Quoted 6 lines · Scott James Remnant
- SUBSYSTEM="block", GROUP="disk"
+ SUBSYSTEM="block", ATTRS{removable}!="1", GROUP="disk"
+ SUBSYSTEM="block", ATTRS{removable}="1", GROUP="floppy"We put removable block devices in the floppy group, you leave them in disk? (But use the floppy group for real floppies?)
Putting gigabyte-big USB hard disks in the "floppy" group? Also some ATA/SCSI storage controller are marked as removable. I don't think we want that in the defaults. :)
Here we put floppies in "floppy" group and other removable devices on "plugdev" group.
Quoted 5 lines
Quoted 3 lines
- KERNEL="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640"
+ SUBSYSTEMS="scsi", ATTRS{type}="0", GROUP="disk", MODE="0640"
+ SUBSYSTEMS="scsi", ATTRS{type}="4|5", GROUP="cdrom", MODE="0640"We do not use "cdrom", but we could. Harald?
Oh! And CD/CD-R/CD-RW/DVD/DVD-* in "cdrom" group
Quoted 4 lines
Quoted 2 lines
- KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%k"
+ KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"Harald, you have "cdrom", and that's fine ot use?
Those are in "cdrom", too.
Quoted 10 lines
Quoted 10 lines
We put CD-ROM drives and similar into the cdrom group, not disk.
+ SUBSYSTEMS="scsi", ATTRS{type}="1|8", GROUP="tape"
- KERNEL="ht[0-9]*|nht[0-9]*", GROUP="disk" + KERNEL="ht[0-9]*|nht[0-9]*", GROUP="tape"- KERNEL="pt[0-9]*|npt[0-9]*", GROUP="disk" + KERNEL="pt[0-9]*|npt[0-9]*", GROUP="tape"
Quoted 8 lines
Quoted 6 lines
- KERNEL="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*| nrawqft[0-9]*", GROUP="disk"
+ KERNEL="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*| nrawqft[0-9]*", GROUP="tape"We put tape drives and similar into the tape group, not disk.
Hmm, we don't have a "tape" group at all. Harald you have?
Here we have the group "tape" but no rule to assign anything to this group.
Quoted 9 lines
Not sure. Removed it!
/dev/audioshould just be just removed from the kernel.Quoted 3 lines
+ SUBSYSTEM="sound", GROUP="audio"
And we have an "audio" group for them.
Added. Harald, could you please check, that you get an "audio" group too. It's as useful as "video", even when we do not put any "normal" users, but only daemons in it.
We have that here, too.
Quoted 5 lines
If we can not agree on a default, we can do an option, but we do nobody a favor who works on an upstream project and who needs to find the differences again. So, I'm all for finding a common solution, For me it would not be a problem to use "dialout" if that is what we want. Harald?
"uucp" group is in use here... No "dialout" group. This is really needed?
Piter PUNK
Quoted 2 lines · Piter PUNK
"uucp" group is in use here... No "dialout" group. This is really needed?
It really is, at least if you want to have a non-insecure UUCP package (I do).
Signature · 2 lines
ciao, Marco
Quoted 9 lines · Scott James Remnant
Quoted 8 lines · Kay Sievers
Quoted 6 lines · Scott James Remnant
This will still be difficult for me to upload with ;)
- SUBSYSTEM="block", KERNEL="sr[0-9]*", SYMLINK+="scd%n"
+ SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="%k"I still think we have this round the right way! :-)
Quoted 7 lines
Quoted 6 lines
devices.txt is in no way "right" for everything, that section is from the 2.4 days, and may not mean anything today. I'll wait for the SCSI guys to tell. We should not switch names if there will never be a scd* device in the kernel, because that would mean that sr* is the default, and scd* is the legacy. I'll come back as soon as I got an answer.
No problem, will wait for that :)
Got the answers. The block layer and the SCSI maintainer see the kernel name sr* as the default today, and /dev/scd* as a compat link.
If anybody cares about devices.txt, this section should just be removed.
Thanks,
Kay