diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2008-06-18 12:27:59 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2008-06-18 12:27:59 +0000 |
commit | 015b94b78c0c71ebbd0c3221684dad3a5220b60b (patch) | |
tree | 285e548eeac1c5c01ac655d59432756b6fb200b7 /sys-fs | |
parent | Add missing init.d script. (diff) | |
download | gentoo-2-015b94b78c0c71ebbd0c3221684dad3a5220b60b.tar.gz gentoo-2-015b94b78c0c71ebbd0c3221684dad3a5220b60b.tar.bz2 gentoo-2-015b94b78c0c71ebbd0c3221684dad3a5220b60b.zip |
Removed old ebuilds.
(Portage version: 2.1.5.6)
Diffstat (limited to 'sys-fs')
58 files changed, 33 insertions, 8444 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog index 004466dd2326..704dd18e12b2 100644 --- a/sys-fs/udev/ChangeLog +++ b/sys-fs/udev/ChangeLog @@ -1,6 +1,38 @@ # ChangeLog for sys-fs/udev # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.389 2008/06/15 05:54:32 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.390 2008/06/18 12:27:58 zzam Exp $ + + 18 Jun 2008; Matthias Schwarzott <zzam@gentoo.org> + -files/05-udev-early.rules-104-r5, -files/udev.rules-104-r10, + -files/udev-104-netif-rename-busywait.patch, + -files/udev-104-peristent-net-disable-xen.patch, + -files/udev-104-persistent-net-fix-name-dups.patch, + -files/udev-start-104-r12.sh, -files/udev-start-104-r13.sh, + -files/udev-stop-104-r13.sh, -files/udev-stop-104-r8.sh, + -files/udev-105-unlink-db-files.patch, -files/udev-105-vol_id-fix.patch, + -files/modprobe-105.sh, -files/05-udev-early.rules-106-r5, + -files/udev-start-110-r1.sh, -files/udev-stop-110-r1.sh, + -files/udev-start-111-r3.sh, -files/udev-112-rules.diff, + -files/udev-113-r1-rules.diff, -files/udev-113-r2-rules.diff, + -files/udev-114-fix-persistent-net.diff, -files/95-net.rules, + -files/modprobe-111-r1.sh, -files/udev-115-add-special-rule-files.diff, + -files/95-udev-late.rules, -files/modprobe-104-r12.sh, + -files/modprobe-113-r2.sh, -files/udev-115-fix-modprobe-calls.diff, + -files/udev-start-115-r3.sh, -files/udev-start-115-r6.sh, + -files/udev-115-rules-update.diff, + -files/udev-115-update-gentoo-rules-2.diff, + -files/udev-116-gentoo-rules-update.diff, + -files/udev-116-path-to-logger.diff, -files/udev-start-118-r1.sh, + -files/udev-start-119-r1.sh, -files/udev-121-cdrom_id-segfault.diff, + -files/move_tmp_persistent_rules.sh, -files/seq_node.sh, + -files/udev.conf.115-r6, -files/udev.conf.post_081, + -files/udev.conf.post_108, -files/udev.conf.post_115, -udev-114-r1.ebuild, + -udev-114-r2.ebuild, -udev-115.ebuild, -udev-115-r5.ebuild, + -udev-115-r6.ebuild, -udev-116.ebuild, -udev-116-r1.ebuild, + -udev-117.ebuild, -udev-118.ebuild, -udev-118-r1.ebuild, + -udev-118-r2.ebuild, -udev-118-r3.ebuild, -udev-119-r1.ebuild, + -udev-120.ebuild, -udev-121.ebuild: + Removed old ebuilds. 15 Jun 2008; Zac Medico <zmedico@gentoo.org> udev-114.ebuild, udev-114-r1.ebuild, udev-114-r2.ebuild, udev-115.ebuild, diff --git a/sys-fs/udev/files/05-udev-early.rules-104-r5 b/sys-fs/udev/files/05-udev-early.rules-104-r5 deleted file mode 100644 index b4d24ae21698..000000000000 --- a/sys-fs/udev/files/05-udev-early.rules-104-r5 +++ /dev/null @@ -1,13 +0,0 @@ -# ignore these events until someone needs them -SUBSYSTEM=="drivers", OPTIONS="ignore_device" -SUBSYSTEM=="module", OPTIONS="ignore_device" - -# sysfs is populated after the event is sent -ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" - -# Set IN_HOTPLUG for compatibility with init-scripts called from udev -ENV{IN_HOTPLUG}="1" - diff --git a/sys-fs/udev/files/05-udev-early.rules-106-r5 b/sys-fs/udev/files/05-udev-early.rules-106-r5 deleted file mode 100644 index ecf079c05765..000000000000 --- a/sys-fs/udev/files/05-udev-early.rules-106-r5 +++ /dev/null @@ -1,13 +0,0 @@ -# ignore these events until someone needs them -SUBSYSTEM=="drivers", OPTIONS="ignore_device" -SUBSYSTEM=="module", OPTIONS="ignore_device" - -# sysfs is populated after the event is sent -ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" - -# Set IN_HOTPLUG for compatibility with init-scripts called from udev -ENV{IN_HOTPLUG}="1" - diff --git a/sys-fs/udev/files/95-net.rules b/sys-fs/udev/files/95-net.rules deleted file mode 100644 index 182e8738f6a8..000000000000 --- a/sys-fs/udev/files/95-net.rules +++ /dev/null @@ -1,15 +0,0 @@ -# /etc/udev/rules/95-net.rules: device naming rules for udev -# -# Gentoo specific rules -# -# There are a number of modifiers that are allowed to be used in some of the -# fields. See the udev man page for a full description of them. -# -# Try not to modify this file, if you wish to change things, create a new rule -# file that can be run before this one. -# - -# Activate our network if we can -SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start", OPTIONS="last_rule" -SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop", OPTIONS="last_rule" - diff --git a/sys-fs/udev/files/95-udev-late.rules b/sys-fs/udev/files/95-udev-late.rules deleted file mode 100644 index 5d7a6a8a4e17..000000000000 --- a/sys-fs/udev/files/95-udev-late.rules +++ /dev/null @@ -1,21 +0,0 @@ -# /etc/udev/rules/95-udev-late.rules: device naming rules for udev -# -# Gentoo specific rules -# -# There are a number of modifiers that are allowed to be used in some of the -# fields. See the udev man page for a full description of them. -# -# Try not to modify this file, if you wish to change things, create a new rule -# file that can be run before this one. -# - -# Activate our network if we can -SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start" -SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop" - -# debug events to /events, but not on default udev_log="err" -ENV{UDEV_LOG}=="[4-9]", RUN+="eventrecorder.sh" - -# event to be catched by udevmonitor -RUN+="socket:/org/kernel/udev/monitor" - diff --git a/sys-fs/udev/files/modprobe-104-r12.sh b/sys-fs/udev/files/modprobe-104-r12.sh deleted file mode 100755 index 500fd9c8e527..000000000000 --- a/sys-fs/udev/files/modprobe-104-r12.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# Do not continue for non-modular kernel - Bug #168322 -[ ! -f /proc/modules ] && exit 0 - -if [[ -e /dev/.udev_populate ]]; then - # Enable verbose while called from udev-addon-start - source /dev/.udev_populate - - if [[ -c ${CONSOLE} ]]; then - # redirect stdin/out/err - exec <${CONSOLE} &>${CONSOLE} - fi -fi - -. /etc/init.d/functions.sh - -MODPROBE=/sbin/modprobe -MODLIST=$("${MODPROBE}" -q -i --show-depends "${@}" | sed "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" | sed 's|-|_|g') - -[[ -z ${MODLIST} ]] && exit 0 -for m in ${MODLIST}; do - LAST=$m -done - -# check for blacklisting -if [[ -f /etc/modprobe.conf ]]; then - if grep -q '^blacklist.*[[:space:]]'"${LAST}"'\([[:space:]]\|$\)' /etc/modprobe.conf; then - # module blacklisted - exit 0 - fi -fi - -# check if loaded -if ! grep -q "^${LAST}[[:space:]]" /proc/modules; then - # now do real loading - einfo " udev loading module ${LAST}" - exec "${MODPROBE}" -q "${@}" -fi - diff --git a/sys-fs/udev/files/modprobe-105.sh b/sys-fs/udev/files/modprobe-105.sh deleted file mode 100755 index 8f5d9d0778e9..000000000000 --- a/sys-fs/udev/files/modprobe-105.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# Do not continue for non-modular kernel - Bug #168322 -[ ! -f /proc/modules ] && exit 0 - -if [ -e /dev/.udev_populate ]; then - # Enable verbose while called from udev-addon-start - . /dev/.udev_populate - - if [ -c "${CONSOLE}" ]; then - # redirect stdin/out/err - exec <${CONSOLE} >${CONSOLE} 2>/${CONSOLE} - fi -fi - -. /etc/init.d/functions.sh - -MODPROBE=/sbin/modprobe -MODLIST=$("${MODPROBE}" -q -i --show-depends "${@}" 2>/dev/null \ - | sed -e "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" -e 's|-|_|g') - -# exit if you have no modules to load -[ -z "${MODLIST}" ] && exit 0 -for m in ${MODLIST}; do - MODNAME=$m -done - -# check for blacklisting -if [ -f /etc/modprobe.conf ]; then - if grep -q '^blacklist.*[[:space:]]'"${MODNAME}"'\([[:space:]]\|$\)' /etc/modprobe.conf; then - # module blacklisted - exit 0 - fi -fi - -# check if loaded -if ! grep -q "^${MODNAME}[[:space:]]" /proc/modules; then - # now do real loading - einfo " udev loading module ${MODNAME}" - exec "${MODPROBE}" -q "${@}" -fi - diff --git a/sys-fs/udev/files/modprobe-111-r1.sh b/sys-fs/udev/files/modprobe-111-r1.sh deleted file mode 100755 index 7516096e8457..000000000000 --- a/sys-fs/udev/files/modprobe-111-r1.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -# Do not continue for non-modular kernel - Bug #168322 -[ ! -f /proc/modules ] && exit 0 - -if [ -e /dev/.udev_populate ]; then - # Enable verbose while called from udev-addon-start - . /dev/.udev_populate - - if [ -c "${CONSOLE}" ]; then - # redirect stdin/out/err - exec <${CONSOLE} >${CONSOLE} 2>/${CONSOLE} - fi -fi - -. /etc/init.d/functions.sh - -MODPROBE=/sbin/modprobe - -# Create a lock file for the current module. -lock_modprobe() { - [ -e /dev/.udev/ ] || return 0 - - MODPROBE_LOCK="/dev/.udev/.lock-modprobe-${MODNAME}" - - retry=20 - while ! mkdir "$MODPROBE_LOCK" 2> /dev/null; do - if [ $retry -eq 0 ]; then - ewarn "Could lock modprobe ${MODNAME}!" - return 1 - fi - sleep 1 - retry=$(($retry - 1)) - done - return 0 -} - -unlock_modprobe() { - [ "$MODPROBE_LOCK" ] || return 0 - rmdir "$MODPROBE_LOCK" || true -} - -MODLIST=$("${MODPROBE}" -q -i --show-depends "${@}" 2>/dev/null \ - | sed -e "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" -e 's|-|_|g') - -# exit if you have no modules to load -[ -z "${MODLIST}" ] && exit 0 -for m in ${MODLIST}; do - MODNAME=$m -done - -# check for blacklisting -if [ -f /etc/modprobe.conf ]; then - if grep -q '^blacklist.*[[:space:]]'"${MODNAME}"'\([[:space:]]\|$\)' /etc/modprobe.conf; then - # module blacklisted - exit 0 - fi -fi - -lock_modprobe -# check if loaded -if ! grep -q "^${MODNAME}[[:space:]]" /proc/modules; then - # now do real loading - einfo " udev loading module ${MODNAME}" - "${MODPROBE}" -q "${@}" >/dev/null 2>/dev/null -fi -unlock_modprobe - diff --git a/sys-fs/udev/files/modprobe-113-r2.sh b/sys-fs/udev/files/modprobe-113-r2.sh deleted file mode 100755 index 86bcec2629fb..000000000000 --- a/sys-fs/udev/files/modprobe-113-r2.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# Do not continue for non-modular kernel - Bug #168322 -[ ! -f /proc/modules ] && exit 0 - -if [ -e /dev/.udev_populate ]; then - # Enable verbose while called from udev-addon-start - . /dev/.udev_populate - - if [ -c "${CONSOLE}" ]; then - # redirect stdin/out/err - exec <${CONSOLE} >${CONSOLE} 2>/${CONSOLE} - fi -fi - -# set default if not present in udev.conf -implicitly_blacklist_modules_autoload="yes" -MODPROBE=/sbin/modprobe - -. /etc/init.d/functions.sh -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf - - -# Create a lock file for the current module. -lock_modprobe() { - [ -e /dev/.udev/ ] || return 0 - - MODPROBE_LOCK="/dev/.udev/.lock-modprobe-${MODNAME}" - - retry=20 - while ! mkdir "$MODPROBE_LOCK" 2> /dev/null; do - if [ $retry -eq 0 ]; then - ewarn "Could lock modprobe ${MODNAME}!" - return 1 - fi - sleep 1 - retry=$(($retry - 1)) - done - return 0 -} - -unlock_modprobe() { - [ "$MODPROBE_LOCK" ] || return 0 - rmdir "$MODPROBE_LOCK" || true -} - -# Get normalized names only with _ -MODLIST=$("${MODPROBE}" -q -i --show-depends "${@}" 2>/dev/null \ - | sed -e "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" -e 's|-|_|g') - -# exit if you have no modules to load -[ -z "${MODLIST}" ] && exit 0 -for m in ${MODLIST}; do - MODNAME=$m -done - -# build regex to match module name written with either - or _ -MOD_REGEX="$(echo "${MODNAME}"|sed -e 's#_#[-_]#g')" - -# check for blacklisting -if [ -f /etc/modprobe.conf ]; then - if grep -q '^blacklist.*[[:space:]]'"${MOD_REGEX}"'\([[:space:]]\|$\)' /etc/modprobe.conf; then - # module blacklisted - exit 0 - fi -fi - -if [ "$implicitly_blacklist_modules_autoload" = "yes" -a -f "${MODULES_AUTOLOAD_FILE}" ]; then - if grep -q "^${MOD_REGEX}"'\([[:space:]]\|$\)' "${MODULES_AUTOLOAD_FILE}"; then - # module implictly blacklisted - # as present in modules.autoload, Bug 184833 - exit 0 - fi -fi - -lock_modprobe -# check if loaded -if ! grep -q "^${MODNAME}[[:space:]]" /proc/modules; then - # now do real loading - einfo " udev loading module ${MODNAME}" - "${MODPROBE}" -q "${@}" >/dev/null 2>/dev/null -fi -unlock_modprobe - diff --git a/sys-fs/udev/files/move_tmp_persistent_rules.sh b/sys-fs/udev/files/move_tmp_persistent_rules.sh deleted file mode 100755 index e87e29380ee9..000000000000 --- a/sys-fs/udev/files/move_tmp_persistent_rules.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# store persistent-rules that got created while booting -# when / was still read-only -store_persistent_rules() { - local file dest - - for file in /dev/.udev/tmp-rules--*; do - dest=${file##*tmp-rules--} - [ "$dest" = '*' ] && break - type=${dest##70-persistent-} - type=${type%%.rules} - einfo "Saving udev persistent ${type} rules to /etc/udev/rules.d" - cat "$file" >> /etc/udev/rules.d/"$dest" - rm -f "$file" - done -} - -store_persistent_rules - -# vim:ts=4 diff --git a/sys-fs/udev/files/seq_node.sh b/sys-fs/udev/files/seq_node.sh deleted file mode 100755 index 93a6ed9881dc..000000000000 --- a/sys-fs/udev/files/seq_node.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Author: Martin Schlemmer <azarah@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/seq_node.sh,v 1.2 2006/07/05 09:06:06 azarah Exp $ - -# Stupid little script to emulate the depriciated '%e' directive of udev. -# I am not sure why its supposidly broken, so this might need fixing if it -# have the same issue as '%e'. -# -# Usage: seq_node.sh <root> <kernel name> <wanted node> -# -# root - root of udev (usuall /dev) -# kernel name - kernel name for device -# wanted node - needed free node -# -# Example: seq_node.sh %r %k cdrom -# -# If called as above, it should return 'cdrom' if free, else 'cdrom1', -# 'cdrom2', etc. It also checks if an existing node was already created for -# the specific 'kernel name'. -# - -root=$1 -kname=$2 -node=$3 - -count=0 -new_node=${node} - -if [[ -z ${root} || -z ${kname} || -z ${node} ]] ; then - exit 1 -fi - -get_filename() { - local symlink=$1 - local filename= - - if [[ ! -L ${root}/${symlink} ]] ; then - echo "${symlink}" - return 0 - fi - - if type -p readlink &>/dev/null ; then - filename=$(readlink "${root}/${symlink}") - else - filename=$(perl -e "print readlink(\"${root}/${symlink}\")" 2>/dev/null) - fi - - echo "${filename}" -} - -while [[ -e "${root}/${new_node}" || -L "${root}/${new_node}" ]] ; do - # Check if existing node is the same as the kname we are looking - # for a new node, and return that instead - if [[ $(get_filename "${new_node}") == "${kname}" ]] ; then - break - fi - - let "count += 1" - new_node="${node}${count}" -done - -echo "${new_node}" - -exit 0 - diff --git a/sys-fs/udev/files/udev-104-netif-rename-busywait.patch b/sys-fs/udev/files/udev-104-netif-rename-busywait.patch deleted file mode 100644 index 9aa899b3e070..000000000000 --- a/sys-fs/udev/files/udev-104-netif-rename-busywait.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- udev-104-orig/udev_device.c 2007-01-15 14:56:11.000000000 +0100 -+++ udev-git/udev_device.c 2007-01-24 17:59:07.000000000 +0100 -@@ -122,16 +122,17 @@ - strlcpy(ifr.ifr_newname, udev->name, IFNAMSIZ); - loop = 30 * 20; - while (loop--) { -- retval = ioctl(sk, SIOCSIFNAME, &ifr); -- if (retval != 0) { -- if (errno != EEXIST) { -- err("error changing net interface name %s to %s: %s", -- ifr.ifr_name, ifr.ifr_newname, strerror(errno)); -- break; -- } -- dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop); -- usleep(1000 * 1000 / 20); -+ retval = ioctl(sk, SIOCSIFNAME, &ifr); -+ if (retval == 0) -+ break; -+ -+ if (errno != EEXIST) { -+ err("error changing net interface name %s to %s: %s", -+ ifr.ifr_name, ifr.ifr_newname, strerror(errno)); -+ break; - } -+ dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop); -+ usleep(1000 * 1000 / 20); - } - } - diff --git a/sys-fs/udev/files/udev-104-peristent-net-disable-xen.patch b/sys-fs/udev/files/udev-104-peristent-net-disable-xen.patch deleted file mode 100644 index 0d67f21190d0..000000000000 --- a/sys-fs/udev/files/udev-104-peristent-net-disable-xen.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- udev-103/extras/rule_generator/75-persistent-net-generator.rules.orig 2007-01-18 17:42:00.000000000 -0800 -+++ udev-103/extras/rule_generator/75-persistent-net-generator.rules 2007-01-18 17:42:07.000000000 -0800 -@@ -1,6 +1,7 @@ - # these rules generate rules for persistent network device naming - --ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*|ath*|wlan*|ra*|sta*" \ -+ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS!="xen", \ -+ KERNEL=="eth*|ath*|wlan*|ra*|sta*", \ - NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do" - - GOTO="persistent_net_generator_end" -@@ -10,7 +11,6 @@ - SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($attr{driver})" - SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($attr{driver})" - SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" --SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device" - ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($attr{driver})" - - IMPORT{program}="write_net_rules $attr{address}" diff --git a/sys-fs/udev/files/udev-104-persistent-net-fix-name-dups.patch b/sys-fs/udev/files/udev-104-persistent-net-fix-name-dups.patch deleted file mode 100644 index cd5d415013dc..000000000000 --- a/sys-fs/udev/files/udev-104-persistent-net-fix-name-dups.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru udev-104-orig/extras/rule_generator/rule_generator.functions udev-104/extras/rule_generator/rule_generator.functions ---- udev-104-orig/extras/rule_generator/rule_generator.functions 2007-01-15 14:56:11.000000000 +0100 -+++ udev-104/extras/rule_generator/rule_generator.functions 2007-02-12 13:17:39.000000000 +0100 -@@ -92,7 +92,6 @@ - local linkre="$2" - local match="$3" - -- [ -e $RULES_FILE ] || return - local search='.*[[:space:],]'"$key"'"\('"$linkre"'\)"[[:space:]]*\(,.*\|\\\|\)$' - echo $(sed -n -e "${match}s/${search}/\1/p" $RO_RULES_FILE $RULES_FILE) - } diff --git a/sys-fs/udev/files/udev-105-unlink-db-files.patch b/sys-fs/udev/files/udev-105-unlink-db-files.patch deleted file mode 100644 index 8bb629af1d34..000000000000 --- a/sys-fs/udev/files/udev-105-unlink-db-files.patch +++ /dev/null @@ -1,33 +0,0 @@ -unlink old database file before creating a new one - -udev_db_add_device() can be called when the corressponding database -entry already exists - it should overwrite the old entry in this case. -However, if the old entry was a symlink, fopen(filename, "w") will not -overwrite it properly - it will keep the symlink and create a file -named after the symlink target. Calling unlink(filename) before -trying to create the database file fixes the problem. - -Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> - ---- -commit e0c0807ab32fde7f55776e0a300016bad922e636 -tree 117c38653de162d7f6e31a5b75333d1c6a21442e -parent 27283c2fdaefd9c7fd557fd4663566eacccca33a -author Sergey Vlasov <vsu@altlinux.ru> Di, 23 Jan 2007 19:55:38 +0100 -committer Kay Sievers <kay.sievers@vrfy.org> Di, 23 Jan 2007 19:55:38 +0100 - - udev_db.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/udev_db.c b/udev_db.c -index f3c9509..b1217d8 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -93,6 +93,7 @@ int udev_db_add_device(struct udevice *udev) - struct name_entry *name_loop; - FILE *f; - -+ unlink(filename); - f = fopen(filename, "w"); - if (f == NULL) { - err("unable to create db file '%s': %s", filename, strerror(errno)); diff --git a/sys-fs/udev/files/udev-105-vol_id-fix.patch b/sys-fs/udev/files/udev-105-vol_id-fix.patch deleted file mode 100644 index 843f324eb218..000000000000 --- a/sys-fs/udev/files/udev-105-vol_id-fix.patch +++ /dev/null @@ -1,55 +0,0 @@ -volume_id: really fix endianess bug in linux_raid detection - -Seems we find the md signature in cpu-order on the disk. Let's -look for both endian encodings ... - -Thanks to Michael Prokop for his help finding the bug. - ---- -commit ac77e95948edc199cdd690de38f08e4d1e615840 -tree 640db7d14b7ee0745cf9abc7f01ba93625ccf473 -parent 273bebdba66cd5543dc1b076447e3275c81c221c -author Kay Sievers <kay.sievers@vrfy.org> Sa, 03 Feb 2007 01:12:34 +0100 -committer Kay Sievers <kay.sievers@vrfy.org> Sa, 03 Feb 2007 01:12:34 +0100 - - extras/volume_id/lib/Makefile | 2 +- - extras/volume_id/lib/linux_raid.c | 6 ++++-- - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile -index a3e947c..5ad9f2e 100644 ---- a/extras/volume_id/lib/Makefile -+++ b/extras/volume_id/lib/Makefile -@@ -13,7 +13,7 @@ INSTALL_DATA = ${INSTALL} -m 644 - INSTALL_LIB = ${INSTALL} -m 755 - - SHLIB_CUR = 0 --SHLIB_REV = 74 -+SHLIB_REV = 75 - SHLIB_AGE = 0 - SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE) - -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index b8a819f..a9c5d61 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -46,7 +46,8 @@ static struct mdp_super_block { - } PACKED *mdp; - - #define MD_RESERVED_BYTES 0x10000 --#define MD_MAGIC "\xa9\x2b\x4e\xfc" -+#define MD_MAGIC "\xfc\x4e\x2b\xa9" -+#define MD_MAGIC_SWAP "\xa9\x2b\x4e\xfc" - - int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size) - { -@@ -65,7 +66,8 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size - return -1; - mdp = (struct mdp_super_block *) buf; - -- if (memcmp(mdp->md_magic, MD_MAGIC, 4) != 0) -+ if ((memcmp(mdp->md_magic, MD_MAGIC, 4) != 0) && -+ (memcmp(mdp->md_magic, MD_MAGIC_SWAP, 4) != 0)) - return -1; - - memcpy(uuid, &mdp->set_uuid0, 4); diff --git a/sys-fs/udev/files/udev-112-rules.diff b/sys-fs/udev/files/udev-112-rules.diff deleted file mode 100644 index c05f2f9aa011..000000000000 --- a/sys-fs/udev/files/udev-112-rules.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules -index 57f2387..202d064 100644 ---- a/etc/udev/gentoo/50-udev.rules -+++ b/etc/udev/gentoo/50-udev.rules -@@ -243,12 +243,12 @@ KERNEL=="issm*", NAME="infiniband/%k" - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" - - --# Setting timeout for tape-devices to 900 seconds -+# Setting timeout for tape-devices (type 1) to 900 seconds -+# and 60 seconds for device types 0, 7 and 14 - # if you need timeouts for other devices add a similar rule - # with correct type-value, or open a bug on bugs.gentoo.org. --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ -- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -- -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60" -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900" - - # Module autoloading - ACTION!="add", GOTO="hotplug_no_add_event" -diff --git a/etc/udev/gentoo/64-device-mapper.rules b/etc/udev/gentoo/64-device-mapper.rules -index e104a17..ace522b 100644 ---- a/etc/udev/gentoo/64-device-mapper.rules -+++ b/etc/udev/gentoo/64-device-mapper.rules -@@ -27,7 +27,7 @@ RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end" - - IMPORT{program}="vol_id --export $tempnode" - OPTIONS="link_priority=50" --ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_SAFE}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_SAFE}" --ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" -+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - - LABEL="device_mapper_end" diff --git a/sys-fs/udev/files/udev-113-r1-rules.diff b/sys-fs/udev/files/udev-113-r1-rules.diff deleted file mode 100644 index 91f9a835becf..000000000000 --- a/sys-fs/udev/files/udev-113-r1-rules.diff +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules -index 57f2387..b2f69e2 100644 ---- a/etc/udev/gentoo/50-udev.rules -+++ b/etc/udev/gentoo/50-udev.rules -@@ -129,7 +129,8 @@ KERNEL=="dnrtmsg", NAME="netlink/%k" - KERNEL=="tap*", NAME="netlink/%k" - - # network devices --KERNEL=="tun", NAME="net/%k", MODE="0600" -+KERNEL=="tun", NAME="net/%k", MODE="0660", OPTIONS+="ignore_remove" -+KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" - - # ramdisk devices - KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k" -@@ -240,15 +241,18 @@ KERNEL=="issm*", NAME="infiniband/%k" - - - # usbfs-like device nodes -+# the way to go up to kernel 2.6.21 (and above if setting USB_DEVICE_CLASS=y) - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" -+# starting from kernel 2.6.22 use this rule -+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ -+ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0644" - -- --# Setting timeout for tape-devices to 900 seconds -+# Setting timeout for tape-devices (type 1) to 900 seconds -+# and 60 seconds for device types 0, 7 and 14 - # if you need timeouts for other devices add a similar rule - # with correct type-value, or open a bug on bugs.gentoo.org. --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ -- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -- -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60" -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900" - - # Module autoloading - ACTION!="add", GOTO="hotplug_no_add_event" diff --git a/sys-fs/udev/files/udev-113-r2-rules.diff b/sys-fs/udev/files/udev-113-r2-rules.diff deleted file mode 100644 index fca477116cf1..000000000000 --- a/sys-fs/udev/files/udev-113-r2-rules.diff +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules -index 57f2387..b2f69e2 100644 ---- a/etc/udev/gentoo/50-udev.rules -+++ b/etc/udev/gentoo/50-udev.rules -@@ -129,7 +129,8 @@ KERNEL=="dnrtmsg", NAME="netlink/%k" - KERNEL=="tap*", NAME="netlink/%k" - - # network devices --KERNEL=="tun", NAME="net/%k", MODE="0600" -+KERNEL=="tun", NAME="net/%k", MODE="0660", OPTIONS+="ignore_remove" -+KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" - - # ramdisk devices - KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k" -@@ -240,15 +241,18 @@ KERNEL=="issm*", NAME="infiniband/%k" - - - # usbfs-like device nodes -+# the way to go up to kernel 2.6.21 (and above if setting USB_DEVICE_CLASS=y) - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" -+# starting from kernel 2.6.22 use this rule -+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ -+ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0664" - -- --# Setting timeout for tape-devices to 900 seconds -+# Setting timeout for tape-devices (type 1) to 900 seconds -+# and 60 seconds for device types 0, 7 and 14 - # if you need timeouts for other devices add a similar rule - # with correct type-value, or open a bug on bugs.gentoo.org. --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ -- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -- -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60" -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900" - - # Module autoloading - ACTION!="add", GOTO="hotplug_no_add_event" diff --git a/sys-fs/udev/files/udev-114-fix-persistent-net.diff b/sys-fs/udev/files/udev-114-fix-persistent-net.diff deleted file mode 100644 index 7a60e5238f0a..000000000000 --- a/sys-fs/udev/files/udev-114-fix-persistent-net.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules -index cfb13f1..543b9a5 100644 ---- a/extras/rule_generator/75-persistent-net-generator.rules -+++ b/extras/rule_generator/75-persistent-net-generator.rules -@@ -27,7 +27,7 @@ DRIVERS!="?*", ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env - # skip "locally administered" MAC addresses - ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" - --DRIVERS!="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" -+DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" - ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" - - LABEL="persistent_net_generator_end" diff --git a/sys-fs/udev/files/udev-115-add-special-rule-files.diff b/sys-fs/udev/files/udev-115-add-special-rule-files.diff deleted file mode 100644 index bd63686c9e87..000000000000 --- a/sys-fs/udev/files/udev-115-add-special-rule-files.diff +++ /dev/null @@ -1,82 +0,0 @@ -Index: udev-git/etc/udev/gentoo/40-audio.rules -=================================================================== ---- /dev/null -+++ udev-git/etc/udev/gentoo/40-audio.rules -@@ -0,0 +1,23 @@ -+# do not edit this file, it will be overwritten on update -+ -+# alsa devices -+SUBSYSTEM=="sound", GROUP="audio" -+KERNEL=="controlC[0-9]*", NAME="snd/%k" -+KERNEL=="hwC[D0-9]*", NAME="snd/%k" -+KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" -+KERNEL=="midiC[D0-9]*", NAME="snd/%k" -+KERNEL=="timer", NAME="snd/%k" -+KERNEL=="seq", NAME="snd/%k" -+ -+# Do we need these? upstream has this in 40-alsa.rules, but we never had these -+#KERNEL=="mixer0", SYMLINK+="mixer" -+#KERNEL=="dsp0", SYMLINK+="dsp" -+#KERNEL=="audio0", SYMLINK+="audio" -+ -+# sound devices -+KERNEL=="adsp|adsp[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -+KERNEL=="audio|audio[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -+KERNEL=="dsp|dsp[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -+KERNEL=="mixer|mixer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -+KERNEL=="sequencer|sequencer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -+ -Index: udev-git/etc/udev/gentoo/65-permissions.rules -=================================================================== ---- /dev/null -+++ udev-git/etc/udev/gentoo/65-permissions.rules -@@ -0,0 +1,20 @@ -+# do not edit this file, it will be overwritten on update -+ -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb", MODE="664" -+ -+# cdrom devices -+ENV{ID_CDROM}=="?*", GROUP="cdrom", MODE="660" -+KERNEL=="pktcdvd|pktcdvd[0-9]*", GROUP="cdrom", MODE="660" -+# assign cdrom-permission also to associated generic device (for cd-burning ...) -+SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[45]", GROUP="cdrom", MODE="660" -+ -+ -+# tape devices -+KERNEL=="st[0-9]*|nst[0-9]*|ht[0-9]*|nht[0-9]*|pt[0-9]*|npt[0-9]*", \ -+ GROUP="tape", MODE="660" -+SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[18]", GROUP="tape", MODE="660" -+ -+# dialout devices -+KERNEL=="ippp*|isdn*|dcbri*", GROUP="uucp" -+KERNEL=="pilot", GROUP="uucp" -+ -Index: udev-git/etc/udev/gentoo/40-video.rules -=================================================================== ---- /dev/null -+++ udev-git/etc/udev/gentoo/40-video.rules -@@ -0,0 +1,24 @@ -+# do not edit this file, it will be overwritten on update -+ -+# video4linux -+KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK+="%k", GROUP="video" -+KERNEL=="radio[0-9]*", NAME="v4l/radio%n", SYMLINK+="%k", GROUP="video" -+KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK+="%k", GROUP="video" -+KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="video" -+ -+SUBSYSTEM=="dvb", GROUP="video" -+ -+# device node will be /dev/dri/card? -+KERNEL=="card*", GROUP="video" -+KERNEL=="nvidia*", GROUP="video" -+KERNEL=="3dfx*", GROUP="video" -+ -+# Framebuffer -+# do we need /dev/fb/0 really? -+# it conflicts with symlink /dev/fb -> /dev/fb0 upstream rules create -+#KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video" -+KERNEL=="fb[0-9]*", GROUP="video" -+ -+# IEEE1394 (firewire) devices -+KERNEL=="dv1394*|video1394*|raw1394*", GROUP="video" -+ diff --git a/sys-fs/udev/files/udev-115-fix-modprobe-calls.diff b/sys-fs/udev/files/udev-115-fix-modprobe-calls.diff deleted file mode 100644 index 20b2bd800b16..000000000000 --- a/sys-fs/udev/files/udev-115-fix-modprobe-calls.diff +++ /dev/null @@ -1,23 +0,0 @@ -Index: udev-git/etc/udev/gentoo/30-kernel-compat.rules -=================================================================== ---- udev-git.orig/etc/udev/gentoo/30-kernel-compat.rules -+++ udev-git/etc/udev/gentoo/30-kernel-compat.rules -@@ -34,13 +34,13 @@ SUBSYSTEM!="scsi_device", GOTO="kernel_c - # sr: 4 TYPE_WORM, 5 TYPE_ROM - # st/osst: 1 TYPE_TAPE - -- ATTRS{type}=="0|7|14", RUN+="modprobe.sh sd_mod" -- ATTRS{type}=="4|5", RUN+="modprobe.sh sr_mod" -- ATTRS{type}=="8", RUN+="modprobe.sh ch" -+ ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" -+ ATTRS{type}=="4|5", RUN+="/sbin/modprobe sr_mod" -+ ATTRS{type}=="8", RUN+="/sbin/modprobe ch" - - ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end" -- ATTRS{type}=="1", RUN+="modprobe.sh st" -+ ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst", GOTO="kernel_compat_end" -+ ATTRS{type}=="1", RUN+="/sbin/modprobe st" - - LABEL="kernel_compat_end" - diff --git a/sys-fs/udev/files/udev-115-rules-update.diff b/sys-fs/udev/files/udev-115-rules-update.diff deleted file mode 100644 index 2dcb192b12ce..000000000000 --- a/sys-fs/udev/files/udev-115-rules-update.diff +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules -index ee349dc..fc15e2b 100644 ---- a/etc/udev/gentoo/05-udev-early.rules -+++ b/etc/udev/gentoo/05-udev-early.rules -@@ -1,9 +1,8 @@ --# ignore these events until someone needs them --SUBSYSTEM=="drivers", OPTIONS="ignore_device" --SUBSYSTEM=="module", OPTIONS="ignore_device" -+# do not edit this file, it will be overwritten on update - - # sysfs is populated after the event is sent --ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" - ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" - ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" - ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" -+ -diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules -index dd32971..9e06029 100644 ---- a/etc/udev/gentoo/50-udev.rules -+++ b/etc/udev/gentoo/50-udev.rules -@@ -1,13 +1,9 @@ -+# do not edit this file, it will be overwritten on update -+ - # /etc/udev/rules/50-udev.rules: device naming rules for udev - # - # Gentoo specific rules - # --# There are a number of modifiers that are allowed to be used in some of the --# fields. See the udev man page for a full description of them. --# --# Try not to modify this file, if you wish to change things, create a new rule --# file that can be run before this one. --# - - # Net devices can have arbitrary names, even - # ones set by the user. Not try to match normal -diff --git a/etc/udev/gentoo/80-hotplug.rules b/etc/udev/gentoo/80-drivers.rules -similarity index 70% -rename from etc/udev/gentoo/80-hotplug.rules -rename to etc/udev/gentoo/80-drivers.rules -index 0637dbc..df6c880 100644 ---- a/etc/udev/gentoo/80-hotplug.rules -+++ b/etc/udev/gentoo/80-drivers.rules -@@ -1,22 +1,12 @@ --# /etc/udev/rules/80-hotplug.rules: module loading rules for udev --# --# Gentoo specific rules --# --# There are a number of modifiers that are allowed to be used in some of the --# fields. See the udev man page for a full description of them. --# --# Try not to modify this file, if you wish to change things, create a new rule --# file that can be run before this one. --# -- --# Module autoloading --ACTION!="add", GOTO="hotplug_load_end" -+# do not edit this file, it will be overwritten on update -+ -+ACTION!="add", GOTO="drivers_end" - - # check if the device has already been claimed by a driver --ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_load_end" -+ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="drivers_end" - - # this driver is broken and should not be loaded automatically --SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_load_end" -+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="drivers_end" - - # Autoload modules that lack aliases but have them defined in autoload modules - ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}" -@@ -50,5 +40,5 @@ SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" - ATTRS{type}=="1", RUN+="modprobe.sh st" - LABEL="hotplug_scsi_end" - --LABEL="hotplug_load_end" -+LABEL="drivers_end" - -diff --git a/etc/udev/gentoo/90-network.rules b/etc/udev/gentoo/90-network.rules -new file mode 100644 -index 0000000..50903af ---- /dev/null -+++ b/etc/udev/gentoo/90-network.rules -@@ -0,0 +1,8 @@ -+# do not edit this file, it will be overwritten on update -+ -+# /etc/udev/rules/90-network.rules: triggering network init-scripts -+ -+# Activate our network if we can -+SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start" -+SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop" -+ -diff --git a/etc/udev/gentoo/95-udev-late.rules b/etc/udev/gentoo/95-udev-late.rules -deleted file mode 100644 -index 40ada28..0000000 ---- a/etc/udev/gentoo/95-udev-late.rules -+++ /dev/null -@@ -1,18 +0,0 @@ --# /etc/udev/rules/95-udev-late.rules: device naming rules for udev --# --# Gentoo specific rules --# --# There are a number of modifiers that are allowed to be used in some of the --# fields. See the udev man page for a full description of them. --# --# Try not to modify this file, if you wish to change things, create a new rule --# file that can be run before this one. --# -- --# Activate our network if we can --SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start" --SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop" -- --# event to be catched by udevmonitor --RUN+="socket:/org/kernel/udev/monitor" -- diff --git a/sys-fs/udev/files/udev-115-update-gentoo-rules-2.diff b/sys-fs/udev/files/udev-115-update-gentoo-rules-2.diff deleted file mode 100644 index f1457c1f50a3..000000000000 --- a/sys-fs/udev/files/udev-115-update-gentoo-rules-2.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/etc/udev/gentoo/65-permissions.rules b/etc/udev/gentoo/65-permissions.rules -index 1cc31af..1db0aa7 100644 ---- a/etc/udev/gentoo/65-permissions.rules -+++ b/etc/udev/gentoo/65-permissions.rules -@@ -18,3 +18,6 @@ SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[18]", GROUP="tape", MODE= - KERNEL=="ippp*|isdn*|dcbri*", GROUP="uucp" - KERNEL=="pilot", GROUP="uucp" - -+# sound devices (sound=alsa, snd=oss) -+SUBSYSTEM=="sound", GROUP="audio" -+SUBSYSTEM=="snd", GROUP="audio" diff --git a/sys-fs/udev/files/udev-116-gentoo-rules-update.diff b/sys-fs/udev/files/udev-116-gentoo-rules-update.diff deleted file mode 100644 index 151f8c15945b..000000000000 --- a/sys-fs/udev/files/udev-116-gentoo-rules-update.diff +++ /dev/null @@ -1,35 +0,0 @@ -Index: udev-git/etc/udev/gentoo/65-permissions.rules -=================================================================== ---- udev-git.orig/etc/udev/gentoo/65-permissions.rules -+++ udev-git/etc/udev/gentoo/65-permissions.rules -@@ -15,8 +15,12 @@ KERNEL=="st[0-9]*|nst[0-9]*|ht[0-9]*|nht - SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[18]", GROUP="tape", MODE="660" - - # dialout devices --KERNEL=="ippp*|isdn*|dcbri*", GROUP="uucp" -+KERNEL=="ippp*|isdn*|dcbri*|capi*", GROUP="uucp" - KERNEL=="pilot", GROUP="uucp" - - # sound devices (sound=alsa, snd=oss) - SUBSYSTEM=="sound|snd", GROUP="audio" -+ -+# Sony Vaio Jogdial sonypi device -+KERNEL=="sonypi", MODE="0666" -+ -Index: udev-git/etc/udev/gentoo/40-gentoo.rules -=================================================================== ---- /dev/null -+++ udev-git/etc/udev/gentoo/40-gentoo.rules -@@ -0,0 +1,12 @@ -+# do not edit this file, it will be overwritten on update -+ -+# capi devices -+KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" -+KERNEL=="capi*", NAME="capi/%n" -+ -+# old devfs path, removing this could break systems -+# Bug 195839 -+KERNEL=="md[0-9]*", SYMLINK+="md/%n" -+KERNEL=="loop[0-9]*", SYMLINK+="loop/%n" -+KERNEL=="ram[0-9]*", SYMLINK+="rd/%n" -+ diff --git a/sys-fs/udev/files/udev-116-path-to-logger.diff b/sys-fs/udev/files/udev-116-path-to-logger.diff deleted file mode 100644 index aa12517d71cd..000000000000 --- a/sys-fs/udev/files/udev-116-path-to-logger.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/extras/firmware/firmware.sh b/extras/firmware/firmware.sh -index 89b985e..49845ba 100755 ---- a/extras/firmware/firmware.sh -+++ b/extras/firmware/firmware.sh -@@ -4,8 +4,8 @@ FIRMWARE_DIRS="/lib/firmware /usr/local/lib/firmware" - - err() { - echo "$@" >&2 -- if [ -x /bin/logger ]; then -- /bin/logger -t "${0##*/}[$$]" "$@" -+ if type logger >/dev/null; then -+ logger -t "${0##*/}[$$]" "$@" - fi - } - diff --git a/sys-fs/udev/files/udev-121-cdrom_id-segfault.diff b/sys-fs/udev/files/udev-121-cdrom_id-segfault.diff deleted file mode 100644 index 55aa31b818ec..000000000000 --- a/sys-fs/udev/files/udev-121-cdrom_id-segfault.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0e0a463..e0cbe9e 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -469,6 +469,8 @@ static int cd_media_toc(int fd) - info("READ TOC: len: %d\n", len); - if (len > sizeof(toc)) - return -1; -+ if (len < 8) -+ return -1; - - /* check if we have a data track */ - info("ctl %02x (0x04 is data/audio)\n", header[5]); diff --git a/sys-fs/udev/files/udev-start-104-r12.sh b/sys-fs/udev/files/udev-start-104-r12.sh deleted file mode 100644 index 7c9a8b26ae9c..000000000000 --- a/sys-fs/udev/files/udev-start-104-r12.sh +++ /dev/null @@ -1,159 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -udev_version() { - # Version number copied in by ebuild - local version=@@UDEV_VERSION@@ - version=${version##0} - - echo "${version}" -} - -populate_udev() { - # populate /dev with devices already found by the kernel - - # tell modprobe.sh to be verbose to $CONSOLE - echo CONSOLE=${CONSOLE} > /dev/.udev_populate - - if [ $(get_KV) -gt $(KV_to_int '2.6.14') ] ; then - ebegin "Populating /dev with existing devices through uevents" - local opts= - [ ${RC_COLDPLUG} != "yes" ] && [ $(udev_version) -ge 96 ] && \ - opts="--attr-match=dev" - /sbin/udevtrigger ${opts} - eend $? - else - ebegin "Populating /dev with existing devices with udevstart" - /sbin/udevstart - eend $? - fi - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - rm -f /dev/.udev_populate - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # if /dev/console is missing on root-partition, - # kernel could not open it and we need to do that for - # udevd (Bug #151414) - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - - # creating /dev/tty1 as it is used by bootsplash - # (to allow us to write to $CONSOLE before udev has - # created it) - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -main() { - # check if /dev/console exists outside tmpfs - [ -c /dev/console ] ; local need_redirect=$? - - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - # many video drivers require exec access in /dev #92921 - try mount -n -t "${mntcmd}" -o exec,nosuid,mode=0755 udev /dev - fi - eend $? - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon ] && [ -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi - - seed_dev - - # Setup hotplugging (if possible) - if [ -e /proc/sys/kernel/hotplug ] ; then - ebegin "Setting up proper hotplug agent" - eindent - if [ $(get_KV) -gt $(KV_to_int '2.6.14') ] ; then - einfo "Using netlink for hotplug events..." - echo "" > /proc/sys/kernel/hotplug - else - einfo "Setting /sbin/udevsend as hotplug agent ..." - echo "/sbin/udevsend" > /proc/sys/kernel/hotplug - fi - eoutdent - eend 0 - fi - - ebegin "Starting udevd" - if [ ${need_redirect} -eq 1 ]; then - # we need to open fds 0 1 2 to solve Bug #151414 - /sbin/udevd --daemon </dev/console >/dev/console 2>/dev/console - else - /sbin/udevd --daemon - fi - eend $? - - populate_udev - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/dmsetup ] && /sbin/dmsetup mknodes &>/dev/null - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" ] && [ -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-104-r13.sh b/sys-fs/udev/files/udev-start-104-r13.sh deleted file mode 100644 index 2cdfa84cad4e..000000000000 --- a/sys-fs/udev/files/udev-start-104-r13.sh +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -udev_version() { - # Version number copied in by ebuild - local version=@@UDEV_VERSION@@ - version=${version##0} - - echo "${version}" -} - -populate_udev() { - # populate /dev with devices already found by the kernel - - # tell modprobe.sh to be verbose to $CONSOLE - echo CONSOLE=${CONSOLE} > /dev/.udev_populate - - if [ $(get_KV) -gt $(KV_to_int '2.6.14') ] ; then - ebegin "Populating /dev with existing devices through uevents" - local opts= - [ ${RC_COLDPLUG} != "yes" ] && [ $(udev_version) -ge 96 ] && \ - opts="--attr-match=dev" - /sbin/udevtrigger ${opts} - eend $? - else - ebegin "Populating /dev with existing devices with udevstart" - /sbin/udevstart - eend $? - fi - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - rm -f /dev/.udev_populate - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # if /dev/console is missing on root-partition, - # kernel could not open it and we need to do that for - # udevd (Bug #151414) - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - - # creating /dev/tty1 as it is used by bootsplash - # (to allow us to write to $CONSOLE before udev has - # created it) - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -make_dev_root() { - local DEV=$(/lib/udev/get_dir_major_minor "/") - if [ $? == 0 ] && [ -n "${DEV}" ]; then - mknod -m 600 /dev/root b ${DEV} - fi -} - -main() { - # check if /dev/console exists outside tmpfs - [ -c /dev/console ] ; local need_redirect=$? - - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - # many video drivers require exec access in /dev #92921 - try mount -n -t "${mntcmd}" -o exec,nosuid,mode=0755 udev /dev - fi - eend $? - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon ] && [ -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi - - seed_dev - - # Setup hotplugging (if possible) - if [ -e /proc/sys/kernel/hotplug ] ; then - ebegin "Setting up proper hotplug agent" - eindent - if [ $(get_KV) -gt $(KV_to_int '2.6.14') ] ; then - einfo "Using netlink for hotplug events..." - echo "" > /proc/sys/kernel/hotplug - else - einfo "Setting /sbin/udevsend as hotplug agent ..." - echo "/sbin/udevsend" > /proc/sys/kernel/hotplug - fi - eoutdent - eend 0 - fi - - ebegin "Starting udevd" - if [ ${need_redirect} -eq 1 ]; then - # we need to open fds 0 1 2 to solve Bug #151414 - /sbin/udevd --daemon </dev/console >/dev/console 2>/dev/console - else - /sbin/udevd --daemon - fi - eend $? - - populate_udev - make_dev_root - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/dmsetup ] && /sbin/dmsetup mknodes &>/dev/null - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" ] && [ -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-110-r1.sh b/sys-fs/udev/files/udev-start-110-r1.sh deleted file mode 100644 index 67277434b1c7..000000000000 --- a/sys-fs/udev/files/udev-start-110-r1.sh +++ /dev/null @@ -1,203 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -tmpfs_size="10M" - -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf - -populate_udev() { - # populate /dev with devices already found by the kernel - - # tell modprobe.sh to be verbose to $CONSOLE - - echo "export CONSOLE=${CONSOLE}" > /dev/.udev_populate - echo "export TERM=${TERM}" >> /dev/.udev_populate - - if get_bootparam "nocoldplug" ; then - RC_COLDPLUG="no" - ewarn "Skipping udev coldplug as requested in kernel cmdline" - fi - - if [ "$(get_KV)" -gt "$(KV_to_int '2.6.14')" ] ; then - ebegin "Populating /dev with existing devices through uevents" - local opts= - [ "${RC_COLDPLUG}" != "yes" ] && opts="--attr-match=dev" - /sbin/udevtrigger ${opts} - eend $? - else - ebegin "Populating /dev with existing devices with udevstart" - /sbin/udevstart - eend $? - fi - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - rm -f /dev/.udev_populate - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -unpack_device_tarball() { - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi -} - -make_dev_root() { - local DEV="$(/lib/udev/get_dir_major_minor "/")" - if [ $? = 0 -a -n "${DEV}" ]; then - mknod -m 600 /dev/root b ${DEV} - fi -} - -check_persistent_net() { - # check if there are problems with persistent-net - local syspath= - local devs= - local problem_found=0 - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem_found=1 - fi - done - - [ "${problem_found}" = 0 ] && return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*'|tr ' ' '\n'|sort|sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - -main() { - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - mntopts="exec,nosuid,mode=0755,size=${tmpfs_size}" - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - # many video drivers require exec access in /dev #92921 - try mount -n -t "${mntcmd}" -o "${mntopts}" udev /dev - fi - eend $? - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon -a -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - unpack_device_tarball - seed_dev - - # Setup hotplugging (if possible) - if [ -e /proc/sys/kernel/hotplug ] ; then - ebegin "Setting up proper hotplug agent" - eindent - if [ $(get_KV) -gt $(KV_to_int '2.6.14') ] ; then - einfo "Using netlink for hotplug events..." - echo "" > /proc/sys/kernel/hotplug - else - einfo "Setting /sbin/udevsend as hotplug agent ..." - echo "/sbin/udevsend" > /proc/sys/kernel/hotplug - fi - eoutdent - eend 0 - fi - - ebegin "Starting udevd" - /sbin/udevd --daemon - eend $? - - populate_udev - make_dev_root - - # Only do this for baselayout-1* - if [ ! -e /lib/librc.so ]; then - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 - fi - - check_persistent_net -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-111-r3.sh b/sys-fs/udev/files/udev-start-111-r3.sh deleted file mode 100644 index 53ff8db091ce..000000000000 --- a/sys-fs/udev/files/udev-start-111-r3.sh +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -tmpfs_size="10M" - -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf - -populate_udev() { - # populate /dev with devices already found by the kernel - - # tell modprobe.sh to be verbose to $CONSOLE - - echo "export CONSOLE=${CONSOLE}" > /dev/.udev_populate - echo "export TERM=${TERM}" >> /dev/.udev_populate - - if get_bootparam "nocoldplug" ; then - RC_COLDPLUG="no" - ewarn "Skipping udev coldplug as requested in kernel cmdline" - fi - - if [ "$(get_KV)" -gt "$(KV_to_int '2.6.14')" ] ; then - ebegin "Populating /dev with existing devices through uevents" - local opts= - [ "${RC_COLDPLUG}" != "yes" ] && opts="--attr-match=dev" - /sbin/udevtrigger ${opts} - eend $? - else - ebegin "Populating /dev with existing devices with udevstart" - /sbin/udevstart - eend $? - fi - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - rm -f /dev/.udev_populate - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -unpack_device_tarball() { - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi -} - -make_dev_root() { - local DEV="$(/lib/udev/get_dir_major_minor "/")" - if [ $? = 0 -a -n "${DEV}" ]; then - mknod -m 600 /dev/root b ${DEV} - fi -} - -check_persistent_net() { - # check if there are problems with persistent-net - local syspath= - local devs= - local problem_found=0 - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem_found=1 - fi - done - - [ "${problem_found}" = 0 ] && return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*'|tr ' ' '\n'|sort|sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - -main() { - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - mntopts="exec,nosuid,mode=0755,size=${tmpfs_size}" - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - # many video drivers require exec access in /dev #92921 - try mount -n -t "${mntcmd}" -o "${mntopts}" udev /dev - fi - eend $? - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon -a -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - unpack_device_tarball - seed_dev - - # Setup hotplugging (if possible) - if [ -e /proc/sys/kernel/hotplug ] ; then - ebegin "Setting up proper hotplug agent" - eindent - if [ $(get_KV) -gt $(KV_to_int '2.6.14') ] ; then - einfo "Using netlink for hotplug events..." - echo "" > /proc/sys/kernel/hotplug - else - einfo "Setting /sbin/udevsend as hotplug agent ..." - echo "/sbin/udevsend" > /proc/sys/kernel/hotplug - fi - eoutdent - eend 0 - fi - - ebegin "Starting udevd" - /sbin/udevd --daemon - eend $? - - populate_udev - make_dev_root - - # Only do this for baselayout-1* - if [ ! -e /lib/librc.so ]; then - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 - fi - - check_persistent_net - - # trigger executing initscript when /etc is writable - IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>/dev/null - - # udev started successfully - return 0 -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-115-r3.sh b/sys-fs/udev/files/udev-start-115-r3.sh deleted file mode 100644 index 5073f8feb3bb..000000000000 --- a/sys-fs/udev/files/udev-start-115-r3.sh +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -tmpfs_size="10M" - -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf - -mount_dev_directory() { - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - mntopts="exec,nosuid,mode=0755,size=${tmpfs_size}" - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - # many video drivers require exec access in /dev #92921 - try mount -n -t "${mntcmd}" -o "${mntopts}" udev /dev - fi - eend $? -} - -populate_udev() { - # populate /dev with devices already found by the kernel - - if get_bootparam "nocoldplug" ; then - RC_COLDPLUG="no" - ewarn "Skipping udev coldplug as requested in kernel cmdline" - fi - - # at this point we are already sure to use kernel 2.6.15 or newer - ebegin "Populating /dev with existing devices through uevents" - if [ "${RC_COLDPLUG}" = "yes" ]; then - /sbin/udevtrigger - else - # only create device nodes - /sbin/udevtrigger --attr-match=dev - # run persistent-net stuff, bug 191466 - /sbin/udevtrigger --subsystem-match=net - fi - eend $? - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - rm -f /dev/.udev_populate - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -unpack_device_tarball() { - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi -} - -check_persistent_net() { - # check if there are problems with persistent-net - local syspath= - local devs= - local problem_found=0 - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem_found=1 - fi - done - - [ "${problem_found}" = 0 ] && return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*'|tr ' ' '\n'|sort|sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - -main() { - if [ $(get_KV) -le $(KV_to_int '2.6.14') ] ; then - eerror "Your kernel is too old to work with this version of udev." - eerror "Current udev only supports Linux kernel 2.6.15 and newer." - return 1 - fi - - mount_dev_directory - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon -a -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - unpack_device_tarball - seed_dev - - if [ -e /proc/sys/kernel/hotplug ] ; then - echo "" > /proc/sys/kernel/hotplug - fi - - ebegin "Starting udevd" - /sbin/udevd --daemon - eend $? - - /lib/udev/write_root_link_rule - populate_udev - - # Only do this for baselayout-1* - if [ ! -e /lib/librc.so ]; then - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 - fi - - check_persistent_net - - # trigger executing initscript when /etc is writable - IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>/dev/null - - # udev started successfully - return 0 -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-115-r6.sh b/sys-fs/udev/files/udev-start-115-r6.sh deleted file mode 100644 index 6f149473dc1d..000000000000 --- a/sys-fs/udev/files/udev-start-115-r6.sh +++ /dev/null @@ -1,197 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -tmpfs_size="10M" - -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf - -mount_dev_directory() { - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - # many video drivers require exec access in /dev #92921 - mntopts="exec,nosuid,mode=0755,size=${tmpfs_size}" - [ -n "${tmpfs_inodes}" ] && mntopts="${mntopts},nr_inodes=${tmpfs_inodes}" - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - try mount -n -t "${mntcmd}" -o "${mntopts}" udev /dev - fi - eend $? -} - -populate_udev() { - # populate /dev with devices already found by the kernel - - if get_bootparam "nocoldplug" ; then - RC_COLDPLUG="no" - ewarn "Skipping udev coldplug as requested in kernel cmdline" - fi - - # at this point we are already sure to use kernel 2.6.15 or newer - ebegin "Populating /dev with existing devices through uevents" - if [ "${RC_COLDPLUG}" = "yes" ]; then - /sbin/udevtrigger - else - # only create device nodes - /sbin/udevtrigger --attr-match=dev - # run persistent-net stuff, bug 191466 - /sbin/udevtrigger --subsystem-match=net - fi - eend $? - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - rm -f /dev/.udev_populate - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -unpack_device_tarball() { - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi -} - -check_persistent_net() { - # check if there are problems with persistent-net - local syspath= - local devs= - local problem_found=0 - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem_found=1 - fi - done - - [ "${problem_found}" = 0 ] && return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*'|tr ' ' '\n'|sort|sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - -main() { - if [ $(get_KV) -le $(KV_to_int '2.6.14') ] ; then - eerror "Your kernel is too old to work with this version of udev." - eerror "Current udev only supports Linux kernel 2.6.15 and newer." - return 1 - fi - - mount_dev_directory - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon -a -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - unpack_device_tarball - seed_dev - - if [ -e /proc/sys/kernel/hotplug ] ; then - echo "" > /proc/sys/kernel/hotplug - fi - - ebegin "Starting udevd" - /sbin/udevd --daemon - eend $? - - /lib/udev/write_root_link_rule - populate_udev - - # Only do this for baselayout-1* - if [ ! -e /lib/librc.so ]; then - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 - fi - - check_persistent_net - - # trigger executing initscript when /etc is writable - IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>/dev/null - - # udev started successfully - return 0 -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-118-r1.sh b/sys-fs/udev/files/udev-start-118-r1.sh deleted file mode 100644 index 3a69ec27ba81..000000000000 --- a/sys-fs/udev/files/udev-start-118-r1.sh +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -tmpfs_size="10M" - -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf - -mount_dev_directory() { - # Setup temporary storage for /dev - ebegin "Mounting /dev for udev" - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - # many video drivers require exec access in /dev #92921 - mntopts="exec,nosuid,mode=0755,size=${tmpfs_size}" - [ -n "${tmpfs_inodes}" ] && mntopts="${mntopts},nr_inodes=${tmpfs_inodes}" - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - try mount -n -t "${mntcmd}" -o "${mntopts}" udev /dev - fi - eend $? -} - -# populate /dev with devices already found by the kernel -populate_udev() { - if get_bootparam "nocoldplug" ; then - RC_COLDPLUG="no" - ewarn "Skipping udev coldplug as requested in kernel cmdline" - fi - - # at this point we are already sure to use kernel 2.6.15 or newer - ebegin "Populating /dev with existing devices through uevents" - if [ "${RC_COLDPLUG}" = "yes" ]; then - /sbin/udevtrigger - else - # Do not run any init-scripts, Bug #206518 - udevadm control --env do_not_run_plug_service=1 - - # only create device nodes - /sbin/udevtrigger --attr-match=dev - - # run persistent-net stuff, bug 191466 - /sbin/udevtrigger --subsystem-match=net - fi - eend $? - - # loop until everything is finished - # there's gotta be a better way... - ebegin "Letting udev process events" - /sbin/udevsettle --timeout=60 - eend $? - - udevadm control --env do_not_run_plug_service= - return 0 -} - -seed_dev() { - # Seed /dev with some things that we know we need - ebegin "Seeding /dev with needed nodes" - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ ! -c /dev/console ] && mknod /dev/console c 5 1 - [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ ! -c /dev/null ] && mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ] ; then - cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - eend 0 -} - -unpack_device_tarball() { - # Actually get udev rolling - if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ - [ -s /lib/udev/state/devices.tar.bz2 ] ; then - ebegin "Populating /dev with saved device nodes" - try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev - eend $? - fi -} - -check_persistent_net() { - # check if there are problems with persistent-net - local syspath= - local devs= - local problem_found=0 - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem_found=1 - fi - done - - [ "${problem_found}" = 0 ] && return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*'|tr ' ' '\n'|sort|sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - -main() { - if [ $(get_KV) -le $(KV_to_int '2.6.14') ] ; then - eerror "Your kernel is too old to work with this version of udev." - eerror "Current udev only supports Linux kernel 2.6.15 and newer." - return 1 - fi - - mount_dev_directory - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon -a -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - unpack_device_tarball - seed_dev - - if [ -e /proc/sys/kernel/hotplug ] ; then - echo "" > /proc/sys/kernel/hotplug - fi - - ebegin "Starting udevd" - /sbin/udevd --daemon - eend $? - - /lib/udev/write_root_link_rule - populate_udev - - # Only do this for baselayout-1* - if [ ! -e /lib/librc.so ]; then - - # Create nodes that udev can't - ebegin "Finalizing udev configuration" - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - eend 0 - fi - - check_persistent_net - - # trigger executing initscript when /etc is writable - IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>/dev/null - - # udev started successfully - return 0 -} - -main - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-start-119-r1.sh b/sys-fs/udev/files/udev-start-119-r1.sh deleted file mode 100644 index fdac780e62a0..000000000000 --- a/sys-fs/udev/files/udev-start-119-r1.sh +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf -. /lib/udev/shell-compat.sh - -rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}} -rc_device_tarball=${rc_device_tarball:-${RC_DEVICE_TARBALL:-NO}} - -cleanup() -{ - # fail more gracely and not leave udevd running - start-stop-daemon --stop --exec /sbin/udevd - exit 1 -} - -# FIXME -# Instead of this script testing kernel version, udev itself should -# Maybe something like udevd --test || exit $? -check_kernel() -{ - if [ $(get_KV) -lt $(KV_to_int '2.6.15') ]; then - eerror "Your kernel is too old to work with this version of udev." - eerror "Current udev only supports Linux kernel 2.6.15 and newer." - return 1 - fi - if [ $(get_KV) -lt $(KV_to_int '2.6.18') ]; then - ewarn "You need at least Linux kernel 2.6.18 for reliable operation of udev." - fi - return 0 -} - - -mount_dev_directory() -{ - # No options are processed here as they should all be in /etc/fstab - ebegin "Mounting /dev" - if fstabinfo --quiet /dev; then - mount -n /dev - else - # Some devices require exec, Bug #92921 - mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev - fi - eend $? -} - -unpack_device_tarball() -{ - local device_tarball=/lib/udev/state/devices.tar.bz2 - if yesno "${rc_device_tarball}" && \ - [ -s "${device_tarball}" ] - then - ebegin "Populating /dev with saved device nodes" - tar -jxpf "${device_tarball}" -C /dev - eend $? - fi -} - -seed_dev() -{ - # Seed /dev with some things that we know we need - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ -c /dev/console ] || mknod /dev/console c 5 1 - [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ -c /dev/null ] || mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/udev/devices ]; then - cp -RPp /lib/udev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - return 0 -} - -disable_hotplug_agent() -{ - if [ -e /proc/sys/kernel/hotplug ]; then - echo "" >/proc/sys/kernel/hotplug - fi -} - -root_link() -{ - /lib/udev/write_root_link_rule -} - -start_udevd() -{ - ebegin "Starting udevd" - start-stop-daemon --start --exec /sbin/udevd -- --daemon - eend $? -} - -# populate /dev with devices already found by the kernel -populate_dev() -{ - if get_bootparam "nocoldplug" ; then - rc_coldplug="NO" - ewarn "Skipping udev coldplug as requested in kernel cmdline" - fi - - ebegin "Populating /dev with existing devices through uevents" - if yesno "${rc_coldplug}"; then - udevtrigger - else - # Do not run any init-scripts, Bug #206518 - udevadm control --env do_not_run_plug_service=1 - - # only create device nodes - udevtrigger --attr-match=dev - - # run persistent-net stuff, bug 191466 - udevtrigger --subsystem-match=net - fi - eend $? - - ebegin "Waiting for uevents to be processed" - udevsettle --timeout=60 - eend $? - - udevadm control --env do_not_run_plug_service= - return 0 -} - -compat_volume_nodes() -{ - # Only do this for baselayout-1* - if [ ! -e /lib/librc.so ]; then - - # Create nodes that udev can't - [ -x /sbin/lvm ] && \ - /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null - # Running evms_activate on a LiveCD causes lots of headaches - [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ - /sbin/evms_activate -q &>/dev/null - fi -} - -check_persistent_net() -{ - # check if there are problems with persistent-net - local syspath= devs= problem=false - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem=true - fi - done - - ${problem} || return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*' | \ - tr ' ' '\n' | \ - sort | \ - sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - -check_udev_works() -{ - # should exist on every system, else udev failed - if [ ! -e /dev/zero ]; then - eerror "Assuming udev failed somewhere, as /dev/zero does not exist." - return 1 - fi - return 0 -} - - - -check_kernel || cleanup -mount_dev_directory || cleanup - -# Create a file so that our rc system knows it's still in sysinit. -# Existance means init scripts will not directly run. -# rc will remove the file when done with sysinit. -touch /dev/.rcsysinit - -# Selinux lovin; /selinux should be mounted by selinux-patched init -if [ -x /sbin/restorecon -a -c /selinux/null ]; then - restorecon /dev > /selinux/null -fi - -unpack_device_tarball -seed_dev -root_link -disable_hotplug_agent - -start_udevd || cleanup -populate_dev || cleanup - -compat_volume_nodes -check_persistent_net - -# trigger executing initscript when /etc is writable -IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1 - -check_udev_works || cleanup - -# udev started successfully -exit 0 diff --git a/sys-fs/udev/files/udev-stop-104-r13.sh b/sys-fs/udev/files/udev-stop-104-r13.sh deleted file mode 100755 index 7a9937fed81d..000000000000 --- a/sys-fs/udev/files/udev-stop-104-r13.sh +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -udev_version() { - # Version number copied in by ebuild - local version=@@UDEV_VERSION@@ - version=${version##0} - - echo "${version}" -} - -# store persistent-rules that got created while booting -# when / was still read-only -store_persistent_rules() { - local type base tmp_rules real_rules - - for type in cd net; do - base=70-persistent-${type}.rules - tmp_rules=/dev/.udev/tmp-rules--${base} - real_rules=/etc/udev/rules.d/${base} - - if [ -f ${tmp_rules} ]; then - einfo "Saving udev persistent ${type} rules to /etc/udev/rules.d" - cat ${tmp_rules} >> ${real_rules} - rm ${tmp_rules} - fi - done -} - -main() { - store_persistent_rules - - if [ -e /dev/.devfsd ] || [ ! -e /dev/.udev ] || [ ! -z "${CDBOOT}" ] || \ - [ "${RC_DEVICE_TARBALL}" != "yes" ] || \ - ! touch /lib/udev/state/devices.tar.bz2 2>/dev/null - then - return 0 - fi - - ebegin "Saving device nodes" - # Handle our temp files - save_tmp_base=/tmp/udev.savedevices."$$" - devices_udev="${save_tmp_base}"/devices.udev - devices_real="${save_tmp_base}"/devices.real - devices_totar="${save_tmp_base}"/devices.totar - device_tarball="${save_tmp_base}"/devices - - rm -rf "${save_tmp_base}" - mkdir "${save_tmp_base}" - touch "${devices_udev}" "${devices_real}" \ - "${devices_totar}" "${device_tarball}" - - if [ -f ${devices_udev} ] && [ -f ${devices_real} ] && \ - [ -f ${devices_totar} ] && [ -f ${device_tarball} ] ; then - cd /dev - # Find all devices - find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > \ - "${devices_real}" - # Figure out what udev created - eval $(grep '^[[:space:]]*udev_db=' /etc/udev/udev.conf) - if [ -d ${udev_db} ]; then - # New udev_db is clear text ... - udevinfo=$(cat "${udev_db}"/*) - else - # if no udev_db - if [ $(udev_version) -ge 104 ]; then - udevinfo=$(udevinfo --export-db) - else - # Old one is not ... - udevinfo=$(udevinfo -d) - fi - fi - # This basically strips 'S:' and 'N:' from the db output, and then - # print all the nodes/symlinks udev created ... - echo "${udevinfo}" | gawk ' - /^(N|S):.+/ { - sub(/^(N|S):/, "") - split($0, nodes) - for (x in nodes) - print nodes[x] - }' > "${devices_udev}" - # These ones we also do not want in there - for x in MAKEDEV core fd initctl pts shm stderr stdin stdout root; do - echo "${x}" >> "${devices_udev}" - done - if [ -d /lib/udev/devices ]; then - cd /lib/udev/devices - find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- >> "${devices_udev}" - fi - cd /dev - fgrep -x -v -f "${devices_udev}" < "${devices_real}" | \ - grep -v ^\\.udev > "${devices_totar}" - - # Now only tarball those not created by udev if we have any - if [ -s ${devices_totar} ]; then - # we dont want to descend into mounted filesystems (e.g. devpts) - # looking up username may involve NIS/network, and net may be down - tar --one-file-system --numeric-owner -jcpf "${device_tarball}" -T "${devices_totar}" - mv -f "${device_tarball}" /lib/udev/state/devices.tar.bz2 - else - rm -f /lib/udev/state/devices.tar.bz2 - fi - eend 0 - else - eend 1 "Could not create temporary files!" - fi - - rm -rf "${save_tmp_base}" -} - -main - - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-stop-104-r8.sh b/sys-fs/udev/files/udev-stop-104-r8.sh deleted file mode 100755 index 5c84e93a5bfa..000000000000 --- a/sys-fs/udev/files/udev-stop-104-r8.sh +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -udev_version() { - # Version number copied in by ebuild - local version=@@UDEV_VERSION@@ - version=${version##0} - - echo "${version}" -} - -# store persistent-rules that got created while booting -# when / was still read-only -store_persistent_rules() { - local type base tmp_rules real_rules - - for type in cd net; do - base=70-persistent-${type}.rules - tmp_rules=/dev/.udev/tmp-rules--${base} - real_rules=/etc/udev/rules.d/${base} - - if [ -f ${tmp_rules} ]; then - einfo "Saving udev persistent ${type} rules to /etc/udev/rules.d" - cat ${tmp_rules} >> ${real_rules} - rm ${tmp_rules} - fi - done -} - -main() { - store_persistent_rules - - if [ -e /dev/.devfsd ] || [ ! -e /dev/.udev ] || [ ! -z "${CDBOOT}" ] || \ - [ "${RC_DEVICE_TARBALL}" != "yes" ] || \ - ! touch /lib/udev/state/devices.tar.bz2 2>/dev/null - then - return 0 - fi - - ebegin "Saving device nodes" - # Handle our temp files - save_tmp_base=/tmp/udev.savedevices."$$" - devices_udev="${save_tmp_base}"/devices.udev - devices_real="${save_tmp_base}"/devices.real - devices_totar="${save_tmp_base}"/devices.totar - device_tarball="${save_tmp_base}"/devices - - rm -rf "${save_tmp_base}" - mkdir "${save_tmp_base}" - touch "${devices_udev}" "${devices_real}" \ - "${devices_totar}" "${device_tarball}" - - if [ -f ${devices_udev} ] && [ -f ${devices_real} ] && \ - [ -f ${devices_totar} ] && [ -f ${device_tarball} ] ; then - cd /dev - # Find all devices - find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > \ - "${devices_real}" - # Figure out what udev created - eval $(grep '^[[:space:]]*udev_db=' /etc/udev/udev.conf) - if [ -d ${udev_db} ]; then - # New udev_db is clear text ... - udevinfo=$(cat "${udev_db}"/*) - else - # if no udev_db - if [ $(udev_version) -ge 104 ]; then - udevinfo=$(udevinfo --export-db) - else - # Old one is not ... - udevinfo=$(udevinfo -d) - fi - fi - # This basically strips 'S:' and 'N:' from the db output, and then - # print all the nodes/symlinks udev created ... - echo "${udevinfo}" | gawk ' - /^(N|S):.+/ { - sub(/^(N|S):/, "") - split($0, nodes) - for (x in nodes) - print nodes[x] - }' > "${devices_udev}" - # These ones we also do not want in there - for x in MAKEDEV core fd initctl pts shm stderr stdin stdout; do - echo "${x}" >> "${devices_udev}" - done - if [ -d /lib/udev/devices ]; then - cd /lib/udev/devices - find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- >> "${devices_udev}" - fi - cd /dev - fgrep -x -v -f "${devices_udev}" < "${devices_real}" | \ - grep -v ^\\.udev > "${devices_totar}" - - # Now only tarball those not created by udev if we have any - if [ -s ${devices_totar} ]; then - # we dont want to descend into mounted filesystems (e.g. devpts) - # looking up username may involve NIS/network, and net may be down - tar --one-file-system --numeric-owner -jcpf "${device_tarball}" -T "${devices_totar}" - mv -f "${device_tarball}" /lib/udev/state/devices.tar.bz2 - else - rm -f /lib/udev/state/devices.tar.bz2 - fi - eend 0 - else - eend 1 "Could not create temporary files!" - fi - - rm -rf "${save_tmp_base}" -} - -main - - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev-stop-110-r1.sh b/sys-fs/udev/files/udev-stop-110-r1.sh deleted file mode 100755 index 38eb82551ec9..000000000000 --- a/sys-fs/udev/files/udev-stop-110-r1.sh +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# store persistent-rules that got created while booting -# when / was still read-only -store_persistent_rules() { - local file dest - - for file in /dev/.udev/tmp-rules--*; do - dest=${file##*tmp-rules--} - [ "$dest" = '*' ] && break - type=${dest##70-persistent-} - type=${type%%.rules} - einfo "Saving udev persistent ${type} rules to /etc/udev/rules.d" - cat "$file" >> /etc/udev/rules.d/"$dest" - rm -f "$file" - done -} - -create_device_tarball() { - if [ -e /dev/.devfsd ] || [ ! -e /dev/.udev ] || [ ! -z "${CDBOOT}" ] || \ - [ "${RC_DEVICE_TARBALL}" != "yes" ] || \ - ! touch /lib/udev/state/devices.tar.bz2 2>/dev/null - then - return 0 - fi - - ebegin "Saving device nodes" - # Handle our temp files - save_tmp_base=/tmp/udev.savedevices."$$" - devices_udev="${save_tmp_base}"/devices.udev - devices_real="${save_tmp_base}"/devices.real - devices_totar="${save_tmp_base}"/devices.totar - device_tarball="${save_tmp_base}"/devices - - rm -rf "${save_tmp_base}" - mkdir "${save_tmp_base}" - touch "${devices_udev}" "${devices_real}" \ - "${devices_totar}" "${device_tarball}" - - if [ -f ${devices_udev} ] && [ -f ${devices_real} ] && \ - [ -f ${devices_totar} ] && [ -f ${device_tarball} ] ; then - cd /dev - # Find all devices - find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > \ - "${devices_real}" - # Figure out what udev created - udevinfo=$(udevinfo --export-db) - - # This basically strips 'S:' and 'N:' from the db output, and then - # print all the nodes/symlinks udev created ... - echo "${udevinfo}" | gawk ' - /^(N|S):.+/ { - sub(/^(N|S):/, "") - split($0, nodes) - for (x in nodes) - print nodes[x] - }' > "${devices_udev}" - # These ones we also do not want in there - for x in MAKEDEV core fd initctl pts shm stderr stdin stdout root; do - echo "${x}" >> "${devices_udev}" - done - if [ -d /lib/udev/devices ]; then - cd /lib/udev/devices - find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- >> "${devices_udev}" - fi - cd /dev - fgrep -x -v -f "${devices_udev}" < "${devices_real}" | \ - grep -v ^\\.udev > "${devices_totar}" - - # Now only tarball those not created by udev if we have any - if [ -s ${devices_totar} ]; then - # we dont want to descend into mounted filesystems (e.g. devpts) - # looking up username may involve NIS/network, and net may be down - tar --one-file-system --numeric-owner -jcpf "${device_tarball}" -T "${devices_totar}" - mv -f "${device_tarball}" /lib/udev/state/devices.tar.bz2 - else - rm -f /lib/udev/state/devices.tar.bz2 - fi - eend 0 - else - eend 1 "Could not create temporary files!" - fi - - rm -rf "${save_tmp_base}" -} - -main() { - store_persistent_rules - create_device_tarball -} - -main - - -# vim:ts=4 diff --git a/sys-fs/udev/files/udev.conf.115-r6 b/sys-fs/udev/files/udev.conf.115-r6 deleted file mode 100644 index 9dd04613a4ea..000000000000 --- a/sys-fs/udev/files/udev.conf.115-r6 +++ /dev/null @@ -1,6 +0,0 @@ -# The maximum size reserved for the tmpfs mounted on /dev -tmpfs_size="10M" - -# The maximum number of inodes reserved for the tmpfs mounted on /dev -#tmpfs_inodes="4k" - diff --git a/sys-fs/udev/files/udev.conf.post_081 b/sys-fs/udev/files/udev.conf.post_081 deleted file mode 100644 index 8be804a316e5..000000000000 --- a/sys-fs/udev/files/udev.conf.post_081 +++ /dev/null @@ -1,17 +0,0 @@ -# /etc/udev/udev.conf: main config file for udev -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.conf.post_081,v 1.1 2006/01/31 03:44:41 gregkh Exp $ -# -# This file can be used to override some of udev's default values. -# See the udev man page for more details about these values. - -# udev_root - where in the filesystem to place the device nodes -udev_root="/dev/" - -# udev_rules - The name and location of the udev rules file -udev_rules="/etc/udev/rules.d/" - -# The initial syslog(3) priority: "err", "info", "debug" or its -# numerical equivalent. For runtime debugging, the daemons internal -# state can be changed with: "udevcontrol log_priority=<value>". -udev_log="err" - diff --git a/sys-fs/udev/files/udev.conf.post_108 b/sys-fs/udev/files/udev.conf.post_108 deleted file mode 100644 index 7d4f87a57afd..000000000000 --- a/sys-fs/udev/files/udev.conf.post_108 +++ /dev/null @@ -1,19 +0,0 @@ -# /etc/udev/udev.conf: main config file for udev -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.conf.post_108,v 1.1 2007/04/23 20:18:22 zzam Exp $ -# -# This file can be used to override some of udev's default values. -# See the udev man page for more details about these values. - -# udev_root - where in the filesystem to place the device nodes -udev_root="/dev/" - -# udev_rules - The name and location of the udev rules file -udev_rules="/etc/udev/rules.d/" - -# The initial syslog(3) priority: "err", "info", "debug" or its -# numerical equivalent. For runtime debugging, the daemons internal -# state can be changed with: "udevcontrol log_priority=<value>". -udev_log="err" - -# The maximum size reserved for the tmpfs mounted on /dev -tmpfs_size="10M" diff --git a/sys-fs/udev/files/udev.conf.post_115 b/sys-fs/udev/files/udev.conf.post_115 deleted file mode 100644 index 42a08351d8e0..000000000000 --- a/sys-fs/udev/files/udev.conf.post_115 +++ /dev/null @@ -1,3 +0,0 @@ -# The maximum size reserved for the tmpfs mounted on /dev -tmpfs_size="10M" - diff --git a/sys-fs/udev/files/udev.rules-104-r10 b/sys-fs/udev/files/udev.rules-104-r10 deleted file mode 100644 index 4df144161256..000000000000 --- a/sys-fs/udev/files/udev.rules-104-r10 +++ /dev/null @@ -1,303 +0,0 @@ -# /etc/udev/rules/50-udev.rules: device naming rules for udev -# -# Gentoo specific rules -# -# There are a number of modifiers that are allowed to be used in some of the -# fields. See the udev man page for a full description of them. -# -# Try not to modify this file, if you wish to change things, create a new rule -# file that can be run before this one. -# - - -# console -KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", OPTIONS="last_rule" -KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", OPTIONS="last_rule" -KERNEL=="vcs*", NAME="%k", GROUP="tty", OPTIONS="last_rule" -KERNEL=="vcsa*", NAME="%k", GROUP="tty", OPTIONS="last_rule" -KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666", OPTIONS="last_rule" -KERNEL=="tty[0-9]", NAME="%k", GROUP="tty", OPTIONS="last_rule" -KERNEL=="tty[0-9][0-9]", NAME="%k", GROUP="tty", OPTIONS="last_rule" -KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600" -KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666" - -# tty devices -KERNEL=="ttyS[0-9]*", NAME="%k", SYMLINK="tts/%n", GROUP="uucp", MODE="0660" -KERNEL=="ttyUSB[0-9]*", NAME="%k", SYMLINK="tts/USB%n", GROUP="uucp", MODE="0660" -KERNEL=="ippp0", NAME="%k", GROUP="uucp", MODE="0660" -KERNEL=="isdn*" NAME="%k", GROUP="uucp", MODE="0660" -KERNEL=="dcbri*", NAME="%k", GROUP="uucp", MODE="0660" -KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" - -# all block devices -SUBSYSTEM=="block", GROUP="disk" - -# cdrom symlinks and other good cdrom naming -KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", ACTION=="add", IMPORT{program}="cdrom_id --export $tempnode" -ENV{ID_CDROM}=="?*", GROUP="cdrom" - -# disk devices -KERNEL=="sd*", NAME="%k", GROUP="disk" -KERNEL=="dasd*", NAME="%k", GROUP="disk" -KERNEL=="ataraid*", NAME="%k", GROUP="disk" - -# compaq smart array -KERNEL=="cciss*", NAME="%k" -KERNEL=="ida*", NAME="%k" - -# mylex -KERNEL=="rd*", NAME="%k" - -# dri devices -KERNEL=="card*", NAME="dri/card%n", GROUP="video" -KERNEL=="nvidia*", NAME="%k", GROUP="video" -KERNEL=="3dfx*", NAME="%k", GROUP="video" - -# alsa devices -SUBSYSTEM=="sound", GROUP="audio" -KERNEL=="controlC[0-9]*", NAME="snd/%k" -KERNEL=="hw[CD0-9]*", NAME="snd/%k" -KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" -KERNEL=="midiC[D0-9]*", NAME="snd/%k" -KERNEL=="timer", NAME="snd/%k" -KERNEL=="seq", NAME="snd/%k" - -# capi devices -KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20", GROUP="uucp", MODE="0660" -KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" - -# cpu devices -KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" -KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -KERNEL=="microcode", NAME="cpu/microcode" - -# dm devices (ignore them) -KERNEL=="dm-[0-9]*", OPTIONS="ignore_device" -# create a symlink named after the device map name -# note devmap_name comes with extras/multipath -#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" -KERNEL=="device-mapper", NAME="mapper/control" - -# fb devices -KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video" - -# floppy devices -KERNEL=="fd[0-9]*", NAME="floppy/%n", SYMLINK+="%k", GROUP="floppy" - -# i2c devices -KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK+="%k" - -# input devices -KERNEL=="mice", NAME="input/%k", MODE="0644" -KERNEL=="mouse*", NAME="input/%k", MODE="0644" -KERNEL=="event*", NAME="input/%k", MODE="0600" -KERNEL=="js*", NAME="input/%k", MODE="664" -KERNEL=="ts*", NAME="input/%k", MODE="0600" - -# loop devices -KERNEL=="loop[0-9]*", NAME="loop/%n", SYMLINK+="%k", GROUP="disk" - -# md block devices -KERNEL=="md[0-9]*", NAME="md/%n", SYMLINK+="%k", GROUP="disk" - -# aoe char devices, -SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k", GROUP="disk", MODE="0220" -SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k", GROUP="disk", MODE="0440" -SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k", GROUP="disk", MODE="0220" - -# misc devices -KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="rtc", NAME="misc/%k", SYMLINK+="%k", MODE="0664" -KERNEL=="uinput", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="inotify", NAME="misc/%k", SYMLINK+="%k", MODE="0666" - -# netlink devices -KERNEL=="route", NAME="netlink/%k" -KERNEL=="skip", NAME="netlink/%k" -KERNEL=="usersock", NAME="netlink/%k" -KERNEL=="fwmonitor", NAME="netlink/%k" -KERNEL=="tcpdiag", NAME="netlink/%k" -KERNEL=="nflog", NAME="netlink/%k" -KERNEL=="xfrm", NAME="netlink/%k" -KERNEL=="arpd", NAME="netlink/%k" -KERNEL=="route6", NAME="netlink/%k" -KERNEL=="ip6_fw", NAME="netlink/%k" -KERNEL=="dnrtmsg", NAME="netlink/%k" -KERNEL=="tap*", NAME="netlink/%k" - -# network devices -KERNEL=="tun", NAME="net/%k", MODE="0600" - -# ramdisk devices -KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k" - -# IEEE1394 (firewire) devices (must be before raw devices below) -KERNEL=="raw1394", NAME="%k", GROUP="video" -KERNEL=="dv1394*", NAME="dv1394/%n", GROUP="video" -KERNEL=="video1394*", NAME="video1394/%n", GROUP="video" - -# raw devices -KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" -KERNEL=="ram*", NAME="%k", GROUP="disk" - -# sound devices -KERNEL=="adsp", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="adsp[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="audio", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="audio[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="dsp", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="dsp[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="mixer", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="mixer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="sequencer", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" -KERNEL=="sequencer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio" - -# memory devices -KERNEL=="random", NAME="%k", MODE="0666" -KERNEL=="urandom", NAME="%k", MODE="0444" -KERNEL=="mem", NAME="%k", MODE="0640" -KERNEL=="kmem", NAME="%k", MODE="0640" -KERNEL=="port", NAME="%k", MODE="0640" -KERNEL=="full", NAME="%k", MODE="0666" -KERNEL=="null", NAME="%k", MODE="0666" -KERNEL=="zero", NAME="%k", MODE="0666" - -# usb devices -KERNEL=="hiddev*", NAME="usb/%k" -KERNEL=="auer*", NAME="usb/%k" -KERNEL=="legousbtower*", NAME="usb/%k", GROUP="usb" -KERNEL=="dabusb*", NAME="usb/%k" -BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp" - -# v4l devices -KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK+="video%n", GROUP="video" -KERNEL=="radio[0-9]*", NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video" -KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK+="vbi%n", GROUP="video" -KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="video" - -# dvb devices -SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video" - -# Asterisk Zaptel devices -KERNEL=="zapctl", NAME="zap/ctl" -KERNEL=="zaptimer", NAME="zap/timer" -KERNEL=="zapchannel", NAME="zap/channel" -KERNEL=="zappseudo", NAME="zap/pseudo" -KERNEL=="zap[0-9]*", NAME="zap/%n" - -# pilot/palm devices -KERNEL=="pilot", NAME="%k", GROUP="uucp" - -# jaz devices -KERNEL=="jaz*", NAME="%k", GROUP="disk" - -# zip devices -KERNEL=="pocketzip*", NAME="%k", GROUP="disk" -KERNEL=="zip*", NAME="%k", GROUP="disk" - -# ls120 devices -KERNEL=="ls120", NAME="%k", GROUP="disk" - -# lp devices -KERNEL=="lp*", NAME="%k", GROUP="lp" -KERNEL=="irlpt", NAME="%k", GROUP="lp" -KERNEL=="usblp", NAME="%k", GROUP="lp" -KERNEL=="lp*", NAME="%k", GROUP="lp" -KERNEL=="parport*", NAME="%k", GROUP="lp" - -# tape devices -KERNEL=="ht*", NAME="%k", GROUP="tape" -KERNEL=="nht*", NAME="%k", GROUP="tape" -KERNEL=="pt*", NAME="%k", GROUP="tape" -KERNEL=="npt*", NAME="%k", GROUP="tape" -KERNEL=="st*", NAME="%k", GROUP="tape" -KERNEL=="nst*", NAME="%k", GROUP="tape" -KERNEL=="osst*", NAME="%k", GROUP="tape" -KERNEL=="nosst*", NAME="%k", GROUP="tape" - -# diskonkey devices -KERNEL=="diskonkey*", NAME="%k", GROUP="disk" - -# rem_ide devices -KERNEL=="microdrive*", NAME="%k", GROUP="disk" - -# kbd devices -KERNEL=="kbd", NAME="%k", MODE="0664" - -# Sony Vaio Jogdial sonypi device -KERNEL=="sonypi", NAME="%k", MODE="0666" - -# packet devices -KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrw", MODE="0660" -KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="cdrw", MODE="0660" - -# infiniband devices -KERNEL=="umad*", NAME="infiniband/%k" -KERNEL=="issm*", NAME="infiniband/%k" - - -# usbfs-like device nodes -SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" - - -# Module autoloading - -# Autoload modules that lack aliases but have them defined inutoload modules -ENV{MODALIAS}=="?*", ACTION=="add", RUN+="modprobe.sh $env{MODALIAS}" - -# /etc/modprobe.conf. -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" -# If you have problems with some pnp modules being loaded, please enter the -# following aliases into the modprobe configuration files. These are needed by -# udev to autoload some modules -# alias pnp:dPNP0510 irtty-sir -# alias pnp:dPNP0511 irtty-sir -# alias pnp:dPNP0700 floppy -# alias pnp:dPNP0800 pcspkr -# alias pnp:dPNP0b00 rtc -# alias pnp:dPNP0303 atkbd -# alias pnp:dPNP0f13 psmouse -# alias pnp:dPNPb02f analog - - -# Parts taken from redhat-rules -# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC -# sr: 4 TYPE_WORM, 5 TYPE_ROM -# st/osst: 1 TYPE_TAPE - -# Setting timeout for tape-devices to 900 seconds -# if you need timeouts for other devices add a similar rule -# with correct type-value, or open a bug on bugs.gentoo.org. -ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ - RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" - -# assign cdrom-permission also to associated generic device -KERNEL=="sg[0-9]*", ACTION=="add", ATTRS{type}=="4|5", GROUP="cdrom" - -# Load driver for scsi-device -ACTION=="add", SUBSYSTEM=="scsi_device", RUN+="modprobe.sh sg" -ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ - RUN+="modprobe.sh sd_mod" -ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="4|5", \ - RUN+="modprobe.sh sr_mod" - -ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ENV{ID_SCSI_TAPE_DRIVER}="st" -ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ - ATTRS{model}!="ADR*", ENV{ID_SCSI_TAPE_DRIVER}="osst" -ENV{ID_SCSI_TAPE_DRIVER}=="?*", RUN+="modprobe.sh $env{ID_SCSI_TAPE_DRIVER}" - - -# Load firmware -SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" - - -# be backward compatible for a while with the /etc/dev.d and /etc/hotplug.d/ systems -# run /etc/hotplug.d/ stuff only if we came from a hotplug event, not for udevstart -#ENV{UDEVD_EVENT}=="1", RUN+="udev_run_hotplugd $env{SUBSYSTEM}" - -# always run /etc/dev.d/ stuff for now. -RUN+="udev_run_devd $env{SUBSYSTEM}" - -# debugging monitor -RUN+="socket:/org/kernel/udev/monitor" diff --git a/sys-fs/udev/udev-114-r1.ebuild b/sys-fs/udev/udev-114-r1.ebuild deleted file mode 100644 index abb49c113a9a..000000000000 --- a/sys-fs/udev/udev-114-r1.ebuild +++ /dev/null @@ -1,315 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-114-r1.ebuild,v 1.5 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs linux-info - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - if kernel_is le 2 6 14 >/dev/null; then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - EPATCH_OPTS="-p1" epatch "${FILESDIR}"/${PN}-114-root-link-2.diff - - # We already have that rule in 50-udev.rules - sed -i extras/cdrom_id/Makefile -e '/60-cdrom_id.rules/d' - - # 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.gentoo - # (more for my own needs than anything else ...) - MD5=`md5sum < "${S}/etc/udev/gentoo/50-udev.rules"` - MD5=${MD5/ -/} - if [ "${MD5}" != "3ee76822195ebc9c6f89228d29fcb019" ] - then - echo - eerror "gentoo/udev.rules has been updated, please validate!" - die "gentoo/udev.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/gentoo/50-udev.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/modprobe-114.sh modprobe.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - dolib extras/volume_id/lib/*.so* - into /usr - dolib extras/volume_id/lib/*.a - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Our udev config file - insinto /etc/udev - newins "${FILESDIR}"/udev.conf.post_113 udev.conf - - # Our rules files - insinto /etc/udev/rules.d/ - doins etc/udev/gentoo/??-*.rules - # Use upstream's persistent rules for devices - doins etc/udev/rules.d/60-*.rules - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-114-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - if use s390; then - # s390 does not has persistent mac addresses - # and we only have persistence rules for mac. - # For now just remove the rules file. - rm "${D}"/etc/udev/rules.d/75-persistent-net-generator.rules - fi - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - -} - -pkg_preinst() { - if [[ -d "${ROOT}"/lib/udev-state ]] ; then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - 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 - - # delete the old udev.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/10-udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [ -f "${ROOT}/etc/init.d/coldplug" ] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == "1" ]] ; then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] ; then - if [[ -e "${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules" ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d "${ROOT}"/lib/udev/devices ]]; then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] ; then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net - fi - - if [[ $previous_less_than_106_r5 = 0 ]] ; then - if [[ -e "${ROOT}"/etc/udev/rules.d/95-net.rules ]]; then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d "${ROOT}"/etc/dev.d ]]; then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d - if [[ -d "${ROOT}"/etc/dev.d ]]; then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ "${ROOT}" == "/" ]] ; then - # check if root of init-process is identical to ours - if [ -r /proc/1/root -a /proc/1/root/ -ef /proc/self/root/ ]; then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] ; then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-114-r2.ebuild b/sys-fs/udev/udev-114-r2.ebuild deleted file mode 100644 index bcc01c36f3fc..000000000000 --- a/sys-fs/udev/udev-114-r2.ebuild +++ /dev/null @@ -1,332 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-114-r2.ebuild,v 1.5 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ "${KV_MAJOR}" == 2 ]] && [[ "${KV_MINOR}" == 6 ]] && [[ "${KV_MICRO}" -ge 15 ]]; then - ok=1 - fi - - if [[ "$ok" = "0" ]]; then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - EPATCH_OPTS="-p1" epatch "${FILESDIR}"/${PN}-114-root-link-2.diff - - # fix persistent-net reaction on unset DRIVERS, bug #189042 - epatch "${FILESDIR}/${P}-fix-persistent-net.diff" - - # We already have that rule in 50-udev.rules - sed -i extras/cdrom_id/Makefile -e '/60-cdrom_id.rules/d' - - # 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.gentoo - # (more for my own needs than anything else ...) - MD5=`md5sum < "${S}/etc/udev/gentoo/50-udev.rules"` - MD5=${MD5/ -/} - if [ "${MD5}" != "3ee76822195ebc9c6f89228d29fcb019" ] - then - echo - eerror "gentoo/udev.rules has been updated, please validate!" - die "gentoo/udev.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/gentoo/50-udev.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/modprobe-114.sh modprobe.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - dolib extras/volume_id/lib/*.so* - into /usr - dolib extras/volume_id/lib/*.a - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Our udev config file - insinto /etc/udev - newins "${FILESDIR}"/udev.conf.post_113 udev.conf - - # Our rules files - insinto /etc/udev/rules.d/ - doins etc/udev/gentoo/??-*.rules - # Use upstream's persistent rules for devices - doins etc/udev/rules.d/60-*.rules - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-114-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - if use s390; then - # s390 does not has persistent mac addresses - # and we only have persistence rules for mac. - # For now just remove the rules file. - rm "${D}"/etc/udev/rules.d/75-persistent-net-generator.rules - fi - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - -} - -pkg_preinst() { - if [[ -d "${ROOT}"/lib/udev-state ]] ; then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - 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 - - # delete the old udev.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/10-udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [ -f "${ROOT}/etc/init.d/coldplug" ] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == "1" ]] ; then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] ; then - if [[ -e "${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules" ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d "${ROOT}"/lib/udev/devices ]]; then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] ; then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net - fi - - if [[ $previous_less_than_106_r5 = 0 ]] ; then - if [[ -e "${ROOT}"/etc/udev/rules.d/95-net.rules ]]; then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d "${ROOT}"/etc/dev.d ]]; then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d - if [[ -d "${ROOT}"/etc/dev.d ]]; then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ "${ROOT}" == "/" ]] ; then - # check if root of init-process is identical to ours - if [ -r /proc/1/root -a /proc/1/root/ -ef /proc/self/root/ ]; then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] ; then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-115-r5.ebuild b/sys-fs/udev/udev-115-r5.ebuild deleted file mode 100644 index fb303039e908..000000000000 --- a/sys-fs/udev/udev-115-r5.ebuild +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-115-r5.ebuild,v 1.3 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -PATCH="${P}-update-20070920-2.diff" -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2 - mirror://gentoo/${PATCH}.bz2 - http://dev.gentoo.org/~zzam/distfiles/${PATCH}.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ "${KV_MAJOR}" == 2 ]] && [[ "${KV_MINOR}" == 6 ]] && [[ "${KV_MICRO}" -ge 15 ]]; then - ok=1 - fi - - if [[ "$ok" = "0" ]]; then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - epatch "${WORKDIR}/${PATCH}" - EPATCH_OPTS="-p1" epatch "${FILESDIR}/udev-115-add-special-rule-files.diff" - epatch "${FILESDIR}/${P}-fix-modprobe-calls.diff" - EPATCH_OPTS="-p1" epatch "${FILESDIR}/${PN}-114-root-link-2.diff" - - # add blacklisting option where needed - #sed -e '/MODALIAS/s#modprobe#modprobe --use-blacklist#' \ - # -e '/while read id/s#modprobe#modprobe --use-blacklist#' \ - # -i etc/udev/rules.d/80-drivers.rules - - # no longer needed - rm etc/udev/gentoo/50-udev.rules - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=`md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules"` - MD5=${MD5/ -/} - if [ "${MD5}" != "644e3c77eb866dee4ff8dda2e95cd187" ] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.post_115 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - - # Adding arch specific rules - if [[ -f "packages/40-${ARCH}.rules" ]]; then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-115-r3.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d "${ROOT}"/lib/udev-state ]] ; then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - 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 - - # delete the old udev.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/10-udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [ -f "${ROOT}/etc/init.d/coldplug" ] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == "1" ]] ; then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] ; then - if [[ -e "${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules" ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d "${ROOT}"/lib/udev/devices ]]; then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] ; then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] ; then - if [[ -e "${ROOT}"/etc/udev/rules.d/95-net.rules ]]; then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d "${ROOT}"/etc/dev.d ]]; then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d "${ROOT}"/etc/dev.d ]]; then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ "${ROOT}" == "/" ]] ; then - # check if root of init-process is identical to ours - if [ -r /proc/1/root -a /proc/1/root/ -ef /proc/self/root/ ]; then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] ; then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-115-r6.ebuild b/sys-fs/udev/udev-115-r6.ebuild deleted file mode 100644 index 70c793871ce7..000000000000 --- a/sys-fs/udev/udev-115-r6.ebuild +++ /dev/null @@ -1,353 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-115-r6.ebuild,v 1.3 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -PATCH="${P}-update-20070924.diff" -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2 - mirror://gentoo/${PATCH}.bz2 - http://dev.gentoo.org/~zzam/distfiles/${PATCH}.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - epatch "${WORKDIR}/${PATCH}" - EPATCH_OPTS="-p1" epatch "${FILESDIR}/${PN}-114-root-link-2.diff" - epatch "${FILESDIR}"/udev-115-update-gentoo-rules-2.diff - rm etc/udev/gentoo/40-audio.rules - - # add blacklisting option where needed - #sed -e '/MODALIAS/s#modprobe#modprobe --use-blacklist#' \ - # -e '/while read id/s#modprobe#modprobe --use-blacklist#' \ - # -i etc/udev/rules.d/80-drivers.rules - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != 644e3c77eb866dee4ff8dda2e95cd187 ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-115-r6.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-115.ebuild b/sys-fs/udev/udev-115.ebuild deleted file mode 100644 index c5f1295a75dd..000000000000 --- a/sys-fs/udev/udev-115.ebuild +++ /dev/null @@ -1,336 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-115.ebuild,v 1.8 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ "${KV_MAJOR}" == 2 ]] && [[ "${KV_MINOR}" == 6 ]] && [[ "${KV_MICRO}" -ge 15 ]]; then - ok=1 - fi - - if [[ "$ok" = "0" ]]; then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - EPATCH_OPTS="-p1" epatch "${FILESDIR}/${PN}-114-root-link-2.diff" - epatch "${FILESDIR}/${P}-rules-update.diff" - - # We already have that rule in 50-udev.rules - sed -i extras/cdrom_id/Makefile -e '/60-cdrom_id.rules/d' - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to udev.rules.gentoo - # (more for my own needs than anything else ...) - MD5=`md5sum < "${S}/etc/udev/gentoo/50-udev.rules"` - MD5=${MD5/ -/} - if [ "${MD5}" != "423964bc802105edc672e170f733ef28" ] - then - echo - eerror "gentoo/udev.rules has been updated, please validate!" - die "gentoo/udev.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/gentoo/50-udev.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/modprobe-114.sh modprobe.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.post_114 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # For now use our own file - not default upstream one - rm "${D}"/etc/udev/rules.d/50-udev-default.rules - - # Our rules files - mv gentoo/80-hotplug.rules gentoo/80-drivers.rules - doins gentoo/??-*.rules - - # Adding arch specific rules - if [[ -f "packages/40-${ARCH}.rules" ]]; then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-114-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - -} - -pkg_preinst() { - if [[ -d "${ROOT}"/lib/udev-state ]] ; then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - 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 - - # delete the old udev.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [ -h "${ROOT}/etc/hotplug.d/default/10-udev.hotplug" ] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [ -f "${ROOT}/etc/init.d/coldplug" ] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == "1" ]] ; then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] ; then - if [[ -e "${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules" ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d "${ROOT}"/lib/udev/devices ]]; then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] ; then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] ; then - if [[ -e "${ROOT}"/etc/udev/rules.d/95-net.rules ]]; then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d "${ROOT}"/etc/dev.d ]]; then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d "${ROOT}"/etc/dev.d ]]; then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ "${ROOT}" == "/" ]] ; then - # check if root of init-process is identical to ours - if [ -r /proc/1/root -a /proc/1/root/ -ef /proc/self/root/ ]; then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] ; then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-116-r1.ebuild b/sys-fs/udev/udev-116-r1.ebuild deleted file mode 100644 index bc179d3e879b..000000000000 --- a/sys-fs/udev/udev-116-r1.ebuild +++ /dev/null @@ -1,353 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-116-r1.ebuild,v 1.3 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - #epatch "${WORKDIR}/${PATCH}" - EPATCH_OPTS="-p1" epatch "${FILESDIR}/${PN}-114-root-link-2.diff" - - epatch "${FILESDIR}/${P}-gentoo-rules-update.diff" - - # Bug 195317 - epatch "${FILESDIR}"/${P}-path-to-logger.diff - - # add blacklisting option where needed - #sed -e '/MODALIAS/s#modprobe#modprobe --use-blacklist#' \ - # -e '/while read id/s#modprobe#modprobe --use-blacklist#' \ - # -i etc/udev/rules.d/80-drivers.rules - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != 42ee128b936ebad2e80f011597c869b2 ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-115-r6.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-116.ebuild b/sys-fs/udev/udev-116.ebuild deleted file mode 100644 index 459d8b129549..000000000000 --- a/sys-fs/udev/udev-116.ebuild +++ /dev/null @@ -1,351 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-116.ebuild,v 1.3 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator \ - extras/root_link" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - #epatch "${WORKDIR}/${PATCH}" - EPATCH_OPTS="-p1" epatch "${FILESDIR}/${PN}-114-root-link-2.diff" - - # Bug 195317 - epatch "${FILESDIR}"/${P}-path-to-logger.diff - - # add blacklisting option where needed - #sed -e '/MODALIAS/s#modprobe#modprobe --use-blacklist#' \ - # -e '/while read id/s#modprobe#modprobe --use-blacklist#' \ - # -i etc/udev/rules.d/80-drivers.rules - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != 42ee128b936ebad2e80f011597c869b2 ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - # make install does not install this - dosbin udevstart || die "Required binary not installed properly" - doman udevstart.8 - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "Required binary not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "Required binary not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-115-r6.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-117.ebuild b/sys-fs/udev/udev-117.ebuild deleted file mode 100644 index 75a7f3600d52..000000000000 --- a/sys-fs/udev/udev-117.ebuild +++ /dev/null @@ -1,349 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-117.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != 42ee128b936ebad2e80f011597c869b2 ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-115-r6.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - dodoc docs/writing_udev_rules/* - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-118-r1.ebuild b/sys-fs/udev/udev-118-r1.ebuild deleted file mode 100644 index 66401c2999e0..000000000000 --- a/sys-fs/udev/udev-118-r1.ebuild +++ /dev/null @@ -1,354 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-118-r1.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != a71a3459f46eb61b209a73fc0c6a299f ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-118-r1.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-118-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-118-r2.ebuild b/sys-fs/udev/udev-118-r2.ebuild deleted file mode 100644 index d345a3e89b26..000000000000 --- a/sys-fs/udev/udev-118-r2.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-118-r2.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != a71a3459f46eb61b209a73fc0c6a299f ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-118-r1.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - newexe "${FILESDIR}"/shell-compat-118-r2.sh shell-compat.sh \ - || die "shell-compat.sh not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - echo "# If you need to change mount-options, do it in /etc/fstab" \ - >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-118-r2.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-118-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - ewarn - ewarn "mount options for directory /dev are no longer" - ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" - ewarn "as for other directories." - - elog - elog "For more information on udev on Gentoo, writing udev rules, and" - elog " fixing known issues visit:" - elog " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-118-r3.ebuild b/sys-fs/udev/udev-118-r3.ebuild deleted file mode 100644 index 3f71ae7c9a01..000000000000 --- a/sys-fs/udev/udev-118-r3.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-118-r3.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != a71a3459f46eb61b209a73fc0c6a299f ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-118-r1.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - newexe "${FILESDIR}"/shell-compat-118-r3.sh shell-compat.sh \ - || die "shell-compat.sh not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - echo "# If you need to change mount-options, do it in /etc/fstab" \ - >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-118-r2.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-118-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - ewarn - ewarn "mount options for directory /dev are no longer" - ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" - ewarn "as for other directories." - - elog - elog "For more information on udev on Gentoo, writing udev rules, and" - elog " fixing known issues visit:" - elog " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-118.ebuild b/sys-fs/udev/udev-118.ebuild deleted file mode 100644 index 34ee7c5ab2ee..000000000000 --- a/sys-fs/udev/udev-118.ebuild +++ /dev/null @@ -1,354 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-118.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev you need to update" - ewarn "to kernel >=2.6.15!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != a71a3459f46eb61b209a73fc0c6a299f ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-115-r6.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - einfo - einfo "For more information on udev on Gentoo, writing udev rules, and" - einfo " fixing known issues visit:" - einfo " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-119-r1.ebuild b/sys-fs/udev/udev-119-r1.ebuild deleted file mode 100644 index 87f63d77914d..000000000000 --- a/sys-fs/udev/udev-119-r1.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-119-r1.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 18 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev reliable you should update" - ewarn "to at least kernel version 2.6.18!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != db44f7e02100f57a555d48e2192c3f8d ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-118-r1.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - newexe "${FILESDIR}"/shell-compat-118-r3.sh shell-compat.sh \ - || die "shell-compat.sh not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - echo "# If you need to change mount-options, do it in /etc/fstab" \ - >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-119-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-118-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - ewarn - ewarn "mount options for directory /dev are no longer" - ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" - ewarn "as for other directories." - - elog - elog "For more information on udev on Gentoo, writing udev rules, and" - elog " fixing known issues visit:" - elog " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-120.ebuild b/sys-fs/udev/udev-120.ebuild deleted file mode 100644 index 7ae3a6ae7af6..000000000000 --- a/sys-fs/udev/udev-120.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-120.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 18 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev reliable you should update" - ewarn "to at least kernel version 2.6.18!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != db44f7e02100f57a555d48e2192c3f8d ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-118-r1.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - newexe "${FILESDIR}"/shell-compat-118-r3.sh shell-compat.sh \ - || die "shell-compat.sh not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - echo "# If you need to change mount-options, do it in /etc/fstab" \ - >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-119-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-118-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - ewarn - ewarn "mount options for directory /dev are no longer" - ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" - ewarn "as for other directories." - - elog - elog "For more information on udev on Gentoo, writing udev rules, and" - elog " fixing known issues visit:" - elog " http://www.gentoo.org/doc/en/udev-guide.xml" -} diff --git a/sys-fs/udev/udev-121.ebuild b/sys-fs/udev/udev-121.ebuild deleted file mode 100644 index 8e05e3881307..000000000000 --- a/sys-fs/udev/udev-121.ebuild +++ /dev/null @@ -1,363 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-121.ebuild,v 1.2 2008/06/15 05:54:32 zmedico Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" -HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" -SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="selinux" - -DEPEND="selinux? ( sys-libs/libselinux )" -RDEPEND="!sys-apps/coldplug - !<sys-fs/device-mapper-1.02.19-r1" -RDEPEND="${DEPEND} ${RDEPEND} - >=sys-apps/baselayout-1.12.5" -# We need the lib/rcscripts/addon support -PROVIDE="virtual/dev-manager" - -pkg_setup() { - udev_helper_dir="/$(get_libdir)/udev" - - myconf= - extras="extras/ata_id \ - extras/cdrom_id \ - extras/edd_id \ - extras/firmware \ - extras/floppy \ - extras/path_id \ - extras/scsi_id \ - extras/usb_id \ - extras/volume_id \ - extras/collect \ - extras/rule_generator" - - use selinux && myconf="${myconf} USE_SELINUX=true" - - # comparing kernel version without linux-info.eclass to not pull - # virtual/linux-sources - - local KV=$(uname -r) - local KV_MAJOR=$(get_major_version ${KV}) - local KV_MINOR=$(get_version_component_range 2 ${KV}) - local KV_MICRO=$(get_version_component_range 3 ${KV}) - - local ok=0 - if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 18 ]] - then - ok=1 - fi - - if [[ ${ok} == 0 ]] - then - ewarn - ewarn "${P} does not support Linux kernel before version 2.6.15!" - ewarn "If you want to use udev reliable you should update" - ewarn "to at least kernel version 2.6.18!" - ewarn - ebeep - fi -} - -sed_helper_dir() { - sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" -} - -src_unpack() { - unpack ${A} - - cd "${S}" - - # patches go here... - epatch "${FILESDIR}/${P}-cdrom_id-segfault.diff" - - # 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 - # Do not require xmlto to refresh manpages - sed -ie 's|$(MAN_PAGES)||g' Makefile - - # Make sure there is no sudden changes to upstream rules file - # (more for my own needs than anything else ...) - MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") - MD5=${MD5/ -/} - if [[ ${MD5} != db44f7e02100f57a555d48e2192c3f8d ]] - then - echo - eerror "50-udev-default.rules has been updated, please validate!" - die "50-udev-default.rules has been updated, please validate!" - fi - - sed_helper_dir \ - etc/udev/rules.d/50-udev-default.rules \ - extras/rule_generator/write_*_rules \ - udev_rules_parse.c \ - udev_rules.c - - # Use correct multilib dir - sed -i extras/volume_id/lib/Makefile \ - -e "/ =/s-/lib-/$(get_libdir)-" -} - -src_compile() { - filter-flags -fprefetch-loop-arrays - - if [[ -z ${extras} ]]; then - eerror "Variable extras is unset!" - eerror "It seems you suffer from Bug #190994" - die "Variable extras is unset!" - fi - - # Not everyone has full $CHOST-{ld,ar,etc...} yet - local mycross="" - type -p ${CHOST}-ar && mycross=${CHOST}- - - emake \ - EXTRAS="${extras}" \ - libudevdir=${udev_helper_dir} \ - CROSS_COMPILE=${mycross} \ - OPTFLAGS="" \ - ${myconf} || die "compiling udev failed" -} - -src_install() { - into / - emake \ - DESTDIR="${D}" \ - libudevdir=${udev_helper_dir} \ - EXTRAS="${extras}" \ - ${myconf} \ - install || die "make install failed" - - exeinto "${udev_helper_dir}" - newexe "${FILESDIR}"/net-118-r1.sh net.sh || die "net.sh not installed properly" - newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ - || die "move_tmp_persistent_rules.sh not installed properly" - doexe "${FILESDIR}"/write_root_link_rule \ - || die "write_root_link_rule not installed properly" - newexe "${FILESDIR}"/shell-compat-118-r3.sh shell-compat.sh \ - || die "shell-compat.sh not installed properly" - - keepdir "${udev_helper_dir}"/state - keepdir "${udev_helper_dir}"/devices - - # create symlinks for these utilities to /sbin - # where multipath-tools expect them to be (Bug #168588) - dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id - dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id - - # vol_id library (needed by mount and HAL) - into / - rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null - dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" - into /usr - dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" - - # handle static linking bug #4411 - rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" - gen_usr_ldscript libvolume_id.so - - # Add gentoo stuff to udev.conf - echo "# If you need to change mount-options, do it in /etc/fstab" \ - >> "${D}"/etc/udev/udev.conf - - # Now installing rules - cd etc/udev - insinto /etc/udev/rules.d/ - - # Our rules files - doins gentoo/??-*.rules - doins packages/40-alsa.rules - - # Adding arch specific rules - if [[ -f packages/40-${ARCH}.rules ]] - then - doins "packages/40-${ARCH}.rules" - fi - cd "${S}" - - # our udev hooks into the rc system - insinto /$(get_libdir)/rcscripts/addons - newins "${FILESDIR}"/udev-start-119-r1.sh udev-start.sh - newins "${FILESDIR}"/udev-stop-118-r2.sh udev-stop.sh - - # The udev-post init-script - newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount - - insinto /etc/modprobe.d - newins "${FILESDIR}"/blacklist-110 blacklist - doins "${FILESDIR}"/pnp-aliases - - # convert /lib/udev to real used dir - sed_helper_dir \ - "${D}/$(get_libdir)"/rcscripts/addons/*.sh \ - "${D}"/etc/init.d/udev* \ - "${D}"/etc/modprobe.d/* - - # documentation - dodoc ChangeLog FAQ README TODO RELEASE-NOTES - dodoc docs/{overview,udev_vs_devfs} - - cd docs/writing_udev_rules - mv index.html writing_udev_rules.html - dohtml *.html - - cd "${S}" - - newdoc extras/volume_id/README README_volume_id - - echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev - doenvd 20udev -} - -pkg_preinst() { - if [[ -d ${ROOT}/lib/udev-state ]] - then - mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ - rm -r "${ROOT}"/lib/udev-state - fi - - if [[ -f ${ROOT}/etc/udev/udev.config && - ! -f ${ROOT}/etc/udev/udev.rules ]] - then - mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules - fi - - # delete the old udev.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug - fi - - # delete the old wait_for_sysfs.hotplug symlink if it is present - if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] - then - rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug - fi - - # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) - coldplug_stale="" - if [[ -f ${ROOT}/etc/init.d/coldplug ]] - then - coldplug_stale="1" - fi - - has_version "=${CATEGORY}/${PN}-103-r3" - previous_equal_to_103_r3=$? - - has_version "<${CATEGORY}/${PN}-104-r5" - previous_less_than_104_r5=$? - - has_version "<${CATEGORY}/${PN}-106-r5" - previous_less_than_106_r5=$? - - has_version "<${CATEGORY}/${PN}-113" - previous_less_than_113=$? -} - -pkg_postinst() { - # people want reminders, I'll give them reminders. Odds are they will - # just ignore them anyway... - - if [[ ${coldplug_stale} == 1 ]] - then - ewarn "A stale coldplug init script found. You should run:" - ewarn - ewarn " rc-update del coldplug" - ewarn " rm -f /etc/init.d/coldplug" - ewarn - ewarn "udev now provides its own coldplug functionality." - fi - - # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules - if [[ $previous_equal_to_103_r3 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] - then - ewarn "Deleting stray 40-scsi-hotplug.rules" - ewarn "installed by sys-fs/udev-103-r3" - rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules - fi - - # Removing some device-nodes we thought we need some time ago - if [[ -d ${ROOT}/lib/udev/devices ]] - then - rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} - fi - - # Removing some old file - if [[ $previous_less_than_104_r5 = 0 ]] - then - rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null - fi - - if [[ $previous_less_than_106_r5 = 0 ]] && - [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] - then - rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules - fi - - # Try to remove /etc/dev.d as that is obsolete - if [[ -d ${ROOT}/etc/dev.d ]] - then - rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null - if [[ -d ${ROOT}/etc/dev.d ]] - then - ewarn "You still have the directory /etc/dev.d on your system." - ewarn "This is no longer used by udev and can be removed." - fi - fi - - # 64-device-mapper.rules now gets installed by sys-fs/device-mapper - # remove it if user don't has sys-fs/device-mapper installed - if [[ $previous_less_than_113 = 0 ]] && - [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && - ! has_version sys-fs/device-mapper - then - rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules - einfo "Removed unneeded file 64-device-mapper.rules" - fi - - if [[ ${ROOT} == / ]] - then - # check if root of init-process is identical to ours - if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] - then - einfo "restarting udevd now." - if [[ -n $(pidof udevd) ]] - then - killall -15 udevd &>/dev/null - sleep 1 - killall -9 udevd &>/dev/null - fi - /sbin/udevd --daemon - fi - fi - - ewarn "If you build an initramfs including udev, then please" - ewarn "make sure that the /sbin/udevadm binary gets included," - ewarn "as the helper apps udevinfo, udevtrigger, ... are now" - ewarn "only symlinks to udevadm." - - ewarn - ewarn "mount options for directory /dev are no longer" - ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" - ewarn "as for other directories." - - elog - elog "For more information on udev on Gentoo, writing udev rules, and" - elog " fixing known issues visit:" - elog " http://www.gentoo.org/doc/en/udev-guide.xml" -} |