Re: default udev rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-08-11 at 04:36 -0300, Piter PUNK wrote:
> Kay Sievers wrote:
> > We like to remind everybody, that all distros should work towards a
> > default udev rules set, instead of maintaining their own home-grown
> > version of default rules. We should all unify as far as possible.
> > Red Hat, SUSE and Gentoo are already using the same rules files, with a
> > minimal rules set on top, in a distro specific file. We ask the rest of
> > the universe to join us, and do the same. :)
> 
> Slackware is using the rules inside "rules/rules.d", the rules installed
> by apps and scripts in "extra" and the additional:

Ah, nice.

> 40-slackware.rules
> 40-video.rules (shared with Gentoo)
> 40-alsa.rules and 64-device-mapper.rules (from rules/packages)
> 65-permissions.rules

The permissions are shared with Gentoo too?

> > Please consider adapting the default rules now, and let us find a common
> > solution for everybody. New packages, like the upcoming DeviceKit-*
> > packages will depend on a recent udev with a proper rules setup.
> 
> We can remove the 40-slackware.rules if some changes are done in
> 50-udev-default.rules. A patch that does these changes is:
> 
> --------------cut here--------------------------------------------
> --- udev-126/rules/rules.d/50-udev-default.rules	2008-07-30 
> 08:20:21.000000000 -0300
> +++ udev-126new/rules/rules.d/50-udev-default.rules	2008-08-11 
> 04:00:51.000000000 -0300
> @@ -12,13 +12,15 @@
>   KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
>   KERNEL=="ppp",			MODE="0600", OPTIONS+="ignore_remove"
>   KERNEL=="mwave",		NAME="modems/mwave", GROUP="uucp"
> -KERNEL=="hvc*|hvsi*",		GROUP="uucp"
> +KERNEL=="hvc*|hvsi*|ippp*|isdn*|dcbri*|capi*|pilot", GROUP="uucp"

ISDN should go into its own file. ISDN is not widely used, and should
not unconditionally installed on every system. In the end it should be
packaged with the ISDN tools, which use these nodes.
As far as I can see, the non-CAPI ISDN devices are not created by udev,
and need to be copied from /lib/udev/devices/, or created by some custom
logic, so there is no need to add these. For now, I've added a simple
packages/40-isdn.rules file.

Are you sure, that there is a kernel device named "pilot", and not only
a symlink?

>   KERNEL=="lirc0",		SYMLINK+="lirc"
> +KERNEL=="capi",			NAME="capi20", SYMLINK+="isdn/capi20"
> +KERNEL=="capi*",		NAME="capi/%n"
> 
>   # mem
>   KERNEL=="null|zero|full|random|urandom", MODE="0666"
>   KERNEL=="null",			SYMLINK+="XOR"
> -KERNEL=="mem|kmem|port",	GROUP="kmem", MODE="0640"
> +KERNEL=="mem|kmem|port|nvram",	GROUP="kmem", MODE="0640"

I've added this.

>   KERNEL=="ram0",			SYMLINK+="ramdisk"
>   KERNEL=="ram1",			SYMLINK+="ram"
> 
> @@ -26,6 +28,7 @@
>   KERNEL=="mouse*|mice|event*",	NAME="input/%k", MODE="0640"
>   KERNEL=="ts[0-9]*|uinput",	NAME="input/%k", MODE="0600"
>   KERNEL=="js[0-9]*",		NAME="input/%k", MODE="0644", SYMLINK+="%k"
> +KERNEL=="mice",			SYMLINK+="mouse"
> 
>   # video4linux
>   KERNEL=="vbi0",			SYMLINK+="vbi"
> --------------cut here--------------------------------------------
> 
> The "capi" rules are shared by slackware, frugalware, gentoo and debian;
> if the distro files that are in udev package are updated (slackware
> isn't, my fault).
> 
> The including of "ippp*|isdn*|dcbri*|capi*|pilot" in "uucp" group is
> shared by slackware and gentoo.

I guess, non of these rules will do anything. :)

> If 40-video.rules can be added to
> 50-udev-default.rules we can be very happy -:)

The assignment to the group "video"? Yeah, I like to have that too,
there is nothing else left in the suse.rules.

Harald, any problems, if we add group "video" to some video devices,
seems we all need that, and it's useful even with the ACL stuff we do
for frame grabber services/webcam daemons/fluendo stuff, and such.

> The last two changes are "nvram" in "kmem", but every distro put it
> in different group (i can move this to 65-permissions.rules, if can't
> be added to 50-udev-default.rules) and a link from "mice" to /dev/mouse,
> i don't think it hurts anyone and the link help us to maintain the same
> /dev/mouse device that our users knows to be their mouse.
> 
> Isn't the 40-alsa.rules a good candidate to be merged with
> 50-udev-default.rules?

Some systems do not have audio, we should put all "optional" subsystem
specific stuff their own files, so they can be picked up by the
subsystem packages, which rely on the device nodes.

> I hope this can be useful

Sure.

Thanks,
Kay

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux