summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2008-11-25 18:57:01 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2008-11-25 18:57:01 +0000
commitc7c075e57fa0d89b1ef47159994062d566edcfe6 (patch)
tree513ebb9776f6fdabd3fa9f88f3b317f44e61cc85
parentVersion bump. Remove old. (diff)
downloadgentoo-2-c7c075e57fa0d89b1ef47159994062d566edcfe6.tar.gz
gentoo-2-c7c075e57fa0d89b1ef47159994062d566edcfe6.tar.bz2
gentoo-2-c7c075e57fa0d89b1ef47159994062d566edcfe6.zip
Add missing pieces to kernel-compat rules. Add patch to not warn about usage of PHYSDEV* in rules doing WAIT_FOR.
(Portage version: 2.1.6_rc1/cvs/Linux 2.6.27-gentoo-r1 i686)
-rw-r--r--sys-fs/udev/ChangeLog8
-rw-r--r--sys-fs/udev/files/udev-133-rules-update.diff70
-rw-r--r--sys-fs/udev/files/udev-133-silence-physdev-warnings.diff42
-rw-r--r--sys-fs/udev/udev-133.ebuild4
4 files changed, 122 insertions, 2 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index f83331feb933..64a309f3bb5b 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,12 @@
# 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.419 2008/11/23 20:05:19 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.420 2008/11/25 18:57:00 zzam Exp $
+
+ 25 Nov 2008; Matthias Schwarzott <zzam@gentoo.org>
+ +files/udev-133-rules-update.diff,
+ +files/udev-133-silence-physdev-warnings.diff, udev-133.ebuild:
+ Add missing pieces to kernel-compat rules. Add patch to not warn about
+ usage of PHYSDEV* in rules doing WAIT_FOR.
23 Nov 2008; Matthias Schwarzott <zzam@gentoo.org>
+files/udev-start-133.sh, +files/udev.confd, udev-133.ebuild:
diff --git a/sys-fs/udev/files/udev-133-rules-update.diff b/sys-fs/udev/files/udev-133-rules-update.diff
new file mode 100644
index 000000000000..2861a83225f6
--- /dev/null
+++ b/sys-fs/udev/files/udev-133-rules-update.diff
@@ -0,0 +1,70 @@
+diff --git a/rules/gentoo/30-kernel-compat.rules b/rules/gentoo/30-kernel-compat.rules
+index 1f767df..d07e7fa 100644
+--- a/rules/gentoo/30-kernel-compat.rules
++++ b/rules/gentoo/30-kernel-compat.rules
+@@ -1,9 +1,17 @@
+ # do not edit this file, it will be overwritten on update
+
+-ACTION!="add", GOTO="kernel_compat_end"
++ACTION!="add|change", GOTO="kernel_compat_end"
++
++#
++# rules to workaround bad sysfs timing
++#
++
++ACTION!="add", GOTO="kernel_compat_wait_end"
+
+ # workarounds needed to synchronize with sysfs
++# needed for kernels < v2.6.18-rc1
+ DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
++SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt"
+
+ # needed for kernels <2.6.16
+ SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+@@ -11,13 +19,29 @@ SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+ # needed for kernels <2.6.17
+ SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+
++LABEL="kernel_compat_wait_end"
+
++#
++# naming device rules
++#
+
++# old style usb sysfs devices
+ # needed for kernels <2.6.22
+ 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"
+
++# /sys/class/block will export this
++# needed for kernels <2.6.25-rc1
++SUBSYSTEM!="block", GOTO="block_devtype_end"
++ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk"
++ENV{DEVTYPE}!="?*", ATTR{start}=="?*", ENV{DEVTYPE}="partition"
++LABEL="block_devtype_end"
+
+
++#
++# module loading rules
++#
++ACTION!="add", GOTO="kernel_compat_end"
++
+ # this driver is broken and should not be loaded automatically
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962
+ # needed for kernels <2.6.21
+@@ -26,6 +50,11 @@ SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}=""
+ # No need for more code, as MODALIAS is present
+ ENV{MODALIAS}=="?*", GOTO="kernel_compat_end"
+
++# needed for kernel <2.6.27-rc5
++# acpi will do on newer kernels
++SUBSYSTEM=="pnp", DRIVER!="?*", \
++ RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
++
+ # needed for kernels <2.6.22
+ SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end"
+
+@@ -44,4 +73,3 @@ SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end"
+
+ LABEL="kernel_compat_end"
+
+-
diff --git a/sys-fs/udev/files/udev-133-silence-physdev-warnings.diff b/sys-fs/udev/files/udev-133-silence-physdev-warnings.diff
new file mode 100644
index 000000000000..1ae1c56b79b2
--- /dev/null
+++ b/sys-fs/udev/files/udev-133-silence-physdev-warnings.diff
@@ -0,0 +1,42 @@
+commit ae2d346642aee4fab33c88708627bcf5b0cb317d
+Author: Kay Sievers <kay.sievers@vrfy.org>
+Date: Mon Nov 24 21:24:04 2008 +0100
+
+ silence PHYSDEV* warning for WAIT_FOR* rules
+
+diff --git a/udev/udev-rules.c b/udev/udev-rules.c
+index df9fc78..afd2e88 100644
+--- a/udev/udev-rules.c
++++ b/udev/udev-rules.c
+@@ -1135,6 +1135,7 @@ static int add_rule(struct udev_rules *rules, char *line,
+ char *linepos;
+ char *attr;
+ int physdev = 0;
++ int waitfor = 0;
+ struct rule_tmp rule_tmp;
+
+ memset(&rule_tmp, 0x00, sizeof(struct rule_tmp));
+@@ -1395,6 +1396,7 @@ static int add_rule(struct udev_rules *rules, char *line,
+ if (strcasecmp(key, "WAIT_FOR") == 0 || strcasecmp(key, "WAIT_FOR_SYSFS") == 0) {
+ rule_add_key(&rule_tmp, TK_M_WAITFOR, 0, value, NULL);
+ valid = 1;
++ waitfor = 1;
+ continue;
+ }
+
+@@ -1544,11 +1546,11 @@ static int add_rule(struct udev_rules *rules, char *line,
+ err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno);
+ }
+
+- if (physdev)
+- err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels, \n"
+- "please fix it in %s:%u", filename, lineno);
++ if (physdev && !waitfor)
++ err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels, "
++ "please fix it in %s:%u\n", filename, lineno);
+
+- /* skip line if not any valid key was found */
++ /* skip line if no valid key was found */
+ if (!valid)
+ goto invalid;
+
diff --git a/sys-fs/udev/udev-133.ebuild b/sys-fs/udev/udev-133.ebuild
index 8e34b8a5ac58..c8d4217812ef 100644
--- a/sys-fs/udev/udev-133.ebuild
+++ b/sys-fs/udev/udev-133.ebuild
@@ -1,6 +1,6 @@
# 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-133.ebuild,v 1.3 2008/11/23 20:05:19 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-133.ebuild,v 1.4 2008/11/25 18:57:00 zzam Exp $
inherit eutils flag-o-matic multilib toolchain-funcs versionator
@@ -70,6 +70,8 @@ src_unpack() {
cd "${S}"
# patches go here...
+ epatch "${FILESDIR}/${P}-silence-physdev-warnings.diff"
+ epatch "${FILESDIR}/${P}-rules-update.diff"
# Make sure there is no sudden changes to upstream rules file
# (more for my own needs than anything else ...)