From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott James Remnant Date: Mon, 22 Dec 2008 14:20:29 +0000 Subject: Moving Ubuntu to upstream udev rules (Part 2) Message-Id: <1229955629.6944.63.camel@quest> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-CWEz6SwZeDOSBeYrLO9O" List-Id: To: linux-hotplug@vger.kernel.org --=-CWEz6SwZeDOSBeYrLO9O Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=3D=3D"raw1394*", GROUP=3D"video" This will still be difficult for me to upload with ;) - SUBSYSTEM=3D=3D"block", KERNEL=3D=3D"sr[0-9]*", SYMLINK+=3D"scd%n" + SUBSYSTEM=3D=3D"block", KERNEL=3D=3D"sr[0-9]*", NAME=3D"scd%n", SYMLINK= +=3D"%k" I still think we have this round the right way! :-) - KERNEL=3D=3D"pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP=3D"tty", = \ - MODE=3D"0660", OPTIONS+=3D"last_rule" - KERNEL=3D=3D"tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP=3D"tty", = \ - MODE=3D"0660", OPTIONS+=3D"last_rule" - KERNEL=3D=3D"ptmx", GROUP=3D"tty", MODE=3D"0666", \ - OPTIONS+=3D"last_rule" - KERNEL=3D=3D"tty", GROUP=3D"tty", MODE=3D"0666", \ - OPTIONS+=3D"last_rule" - KERNEL=3D=3D"tty[0-9]*", GROUP=3D"tty", MODE=3D"0620", \ - OPTIONS+=3D"last_rule" - KERNEL=3D=3D"vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP=3D"tty", \ - OPTIONS+=3D"last_rule" - KERNEL=3D=3D"console", MODE=3D"0600", OPTIONS+=3D"last_rul= e" + KERNEL=3D=3D"pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP=3D"tty", = \ + MODE=3D"0660", + KERNEL=3D=3D"tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP=3D"tty", = \ + MODE=3D"0660", + KERNEL=3D=3D"ptmx", GROUP=3D"tty", MODE=3D"0666" + KERNEL=3D=3D"tty", GROUP=3D"tty", MODE=3D"0666" + KERNEL=3D=3D"tty[0-9]*", GROUP=3D"tty", MODE=3D"0620", + KERNEL=3D=3D"vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP=3D"tty", + KERNEL=3D=3D"console", MODE=3D"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=3D=3D"tun", NAME=3D"net/%k", MODE=3D"0666", OPTIONS+=3D"ignore_r= emove" + KERNEL=3D=3D"tun", NAME=3D"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=3D=3D"ppp", MODE=3D"0600", OPTIONS+=3D"ignore_remove" + KERNEL=3D=3D"ppp", MODE=3D"0600" ignore_remove already handled by /lib/udev/devices check? - KERNEL=3D=3D"mem|kmem|port|nvram", GROUP=3D"kmem", MODE=3D"0640" + KERNEL=3D=3D"mem|kmem|port", GROUP=3D"kmem", MODE=3D"0640" + KERNEL=3D=3D"nvram", GROUP=3D"nvram", MODE=3D"0640" We have the nvram group, no idea why, we just do ;) - SUBSYSTEM=3D=3D"block", GROUP=3D"disk" + SUBSYSTEM=3D=3D"block", ATTRS{removable}!=3D"1", GROUP=3D"disk" + SUBSYSTEM=3D=3D"block", ATTRS{removable}=3D=3D"1", GROUP=3D"floppy" We put removable block devices in the floppy group, you leave them in disk? (But use the floppy group for real floppies?) - KERNEL=3D=3D"sg[0-9]*", ATTRS{type}!=3D"3|6", GROUP=3D"disk", MODE=3D"0= 640" + SUBSYSTEMS=3D=3D"scsi", ATTRS{type}=3D=3D"0", GROUP=3D"disk", MODE=3D"0= 640" + SUBSYSTEMS=3D=3D"scsi", ATTRS{type}=3D=3D"4|5", GROUP=3D"cdrom", MODE= =3D"0640" - KERNEL=3D=3D"pktcdvd[0-9]*", NAME=3D"pktcdvd/%k" + KERNEL=3D=3D"pktcdvd[0-9]*", NAME=3D"pktcdvd/%k", GROUP=3D"cdrom= " # eep, needs cdrom_id run earlier (we ran it at 30-* before) + ENV{ID_CDROM}=3D=3D"?*", GROUP=3D"cdrom" We put CD-ROM drives and similar into the cdrom group, not disk. + SUBSYSTEMS=3D=3D"scsi", ATTRS{type}=3D=3D"1|8", GROUP=3D"tape" - KERNEL=3D=3D"ht[0-9]*|nht[0-9]*", GROUP=3D"disk" + KERNEL=3D=3D"ht[0-9]*|nht[0-9]*", GROUP=3D"tape" - KERNEL=3D=3D"pt[0-9]*|npt[0-9]*", GROUP=3D"disk" + KERNEL=3D=3D"pt[0-9]*|npt[0-9]*", GROUP=3D"tape" - KERNEL=3D=3D"qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*| nrawqft[0-9]*", GROUP=3D"disk" + KERNEL=3D=3D"qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*| nrawqft[0-9]*", GROUP=3D"tape" We put tape drives and similar into the tape group, not disk. rules/rules.d/80-drivers.rules: - SUBSYSTEM=3D=3D"module", KERNEL=3D=3D"parport_pc", \ - RUN+=3D"/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=3D=3D"mixer0", SYMLINK+=3D"mixer" KERNEL=3D=3D"dsp0", SYMLINK+=3D"dsp" KERNEL=3D=3D"audio0", SYMLINK+=3D"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=3D=3D"sound", GROUP=3D"audio" And we have an "audio" group for them. rules/packages/40-isdn.rules: - SUBSYSTEM=3D=3D"capi", KERNEL=3D=3D"capi", NAME=3D"capi20", \ - SYMLINK+=3D"isdn/capi20", GROUP=3D"uucp" + SUBSYSTEM=3D=3D"capi", KERNEL=3D=3D"capi", NAME=3D"capi20", \ + GROUP=3D"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=3D=3D"tty[A-Z]*|pppox*|ircomm*|noz*", GROUP=3D"uucp" + KERNEL=3D=3D"tty[A-Z]*|pppox*|ircomm*|noz*", GROUP=3D"dialout" - KERNEL=3D=3D"mwave", NAME=3D"modems/mwave", GROUP=3D"uuc= p" + KERNEL=3D=3D"mwave", NAME=3D"modems/mwave", GROUP=3D"dia= lout" - KERNEL=3D=3D"hvc*|hvsi*", GROUP=3D"uucp" + KERNEL=3D=3D"hvc*|hvsi*", GROUP=3D"dialout" + SUBSYSTEM=3D=3D"slamr", GROUP=3D"dialout" + SUBSYSTEM=3D=3D"usb", ENV{DEVTYPE}=3D=3D"usb_device", \ + ATTRS{idVendor}=3D=3D"0403", ATTRS{idProduct}=3D=3D"6001", \ + MODE=3D"0660", GROUP=3D"dialout" rules/packages/40-isdn.rules: - SUBSYSTEM=3D=3D"capi", KERNEL=3D=3D"capi", NAME=3D"capi20", \ - SYMLINK+=3D"isdn/capi20", GROUP=3D"uucp" + SUBSYSTEM=3D=3D"capi", KERNEL=3D=3D"capi", NAME=3D"capi20", \ + SYMLINK+=3D"isdn/capi20", GROUP=3D"dialout" rules/packages/40-zaptel.rules: + SUBSYSTEM=3D=3D"zaptel", GROUP=3D"dialout" (or just the GROUP=3D tagged onto the other rules for consistency) Scott --=20 Scott James Remnant scott@ubuntu.com --=-CWEz6SwZeDOSBeYrLO9O Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAklPoi0ACgkQSnQiFMl4yK7O6ACeLnuNA1//XOnVWE8mMuH/nWqf uR8AoIP8bLTiiponZiXhyBvea9KCgpm+ =Cst3 -----END PGP SIGNATURE----- --=-CWEz6SwZeDOSBeYrLO9O--