rpms/udev/FC-6 modprobe, NONE, 1.1 udev-095-dbgwait.patch, NONE, 1.1 udev-095-libvolume.patch, NONE, 1.1 start_udev, 1.56, 1.57 udev-rules.patch, 1.26, 1.27 udev.spec, 1.192, 1.193

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jan 8 17:18:55 UTC 2007


Author: harald

Update of /cvs/dist/rpms/udev/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv10911

Modified Files:
	start_udev udev-rules.patch udev.spec 
Added Files:
	modprobe udev-095-dbgwait.patch udev-095-libvolume.patch 
Log Message:
update from RHEL


--- NEW FILE modprobe ---
#!/bin/sh
if [ -f /dev/.modprobe_debug ]; then
	/sbin/modprobe -v -s $@ &>/dev/console
else
	/sbin/modprobe $@
fi


udev-095-dbgwait.patch:
 udev_utils_run.c |   42 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 34 insertions(+), 8 deletions(-)

--- NEW FILE udev-095-dbgwait.patch ---
--- 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;
 		}
 	}
 

udev-095-libvolume.patch:
 via_raid.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletion(-)

--- NEW FILE udev-095-libvolume.patch ---
From: Kay Sievers <kay.sievers at suse.de>
Date: Fri, 13 Oct 2006 11:17:13 +0000 (+0200)
Subject: volume_id: add checksum check to via_raid
X-Git-Tag: 103~4
X-Git-Url: http://www.kernel.org/git/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=2658afdcf147afd384e27f0ac9019e27de7ba397

volume_id: add checksum check to via_raid
---
 
diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c
index 42cb098..62c165e 100644
--- a/extras/volume_id/lib/via_raid.c
+++ b/extras/volume_id/lib/via_raid.c
@@ -3,6 +3,9 @@
  *
  * Copyright (C) 2005 Kay Sievers <kay.sievers at vrfy.org>
  *
+ * Based on information taken from dmraid:
+ * Copyright (C) 2004-2006 Heinz Mauelshagen, Red Hat GmbH
+ *
  *	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.
