diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-01-16 16:30:19 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-01-16 16:30:19 +0000 |
commit | e45b7590142bd0681cb1fcd1a6d8e52c084de194 (patch) | |
tree | 87f726d877bd80bc7b5f130d1d76e4f5a3551d28 /sys-fs | |
parent | Update version. Update config files to suite new rules syntax. (diff) | |
download | historical-e45b7590142bd0681cb1fcd1a6d8e52c084de194.tar.gz historical-e45b7590142bd0681cb1fcd1a6d8e52c084de194.tar.bz2 historical-e45b7590142bd0681cb1fcd1a6d8e52c084de194.zip |
Update version. Update config files to suite new rules syntax.
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/udev/Manifest | 6 | ||||
-rw-r--r-- | sys-fs/udev/files/digest-udev-013 | 1 | ||||
-rw-r--r-- | sys-fs/udev/files/udev.rules.post_012 | 116 | ||||
-rw-r--r-- | sys-fs/udev/udev-013.ebuild | 136 |
4 files changed, 256 insertions, 3 deletions
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest index 105e86afcda8..3da9d7f72088 100644 --- a/sys-fs/udev/Manifest +++ b/sys-fs/udev/Manifest @@ -1,6 +1,6 @@ -MD5 a19af1e2e874cadb09ab486d2fd343bb udev-013.ebuild 3400 +MD5 39793fbef16989ec7c19fa8ba04370ee udev-013.ebuild 3343 MD5 45b0f8041be46a9e278397cd99ad9076 udev-009.ebuild 2411 -MD5 ef38263dc8992b303a630dc8a7b0acaa ChangeLog 4429 +MD5 a25678475ae80afbb34ea2c94757348b ChangeLog 4619 MD5 bb2f3caf9ec4cb1394ae3c94f2ee7a8c udev-008.ebuild 2063 MD5 a19af1e2e874cadb09ab486d2fd343bb udev-012.ebuild 3400 MD5 1db16c64ca71efbb0b4b02ae14c95abd udev-011.ebuild 3349 @@ -18,7 +18,7 @@ MD5 fcb45730f317fcad0c3c577fd16243b2 files/udev-007-check-valid-mode.patch 372 MD5 478505fe4446f893adbfc4d8db0b2038 files/udev-011-namedev_c-gcc295-compat.patch 529 MD5 8ee2274e54f304cb9dbbe9094982fe94 files/digest-udev-013 62 MD5 915a7c2bcdf0cf3e3526ba49753936ec files/digest-udev-007 61 -MD5 87cc37cc9975fc48dc8229156f71a22c files/udev.rules.post_012 3314 +MD5 a2bd1197ad71d716a020735b5f0f1a38 files/udev.rules.post_012 3854 MD5 a4c9abce9b6a2c2beeeacff0a604e2e1 files/udev-009-scsi_id-new-sysfs.patch 4357 MD5 aba24cfb26a8f0b604a44a0d9ca7f830 files/udev.permissions 3550 MD5 2e5ce093bf8390e3f212149706ed97eb files/udev-011-unlink-before-symlink.patch 772 diff --git a/sys-fs/udev/files/digest-udev-013 b/sys-fs/udev/files/digest-udev-013 new file mode 100644 index 000000000000..fe0ccfac77ad --- /dev/null +++ b/sys-fs/udev/files/digest-udev-013 @@ -0,0 +1 @@ +MD5 ed4ab84d635f4e71bf42bc18a7a4124c udev-013.tar.bz2 1007366 diff --git a/sys-fs/udev/files/udev.rules.post_012 b/sys-fs/udev/files/udev.rules.post_012 new file mode 100644 index 000000000000..a9ec417feae7 --- /dev/null +++ b/sys-fs/udev/files/udev.rules.post_012 @@ -0,0 +1,116 @@ +# /etc/udev/udev.rules: device naming rules for udev +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.rules.post_012,v 1.1 2004/01/16 16:30:06 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 of the external 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 +BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1", NAME="%c" + +# A usb camera. +BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n" + +# USB Epson printer to be called lp_epson +BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson" + +# USB HP printer to be called lp_hp +BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp" + +# sound card with PCI bus id 00:0b.0 to be the first sound card +BUS="pci", ID="00:0b.0", NAME="dsp" + +# sound card with PCI bus id 00:07.1 to be the second sound card +BUS="pci", ID="00:07.1", NAME="dsp1" + +# USB mouse plugged into the third port of the first hub to be called mouse0 +BUS="usb", PLACE="1.3", NAME="mouse0" + +# USB tablet plugged into the third port of the second hub to be called mouse1 +BUS="usb", PLACE="2.3", NAME="mouse1" +BUS="usb", PLACE="2.4", NAME="mouse2" + +# ttyUSB1 should always be called visor +KERNEL="ttyUSB1", NAME="visor" +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 +BUS="ide", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", RESULT="hd*", NAME="%1c", SYMLINK="%2c %3c" + +# alsa devices +KERNEL="controlC[0-9]*", NAME="snd/%k" +KERNEL="hw[CD0-9]*", NAME="snd/%k" +KERNEL="pcm[CD0-9cp]*", NAME="snd/%k" +KERNEL="midi[CD0-9]*", NAME="snd/%k" +KERNEL="timer", NAME="snd/%k" +KERNEL="seq", NAME="snd/%k" + +# dm devices (ignore them) +KERNEL="dm-[0-9]*", NAME="" +KERNEL="device-mapper", NAME="mapper/control" + +# fb devices +KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k" + +# i2c devices +KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k" + +# loop devices +KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k" + +# md block devices +KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="%k" + +# misc devices +KERNEL="rtc", NAME="misc/%k", SYMLINK="%k" +KERNEL="psaux", NAME="misc/%k", SYMLINK="%k" + +# pty devices +KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k" +KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k" + +# ramdisk devices +KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k" + +# tty devices +KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k" +KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k" +KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n" + +# vc devices +KERNEL="vcs", NAME="vcc/0", SYMLINK="%k" +KERNEL="vcs[0-9]*", NAME="vcc/%n", SYMLINK="%k" +KERNEL="vcsa", NAME="vcc/a0", SYMLINK="%k" +KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k" + +# v4l devices +KERNEL="video[0-9]*", NAME="v4l/video%n" +KERNEL="radio[0-9]*", NAME="v4l/radio%n" +KERNEL="vbi[0-9]*", NAME="v4l/vbi%n" +KERNEL="vtx[0-9]*", NAME="v4l/vtx%n" + diff --git a/sys-fs/udev/udev-013.ebuild b/sys-fs/udev/udev-013.ebuild new file mode 100644 index 000000000000..a702c91df31c --- /dev/null +++ b/sys-fs/udev/udev-013.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-013.ebuild,v 1.1 2004/01/16 16:30:06 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}/etc/udev/udev.rules.devfs"`" != \ + "aca42692f862b0787212345f9dd8082c -" ] + 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 + + # Do not sleep if UDEV_NO_SLEEP is set + epatch ${FILESDIR}/${PN}-011-no-wait-for-sleep.patch +} + +src_compile() { + local myconf= + + # DBUS support? + if which pkg-config &>/dev/null && pkg-config dbus-1 &>/dev/null + then + myconf="USE_DBUS=true" + fi + + # 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="" \ + ${myconf} || die + else + make EXTRAS="extras/scsi_id" \ + udevdir="/dev/" \ + ${myconf} || 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 etc/udev/udev.rules udev.rules.example + # For devfs style layout + newins ${FILESDIR}/udev.rules.post_012 udev.rules + # Our own custom udev.permissions + doins ${FILESDIR}/udev.permissions +# doins etc/udev/udev.permissions + insinto /etc + doins extras/scsi_id/scsi_id.config + # DBUS support? + if which pkg-config &>/dev/null && pkg-config dbus-1 &>/dev/null + then + insinto /etc/dbus-1/system.d + doins etc/dbus-1/system.d/udev_sysbus_policy.conf + fi + + 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,udev_vs_devfs} +} + +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 +} + |