Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Kay Sievers <kay.sievers <at> vrfy.org>
Subject: Re: Moving Ubuntu to upstream udev rules (Part 2)
Newsgroups: gmane.linux.hotplug.devel
Date: Monday 22nd December 2008 15:30:23 UTC (over 8 years ago)
On Mon, Dec 22, 2008 at 15:20, Scott James Remnant 
wrote:
> 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=a8cf7cf2c7b4c41c14508a808b09a5fa9256a024

>  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.

>  - 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

Removed "last_rule".

>  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

>  - 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.

>  Isn't the ignore_remove already handled by the /lib/udev/devices
>  check?  Our /dev/net/tun is in there.

Yeah, because it sets NAME= earlier to place it in the subdirectory.
The current check only covers devices which have NAME= set.

>  - KERNEL=="ppp",        MODE="0600", OPTIONS+="ignore_remove"
>  + KERNEL=="ppp",        MODE="0600"
>
>  ignore_remove already handled by /lib/udev/devices check?

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"

>  - 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?

>  - 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. :)

>  - 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?

>  - 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?

>  # 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.

Hmm, we don't have a "tape" group at all. Harald you have?

> 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?

> 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?

Not sure. Removed it! /dev/audio should just be just removed from the
kernel.

>  + 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.

> 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.

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

> 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)

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
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
CD: 3ms