@@ -30,7 +33,7 @@ struct via_meta {
 	uint16_t	signature;
 	uint8_t		version_number;
 	struct via_array {
-		uint16_t	disk_bits;
+		uint16_t	disk_bit_mask;
 		uint8_t		disk_array_ex;
 		uint32_t	capacity_low;
 		uint32_t	capacity_high;
@@ -42,6 +45,18 @@ struct via_meta {
 
 #define VIA_SIGNATURE		0xAA55
 
+/* 8 bit checksum on first 50 bytes of metadata. */
+static uint8_t meta_checksum(struct via_meta *via)
+{
+	uint8_t i = 50, sum = 0;
+
+	while (i--)
+		sum += ((uint8_t*) via)[i];
+
+	return sum == via->checksum;
+}
+
+
 int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size)
 {
 	const uint8_t *buf;
@@ -67,6 +82,9 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size)
 	if (via->version_number > 1)
 		return -1;
 
+	if (!meta_checksum(via))
+		return -1;
+
 	volume_id_set_usage(id, VOLUME_ID_RAID);
 	snprintf(id->type_version, sizeof(id->type_version)-1, "%u", via->version_number);
 	id->type = "via_raid_member";


Index: start_udev
===================================================================
RCS file: /cvs/dist/rpms/udev/FC-6/start_udev,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- start_udev	16 Aug 2006 15:27:55 -0000	1.56
+++ start_udev	8 Jan 2007 17:18:49 -0000	1.57
@@ -180,6 +180,11 @@
 if [ -f "/sys/class/tty/console/uevent" ]; then
 	# trigger the sorted events
 	echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+	if strstr "$cmdline" modprobedebug; then
+		touch /dev/.modprobe_debug
+	else
+		rm -f /dev/.modprobe_debug
+	fi
 	/sbin/udevd -d
 	ret=$[$ret + $?]
 	if strstr "$cmdline" udevdebug; then

udev-rules.patch:
 05-udev-early.rules |    1 +
 50-udev.rules       |   44 +++++++++++++++++++++++---------------------
 2 files changed, 24 insertions(+), 21 deletions(-)

Index: udev-rules.patch
===================================================================
RCS file: /cvs/dist/rpms/udev/FC-6/udev-rules.patch,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- udev-rules.patch	30 Nov 2006 07:43:56 -0000	1.26
+++ udev-rules.patch	8 Jan 2007 17:18:49 -0000	1.27
@@ -1,5 +1,15 @@
+--- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules	2006-07-04 12:34:55.000000000 +0200
++++ udev-095/etc/udev/redhat/05-udev-early.rules	2006-12-18 10:46:05.000000000 +0100
+@@ -1,6 +1,7 @@
+ # 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"                    
+ 
+ # ignore these events until someone needs them
+ SUBSYSTEM=="drivers",		OPTIONS="ignore_device"
 --- udev-095/etc/udev/redhat/50-udev.rules.rhrules	2006-07-04 12:34:55.000000000 +0200
-+++ udev-095/etc/udev/redhat/50-udev.rules	2006-11-27 11:17:54.000000000 +0100
++++ udev-095/etc/udev/redhat/50-udev.rules	2006-12-18 10:46:53.000000000 +0100
 @@ -28,7 +28,8 @@
  KERNEL=="ippp*",		NAME="%k", MODE="0660"
  KERNEL=="isdn*",		NAME="%k", MODE="0660"
@@ -15,12 +25,21 @@
  KERNEL=="rtc",			MODE="0644"
  
 +# pnp devices
-+ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id ; done < /sys/$devpath/id'"
++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
-@@ -149,16 +153,14 @@
+@@ -99,6 +103,8 @@
+ KERNEL=="usb/lp*",		GROUP="lp", MODE="0660"
+ 
+ # tape devices
++SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \
++		RUN+="modprobe $env{UDEV_MODPROBE_DBG} 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"
+@@ -149,16 +155,14 @@
  
  # s390 devices
  KERNEL=="z90crypt",		MODE="0666"
@@ -39,7 +58,7 @@
  
  # alsa devices
  KERNEL=="controlC[0-9]*",	NAME="snd/%k"
-@@ -213,12 +215,9 @@
+@@ -213,12 +217,9 @@
  KERNEL=="sr[0-9]*",		SYMLINK+="cdrom cdrom-%k"
  KERNEL=="scd[0-9]*",		SYMLINK+="cdrom cdrom-%k"
  KERNEL=="pcd[0-9]*",		SYMLINK+="cdrom cdrom-%k"
@@ -55,7 +74,7 @@
  
  # Section for zaptel device
  KERNEL=="zapctl",     		NAME="zap/ctl"
-@@ -229,8 +228,6 @@
+@@ -229,8 +230,6 @@
  
  KERNEL=="pktcdvd", NAME="%k/control"
  
@@ -64,7 +83,7 @@
  KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \
  	SYSFS{device/media}=="floppy", \
  	SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions"
-@@ -262,7 +259,7 @@
+@@ -262,7 +261,7 @@
  SUBSYSTEM!="block", GOTO="persistent_end"
  
  # skip rules for inappropriate block devices
@@ -73,22 +92,45 @@
  
  # never access removable ide devices, the drivers are causing event loops on open()
  BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1",	GOTO="persistent_end"
-@@ -345,5 +342,8 @@
+@@ -312,7 +311,7 @@
+ 	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+="/sbin/modprobe $env{MODALIAS}"
++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{UDEV_MODPROBE_DBG} $env{MODALIAS}"
+ 
+ ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"
+ 
+@@ -326,11 +325,11 @@
+ 	RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'"
+ 
+ 
+-ACTION=="add", SUBSYSTEM=="scsi_device"	RUN+="/sbin/modprobe sg"
++ACTION=="add", SUBSYSTEM=="scsi_device"	RUN+="modprobe sg"
+ ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \
+-	RUN+="/sbin/modprobe sd_mod"
++	RUN+="modprobe sd_mod"
+ ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \
+-	RUN+="/sbin/modprobe sr_mod"
++	RUN+="modprobe sr_mod"
+ 
+ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \
+ 	SYMLINK+="scanner scanner-%k", MODE="0660"
+@@ -339,11 +338,14 @@
+ 	SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk"
+ 
+ ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \
+-	SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst"
++	SYSFS{model}!="ADR*", RUN+="modprobe osst"
+ ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \
+-	SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st"
++	SYSFS{model}=="ADR*", RUN+="modprobe st"
  ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \
- 	RUN+="/sbin/modprobe st"
- 
-+# mmc block devices
-+ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
+-	RUN+="/sbin/modprobe st"
++	RUN+="modprobe st"
 +
- RUN+="socket:/org/kernel/udev/monitor"
++# mmc block devices
++ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block"
  
---- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules	2006-07-04 12:34:55.000000000 +0200
-+++ udev-095/etc/udev/redhat/05-udev-early.rules	2006-11-20 11:22:57.000000000 +0100
-@@ -1,6 +1,7 @@
- # 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"                    
+ RUN+="socket:/org/kernel/udev/monitor"
  
- # ignore these events until someone needs them
- SUBSYSTEM=="drivers",		OPTIONS="ignore_device"


Index: udev.spec
===================================================================
RCS file: /cvs/dist/rpms/udev/FC-6/udev.spec,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -r1.192 -r1.193
--- udev.spec	30 Nov 2006 07:43:56 -0000	1.192
+++ udev.spec	8 Jan 2007 17:18:49 -0000	1.193
@@ -3,7 +3,7 @@
 Summary: A userspace implementation of devfs
 Name: udev
 Version: 095
-Release: 15
+Release: 16%{dist}
 License: GPL
 Group: System Environment/Base
 Provides: udev-persistent = 0:%{version}-%{release}
@@ -12,6 +12,7 @@
 
 Source1: start_udev
 Source2: udev.nodes
+Source3: modprobe
 
 Source10: firmware_helper.c
 
@@ -27,6 +28,8 @@
 Patch11: udev-095-selinux.patch
 Patch12: udev-095-path_id.patch
 Patch13: udev-095-path_id2.patch
+Patch14: udev-095-dbgwait.patch
+Patch15: udev-095-libvolume.patch
 
 ExclusiveOS: Linux
 URL: http://kernel.org/pub/linux/utils/kernel/hotplug/
@@ -75,6 +78,8 @@
 %patch11 -p1 -b .selinux
 %patch12 -p1 -b .pathid
 %patch13 -p1 -b .pathid2
+%patch14 -p1 -b .dbgwait
+%patch15 -p1 -b .lv
 
 %build
 
@@ -182,7 +187,6 @@
 
 install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static
 
-
 %define udev_scriptdir /lib/udev
 
 mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
@@ -191,14 +195,18 @@
 	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
-
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev
 install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev
+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 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
 
+%ifarch s390 s390x
+ln -s %{udev_scriptdir}/dasd_id $RPM_BUILD_ROOT/sbin/dasd_id
+%endif
 
 mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware
 
@@ -206,7 +214,7 @@
 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules
 cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules <<EOF
 #!/bin/sh
-for i in nvram floppy parport lp snd-powermac sonypi ;do
+for i in nvram floppy parport lp snd-powermac sonypi;do
         modprobe \$i >/dev/null 2>&1
 done
 EOF
@@ -270,7 +278,9 @@
 %attr(755,root,root) %{udev_scriptdir}/usb_id
 %attr(755,root,root) %{udev_scriptdir}/vol_id
 %attr(755,root,root) %{udev_scriptdir}/path_id
+%attr(755,root,root) %{udev_scriptdir}/modprobe
 %ifarch s390 s390x
+%attr(755,root,root) /sbin/dasd_id
 %attr(755,root,root) %{udev_scriptdir}/dasd_id
 %attr(0644,root,root) %{_mandir}/man8/dasd_id*.8*
 %endif
@@ -330,10 +340,27 @@
 %{_libdir}/pkgconfig/libvolume_id.pc 
 
 %changelog
-* Thu Nov 30 2006 Harald Hoyer <harald at redhat.com> - 095-15%{dist}
+* Mon Dec 18 2006 Harald Hoyer <harald at localhost.localdomain> - 095-14.5%{dist}
+- added symlink to /sbin/dasd_id (#219181)
+- added more debugging possibilities (#219621)
+- Resolves: rhbz#219181, rhbz#219621
+
+* Thu Dec 14 2006 Harald Hoyer <harald at redhat.com> - 095-14.4%{dist}
+- fixed typo
+- Resolves: rhbz#219113
+
+* Fri Dec  8 2006 Harald Hoyer <harald at redhat.com> - 095-14.3%{dist}
+- load ide-scsi module for tape devices (#207248,#219113)
+- Resolves: rhbz#219113
+
+* Mon Nov 27 2006 Harald Hoyer <harald at redhat.com> - 095-14.2%{dist}
 - PnP rule added (rhbz#216515)
+- Resolves: rhbz#216515
+
+* Mon Nov 20 2006 Harald Hoyer <harald at redhat.com> - 095-14.1%{dist}
 - Do not ignore dm devices completly (rhbz#204157, rhbz#214639)
 - Remove tty devices from udev.nodes (rhbz#209204)
+- Resolves: rhbz#204157, rhbz#214639, rhbz#209204
 
 * Wed Oct 11 2006 Harald Hoyer <harald at redhat.com> - 095-14
 - skip persistent block for gnbd devices (bug #210227)




More information about the fedora-cvs-commits mailing list