Package: udev Version: 0.058-1 Severity: wishlist Tags: patch While switching to 2.6.12-rc5 udev was unable to create the devices managed by "advanced" rules.
$ udevinfo -a -p /class/tty/ttyUSB0 udevinfo starts with the device the node belongs to and then walks up the device chain, to print for every device found, all possibly useful attributes in the udev key format. Only attributes within one device section may be used together in one rule, to match the device for which the node will be created. device '/sys/class/tty/ttyUSB0' has major:minor 188:0 looking at class device '/sys/class/tty/ttyUSB0': SUBSYSTEM="tty" SYSFS{dev}="188:0" follow the class device's "device" couldn't open device directory my rule behing : BUS="usb", KERNEL="ttyUSB*", SYSFS{product}="USB Serial Adaptor", SYMLINK="pilot" the only way to get "pilot" created was to use: BUS="*", KERNEL="ttyUSB*", SYMLINK="pilot" switching to 0.58 fixed it as told in the release note. Attached is the patch needed to get a hackish deb for the new udev. Taking the packaging of 0.56 adding the new upstream source in upstream/ and applying this patch got me a working udev (thanks for the easy to hack packaging :) Please close the bug if it is inappropriate or worst broken ... (i did not know how to make - even a local - nmu to my local repo : 0.58-1.1 is tricky as it will prevent your official package from installing ...) Regards Alban -- Package-specific info: -- /etc/udev/rules.d/: /etc/udev/rules.d/: total 12 lrwxrwxrwx 1 root root 20 2005-04-10 01:32 020_permissions.rules -> ../permissions.rules lrwxrwxrwx 1 root root 12 2005-05-25 01:44 050_hal-plugdev.rules -> ../hal.rules lrwxrwxrwx 1 root root 19 2004-12-05 01:12 cd-aliases.rules -> ../cd-aliases.rules lrwxrwxrwx 1 root root 15 2005-02-10 15:15 prahal.rules -> ../prahal.rules -rw-r--r-- 1 root root 12288 2005-05-27 10:39 .prahal.rules.swp lrwxrwxrwx 1 root root 13 2004-12-05 01:13 udev.rules -> ../udev.rules -- /sys/: /sys/block/hda/dev /sys/block/hde/dev /sys/block/hde/hde1/dev /sys/block/hde/hde2/dev /sys/block/hde/hde3/dev /sys/block/hde/hde4/dev /sys/block/hde/hde5/dev /sys/block/hde/hde6/dev /sys/block/hde/hde7/dev /sys/block/hdg/dev /sys/block/hdg/hdg1/dev /sys/block/hdg/hdg2/dev /sys/block/hdg/hdg3/dev /sys/block/hdg/hdg5/dev /sys/block/hdh/dev /sys/block/ram0/dev /sys/block/ram10/dev /sys/block/ram11/dev /sys/block/ram12/dev /sys/block/ram13/dev /sys/block/ram14/dev /sys/block/ram15/dev /sys/block/ram1/dev /sys/block/ram2/dev /sys/block/ram3/dev /sys/block/ram4/dev /sys/block/ram5/dev /sys/block/ram6/dev /sys/block/ram7/dev /sys/block/ram8/dev /sys/block/ram9/dev /sys/class/cpuid/cpu0/dev /sys/class/graphics/fb0/dev /sys/class/i2c-dev/i2c-0/dev /sys/class/i2c-dev/i2c-1/dev /sys/class/i2c-dev/i2c-2/dev /sys/class/i2c-dev/i2c-3/dev /sys/class/i2c-dev/i2c-4/dev /sys/class/i2c-dev/i2c-5/dev /sys/class/input/event0/dev /sys/class/input/event1/dev /sys/class/input/mice/dev /sys/class/input/mouse0/dev /sys/class/input/mouse1/dev /sys/class/misc/agpgart/dev /sys/class/misc/nvram/dev /sys/class/misc/psaux/dev /sys/class/misc/rtc/dev /sys/class/misc/tun/dev /sys/class/ppp/ppp/dev /sys/class/sound/adsp/dev /sys/class/sound/audio/dev /sys/class/sound/controlC0/dev /sys/class/sound/dsp/dev /sys/class/sound/mixer/dev /sys/class/sound/pcmC0D0c/dev /sys/class/sound/pcmC0D0p/dev /sys/class/sound/pcmC0D1c/dev /sys/class/sound/pcmC0D1p/dev /sys/class/sound/seq/dev /sys/class/sound/sequencer2/dev /sys/class/sound/sequencer/dev /sys/class/sound/timer/dev /sys/class/usb/lp0/dev /sys/class/video4linux/vbi0/dev /sys/class/video4linux/video0/dev -- Kernel configuration: isapnp_init not present. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-rc5 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8) Versions of packages udev depends on: ii hotplug 0.0.20040329-22 Linux Hotplug Scripts ii initscripts 2.86.ds1-1 Standard scripts needed for bootin ii libc6 2.3.5-1 GNU C Library: Shared libraries an ii makedev 2.3.1-78 creates device files in /dev ii sed 4.1.4-2 The GNU sed stream editor -- debconf information: udev/devfs-warning: udev/reboot-warning:
diff -uNr udev-0.056/debian/changelog udev-0.058/debian/changelog --- udev-0.056/debian/changelog 2005-04-14 21:06:47.000000000 +0200 +++ udev-0.058/debian/changelog 2005-05-27 10:26:37.000000000 +0200 @@ -1,3 +1,9 @@ +udev (0.058-0) unstable; urgency=low + + * for 2.6.12-rc4 and up kernels + + -- <[EMAIL PROTECTED]> Fri, 27 May 2005 10:26:19 +0200 + udev (0.056-2) unstable; urgency=medium * Made the init script not fail if links.conf does not exist. diff -uNr udev-0.056/debian/rules udev-0.058/debian/rules --- udev-0.056/debian/rules 2005-04-14 21:06:47.000000000 +0200 +++ udev-0.058/debian/rules 2005-05-27 10:31:50.000000000 +0200 @@ -20,9 +20,10 @@ D := $(CURDIR)/debian/udev U := $(CURDIR)/debian/udev-udeb -DOCS := FAQ README RELEASE-NOTES TODO docs/overview docs/udev-OLS2003.pdf \ +DOCS := FAQ README RELEASE-NOTES TODO docs/overview docs/fedora_udev.html \ docs/persistent_naming/ docs/writing_udev_rules/ \ - docs/udev_vs_devfs docs/RFC-dev.d + docs/udev_vs_devfs docs/RFC-dev.d \ + docs/libsysfs.txt docs/rh_udev_for_dev.txt ifndef BUILD_UDEB NO_PACKAGE := --no-package=udev-udeb diff -uNr udev-0.056/debian/scripts/vars udev-0.058/debian/scripts/vars --- udev-0.056/debian/scripts/vars 2005-04-14 21:06:47.000000000 +0200 +++ udev-0.058/debian/scripts/vars 2005-05-27 10:25:37.000000000 +0200 @@ -8,7 +8,7 @@ SOURCE_DIR=build-tree # For a single pkg, this is the directory that is embedded in the tarball. # For multiple pkgs, this is null. -TAR_DIR=udev-056 +TAR_DIR=udev-058 # Where to place all the stamp files. This directory can be removed, and # all the targets will then be rerun. STAMP_DIR=debian/stampdir diff -uNr udev-0.056/upstream/patches/cdsymlinks.diff udev-0.058/upstream/patches/cdsymlinks.diff --- udev-0.056/upstream/patches/cdsymlinks.diff 2005-04-14 21:06:47.000000000 +0200 +++ udev-0.058/upstream/patches/cdsymlinks.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,170 +0,0 @@ -diff -ruNp udev-054.orig/extras/cdsymlinks.conf udev-054/extras/cdsymlinks.conf ---- udev-054.orig/extras/cdsymlinks.conf 2005-02-26 04:18:22.000000000 +0100 -+++ udev-054/extras/cdsymlinks.conf 2005-02-26 14:25:00.355722192 +0100 -@@ -1,8 +1,13 @@ - # Configuration file for cdsymlinks - - # Output links for these types of devices. --# Allowed keywords are CD, CDR, CDRW, DVD, DVDRW, DVDRAM, CDMRW, CDWMRW. -+# Allowed keywords are: corresponding to device names: -+# CD CDR CDRW cdrom cd-r cdrw -+# DVD DVDRW DVDRAM dvd dvdrw dvdram -+# CDMRW CDWMRW cdm cdmrw -+# CDRAM cdram - # Other words are accepted but ignored. -+# Devices with multiple recognised capabilities WILL get multiple links. - #OUTPUT="CD CDRW DVD DVDRW DVDRAM" - - # Whether to output numbered links. -@@ -10,3 +15,7 @@ - # 0 = don't output 'cdrom1', 'dvd1' etc. - # We always output 'cdrom', 'dvd' etc. for the best-match devices. - #NUMBERED_LINKS=1 -+ -+# Whether to output link 0 along with each unnumbered link. -+# (No effect if NUMBERED_DEVS=0.) -+#LINK_ZERO=0 -diff -ruNp udev-054.orig/extras/cdsymlinks.sh udev-054/extras/cdsymlinks.sh ---- udev-054.orig/extras/cdsymlinks.sh 2005-02-26 04:18:21.000000000 +0100 -+++ udev-054/extras/cdsymlinks.sh 2005-02-26 14:32:39.928856456 +0100 -@@ -1,6 +1,7 @@ - #! /bin/sh -e - # --# Map cdrom, cdm, cdmrw, cd-r, cdrw, dvd, dvdrw, dvdram to suitable devices. -+# Map cdrom, cd-r, cdrw, dvd, dvdrw, dvdram, cdm, cdmrw, cdram -+# to suitable devices. - # Prefers cd* for DVD-incapable and cdrom and dvd for read-only devices. - # First parameter is the kernel device name. - # Second parameter, if present, must be "-d" => output the full mapping. -@@ -11,13 +12,16 @@ - # BUS="scsi", KERNEL="scd[0-9]*", PROGRAM="/etc/udev/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}" - # (this last one is "just in case") - # --# (c) 2004 Darren Salt <[EMAIL PROTECTED]> -+# (c) 2004, 2005 Darren Salt <[EMAIL PROTECTED]> -+# -+# Last modified: 2005-02-15 - - test -e /proc/sys/dev/cdrom/info || exit 0 - - # Defaults; it's better that you alter them in /etc/udev/cdsymlinks.conf - OUTPUT='CD CDRW DVD DVDRW DVDRAM' - NUMBERED_LINKS=1 -+LINK_ZERO=0 - - test -e /etc/udev/cdsymlinks.conf && . /etc/udev/cdsymlinks.conf - -@@ -61,6 +65,7 @@ setArray CDRWs `sed -re '/^Can write C - setArray CDRs `sed -re '/^Can write CD-R:/I! d; s/.*://' /proc/sys/dev/cdrom/info` - setArray CDMRWs `sed -re '/^Can write MRW:/I! d; s/.*://' /proc/sys/dev/cdrom/info` - setArray CDMs `sed -re '/^Can read MRW:/I! d; s/.*://' /proc/sys/dev/cdrom/info` -+setArray CDRAMs `sed -re '/^Can write RAM:/I! d; s/.*://' /proc/sys/dev/cdrom/info` - - # How many devices do we have? - NumDevs=$(($DEVICES-1)) -@@ -80,6 +85,7 @@ for i in $Count; do - test "`ix CDRs $i`" != '' || ixs CDRs $i 0 - test "`ix CDMRWs $i`" != '' || ixs CDMRWs $i 0 - test "`ix CDMs $i`" != '' || ixs CDMs $i 0 -+ test "`ix CDRAMs $i`" != '' || ixs CDRAMs $i 0 - done - - DVDRAM='' -@@ -89,6 +95,7 @@ CDRW='' - CDR='' - CDMRW='' - CDM='' -+CDRAM='' - CD='' - - # Calculate symlink->device mappings. -@@ -117,27 +124,31 @@ for i in $Count; do - test "`ix CDMs $i`" = 1 && CDM="$CDM `ix DEVICES $i`" - done - for i in $Count; do -+ test "`ix CDRAMs $i`" = 1 && CDRAM="$CDRAM `ix DEVICES $i`" -+done -+for i in $Count; do - CD="$CD `ix DEVICES $i`" - done - - # Debug output - if test "$DEBUG" = 1; then - echo 'Devices:' `for i in $Count; do ix DEVICES $i; echo -n \ ; done` -- echo 'DVDRAM :' `for i in $Count; do ix DVDRAMs $i; echo -n \ ; done` $DVDRAM -- echo 'DVDRW :' `for i in $Count; do ix DVDRWs $i; echo -n \ ; done` $DVDRW -- echo 'DVD :' `for i in $Count; do ix DVDs $i; echo -n \ ; done` $DVD -- echo 'CDRW :' `for i in $Count; do ix CDRWs $i; echo -n \ ; done` $CDRW -+ echo 'CDROM : (all)' $CD - echo 'CD-R :' `for i in $Count; do ix CDRs $i; echo -n \ ; done` $CDR -+ echo 'CDRW :' `for i in $Count; do ix CDRWs $i; echo -n \ ; done` $CDRW -+ echo 'DVD :' `for i in $Count; do ix DVDs $i; echo -n \ ; done` $DVD -+ echo 'DVDRW :' `for i in $Count; do ix DVDRWs $i; echo -n \ ; done` $DVDRW -+ echo 'DVDRAM :' `for i in $Count; do ix DVDRAMs $i; echo -n \ ; done` $DVDRAM - echo 'CDMRW :' `for i in $Count; do ix CDMRWs $i; echo -n \ ; done` $CDMRW -- echo 'CDM :' `for i in $Count; do ix CDMs $i; echo -n \ ; done` $CDM -- echo 'CDROM : (all)' $CD -+ echo 'CDWMRW :' `for i in $Count; do ix CDMs $i; echo -n \ ; done` $CDM -+ echo 'CDRAM :' `for i in $Count; do ix CDRAMs $i; echo -n \ ; done` $CDRAM - fi - - # Prepare symlink names output --output () { -+do_output () { - test "`eval echo '$'$3`" = '' && return - local i -- local COUNT='' -+ local COUNT=$4 - local DEVLS="`ls -dl \"/dev/$2\" \"/dev/$2\"[0-9]* 2>/dev/null`" - local PRESENT="`echo "$DEVLS" | - sed -re 's!^.* /dev/('$2'[[:digit:]]*) -> [^[:space:]]+$!\1!'`" -@@ -148,6 +159,7 @@ output () { - if test "$DEVPRESENT" != ""; then - # Existing symlinks found - don't output a new one. - # If the target dev ($1) is the current dev ($i), we output their names. -+ test -z "$4" || return; - test "$1" = "$i" && echo " $DEVPRESENT" | sed -e 'N; $ s/\n/ /' - else - # If we found no existing symlinks for the target device... -@@ -156,15 +168,17 @@ output () { - # symlink is created by udev as a result of use of this program, we - # DON'T want different output! - until notin PRESENT "$2$COUNT"; do -+ test -z "$4" || return; - COUNT=$(($COUNT+1)) - done - # If the target dev ($1) is the current dev ($i), we output its name. - if test $(($NUMBERED_LINKS)) -ne 0 || test "$COUNT" = ''; then -- test "$i" = "$1" && echo -n " $2$COUNT" -+ test "$i" != "$1" || echo -n " $2$COUNT" - fi - # If the link isn't in our "existing links" list, add it and increment - # our counter. -- if test ! -e "/dev/$2$COUNT"; then -+ if notin PRESENT "$2$COUNT"; then -+ test -z "$4" || return; - PRESENT="$PRESENT\n$2$COUNT" - COUNT=$(($COUNT+1)) - fi -@@ -172,13 +186,19 @@ output () { - done - } - -+output () { -+ do_output "$@" -+ test $(($LINK_ZERO)) -eq 0 || do_output "$@" 0 -+} -+ - # And output it - notin OUTPUT CD || echo -n "`output "$1" cdrom CD`" --notin OUTPUT CDMRW || echo -n "`output "$1" cdmrw CDM`" --notin OUTPUT CDWMRW || echo -n "`output "$1" cdwmrw CDMRW`" - notin OUTPUT CDR || echo -n "`output "$1" cd-r CDR`" - notin OUTPUT CDRW || echo -n "`output "$1" cdrw CDRW`" - notin OUTPUT DVD || echo -n "`output "$1" dvd DVD`" - notin OUTPUT DVDRW || echo -n "`output "$1" dvdrw DVDRW`" - notin OUTPUT DVDRAM || echo -n "`output "$1" dvdram DVDRAM`" -+notin OUTPUT CDMRW || echo -n "`output "$1" cdmrw CDM`" -+notin OUTPUT CDWMRW || echo -n "`output "$1" cdwmrw CDMRW`" -+notin OUTPUT CDRAM || echo -n "`output "$1" cdram CDRAM`" - echo