[devel] bugs in udev rules

Dmitry V. Levin ldv на altlinux.org
Вт Мар 21 14:01:25 MSK 2023


On Tue, Mar 21, 2023 at 11:56:27AM +0100, Alexey Gladkov wrote:
> On Tue, Mar 21, 2023 at 10:53:50AM +0200, Dmitry V. Levin wrote:
> > On Tue, Mar 21, 2023 at 12:46:47AM +0000, Girar awaiter (ldv) wrote:
> > > https://git.altlinux.org/tasks/317085/logs/events.1.1.log
> > [...]
> > > #100 sisyphus_check 0.8.66-alt1 -> 0.8.67-alt1
> > >  Sat Mar 18 2023 Dmitry V. Levin <ldv на altlinux> 0.8.67-alt1
> > >  - 185-check-udev: new check, disallows packages containing
> > >    system udev rules files outside /lib/udev/rules.d/.
> > 
> > $ cat Sisyphus/{noarch,x86_64}/base/contents_index |\
> >   grep '/udev/rules\.d/.*\.rules[[:space:]]' |\
> >   grep -Ev '^/(lib|usr/share/.*)/udev/rules\.d/' |\
> >   sort -k2,2 |\
> >   join -t$'\t' -12 -21 -o1.1,1.2,2.2 - acl/list.packages.sisyphus |\
> >   sort  
> 
> Может в правилах ещё и ошибки есть ? :)

Увы, в самих правилах тоже есть ошибки:

$ udevadm verify -N never $(find -type f -path '*/udev/rules.d/*.rules')
./etc/udev/rules.d/z65-peperoni.rules:7 Invalid key 'SYSFS'
./etc/udev/rules.d/z65-peperoni.rules: udev rules check failed
./etc/udev/rules.d/z65-anyma-udmx.rules:7 Invalid key 'SYSFS'
./etc/udev/rules.d/z65-anyma-udmx.rules:10 Invalid key 'SYSFS'
./etc/udev/rules.d/z65-anyma-udmx.rules: udev rules check failed
./etc/udev/rules.d/utsushi-esci.rules:25 LABEL="utsushi_esci_rules_begin" is unused.
./etc/udev/rules.d/utsushi-esci.rules: udev rules check failed
./lib/udev/rules.d/60-persistent-storage.rules:139 duplicate expressions
./lib/udev/rules.d/60-persistent-storage.rules: udev rules check failed
./lib/udev/rules.d/quasarm.rules:2 Ignoring NAME="%k", as it will take no effect.
./lib/udev/rules.d/quasarm.rules: udev rules check failed
./lib/udev/rules.d/quasar.rules:2 Ignoring NAME="%k", as it will take no effect.
./lib/udev/rules.d/quasar.rules: udev rules check failed
Configuration file ./lib/udev/rules.d/60-openct.rules is marked executable. Please remove executable permission bits. Proceeding anyway.
Configuration file ./lib/udev/rules.d/41-odvr.rules is marked executable. Please remove executable permission bits. Proceeding anyway.
./lib/udev/rules.d/41-odvr.rules:1 Invalid key 'SYSFS'
./lib/udev/rules.d/41-odvr.rules: udev rules check failed
./lib/udev/rules.d/40-nitrokey.rules:9 GROUP key takes '=' or ':=' operator, assuming '='.
./lib/udev/rules.d/40-nitrokey.rules:11 GROUP key takes '=' or ':=' operator, assuming '='.
./lib/udev/rules.d/40-nitrokey.rules:13 GROUP key takes '=' or ':=' operator, assuming '='.
./lib/udev/rules.d/40-nitrokey.rules:15 GROUP key takes '=' or ':=' operator, assuming '='.
./lib/udev/rules.d/40-nitrokey.rules:17 GROUP key takes '=' or ':=' operator, assuming '='.
./lib/udev/rules.d/40-nitrokey.rules: udev rules check failed
Configuration file ./lib/udev/rules.d/00-misdn.rules is marked executable. Please remove executable permission bits. Proceeding anyway.
./lib/udev/rules.d/40-lomoco.rules:3 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:6 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:8 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:10 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:12 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:14 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:16 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:18 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:20 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:22 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:24 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:26 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:28 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:30 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:32 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:34 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:36 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:38 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:40 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:42 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:44 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules:46 Invalid key 'SYSFS'
./lib/udev/rules.d/40-lomoco.rules: udev rules check failed
./lib/udev/rules.d/99-indi_auxiliary.rules:5 Invalid value "/bin/sh -c 'test -f /sys/module/usbcore/parameters/usbfs_memory_mb && test $(cat /sys/module/usbcore/parameters/usbfs_memory_mb) -lt 256 && echo 256 > /sys/module/usbcore/parameters/usbfs_memory_mb'" for RUN (char 76: invalid substitution type), ignoring.
./lib/udev/rules.d/99-indi_auxiliary.rules: udev rules check failed
./lib/udev/rules.d/60-epsonscan2.rules:23 LABEL="epsonscan2_esci_rules_begin" is unused.
./lib/udev/rules.d/60-epsonscan2.rules: udev rules check failed
./lib/udev/rules.d/cmotech.rules:4 Invalid key 'SYSFS'
./lib/udev/rules.d/cmotech.rules: udev rules check failed
./lib/udev/rules.d/60-aoe.rules:14 Ignoring NAME="%k", as it will take no effect.
./lib/udev/rules.d/60-aoe.rules: udev rules check failed
./lib/udev/rules.d/51-android.rules:28 LABEL="android_usb_rules_begin" is unused.
./lib/udev/rules.d/51-android.rules: udev rules check failed
./lib/udev/rules.d/61-gdm.rules:96 LABEL="gdm_virt_passthrough_check" is unused.
./lib/udev/rules.d/61-gdm.rules:104 LABEL="gdm_virt_multi_gpu_check" is unused.
./lib/udev/rules.d/61-gdm.rules: udev rules check failed

344 udev rules files have been checked.
  Success: 329
  Fail:    15


-- 
ldv


Подробная информация о списке рассылки Devel