From 26ede2790d07031109e9398a172fbf9b0642d20c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 18 May 2007 10:47:06 +0000 Subject: [PATCH 01/16] Initialize branch F-7 for udev --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..c48525c --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-7 From aa90da26c964aff60266f273d51120f7199a4708 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 26 Jun 2007 12:59:34 +0000 Subject: [PATCH 02/16] - fixed modprobedebug option - removed snd-powermac from the default modules (#200585) --- start_udev | 5 +++-- udev.spec | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/start_udev b/start_udev index 5849a8b..b895c72 100755 --- a/start_udev +++ b/start_udev @@ -183,12 +183,13 @@ kill_udevd > "$udev_root/null" 2>&1 if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevd -d + ret=$[$ret + $?] + if strstr "$cmdline" modprobedebug; then /sbin/udevcontrol env MODPROBE_DEBUG=1 MODPROBE_OPTIONS="-s -v" fi - /sbin/udevd -d - ret=$[$ret + $?] if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi diff --git a/udev.spec b/udev.spec index 6460d7c..82ca8e4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 4%{?dist} +Release: 4.1%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -218,7 +218,7 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules </dev/null 2>&1 done EOF @@ -352,6 +352,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 26 2007 Harald Hoyer - 106-4.1 +- fixed modprobedebug option +- removed snd-powermac from the default modules (#200585) + * Wed May 02 2007 Harald Hoyer - 106-4 - do not skip all events on modprobe (#238385) - Resolves: rhbz#238385 From 7d33f5b01b5f596a258af9c5a6c7df8f69f73f75 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Jul 2007 17:57:52 +0000 Subject: [PATCH 03/16] new kernels in F-7 need new rules --- sources | 2 +- udev-084-floppy.patch | 29 --- udev-084-pg.patch | 105 ----------- udev-089-last_modalias.patch | 72 ------- udev-089-nopie.patch | 13 +- udev-091-lib64.patch | 39 ++-- udev-095-longcomment.patch | 24 --- udev-095-path_id.patch | 70 ------- udev-095-path_id2.patch | 73 -------- udev-095-selinux.patch | 65 ------- udev-rules.patch | 354 ++++++++++++++++++++++++++++------- udev.spec | 103 +++++----- udevstart2.patch | 251 ------------------------- 13 files changed, 375 insertions(+), 825 deletions(-) delete mode 100644 udev-084-floppy.patch delete mode 100644 udev-084-pg.patch delete mode 100644 udev-089-last_modalias.patch delete mode 100644 udev-095-longcomment.patch delete mode 100644 udev-095-path_id.patch delete mode 100644 udev-095-path_id2.patch delete mode 100644 udev-095-selinux.patch delete mode 100644 udevstart2.patch diff --git a/sources b/sources index 425f1fb..72dcc28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -320ccd2d0f4540d10e021bafa14f8985 udev-106.tar.bz2 +cb9a227206b9d85ae8cfc88fc51c1710 udev-113.tar.bz2 diff --git a/udev-084-floppy.patch b/udev-084-floppy.patch deleted file mode 100644 index de5fb51..0000000 --- a/udev-084-floppy.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- udev-084/extras/floppy/create_floppy_devices.c.redhat 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/extras/floppy/create_floppy_devices.c 2006-02-07 10:58:51.000000000 +0100 -@@ -111,15 +111,21 @@ - return 0; - - i = 0; -+ -+ char buffer[2048]; buffer[0] = '\000'; buffer[2047]='\000'; -+ char cmd[2048]; cmd[0] = '\000'; cmd[2047]='\000'; -+ - while (table_sup[type][i]) { - sprintf(node, "%s%s",dev, table[table_sup[type][i]]); -- minor = (table_sup[type][i] << 2) + fdnum; -- if (print_nodes) -- printf("%s b %d %d %d\n", node, mode, major, minor); -- if (create_nodes) -- mknod(node, S_IFBLK | mode, makedev(major,minor)); -+ strcat(buffer, node); -+ strcat(buffer, " "); - i++; - } -+ if(strlen(buffer)) { -+ if (snprintf(cmd, 2047, "/sbin/MAKEDEV -x %s;/sbin/restorecon %s; /sbin/pam_console_apply %s;", buffer, buffer, buffer) > 0) { -+ system(cmd); -+ } -+ } - - return 0; - } diff --git a/udev-084-pg.patch b/udev-084-pg.patch deleted file mode 100644 index 9cdc1e9..0000000 --- a/udev-084-pg.patch +++ /dev/null @@ -1,105 +0,0 @@ -If we're looking for a user's primary GID, look up the primary GID instead of -guessing the name of the user's primary group. - ---- udev-084/udev_libc_wrapper.h 2006-01-30 02:51:38.000000000 -0500 -+++ udev-084/udev_libc_wrapper.h 2006-02-13 17:22:56.000000000 -0500 -@@ -139,6 +139,7 @@ - #endif - - extern uid_t lookup_user(const char *user); -+extern gid_t lookup_user_primary_group(const char *user); - extern gid_t lookup_group(const char *group); - - extern size_t strlcpy(char *dst, const char *src, size_t size); ---- udev-084/udev_libc_wrapper.c 2006-01-30 02:51:38.000000000 -0500 -+++ udev-084/udev_libc_wrapper.c 2006-02-13 17:38:48.000000000 -0500 -@@ -106,6 +106,20 @@ - return uid; - } - -+gid_t lookup_user_primary_group(const char *user) -+{ -+ struct passwd *pw; -+ gid_t gid = 0; -+ -+ pw = getpwnam(user); -+ if (pw == NULL) -+ info("specified user unknown '%s'", user); -+ else -+ gid = pw->pw_gid; -+ -+ return gid; -+} -+ - gid_t lookup_group(const char *group) - { - struct group *gr; -@@ -126,7 +140,8 @@ - #define GROUP_FILE "/etc/group" - - /* return the id of a passwd style line, selected by the users name */ --static unsigned long get_id_by_name(const char *uname, const char *dbfile) -+static unsigned long get_id_field_by_name(const char *uname, const char *dbfile, -+ int field) - { - unsigned long id = 0; - char line[LINE_SIZE]; -@@ -165,8 +180,14 @@ - if (name == NULL) - continue; - -- /* skip pass */ -- if (strsep(&pos, ":") == NULL) -+ /* skip password and n other fields */ -+ field -= 2; -+ while (field > 0) { -+ if ((pos == NULL) || (strsep(&pos, ":") == NULL)) -+ continue; -+ field--; -+ } -+ if (pos == NULL) - continue; - - /* get id */ -@@ -189,6 +210,15 @@ - return id; - } - -+static unsigned long get_id_by_name(const char *uname, const char *dbfile) -+{ -+ return get_id_field_by_name(uname, dbfile, 3); -+} -+static unsigned long get_second_id_by_name(const char *uname, const char *dbfile) -+{ -+ return get_id_field_by_name(uname, dbfile, 4); -+} -+ - uid_t lookup_user(const char *user) - { - unsigned long id; -@@ -197,6 +227,14 @@ - return (uid_t) id; - } - -+gid_t lookup_user_primary_group(const char *user) -+{ -+ unsigned long id; -+ -+ id = get_second_id_by_name(user, PASSWD_FILE); -+ return (gid_t) id; -+} -+ - gid_t lookup_group(const char *group) - { - unsigned long id; ---- udev-084/extras/volume_id/vol_id.c 2006-01-30 02:51:38.000000000 -0500 -+++ udev-084/extras/volume_id/vol_id.c 2006-02-13 17:22:56.000000000 -0500 -@@ -151,7 +151,7 @@ - - /* drop all privileges */ - nobody_uid = lookup_user("nobody"); -- nobody_gid = lookup_group("nogroup"); -+ nobody_gid = lookup_user_primary_group("nobody"); - if (nobody_uid > 0 && nobody_gid > 0) { - if (setgroups(0, NULL) != 0 || - setgid(nobody_gid) != 0 || diff --git a/udev-089-last_modalias.patch b/udev-089-last_modalias.patch deleted file mode 100644 index a9ce08c..0000000 --- a/udev-089-last_modalias.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- udev-103/udevtrigger.c.last_modalias 2006-10-20 14:43:35.000000000 +0200 -+++ udev-103/udevtrigger.c 2006-11-07 14:16:52.000000000 +0100 -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include "udev.h" - #include "udevd.h" -@@ -42,6 +43,13 @@ - LIST_HEAD(filter_attr_match_list); - LIST_HEAD(filter_attr_nomatch_list); - -+/* list of devices whose modaliases we should run last */ -+static char *last_modalias_list[] = { -+ "pci:v*d*sv*sd*bc0Csc03i*", /* USB controller */ -+ "pci:v*d*sv*sd*bc0Csc00i10*", /* Firewire controller */ -+ NULL, -+}; -+ - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) - { -@@ -72,6 +80,36 @@ - return 0; - } - -+ -+ -+static int modalias_is_greylisted(const char *path) -+{ -+ -+ char filename[PATH_SIZE]; -+ char alias[PATH_SIZE]; -+ int fd, i; -+ -+ snprintf(filename,sizeof(filename),"%s/%s/modalias", sysfs_path, path); -+ filename[sizeof(filename)-1] = '\0'; -+ -+ fd = open(filename, O_RDONLY); -+ if (fd == -1) -+ return 0; -+ read(fd,alias,PATH_SIZE); -+ alias[sizeof(alias)-1] = '\0'; -+ alias[strlen(alias)-1] = '\0'; -+ -+ for (i = 0; last_modalias_list[i] != NULL; i++) -+ if (!fnmatch(last_modalias_list[i], alias, 0)) { -+ close(fd); -+ return 1; -+ } -+ -+ close(fd); -+ return 0; -+} -+ -+ - static int device_list_insert(const char *path) - { - char filename[PATH_SIZE]; -@@ -495,6 +533,10 @@ - default: - goto exit; - } -+ if (modalias_is_greylisted(path)) { -+ device_list = &device_last_list; -+ break; -+ } - } - - if (failed) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 2a1fa12..b7d45c5 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,17 +1,18 @@ ---- udev-091/extras/volume_id/lib/Makefile.nopie 2006-04-25 22:39:59.000000000 +0200 -+++ udev-091/extras/volume_id/lib/Makefile 2006-05-03 16:23:33.000000000 +0200 -@@ -67,7 +67,7 @@ - +--- udev-113/extras/volume_id/lib/Makefile.nopie 2007-06-23 17:44:48.000000000 +0200 ++++ udev-113/extras/volume_id/lib/Makefile 2007-06-26 16:19:25.000000000 +0200 +@@ -72,7 +72,8 @@ .shlib/%.o: %.c $(E) " CC " $@ + $(Q) mkdir -p $(dir $@) - $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ + $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -c $(CFLAGS) -fPIC $< -o $@ ++# $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -78,7 +78,7 @@ +@@ -83,7 +84,7 @@ - $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) + $(SHLIB): $(HEADERS) exported_symbols $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ - $(Q) $(CC) -shared $(CFLAGS) -o $@ \ + $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -shared $(CFLAGS) -o $@ \ diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch index 83e8741..d29aaca 100644 --- a/udev-091-lib64.patch +++ b/udev-091-lib64.patch @@ -1,6 +1,6 @@ ---- udev-091/Makefile.lib64 2006-04-25 22:39:59.000000000 +0200 -+++ udev-091/Makefile 2006-05-03 18:16:31.000000000 +0200 -@@ -103,6 +103,8 @@ +--- udev-113/Makefile.lib64 2007-06-23 17:44:48.000000000 +0200 ++++ udev-113/Makefile 2007-06-26 16:37:34.000000000 +0200 +@@ -98,6 +98,8 @@ libudevdir = ${prefix}/lib/udev mandir = ${prefix}/usr/share/man configdir = ${etcdir}/udev @@ -9,7 +9,7 @@ udevdir = /dev DESTDIR = -@@ -179,6 +181,8 @@ +@@ -168,6 +170,8 @@ RANLIB="$(RANLIB)" \ LIB_OBJS="$(LIB_OBJS)" \ LIBUDEV="$(PWD)/$(LIBUDEV)" \ @@ -18,8 +18,8 @@ -C $$target $@ || exit 1; \ done; .PHONY: all ---- udev-091/extras/volume_id/lib/Makefile.lib64 2006-05-03 18:15:28.000000000 +0200 -+++ udev-091/extras/volume_id/lib/Makefile 2006-05-03 18:15:53.000000000 +0200 +--- udev-113/extras/volume_id/lib/Makefile.lib64 2007-06-26 16:37:34.000000000 +0200 ++++ udev-113/extras/volume_id/lib/Makefile 2007-06-26 16:37:34.000000000 +0200 @@ -4,9 +4,9 @@ # # Released under the GNU General Public License, version 2. @@ -31,10 +31,18 @@ +libdir ?= ${prefix}/lib +usrlibdir ?= ${prefix}/usr/lib - INSTALL = /usr/bin/install -c + INSTALL = install -c INSTALL_DATA = ${INSTALL} -m 644 ---- udev-091/extras/volume_id/Makefile.lib64 2006-04-25 22:39:59.000000000 +0200 -+++ udev-091/extras/volume_id/Makefile 2006-05-03 18:16:14.000000000 +0200 +@@ -106,6 +106,7 @@ + $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h + $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) + mkdir -p $(DESTDIR)$(usrlibdir)/ ++ $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a + ln -sf $(SHLIB) $(DESTDIR)$(libdir)/libvolume_id.so.$(SHLIB_CUR) + ln -sf $(libdir)/$(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so + $(INSTALL_DATA) -D libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc +--- udev-113/extras/volume_id/Makefile.lib64 2007-06-23 17:44:48.000000000 +0200 ++++ udev-113/extras/volume_id/Makefile 2007-06-26 16:37:34.000000000 +0200 @@ -17,6 +17,9 @@ libudevdir = ${prefix}/lib/udev mandir = ${prefix}/usr/share/man @@ -43,17 +51,18 @@ +usrlibdir ?= ${prefix}/usr/lib + - INSTALL = /usr/bin/install -c + INSTALL = install -c INSTALL_PROGRAM = ${INSTALL} -@@ -32,7 +35,10 @@ +@@ -34,7 +37,11 @@ $(Q) $(CC) -c $(CFLAGS) $< -o $@ - lib/libvolume_id.a: -- $(Q) $(MAKE) -C lib + lib: +- $(Q) $(MAKE) -C $@ + $(Q) $(MAKE) \ + libdir=$(libdir) \ + usrlibdir=$(usrlibdir) \ + -C lib ++# $(Q) $(MAKE) -C $@ + .PHONY: lib - $(PROG): %: $(HEADERS) %.o lib/libvolume_id.a - $(E) " LD " $@ + lib/libvolume_id.a: lib diff --git a/udev-095-longcomment.patch b/udev-095-longcomment.patch deleted file mode 100644 index 4360a80..0000000 --- a/udev-095-longcomment.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- udev-095/udev_rules_parse.c.longcomment 2006-07-04 12:34:55.000000000 +0200 -+++ udev-095/udev_rules_parse.c 2006-08-10 14:00:58.000000000 +0200 -@@ -603,6 +603,10 @@ - cur += count+1; - lineno++; - -+ /* see if this is a comment */ -+ if (bufline[0] == COMMENT_CHARACTER) -+ continue; -+ - if (count >= sizeof(line)) { - err("line too long, rule skipped '%s:%u'", filename, lineno); - continue; -@@ -616,10 +620,6 @@ - if (count == 0) - continue; - -- /* see if this is a comment */ -- if (bufline[0] == COMMENT_CHARACTER) -- continue; -- - /* skip backslash and newline from multi line rules */ - for (i = j = 0; i < count; i++) { - if (bufline[i] == '\\' && bufline[i+1] == '\n') diff --git a/udev-095-path_id.patch b/udev-095-path_id.patch deleted file mode 100644 index e06f045..0000000 --- a/udev-095-path_id.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- udev-095/extras/path_id/path_id 2006-07-04 12:34:55.000000000 +0200 -+++ udev-100/extras/path_id/path_id 2006-09-07 11:32:45.000000000 +0200 -@@ -220,7 +220,7 @@ - } - - handle_firewire () { -- :handle_firewire $* -+ : handle_firewire $* - local DEV=$1 - if [ -f "$D/ieee1394_id" ] ; then - read ieee1394_id < $D/ieee1394_id -@@ -407,30 +407,35 @@ - - handle_device () { - full_sysfs_path="$SYSFS$DEVPATH" -- if [ -L $full_sysfs_path/subsystem ]; then -- # new sysfs block layout -- full_sysfs_path="${full_sysfs_path%/*}" -- cd "$full_sysfs_path/subsystem"; -- subsys="`pwd -P`" -- cd "$OPWD" -- subsys="${subsys##*/}" -- if [ "$subsys" = "block" ]; then -- # parent is "block", it's a partition, move one up -- full_sysfs_path="${full_sysfs_path%/*}" -- fi -- cd $full_sysfs_path -- else -- # old sysfs block layout -- if [ ! -L $full_sysfs_path/device ] ; then -- if [ -f $full_sysfs_path/range ] ; then return ; fi -- full_sysfs_path="${full_sysfs_path%/*}" -- : full_sysfs_path "$full_sysfs_path" -- if [ ! -L $full_sysfs_path/device -o ! -f $full_sysfs_path/dev ] ; then -- return -+ case "$DEVPATH" in -+ /devices/*) -+ # new sysfs layout -+ if [ -L $full_sysfs_path/subsystem ]; then -+ full_sysfs_path="${full_sysfs_path%/*}" -+ cd "$full_sysfs_path/subsystem"; -+ subsys="`pwd -P`" -+ cd "$OPWD" -+ subsys="${subsys##*/}" -+ if [ "$subsys" = "block" ]; then -+ # parent is "block", it's a partition, move one up -+ full_sysfs_path="${full_sysfs_path%/*}" -+ fi -+ cd $full_sysfs_path - fi -- fi -- cd $full_sysfs_path/device -- fi -+ ;; -+ *) -+ # old sysfs layout -+ if [ ! -L $full_sysfs_path/device ] ; then -+ if [ -f $full_sysfs_path/range ] ; then return ; fi -+ full_sysfs_path="${full_sysfs_path%/*}" -+ : full_sysfs_path "$full_sysfs_path" -+ if [ ! -L $full_sysfs_path/device -o ! -f $full_sysfs_path/dev ] ; then -+ return -+ fi -+ fi -+ cd $full_sysfs_path/device -+ ;; -+ esac - full_sysfs_device_path="`pwd -P`" - cd "$OPWD" - D=$full_sysfs_device_path diff --git a/udev-095-path_id2.patch b/udev-095-path_id2.patch deleted file mode 100644 index 2328172..0000000 --- a/udev-095-path_id2.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- udev-095/extras/path_id/path_id 2006-07-04 12:34:55.000000000 +0200 -+++ udev-100/extras/path_id/path_id 2006-09-07 11:32:45.000000000 +0200 -@@ -278,15 +278,17 @@ handle_sas () { - local DEV=$1 - local cil adapter controller_dev - # SAS device -- sas_host_path="${DEV%%/phy*}" -+ sas_host_path="${DEV%%/port*}" - sas_phy_path="${DEV#*/host*/}" - sas_phy_path="${sas_phy_path%%/target*}" - sas_phy_id="${sas_phy_path%%/*}" -- sas_rphy_id="${sas_phy_path##*/}" -- sas_phy_dev="/sys/class/sas_phy/${sas_phy_id}" -+ sas_phy_id="${sas_phy_id##*port-}" -+ sas_port_id="${sas_phy_path%%/end_device*}" -+ sas_port_id="${sas_port_id##*port-}" -+ sas_end_id="${sas_phy_path##*end_device-}" -+ sas_phy_dev="/sys/class/sas_phy/phy-${sas_phy_id}" - if [ -e "$sas_phy_dev/sas_address" ]; then - read phy_address < $sas_phy_dev/sas_address -- read phy_port < $sas_phy_dev/port_identifier - read phy_id < $sas_phy_dev/phy_identifier - fi - if [ -z "$phy_address" ] ; then -@@ -295,22 +297,32 @@ handle_sas () { - RESULT=1 - return - fi -+ sas_port_dev="/sys/class/sas_port/port-${sas_port_id}" -+ if [ -e "$sas_port_dev/num_phys" ] ; then -+ read phy_port < $sas_port_dev/num_phys -+ fi -+ if [ -z "$phy_port" ] ; then -+ : no initiator address -+ D= -+ RESULT=1 -+ return -+ fi - sas_phy_address="$phy_address:$phy_port:$phy_id" -- sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}" -- if [ -e "$sas_rphy_dev/sas_address" ]; then -- read rphy_address < $sas_rphy_dev/sas_address -- read rphy_id < $sas_rphy_dev/phy_identifier -+ sas_end_dev="/sys/class/sas_device/end_device-${sas_end_id}" -+ if [ -e "$sas_end_dev/sas_address" ]; then -+ read end_address < $sas_end_dev/sas_address -+ read end_id < $sas_end_dev/phy_identifier - fi -- if [ -z "$rphy_address" ] ; then -+ if [ -z "$end_address" ] ; then - : no initiator address - D= - RESULT=1 - return - fi -- sas_rphy_address="$rphy_address:$rphy_id" -+ sas_end_address="$end_address:$end_id" - controller_dev="${sas_host_path%/host[0-9]*}" - # SAS devices are always endpoints -- d="sas-${sas_phy_address}-${sas_rphy_address}" -+ d="sas-${sas_phy_address}-${sas_end_address}" - D="$controller_dev" - RESULT=0 - } -@@ -470,7 +482,7 @@ handle_device () { - */rport-[0-9]*:[0-9]*-[0-9]*/*) - handle_fc "$D" - ;; -- */phy-[0-9]*:[0-9]*/*) -+ */end_device-[0-9]*:[0-9]*:[0-9]*/*) - handle_sas "$D" - ;; - */fw-host[0-9]*/*) diff --git a/udev-095-selinux.patch b/udev-095-selinux.patch deleted file mode 100644 index 508dc02..0000000 --- a/udev-095-selinux.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- udev-095/udevstart.c.selinux 2006-07-04 12:34:55.000000000 +0200 -+++ udev-095/udevstart.c 2006-08-16 13:59:52.000000000 +0200 -@@ -40,6 +40,7 @@ - - #include "udev.h" - #include "udev_rules.h" -+#include "udev_selinux.h" - - static const char *udev_run_str; - static const char *udev_log_str; -@@ -339,6 +340,7 @@ - - logging_init("udevstart"); - udev_config_init(); -+ selinux_init(); - dbg("version %s", UDEV_VERSION); - - udev_run_str = getenv("UDEV_RUN"); ---- udev-095/udevd.c.selinux 2006-07-04 12:34:55.000000000 +0200 -+++ udev-095/udevd.c 2006-08-16 13:59:28.000000000 +0200 -@@ -45,6 +45,7 @@ - #include "udev.h" - #include "udev_rules.h" - #include "udevd.h" -+#include "udev_selinux.h" - - static struct udev_rules rules; - static int udevd_sock; -@@ -868,6 +869,7 @@ - err("fatal, could not open /dev/null: %s", strerror(errno)); - - udev_config_init(); -+ selinux_init(); - dbg("version %s", UDEV_VERSION); - - if (getuid() != 0) { ---- udev-095/udev_node.c.selinux 2006-07-04 12:34:55.000000000 +0200 -+++ udev-095/udev_node.c 2006-08-16 13:59:13.000000000 +0200 -@@ -130,8 +129,6 @@ - int i; - int retval = 0; - -- selinux_init(); -- - snprintf(filename, sizeof(filename), "%s/%s", udev_root, udev->name); - filename[sizeof(filename)-1] = '\0'; - ---- udev-095/udev.c.selinux 2006-07-04 12:34:55.000000000 +0200 -+++ udev-095/udev.c 2006-08-16 13:59:19.000000000 +0200 -@@ -32,6 +32,7 @@ - - #include "udev.h" - #include "udev_rules.h" -+#include "udev_selinux.h" - - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) -@@ -93,6 +94,7 @@ - if (devnull < 0) - err("fatal, could not open /dev/null: %s", strerror(errno)); - udev_config_init(); -+ selinux_init(); - dbg("version %s", UDEV_VERSION); - - /* set signal handlers */ diff --git a/udev-rules.patch b/udev-rules.patch index ed2213b..68b6d11 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,102 +1,314 @@ ---- udev-106/etc/udev/redhat/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-05-02 12:15:07.000000000 +0200 -@@ -41,9 +41,6 @@ - KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" +--- udev-113/etc/udev/redhat/50-udev.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-07-27 18:41:46.000000000 +0200 +@@ -4,25 +4,25 @@ + # default is OWNER="root" GROUP="root", MODE="0600" + # + +-KERNEL=="*", OWNER="root" GROUP="root", MODE="0600" ++KERNEL=="*", OWNER="root", GROUP="root", MODE="0600" + + # all block devices + SUBSYSTEM=="block", GROUP="disk", MODE="0640" + KERNEL=="root", GROUP="disk", MODE="0640" + + # console devices +-KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="console", NAME="%k", MODE="0600", OPTIONS="last_rule" +-KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="vc/[0-9]*", NAME="%k", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666" ++KERNEL=="console", NAME="%k", MODE="0600" ++KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="0660" ++KERNEL=="vc/[0-9]*", NAME="%k", GROUP="tty", MODE="0660" + + # pty devices + # Set this to 0660 if you only want users belonging to tty group + # to be able to allocate PTYs +-KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule" +-KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660", OPTIONS="last_rule" +-KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660", OPTIONS="last_rule" +-KERNEL=="pty/m*", NAME="%k", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666" ++KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660" ++KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660" ++KERNEL=="pty/m*", NAME="%k", GROUP="tty", MODE="0660" + + # serial+dialup devices + KERNEL=="ippp*", NAME="%k", MODE="0660" +@@ -43,21 +43,21 @@ KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", ATTRS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", ATTRS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", ATTRS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" # vc devices - KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -68,9 +65,6 @@ - KERNEL=="nvram", MODE="0660" - KERNEL=="rtc", MODE="0644" +-KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcs[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcsa", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcsa[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcc/*", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" ++KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcs[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa", NAME="%k", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcc/*", NAME="%k", OWNER="vcsa", GROUP="tty" + + # memory devices +-KERNEL=="random", MODE="0666", OPTIONS="last_rule" +-KERNEL=="urandom", MODE="0444", OPTIONS="last_rule" +-KERNEL=="mem", GROUP="kmem", MODE="0640", OPTIONS="last_rule" +-KERNEL=="kmem", GROUP="kmem", MODE="0640", OPTIONS="last_rule" +-KERNEL=="port", GROUP="kmem", MODE="0640", OPTIONS="last_rule" +-KERNEL=="full", MODE="0666", OPTIONS="last_rule" +-KERNEL=="null", MODE="0666", OPTIONS="last_rule" +-KERNEL=="zero", MODE="0666", OPTIONS="last_rule" ++KERNEL=="random", MODE="0666" ++KERNEL=="urandom", MODE="0444" ++KERNEL=="mem", GROUP="kmem", MODE="0640" ++KERNEL=="kmem", GROUP="kmem", MODE="0640" ++KERNEL=="port", GROUP="kmem", MODE="0640" ++KERNEL=="full", MODE="0666" ++KERNEL=="null", MODE="0666" ++KERNEL=="zero", MODE="0666" + # 183 = /dev/hwrng Generic random number generator + KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" + +@@ -67,12 +67,18 @@ --# pnp devices --ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'" -- # floppy devices KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" ++ # fix floppy devices -@@ -212,7 +206,7 @@ - KERNEL=="vbi0", SYMLINK+="vbi" - KERNEL=="null", SYMLINK+="XOR" + KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh" +-KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k" ++ ++KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", \ ++ RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k" ++ + KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'" --KERNEL=="tun", NAME="net/%k" -+KERNEL=="tun", NAME="net/%k", MODE="0666" +-BUS=="usb", KERNEL=="sd*", SYSFS{bInterfaceClass}=="08", SYSFS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" ++BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", \ ++ ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", \ ++ SYMLINK+="floppy floppy-%k" - KERNEL=="device-mapper", NAME="mapper/control" + # audio devices + KERNEL=="dsp*", MODE="0660" +@@ -99,8 +105,8 @@ + KERNEL=="usb/lp*", GROUP="lp", MODE="0660" -@@ -233,6 +227,7 @@ + # tape devices +-SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ +- RUN+="modprobe ide-scsi idescsi_nocd=1" ++SUBSYSTEM=="ide", ATTRS{media}=="tape", ACTION=="add", \ ++ RUN+="/sbin/modprobe ide-scsi idescsi_nocd=1" + KERNEL=="ht*", GROUP="disk", MODE="0660" + KERNEL=="nht*", GROUP="disk", MODE="0660" + KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" +@@ -155,7 +161,8 @@ + + # DVB + KERNEL=="dvb", MODE="0660" +-SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ ++SUBSYSTEM=="dvb", \ ++ PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0660" + + KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" +@@ -181,6 +188,8 @@ + KERNEL=="dv1394*", NAME="dv1394/%n" + KERNEL=="video1394*", NAME="video1394/%n" + ++KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" ++ + KERNEL=="raw[0-9]*", NAME="raw/%k" + + KERNEL=="lp[0-9]*", SYMLINK+="par%n" +@@ -227,89 +236,51 @@ KERNEL=="pktcdvd", NAME="%k/control" -+ +- KERNEL=="hd*[!0-9]", ATTR{removable}=="1", \ ATTR{media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -@@ -255,6 +250,7 @@ +-KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k" + +-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", \ ++ SYMLINK+="floppy-%k" + +-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", \ ++ SYMLINK+="cdrom cdrom-%k" + +-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ ++ PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", \ ++ SYMLINK+="dvd dvd-%k" ++ ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ ++ PROGRAM=="check-cdrom.sh %k CD-R", \ ++ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++ ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", \ ++ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++ ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ ++ PROGRAM="check-cdrom.sh %k DVD-R", \ ++ SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" + +-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", \ ++ SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" + + # rename sr* to scd* + KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" + KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ OPTIONS+="ignore_remove" +- +- +-####################################### +-# Persistent block device stuff - begin +-####################################### +-# persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path} +-# scheme based on "Linux persistent device names", 2004, Hannes Reinecke +- +-ACTION!="add", GOTO="persistent_end" +-SUBSYSTEM!="block", GOTO="persistent_end" +- +-# skip rules for inappropriate block devices +-KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" +- +-# never access removable ide devices, the drivers are causing event loops on open() +-KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_end" +-KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" +- +-# by-id (hardware serial number) +-KERNEL=="hd*[!0-9]", IMPORT{program}="/lib/udev/ata_id --export $tempnode" +-KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" +-KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" +- +-KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/usb_id -x" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode" +-KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +- +-# for partitions import parent information +-KERNEL=="sd*[0-9]|dasd*[0-9]", IMPORT{parent}=="ID_*" +-KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" +- +-# by-path (shortest physical path) +-KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/lib/udev/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}" +-KERNEL=="sr*", GOTO="persistent_end" +-KERNEL=="*[0-9]", IMPORT{parent}=="ID_*" +-KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" +- +-# by-label/by-uuid (filesystem properties) +-KERNEL=="*[!0-9]", ATTRS{removable}=="1", GOTO="persistent_end" +-IMPORT{program}="/lib/udev/vol_id --export $tempnode" +-ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" +-ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" +- +-# BIOS Enhanced Disk Device +-KERNEL=="*[!0-9]", IMPORT{program}="/lib/udev/edd_id --export $tempnode" +-KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}" +-KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n" +- +-LABEL="persistent_end" +- +-##################################### +-# Persistent block device stuff - end +-##################################### +- ++SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ ++ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" -+ - ####################################### - # Persistent block device stuff - begin - ####################################### -@@ -280,7 +276,6 @@ - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/usb_id -x" - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode" - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode" --KERNEL=="dasd*[!0-9]", IMPORT{program}="/lib/udev/dasd_id --export $tempnode" - KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - - # for partitions import parent information -@@ -315,9 +310,6 @@ + ACTION=="add", SUBSYSTEM=="usb_device", \ PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0644" --ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}" -- --ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" ++ACTION=="add", SUBSYSTEM=="usb_endpoint", \ ++ ATTR{bEndpointAddress}=="?*", ATTRS{devnum}=="?*", ATTRS{busnum}=="?*", \ ++ NAME="bus/usb/$attr{busnum}/$attr{devnum}_ep/$attr{bEndpointAddress}", \ ++ MODE="0644", SYMLINK+="%k" # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -351,5 +343,6 @@ +@@ -321,11 +292,11 @@ + RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + + +-ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="modprobe sg" ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ +- RUN+="modprobe sd_mod" ++ RUN+="/sbin/modprobe sd_mod" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ +- RUN+="modprobe sr_mod" ++ RUN+="/sbin/modprobe sr_mod" + + ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ + SYMLINK+="scanner scanner-%k", MODE="0660" +@@ -333,15 +304,18 @@ + ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ + SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" + +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}!="ADR*", RUN+="modprobe osst" +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}=="ADR*", RUN+="modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \ +- RUN+="modprobe st" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", \ ++ ATTRS{vendor}=="On[sS]tream", \ ++ ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", \ ++ ATTRS{vendor}=="On[sS]tream", \ ++ ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", \ ++ ATTRS{vendor}!="On[sS]tream", \ ++ RUN+="/sbin/modprobe st" + # mmc block devices - ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" +-ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" ++ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" + -+ RUN+="socket:/org/kernel/udev/monitor" - ---- udev-106/etc/udev/redhat/95-pam-console.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/95-pam-console.rules 2007-05-02 12:04:15.000000000 +0200 -@@ -1 +1 @@ --ACTION=="add", SYSFS{dev}=="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" -+ENV{STARTUP}!="1", ACTION=="add", SYSFS{dev}=="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" ---- udev-106/etc/udev/redhat/05-udev-early.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/05-udev-early.rules 2007-05-02 12:07:55.000000000 +0200 -@@ -1,10 +1,19 @@ - # sysfs is populated after the event is sent - ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" --ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" --ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" +--- udev-113/etc/udev/redhat/05-udev-early.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-07-27 18:42:09.000000000 +0200 +@@ -1,19 +0,0 @@ +-# sysfs is populated after the event is sent +-ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +-# ignore these events until someone needs them +-SUBSYSTEM=="drivers", OPTIONS="ignore_device" +-SUBSYSTEM=="module", OPTIONS="ignore_device" - - # ignore these events until someone needs them - SUBSYSTEM=="drivers", OPTIONS="ignore_device" - SUBSYSTEM=="module", OPTIONS="ignore_device" - -+ -+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", GOTO="skip_wait" -+ -+# pnp devices -+ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'" -+ +- +-ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", GOTO="skip_wait" +- +-# pnp devices +-ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'" +- +-ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" +- +-ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" +- +-LABEL="skip_wait" +- +-ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" +--- udev-113/etc/udev/redhat/06-udev-rh-early.rules.rhrules 2007-07-27 18:31:33.000000000 +0200 ++++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-07-27 18:31:17.000000000 +0200 +@@ -0,0 +1,8 @@ ++# sysfs is populated after the event is sent ++ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + -+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -+ -+LABEL="skip_wait" -+ - ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" ++# pnp devices ++ACTION=="add", SUBSYSTEM=="pnp", ATTR{id}=="?*", RUN+="/sbin/modprobe pnp:d$attr{id}" ++ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index 82ca8e4..5966a1e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 106 -Release: 4.1%{?dist} +Version: 113 +Release: 7%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,8 +15,7 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev.nodes -Source3: modprobe - +Source4: fw_unit_symlinks.sh Source10: firmware_helper.c Patch1: udev-permconv.patch @@ -24,9 +23,7 @@ Patch2: udev-rules.patch Patch5: udev-extras.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch -Patch10: udev-106-selinuxmedia.patch Patch14: udev-095-dbgwait.patch -Patch15: udev-106-setenv.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -79,9 +76,7 @@ which contains functions to get volume ids. %patch5 -p1 -b .rhextras %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 -%patch10 -p1 -b .selinuxmedia %patch14 -p1 -b .dbgwait -%patch15 -p1 -b .setenv rm -f etc/udev/redhat/51-hotplug.rules %build @@ -96,13 +91,13 @@ make \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ + VOLUME_ID_STATIC=true \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ extras/edd_id \ extras/volume_id \ - extras/run_directory \ extras/floppy \ " all @@ -113,8 +108,7 @@ for i in udevd udevtrigger udevsettle \ extras/usb_id/usb_id \ extras/volume_id/vol_id \ extras/floppy/create_floppy_devices \ - extras/run_directory/udev_run_devd \ - extras/run_directory/udev_run_hotplugd; do + ; do mv $i $i.static touch $i done @@ -137,7 +131,6 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ extras/edd_id \ extras/path_id \ extras/volume_id \ - extras/run_directory \ extras/floppy \ " all @@ -158,7 +151,6 @@ make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ extras/edd_id \ extras/path_id \ extras/volume_id \ - extras/run_directory \ extras/floppy \ " install @@ -166,8 +158,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug +# Deprecated, but keep the ownership mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id @@ -181,8 +174,7 @@ for i in extras/scsi_id/scsi_id \ extras/usb_id/usb_id \ extras/volume_id/vol_id \ extras/floppy/create_floppy_devices \ - extras/run_directory/udev_run_devd \ - extras/run_directory/udev_run_hotplugd; do + ; do install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static done @@ -191,10 +183,15 @@ for i in udevd udevtrigger udevsettle; do done %endif -install -m 0644 etc/udev/redhat/05-udev-early.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/05-udev-early.rules -install -m 0644 etc/udev/redhat/50-udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules -install -m 0644 etc/udev/redhat/95-pam-console.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/95-pam-console.rules - +for i in \ + etc/udev/redhat/06-udev-rh-early.rules \ + etc/udev/redhat/50-udev.rules \ + etc/udev/redhat/95-pam-console.rules \ + etc/udev/rules.d/*.rules \ + ; do + install -m 0644 "$i" "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}" +done + install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} @@ -203,14 +200,13 @@ for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done -install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes -install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{udev_scriptdir}/modprobe +install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes +install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev -install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev +install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin #install -m 0755 udevtrigger $RPM_BUILD_ROOT/sbin -install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} @@ -218,9 +214,7 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules </dev/null 2>&1 -done +exec /sbin/modprobe -a nvram floppy >/dev/null 2>&1 & EOF @@ -276,8 +270,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id -%attr(0755,root,root) %{udev_scriptdir}/udev_run_devd -%attr(0755,root,root) %{udev_scriptdir}/udev_run_hotplugd %attr(0755,root,root) %{udev_scriptdir}/scsi_id %attr(0755,root,root) %{udev_scriptdir}/ata_id %attr(0755,root,root) %{udev_scriptdir}/edd_id @@ -285,6 +277,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/vol_id %attr(0755,root,root) %{udev_scriptdir}/path_id %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices +%attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh +%attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh +%attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh +%attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh %attr(0755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -293,21 +289,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ %attr(0755,root,root) %dir %{udev_scriptdir}/devices/ -%ghost %dir %{_sysconfdir}/udev/scripts/ -%ghost %dir %{_sysconfdir}/udev/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ -%attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev -%attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh -%attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh -%attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh -%attr(0755,root,root) %{udev_scriptdir}/modprobe %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules %config(noreplace) %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -322,6 +307,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/ata_id*.8* %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* +%attr(0644,root,root) %{_mandir}/man8/path_id*.8* +%attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* + +# Deprecated, but keep the ownership +%ghost %dir %{_sysconfdir}/udev/scripts/ +%ghost %dir %{_sysconfdir}/udev/devices/ +%ghost %dir %{_sysconfdir}/dev.d/ %if %{with_static} %files static @@ -329,8 +321,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevtrigger.static %attr(0755,root,root) /sbin/udevsettle.static -%attr(0755,root,root) %{udev_scriptdir}/udev_run_devd.static -%attr(0755,root,root) %{udev_scriptdir}/udev_run_hotplugd.static %attr(755,root,root) %{udev_scriptdir}/scsi_id.static %attr(755,root,root) %{udev_scriptdir}/ata_id.static %attr(755,root,root) %{udev_scriptdir}/edd_id.static @@ -352,6 +342,33 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Jul 27 2007 Harald Hoyer - 113-7 +- major rule cleanup +- removed persistent rules from 50 and included upstream rules +- removed skip_wait from modprobe + +* Fri Jul 20 2007 Harald Hoyer - 113-6 +- kernel does not provide usb_device anymore, + corrected the rules (#248916) + +* Thu Jul 19 2007 Harald Hoyer - 113-5 +- corrected the rule for usb devices (#248916) + +* Sat Jul 14 2007 Harald Hoyer - 113-4 +- do not collect modprobes (bug #222542), because firmware + loading seems to depend on it. + +* Mon Jul 9 2007 Harald Hoyer - 113-3 +- speedup things a little bit + +* Wed Jun 27 2007 Harald Hoyer - 113-2 +- added more firewire symlinks (#240770) +- minor rule patches + +* Tue Jun 26 2007 Harald Hoyer - 113-1 +- version 113 +- added rule for SD cards in a TI FlashMedia slot (#217070) + * Tue Jun 26 2007 Harald Hoyer - 106-4.1 - fixed modprobedebug option - removed snd-powermac from the default modules (#200585) diff --git a/udevstart2.patch b/udevstart2.patch deleted file mode 100644 index 3caaed1..0000000 --- a/udevstart2.patch +++ /dev/null @@ -1,251 +0,0 @@ ---- udev-084/udevstart.c.udevstart2 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/udevstart.c 2006-02-07 10:11:31.000000000 +0100 -@@ -37,13 +37,13 @@ - #include - #include - #include -+#include -+#include - - #include "udev.h" - #include "udev_rules.h" - --static const char *udev_run_str; - static const char *udev_log_str; --static struct udev_rules rules; - - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) -@@ -101,76 +101,60 @@ - static char *first_list[] = { - "/class/mem", - "/class/tty", -+ "/bus", -+ NULL, -+}; -+ -+/* list of devices whose modaliases we should run last */ -+static char *last_modalias_list[] = { -+ "pci:v*d*sv*sd*bc0Csc03i*", /* USB controller */ -+ "pci:v*d*sv*sd*bc0Csc00i10*", /* Firewire controller */ - NULL, - }; - - static int add_device(const char *devpath) - { -- struct sysfs_device *dev; -- struct udevice *udev; -- int retval = 0; -- -- /* clear and set environment for next event */ -- clearenv(); -- setenv("ACTION", "add", 1); -- setenv("UDEV_START", "1", 1); -- if (udev_log_str) -- setenv("UDEV_LOG", udev_log_str, 1); -- if (udev_run_str) -- setenv("UDEV_RUN", udev_run_str, 1); -- -- dev = sysfs_device_get(devpath); -- if (dev == NULL) -- return -1; -- -- udev = udev_device_init(); -- if (udev == NULL) -- return -1; -- -- /* override built-in sysfs device */ -- udev->dev = dev; -- strcpy(udev->action, "add"); -- udev->devt = udev_device_get_devt(udev); -- -- if (strcmp(udev->dev->subsystem, "net") != 0) { -- udev->devt = udev_device_get_devt(udev); -- if (major(udev->devt) == 0) -- return -1; -- } -+ char filename[PATH_SIZE]; -+ int fd; -+ -+ snprintf(filename, sizeof(filename), "%s/%s/uevent", sysfs_path, devpath); -+ filename[sizeof(filename)-1] = '\0'; -+ -+ dbg("Trigger %s", filename); -+ fd = open(filename, O_WRONLY); -+ if (fd > 0) { -+ write(fd, "add\n", 4); -+ close(fd); -+ } -+ else return 1; -+ -+ return 0; -+} - -- dbg("add '%s'", udev->dev->devpath); -- setenv("DEVPATH", udev->dev->devpath, 1); -- setenv("SUBSYSTEM", udev->dev->subsystem, 1); -- -- udev_rules_get_name(&rules, udev); -- if (udev->ignore_device) { -- dbg("device event will be ignored"); -- goto exit; -- } -- if (udev->name[0] != '\0') -- retval = udev_add_device(udev); -- else -- info("device node creation supressed"); -- -- if (retval == 0 && udev_run) { -- struct name_entry *name_loop; -- -- dbg("executing run list"); -- list_for_each_entry(name_loop, &udev->run_list, node) { -- if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0) -- pass_env_to_socket(&name_loop->name[strlen("socket:")], udev->dev->devpath, "add"); -- else { -- char program[PATH_SIZE]; -- -- strlcpy(program, name_loop->name, sizeof(program)); -- udev_rules_apply_format(udev, program, sizeof(program)); -- run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); -- } -+static int modalias_is_greylisted(struct device *dev) -+{ -+ -+ char filename[PATH_SIZE]; -+ char alias[PATH_SIZE]; -+ int fd, i; -+ -+ snprintf(filename,sizeof(filename),"%s/%s/modalias", sysfs_path, dev->path); -+ filename[sizeof(filename)-1] = '\0'; -+ -+ fd = open(filename, O_RDONLY); -+ if (fd == -1) -+ return 0; -+ read(fd,alias,PATH_SIZE); -+ alias[sizeof(alias)-1] = '\0'; -+ alias[strlen(alias)-1] = '\0'; -+ -+ for (i = 0; last_modalias_list[i] != NULL; i++) -+ if (!fnmatch(last_modalias_list[i], alias, 0)) { -+ close(fd); -+ return 1; - } -- } - --exit: -- udev_device_cleanup(udev); -+ close(fd); - return 0; - } - -@@ -184,6 +168,8 @@ - list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { - for (i = 0; first_list[i] != NULL; i++) { - if (strncmp(loop_device->path, first_list[i], strlen(first_list[i])) == 0) { -+ if (modalias_is_greylisted(loop_device)) -+ continue; - add_device(loop_device->path); - list_del(&loop_device->node); - free(loop_device); -@@ -203,6 +189,8 @@ - } - if (found) - continue; -+ if (modalias_is_greylisted(loop_device)) -+ continue; - - add_device(loop_device->path); - list_del(&loop_device->node); -@@ -222,7 +210,7 @@ - char filename[PATH_SIZE]; - struct stat statbuf; - -- snprintf(filename, sizeof(filename), "%s/dev", path); -+ snprintf(filename, sizeof(filename), "%s/uevent", path); - filename[sizeof(filename)-1] = '\0'; - - if (stat(filename, &statbuf) == 0) -@@ -279,6 +267,50 @@ - } - } - -+static void udev_scan_bus(struct list_head *device_list) -+{ -+ char base[PATH_SIZE]; -+ DIR *dir; -+ struct dirent *dent; -+ -+ snprintf(base, sizeof(base), "%s/bus", sysfs_path); -+ base[sizeof(base)-1] = '\0'; -+ -+ dir = opendir(base); -+ if (dir != NULL) { -+ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { -+ char dirname[PATH_SIZE]; -+ DIR *dir2; -+ struct dirent *dent2; -+ -+ if (dent->d_name[0] == '.') -+ continue; -+ -+ snprintf(dirname, sizeof(dirname), "%s/%s/devices", base, dent->d_name); -+ dirname[sizeof(dirname)-1] = '\0'; -+ -+ dir2 = opendir(dirname); -+ if (dir2 != NULL) { -+ for (dent2 = readdir(dir2); dent2 != NULL; dent2 = readdir(dir2)) { -+ char dirname2[PATH_SIZE]; -+ -+ if (dent2->d_name[0] == '.') -+ continue; -+ -+ snprintf(dirname2, sizeof(dirname2), "%s/%s", dirname, dent2->d_name); -+ dirname2[sizeof(dirname2)-1] = '\0'; -+ -+ if (has_devt(dirname2)) -+ device_list_insert(dirname2, device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+ - static void udev_scan_class(struct list_head *device_list) - { - char base[PATH_SIZE]; -@@ -312,7 +344,7 @@ - snprintf(dirname2, sizeof(dirname2), "%s/%s", dirname, dent2->d_name); - dirname2[sizeof(dirname2)-1] = '\0'; - -- if (has_devt(dirname2) || strcmp(dent->d_name, "net") == 0) -+ if (has_devt(dirname2)) - device_list_insert(dirname2, device_list); - } - closedir(dir2); -@@ -342,7 +374,6 @@ - udev_config_init(); - dbg("version %s", UDEV_VERSION); - -- udev_run_str = getenv("UDEV_RUN"); - udev_log_str = getenv("UDEV_LOG"); - - /* disable all logging if not explicitely requested */ -@@ -362,13 +393,12 @@ - alarm(UDEV_ALARM_TIMEOUT); - - sysfs_init(); -- udev_rules_init(&rules, 1); - -+ udev_scan_bus(&device_list); - udev_scan_class(&device_list); - udev_scan_block(&device_list); - exec_list(&device_list); - -- udev_rules_cleanup(&rules); - sysfs_cleanup(); - logging_close(); - return 0; From 3c645a8b05216d76b04b44a6543ab3557dcef2b2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Jul 2007 19:07:47 +0000 Subject: [PATCH 04/16] new kernels in F-7 need new rules --- fw_unit_symlinks.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 fw_unit_symlinks.sh diff --git a/fw_unit_symlinks.sh b/fw_unit_symlinks.sh new file mode 100644 index 0000000..c4cdd6b --- /dev/null +++ b/fw_unit_symlinks.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +SYSFS=/sys +NAME=$1 +NUM=$2 + +for i in "${SYSFS}${DEVPATH}/${NAME}.*/specifier_id"; do + if [ ! -f "$i" ]; then + continue + fi + SPECID="`cat $i`" + if [ $((SPECID)) -eq $((0x00609e)) ]; then + echo -n "sbp2-${NUM} " + elif [ $((SPECID)) -eq $((0x00a02d)) ]; then + SWVER="`cat ${i%/specifier_id}/version`" + if [ $((SWVER)) -ge $((0x100)) -a $((SWVER)) -lt $((0x110)) ]; then + echo -n "iidc${NUM} " + elif [ $((SWVER)) -eq $((0x10001)) ]; then + echo -n "avc${NUM} " + elif [ $((SWVER)) -ge $((0x14000)) -a $((SWVER)) -le $((0x14001)) ]; then + echo -n "vendorfw${NUM} " + fi + fi +done +echo From 0347dc6a92c4b260564761fb09c86d94139d4350 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 30 Jul 2007 16:33:59 +0000 Subject: [PATCH 05/16] - removed "noreplace" config tag from rules (#250043) --- udev.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/udev.spec b/udev.spec index 5966a1e..54aea5f 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 7%{?dist} +Release: 8%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -292,13 +292,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules -%config(noreplace) %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules +%config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config -%config(noreplace) %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules +%config %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules %dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* @@ -342,6 +342,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Jul 30 2007 Harald Hoyer - 113-8 +- removed "noreplace" config tag from rules (#250043) + * Fri Jul 27 2007 Harald Hoyer - 113-7 - major rule cleanup - removed persistent rules from 50 and included upstream rules From 5e416af7f7fbf63fd2d6b1312e5face4e4e89144 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 8 Aug 2007 11:05:41 +0000 Subject: [PATCH 06/16] - added lp* to 50-udev.nodes (#251272) --- udev.nodes | 4 ++++ udev.spec | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/udev.nodes b/udev.nodes index c374fad..f113f63 100644 --- a/udev.nodes +++ b/udev.nodes @@ -22,3 +22,7 @@ ppp console null zero +lp0 +lp1 +lp2 +lp3 diff --git a/udev.spec b/udev.spec index 54aea5f..6b5e4e7 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 8%{?dist} +Release: 9%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -342,6 +342,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Aug 08 2007 Harald Hoyer - 113-9 +- added lp* to 50-udev.nodes (#251272) + * Mon Jul 30 2007 Harald Hoyer - 113-8 - removed "noreplace" config tag from rules (#250043) From 50092af1c4dda84b988ffc8a9f2e63aa7581cdf4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 15 Aug 2007 08:17:50 +0000 Subject: [PATCH 07/16] - do not run vol_id on non-partition block devices (bug #251401) - read all multiline pnp modaliases again --- udev-rules.patch | 42 +++++++++++++++++++++++++++++------------- udev.spec | 6 +++++- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 68b6d11..95367bf 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,16 @@ +--- udev-113/etc/udev/rules.d/60-persistent-storage.rules.rhrules 2007-08-15 10:05:31.000000000 +0200 ++++ udev-113/etc/udev/rules.d/60-persistent-storage.rules 2007-08-15 10:07:08.000000000 +0200 +@@ -57,7 +57,7 @@ + KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # by-label/by-uuid (filesystem properties) +-IMPORT{program}="vol_id --export $tempnode" ++ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" + 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}" + --- udev-113/etc/udev/redhat/50-udev.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/redhat/50-udev.rules 2007-07-27 18:41:46.000000000 +0200 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-08-10 16:36:01.000000000 +0200 @@ -4,25 +4,25 @@ # default is OWNER="root" GROUP="root", MODE="0600" # @@ -279,8 +290,24 @@ RUN+="socket:/org/kernel/udev/monitor" +--- /dev/null 2007-07-17 14:43:58.691704070 +0200 ++++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-08-15 10:12:00.000000000 +0200 +@@ -0,0 +1,13 @@ ++# do not edit this file, it will be overwritten on update ++ ++ACTION!="add", GOTO="drivers_end" ++ ++DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" ++SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \ ++ RUN+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" ++SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" ++SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" ++SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" ++SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" ++ ++LABEL="drivers_end" --- udev-113/etc/udev/redhat/05-udev-early.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-07-27 18:42:09.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-08-10 16:36:01.000000000 +0200 @@ -1,19 +0,0 @@ -# sysfs is populated after the event is sent -ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" @@ -301,14 +328,3 @@ -LABEL="skip_wait" - -ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" ---- udev-113/etc/udev/redhat/06-udev-rh-early.rules.rhrules 2007-07-27 18:31:33.000000000 +0200 -+++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-07-27 18:31:17.000000000 +0200 -@@ -0,0 +1,8 @@ -+# sysfs is populated after the event is sent -+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -+ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -+ -+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" -+# pnp devices -+ACTION=="add", SUBSYSTEM=="pnp", ATTR{id}=="?*", RUN+="/sbin/modprobe pnp:d$attr{id}" -+ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index 6b5e4e7..540817b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -342,6 +342,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Aug 15 2007 Harald Hoyer - 113-10 +- do not run vol_id on non-partition block devices (bug #251401) +- read all multiline pnp modaliases again + * Wed Aug 08 2007 Harald Hoyer - 113-9 - added lp* to 50-udev.nodes (#251272) From 7ea57a9c4be71bf474b55929f810da8119110801 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Aug 2007 14:11:35 +0000 Subject: [PATCH 08/16] - readded firmware rule (#252983) --- udev-rules.patch | 25 +++++++++++++------------ udev.spec | 5 ++++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 95367bf..e6ac6a3 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,6 @@ --- udev-113/etc/udev/rules.d/60-persistent-storage.rules.rhrules 2007-08-15 10:05:31.000000000 +0200 +++ udev-113/etc/udev/rules.d/60-persistent-storage.rules 2007-08-15 10:07:08.000000000 +0200 -@@ -57,7 +57,7 @@ +@@ -57,7 +57,7 @@ KERNEL=="sr*|st*", GOTO="persistent_stor KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" # by-label/by-uuid (filesystem properties) @@ -46,7 +46,7 @@ # serial+dialup devices KERNEL=="ippp*", NAME="%k", MODE="0660" -@@ -43,21 +43,21 @@ +@@ -43,21 +43,21 @@ KERNEL=="hvsi*", NAME="%k KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" # vc devices @@ -81,7 +81,7 @@ # 183 = /dev/hwrng Generic random number generator KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" -@@ -67,12 +67,18 @@ +@@ -67,12 +67,18 @@ KERNEL=="rtc", MODE="0644" # floppy devices KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" @@ -102,7 +102,7 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -99,8 +105,8 @@ +@@ -99,8 +105,8 @@ KERNEL=="usblp*", GROUP="lp", MODE="066 KERNEL=="usb/lp*", GROUP="lp", MODE="0660" # tape devices @@ -113,7 +113,7 @@ KERNEL=="ht*", GROUP="disk", MODE="0660" KERNEL=="nht*", GROUP="disk", MODE="0660" KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" -@@ -155,7 +161,8 @@ +@@ -155,7 +161,8 @@ KERNEL=="slram[0-9]*", SYMLINK+="xpram # DVB KERNEL=="dvb", MODE="0660" @@ -123,7 +123,7 @@ NAME="%c", MODE="0660" KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" -@@ -181,6 +188,8 @@ +@@ -181,6 +188,8 @@ KERNEL=="raw1394", NAME="%k" KERNEL=="dv1394*", NAME="dv1394/%n" KERNEL=="video1394*", NAME="video1394/%n" @@ -132,7 +132,7 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" -@@ -227,89 +236,51 @@ +@@ -227,89 +236,51 @@ KERNEL=="zap[0-9]*", NAME="zap/%n" KERNEL=="pktcdvd", NAME="%k/control" @@ -249,7 +249,7 @@ # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -321,11 +292,11 @@ +@@ -321,11 +292,11 @@ ACTION=="add", SUBSYSTEM=="scsi" , ATTRS RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -264,7 +264,7 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -333,15 +304,18 @@ +@@ -333,15 +304,18 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS== ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" @@ -290,9 +290,9 @@ RUN+="socket:/org/kernel/udev/monitor" ---- /dev/null 2007-07-17 14:43:58.691704070 +0200 -+++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-08-15 10:12:00.000000000 +0200 -@@ -0,0 +1,13 @@ +--- /dev/null 2007-08-16 13:04:33.725609596 +0200 ++++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-08-15 10:16:50.000000000 +0200 +@@ -0,0 +1,14 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="drivers_end" @@ -304,6 +304,7 @@ +SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" +SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" +SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" ++SUBSYSTEM=="firmware", ENV{FIRMWARE}=="?*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" + +LABEL="drivers_end" --- udev-113/etc/udev/redhat/05-udev-early.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 diff --git a/udev.spec b/udev.spec index 540817b..67ef0ed 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 10%{?dist} +Release: 11%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -342,6 +342,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Aug 16 2007 Harald Hoyer - 113-11 +- readded firmware rule (#252983) + * Wed Aug 15 2007 Harald Hoyer - 113-10 - do not run vol_id on non-partition block devices (bug #251401) - read all multiline pnp modaliases again From 2958370d136542eefba0cf5e4f1c664b00569533 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Aug 2007 10:41:53 +0000 Subject: [PATCH 09/16] - removed /dev/tape symlink, because it's now a directory (bug #251755) --- udev-rules.patch | 23 +++++++++++++++++------ udev.spec | 6 +++++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index e6ac6a3..3d34e1d 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ ---- udev-113/etc/udev/rules.d/60-persistent-storage.rules.rhrules 2007-08-15 10:05:31.000000000 +0200 -+++ udev-113/etc/udev/rules.d/60-persistent-storage.rules 2007-08-15 10:07:08.000000000 +0200 +--- udev-113/etc/udev/rules.d/60-persistent-storage.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 ++++ udev-113/etc/udev/rules.d/60-persistent-storage.rules 2007-08-23 08:46:16.000000000 +0200 @@ -57,7 +57,7 @@ KERNEL=="sr*|st*", GOTO="persistent_stor KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" @@ -10,7 +10,7 @@ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" --- udev-113/etc/udev/redhat/50-udev.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/redhat/50-udev.rules 2007-08-10 16:36:01.000000000 +0200 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-08-24 12:37:33.000000000 +0200 @@ -4,25 +4,25 @@ # default is OWNER="root" GROUP="root", MODE="0600" # @@ -132,6 +132,17 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" +@@ -215,8 +224,8 @@ KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdr + KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k" + KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k" + KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" +-KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape tape-%k", MODE="0660" +-KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape tape-%k", MODE="0660" ++KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" ++KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" + + # Section for zaptel device + KERNEL=="zapctl", NAME="zap/ctl" @@ -227,89 +236,51 @@ KERNEL=="zap[0-9]*", NAME="zap/%n" KERNEL=="pktcdvd", NAME="%k/control" @@ -290,8 +301,8 @@ RUN+="socket:/org/kernel/udev/monitor" ---- /dev/null 2007-08-16 13:04:33.725609596 +0200 -+++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-08-15 10:16:50.000000000 +0200 +--- /dev/null 2007-08-18 10:04:54.672638596 +0200 ++++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-08-23 08:46:16.000000000 +0200 @@ -0,0 +1,14 @@ +# do not edit this file, it will be overwritten on update + @@ -308,7 +319,7 @@ + +LABEL="drivers_end" --- udev-113/etc/udev/redhat/05-udev-early.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-08-10 16:36:01.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-08-23 08:46:16.000000000 +0200 @@ -1,19 +0,0 @@ -# sysfs is populated after the event is sent -ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" diff --git a/udev.spec b/udev.spec index 67ef0ed..f8a282f 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 11%{?dist} +Release: 12%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -342,6 +342,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Aug 24 2007 Harald Hoyer - 113-12 +- removed /dev/tape symlink, because it's now a directory + (bug #251755) + * Thu Aug 16 2007 Harald Hoyer - 113-11 - readded firmware rule (#252983) From b2f2f346f05f3d58e1334f6c83b39fef25f89e99 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 1 Oct 2007 11:10:28 +0000 Subject: [PATCH 10/16] new F7 kernels seem to require a udev update --- ...if-strlcpy-strlcat-indicate-truncati.patch | 95 ++ 0002-rules-fix-two-trivial-typos.patch | 35 + 0003-rules-random-and-urandom-are-0666.patch | 38 + 0004-rules-add-REMOVE_CMD-rule.patch | 25 + ...nts-to-rename-database-and-failed-fi.patch | 248 ++++ 0006-rules-Gentoo-update.patch | 206 ++++ 0007-rules-add-i2o-driver-rule.patch | 24 + 0008-man-recreate-man-pages.patch | 1094 +++++++++++++++++ ...inux_raid-metadata-version-1.0-detec.patch | 35 + 0010-rules-Gentoo-update.patch | 150 +++ 0011-add-name-substitution.patch | 112 ++ ...he-device-node-with-ignore_remove-bu.patch | 102 ++ ...-warning-for-invalid-TEST-operations.patch | 43 + ...-delete-lib-udev-devices-nodes-on-re.patch | 23 + ...roken-nvram-group-assignment-without.patch | 24 + ...-symlink-if-new-rtc-drivers-are-used.patch | 40 + ...WAIT_FOR_SYSFS-timeout-to-10-seconds.patch | 27 + 0018-correct-includes-in-udev_selinux.c.patch | 26 + ...s-put-bsd-nodes-in-dev-bsd-directory.patch | 24 + ...ath_id-fix-for-stacked-class-devices.patch | 29 + ...h-after-comment-check-and-whitespace.patch | 69 ++ 0022-only-install-.rules.patch | 29 + ...de-names-while-restoring-symlinks-fr.patch | 48 + ...n-dev-.udev-queue-instead-of-devpath.patch | 103 ++ 0025-rules-add-memstick-module-loading.patch | 24 + ...a-space-from-udevinfo-symlink-output.patch | 35 + ...info-simplify-symlink-printing-logic.patch | 46 + ...mlink-creation-if-database-disagress.patch | 35 + ...wrong-variable-used-in-logged-string.patch | 25 + 0030-update-README.patch | 43 + ...move-all-policy-from-write_net_rules.patch | 244 ++++ sources | 2 +- udev-095-dbgwait.patch | 80 -- udev-106-selinuxmedia.patch | 38 - udev-106-setenv.patch | 99 -- udev-extras.patch | 121 -- udev-permconv.patch | 97 -- udev-post.init | 47 + udev-rules.patch | 342 ------ udev.spec | 168 ++- 40 files changed, 3284 insertions(+), 811 deletions(-) create mode 100644 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch create mode 100644 0002-rules-fix-two-trivial-typos.patch create mode 100644 0003-rules-random-and-urandom-are-0666.patch create mode 100644 0004-rules-add-REMOVE_CMD-rule.patch create mode 100644 0005-track-move-events-to-rename-database-and-failed-fi.patch create mode 100644 0006-rules-Gentoo-update.patch create mode 100644 0007-rules-add-i2o-driver-rule.patch create mode 100644 0008-man-recreate-man-pages.patch create mode 100644 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch create mode 100644 0010-rules-Gentoo-update.patch create mode 100644 0011-add-name-substitution.patch create mode 100644 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch create mode 100644 0013-print-warning-for-invalid-TEST-operations.patch create mode 100644 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch create mode 100644 0015-rules-remove-broken-nvram-group-assignment-without.patch create mode 100644 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch create mode 100644 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch create mode 100644 0018-correct-includes-in-udev_selinux.c.patch create mode 100644 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch create mode 100644 0020-path_id-fix-for-stacked-class-devices.patch create mode 100644 0021-check-line-length-after-comment-check-and-whitespace.patch create mode 100644 0022-only-install-.rules.patch create mode 100644 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch create mode 100644 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch create mode 100644 0025-rules-add-memstick-module-loading.patch create mode 100644 0026-remove-extra-space-from-udevinfo-symlink-output.patch create mode 100644 0027-udevinfo-simplify-symlink-printing-logic.patch create mode 100644 0028-prevent-wrong-symlink-creation-if-database-disagress.patch create mode 100644 0029-fix-wrong-variable-used-in-logged-string.patch create mode 100644 0030-update-README.patch create mode 100644 0031-rule_generator-move-all-policy-from-write_net_rules.patch delete mode 100644 udev-095-dbgwait.patch delete mode 100644 udev-106-selinuxmedia.patch delete mode 100644 udev-106-setenv.patch delete mode 100644 udev-extras.patch delete mode 100644 udev-permconv.patch create mode 100644 udev-post.init delete mode 100644 udev-rules.patch diff --git a/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch b/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch new file mode 100644 index 0000000..95abcdf --- /dev/null +++ b/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch @@ -0,0 +1,95 @@ +From 1f7a36f2c0953c60a8d7acadc281285a0b84fb46 Mon Sep 17 00:00:00 2001 +From: Michael Morony +Date: Fri, 24 Aug 2007 08:14:21 +0200 +Subject: [PATCH] set buffer size if strlcpy/strlcat indicate truncation + +--- + udev_rules.c | 4 +++- + udev_sysfs.c | 2 ++ + udevinfo.c | 2 ++ + udevmonitor.c | 4 ---- + udevtrigger.c | 2 ++ + 5 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/udev_rules.c b/udev_rules.c +index 0dcbf15..35db958 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -475,10 +475,12 @@ static int pass_env_to_socket(const char *sockname, const char *devpath, const c + + bufpos = snprintf(buf, sizeof(buf)-1, "%s@%s", action, devpath); + bufpos++; +- for (i = 0; environ[i] != NULL && bufpos < sizeof(buf); i++) { ++ for (i = 0; environ[i] != NULL && bufpos < (sizeof(buf)-1); i++) { + bufpos += strlcpy(&buf[bufpos], environ[i], sizeof(buf) - bufpos-1); + bufpos++; + } ++ if (bufpos > sizeof(buf)) ++ bufpos = sizeof(buf); + + count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, addrlen); + if (count < 0) +diff --git a/udev_sysfs.c b/udev_sysfs.c +index 34ae9ac..d5b04c3 100644 +--- a/udev_sysfs.c ++++ b/udev_sysfs.c +@@ -355,6 +355,8 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + + dbg("open '%s'/'%s'", devpath, attr_name); + sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full)); ++ if(sysfs_len >= sizeof(path_full)) ++ sysfs_len = sizeof(path_full) - 1; + path = &path_full[sysfs_len]; + strlcat(path_full, devpath, sizeof(path_full)); + strlcat(path_full, "/", sizeof(path_full)); +diff --git a/udevinfo.c b/udevinfo.c +index d0b1c44..be9aa76 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -79,6 +79,8 @@ static void print_all_attributes(const char *devpath, const char *key) + if (attr_value == NULL) + continue; + len = strlcpy(value, attr_value, sizeof(value)); ++ if(len >= sizeof(value)) ++ len = sizeof(value) - 1; + dbg("attr '%s'='%s'(%zi)", dent->d_name, value, len); + + /* remove trailing newlines */ +diff --git a/udevmonitor.c b/udevmonitor.c +index a9cc061..644a955 100644 +--- a/udevmonitor.c ++++ b/udevmonitor.c +@@ -43,7 +43,6 @@ static int init_udev_monitor_socket(void) + { + struct sockaddr_un saddr; + socklen_t addrlen; +- const int feature_on = 1; + int retval; + + memset(&saddr, 0x00, sizeof(saddr)); +@@ -67,9 +66,6 @@ static int init_udev_monitor_socket(void) + return -1; + } + +- /* enable receiving of the sender credentials */ +- setsockopt(udev_monitor_sock, SOL_SOCKET, SO_PASSCRED, &feature_on, sizeof(feature_on)); +- + return 0; + } + +diff --git a/udevtrigger.c b/udevtrigger.c +index cf8f209..309c54a 100644 +--- a/udevtrigger.c ++++ b/udevtrigger.c +@@ -435,6 +435,8 @@ static void scan_failed(void) + continue; + + start = strlcpy(device, sysfs_path, sizeof(device)); ++ if(start >= sizeof(device)) ++ start = sizeof(device) - 1; + strlcat(device, dent->d_name, sizeof(device)); + path_decode(&device[start]); + device_list_insert(device); +-- +1.5.2.4 + diff --git a/0002-rules-fix-two-trivial-typos.patch b/0002-rules-fix-two-trivial-typos.patch new file mode 100644 index 0000000..de6ffef --- /dev/null +++ b/0002-rules-fix-two-trivial-typos.patch @@ -0,0 +1,35 @@ +From d98c6dfebc2186b841c92eeb002c03938f28cdc6 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 24 Aug 2007 20:34:44 +0200 +Subject: [PATCH] rules: fix two trivial typos + +Thanks to: Alexander E. Patrakov +--- + etc/udev/rules.d/50-udev-default.rules | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index bff2fe5..b3c0cfc 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -58,7 +58,7 @@ SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{ + KERNEL=="parport[0-9]*", GROUP="lp" + SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" + SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" +-KERNEL=="lp[0-9]*", GROUP="lp" SYMLINK+="par%n" ++KERNEL=="lp[0-9]*", GROUP="lp", SYMLINK+="par%n" + KERNEL=="irlpt[0-9]*", GROUP="lp" + + # block, tapes, block-releated +@@ -71,7 +71,7 @@ KERNEL=="fd[0-9]", GROUP="floppy" + KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k" + KERNEL=="sch[0-9]*", GROUP="disk" + KERNEL=="sg[0-9]*", GROUP="disk", MODE="0640" +-KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk"" ++KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" + KERNEL=="pg[0-9]*", GROUP="disk" + KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" + KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" +-- +1.5.2.4 + diff --git a/0003-rules-random-and-urandom-are-0666.patch b/0003-rules-random-and-urandom-are-0666.patch new file mode 100644 index 0000000..be02ed4 --- /dev/null +++ b/0003-rules-random-and-urandom-are-0666.patch @@ -0,0 +1,38 @@ +From b6e4b08dc14444790c1560108e93a67e57e1148b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 25 Aug 2007 14:07:02 +0200 +Subject: [PATCH] rules: random and urandom are 0666 + +Thanks to: Alexander E. Patrakov . +--- + etc/udev/rules.d/50-udev-default.rules | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index b3c0cfc..f869f51 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -17,18 +17,16 @@ KERNEL=="hvc*|hvsi*", GROUP="uucp" + KERNEL=="lirc0", SYMLINK+="lirc" + + # mem +-KERNEL=="null|zero|random", MODE="0666" ++KERNEL=="null|zero|full|random|urandom", MODE="0666" + KERNEL=="null", SYMLINK+="XOR" + KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" + KERNEL=="nvram", GROUP="kmem", MODE="0600" + KERNEL=="ram0", SYMLINK+="ramdisk" + KERNEL=="ram1", SYMLINK+="ram" +-KERNEL=="urandom", MODE="0644" +-KERNEL=="full", MODE="0666" + + # input + KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" +-KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0600" ++KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0600" + KERNEL=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k" + + # video4linux +-- +1.5.2.4 + diff --git a/0004-rules-add-REMOVE_CMD-rule.patch b/0004-rules-add-REMOVE_CMD-rule.patch new file mode 100644 index 0000000..ae2f3f8 --- /dev/null +++ b/0004-rules-add-REMOVE_CMD-rule.patch @@ -0,0 +1,25 @@ +From 3f781cab37dbee76340c65602555a524ffea96f9 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 26 Aug 2007 00:48:49 +0200 +Subject: [PATCH] rules: add REMOVE_CMD rule + +--- + etc/udev/rules.d/95-udev-late.rules | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/etc/udev/rules.d/95-udev-late.rules b/etc/udev/rules.d/95-udev-late.rules +index 1755d08..4a015b9 100644 +--- a/etc/udev/rules.d/95-udev-late.rules ++++ b/etc/udev/rules.d/95-udev-late.rules +@@ -1,5 +1,8 @@ + # do not edit this file, it will be overwritten on update + ++# run a command on remove events ++ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" ++ + # event to be catched by udevmonitor + RUN+="socket:/org/kernel/udev/monitor" + +-- +1.5.2.4 + diff --git a/0005-track-move-events-to-rename-database-and-failed-fi.patch b/0005-track-move-events-to-rename-database-and-failed-fi.patch new file mode 100644 index 0000000..d0baac1 --- /dev/null +++ b/0005-track-move-events-to-rename-database-and-failed-fi.patch @@ -0,0 +1,248 @@ +From a2f2270eef499f6f60075a149011e3e3851ab5ef Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 26 Aug 2007 05:22:35 +0200 +Subject: [PATCH] track "move" events to rename database and failed files + +--- + udev.h | 2 ++ + udev_db.c | 10 ++++++++++ + udev_device.c | 4 ++++ + udevd.c | 54 ++++++++++++++++++++++++++++++++++++++++++------------ + udevd.h | 1 + + 5 files changed, 59 insertions(+), 12 deletions(-) + +diff --git a/udev.h b/udev.h +index f13eb83..33b39aa 100644 +--- a/udev.h ++++ b/udev.h +@@ -69,6 +69,7 @@ struct udevice { + struct sysfs_device dev_local; + struct sysfs_device *dev_parent; /* current parent device used for matching */ + char action[NAME_SIZE]; ++ char *devpath_old; + + /* node */ + char name[PATH_SIZE]; +@@ -131,6 +132,7 @@ extern int udev_node_remove(struct udevice *udev); + /* udev_db.c */ + extern int udev_db_add_device(struct udevice *dev); + extern int udev_db_delete_device(struct udevice *dev); ++extern int udev_db_rename(const char *devpath_old, const char *devpath); + extern int udev_db_get_device(struct udevice *udev, const char *devpath); + extern int udev_db_get_devices_by_name(const char *name, struct list_head *name_list); + extern int udev_db_get_all_entries(struct list_head *name_list); +diff --git a/udev_db.c b/udev_db.c +index abc1e5a..29aa031 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -117,6 +117,16 @@ out: + return rc; + } + ++int udev_db_rename(const char *devpath_old, const char *devpath) ++{ ++ char filename[PATH_SIZE]; ++ char filename_old[PATH_SIZE]; ++ ++ devpath_to_db_path(devpath_old, filename_old, sizeof(filename_old)); ++ devpath_to_db_path(devpath, filename, sizeof(filename)); ++ return rename(filename_old, filename); ++} ++ + int udev_db_add_device(struct udevice *udev) + { + char filename[PATH_SIZE]; +diff --git a/udev_device.c b/udev_device.c +index 23ba313..2b7ffe0 100644 +--- a/udev_device.c ++++ b/udev_device.c +@@ -168,6 +168,10 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + { + int retval = 0; + ++ if (udev->devpath_old != NULL) ++ if (udev_db_rename(udev->devpath_old, udev->dev->devpath) == 0) ++ info("moved database from '%s' to '%s'", udev->devpath_old, udev->dev->devpath); ++ + /* add device node */ + if (major(udev->devt) != 0 && + (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) { +diff --git a/udevd.c b/udevd.c +index 8f56de6..3c46617 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -130,6 +130,7 @@ static int udev_event_process(struct udevd_uevent_msg *msg) + return -1; + strlcpy(udev->action, msg->action, sizeof(udev->action)); + sysfs_device_set_values(udev->dev, msg->devpath, msg->subsystem, msg->driver); ++ udev->devpath_old = msg->devpath_old; + udev->devt = msg->devt; + + retval = udev_device_event(&rules, udev); +@@ -156,14 +157,14 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + struct udevd_uevent_msg *loop_msg; + int fd; + +- /* add location of queue files */ ++ /* location of queue file */ + strlcpy(filename, udev_root, sizeof(filename)); + strlcat(filename, "/", sizeof(filename)); + start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename)); + strlcat(filename, msg->devpath, sizeof(filename)); + path_encode(&filename[start], sizeof(filename) - start); + +- /* add location of failed files */ ++ /* location of failed file */ + strlcpy(filename_failed, udev_root, sizeof(filename_failed)); + strlcat(filename_failed, "/", sizeof(filename_failed)); + start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed)); +@@ -174,6 +175,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + case EVENT_QUEUED: + unlink(filename_failed); + delete_path(filename_failed); ++ + create_path(filename); + fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); + if (fd > 0) +@@ -181,10 +183,25 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + return; + case EVENT_FINISHED: + case EVENT_FAILED: +- unlink(filename_failed); +- delete_path(filename_failed); ++ if (msg->devpath_old != NULL) { ++ /* "move" event - rename failed file to current name, do not delete failed */ ++ char filename_failed_old[PATH_SIZE]; ++ ++ strlcpy(filename_failed_old, udev_root, sizeof(filename_failed_old)); ++ strlcat(filename_failed_old, "/", sizeof(filename_failed_old)); ++ start = strlcat(filename_failed_old, EVENT_FAILED_DIR"/", sizeof(filename_failed_old)); ++ strlcat(filename_failed_old, msg->devpath_old, sizeof(filename_failed_old)); ++ path_encode(&filename_failed_old[start], sizeof(filename) - start); ++ ++ if (rename(filename_failed_old, filename_failed) == 0) ++ info("renamed devpath, moved failed state of '%s' to %s'", ++ msg->devpath_old, msg->devpath); ++ } else { ++ unlink(filename_failed); ++ delete_path(filename_failed); ++ } + +- /* don't remove, if events for the same path are still pending */ ++ /* skip if events for the same path are still pending */ + list_for_each_entry(loop_msg, &running_list, node) + if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) + return; +@@ -193,7 +210,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) + return; + +- /* move failed events to the failed directory */ ++ /* move failed event to the failed directory */ + if (state == EVENT_FAILED) { + create_path(filename_failed); + rename(filename, filename_failed); +@@ -201,7 +218,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + unlink(filename); + } + +- /* clean up the queue directory */ ++ /* clean up possibly empty queue directory */ + delete_path(filename); + + return; +@@ -212,7 +229,7 @@ static void msg_queue_delete(struct udevd_uevent_msg *msg) + { + list_del(&msg->node); + +- /* mark as failed, if add event returns non-zero */ ++ /* mark as failed, if "add" event returns non-zero */ + if (msg->exitstatus && strcmp(msg->action, "add") == 0) + export_event_state(msg, EVENT_FAILED); + else +@@ -280,6 +297,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) + } + + export_event_state(msg, EVENT_QUEUED); ++ info("seq %llu forked, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); + + /* run one event after the other in debug mode */ + if (debug_trace) { +@@ -469,11 +487,16 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + if (loop_msg->seqnum >= msg->seqnum) + break; + ++ /* check our old name */ ++ if (msg->devpath_old != NULL) ++ if (strcmp(loop_msg->devpath , msg->devpath_old) == 0) ++ return 2; ++ + /* check identical, parent, or child device event */ + if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { + dbg("%llu, device event still pending %llu (%s)", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); +- return 2; ++ return 3; + } + + /* check physical device event (special case of parent) */ +@@ -481,7 +504,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + if (compare_devpath(loop_msg->devpath, msg->physdevpath) != 0) { + dbg("%llu, physical device event still pending %llu (%s)", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); +- return 3; ++ return 4; + } + } + +@@ -492,11 +515,16 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + return 1; + } + ++ /* check our old name */ ++ if (msg->devpath_old != NULL) ++ if (strcmp(loop_msg->devpath , msg->devpath_old) == 0) ++ return 2; ++ + /* check identical, parent, or child device event */ + if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { + dbg("%llu, device event still running %llu (%s)", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); +- return 2; ++ return 3; + } + + /* check physical device event (special case of parent) */ +@@ -504,7 +532,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + if (compare_devpath(loop_msg->devpath, msg->physdevpath) != 0) { + dbg("%llu, physical device event still running %llu (%s)", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); +- return 3; ++ return 4; + } + } + return 0; +@@ -588,6 +616,8 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz + msg->driver = &key[7]; + else if (strncmp(key, "SEQNUM=", 7) == 0) + msg->seqnum = strtoull(&key[7], NULL, 10); ++ else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) ++ msg->devpath_old = &key[12]; + else if (strncmp(key, "PHYSDEVPATH=", 12) == 0) + msg->physdevpath = &key[12]; + else if (strncmp(key, "PHYSDEVDRIVER=", 14) == 0) +diff --git a/udevd.h b/udevd.h +index 4ca6d1d..9be34cb 100644 +--- a/udevd.h ++++ b/udevd.h +@@ -66,6 +66,7 @@ struct udevd_uevent_msg { + char *driver; + dev_t devt; + unsigned long long seqnum; ++ char *devpath_old; + char *physdevpath; + unsigned int timeout; + char *envp[UEVENT_NUM_ENVP+1]; +-- +1.5.2.4 + diff --git a/0006-rules-Gentoo-update.patch b/0006-rules-Gentoo-update.patch new file mode 100644 index 0000000..b999b51 --- /dev/null +++ b/0006-rules-Gentoo-update.patch @@ -0,0 +1,206 @@ +From 2bf0a506bc13abc5632079232bee6f8784934633 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 26 Aug 2007 13:54:32 +0200 +Subject: [PATCH] rules: Gentoo update + +--- + etc/udev/gentoo/05-udev-early.rules | 7 ++-- + etc/udev/gentoo/50-udev.rules | 8 +---- + etc/udev/gentoo/80-drivers.rules | 44 ++++++++++++++++++++++++++++ + etc/udev/gentoo/80-hotplug.rules | 54 ----------------------------------- + etc/udev/gentoo/90-network.rules | 8 +++++ + etc/udev/gentoo/95-udev-late.rules | 18 ----------- + 6 files changed, 57 insertions(+), 82 deletions(-) + create mode 100644 etc/udev/gentoo/80-drivers.rules + delete mode 100644 etc/udev/gentoo/80-hotplug.rules + create mode 100644 etc/udev/gentoo/90-network.rules + delete mode 100644 etc/udev/gentoo/95-udev-late.rules + +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-drivers.rules b/etc/udev/gentoo/80-drivers.rules +new file mode 100644 +index 0000000..df6c880 +--- /dev/null ++++ b/etc/udev/gentoo/80-drivers.rules +@@ -0,0 +1,44 @@ ++# 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="drivers_end" ++ ++# this driver is broken and should not be loaded automatically ++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}" ++ ++# /etc/modprobe.conf. ++SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" ++# needed aliases are defined in /etc/modprobe.d/pnp-aliases ++ ++ ++SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" ++SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" ++SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" ++SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" ++SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" ++ ++# Load driver for scsi-device ++SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" ++ ++ # 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 ++ ++ ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" ++ 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}=="1", ATTRS{vendor}=="On[sS]tream", \ ++ ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" ++ ATTRS{type}=="1", RUN+="modprobe.sh st" ++LABEL="hotplug_scsi_end" ++ ++LABEL="drivers_end" ++ +diff --git a/etc/udev/gentoo/80-hotplug.rules b/etc/udev/gentoo/80-hotplug.rules +deleted file mode 100644 +index 0637dbc..0000000 +--- a/etc/udev/gentoo/80-hotplug.rules ++++ /dev/null +@@ -1,54 +0,0 @@ +-# /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" +- +-# check if the device has already been claimed by a driver +-ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_load_end" +- +-# this driver is broken and should not be loaded automatically +-SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_load_end" +- +-# Autoload modules that lack aliases but have them defined in autoload modules +-ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}" +- +-# /etc/modprobe.conf. +-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" +-# needed aliases are defined in /etc/modprobe.d/pnp-aliases +- +- +-SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" +-SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" +-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" +-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" +-SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" +- +-# Load driver for scsi-device +-SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" +- +- # 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 +- +- ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" +- 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}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" +- ATTRS{type}=="1", RUN+="modprobe.sh st" +-LABEL="hotplug_scsi_end" +- +-LABEL="hotplug_load_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" +- +-- +1.5.2.4 + diff --git a/0007-rules-add-i2o-driver-rule.patch b/0007-rules-add-i2o-driver-rule.patch new file mode 100644 index 0000000..ea622b2 --- /dev/null +++ b/0007-rules-add-i2o-driver-rule.patch @@ -0,0 +1,24 @@ +From 79ef8431c952349d9f31c899adb579c3ff83a80b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 28 Aug 2007 04:16:54 +0200 +Subject: [PATCH] rules: add i2o driver rule + +--- + etc/udev/rules.d/80-drivers.rules | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules +index e71f135..3388266 100644 +--- a/etc/udev/rules.d/80-drivers.rules ++++ b/etc/udev/rules.d/80-drivers.rules +@@ -7,6 +7,7 @@ SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \ + RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" + SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" + SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" ++SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" + SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" + SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" + +-- +1.5.2.4 + diff --git a/0008-man-recreate-man-pages.patch b/0008-man-recreate-man-pages.patch new file mode 100644 index 0000000..d22c38a --- /dev/null +++ b/0008-man-recreate-man-pages.patch @@ -0,0 +1,1094 @@ +From dbb2c414d77362a9279f4fc50458054f71ffb7e2 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 28 Aug 2007 04:24:08 +0200 +Subject: [PATCH] man: recreate man pages + +--- + extras/volume_id/vol_id.8 | 28 ++++---- + udev.7 | 182 ++++++++++++++++++++++----------------------- + udevd.8 | 38 +++++----- + udevinfo.8 | 28 ++++---- + udevmonitor.8 | 16 ++-- + udevsettle.8 | 12 ++-- + udevstart.8 | 8 +- + udevtest.8 | 8 +- + udevtrigger.8 | 28 ++++---- + 9 files changed, 172 insertions(+), 176 deletions(-) + +diff --git a/extras/volume_id/vol_id.8 b/extras/volume_id/vol_id.8 +index 7594253..daa583b 100644 +--- a/extras/volume_id/vol_id.8 ++++ b/extras/volume_id/vol_id.8 +@@ -1,6 +1,6 @@ + .\" Title: vol_id + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: March 2006 + .\" Manual: vol_id + .\" Source: volume_id +@@ -11,69 +11,69 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-vol_id \- probe filesystem type and read label and uuid ++vol_id - probe filesystem type and read label and uuid + .SH "SYNOPSIS" + .HP 7 + \fBvol_id\fR [\fB\-\-export\fR] [\fB\-\-type\fR] [\fB\-\-label\fR] [\fB\-\-label\-raw\fR] [\fB\-\-uuid\fR] [\fB\-\-skip\-raid\fR] [\fB\-\-probe\-all\fR] [\fB\-\-help\fR] [\fIdevice\fR] + .SH "DESCRIPTION" + .PP + \fBvol_id\fR +-is usually called from a udev rule, to provide udev with the filesystem type, the label and the uuid of a volume. It supports most of the common filesystem formats and detects various raid setups to prevent the recognition of raid members as a volume with a filesystem. ++is usually called from a udev rule, to provide udev with the filesystem type, the label and the uuid of a volume\. It supports most of the common filesystem formats and detects various raid setups to prevent the recognition of raid members as a volume with a filesystem\. + .SH "OPTIONS" + .PP + \fB\-\-export\fR + .RS 4 +-Print all values in key/value format to import them into the environment. ++Print all values in key/value format to import them into the environment\. + .RE + .PP + \fB\-\-type\fR + .RS 4 +-Print the filesystem type. ++Print the filesystem type\. + .RE + .PP + \fB\-\-label\fR + .RS 4 +-Print the safe version of volume label suitable for use as filename. ++Print the safe version of volume label suitable for use as filename\. + .RE + .PP + \fB\-\-label\-raw\fR + .RS 4 +-Print the raw volume label. ++Print the raw volume label\. + .RE + .PP + \fB\-\-uuid\fR + .RS 4 +-Print the uuid of a volume. ++Print the uuid of a volume\. + .RE + .PP + \fB\-\-skip\-raid\fR + .RS 4 +-Skip detection of raid metadata. ++Skip detection of raid metadata\. + .RE + .PP + \fB\-\-probe\-all\fR + .RS 4 +-Probe for all types and print all matches. ++Probe for all types and print all matches\. + .RE + .PP + \fB\-\-help\fR + .RS 4 +-Print usage. ++Print usage\. + .RE + .SH "ENVIRONMENT" + .PP + \fBUDEV_LOG\fR + .RS 4 +-Set the syslog priority. ++Set the syslog priority\. + .RE + .SH "EXIT STATUS" + .PP + \fBvol_id\fR +-will only return successful if the value asked for is not empty. All trailing whitespace will be removed, spaces replaced by underscore and slashes ignored. ++will only return successful if the value asked for is not empty\. All trailing whitespace will be removed, spaces replaced by underscore and slashes ignored\. + .SH "AUTHOR" + .PP + Written by Kay Sievers +- ++ + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udev.7 b/udev.7 +index 821a476..5f0ebb9 100644 +--- a/udev.7 ++++ b/udev.7 +@@ -1,6 +1,6 @@ + .\" Title: udev + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: August 2005 + .\" Manual: udev + .\" Source: udev +@@ -11,213 +11,213 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udev \- dynamic device management ++udev - dynamic device management + .SH "DESCRIPTION" + .PP +-udev provides a dynamic device directory containing only the files for actually present devices. It creates or removes device node files in the ++udev provides a dynamic device directory containing only the files for actually present devices\. It creates or removes device node files in the + \fI/dev\fR +-directory, or it renames network interfaces. ++directory, or it renames network interfaces\. + .PP + Usually udev runs as + \fBudevd\fR(8) +-and receives uevents directly from the kernel if a device is added or removed from the system. ++and receives uevents directly from the kernel if a device is added or removed from the system\. + .PP +-If udev receives a device event, it matches its configured rules against the available device attributes provided in sysfs to identify the device. Rules that match may provide additional device information or specify a device node name and multiple symlink names and instruct udev to run additional programs as part of the device event handling. ++If udev receives a device event, it matches its configured rules against the available device attributes provided in sysfs to identify the device\. Rules that match may provide additional device information or specify a device node name and multiple symlink names and instruct udev to run additional programs as part of the device event handling\. + .SH "CONFIGURATION" + .PP + All udev configuration files are placed in +-\fI/etc/udev/*\fR. Every file consists of a set of lines of text. All empty lines or lines beginning with '#' will be ignored. ++\fI/etc/udev/*\fR\. Every file consists of a set of lines of text\. All empty lines or lines beginning with \'#\' will be ignored\. + .SS "Configuration file" + .PP + udev expects its main configuration file at +-\fI/etc/udev/udev.conf\fR. It consists of a set of variables allowing the user to override default udev values. The following variables can be set: ++\fI/etc/udev/udev\.conf\fR\. It consists of a set of variables allowing the user to override default udev values\. The following variables can be set: + .PP + \fBudev_root\fR + .RS 4 +-Specifies where to place the device nodes in the filesystem. The default value is +-\fI/dev\fR. ++Specifies where to place the device nodes in the filesystem\. The default value is ++\fI/dev\fR\. + .RE + .PP + \fBudev_rules\fR + .RS 4 + The name of the udev rules file or directory to look for files with the suffix +-\fI.rules\fR. Multiple rule files are read in lexical order. The default value is +-\fI/etc/udev/rules.d\fR. ++\fI\.rules\fR\. Multiple rule files are read in lexical order\. The default value is ++\fI/etc/udev/rules\.d\fR\. + .RE + .PP + \fBudev_log\fR + .RS 4 +-The logging priority. Valid values are the numerical syslog priorities or their textual representations: ++The logging priority\. Valid values are the numerical syslog priorities or their textual representations: + \fBerr\fR, + \fBinfo\fR + and +-\fBdebug\fR. ++\fBdebug\fR\. + .RE + .SS "Rules files" + .PP + The udev rules are read from the files located in the +-\fI/etc/udev/rules.d\fR +-directory or at the location specified value in the configuration file. Every line in the rules file contains at least one key value pair. There are two kind of keys, match and assignment keys. If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned. ++\fI/etc/udev/rules\.d\fR ++directory or at the location specified value in the configuration file\. Every line in the rules file contains at least one key value pair\. There are two kind of keys, match and assignment keys\. If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned\. + .PP +-A matching rule may specify the name of the device node, add a symlink pointing to the node, or run a specified program as part of the event handling. If no matching rule is found, the default device node name is used. ++A matching rule may specify the name of the device node, add a symlink pointing to the node, or run a specified program as part of the event handling\. If no matching rule is found, the default device node name is used\. + .PP +-A rule may consist of a list of one or more key value pairs separated by a comma. Each key has a distinct operation, depending on the used operator. Valid operators are: ++A rule may consist of a list of one or more key value pairs separated by a comma\. Each key has a distinct operation, depending on the used operator\. Valid operators are: + .PP + \fB==\fR + .RS 4 +-Compare for equality. ++Compare for equality\. + .RE + .PP + \fB!=\fR + .RS 4 +-Compare for non\-equality. ++Compare for non\-equality\. + .RE + .PP + \fB=\fR + .RS 4 +-Assign a value to a key. Keys that represent a list, are reset and only this single value is assigned. ++Assign a value to a key\. Keys that represent a list, are reset and only this single value is assigned\. + .RE + .PP + \fB+=\fR + .RS 4 +-Add the value to a key that holds a list of entries. ++Add the value to a key that holds a list of entries\. + .RE + .PP + \fB:=\fR + .RS 4 +-Assign a value to a key finally; disallow any later changes, which may be used to prevent changes by any later rules. ++Assign a value to a key finally; disallow any later changes, which may be used to prevent changes by any later rules\. + .RE + .PP +-The following key names can be used to match against device properties. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device. ++The following key names can be used to match against device properties\. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event\. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device\. + .PP + \fBACTION\fR + .RS 4 +-Match the name of the event action. ++Match the name of the event action\. + .RE + .PP + \fBDEVPATH\fR + .RS 4 +-Match the devpath of the event device. ++Match the devpath of the event device\. + .RE + .PP + \fBKERNEL\fR + .RS 4 +-Match the name of the event device. ++Match the name of the event device\. + .RE + .PP + \fBSUBSYSTEM\fR + .RS 4 +-Match the subsystem of the event device. ++Match the subsystem of the event device\. + .RE + .PP + \fBDRIVER\fR + .RS 4 +-Match the driver name of the event device. Only set for devices which are bound to a driver at the time the event is generated. ++Match the driver name of the event device\. Only set for devices which are bound to a driver at the time the event is generated\. + .RE + .PP + \fBATTR{\fR\fB\fIfilename\fR\fR\fB}\fR + .RS 4 +-Match sysfs attribute values of the event device. Up to five ++Match sysfs attribute values of the event device\. Up to five + \fBATTR\fR +-keys can be specified per rule. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself. Depending on the type of operator, this key is also used to set the value of a sysfs attribute. ++keys can be specified per rule\. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself\. Depending on the type of operator, this key is also used to set the value of a sysfs attribute\. + .RE + .PP + \fBKERNELS\fR + .RS 4 +-Search the devpath upwards for a matching device name. ++Search the devpath upwards for a matching device name\. + .RE + .PP + \fBSUBSYSTEMS\fR + .RS 4 +-Search the devpath upwards for a matching device subsystem name. ++Search the devpath upwards for a matching device subsystem name\. + .RE + .PP + \fBDRIVERS\fR + .RS 4 +-Search the devpath upwards for a matching device driver name. ++Search the devpath upwards for a matching device driver name\. + .RE + .PP + \fBATTRS{\fR\fB\fIfilename\fR\fR\fB}\fR + .RS 4 +-Search the devpath upwards for a device with matching sysfs attribute values. Up to five ++Search the devpath upwards for a device with matching sysfs attribute values\. Up to five + \fBATTRS\fR +-keys can be specified per rule, but all of them must match on the same device. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself. ++keys can be specified per rule, but all of them must match on the same device\. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself\. + .RE + .PP + \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR + .RS 4 +-Match against the value of an environment variable. Up to five ++Match against the value of an environment variable\. Up to five + \fBENV\fR +-keys can be specified per rule. Depending on the type of operator, this key is also used to export a variable to the environment. ++keys can be specified per rule\. Depending on the type of operator, this key is also used to export a variable to the environment\. + .RE + .PP + \fBTEST{\fR\fB\fIoctal mode mask\fR\fR\fB}\fR + .RS 4 +-Test the existence of a file. An octal mode mask can be specified if needed. ++Test the existence of a file\. An octal mode mask can be specified if needed\. + .RE + .PP + \fBPROGRAM\fR + .RS 4 +-Execute external program. The key is true, if the program returns with exit code zero. The whole event environment is available to the executed program. The program's output printed to stdout, is available in the RESULT key. ++Execute external program\. The key is true, if the program returns with exit code zero\. The whole event environment is available to the executed program\. The program\'s output printed to stdout, is available in the RESULT key\. + .RE + .PP + \fBRESULT\fR + .RS 4 +-Match the returned string of the last PROGRAM call. This key can be used in the same or in any later rule after a PROGRAM call. ++Match the returned string of the last PROGRAM call\. This key can be used in the same or in any later rule after a PROGRAM call\. + .RE + .PP +-Most of the fields support a shell style pattern matching. The following pattern characters are supported: ++Most of the fields support a shell style pattern matching\. The following pattern characters are supported: + .PP + \fB*\fR + .RS 4 +-Matches zero, or any number of characters. ++Matches zero, or any number of characters\. + .RE + .PP + \fB?\fR + .RS 4 +-Matches any single character. ++Matches any single character\. + .RE + .PP + \fB[]\fR + .RS 4 +-Matches any single character specified within the brackets. For example, the pattern string 'tty[SR]' would match either 'ttyS' or 'ttyR'. Ranges are also supported within this match with the '\-' character. For example, to match on the range of all digits, the pattern [0\-9] would be used. If the first character following the '[' is a '!', any characters not enclosed are matched. ++Matches any single character specified within the brackets\. For example, the pattern string \'tty[SR]\' would match either \'ttyS\' or \'ttyR\'\. Ranges are also supported within this match with the \'\-\' character\. For example, to match on the range of all digits, the pattern [0\-9] would be used\. If the first character following the \'[\' is a \'!\', any characters not enclosed are matched\. + .RE + .PP + The following keys can get values assigned: + .PP + \fBNAME\fR + .RS 4 +-The name of the node to be created, or the name the network interface should be renamed to. Only one rule can set the node name, all later rules with a NAME key will be ignored. ++The name of the node to be created, or the name the network interface should be renamed to\. Only one rule can set the node name, all later rules with a NAME key will be ignored\. + .RE + .PP + \fBSYMLINK\fR + .RS 4 +-The name of a symlink targeting the node. Every matching rule can add this value to the list of symlinks to be created along with the device node. Multiple symlinks may be specified by separating the names by the space character. ++The name of a symlink targeting the node\. Every matching rule can add this value to the list of symlinks to be created along with the device node\. Multiple symlinks may be specified by separating the names by the space character\. + .RE + .PP + \fBOWNER, GROUP, MODE\fR + .RS 4 +-The permissions for the device node. Every specified value overwrites the compiled\-in default value. ++The permissions for the device node\. Every specified value overwrites the compiled\-in default value\. + .RE + .PP + \fBATTR{\fR\fB\fIkey\fR\fR\fB}\fR + .RS 4 +-The value that should be written to a sysfs attribute of the event device. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute. ++The value that should be written to a sysfs attribute of the event device\. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute\. + .RE + .PP + \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR + .RS 4 +-Export a variable to the environment. Depending on the type of operator, this key is also to match against an environment variable. ++Export a variable to the environment\. Depending on the type of operator, this key is also to match against an environment variable\. + .RE + .PP + \fBRUN\fR + .RS 4 +-Add a program to the list of programs to be executed for a specific device. This can only be used for very short running tasks. Running an event process for a long period of time may block all further events for this or a dependent device. Long running tasks need to be immediately detached from the event process itself. ++Add a program to the list of programs to be executed for a specific device\. This can only be used for very short running tasks\. Running an event process for a long period of time may block all further events for this or a dependent device\. Long running tasks need to be immediately detached from the event process itself\. + .RE + .PP + \fBLABEL\fR + .RS 4 +-Named label where a GOTO can jump to. ++Named label where a GOTO can jump to\. + .RE + .PP + \fBGOTO\fR +@@ -229,72 +229,68 @@ Jumps to the next LABEL with a matching name + .RS 4 + Import a set of variables into the event environment, depending on + \fItype\fR: +-.RS 4 + .PP + \fBprogram\fR + .RS 4 +-Execute an external program specified as the assigned value and import its output, which must be in environment key format. ++Execute an external program specified as the assigned value and import its output, which must be in environment key format\. + .RE + .PP + \fBfile\fR + .RS 4 +-Import a text file specified as the assigned value, which must be in environment key format. ++Import a text file specified as the assigned value, which must be in environment key format\. + .RE + .PP + \fBparent\fR + .RS 4 +-Import the stored keys from the parent device by reading the database entry of the parent device. The value assigned to ++Import the stored keys from the parent device by reading the database entry of the parent device\. The value assigned to + \fBIMPORT{parent}\fR +-is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons). +-.RE ++is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons)\. + .RE +-.IP "" 4 ++.sp + If no option is given, udev will choose between + \fBprogram\fR + and + \fBfile\fR +-based on the executable bit of the file permissions. ++based on the executable bit of the file permissions\. + .RE + .PP + \fBWAIT_FOR_SYSFS\fR + .RS 4 +-Wait for the specified sysfs file of the device to be created. Can be used to fight against kernel sysfs timing issues. ++Wait for the specified sysfs file of the device to be created\. Can be used to fight against kernel sysfs timing issues\. + .RE + .PP + \fBOPTIONS\fR + .RS 4 + Rule and device options: +-.RS 4 + .PP + \fBlast_rule\fR + .RS 4 +-Stops further rules application. No later rules will have any effect. ++Stops further rules application\. No later rules will have any effect\. + .RE + .PP + \fBignore_device\fR + .RS 4 +-Ignore this event completely. ++Ignore this event completely\. + .RE + .PP + \fBignore_remove\fR + .RS 4 +-Ignore any later remove event for this device. This may be useful as a workaround for broken device drivers. ++Ignore any later remove event for this device\. This may be useful as a workaround for broken device drivers\. + .RE + .PP + \fBlink_priority=\fR\fB\fIvalue\fR\fR + .RS 4 +-Specify the priority of the created symlinks. Devices with higher priorities overwrite existing symlinks of other devices. ++Specify the priority of the created symlinks\. Devices with higher priorities overwrite existing symlinks of other devices\. + .RE + .PP + \fBall_partitions\fR + .RS 4 +-Create the device nodes for all available partitions of a block device. This may be useful for removable media devices where media changes are not detected. ++Create the device nodes for all available partitions of a block device\. This may be useful for removable media devices where media changes are not detected\. + .RE + .PP + \fBstring_escape=\fR\fB\fInone|replace\fR\fR + .RS 4 +-Usually control and other possibly unsafe characters are replaced in strings used for device naming. The mode of replacement can be specified with this option. +-.RE ++Usually control and other possibly unsafe characters are replaced in strings used for device naming\. The mode of replacement can be specified with this option\. + .RE + .RE + .PP +@@ -306,23 +302,23 @@ The + \fBGROUP\fR + and + \fBRUN\fR +-fields support simple printf\-like string substitutions. The ++fields support simple printf\-like string substitutions\. The + \fBRUN\fR +-format chars gets applied after all rules have been processed, right before the program is executed. It allows the use of the complete environment set by earlier matching rules. For all other fields, substitutions are applied while the individual rule is being processed. The available substitutions are: ++format chars gets applied after all rules have been processed, right before the program is executed\. It allows the use of the complete environment set by earlier matching rules\. For all other fields, substitutions are applied while the individual rule is being processed\. The available substitutions are: + .PP + \fB$kernel\fR, \fB%k\fR + .RS 4 +-The kernel name for this device. ++The kernel name for this device\. + .RE + .PP + \fB$number\fR, \fB%n\fR + .RS 4 +-The kernel number for this device. For example, 'sda3' has kernel number of '3' ++The kernel number for this device\. For example, \'sda3\' has kernel number of \'3\' + .RE + .PP + \fB$devpath\fR, \fB%p\fR + .RS 4 +-The devpath of the device. ++The devpath of the device\. + .RE + .PP + \fB$id\fR, \fB%b\fR +@@ -332,7 +328,7 @@ The name of the device matched while searching the devpath upwards for + \fBKERNELS\fR, + \fBDRIVERS\fR + and +-\fBATTRS\fR. ++\fBATTRS\fR\. + .RE + .PP + \fB$driver\fR, \fB%d\fR +@@ -342,75 +338,75 @@ The driver name of the device matched while searching the devpath upwards for + \fBKERNELS\fR, + \fBDRIVERS\fR + and +-\fBATTRS\fR. ++\fBATTRS\fR\. + .RE + .PP + \fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR + .RS 4 +-The value of a sysfs attribute found at the device, where all keys of the rule have matched. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute. If the attribute is a symlink, the last element of the symlink target is returned as the value. ++The value of a sysfs attribute found at the device, where all keys of the rule have matched\. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute\. If the attribute is a symlink, the last element of the symlink target is returned as the value\. + .RE + .PP + \fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR + .RS 4 +-The value of an environment variable. ++The value of an environment variable\. + .RE + .PP + \fB$major\fR, \fB%M\fR + .RS 4 +-The kernel major number for the device. ++The kernel major number for the device\. + .RE + .PP + \fB$minor\fR, \fB%m\fR + .RS 4 +-The kernel minor number for the device. ++The kernel minor number for the device\. + .RE + .PP + \fB$result\fR, \fB%c\fR + .RS 4 +-The string returned by the external program requested with PROGRAM. A single part of the string, separated by a space character may be selected by specifying the part number as an attribute: +-\fB%c{N}\fR. If the number is followed by the '+' char this part plus all remaining parts of the result string are substituted: ++The string returned by the external program requested with PROGRAM\. A single part of the string, separated by a space character may be selected by specifying the part number as an attribute: ++\fB%c{N}\fR\. If the number is followed by the \'+\' char this part plus all remaining parts of the result string are substituted: + \fB%c{N+}\fR + .RE + .PP + \fB$parent\fR, \fB%P\fR + .RS 4 +-The node name of the parent device. ++The node name of the parent device\. + .RE + .PP + \fB$root\fR, \fB%r\fR + .RS 4 +-The udev_root value. ++The udev_root value\. + .RE + .PP + \fB$sys\fR, \fB%S\fR + .RS 4 +-The sysfs mount point. ++The sysfs mount point\. + .RE + .PP + \fB$tempnode\fR, \fB%N\fR + .RS 4 +-The name of a created temporary device node to provide access to the device from a external program before the real node is created. ++The name of a created temporary device node to provide access to the device from a external program before the real node is created\. + .RE + .PP + \fB%%\fR + .RS 4 +-The '%' character itself. ++The \'%\' character itself\. + .RE + .PP + \fB$$\fR + .RS 4 +-The '$' character itself. ++The \'$\' character itself\. + .RE + .PP +-The count of characters to be substituted may be limited by specifying the format length value. For example, '%3s{file}' will only insert the first three characters of the sysfs attribute ++The count of characters to be substituted may be limited by specifying the format length value\. For example, \'%3s{file}\' will only insert the first three characters of the sysfs attribute + .SH "AUTHOR" + .PP + Written by Greg Kroah\-Hartman +- ++ + and Kay Sievers +-. With much help from Dan Stekloff +- +-and many others. ++\. With much help from Dan Stekloff ++ ++and many others\. + .SH "SEE ALSO" + .PP + \fBudevd\fR(8), +diff --git a/udevd.8 b/udevd.8 +index 25996d1..46edde4 100644 +--- a/udevd.8 ++++ b/udevd.8 +@@ -1,6 +1,6 @@ + .\" Title: udevd + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: August 2005 + .\" Manual: udevd, udevcontrol + .\" Source: udev +@@ -11,7 +11,7 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevd \- event managing daemon ++udevd - event managing daemon + .SH "SYNOPSIS" + .HP 6 + \fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] +@@ -19,87 +19,87 @@ udevd \- event managing daemon + \fBudevcontrol \fR\fB\fIcommand\fR\fR + .SH "DESCRIPTION" + .PP +-udevd listens to kernel uevents and passes the incoming events to udev. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling. ++udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling\. + .SH "OPTIONS" + .PP + \fB\-\-daemon\fR + .RS 4 +-Detach and run in the background. ++Detach and run in the background\. + .RE + .PP + \fB\-\-debug\-trace\fR + .RS 4 +-Run all events completely serialized. This may be useful if udev triggers actions or loads kernel modules which cause problems and a slow but continuous operation is needed, where no events are processed in parallel. ++Run all events completely serialized\. This may be useful if udev triggers actions or loads kernel modules which cause problems and a slow but continuous operation is needed, where no events are processed in parallel\. + .RE + .PP + \fB\-\-verbose\fR + .RS 4 +-Print log messages to stdout. ++Print log messages to stdout\. + .RE + .PP + \fB\-\-version\fR + .RS 4 +-Print version number. ++Print version number\. + .RE + .PP + \fB\-\-help\fR + .RS 4 +-Print usage. ++Print usage\. + .RE + .PP + \fBlog_priority=\fR\fB\fIvalue\fR\fR + .RS 4 +-Set the internal log level of udevd. Valid values are the numerical syslog priorities or their textual representations: ++Set the internal log level of udevd\. Valid values are the numerical syslog priorities or their textual representations: + \fBerr\fR, + \fBinfo\fR + and +-\fBdebug\fR. ++\fBdebug\fR\. + .RE + .PP + \fBstop_exec_queue\fR + .RS 4 +-Signal udevd to stop executing new events. Incoming events will be queued. ++Signal udevd to stop executing new events\. Incoming events will be queued\. + .RE + .PP + \fBstart_exec_queue\fR + .RS 4 +-Signal udevd to enable the execution of events. ++Signal udevd to enable the execution of events\. + .RE + .PP + \fBreload_rules\fR + .RS 4 +-Signal udevd to reload the rules from the config. ++Signal udevd to reload the rules from the config\. + .RE + .PP + \fBenv \fR\fB\fIvar\fR\fR\fB=\fR\fB\fIvalue\fR\fR + .RS 4 +-Set global variable. ++Set global variable\. + .RE + .PP + \fBmax_childs\fR + .RS 4 +-Set the maximum number of events, udevd will handle at the same time. ++Set the maximum number of events, udevd will handle at the same time\. + .RE + .PP + \fBmax_childs_running\fR + .RS 4 +-Set the maximum number of events, which are allowed to run at the same time. ++Set the maximum number of events, which are allowed to run at the same time\. + .RE + .PP + \fBhelp\fR + .RS 4 +-Print help text. ++Print help text\. + .RE + .SH "ENVIRONMENT" + .PP + \fBUDEV_LOG\fR + .RS 4 +-Overrides the syslog priority specified in the config file. ++Overrides the syslog priority specified in the config file\. + .RE + .SH "AUTHOR" + .PP + Written by Kay Sievers +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udevinfo.8 b/udevinfo.8 +index 337f206..6115f29 100644 +--- a/udevinfo.8 ++++ b/udevinfo.8 +@@ -1,6 +1,6 @@ + .\" Title: udevinfo + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: August 2005 + .\" Manual: udevinfo + .\" Source: udev +@@ -11,32 +11,32 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevinfo \- query udev device information ++udevinfo - query udev device information + .SH "SYNOPSIS" + .HP 9 + \fBudevinfo\fR [\fB\-\-query=\fR\fB\fIquery\-type\fR\fR] [\fB\-\-path=\fR\fB\fIdevpath\fR\fR] [\fB\-\-name=\fR\fB\fInode\fR\fR] [\fB\-\-root\fR] [\fB\-\-attribute\-walk\fR] [\fB\-\-export\-db\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] + .SH "DESCRIPTION" + .PP +-udevinfo queries the udev database for device information stored in the udev database. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device. ++udevinfo queries the udev database for device information stored in the udev database\. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device\. + .SH "OPTIONS" + .PP + \fB\-\-query=\fR\fB\fItype\fR\fR + .RS 4 +-Query the database for specified type of device data. It needs the ++Query the database for specified type of device data\. It needs the + \fB\-\-path\fR + or + \fB\-\-name\fR +-to identify the specified device. Valid queries are: ++to identify the specified device\. Valid queries are: + \fBname\fR, + \fBsymlink\fR, + \fBpath\fR, + \fBenv\fR, +-\fBall\fR. ++\fBall\fR\. + .RE + .PP + \fB\-\-path=\fR\fB\fIdevpath\fR\fR + .RS 4 +-The devpath of the device to query. ++The devpath of the device to query\. + .RE + .PP + \fB\-\-name=\fR\fB\fInode\fR\fR +@@ -47,36 +47,36 @@ The name of the device node or a symlink to query + \fB\-\-root\fR + .RS 4 + The udev root directory: +-\fI/dev\fR. If used in conjunction with a ++\fI/dev\fR\. If used in conjunction with a + \fBname\fR + or + \fBsymlink\fR +-query, the query returns the absolute path including the root directory. ++query, the query returns the absolute path including the root directory\. + .RE + .PP + \fB\-\-attribute\-walk\fR + .RS 4 +-Print all sysfs properties of the specified device that can be used in udev rules to match the specified device. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules. ++Print all sysfs properties of the specified device that can be used in udev rules to match the specified device\. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules\. + .RE + .PP + \fB\-\-export\-db\fR + .RS 4 +-Export the content of the udev database. ++Export the content of the udev database\. + .RE + .PP + \fB\-\-version\fR + .RS 4 +-Print version. ++Print version\. + .RE + .PP + \fB\-\-help\fR + .RS 4 +-Print help text. ++Print help text\. + .RE + .SH "AUTHOR" + .PP + Written by Kay Sievers +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udevmonitor.8 b/udevmonitor.8 +index 0adb998..5b624a7 100644 +--- a/udevmonitor.8 ++++ b/udevmonitor.8 +@@ -1,6 +1,6 @@ + .\" Title: udevmonitor + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: August 2005 + .\" Manual: udevmonitor + .\" Source: udev +@@ -11,38 +11,38 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevmonitor \- print the kernel and udev event sequence to the console ++udevmonitor - print the kernel and udev event sequence to the console + .SH "SYNOPSIS" + .HP 12 + \fBudevmonitor\fR [\fB\-\-environment\fR] [\fB\-\-kernel\fR] [\fB\-\-udev\fR] [\fB\-\-help\fR] + .SH "DESCRIPTION" + .PP +-udevmonitor listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event. ++udevmonitor listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\. + .SH "OPTIONS" + .PP + \fB\-\-environment\fR + .RS 4 +-Print the complete environment for all events. Can be used to compare the kernel supplied and the udev added environment values. ++Print the complete environment for all events\. Can be used to compare the kernel supplied and the udev added environment values\. + .RE + .PP + \fB\-\-kernel\fR + .RS 4 +-Print the kernel uevents. ++Print the kernel uevents\. + .RE + .PP + \fB\-\-udev\fR + .RS 4 +-Print the udev event after the rule processing. ++Print the udev event after the rule processing\. + .RE + .PP + \fB\-\-help\fR + .RS 4 +-Print usage. ++Print usage\. + .RE + .SH "AUTHOR" + .PP + Written by Kay Sievers +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udevsettle.8 b/udevsettle.8 +index 818a7ff..39054d9 100644 +--- a/udevsettle.8 ++++ b/udevsettle.8 +@@ -1,6 +1,6 @@ + .\" Title: udevsettle + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: March 2006 + .\" Manual: udevsettle + .\" Source: udev +@@ -11,29 +11,29 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevsettle \- wait until queued kernel/udev events are handled ++udevsettle - wait until queued kernel/udev events are handled + .SH "SYNOPSIS" + .HP 11 + \fBudevsettle\fR [\fB\-\-timeout=\fR\fB\fIseconds\fR\fR] + .SH "DESCRIPTION" + .PP +-Waits watching the udev event queue and exits if all current events are handled. ++Waits watching the udev event queue and exits if all current events are handled\. + .SH "OPTIONS" + .PP + \fB\-\-timeout=\fR\fB\fIseconds\fR\fR + .RS 4 +-maximum seconds to wait for the queue to become empty. ++maximum seconds to wait for the queue to become empty\. + .RE + .SH "ENVIRONMENT" + .PP + \fBUDEV_LOG\fR + .RS 4 +-Overrides the syslog priority specified in the config file. ++Overrides the syslog priority specified in the config file\. + .RE + .SH "AUTHOR" + .PP + Written by Kay Sievers +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udevstart.8 b/udevstart.8 +index ac7d070..6b463cf 100644 +--- a/udevstart.8 ++++ b/udevstart.8 +@@ -1,6 +1,6 @@ + .\" Title: udevstart + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: August 2005 + .\" Manual: udevstart + .\" Source: udev +@@ -11,17 +11,17 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevstart \- populate initial device directory ++udevstart - populate initial device directory + .SH "SYNOPSIS" + .HP 10 + \fBudevstart\fR + .SH "DESCRIPTION" + .PP +-udevstart scans the kernel exported device information available in sysfs for devices which require a device node to operate and creates the node using the specified udev rules. udevstart is used to create the initial device directory after system bootup. ++udevstart scans the kernel exported device information available in sysfs for devices which require a device node to operate and creates the node using the specified udev rules\. udevstart is used to create the initial device directory after system bootup\. + .SH "AUTHOR" + .PP + Written by Harald Hoyer +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udevtest.8 b/udevtest.8 +index 9ab9249..a090465 100644 +--- a/udevtest.8 ++++ b/udevtest.8 +@@ -1,6 +1,6 @@ + .\" Title: udevtest + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: August 2005 + .\" Manual: udevtest + .\" Source: udev +@@ -11,17 +11,17 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevtest \- simulate a udev run and print the action to the console ++udevtest - simulate a udev run and print the action to the console + .SH "SYNOPSIS" + .HP 21 + \fBudevtest \fR\fB\fIdevice\-path\fR\fR + .SH "DESCRIPTION" + .PP +-udevtest simulates a udev run for the given device and prints out the name of the node udev would have created, or the name of the network interface, that would have been renamed. ++udevtest simulates a udev run for the given device and prints out the name of the node udev would have created, or the name of the network interface, that would have been renamed\. + .SH "AUTHOR" + .PP + Written by Greg Kroah\-Hartman +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +diff --git a/udevtrigger.8 b/udevtrigger.8 +index 5ef9e8f..06c7e45 100644 +--- a/udevtrigger.8 ++++ b/udevtrigger.8 +@@ -1,6 +1,6 @@ + .\" Title: udevtrigger + .\" Author: +-.\" Generator: DocBook XSL Stylesheets v1.72.0 ++.\" Generator: DocBook XSL Stylesheets v1.73.1 + .\" Date: March 2006 + .\" Manual: udevtrigger + .\" Source: udev +@@ -11,66 +11,66 @@ + .\" disable justification (adjust text to left margin only) + .ad l + .SH "NAME" +-udevtrigger \- request kernel devices events for coldplug ++udevtrigger - request kernel devices events for coldplug + .SH "SYNOPSIS" + .HP 12 + \fBudevtrigger\fR [\fB\-\-verbose\fR] [\fB\-\-dry\-run\fR] [\fB\-\-retry\-failed\fR] [\fB\-\-help\fR] [\fB\-\-action=\fR\fB\fIaction\fR\fR] [\fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR] [\fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR] [\fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR] [\fB\-\-attr\-nomatch=\fR\fB\fIattribute=value\fR\fR] + .SH "DESCRIPTION" + .PP +-Trigger kernel device uevents to replay missing events at system coldplug. ++Trigger kernel device uevents to replay missing events at system coldplug\. + .SH "OPTIONS" + .PP + \fB\-\-verbose\fR + .RS 4 +-Print the list of devices which will be triggered. ++Print the list of devices which will be triggered\. + .RE + .PP + \fB\-\-dry\-run\fR + .RS 4 +-Do not actually trigger the event. ++Do not actually trigger the event\. + .RE + .PP + \fB\-\-retry\-failed\fR + .RS 4 +-Trigger only the events which are failed during a previous run. ++Trigger only the events which are failed during a previous run\. + .RE + .PP + \fB\-\-action=\fR\fB\fIaction\fR\fR + .RS 4 +-Type of event to be triggered. The default value is "add". ++Type of event to be triggered\. The default value is "add"\. + .RE + .PP + \fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR + .RS 4 +-Trigger events for devices which belong to a matching subsystem. This option can be specified multiple times and supports shell style pattern matching. ++Trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\. + .RE + .PP + \fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR + .RS 4 +-Do not trigger events for devices which belong to a matching subsystem. This option can be specified multiple times and supports shell style pattern matching. ++Do not trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\. + .RE + .PP + \fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR + .RS 4 +-Trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. This option can be specified multiple times. ++Trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\. + .RE + .PP + \fB\-\-attr\-nomatch\fR\fB\fIattribute=value\fR\fR + .RS 4 +-Do not trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. This option can be specified multiple times. ++Do not trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\. + .RE + .SH "ENVIRONMENT" + .PP + \fBUDEV_LOG\fR + .RS 4 +-Overrides the syslog priority specified in the config file. ++Overrides the syslog priority specified in the config file\. + .RE + .SH "AUTHOR" + .PP + Written by Kay Sievers +- ++ + and Hannes Reinecke +-. ++\. + .SH "SEE ALSO" + .PP + \fBudev\fR(7) +-- +1.5.2.4 + diff --git a/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch b/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch new file mode 100644 index 0000000..f3428a5 --- /dev/null +++ b/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch @@ -0,0 +1,35 @@ +From 7b6fd01651ce89e4985f9afc344b7d49c4e5fcd7 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 29 Aug 2007 06:06:00 +0200 +Subject: [PATCH] volume_id: fix linux_raid metadata version 1.0 detection + +Fixes: + https://bugs.launchpad.net/ubuntu/+source/udev/+bug/133773 +--- + extras/volume_id/lib/linux_raid.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 6d1d19c..ff2c47c 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -142,13 +142,15 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6 + + int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size) + { +- uint64_t sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES; ++ uint64_t sboff; + + /* version 0 at the end of the device */ ++ sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES; + if (volume_id_probe_linux_raid0(id, off + sboff, size) == 0) + return 0; + + /* version 1.0 at the end of the device */ ++ sboff = (size & ~(0x1000 - 1)) - 0x2000; + if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0) + return 0; + +-- +1.5.2.4 + diff --git a/0010-rules-Gentoo-update.patch b/0010-rules-Gentoo-update.patch new file mode 100644 index 0000000..1525307 --- /dev/null +++ b/0010-rules-Gentoo-update.patch @@ -0,0 +1,150 @@ +From 739b614721580b95aebdfd295eebb0a6246803ad Mon Sep 17 00:00:00 2001 +From: Matthias Schwarzott +Date: Wed, 29 Aug 2007 13:19:16 +0200 +Subject: [PATCH] rules: Gentoo update + +--- + etc/udev/gentoo/05-udev-early.rules | 8 ----- + etc/udev/gentoo/30-kernel-compat.rules | 47 ++++++++++++++++++++++++++++++++ + etc/udev/gentoo/50-udev.rules | 4 --- + etc/udev/gentoo/80-drivers.rules | 44 ----------------------------- + 4 files changed, 47 insertions(+), 56 deletions(-) + delete mode 100644 etc/udev/gentoo/05-udev-early.rules + create mode 100644 etc/udev/gentoo/30-kernel-compat.rules + delete mode 100644 etc/udev/gentoo/80-drivers.rules + +diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules +deleted file mode 100644 +index fc15e2b..0000000 +--- a/etc/udev/gentoo/05-udev-early.rules ++++ /dev/null +@@ -1,8 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-# sysfs is populated after the event is sent +-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/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules +new file mode 100644 +index 0000000..7bc55c6 +--- /dev/null ++++ b/etc/udev/gentoo/30-kernel-compat.rules +@@ -0,0 +1,47 @@ ++# do not edit this file, it will be overwritten on update ++ ++ACTION!="add", GOTO="kernel_compat_end" ++ ++# workarounds needed to synchronize with sysfs ++DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" ++ ++# needed for kernels <2.6.16 ++SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" ++ ++# needed for kernels <2.6.17 ++SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" ++ ++ ++ ++# 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" ++ ++ ++ ++# 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 ++SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}="" ++ ++# No need for more code, as MODALIAS is present ++ENV{MODALIAS}=="?*", GOTO="kernel_compat_end" ++ ++# needed for kernels <2.6.22 ++SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" ++ ++ # 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 ++ ++ 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}=="1", ATTRS{vendor}=="On[sS]tream", \ ++ ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end" ++ ATTRS{type}=="1", RUN+="modprobe.sh st" ++ ++LABEL="kernel_compat_end" ++ ++ +diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules +index 9e06029..7c2ac81 100644 +--- a/etc/udev/gentoo/50-udev.rules ++++ b/etc/udev/gentoo/50-udev.rules +@@ -237,10 +237,6 @@ KERNEL=="umad*", NAME="infiniband/%k" + 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" + +diff --git a/etc/udev/gentoo/80-drivers.rules b/etc/udev/gentoo/80-drivers.rules +deleted file mode 100644 +index df6c880..0000000 +--- a/etc/udev/gentoo/80-drivers.rules ++++ /dev/null +@@ -1,44 +0,0 @@ +-# 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="drivers_end" +- +-# this driver is broken and should not be loaded automatically +-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}" +- +-# /etc/modprobe.conf. +-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" +-# needed aliases are defined in /etc/modprobe.d/pnp-aliases +- +- +-SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" +-SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" +-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" +-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" +-SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" +- +-# Load driver for scsi-device +-SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" +- +- # 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 +- +- ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" +- 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}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" +- ATTRS{type}=="1", RUN+="modprobe.sh st" +-LABEL="hotplug_scsi_end" +- +-LABEL="drivers_end" +- +-- +1.5.2.4 + diff --git a/0011-add-name-substitution.patch b/0011-add-name-substitution.patch new file mode 100644 index 0000000..b0b2818 --- /dev/null +++ b/0011-add-name-substitution.patch @@ -0,0 +1,112 @@ +From 1113044be205f9d78642744ffaa01329a77bee79 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 29 Aug 2007 14:04:55 +0200 +Subject: [PATCH] add $name substitution + +--- + udev.7 | 7 ++++++- + udev.xml | 10 +++++++++- + udev_rules.c | 6 ++++++ + udevd.c | 2 +- + 4 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/udev.7 b/udev.7 +index 5f0ebb9..0ea5549 100644 +--- a/udev.7 ++++ b/udev.7 +@@ -331,7 +331,7 @@ and + \fBATTRS\fR\. + .RE + .PP +-\fB$driver\fR, \fB%d\fR ++\fB$driver\fR + .RS 4 + The driver name of the device matched while searching the devpath upwards for + \fBSUBSYSTEMS\fR, +@@ -373,6 +373,11 @@ The string returned by the external program requested with PROGRAM\. A single pa + The node name of the parent device\. + .RE + .PP ++\fB$name\fR ++.RS 4 ++The name of the device node\. The value is only set if an earlier rule assigned a value, or during a remove events\. ++.RE ++.PP + \fB$root\fR, \fB%r\fR + .RS 4 + The udev_root value\. +diff --git a/udev.xml b/udev.xml +index b43abb7..9fb6152 100644 +--- a/udev.xml ++++ b/udev.xml +@@ -488,7 +488,7 @@ + + + +- , ++ + + The driver name of the device matched while searching the devpath upwards for + , , and . +@@ -548,6 +548,14 @@ + + + ++ ++ ++ The name of the device node. The value is only set if an earlier ++ rule assigned a value, or during a remove events. ++ ++ ++ ++ + , + + The udev_root value. +diff --git a/udev_rules.c b/udev_rules.c +index 35db958..01fb211 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -606,6 +606,7 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + SUBST_ATTR, + SUBST_PARENT, + SUBST_TEMP_NODE, ++ SUBST_NAME, + SUBST_ROOT, + SUBST_SYS, + SUBST_ENV, +@@ -627,6 +628,7 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + { .name = "sysfs", .fmt = 's', .type = SUBST_ATTR }, + { .name = "parent", .fmt = 'P', .type = SUBST_PARENT }, + { .name = "tempnode", .fmt = 'N', .type = SUBST_TEMP_NODE }, ++ { .name = "name", .fmt = 'D', .type = SUBST_NAME }, + { .name = "root", .fmt = 'r', .type = SUBST_ROOT }, + { .name = "sys", .fmt = 'S', .type = SUBST_SYS }, + { .name = "env", .fmt = 'E', .type = SUBST_ENV }, +@@ -845,6 +847,10 @@ found: + strlcat(string, udev->tmp_node, maxsize); + dbg("substitute temporary device node name '%s'", udev->tmp_node); + break; ++ case SUBST_NAME: ++ strlcat(string, udev->name, maxsize); ++ dbg("substitute udev->name '%s'", udev->name); ++ break; + case SUBST_ROOT: + strlcat(string, udev_root, maxsize); + dbg("substitute udev_root '%s'", udev_root); +diff --git a/udevd.c b/udevd.c +index 3c46617..5ff5d3f 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -508,7 +508,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + } + } + +- /* check runing-queue for still running events */ ++ /* check run queue for still running events */ + list_for_each_entry(loop_msg, &running_list, node) { + if (limit && childs_count++ > limit) { + dbg("%llu, maximum number (%i) of childs reached", msg->seqnum, childs_count); +-- +1.5.2.4 + diff --git a/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch b/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch new file mode 100644 index 0000000..9a7b550 --- /dev/null +++ b/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch @@ -0,0 +1,102 @@ +From a75689bad504e35e346b84960b2b604532b1d6b5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 29 Aug 2007 14:11:37 +0200 +Subject: [PATCH] do not delete the device node with ignore_remove, but handle the event + +--- + udev.7 | 2 +- + udev.xml | 4 ++-- + udev_device.c | 8 ++++---- + udev_rules.c | 15 ++++++++++++--- + 4 files changed, 19 insertions(+), 10 deletions(-) + +diff --git a/udev.7 b/udev.7 +index 0ea5549..874c9ab 100644 +--- a/udev.7 ++++ b/udev.7 +@@ -275,7 +275,7 @@ Ignore this event completely\. + .PP + \fBignore_remove\fR + .RS 4 +-Ignore any later remove event for this device\. This may be useful as a workaround for broken device drivers\. ++Do not remove the device node when the device goes away\. This may be useful as a workaround for broken device drivers\. + .RE + .PP + \fBlink_priority=\fR\fB\fIvalue\fR\fR +diff --git a/udev.xml b/udev.xml +index 9fb6152..83a9d75 100644 +--- a/udev.xml ++++ b/udev.xml +@@ -416,8 +416,8 @@ + + + +- Ignore any later remove event for this device. This may be useful +- as a workaround for broken device drivers. ++ Do not remove the device node when the device goes away. This may be ++ useful as a workaround for broken device drivers. + + + +diff --git a/udev_device.c b/udev_device.c +index 2b7ffe0..62217ff 100644 +--- a/udev_device.c ++++ b/udev_device.c +@@ -266,10 +266,6 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + /* import database entry, and delete it */ + if (udev_db_get_device(udev, udev->dev->devpath) == 0) { + udev_db_delete_device(udev); +- if (udev->ignore_remove) { +- info("ignore_remove for '%s'", udev->name); +- goto exit; +- } + /* restore stored persistent data */ + list_for_each_entry(name_loop, &udev->env_list, node) + putenv(name_loop->name); +@@ -285,6 +281,10 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + goto exit; + } + ++ if (udev->ignore_remove) { ++ info("ignore_remove for '%s'", udev->name); ++ goto exit; ++ } + /* remove the node */ + retval = udev_node_remove(udev); + +diff --git a/udev_rules.c b/udev_rules.c +index 01fb211..364d1b7 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -1472,9 +1472,14 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + break; + + dbg("process rule"); +- if (rule->name.operation != KEY_OP_UNSET || rule->symlink.operation != KEY_OP_UNSET || +- rule->mode_operation != KEY_OP_UNSET || rule->owner.operation != KEY_OP_UNSET || +- rule->group.operation != KEY_OP_UNSET) { ++ if (rule->name.operation == KEY_OP_ASSIGN || ++ rule->name.operation == KEY_OP_ASSIGN_FINAL || ++ rule->name.operation == KEY_OP_ADD || ++ rule->symlink.operation == KEY_OP_ASSIGN || ++ rule->symlink.operation == KEY_OP_ASSIGN_FINAL || ++ rule->symlink.operation == KEY_OP_ADD || ++ rule->mode_operation != KEY_OP_UNSET || ++ rule->owner.operation != KEY_OP_UNSET || rule->group.operation != KEY_OP_UNSET) { + dbg("skip rule that names a device"); + continue; + } +@@ -1485,6 +1490,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + udev->ignore_device = 1; + return 0; + } ++ if (rule->ignore_remove) { ++ udev->ignore_remove = 1; ++ dbg("remove event should be ignored"); ++ } + + if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { + struct name_entry *entry; +-- +1.5.2.4 + diff --git a/0013-print-warning-for-invalid-TEST-operations.patch b/0013-print-warning-for-invalid-TEST-operations.patch new file mode 100644 index 0000000..e53425d --- /dev/null +++ b/0013-print-warning-for-invalid-TEST-operations.patch @@ -0,0 +1,43 @@ +From a506e6298cffed4576f9cea8df15b2f8945fc731 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 29 Aug 2007 22:19:28 +0200 +Subject: [PATCH] print warning for invalid TEST operations + +--- + udev_rules.c | 3 ++- + udev_rules_parse.c | 5 +++++ + 2 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/udev_rules.c b/udev_rules.c +index 364d1b7..ef352ca 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -994,7 +994,8 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + } + } + +- if (rule->test.operation != KEY_OP_UNSET) { ++ if (rule->test.operation == KEY_OP_MATCH || ++ rule->test.operation == KEY_OP_NOMATCH) { + char filename[PATH_SIZE]; + char devpath[PATH_SIZE]; + char *attr; +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index 3afc31a..9e43581 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -469,6 +469,11 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + } + + if (strncasecmp(key, "TEST", sizeof("TEST")-1) == 0) { ++ if (operation != KEY_OP_MATCH && ++ operation != KEY_OP_NOMATCH) { ++ err("invalid TEST operation"); ++ goto invalid; ++ } + attr = get_key_attribute(key + sizeof("TEST")-1); + if (attr != NULL) + rule->test_mode_mask = strtol(attr, NULL, 8); +-- +1.5.2.4 + diff --git a/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch b/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch new file mode 100644 index 0000000..b5ef73a --- /dev/null +++ b/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch @@ -0,0 +1,23 @@ +From b5bc27029a82ff37c36f6e9d06f23c3005fe3382 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 30 Aug 2007 14:14:54 +0200 +Subject: [PATCH] rules: do not delete /lib/udev/devices/ nodes on "remove" + +--- + etc/udev/rules.d/50-udev-default.rules | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index f869f51..76f0976 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -101,3 +101,6 @@ KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" + KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" + KERNEL=="iowarrior[0-9]*", NAME="usb/%k" + ++# do not delete static device nodes ++ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" ++ +-- +1.5.2.4 + diff --git a/0015-rules-remove-broken-nvram-group-assignment-without.patch b/0015-rules-remove-broken-nvram-group-assignment-without.patch new file mode 100644 index 0000000..9fedcc6 --- /dev/null +++ b/0015-rules-remove-broken-nvram-group-assignment-without.patch @@ -0,0 +1,24 @@ +From 9d1f93803f166149b3c467a465a126b2fb31e93c Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 30 Aug 2007 14:25:17 +0200 +Subject: [PATCH] rules: remove broken nvram group assignment without any permission + +--- + etc/udev/rules.d/50-udev-default.rules | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index 76f0976..633e2e7 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -20,7 +20,6 @@ KERNEL=="lirc0", SYMLINK+="lirc" + KERNEL=="null|zero|full|random|urandom", MODE="0666" + KERNEL=="null", SYMLINK+="XOR" + KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" +-KERNEL=="nvram", GROUP="kmem", MODE="0600" + KERNEL=="ram0", SYMLINK+="ramdisk" + KERNEL=="ram1", SYMLINK+="ram" + +-- +1.5.2.4 + diff --git a/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch b/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch new file mode 100644 index 0000000..b79e2a2 --- /dev/null +++ b/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch @@ -0,0 +1,40 @@ +From 89e0a02226cbadf6a58c4d234e31c7111eed20bc Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 30 Aug 2007 15:03:21 +0200 +Subject: [PATCH] add /dev/rtc symlink if new rtc drivers are used + +--- + etc/udev/rules.d/50-udev-default.rules | 3 ++- + udev_node.c | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index 633e2e7..854809a 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -88,7 +88,8 @@ KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" + + # miscellaneous + KERNEL=="fuse", MODE="0666" +-KERNEL=="rtc", MODE="0644" ++KERNEL=="rtc|rtc0", MODE="0644" ++KERNEL=="rtc0", SYMLINK+="rtc" + KERNEL=="auer[0-9]*" NAME="usb/%k" + KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" + KERNEL=="mmtimer", MODE="0644" +diff --git a/udev_node.c b/udev_node.c +index fcd52d0..25eed86 100644 +--- a/udev_node.c ++++ b/udev_node.c +@@ -133,7 +133,7 @@ static int node_symlink(const char *node, const char *slink) + stats.st_rdev == stats2.st_rdev) { + info("replace device node '%s' with symlink to our node '%s'", slink, node); + } else { +- err("device node '%s' already exists, link '%s' will not overwrite it", node, slink); ++ err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node); + goto exit; + } + } +-- +1.5.2.4 + diff --git a/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch b/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch new file mode 100644 index 0000000..58dd940 --- /dev/null +++ b/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch @@ -0,0 +1,27 @@ +From 39ea7c6c67de69379b603196a0eff6f7ce2e469a Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 31 Aug 2007 11:01:35 +0200 +Subject: [PATCH] increase WAIT_FOR_SYSFS timeout to 10 seconds + +We see SCSI disks where it takes 6.5 seconds to populate the +sysfs attributes. +--- + udev_rules.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev_rules.c b/udev_rules.c +index ef352ca..dcd0914 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -1040,7 +1040,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) { + int found; + +- found = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 3) == 0); ++ found = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 10) == 0); + if (!found && (rule->wait_for_sysfs.operation != KEY_OP_NOMATCH)) + goto nomatch; + } +-- +1.5.2.4 + diff --git a/0018-correct-includes-in-udev_selinux.c.patch b/0018-correct-includes-in-udev_selinux.c.patch new file mode 100644 index 0000000..54424f9 --- /dev/null +++ b/0018-correct-includes-in-udev_selinux.c.patch @@ -0,0 +1,26 @@ +From 07acdb0f7413eeb261bdb52eba6abe75371cc202 Mon Sep 17 00:00:00 2001 +From: maximilian attems +Date: Thu, 6 Sep 2007 13:12:48 +0200 +Subject: [PATCH] correct includes in udev_selinux.c + +--- + udev_selinux.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev_selinux.c b/udev_selinux.c +index 1ad6e8a..3fa84a0 100644 +--- a/udev_selinux.c ++++ b/udev_selinux.c +@@ -24,8 +24,8 @@ + #include + #include + #include +-#include + #include ++#include + #include + + #include "udev.h" +-- +1.5.2.4 + diff --git a/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch b/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch new file mode 100644 index 0000000..0c2121d --- /dev/null +++ b/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch @@ -0,0 +1,24 @@ +From 8aab4ce40b821d7b759b98bb97afcd3e0b7c80d8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 7 Sep 2007 04:01:21 +0200 +Subject: [PATCH] rules: put bsd nodes in /dev/bsd/ directory + +--- + etc/udev/rules.d/50-udev-default.rules | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index 854809a..bdce004 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -77,6 +77,7 @@ SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" + KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" + KERNEL=="pktcdvd", NAME="pktcdvd/control" + KERNEL=="qft0", SYMLINK+="ftape" ++SUBSYSTEM=="bsg" NAME="bsg/%k" + + # network + KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" +-- +1.5.2.4 + diff --git a/0020-path_id-fix-for-stacked-class-devices.patch b/0020-path_id-fix-for-stacked-class-devices.patch new file mode 100644 index 0000000..8c383e9 --- /dev/null +++ b/0020-path_id-fix-for-stacked-class-devices.patch @@ -0,0 +1,29 @@ +From b1ac36ff5e3756cefc79967a26280056da31bf6f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 10 Sep 2007 00:59:07 +0200 +Subject: [PATCH] path_id: fix for stacked class devices + +--- + extras/path_id/path_id | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/extras/path_id/path_id b/extras/path_id/path_id +index 57879b5..a3a627e 100755 +--- a/extras/path_id/path_id ++++ b/extras/path_id/path_id +@@ -456,7 +456,11 @@ handle_device () { + return + fi + fi +- cd $full_sysfs_path/device ++ if [ -L $full_sysfs_path/device/device ]; then ++ cd $full_sysfs_path/device/device ++ else ++ cd $full_sysfs_path/device ++ fi + ;; + esac + full_sysfs_device_path="`pwd -P`" +-- +1.5.2.4 + diff --git a/0021-check-line-length-after-comment-check-and-whitespace.patch b/0021-check-line-length-after-comment-check-and-whitespace.patch new file mode 100644 index 0000000..52e4000 --- /dev/null +++ b/0021-check-line-length-after-comment-check-and-whitespace.patch @@ -0,0 +1,69 @@ +From 16511863d928e7fd82f15ae64850ab21e74f0f16 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 11 Sep 2007 17:17:29 +0200 +Subject: [PATCH] check line length after comment check and whitespace strip + +--- + udev_config.c | 10 +++++----- + udev_rules.c | 10 +++++----- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/udev_config.c b/udev_config.c +index 3f226b9..2f2a69e 100644 +--- a/udev_config.c ++++ b/udev_config.c +@@ -111,11 +111,6 @@ static int parse_config_file(void) + cur += count+1; + lineno++; + +- if (count >= sizeof(line)) { +- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); +- continue; +- } +- + /* eat the whitespace */ + while ((count > 0) && isspace(bufline[0])) { + bufline++; +@@ -128,6 +123,11 @@ static int parse_config_file(void) + if (bufline[0] == COMMENT_CHARACTER) + continue; + ++ if (count >= sizeof(line)) { ++ err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); ++ continue; ++ } ++ + memcpy(line, bufline, count); + line[count] = '\0'; + +diff --git a/udev_rules.c b/udev_rules.c +index dcd0914..3ec8477 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -349,11 +349,6 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu + cur += count+1; + lineno++; + +- if (count >= sizeof(line)) { +- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); +- continue; +- } +- + /* eat the whitespace */ + while ((count > 0) && isspace(bufline[0])) { + bufline++; +@@ -366,6 +361,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu + if (bufline[0] == COMMENT_CHARACTER) + continue; + ++ if (count >= sizeof(line)) { ++ err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); ++ continue; ++ } ++ + memcpy(line, bufline, count); + line[count] = '\0'; + +-- +1.5.2.4 + diff --git a/0022-only-install-.rules.patch b/0022-only-install-.rules.patch new file mode 100644 index 0000000..04a0d13 --- /dev/null +++ b/0022-only-install-.rules.patch @@ -0,0 +1,29 @@ +From 554074c9ca2f1b8876176887e4656d06b870f2cd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 11 Sep 2007 17:20:54 +0200 +Subject: [PATCH] only install *.rules + +--- + Makefile | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 39ffc7d..92ca846 100644 +--- a/Makefile ++++ b/Makefile +@@ -230,9 +230,9 @@ install-config: + @ if [ ! -r $(DESTDIR)$(configdir)/udev.conf ]; then \ + $(INSTALL_DATA) etc/udev/udev.conf $(DESTDIR)$(configdir); \ + fi +- @ for i in $(shell ls -1 etc/udev/rules.d); do \ +- if [ ! -r $(DESTDIR)$(configdir)/rules.d/$$i ]; then \ +- $(INSTALL_DATA) etc/udev/rules.d/$$i $(DESTDIR)$(configdir)/rules.d; \ ++ @ for i in etc/udev/rules.d/*.rules; do \ ++ if [ ! -r $(DESTDIR)$(configdir)/rules.d/$$(basename $$i) ]; then \ ++ $(INSTALL_DATA) $$i $(DESTDIR)$(configdir)/rules.d; \ + fi \ + done + @ extras="$(EXTRAS)"; for target in $$extras; do \ +-- +1.5.2.4 + diff --git a/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch b/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch new file mode 100644 index 0000000..4ba4f4f --- /dev/null +++ b/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch @@ -0,0 +1,48 @@ +From 25c208d659cf0f8bc887a1f7c62e9d2e0c546aec Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 12 Sep 2007 00:21:53 +0200 +Subject: [PATCH] ignore device node names while restoring symlinks from the stack + +--- + udev_node.c | 18 +++++++++++------- + 1 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/udev_node.c b/udev_node.c +index 25eed86..556a442 100644 +--- a/udev_node.c ++++ b/udev_node.c +@@ -230,11 +230,15 @@ static int update_link(struct udevice *udev, const char *name) + if (udev_db == NULL) + continue; + if (udev_db_get_device(udev_db, device->name) == 0) { +- info("compare priority of '%s' %i > %i", +- udev_db->dev->devpath, udev_db->link_priority, priority); +- if (target[0] == '\0' || udev_db->link_priority > priority) { +- priority = udev_db->link_priority; +- strlcpy(target, udev_db->name, sizeof(target)); ++ if (strcmp(udev_db->name, name) == 0) { ++ info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name); ++ } else { ++ info("compare priority of '%s' %i > %i", ++ udev_db->dev->devpath, udev_db->link_priority, priority); ++ if (target[0] == '\0' || udev_db->link_priority > priority) { ++ priority = udev_db->link_priority; ++ strlcpy(target, udev_db->name, sizeof(target)); ++ } + } + } + udev_device_cleanup(udev_db); +@@ -242,8 +246,8 @@ static int update_link(struct udevice *udev, const char *name) + name_list_cleanup(&name_list); + + if (target[0] == '\0') { +- err("missing target for '%s'", name); +- rc = -1; ++ info("no current target for '%s' found", name); ++ rc = 1; + goto out; + } + +-- +1.5.2.4 + diff --git a/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch b/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch new file mode 100644 index 0000000..eb82686 --- /dev/null +++ b/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch @@ -0,0 +1,103 @@ +From ce39874580829dc97f77b78114874b5086056e5c Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 20 Sep 2007 00:41:54 +0200 +Subject: [PATCH] use SEQNUM in /dev/.udev/queue/ instead of devpath + +--- + udevd.c | 45 ++++++++++++++------------------------------- + 1 files changed, 14 insertions(+), 31 deletions(-) + +diff --git a/udevd.c b/udevd.c +index 5ff5d3f..eb311df 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -154,22 +154,16 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + char filename[PATH_SIZE]; + char filename_failed[PATH_SIZE]; + size_t start; +- struct udevd_uevent_msg *loop_msg; +- int fd; + + /* location of queue file */ +- strlcpy(filename, udev_root, sizeof(filename)); +- strlcat(filename, "/", sizeof(filename)); +- start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename)); +- strlcat(filename, msg->devpath, sizeof(filename)); +- path_encode(&filename[start], sizeof(filename) - start); ++ snprintf(filename, sizeof(filename), "%s/"EVENT_QUEUE_DIR"/%llu", udev_root, msg->seqnum); + + /* location of failed file */ + strlcpy(filename_failed, udev_root, sizeof(filename_failed)); + strlcat(filename_failed, "/", sizeof(filename_failed)); + start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed)); + strlcat(filename_failed, msg->devpath, sizeof(filename_failed)); +- path_encode(&filename_failed[start], sizeof(filename) - start); ++ path_encode(&filename_failed[start], sizeof(filename_failed) - start); + + switch (state) { + case EVENT_QUEUED: +@@ -177,12 +171,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + delete_path(filename_failed); + + create_path(filename); +- fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); +- if (fd > 0) +- close(fd); +- return; ++ symlink(msg->devpath, filename); ++ break; + case EVENT_FINISHED: +- case EVENT_FAILED: + if (msg->devpath_old != NULL) { + /* "move" event - rename failed file to current name, do not delete failed */ + char filename_failed_old[PATH_SIZE]; +@@ -201,28 +192,20 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + delete_path(filename_failed); + } + +- /* skip if events for the same path are still pending */ +- list_for_each_entry(loop_msg, &running_list, node) +- if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) +- return; +- +- list_for_each_entry(loop_msg, &exec_list, node) +- if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) +- return; +- ++ unlink(filename); ++ delete_path(filename); ++ break; ++ case EVENT_FAILED: + /* move failed event to the failed directory */ +- if (state == EVENT_FAILED) { +- create_path(filename_failed); +- rename(filename, filename_failed); +- } else { +- unlink(filename); +- } ++ create_path(filename_failed); ++ rename(filename, filename_failed); + + /* clean up possibly empty queue directory */ + delete_path(filename); +- +- return; ++ break; + } ++ ++ return; + } + + static void msg_queue_delete(struct udevd_uevent_msg *msg) +@@ -297,7 +280,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) + } + + export_event_state(msg, EVENT_QUEUED); +- info("seq %llu forked, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); ++ info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); + + /* run one event after the other in debug mode */ + if (debug_trace) { +-- +1.5.2.4 + diff --git a/0025-rules-add-memstick-module-loading.patch b/0025-rules-add-memstick-module-loading.patch new file mode 100644 index 0000000..ed61a06 --- /dev/null +++ b/0025-rules-add-memstick-module-loading.patch @@ -0,0 +1,24 @@ +From 3a58ef80dfbc08fd8722af5408a26abe12fe053c Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 20 Sep 2007 00:46:44 +0200 +Subject: [PATCH] rules: add memstick module loading + +--- + etc/udev/rules.d/80-drivers.rules | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules +index 3388266..5340565 100644 +--- a/etc/udev/rules.d/80-drivers.rules ++++ b/etc/udev/rules.d/80-drivers.rules +@@ -6,6 +6,7 @@ DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODAL + SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \ + RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" + SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" ++SUBSYSTEM=="memstick", RUN+="/sbin/modprobe --all ms_block mspro_block" + SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" + SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" + SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" +-- +1.5.2.4 + diff --git a/0026-remove-extra-space-from-udevinfo-symlink-output.patch b/0026-remove-extra-space-from-udevinfo-symlink-output.patch new file mode 100644 index 0000000..8342baa --- /dev/null +++ b/0026-remove-extra-space-from-udevinfo-symlink-output.patch @@ -0,0 +1,35 @@ +From c952356635a30f610a4d1b84e84d678fee7772c8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Sep 2007 15:24:42 +0200 +Subject: [PATCH] remove extra space from udevinfo symlink output + +--- + udevinfo.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/udevinfo.c b/udevinfo.c +index be9aa76..8e54705 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -389,10 +389,16 @@ int main(int argc, char *argv[], char *envp[]) + goto exit; + if (root) + list_for_each_entry(name_loop, &udev->symlink_list, node) +- printf("%s/%s ", udev_root, name_loop->name); ++ if (name_loop->node.next != &udev->symlink_list) ++ printf("%s/%s ", udev_root, name_loop->name); ++ else ++ printf("%s/%s", udev_root, name_loop->name); + else + list_for_each_entry(name_loop, &udev->symlink_list, node) +- printf("%s ", name_loop->name); ++ if (name_loop->node.next != &udev->symlink_list) ++ printf("%s ", name_loop->name); ++ else ++ printf("%s", name_loop->name); + printf("\n"); + break; + case QUERY_PATH: +-- +1.5.2.4 + diff --git a/0027-udevinfo-simplify-symlink-printing-logic.patch b/0027-udevinfo-simplify-symlink-printing-logic.patch new file mode 100644 index 0000000..fb73777 --- /dev/null +++ b/0027-udevinfo-simplify-symlink-printing-logic.patch @@ -0,0 +1,46 @@ +From 18770246edda383eef523a7e3aedd08ebbbde5cf Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 20 Sep 2007 15:25:29 +0200 +Subject: [PATCH] udevinfo: simplify symlink printing logic + +--- + udevinfo.c | 23 ++++++++--------------- + 1 files changed, 8 insertions(+), 15 deletions(-) + +diff --git a/udevinfo.c b/udevinfo.c +index 8e54705..eb9b353 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -385,21 +385,14 @@ int main(int argc, char *argv[], char *envp[]) + printf("%s\n", udev->name); + break; + case QUERY_SYMLINK: +- if (list_empty(&udev->symlink_list)) +- goto exit; +- if (root) +- list_for_each_entry(name_loop, &udev->symlink_list, node) +- if (name_loop->node.next != &udev->symlink_list) +- printf("%s/%s ", udev_root, name_loop->name); +- else +- printf("%s/%s", udev_root, name_loop->name); +- else +- list_for_each_entry(name_loop, &udev->symlink_list, node) +- if (name_loop->node.next != &udev->symlink_list) +- printf("%s ", name_loop->name); +- else +- printf("%s", name_loop->name); +- printf("\n"); ++ list_for_each_entry(name_loop, &udev->symlink_list, node) { ++ char c = name_loop->node.next != &udev->symlink_list ? ' ' : '\n'; ++ ++ if (root) ++ printf("%s/%s%c", udev_root, name_loop->name, c); ++ else ++ printf("%s%c", name_loop->name, c); ++ } + break; + case QUERY_PATH: + printf("%s\n", udev->dev->devpath); +-- +1.5.2.4 + diff --git a/0028-prevent-wrong-symlink-creation-if-database-disagress.patch b/0028-prevent-wrong-symlink-creation-if-database-disagress.patch new file mode 100644 index 0000000..85d092c --- /dev/null +++ b/0028-prevent-wrong-symlink-creation-if-database-disagress.patch @@ -0,0 +1,35 @@ +From b2d1ae727e78ac3e22caa11798360d87775095ff Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 20 Sep 2007 19:38:58 +0200 +Subject: [PATCH] prevent wrong symlink creation if database disagress with current rules + +--- + udev_node.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/udev_node.c b/udev_node.c +index 556a442..c620e4a 100644 +--- a/udev_node.c ++++ b/udev_node.c +@@ -218,14 +218,16 @@ static int update_link(struct udevice *udev, const char *name) + if (strcmp(udev->dev->devpath, device->name) == 0) { + info("compare (our own) priority of '%s' %i >= %i", + udev->dev->devpath, udev->link_priority, priority); +- if (target[0] == '\0' || udev->link_priority >= priority) { ++ if (strcmp(udev->name, name) == 0) { ++ info("'%s' is our device node, database inconsistent, skip link update", udev->name); ++ } else if (target[0] == '\0' || udev->link_priority >= priority) { + priority = udev->link_priority; + strlcpy(target, udev->name, sizeof(target)); + } + continue; + } + +- /* or something else, then read priority from database */ ++ /* another device, read priority from database */ + udev_db = udev_device_init(NULL); + if (udev_db == NULL) + continue; +-- +1.5.2.4 + diff --git a/0029-fix-wrong-variable-used-in-logged-string.patch b/0029-fix-wrong-variable-used-in-logged-string.patch new file mode 100644 index 0000000..4f94a64 --- /dev/null +++ b/0029-fix-wrong-variable-used-in-logged-string.patch @@ -0,0 +1,25 @@ +From 3a3d078cfd3a3adb1c9f66e0df95d704c3a92504 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 21 Sep 2007 00:55:19 +0200 +Subject: [PATCH] fix wrong variable used in logged string + +--- + udev_rules.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev_rules.c b/udev_rules.c +index 3ec8477..5ae4aa2 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + } + + if (!name_set) { +- info("no node name set, will use kernel name '%s'", udev->name); ++ info("no node name set, will use kernel name '%s'", udev->dev->kernel); + strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); + } + +-- +1.5.2.4 + diff --git a/0030-update-README.patch b/0030-update-README.patch new file mode 100644 index 0000000..5f30892 --- /dev/null +++ b/0030-update-README.patch @@ -0,0 +1,43 @@ +From b317b96c15bc61d59f138515e71f05bbd8f7b2ff Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 21 Sep 2007 10:33:36 +0200 +Subject: [PATCH] update README + +--- + README | 13 +++++-------- + 1 files changed, 5 insertions(+), 8 deletions(-) + +diff --git a/README b/README +index 74aa790..b37d0d5 100644 +--- a/README ++++ b/README +@@ -3,13 +3,10 @@ udev - userspace device management + For more information see the files in the docs/ directory. + + Important Note: +- Integrating udev in the system is a whole lot of work, has complex dependencies +- and differs a lot from distro to distro. All major distros depend on udev these +- days and the system may not work without a proper installed version. The upstream +- udev project does not support or recommend to replace a distro's udev installation +- with the upstream version. The installation of a unmodified upstream version may +- render your system unusable. Until now, there is no "default" setup or a set of +- "default" rules provided by the upstream udev version. ++ Integrating udev in the system has complex dependencies and differs from distro ++ to distro. All major distros depend on udev these days and the system may not ++ work without a properly installed version. The upstream udev project does not ++ recommend to replace a distro's udev installation with the upstream version. + + Requirements: + - Version 2.6.15 of the Linux kernel for reliable operation of this release of +@@ -21,7 +18,7 @@ Requirements: + but it is completely silly - don't complain if anything goes wrong.) + + - The proc filesystem must be mounted on /proc, the sysfs filesystem must +- be mounted at /sys. No other location will be supported by udev. ++ be mounted at /sys. No other location is supported by udev. + + + Operation: +-- +1.5.2.4 + diff --git a/0031-rule_generator-move-all-policy-from-write_net_rules.patch b/0031-rule_generator-move-all-policy-from-write_net_rules.patch new file mode 100644 index 0000000..82cc2ac --- /dev/null +++ b/0031-rule_generator-move-all-policy-from-write_net_rules.patch @@ -0,0 +1,244 @@ +From c746922ca26fe18f6b3f3a4516e7236bfc0106b7 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 21 Sep 2007 17:42:46 +0200 +Subject: [PATCH] rule_generator: move all policy from write_net_rules to the rules file + +--- + .../75-persistent-net-generator.rules | 43 ++++++-- + extras/rule_generator/write_net_rules | 119 +++++++++----------- + 2 files changed, 84 insertions(+), 78 deletions(-) + +diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules +index f88627d..d09bc38 100644 +--- a/extras/rule_generator/75-persistent-net-generator.rules ++++ b/extras/rule_generator/75-persistent-net-generator.rules +@@ -1,33 +1,56 @@ + # do not edit this file, it will be overwritten on update + + # these rules generate rules for persistent network device naming ++# ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer + + ACTION!="add", GOTO="persistent_net_generator_end" + SUBSYSTEM!="net", GOTO="persistent_net_generator_end" + +-# device name whitelist +-KERNEL!="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" +- + # ignore the interface if a name has already been set + NAME=="?*", GOTO="persistent_net_generator_end" + ++# device name whitelist ++KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" ++ ++# add interface type match for some devices ++KERNEL=="wlan*|ath*", ENV{MATCHIFTYPE}="1" ++ + # ignore Xen virtual interfaces + SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" + +-# build device description string to add a comment to the generated rule ++# read MAC address ++ENV{MATCHADDR}="$attr{address}" ++ ++# do not use "locally administered" MAC address ++ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" ++ ++# do not use empty address ++ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" ++ ++# build comment line for generated rule: + SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" + SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" + SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" +-SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver" + SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" +-ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)" + +-DRIVERS=="?*", ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env{NETDRV} --id $env{NETDEV}" ++# S/390 uses id matches only, do not use MAC address match ++SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}="" ++ ++# default comment ++ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device" + +-# skip "locally administered" MAC addresses +-ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" ++# write rule ++DRIVERS=="?*", IMPORT{program}="write_net_rules" + +-DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" ++# rename interface if needed + ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" + + LABEL="persistent_net_generator_end" +diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules +index 62acb88..b25ecfd 100644 +--- a/extras/rule_generator/write_net_rules ++++ b/extras/rule_generator/write_net_rules +@@ -1,20 +1,25 @@ + #!/bin/sh -e + # +-# This script is run if the interface (recognized by its MAC address) lacks +-# a rule for persistent naming. +-# +-# If there is already a persistent rule with that interface name then the +-# current interface needs to be renamed. +-# +-# If the interface needs to be renamed, a NAME=value pair will be printed +-# on stdout to allow udev to IMPORT it. Then a rule for the MAC address and +-# interface name is written. +-# +-# (C) 2006 Marco d'Itri ++# Copyright (C) 2006 Marco d'Itri ++# Copyright (C) 2007 Kay Sievers + # + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the + # Free Software Foundation version 2 of the License. ++# ++# This script is run to create persistent network device naming rules ++# based on properties of the device. ++# If the interface needs to be renamed, INTERFACE_NEW= will be printed ++# on stdout to allow udev to IMPORT it. ++ ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer + + RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' + +@@ -49,78 +54,57 @@ write_rule() { + + echo "" + [ "$comment" ] && echo "# $comment" +- echo "SUBSYSTEM==\"net\", $match, NAME=\"$name\"" ++ echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\"" + } >> $RULES_FILE + } + + if [ -z "$INTERFACE" ]; then +- echo "Missing \$INTERFACE." >&2 ++ echo "missing \$INTERFACE" >&2 + exit 1 + fi + +-if [ "$1" ]; then +- while [ "$*" ] ; do +- case $1 in +- --mac) +- shift +- MAC_ADDR=$1 +- shift +- ;; +- --driver) +- shift +- DRIVER=$1 +- shift +- ;; +- --id) +- shift +- ID=$1 +- shift +- ;; +- *) +- MAC_ADDR=$1 +- shift +- ;; +- esac +- done +-else +- MAC_ADDR=$(sysread address) +-fi +- +-if [ -z "$DRIVER" ] && [ -z "$ID" ] ; then +- if [ -z "$MAC_ADDR" ]; then +- echo "No MAC address for $INTERFACE." >&2 +- exit 1 +- fi +- if [ "$MAC_ADDR" = "00:00:00:00:00:00" ]; then +- echo "NULL MAC address for $INTERFACE." >&2 +- exit 1 +- fi +-fi +- + # Prevent concurrent processes from modifying the file at the same time. + lock_rules_file + + # Check if the rules file is writeable. + choose_rules_file + +-# If a rule using the current name already exists then find a new name and +-# report it to udev which will rename the interface. +-basename=${INTERFACE%%[0-9]*} +-if interface_name_taken; then +- INTERFACE="$basename$(find_next_available "$basename[0-9]*")" +- if [ ! -t 1 ]; then +- echo "INTERFACE_NEW=$INTERFACE" +- fi ++# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces ++if [ "$MATCHADDR" ]; then ++ match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\"" + fi + +-# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces +-if [ "$MAC_ADDR" ] ; then +- match="DRIVERS==\"?*\", ATTR{address}==\"$MAC_ADDR\"" +-else +- match="DRIVERS==\"$DRIVER\", KERNELS==\"$ID\"" ++if [ "$MATCHDRV" ]; then ++ match="$match, DRIVERS==\"$MATCHDRV\"" ++fi ++ ++if [ "$MATCHID" ]; then ++ match="$match, KERNELS==\"$MATCHID\"" ++fi ++ ++if [ "$MATCHIFTYPE" ]; then ++ match="$match, ATTR{type}==\"$MATCHIFTYPE\"" + fi +-if [ $basename = "ath" -o $basename = "wlan" ]; then +- match="$match, ATTR{type}==\"1\"" # do not match the wifi* interfaces ++ ++if [ -z "$match" ]; then ++ echo "missing valid match" >&2 ++ exit 1 ++fi ++ ++if [ "$INTERFACE_NAME" ]; then ++ # external tools may request a custom name ++ COMMENT="$COMMENT (custom name provided by external tool)" ++ if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then ++ INTERFACE=$INTERFACE_NAME; ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++else ++ # if a rule using the current name already exists, find a new name ++ basename=${INTERFACE%%[0-9]*} ++ if interface_name_taken; then ++ INTERFACE="$basename$(find_next_available "$basename[0-9]*")" ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi + fi + + write_rule "$match" "$INTERFACE" "$COMMENT" +@@ -128,4 +112,3 @@ write_rule "$match" "$INTERFACE" "$COMMENT" + unlock_rules_file + + exit 0 +- +-- +1.5.2.4 + diff --git a/sources b/sources index 72dcc28..dc8ea95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb9a227206b9d85ae8cfc88fc51c1710 udev-113.tar.bz2 +39bbe5ddcd62d35cd56b184d6862c540 udev-115.tar.bz2 diff --git a/udev-095-dbgwait.patch b/udev-095-dbgwait.patch deleted file mode 100644 index 4129ae1..0000000 --- a/udev-095-dbgwait.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- udev-095/udev_utils_run.c.dbgwait 2006-07-04 12:34:55.000000000 +0200 -+++ udev-095/udev_utils_run.c 2006-12-18 11:06:04.000000000 +0100 -@@ -33,6 +33,8 @@ - - #include "udev.h" - -+#define WAIT_TIME 100 -+ - extern char **environ; - - int pass_env_to_socket(const char *sockname, const char *devpath, const char *action) -@@ -83,6 +85,8 @@ - char *argv[(sizeof(arg) / 2) + 1]; - int devnull; - int i; -+ int waited = 0; -+ struct timeval timeout; - - /* build argv from comand */ - strlcpy(arg, command, sizeof(arg)); -@@ -175,6 +179,7 @@ - if (errpipe[WRITE_END] > 0) - close(errpipe[WRITE_END]); - -+ waited = 0; - /* read child output */ - while (outpipe[READ_END] > 0 || errpipe[READ_END] > 0) { - int fdcount; -@@ -185,7 +190,18 @@ - FD_SET(outpipe[READ_END], &readfds); - if (errpipe[READ_END] > 0) - FD_SET(errpipe[READ_END], &readfds); -- fdcount = select(UDEV_MAX(outpipe[READ_END], errpipe[READ_END])+1, &readfds, NULL, NULL, NULL); -+ -+ timeout.tv_sec = 0; -+ timeout.tv_usec = WAIT_TIME * 1000; -+ fdcount = select(UDEV_MAX(outpipe[READ_END], errpipe[READ_END])+1, &readfds, NULL, NULL, &timeout); -+ -+ if (fdcount == 0) { -+ waited += WAIT_TIME; -+ if (waited % 1000 == 0) -+ info("Waiting %d seconds for output of '%s(%d)'", waited/1000, command, pid); -+ continue; -+ } -+ - if (fdcount < 0) { - if (errno == EINTR) - continue; -@@ -261,14 +277,24 @@ - *reslen = respos; - } - } -- waitpid(pid, &status, 0); -- if (WIFEXITED(status)) { -- info("'%s' returned with status %i", argv[0], WEXITSTATUS(status)); -- if (WEXITSTATUS(status) != 0) -+ while(1) { -+ if (waitpid(pid, &status, WNOHANG) == 0) { -+ usleep(WAIT_TIME * 1000); -+ waited += WAIT_TIME; -+ if (waited % 1000 == 0) -+ info("Waiting %d seconds for '%s(%d)'", waited/1000, command, pid); -+ continue; -+ } -+ -+ if (WIFEXITED(status)) { -+ info("'%s' returned with status %i", argv[0], WEXITSTATUS(status)); -+ if (WEXITSTATUS(status) != 0) -+ retval = -1; -+ } else { -+ err("'%s' abnormal exit", argv[0]); - retval = -1; -- } else { -- err("'%s' abnormal exit", argv[0]); -- retval = -1; -+ } -+ break; - } - } - diff --git a/udev-106-selinuxmedia.patch b/udev-106-selinuxmedia.patch deleted file mode 100644 index fc7ea42..0000000 --- a/udev-106-selinuxmedia.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- udev-106/udev_selinux.c.selinuxmedia 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udev_selinux.c 2007-04-11 11:49:14.000000000 +0200 -@@ -118,10 +118,12 @@ - char *media; - int ret = -1; - -- media = get_media(devname, mode); -- if (media) { -- ret = matchmediacon(media, &scontext); -- free(media); -+ if (devname) { -+ media = get_media(devname, mode); -+ if (media) { -+ ret = matchmediacon(media, &scontext); -+ free(media); -+ } - } - - if (ret < 0) -@@ -152,6 +154,8 @@ - * restoration creation purposes. - */ - if (is_selinux_running()) { -+ if (!udev_root[0]) -+ err("selinux_init: udev_root not set\n"); - matchpathcon_init_prefix(NULL, udev_root); - if (getfscreatecon(&prev_scontext) < 0) { - err("getfscreatecon failed\n"); ---- udev-106/extras/floppy/create_floppy_devices.c.selinuxmedia 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/extras/floppy/create_floppy_devices.c 2007-04-11 11:45:59.000000000 +0200 -@@ -155,6 +155,7 @@ - if (type == 0) - return 0; - -+ udev_config_init(); - selinux_init(); - - i = 0; diff --git a/udev-106-setenv.patch b/udev-106-setenv.patch deleted file mode 100644 index 93ae8f7..0000000 --- a/udev-106-setenv.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- udev-106/udevd.c.setenv 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udevd.c 2007-04-25 16:22:19.000000000 +0200 -@@ -657,6 +657,7 @@ - struct ucred *cred; - char cred_msg[CMSG_SPACE(sizeof(struct ucred))]; - int *intval; -+ char *pos; - - memset(&ctrl_msg, 0x00, sizeof(struct udevd_ctrl_msg)); - iov.iov_base = &ctrl_msg; -@@ -693,6 +694,21 @@ - } - - switch (ctrl_msg.type) { -+ case UDEVD_CTRL_ENV: -+ pos = strchr(ctrl_msg.buf, '='); -+ if (pos == NULL) { -+ err("wrong key format '%s'", ctrl_msg.buf); -+ break; -+ } -+ pos[0] = '\0'; -+ if (pos[1] == '\0') { -+ info("udevd message (ENV) received, unset '%s'", ctrl_msg.buf); -+ unsetenv(ctrl_msg.buf); -+ } else { -+ info("udevd message (ENV) received, set '%s=%s'", ctrl_msg.buf, &pos[1]); -+ setenv(ctrl_msg.buf, &pos[1], 1); -+ } -+ break; - case UDEVD_CTRL_STOP_EXEC_QUEUE: - info("udevd message (STOP_EXEC_QUEUE) received"); - stop_exec_q = 1; ---- udev-106/udevd.h.setenv 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udevd.h 2007-04-25 16:22:19.000000000 +0200 -@@ -46,6 +46,7 @@ - UDEVD_CTRL_SET_MAX_CHILDS, - UDEVD_CTRL_SET_MAX_CHILDS_RUNNING, - UDEVD_CTRL_RELOAD_RULES, -+ UDEVD_CTRL_ENV, - }; - - struct udevd_ctrl_msg { ---- udev-106/udev_rules_parse.c.setenv 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udev_rules_parse.c 2007-04-25 16:19:01.000000000 +0200 -@@ -393,6 +393,7 @@ - } - if (strncmp(attr, "PHYSDEV", 7) == 0) - physdev = 1; -+ dbg("add_rule_key_pair(%s %s)", attr, value); - if (add_rule_key_pair(rule, &rule->env, operation, attr, value) != 0) - goto invalid; - valid = 1; ---- udev-106/udevd.8.setenv 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udevd.8 2007-04-25 16:22:19.000000000 +0200 -@@ -65,6 +65,11 @@ - .RS 4 - udevcontrol starts the execution of events from udevd. - .RE -+.PP -+\fBenv \fR\fB\fIvar\fR\fR\fB=\fR\fB\fIvalue\fR\fR -+.RS 4 -+Set global variable. -+.RE - .SH "ENVIRONMENT" - .PP - \fBUDEV_LOG\fR ---- udev-106/udevd.xml.setenv 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udevd.xml 2007-04-25 16:22:19.000000000 +0200 -@@ -93,6 +93,12 @@ - - - -+ -+ -+ Set global variable. -+ -+ -+ - - - udevcontrol starts the execution of events from udevd. ---- udev-106/udevcontrol.c.setenv 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/udevcontrol.c 2007-04-25 16:22:19.000000000 +0200 -@@ -117,6 +117,15 @@ - } - *intval = count; - info("send max_childs_running=%i", *intval); -+ } else if (!strncmp(arg, "env", strlen("env"))) { -+ val = argv[++i]; -+ if (val == NULL) { -+ fprintf(stderr, "missing key\n"); -+ goto exit; -+ } -+ ctrl_msg.type = UDEVD_CTRL_ENV; -+ strlcpy(ctrl_msg.buf, val, sizeof(ctrl_msg.buf)); -+ info("send env '%s'", val); - } else if (strcmp(arg, "help") == 0 || strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { - printf("Usage: udevcontrol COMMAND\n" - " log_priority= set the udev log level for the daemon\n" diff --git a/udev-extras.patch b/udev-extras.patch deleted file mode 100644 index 2e66d3c..0000000 --- a/udev-extras.patch +++ /dev/null @@ -1,121 +0,0 @@ ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/extras/check-cdrom.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,0 +1,39 @@ -+#!/bin/bash -+ -+pos=0 -+n=0 -+sp="$1" -+what="$2" -+found=0 -+ -+[ -e /proc/sys/dev/cdrom/info ] || exit 1 -+ -+/bin/cat /proc/sys/dev/cdrom/info | { -+ while read line; do -+ if [ "$found" = "0" -a "${line/drive name:}" != "$line" ]; then -+ set ${line/drive name:} -+ while [ $# -gt 0 ]; do -+ pos=$[$pos+1] -+ if [ "$1" == "$sp" ]; then -+ found=1 -+ break -+ fi -+ shift -+ done -+ [ "$found" = "0" ] && exit 1 -+ elif [ "${line/$what:}" != "$line" ]; then -+ set ${line##*$what:} -+ while [ $# -gt 0 ]; do -+ n=$[$n+1] -+ if [ "$n" == "$pos" ]; then -+ if [ "$1" = "1" ]; then -+ exit 0 -+ fi -+ break -+ fi -+ shift -+ done -+ fi -+ done -+ exit 1 -+} ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/extras/run_directory/MAKEDEV.dev 2006-02-07 10:58:51.000000000 +0100 -@@ -0,0 +1,38 @@ -+#!/bin/sh -+ -+if [ "$ACTION" = "add" -a -e "$DEVNAME" ]; then -+ if [ -x /usr/bin/logger ]; then -+ LOGGER=/usr/bin/logger -+ elif [ -x /bin/logger ]; then -+ LOGGER=/bin/logger -+ else -+ unset LOGGER -+ fi -+ # -+ # for diagnostics -+ # -+ if [ -f /etc/udev/udev.conf ]; then -+ . /etc/udev/udev.conf -+ fi -+ -+ -+ if [ -t 1 -o -z "$LOGGER" ]; then -+ mesg () { -+ echo "$@" -+ } -+ else -+ mesg () { -+ $LOGGER -t $(basename $0)"[$$]" "$@" -+ } -+ fi -+ -+ debug_mesg () { -+ test -z "$UDEV_LOG" -o "$UDEV_LOG" != "1" && return -+ mesg "$@" -+ } -+ -+ debug_mesg "/sbin/MAKEDEV ${DEVNAME#$udev_root}" -+ /sbin/MAKEDEV "${DEVNAME#$udev_root}" -+ debug_mesg "Restoring permissions for " $DEVNAME* -+ /sbin/pam_console_apply $DEVNAME* -+fi ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/extras/load_floppy_module.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,0 +1,35 @@ -+#!/bin/sh -+######################################################################## -+# -+# Description : load_floppy_module -+# -+# Authors : Based on Open Suse Udev Rules -+# kay.sievers at suse.de -+# -+# Notes : Loads the floppy module based upon contents of the NVRAM -+# -+######################################################################## -+ -+PROC=/proc/driver/nvram -+ -+# wait for /proc file to appear -+loop=10 -+while ! test -e $PROC; do -+ sleep 0.1; -+ test "$loop" -gt 0 || break -+ loop=$(($loop - 1)) -+done -+ -+if [ ! -r /proc/driver/nvram ]; then -+ exit 0; -+fi -+ -+floppy_devices=$(cat $PROC | sed -n '/Floppy.*\..*/p') -+ -+if [ -n "$floppy_devices" ]; then -+ /sbin/modprobe block-major-2- -+else -+ /bin/true -+fi -+ -+exit $? diff --git a/udev-permconv.patch b/udev-permconv.patch deleted file mode 100644 index 37e0959..0000000 --- a/udev-permconv.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/extras/udevpermconv.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,0 +1,94 @@ -+#!/bin/bash -+# -+# convert old udev permissions.d file to the new rules.d format. -+# revision 2 -+# -+# Written by Michael Buesch -+# This is released into the Public Domain. -+# -+ -+ -+perm_file="$1" -+ -+function processLine -+{ -+ local line="$1" -+ if [ -z "$line" ]; then -+ echo -+ return 1 -+ fi -+ if [ "`echo $line | cut -b1`" = "#" ]; then -+ # comment -+ echo "$line" -+ return 2 -+ fi -+ -+ local i= -+ local kern_name= -+ local owner= -+ local group= -+ local mode= -+ for ((i = 1; i <= 4; i++)); do -+ local tmp="`echo $line | cut -d: -f $i`" -+ if [ $i -eq 1 ]; then -+ kern_name="$tmp" -+ elif [ $i -eq 2 ]; then -+ owner="$tmp" -+ elif [ $i -eq 3 ]; then -+ group="$tmp" -+ elif [ $i -eq 4 ]; then -+ mode="$tmp" -+ fi -+ done -+ if [ -z "$kern_name" ]; then -+ echo "Malformed line: \"$line\"" >&2 -+ return 3 -+ fi -+ local need_rule="no" -+ local out="KERNEL==\"$kern_name\"" -+ local kern_name_len="`echo $kern_name | wc -c`" -+ kern_name_len="`expr $kern_name_len + 9`" -+ local num_tabs="`expr 32 - $kern_name_len`" -+ num_tabs="`expr $num_tabs / 8`" -+ while [ $num_tabs -gt 0 ]; do -+ out="${out}\t" -+ num_tabs="`expr $num_tabs - 1`" -+ done -+ if [ -n "$owner" ] && [ "$owner" != "root" ]; then -+ out="${out}, OWNER=\"$owner\"" -+ need_rule="yes" -+ fi -+ if [ -n "$group" ] && [ "$group" != "root" ]; then -+ out="${out}, GROUP=\"$group\"" -+ need_rule="yes" -+ fi -+ if [ -n "$mode" ] && [ "$mode" != "0600" ] && [ "$mode" != "600" ]; then -+ out="${out}, MODE=\"$mode\"" -+ need_rule="yes" -+ fi -+ if [ "$need_rule" = "no" ]; then -+ echo "Do not need a rule for: \"$line\" (It's udev default permissions)" >&2 -+ return 4 -+ fi -+ echo -e "$out" -+ return 0 -+} -+ -+function processInput -+{ -+ echo "Converting udev permissions file. This can take a while..." >&2 -+ cat $perm_file | \ -+ while read line; do -+ processLine "$line" -+ done -+ echo "done." >&2 -+} -+ -+if ! [ -r "$perm_file" ]; then -+ echo "Could not read input file" >&2 -+ echo "Usage: $0 old_permission_file > new_rules_file" >&2 -+ exit 1 -+fi -+ -+processInput -+exit 0 diff --git a/udev-post.init b/udev-post.init new file mode 100644 index 0000000..478f352 --- /dev/null +++ b/udev-post.init @@ -0,0 +1,47 @@ +#!/bin/bash +# +# udev-post Post script for udev, after all filesystems are mounted +# +# Authors: Harald Hoyer +# +# chkconfig: 345 26 75 +# description: Moves the generated persistent udev rules to /etc/udev/rules.d +# +### BEGIN INIT INFO +# Requires: $local_fs +### END INIT INFO + +. /etc/rc.d/init.d/functions + +# See how we were called. +case "$1" in + start) + STRING=$"Adding udev persistent rules" + + # copy the rules generated before / was mounted read-write + for file in /dev/.udev/tmp-rules--*; do + dest=${file##*tmp-rules--} + # check, if anything is todo + [ "$dest" = '*' ] && exit 0 + echo -n $STRING + cat $file >> /etc/udev/rules.d/$dest + rc=$? + rm -f $file + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + done + exit 0 + ;; + stop) + exit 0 + ;; + *) + echo $"Usage: $0 {start}" + exit 1 +esac +exit 0 diff --git a/udev-rules.patch b/udev-rules.patch deleted file mode 100644 index 3d34e1d..0000000 --- a/udev-rules.patch +++ /dev/null @@ -1,342 +0,0 @@ ---- udev-113/etc/udev/rules.d/60-persistent-storage.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/rules.d/60-persistent-storage.rules 2007-08-23 08:46:16.000000000 +0200 -@@ -57,7 +57,7 @@ KERNEL=="sr*|st*", GOTO="persistent_stor - KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" - - # by-label/by-uuid (filesystem properties) --IMPORT{program}="vol_id --export $tempnode" -+ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" - 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}" - ---- udev-113/etc/udev/redhat/50-udev.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/redhat/50-udev.rules 2007-08-24 12:37:33.000000000 +0200 -@@ -4,25 +4,25 @@ - # default is OWNER="root" GROUP="root", MODE="0600" - # - --KERNEL=="*", OWNER="root" GROUP="root", MODE="0600" -+KERNEL=="*", OWNER="root", GROUP="root", MODE="0600" - - # all block devices - SUBSYSTEM=="block", GROUP="disk", MODE="0640" - KERNEL=="root", GROUP="disk", MODE="0640" - - # console devices --KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="console", NAME="%k", MODE="0600", OPTIONS="last_rule" --KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="vc/[0-9]*", NAME="%k", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666" -+KERNEL=="console", NAME="%k", MODE="0600" -+KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="0660" -+KERNEL=="vc/[0-9]*", NAME="%k", GROUP="tty", MODE="0660" - - # pty devices - # Set this to 0660 if you only want users belonging to tty group - # to be able to allocate PTYs --KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule" --KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660", OPTIONS="last_rule" --KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660", OPTIONS="last_rule" --KERNEL=="pty/m*", NAME="%k", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666" -+KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660" -+KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="660" -+KERNEL=="pty/m*", NAME="%k", GROUP="tty", MODE="0660" - - # serial+dialup devices - KERNEL=="ippp*", NAME="%k", MODE="0660" -@@ -43,21 +43,21 @@ KERNEL=="hvsi*", NAME="%k - KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" - - # vc devices --KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcs[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcsa", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcsa[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcc/*", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -+KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcs[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa", NAME="%k", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa[0-9]*", NAME="%k", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcc/*", NAME="%k", OWNER="vcsa", GROUP="tty" - - # memory devices --KERNEL=="random", MODE="0666", OPTIONS="last_rule" --KERNEL=="urandom", MODE="0444", OPTIONS="last_rule" --KERNEL=="mem", GROUP="kmem", MODE="0640", OPTIONS="last_rule" --KERNEL=="kmem", GROUP="kmem", MODE="0640", OPTIONS="last_rule" --KERNEL=="port", GROUP="kmem", MODE="0640", OPTIONS="last_rule" --KERNEL=="full", MODE="0666", OPTIONS="last_rule" --KERNEL=="null", MODE="0666", OPTIONS="last_rule" --KERNEL=="zero", MODE="0666", OPTIONS="last_rule" -+KERNEL=="random", MODE="0666" -+KERNEL=="urandom", MODE="0444" -+KERNEL=="mem", GROUP="kmem", MODE="0640" -+KERNEL=="kmem", GROUP="kmem", MODE="0640" -+KERNEL=="port", GROUP="kmem", MODE="0640" -+KERNEL=="full", MODE="0666" -+KERNEL=="null", MODE="0666" -+KERNEL=="zero", MODE="0666" - # 183 = /dev/hwrng Generic random number generator - KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" - -@@ -67,12 +67,18 @@ KERNEL=="rtc", MODE="0644" - - # floppy devices - KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" -+ - # fix floppy devices - KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh" --KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k" -+ -+KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", \ -+ RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k" -+ - KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'" - --BUS=="usb", KERNEL=="sd*", SYSFS{bInterfaceClass}=="08", SYSFS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" -+BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", \ -+ ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", \ -+ SYMLINK+="floppy floppy-%k" - - # audio devices - KERNEL=="dsp*", MODE="0660" -@@ -99,8 +105,8 @@ KERNEL=="usblp*", GROUP="lp", MODE="066 - KERNEL=="usb/lp*", GROUP="lp", MODE="0660" - - # tape devices --SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ -- RUN+="modprobe ide-scsi idescsi_nocd=1" -+SUBSYSTEM=="ide", ATTRS{media}=="tape", ACTION=="add", \ -+ RUN+="/sbin/modprobe ide-scsi idescsi_nocd=1" - KERNEL=="ht*", GROUP="disk", MODE="0660" - KERNEL=="nht*", GROUP="disk", MODE="0660" - KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" -@@ -155,7 +161,8 @@ KERNEL=="slram[0-9]*", SYMLINK+="xpram - - # DVB - KERNEL=="dvb", MODE="0660" --SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ -+SUBSYSTEM=="dvb", \ -+ PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ - NAME="%c", MODE="0660" - - KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" -@@ -181,6 +188,8 @@ KERNEL=="raw1394", NAME="%k" - KERNEL=="dv1394*", NAME="dv1394/%n" - KERNEL=="video1394*", NAME="video1394/%n" - -+KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" -+ - KERNEL=="raw[0-9]*", NAME="raw/%k" - - KERNEL=="lp[0-9]*", SYMLINK+="par%n" -@@ -215,8 +224,8 @@ KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdr - KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k" - KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k" - KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" --KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape tape-%k", MODE="0660" --KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape tape-%k", MODE="0660" -+KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -+KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - - # Section for zaptel device - KERNEL=="zapctl", NAME="zap/ctl" -@@ -227,89 +236,51 @@ KERNEL=="zap[0-9]*", NAME="zap/%n" - - KERNEL=="pktcdvd", NAME="%k/control" - -- - KERNEL=="hd*[!0-9]", ATTR{removable}=="1", \ - ATTR{media}=="floppy", \ - SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k" - --KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", \ -+ SYMLINK+="floppy-%k" - --KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", \ -+ SYMLINK+="cdrom cdrom-%k" - --KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", \ -+ SYMLINK+="dvd dvd-%k" -+ -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ PROGRAM=="check-cdrom.sh %k CD-R", \ -+ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" -+ -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", \ -+ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" -+ -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ PROGRAM="check-cdrom.sh %k DVD-R", \ -+ SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" - --KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", \ -+ SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k" - - # rename sr* to scd* - KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" - KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ - OPTIONS+="ignore_remove" - -- -- --####################################### --# Persistent block device stuff - begin --####################################### --# persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path} --# scheme based on "Linux persistent device names", 2004, Hannes Reinecke -- --ACTION!="add", GOTO="persistent_end" --SUBSYSTEM!="block", GOTO="persistent_end" -- --# skip rules for inappropriate block devices --KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" -- --# never access removable ide devices, the drivers are causing event loops on open() --KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_end" --KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" -- --# by-id (hardware serial number) --KERNEL=="hd*[!0-9]", IMPORT{program}="/lib/udev/ata_id --export $tempnode" --KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" --KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" -- --KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/usb_id -x" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode" --KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -- --# for partitions import parent information --KERNEL=="sd*[0-9]|dasd*[0-9]", IMPORT{parent}=="ID_*" --KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" -- --# by-path (shortest physical path) --KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/lib/udev/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}" --KERNEL=="sr*", GOTO="persistent_end" --KERNEL=="*[0-9]", IMPORT{parent}=="ID_*" --KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" -- --# by-label/by-uuid (filesystem properties) --KERNEL=="*[!0-9]", ATTRS{removable}=="1", GOTO="persistent_end" --IMPORT{program}="/lib/udev/vol_id --export $tempnode" --ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" --ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" -- --# BIOS Enhanced Disk Device --KERNEL=="*[!0-9]", IMPORT{program}="/lib/udev/edd_id --export $tempnode" --KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}" --KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n" -- --LABEL="persistent_end" -- --##################################### --# Persistent block device stuff - end --##################################### -- -+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ -+ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" - - ACTION=="add", SUBSYSTEM=="usb_device", \ - PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ - NAME="%c", MODE="0644" - -+ACTION=="add", SUBSYSTEM=="usb_endpoint", \ -+ ATTR{bEndpointAddress}=="?*", ATTRS{devnum}=="?*", ATTRS{busnum}=="?*", \ -+ NAME="bus/usb/$attr{busnum}/$attr{devnum}_ep/$attr{bEndpointAddress}", \ -+ MODE="0644", SYMLINK+="%k" - - # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC - # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -321,11 +292,11 @@ ACTION=="add", SUBSYSTEM=="scsi" , ATTRS - RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" - - --ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="modprobe sg" -+ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -- RUN+="modprobe sd_mod" -+ RUN+="/sbin/modprobe sd_mod" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -- RUN+="modprobe sr_mod" -+ RUN+="/sbin/modprobe sr_mod" - - ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ - SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -333,15 +304,18 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS== - ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ - SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" - --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}!="ADR*", RUN+="modprobe osst" --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}=="ADR*", RUN+="modprobe st" --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \ -- RUN+="modprobe st" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", \ -+ ATTRS{vendor}=="On[sS]tream", \ -+ ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", \ -+ ATTRS{vendor}=="On[sS]tream", \ -+ ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", \ -+ ATTRS{vendor}!="On[sS]tream", \ -+ RUN+="/sbin/modprobe st" - - # mmc block devices --ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" -+ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" - - - RUN+="socket:/org/kernel/udev/monitor" ---- /dev/null 2007-08-18 10:04:54.672638596 +0200 -+++ udev-113/etc/udev/redhat/06-udev-rh-early.rules 2007-08-23 08:46:16.000000000 +0200 -@@ -0,0 +1,14 @@ -+# do not edit this file, it will be overwritten on update -+ -+ACTION!="add", GOTO="drivers_end" -+ -+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" -+SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \ -+ RUN+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" -+SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" -+SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" -+SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" -+SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" -+SUBSYSTEM=="firmware", ENV{FIRMWARE}=="?*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" -+ -+LABEL="drivers_end" ---- udev-113/etc/udev/redhat/05-udev-early.rules.rhrules 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-08-23 08:46:16.000000000 +0200 -@@ -1,19 +0,0 @@ --# sysfs is populated after the event is sent --ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" --# ignore these events until someone needs them --SUBSYSTEM=="drivers", OPTIONS="ignore_device" --SUBSYSTEM=="module", OPTIONS="ignore_device" -- -- --ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", GOTO="skip_wait" -- --# pnp devices --ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'" -- --ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -- --ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -- --LABEL="skip_wait" -- --ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index f8a282f..061ba61 100644 --- a/udev.spec +++ b/udev.spec @@ -5,9 +5,9 @@ Summary: A userspace implementation of devfs Name: udev -Version: 113 -Release: 12%{?dist} -License: GPL +Version: 115 +Release: 4.20070921git%{?dist} +License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 @@ -15,15 +15,43 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev.nodes +Source3: udev-post.init Source4: fw_unit_symlinks.sh -Source10: firmware_helper.c -Patch1: udev-permconv.patch -Patch2: udev-rules.patch -Patch5: udev-extras.patch -Patch7: udev-089-nopie.patch -Patch9: udev-091-lib64.patch -Patch14: udev-095-dbgwait.patch +Patch1: 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch +Patch2: 0002-rules-fix-two-trivial-typos.patch +Patch3: 0003-rules-random-and-urandom-are-0666.patch +Patch4: 0004-rules-add-REMOVE_CMD-rule.patch +Patch5: 0005-track-move-events-to-rename-database-and-failed-fi.patch +Patch6: 0006-rules-Gentoo-update.patch +Patch7: 0007-rules-add-i2o-driver-rule.patch +Patch8: 0008-man-recreate-man-pages.patch +Patch9: 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch +Patch10: 0010-rules-Gentoo-update.patch +Patch11: 0011-add-name-substitution.patch +Patch12: 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch +Patch13: 0013-print-warning-for-invalid-TEST-operations.patch +Patch14: 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch +Patch15: 0015-rules-remove-broken-nvram-group-assignment-without.patch +Patch16: 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch +Patch17: 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch +Patch18: 0018-correct-includes-in-udev_selinux.c.patch +Patch19: 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch +Patch20: 0020-path_id-fix-for-stacked-class-devices.patch +Patch21: 0021-check-line-length-after-comment-check-and-whitespace.patch +Patch22: 0022-only-install-.rules.patch +Patch23: 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch +Patch24: 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch +Patch25: 0025-rules-add-memstick-module-loading.patch +Patch26: 0026-remove-extra-space-from-udevinfo-symlink-output.patch +Patch27: 0027-udevinfo-simplify-symlink-printing-logic.patch +Patch28: 0028-prevent-wrong-symlink-creation-if-database-disagress.patch +Patch29: 0029-fix-wrong-variable-used-in-logged-string.patch +Patch30: 0030-update-README.patch +Patch31: 0031-rule_generator-move-all-policy-from-write_net_rules.patch + +Patch100: udev-089-nopie.patch +Patch101: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -71,14 +99,39 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .rhpermconv -%patch2 -p1 -b .rhrules -%patch5 -p1 -b .rhextras -%patch7 -p1 -b .nopie -%patch9 -p1 -b .lib64 -%patch14 -p1 -b .dbgwait +%patch1 -p1 -b .git1 +%patch2 -p1 -b .git2 +%patch3 -p1 -b .git3 +%patch4 -p1 -b .git4 +%patch5 -p1 -b .git5 +%patch6 -p1 -b .git6 +%patch7 -p1 -b .git7 +%patch8 -p1 -b .git8 +%patch9 -p1 -b .git9 +%patch10 -p1 -b .git10 +%patch11 -p1 -b .git11 +%patch12 -p1 -b .git12 +%patch13 -p1 -b .git13 +%patch14 -p1 -b .git14 +%patch15 -p1 -b .git15 +%patch16 -p1 -b .git16 +%patch17 -p1 -b .git17 +%patch18 -p1 -b .git18 +%patch19 -p1 -b .git19 +%patch20 -p1 -b .git20 +%patch21 -p1 -b .git21 +%patch22 -p1 -b .git22 +%patch25 -p1 -b .git25 +%patch26 -p1 -b .git26 +%patch27 -p1 -b .git27 +%patch28 -p1 -b .git28 +%patch29 -p1 -b .git29 +%patch30 -p1 -b .git30 +%patch31 -p1 -b .git31 + +%patch100 -p1 -b .nopie +%patch101 -p1 -b .lib64 -rm -f etc/udev/redhat/51-hotplug.rules %build %if %{with_static} @@ -98,6 +151,7 @@ make \ extras/usb_id \ extras/edd_id \ extras/volume_id \ + extras/cdrom_id \ extras/floppy \ " all @@ -106,6 +160,7 @@ for i in udevd udevtrigger udevsettle \ extras/ata_id/ata_id \ extras/edd_id/edd_id \ extras/usb_id/usb_id \ + extras/cdrom_id/cdrom_id \ extras/volume_id/vol_id \ extras/floppy/create_floppy_devices \ ; do @@ -131,11 +186,12 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ extras/edd_id \ extras/path_id \ extras/volume_id \ + extras/cdrom_id \ extras/floppy \ + extras/rule_generator \ + extras/firmware \ " all -%{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} - %install rm -rf $RPM_BUILD_ROOT @@ -151,7 +207,10 @@ make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ extras/edd_id \ extras/path_id \ extras/volume_id \ + extras/cdrom_id \ extras/floppy \ + extras/rule_generator \ + extras/firmware \ " install rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules @@ -184,10 +243,19 @@ done %endif for i in \ - etc/udev/redhat/06-udev-rh-early.rules \ - etc/udev/redhat/50-udev.rules \ - etc/udev/redhat/95-pam-console.rules \ - etc/udev/rules.d/*.rules \ + etc/udev/redhat/*.rules \ +%ifarch ia64 + etc/udev/packages/40-ia64.rules \ +%endif +%ifarch ppc ppc64 + etc/udev/packages/40-ppc.rules \ +%endif +%ifarch s390 s390x + etc/udev/packages/40-s390.rules \ +%endif + etc/udev/packages/40-alsa.rules \ + etc/udev/packages/64-md-raid.rules \ + etc/udev/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}" done @@ -196,16 +264,11 @@ install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do - install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} -done - install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev -install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin #install -m 0755 udevtrigger $RPM_BUILD_ROOT/sbin mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} @@ -217,6 +280,8 @@ cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules </dev/null 2>&1 & EOF +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/udev-post %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then @@ -228,6 +293,7 @@ if [ $1 = 0 -a -f %{_initrddir}/udev ]; then fi /sbin/chkconfig --del udev fi +/sbin/chkconfig --del udev-post exit 0 %post @@ -238,6 +304,7 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then /sbin/udevd -d fi fi +chkconfig --add udev-post exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -275,13 +342,15 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/edd_id %attr(0755,root,root) %{udev_scriptdir}/usb_id %attr(0755,root,root) %{udev_scriptdir}/vol_id +%attr(0755,root,root) %{udev_scriptdir}/cdrom_id %attr(0755,root,root) %{udev_scriptdir}/path_id %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices -%attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh -%attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh -%attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh -%attr(0755,root,root) /sbin/firmware_helper +%attr(0755,root,root) %{udev_scriptdir}/firmware.sh +%attr(0755,root,root) %{udev_scriptdir}/rule_generator.functions +%attr(0755,root,root) %{udev_scriptdir}/write_cd_rules +%attr(0755,root,root) %{udev_scriptdir}/write_net_rules +%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo %attr(0755,root,root) %{_sbindir}/udevmonitor @@ -308,6 +377,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %attr(0644,root,root) %{_mandir}/man8/path_id*.8* +%attr(0644,root,root) %{_mandir}/man8/cdrom_id*.8* %attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* # Deprecated, but keep the ownership @@ -342,8 +412,40 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Sep 21 2007 Harald Hoyer - 115-4 +- more upstream fixes from git + +* Thu Sep 20 2007 Harald Hoyer - 115-3 +- some upstream fixes from git +- removed last_rule for loop rules +- added "udevinfo udevtrace" kernel command line options for better debugging + +* Fri Sep 07 2007 Harald Hoyer - 115-2 +- some upstream fixes from git +- last_rule for loop rules (speedup for live-cds/qemu with 128 loop devices) + +* Thu Aug 24 2007 Harald Hoyer - 115-1 +- version 115 + +* Thu Aug 23 2007 Harald Hoyer - 114-4 +- added patch to prevent persistent net rules for virtual network interfaces, + like vmware and vlans + +* Thu Aug 23 2007 Harald Hoyer - 114-3 +- changed license tag +- changed to latest upstream rule ordering + +* Mon Aug 13 2007 Harald Hoyer - 114-2 +- fixed isapnp rule (bug #251815) +- fix for nikon cameras (bug #251401) + +* Fri Aug 10 2007 Harald Hoyer - 114-1 +- version 114 +- big rule unification and cleanup +- added persistent names for network and cdrom devices over reboot + * Fri Aug 24 2007 Harald Hoyer - 113-12 -- removed /dev/tape symlink, because it's now a directory +- removed /dev/tape symlink, because it's now a directory (bug #251755) * Thu Aug 16 2007 Harald Hoyer - 113-11 From 4aea0d658aabdbe932012a94b8349f96b399f898 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 1 Oct 2007 11:13:39 +0000 Subject: [PATCH 11/16] sort changeloG --- udev.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/udev.spec b/udev.spec index 061ba61..0fadad2 100644 --- a/udev.spec +++ b/udev.spec @@ -427,6 +427,10 @@ rm -rf $RPM_BUILD_ROOT * Thu Aug 24 2007 Harald Hoyer - 115-1 - version 115 +* Fri Aug 24 2007 Harald Hoyer - 113-12 +- removed /dev/tape symlink, because it's now a directory + (bug #251755) + * Thu Aug 23 2007 Harald Hoyer - 114-4 - added patch to prevent persistent net rules for virtual network interfaces, like vmware and vlans @@ -435,26 +439,22 @@ rm -rf $RPM_BUILD_ROOT - changed license tag - changed to latest upstream rule ordering +* Thu Aug 16 2007 Harald Hoyer - 113-11 +- readded firmware rule (#252983) + * Mon Aug 13 2007 Harald Hoyer - 114-2 - fixed isapnp rule (bug #251815) - fix for nikon cameras (bug #251401) +* Wed Aug 15 2007 Harald Hoyer - 113-10 +- do not run vol_id on non-partition block devices (bug #251401) +- read all multiline pnp modaliases again + * Fri Aug 10 2007 Harald Hoyer - 114-1 - version 114 - big rule unification and cleanup - added persistent names for network and cdrom devices over reboot -* Fri Aug 24 2007 Harald Hoyer - 113-12 -- removed /dev/tape symlink, because it's now a directory - (bug #251755) - -* Thu Aug 16 2007 Harald Hoyer - 113-11 -- readded firmware rule (#252983) - -* Wed Aug 15 2007 Harald Hoyer - 113-10 -- do not run vol_id on non-partition block devices (bug #251401) -- read all multiline pnp modaliases again - * Wed Aug 08 2007 Harald Hoyer - 113-9 - added lp* to 50-udev.nodes (#251272) From 0959955b7069d1ef4b1a690c08604a8b8426439b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 1 Oct 2007 11:14:52 +0000 Subject: [PATCH 12/16] sort changeloG --- udev.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/udev.spec b/udev.spec index 0fadad2..165ffbd 100644 --- a/udev.spec +++ b/udev.spec @@ -442,14 +442,14 @@ rm -rf $RPM_BUILD_ROOT * Thu Aug 16 2007 Harald Hoyer - 113-11 - readded firmware rule (#252983) -* Mon Aug 13 2007 Harald Hoyer - 114-2 -- fixed isapnp rule (bug #251815) -- fix for nikon cameras (bug #251401) - * Wed Aug 15 2007 Harald Hoyer - 113-10 - do not run vol_id on non-partition block devices (bug #251401) - read all multiline pnp modaliases again +* Mon Aug 13 2007 Harald Hoyer - 114-2 +- fixed isapnp rule (bug #251815) +- fix for nikon cameras (bug #251401) + * Fri Aug 10 2007 Harald Hoyer - 114-1 - version 114 - big rule unification and cleanup From f9d64c11de3abe1839bcc82a52b8652b5bbfb33b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 12 Oct 2007 12:13:18 +0000 Subject: [PATCH 13/16] - added upstream patch for rhbz#328691 - moved floppy module loading to pnp-alias in /etc/modprobe.d/floppy-pnp Wed Oct 10 2007 Harald Hoyer 115-5.20070921git - better modprobe options for the kernel command line 'modprobedebug' option --- ...if-strlcpy-strlcat-indicate-truncati.patch | 2 +- 0002-rules-fix-two-trivial-typos.patch | 2 +- 0003-rules-random-and-urandom-are-0666.patch | 2 +- 0004-rules-add-REMOVE_CMD-rule.patch | 2 +- ...nts-to-rename-database-and-failed-fi.patch | 2 +- 0006-rules-Gentoo-update.patch | 2 +- 0007-rules-add-i2o-driver-rule.patch | 2 +- 0008-man-recreate-man-pages.patch | 2 +- ...inux_raid-metadata-version-1.0-detec.patch | 2 +- 0010-rules-Gentoo-update.patch | 2 +- 0011-add-name-substitution.patch | 2 +- ...he-device-node-with-ignore_remove-bu.patch | 2 +- ...-warning-for-invalid-TEST-operations.patch | 2 +- ...-delete-lib-udev-devices-nodes-on-re.patch | 2 +- ...roken-nvram-group-assignment-without.patch | 2 +- ...-symlink-if-new-rtc-drivers-are-used.patch | 2 +- ...WAIT_FOR_SYSFS-timeout-to-10-seconds.patch | 2 +- 0018-correct-includes-in-udev_selinux.c.patch | 2 +- ...s-put-bsd-nodes-in-dev-bsd-directory.patch | 2 +- ...ath_id-fix-for-stacked-class-devices.patch | 2 +- ...h-after-comment-check-and-whitespace.patch | 2 +- 0022-only-install-.rules.patch | 2 +- ...de-names-while-restoring-symlinks-fr.patch | 2 +- ...n-dev-.udev-queue-instead-of-devpath.patch | 2 +- 0025-rules-add-memstick-module-loading.patch | 2 +- ...a-space-from-udevinfo-symlink-output.patch | 2 +- ...info-simplify-symlink-printing-logic.patch | 2 +- ...mlink-creation-if-database-disagress.patch | 2 +- ...wrong-variable-used-in-logged-string.patch | 2 +- 0030-update-README.patch | 2 +- ...move-all-policy-from-write_net_rules.patch | 2 +- 0032-rules-Gentoo-update.patch | 389 ++++++++++++++++++ ...-call-usb_id-only-for-SUBSYSTEMS-usb.patch | 25 ++ ...it-out-and-fix-persistent-tape-rules.patch | 91 ++++ 0035-fix-debug-output-string.patch | 25 ++ ...always-match-netif-type-in-generated.patch | 35 ++ 0037-rules-Gentoo-update.patch | 53 +++ udev.spec | 35 +- 38 files changed, 675 insertions(+), 40 deletions(-) create mode 100644 0032-rules-Gentoo-update.patch create mode 100644 0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch create mode 100644 0034-rules-split-out-and-fix-persistent-tape-rules.patch create mode 100644 0035-fix-debug-output-string.patch create mode 100644 0036-rule_generator-always-match-netif-type-in-generated.patch create mode 100644 0037-rules-Gentoo-update.patch diff --git a/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch b/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch index 95abcdf..bae4110 100644 --- a/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch +++ b/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch @@ -91,5 +91,5 @@ index cf8f209..309c54a 100644 path_decode(&device[start]); device_list_insert(device); -- -1.5.2.4 +1.5.3.3 diff --git a/0002-rules-fix-two-trivial-typos.patch b/0002-rules-fix-two-trivial-typos.patch index de6ffef..c80eea9 100644 --- a/0002-rules-fix-two-trivial-typos.patch +++ b/0002-rules-fix-two-trivial-typos.patch @@ -31,5 +31,5 @@ index bff2fe5..b3c0cfc 100644 KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" -- -1.5.2.4 +1.5.3.3 diff --git a/0003-rules-random-and-urandom-are-0666.patch b/0003-rules-random-and-urandom-are-0666.patch index be02ed4..708b529 100644 --- a/0003-rules-random-and-urandom-are-0666.patch +++ b/0003-rules-random-and-urandom-are-0666.patch @@ -34,5 +34,5 @@ index b3c0cfc..f869f51 100644 # video4linux -- -1.5.2.4 +1.5.3.3 diff --git a/0004-rules-add-REMOVE_CMD-rule.patch b/0004-rules-add-REMOVE_CMD-rule.patch index ae2f3f8..559a590 100644 --- a/0004-rules-add-REMOVE_CMD-rule.patch +++ b/0004-rules-add-REMOVE_CMD-rule.patch @@ -21,5 +21,5 @@ index 1755d08..4a015b9 100644 RUN+="socket:/org/kernel/udev/monitor" -- -1.5.2.4 +1.5.3.3 diff --git a/0005-track-move-events-to-rename-database-and-failed-fi.patch b/0005-track-move-events-to-rename-database-and-failed-fi.patch index d0baac1..84a845d 100644 --- a/0005-track-move-events-to-rename-database-and-failed-fi.patch +++ b/0005-track-move-events-to-rename-database-and-failed-fi.patch @@ -244,5 +244,5 @@ index 4ca6d1d..9be34cb 100644 unsigned int timeout; char *envp[UEVENT_NUM_ENVP+1]; -- -1.5.2.4 +1.5.3.3 diff --git a/0006-rules-Gentoo-update.patch b/0006-rules-Gentoo-update.patch index b999b51..6b0d986 100644 --- a/0006-rules-Gentoo-update.patch +++ b/0006-rules-Gentoo-update.patch @@ -202,5 +202,5 @@ index 40ada28..0000000 -RUN+="socket:/org/kernel/udev/monitor" - -- -1.5.2.4 +1.5.3.3 diff --git a/0007-rules-add-i2o-driver-rule.patch b/0007-rules-add-i2o-driver-rule.patch index ea622b2..4a2ad5f 100644 --- a/0007-rules-add-i2o-driver-rule.patch +++ b/0007-rules-add-i2o-driver-rule.patch @@ -20,5 +20,5 @@ index e71f135..3388266 100644 SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" -- -1.5.2.4 +1.5.3.3 diff --git a/0008-man-recreate-man-pages.patch b/0008-man-recreate-man-pages.patch index d22c38a..0a26ff0 100644 --- a/0008-man-recreate-man-pages.patch +++ b/0008-man-recreate-man-pages.patch @@ -1090,5 +1090,5 @@ index 5ef9e8f..06c7e45 100644 .PP \fBudev\fR(7) -- -1.5.2.4 +1.5.3.3 diff --git a/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch b/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch index f3428a5..0bcb53d 100644 --- a/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch +++ b/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch @@ -31,5 +31,5 @@ index 6d1d19c..ff2c47c 100644 return 0; -- -1.5.2.4 +1.5.3.3 diff --git a/0010-rules-Gentoo-update.patch b/0010-rules-Gentoo-update.patch index 1525307..47490ec 100644 --- a/0010-rules-Gentoo-update.patch +++ b/0010-rules-Gentoo-update.patch @@ -146,5 +146,5 @@ index df6c880..0000000 -LABEL="drivers_end" - -- -1.5.2.4 +1.5.3.3 diff --git a/0011-add-name-substitution.patch b/0011-add-name-substitution.patch index b0b2818..571c9b6 100644 --- a/0011-add-name-substitution.patch +++ b/0011-add-name-substitution.patch @@ -108,5 +108,5 @@ index 3c46617..5ff5d3f 100644 if (limit && childs_count++ > limit) { dbg("%llu, maximum number (%i) of childs reached", msg->seqnum, childs_count); -- -1.5.2.4 +1.5.3.3 diff --git a/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch b/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch index 9a7b550..41699ca 100644 --- a/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch +++ b/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch @@ -98,5 +98,5 @@ index 01fb211..364d1b7 100644 if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { struct name_entry *entry; -- -1.5.2.4 +1.5.3.3 diff --git a/0013-print-warning-for-invalid-TEST-operations.patch b/0013-print-warning-for-invalid-TEST-operations.patch index e53425d..564b281 100644 --- a/0013-print-warning-for-invalid-TEST-operations.patch +++ b/0013-print-warning-for-invalid-TEST-operations.patch @@ -39,5 +39,5 @@ index 3afc31a..9e43581 100644 if (attr != NULL) rule->test_mode_mask = strtol(attr, NULL, 8); -- -1.5.2.4 +1.5.3.3 diff --git a/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch b/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch index b5ef73a..3fc4998 100644 --- a/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch +++ b/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch @@ -19,5 +19,5 @@ index f869f51..76f0976 100644 +ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" + -- -1.5.2.4 +1.5.3.3 diff --git a/0015-rules-remove-broken-nvram-group-assignment-without.patch b/0015-rules-remove-broken-nvram-group-assignment-without.patch index 9fedcc6..87ec5ac 100644 --- a/0015-rules-remove-broken-nvram-group-assignment-without.patch +++ b/0015-rules-remove-broken-nvram-group-assignment-without.patch @@ -20,5 +20,5 @@ index 76f0976..633e2e7 100644 KERNEL=="ram1", SYMLINK+="ram" -- -1.5.2.4 +1.5.3.3 diff --git a/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch b/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch index b79e2a2..71b7f78 100644 --- a/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch +++ b/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch @@ -36,5 +36,5 @@ index fcd52d0..25eed86 100644 } } -- -1.5.2.4 +1.5.3.3 diff --git a/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch b/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch index 58dd940..8b7b2e9 100644 --- a/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch +++ b/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch @@ -23,5 +23,5 @@ index ef352ca..dcd0914 100644 goto nomatch; } -- -1.5.2.4 +1.5.3.3 diff --git a/0018-correct-includes-in-udev_selinux.c.patch b/0018-correct-includes-in-udev_selinux.c.patch index 54424f9..3b605a1 100644 --- a/0018-correct-includes-in-udev_selinux.c.patch +++ b/0018-correct-includes-in-udev_selinux.c.patch @@ -22,5 +22,5 @@ index 1ad6e8a..3fa84a0 100644 #include "udev.h" -- -1.5.2.4 +1.5.3.3 diff --git a/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch b/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch index 0c2121d..f891a79 100644 --- a/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch +++ b/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch @@ -20,5 +20,5 @@ index 854809a..bdce004 100644 # network KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" -- -1.5.2.4 +1.5.3.3 diff --git a/0020-path_id-fix-for-stacked-class-devices.patch b/0020-path_id-fix-for-stacked-class-devices.patch index 8c383e9..a78c30d 100644 --- a/0020-path_id-fix-for-stacked-class-devices.patch +++ b/0020-path_id-fix-for-stacked-class-devices.patch @@ -25,5 +25,5 @@ index 57879b5..a3a627e 100755 esac full_sysfs_device_path="`pwd -P`" -- -1.5.2.4 +1.5.3.3 diff --git a/0021-check-line-length-after-comment-check-and-whitespace.patch b/0021-check-line-length-after-comment-check-and-whitespace.patch index 52e4000..f104c16 100644 --- a/0021-check-line-length-after-comment-check-and-whitespace.patch +++ b/0021-check-line-length-after-comment-check-and-whitespace.patch @@ -65,5 +65,5 @@ index dcd0914..3ec8477 100644 line[count] = '\0'; -- -1.5.2.4 +1.5.3.3 diff --git a/0022-only-install-.rules.patch b/0022-only-install-.rules.patch index 04a0d13..14bc15f 100644 --- a/0022-only-install-.rules.patch +++ b/0022-only-install-.rules.patch @@ -25,5 +25,5 @@ index 39ffc7d..92ca846 100644 done @ extras="$(EXTRAS)"; for target in $$extras; do \ -- -1.5.2.4 +1.5.3.3 diff --git a/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch b/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch index 4ba4f4f..c78ec9c 100644 --- a/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch +++ b/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch @@ -44,5 +44,5 @@ index 25eed86..556a442 100644 } -- -1.5.2.4 +1.5.3.3 diff --git a/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch b/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch index eb82686..e9cdd82 100644 --- a/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch +++ b/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch @@ -99,5 +99,5 @@ index 5ff5d3f..eb311df 100644 /* run one event after the other in debug mode */ if (debug_trace) { -- -1.5.2.4 +1.5.3.3 diff --git a/0025-rules-add-memstick-module-loading.patch b/0025-rules-add-memstick-module-loading.patch index ed61a06..a212e44 100644 --- a/0025-rules-add-memstick-module-loading.patch +++ b/0025-rules-add-memstick-module-loading.patch @@ -20,5 +20,5 @@ index 3388266..5340565 100644 SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" -- -1.5.2.4 +1.5.3.3 diff --git a/0026-remove-extra-space-from-udevinfo-symlink-output.patch b/0026-remove-extra-space-from-udevinfo-symlink-output.patch index 8342baa..8f7caa4 100644 --- a/0026-remove-extra-space-from-udevinfo-symlink-output.patch +++ b/0026-remove-extra-space-from-udevinfo-symlink-output.patch @@ -31,5 +31,5 @@ index be9aa76..8e54705 100644 break; case QUERY_PATH: -- -1.5.2.4 +1.5.3.3 diff --git a/0027-udevinfo-simplify-symlink-printing-logic.patch b/0027-udevinfo-simplify-symlink-printing-logic.patch index fb73777..bd11d50 100644 --- a/0027-udevinfo-simplify-symlink-printing-logic.patch +++ b/0027-udevinfo-simplify-symlink-printing-logic.patch @@ -42,5 +42,5 @@ index 8e54705..eb9b353 100644 case QUERY_PATH: printf("%s\n", udev->dev->devpath); -- -1.5.2.4 +1.5.3.3 diff --git a/0028-prevent-wrong-symlink-creation-if-database-disagress.patch b/0028-prevent-wrong-symlink-creation-if-database-disagress.patch index 85d092c..613d73f 100644 --- a/0028-prevent-wrong-symlink-creation-if-database-disagress.patch +++ b/0028-prevent-wrong-symlink-creation-if-database-disagress.patch @@ -31,5 +31,5 @@ index 556a442..c620e4a 100644 if (udev_db == NULL) continue; -- -1.5.2.4 +1.5.3.3 diff --git a/0029-fix-wrong-variable-used-in-logged-string.patch b/0029-fix-wrong-variable-used-in-logged-string.patch index 4f94a64..600ce14 100644 --- a/0029-fix-wrong-variable-used-in-logged-string.patch +++ b/0029-fix-wrong-variable-used-in-logged-string.patch @@ -21,5 +21,5 @@ index 3ec8477..5ae4aa2 100644 } -- -1.5.2.4 +1.5.3.3 diff --git a/0030-update-README.patch b/0030-update-README.patch index 5f30892..4330e5e 100644 --- a/0030-update-README.patch +++ b/0030-update-README.patch @@ -39,5 +39,5 @@ index 74aa790..b37d0d5 100644 Operation: -- -1.5.2.4 +1.5.3.3 diff --git a/0031-rule_generator-move-all-policy-from-write_net_rules.patch b/0031-rule_generator-move-all-policy-from-write_net_rules.patch index 82cc2ac..69c1814 100644 --- a/0031-rule_generator-move-all-policy-from-write_net_rules.patch +++ b/0031-rule_generator-move-all-policy-from-write_net_rules.patch @@ -240,5 +240,5 @@ index 62acb88..b25ecfd 100644 exit 0 - -- -1.5.2.4 +1.5.3.3 diff --git a/0032-rules-Gentoo-update.patch b/0032-rules-Gentoo-update.patch new file mode 100644 index 0000000..32853ad --- /dev/null +++ b/0032-rules-Gentoo-update.patch @@ -0,0 +1,389 @@ +From fdec9861b9ee473c98229f3f4d9178e2c85b5dc5 Mon Sep 17 00:00:00 2001 +From: Matthias Schwarzott +Date: Mon, 24 Sep 2007 02:59:22 +0200 +Subject: [PATCH] rules: Gentoo update + +--- + etc/udev/gentoo/30-kernel-compat.rules | 10 +- + etc/udev/gentoo/40-audio.rules | 23 +++ + etc/udev/gentoo/40-video.rules | 24 +++ + etc/udev/gentoo/50-udev.rules | 255 -------------------------------- + etc/udev/gentoo/65-permissions.rules | 20 +++ + 5 files changed, 72 insertions(+), 260 deletions(-) + create mode 100644 etc/udev/gentoo/40-audio.rules + create mode 100644 etc/udev/gentoo/40-video.rules + delete mode 100644 etc/udev/gentoo/50-udev.rules + create mode 100644 etc/udev/gentoo/65-permissions.rules + +diff --git a/etc/udev/gentoo/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules +index 7bc55c6..1f767df 100644 +--- a/etc/udev/gentoo/30-kernel-compat.rules ++++ b/etc/udev/gentoo/30-kernel-compat.rules +@@ -34,13 +34,13 @@ SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" + # 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/etc/udev/gentoo/40-audio.rules b/etc/udev/gentoo/40-audio.rules +new file mode 100644 +index 0000000..8dfcb28 +--- /dev/null ++++ b/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" ++ +diff --git a/etc/udev/gentoo/40-video.rules b/etc/udev/gentoo/40-video.rules +new file mode 100644 +index 0000000..aafcb2d +--- /dev/null ++++ b/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/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules +deleted file mode 100644 +index 7c2ac81..0000000 +--- a/etc/udev/gentoo/50-udev.rules ++++ /dev/null +@@ -1,255 +0,0 @@ +-# 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 +-# +- +-# Net devices can have arbitrary names, even +-# ones set by the user. Not try to match normal +-# rules on net devices (Bug #166652) +-SUBSYSTEM=="net", GOTO="gentoo_device_rules_end" +- +-# 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" +-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" +- +-# assign cdrom-permission also to associated generic device (for cd-burning ...) +-KERNEL=="sg[0-9]*", ACTION=="add", ATTRS{type}=="4|5", 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" +- +-# fb devices +-KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video" +- +-# floppy devices +-KERNEL=="fd[0-9]*", NAME="floppy/%k", SYMLINK+="%k", GROUP="floppy" +-KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/floppy/%k" +-KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f $root/floppy/%k?*'" +- +-# 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="0664" +-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="0660", OPTIONS+="ignore_remove" +-KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" +- +-# 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 +-SUBSYSTEM=="raw", 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" +-KERNEL=="lp[0-9]*", SUBSYSTEM=="usb", 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" +- +- +-SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ +- NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0664" +- +-# Timeouts for scsi devices +-# 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. +-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" +- +- +-# Load firmware +-SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" +- +-LABEL="gentoo_device_rules_end" +diff --git a/etc/udev/gentoo/65-permissions.rules b/etc/udev/gentoo/65-permissions.rules +new file mode 100644 +index 0000000..1cc31af +--- /dev/null ++++ b/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" ++ +-- +1.5.3.3 + diff --git a/0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch b/0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch new file mode 100644 index 0000000..1400d77 --- /dev/null +++ b/0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch @@ -0,0 +1,25 @@ +From 5d374a84fff74853b872ec3a661fb841a2c51d8d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 25 Sep 2007 02:24:29 +0200 +Subject: [PATCH] rules: call usb_id only for SUBSYSTEMS=="usb" + +--- + etc/udev/rules.d/60-persistent-storage.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index 63e715d..017f0cd 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -35,7 +35,7 @@ KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODE + KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" + + KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" +-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="usb_id --export %p" ++KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" + KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" + KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --ignore-sysfs -s %p -d $tempnode", ENV{ID_BUS}="cciss" + KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +-- +1.5.3.3 + diff --git a/0034-rules-split-out-and-fix-persistent-tape-rules.patch b/0034-rules-split-out-and-fix-persistent-tape-rules.patch new file mode 100644 index 0000000..ad10949 --- /dev/null +++ b/0034-rules-split-out-and-fix-persistent-tape-rules.patch @@ -0,0 +1,91 @@ +From 31150fbbc7ee47260e5446ede5e24c8b87f4412a Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 25 Sep 2007 12:20:17 +0200 +Subject: [PATCH] rules: split out and fix persistent tape rules + +Thanks to: Robin H. Johnson for the suggestion. +--- + etc/udev/rules.d/60-persistent-storage-tape.rules | 21 +++++++++++++++++++++ + etc/udev/rules.d/60-persistent-storage.rules | 18 +++++------------- + 2 files changed, 26 insertions(+), 13 deletions(-) + create mode 100644 etc/udev/rules.d/60-persistent-storage-tape.rules + +diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules +new file mode 100644 +index 0000000..d2dbc71 +--- /dev/null ++++ b/etc/udev/rules.d/60-persistent-storage-tape.rules +@@ -0,0 +1,21 @@ ++# do not edit this file, it will be overwritten on update ++ ++# persistent storage links: /dev/tape/{by-id,by-path} ++ ++ACTION!="add", GOTO="persistent_storage_tape_end" ++ ++KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" ++ ++# type 8 devices are "Medium Changers" ++KERNEL=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" ++ ++KERNEL=="st[0-9]*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" ++KERNEL=="st[0-9]*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" ++KERNEL=="st[0-9]*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" ++KERNEL=="st[0-9]*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" ++ ++# by-path (shortest physical path) ++KERNEL=="st[0-9]*", IMPORT{program}="path_id %p" ++KERNEL=="st[0-9]*", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" ++ ++LABEL="persistent_storage_tape_end" +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index 017f0cd..68fe59f 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -1,15 +1,9 @@ + # do not edit this file, it will be overwritten on update + +-# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name} ++# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + + ACTION!="add", GOTO="persistent_storage_end" +- +-KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" +- +-# type 8 devices are "Medium Changers" +-KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +- + SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # skip rules for inappropriate block devices +@@ -34,13 +28,12 @@ KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode" + KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" + KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" + +-KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" +-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" +-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" ++KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" ++KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" ++KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" + KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --ignore-sysfs -s %p -d $tempnode", ENV{ID_BUS}="cciss" + KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" +-KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + + # libata compat (links like hd*) + KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", RESULT=="?*", ENV{ID_ATA_COMPAT}="$result", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}" +@@ -53,9 +46,8 @@ KERNEL=="mmcblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+= + ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p" + ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" + ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" +-KERNEL=="st*", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" + +-KERNEL=="sr*|st*", GOTO="persistent_storage_end" ++KERNEL=="sr*", GOTO="persistent_storage_end" + KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # by-label/by-uuid (filesystem properties) +-- +1.5.3.3 + diff --git a/0035-fix-debug-output-string.patch b/0035-fix-debug-output-string.patch new file mode 100644 index 0000000..99a93d5 --- /dev/null +++ b/0035-fix-debug-output-string.patch @@ -0,0 +1,25 @@ +From d438c80e57b1cc98540399f817eda7fc2568cc72 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 25 Sep 2007 13:45:49 +0200 +Subject: [PATCH] fix debug output string + +--- + udev_sysfs.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev_sysfs.c b/udev_sysfs.c +index d5b04c3..e8909f9 100644 +--- a/udev_sysfs.c ++++ b/udev_sysfs.c +@@ -415,7 +415,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + /* read attribute value */ + fd = open(path_full, O_RDONLY); + if (fd < 0) { +- dbg("attribute '%s' does not exist", path_full); ++ dbg("attribute '%s' can not be opened", path_full); + goto out; + } + size = read(fd, value, sizeof(value)); +-- +1.5.3.3 + diff --git a/0036-rule_generator-always-match-netif-type-in-generated.patch b/0036-rule_generator-always-match-netif-type-in-generated.patch new file mode 100644 index 0000000..78cab91 --- /dev/null +++ b/0036-rule_generator-always-match-netif-type-in-generated.patch @@ -0,0 +1,35 @@ +From 8fe5f78b7e53bcae858824f40e03d60ba19eae73 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 25 Sep 2007 17:18:49 +0200 +Subject: [PATCH] rule_generator: always match netif type in generated rule + +--- + .../75-persistent-net-generator.rules | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules +index d09bc38..726bf27 100644 +--- a/extras/rule_generator/75-persistent-net-generator.rules ++++ b/extras/rule_generator/75-persistent-net-generator.rules +@@ -20,15 +20,15 @@ NAME=="?*", GOTO="persistent_net_generator_end" + # device name whitelist + KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" + +-# add interface type match for some devices +-KERNEL=="wlan*|ath*", ENV{MATCHIFTYPE}="1" +- + # ignore Xen virtual interfaces + SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" + + # read MAC address + ENV{MATCHADDR}="$attr{address}" + ++# match interface type ++ENV{MATCHIFTYPE}="$attr{type}" ++ + # do not use "locally administered" MAC address + ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" + +-- +1.5.3.3 + diff --git a/0037-rules-Gentoo-update.patch b/0037-rules-Gentoo-update.patch new file mode 100644 index 0000000..92f5fce --- /dev/null +++ b/0037-rules-Gentoo-update.patch @@ -0,0 +1,53 @@ +From 38e62fef89097ec3604320104197c48ebda0d591 Mon Sep 17 00:00:00 2001 +From: Matthias Schwarzott +Date: Tue, 25 Sep 2007 17:52:42 +0200 +Subject: [PATCH] rules: Gentoo update + +--- + etc/udev/gentoo/40-audio.rules | 23 ----------------------- + etc/udev/gentoo/65-permissions.rules | 2 ++ + 2 files changed, 2 insertions(+), 23 deletions(-) + delete mode 100644 etc/udev/gentoo/40-audio.rules + +diff --git a/etc/udev/gentoo/40-audio.rules b/etc/udev/gentoo/40-audio.rules +deleted file mode 100644 +index 8dfcb28..0000000 +--- a/etc/udev/gentoo/40-audio.rules ++++ /dev/null +@@ -1,23 +0,0 @@ +-# 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" +- +diff --git a/etc/udev/gentoo/65-permissions.rules b/etc/udev/gentoo/65-permissions.rules +index 1cc31af..523c79d 100644 +--- a/etc/udev/gentoo/65-permissions.rules ++++ b/etc/udev/gentoo/65-permissions.rules +@@ -18,3 +18,5 @@ 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|snd", GROUP="audio" +-- +1.5.3.3 + diff --git a/udev.spec b/udev.spec index 165ffbd..f4f1503 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 4.20070921git%{?dist} +Release: 5.20071012git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -49,6 +49,12 @@ Patch28: 0028-prevent-wrong-symlink-creation-if-database-disagress.patch Patch29: 0029-fix-wrong-variable-used-in-logged-string.patch Patch30: 0030-update-README.patch Patch31: 0031-rule_generator-move-all-policy-from-write_net_rules.patch +Patch32: 0032-rules-Gentoo-update.patch +Patch33: 0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch +Patch34: 0034-rules-split-out-and-fix-persistent-tape-rules.patch +Patch35: 0035-fix-debug-output-string.patch +Patch36: 0036-rule_generator-always-match-netif-type-in-generated.patch +Patch37: 0037-rules-Gentoo-update.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -128,6 +134,12 @@ which contains functions to get volume ids. %patch29 -p1 -b .git29 %patch30 -p1 -b .git30 %patch31 -p1 -b .git31 +%patch32 -p1 -b .git32 +%patch33 -p1 -b .git33 +%patch34 -p1 -b .git34 +%patch35 -p1 -b .git35 +%patch36 -p1 -b .git36 +%patch37 -p1 -b .git37 %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -273,15 +285,13 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} -# short-term workaround -mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules -cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules </dev/null 2>&1 & +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d +cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp < 115-5.20071012git +- added upstream patch for rhbz#328691 +- moved floppy module loading to pnp-alias in /etc/modprobe.d/floppy-pnp + +* Wed Oct 10 2007 Harald Hoyer 115-5.20070921git +- better modprobe options for the kernel command line 'modprobedebug' option + * Fri Sep 21 2007 Harald Hoyer - 115-4 - more upstream fixes from git From 2f5badf034631d87610f847bd13ad2b4a84887a4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 2 Nov 2007 13:51:15 +0000 Subject: [PATCH 14/16] - fixed preun chkconfig - added /sbin path to chkconfig in post section - patch: do not generate net rules for type > 256 - fixes glitches appearing in bz#323991 - sparc64 requires -fPIE not -fpie - version 116 --- ...if-strlcpy-strlcat-indicate-truncati.patch | 95 -- 0002-rules-fix-two-trivial-typos.patch | 35 - 0003-rules-random-and-urandom-are-0666.patch | 38 - 0004-rules-add-REMOVE_CMD-rule.patch | 25 - ...nts-to-rename-database-and-failed-fi.patch | 248 ---- 0006-rules-Gentoo-update.patch | 206 ---- 0007-rules-add-i2o-driver-rule.patch | 24 - 0008-man-recreate-man-pages.patch | 1094 ----------------- ...inux_raid-metadata-version-1.0-detec.patch | 35 - 0010-rules-Gentoo-update.patch | 150 --- 0011-add-name-substitution.patch | 112 -- ...he-device-node-with-ignore_remove-bu.patch | 102 -- ...-warning-for-invalid-TEST-operations.patch | 43 - ...-delete-lib-udev-devices-nodes-on-re.patch | 23 - ...roken-nvram-group-assignment-without.patch | 24 - ...-symlink-if-new-rtc-drivers-are-used.patch | 40 - ...WAIT_FOR_SYSFS-timeout-to-10-seconds.patch | 27 - 0018-correct-includes-in-udev_selinux.c.patch | 26 - ...s-put-bsd-nodes-in-dev-bsd-directory.patch | 24 - ...ath_id-fix-for-stacked-class-devices.patch | 29 - ...h-after-comment-check-and-whitespace.patch | 69 -- 0022-only-install-.rules.patch | 29 - ...de-names-while-restoring-symlinks-fr.patch | 48 - ...n-dev-.udev-queue-instead-of-devpath.patch | 103 -- 0025-rules-add-memstick-module-loading.patch | 24 - ...a-space-from-udevinfo-symlink-output.patch | 35 - ...info-simplify-symlink-printing-logic.patch | 46 - ...mlink-creation-if-database-disagress.patch | 35 - ...wrong-variable-used-in-logged-string.patch | 25 - 0030-update-README.patch | 43 - ...move-all-policy-from-write_net_rules.patch | 244 ---- 0032-rules-Gentoo-update.patch | 389 ------ ...-call-usb_id-only-for-SUBSYSTEMS-usb.patch | 25 - ...it-out-and-fix-persistent-tape-rules.patch | 91 -- 0035-fix-debug-output-string.patch | 25 - ...always-match-netif-type-in-generated.patch | 35 - 0037-rules-Gentoo-update.patch | 53 - sources | 2 +- udev.spec | 109 +- 39 files changed, 31 insertions(+), 3799 deletions(-) delete mode 100644 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch delete mode 100644 0002-rules-fix-two-trivial-typos.patch delete mode 100644 0003-rules-random-and-urandom-are-0666.patch delete mode 100644 0004-rules-add-REMOVE_CMD-rule.patch delete mode 100644 0005-track-move-events-to-rename-database-and-failed-fi.patch delete mode 100644 0006-rules-Gentoo-update.patch delete mode 100644 0007-rules-add-i2o-driver-rule.patch delete mode 100644 0008-man-recreate-man-pages.patch delete mode 100644 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch delete mode 100644 0010-rules-Gentoo-update.patch delete mode 100644 0011-add-name-substitution.patch delete mode 100644 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch delete mode 100644 0013-print-warning-for-invalid-TEST-operations.patch delete mode 100644 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch delete mode 100644 0015-rules-remove-broken-nvram-group-assignment-without.patch delete mode 100644 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch delete mode 100644 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch delete mode 100644 0018-correct-includes-in-udev_selinux.c.patch delete mode 100644 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch delete mode 100644 0020-path_id-fix-for-stacked-class-devices.patch delete mode 100644 0021-check-line-length-after-comment-check-and-whitespace.patch delete mode 100644 0022-only-install-.rules.patch delete mode 100644 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch delete mode 100644 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch delete mode 100644 0025-rules-add-memstick-module-loading.patch delete mode 100644 0026-remove-extra-space-from-udevinfo-symlink-output.patch delete mode 100644 0027-udevinfo-simplify-symlink-printing-logic.patch delete mode 100644 0028-prevent-wrong-symlink-creation-if-database-disagress.patch delete mode 100644 0029-fix-wrong-variable-used-in-logged-string.patch delete mode 100644 0030-update-README.patch delete mode 100644 0031-rule_generator-move-all-policy-from-write_net_rules.patch delete mode 100644 0032-rules-Gentoo-update.patch delete mode 100644 0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch delete mode 100644 0034-rules-split-out-and-fix-persistent-tape-rules.patch delete mode 100644 0035-fix-debug-output-string.patch delete mode 100644 0036-rule_generator-always-match-netif-type-in-generated.patch delete mode 100644 0037-rules-Gentoo-update.patch diff --git a/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch b/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch deleted file mode 100644 index bae4110..0000000 --- a/0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 1f7a36f2c0953c60a8d7acadc281285a0b84fb46 Mon Sep 17 00:00:00 2001 -From: Michael Morony -Date: Fri, 24 Aug 2007 08:14:21 +0200 -Subject: [PATCH] set buffer size if strlcpy/strlcat indicate truncation - ---- - udev_rules.c | 4 +++- - udev_sysfs.c | 2 ++ - udevinfo.c | 2 ++ - udevmonitor.c | 4 ---- - udevtrigger.c | 2 ++ - 5 files changed, 9 insertions(+), 5 deletions(-) - -diff --git a/udev_rules.c b/udev_rules.c -index 0dcbf15..35db958 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -475,10 +475,12 @@ static int pass_env_to_socket(const char *sockname, const char *devpath, const c - - bufpos = snprintf(buf, sizeof(buf)-1, "%s@%s", action, devpath); - bufpos++; -- for (i = 0; environ[i] != NULL && bufpos < sizeof(buf); i++) { -+ for (i = 0; environ[i] != NULL && bufpos < (sizeof(buf)-1); i++) { - bufpos += strlcpy(&buf[bufpos], environ[i], sizeof(buf) - bufpos-1); - bufpos++; - } -+ if (bufpos > sizeof(buf)) -+ bufpos = sizeof(buf); - - count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, addrlen); - if (count < 0) -diff --git a/udev_sysfs.c b/udev_sysfs.c -index 34ae9ac..d5b04c3 100644 ---- a/udev_sysfs.c -+++ b/udev_sysfs.c -@@ -355,6 +355,8 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - - dbg("open '%s'/'%s'", devpath, attr_name); - sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full)); -+ if(sysfs_len >= sizeof(path_full)) -+ sysfs_len = sizeof(path_full) - 1; - path = &path_full[sysfs_len]; - strlcat(path_full, devpath, sizeof(path_full)); - strlcat(path_full, "/", sizeof(path_full)); -diff --git a/udevinfo.c b/udevinfo.c -index d0b1c44..be9aa76 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -79,6 +79,8 @@ static void print_all_attributes(const char *devpath, const char *key) - if (attr_value == NULL) - continue; - len = strlcpy(value, attr_value, sizeof(value)); -+ if(len >= sizeof(value)) -+ len = sizeof(value) - 1; - dbg("attr '%s'='%s'(%zi)", dent->d_name, value, len); - - /* remove trailing newlines */ -diff --git a/udevmonitor.c b/udevmonitor.c -index a9cc061..644a955 100644 ---- a/udevmonitor.c -+++ b/udevmonitor.c -@@ -43,7 +43,6 @@ static int init_udev_monitor_socket(void) - { - struct sockaddr_un saddr; - socklen_t addrlen; -- const int feature_on = 1; - int retval; - - memset(&saddr, 0x00, sizeof(saddr)); -@@ -67,9 +66,6 @@ static int init_udev_monitor_socket(void) - return -1; - } - -- /* enable receiving of the sender credentials */ -- setsockopt(udev_monitor_sock, SOL_SOCKET, SO_PASSCRED, &feature_on, sizeof(feature_on)); -- - return 0; - } - -diff --git a/udevtrigger.c b/udevtrigger.c -index cf8f209..309c54a 100644 ---- a/udevtrigger.c -+++ b/udevtrigger.c -@@ -435,6 +435,8 @@ static void scan_failed(void) - continue; - - start = strlcpy(device, sysfs_path, sizeof(device)); -+ if(start >= sizeof(device)) -+ start = sizeof(device) - 1; - strlcat(device, dent->d_name, sizeof(device)); - path_decode(&device[start]); - device_list_insert(device); --- -1.5.3.3 - diff --git a/0002-rules-fix-two-trivial-typos.patch b/0002-rules-fix-two-trivial-typos.patch deleted file mode 100644 index c80eea9..0000000 --- a/0002-rules-fix-two-trivial-typos.patch +++ /dev/null @@ -1,35 +0,0 @@ -From d98c6dfebc2186b841c92eeb002c03938f28cdc6 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 24 Aug 2007 20:34:44 +0200 -Subject: [PATCH] rules: fix two trivial typos - -Thanks to: Alexander E. Patrakov ---- - etc/udev/rules.d/50-udev-default.rules | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index bff2fe5..b3c0cfc 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -58,7 +58,7 @@ SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{ - KERNEL=="parport[0-9]*", GROUP="lp" - SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" - SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" --KERNEL=="lp[0-9]*", GROUP="lp" SYMLINK+="par%n" -+KERNEL=="lp[0-9]*", GROUP="lp", SYMLINK+="par%n" - KERNEL=="irlpt[0-9]*", GROUP="lp" - - # block, tapes, block-releated -@@ -71,7 +71,7 @@ KERNEL=="fd[0-9]", GROUP="floppy" - KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k" - KERNEL=="sch[0-9]*", GROUP="disk" - KERNEL=="sg[0-9]*", GROUP="disk", MODE="0640" --KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk"" -+KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" - KERNEL=="pg[0-9]*", GROUP="disk" - KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" - KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" --- -1.5.3.3 - diff --git a/0003-rules-random-and-urandom-are-0666.patch b/0003-rules-random-and-urandom-are-0666.patch deleted file mode 100644 index 708b529..0000000 --- a/0003-rules-random-and-urandom-are-0666.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b6e4b08dc14444790c1560108e93a67e57e1148b Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sat, 25 Aug 2007 14:07:02 +0200 -Subject: [PATCH] rules: random and urandom are 0666 - -Thanks to: Alexander E. Patrakov . ---- - etc/udev/rules.d/50-udev-default.rules | 6 ++---- - 1 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index b3c0cfc..f869f51 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -17,18 +17,16 @@ KERNEL=="hvc*|hvsi*", GROUP="uucp" - KERNEL=="lirc0", SYMLINK+="lirc" - - # mem --KERNEL=="null|zero|random", MODE="0666" -+KERNEL=="null|zero|full|random|urandom", MODE="0666" - KERNEL=="null", SYMLINK+="XOR" - KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" - KERNEL=="nvram", GROUP="kmem", MODE="0600" - KERNEL=="ram0", SYMLINK+="ramdisk" - KERNEL=="ram1", SYMLINK+="ram" --KERNEL=="urandom", MODE="0644" --KERNEL=="full", MODE="0666" - - # input - KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" --KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0600" -+KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0600" - KERNEL=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k" - - # video4linux --- -1.5.3.3 - diff --git a/0004-rules-add-REMOVE_CMD-rule.patch b/0004-rules-add-REMOVE_CMD-rule.patch deleted file mode 100644 index 559a590..0000000 --- a/0004-rules-add-REMOVE_CMD-rule.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3f781cab37dbee76340c65602555a524ffea96f9 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 26 Aug 2007 00:48:49 +0200 -Subject: [PATCH] rules: add REMOVE_CMD rule - ---- - etc/udev/rules.d/95-udev-late.rules | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/etc/udev/rules.d/95-udev-late.rules b/etc/udev/rules.d/95-udev-late.rules -index 1755d08..4a015b9 100644 ---- a/etc/udev/rules.d/95-udev-late.rules -+++ b/etc/udev/rules.d/95-udev-late.rules -@@ -1,5 +1,8 @@ - # do not edit this file, it will be overwritten on update - -+# run a command on remove events -+ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" -+ - # event to be catched by udevmonitor - RUN+="socket:/org/kernel/udev/monitor" - --- -1.5.3.3 - diff --git a/0005-track-move-events-to-rename-database-and-failed-fi.patch b/0005-track-move-events-to-rename-database-and-failed-fi.patch deleted file mode 100644 index 84a845d..0000000 --- a/0005-track-move-events-to-rename-database-and-failed-fi.patch +++ /dev/null @@ -1,248 +0,0 @@ -From a2f2270eef499f6f60075a149011e3e3851ab5ef Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 26 Aug 2007 05:22:35 +0200 -Subject: [PATCH] track "move" events to rename database and failed files - ---- - udev.h | 2 ++ - udev_db.c | 10 ++++++++++ - udev_device.c | 4 ++++ - udevd.c | 54 ++++++++++++++++++++++++++++++++++++++++++------------ - udevd.h | 1 + - 5 files changed, 59 insertions(+), 12 deletions(-) - -diff --git a/udev.h b/udev.h -index f13eb83..33b39aa 100644 ---- a/udev.h -+++ b/udev.h -@@ -69,6 +69,7 @@ struct udevice { - struct sysfs_device dev_local; - struct sysfs_device *dev_parent; /* current parent device used for matching */ - char action[NAME_SIZE]; -+ char *devpath_old; - - /* node */ - char name[PATH_SIZE]; -@@ -131,6 +132,7 @@ extern int udev_node_remove(struct udevice *udev); - /* udev_db.c */ - extern int udev_db_add_device(struct udevice *dev); - extern int udev_db_delete_device(struct udevice *dev); -+extern int udev_db_rename(const char *devpath_old, const char *devpath); - extern int udev_db_get_device(struct udevice *udev, const char *devpath); - extern int udev_db_get_devices_by_name(const char *name, struct list_head *name_list); - extern int udev_db_get_all_entries(struct list_head *name_list); -diff --git a/udev_db.c b/udev_db.c -index abc1e5a..29aa031 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -117,6 +117,16 @@ out: - return rc; - } - -+int udev_db_rename(const char *devpath_old, const char *devpath) -+{ -+ char filename[PATH_SIZE]; -+ char filename_old[PATH_SIZE]; -+ -+ devpath_to_db_path(devpath_old, filename_old, sizeof(filename_old)); -+ devpath_to_db_path(devpath, filename, sizeof(filename)); -+ return rename(filename_old, filename); -+} -+ - int udev_db_add_device(struct udevice *udev) - { - char filename[PATH_SIZE]; -diff --git a/udev_device.c b/udev_device.c -index 23ba313..2b7ffe0 100644 ---- a/udev_device.c -+++ b/udev_device.c -@@ -168,6 +168,10 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - { - int retval = 0; - -+ if (udev->devpath_old != NULL) -+ if (udev_db_rename(udev->devpath_old, udev->dev->devpath) == 0) -+ info("moved database from '%s' to '%s'", udev->devpath_old, udev->dev->devpath); -+ - /* add device node */ - if (major(udev->devt) != 0 && - (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) { -diff --git a/udevd.c b/udevd.c -index 8f56de6..3c46617 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -130,6 +130,7 @@ static int udev_event_process(struct udevd_uevent_msg *msg) - return -1; - strlcpy(udev->action, msg->action, sizeof(udev->action)); - sysfs_device_set_values(udev->dev, msg->devpath, msg->subsystem, msg->driver); -+ udev->devpath_old = msg->devpath_old; - udev->devt = msg->devt; - - retval = udev_device_event(&rules, udev); -@@ -156,14 +157,14 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - struct udevd_uevent_msg *loop_msg; - int fd; - -- /* add location of queue files */ -+ /* location of queue file */ - strlcpy(filename, udev_root, sizeof(filename)); - strlcat(filename, "/", sizeof(filename)); - start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename)); - strlcat(filename, msg->devpath, sizeof(filename)); - path_encode(&filename[start], sizeof(filename) - start); - -- /* add location of failed files */ -+ /* location of failed file */ - strlcpy(filename_failed, udev_root, sizeof(filename_failed)); - strlcat(filename_failed, "/", sizeof(filename_failed)); - start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed)); -@@ -174,6 +175,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - case EVENT_QUEUED: - unlink(filename_failed); - delete_path(filename_failed); -+ - create_path(filename); - fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); - if (fd > 0) -@@ -181,10 +183,25 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - return; - case EVENT_FINISHED: - case EVENT_FAILED: -- unlink(filename_failed); -- delete_path(filename_failed); -+ if (msg->devpath_old != NULL) { -+ /* "move" event - rename failed file to current name, do not delete failed */ -+ char filename_failed_old[PATH_SIZE]; -+ -+ strlcpy(filename_failed_old, udev_root, sizeof(filename_failed_old)); -+ strlcat(filename_failed_old, "/", sizeof(filename_failed_old)); -+ start = strlcat(filename_failed_old, EVENT_FAILED_DIR"/", sizeof(filename_failed_old)); -+ strlcat(filename_failed_old, msg->devpath_old, sizeof(filename_failed_old)); -+ path_encode(&filename_failed_old[start], sizeof(filename) - start); -+ -+ if (rename(filename_failed_old, filename_failed) == 0) -+ info("renamed devpath, moved failed state of '%s' to %s'", -+ msg->devpath_old, msg->devpath); -+ } else { -+ unlink(filename_failed); -+ delete_path(filename_failed); -+ } - -- /* don't remove, if events for the same path are still pending */ -+ /* skip if events for the same path are still pending */ - list_for_each_entry(loop_msg, &running_list, node) - if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) - return; -@@ -193,7 +210,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) - return; - -- /* move failed events to the failed directory */ -+ /* move failed event to the failed directory */ - if (state == EVENT_FAILED) { - create_path(filename_failed); - rename(filename, filename_failed); -@@ -201,7 +218,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - unlink(filename); - } - -- /* clean up the queue directory */ -+ /* clean up possibly empty queue directory */ - delete_path(filename); - - return; -@@ -212,7 +229,7 @@ static void msg_queue_delete(struct udevd_uevent_msg *msg) - { - list_del(&msg->node); - -- /* mark as failed, if add event returns non-zero */ -+ /* mark as failed, if "add" event returns non-zero */ - if (msg->exitstatus && strcmp(msg->action, "add") == 0) - export_event_state(msg, EVENT_FAILED); - else -@@ -280,6 +297,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) - } - - export_event_state(msg, EVENT_QUEUED); -+ info("seq %llu forked, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); - - /* run one event after the other in debug mode */ - if (debug_trace) { -@@ -469,11 +487,16 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - if (loop_msg->seqnum >= msg->seqnum) - break; - -+ /* check our old name */ -+ if (msg->devpath_old != NULL) -+ if (strcmp(loop_msg->devpath , msg->devpath_old) == 0) -+ return 2; -+ - /* check identical, parent, or child device event */ - if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { - dbg("%llu, device event still pending %llu (%s)", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); -- return 2; -+ return 3; - } - - /* check physical device event (special case of parent) */ -@@ -481,7 +504,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - if (compare_devpath(loop_msg->devpath, msg->physdevpath) != 0) { - dbg("%llu, physical device event still pending %llu (%s)", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); -- return 3; -+ return 4; - } - } - -@@ -492,11 +515,16 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - return 1; - } - -+ /* check our old name */ -+ if (msg->devpath_old != NULL) -+ if (strcmp(loop_msg->devpath , msg->devpath_old) == 0) -+ return 2; -+ - /* check identical, parent, or child device event */ - if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { - dbg("%llu, device event still running %llu (%s)", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); -- return 2; -+ return 3; - } - - /* check physical device event (special case of parent) */ -@@ -504,7 +532,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - if (compare_devpath(loop_msg->devpath, msg->physdevpath) != 0) { - dbg("%llu, physical device event still running %llu (%s)", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); -- return 3; -+ return 4; - } - } - return 0; -@@ -588,6 +616,8 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz - msg->driver = &key[7]; - else if (strncmp(key, "SEQNUM=", 7) == 0) - msg->seqnum = strtoull(&key[7], NULL, 10); -+ else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) -+ msg->devpath_old = &key[12]; - else if (strncmp(key, "PHYSDEVPATH=", 12) == 0) - msg->physdevpath = &key[12]; - else if (strncmp(key, "PHYSDEVDRIVER=", 14) == 0) -diff --git a/udevd.h b/udevd.h -index 4ca6d1d..9be34cb 100644 ---- a/udevd.h -+++ b/udevd.h -@@ -66,6 +66,7 @@ struct udevd_uevent_msg { - char *driver; - dev_t devt; - unsigned long long seqnum; -+ char *devpath_old; - char *physdevpath; - unsigned int timeout; - char *envp[UEVENT_NUM_ENVP+1]; --- -1.5.3.3 - diff --git a/0006-rules-Gentoo-update.patch b/0006-rules-Gentoo-update.patch deleted file mode 100644 index 6b0d986..0000000 --- a/0006-rules-Gentoo-update.patch +++ /dev/null @@ -1,206 +0,0 @@ -From 2bf0a506bc13abc5632079232bee6f8784934633 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 26 Aug 2007 13:54:32 +0200 -Subject: [PATCH] rules: Gentoo update - ---- - etc/udev/gentoo/05-udev-early.rules | 7 ++-- - etc/udev/gentoo/50-udev.rules | 8 +---- - etc/udev/gentoo/80-drivers.rules | 44 ++++++++++++++++++++++++++++ - etc/udev/gentoo/80-hotplug.rules | 54 ----------------------------------- - etc/udev/gentoo/90-network.rules | 8 +++++ - etc/udev/gentoo/95-udev-late.rules | 18 ----------- - 6 files changed, 57 insertions(+), 82 deletions(-) - create mode 100644 etc/udev/gentoo/80-drivers.rules - delete mode 100644 etc/udev/gentoo/80-hotplug.rules - create mode 100644 etc/udev/gentoo/90-network.rules - delete mode 100644 etc/udev/gentoo/95-udev-late.rules - -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-drivers.rules b/etc/udev/gentoo/80-drivers.rules -new file mode 100644 -index 0000000..df6c880 ---- /dev/null -+++ b/etc/udev/gentoo/80-drivers.rules -@@ -0,0 +1,44 @@ -+# 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="drivers_end" -+ -+# this driver is broken and should not be loaded automatically -+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}" -+ -+# /etc/modprobe.conf. -+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" -+# needed aliases are defined in /etc/modprobe.d/pnp-aliases -+ -+ -+SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" -+SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" -+SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" -+SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" -+SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" -+ -+# Load driver for scsi-device -+SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" -+ -+ # 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 -+ -+ ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" -+ 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}=="1", ATTRS{vendor}=="On[sS]tream", \ -+ ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" -+ ATTRS{type}=="1", RUN+="modprobe.sh st" -+LABEL="hotplug_scsi_end" -+ -+LABEL="drivers_end" -+ -diff --git a/etc/udev/gentoo/80-hotplug.rules b/etc/udev/gentoo/80-hotplug.rules -deleted file mode 100644 -index 0637dbc..0000000 ---- a/etc/udev/gentoo/80-hotplug.rules -+++ /dev/null -@@ -1,54 +0,0 @@ --# /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" -- --# check if the device has already been claimed by a driver --ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_load_end" -- --# this driver is broken and should not be loaded automatically --SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_load_end" -- --# Autoload modules that lack aliases but have them defined in autoload modules --ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}" -- --# /etc/modprobe.conf. --SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" --# needed aliases are defined in /etc/modprobe.d/pnp-aliases -- -- --SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" --SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" --SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" --SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" --SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" -- --# Load driver for scsi-device --SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" -- -- # 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 -- -- ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" -- 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}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" -- ATTRS{type}=="1", RUN+="modprobe.sh st" --LABEL="hotplug_scsi_end" -- --LABEL="hotplug_load_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" -- --- -1.5.3.3 - diff --git a/0007-rules-add-i2o-driver-rule.patch b/0007-rules-add-i2o-driver-rule.patch deleted file mode 100644 index 4a2ad5f..0000000 --- a/0007-rules-add-i2o-driver-rule.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 79ef8431c952349d9f31c899adb579c3ff83a80b Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 28 Aug 2007 04:16:54 +0200 -Subject: [PATCH] rules: add i2o driver rule - ---- - etc/udev/rules.d/80-drivers.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules -index e71f135..3388266 100644 ---- a/etc/udev/rules.d/80-drivers.rules -+++ b/etc/udev/rules.d/80-drivers.rules -@@ -7,6 +7,7 @@ SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \ - RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" - SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" - SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" -+SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" - SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" - SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" - --- -1.5.3.3 - diff --git a/0008-man-recreate-man-pages.patch b/0008-man-recreate-man-pages.patch deleted file mode 100644 index 0a26ff0..0000000 --- a/0008-man-recreate-man-pages.patch +++ /dev/null @@ -1,1094 +0,0 @@ -From dbb2c414d77362a9279f4fc50458054f71ffb7e2 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 28 Aug 2007 04:24:08 +0200 -Subject: [PATCH] man: recreate man pages - ---- - extras/volume_id/vol_id.8 | 28 ++++---- - udev.7 | 182 ++++++++++++++++++++++----------------------- - udevd.8 | 38 +++++----- - udevinfo.8 | 28 ++++---- - udevmonitor.8 | 16 ++-- - udevsettle.8 | 12 ++-- - udevstart.8 | 8 +- - udevtest.8 | 8 +- - udevtrigger.8 | 28 ++++---- - 9 files changed, 172 insertions(+), 176 deletions(-) - -diff --git a/extras/volume_id/vol_id.8 b/extras/volume_id/vol_id.8 -index 7594253..daa583b 100644 ---- a/extras/volume_id/vol_id.8 -+++ b/extras/volume_id/vol_id.8 -@@ -1,6 +1,6 @@ - .\" Title: vol_id - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: March 2006 - .\" Manual: vol_id - .\" Source: volume_id -@@ -11,69 +11,69 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --vol_id \- probe filesystem type and read label and uuid -+vol_id - probe filesystem type and read label and uuid - .SH "SYNOPSIS" - .HP 7 - \fBvol_id\fR [\fB\-\-export\fR] [\fB\-\-type\fR] [\fB\-\-label\fR] [\fB\-\-label\-raw\fR] [\fB\-\-uuid\fR] [\fB\-\-skip\-raid\fR] [\fB\-\-probe\-all\fR] [\fB\-\-help\fR] [\fIdevice\fR] - .SH "DESCRIPTION" - .PP - \fBvol_id\fR --is usually called from a udev rule, to provide udev with the filesystem type, the label and the uuid of a volume. It supports most of the common filesystem formats and detects various raid setups to prevent the recognition of raid members as a volume with a filesystem. -+is usually called from a udev rule, to provide udev with the filesystem type, the label and the uuid of a volume\. It supports most of the common filesystem formats and detects various raid setups to prevent the recognition of raid members as a volume with a filesystem\. - .SH "OPTIONS" - .PP - \fB\-\-export\fR - .RS 4 --Print all values in key/value format to import them into the environment. -+Print all values in key/value format to import them into the environment\. - .RE - .PP - \fB\-\-type\fR - .RS 4 --Print the filesystem type. -+Print the filesystem type\. - .RE - .PP - \fB\-\-label\fR - .RS 4 --Print the safe version of volume label suitable for use as filename. -+Print the safe version of volume label suitable for use as filename\. - .RE - .PP - \fB\-\-label\-raw\fR - .RS 4 --Print the raw volume label. -+Print the raw volume label\. - .RE - .PP - \fB\-\-uuid\fR - .RS 4 --Print the uuid of a volume. -+Print the uuid of a volume\. - .RE - .PP - \fB\-\-skip\-raid\fR - .RS 4 --Skip detection of raid metadata. -+Skip detection of raid metadata\. - .RE - .PP - \fB\-\-probe\-all\fR - .RS 4 --Probe for all types and print all matches. -+Probe for all types and print all matches\. - .RE - .PP - \fB\-\-help\fR - .RS 4 --Print usage. -+Print usage\. - .RE - .SH "ENVIRONMENT" - .PP - \fBUDEV_LOG\fR - .RS 4 --Set the syslog priority. -+Set the syslog priority\. - .RE - .SH "EXIT STATUS" - .PP - \fBvol_id\fR --will only return successful if the value asked for is not empty. All trailing whitespace will be removed, spaces replaced by underscore and slashes ignored. -+will only return successful if the value asked for is not empty\. All trailing whitespace will be removed, spaces replaced by underscore and slashes ignored\. - .SH "AUTHOR" - .PP - Written by Kay Sievers -- -+ - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udev.7 b/udev.7 -index 821a476..5f0ebb9 100644 ---- a/udev.7 -+++ b/udev.7 -@@ -1,6 +1,6 @@ - .\" Title: udev - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: August 2005 - .\" Manual: udev - .\" Source: udev -@@ -11,213 +11,213 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udev \- dynamic device management -+udev - dynamic device management - .SH "DESCRIPTION" - .PP --udev provides a dynamic device directory containing only the files for actually present devices. It creates or removes device node files in the -+udev provides a dynamic device directory containing only the files for actually present devices\. It creates or removes device node files in the - \fI/dev\fR --directory, or it renames network interfaces. -+directory, or it renames network interfaces\. - .PP - Usually udev runs as - \fBudevd\fR(8) --and receives uevents directly from the kernel if a device is added or removed from the system. -+and receives uevents directly from the kernel if a device is added or removed from the system\. - .PP --If udev receives a device event, it matches its configured rules against the available device attributes provided in sysfs to identify the device. Rules that match may provide additional device information or specify a device node name and multiple symlink names and instruct udev to run additional programs as part of the device event handling. -+If udev receives a device event, it matches its configured rules against the available device attributes provided in sysfs to identify the device\. Rules that match may provide additional device information or specify a device node name and multiple symlink names and instruct udev to run additional programs as part of the device event handling\. - .SH "CONFIGURATION" - .PP - All udev configuration files are placed in --\fI/etc/udev/*\fR. Every file consists of a set of lines of text. All empty lines or lines beginning with '#' will be ignored. -+\fI/etc/udev/*\fR\. Every file consists of a set of lines of text\. All empty lines or lines beginning with \'#\' will be ignored\. - .SS "Configuration file" - .PP - udev expects its main configuration file at --\fI/etc/udev/udev.conf\fR. It consists of a set of variables allowing the user to override default udev values. The following variables can be set: -+\fI/etc/udev/udev\.conf\fR\. It consists of a set of variables allowing the user to override default udev values\. The following variables can be set: - .PP - \fBudev_root\fR - .RS 4 --Specifies where to place the device nodes in the filesystem. The default value is --\fI/dev\fR. -+Specifies where to place the device nodes in the filesystem\. The default value is -+\fI/dev\fR\. - .RE - .PP - \fBudev_rules\fR - .RS 4 - The name of the udev rules file or directory to look for files with the suffix --\fI.rules\fR. Multiple rule files are read in lexical order. The default value is --\fI/etc/udev/rules.d\fR. -+\fI\.rules\fR\. Multiple rule files are read in lexical order\. The default value is -+\fI/etc/udev/rules\.d\fR\. - .RE - .PP - \fBudev_log\fR - .RS 4 --The logging priority. Valid values are the numerical syslog priorities or their textual representations: -+The logging priority\. Valid values are the numerical syslog priorities or their textual representations: - \fBerr\fR, - \fBinfo\fR - and --\fBdebug\fR. -+\fBdebug\fR\. - .RE - .SS "Rules files" - .PP - The udev rules are read from the files located in the --\fI/etc/udev/rules.d\fR --directory or at the location specified value in the configuration file. Every line in the rules file contains at least one key value pair. There are two kind of keys, match and assignment keys. If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned. -+\fI/etc/udev/rules\.d\fR -+directory or at the location specified value in the configuration file\. Every line in the rules file contains at least one key value pair\. There are two kind of keys, match and assignment keys\. If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned\. - .PP --A matching rule may specify the name of the device node, add a symlink pointing to the node, or run a specified program as part of the event handling. If no matching rule is found, the default device node name is used. -+A matching rule may specify the name of the device node, add a symlink pointing to the node, or run a specified program as part of the event handling\. If no matching rule is found, the default device node name is used\. - .PP --A rule may consist of a list of one or more key value pairs separated by a comma. Each key has a distinct operation, depending on the used operator. Valid operators are: -+A rule may consist of a list of one or more key value pairs separated by a comma\. Each key has a distinct operation, depending on the used operator\. Valid operators are: - .PP - \fB==\fR - .RS 4 --Compare for equality. -+Compare for equality\. - .RE - .PP - \fB!=\fR - .RS 4 --Compare for non\-equality. -+Compare for non\-equality\. - .RE - .PP - \fB=\fR - .RS 4 --Assign a value to a key. Keys that represent a list, are reset and only this single value is assigned. -+Assign a value to a key\. Keys that represent a list, are reset and only this single value is assigned\. - .RE - .PP - \fB+=\fR - .RS 4 --Add the value to a key that holds a list of entries. -+Add the value to a key that holds a list of entries\. - .RE - .PP - \fB:=\fR - .RS 4 --Assign a value to a key finally; disallow any later changes, which may be used to prevent changes by any later rules. -+Assign a value to a key finally; disallow any later changes, which may be used to prevent changes by any later rules\. - .RE - .PP --The following key names can be used to match against device properties. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device. -+The following key names can be used to match against device properties\. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event\. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device\. - .PP - \fBACTION\fR - .RS 4 --Match the name of the event action. -+Match the name of the event action\. - .RE - .PP - \fBDEVPATH\fR - .RS 4 --Match the devpath of the event device. -+Match the devpath of the event device\. - .RE - .PP - \fBKERNEL\fR - .RS 4 --Match the name of the event device. -+Match the name of the event device\. - .RE - .PP - \fBSUBSYSTEM\fR - .RS 4 --Match the subsystem of the event device. -+Match the subsystem of the event device\. - .RE - .PP - \fBDRIVER\fR - .RS 4 --Match the driver name of the event device. Only set for devices which are bound to a driver at the time the event is generated. -+Match the driver name of the event device\. Only set for devices which are bound to a driver at the time the event is generated\. - .RE - .PP - \fBATTR{\fR\fB\fIfilename\fR\fR\fB}\fR - .RS 4 --Match sysfs attribute values of the event device. Up to five -+Match sysfs attribute values of the event device\. Up to five - \fBATTR\fR --keys can be specified per rule. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself. Depending on the type of operator, this key is also used to set the value of a sysfs attribute. -+keys can be specified per rule\. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself\. Depending on the type of operator, this key is also used to set the value of a sysfs attribute\. - .RE - .PP - \fBKERNELS\fR - .RS 4 --Search the devpath upwards for a matching device name. -+Search the devpath upwards for a matching device name\. - .RE - .PP - \fBSUBSYSTEMS\fR - .RS 4 --Search the devpath upwards for a matching device subsystem name. -+Search the devpath upwards for a matching device subsystem name\. - .RE - .PP - \fBDRIVERS\fR - .RS 4 --Search the devpath upwards for a matching device driver name. -+Search the devpath upwards for a matching device driver name\. - .RE - .PP - \fBATTRS{\fR\fB\fIfilename\fR\fR\fB}\fR - .RS 4 --Search the devpath upwards for a device with matching sysfs attribute values. Up to five -+Search the devpath upwards for a device with matching sysfs attribute values\. Up to five - \fBATTRS\fR --keys can be specified per rule, but all of them must match on the same device. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself. -+keys can be specified per rule, but all of them must match on the same device\. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself\. - .RE - .PP - \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR - .RS 4 --Match against the value of an environment variable. Up to five -+Match against the value of an environment variable\. Up to five - \fBENV\fR --keys can be specified per rule. Depending on the type of operator, this key is also used to export a variable to the environment. -+keys can be specified per rule\. Depending on the type of operator, this key is also used to export a variable to the environment\. - .RE - .PP - \fBTEST{\fR\fB\fIoctal mode mask\fR\fR\fB}\fR - .RS 4 --Test the existence of a file. An octal mode mask can be specified if needed. -+Test the existence of a file\. An octal mode mask can be specified if needed\. - .RE - .PP - \fBPROGRAM\fR - .RS 4 --Execute external program. The key is true, if the program returns with exit code zero. The whole event environment is available to the executed program. The program's output printed to stdout, is available in the RESULT key. -+Execute external program\. The key is true, if the program returns with exit code zero\. The whole event environment is available to the executed program\. The program\'s output printed to stdout, is available in the RESULT key\. - .RE - .PP - \fBRESULT\fR - .RS 4 --Match the returned string of the last PROGRAM call. This key can be used in the same or in any later rule after a PROGRAM call. -+Match the returned string of the last PROGRAM call\. This key can be used in the same or in any later rule after a PROGRAM call\. - .RE - .PP --Most of the fields support a shell style pattern matching. The following pattern characters are supported: -+Most of the fields support a shell style pattern matching\. The following pattern characters are supported: - .PP - \fB*\fR - .RS 4 --Matches zero, or any number of characters. -+Matches zero, or any number of characters\. - .RE - .PP - \fB?\fR - .RS 4 --Matches any single character. -+Matches any single character\. - .RE - .PP - \fB[]\fR - .RS 4 --Matches any single character specified within the brackets. For example, the pattern string 'tty[SR]' would match either 'ttyS' or 'ttyR'. Ranges are also supported within this match with the '\-' character. For example, to match on the range of all digits, the pattern [0\-9] would be used. If the first character following the '[' is a '!', any characters not enclosed are matched. -+Matches any single character specified within the brackets\. For example, the pattern string \'tty[SR]\' would match either \'ttyS\' or \'ttyR\'\. Ranges are also supported within this match with the \'\-\' character\. For example, to match on the range of all digits, the pattern [0\-9] would be used\. If the first character following the \'[\' is a \'!\', any characters not enclosed are matched\. - .RE - .PP - The following keys can get values assigned: - .PP - \fBNAME\fR - .RS 4 --The name of the node to be created, or the name the network interface should be renamed to. Only one rule can set the node name, all later rules with a NAME key will be ignored. -+The name of the node to be created, or the name the network interface should be renamed to\. Only one rule can set the node name, all later rules with a NAME key will be ignored\. - .RE - .PP - \fBSYMLINK\fR - .RS 4 --The name of a symlink targeting the node. Every matching rule can add this value to the list of symlinks to be created along with the device node. Multiple symlinks may be specified by separating the names by the space character. -+The name of a symlink targeting the node\. Every matching rule can add this value to the list of symlinks to be created along with the device node\. Multiple symlinks may be specified by separating the names by the space character\. - .RE - .PP - \fBOWNER, GROUP, MODE\fR - .RS 4 --The permissions for the device node. Every specified value overwrites the compiled\-in default value. -+The permissions for the device node\. Every specified value overwrites the compiled\-in default value\. - .RE - .PP - \fBATTR{\fR\fB\fIkey\fR\fR\fB}\fR - .RS 4 --The value that should be written to a sysfs attribute of the event device. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute. -+The value that should be written to a sysfs attribute of the event device\. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute\. - .RE - .PP - \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR - .RS 4 --Export a variable to the environment. Depending on the type of operator, this key is also to match against an environment variable. -+Export a variable to the environment\. Depending on the type of operator, this key is also to match against an environment variable\. - .RE - .PP - \fBRUN\fR - .RS 4 --Add a program to the list of programs to be executed for a specific device. This can only be used for very short running tasks. Running an event process for a long period of time may block all further events for this or a dependent device. Long running tasks need to be immediately detached from the event process itself. -+Add a program to the list of programs to be executed for a specific device\. This can only be used for very short running tasks\. Running an event process for a long period of time may block all further events for this or a dependent device\. Long running tasks need to be immediately detached from the event process itself\. - .RE - .PP - \fBLABEL\fR - .RS 4 --Named label where a GOTO can jump to. -+Named label where a GOTO can jump to\. - .RE - .PP - \fBGOTO\fR -@@ -229,72 +229,68 @@ Jumps to the next LABEL with a matching name - .RS 4 - Import a set of variables into the event environment, depending on - \fItype\fR: --.RS 4 - .PP - \fBprogram\fR - .RS 4 --Execute an external program specified as the assigned value and import its output, which must be in environment key format. -+Execute an external program specified as the assigned value and import its output, which must be in environment key format\. - .RE - .PP - \fBfile\fR - .RS 4 --Import a text file specified as the assigned value, which must be in environment key format. -+Import a text file specified as the assigned value, which must be in environment key format\. - .RE - .PP - \fBparent\fR - .RS 4 --Import the stored keys from the parent device by reading the database entry of the parent device. The value assigned to -+Import the stored keys from the parent device by reading the database entry of the parent device\. The value assigned to - \fBIMPORT{parent}\fR --is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons). --.RE -+is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons)\. - .RE --.IP "" 4 -+.sp - If no option is given, udev will choose between - \fBprogram\fR - and - \fBfile\fR --based on the executable bit of the file permissions. -+based on the executable bit of the file permissions\. - .RE - .PP - \fBWAIT_FOR_SYSFS\fR - .RS 4 --Wait for the specified sysfs file of the device to be created. Can be used to fight against kernel sysfs timing issues. -+Wait for the specified sysfs file of the device to be created\. Can be used to fight against kernel sysfs timing issues\. - .RE - .PP - \fBOPTIONS\fR - .RS 4 - Rule and device options: --.RS 4 - .PP - \fBlast_rule\fR - .RS 4 --Stops further rules application. No later rules will have any effect. -+Stops further rules application\. No later rules will have any effect\. - .RE - .PP - \fBignore_device\fR - .RS 4 --Ignore this event completely. -+Ignore this event completely\. - .RE - .PP - \fBignore_remove\fR - .RS 4 --Ignore any later remove event for this device. This may be useful as a workaround for broken device drivers. -+Ignore any later remove event for this device\. This may be useful as a workaround for broken device drivers\. - .RE - .PP - \fBlink_priority=\fR\fB\fIvalue\fR\fR - .RS 4 --Specify the priority of the created symlinks. Devices with higher priorities overwrite existing symlinks of other devices. -+Specify the priority of the created symlinks\. Devices with higher priorities overwrite existing symlinks of other devices\. - .RE - .PP - \fBall_partitions\fR - .RS 4 --Create the device nodes for all available partitions of a block device. This may be useful for removable media devices where media changes are not detected. -+Create the device nodes for all available partitions of a block device\. This may be useful for removable media devices where media changes are not detected\. - .RE - .PP - \fBstring_escape=\fR\fB\fInone|replace\fR\fR - .RS 4 --Usually control and other possibly unsafe characters are replaced in strings used for device naming. The mode of replacement can be specified with this option. --.RE -+Usually control and other possibly unsafe characters are replaced in strings used for device naming\. The mode of replacement can be specified with this option\. - .RE - .RE - .PP -@@ -306,23 +302,23 @@ The - \fBGROUP\fR - and - \fBRUN\fR --fields support simple printf\-like string substitutions. The -+fields support simple printf\-like string substitutions\. The - \fBRUN\fR --format chars gets applied after all rules have been processed, right before the program is executed. It allows the use of the complete environment set by earlier matching rules. For all other fields, substitutions are applied while the individual rule is being processed. The available substitutions are: -+format chars gets applied after all rules have been processed, right before the program is executed\. It allows the use of the complete environment set by earlier matching rules\. For all other fields, substitutions are applied while the individual rule is being processed\. The available substitutions are: - .PP - \fB$kernel\fR, \fB%k\fR - .RS 4 --The kernel name for this device. -+The kernel name for this device\. - .RE - .PP - \fB$number\fR, \fB%n\fR - .RS 4 --The kernel number for this device. For example, 'sda3' has kernel number of '3' -+The kernel number for this device\. For example, \'sda3\' has kernel number of \'3\' - .RE - .PP - \fB$devpath\fR, \fB%p\fR - .RS 4 --The devpath of the device. -+The devpath of the device\. - .RE - .PP - \fB$id\fR, \fB%b\fR -@@ -332,7 +328,7 @@ The name of the device matched while searching the devpath upwards for - \fBKERNELS\fR, - \fBDRIVERS\fR - and --\fBATTRS\fR. -+\fBATTRS\fR\. - .RE - .PP - \fB$driver\fR, \fB%d\fR -@@ -342,75 +338,75 @@ The driver name of the device matched while searching the devpath upwards for - \fBKERNELS\fR, - \fBDRIVERS\fR - and --\fBATTRS\fR. -+\fBATTRS\fR\. - .RE - .PP - \fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR - .RS 4 --The value of a sysfs attribute found at the device, where all keys of the rule have matched. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute. If the attribute is a symlink, the last element of the symlink target is returned as the value. -+The value of a sysfs attribute found at the device, where all keys of the rule have matched\. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute\. If the attribute is a symlink, the last element of the symlink target is returned as the value\. - .RE - .PP - \fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR - .RS 4 --The value of an environment variable. -+The value of an environment variable\. - .RE - .PP - \fB$major\fR, \fB%M\fR - .RS 4 --The kernel major number for the device. -+The kernel major number for the device\. - .RE - .PP - \fB$minor\fR, \fB%m\fR - .RS 4 --The kernel minor number for the device. -+The kernel minor number for the device\. - .RE - .PP - \fB$result\fR, \fB%c\fR - .RS 4 --The string returned by the external program requested with PROGRAM. A single part of the string, separated by a space character may be selected by specifying the part number as an attribute: --\fB%c{N}\fR. If the number is followed by the '+' char this part plus all remaining parts of the result string are substituted: -+The string returned by the external program requested with PROGRAM\. A single part of the string, separated by a space character may be selected by specifying the part number as an attribute: -+\fB%c{N}\fR\. If the number is followed by the \'+\' char this part plus all remaining parts of the result string are substituted: - \fB%c{N+}\fR - .RE - .PP - \fB$parent\fR, \fB%P\fR - .RS 4 --The node name of the parent device. -+The node name of the parent device\. - .RE - .PP - \fB$root\fR, \fB%r\fR - .RS 4 --The udev_root value. -+The udev_root value\. - .RE - .PP - \fB$sys\fR, \fB%S\fR - .RS 4 --The sysfs mount point. -+The sysfs mount point\. - .RE - .PP - \fB$tempnode\fR, \fB%N\fR - .RS 4 --The name of a created temporary device node to provide access to the device from a external program before the real node is created. -+The name of a created temporary device node to provide access to the device from a external program before the real node is created\. - .RE - .PP - \fB%%\fR - .RS 4 --The '%' character itself. -+The \'%\' character itself\. - .RE - .PP - \fB$$\fR - .RS 4 --The '$' character itself. -+The \'$\' character itself\. - .RE - .PP --The count of characters to be substituted may be limited by specifying the format length value. For example, '%3s{file}' will only insert the first three characters of the sysfs attribute -+The count of characters to be substituted may be limited by specifying the format length value\. For example, \'%3s{file}\' will only insert the first three characters of the sysfs attribute - .SH "AUTHOR" - .PP - Written by Greg Kroah\-Hartman -- -+ - and Kay Sievers --. With much help from Dan Stekloff -- --and many others. -+\. With much help from Dan Stekloff -+ -+and many others\. - .SH "SEE ALSO" - .PP - \fBudevd\fR(8), -diff --git a/udevd.8 b/udevd.8 -index 25996d1..46edde4 100644 ---- a/udevd.8 -+++ b/udevd.8 -@@ -1,6 +1,6 @@ - .\" Title: udevd - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: August 2005 - .\" Manual: udevd, udevcontrol - .\" Source: udev -@@ -11,7 +11,7 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevd \- event managing daemon -+udevd - event managing daemon - .SH "SYNOPSIS" - .HP 6 - \fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] -@@ -19,87 +19,87 @@ udevd \- event managing daemon - \fBudevcontrol \fR\fB\fIcommand\fR\fR - .SH "DESCRIPTION" - .PP --udevd listens to kernel uevents and passes the incoming events to udev. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling. -+udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling\. - .SH "OPTIONS" - .PP - \fB\-\-daemon\fR - .RS 4 --Detach and run in the background. -+Detach and run in the background\. - .RE - .PP - \fB\-\-debug\-trace\fR - .RS 4 --Run all events completely serialized. This may be useful if udev triggers actions or loads kernel modules which cause problems and a slow but continuous operation is needed, where no events are processed in parallel. -+Run all events completely serialized\. This may be useful if udev triggers actions or loads kernel modules which cause problems and a slow but continuous operation is needed, where no events are processed in parallel\. - .RE - .PP - \fB\-\-verbose\fR - .RS 4 --Print log messages to stdout. -+Print log messages to stdout\. - .RE - .PP - \fB\-\-version\fR - .RS 4 --Print version number. -+Print version number\. - .RE - .PP - \fB\-\-help\fR - .RS 4 --Print usage. -+Print usage\. - .RE - .PP - \fBlog_priority=\fR\fB\fIvalue\fR\fR - .RS 4 --Set the internal log level of udevd. Valid values are the numerical syslog priorities or their textual representations: -+Set the internal log level of udevd\. Valid values are the numerical syslog priorities or their textual representations: - \fBerr\fR, - \fBinfo\fR - and --\fBdebug\fR. -+\fBdebug\fR\. - .RE - .PP - \fBstop_exec_queue\fR - .RS 4 --Signal udevd to stop executing new events. Incoming events will be queued. -+Signal udevd to stop executing new events\. Incoming events will be queued\. - .RE - .PP - \fBstart_exec_queue\fR - .RS 4 --Signal udevd to enable the execution of events. -+Signal udevd to enable the execution of events\. - .RE - .PP - \fBreload_rules\fR - .RS 4 --Signal udevd to reload the rules from the config. -+Signal udevd to reload the rules from the config\. - .RE - .PP - \fBenv \fR\fB\fIvar\fR\fR\fB=\fR\fB\fIvalue\fR\fR - .RS 4 --Set global variable. -+Set global variable\. - .RE - .PP - \fBmax_childs\fR - .RS 4 --Set the maximum number of events, udevd will handle at the same time. -+Set the maximum number of events, udevd will handle at the same time\. - .RE - .PP - \fBmax_childs_running\fR - .RS 4 --Set the maximum number of events, which are allowed to run at the same time. -+Set the maximum number of events, which are allowed to run at the same time\. - .RE - .PP - \fBhelp\fR - .RS 4 --Print help text. -+Print help text\. - .RE - .SH "ENVIRONMENT" - .PP - \fBUDEV_LOG\fR - .RS 4 --Overrides the syslog priority specified in the config file. -+Overrides the syslog priority specified in the config file\. - .RE - .SH "AUTHOR" - .PP - Written by Kay Sievers --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udevinfo.8 b/udevinfo.8 -index 337f206..6115f29 100644 ---- a/udevinfo.8 -+++ b/udevinfo.8 -@@ -1,6 +1,6 @@ - .\" Title: udevinfo - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: August 2005 - .\" Manual: udevinfo - .\" Source: udev -@@ -11,32 +11,32 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevinfo \- query udev device information -+udevinfo - query udev device information - .SH "SYNOPSIS" - .HP 9 - \fBudevinfo\fR [\fB\-\-query=\fR\fB\fIquery\-type\fR\fR] [\fB\-\-path=\fR\fB\fIdevpath\fR\fR] [\fB\-\-name=\fR\fB\fInode\fR\fR] [\fB\-\-root\fR] [\fB\-\-attribute\-walk\fR] [\fB\-\-export\-db\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] - .SH "DESCRIPTION" - .PP --udevinfo queries the udev database for device information stored in the udev database. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device. -+udevinfo queries the udev database for device information stored in the udev database\. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device\. - .SH "OPTIONS" - .PP - \fB\-\-query=\fR\fB\fItype\fR\fR - .RS 4 --Query the database for specified type of device data. It needs the -+Query the database for specified type of device data\. It needs the - \fB\-\-path\fR - or - \fB\-\-name\fR --to identify the specified device. Valid queries are: -+to identify the specified device\. Valid queries are: - \fBname\fR, - \fBsymlink\fR, - \fBpath\fR, - \fBenv\fR, --\fBall\fR. -+\fBall\fR\. - .RE - .PP - \fB\-\-path=\fR\fB\fIdevpath\fR\fR - .RS 4 --The devpath of the device to query. -+The devpath of the device to query\. - .RE - .PP - \fB\-\-name=\fR\fB\fInode\fR\fR -@@ -47,36 +47,36 @@ The name of the device node or a symlink to query - \fB\-\-root\fR - .RS 4 - The udev root directory: --\fI/dev\fR. If used in conjunction with a -+\fI/dev\fR\. If used in conjunction with a - \fBname\fR - or - \fBsymlink\fR --query, the query returns the absolute path including the root directory. -+query, the query returns the absolute path including the root directory\. - .RE - .PP - \fB\-\-attribute\-walk\fR - .RS 4 --Print all sysfs properties of the specified device that can be used in udev rules to match the specified device. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules. -+Print all sysfs properties of the specified device that can be used in udev rules to match the specified device\. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules\. - .RE - .PP - \fB\-\-export\-db\fR - .RS 4 --Export the content of the udev database. -+Export the content of the udev database\. - .RE - .PP - \fB\-\-version\fR - .RS 4 --Print version. -+Print version\. - .RE - .PP - \fB\-\-help\fR - .RS 4 --Print help text. -+Print help text\. - .RE - .SH "AUTHOR" - .PP - Written by Kay Sievers --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udevmonitor.8 b/udevmonitor.8 -index 0adb998..5b624a7 100644 ---- a/udevmonitor.8 -+++ b/udevmonitor.8 -@@ -1,6 +1,6 @@ - .\" Title: udevmonitor - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: August 2005 - .\" Manual: udevmonitor - .\" Source: udev -@@ -11,38 +11,38 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevmonitor \- print the kernel and udev event sequence to the console -+udevmonitor - print the kernel and udev event sequence to the console - .SH "SYNOPSIS" - .HP 12 - \fBudevmonitor\fR [\fB\-\-environment\fR] [\fB\-\-kernel\fR] [\fB\-\-udev\fR] [\fB\-\-help\fR] - .SH "DESCRIPTION" - .PP --udevmonitor listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event. -+udevmonitor listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\. - .SH "OPTIONS" - .PP - \fB\-\-environment\fR - .RS 4 --Print the complete environment for all events. Can be used to compare the kernel supplied and the udev added environment values. -+Print the complete environment for all events\. Can be used to compare the kernel supplied and the udev added environment values\. - .RE - .PP - \fB\-\-kernel\fR - .RS 4 --Print the kernel uevents. -+Print the kernel uevents\. - .RE - .PP - \fB\-\-udev\fR - .RS 4 --Print the udev event after the rule processing. -+Print the udev event after the rule processing\. - .RE - .PP - \fB\-\-help\fR - .RS 4 --Print usage. -+Print usage\. - .RE - .SH "AUTHOR" - .PP - Written by Kay Sievers --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udevsettle.8 b/udevsettle.8 -index 818a7ff..39054d9 100644 ---- a/udevsettle.8 -+++ b/udevsettle.8 -@@ -1,6 +1,6 @@ - .\" Title: udevsettle - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: March 2006 - .\" Manual: udevsettle - .\" Source: udev -@@ -11,29 +11,29 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevsettle \- wait until queued kernel/udev events are handled -+udevsettle - wait until queued kernel/udev events are handled - .SH "SYNOPSIS" - .HP 11 - \fBudevsettle\fR [\fB\-\-timeout=\fR\fB\fIseconds\fR\fR] - .SH "DESCRIPTION" - .PP --Waits watching the udev event queue and exits if all current events are handled. -+Waits watching the udev event queue and exits if all current events are handled\. - .SH "OPTIONS" - .PP - \fB\-\-timeout=\fR\fB\fIseconds\fR\fR - .RS 4 --maximum seconds to wait for the queue to become empty. -+maximum seconds to wait for the queue to become empty\. - .RE - .SH "ENVIRONMENT" - .PP - \fBUDEV_LOG\fR - .RS 4 --Overrides the syslog priority specified in the config file. -+Overrides the syslog priority specified in the config file\. - .RE - .SH "AUTHOR" - .PP - Written by Kay Sievers --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udevstart.8 b/udevstart.8 -index ac7d070..6b463cf 100644 ---- a/udevstart.8 -+++ b/udevstart.8 -@@ -1,6 +1,6 @@ - .\" Title: udevstart - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: August 2005 - .\" Manual: udevstart - .\" Source: udev -@@ -11,17 +11,17 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevstart \- populate initial device directory -+udevstart - populate initial device directory - .SH "SYNOPSIS" - .HP 10 - \fBudevstart\fR - .SH "DESCRIPTION" - .PP --udevstart scans the kernel exported device information available in sysfs for devices which require a device node to operate and creates the node using the specified udev rules. udevstart is used to create the initial device directory after system bootup. -+udevstart scans the kernel exported device information available in sysfs for devices which require a device node to operate and creates the node using the specified udev rules\. udevstart is used to create the initial device directory after system bootup\. - .SH "AUTHOR" - .PP - Written by Harald Hoyer --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udevtest.8 b/udevtest.8 -index 9ab9249..a090465 100644 ---- a/udevtest.8 -+++ b/udevtest.8 -@@ -1,6 +1,6 @@ - .\" Title: udevtest - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: August 2005 - .\" Manual: udevtest - .\" Source: udev -@@ -11,17 +11,17 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevtest \- simulate a udev run and print the action to the console -+udevtest - simulate a udev run and print the action to the console - .SH "SYNOPSIS" - .HP 21 - \fBudevtest \fR\fB\fIdevice\-path\fR\fR - .SH "DESCRIPTION" - .PP --udevtest simulates a udev run for the given device and prints out the name of the node udev would have created, or the name of the network interface, that would have been renamed. -+udevtest simulates a udev run for the given device and prints out the name of the node udev would have created, or the name of the network interface, that would have been renamed\. - .SH "AUTHOR" - .PP - Written by Greg Kroah\-Hartman --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) -diff --git a/udevtrigger.8 b/udevtrigger.8 -index 5ef9e8f..06c7e45 100644 ---- a/udevtrigger.8 -+++ b/udevtrigger.8 -@@ -1,6 +1,6 @@ - .\" Title: udevtrigger - .\" Author: --.\" Generator: DocBook XSL Stylesheets v1.72.0 -+.\" Generator: DocBook XSL Stylesheets v1.73.1 - .\" Date: March 2006 - .\" Manual: udevtrigger - .\" Source: udev -@@ -11,66 +11,66 @@ - .\" disable justification (adjust text to left margin only) - .ad l - .SH "NAME" --udevtrigger \- request kernel devices events for coldplug -+udevtrigger - request kernel devices events for coldplug - .SH "SYNOPSIS" - .HP 12 - \fBudevtrigger\fR [\fB\-\-verbose\fR] [\fB\-\-dry\-run\fR] [\fB\-\-retry\-failed\fR] [\fB\-\-help\fR] [\fB\-\-action=\fR\fB\fIaction\fR\fR] [\fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR] [\fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR] [\fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR] [\fB\-\-attr\-nomatch=\fR\fB\fIattribute=value\fR\fR] - .SH "DESCRIPTION" - .PP --Trigger kernel device uevents to replay missing events at system coldplug. -+Trigger kernel device uevents to replay missing events at system coldplug\. - .SH "OPTIONS" - .PP - \fB\-\-verbose\fR - .RS 4 --Print the list of devices which will be triggered. -+Print the list of devices which will be triggered\. - .RE - .PP - \fB\-\-dry\-run\fR - .RS 4 --Do not actually trigger the event. -+Do not actually trigger the event\. - .RE - .PP - \fB\-\-retry\-failed\fR - .RS 4 --Trigger only the events which are failed during a previous run. -+Trigger only the events which are failed during a previous run\. - .RE - .PP - \fB\-\-action=\fR\fB\fIaction\fR\fR - .RS 4 --Type of event to be triggered. The default value is "add". -+Type of event to be triggered\. The default value is "add"\. - .RE - .PP - \fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR - .RS 4 --Trigger events for devices which belong to a matching subsystem. This option can be specified multiple times and supports shell style pattern matching. -+Trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\. - .RE - .PP - \fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR - .RS 4 --Do not trigger events for devices which belong to a matching subsystem. This option can be specified multiple times and supports shell style pattern matching. -+Do not trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\. - .RE - .PP - \fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR - .RS 4 --Trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. This option can be specified multiple times. -+Trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\. - .RE - .PP - \fB\-\-attr\-nomatch\fR\fB\fIattribute=value\fR\fR - .RS 4 --Do not trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. This option can be specified multiple times. -+Do not trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\. - .RE - .SH "ENVIRONMENT" - .PP - \fBUDEV_LOG\fR - .RS 4 --Overrides the syslog priority specified in the config file. -+Overrides the syslog priority specified in the config file\. - .RE - .SH "AUTHOR" - .PP - Written by Kay Sievers -- -+ - and Hannes Reinecke --. -+\. - .SH "SEE ALSO" - .PP - \fBudev\fR(7) --- -1.5.3.3 - diff --git a/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch b/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch deleted file mode 100644 index 0bcb53d..0000000 --- a/0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7b6fd01651ce89e4985f9afc344b7d49c4e5fcd7 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 29 Aug 2007 06:06:00 +0200 -Subject: [PATCH] volume_id: fix linux_raid metadata version 1.0 detection - -Fixes: - https://bugs.launchpad.net/ubuntu/+source/udev/+bug/133773 ---- - extras/volume_id/lib/linux_raid.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 6d1d19c..ff2c47c 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -142,13 +142,15 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6 - - int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size) - { -- uint64_t sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES; -+ uint64_t sboff; - - /* version 0 at the end of the device */ -+ sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES; - if (volume_id_probe_linux_raid0(id, off + sboff, size) == 0) - return 0; - - /* version 1.0 at the end of the device */ -+ sboff = (size & ~(0x1000 - 1)) - 0x2000; - if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0) - return 0; - --- -1.5.3.3 - diff --git a/0010-rules-Gentoo-update.patch b/0010-rules-Gentoo-update.patch deleted file mode 100644 index 47490ec..0000000 --- a/0010-rules-Gentoo-update.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 739b614721580b95aebdfd295eebb0a6246803ad Mon Sep 17 00:00:00 2001 -From: Matthias Schwarzott -Date: Wed, 29 Aug 2007 13:19:16 +0200 -Subject: [PATCH] rules: Gentoo update - ---- - etc/udev/gentoo/05-udev-early.rules | 8 ----- - etc/udev/gentoo/30-kernel-compat.rules | 47 ++++++++++++++++++++++++++++++++ - etc/udev/gentoo/50-udev.rules | 4 --- - etc/udev/gentoo/80-drivers.rules | 44 ----------------------------- - 4 files changed, 47 insertions(+), 56 deletions(-) - delete mode 100644 etc/udev/gentoo/05-udev-early.rules - create mode 100644 etc/udev/gentoo/30-kernel-compat.rules - delete mode 100644 etc/udev/gentoo/80-drivers.rules - -diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules -deleted file mode 100644 -index fc15e2b..0000000 ---- a/etc/udev/gentoo/05-udev-early.rules -+++ /dev/null -@@ -1,8 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --# sysfs is populated after the event is sent --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/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules -new file mode 100644 -index 0000000..7bc55c6 ---- /dev/null -+++ b/etc/udev/gentoo/30-kernel-compat.rules -@@ -0,0 +1,47 @@ -+# do not edit this file, it will be overwritten on update -+ -+ACTION!="add", GOTO="kernel_compat_end" -+ -+# workarounds needed to synchronize with sysfs -+DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -+ -+# needed for kernels <2.6.16 -+SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -+ -+# needed for kernels <2.6.17 -+SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" -+ -+ -+ -+# 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" -+ -+ -+ -+# 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 -+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}="" -+ -+# No need for more code, as MODALIAS is present -+ENV{MODALIAS}=="?*", GOTO="kernel_compat_end" -+ -+# needed for kernels <2.6.22 -+SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" -+ -+ # 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 -+ -+ 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}=="1", ATTRS{vendor}=="On[sS]tream", \ -+ ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end" -+ ATTRS{type}=="1", RUN+="modprobe.sh st" -+ -+LABEL="kernel_compat_end" -+ -+ -diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules -index 9e06029..7c2ac81 100644 ---- a/etc/udev/gentoo/50-udev.rules -+++ b/etc/udev/gentoo/50-udev.rules -@@ -237,10 +237,6 @@ KERNEL=="umad*", NAME="infiniband/%k" - 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" - -diff --git a/etc/udev/gentoo/80-drivers.rules b/etc/udev/gentoo/80-drivers.rules -deleted file mode 100644 -index df6c880..0000000 ---- a/etc/udev/gentoo/80-drivers.rules -+++ /dev/null -@@ -1,44 +0,0 @@ --# 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="drivers_end" -- --# this driver is broken and should not be loaded automatically --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}" -- --# /etc/modprobe.conf. --SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" --# needed aliases are defined in /etc/modprobe.d/pnp-aliases -- -- --SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" --SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" --SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" --SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" --SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" -- --# Load driver for scsi-device --SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" -- -- # 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 -- -- ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" -- 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}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" -- ATTRS{type}=="1", RUN+="modprobe.sh st" --LABEL="hotplug_scsi_end" -- --LABEL="drivers_end" -- --- -1.5.3.3 - diff --git a/0011-add-name-substitution.patch b/0011-add-name-substitution.patch deleted file mode 100644 index 571c9b6..0000000 --- a/0011-add-name-substitution.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 1113044be205f9d78642744ffaa01329a77bee79 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 29 Aug 2007 14:04:55 +0200 -Subject: [PATCH] add $name substitution - ---- - udev.7 | 7 ++++++- - udev.xml | 10 +++++++++- - udev_rules.c | 6 ++++++ - udevd.c | 2 +- - 4 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/udev.7 b/udev.7 -index 5f0ebb9..0ea5549 100644 ---- a/udev.7 -+++ b/udev.7 -@@ -331,7 +331,7 @@ and - \fBATTRS\fR\. - .RE - .PP --\fB$driver\fR, \fB%d\fR -+\fB$driver\fR - .RS 4 - The driver name of the device matched while searching the devpath upwards for - \fBSUBSYSTEMS\fR, -@@ -373,6 +373,11 @@ The string returned by the external program requested with PROGRAM\. A single pa - The node name of the parent device\. - .RE - .PP -+\fB$name\fR -+.RS 4 -+The name of the device node\. The value is only set if an earlier rule assigned a value, or during a remove events\. -+.RE -+.PP - \fB$root\fR, \fB%r\fR - .RS 4 - The udev_root value\. -diff --git a/udev.xml b/udev.xml -index b43abb7..9fb6152 100644 ---- a/udev.xml -+++ b/udev.xml -@@ -488,7 +488,7 @@ - - - -- , -+ - - The driver name of the device matched while searching the devpath upwards for - , , and . -@@ -548,6 +548,14 @@ - - - -+ -+ -+ The name of the device node. The value is only set if an earlier -+ rule assigned a value, or during a remove events. -+ -+ -+ -+ - , - - The udev_root value. -diff --git a/udev_rules.c b/udev_rules.c -index 35db958..01fb211 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -606,6 +606,7 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - SUBST_ATTR, - SUBST_PARENT, - SUBST_TEMP_NODE, -+ SUBST_NAME, - SUBST_ROOT, - SUBST_SYS, - SUBST_ENV, -@@ -627,6 +628,7 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - { .name = "sysfs", .fmt = 's', .type = SUBST_ATTR }, - { .name = "parent", .fmt = 'P', .type = SUBST_PARENT }, - { .name = "tempnode", .fmt = 'N', .type = SUBST_TEMP_NODE }, -+ { .name = "name", .fmt = 'D', .type = SUBST_NAME }, - { .name = "root", .fmt = 'r', .type = SUBST_ROOT }, - { .name = "sys", .fmt = 'S', .type = SUBST_SYS }, - { .name = "env", .fmt = 'E', .type = SUBST_ENV }, -@@ -845,6 +847,10 @@ found: - strlcat(string, udev->tmp_node, maxsize); - dbg("substitute temporary device node name '%s'", udev->tmp_node); - break; -+ case SUBST_NAME: -+ strlcat(string, udev->name, maxsize); -+ dbg("substitute udev->name '%s'", udev->name); -+ break; - case SUBST_ROOT: - strlcat(string, udev_root, maxsize); - dbg("substitute udev_root '%s'", udev_root); -diff --git a/udevd.c b/udevd.c -index 3c46617..5ff5d3f 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -508,7 +508,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - } - } - -- /* check runing-queue for still running events */ -+ /* check run queue for still running events */ - list_for_each_entry(loop_msg, &running_list, node) { - if (limit && childs_count++ > limit) { - dbg("%llu, maximum number (%i) of childs reached", msg->seqnum, childs_count); --- -1.5.3.3 - diff --git a/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch b/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch deleted file mode 100644 index 41699ca..0000000 --- a/0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch +++ /dev/null @@ -1,102 +0,0 @@ -From a75689bad504e35e346b84960b2b604532b1d6b5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 29 Aug 2007 14:11:37 +0200 -Subject: [PATCH] do not delete the device node with ignore_remove, but handle the event - ---- - udev.7 | 2 +- - udev.xml | 4 ++-- - udev_device.c | 8 ++++---- - udev_rules.c | 15 ++++++++++++--- - 4 files changed, 19 insertions(+), 10 deletions(-) - -diff --git a/udev.7 b/udev.7 -index 0ea5549..874c9ab 100644 ---- a/udev.7 -+++ b/udev.7 -@@ -275,7 +275,7 @@ Ignore this event completely\. - .PP - \fBignore_remove\fR - .RS 4 --Ignore any later remove event for this device\. This may be useful as a workaround for broken device drivers\. -+Do not remove the device node when the device goes away\. This may be useful as a workaround for broken device drivers\. - .RE - .PP - \fBlink_priority=\fR\fB\fIvalue\fR\fR -diff --git a/udev.xml b/udev.xml -index 9fb6152..83a9d75 100644 ---- a/udev.xml -+++ b/udev.xml -@@ -416,8 +416,8 @@ - - - -- Ignore any later remove event for this device. This may be useful -- as a workaround for broken device drivers. -+ Do not remove the device node when the device goes away. This may be -+ useful as a workaround for broken device drivers. - - - -diff --git a/udev_device.c b/udev_device.c -index 2b7ffe0..62217ff 100644 ---- a/udev_device.c -+++ b/udev_device.c -@@ -266,10 +266,6 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - /* import database entry, and delete it */ - if (udev_db_get_device(udev, udev->dev->devpath) == 0) { - udev_db_delete_device(udev); -- if (udev->ignore_remove) { -- info("ignore_remove for '%s'", udev->name); -- goto exit; -- } - /* restore stored persistent data */ - list_for_each_entry(name_loop, &udev->env_list, node) - putenv(name_loop->name); -@@ -285,6 +281,10 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - goto exit; - } - -+ if (udev->ignore_remove) { -+ info("ignore_remove for '%s'", udev->name); -+ goto exit; -+ } - /* remove the node */ - retval = udev_node_remove(udev); - -diff --git a/udev_rules.c b/udev_rules.c -index 01fb211..364d1b7 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -1472,9 +1472,14 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - break; - - dbg("process rule"); -- if (rule->name.operation != KEY_OP_UNSET || rule->symlink.operation != KEY_OP_UNSET || -- rule->mode_operation != KEY_OP_UNSET || rule->owner.operation != KEY_OP_UNSET || -- rule->group.operation != KEY_OP_UNSET) { -+ if (rule->name.operation == KEY_OP_ASSIGN || -+ rule->name.operation == KEY_OP_ASSIGN_FINAL || -+ rule->name.operation == KEY_OP_ADD || -+ rule->symlink.operation == KEY_OP_ASSIGN || -+ rule->symlink.operation == KEY_OP_ASSIGN_FINAL || -+ rule->symlink.operation == KEY_OP_ADD || -+ rule->mode_operation != KEY_OP_UNSET || -+ rule->owner.operation != KEY_OP_UNSET || rule->group.operation != KEY_OP_UNSET) { - dbg("skip rule that names a device"); - continue; - } -@@ -1485,6 +1490,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - udev->ignore_device = 1; - return 0; - } -+ if (rule->ignore_remove) { -+ udev->ignore_remove = 1; -+ dbg("remove event should be ignored"); -+ } - - if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { - struct name_entry *entry; --- -1.5.3.3 - diff --git a/0013-print-warning-for-invalid-TEST-operations.patch b/0013-print-warning-for-invalid-TEST-operations.patch deleted file mode 100644 index 564b281..0000000 --- a/0013-print-warning-for-invalid-TEST-operations.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a506e6298cffed4576f9cea8df15b2f8945fc731 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 29 Aug 2007 22:19:28 +0200 -Subject: [PATCH] print warning for invalid TEST operations - ---- - udev_rules.c | 3 ++- - udev_rules_parse.c | 5 +++++ - 2 files changed, 7 insertions(+), 1 deletions(-) - -diff --git a/udev_rules.c b/udev_rules.c -index 364d1b7..ef352ca 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -994,7 +994,8 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - } - } - -- if (rule->test.operation != KEY_OP_UNSET) { -+ if (rule->test.operation == KEY_OP_MATCH || -+ rule->test.operation == KEY_OP_NOMATCH) { - char filename[PATH_SIZE]; - char devpath[PATH_SIZE]; - char *attr; -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index 3afc31a..9e43581 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -469,6 +469,11 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - } - - if (strncasecmp(key, "TEST", sizeof("TEST")-1) == 0) { -+ if (operation != KEY_OP_MATCH && -+ operation != KEY_OP_NOMATCH) { -+ err("invalid TEST operation"); -+ goto invalid; -+ } - attr = get_key_attribute(key + sizeof("TEST")-1); - if (attr != NULL) - rule->test_mode_mask = strtol(attr, NULL, 8); --- -1.5.3.3 - diff --git a/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch b/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch deleted file mode 100644 index 3fc4998..0000000 --- a/0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch +++ /dev/null @@ -1,23 +0,0 @@ -From b5bc27029a82ff37c36f6e9d06f23c3005fe3382 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 30 Aug 2007 14:14:54 +0200 -Subject: [PATCH] rules: do not delete /lib/udev/devices/ nodes on "remove" - ---- - etc/udev/rules.d/50-udev-default.rules | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index f869f51..76f0976 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -101,3 +101,6 @@ KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" - KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" - KERNEL=="iowarrior[0-9]*", NAME="usb/%k" - -+# do not delete static device nodes -+ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" -+ --- -1.5.3.3 - diff --git a/0015-rules-remove-broken-nvram-group-assignment-without.patch b/0015-rules-remove-broken-nvram-group-assignment-without.patch deleted file mode 100644 index 87ec5ac..0000000 --- a/0015-rules-remove-broken-nvram-group-assignment-without.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9d1f93803f166149b3c467a465a126b2fb31e93c Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 30 Aug 2007 14:25:17 +0200 -Subject: [PATCH] rules: remove broken nvram group assignment without any permission - ---- - etc/udev/rules.d/50-udev-default.rules | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index 76f0976..633e2e7 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -20,7 +20,6 @@ KERNEL=="lirc0", SYMLINK+="lirc" - KERNEL=="null|zero|full|random|urandom", MODE="0666" - KERNEL=="null", SYMLINK+="XOR" - KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" --KERNEL=="nvram", GROUP="kmem", MODE="0600" - KERNEL=="ram0", SYMLINK+="ramdisk" - KERNEL=="ram1", SYMLINK+="ram" - --- -1.5.3.3 - diff --git a/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch b/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch deleted file mode 100644 index 71b7f78..0000000 --- a/0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 89e0a02226cbadf6a58c4d234e31c7111eed20bc Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 30 Aug 2007 15:03:21 +0200 -Subject: [PATCH] add /dev/rtc symlink if new rtc drivers are used - ---- - etc/udev/rules.d/50-udev-default.rules | 3 ++- - udev_node.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index 633e2e7..854809a 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -88,7 +88,8 @@ KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" - - # miscellaneous - KERNEL=="fuse", MODE="0666" --KERNEL=="rtc", MODE="0644" -+KERNEL=="rtc|rtc0", MODE="0644" -+KERNEL=="rtc0", SYMLINK+="rtc" - KERNEL=="auer[0-9]*" NAME="usb/%k" - KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" - KERNEL=="mmtimer", MODE="0644" -diff --git a/udev_node.c b/udev_node.c -index fcd52d0..25eed86 100644 ---- a/udev_node.c -+++ b/udev_node.c -@@ -133,7 +133,7 @@ static int node_symlink(const char *node, const char *slink) - stats.st_rdev == stats2.st_rdev) { - info("replace device node '%s' with symlink to our node '%s'", slink, node); - } else { -- err("device node '%s' already exists, link '%s' will not overwrite it", node, slink); -+ err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node); - goto exit; - } - } --- -1.5.3.3 - diff --git a/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch b/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch deleted file mode 100644 index 8b7b2e9..0000000 --- a/0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 39ea7c6c67de69379b603196a0eff6f7ce2e469a Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 31 Aug 2007 11:01:35 +0200 -Subject: [PATCH] increase WAIT_FOR_SYSFS timeout to 10 seconds - -We see SCSI disks where it takes 6.5 seconds to populate the -sysfs attributes. ---- - udev_rules.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev_rules.c b/udev_rules.c -index ef352ca..dcd0914 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -1040,7 +1040,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) { - int found; - -- found = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 3) == 0); -+ found = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 10) == 0); - if (!found && (rule->wait_for_sysfs.operation != KEY_OP_NOMATCH)) - goto nomatch; - } --- -1.5.3.3 - diff --git a/0018-correct-includes-in-udev_selinux.c.patch b/0018-correct-includes-in-udev_selinux.c.patch deleted file mode 100644 index 3b605a1..0000000 --- a/0018-correct-includes-in-udev_selinux.c.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 07acdb0f7413eeb261bdb52eba6abe75371cc202 Mon Sep 17 00:00:00 2001 -From: maximilian attems -Date: Thu, 6 Sep 2007 13:12:48 +0200 -Subject: [PATCH] correct includes in udev_selinux.c - ---- - udev_selinux.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev_selinux.c b/udev_selinux.c -index 1ad6e8a..3fa84a0 100644 ---- a/udev_selinux.c -+++ b/udev_selinux.c -@@ -24,8 +24,8 @@ - #include - #include - #include --#include - #include -+#include - #include - - #include "udev.h" --- -1.5.3.3 - diff --git a/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch b/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch deleted file mode 100644 index f891a79..0000000 --- a/0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 8aab4ce40b821d7b759b98bb97afcd3e0b7c80d8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 7 Sep 2007 04:01:21 +0200 -Subject: [PATCH] rules: put bsd nodes in /dev/bsd/ directory - ---- - etc/udev/rules.d/50-udev-default.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index 854809a..bdce004 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -77,6 +77,7 @@ SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" - KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" - KERNEL=="pktcdvd", NAME="pktcdvd/control" - KERNEL=="qft0", SYMLINK+="ftape" -+SUBSYSTEM=="bsg" NAME="bsg/%k" - - # network - KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" --- -1.5.3.3 - diff --git a/0020-path_id-fix-for-stacked-class-devices.patch b/0020-path_id-fix-for-stacked-class-devices.patch deleted file mode 100644 index a78c30d..0000000 --- a/0020-path_id-fix-for-stacked-class-devices.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b1ac36ff5e3756cefc79967a26280056da31bf6f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 10 Sep 2007 00:59:07 +0200 -Subject: [PATCH] path_id: fix for stacked class devices - ---- - extras/path_id/path_id | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/extras/path_id/path_id b/extras/path_id/path_id -index 57879b5..a3a627e 100755 ---- a/extras/path_id/path_id -+++ b/extras/path_id/path_id -@@ -456,7 +456,11 @@ handle_device () { - return - fi - fi -- cd $full_sysfs_path/device -+ if [ -L $full_sysfs_path/device/device ]; then -+ cd $full_sysfs_path/device/device -+ else -+ cd $full_sysfs_path/device -+ fi - ;; - esac - full_sysfs_device_path="`pwd -P`" --- -1.5.3.3 - diff --git a/0021-check-line-length-after-comment-check-and-whitespace.patch b/0021-check-line-length-after-comment-check-and-whitespace.patch deleted file mode 100644 index f104c16..0000000 --- a/0021-check-line-length-after-comment-check-and-whitespace.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 16511863d928e7fd82f15ae64850ab21e74f0f16 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 11 Sep 2007 17:17:29 +0200 -Subject: [PATCH] check line length after comment check and whitespace strip - ---- - udev_config.c | 10 +++++----- - udev_rules.c | 10 +++++----- - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/udev_config.c b/udev_config.c -index 3f226b9..2f2a69e 100644 ---- a/udev_config.c -+++ b/udev_config.c -@@ -111,11 +111,6 @@ static int parse_config_file(void) - cur += count+1; - lineno++; - -- if (count >= sizeof(line)) { -- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -- continue; -- } -- - /* eat the whitespace */ - while ((count > 0) && isspace(bufline[0])) { - bufline++; -@@ -128,6 +123,11 @@ static int parse_config_file(void) - if (bufline[0] == COMMENT_CHARACTER) - continue; - -+ if (count >= sizeof(line)) { -+ err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -+ continue; -+ } -+ - memcpy(line, bufline, count); - line[count] = '\0'; - -diff --git a/udev_rules.c b/udev_rules.c -index dcd0914..3ec8477 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -349,11 +349,6 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu - cur += count+1; - lineno++; - -- if (count >= sizeof(line)) { -- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -- continue; -- } -- - /* eat the whitespace */ - while ((count > 0) && isspace(bufline[0])) { - bufline++; -@@ -366,6 +361,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu - if (bufline[0] == COMMENT_CHARACTER) - continue; - -+ if (count >= sizeof(line)) { -+ err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -+ continue; -+ } -+ - memcpy(line, bufline, count); - line[count] = '\0'; - --- -1.5.3.3 - diff --git a/0022-only-install-.rules.patch b/0022-only-install-.rules.patch deleted file mode 100644 index 14bc15f..0000000 --- a/0022-only-install-.rules.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 554074c9ca2f1b8876176887e4656d06b870f2cd Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 11 Sep 2007 17:20:54 +0200 -Subject: [PATCH] only install *.rules - ---- - Makefile | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 39ffc7d..92ca846 100644 ---- a/Makefile -+++ b/Makefile -@@ -230,9 +230,9 @@ install-config: - @ if [ ! -r $(DESTDIR)$(configdir)/udev.conf ]; then \ - $(INSTALL_DATA) etc/udev/udev.conf $(DESTDIR)$(configdir); \ - fi -- @ for i in $(shell ls -1 etc/udev/rules.d); do \ -- if [ ! -r $(DESTDIR)$(configdir)/rules.d/$$i ]; then \ -- $(INSTALL_DATA) etc/udev/rules.d/$$i $(DESTDIR)$(configdir)/rules.d; \ -+ @ for i in etc/udev/rules.d/*.rules; do \ -+ if [ ! -r $(DESTDIR)$(configdir)/rules.d/$$(basename $$i) ]; then \ -+ $(INSTALL_DATA) $$i $(DESTDIR)$(configdir)/rules.d; \ - fi \ - done - @ extras="$(EXTRAS)"; for target in $$extras; do \ --- -1.5.3.3 - diff --git a/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch b/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch deleted file mode 100644 index c78ec9c..0000000 --- a/0023-ignore-device-node-names-while-restoring-symlinks-fr.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 25c208d659cf0f8bc887a1f7c62e9d2e0c546aec Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 12 Sep 2007 00:21:53 +0200 -Subject: [PATCH] ignore device node names while restoring symlinks from the stack - ---- - udev_node.c | 18 +++++++++++------- - 1 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/udev_node.c b/udev_node.c -index 25eed86..556a442 100644 ---- a/udev_node.c -+++ b/udev_node.c -@@ -230,11 +230,15 @@ static int update_link(struct udevice *udev, const char *name) - if (udev_db == NULL) - continue; - if (udev_db_get_device(udev_db, device->name) == 0) { -- info("compare priority of '%s' %i > %i", -- udev_db->dev->devpath, udev_db->link_priority, priority); -- if (target[0] == '\0' || udev_db->link_priority > priority) { -- priority = udev_db->link_priority; -- strlcpy(target, udev_db->name, sizeof(target)); -+ if (strcmp(udev_db->name, name) == 0) { -+ info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name); -+ } else { -+ info("compare priority of '%s' %i > %i", -+ udev_db->dev->devpath, udev_db->link_priority, priority); -+ if (target[0] == '\0' || udev_db->link_priority > priority) { -+ priority = udev_db->link_priority; -+ strlcpy(target, udev_db->name, sizeof(target)); -+ } - } - } - udev_device_cleanup(udev_db); -@@ -242,8 +246,8 @@ static int update_link(struct udevice *udev, const char *name) - name_list_cleanup(&name_list); - - if (target[0] == '\0') { -- err("missing target for '%s'", name); -- rc = -1; -+ info("no current target for '%s' found", name); -+ rc = 1; - goto out; - } - --- -1.5.3.3 - diff --git a/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch b/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch deleted file mode 100644 index e9cdd82..0000000 --- a/0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch +++ /dev/null @@ -1,103 +0,0 @@ -From ce39874580829dc97f77b78114874b5086056e5c Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 20 Sep 2007 00:41:54 +0200 -Subject: [PATCH] use SEQNUM in /dev/.udev/queue/ instead of devpath - ---- - udevd.c | 45 ++++++++++++++------------------------------- - 1 files changed, 14 insertions(+), 31 deletions(-) - -diff --git a/udevd.c b/udevd.c -index 5ff5d3f..eb311df 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -154,22 +154,16 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - char filename[PATH_SIZE]; - char filename_failed[PATH_SIZE]; - size_t start; -- struct udevd_uevent_msg *loop_msg; -- int fd; - - /* location of queue file */ -- strlcpy(filename, udev_root, sizeof(filename)); -- strlcat(filename, "/", sizeof(filename)); -- start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename)); -- strlcat(filename, msg->devpath, sizeof(filename)); -- path_encode(&filename[start], sizeof(filename) - start); -+ snprintf(filename, sizeof(filename), "%s/"EVENT_QUEUE_DIR"/%llu", udev_root, msg->seqnum); - - /* location of failed file */ - strlcpy(filename_failed, udev_root, sizeof(filename_failed)); - strlcat(filename_failed, "/", sizeof(filename_failed)); - start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed)); - strlcat(filename_failed, msg->devpath, sizeof(filename_failed)); -- path_encode(&filename_failed[start], sizeof(filename) - start); -+ path_encode(&filename_failed[start], sizeof(filename_failed) - start); - - switch (state) { - case EVENT_QUEUED: -@@ -177,12 +171,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - delete_path(filename_failed); - - create_path(filename); -- fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); -- if (fd > 0) -- close(fd); -- return; -+ symlink(msg->devpath, filename); -+ break; - case EVENT_FINISHED: -- case EVENT_FAILED: - if (msg->devpath_old != NULL) { - /* "move" event - rename failed file to current name, do not delete failed */ - char filename_failed_old[PATH_SIZE]; -@@ -201,28 +192,20 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - delete_path(filename_failed); - } - -- /* skip if events for the same path are still pending */ -- list_for_each_entry(loop_msg, &running_list, node) -- if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) -- return; -- -- list_for_each_entry(loop_msg, &exec_list, node) -- if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0) -- return; -- -+ unlink(filename); -+ delete_path(filename); -+ break; -+ case EVENT_FAILED: - /* move failed event to the failed directory */ -- if (state == EVENT_FAILED) { -- create_path(filename_failed); -- rename(filename, filename_failed); -- } else { -- unlink(filename); -- } -+ create_path(filename_failed); -+ rename(filename, filename_failed); - - /* clean up possibly empty queue directory */ - delete_path(filename); -- -- return; -+ break; - } -+ -+ return; - } - - static void msg_queue_delete(struct udevd_uevent_msg *msg) -@@ -297,7 +280,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) - } - - export_event_state(msg, EVENT_QUEUED); -- info("seq %llu forked, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); -+ info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); - - /* run one event after the other in debug mode */ - if (debug_trace) { --- -1.5.3.3 - diff --git a/0025-rules-add-memstick-module-loading.patch b/0025-rules-add-memstick-module-loading.patch deleted file mode 100644 index a212e44..0000000 --- a/0025-rules-add-memstick-module-loading.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 3a58ef80dfbc08fd8722af5408a26abe12fe053c Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 20 Sep 2007 00:46:44 +0200 -Subject: [PATCH] rules: add memstick module loading - ---- - etc/udev/rules.d/80-drivers.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules -index 3388266..5340565 100644 ---- a/etc/udev/rules.d/80-drivers.rules -+++ b/etc/udev/rules.d/80-drivers.rules -@@ -6,6 +6,7 @@ DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODAL - SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \ - RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" - SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" -+SUBSYSTEM=="memstick", RUN+="/sbin/modprobe --all ms_block mspro_block" - SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" - SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" - SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" --- -1.5.3.3 - diff --git a/0026-remove-extra-space-from-udevinfo-symlink-output.patch b/0026-remove-extra-space-from-udevinfo-symlink-output.patch deleted file mode 100644 index 8f7caa4..0000000 --- a/0026-remove-extra-space-from-udevinfo-symlink-output.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c952356635a30f610a4d1b84e84d678fee7772c8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Sep 2007 15:24:42 +0200 -Subject: [PATCH] remove extra space from udevinfo symlink output - ---- - udevinfo.c | 10 ++++++++-- - 1 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/udevinfo.c b/udevinfo.c -index be9aa76..8e54705 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -389,10 +389,16 @@ int main(int argc, char *argv[], char *envp[]) - goto exit; - if (root) - list_for_each_entry(name_loop, &udev->symlink_list, node) -- printf("%s/%s ", udev_root, name_loop->name); -+ if (name_loop->node.next != &udev->symlink_list) -+ printf("%s/%s ", udev_root, name_loop->name); -+ else -+ printf("%s/%s", udev_root, name_loop->name); - else - list_for_each_entry(name_loop, &udev->symlink_list, node) -- printf("%s ", name_loop->name); -+ if (name_loop->node.next != &udev->symlink_list) -+ printf("%s ", name_loop->name); -+ else -+ printf("%s", name_loop->name); - printf("\n"); - break; - case QUERY_PATH: --- -1.5.3.3 - diff --git a/0027-udevinfo-simplify-symlink-printing-logic.patch b/0027-udevinfo-simplify-symlink-printing-logic.patch deleted file mode 100644 index bd11d50..0000000 --- a/0027-udevinfo-simplify-symlink-printing-logic.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 18770246edda383eef523a7e3aedd08ebbbde5cf Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 20 Sep 2007 15:25:29 +0200 -Subject: [PATCH] udevinfo: simplify symlink printing logic - ---- - udevinfo.c | 23 ++++++++--------------- - 1 files changed, 8 insertions(+), 15 deletions(-) - -diff --git a/udevinfo.c b/udevinfo.c -index 8e54705..eb9b353 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -385,21 +385,14 @@ int main(int argc, char *argv[], char *envp[]) - printf("%s\n", udev->name); - break; - case QUERY_SYMLINK: -- if (list_empty(&udev->symlink_list)) -- goto exit; -- if (root) -- list_for_each_entry(name_loop, &udev->symlink_list, node) -- if (name_loop->node.next != &udev->symlink_list) -- printf("%s/%s ", udev_root, name_loop->name); -- else -- printf("%s/%s", udev_root, name_loop->name); -- else -- list_for_each_entry(name_loop, &udev->symlink_list, node) -- if (name_loop->node.next != &udev->symlink_list) -- printf("%s ", name_loop->name); -- else -- printf("%s", name_loop->name); -- printf("\n"); -+ list_for_each_entry(name_loop, &udev->symlink_list, node) { -+ char c = name_loop->node.next != &udev->symlink_list ? ' ' : '\n'; -+ -+ if (root) -+ printf("%s/%s%c", udev_root, name_loop->name, c); -+ else -+ printf("%s%c", name_loop->name, c); -+ } - break; - case QUERY_PATH: - printf("%s\n", udev->dev->devpath); --- -1.5.3.3 - diff --git a/0028-prevent-wrong-symlink-creation-if-database-disagress.patch b/0028-prevent-wrong-symlink-creation-if-database-disagress.patch deleted file mode 100644 index 613d73f..0000000 --- a/0028-prevent-wrong-symlink-creation-if-database-disagress.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b2d1ae727e78ac3e22caa11798360d87775095ff Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 20 Sep 2007 19:38:58 +0200 -Subject: [PATCH] prevent wrong symlink creation if database disagress with current rules - ---- - udev_node.c | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/udev_node.c b/udev_node.c -index 556a442..c620e4a 100644 ---- a/udev_node.c -+++ b/udev_node.c -@@ -218,14 +218,16 @@ static int update_link(struct udevice *udev, const char *name) - if (strcmp(udev->dev->devpath, device->name) == 0) { - info("compare (our own) priority of '%s' %i >= %i", - udev->dev->devpath, udev->link_priority, priority); -- if (target[0] == '\0' || udev->link_priority >= priority) { -+ if (strcmp(udev->name, name) == 0) { -+ info("'%s' is our device node, database inconsistent, skip link update", udev->name); -+ } else if (target[0] == '\0' || udev->link_priority >= priority) { - priority = udev->link_priority; - strlcpy(target, udev->name, sizeof(target)); - } - continue; - } - -- /* or something else, then read priority from database */ -+ /* another device, read priority from database */ - udev_db = udev_device_init(NULL); - if (udev_db == NULL) - continue; --- -1.5.3.3 - diff --git a/0029-fix-wrong-variable-used-in-logged-string.patch b/0029-fix-wrong-variable-used-in-logged-string.patch deleted file mode 100644 index 600ce14..0000000 --- a/0029-fix-wrong-variable-used-in-logged-string.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3a3d078cfd3a3adb1c9f66e0df95d704c3a92504 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 21 Sep 2007 00:55:19 +0200 -Subject: [PATCH] fix wrong variable used in logged string - ---- - udev_rules.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev_rules.c b/udev_rules.c -index 3ec8477..5ae4aa2 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - } - - if (!name_set) { -- info("no node name set, will use kernel name '%s'", udev->name); -+ info("no node name set, will use kernel name '%s'", udev->dev->kernel); - strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); - } - --- -1.5.3.3 - diff --git a/0030-update-README.patch b/0030-update-README.patch deleted file mode 100644 index 4330e5e..0000000 --- a/0030-update-README.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b317b96c15bc61d59f138515e71f05bbd8f7b2ff Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 21 Sep 2007 10:33:36 +0200 -Subject: [PATCH] update README - ---- - README | 13 +++++-------- - 1 files changed, 5 insertions(+), 8 deletions(-) - -diff --git a/README b/README -index 74aa790..b37d0d5 100644 ---- a/README -+++ b/README -@@ -3,13 +3,10 @@ udev - userspace device management - For more information see the files in the docs/ directory. - - Important Note: -- Integrating udev in the system is a whole lot of work, has complex dependencies -- and differs a lot from distro to distro. All major distros depend on udev these -- days and the system may not work without a proper installed version. The upstream -- udev project does not support or recommend to replace a distro's udev installation -- with the upstream version. The installation of a unmodified upstream version may -- render your system unusable. Until now, there is no "default" setup or a set of -- "default" rules provided by the upstream udev version. -+ Integrating udev in the system has complex dependencies and differs from distro -+ to distro. All major distros depend on udev these days and the system may not -+ work without a properly installed version. The upstream udev project does not -+ recommend to replace a distro's udev installation with the upstream version. - - Requirements: - - Version 2.6.15 of the Linux kernel for reliable operation of this release of -@@ -21,7 +18,7 @@ Requirements: - but it is completely silly - don't complain if anything goes wrong.) - - - The proc filesystem must be mounted on /proc, the sysfs filesystem must -- be mounted at /sys. No other location will be supported by udev. -+ be mounted at /sys. No other location is supported by udev. - - - Operation: --- -1.5.3.3 - diff --git a/0031-rule_generator-move-all-policy-from-write_net_rules.patch b/0031-rule_generator-move-all-policy-from-write_net_rules.patch deleted file mode 100644 index 69c1814..0000000 --- a/0031-rule_generator-move-all-policy-from-write_net_rules.patch +++ /dev/null @@ -1,244 +0,0 @@ -From c746922ca26fe18f6b3f3a4516e7236bfc0106b7 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 21 Sep 2007 17:42:46 +0200 -Subject: [PATCH] rule_generator: move all policy from write_net_rules to the rules file - ---- - .../75-persistent-net-generator.rules | 43 ++++++-- - extras/rule_generator/write_net_rules | 119 +++++++++----------- - 2 files changed, 84 insertions(+), 78 deletions(-) - -diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules -index f88627d..d09bc38 100644 ---- a/extras/rule_generator/75-persistent-net-generator.rules -+++ b/extras/rule_generator/75-persistent-net-generator.rules -@@ -1,33 +1,56 @@ - # do not edit this file, it will be overwritten on update - - # these rules generate rules for persistent network device naming -+# -+# variables used to communicate: -+# MATCHADDR MAC address used for the match -+# MATCHID bus_id used for the match -+# MATCHDRV driver name used for the match -+# MATCHIFTYPE interface type match -+# COMMENT comment to add to the generated rule -+# INTERFACE_NAME requested name supplied by external tool -+# INTERFACE_NEW new interface name returned by rule writer - - ACTION!="add", GOTO="persistent_net_generator_end" - SUBSYSTEM!="net", GOTO="persistent_net_generator_end" - --# device name whitelist --KERNEL!="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" -- - # ignore the interface if a name has already been set - NAME=="?*", GOTO="persistent_net_generator_end" - -+# device name whitelist -+KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" -+ -+# add interface type match for some devices -+KERNEL=="wlan*|ath*", ENV{MATCHIFTYPE}="1" -+ - # ignore Xen virtual interfaces - SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" - --# build device description string to add a comment to the generated rule -+# read MAC address -+ENV{MATCHADDR}="$attr{address}" -+ -+# do not use "locally administered" MAC address -+ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" -+ -+# do not use empty address -+ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" -+ -+# build comment line for generated rule: - SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" - SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" - SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" --SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver" - SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" --ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)" - --DRIVERS=="?*", ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env{NETDRV} --id $env{NETDEV}" -+# S/390 uses id matches only, do not use MAC address match -+SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}="" -+ -+# default comment -+ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device" - --# skip "locally administered" MAC addresses --ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" -+# write rule -+DRIVERS=="?*", IMPORT{program}="write_net_rules" - --DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" -+# rename interface if needed - ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" - - LABEL="persistent_net_generator_end" -diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules -index 62acb88..b25ecfd 100644 ---- a/extras/rule_generator/write_net_rules -+++ b/extras/rule_generator/write_net_rules -@@ -1,20 +1,25 @@ - #!/bin/sh -e - # --# This script is run if the interface (recognized by its MAC address) lacks --# a rule for persistent naming. --# --# If there is already a persistent rule with that interface name then the --# current interface needs to be renamed. --# --# If the interface needs to be renamed, a NAME=value pair will be printed --# on stdout to allow udev to IMPORT it. Then a rule for the MAC address and --# interface name is written. --# --# (C) 2006 Marco d'Itri -+# Copyright (C) 2006 Marco d'Itri -+# Copyright (C) 2007 Kay Sievers - # - # This program is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by the - # Free Software Foundation version 2 of the License. -+# -+# This script is run to create persistent network device naming rules -+# based on properties of the device. -+# If the interface needs to be renamed, INTERFACE_NEW= will be printed -+# on stdout to allow udev to IMPORT it. -+ -+# variables used to communicate: -+# MATCHADDR MAC address used for the match -+# MATCHID bus_id used for the match -+# MATCHDRV driver name used for the match -+# MATCHIFTYPE interface type match -+# COMMENT comment to add to the generated rule -+# INTERFACE_NAME requested name supplied by external tool -+# INTERFACE_NEW new interface name returned by rule writer - - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - -@@ -49,78 +54,57 @@ write_rule() { - - echo "" - [ "$comment" ] && echo "# $comment" -- echo "SUBSYSTEM==\"net\", $match, NAME=\"$name\"" -+ echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\"" - } >> $RULES_FILE - } - - if [ -z "$INTERFACE" ]; then -- echo "Missing \$INTERFACE." >&2 -+ echo "missing \$INTERFACE" >&2 - exit 1 - fi - --if [ "$1" ]; then -- while [ "$*" ] ; do -- case $1 in -- --mac) -- shift -- MAC_ADDR=$1 -- shift -- ;; -- --driver) -- shift -- DRIVER=$1 -- shift -- ;; -- --id) -- shift -- ID=$1 -- shift -- ;; -- *) -- MAC_ADDR=$1 -- shift -- ;; -- esac -- done --else -- MAC_ADDR=$(sysread address) --fi -- --if [ -z "$DRIVER" ] && [ -z "$ID" ] ; then -- if [ -z "$MAC_ADDR" ]; then -- echo "No MAC address for $INTERFACE." >&2 -- exit 1 -- fi -- if [ "$MAC_ADDR" = "00:00:00:00:00:00" ]; then -- echo "NULL MAC address for $INTERFACE." >&2 -- exit 1 -- fi --fi -- - # Prevent concurrent processes from modifying the file at the same time. - lock_rules_file - - # Check if the rules file is writeable. - choose_rules_file - --# If a rule using the current name already exists then find a new name and --# report it to udev which will rename the interface. --basename=${INTERFACE%%[0-9]*} --if interface_name_taken; then -- INTERFACE="$basename$(find_next_available "$basename[0-9]*")" -- if [ ! -t 1 ]; then -- echo "INTERFACE_NEW=$INTERFACE" -- fi -+# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces -+if [ "$MATCHADDR" ]; then -+ match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\"" - fi - --# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces --if [ "$MAC_ADDR" ] ; then -- match="DRIVERS==\"?*\", ATTR{address}==\"$MAC_ADDR\"" --else -- match="DRIVERS==\"$DRIVER\", KERNELS==\"$ID\"" -+if [ "$MATCHDRV" ]; then -+ match="$match, DRIVERS==\"$MATCHDRV\"" -+fi -+ -+if [ "$MATCHID" ]; then -+ match="$match, KERNELS==\"$MATCHID\"" -+fi -+ -+if [ "$MATCHIFTYPE" ]; then -+ match="$match, ATTR{type}==\"$MATCHIFTYPE\"" - fi --if [ $basename = "ath" -o $basename = "wlan" ]; then -- match="$match, ATTR{type}==\"1\"" # do not match the wifi* interfaces -+ -+if [ -z "$match" ]; then -+ echo "missing valid match" >&2 -+ exit 1 -+fi -+ -+if [ "$INTERFACE_NAME" ]; then -+ # external tools may request a custom name -+ COMMENT="$COMMENT (custom name provided by external tool)" -+ if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then -+ INTERFACE=$INTERFACE_NAME; -+ echo "INTERFACE_NEW=$INTERFACE" -+ fi -+else -+ # if a rule using the current name already exists, find a new name -+ basename=${INTERFACE%%[0-9]*} -+ if interface_name_taken; then -+ INTERFACE="$basename$(find_next_available "$basename[0-9]*")" -+ echo "INTERFACE_NEW=$INTERFACE" -+ fi - fi - - write_rule "$match" "$INTERFACE" "$COMMENT" -@@ -128,4 +112,3 @@ write_rule "$match" "$INTERFACE" "$COMMENT" - unlock_rules_file - - exit 0 -- --- -1.5.3.3 - diff --git a/0032-rules-Gentoo-update.patch b/0032-rules-Gentoo-update.patch deleted file mode 100644 index 32853ad..0000000 --- a/0032-rules-Gentoo-update.patch +++ /dev/null @@ -1,389 +0,0 @@ -From fdec9861b9ee473c98229f3f4d9178e2c85b5dc5 Mon Sep 17 00:00:00 2001 -From: Matthias Schwarzott -Date: Mon, 24 Sep 2007 02:59:22 +0200 -Subject: [PATCH] rules: Gentoo update - ---- - etc/udev/gentoo/30-kernel-compat.rules | 10 +- - etc/udev/gentoo/40-audio.rules | 23 +++ - etc/udev/gentoo/40-video.rules | 24 +++ - etc/udev/gentoo/50-udev.rules | 255 -------------------------------- - etc/udev/gentoo/65-permissions.rules | 20 +++ - 5 files changed, 72 insertions(+), 260 deletions(-) - create mode 100644 etc/udev/gentoo/40-audio.rules - create mode 100644 etc/udev/gentoo/40-video.rules - delete mode 100644 etc/udev/gentoo/50-udev.rules - create mode 100644 etc/udev/gentoo/65-permissions.rules - -diff --git a/etc/udev/gentoo/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules -index 7bc55c6..1f767df 100644 ---- a/etc/udev/gentoo/30-kernel-compat.rules -+++ b/etc/udev/gentoo/30-kernel-compat.rules -@@ -34,13 +34,13 @@ SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" - # 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/etc/udev/gentoo/40-audio.rules b/etc/udev/gentoo/40-audio.rules -new file mode 100644 -index 0000000..8dfcb28 ---- /dev/null -+++ b/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" -+ -diff --git a/etc/udev/gentoo/40-video.rules b/etc/udev/gentoo/40-video.rules -new file mode 100644 -index 0000000..aafcb2d ---- /dev/null -+++ b/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/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules -deleted file mode 100644 -index 7c2ac81..0000000 ---- a/etc/udev/gentoo/50-udev.rules -+++ /dev/null -@@ -1,255 +0,0 @@ --# 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 --# -- --# Net devices can have arbitrary names, even --# ones set by the user. Not try to match normal --# rules on net devices (Bug #166652) --SUBSYSTEM=="net", GOTO="gentoo_device_rules_end" -- --# 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" --SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" -- --# assign cdrom-permission also to associated generic device (for cd-burning ...) --KERNEL=="sg[0-9]*", ACTION=="add", ATTRS{type}=="4|5", 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" -- --# fb devices --KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video" -- --# floppy devices --KERNEL=="fd[0-9]*", NAME="floppy/%k", SYMLINK+="%k", GROUP="floppy" --KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/floppy/%k" --KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f $root/floppy/%k?*'" -- --# 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="0664" --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="0660", OPTIONS+="ignore_remove" --KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" -- --# 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 --SUBSYSTEM=="raw", 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" --KERNEL=="lp[0-9]*", SUBSYSTEM=="usb", 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" -- -- --SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ -- NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0664" -- --# Timeouts for scsi devices --# 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. --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" -- -- --# Load firmware --SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" -- --LABEL="gentoo_device_rules_end" -diff --git a/etc/udev/gentoo/65-permissions.rules b/etc/udev/gentoo/65-permissions.rules -new file mode 100644 -index 0000000..1cc31af ---- /dev/null -+++ b/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" -+ --- -1.5.3.3 - diff --git a/0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch b/0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch deleted file mode 100644 index 1400d77..0000000 --- a/0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5d374a84fff74853b872ec3a661fb841a2c51d8d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 25 Sep 2007 02:24:29 +0200 -Subject: [PATCH] rules: call usb_id only for SUBSYSTEMS=="usb" - ---- - etc/udev/rules.d/60-persistent-storage.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index 63e715d..017f0cd 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -35,7 +35,7 @@ KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODE - KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" - - KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" --KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="usb_id --export %p" -+KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" - KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" - KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --ignore-sysfs -s %p -d $tempnode", ENV{ID_BUS}="cciss" - KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" --- -1.5.3.3 - diff --git a/0034-rules-split-out-and-fix-persistent-tape-rules.patch b/0034-rules-split-out-and-fix-persistent-tape-rules.patch deleted file mode 100644 index ad10949..0000000 --- a/0034-rules-split-out-and-fix-persistent-tape-rules.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 31150fbbc7ee47260e5446ede5e24c8b87f4412a Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 25 Sep 2007 12:20:17 +0200 -Subject: [PATCH] rules: split out and fix persistent tape rules - -Thanks to: Robin H. Johnson for the suggestion. ---- - etc/udev/rules.d/60-persistent-storage-tape.rules | 21 +++++++++++++++++++++ - etc/udev/rules.d/60-persistent-storage.rules | 18 +++++------------- - 2 files changed, 26 insertions(+), 13 deletions(-) - create mode 100644 etc/udev/rules.d/60-persistent-storage-tape.rules - -diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules -new file mode 100644 -index 0000000..d2dbc71 ---- /dev/null -+++ b/etc/udev/rules.d/60-persistent-storage-tape.rules -@@ -0,0 +1,21 @@ -+# do not edit this file, it will be overwritten on update -+ -+# persistent storage links: /dev/tape/{by-id,by-path} -+ -+ACTION!="add", GOTO="persistent_storage_tape_end" -+ -+KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" -+ -+# type 8 devices are "Medium Changers" -+KERNEL=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -+ -+KERNEL=="st[0-9]*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" -+KERNEL=="st[0-9]*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" -+KERNEL=="st[0-9]*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" -+KERNEL=="st[0-9]*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -+ -+# by-path (shortest physical path) -+KERNEL=="st[0-9]*", IMPORT{program}="path_id %p" -+KERNEL=="st[0-9]*", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" -+ -+LABEL="persistent_storage_tape_end" -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index 017f0cd..68fe59f 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -1,15 +1,9 @@ - # do not edit this file, it will be overwritten on update - --# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name} -+# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke - - ACTION!="add", GOTO="persistent_storage_end" -- --KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" -- --# type 8 devices are "Medium Changers" --KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -- - SUBSYSTEM!="block", GOTO="persistent_storage_end" - - # skip rules for inappropriate block devices -@@ -34,13 +28,12 @@ KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode" - KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" - KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" - --KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" --KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" --KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" -+KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" -+KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" -+KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" - KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --ignore-sysfs -s %p -d $tempnode", ENV{ID_BUS}="cciss" - KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" --KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - - # libata compat (links like hd*) - KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", RESULT=="?*", ENV{ID_ATA_COMPAT}="$result", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}" -@@ -53,9 +46,8 @@ KERNEL=="mmcblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+= - ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p" - ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" - ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" --KERNEL=="st*", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" - --KERNEL=="sr*|st*", GOTO="persistent_storage_end" -+KERNEL=="sr*", GOTO="persistent_storage_end" - KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" - - # by-label/by-uuid (filesystem properties) --- -1.5.3.3 - diff --git a/0035-fix-debug-output-string.patch b/0035-fix-debug-output-string.patch deleted file mode 100644 index 99a93d5..0000000 --- a/0035-fix-debug-output-string.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d438c80e57b1cc98540399f817eda7fc2568cc72 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 25 Sep 2007 13:45:49 +0200 -Subject: [PATCH] fix debug output string - ---- - udev_sysfs.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev_sysfs.c b/udev_sysfs.c -index d5b04c3..e8909f9 100644 ---- a/udev_sysfs.c -+++ b/udev_sysfs.c -@@ -415,7 +415,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - /* read attribute value */ - fd = open(path_full, O_RDONLY); - if (fd < 0) { -- dbg("attribute '%s' does not exist", path_full); -+ dbg("attribute '%s' can not be opened", path_full); - goto out; - } - size = read(fd, value, sizeof(value)); --- -1.5.3.3 - diff --git a/0036-rule_generator-always-match-netif-type-in-generated.patch b/0036-rule_generator-always-match-netif-type-in-generated.patch deleted file mode 100644 index 78cab91..0000000 --- a/0036-rule_generator-always-match-netif-type-in-generated.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8fe5f78b7e53bcae858824f40e03d60ba19eae73 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 25 Sep 2007 17:18:49 +0200 -Subject: [PATCH] rule_generator: always match netif type in generated rule - ---- - .../75-persistent-net-generator.rules | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules -index d09bc38..726bf27 100644 ---- a/extras/rule_generator/75-persistent-net-generator.rules -+++ b/extras/rule_generator/75-persistent-net-generator.rules -@@ -20,15 +20,15 @@ NAME=="?*", GOTO="persistent_net_generator_end" - # device name whitelist - KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" - --# add interface type match for some devices --KERNEL=="wlan*|ath*", ENV{MATCHIFTYPE}="1" -- - # ignore Xen virtual interfaces - SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" - - # read MAC address - ENV{MATCHADDR}="$attr{address}" - -+# match interface type -+ENV{MATCHIFTYPE}="$attr{type}" -+ - # do not use "locally administered" MAC address - ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" - --- -1.5.3.3 - diff --git a/0037-rules-Gentoo-update.patch b/0037-rules-Gentoo-update.patch deleted file mode 100644 index 92f5fce..0000000 --- a/0037-rules-Gentoo-update.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 38e62fef89097ec3604320104197c48ebda0d591 Mon Sep 17 00:00:00 2001 -From: Matthias Schwarzott -Date: Tue, 25 Sep 2007 17:52:42 +0200 -Subject: [PATCH] rules: Gentoo update - ---- - etc/udev/gentoo/40-audio.rules | 23 ----------------------- - etc/udev/gentoo/65-permissions.rules | 2 ++ - 2 files changed, 2 insertions(+), 23 deletions(-) - delete mode 100644 etc/udev/gentoo/40-audio.rules - -diff --git a/etc/udev/gentoo/40-audio.rules b/etc/udev/gentoo/40-audio.rules -deleted file mode 100644 -index 8dfcb28..0000000 ---- a/etc/udev/gentoo/40-audio.rules -+++ /dev/null -@@ -1,23 +0,0 @@ --# 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" -- -diff --git a/etc/udev/gentoo/65-permissions.rules b/etc/udev/gentoo/65-permissions.rules -index 1cc31af..523c79d 100644 ---- a/etc/udev/gentoo/65-permissions.rules -+++ b/etc/udev/gentoo/65-permissions.rules -@@ -18,3 +18,5 @@ 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|snd", GROUP="audio" --- -1.5.3.3 - diff --git a/sources b/sources index dc8ea95..64f130a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -39bbe5ddcd62d35cd56b184d6862c540 udev-115.tar.bz2 +02c49d93ffda4a104c853c082138b835 udev-116.tar.bz2 diff --git a/udev.spec b/udev.spec index f4f1503..7e1c9d0 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 115 -Release: 5.20071012git%{?dist} +Version: 116 +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,43 +18,7 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch -Patch2: 0002-rules-fix-two-trivial-typos.patch -Patch3: 0003-rules-random-and-urandom-are-0666.patch -Patch4: 0004-rules-add-REMOVE_CMD-rule.patch -Patch5: 0005-track-move-events-to-rename-database-and-failed-fi.patch -Patch6: 0006-rules-Gentoo-update.patch -Patch7: 0007-rules-add-i2o-driver-rule.patch -Patch8: 0008-man-recreate-man-pages.patch -Patch9: 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch -Patch10: 0010-rules-Gentoo-update.patch -Patch11: 0011-add-name-substitution.patch -Patch12: 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch -Patch13: 0013-print-warning-for-invalid-TEST-operations.patch -Patch14: 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch -Patch15: 0015-rules-remove-broken-nvram-group-assignment-without.patch -Patch16: 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch -Patch17: 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch -Patch18: 0018-correct-includes-in-udev_selinux.c.patch -Patch19: 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch -Patch20: 0020-path_id-fix-for-stacked-class-devices.patch -Patch21: 0021-check-line-length-after-comment-check-and-whitespace.patch -Patch22: 0022-only-install-.rules.patch -Patch23: 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch -Patch24: 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch -Patch25: 0025-rules-add-memstick-module-loading.patch -Patch26: 0026-remove-extra-space-from-udevinfo-symlink-output.patch -Patch27: 0027-udevinfo-simplify-symlink-printing-logic.patch -Patch28: 0028-prevent-wrong-symlink-creation-if-database-disagress.patch -Patch29: 0029-fix-wrong-variable-used-in-logged-string.patch -Patch30: 0030-update-README.patch -Patch31: 0031-rule_generator-move-all-policy-from-write_net_rules.patch -Patch32: 0032-rules-Gentoo-update.patch -Patch33: 0033-rules-call-usb_id-only-for-SUBSYSTEMS-usb.patch -Patch34: 0034-rules-split-out-and-fix-persistent-tape-rules.patch -Patch35: 0035-fix-debug-output-string.patch -Patch36: 0036-rule_generator-always-match-netif-type-in-generated.patch -Patch37: 0037-rules-Gentoo-update.patch +Patch1: udev-116-nettype.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -62,7 +26,7 @@ Patch101: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires(pre): /bin/sh fileutils +Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: pam-devel glib2-devel bison @@ -105,42 +69,7 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .git1 -%patch2 -p1 -b .git2 -%patch3 -p1 -b .git3 -%patch4 -p1 -b .git4 -%patch5 -p1 -b .git5 -%patch6 -p1 -b .git6 -%patch7 -p1 -b .git7 -%patch8 -p1 -b .git8 -%patch9 -p1 -b .git9 -%patch10 -p1 -b .git10 -%patch11 -p1 -b .git11 -%patch12 -p1 -b .git12 -%patch13 -p1 -b .git13 -%patch14 -p1 -b .git14 -%patch15 -p1 -b .git15 -%patch16 -p1 -b .git16 -%patch17 -p1 -b .git17 -%patch18 -p1 -b .git18 -%patch19 -p1 -b .git19 -%patch20 -p1 -b .git20 -%patch21 -p1 -b .git21 -%patch22 -p1 -b .git22 -%patch25 -p1 -b .git25 -%patch26 -p1 -b .git26 -%patch27 -p1 -b .git27 -%patch28 -p1 -b .git28 -%patch29 -p1 -b .git29 -%patch30 -p1 -b .git30 -%patch31 -p1 -b .git31 -%patch32 -p1 -b .git32 -%patch33 -p1 -b .git33 -%patch34 -p1 -b .git34 -%patch35 -p1 -b .git35 -%patch36 -p1 -b .git36 -%patch37 -p1 -b .git37 - +%patch1 -p1 -b .nettype %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -184,7 +113,11 @@ make clean make E='@echo' Q='@' -C extras/volume_id/lib clean %endif +%ifarch sparc64 +make CC="gcc $RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ +%else make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ +%endif USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -209,7 +142,11 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} +%ifarch sparc64 +make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie"\ +%else make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ +%endif libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ EXTRAS=" \ @@ -294,7 +231,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post %preun -if [ $1 = 0 -a -f %{_initrddir}/udev ]; then +if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then @@ -303,7 +240,9 @@ if [ $1 = 0 -a -f %{_initrddir}/udev ]; then fi /sbin/chkconfig --del udev fi -/sbin/chkconfig --del udev-post +if [ "$1" = 0 ]; then + /sbin/chkconfig --del udev-post +fi exit 0 %post @@ -314,7 +253,7 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then /sbin/udevd -d fi fi -chkconfig --add udev-post +/sbin/chkconfig --add udev-post exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -422,6 +361,18 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Oct 18 2007 Harald Hoyer 116-3 +- fixed preun chkconfig +- added /sbin path to chkconfig in post section +- patch: do not generate net rules for type > 256 +- fixes glitches appearing in bz#323991 + +* Tue Oct 16 2007 Dennis Gilmore 116-2 +- sparc64 requires -fPIE not -fpie + +* Mon Oct 15 2007 Harald Hoyer 116-1 +- version 116 + * Fri Oct 12 2007 Harald Hoyer 115-5.20071012git - added upstream patch for rhbz#328691 - moved floppy module loading to pnp-alias in /etc/modprobe.d/floppy-pnp From 33d57e6374ff8efb1c23f9860b1f9451a9dc3da7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 2 Nov 2007 13:55:11 +0000 Subject: [PATCH 15/16] added patch --- udev-116-nettype.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 udev-116-nettype.patch diff --git a/udev-116-nettype.patch b/udev-116-nettype.patch new file mode 100644 index 0000000..b68f236 --- /dev/null +++ b/udev-116-nettype.patch @@ -0,0 +1,14 @@ +diff -up udev-116/extras/rule_generator/write_net_rules.nettype udev-116/extras/rule_generator/write_net_rules +--- udev-116/extras/rule_generator/write_net_rules.nettype 2007-10-18 21:16:28.000000000 +0200 ++++ udev-116/extras/rule_generator/write_net_rules 2007-10-18 21:20:55.000000000 +0200 +@@ -23,6 +23,10 @@ + + RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' + ++if [ "$MATCHIFTYPE" ]; then ++ [ $[MATCHIFTYPE] -gt 256 ] && return 0 ++fi ++ + . /lib/udev/rule_generator.functions + + interface_name_taken() { From 97b330decaeebaba6d2042b689286226b4802aa9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:37:23 +0000 Subject: [PATCH 16/16] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 7 ------- branch | 1 - 3 files changed, 8 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c1b764a..0000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# Makefile for source rpm: udev -# $Id: Makefile,v 1.1 2004/09/09 13:42:32 cvsdist Exp $ -NAME := udev -SPECFILE = $(firstword $(wildcard *.spec)) -UPSTREAM_CHECKS = sign - -include ../common/Makefile.common diff --git a/branch b/branch deleted file mode 100644 index c48525c..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-7