Hello community,
here is the log from the commit of package udev
checked in at Sun Apr 6 03:55:53 CEST 2008.
--------
--- udev/udev.changes 2008-03-15 00:18:36.000000000 +0100
+++ udev/udev.changes 2008-04-03 21:16:58.332272000 +0200
@@ -1,0 +2,11 @@
+Tue Apr 1 14:57:02 CEST 2008 - kay.sievers@novell.com
+
+- new upstream release 120
+ no longer install udevmonitor and udevtest symlinks
+- add KERNEL== match to existing persistent net rules (bnc#354141)
+- remove Conflicts: lvm - it is not a udev, but a kernel dependency
+- Conflicts: with older mkinitrd (bnc#375245)
+- change ldconfig call to "-p /sbin/ldconfig"
+- remove ancient Obsoletes: hotplug
+
+-------------------------------------------------------------------
Old:
----
udev-119.tar.bz2
New:
----
udev-120.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ udev.spec ++++++
--- /var/tmp/diff_new_pack.a22448/_old 2008-04-06 03:54:24.000000000 +0200
+++ /var/tmp/diff_new_pack.a22448/_new 2008-04-06 03:54:24.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package udev (Version 119)
+# spec file for package udev (Version 120)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,16 +13,14 @@
Name: udev
Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
-Version: 119
+Version: 120
Release: 1
License: GPL v2 or later
Group: System/Kernel
Summary: A Rule-Based Device Node and Kernel Event Manager
PreReq: /bin/pidof /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq
Requires: libvolume_id = %{version}-%{release}
-Conflicts: lvm2 < 2.02.33
-Provides: hotplug
-Obsoletes: hotplug
+Conflicts: mkinitrd < 2.2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
Source0: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2
@@ -50,6 +48,7 @@
Kay Sievers
%package -n libvolume_id-devel
+License: GPL v2 or later
Summary: Devel package for libvolume_id
Group: Development/Libraries/Other
Requires: libvolume_id = %{version}-%{release}
@@ -65,6 +64,7 @@
Kay Sievers
%package -n libvolume_id
+License: GPL v2 or later
Summary: Dynamic library, which contains functions to get volume ids
Group: System/Libraries
@@ -134,6 +134,9 @@
%post
%{fillup_and_insserv -Y boot.udev}
%{fillup_and_insserv -Y boot.udev_retry}
+# add KERNEL name match to existing persistent net rules
+sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
+ /etc/udev/rules.d/70-persistent-net.rules >/dev/null 2>&1 || :
#
# cleanup old stuff
rm -f /dev/.udevdb
@@ -155,11 +158,9 @@
%postun
%insserv_cleanup
-%post -n libvolume_id
-%run_ldconfig
+%post -n libvolume_id -p /sbin/ldconfig
-%postun -n libvolume_id
-%run_ldconfig
+%postun -n libvolume_id -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
@@ -174,8 +175,6 @@
/sbin/udevtrigger
/sbin/udevsettle
/usr/bin/udevinfo
-/usr/bin/udevtest
-/usr/sbin/udevmonitor
#
# extras
%dir /lib/udev
@@ -256,6 +255,14 @@
/%{_lib}/libvolume_id.so.*
%changelog
+* Tue Apr 01 2008 kay.sievers@novell.com
+- new upstream release 120
+ no longer install udevmonitor and udevtest symlinks
+- add KERNEL== match to existing persistent net rules (bnc#354141)
+- remove Conflicts: lvm - it is not a udev, but a kernel dependency
+- Conflicts: with older mkinitrd (bnc#375245)
+- change ldconfig call to "-p /sbin/ldconfig"
+- remove ancient Obsoletes: hotplug
* Sat Mar 15 2008 kay.sievers@novell.com
- new upstream release 119
- fix persistent net rules for identical MAC addresses (bnc#365501)
@@ -321,7 +328,7 @@
- prepare for creation of /dev/root (fate#302411)
- add symlink scd* for sr* optical drives (bnc#291401)
- add ignore_error option to modprobe rules
-* Thu Jul 05 2007 kay.sievers@suse.de
+* Fri Jul 06 2007 kay.sievers@suse.de
- modprobe all requested modules without relying on sysconfig (#286132)
- rules to load TI FlashMedia modules
- remove hwup call from boot.udev
@@ -437,7 +444,7 @@
* Wed Sep 20 2006 schwab@suse.de
- Set mode of /dev/net/tun to 0666, access restrictions are now enforced
by the kernel.
-* Wed Sep 06 2006 kay.sievers@suse.de
+* Thu Sep 07 2006 kay.sievers@suse.de
- new upstream release 099
create files instead of symlinks in /dev/.udev/{queue,failed}
- add cdrom_id rule
@@ -745,7 +752,7 @@
and symlinks
- most commands have an up-to-date manpage now
- add macio hotplug support
-* Mon Aug 29 2005 zoz@suse.de
+* Tue Aug 30 2005 zoz@suse.de
- removed sysconfig.hotplug completely
- added sysconfig.storage with options HOTPLUG_MOUNT_FSTAB and
HOTPLUG_CHECK_FILESYSTEMS. These control /sbin/udev.mount.sh.
@@ -897,7 +904,7 @@
* Thu Feb 17 2005 olh@suse.de
- always quote the enviroment variables in hotplugeventrecorder
(#50931)
-* Sun Feb 13 2005 ro@suse.de
+* Mon Feb 14 2005 ro@suse.de
- fix build on i586 (canonicalize ARCH)
* Fri Feb 11 2005 hare@suse.de
- Update to udev-052
@@ -930,7 +937,7 @@
- always insserv boot.udev (#50098)
* Sat Jan 22 2005 olh@suse.de
- udev.get_unique_drive_id.sh: handle targetN for usb-storage
-* Fri Jan 21 2005 olh@suse.de
+* Sat Jan 22 2005 olh@suse.de
- fix klibc strncat for scsi_id
* Fri Jan 21 2005 olh@suse.de
- udev.get_unique_hardware_path.sh: handle targetN for usb-storage
@@ -1090,7 +1097,7 @@
keep /dev/cdrom symlink (#41104)
* Tue May 25 2004 olh@suse.de
- call /sbin/iscsi-id in udev.get_unique_drive_id.sh
-* Mon May 24 2004 olh@suse.de
+* Tue May 25 2004 olh@suse.de
- fix typo in scsi type detection, /type is a file
add a by-serial for usb-storage, using the vendor and model data
* Sun May 23 2004 olh@suse.de
@@ -1160,7 +1167,7 @@
* Mon Mar 22 2004 olh@suse.de
- move libsysfs.so to /lib
handle ide-scsi in udev.get_unique_hardware_path.sh
-* Sun Mar 21 2004 olh@suse.de
+* Mon Mar 22 2004 olh@suse.de
- update udev.get_unique_hardware_path.sh, handle a few non-pci
busses. keep pN at the end, fdisk can handle it better
read only ascii data from usb-storage serial number,
@@ -1180,7 +1187,7 @@
add some examples about what info it can provide
* Tue Mar 16 2004 olh@suse.de
- add tree utility
-* Sat Mar 13 2004 olh@suse.de
+* Sun Mar 14 2004 olh@suse.de
- add udev.get_unique_drive_id.sh and ata_identify
* Sat Mar 13 2004 olh@suse.de
- do not install /etc/scsi_id.config
@@ -1199,7 +1206,7 @@
add /sbin/udev.get_input_lirc.sh to create /dev/input/ir symlink
* Thu Mar 04 2004 olh@suse.de
- update to udev-021
-* Sun Feb 29 2004 olh@suse.de
+* Mon Mar 01 2004 olh@suse.de
- update to udev-019
add simple /etc/init.d/boot.udev script
add symlink reverse lookup to udev
@@ -1225,7 +1232,7 @@
* Wed Feb 04 2004 hare@suse.de
- Update ash to netbsd's sh from NetBSD 1.6.1.
- Included Henry Spencers regex package.
-* Sun Feb 01 2004 olh@suse.de
+* Mon Feb 02 2004 olh@suse.de
- replace \{1,\} with {1,} in udev.get_unique_hardware_path.sh
workaround for dietlibc pattern matching. (#34244)
* Sun Feb 01 2004 olh@suse.de
@@ -1243,7 +1250,7 @@
- add /sbin/udevinfo
* Tue Jan 20 2004 olh@suse.de
- reconnect console properly, dont remove stdout for kernel threads
-* Mon Jan 19 2004 olh@suse.de
+* Tue Jan 20 2004 olh@suse.de
- avoid segfault in event recorder
* Mon Jan 19 2004 olh@suse.de
- update to current bk status, improved database query options
@@ -1251,7 +1258,7 @@
* Mon Jan 19 2004 olh@suse.de
- update to current bk status
scsi_id 0.3, kinit.sh updates
-* Wed Jan 14 2004 olh@suse.de
+* Thu Jan 15 2004 olh@suse.de
- update to udev-013
provide make_initrd scripts to put /dev into tmpfs,
sample implementation with kinit and initramfs
@@ -1263,12 +1270,12 @@
used /dev a device node directory
* Mon Dec 01 2003 uli@suse.de
- install libsysfs.a built against glibc
-* Sat Nov 29 2003 olh@suse.de
+* Sun Nov 30 2003 olh@suse.de
- update to udev-007, klibc-0.87
* Sun Nov 23 2003 olh@suse.de
- add klibc-0.81 binaries to /lib/klibc/bin
move /udev to /dev/udev
-* Wed Nov 19 2003 olh@suse.de
+* Thu Nov 20 2003 olh@suse.de
- update to udev-006
provide scsi_id
* Fri Nov 07 2003 uli@suse.de
++++++ udev-119.tar.bz2 -> udev-120.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/ChangeLog new/udev-120/ChangeLog
--- old/udev-119/ChangeLog 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/ChangeLog 2008-04-03 21:12:53.000000000 +0200
@@ -1,3 +1,21 @@
+Summary of changes from v119 to v120
+============================================
+
+Kay Sievers (9):
+ test: remove duplicated EXTRA entry
+ rules: remove last WAIT_FOR_SYSFS, load ppdev, switch scsi_device
+ udevadm: trigger - option to synthesize events and pass them to a socket
+ udevadm: info - resolve devpath if symlink is given
+ udevadm: remove old man page links and compat links for debugging tools
+ udevadm: trigger - fix broken socket option check
+ udevadm: trigger - fix --socket== + --verbose
+ also accept real socket files for RUN+="socket:<path>"
+ persistent device naming: cleanup storage rules
+
+Michael Kralka (1):
+ udevd: serialize events if they refer to the same major:minor number
+
+
Summary of changes from v118 to v119
============================================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/etc/udev/rules.d/05-udev-early.rules new/udev-120/etc/udev/rules.d/05-udev-early.rules
--- old/udev-119/etc/udev/rules.d/05-udev-early.rules 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/etc/udev/rules.d/05-udev-early.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +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"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/etc/udev/rules.d/60-persistent-storage.rules new/udev-120/etc/udev/rules.d/60-persistent-storage.rules
--- old/udev-119/etc/udev/rules.d/60-persistent-storage.rules 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/etc/udev/rules.d/60-persistent-storage.rules 2008-04-03 21:12:53.000000000 +0200
@@ -14,7 +14,7 @@
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"
# ignore partitions that span the entire disk
-ATTR{whole_disk}=="*", GOTO="persistent_storage_end"
+TEST=="whole_disk", GOTO="persistent_storage_end"
# /sys/class/block will export this
ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk"
@@ -47,9 +47,6 @@
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=="sr*", GOTO="persistent_storage_end"
-KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
-
# by-label/by-uuid (filesystem properties)
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}"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/etc/udev/rules.d/80-drivers.rules new/udev-120/etc/udev/rules.d/80-drivers.rules
--- old/udev-119/etc/udev/rules.d/80-drivers.rules 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/etc/udev/rules.d/80-drivers.rules 2008-04-03 21:12:53.000000000 +0200
@@ -10,7 +10,8 @@
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"
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg"
+SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe ppdev"
LABEL="drivers_end"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/etc/udev/rules.d/95-udev-late.rules new/udev-120/etc/udev/rules.d/95-udev-late.rules
--- old/udev-119/etc/udev/rules.d/95-udev-late.rules 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/etc/udev/rules.d/95-udev-late.rules 2008-04-03 21:12:53.000000000 +0200
@@ -4,5 +4,5 @@
ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
# event to be catched by udevmonitor
-RUN+="socket:/org/kernel/udev/monitor"
+RUN+="socket:@/org/kernel/udev/monitor"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/Makefile new/udev-120/Makefile
--- old/udev-119/Makefile 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/Makefile 2008-04-03 21:12:53.000000000 +0200
@@ -16,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-VERSION = 119
+VERSION = 120
# set this to make use of syslog
USE_LOG = true
@@ -88,7 +88,6 @@
etcdir = ${prefix}/etc
sbindir = ${prefix}/sbin
usrbindir = ${prefix}/usr/bin
-usrsbindir = ${prefix}/usr/sbin
libudevdir = ${prefix}/lib/udev
mandir = ${prefix}/usr/share/man
configdir = ${etcdir}/udev
@@ -241,12 +240,6 @@
$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(INSTALL_DATA) udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
$(INSTALL_DATA) udevadm.8 $(DESTDIR)$(mandir)/man8/udevadm.8
- ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
- ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevtest.8
- ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevtrigger.8
- ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevsettle.8
- ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8
- ln -f -s udevadm.8 $(DESTDIR)$(mandir)/man8/udevcontrol.8
@extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
@@ -255,13 +248,7 @@
uninstall-man:
- rm -f $(DESTDIR)$(mandir)/man7/udev.7
- rm -f $(DESTDIR)$(mandir)/man8/udevadm.8
- - rm -f $(DESTDIR)$(mandir)/man8/udevinfo.8
- - rm -f $(DESTDIR)$(mandir)/man8/udevtest.8
- rm -f $(DESTDIR)$(mandir)/man8/udevd.8
- - rm -f $(DESTDIR)$(mandir)/man8/udevtrigger.8
- - rm -f $(DESTDIR)$(mandir)/man8/udevsettle.8
- - rm -f $(DESTDIR)$(mandir)/man8/udevmonitor.8
- - rm -f $(DESTDIR)$(mandir)/man8/udevcontrol.8
@ extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
@@ -274,11 +261,8 @@
ln -f -s udevadm $(DESTDIR)$(sbindir)/udevtrigger
ln -f -s udevadm $(DESTDIR)$(sbindir)/udevsettle
ln -f -s udevadm $(DESTDIR)$(sbindir)/udevcontrol
- $(INSTALL) -d $(DESTDIR)$(usrsbindir)
- ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrsbindir)/udevmonitor
- mkdir -p -m 0755 $(DESTDIR)$(usrbindir)
+ $(INSTALL) -d $(DESTDIR)$(usrbindir)
ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrbindir)/udevinfo
- ln -f -s $(sbindir)/udevadm $(DESTDIR)$(usrbindir)/udevtest
@extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
@@ -295,9 +279,7 @@
- rm -f $(DESTDIR)$(sbindir)/udevtrigger
- rm -f $(DESTDIR)$(sbindir)/udevsettle
- rm -f $(DESTDIR)$(sbindir)/udevcontrol
- - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor
- rm -f $(DESTDIR)$(usrbindir)/udevinfo
- - rm -f $(DESTDIR)$(usrbindir)/udevtest
ifndef DESTDIR
- killall udevd
- rm -rf /dev/.udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/RELEASE-NOTES new/udev-120/RELEASE-NOTES
--- old/udev-119/RELEASE-NOTES 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/RELEASE-NOTES 2008-04-03 21:12:53.000000000 +0200
@@ -1,3 +1,19 @@
+udev 120
+========
+Bugfixes.
+
+The last WAIT_FOR_SYSFS rule is removed from the default rules.
+
+The symlinks to udevadm for the debugging tools: udevmonitor and
+udevtest are no longer created.
+
+The symlinks to the udevadm man page for the old tool names are
+no longer created.
+
+Abstract namespace sockets paths in RUN+="socket:@<path>" rules,
+should be prefixed with '@' to indicate that the path is not a
+real file.
+
udev 119
========
Bugfixes.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/test/simple-build-check.sh new/udev-120/test/simple-build-check.sh
--- old/udev-119/test/simple-build-check.sh 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/test/simple-build-check.sh 2008-04-03 21:12:53.000000000 +0200
@@ -10,7 +10,6 @@
extras/edd_id \
extras/floppy \
extras/firmware \
- extras/path_id \
extras/collect \
extras/rule_generator"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/TODO new/udev-120/TODO
--- old/udev-119/TODO 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/TODO 2008-04-03 21:12:53.000000000 +0200
@@ -1,13 +1,6 @@
These things would be nice to have:
-
These things will change in future udev versions:
- o warn if BUS, ID, SYSFS are used as keys
- (they are SUBSYSTEMS, KERNELS, ATTRS now)
-
-
-These things are deprecated and scheduled for removal in a future
-udev version:
- o remove man page symlinks for old tool names
- o some day, remove the symlinks to udevadm
+These things are deprecated and scheduled for removal in a future udev version:
+ o the installation of symlinks to udevadm
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udev.7 new/udev-120/udev.7
--- old/udev-119/udev.7 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udev.7 2008-04-03 21:12:53.000000000 +0200
@@ -1,6 +1,6 @@
.\" Title: udev
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.73.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.73.2 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udev
.\" Source: udev
@@ -213,6 +213,9 @@
\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\.
+.sp
+If the specifiefd string starts with
+\fBsocket:\fR\fB\fIpath\fR\fR, all current event values will be passed to the specified socket, as a message in the same format the kernel sends an uevent\. If the first character of the specified path is an @ character, an abstract namespace socket is used, instead of an existing socket file\.
.RE
.PP
\fBLABEL\fR
@@ -409,9 +412,7 @@
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 -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevadm.8 new/udev-120/udevadm.8
--- old/udev-119/udevadm.8 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevadm.8 2008-04-03 21:12:53.000000000 +0200
@@ -1,6 +1,6 @@
.\" Title: udevadm
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.73.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.73.2 http://docbook.sf.net/
.\" Date: November 2007
.\" Manual: udevadm
.\" Source: udev
@@ -97,7 +97,7 @@
.RE
.SS "udevadm trigger [options]"
.PP
-Request kernel device uevents, usually used to replay events at system coldplug\.
+Request device uevents, usually used to replay events at system coldplug\.
.PP
\fB\-\-verbose\fR
.RS 4
@@ -138,6 +138,13 @@
.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\.
.RE
+.PP
+\fB\-\-socket\fR\fB\fIpath\fR\fR
+.RS 4
+Pass the synthesized events to the specified socket, instead of triggering a global kernel event\. All available event values will be send in the same format the kernel sends an uevent, or
+\fBRUN+="socket:\fR\fB\fIpath\fR\fR\fB"\fR
+sends a message\. If the first character of the specified path is an @ character, an abstract namespace socket is used, instead of an existing socket file\.
+.RE
.SS "udevadm settle [options]"
.PP
Watches the udev event queue, and exits if all current events are handled\.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevadm.xml new/udev-120/udevadm.xml
--- old/udev-119/udevadm.xml 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevadm.xml 2008-04-03 21:12:53.000000000 +0200
@@ -130,7 +130,7 @@
</refsect2>
<refsect2><title>udevadm trigger <optional>options</optional></title>
- <para>Request kernel device uevents, usually used to replay events at system coldplug.</para>
+ <para>Request device uevents, usually used to replay events at system coldplug.</para>
<variablelist>
<varlistentry>
<term><option>--verbose</option></term>
@@ -188,6 +188,16 @@
of the sysfs attribute is checked. This option can be specified multiple times.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--socket<replaceable>path</replaceable></option></term>
+ <listitem>
+ <para>Pass the synthesized events to the specified socket, instead of triggering
+ a global kernel event. All available event values will be send in the same format
+ the kernel sends an uevent, or <option>RUN+="socket:<replaceable>path</replaceable>"</option>
+ sends a message. If the first character of the specified path is an @ character,
+ an abstract namespace socket is used, instead of an existing socket file.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect2>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevcontrol.c new/udev-120/udevcontrol.c
--- old/udev-119/udevcontrol.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevcontrol.c 2008-04-03 21:12:53.000000000 +0200
@@ -144,7 +144,7 @@
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */
strcpy(&saddr.sun_path[1], UDEVD_CTRL_SOCK_PATH);
- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+ addrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
retval = sendto(sock, &ctrl_msg, sizeof(ctrl_msg), 0, (struct sockaddr *)&saddr, addrlen);
if (retval == -1) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevd.8 new/udev-120/udevd.8
--- old/udev-119/udevd.8 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevd.8 2008-04-03 21:12:53.000000000 +0200
@@ -1,6 +1,6 @@
.\" Title: udevd
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.73.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.73.2 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udevd
.\" Source: udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udev_db.c new/udev-120/udev_db.c
--- old/udev-119/udev_db.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udev_db.c 2008-04-03 21:12:53.000000000 +0200
@@ -37,7 +37,7 @@
{
size_t start;
- /* add location of db files */
+ /* translate to location of db file */
strlcpy(filename, udev_root, len);
start = strlcat(filename, "/"DB_DIR"/", len);
strlcat(filename, devpath, len);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevd.c new/udev-120/udevd.c
--- old/udev-119/udevd.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevd.c 2008-04-03 21:12:53.000000000 +0200
@@ -479,12 +479,20 @@
return 3;
}
+ /* check for our major:minor number */
+ if (msg->devt && loop_msg->devt == msg->devt &&
+ strcmp(msg->subsystem, loop_msg->subsystem) == 0) {
+ dbg("%llu, device event still pending %llu (%d:%d)", msg->seqnum,
+ loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt));
+ return 4;
+ }
+
/* check physical device event (special case of parent) */
if (msg->physdevpath && msg->action && strcmp(msg->action, "add") == 0)
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 4;
+ return 5;
}
}
@@ -507,12 +515,20 @@
return 3;
}
+ /* check for our major:minor number */
+ if (msg->devt && loop_msg->devt == msg->devt &&
+ strcmp(msg->subsystem, loop_msg->subsystem) == 0) {
+ dbg("%llu, device event still running %llu (%d:%d)", msg->seqnum,
+ loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt));
+ return 4;
+ }
+
/* check physical device event (special case of parent) */
if (msg->physdevpath && msg->action && strcmp(msg->action, "add") == 0)
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 4;
+ return 5;
}
}
return 0;
@@ -846,7 +862,7 @@
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */
strcpy(&saddr.sun_path[1], UDEVD_CTRL_SOCK_PATH);
- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+ addrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
udevd_sock = socket(AF_LOCAL, SOCK_DGRAM, 0);
if (udevd_sock == -1) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevinfo.c new/udev-120/udevinfo.c
--- old/udev-119/udevinfo.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevinfo.c 2008-04-03 21:12:53.000000000 +0200
@@ -281,6 +281,7 @@
strlcpy(name, &optarg[strlen(udev_root)+1], sizeof(name));
else
strlcpy(name, optarg, sizeof(name));
+ remove_trailing_chars(name, '/');
dbg("name: %s", name);
break;
case 'p':
@@ -289,6 +290,27 @@
strlcpy(path, &optarg[strlen(sysfs_path)], sizeof(path));
else
strlcpy(path, optarg, sizeof(path));
+ remove_trailing_chars(path, '/');
+
+ /* possibly resolve to real devpath */
+ if (sysfs_resolve_link(path, sizeof(path)) != 0) {
+ char temp[PATH_SIZE];
+ char *pos;
+
+ /* also check if the parent is a link */
+ strlcpy(temp, path, sizeof(temp));
+ pos = strrchr(temp, '/');
+ if (pos != 0) {
+ char tail[PATH_SIZE];
+
+ strlcpy(tail, pos, sizeof(tail));
+ pos[0] = '\0';
+ if (sysfs_resolve_link(temp, sizeof(temp)) == 0) {
+ strlcpy(path, temp, sizeof(path));
+ strlcat(path, tail, sizeof(path));
+ }
+ }
+ }
dbg("path: %s", path);
break;
case 'q':
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevmonitor.c new/udev-120/udevmonitor.c
--- old/udev-119/udevmonitor.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevmonitor.c 2008-04-03 21:12:53.000000000 +0200
@@ -49,7 +49,7 @@
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */
strcpy(&saddr.sun_path[1], "/org/kernel/udev/monitor");
- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+ addrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
udev_monitor_sock = socket(AF_LOCAL, SOCK_DGRAM, 0);
if (udev_monitor_sock == -1) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udev_rules.c new/udev-120/udev_rules.c
--- old/udev-119/udev_rules.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udev_rules.c 2008-04-03 21:12:53.000000000 +0200
@@ -455,24 +455,35 @@
return rc;
}
-static int pass_env_to_socket(const char *sockname, const char *devpath, const char *action)
+static int pass_env_to_socket(const char *sockpath, const char *devpath, const char *action)
{
int sock;
struct sockaddr_un saddr;
- socklen_t addrlen;
+ socklen_t saddrlen;
+ struct stat stats;
char buf[2048];
size_t bufpos = 0;
int i;
ssize_t count;
int retval = 0;
- dbg("pass environment to socket '%s'", sockname);
+ dbg("pass environment to socket '%s'", sockpath);
sock = socket(AF_LOCAL, SOCK_DGRAM, 0);
memset(&saddr, 0x00, sizeof(struct sockaddr_un));
saddr.sun_family = AF_LOCAL;
- /* abstract namespace only */
- strcpy(&saddr.sun_path[1], sockname);
- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+ if (sockpath[0] == '@') {
+ /* abstract namespace socket requested */
+ strlcpy(&saddr.sun_path[1], &sockpath[1], sizeof(saddr.sun_path)-1);
+ saddrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
+ } else if (stat(sockpath, &stats) == 0 && S_ISSOCK(stats.st_mode)) {
+ /* existing socket file */
+ strlcpy(saddr.sun_path, sockpath, sizeof(saddr.sun_path));
+ saddrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path);
+ } else {
+ /* no socket file, assume abstract namespace socket */
+ strlcpy(&saddr.sun_path[1], sockpath, sizeof(saddr.sun_path)-1);
+ saddrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
+ }
bufpos = snprintf(buf, sizeof(buf)-1, "%s@%s", action, devpath);
bufpos++;
@@ -483,10 +494,10 @@
if (bufpos > sizeof(buf))
bufpos = sizeof(buf);
- count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, addrlen);
+ count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, saddrlen);
if (count < 0)
retval = -1;
- info("passed %zi bytes to socket '%s', ", count, sockname);
+ info("passed %zi bytes to socket '%s', ", count, sockpath);
close(sock);
return retval;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udevtrigger.c new/udev-120/udevtrigger.c
--- old/udev-119/udevtrigger.c 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udevtrigger.c 2008-04-03 21:12:53.000000000 +0200
@@ -30,9 +30,12 @@
#include
#include
#include
+#include
+#include
#include "udev.h"
#include "udevd.h"
+#include "udev_rules.h"
static int verbose;
static int dry_run;
@@ -41,6 +44,9 @@
LIST_HEAD(filter_subsystem_nomatch_list);
LIST_HEAD(filter_attr_match_list);
LIST_HEAD(filter_attr_nomatch_list);
+static int sock = -1;
+static struct sockaddr_un saddr;
+static socklen_t saddrlen;
/* devices that should run last cause of their dependencies */
static int delay_device(const char *devpath)
@@ -114,6 +120,116 @@
close(fd);
}
+static int pass_to_socket(const char *devpath, const char *action)
+{
+ struct udevice udev;
+ struct name_entry *name_loop;
+ char buf[4096];
+ size_t bufpos = 0;
+ ssize_t count;
+ char path[PATH_SIZE];
+ int fd;
+ char link_target[PATH_SIZE];
+ int len;
+ int err = 0;
+
+ if (verbose)
+ printf("%s\n", devpath);
+
+ udev_device_init(&udev);
+ udev_db_get_device(&udev, devpath);
+
+ /* add header */
+ bufpos = snprintf(buf, sizeof(buf)-1, "%s@%s", action, devpath);
+ bufpos++;
+
+ /* add standard keys */
+ bufpos += snprintf(&buf[bufpos], sizeof(buf)-1, "DEVPATH=%s", devpath);
+ bufpos++;
+ bufpos += snprintf(&buf[bufpos], sizeof(buf)-1, "ACTION=%s", action);
+ bufpos++;
+
+ /* add subsystem */
+ strlcpy(path, sysfs_path, sizeof(path));
+ strlcat(path, devpath, sizeof(path));
+ strlcat(path, "/subsystem", sizeof(path));
+ len = readlink(path, link_target, sizeof(link_target));
+ if (len > 0) {
+ char *pos;
+
+ link_target[len] = '\0';
+ pos = strrchr(link_target, '/');
+ if (pos != NULL) {
+ bufpos += snprintf(&buf[bufpos], sizeof(buf)-1, "SUBSYSTEM=%s", &pos[1]);
+ bufpos++;
+ }
+ }
+
+ /* add symlinks and node name */
+ path[0] = '\0';
+ list_for_each_entry(name_loop, &udev.symlink_list, node) {
+ strlcat(path, udev_root, sizeof(path));
+ strlcat(path, "/", sizeof(path));
+ strlcat(path, name_loop->name, sizeof(path));
+ strlcat(path, " ", sizeof(path));
+ }
+ remove_trailing_chars(path, ' ');
+ if (path[0] != '\0') {
+ bufpos += snprintf(&buf[bufpos], sizeof(buf)-1, "DEVLINKS=%s", path);
+ bufpos++;
+ }
+ if (udev.name[0] != '\0') {
+ strlcpy(path, udev_root, sizeof(path));
+ strlcat(path, "/", sizeof(path));
+ strlcat(path, udev.name, sizeof(path));
+ bufpos += snprintf(&buf[bufpos], sizeof(buf)-1, "DEVNAME=%s", path);
+ bufpos++;
+ }
+
+ /* add keys from device "uevent" file */
+ strlcpy(path, sysfs_path, sizeof(path));
+ strlcat(path, devpath, sizeof(path));
+ strlcat(path, "/uevent", sizeof(path));
+ fd = open(path, O_RDONLY);
+ if (fd >= 0) {
+ char value[4096];
+
+ count = read(fd, value, sizeof(value));
+ close(fd);
+ if (count > 0) {
+ char *key;
+
+ value[count] = '\0';
+ key = value;
+ while (key[0] != '\0') {
+ char *next;
+
+ next = strchr(key, '\n');
+ if (next == NULL)
+ break;
+ next[0] = '\0';
+ bufpos += strlcpy(&buf[bufpos], key, sizeof(buf) - bufpos-1);
+ bufpos++;
+ key = &next[1];
+ }
+ }
+ }
+
+ /* add keys from database */
+ list_for_each_entry(name_loop, &udev.env_list, node) {
+ bufpos += strlcpy(&buf[bufpos], name_loop->name, sizeof(buf) - bufpos-1);
+ bufpos++;
+ }
+ if (bufpos > sizeof(buf))
+ bufpos = sizeof(buf);
+
+ count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, saddrlen);
+ if (count < 0)
+ err = -1;
+
+ return err;
+}
+
static void exec_list(const char *action)
{
struct name_entry *loop_device;
@@ -122,15 +238,20 @@
list_for_each_entry_safe(loop_device, tmp_device, &device_list, node) {
if (delay_device(loop_device->name))
continue;
-
- trigger_uevent(loop_device->name, action);
+ if (sock >= 0)
+ pass_to_socket(loop_device->name, action);
+ else
+ trigger_uevent(loop_device->name, action);
list_del(&loop_device->node);
free(loop_device);
}
/* trigger remaining delayed devices */
list_for_each_entry_safe(loop_device, tmp_device, &device_list, node) {
- trigger_uevent(loop_device->name, action);
+ if (sock >= 0)
+ pass_to_socket(loop_device->name, action);
+ else
+ trigger_uevent(loop_device->name, action);
list_del(&loop_device->node);
free(loop_device);
}
@@ -434,12 +555,14 @@
int udevtrigger(int argc, char *argv[], char *envp[])
{
int failed = 0;
+ const char *sockpath = NULL;
int option;
const char *action = "add";
static const struct option options[] = {
{ "verbose", 0, NULL, 'v' },
{ "dry-run", 0, NULL, 'n' },
{ "retry-failed", 0, NULL, 'F' },
+ { "socket", 1, NULL, 'o' },
{ "help", 0, NULL, 'h' },
{ "action", 1, NULL, 'c' },
{ "subsystem-match", 1, NULL, 's' },
@@ -455,7 +578,7 @@
sysfs_init();
while (1) {
- option = getopt_long(argc, argv, "vnFhc:s:S:a:A:", options, NULL);
+ option = getopt_long(argc, argv, "vnFo:hc:s:S:a:A:", options, NULL);
if (option == -1)
break;
@@ -469,6 +592,9 @@
case 'F':
failed = 1;
break;
+ case 'o':
+ sockpath = optarg;
+ break;
case 'c':
action = optarg;
break;
@@ -504,6 +630,27 @@
}
}
+ if (sockpath != NULL) {
+ struct stat stats;
+
+ sock = socket(AF_LOCAL, SOCK_DGRAM, 0);
+ memset(&saddr, 0x00, sizeof(struct sockaddr_un));
+ saddr.sun_family = AF_LOCAL;
+ if (sockpath[0] == '@') {
+ /* abstract namespace socket requested */
+ strlcpy(&saddr.sun_path[1], &sockpath[1], sizeof(saddr.sun_path)-1);
+ saddrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
+ } else if (stat(sockpath, &stats) == 0 && S_ISSOCK(stats.st_mode)) {
+ /* existing socket file */
+ strlcpy(saddr.sun_path, sockpath, sizeof(saddr.sun_path));
+ saddrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path);
+ } else {
+ /* no socket file, assume abstract namespace socket */
+ strlcpy(&saddr.sun_path[1], sockpath, sizeof(saddr.sun_path)-1);
+ saddrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]);
+ }
+ }
+
if (failed) {
scan_failed();
exec_list(action);
@@ -540,6 +687,8 @@
name_list_cleanup(&filter_attr_match_list);
name_list_cleanup(&filter_attr_nomatch_list);
+ if (sock >= 0)
+ close(sock);
sysfs_cleanup();
logging_close();
return 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-119/udev.xml new/udev-120/udev.xml
--- old/udev-119/udev.xml 2008-03-15 00:05:02.000000000 +0100
+++ new/udev-120/udev.xml 2008-04-03 21:12:53.000000000 +0200
@@ -333,6 +333,12 @@
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.</para>
+ <para>If the specifiefd string starts with
+ <option>socket:<replaceable>path</replaceable></option>, all current event
+ values will be passed to the specified socket, as a message in the same
+ format the kernel sends an uevent. If the first character of the specified path
+ is an @ character, an abstract namespace socket is used, instead of an existing
+ socket file.</para>
</listitem>
</varlistentry>
@@ -600,7 +606,7 @@
<refsect1><title>AUTHOR</title>
<para>Written by Greg Kroah-Hartman <email>greg@kroah.com</email> and
Kay Sievers <email>kay.sievers@vrfy.org</email>. With much help from
- Dan Stekloff <email>dsteklof@us.ibm.com</email> and many others.</para>
+ Dan Stekloff and many others.</para>
</refsect1>
<refsect1>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org