[arch-general] udev rules policy
What is the policy for Udev rules in ArchLinux? There are 2 places where udev rules can be placed, /lib/udev/rules.d/ and /etc/udev/rules.d/. Now, I think the /lib/ directory should be only for the rules coming from upstream udev, and the /etc/ directory is for rules coming from ArchLinux packages. If this is the policy everyone agrees on - and as far as I remember, udev devs recommends it too - maybe namcap can check that too? ps. the KVM package now has rules in /lib/ , so I'll open a bug report if that's not supposed to be like that. -- damjan
Am Mittwoch 22 April 2009 schrieb Damjan Georgievski:
What is the policy for Udev rules in ArchLinux?
There are 2 places where udev rules can be placed, /lib/udev/rules.d/ and /etc/udev/rules.d/. Now, I think the /lib/ directory should be only for the rules coming from upstream udev, and the /etc/ directory is for rules coming from ArchLinux packages.
If this is the policy everyone agrees on - and as far as I remember, udev devs recommends it too - maybe namcap can check that too?
ps. the KVM package now has rules in /lib/ , so I'll open a bug report if that's not supposed to be like that. Normally udev rules should go to /lib that the user can override them with /etc rule file.
greetings tpowa -- Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org
On Wed, Apr 22, 2009 at 9:19 AM, Tobias Powalowski <t.powa@gmx.de> wrote:
Am Mittwoch 22 April 2009 schrieb Damjan Georgievski:
What is the policy for Udev rules in ArchLinux?
There are 2 places where udev rules can be placed, /lib/udev/rules.d/ and /etc/udev/rules.d/. Now, I think the /lib/ directory should be only for the rules coming from upstream udev, and the /etc/ directory is for rules coming from ArchLinux packages.
If this is the policy everyone agrees on - and as far as I remember, udev devs recommends it too - maybe namcap can check that too?
ps. the KVM package now has rules in /lib/ , so I'll open a bug report if that's not supposed to be like that. Normally udev rules should go to /lib that the user can override them with /etc rule file.
Yeah, I'm fairly certain this is the case - if you copy a rule file to /etc from /lib, you can make changes and it will use that one instead of /lib. In theory.
Aaron Griffin wrote:
On Wed, Apr 22, 2009 at 9:19 AM, Tobias Powalowski <t.powa@gmx.de> wrote:
Am Mittwoch 22 April 2009 schrieb Damjan Georgievski:
What is the policy for Udev rules in ArchLinux?
There are 2 places where udev rules can be placed, /lib/udev/rules.d/ and /etc/udev/rules.d/. Now, I think the /lib/ directory should be only for the rules coming from upstream udev, and the /etc/ directory is for rules coming from ArchLinux packages.
If this is the policy everyone agrees on - and as far as I remember, udev devs recommends it too - maybe namcap can check that too?
ps. the KVM package now has rules in /lib/ , so I'll open a bug report if that's not supposed to be like that.
Normally udev rules should go to /lib that the user can override them with /etc rule file.
Yeah, I'm fairly certain this is the case - if you copy a rule file to /etc from /lib, you can make changes and it will use that one instead of /lib. In theory.
Yep, this is on my todo list of proposal, also establishing some "rules" against the prefix number to rules. Package should put rules on /lib/udev/rules.d so as Aaron said when same file exist in /etc/udev.d/rules.d the file on /lib/udev/rules.d is ignored. (a run of udevadm test .... shows this) udev_rules_new: rule file basename '/etc/udev/rules.d/NN-blah-blah.rules' already added, ignoring '/lib/udev/rules.d/NN-blah-blah.rules' For example in Debian there are some rules with numbers: [quote="README"] Files should be named xx-descriptive-name.rules, the xx should be chosen first according to the following sequence points: 00 rules that it is critical to be run first, usually only WAIT_FOR_SYSFS 20 rules that change the name from the device from the default (cannot be overriden) 40 rules that set the permissions of device nodes (can be overriden by later rules) 60 rules that add symlinks to device nodes (adds to those set in earlier rules) 80 rules that run programs (but do not load modules) 90 rules that load modules 99 rules that it is critical to be run last This scheme has been chosen so that user-supplied rules are normally named 50-*.rules for the right thing to happen. Packages should chose the approriate sequence point and add 5 to it (e.g. 25-iftab.rules, 45-libsane.rules, etc.) unless there is a need for a particular order. [/quote] -- Gerardo Exequiel Pozzi ( djgera ) http://www.djgera.com.ar KeyID: 0x1B8C330D Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
Tobias Powalowski wrote:
Am Mittwoch 22 April 2009 schrieb Damjan Georgievski:
What is the policy for Udev rules in ArchLinux?
There are 2 places where udev rules can be placed, /lib/udev/rules.d/ and /etc/udev/rules.d/. Now, I think the /lib/ directory should be only for the rules coming from upstream udev, and the /etc/ directory is for rules coming from ArchLinux packages.
If this is the policy everyone agrees on - and as far as I remember, udev devs recommends it too - maybe namcap can check that too?
ps. the KVM package now has rules in /lib/ , so I'll open a bug report if that's not supposed to be like that. Normally udev rules should go to /lib that the user can override them with /etc rule file.
greetings tpowa
Looking at my openSuSE install, that seems to be the way it is done there: /lib/udev /lib/udev/ata_id /lib/udev/bluetooth.sh /lib/udev/bluetooth_serial /lib/udev/cdrom_id /lib/udev/collect /lib/udev/create_floppy_devices /lib/udev/devices /lib/udev/devices/console /lib/udev/devices/core <snip> and then: /etc/udev /etc/udev/rules.d /etc/udev/rules.d/40-alsa.rules /etc/udev/rules.d/40-bluetooth.rules /etc/udev/rules.d/40-suse.rules /etc/udev/rules.d/40-zaptel.rules <snip> /etc/udev/udev.conf -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com
On Thu, Apr 23, 2009 at 11:22 AM, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
Tobias Powalowski wrote:
Am Mittwoch 22 April 2009 schrieb Damjan Georgievski:
What is the policy for Udev rules in ArchLinux?
There are 2 places where udev rules can be placed, /lib/udev/rules.d/ and /etc/udev/rules.d/. Now, I think the /lib/ directory should be only for the rules coming from upstream udev, and the /etc/ directory is for rules coming from ArchLinux packages.
If this is the policy everyone agrees on - and as far as I remember, udev devs recommends it too - maybe namcap can check that too?
ps. the KVM package now has rules in /lib/ , so I'll open a bug report if that's not supposed to be like that. Normally udev rules should go to /lib that the user can override them with /etc rule file.
greetings tpowa
Looking at my openSuSE install, that seems to be the way it is done there:
/lib/udev /lib/udev/ata_id /lib/udev/bluetooth.sh /lib/udev/bluetooth_serial /lib/udev/cdrom_id /lib/udev/collect /lib/udev/create_floppy_devices /lib/udev/devices /lib/udev/devices/console /lib/udev/devices/core <snip>
and then:
/etc/udev /etc/udev/rules.d /etc/udev/rules.d/40-alsa.rules /etc/udev/rules.d/40-bluetooth.rules /etc/udev/rules.d/40-suse.rules /etc/udev/rules.d/40-zaptel.rules <snip> /etc/udev/udev.conf
Actually, that's not the same. I have a suspicion suse's udev is far older, but the dir we're looking at should be /lib/udev/rules.d vs /etc/udev/rules.d
Aaron Griffin wrote:
Actually, that's not the same. I have a suspicion suse's udev is far older, but the dir we're looking at should be /lib/udev/rules.d vs /etc/udev/rules.d
Ahah!, Your right Aaron. I missed the /lib/udev/'rules.d'. I know it has been that way for a while, at least since 10.3 in Oct. '07. That's a far back as I can look. All my 10.2 boxes and earlier are dead... -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com
participants (5)
-
Aaron Griffin
-
Damjan Georgievski
-
David C. Rankin
-
Gerardo Exequiel Pozzi
-
Tobias Powalowski