summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-12-26 23:33:19 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-12-26 23:33:19 +0000
commitdf77ed39fa1a3ec40cd44cb05a04baf5267d861b (patch)
treeaa2c24f9ae201299c3af7f99af1a4ff9ef926b75 /sys-fs
parentUpdate version. Fix udev_db path to point to /dev, else it is not writable (diff)
downloadhistorical-df77ed39fa1a3ec40cd44cb05a04baf5267d861b.tar.gz
historical-df77ed39fa1a3ec40cd44cb05a04baf5267d861b.tar.bz2
historical-df77ed39fa1a3ec40cd44cb05a04baf5267d861b.zip
Update version. Fix udev_db path to point to /dev, else it is not writable
early during boot. Fix permissions on /dev/ptmx, else we use old style PTYs. Update udev.permissions to also include devfs paths. Update udev.rules to use some devfs layout for easy initial transition. Update included script (udev-011-ide-devfs*.patch) that handles ide devfs symlinks to also generate /dev/{cdroms,discs} ones. Fix udev to first remove any existing nodes/fifo's/sockets/etc before trying to create a symlink, else it silently fails without debugging enabled (udev-011-unlink-before-symlink.patch). Add hack so that we can disable the sleep period udev have (its there so that udev do not try to access the sysfs info before the kernel created the entries) - we do not need it when we disable sleep, as the entries are already created (udev-011-no-wait-for-sleep.patch).
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/udev/Manifest16
-rw-r--r--sys-fs/udev/files/digest-udev-0111
-rw-r--r--sys-fs/udev/files/udev-011-ide-devfs-form-fixes.patch62
-rw-r--r--sys-fs/udev/files/udev-011-ide-devfs.patch86
-rw-r--r--sys-fs/udev/files/udev-011-no-wait-for-sleep.patch40
-rw-r--r--sys-fs/udev/files/udev-011-unlink-before-symlink.patch27
-rw-r--r--sys-fs/udev/files/udev.conf8
-rw-r--r--sys-fs/udev/files/udev.permissions121
-rw-r--r--sys-fs/udev/files/udev.rules97
-rw-r--r--sys-fs/udev/udev-011.ebuild129
10 files changed, 544 insertions, 43 deletions
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
index 734df2ee1d7b..dc9b8704fb45 100644
--- a/sys-fs/udev/Manifest
+++ b/sys-fs/udev/Manifest
@@ -1,17 +1,19 @@
MD5 45b0f8041be46a9e278397cd99ad9076 udev-009.ebuild 2411
-MD5 eb76f204d31f35751f505f71a64adfd9 ChangeLog 2669
+MD5 cb7f0cdff89972d47dcae271a6cb3922 ChangeLog 3876
MD5 bb2f3caf9ec4cb1394ae3c94f2ee7a8c udev-008.ebuild 2063
-MD5 161c2cd6214e575ef76f9fa52e5d6f33 udev-011.ebuild 2783
+MD5 b06a4fc7100a2009a778c8669d1fbb2a udev-011.ebuild 3256
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
MD5 83a432ae3bb1162fe07c5dd0fa3d4fbe udev-007.ebuild 1976
-MD5 cb764c74e2c49c4e99cdc70ad07b7601 files/udev.conf 1014
-MD5 072484ebf826cb6034418ed4335b07f0 files/digest-udev-010 62
+MD5 dbe7dc643caeafddc845fe9269430123 files/udev-011-no-wait-for-sleep.patch 1053
+MD5 b87af7c246fa800c37ddc9bd3497ca54 files/udev.conf 1123
+MD5 3c46e9235b0d541b3e286c9360e7ec09 files/udev-011-ide-devfs-form-fixes.patch 1920
MD5 ad8f3d1f8a8ca711cb8c064a260b4541 files/digest-udev-008 61
MD5 601051b266adc7ea02e420c337f985fd files/digest-udev-011 61
MD5 336d350d91bd382e036d6178cfddf53d files/digest-udev-009 61
MD5 fcb45730f317fcad0c3c577fd16243b2 files/udev-007-check-valid-mode.patch 372
MD5 915a7c2bcdf0cf3e3526ba49753936ec files/digest-udev-007 61
-MD5 c09642b41bb9f6e9c062d68a605e5584 files/ide-devfs-compat.sh 880
MD5 a4c9abce9b6a2c2beeeacff0a604e2e1 files/udev-009-scsi_id-new-sysfs.patch 4357
-MD5 ebe7e518aac9148970c232179352aed5 files/udev.permissions 3122
-MD5 e4b006424b90027318a2c2a24def25a5 files/udev.rules 3761
+MD5 9f644f3f81dc2e5dfe46a169fcb9d659 files/udev.permissions 3253
+MD5 2e5ce093bf8390e3f212149706ed97eb files/udev-011-unlink-before-symlink.patch 772
+MD5 7bbe5e5911d5c569e85a389f4c489e01 files/udev-011-ide-devfs.patch 2565
+MD5 4c26691abc7f47b0329203056cbcbebc files/udev.rules 3554
diff --git a/sys-fs/udev/files/digest-udev-011 b/sys-fs/udev/files/digest-udev-011
new file mode 100644
index 000000000000..60d60733941d
--- /dev/null
+++ b/sys-fs/udev/files/digest-udev-011
@@ -0,0 +1 @@
+MD5 fb230e5fb5ae74e30b8671e40cbf002b udev-011.tar.bz2 961188
diff --git a/sys-fs/udev/files/udev-011-ide-devfs-form-fixes.patch b/sys-fs/udev/files/udev-011-ide-devfs-form-fixes.patch
new file mode 100644
index 000000000000..e80ef262b117
--- /dev/null
+++ b/sys-fs/udev/files/udev-011-ide-devfs-form-fixes.patch
@@ -0,0 +1,62 @@
+--- a/extras/ide-devfs.sh 2003-12-26 02:04:26.982763656 +0200
++++ b/extras/ide-devfs.sh 2003-12-26 02:07:28.360190096 +0200
+@@ -4,11 +4,11 @@
+ # return devfs-names for ide-devices
+ # CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c %3c"
+
+-HOST=${2%\.[0-9]}
+-TARGET=${2#[0-9]\.}
++HOST="${2%\.[0-9]}"
++TARGET="${2#[0-9]\.}"
+
+-if [ -z ${HOST#[13579]} ]; then
+- HOST=`expr $HOST - 1`
++if [ -z "${HOST#[13579]}" ]; then
++ HOST=`expr ${HOST} - 1`
+ BUS="1"
+ else
+ BUS="0"
+@@ -18,30 +18,30 @@
+ local x=
+ local num=0
+ local MEDIA=
+- local DRIVE=${1%[0-9]*}
++ local DRIVE="${1%[0-9]*}"
+
+ for x in /proc/ide/*/media; do
+- if [ -e "$x" ]; then
+- MEDIA=`cat $x`
+- if [ "$MEDIA" = "$2" ]; then
+- num=`expr $num + 1`
++ if [ -e "${x}" ]; then
++ MEDIA=`cat ${x}`
++ if [ "${MEDIA}" = "$2" ]; then
++ num=`expr ${num} + 1`
+ fi
+- if [ "$x" = "/proc/ide/$DRIVE/media" ]; then
++ if [ "${x}" = "/proc/ide/${DRIVE}/media" ]; then
+ break
+ fi
+ fi
+ done
+
+- echo `expr $num - 1`
++ echo `expr ${num} - 1`
+ }
+
+ if [ -z "$3" ]; then
+- MEDIA=`cat /proc/ide/$1/media`
+- if [ "$MEDIA" = "cdrom" ]; then
+- echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom`
+- elif [ "$MEDIA" = "disk" ]; then
+- echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/disc discs/disc`get_dev_number $1 disk`/disc
++ MEDIA=`cat /proc/ide/${1}/media`
++ if [ "${MEDIA}" = "cdrom" ]; then
++ echo ${1} ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom`
++ elif [ "${MEDIA}" = "disk" ]; then
++ echo $1 ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/disc discs/disc`get_dev_number $1 disk`/disc
+ fi
+ else
+- echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/part$3 discs/disc`get_dev_number $1 disk`/part$3
++ echo $1 ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/part$3 discs/disc`get_dev_number $1 disk`/part$3
+ fi
diff --git a/sys-fs/udev/files/udev-011-ide-devfs.patch b/sys-fs/udev/files/udev-011-ide-devfs.patch
new file mode 100644
index 000000000000..a9b04d560692
--- /dev/null
+++ b/sys-fs/udev/files/udev-011-ide-devfs.patch
@@ -0,0 +1,86 @@
+diff -Nru a/namedev.c b/namedev.c
+--- a/namedev.c Thu Dec 25 20:27:43 2003
++++ b/namedev.c Thu Dec 25 20:27:43 2003
+@@ -200,11 +200,12 @@
+ case 'D':
+ if (strlen(udev->kernel_number) == 0) {
+ strcat(pos, "disc");
++ dbg("substitute devfs disc");
+ break;
+ }
+ strcat(pos, "part");
+ strcat(pos, udev->kernel_number);
+- dbg("substitute kernel number '%s'", udev->kernel_number);
++ dbg("substitute devfs part number '%s'", udev->kernel_number);
+ break;
+ case 'm':
+ sprintf(pos, "%u", udev->minor);
+@@ -225,12 +226,14 @@
+ num--;
+ pos3 = strsep(&pos2, " ");
+ if (pos3 == NULL) {
+- dbg("requested part of callout string not found");
++ dbg("requested part of callout string is empty");
+ break;
+ }
+ }
+- strcat(pos, pos3);
+- dbg("substitute partial callout output '%s'", pos3);
++ if (pos3) {
++ strcat(pos, pos3);
++ dbg("substitute partial callout output '%s'", pos3);
++ }
+ } else {
+ strcat(pos, udev->callout_value);
+ dbg("substitute callout output '%s'", udev->callout_value);
+diff -Nru a/extras/ide-devfs.sh b/extras/ide-devfs.sh
+--- a/extras/ide-devfs.sh Thu Dec 25 23:53:20 2003
++++ b/extras/ide-devfs.sh Thu Dec 25 23:53:20 2003
+@@ -2,7 +2,7 @@
+
+ # udev CALLOUT script
+ # return devfs-names for ide-devices
+-# CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c"
++# CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c %3c"
+
+ HOST=${2%\.[0-9]}
+ TARGET=${2#[0-9]\.}
+@@ -14,14 +14,34 @@
+ BUS="0"
+ fi
+
++get_dev_number() {
++ local x=
++ local num=0
++ local MEDIA=
++ local DRIVE=${1%[0-9]*}
++
++ for x in /proc/ide/*/media; do
++ if [ -e "$x" ]; then
++ MEDIA=`cat $x`
++ if [ "$MEDIA" = "$2" ]; then
++ num=`expr $num + 1`
++ fi
++ if [ "$x" = "/proc/ide/$DRIVE/media" ]; then
++ break
++ fi
++ fi
++ done
++
++ echo `expr $num - 1`
++}
++
+ if [ -z "$3" ]; then
+ MEDIA=`cat /proc/ide/$1/media`
+ if [ "$MEDIA" = "cdrom" ]; then
+- echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/cd
++ echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom`
+ elif [ "$MEDIA" = "disk" ]; then
+- echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/disc
++ echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/disc discs/disc`get_dev_number $1 disk`/disc
+ fi
+ else
+- echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/part$3
++ echo $1 ide/host$HOST/bus$BUS/target$TARGET/lun0/part$3 discs/disc`get_dev_number $1 disk`/part$3
+ fi
+-
diff --git a/sys-fs/udev/files/udev-011-no-wait-for-sleep.patch b/sys-fs/udev/files/udev-011-no-wait-for-sleep.patch
new file mode 100644
index 000000000000..9d6c3c9ff162
--- /dev/null
+++ b/sys-fs/udev/files/udev-011-no-wait-for-sleep.patch
@@ -0,0 +1,40 @@
+--- a/namedev.c 2003-12-26 00:45:50.065844024 +0200
++++ b/namedev.c 2003-12-26 00:47:14.761968256 +0200
+@@ -634,6 +634,7 @@
+ struct sysfs_device *sysfs_device;
+ struct sysfs_class_device *class_dev_parent;
+ int loop;
++ int wait = 1;
+ char filename[SYSFS_PATH_MAX + 6];
+ int retval;
+ char *temp;
+@@ -668,6 +669,9 @@
+ }
+ strcat(filename, "/device");
+
++ if (getenv("UDEV_NO_SLEEP") != NULL)
++ wait = 0;
++
+ loop = 2;
+ while (loop--) {
+ struct stat buf;
+@@ -676,7 +680,8 @@
+ if (!retval)
+ break;
+ /* sleep to give the kernel a chance to create the device file */
+- sleep(1);
++ if (wait)
++ sleep(1);
+ }
+
+ loop = 1; /* FIXME put a real value in here for when everything is fixed... */
+@@ -694,7 +699,8 @@
+ * to wait for the device properly. Once the libsysfs code is
+ * fixed properly, this sleep should go away, and we can just loop above.
+ */
+- sleep(1);
++ if (wait)
++ sleep(1);
+ dbg("really is a partition");
+ class_dev_parent = sysfs_get_classdev_parent(class_dev);
+ if (class_dev_parent == NULL) {
diff --git a/sys-fs/udev/files/udev-011-unlink-before-symlink.patch b/sys-fs/udev/files/udev-011-unlink-before-symlink.patch
new file mode 100644
index 000000000000..66548d8ea000
--- /dev/null
+++ b/sys-fs/udev/files/udev-011-unlink-before-symlink.patch
@@ -0,0 +1,27 @@
+--- a/udev-add.c 2003-12-26 13:41:06.237311088 +0200
++++ b/udev-add.c 2003-12-26 13:45:54.004563816 +0200
+@@ -100,6 +100,7 @@
+
+ static int create_node(struct udevice *dev)
+ {
++ struct stat stats;
+ char filename[255];
+ char linktarget[255];
+ char *linkname;
+@@ -221,6 +222,16 @@
+ strcpy(linktarget, "./");
+ strcat(linktarget, &dev->name[tail]);
+
++ /* unlink existing non-directories to ensure that our symlink
++ * is created */
++ if (lstat(filename, &stats) == 0) {
++ if ((stats.st_mode & S_IFMT) != S_IFDIR) {
++ if (unlink(filename))
++ dbg("unlink(%s) failed with error '%s'",
++ filename, strerror(errno));
++ }
++ }
++
+ dbg("symlink(%s, %s)", linktarget, filename);
+ retval = symlink(linktarget, filename);
+ if (retval)
diff --git a/sys-fs/udev/files/udev.conf b/sys-fs/udev/files/udev.conf
index 59cbeeb0adc6..d84b33aab84a 100644
--- a/sys-fs/udev/files/udev.conf
+++ b/sys-fs/udev/files/udev.conf
@@ -1,5 +1,5 @@
-# udev.conf
-# The main config file for udev
+# /etc/udev/udev.conf: main config file for udev
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.conf,v 1.2 2003/12/26 23:32:44 azarah Exp $
#
# This file can be used to override some of udev's default values
# for where it looks for files, and where it places device nodes.
@@ -9,7 +9,9 @@
udev_root="/dev/"
# udev_db - The name and location of the udev database.
-udev_db="/etc/udev/udev.tdb"
+# NOTE: this should be somewhere that is writable before
+# / is mounted rw, like /dev ...
+udev_db="/dev/.udev.tdb"
# udev_rules - The name and location of the udev rules file
udev_rules="/etc/udev/udev.rules"
diff --git a/sys-fs/udev/files/udev.permissions b/sys-fs/udev/files/udev.permissions
index 2a80ff53c5fe..7cb42223fb32 100644
--- a/sys-fs/udev/files/udev.permissions
+++ b/sys-fs/udev/files/udev.permissions
@@ -1,9 +1,21 @@
# /etc/udev/udev.permissions: permission/ownership map for udev
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.permissions,v 1.2 2003/12/26 23:32:44 azarah Exp $
-# <console>
-console:root:root:0600
-tty[0-9][0-9]*:root:root:0600
-# <serial+dialup>
+# console devices
+console:root:tty:0600
+tty[0-9][0-9]*:root:tty:0660
+vc/[0-9]*:root:tty:0660
+
+# pty devices
+# Set this to 0660 if you only want users belonging to tty group
+# to be able to allocate PTYs
+ptmx:root:tty:0666
+pty[p-za-e][0-9a-f]*:root:tty:0660
+tty[p-za-e][0-9a-f]*:root:tty:0660
+pty/m*:root:tty:0660
+vc/s*:root:tty:0660
+
+# serial+dialup devices
ttyS*:root:tty:0660
ippp*:root:tty:0660
isdn*:root:tty:0660
@@ -11,9 +23,21 @@ isdnctrl*:root:tty:0660
capi*:root:tty:0660
dcbri*:root:tty:0660
ircomm*:root:tty:0660
-# <floppy>
+ttyUSB*:root:usb:0660
+tts/[0-9]*:root:tty:0660
+tts/USB[0-9]*:root:usb:0660
+
+# vc devices
+vcs:root:root:0600
+vcs[0-9]*:root:root:0600
+vcsa:root:root:0600
+vcsa[0-9]*:root:root:0600
+vcc/*:root:root:0600
+
+# floppy devices
fd[01]*:root:floppy:0660
-# <sound>
+
+# audio devices
dsp*:root:audio:0660
audio*:root:audio:0660
midi*:root:audio:0660
@@ -29,70 +53,94 @@ amidi*:root:audio:0660
dmfm*:root:audio:0660
dmmidi*:root:audio:0660
sndstat:root:audio:0660
-# <cdrom>
+
+# optical devices
sr*:root:cdrom:660
scd*:root:cdrom:660
pcd*:root:cdrom:0660
cdrom*:root:cdrom:0660
dvd:root:cdrom:0660
rdvd:root:cdrom:0660
-# <pilot>
+cdroms/*:root:cdrom:0660
+
+# pilot/palm devices
pilot:root:uucp:0660
-# <jaz>
+
+# jaz devices
jaz*:root:disk:0660
-# <zip>
+
+# zip devices
pocketzip*:root:disk:0660
zip*:root:disk:0660
-# <ls120>
+
+# ls120 devices
ls120:root:disk:0660
ls120*:root:disk:0660
-# <lp>
+
+# lp devices
lp*:root:lp:0660
parport*:root:lp:0660
irlpt*:root:lp:0660
usblp*:root:lp:0660
usb/lp*:root:lp:0660
-# <scanner>
+
+# scanner devices
scanner:root:root:0600
usb/scanner*:root:root:0600
-# <camera>
+
+# camera devices
camera*:root:root:0600
usb/dc2xx*:root:root:0600
usb/mdc800*:root:root:0600
-# <raw>
+
+# raw devices
ram*:root:disk:660
raw/*:root:disk:660
-# <disk>
+
+# disk devices
hd*:root:disk:660
sd*:root:disk:660
dasd*:root:disk:660
ataraid*:root:disk:660
loop*:root:disk:660
md*:root:disk:660
-# <tape>
+ide/*/*/*/*/*:root:disk:660
+discs/*/*:root:disk:660
+loop/*:root:disk:660
+md/*:root:disk:660
+
+# tape devices
ht*:root:tape:0660
nht*:root:tape:0660
-pt*:root:tape:0660
+pt[0-9]*:root:tape:0660
npt*:root:tape:0660
st*:root:tape:0660
nst*:root:tape:0660
-# <memstick>
+
+# memstick devices
memstick*:root:root:0600
-# <flash>
+
+# flash devices
flash*:root:root:0600
-# <diskonkey>
+
+# diskonkey devices
diskonkey*:root:disk:0660
-# <rem_ide>
+
+# rem_ide devices
microdrive*:root:disk:0660
-# <fb>
+
+# fb devices
fb:root:root:0600
fb[0-9]*:root:root:0600
fb/*:root:root:0600
-# <kbd>
+
+# kbd devices
kbd:root:root:0600
-# <joystick>
+
+# joystick devices
js[0-9]*:root:root:0600
-# <v4l>
+
+# v4l devices
video*:root:video:0660
radio*:root:video:0660
winradio*:root:video:0660
@@ -100,22 +148,29 @@ vtx*:root:video:0660
vbi*:root:video:0660
video/*:root:video:0660
vttuner:root:video:0660
-# <input>
+v4l/*:root:video:0660
+
+# input devices
input/*:root:root:644
-# <gpm>
+
+# gpm devices
gpmctl:root:root:0700
-# <dri>
+
+# dri devices
nvidia*:root:video:0660
3dfx*:root:video:0660
-# <mainboard>
+dri/*:root:video:0660
+
+# mainboard devices
apm_bios:root:root:0600
-# <scsi>
+
+# scsi devices
sg*:root:disk:0660
pg*:root:disk:0660
cdwriter:root:disk:0660
-# <usb>
+
+# usb devices
usb/dabusb*:root:usb:0660
usb/mdc800*:root:usb:0660
usb/rio500:root:usb:0660
-ttyUSB*:root:usb:0660
diff --git a/sys-fs/udev/files/udev.rules b/sys-fs/udev/files/udev.rules
new file mode 100644
index 000000000000..360c5565687d
--- /dev/null
+++ b/sys-fs/udev/files/udev.rules
@@ -0,0 +1,97 @@
+# /etc/udev/udev.rules: device naming rules for udev
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.rules,v 1.1 2003/12/26 23:32:44 azarah Exp $
+#
+# There are a number of modifiers that are allowed to be used in the NAME or PROGRAM fields.
+# They provide the following subsitutions:
+# %n - the "kernel number" of the device.
+# for example, 'sda3' has a "kernel number" of '3'
+# %k - the kernel name for the device.
+# %M - the kernel major number for the device
+# %m - the kernel minor number for the device
+# %b - the bus id for the device
+# %c - the return value for the CALLOUT program (note, this doesn't work within
+# the PROGRAM field for the obvious reason.)
+# %D - use the devfs style disk name for this device.
+# For partitions, this will result in 'part%n'
+# If this is not a partition, it will result in 'disc'
+#
+
+###########################################################
+#
+# Add your own rules here
+#
+###########################################################
+
+# Looking for scsi bus id 42:0:0:1
+CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n test-%b", ID="test-42:0:0:1", NAME="%c"
+
+# A usb camera.
+LABEL, BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
+
+# USB Epson printer to be called lp_epson
+LABEL, BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
+
+# USB HP printer to be called lp_hp
+LABEL, BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
+
+# sound card with PCI bus id 00:0b.0 to be the first sound card
+NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
+
+# sound card with PCI bus id 00:07.1 to be the second sound card
+NUMBER, BUS="pci", ID="00:07.1", NAME="dsp1"
+
+# USB mouse plugged into the third port of the first hub to be called mouse0
+TOPOLOGY, BUS="usb", PLACE="1.3", NAME="mouse0"
+
+# USB tablet plugged into the third port of the second hub to be called mouse1
+TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
+TOPOLOGY, BUS="usb", PLACE="2.4", NAME="mouse2"
+
+# ttyUSB1 should always be called visor
+REPLACE, KERNEL="ttyUSB1", NAME="visor"
+REPLACE, KERNEL="ttyUSB0", NAME="pl2303"
+
+
+###########################################################
+#
+# For devfs similar /dev layout (neater)
+#
+###########################################################
+
+# devfs-names for ide-devices (uncomment only one)
+# /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
+CALLOUT, BUS="ide", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c %3c"
+
+# fb devices
+REPLACE, KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
+
+# loop devices
+REPLACE, KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
+
+# md block devices
+REPLACE, KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="%k"
+
+# pty devices
+REPLACE, KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k"
+REPLACE, KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k"
+
+# ram devices
+REPLACE, KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
+
+# tty devices
+REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k"
+REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k"
+REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
+
+# vc devices
+REPLACE, KERNEL="vcs", NAME="vcc/0", SYMLINK="%k"
+REPLACE, KERNEL="vcs[0-9]*", NAME="vcc/%n", SYMLINK="%k"
+REPLACE, KERNEL="vcsa", NAME="vcc/a0", SYMLINK="%k"
+REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k"
+
+# v4l devices
+REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
+REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
+REPLACE, KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
+REPLACE, KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"
+
diff --git a/sys-fs/udev/udev-011.ebuild b/sys-fs/udev/udev-011.ebuild
new file mode 100644
index 000000000000..0bc4558f6292
--- /dev/null
+++ b/sys-fs/udev/udev-011.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-011.ebuild,v 1.1 2003/12/26 23:32:44 azarah Exp $
+
+# Note: Cannot use external libsysfs with klibc ..
+USE_KLIBC="no"
+USE_EXT_LIBSYSFS="no"
+
+inherit eutils
+
+DESCRIPTION="Linux dynamic device naming support (aka userspace devfs)"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ"
+SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+
+DEPEND="virtual/glibc
+ >=sys-apps/hotplug-20030805-r1
+ >=sys-fs/sysfsutils-0.3.0"
+
+RDEPEND="${DEPEND}
+ >=sys-apps/baselayout-1.8.6.12-r3"
+# We need some changes for devfs type layout
+
+pkg_setup() {
+ [ "${USE_KLIBC}" = "yes" ] && check_KV
+
+ return 0
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ # No need to clutter the logs ...
+ sed -ie '/^DEBUG/ c\DEBUG = false' Makefile
+ # Do not use optimization flags from the package
+ sed -ie 's|$(OPTIMIZATION)||g' Makefile
+
+ # Make sure there is no sudden changes to udev.rules.devfs
+ # (more for my own needs than anything else ...)
+ if [ "`md5sum < "${S}/udev.rules.devfs"`" != \
+ "a16769804b6038c7def00012c47b84c5 -" ]
+ then
+ echo
+ eerror "udev.rules.devfs has been updated, please validate!"
+ die "udev.rules.devfs has been updated, please validate!"
+ fi
+
+ # Make sure we do not build included libsysfs, but link to
+ # one in sysfsutils ...
+ if [ "${USE_EXT_LIBSYSFS}" = "yes" -a "${USE_KLIBC}" != "yes" ]
+ then
+ rm -rf ${S}/libsysfs
+ cp -Rd ${ROOT}/usr/include/sysfs ${S}/libsysfs
+ fi
+
+ # Setup things for klibc
+ if [ "${USE_KLIBC}" = "yes" ]
+ then
+ ln -snf ${ROOT}/usr/src/linux ${S}/klibc/linux
+ fi
+
+ # Improve ide devfs symlink stuff
+ epatch ${FILESDIR}/${P}-ide-devfs.patch
+ # Some quoting/brace fixes
+ epatch ${FILESDIR}/${P}-ide-devfs-form-fixes.patch
+
+ # Do not sleep if UDEV_NO_SLEEP is set
+ epatch ${FILESDIR}/${P}-no-wait-for-sleep.patch
+
+ # First unlink an existing file/symlink/node/fifo/socket *before*
+ # we create a symlink, else it will fail.
+ epatch ${FILESDIR}/${P}-unlink-before-symlink.patch
+}
+
+src_compile() {
+ # Do not work with emake
+ if [ "${USE_EXT_LIBSYSFS}" = "yes" -a "${USE_KLIBC}" != "yes" ]
+ then
+ make EXTRAS="extras/scsi_id" \
+ udevdir="/dev/" \
+ ARCH_LIB_OBJS="-lsysfs" \
+ SYSFS="" || die
+ else
+ make EXTRAS="extras/scsi_id" \
+ udevdir="/dev/" || die
+ fi
+}
+
+src_install() {
+ into /
+ dosbin udev
+ dosbin extras/scsi_id/scsi_id
+
+ exeinto /etc/udev/scripts
+ doexe extras/ide-devfs.sh
+
+ insinto /etc/udev
+ doins ${FILESDIR}/udev.conf
+# newins udev.rules udev.rules.example
+ # For devfs style layout
+ doins ${FILESDIR}/udev.rules
+ # Our own custom udev.permissions
+ doins ${FILESDIR}/udev.permissions
+# doins udev.permissions
+ insinto /etc
+ doins extras/scsi_id/scsi_id.config
+
+ dodir /etc/hotplug.d/default
+ dosym ../../../sbin/udev /etc/hotplug.d/default/udev.hotplug
+
+ doman udev.8
+ doman extras/scsi_id/scsi_id.8
+
+ dodoc COPYING ChangeLog FAQ README TODO
+ dodoc docs/{overview,udev-OLS2003.pdf}
+}
+
+pkg_preinst() {
+ if [ -f "${ROOT}/etc/udev/udev.config" -a \
+ ! -f "${ROOT}/etc/udev/udev.rules" ]
+ then
+ mv -f ${ROOT}/etc/udev/udev.config ${ROOT}/etc/udev/udev.rules
+ fi
+}
+