rpms/udev/devel start_udev, 1.61, 1.62 udev-rules.patch, 1.37, 1.38 udev.nodes, 1.2, 1.3 udev.spec, 1.206, 1.207

Harald Hoyer (harald) fedora-extras-commits at redhat.com
Mon Jul 9 15:46:14 UTC 2007


Author: harald

Update of /cvs/pkgs/rpms/udev/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23628

Modified Files:
	start_udev udev-rules.patch udev.nodes udev.spec 
Log Message:
some speedups


Index: start_udev
===================================================================
RCS file: /cvs/pkgs/rpms/udev/devel/start_udev,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- start_udev	26 Jun 2007 14:39:44 -0000	1.61
+++ start_udev	9 Jul 2007 15:45:39 -0000	1.62
@@ -84,8 +84,8 @@
 	if [ -x $MAKEDEV ]; then
 		for i in /etc/udev/makedev.d/*.nodes; do
 			if [ -f "$i" ]; then 
-				cat "$i" | sed -e 's,#.*,,g' | \
-					xargs_simple -n 100 $MAKEDEV -x
+				( sed -e 's,#.*,,g' "$i" | \
+					xargs_simple -n 100 $MAKEDEV -x ) &
 			fi
 		done 
 	fi
@@ -187,8 +187,9 @@
 	ret=$[$ret + $?]
 
 	if strstr "$cmdline" modprobedebug; then
-		/sbin/udevcontrol env MODPROBE_DEBUG=1
-		MODPROBE_OPTIONS="-s -v"
+		export MODPROBE_OPTIONS="-s -v"
+		/sbin/udevcontrol env MODPROBE_OPTIONS="-s -v"
+		/sbin/udevcontrol env MODPROBE_DEBUG="1"
 	fi
 	if strstr "$cmdline" udevdebug; then
 		/sbin/udevcontrol log_priority=debug
@@ -196,9 +197,12 @@
         if strstr "$cmdline" fastudev; then
 		/sbin/udevcontrol env FASTUDEV=1
         fi
-	if strstr "$cmdline" mcollect; then
+	if strstr "$cmdline" nomcollect; then
+		# make module collection the default
+		:
+	else
 		/sbin/udevcontrol env MODPROBE_COLLECT=1
-		MCOLLECT=1
+		MODPROBE_COLLECT=1
 	fi
 	if strstr "$cmdline" udevchilds; then
 		/sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline)
@@ -210,14 +214,25 @@
 	ret=$[$ret + $?]
 	wait_for_queue $(getval udevtimeout $cmdline)
 	ret=$[$ret + $?]
-        test -e "$MCOLLECT" && /sbin/udevcontrol env MODPROBE_COLLECT=
-	unset MCOLLECT
+
+        if [ -e "$MODPROBE_COLLECT" ]; then
+		/sbin/udevcontrol env MODPROBE_COLLECT=
+		unset MODPROBE_COLLECT
+		wait_for_queue $(getval udevtimeout $cmdline)
+		ret=$[$ret + $?]
+	fi
+
 	if [ -e /dev/MODPROBE ]; then 
-		(xargs_simple /sbin/modprobe -a) < /dev/MODPROBE 2>/dev/null
+	        [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING"
+		echo
+		ret=0
+		echo -n $"Loading kernel modules: "		
+		(xargs_simple /sbin/modprobe -a) < /dev/MODPROBE 2>/dev/null &
 		rm -f /dev/MODPROBE
 		wait_for_queue $(getval udevtimeout $cmdline)
 		ret=$[$ret + $?]
 	fi
+	wait
 	/sbin/udevcontrol env STARTUP=
 	/sbin/udevcontrol env MODPROBE_DEBUG=
 else

udev-rules.patch:

Index: udev-rules.patch
===================================================================
RCS file: /cvs/pkgs/rpms/udev/devel/udev-rules.patch,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- udev-rules.patch	3 Jul 2007 10:18:00 -0000	1.37
+++ udev-rules.patch	9 Jul 2007 15:45:39 -0000	1.38
@@ -1,5 +1,5 @@
---- udev-113/etc/udev/redhat/50-udev.rules.rhrules	2007-06-27 12:46:40.000000000 +0200
-+++ udev-113/etc/udev/redhat/50-udev.rules	2007-07-03 12:15:25.000000000 +0200
+--- 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-09 15:43:49.000000000 +0200
 @@ -4,7 +4,7 @@
  # default is OWNER="root" GROUP="root", MODE="0600"
  #
@@ -18,15 +18,17 @@
  
  # audio devices
  KERNEL=="dsp*",			MODE="0660"
-@@ -99,7 +99,7 @@
+@@ -99,8 +99,8 @@
  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+="modprobe ide-scsi idescsi_nocd=1"
++		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"
 @@ -181,6 +181,8 @@
  KERNEL=="dv1394*",      	NAME="dv1394/%n"
  KERNEL=="video1394*",   	NAME="video1394/%n"
@@ -36,14 +38,56 @@
  KERNEL=="raw[0-9]*",		NAME="raw/%k"
  
  KERNEL=="lp[0-9]*",		SYMLINK+="par%n"
+@@ -321,11 +323,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"
+@@ -334,14 +336,14 @@
+ 	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"
++	ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst"
+ ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
+-	ATTRS{model}=="ADR*", RUN+="modprobe st"
++	ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st"
+ ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \
+-	RUN+="modprobe st"
++	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"
 --- 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-06-27 10:26:40.000000000 +0200
-@@ -12,7 +12,8 @@
++++ udev-113/etc/udev/redhat/05-udev-early.rules	2007-07-09 15:43:49.000000000 +0200
+@@ -5,14 +5,14 @@
+ SUBSYSTEM=="module",		OPTIONS="ignore_device"
+ 
+ 
+-ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", GOTO="skip_wait"
++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe_helper $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=="pnp", ATTR{id}=="?*", RUN+="modprobe_helper pnp:d$attr{id}"
  
  ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
  
 -ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
-+
 +KERNEL=="[0-9]*:[0-9]*", ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
  
  LABEL="skip_wait"


Index: udev.nodes
===================================================================
RCS file: /cvs/pkgs/rpms/udev/devel/udev.nodes,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- udev.nodes	11 Jan 2006 12:11:24 -0000	1.2
+++ udev.nodes	9 Jul 2007 15:45:39 -0000	1.3
@@ -22,3 +22,7 @@
 console 
 null 
 zero
+lp0
+lp1
+lp2
+lp3


Index: udev.spec
===================================================================
RCS file: /cvs/pkgs/rpms/udev/devel/udev.spec,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- udev.spec	3 Jul 2007 10:18:00 -0000	1.206
+++ udev.spec	9 Jul 2007 15:45:39 -0000	1.207
@@ -6,7 +6,7 @@
 Summary: A userspace implementation of devfs
 Name: udev
 Version: 113
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPL
 Group: System Environment/Base
 Provides: udev-persistent = %{version}-%{release}
@@ -15,7 +15,7 @@
 
 Source1: start_udev
 Source2: udev.nodes
-Source3: modprobe
+Source3: modprobe_helper.c
 Source4: fw_unit_symlinks.sh
 Source10: firmware_helper.c
 
@@ -136,6 +136,7 @@
 	" all
 
 %{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10}
+%{__cc} %{optflags} -fpie -pie -o modprobe_helper %{SOURCE3}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -196,13 +197,13 @@
 	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 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh
+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 modprobe_helper $RPM_BUILD_ROOT%{udev_scriptdir}/modprobe_helper
 #install -m 0755 udevtrigger $RPM_BUILD_ROOT/sbin
 
 mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir}
@@ -211,9 +212,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 loop nvram floppy parport lp sonypi;do
-	modprobe \$i >/dev/null 2>&1
-done
+exec /sbin/modprobe -a nvram floppy >/dev/null 2>&1 &
 EOF
 
 
@@ -276,6 +275,11 @@
 %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}/modprobe_helper
+%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
@@ -285,11 +289,6 @@
 %attr(0755,root,root) %dir %{udev_scriptdir}/
 %attr(0755,root,root) %dir %{udev_scriptdir}/devices/
 %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/
-%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
-%attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh
 
 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf
 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules
@@ -344,6 +343,9 @@
 %{_libdir}/pkgconfig/libvolume_id.pc 
 
 %changelog
+* Mon Jul  9 2007 Harald Hoyer <harald at redhat.com> - 113-3
+- speedup things a little bit
+
 * Wed Jun 27 2007 Harald Hoyer <harald at redhat.com> - 113-2
 - added more firewire symlinks (#240770)
 - minor rule patches




More information about the scm-commits mailing list