From 76b7bdc383462ac3d4a78151bc2d8e2997d90ca9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Nov 2004 16:16:37 +0000 Subject: [PATCH 001/640] version 042 --- .cvsignore | 1 + Makefile | 1 + mirrors | 1 + sources | 2 +- start_udev | 30 +++++++++++++++++++--- udev.spec | 65 +++++++++++++++++++++++++++++++----------------- upstream | 1 + upstream-key.gpg | 54 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 127 insertions(+), 28 deletions(-) create mode 100644 mirrors create mode 100644 upstream create mode 100644 upstream-key.gpg diff --git a/.cvsignore b/.cvsignore index 765666b..611c45c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ udev-035.tar.bz2 udev-036.tar.bz2 udev-038.tar.gz udev-039.tar.gz +udev-042.tar.bz2 diff --git a/Makefile b/Makefile index 39ea178..d1146a6 100644 --- a/Makefile +++ b/Makefile @@ -2,5 +2,6 @@ # $Id$ NAME := udev SPECFILE = $(firstword $(wildcard *.spec)) +UPSTREAM_CHECKS = sign include ../common/Makefile.common diff --git a/mirrors b/mirrors new file mode 100644 index 0000000..74b0af6 --- /dev/null +++ b/mirrors @@ -0,0 +1 @@ +ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ diff --git a/sources b/sources index 28f0c54..858528f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -8a248b0c672e06b9c399c6e31471c922 udev-039.tar.gz +0b86c5c07615f417042d796366fad4d2 udev-042.tar.bz2 diff --git a/start_udev b/start_udev index 245ab6a..623226c 100755 --- a/start_udev +++ b/start_udev @@ -44,8 +44,8 @@ make_extra_nodes () { ln -snf /proc/self/fd/2 $udev_root/stderr ln -snf /proc/kcore $udev_root/core - [ -d $udev_root/pts ] || (mkdir $udev_root/pts;chmod 0755 $udev_root/pts) - [ -d $udev_root/shm ] || (mkdir $udev_root/shm;chmod 0755 $udev_root/shm) + [ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts + [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm if [ -x $MAKEDEV ]; then $MAKEDEV -x $( @@ -167,10 +167,32 @@ ret=0 STRING=$"Starting $prog: " # propagate $udev_root from /sys echo -n "$STRING " -grep -q "none ${udev_root%/} " /proc/mounts || { + +# mount the tmpfs on ${udev_root%/}, if not already done +LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { + if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then + PTSDIR=$(mktemp -d) + mount --move /dev/pts "$PTSDIR" + fi + if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then + SHMDIR=$(mktemp -d) + mount --move /dev/shm "$SHMDIR" + fi mount -n -o mode=0755 -t tmpfs none "$udev_root" + mkdir -m 0755 $udev_root/pts + mkdir -m 0755 $udev_root/shm + if [ -n "$PTSDIR" ]; then + mount --move "$PTSDIR" /dev/pts + rmdir "$PTSDIR" + fi + if [ -n "$SHMDIR" ]; then + mount --move "$SHMDIR" /dev/shm + rmdir "$SHMDIR" + fi + ret=$[$ret + $?] } + rm -f $udev_root/.udev.tdb make_extra_nodes kill_udevd >/dev/null 2>&1 @@ -178,7 +200,7 @@ scsi_replay >/dev/null 2>&1 ret=$[$ret + $?] kill_udevd >/dev/null 2>&1 ide_scan >/dev/null 2>&1 -/sbin/udevstart /dev/null 2>&1 +/sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo diff --git a/udev.spec b/udev.spec index ed0d63d..ded108c 100644 --- a/udev.spec +++ b/udev.spec @@ -28,15 +28,15 @@ Summary: A userspace implementation of devfs Name: udev -Version: 039 -Release: 7 +Version: 042 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} Provides: udev-persistent = 0:%{version}-%{release} Obsoletes: udev-persistent < 0:030-5 %endif -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.gz +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: udev.rules Source2: udev.permissions Source3: udev.conf @@ -53,6 +53,7 @@ Source14: udev.get_unique_hardware_path.sh Source15: udev.get_unique_drive_id.sh Source16: udev.rules.persistent Source17: check-cdrom.sh +Source18: ide-media.sh Source20: start_udev Source21: udev.html @@ -63,19 +64,15 @@ Source30: include-linux-%{udev_kernel_includes}.tar.bz2 Patch1: udev-039-static.patch Patch2: udev-025-volsbin.patch -Patch3: udev-039-wait-error-log.patch -Patch4: udev-039-logging.patch -Patch5: udev-039-wait-ppp-class.patch -Patch6: udev-039-wait-dm-block.patch -Patch7: udev-039-static2.patch -Patch8: udev-039-netif.patch -Patch9: udev-039-dummy.patch -Patch10: udev-039-volume_id-nonblock.patch + Patch11: udev-039-norm.patch Patch22: udev-032-symlink.patch Patch24: udev-038-volmak.patch +Patch25: udev-039-wait.patch +Patch26: udev-039-sig.patch + %if %{klibc} Patch30: include-linux-2.6.6-fdset.patch Patch31: include-linux-2.6.6-ia64-page.patch @@ -89,6 +86,7 @@ Patch43: klibc-0.148.ia64.patch Patch44: klibc-0.148-getpagesize.patch %endif + ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -133,19 +131,14 @@ udev-persistent enables persistent device naming with udev. %patch1 -p1 -b .glibcstatic %patch2 -p1 -b .volsbin -%patch3 -p1 -b .waiterrorlog -%patch4 -p1 -b .closelog -%patch5 -p1 -b .waitppp -%patch6 -p1 -b .waitdm -%patch7 -p1 -b .udevstatic -%patch8 -p1 -b .netif -%patch9 -p1 -b .dummy -%patch10 -p1 -b .nonblock + %patch11 -p1 -b .norm %patch22 -p1 -b .symlink touch etc/init.d/udev.debian %patch24 -p1 -b .volmak +%patch25 -p1 -b .wait +%patch26 -p1 -b .sig %if %{with_persistent} mkdir ata_identify @@ -291,6 +284,7 @@ install -m 0755 pam_console_setowner/pam_console_setowner $RPM_BUILD_ROOT/sbin %endif install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev @@ -325,6 +319,9 @@ if [ $2 = 0 ]; then /bin/mknod /dev/null c 1 3 fi /sbin/start_udev >/dev/null 2>&1 + if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then + /sbin/lvm vgmknodes >/dev/null 2>&1 + fi fi exit 0 @@ -378,8 +375,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_sysconfdir}/udev/scripts/hotplug.dev %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh +%attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf +%config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions @@ -415,9 +413,30 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Mon Oct 25 2004 Harald Hoyer - 039-7 -- speedup pam_console.dev -- redirect udevstart completly to /dev/null +* Thu Nov 04 2004 Harald Hoyer - 042-1 +- version 042 + +* Thu Nov 04 2004 Harald Hoyer - 039-10 +- speed improvement, scripts in rules are now executed only once, + instead of four times + +* Thu Nov 04 2004 Harald Hoyer - 039-9 +- removed wrong SIG_IGN for SIGCHLD +- moved ide media check to script to wait for the procfs + +* Wed Nov 3 2004 Jeremy Katz - 039-8.FC3 +- recreate lvm device nodes if needed in the trigger (#137807) + +* Wed Nov 03 2004 Harald Hoyer - 039-6.FC3.2 +- replace udev.conf by default +- LANG=C for fgrep in start_udev; turn grep into fgrep + +* Tue Nov 02 2004 Harald Hoyer - 039-6.FC3.1 +- speed up pam_console.dev +- mount pts and shm, in case of the dev trigger +- increased timeout for udevstart +- removed syslog() from signal handler (caused vmware locks) +- turned off logging, which speeds up the boot process * Thu Oct 21 2004 Harald Hoyer - 039-6 - fixed typo diff --git a/upstream b/upstream new file mode 100644 index 0000000..0ed4a8b --- /dev/null +++ b/upstream @@ -0,0 +1 @@ +udev-042.tar.bz2 diff --git a/upstream-key.gpg b/upstream-key.gpg new file mode 100644 index 0000000..81cd947 --- /dev/null +++ b/upstream-key.gpg @@ -0,0 +1,54 @@ +pub 1024D/517D0F0E 2000-10-10 Linux Kernel Archives Verification Key + Key fingerprint = C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E +sub 4096g/E50A8F2A 2000-10-10 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.0.3 (GNU/Linux) +Comment: For info see http://www.gnupg.org + +mQGiBDnirDkRBADCTL/iUTeZKb0tiAcKdZdsUP/KSnrGGjlinolUAsUC0D6/hUB1 +RdCpJOOERTIEr1yvehqDM7veRhNMoxJNQxa/sSrkywey5qc8uaskUNEqenimq/70 +bahWJeoWXjad68mQFh65lULnHQrrioeJnh9UpyGJppNb/yIjdnymH9aYEwCglgP7 +UegBzH22h8NVQEK2PWWbyUUD/jQA4lI0wRWcL9HpkYkHcH0LTKRB9zYpQYtyvzJi +yTGwJyFMfYNXy0RT11dICeLkf3HMR84hkPERKMhALobLxVUbfc7j2AygmzGphWGy +DH/xjptQP/zrsq87ylYRONK18w1J42cm+yZa4XThMDPJMrb9/l8qnxU1JnW7W1al +HKTpBACbs+91KLqrnIGcF44TMwxgUj5CUrayPoEnLU+ZMBqfSjmu8RqEYmTxJCKv +7erBFSuazBGj5X7twunrtrW3bxO63MbLbHjfXSRrMnKOb8dRULIg6eWAnoAx8VVZ +YjrOpwAntU3WxYOpbiCHt9kLbb+N5rvNtFcmOqRRQaCIUFOOaLQ8TGludXggS2Vy +bmVsIEFyY2hpdmVzIFZlcmlmaWNhdGlvbiBLZXkgPGZ0cGFkbWluQGtlcm5lbC5v +cmc+iFUEExECABUFAjnirDkDCwoDAxUDAgMWAgECF4AACgkQyGugalF9Dw4MNACe +JiQTyCmQzPGou2cl/RyOXj79kYYAnAsT6xt72hp/PFiywYM9vBsDVv9niQEVAwUQ +OeKwNWx5eAAqlgcFAQEdZgf/Vn2dMKrn8021NhavP0uA3pHGRmdKQ2WJBdLiN2tv +LkpAioZtho+op+xBz8j1zdIJQ/7XWko869KHge2BAFwA8rWDzjtaAWdE0Jo/NiAR +epUwV2FdRRwSxIcNG2CCPyJnfPokRqjdl2z9k2PkwidHSq+2k6JxCWnOcIXChSKf +kHnemtA65ixAlhuxvyN3MPuYs1jAHyDGcyMfomp1qH9tXFQhhyXRrG2eMAfslstC +XGXLcoLN3O2BMR/fG2GlV6kOqGOvoMIW3clVeQLQ9B1yyekKiVY6Vg+CgK5qhg8z +9tjH4f33zzNDwsx1WSCOU/1LIPzFBNbR9QtTF2XmOUfRs4hGBBARAgAGBQI54rBc +AAoJEH2d7s4ry8YhmjsAoMUW9RxfXBSos0A6LwGd+5pXv/MRAKCYFLG2T4GSV+qf +iRsXnrgDHQHD04hGBBARAgAGBQI54rOZAAoJEPKlddweGoeC/+sAoL5f7JF21mRe +Z8VV4nhh7prm+idSAKCMXDWW/tBOeJDYpiEhgyGSGgJJWrkEDQQ54q+cEBAAjRmb +txamcZ9EYsQTnQvVL2l6vY5Rnbc1JDdcyHEV1kH5OwZWqvckL4QgKKBbTQwyB9pC +o0nGK4PkBbrwL0outfHQ5jl9DUzTKIu+asWUyf3fxfUV6j2A6BMo59KNnJzUyJ2+ +B5na6NN8nEqEtmogROtjT8LkOvYwqD4A/5re2vwtie+h5yU6A+JbyGQF6lFxThZj +4WGctBgCcDBqRkPAG8DFFAdeN5SMAArktCYuUGXi2q88EDoOs3Ykw0kB8+ZFECz/ +4/b93so5Wt2hC15cxAJoXFfR3mXHm40EHzMdEublWV4blB2KvFocQC74/H74QPUk +cWlc6EhPodKvcuOfTimDxXaiGNFONUPgNAmCXeVoOapdWpb3x7iOHPwSaXeJSrO9 +fc4GtVjDv90DT2ekK7cvYk8s6B3t7p7W21Xi+hRgrw63B3HElr01gdMZY5XA5ey/ +WmnyBS6LOxXlnVBE+2uSQ+aZHqrLpXcRvq2ZonOziDSE0i940ZvIwlSzn0U5BQWl +9hBDQw78RacYqaFvlpcGiPj75bScB4eemxV6Wdo9mtK0Vrr+9bWScXHEv7did4X+ +7tBWKbA8M+g290OSzjeQBGLuPmbjxzEKH9jcUumzBzzC5x5GFh7On9TLXQ4K/oRT +6QQpS93YrTVbR60G4MKsePWLJmg7IgYUtNdLGjsAAwUP/0aAAq8CmWtourj1XxNY +pFmOAU45d65fPWVadKyF++B+uDyRNYN7HQCqrJ7ddn0sH7OBtlE8yaBYgR0TFly9 +9+LqQO4r4IGCw2TBgA5tKnOWoPGEzvrLeoxR3SnPrKBlDvx6Rr9h3OJ9UV5u/NLh +mCP9iN10gWCGzsWbONc6qD6PugbTur44D6s4CRK9xfliSrtG3GBHW914UKjJeB9s +e3oc1rkmNv39kKcu33w4XVETAj4qpXnwoJvy639dfvnQt1TWFjIt20iP7m+jkT3B +b526uJ5GuJl6r8sm5OYYRs5cLigvUzRZVgYnjjqlRRACx0WcinKK55Li2Pq4qcRV +vSE5Tr3kTUTGxdmy113FbscrhLhesGALv3Hb7jeeWC8jviGEaHppgUumR6v0hsI1 +rZ3K8kCjFRAYV8OKtcEeMqjouArGi5dn0ClmG4lwH4SEdqC/TRNWGG+iVpWf5yCj +9mvtvUhLtl6QjXHLrJdSGyafvqR1EQMJadFt4URvx0M7tqZIcwPUnb+7Oc+J96po +e/EQmnm6rFnTpWz0BbY4mbJC7vUH4JyLs0nlxiKrBjaO9C1DSAKBpjqaga8dQe1Z +kLOI2F7IWFeKV2LaMl+ZvvfWMECNcqNW2fkCuP9Fpz5K+xg21TwovVy93aWKgFL6 +06jK51oQp3fW86xXK9ZGKYqQiEYEGBECAAYFAjnir5wACgkQyGugalF9Dw5M9QCg +hhmHalzWf8B3AVrjPrtrRHA1vlgAn3YRlU5l0V5W1iXvHXQCUHIESpgm +=SZZb +-----END PGP PUBLIC KEY BLOCK----- From 14ac6ac4320d7008d540b7c9a4fb7fea5362cd47 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Nov 2004 16:16:37 +0000 Subject: [PATCH 002/640] version 042 --- .cvsignore | 1 + Makefile | 3 ++- mirrors | 1 + sources | 2 +- start_udev | 30 +++++++++++++++++++--- udev.spec | 65 +++++++++++++++++++++++++++++++----------------- upstream | 1 + upstream-key.gpg | 54 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 128 insertions(+), 29 deletions(-) create mode 100644 mirrors create mode 100644 upstream create mode 100644 upstream-key.gpg diff --git a/.cvsignore b/.cvsignore index 765666b..611c45c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ udev-035.tar.bz2 udev-036.tar.bz2 udev-038.tar.gz udev-039.tar.gz +udev-042.tar.bz2 diff --git a/Makefile b/Makefile index 39ea178..c1b764a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # Makefile for source rpm: udev -# $Id$ +# $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/mirrors b/mirrors new file mode 100644 index 0000000..74b0af6 --- /dev/null +++ b/mirrors @@ -0,0 +1 @@ +ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ diff --git a/sources b/sources index 28f0c54..858528f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -8a248b0c672e06b9c399c6e31471c922 udev-039.tar.gz +0b86c5c07615f417042d796366fad4d2 udev-042.tar.bz2 diff --git a/start_udev b/start_udev index 245ab6a..623226c 100755 --- a/start_udev +++ b/start_udev @@ -44,8 +44,8 @@ make_extra_nodes () { ln -snf /proc/self/fd/2 $udev_root/stderr ln -snf /proc/kcore $udev_root/core - [ -d $udev_root/pts ] || (mkdir $udev_root/pts;chmod 0755 $udev_root/pts) - [ -d $udev_root/shm ] || (mkdir $udev_root/shm;chmod 0755 $udev_root/shm) + [ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts + [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm if [ -x $MAKEDEV ]; then $MAKEDEV -x $( @@ -167,10 +167,32 @@ ret=0 STRING=$"Starting $prog: " # propagate $udev_root from /sys echo -n "$STRING " -grep -q "none ${udev_root%/} " /proc/mounts || { + +# mount the tmpfs on ${udev_root%/}, if not already done +LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { + if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then + PTSDIR=$(mktemp -d) + mount --move /dev/pts "$PTSDIR" + fi + if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then + SHMDIR=$(mktemp -d) + mount --move /dev/shm "$SHMDIR" + fi mount -n -o mode=0755 -t tmpfs none "$udev_root" + mkdir -m 0755 $udev_root/pts + mkdir -m 0755 $udev_root/shm + if [ -n "$PTSDIR" ]; then + mount --move "$PTSDIR" /dev/pts + rmdir "$PTSDIR" + fi + if [ -n "$SHMDIR" ]; then + mount --move "$SHMDIR" /dev/shm + rmdir "$SHMDIR" + fi + ret=$[$ret + $?] } + rm -f $udev_root/.udev.tdb make_extra_nodes kill_udevd >/dev/null 2>&1 @@ -178,7 +200,7 @@ scsi_replay >/dev/null 2>&1 ret=$[$ret + $?] kill_udevd >/dev/null 2>&1 ide_scan >/dev/null 2>&1 -/sbin/udevstart /dev/null 2>&1 +/sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo diff --git a/udev.spec b/udev.spec index ed0d63d..ded108c 100644 --- a/udev.spec +++ b/udev.spec @@ -28,15 +28,15 @@ Summary: A userspace implementation of devfs Name: udev -Version: 039 -Release: 7 +Version: 042 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} Provides: udev-persistent = 0:%{version}-%{release} Obsoletes: udev-persistent < 0:030-5 %endif -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.gz +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: udev.rules Source2: udev.permissions Source3: udev.conf @@ -53,6 +53,7 @@ Source14: udev.get_unique_hardware_path.sh Source15: udev.get_unique_drive_id.sh Source16: udev.rules.persistent Source17: check-cdrom.sh +Source18: ide-media.sh Source20: start_udev Source21: udev.html @@ -63,19 +64,15 @@ Source30: include-linux-%{udev_kernel_includes}.tar.bz2 Patch1: udev-039-static.patch Patch2: udev-025-volsbin.patch -Patch3: udev-039-wait-error-log.patch -Patch4: udev-039-logging.patch -Patch5: udev-039-wait-ppp-class.patch -Patch6: udev-039-wait-dm-block.patch -Patch7: udev-039-static2.patch -Patch8: udev-039-netif.patch -Patch9: udev-039-dummy.patch -Patch10: udev-039-volume_id-nonblock.patch + Patch11: udev-039-norm.patch Patch22: udev-032-symlink.patch Patch24: udev-038-volmak.patch +Patch25: udev-039-wait.patch +Patch26: udev-039-sig.patch + %if %{klibc} Patch30: include-linux-2.6.6-fdset.patch Patch31: include-linux-2.6.6-ia64-page.patch @@ -89,6 +86,7 @@ Patch43: klibc-0.148.ia64.patch Patch44: klibc-0.148-getpagesize.patch %endif + ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -133,19 +131,14 @@ udev-persistent enables persistent device naming with udev. %patch1 -p1 -b .glibcstatic %patch2 -p1 -b .volsbin -%patch3 -p1 -b .waiterrorlog -%patch4 -p1 -b .closelog -%patch5 -p1 -b .waitppp -%patch6 -p1 -b .waitdm -%patch7 -p1 -b .udevstatic -%patch8 -p1 -b .netif -%patch9 -p1 -b .dummy -%patch10 -p1 -b .nonblock + %patch11 -p1 -b .norm %patch22 -p1 -b .symlink touch etc/init.d/udev.debian %patch24 -p1 -b .volmak +%patch25 -p1 -b .wait +%patch26 -p1 -b .sig %if %{with_persistent} mkdir ata_identify @@ -291,6 +284,7 @@ install -m 0755 pam_console_setowner/pam_console_setowner $RPM_BUILD_ROOT/sbin %endif install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev @@ -325,6 +319,9 @@ if [ $2 = 0 ]; then /bin/mknod /dev/null c 1 3 fi /sbin/start_udev >/dev/null 2>&1 + if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then + /sbin/lvm vgmknodes >/dev/null 2>&1 + fi fi exit 0 @@ -378,8 +375,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_sysconfdir}/udev/scripts/hotplug.dev %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh +%attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf +%config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions @@ -415,9 +413,30 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Mon Oct 25 2004 Harald Hoyer - 039-7 -- speedup pam_console.dev -- redirect udevstart completly to /dev/null +* Thu Nov 04 2004 Harald Hoyer - 042-1 +- version 042 + +* Thu Nov 04 2004 Harald Hoyer - 039-10 +- speed improvement, scripts in rules are now executed only once, + instead of four times + +* Thu Nov 04 2004 Harald Hoyer - 039-9 +- removed wrong SIG_IGN for SIGCHLD +- moved ide media check to script to wait for the procfs + +* Wed Nov 3 2004 Jeremy Katz - 039-8.FC3 +- recreate lvm device nodes if needed in the trigger (#137807) + +* Wed Nov 03 2004 Harald Hoyer - 039-6.FC3.2 +- replace udev.conf by default +- LANG=C for fgrep in start_udev; turn grep into fgrep + +* Tue Nov 02 2004 Harald Hoyer - 039-6.FC3.1 +- speed up pam_console.dev +- mount pts and shm, in case of the dev trigger +- increased timeout for udevstart +- removed syslog() from signal handler (caused vmware locks) +- turned off logging, which speeds up the boot process * Thu Oct 21 2004 Harald Hoyer - 039-6 - fixed typo diff --git a/upstream b/upstream new file mode 100644 index 0000000..0ed4a8b --- /dev/null +++ b/upstream @@ -0,0 +1 @@ +udev-042.tar.bz2 diff --git a/upstream-key.gpg b/upstream-key.gpg new file mode 100644 index 0000000..81cd947 --- /dev/null +++ b/upstream-key.gpg @@ -0,0 +1,54 @@ +pub 1024D/517D0F0E 2000-10-10 Linux Kernel Archives Verification Key + Key fingerprint = C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E +sub 4096g/E50A8F2A 2000-10-10 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.0.3 (GNU/Linux) +Comment: For info see http://www.gnupg.org + +mQGiBDnirDkRBADCTL/iUTeZKb0tiAcKdZdsUP/KSnrGGjlinolUAsUC0D6/hUB1 +RdCpJOOERTIEr1yvehqDM7veRhNMoxJNQxa/sSrkywey5qc8uaskUNEqenimq/70 +bahWJeoWXjad68mQFh65lULnHQrrioeJnh9UpyGJppNb/yIjdnymH9aYEwCglgP7 +UegBzH22h8NVQEK2PWWbyUUD/jQA4lI0wRWcL9HpkYkHcH0LTKRB9zYpQYtyvzJi +yTGwJyFMfYNXy0RT11dICeLkf3HMR84hkPERKMhALobLxVUbfc7j2AygmzGphWGy +DH/xjptQP/zrsq87ylYRONK18w1J42cm+yZa4XThMDPJMrb9/l8qnxU1JnW7W1al +HKTpBACbs+91KLqrnIGcF44TMwxgUj5CUrayPoEnLU+ZMBqfSjmu8RqEYmTxJCKv +7erBFSuazBGj5X7twunrtrW3bxO63MbLbHjfXSRrMnKOb8dRULIg6eWAnoAx8VVZ +YjrOpwAntU3WxYOpbiCHt9kLbb+N5rvNtFcmOqRRQaCIUFOOaLQ8TGludXggS2Vy +bmVsIEFyY2hpdmVzIFZlcmlmaWNhdGlvbiBLZXkgPGZ0cGFkbWluQGtlcm5lbC5v +cmc+iFUEExECABUFAjnirDkDCwoDAxUDAgMWAgECF4AACgkQyGugalF9Dw4MNACe +JiQTyCmQzPGou2cl/RyOXj79kYYAnAsT6xt72hp/PFiywYM9vBsDVv9niQEVAwUQ +OeKwNWx5eAAqlgcFAQEdZgf/Vn2dMKrn8021NhavP0uA3pHGRmdKQ2WJBdLiN2tv +LkpAioZtho+op+xBz8j1zdIJQ/7XWko869KHge2BAFwA8rWDzjtaAWdE0Jo/NiAR +epUwV2FdRRwSxIcNG2CCPyJnfPokRqjdl2z9k2PkwidHSq+2k6JxCWnOcIXChSKf +kHnemtA65ixAlhuxvyN3MPuYs1jAHyDGcyMfomp1qH9tXFQhhyXRrG2eMAfslstC +XGXLcoLN3O2BMR/fG2GlV6kOqGOvoMIW3clVeQLQ9B1yyekKiVY6Vg+CgK5qhg8z +9tjH4f33zzNDwsx1WSCOU/1LIPzFBNbR9QtTF2XmOUfRs4hGBBARAgAGBQI54rBc +AAoJEH2d7s4ry8YhmjsAoMUW9RxfXBSos0A6LwGd+5pXv/MRAKCYFLG2T4GSV+qf +iRsXnrgDHQHD04hGBBARAgAGBQI54rOZAAoJEPKlddweGoeC/+sAoL5f7JF21mRe +Z8VV4nhh7prm+idSAKCMXDWW/tBOeJDYpiEhgyGSGgJJWrkEDQQ54q+cEBAAjRmb +txamcZ9EYsQTnQvVL2l6vY5Rnbc1JDdcyHEV1kH5OwZWqvckL4QgKKBbTQwyB9pC +o0nGK4PkBbrwL0outfHQ5jl9DUzTKIu+asWUyf3fxfUV6j2A6BMo59KNnJzUyJ2+ +B5na6NN8nEqEtmogROtjT8LkOvYwqD4A/5re2vwtie+h5yU6A+JbyGQF6lFxThZj +4WGctBgCcDBqRkPAG8DFFAdeN5SMAArktCYuUGXi2q88EDoOs3Ykw0kB8+ZFECz/ +4/b93so5Wt2hC15cxAJoXFfR3mXHm40EHzMdEublWV4blB2KvFocQC74/H74QPUk +cWlc6EhPodKvcuOfTimDxXaiGNFONUPgNAmCXeVoOapdWpb3x7iOHPwSaXeJSrO9 +fc4GtVjDv90DT2ekK7cvYk8s6B3t7p7W21Xi+hRgrw63B3HElr01gdMZY5XA5ey/ +WmnyBS6LOxXlnVBE+2uSQ+aZHqrLpXcRvq2ZonOziDSE0i940ZvIwlSzn0U5BQWl +9hBDQw78RacYqaFvlpcGiPj75bScB4eemxV6Wdo9mtK0Vrr+9bWScXHEv7did4X+ +7tBWKbA8M+g290OSzjeQBGLuPmbjxzEKH9jcUumzBzzC5x5GFh7On9TLXQ4K/oRT +6QQpS93YrTVbR60G4MKsePWLJmg7IgYUtNdLGjsAAwUP/0aAAq8CmWtourj1XxNY +pFmOAU45d65fPWVadKyF++B+uDyRNYN7HQCqrJ7ddn0sH7OBtlE8yaBYgR0TFly9 +9+LqQO4r4IGCw2TBgA5tKnOWoPGEzvrLeoxR3SnPrKBlDvx6Rr9h3OJ9UV5u/NLh +mCP9iN10gWCGzsWbONc6qD6PugbTur44D6s4CRK9xfliSrtG3GBHW914UKjJeB9s +e3oc1rkmNv39kKcu33w4XVETAj4qpXnwoJvy639dfvnQt1TWFjIt20iP7m+jkT3B +b526uJ5GuJl6r8sm5OYYRs5cLigvUzRZVgYnjjqlRRACx0WcinKK55Li2Pq4qcRV +vSE5Tr3kTUTGxdmy113FbscrhLhesGALv3Hb7jeeWC8jviGEaHppgUumR6v0hsI1 +rZ3K8kCjFRAYV8OKtcEeMqjouArGi5dn0ClmG4lwH4SEdqC/TRNWGG+iVpWf5yCj +9mvtvUhLtl6QjXHLrJdSGyafvqR1EQMJadFt4URvx0M7tqZIcwPUnb+7Oc+J96po +e/EQmnm6rFnTpWz0BbY4mbJC7vUH4JyLs0nlxiKrBjaO9C1DSAKBpjqaga8dQe1Z +kLOI2F7IWFeKV2LaMl+ZvvfWMECNcqNW2fkCuP9Fpz5K+xg21TwovVy93aWKgFL6 +06jK51oQp3fW86xXK9ZGKYqQiEYEGBECAAYFAjnir5wACgkQyGugalF9Dw5M9QCg +hhmHalzWf8B3AVrjPrtrRHA1vlgAn3YRlU5l0V5W1iXvHXQCUHIESpgm +=SZZb +-----END PGP PUBLIC KEY BLOCK----- From 616a8ffbbb42756bc354e7b8adce81483afd9da3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 13 Dec 2004 13:00:54 +0000 Subject: [PATCH 003/640] - version 048 - major specfile cleanup --- start_udev | 2 - udev.spec | 167 ++++++----------------------------------------------- 2 files changed, 18 insertions(+), 151 deletions(-) diff --git a/start_udev b/start_udev index 623226c..320a26f 100755 --- a/start_udev +++ b/start_udev @@ -161,7 +161,6 @@ ide_scan() { export ACTION=add -export UDEV_NO_SLEEP=1 prog=udev ret=0 STRING=$"Starting $prog: " @@ -198,7 +197,6 @@ make_extra_nodes kill_udevd >/dev/null 2>&1 scsi_replay >/dev/null 2>&1 ret=$[$ret + $?] -kill_udevd >/dev/null 2>&1 ide_scan >/dev/null 2>&1 /sbin/udevstart ret=$[$ret + $?] diff --git a/udev.spec b/udev.spec index ded108c..cb8a787 100644 --- a/udev.spec +++ b/udev.spec @@ -1,34 +1,12 @@ -# if we want to build the static version with klibc or not -# 0 - build with glibc -# 1 - build with klibc -%define klibc 0 - -# if we want to build the volume_id "extra" package or not -# 0 - do not build the package -# 1 - build it -%define volume_id 1 - -# if we want to build the scsi_id "extra" package or not -# 0 - do not build the package -# 1 - build it -%define scsi_id 1 - -%define chassis_id 0 - -# if we want to build pam_console support -# 0 - do not build the package -# 1 - build it -%define pam_console 1 - %define udev_kernel_includes 2.6.6 -%define debug true +%define debug false %define with_persistent 0 Summary: A userspace implementation of devfs Name: udev -Version: 042 +Version: 048 Release: 1 License: GPL Group: System Environment/Base @@ -43,8 +21,6 @@ Source3: udev.conf Source4: pam_console.dev Source5: MAKEDEV.dev -Source10: pam_console_setowner-1.4.tgz - Source11: ata_identify.c Source12: ata_identify-Makefile @@ -52,40 +28,15 @@ Source13: udev.get_persistent_device_name.sh Source14: udev.get_unique_hardware_path.sh Source15: udev.get_unique_drive_id.sh Source16: udev.rules.persistent + Source17: check-cdrom.sh Source18: ide-media.sh +Source19: dvb.sh Source20: start_udev Source21: udev.html -%if %{klibc} -Source30: include-linux-%{udev_kernel_includes}.tar.bz2 -%endif - Patch1: udev-039-static.patch -Patch2: udev-025-volsbin.patch - -Patch11: udev-039-norm.patch - -Patch22: udev-032-symlink.patch -Patch24: udev-038-volmak.patch - -Patch25: udev-039-wait.patch -Patch26: udev-039-sig.patch - -%if %{klibc} -Patch30: include-linux-2.6.6-fdset.patch -Patch31: include-linux-2.6.6-ia64-page.patch -Patch32: include-linux-2.6.6-ia64-break.patch -Patch33: include-linux-2.6.6-s390-bitops.patch - -Patch40: udev-025-klibc-strnlen.patch -Patch41: udev-029-lseek64.patch -Patch42: klibc-0.115-ia64.patch -Patch43: klibc-0.148.ia64.patch -Patch44: klibc-0.148-getpagesize.patch -%endif - ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -98,10 +49,8 @@ Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev Provides: dev = 0:3.12-1 -%if %{pam_console} BuildRequires: pam-devel glib2-devel bison Requires: pam -%endif %description udev is a implementation of devfs in userspace using sysfs and @@ -121,24 +70,11 @@ udev-persistent enables persistent device naming with udev. %define add %{nil} %prep -%if %{pam_console} -%define pamadd -a 10 -%endif -%if %{klibc} -%define klibcadd -a 30 -%endif -%setup -q %{pamadd} %{klibcadd} +%setup -q %patch1 -p1 -b .glibcstatic -%patch2 -p1 -b .volsbin -%patch11 -p1 -b .norm - -%patch22 -p1 -b .symlink touch etc/init.d/udev.debian -%patch24 -p1 -b .volmak -%patch25 -p1 -b .wait -%patch26 -p1 -b .sig %if %{with_persistent} mkdir ata_identify @@ -148,46 +84,12 @@ cp %{SOURCE12} ata_identify/Makefile cp %{SOURCE21} . -%if %{klibc} -mkdir -p klibc/klibc/linux -mv include-linux-%{udev_kernel_includes} klibc/klibc/linux/include -pushd klibc/klibc/linux/include -for i in `find -type f`;do grep -Eq 'linux/(autoconf|config).h' $i || continue ; sed '/linux\/autoconf.h/d;/linux\/config.h/d' < $i > $i. ; mv $i. $i ; done -ln -sv asm-`uname -m | -sed -e s/i.86/i386/ \ --e s/sun4u/sparc64/ \ --e s/arm.*/arm/ \ --e s/sa110/arm/ \ --e s/s390x/s390/ \ --e s/parisc64/parisc/` asm -popd - -%patch30 -p1 -b .fdset -%patch31 -p1 -b .page -%patch32 -p1 -b .break -%patch33 -p1 -b .bitops - -pushd klibc -%patch40 -p2 -b .strnlen -%patch41 -p2 -b .lseek64 -%patch42 -p1 -b .p40 -%patch43 -p1 -b .p41 -#%patch44 -p1 -b .p42 -popd -%endif - %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) -%if %{klibc} -make CC="gcc $RPM_OPT_FLAGS -D__user=''" KERNEL_DIR="$PWD/klibc/klibc/linux" \ - USE_KLIBC=true \ - USE_SELINUX=false \ -%else make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_KLIBC=false \ USE_SELINUX=true \ -%endif udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ EXTRAS="" udev @@ -202,30 +104,15 @@ make CC="gcc $RPM_OPT_FLAGS" \ USE_LOG=true \ DEBUG=%{debug} \ EXTRAS=" \ -%if %{scsi_id} extras/scsi_id \ -%endif -%if %{volume_id} extras/volume_id \ -%endif -%if %{chassis_id} extras/chassis_id \ -%endif %if %{with_persistent} ata_identify" %else " %endif - - -%if %{pam_console} -pushd pam_console_setowner -make LIBDIR=%{_libdir} -popd -%endif - - %install rm -rf $RPM_BUILD_ROOT @@ -233,15 +120,9 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ -%if %{scsi_id} extras/scsi_id \ -%endif -%if %{volume_id} extras/volume_id \ -%endif -%if %{chassis_id} extras/chassis_id \ -%endif %if %{with_persistent} ata_identify" %else @@ -277,14 +158,12 @@ install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-udev-p install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif -%if %{pam_console} install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev -install -m 0755 pam_console_setowner/pam_console_setowner $RPM_BUILD_ROOT/sbin -%endif install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev @@ -331,8 +210,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html -%doc etc/udev/udev.rules.{examples,redhat} -%doc etc/udev/udev.permissions.redhat +%doc etc/udev/redhat/udev.rules +%doc etc/udev/redhat/udev.permissions %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -341,7 +220,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev -%attr(0755,root,root) /sbin/wait_for_sysfs %if %{with_persistent} %attr(755,root,root) /sbin/ata_identify %endif @@ -354,13 +232,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/permissions.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ - - -%if %{pam_console} -%attr(0755,root,root) /sbin/pam_console_setowner %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev -%endif %config(missingok) %{_sysconfdir}/dev.d/net/hotplug.dev @@ -376,29 +249,23 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_sysconfdir}/udev/scripts/hotplug.dev %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh +%attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions -%config(missingok) %{_sysconfdir}/hotplug.d/default/05-wait_for_sysfs.hotplug %config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %attr(0644,root,root) %{_mandir}/man8/udev*.8* -%if %{scsi_id} - %attr(755,root,root) /sbin/scsi_id - %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config - %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%endif -%if %{volume_id} - %attr(755,root,root) /sbin/udev_volume_id -%endif -%if %{chassis_id} - %attr(755,root,root) /sbin/chassis_id -%endif +%attr(755,root,root) /sbin/scsi_id +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* +%attr(755,root,root) /sbin/udev_volume_id +%attr(755,root,root) /sbin/chassis_id %if %{with_persistent} %files -n udev-persistent @@ -406,13 +273,15 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh -%if %{volume_id} %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules -%endif %endif %changelog +* Mon Dec 13 2004 Harald Hoyer - 048-1 +- version 048 +- major specfile cleanup + * Thu Nov 04 2004 Harald Hoyer - 042-1 - version 042 From 03795f0742a292d11ca406375531854385cb7b03 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 13 Dec 2004 13:00:54 +0000 Subject: [PATCH 004/640] - version 048 - major specfile cleanup --- start_udev | 2 - udev.spec | 167 ++++++----------------------------------------------- 2 files changed, 18 insertions(+), 151 deletions(-) diff --git a/start_udev b/start_udev index 623226c..320a26f 100755 --- a/start_udev +++ b/start_udev @@ -161,7 +161,6 @@ ide_scan() { export ACTION=add -export UDEV_NO_SLEEP=1 prog=udev ret=0 STRING=$"Starting $prog: " @@ -198,7 +197,6 @@ make_extra_nodes kill_udevd >/dev/null 2>&1 scsi_replay >/dev/null 2>&1 ret=$[$ret + $?] -kill_udevd >/dev/null 2>&1 ide_scan >/dev/null 2>&1 /sbin/udevstart ret=$[$ret + $?] diff --git a/udev.spec b/udev.spec index ded108c..cb8a787 100644 --- a/udev.spec +++ b/udev.spec @@ -1,34 +1,12 @@ -# if we want to build the static version with klibc or not -# 0 - build with glibc -# 1 - build with klibc -%define klibc 0 - -# if we want to build the volume_id "extra" package or not -# 0 - do not build the package -# 1 - build it -%define volume_id 1 - -# if we want to build the scsi_id "extra" package or not -# 0 - do not build the package -# 1 - build it -%define scsi_id 1 - -%define chassis_id 0 - -# if we want to build pam_console support -# 0 - do not build the package -# 1 - build it -%define pam_console 1 - %define udev_kernel_includes 2.6.6 -%define debug true +%define debug false %define with_persistent 0 Summary: A userspace implementation of devfs Name: udev -Version: 042 +Version: 048 Release: 1 License: GPL Group: System Environment/Base @@ -43,8 +21,6 @@ Source3: udev.conf Source4: pam_console.dev Source5: MAKEDEV.dev -Source10: pam_console_setowner-1.4.tgz - Source11: ata_identify.c Source12: ata_identify-Makefile @@ -52,40 +28,15 @@ Source13: udev.get_persistent_device_name.sh Source14: udev.get_unique_hardware_path.sh Source15: udev.get_unique_drive_id.sh Source16: udev.rules.persistent + Source17: check-cdrom.sh Source18: ide-media.sh +Source19: dvb.sh Source20: start_udev Source21: udev.html -%if %{klibc} -Source30: include-linux-%{udev_kernel_includes}.tar.bz2 -%endif - Patch1: udev-039-static.patch -Patch2: udev-025-volsbin.patch - -Patch11: udev-039-norm.patch - -Patch22: udev-032-symlink.patch -Patch24: udev-038-volmak.patch - -Patch25: udev-039-wait.patch -Patch26: udev-039-sig.patch - -%if %{klibc} -Patch30: include-linux-2.6.6-fdset.patch -Patch31: include-linux-2.6.6-ia64-page.patch -Patch32: include-linux-2.6.6-ia64-break.patch -Patch33: include-linux-2.6.6-s390-bitops.patch - -Patch40: udev-025-klibc-strnlen.patch -Patch41: udev-029-lseek64.patch -Patch42: klibc-0.115-ia64.patch -Patch43: klibc-0.148.ia64.patch -Patch44: klibc-0.148-getpagesize.patch -%endif - ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -98,10 +49,8 @@ Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev Provides: dev = 0:3.12-1 -%if %{pam_console} BuildRequires: pam-devel glib2-devel bison Requires: pam -%endif %description udev is a implementation of devfs in userspace using sysfs and @@ -121,24 +70,11 @@ udev-persistent enables persistent device naming with udev. %define add %{nil} %prep -%if %{pam_console} -%define pamadd -a 10 -%endif -%if %{klibc} -%define klibcadd -a 30 -%endif -%setup -q %{pamadd} %{klibcadd} +%setup -q %patch1 -p1 -b .glibcstatic -%patch2 -p1 -b .volsbin -%patch11 -p1 -b .norm - -%patch22 -p1 -b .symlink touch etc/init.d/udev.debian -%patch24 -p1 -b .volmak -%patch25 -p1 -b .wait -%patch26 -p1 -b .sig %if %{with_persistent} mkdir ata_identify @@ -148,46 +84,12 @@ cp %{SOURCE12} ata_identify/Makefile cp %{SOURCE21} . -%if %{klibc} -mkdir -p klibc/klibc/linux -mv include-linux-%{udev_kernel_includes} klibc/klibc/linux/include -pushd klibc/klibc/linux/include -for i in `find -type f`;do grep -Eq 'linux/(autoconf|config).h' $i || continue ; sed '/linux\/autoconf.h/d;/linux\/config.h/d' < $i > $i. ; mv $i. $i ; done -ln -sv asm-`uname -m | -sed -e s/i.86/i386/ \ --e s/sun4u/sparc64/ \ --e s/arm.*/arm/ \ --e s/sa110/arm/ \ --e s/s390x/s390/ \ --e s/parisc64/parisc/` asm -popd - -%patch30 -p1 -b .fdset -%patch31 -p1 -b .page -%patch32 -p1 -b .break -%patch33 -p1 -b .bitops - -pushd klibc -%patch40 -p2 -b .strnlen -%patch41 -p2 -b .lseek64 -%patch42 -p1 -b .p40 -%patch43 -p1 -b .p41 -#%patch44 -p1 -b .p42 -popd -%endif - %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) -%if %{klibc} -make CC="gcc $RPM_OPT_FLAGS -D__user=''" KERNEL_DIR="$PWD/klibc/klibc/linux" \ - USE_KLIBC=true \ - USE_SELINUX=false \ -%else make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_KLIBC=false \ USE_SELINUX=true \ -%endif udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ EXTRAS="" udev @@ -202,30 +104,15 @@ make CC="gcc $RPM_OPT_FLAGS" \ USE_LOG=true \ DEBUG=%{debug} \ EXTRAS=" \ -%if %{scsi_id} extras/scsi_id \ -%endif -%if %{volume_id} extras/volume_id \ -%endif -%if %{chassis_id} extras/chassis_id \ -%endif %if %{with_persistent} ata_identify" %else " %endif - - -%if %{pam_console} -pushd pam_console_setowner -make LIBDIR=%{_libdir} -popd -%endif - - %install rm -rf $RPM_BUILD_ROOT @@ -233,15 +120,9 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ -%if %{scsi_id} extras/scsi_id \ -%endif -%if %{volume_id} extras/volume_id \ -%endif -%if %{chassis_id} extras/chassis_id \ -%endif %if %{with_persistent} ata_identify" %else @@ -277,14 +158,12 @@ install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-udev-p install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif -%if %{pam_console} install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev -install -m 0755 pam_console_setowner/pam_console_setowner $RPM_BUILD_ROOT/sbin -%endif install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev @@ -331,8 +210,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html -%doc etc/udev/udev.rules.{examples,redhat} -%doc etc/udev/udev.permissions.redhat +%doc etc/udev/redhat/udev.rules +%doc etc/udev/redhat/udev.permissions %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -341,7 +220,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev -%attr(0755,root,root) /sbin/wait_for_sysfs %if %{with_persistent} %attr(755,root,root) /sbin/ata_identify %endif @@ -354,13 +232,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/permissions.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ - - -%if %{pam_console} -%attr(0755,root,root) /sbin/pam_console_setowner %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev -%endif %config(missingok) %{_sysconfdir}/dev.d/net/hotplug.dev @@ -376,29 +249,23 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_sysconfdir}/udev/scripts/hotplug.dev %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh +%attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions -%config(missingok) %{_sysconfdir}/hotplug.d/default/05-wait_for_sysfs.hotplug %config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %attr(0644,root,root) %{_mandir}/man8/udev*.8* -%if %{scsi_id} - %attr(755,root,root) /sbin/scsi_id - %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config - %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%endif -%if %{volume_id} - %attr(755,root,root) /sbin/udev_volume_id -%endif -%if %{chassis_id} - %attr(755,root,root) /sbin/chassis_id -%endif +%attr(755,root,root) /sbin/scsi_id +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* +%attr(755,root,root) /sbin/udev_volume_id +%attr(755,root,root) /sbin/chassis_id %if %{with_persistent} %files -n udev-persistent @@ -406,13 +273,15 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh -%if %{volume_id} %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules -%endif %endif %changelog +* Mon Dec 13 2004 Harald Hoyer - 048-1 +- version 048 +- major specfile cleanup + * Thu Nov 04 2004 Harald Hoyer - 042-1 - version 042 From 3fcf0b00303732e7f05632ff825f070552d5ebe3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 13 Dec 2004 13:02:40 +0000 Subject: [PATCH 005/640] - version 048 --- .cvsignore | 1 + sources | 2 +- upstream | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 611c45c..9229995 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,3 +7,4 @@ udev-036.tar.bz2 udev-038.tar.gz udev-039.tar.gz udev-042.tar.bz2 +udev-048.tar.bz2 diff --git a/sources b/sources index 858528f..29644e2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -0b86c5c07615f417042d796366fad4d2 udev-042.tar.bz2 +b4f383ae6d1a9f197f5c618717e2d582 udev-048.tar.bz2 diff --git a/upstream b/upstream index 0ed4a8b..3426d9b 100644 --- a/upstream +++ b/upstream @@ -1 +1,2 @@ udev-042.tar.bz2 +udev-048.tar.bz2 From c4e0a9283577972f4ed27c5591bfdbf0c85fa8da Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 13 Dec 2004 13:02:40 +0000 Subject: [PATCH 006/640] - version 048 --- .cvsignore | 1 + sources | 2 +- upstream | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 611c45c..9229995 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,3 +7,4 @@ udev-036.tar.bz2 udev-038.tar.gz udev-039.tar.gz udev-042.tar.bz2 +udev-048.tar.bz2 diff --git a/sources b/sources index 858528f..29644e2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -0b86c5c07615f417042d796366fad4d2 udev-042.tar.bz2 +b4f383ae6d1a9f197f5c618717e2d582 udev-048.tar.bz2 diff --git a/upstream b/upstream index 0ed4a8b..3426d9b 100644 --- a/upstream +++ b/upstream @@ -1 +1,2 @@ udev-042.tar.bz2 +udev-048.tar.bz2 From ef3022c468a4f4776c8476732bded4edba609491 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Dec 2004 14:36:32 +0000 Subject: [PATCH 007/640] - fixed a case where reading /proc/ide/hd?/media returns EIO - changed all device node permissions of group "disk" to 0640 --- udev.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cb8a787..331deca 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 048 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -37,6 +37,7 @@ Source20: start_udev Source21: udev.html Patch1: udev-039-static.patch +Patch2: udev-039-media.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -73,6 +74,7 @@ udev-persistent enables persistent device naming with udev. %setup -q %patch1 -p1 -b .glibcstatic +%patch2 -p1 -b .media touch etc/init.d/udev.debian @@ -278,6 +280,12 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Dec 16 2004 Harald Hoyer - 048-2 +- fixed a case where reading /proc/ide/hd?/media returns EIO + (bug rh#142713) +- changed all device node permissions of group "disk" to 0640 + (bug rh#110197) + * Mon Dec 13 2004 Harald Hoyer - 048-1 - version 048 - major specfile cleanup From 7c6763afcbbf6c772efaa22fb91a3fa36a032327 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Dec 2004 14:36:32 +0000 Subject: [PATCH 008/640] - fixed a case where reading /proc/ide/hd?/media returns EIO - changed all device node permissions of group "disk" to 0640 --- udev.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cb8a787..331deca 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 048 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -37,6 +37,7 @@ Source20: start_udev Source21: udev.html Patch1: udev-039-static.patch +Patch2: udev-039-media.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -73,6 +74,7 @@ udev-persistent enables persistent device naming with udev. %setup -q %patch1 -p1 -b .glibcstatic +%patch2 -p1 -b .media touch etc/init.d/udev.debian @@ -278,6 +280,12 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Dec 16 2004 Harald Hoyer - 048-2 +- fixed a case where reading /proc/ide/hd?/media returns EIO + (bug rh#142713) +- changed all device node permissions of group "disk" to 0640 + (bug rh#110197) + * Mon Dec 13 2004 Harald Hoyer - 048-1 - version 048 - major specfile cleanup From b84222682c84de67b97619eb2e956a0e25c80efb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Dec 2004 14:49:09 +0000 Subject: [PATCH 009/640] - remove with -fr in case of a directory (bug rh#142962) --- start_udev | 2 +- udev.spec | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 320a26f..eece82d 100755 --- a/start_udev +++ b/start_udev @@ -192,7 +192,7 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { ret=$[$ret + $?] } -rm -f $udev_root/.udev.tdb +rm -fr "$udev_db" make_extra_nodes kill_udevd >/dev/null 2>&1 scsi_replay >/dev/null 2>&1 diff --git a/udev.spec b/udev.spec index 331deca..cfd4a38 100644 --- a/udev.spec +++ b/udev.spec @@ -285,6 +285,7 @@ rm -rf $RPM_BUILD_ROOT (bug rh#142713) - changed all device node permissions of group "disk" to 0640 (bug rh#110197) +- remove $udev_db with -fr in case of a directory (bug rh#142962) * Mon Dec 13 2004 Harald Hoyer - 048-1 - version 048 From e2e104fd8f32c9ccee2ee8c6240724fb05cbfc73 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Dec 2004 14:49:09 +0000 Subject: [PATCH 010/640] - remove with -fr in case of a directory (bug rh#142962) --- start_udev | 2 +- udev.spec | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 320a26f..eece82d 100755 --- a/start_udev +++ b/start_udev @@ -192,7 +192,7 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { ret=$[$ret + $?] } -rm -f $udev_root/.udev.tdb +rm -fr "$udev_db" make_extra_nodes kill_udevd >/dev/null 2>&1 scsi_replay >/dev/null 2>&1 diff --git a/udev.spec b/udev.spec index 331deca..cfd4a38 100644 --- a/udev.spec +++ b/udev.spec @@ -285,6 +285,7 @@ rm -rf $RPM_BUILD_ROOT (bug rh#142713) - changed all device node permissions of group "disk" to 0640 (bug rh#110197) +- remove $udev_db with -fr in case of a directory (bug rh#142962) * Mon Dec 13 2004 Harald Hoyer - 048-1 - version 048 From ca08dd8bf1fe0cf52073b03c9aa0fd0e63dbd5f3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 21 Dec 2004 15:35:37 +0000 Subject: [PATCH 011/640] -maybe fixed bug rh#143367 --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cfd4a38..95b5766 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 048 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -38,6 +38,7 @@ Source21: udev.html Patch1: udev-039-static.patch Patch2: udev-039-media.patch +Patch3: udev-039-dircheck.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -75,6 +76,7 @@ udev-persistent enables persistent device naming with udev. %patch1 -p1 -b .glibcstatic %patch2 -p1 -b .media +%patch3 -p1 -b .dircheck touch etc/init.d/udev.debian @@ -280,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Dec 21 2004 Harald Hoyer - 048-3 +- maybe fixed bug rh#143367 + * Thu Dec 16 2004 Harald Hoyer - 048-2 - fixed a case where reading /proc/ide/hd?/media returns EIO (bug rh#142713) From 8d2eeee09bcf9c618ad845540e4e699c78b40fcf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 21 Dec 2004 15:35:37 +0000 Subject: [PATCH 012/640] -maybe fixed bug rh#143367 --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cfd4a38..95b5766 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 048 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -38,6 +38,7 @@ Source21: udev.html Patch1: udev-039-static.patch Patch2: udev-039-media.patch +Patch3: udev-039-dircheck.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -75,6 +76,7 @@ udev-persistent enables persistent device naming with udev. %patch1 -p1 -b .glibcstatic %patch2 -p1 -b .media +%patch3 -p1 -b .dircheck touch etc/init.d/udev.debian @@ -280,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Dec 21 2004 Harald Hoyer - 048-3 +- maybe fixed bug rh#143367 + * Thu Dec 16 2004 Harald Hoyer - 048-2 - fixed a case where reading /proc/ide/hd?/media returns EIO (bug rh#142713) From a48e079ae6861b0439f1e2c1056832b7b9c6e0e1 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 21 Dec 2004 22:00:40 +0000 Subject: [PATCH 013/640] - Call selinux_restore to fix labeling problem in selinux - Fixes rh#142817 --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 95b5766..001ad6c 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 048 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,6 +39,7 @@ Source21: udev.html Patch1: udev-039-static.patch Patch2: udev-039-media.patch Patch3: udev-039-dircheck.patch +Patch4: udev-048-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -77,6 +78,7 @@ udev-persistent enables persistent device naming with udev. %patch1 -p1 -b .glibcstatic %patch2 -p1 -b .media %patch3 -p1 -b .dircheck +%patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -282,6 +284,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Dec 21 2004 Dan Walsh - 048-4 +- Call selinux_restore to fix labeling problem in selinux +- Fixes rh#142817 + * Tue Dec 21 2004 Harald Hoyer - 048-3 - maybe fixed bug rh#143367 From bd451ac0cba4d903d59ab032ee4f1e0c116db2ab Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 21 Dec 2004 22:00:40 +0000 Subject: [PATCH 014/640] - Call selinux_restore to fix labeling problem in selinux - Fixes rh#142817 --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 95b5766..001ad6c 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 048 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,6 +39,7 @@ Source21: udev.html Patch1: udev-039-static.patch Patch2: udev-039-media.patch Patch3: udev-039-dircheck.patch +Patch4: udev-048-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -77,6 +78,7 @@ udev-persistent enables persistent device naming with udev. %patch1 -p1 -b .glibcstatic %patch2 -p1 -b .media %patch3 -p1 -b .dircheck +%patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -282,6 +284,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Dec 21 2004 Dan Walsh - 048-4 +- Call selinux_restore to fix labeling problem in selinux +- Fixes rh#142817 + * Tue Dec 21 2004 Harald Hoyer - 048-3 - maybe fixed bug rh#143367 From 4c18a67274e5b17983d92e7e57a4655b771f85cd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 11 Jan 2005 10:41:46 +0000 Subject: [PATCH 015/640] /dev/cpu/0/microcode -> /dev/cpu/microcode --- start_udev | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/start_udev b/start_udev index eece82d..96d901c 100755 --- a/start_udev +++ b/start_udev @@ -49,13 +49,10 @@ make_extra_nodes () { if [ -x $MAKEDEV ]; then $MAKEDEV -x $( - for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do - echo cpu/$i/microcode; - done; for i in 1 2 3 4 5 6; do echo tty$i;done; for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; for i in 0 1 2 3; do echo lp$i; echo parport$i;done; - echo net/tun ppp console null zero; + echo net/tun ppp console null zero cpu/microcode; ); [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : From 25d4c8997bc93bf625d8df98e136a7aad1ff6bf1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 11 Jan 2005 10:41:46 +0000 Subject: [PATCH 016/640] /dev/cpu/0/microcode -> /dev/cpu/microcode --- start_udev | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/start_udev b/start_udev index eece82d..96d901c 100755 --- a/start_udev +++ b/start_udev @@ -49,13 +49,10 @@ make_extra_nodes () { if [ -x $MAKEDEV ]; then $MAKEDEV -x $( - for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do - echo cpu/$i/microcode; - done; for i in 1 2 3 4 5 6; do echo tty$i;done; for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; for i in 0 1 2 3; do echo lp$i; echo parport$i;done; - echo net/tun ppp console null zero; + echo net/tun ppp console null zero cpu/microcode; ); [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : From 365c82c9952cad2a910f8fda2972d3dde4f0aecc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 11 Jan 2005 10:53:53 +0000 Subject: [PATCH 017/640] new version 050 --- .cvsignore | 1 + sources | 2 +- udev.spec | 19 +++++++++---------- upstream | 3 +-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9229995..5ec1492 100644 --- a/.cvsignore +++ b/.cvsignore @@ -8,3 +8,4 @@ udev-038.tar.gz udev-039.tar.gz udev-042.tar.bz2 udev-048.tar.bz2 +udev-050.tar.bz2 diff --git a/sources b/sources index 29644e2..6430d44 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -b4f383ae6d1a9f197f5c618717e2d582 udev-048.tar.bz2 +eefa5f012ae66ac5adc7d9d7a6a5a6fc udev-050.tar.bz2 diff --git a/udev.spec b/udev.spec index 001ad6c..c96e7b3 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 048 -Release: 4 +Version: 050 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -37,8 +37,6 @@ Source20: start_udev Source21: udev.html Patch1: udev-039-static.patch -Patch2: udev-039-media.patch -Patch3: udev-039-dircheck.patch Patch4: udev-048-selinux.patch ExclusiveOS: Linux @@ -76,8 +74,6 @@ udev-persistent enables persistent device naming with udev. %setup -q %patch1 -p1 -b .glibcstatic -%patch2 -p1 -b .media -%patch3 -p1 -b .dircheck %patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -111,13 +107,13 @@ make CC="gcc $RPM_OPT_FLAGS" \ DEBUG=%{debug} \ EXTRAS=" \ extras/scsi_id \ - extras/volume_id \ extras/chassis_id \ %if %{with_persistent} ata_identify" %else " %endif + #extras/volume_id %install rm -rf $RPM_BUILD_ROOT @@ -127,7 +123,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ - extras/volume_id \ extras/chassis_id \ %if %{with_persistent} ata_identify" @@ -161,7 +156,7 @@ install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE14} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE15} $RPM_BUILD_ROOT/sbin install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-udev-persistent.rules -install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules +#install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ @@ -270,7 +265,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/scsi_id %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%attr(755,root,root) /sbin/udev_volume_id +#%attr(755,root,root) /sbin/udev_volume_id %attr(755,root,root) /sbin/chassis_id %if %{with_persistent} @@ -284,6 +279,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Jan 11 2005 Harald Hoyer - 050-1 +- version 050 +- /dev/cpu/0/microcode -> /dev/cpu/microcode + * Tue Dec 21 2004 Dan Walsh - 048-4 - Call selinux_restore to fix labeling problem in selinux - Fixes rh#142817 diff --git a/upstream b/upstream index 3426d9b..47068e4 100644 --- a/upstream +++ b/upstream @@ -1,2 +1 @@ -udev-042.tar.bz2 -udev-048.tar.bz2 +udev-050.tar.bz2 From 9f1515e38848ffeb5cfdd59797cb9b380c83905a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 11 Jan 2005 10:53:53 +0000 Subject: [PATCH 018/640] new version 050 --- .cvsignore | 1 + sources | 2 +- udev.spec | 19 +++++++++---------- upstream | 3 +-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9229995..5ec1492 100644 --- a/.cvsignore +++ b/.cvsignore @@ -8,3 +8,4 @@ udev-038.tar.gz udev-039.tar.gz udev-042.tar.bz2 udev-048.tar.bz2 +udev-050.tar.bz2 diff --git a/sources b/sources index 29644e2..6430d44 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -b4f383ae6d1a9f197f5c618717e2d582 udev-048.tar.bz2 +eefa5f012ae66ac5adc7d9d7a6a5a6fc udev-050.tar.bz2 diff --git a/udev.spec b/udev.spec index 001ad6c..c96e7b3 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 048 -Release: 4 +Version: 050 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -37,8 +37,6 @@ Source20: start_udev Source21: udev.html Patch1: udev-039-static.patch -Patch2: udev-039-media.patch -Patch3: udev-039-dircheck.patch Patch4: udev-048-selinux.patch ExclusiveOS: Linux @@ -76,8 +74,6 @@ udev-persistent enables persistent device naming with udev. %setup -q %patch1 -p1 -b .glibcstatic -%patch2 -p1 -b .media -%patch3 -p1 -b .dircheck %patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -111,13 +107,13 @@ make CC="gcc $RPM_OPT_FLAGS" \ DEBUG=%{debug} \ EXTRAS=" \ extras/scsi_id \ - extras/volume_id \ extras/chassis_id \ %if %{with_persistent} ata_identify" %else " %endif + #extras/volume_id %install rm -rf $RPM_BUILD_ROOT @@ -127,7 +123,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ - extras/volume_id \ extras/chassis_id \ %if %{with_persistent} ata_identify" @@ -161,7 +156,7 @@ install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE14} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE15} $RPM_BUILD_ROOT/sbin install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-udev-persistent.rules -install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules +#install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ @@ -270,7 +265,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/scsi_id %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%attr(755,root,root) /sbin/udev_volume_id +#%attr(755,root,root) /sbin/udev_volume_id %attr(755,root,root) /sbin/chassis_id %if %{with_persistent} @@ -284,6 +279,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Jan 11 2005 Harald Hoyer - 050-1 +- version 050 +- /dev/cpu/0/microcode -> /dev/cpu/microcode + * Tue Dec 21 2004 Dan Walsh - 048-4 - Call selinux_restore to fix labeling problem in selinux - Fixes rh#142817 diff --git a/upstream b/upstream index 3426d9b..47068e4 100644 --- a/upstream +++ b/upstream @@ -1,2 +1 @@ -udev-042.tar.bz2 -udev-048.tar.bz2 +udev-050.tar.bz2 From a86cd2527cfb8f2ed6bdf2080dcf1dd209d24d79 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Feb 2005 11:10:57 +0000 Subject: [PATCH 019/640] corrected typo in udev.rules --- start_udev | 53 ++++++++++++++++++++++++++++++++++++++--------------- udev.spec | 9 ++++++++- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/start_udev b/start_udev index 96d901c..cf613ba 100755 --- a/start_udev +++ b/start_udev @@ -37,6 +37,33 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" +xargs_simple () { + if [ "$1" = "-n" ]; then + shift + MAXNR="$1" + shift + else + MAXNR=100 + fi + NR=$MAXNR + ARGS="" + [ -z "$1" ] && set echo + + while read line; do + if [ $NR -gt 0 ]; then + ARGS="$ARGS $line" + NR=$[$NR - 1] + else + "$@" $ARGS + NR=$MAXNR + ARGS="$line" + fi + done + if [ -n "$ARGS" ]; then + "$@" $ARGS + fi +} + make_extra_nodes () { ln -snf /proc/self/fd $udev_root/fd ln -snf /proc/self/fd/0 $udev_root/stdin @@ -48,14 +75,10 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm if [ -x $MAKEDEV ]; then - $MAKEDEV -x $( - for i in 1 2 3 4 5 6; do echo tty$i;done; - for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; - for i in 0 1 2 3; do echo lp$i; echo parport$i;done; - echo net/tun ppp console null zero cpu/microcode; - ); - [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : + for i in /etc/sysconfig/makedev.d/*.nodes; do + cat "$i" | sed -e 's,#.*,,g' | \ + xargs_simple -n 100 $MAKEDEV -x + done fi } @@ -168,21 +191,21 @@ echo -n "$STRING " LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) - mount --move /dev/pts "$PTSDIR" + mount --move $udev_root/pts "$PTSDIR" fi if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) - mount --move /dev/shm "$SHMDIR" + mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" /dev/pts + mount --move "$PTSDIR" $udev_root/pts rmdir "$PTSDIR" fi if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" /dev/shm + mount --move "$SHMDIR" $udev_root/shm rmdir "$SHMDIR" fi @@ -191,10 +214,10 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { rm -fr "$udev_db" make_extra_nodes -kill_udevd >/dev/null 2>&1 -scsi_replay >/dev/null 2>&1 +kill_udevd > $udev_root/null 2>&1 +scsi_replay > $udev_root/null 2>&1 ret=$[$ret + $?] -ide_scan >/dev/null 2>&1 +ide_scan > $udev_root/null 2>&1 /sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.spec b/udev.spec index c96e7b3..c060aaf 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 1 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -279,6 +279,13 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Feb 10 2005 Harald Hoyer - 050-3 +- fixed forgotten " in udev.rules + +* Tue Jan 11 2005 Harald Hoyer - 050-2 +- removed /dev/microcode, /dev/cpu/microcode is now the real node +- cleaned up start_udev + * Tue Jan 11 2005 Harald Hoyer - 050-1 - version 050 - /dev/cpu/0/microcode -> /dev/cpu/microcode From 07dd434632b1bfd5f6b55983ac2f75f3a5452e65 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Feb 2005 11:10:57 +0000 Subject: [PATCH 020/640] corrected typo in udev.rules --- start_udev | 53 ++++++++++++++++++++++++++++++++++++++--------------- udev.spec | 9 ++++++++- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/start_udev b/start_udev index 96d901c..cf613ba 100755 --- a/start_udev +++ b/start_udev @@ -37,6 +37,33 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" +xargs_simple () { + if [ "$1" = "-n" ]; then + shift + MAXNR="$1" + shift + else + MAXNR=100 + fi + NR=$MAXNR + ARGS="" + [ -z "$1" ] && set echo + + while read line; do + if [ $NR -gt 0 ]; then + ARGS="$ARGS $line" + NR=$[$NR - 1] + else + "$@" $ARGS + NR=$MAXNR + ARGS="$line" + fi + done + if [ -n "$ARGS" ]; then + "$@" $ARGS + fi +} + make_extra_nodes () { ln -snf /proc/self/fd $udev_root/fd ln -snf /proc/self/fd/0 $udev_root/stdin @@ -48,14 +75,10 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm if [ -x $MAKEDEV ]; then - $MAKEDEV -x $( - for i in 1 2 3 4 5 6; do echo tty$i;done; - for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; - for i in 0 1 2 3; do echo lp$i; echo parport$i;done; - echo net/tun ppp console null zero cpu/microcode; - ); - [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : + for i in /etc/sysconfig/makedev.d/*.nodes; do + cat "$i" | sed -e 's,#.*,,g' | \ + xargs_simple -n 100 $MAKEDEV -x + done fi } @@ -168,21 +191,21 @@ echo -n "$STRING " LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) - mount --move /dev/pts "$PTSDIR" + mount --move $udev_root/pts "$PTSDIR" fi if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) - mount --move /dev/shm "$SHMDIR" + mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" /dev/pts + mount --move "$PTSDIR" $udev_root/pts rmdir "$PTSDIR" fi if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" /dev/shm + mount --move "$SHMDIR" $udev_root/shm rmdir "$SHMDIR" fi @@ -191,10 +214,10 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { rm -fr "$udev_db" make_extra_nodes -kill_udevd >/dev/null 2>&1 -scsi_replay >/dev/null 2>&1 +kill_udevd > $udev_root/null 2>&1 +scsi_replay > $udev_root/null 2>&1 ret=$[$ret + $?] -ide_scan >/dev/null 2>&1 +ide_scan > $udev_root/null 2>&1 /sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.spec b/udev.spec index c96e7b3..c060aaf 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 1 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -279,6 +279,13 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Feb 10 2005 Harald Hoyer - 050-3 +- fixed forgotten " in udev.rules + +* Tue Jan 11 2005 Harald Hoyer - 050-2 +- removed /dev/microcode, /dev/cpu/microcode is now the real node +- cleaned up start_udev + * Tue Jan 11 2005 Harald Hoyer - 050-1 - version 050 - /dev/cpu/0/microcode -> /dev/cpu/microcode From 132296ce1c44c92d91ac468f1dffe66016cac8de Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Feb 2005 10:25:48 +0000 Subject: [PATCH 021/640] doh, reverted the start_udev devel version, which slipped in --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index c060aaf..69ef0d2 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -279,6 +279,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Feb 10 2005 Harald Hoyer - 050-4 +- doh, reverted the start_udev devel version, which slipped in + * Thu Feb 10 2005 Harald Hoyer - 050-3 - fixed forgotten " in udev.rules From 73cab9fba7ff0d85b69d2dcbf9b5e812bae7da37 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Feb 2005 10:25:48 +0000 Subject: [PATCH 022/640] doh, reverted the start_udev devel version, which slipped in --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index c060aaf..69ef0d2 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -279,6 +279,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Feb 10 2005 Harald Hoyer - 050-4 +- doh, reverted the start_udev devel version, which slipped in + * Thu Feb 10 2005 Harald Hoyer - 050-3 - fixed forgotten " in udev.rules From a5c19a95eae3b139c077de36a43cbbd14f0ae1b0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Feb 2005 10:27:27 +0000 Subject: [PATCH 023/640] doh, reverted the start_udev devel version, which slipped in --- start_udev | 53 +++++++++++++++-------------------------------------- udev.spec | 4 ++-- 2 files changed, 17 insertions(+), 40 deletions(-) diff --git a/start_udev b/start_udev index cf613ba..96d901c 100755 --- a/start_udev +++ b/start_udev @@ -37,33 +37,6 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" -xargs_simple () { - if [ "$1" = "-n" ]; then - shift - MAXNR="$1" - shift - else - MAXNR=100 - fi - NR=$MAXNR - ARGS="" - [ -z "$1" ] && set echo - - while read line; do - if [ $NR -gt 0 ]; then - ARGS="$ARGS $line" - NR=$[$NR - 1] - else - "$@" $ARGS - NR=$MAXNR - ARGS="$line" - fi - done - if [ -n "$ARGS" ]; then - "$@" $ARGS - fi -} - make_extra_nodes () { ln -snf /proc/self/fd $udev_root/fd ln -snf /proc/self/fd/0 $udev_root/stdin @@ -75,10 +48,14 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm if [ -x $MAKEDEV ]; then - for i in /etc/sysconfig/makedev.d/*.nodes; do - cat "$i" | sed -e 's,#.*,,g' | \ - xargs_simple -n 100 $MAKEDEV -x - done + $MAKEDEV -x $( + for i in 1 2 3 4 5 6; do echo tty$i;done; + for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; + for i in 0 1 2 3; do echo lp$i; echo parport$i;done; + echo net/tun ppp console null zero cpu/microcode; + ); + [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; + cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : fi } @@ -191,21 +168,21 @@ echo -n "$STRING " LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) - mount --move $udev_root/pts "$PTSDIR" + mount --move /dev/pts "$PTSDIR" fi if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) - mount --move $udev_root/shm "$SHMDIR" + mount --move /dev/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" $udev_root/pts + mount --move "$PTSDIR" /dev/pts rmdir "$PTSDIR" fi if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" $udev_root/shm + mount --move "$SHMDIR" /dev/shm rmdir "$SHMDIR" fi @@ -214,10 +191,10 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { rm -fr "$udev_db" make_extra_nodes -kill_udevd > $udev_root/null 2>&1 -scsi_replay > $udev_root/null 2>&1 +kill_udevd >/dev/null 2>&1 +scsi_replay >/dev/null 2>&1 ret=$[$ret + $?] -ide_scan > $udev_root/null 2>&1 +ide_scan >/dev/null 2>&1 /sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.spec b/udev.spec index 69ef0d2..758ccf0 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -279,7 +279,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Thu Feb 10 2005 Harald Hoyer - 050-4 +* Thu Feb 10 2005 Harald Hoyer - 050-5 - doh, reverted the start_udev devel version, which slipped in * Thu Feb 10 2005 Harald Hoyer - 050-3 From a1468479a3825552c55095c689ecdba5bf35322e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Feb 2005 10:27:27 +0000 Subject: [PATCH 024/640] doh, reverted the start_udev devel version, which slipped in --- start_udev | 53 +++++++++++++++-------------------------------------- udev.spec | 4 ++-- 2 files changed, 17 insertions(+), 40 deletions(-) diff --git a/start_udev b/start_udev index cf613ba..96d901c 100755 --- a/start_udev +++ b/start_udev @@ -37,33 +37,6 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" -xargs_simple () { - if [ "$1" = "-n" ]; then - shift - MAXNR="$1" - shift - else - MAXNR=100 - fi - NR=$MAXNR - ARGS="" - [ -z "$1" ] && set echo - - while read line; do - if [ $NR -gt 0 ]; then - ARGS="$ARGS $line" - NR=$[$NR - 1] - else - "$@" $ARGS - NR=$MAXNR - ARGS="$line" - fi - done - if [ -n "$ARGS" ]; then - "$@" $ARGS - fi -} - make_extra_nodes () { ln -snf /proc/self/fd $udev_root/fd ln -snf /proc/self/fd/0 $udev_root/stdin @@ -75,10 +48,14 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm if [ -x $MAKEDEV ]; then - for i in /etc/sysconfig/makedev.d/*.nodes; do - cat "$i" | sed -e 's,#.*,,g' | \ - xargs_simple -n 100 $MAKEDEV -x - done + $MAKEDEV -x $( + for i in 1 2 3 4 5 6; do echo tty$i;done; + for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; + for i in 0 1 2 3; do echo lp$i; echo parport$i;done; + echo net/tun ppp console null zero cpu/microcode; + ); + [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; + cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : fi } @@ -191,21 +168,21 @@ echo -n "$STRING " LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) - mount --move $udev_root/pts "$PTSDIR" + mount --move /dev/pts "$PTSDIR" fi if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) - mount --move $udev_root/shm "$SHMDIR" + mount --move /dev/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" $udev_root/pts + mount --move "$PTSDIR" /dev/pts rmdir "$PTSDIR" fi if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" $udev_root/shm + mount --move "$SHMDIR" /dev/shm rmdir "$SHMDIR" fi @@ -214,10 +191,10 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { rm -fr "$udev_db" make_extra_nodes -kill_udevd > $udev_root/null 2>&1 -scsi_replay > $udev_root/null 2>&1 +kill_udevd >/dev/null 2>&1 +scsi_replay >/dev/null 2>&1 ret=$[$ret + $?] -ide_scan > $udev_root/null 2>&1 +ide_scan >/dev/null 2>&1 /sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.spec b/udev.spec index 69ef0d2..758ccf0 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -279,7 +279,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Thu Feb 10 2005 Harald Hoyer - 050-4 +* Thu Feb 10 2005 Harald Hoyer - 050-5 - doh, reverted the start_udev devel version, which slipped in * Thu Feb 10 2005 Harald Hoyer - 050-3 From 5a7d2286550f8c442639ba31f895c4b65bf17098 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 18 Feb 2005 13:07:41 +0000 Subject: [PATCH 025/640] - introducing /etc/udev/makedev.d/50-udev.nodes - glibcstatic patch modified to let gcc4 compile udev --- start_udev | 65 +++++++++++++++++++++++++++++++++++++++++------------- udev.nodes | 28 +++++++++++++++++++++++ udev.spec | 13 +++++++++-- 3 files changed, 89 insertions(+), 17 deletions(-) create mode 100644 udev.nodes diff --git a/start_udev b/start_udev index 96d901c..ab51d70 100755 --- a/start_udev +++ b/start_udev @@ -37,6 +37,33 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" +xargs_simple () { + if [ "$1" = "-n" ]; then + shift + MAXNR="$1" + shift + else + MAXNR=100 + fi + NR=$MAXNR + ARGS="" + [ -z "$1" ] && set echo + + while read line; do + if [ $NR -gt 0 ]; then + ARGS="$ARGS $line" + NR=$[$NR - 1] + else + "$@" $ARGS + NR=$MAXNR + ARGS="$line" + fi + done + if [ -n "$ARGS" ]; then + "$@" $ARGS + fi +} + make_extra_nodes () { ln -snf /proc/self/fd $udev_root/fd ln -snf /proc/self/fd/0 $udev_root/stdin @@ -46,17 +73,25 @@ make_extra_nodes () { [ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm + [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; if [ -x $MAKEDEV ]; then - $MAKEDEV -x $( - for i in 1 2 3 4 5 6; do echo tty$i;done; - for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; - for i in 0 1 2 3; do echo lp$i; echo parport$i;done; - echo net/tun ppp console null zero cpu/microcode; - ); - [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : + 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 + fi + done fi + pushd /etc/udev/devices &> "$udev_root/null" + set * + if [ "$1" != "*" ]; then + cp -ar "$@" $udev_root/ + pushd "$udev_root" &> "$udev_root/null" + [ -x /sbin/restorecon ] && /sbin/restorecon "$@" + popd &> "$udev_root/null" + fi + popd &> "$udev_root/null" } # we cannot use /usr/bin/find here @@ -168,21 +203,21 @@ echo -n "$STRING " LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) - mount --move /dev/pts "$PTSDIR" + mount --move $udev_root/pts "$PTSDIR" fi if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) - mount --move /dev/shm "$SHMDIR" + mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" /dev/pts + mount --move "$PTSDIR" $udev_root/pts rmdir "$PTSDIR" fi if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" /dev/shm + mount --move "$SHMDIR" $udev_root/shm rmdir "$SHMDIR" fi @@ -191,10 +226,10 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { rm -fr "$udev_db" make_extra_nodes -kill_udevd >/dev/null 2>&1 -scsi_replay >/dev/null 2>&1 +kill_udevd > "$udev_root/null" 2>&1 +scsi_replay > "$udev_root/null" 2>&1 ret=$[$ret + $?] -ide_scan >/dev/null 2>&1 +ide_scan > "$udev_root/null" 2>&1 /sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.nodes b/udev.nodes new file mode 100644 index 0000000..7f01785 --- /dev/null +++ b/udev.nodes @@ -0,0 +1,28 @@ +# These device have to be created manually +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +loop0 +loop1 +loop2 +loop3 +loop4 +loop5 +loop6 +loop7 +lp0 +lp1 +lp2 +lp3 +parport0 +parport1 +parport2 +parport3 +net/tun +ppp +console +null +zero diff --git a/udev.spec b/udev.spec index 758ccf0..20d59ad 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 5 +Release: 7 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -35,6 +35,7 @@ Source19: dvb.sh Source20: start_udev Source21: udev.html +Source22: udev.nodes Patch1: udev-039-static.patch Patch4: udev-048-selinux.patch @@ -135,7 +136,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.permissions rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,permissions.d,scripts,devices} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,permissions.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules @@ -166,6 +167,8 @@ install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes + mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev @@ -233,6 +236,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/permissions.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ +%attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev @@ -255,6 +259,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions +%config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes %config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -279,6 +284,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Feb 18 2005 Harald Hoyer - 050-6 +- introducing /etc/udev/makedev.d/50-udev.nodes +- glibcstatic patch modified to let gcc4 compile udev + * Thu Feb 10 2005 Harald Hoyer - 050-5 - doh, reverted the start_udev devel version, which slipped in From 19db7d949595c616dc83ec314a13b801aed210ce Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 18 Feb 2005 13:07:41 +0000 Subject: [PATCH 026/640] - introducing /etc/udev/makedev.d/50-udev.nodes - glibcstatic patch modified to let gcc4 compile udev --- start_udev | 65 +++++++++++++++++++++++++++++++++++++++++------------- udev.nodes | 28 +++++++++++++++++++++++ udev.spec | 13 +++++++++-- 3 files changed, 89 insertions(+), 17 deletions(-) create mode 100644 udev.nodes diff --git a/start_udev b/start_udev index 96d901c..ab51d70 100755 --- a/start_udev +++ b/start_udev @@ -37,6 +37,33 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" +xargs_simple () { + if [ "$1" = "-n" ]; then + shift + MAXNR="$1" + shift + else + MAXNR=100 + fi + NR=$MAXNR + ARGS="" + [ -z "$1" ] && set echo + + while read line; do + if [ $NR -gt 0 ]; then + ARGS="$ARGS $line" + NR=$[$NR - 1] + else + "$@" $ARGS + NR=$MAXNR + ARGS="$line" + fi + done + if [ -n "$ARGS" ]; then + "$@" $ARGS + fi +} + make_extra_nodes () { ln -snf /proc/self/fd $udev_root/fd ln -snf /proc/self/fd/0 $udev_root/stdin @@ -46,17 +73,25 @@ make_extra_nodes () { [ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm + [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; if [ -x $MAKEDEV ]; then - $MAKEDEV -x $( - for i in 1 2 3 4 5 6; do echo tty$i;done; - for i in 0 1 2 3 4 5 6 7; do echo loop$i; done; - for i in 0 1 2 3; do echo lp$i; echo parport$i;done; - echo net/tun ppp console null zero cpu/microcode; - ); - [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || : + 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 + fi + done fi + pushd /etc/udev/devices &> "$udev_root/null" + set * + if [ "$1" != "*" ]; then + cp -ar "$@" $udev_root/ + pushd "$udev_root" &> "$udev_root/null" + [ -x /sbin/restorecon ] && /sbin/restorecon "$@" + popd &> "$udev_root/null" + fi + popd &> "$udev_root/null" } # we cannot use /usr/bin/find here @@ -168,21 +203,21 @@ echo -n "$STRING " LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) - mount --move /dev/pts "$PTSDIR" + mount --move $udev_root/pts "$PTSDIR" fi if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) - mount --move /dev/shm "$SHMDIR" + mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" /dev/pts + mount --move "$PTSDIR" $udev_root/pts rmdir "$PTSDIR" fi if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" /dev/shm + mount --move "$SHMDIR" $udev_root/shm rmdir "$SHMDIR" fi @@ -191,10 +226,10 @@ LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { rm -fr "$udev_db" make_extra_nodes -kill_udevd >/dev/null 2>&1 -scsi_replay >/dev/null 2>&1 +kill_udevd > "$udev_root/null" 2>&1 +scsi_replay > "$udev_root/null" 2>&1 ret=$[$ret + $?] -ide_scan >/dev/null 2>&1 +ide_scan > "$udev_root/null" 2>&1 /sbin/udevstart ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.nodes b/udev.nodes new file mode 100644 index 0000000..7f01785 --- /dev/null +++ b/udev.nodes @@ -0,0 +1,28 @@ +# These device have to be created manually +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +loop0 +loop1 +loop2 +loop3 +loop4 +loop5 +loop6 +loop7 +lp0 +lp1 +lp2 +lp3 +parport0 +parport1 +parport2 +parport3 +net/tun +ppp +console +null +zero diff --git a/udev.spec b/udev.spec index 758ccf0..20d59ad 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 5 +Release: 7 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -35,6 +35,7 @@ Source19: dvb.sh Source20: start_udev Source21: udev.html +Source22: udev.nodes Patch1: udev-039-static.patch Patch4: udev-048-selinux.patch @@ -135,7 +136,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.permissions rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,permissions.d,scripts,devices} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,permissions.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules @@ -166,6 +167,8 @@ install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes + mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev @@ -233,6 +236,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/permissions.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ +%attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev @@ -255,6 +259,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions +%config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes %config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -279,6 +284,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Feb 18 2005 Harald Hoyer - 050-6 +- introducing /etc/udev/makedev.d/50-udev.nodes +- glibcstatic patch modified to let gcc4 compile udev + * Thu Feb 10 2005 Harald Hoyer - 050-5 - doh, reverted the start_udev devel version, which slipped in From 4bd4bcf89dcf3d0a2555bed52563c9c21e04e78e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Mar 2005 16:19:37 +0000 Subject: [PATCH 027/640] - fixed rh#144598 --- start_udev | 4 ++-- udev.spec | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index ab51d70..55eca37 100755 --- a/start_udev +++ b/start_udev @@ -122,10 +122,10 @@ find_f () { if [ -d "$f" -a ! -L "$f" ]; then found="$found $(find_f $f $what)" elif [ -e "$f" ]; then - [ "$f" != "${f%$what}" ] && found="$found $f" + [ "$where/" = "${f%$what}" ] && found="$found $f" fi done - echo "$found" + [ -n "$found" ] && echo "$found" } kill_udevd() { diff --git a/udev.spec b/udev.spec index 20d59ad..8856843 100644 --- a/udev.spec +++ b/udev.spec @@ -284,6 +284,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Mar 02 2005 Harald Hoyer - 050-7 +- fixed rh#144598 + * Fri Feb 18 2005 Harald Hoyer - 050-6 - introducing /etc/udev/makedev.d/50-udev.nodes - glibcstatic patch modified to let gcc4 compile udev From 3519453b7c93f7e224a05ef25c4acbdbf620e5d2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Mar 2005 16:19:37 +0000 Subject: [PATCH 028/640] - fixed rh#144598 --- start_udev | 4 ++-- udev.spec | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index ab51d70..55eca37 100755 --- a/start_udev +++ b/start_udev @@ -122,10 +122,10 @@ find_f () { if [ -d "$f" -a ! -L "$f" ]; then found="$found $(find_f $f $what)" elif [ -e "$f" ]; then - [ "$f" != "${f%$what}" ] && found="$found $f" + [ "$where/" = "${f%$what}" ] && found="$found $f" fi done - echo "$found" + [ -n "$found" ] && echo "$found" } kill_udevd() { diff --git a/udev.spec b/udev.spec index 20d59ad..8856843 100644 --- a/udev.spec +++ b/udev.spec @@ -284,6 +284,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Mar 02 2005 Harald Hoyer - 050-7 +- fixed rh#144598 + * Fri Feb 18 2005 Harald Hoyer - 050-6 - introducing /etc/udev/makedev.d/50-udev.nodes - glibcstatic patch modified to let gcc4 compile udev From cd5a71c39fc1c13382c6d4ce8ad274435f3309f2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Mar 2005 16:21:16 +0000 Subject: [PATCH 029/640] *** empty log message *** --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 8856843..a4ef174 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -284,7 +284,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Wed Mar 02 2005 Harald Hoyer - 050-7 +* Wed Mar 02 2005 Harald Hoyer - 050-8 - fixed rh#144598 * Fri Feb 18 2005 Harald Hoyer - 050-6 From 049b932f67ef0828fa514132c120141cee868b46 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Mar 2005 16:21:16 +0000 Subject: [PATCH 030/640] *** empty log message *** --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 8856843..a4ef174 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -284,7 +284,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Wed Mar 02 2005 Harald Hoyer - 050-7 +* Wed Mar 02 2005 Harald Hoyer - 050-8 - fixed rh#144598 * Fri Feb 18 2005 Harald Hoyer - 050-6 From 60f8a02e246ef7bb3780ccfa2ee2ae92adff2c6c Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Tue, 8 Mar 2005 09:24:12 +0000 Subject: [PATCH 031/640] bump spec --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index a4ef174..0851fcf 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -284,6 +284,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Mar 07 2005 Warren Togami - 050-9 +- fixed rh#150462 (udev DRI permissions) + * Wed Mar 02 2005 Harald Hoyer - 050-8 - fixed rh#144598 From 880828fba2255f99d19d653d5ba6804169b5a446 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Tue, 8 Mar 2005 09:24:12 +0000 Subject: [PATCH 032/640] bump spec --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index a4ef174..0851fcf 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -284,6 +284,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Mar 07 2005 Warren Togami - 050-9 +- fixed rh#150462 (udev DRI permissions) + * Wed Mar 02 2005 Harald Hoyer - 050-8 - fixed rh#144598 From 31a721f2ccbcecafd7039fde094dc0280b4699d6 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Tue, 29 Mar 2005 09:23:22 +0000 Subject: [PATCH 033/640] own default and net dirs (#151368 Hans de Goede) --- udev.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 0851fcf..a580be3 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -239,9 +239,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev - %config(missingok) %{_sysconfdir}/dev.d/net/hotplug.dev +%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default +%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/net + # floppy madness %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd0 @@ -284,6 +286,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Mar 28 2005 Warren Togami - 050-10 +- own default and net dirs (#151368 Hans de Goede) + * Mon Mar 07 2005 Warren Togami - 050-9 - fixed rh#150462 (udev DRI permissions) From 38007829b4fca8dd8875665565d455facfcac753 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Tue, 29 Mar 2005 09:23:22 +0000 Subject: [PATCH 034/640] own default and net dirs (#151368 Hans de Goede) --- udev.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 0851fcf..a580be3 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 050 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -239,9 +239,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev - %config(missingok) %{_sysconfdir}/dev.d/net/hotplug.dev +%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default +%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/net + # floppy madness %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd0 @@ -284,6 +286,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Mar 28 2005 Warren Togami - 050-10 +- own default and net dirs (#151368 Hans de Goede) + * Mon Mar 07 2005 Warren Togami - 050-9 - fixed rh#150462 (udev DRI permissions) From df1892cd11cbdefbdfdec7857d7acc412666a5c9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 11 Apr 2005 13:03:51 +0000 Subject: [PATCH 035/640] update to udev-056 --- udev.spec | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/udev.spec b/udev.spec index a580be3..f3e707b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 050 -Release: 10 +Version: 056 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -16,7 +16,6 @@ Obsoletes: udev-persistent < 0:030-5 %endif Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: udev.rules -Source2: udev.permissions Source3: udev.conf Source4: pam_console.dev Source5: MAKEDEV.dev @@ -37,6 +36,8 @@ Source20: start_udev Source21: udev.html Source22: udev.nodes +Source23: udevpermconv.sh + Patch1: udev-039-static.patch Patch4: udev-048-selinux.patch @@ -74,8 +75,8 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -%patch1 -p1 -b .glibcstatic -%patch4 -p1 -b .selinux +#%patch1 -p1 -b .glibcstatic +#%patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -93,11 +94,13 @@ cp %{SOURCE21} . make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_KLIBC=false \ USE_SELINUX=true \ + USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="" udev + EXTRAS="extras/scsi_id" all mv udev udev.static +mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static make clean make CC="gcc $RPM_OPT_FLAGS" \ @@ -133,14 +136,12 @@ make DESTDIR=$RPM_BUILD_ROOT install \ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.permissions rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,permissions.d,scripts,devices,makedev.d} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules -install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/permissions.d/50-udev.permissions install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf @@ -149,6 +150,7 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ # obsoleted by selinux patch #install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static +install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static ln -s udev.static $RPM_BUILD_ROOT/sbin/udevstart.static %if %{with_persistent} @@ -166,6 +168,7 @@ ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/def install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -215,7 +218,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html %doc etc/udev/redhat/udev.rules -%doc etc/udev/redhat/udev.permissions %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -233,7 +235,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/permissions.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ @@ -257,10 +258,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh +%attr(0755,root,root) %{_sysconfdir}/udev/scripts/udevpermconv.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -270,6 +271,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/scsi_id +%attr(755,root,root) /sbin/scsi_id.static %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* #%attr(755,root,root) /sbin/udev_volume_id @@ -282,10 +284,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules - %endif %changelog +* Mon Apr 11 2005 Harald Hoyer - 056-1 +- updated to version 056 +- merged permissions in the rules file +- added udevpermconv.sh to convert old permission files + * Mon Mar 28 2005 Warren Togami - 050-10 - own default and net dirs (#151368 Hans de Goede) From ea1258e60f6c66b86fcf4335129c63d65a45aea4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 11 Apr 2005 13:03:51 +0000 Subject: [PATCH 036/640] update to udev-056 --- udev.spec | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/udev.spec b/udev.spec index a580be3..f3e707b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 050 -Release: 10 +Version: 056 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -16,7 +16,6 @@ Obsoletes: udev-persistent < 0:030-5 %endif Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: udev.rules -Source2: udev.permissions Source3: udev.conf Source4: pam_console.dev Source5: MAKEDEV.dev @@ -37,6 +36,8 @@ Source20: start_udev Source21: udev.html Source22: udev.nodes +Source23: udevpermconv.sh + Patch1: udev-039-static.patch Patch4: udev-048-selinux.patch @@ -74,8 +75,8 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -%patch1 -p1 -b .glibcstatic -%patch4 -p1 -b .selinux +#%patch1 -p1 -b .glibcstatic +#%patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -93,11 +94,13 @@ cp %{SOURCE21} . make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_KLIBC=false \ USE_SELINUX=true \ + USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="" udev + EXTRAS="extras/scsi_id" all mv udev udev.static +mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static make clean make CC="gcc $RPM_OPT_FLAGS" \ @@ -133,14 +136,12 @@ make DESTDIR=$RPM_BUILD_ROOT install \ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.permissions rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,permissions.d,scripts,devices,makedev.d} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules -install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/permissions.d/50-udev.permissions install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf @@ -149,6 +150,7 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ # obsoleted by selinux patch #install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static +install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static ln -s udev.static $RPM_BUILD_ROOT/sbin/udevstart.static %if %{with_persistent} @@ -166,6 +168,7 @@ ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/def install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ +install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -215,7 +218,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html %doc etc/udev/redhat/udev.rules -%doc etc/udev/redhat/udev.permissions %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -233,7 +235,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/permissions.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ @@ -257,10 +258,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh +%attr(0755,root,root) %{_sysconfdir}/udev/scripts/udevpermconv.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/permissions.d/50-udev.permissions %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -270,6 +271,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/scsi_id +%attr(755,root,root) /sbin/scsi_id.static %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* #%attr(755,root,root) /sbin/udev_volume_id @@ -282,10 +284,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules - %endif %changelog +* Mon Apr 11 2005 Harald Hoyer - 056-1 +- updated to version 056 +- merged permissions in the rules file +- added udevpermconv.sh to convert old permission files + * Mon Mar 28 2005 Warren Togami - 050-10 - own default and net dirs (#151368 Hans de Goede) From 555529ed2a13b3164ae716a4e72b810f101cf1fa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 15 Apr 2005 15:09:49 +0000 Subject: [PATCH 037/640] updated source --- .cvsignore | 12 +----------- sources | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.cvsignore b/.cvsignore index 5ec1492..ab85d99 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,11 +1 @@ -udev-032.tar.bz2 -pam_console_setowner-1.3.tgz -pam_console_setowner-1.4.tgz -udev-034.tar.bz2 -udev-035.tar.bz2 -udev-036.tar.bz2 -udev-038.tar.gz -udev-039.tar.gz -udev-042.tar.bz2 -udev-048.tar.bz2 -udev-050.tar.bz2 +udev-056.tar.bz2 diff --git a/sources b/sources index 6430d44..9766ce2 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -eefa5f012ae66ac5adc7d9d7a6a5a6fc udev-050.tar.bz2 +30fb3a320e74ff0c49c15ecaa6e37a4c udev-056.tar.bz2 From 39700cfdea8a0df51c253d39c0f20905d98991c4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 15 Apr 2005 15:09:49 +0000 Subject: [PATCH 038/640] updated source --- .cvsignore | 12 +----------- sources | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.cvsignore b/.cvsignore index 5ec1492..ab85d99 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,11 +1 @@ -udev-032.tar.bz2 -pam_console_setowner-1.3.tgz -pam_console_setowner-1.4.tgz -udev-034.tar.bz2 -udev-035.tar.bz2 -udev-036.tar.bz2 -udev-038.tar.gz -udev-039.tar.gz -udev-042.tar.bz2 -udev-048.tar.bz2 -udev-050.tar.bz2 +udev-056.tar.bz2 diff --git a/sources b/sources index 6430d44..9766ce2 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -b9b6de70e26abb02c026296e9fbea25b pam_console_setowner-1.4.tgz -eefa5f012ae66ac5adc7d9d7a6a5a6fc udev-050.tar.bz2 +30fb3a320e74ff0c49c15ecaa6e37a4c udev-056.tar.bz2 From 4692a3ff96ffe8ff40f2c9c104042858830d39a2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 15 Apr 2005 20:33:00 +0000 Subject: [PATCH 039/640] - Fix SELinux during creation of Symlinks --- udev.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index f3e707b..f0bf695 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 056 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,7 +39,7 @@ Source22: udev.nodes Source23: udevpermconv.sh Patch1: udev-039-static.patch -Patch4: udev-048-selinux.patch +Patch4: udev-056-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -76,7 +76,7 @@ udev-persistent enables persistent device naming with udev. %setup -q #%patch1 -p1 -b .glibcstatic -#%patch4 -p1 -b .selinux +%patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -287,6 +287,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Apr 15 2004 Dan Walsh - 056-2 +- Fix SELinux during creation of Symlinks + * Mon Apr 11 2005 Harald Hoyer - 056-1 - updated to version 056 - merged permissions in the rules file From a914be6a1448663c52aad49aeedd9f0d7aa4f09d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 15 Apr 2005 20:33:00 +0000 Subject: [PATCH 040/640] - Fix SELinux during creation of Symlinks --- udev.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index f3e707b..f0bf695 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 056 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,7 +39,7 @@ Source22: udev.nodes Source23: udevpermconv.sh Patch1: udev-039-static.patch -Patch4: udev-048-selinux.patch +Patch4: udev-056-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -76,7 +76,7 @@ udev-persistent enables persistent device naming with udev. %setup -q #%patch1 -p1 -b .glibcstatic -#%patch4 -p1 -b .selinux +%patch4 -p1 -b .selinux touch etc/init.d/udev.debian @@ -287,6 +287,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Apr 15 2004 Dan Walsh - 056-2 +- Fix SELinux during creation of Symlinks + * Mon Apr 11 2005 Harald Hoyer - 056-1 - updated to version 056 - merged permissions in the rules file From 327f83d0d1e4f4109ed6c6dc69d7813543560282 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 15 Apr 2005 20:33:13 +0000 Subject: [PATCH 041/640] - Fix SELinux during creation of Symlinks --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f0bf695..c86f82b 100644 --- a/udev.spec +++ b/udev.spec @@ -287,7 +287,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Fri Apr 15 2004 Dan Walsh - 056-2 +* Fri Apr 15 2005 Dan Walsh - 056-2 - Fix SELinux during creation of Symlinks * Mon Apr 11 2005 Harald Hoyer - 056-1 From cec444ea889cf19422bbef19a790aba0b13158e6 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 15 Apr 2005 20:33:13 +0000 Subject: [PATCH 042/640] - Fix SELinux during creation of Symlinks --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f0bf695..c86f82b 100644 --- a/udev.spec +++ b/udev.spec @@ -287,7 +287,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Fri Apr 15 2004 Dan Walsh - 056-2 +* Fri Apr 15 2005 Dan Walsh - 056-2 - Fix SELinux during creation of Symlinks * Mon Apr 11 2005 Harald Hoyer - 056-1 From 64442a64d9deaeb5809bcb39f49460f5648a0877 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 18 Apr 2005 10:42:19 +0000 Subject: [PATCH 043/640] version 057 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index ab85d99..fdfd0c3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-056.tar.bz2 +udev-057.tar.bz2 diff --git a/sources b/sources index 9766ce2..cd282b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -30fb3a320e74ff0c49c15ecaa6e37a4c udev-056.tar.bz2 +f3fb853592ce3cb768c289545af2a3bd udev-057.tar.bz2 diff --git a/udev.spec b/udev.spec index c86f82b..67eda31 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 056 -Release: 2 +Version: 057 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -287,6 +287,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Apr 18 2005 Harald Hoyer - 057-1 +- version 057 + * Fri Apr 15 2005 Dan Walsh - 056-2 - Fix SELinux during creation of Symlinks From 58d8ac4f7914ad69728a730c70f167eceddfe554 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 18 Apr 2005 10:42:19 +0000 Subject: [PATCH 044/640] version 057 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index ab85d99..fdfd0c3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-056.tar.bz2 +udev-057.tar.bz2 diff --git a/sources b/sources index 9766ce2..cd282b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -30fb3a320e74ff0c49c15ecaa6e37a4c udev-056.tar.bz2 +f3fb853592ce3cb768c289545af2a3bd udev-057.tar.bz2 diff --git a/udev.spec b/udev.spec index c86f82b..67eda31 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 056 -Release: 2 +Version: 057 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -287,6 +287,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Apr 18 2005 Harald Hoyer - 057-1 +- version 057 + * Fri Apr 15 2005 Dan Walsh - 056-2 - Fix SELinux during creation of Symlinks From a96ef60d540ed145a55f6d8e2376637512d2f620 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 21 Apr 2005 13:11:33 +0000 Subject: [PATCH 045/640] - added Inifiniband devices (bug #147035) - fixed pam_console.dev (bug #153250) --- udev.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 67eda31..ce05dca 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -287,6 +287,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Apr 21 2005 Harald Hoyer - 057-2 +- added Inifiniband devices (bug #147035) +- fixed pam_console.dev (bug #153250) + * Mon Apr 18 2005 Harald Hoyer - 057-1 - version 057 From 9cc61248a2237a4d7a4d4207887eb6aa5f29a35d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 21 Apr 2005 13:11:33 +0000 Subject: [PATCH 046/640] - added Inifiniband devices (bug #147035) - fixed pam_console.dev (bug #153250) --- udev.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 67eda31..ce05dca 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -287,6 +287,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Apr 21 2005 Harald Hoyer - 057-2 +- added Inifiniband devices (bug #147035) +- fixed pam_console.dev (bug #153250) + * Mon Apr 18 2005 Harald Hoyer - 057-1 - version 057 From 69e033e4964f0a05fafc6e985bfff44736f8795f Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 27 Apr 2005 04:49:20 +0000 Subject: [PATCH 047/640] fix udevstart.static build --- udev.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index ce05dca..7d1b0b9 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -100,6 +100,7 @@ make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ EXTRAS="extras/scsi_id" all mv udev udev.static +mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static make clean @@ -150,8 +151,8 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ # obsoleted by selinux patch #install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static +install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -ln -s udev.static $RPM_BUILD_ROOT/sbin/udevstart.static %if %{with_persistent} #persistent @@ -287,6 +288,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Apr 27 2005 Peter Jones - 057-3 +- use udevstart rather than udev for udevstart.static + * Thu Apr 21 2005 Harald Hoyer - 057-2 - added Inifiniband devices (bug #147035) - fixed pam_console.dev (bug #153250) From 288828e9c45db54e195e83ff46b373381b660c8d Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 27 Apr 2005 04:49:20 +0000 Subject: [PATCH 048/640] fix udevstart.static build --- udev.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index ce05dca..7d1b0b9 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -100,6 +100,7 @@ make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ EXTRAS="extras/scsi_id" all mv udev udev.static +mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static make clean @@ -150,8 +151,8 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ # obsoleted by selinux patch #install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static +install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -ln -s udev.static $RPM_BUILD_ROOT/sbin/udevstart.static %if %{with_persistent} #persistent @@ -287,6 +288,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Apr 27 2005 Peter Jones - 057-3 +- use udevstart rather than udev for udevstart.static + * Thu Apr 21 2005 Harald Hoyer - 057-2 - added Inifiniband devices (bug #147035) - fixed pam_console.dev (bug #153250) From 416d2957fb48d87c5d57b752b6a53d168064fad1 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 5 May 2005 16:24:26 +0000 Subject: [PATCH 049/640] better check for mounted /dev (#156862) --- start_udev | 2 +- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index 55eca37..5e1f112 100755 --- a/start_udev +++ b/start_udev @@ -200,7 +200,7 @@ STRING=$"Starting $prog: " echo -n "$STRING " # mount the tmpfs on ${udev_root%/}, if not already done -LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { +LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) mount --move $udev_root/pts "$PTSDIR" diff --git a/udev.spec b/udev.spec index 7d1b0b9..0a3f9a2 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -288,6 +288,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu May 5 2005 Bill Nottingham - 057-4 +- better check for mounted tmpfs on /dev (#156862) + * Wed Apr 27 2005 Peter Jones - 057-3 - use udevstart rather than udev for udevstart.static From e588d498e2003ad684427078ce11e0d94df49f17 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 5 May 2005 16:24:26 +0000 Subject: [PATCH 050/640] better check for mounted /dev (#156862) --- start_udev | 2 +- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index 55eca37..5e1f112 100755 --- a/start_udev +++ b/start_udev @@ -200,7 +200,7 @@ STRING=$"Starting $prog: " echo -n "$STRING " # mount the tmpfs on ${udev_root%/}, if not already done -LANG=C fgrep -q "none ${udev_root%/} " /proc/mounts || { +LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) mount --move $udev_root/pts "$PTSDIR" diff --git a/udev.spec b/udev.spec index 7d1b0b9..0a3f9a2 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -288,6 +288,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu May 5 2005 Bill Nottingham - 057-4 +- better check for mounted tmpfs on /dev (#156862) + * Wed Apr 27 2005 Peter Jones - 057-3 - use udevstart rather than udev for udevstart.static From a55305a8ad749ce95fcce4e1dbc4be110b6eca35 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 5 May 2005 16:25:34 +0000 Subject: [PATCH 051/640] beta blocker, need to get this built --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index 0a3f9a2..c418873 100644 --- a/udev.spec +++ b/udev.spec @@ -4,6 +4,8 @@ %define with_persistent 0 + +ExcludeArch: s390 s390x Summary: A userspace implementation of devfs Name: udev Version: 057 From 490aa9a9d036277c90dda6328a574c29a5bfb2ca Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 5 May 2005 16:25:34 +0000 Subject: [PATCH 052/640] beta blocker, need to get this built --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index 0a3f9a2..c418873 100644 --- a/udev.spec +++ b/udev.spec @@ -4,6 +4,8 @@ %define with_persistent 0 + +ExcludeArch: s390 s390x Summary: A userspace implementation of devfs Name: udev Version: 057 From fd0650723099f9d9ecbc500677d2c817e2190b94 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 6 May 2005 01:37:16 +0000 Subject: [PATCH 053/640] remove excludearch --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index c418873..0538d51 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,6 @@ %define with_persistent 0 -ExcludeArch: s390 s390x Summary: A userspace implementation of devfs Name: udev Version: 057 From ee5ba570de7c19aa3db55af93314f4fa3c612a3f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 6 May 2005 01:37:16 +0000 Subject: [PATCH 054/640] remove excludearch --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index c418873..0538d51 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,6 @@ %define with_persistent 0 -ExcludeArch: s390 s390x Summary: A userspace implementation of devfs Name: udev Version: 057 From 207d7879375058cc6f22ef15fe3af01668bd3fcf Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 6 May 2005 01:37:56 +0000 Subject: [PATCH 055/640] add changelog --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0538d51..bdc9a4f 100644 --- a/udev.spec +++ b/udev.spec @@ -8,7 +8,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu May 5 2005 Bill Nottingham - 057-5 +- rebuild + * Thu May 5 2005 Bill Nottingham - 057-4 - better check for mounted tmpfs on /dev (#156862) From 2619d5983e1b7da920645f11f6b5dcfcde683a26 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 6 May 2005 01:37:56 +0000 Subject: [PATCH 056/640] add changelog --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0538d51..bdc9a4f 100644 --- a/udev.spec +++ b/udev.spec @@ -8,7 +8,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu May 5 2005 Bill Nottingham - 057-5 +- rebuild + * Thu May 5 2005 Bill Nottingham - 057-4 - better check for mounted tmpfs on /dev (#156862) From 52a5eda3d7aac766648506f0590217e20efce866 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 May 2005 10:19:24 +0000 Subject: [PATCH 057/640] polished persistent --- udev.spec | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/udev.spec b/udev.spec index bdc9a4f..51c09bc 100644 --- a/udev.spec +++ b/udev.spec @@ -4,11 +4,10 @@ %define with_persistent 0 - Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -41,6 +40,7 @@ Source23: udevpermconv.sh Patch1: udev-039-static.patch Patch4: udev-056-selinux.patch +Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -78,14 +78,13 @@ udev-persistent enables persistent device naming with udev. #%patch1 -p1 -b .glibcstatic %patch4 -p1 -b .selinux +%patch50 -p1 -b .tmp_dir touch etc/init.d/udev.debian -%if %{with_persistent} mkdir ata_identify cp %{SOURCE11} ata_identify cp %{SOURCE12} ata_identify/Makefile -%endif cp %{SOURCE21} . @@ -98,11 +97,12 @@ make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id" all + EXTRAS="extras/scsi_id ata_identify" all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static +mv ata_identify/ata_identify ata_identify/ata_identify.static make clean make CC="gcc $RPM_OPT_FLAGS" \ @@ -114,11 +114,7 @@ make CC="gcc $RPM_OPT_FLAGS" \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} ata_identify" -%else - " -%endif #extras/volume_id %install @@ -130,15 +126,12 @@ make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} ata_identify" -%else - " -%endif 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 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} @@ -154,13 +147,14 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static +install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static %if %{with_persistent} #persistent install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE14} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE15} $RPM_BUILD_ROOT/sbin -install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-udev-persistent.rules +install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/49-udev-persistent.rules #install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif @@ -228,9 +222,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev -%if %{with_persistent} -%attr(755,root,root) /sbin/ata_identify -%endif +%attr(0755,root,root) /sbin/ata_identify +%attr(0755,root,root) /sbin/ata_identify.static +#%attr(755,root,root) /sbin/udev_volume_id +%attr(755,root,root) /sbin/chassis_id +%attr(755,root,root) /sbin/scsi_id +%attr(755,root,root) /sbin/scsi_id.static %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -266,29 +263,25 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes - -%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug +#%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/udev*.8* - - -%attr(755,root,root) /sbin/scsi_id -%attr(755,root,root) /sbin/scsi_id.static -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -#%attr(755,root,root) /sbin/udev_volume_id -%attr(755,root,root) /sbin/chassis_id %if %{with_persistent} %files -n udev-persistent -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-udev-persistent.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh -%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules +#%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif %changelog +* Thu May 12 2005 Harald Hoyer - 057-6 +- polished persistent scripts + * Thu May 5 2005 Bill Nottingham - 057-5 - rebuild From 9e968b14fa96c97359472c749434270b366d9ad7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 May 2005 10:19:24 +0000 Subject: [PATCH 058/640] polished persistent --- udev.spec | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/udev.spec b/udev.spec index bdc9a4f..51c09bc 100644 --- a/udev.spec +++ b/udev.spec @@ -4,11 +4,10 @@ %define with_persistent 0 - Summary: A userspace implementation of devfs Name: udev Version: 057 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -41,6 +40,7 @@ Source23: udevpermconv.sh Patch1: udev-039-static.patch Patch4: udev-056-selinux.patch +Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -78,14 +78,13 @@ udev-persistent enables persistent device naming with udev. #%patch1 -p1 -b .glibcstatic %patch4 -p1 -b .selinux +%patch50 -p1 -b .tmp_dir touch etc/init.d/udev.debian -%if %{with_persistent} mkdir ata_identify cp %{SOURCE11} ata_identify cp %{SOURCE12} ata_identify/Makefile -%endif cp %{SOURCE21} . @@ -98,11 +97,12 @@ make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id" all + EXTRAS="extras/scsi_id ata_identify" all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static +mv ata_identify/ata_identify ata_identify/ata_identify.static make clean make CC="gcc $RPM_OPT_FLAGS" \ @@ -114,11 +114,7 @@ make CC="gcc $RPM_OPT_FLAGS" \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} ata_identify" -%else - " -%endif #extras/volume_id %install @@ -130,15 +126,12 @@ make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} ata_identify" -%else - " -%endif 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 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} @@ -154,13 +147,14 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static +install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static %if %{with_persistent} #persistent install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE14} $RPM_BUILD_ROOT/sbin install -m 0755 %{SOURCE15} $RPM_BUILD_ROOT/sbin -install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-udev-persistent.rules +install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/49-udev-persistent.rules #install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif @@ -228,9 +222,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev -%if %{with_persistent} -%attr(755,root,root) /sbin/ata_identify -%endif +%attr(0755,root,root) /sbin/ata_identify +%attr(0755,root,root) /sbin/ata_identify.static +#%attr(755,root,root) /sbin/udev_volume_id +%attr(755,root,root) /sbin/chassis_id +%attr(755,root,root) /sbin/scsi_id +%attr(755,root,root) /sbin/scsi_id.static %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -266,29 +263,25 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes - -%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug +#%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/udev*.8* - - -%attr(755,root,root) /sbin/scsi_id -%attr(755,root,root) /sbin/scsi_id.static -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -#%attr(755,root,root) /sbin/udev_volume_id -%attr(755,root,root) /sbin/chassis_id %if %{with_persistent} %files -n udev-persistent -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-udev-persistent.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh -%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules +#%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif %changelog +* Thu May 12 2005 Harald Hoyer - 057-6 +- polished persistent scripts + * Thu May 5 2005 Bill Nottingham - 057-5 - rebuild From d66c9f14625c56f7952e5f54a1be6222c18bb078 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 May 2005 12:39:51 +0000 Subject: [PATCH 059/640] move ata_identify to udev-persistent --- udev.spec | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/udev.spec b/udev.spec index 51c09bc..ca7f555 100644 --- a/udev.spec +++ b/udev.spec @@ -82,9 +82,11 @@ udev-persistent enables persistent device naming with udev. touch etc/init.d/udev.debian -mkdir ata_identify -cp %{SOURCE11} ata_identify -cp %{SOURCE12} ata_identify/Makefile +%if %{with_persistent} + mkdir ata_identify + cp %{SOURCE11} ata_identify + cp %{SOURCE12} ata_identify/Makefile +%endif cp %{SOURCE21} . @@ -97,12 +99,18 @@ make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id ata_identify" all + EXTRAS="extras/scsi_id \ +%if %{with_persistent} + ata_identify \ +%endif + " all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static -mv ata_identify/ata_identify ata_identify/ata_identify.static +%if %{with_persistent} + mv ata_identify/ata_identify ata_identify/ata_identify.static +%endif make clean make CC="gcc $RPM_OPT_FLAGS" \ @@ -114,7 +122,10 @@ make CC="gcc $RPM_OPT_FLAGS" \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ - ata_identify" +%if %{with_persistent} + ata_identify \ +%endif + " #extras/volume_id %install @@ -126,7 +137,10 @@ make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ - ata_identify" +%if %{with_persistent} + ata_identify \ +%endif + " rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules @@ -147,7 +161,10 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static +%if %{with_persistent} + install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static +%endif + %if %{with_persistent} #persistent @@ -214,7 +231,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html %doc etc/udev/redhat/udev.rules - %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static %attr(0755,root,root) /sbin/udevsend @@ -222,8 +238,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev -%attr(0755,root,root) /sbin/ata_identify -%attr(0755,root,root) /sbin/ata_identify.static #%attr(755,root,root) /sbin/udev_volume_id %attr(755,root,root) /sbin/chassis_id %attr(755,root,root) /sbin/scsi_id @@ -271,10 +285,15 @@ rm -rf $RPM_BUILD_ROOT %if %{with_persistent} %files -n udev-persistent -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules -%attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh -%attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh -%attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh + %if %{with_persistent} + %attr(0755,root,root) /sbin/ata_identify + %attr(0755,root,root) /sbin/ata_identify.static + %endif + + %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules + %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh + %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh + %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh #%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif From 70ffb4bd243a9531dbbae1122de7138988078f0a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 May 2005 12:39:51 +0000 Subject: [PATCH 060/640] move ata_identify to udev-persistent --- udev.spec | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/udev.spec b/udev.spec index 51c09bc..ca7f555 100644 --- a/udev.spec +++ b/udev.spec @@ -82,9 +82,11 @@ udev-persistent enables persistent device naming with udev. touch etc/init.d/udev.debian -mkdir ata_identify -cp %{SOURCE11} ata_identify -cp %{SOURCE12} ata_identify/Makefile +%if %{with_persistent} + mkdir ata_identify + cp %{SOURCE11} ata_identify + cp %{SOURCE12} ata_identify/Makefile +%endif cp %{SOURCE21} . @@ -97,12 +99,18 @@ make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id ata_identify" all + EXTRAS="extras/scsi_id \ +%if %{with_persistent} + ata_identify \ +%endif + " all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static -mv ata_identify/ata_identify ata_identify/ata_identify.static +%if %{with_persistent} + mv ata_identify/ata_identify ata_identify/ata_identify.static +%endif make clean make CC="gcc $RPM_OPT_FLAGS" \ @@ -114,7 +122,10 @@ make CC="gcc $RPM_OPT_FLAGS" \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ - ata_identify" +%if %{with_persistent} + ata_identify \ +%endif + " #extras/volume_id %install @@ -126,7 +137,10 @@ make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ - ata_identify" +%if %{with_persistent} + ata_identify \ +%endif + " rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules @@ -147,7 +161,10 @@ ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static +%if %{with_persistent} + install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static +%endif + %if %{with_persistent} #persistent @@ -214,7 +231,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html %doc etc/udev/redhat/udev.rules - %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static %attr(0755,root,root) /sbin/udevsend @@ -222,8 +238,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev -%attr(0755,root,root) /sbin/ata_identify -%attr(0755,root,root) /sbin/ata_identify.static #%attr(755,root,root) /sbin/udev_volume_id %attr(755,root,root) /sbin/chassis_id %attr(755,root,root) /sbin/scsi_id @@ -271,10 +285,15 @@ rm -rf $RPM_BUILD_ROOT %if %{with_persistent} %files -n udev-persistent -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules -%attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh -%attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh -%attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh + %if %{with_persistent} + %attr(0755,root,root) /sbin/ata_identify + %attr(0755,root,root) /sbin/ata_identify.static + %endif + + %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules + %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh + %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh + %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh #%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules %endif From 2c74069c8f43c577533b6df56e1fb3a1fa5e65db Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sat, 21 May 2005 03:38:00 +0000 Subject: [PATCH 061/640] update to 058 to fix sysfs incompatibility --- .cvsignore | 2 +- sources | 2 +- udev.spec | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index fdfd0c3..9678eb2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-057.tar.bz2 +udev-058.tar.bz2 diff --git a/sources b/sources index cd282b9..9d70669 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f3fb853592ce3cb768c289545af2a3bd udev-057.tar.bz2 +03be2f56cc13c7f24b0ebf296166d48a udev-058.tar.bz2 diff --git a/udev.spec b/udev.spec index ca7f555..8919a27 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 057 -Release: 6 +Version: 058 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,7 +39,6 @@ Source22: udev.nodes Source23: udevpermconv.sh Patch1: udev-039-static.patch -Patch4: udev-056-selinux.patch Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux @@ -77,7 +76,6 @@ udev-persistent enables persistent device naming with udev. %setup -q #%patch1 -p1 -b .glibcstatic -%patch4 -p1 -b .selinux %patch50 -p1 -b .tmp_dir touch etc/init.d/udev.debian @@ -298,6 +296,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri May 20 2005 Bill Nottingham - 058-1 +- update to 058, fixes conflict with newer kernels (#158371) + * Thu May 12 2005 Harald Hoyer - 057-6 - polished persistent scripts From 76f89a44016d56388273e517a2f859d18e99028d Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sat, 21 May 2005 03:38:00 +0000 Subject: [PATCH 062/640] update to 058 to fix sysfs incompatibility --- .cvsignore | 2 +- sources | 2 +- udev.spec | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index fdfd0c3..9678eb2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-057.tar.bz2 +udev-058.tar.bz2 diff --git a/sources b/sources index cd282b9..9d70669 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f3fb853592ce3cb768c289545af2a3bd udev-057.tar.bz2 +03be2f56cc13c7f24b0ebf296166d48a udev-058.tar.bz2 diff --git a/udev.spec b/udev.spec index ca7f555..8919a27 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 057 -Release: 6 +Version: 058 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,7 +39,6 @@ Source22: udev.nodes Source23: udevpermconv.sh Patch1: udev-039-static.patch -Patch4: udev-056-selinux.patch Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux @@ -77,7 +76,6 @@ udev-persistent enables persistent device naming with udev. %setup -q #%patch1 -p1 -b .glibcstatic -%patch4 -p1 -b .selinux %patch50 -p1 -b .tmp_dir touch etc/init.d/udev.debian @@ -298,6 +296,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri May 20 2005 Bill Nottingham - 058-1 +- update to 058, fixes conflict with newer kernels (#158371) + * Thu May 12 2005 Harald Hoyer - 057-6 - polished persistent scripts From 5ce806de2951b1cef75cb11955938fd03a770f37 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 7 Jul 2005 13:36:42 +0000 Subject: [PATCH 063/640] compile with pie --- udev.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 8919a27..f4f793a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 058 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -111,7 +111,7 @@ mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static %endif make clean -make CC="gcc $RPM_OPT_FLAGS" \ +make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -296,6 +296,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Jul 07 2005 Harald Hoyer - 058-2 +- compile with pie + * Fri May 20 2005 Bill Nottingham - 058-1 - update to 058, fixes conflict with newer kernels (#158371) From b198546ab38dd1384c166cdfc32dfd9cef5137f4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 7 Jul 2005 13:36:42 +0000 Subject: [PATCH 064/640] compile with pie --- udev.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 8919a27..f4f793a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 058 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -111,7 +111,7 @@ mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static %endif make clean -make CC="gcc $RPM_OPT_FLAGS" \ +make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -296,6 +296,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Jul 07 2005 Harald Hoyer - 058-2 +- compile with pie + * Fri May 20 2005 Bill Nottingham - 058-1 - update to 058, fixes conflict with newer kernels (#158371) From 733e59faf999a68ad5b405558c45901d0cf6e8ab Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 13 Jul 2005 14:33:08 +0000 Subject: [PATCH 065/640] - update to 062 - use included ata_id, build usb_id - load modules for pci, usb, pcmcia --- .cvsignore | 2 +- sources | 2 +- udev.spec | 74 ++++++++++++++++++++++-------------------------------- 3 files changed, 32 insertions(+), 46 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9678eb2..e269952 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-058.tar.bz2 +udev-062.tar.bz2 diff --git a/sources b/sources index 9d70669..647f729 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -03be2f56cc13c7f24b0ebf296166d48a udev-058.tar.bz2 +1535a62e2ae9a6a1cdd6857f6fc3da33 udev-062.tar.bz2 diff --git a/udev.spec b/udev.spec index f4f793a..c4ea6a1 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 058 -Release: 2 +Version: 062 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -20,9 +20,7 @@ Source3: udev.conf Source4: pam_console.dev Source5: MAKEDEV.dev -Source11: ata_identify.c -Source12: ata_identify-Makefile - +Source10: hotplug.rules Source13: udev.get_persistent_device_name.sh Source14: udev.get_unique_hardware_path.sh Source15: udev.get_unique_drive_id.sh @@ -38,7 +36,7 @@ Source22: udev.nodes Source23: udevpermconv.sh -Patch1: udev-039-static.patch +Patch1: udev-062-build.patch Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux @@ -75,43 +73,30 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -#%patch1 -p1 -b .glibcstatic +%patch1 -p1 -b .build %patch50 -p1 -b .tmp_dir -touch etc/init.d/udev.debian - -%if %{with_persistent} - mkdir ata_identify - cp %{SOURCE11} ata_identify - cp %{SOURCE12} ata_identify/Makefile -%endif - cp %{SOURCE21} . %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) -make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ +make \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id \ -%if %{with_persistent} - ata_identify \ -%endif + EXTRAS="extras/scsi_id extras/ata_id \ " all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static -%if %{with_persistent} - mv ata_identify/ata_identify ata_identify/ata_identify.static -%endif +mv extras/ata_id/ata_id extras/ata_id/ata_id.static make clean -make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ +make \ USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -120,9 +105,9 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} - ata_identify \ -%endif + extras/ata_id \ + extras/usb_id \ + extras/run_directory \ " #extras/volume_id @@ -135,9 +120,9 @@ make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} - ata_identify \ -%endif + extras/ata_id \ + extras/usb_id \ + extras/run_directory \ " @@ -149,20 +134,17 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules +# Backwards compat +install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.rules install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -mv $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ # obsoleted by selinux patch #install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -%if %{with_persistent} - install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static -%endif - +install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static %if %{with_persistent} #persistent @@ -231,15 +213,21 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static +%attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id +%attr(0755,root,root) /sbin/udev_run_devd +%attr(0755,root,root) /sbin/udev_run_hotplugd %attr(755,root,root) /sbin/chassis_id %attr(755,root,root) /sbin/scsi_id %attr(755,root,root) /sbin/scsi_id.static +%attr(755,root,root) /sbin/ata_id +%attr(755,root,root) /sbin/ata_id.static +%attr(755,root,root) /sbin/usb_id %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -251,10 +239,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev -%config(missingok) %{_sysconfdir}/dev.d/net/hotplug.dev %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/net # floppy madness %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ @@ -265,7 +251,6 @@ rm -rf $RPM_BUILD_ROOT %config(missingok) %{_sysconfdir}/dev.d/fd?/* %attr(0755,root,root) %{_sysconfdir}/udev/scripts/MAKEDEV.dev -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/hotplug.dev %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh @@ -273,6 +258,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/hotplug.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -283,11 +269,6 @@ rm -rf $RPM_BUILD_ROOT %if %{with_persistent} %files -n udev-persistent - %if %{with_persistent} - %attr(0755,root,root) /sbin/ata_identify - %attr(0755,root,root) /sbin/ata_identify.static - %endif - %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh @@ -296,6 +277,11 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Jul 08 2005 Bill Nottingham - 062-1 +- update to 062 +- use included ata_id, build usb_id +- load modules for pci, usb, pcmcia + * Thu Jul 07 2005 Harald Hoyer - 058-2 - compile with pie From e8b633ad2c5f15dba2461a3b8f3384fa1400c885 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 13 Jul 2005 14:33:08 +0000 Subject: [PATCH 066/640] - update to 062 - use included ata_id, build usb_id - load modules for pci, usb, pcmcia --- .cvsignore | 2 +- sources | 2 +- udev.spec | 74 ++++++++++++++++++++++-------------------------------- 3 files changed, 32 insertions(+), 46 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9678eb2..e269952 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-058.tar.bz2 +udev-062.tar.bz2 diff --git a/sources b/sources index 9d70669..647f729 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -03be2f56cc13c7f24b0ebf296166d48a udev-058.tar.bz2 +1535a62e2ae9a6a1cdd6857f6fc3da33 udev-062.tar.bz2 diff --git a/udev.spec b/udev.spec index f4f793a..c4ea6a1 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 058 -Release: 2 +Version: 062 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -20,9 +20,7 @@ Source3: udev.conf Source4: pam_console.dev Source5: MAKEDEV.dev -Source11: ata_identify.c -Source12: ata_identify-Makefile - +Source10: hotplug.rules Source13: udev.get_persistent_device_name.sh Source14: udev.get_unique_hardware_path.sh Source15: udev.get_unique_drive_id.sh @@ -38,7 +36,7 @@ Source22: udev.nodes Source23: udevpermconv.sh -Patch1: udev-039-static.patch +Patch1: udev-062-build.patch Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux @@ -75,43 +73,30 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -#%patch1 -p1 -b .glibcstatic +%patch1 -p1 -b .build %patch50 -p1 -b .tmp_dir -touch etc/init.d/udev.debian - -%if %{with_persistent} - mkdir ata_identify - cp %{SOURCE11} ata_identify - cp %{SOURCE12} ata_identify/Makefile -%endif - cp %{SOURCE21} . %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) -make CC="gcc $RPM_OPT_FLAGS -DUDEV_STATIC" LD="gcc $RPM_OPT_FLAGS -static" \ +make \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id \ -%if %{with_persistent} - ata_identify \ -%endif + EXTRAS="extras/scsi_id extras/ata_id \ " all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static -%if %{with_persistent} - mv ata_identify/ata_identify ata_identify/ata_identify.static -%endif +mv extras/ata_id/ata_id extras/ata_id/ata_id.static make clean -make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ +make \ USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -120,9 +105,9 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} - ata_identify \ -%endif + extras/ata_id \ + extras/usb_id \ + extras/run_directory \ " #extras/volume_id @@ -135,9 +120,9 @@ make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ extras/chassis_id \ -%if %{with_persistent} - ata_identify \ -%endif + extras/ata_id \ + extras/usb_id \ + extras/run_directory \ " @@ -149,20 +134,17 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules +# Backwards compat +install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.rules install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -mv $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -ln -s ../../udev/scripts/hotplug.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/net/ # obsoleted by selinux patch #install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -%if %{with_persistent} - install -m 0755 ata_identify/ata_identify.static $RPM_BUILD_ROOT/sbin/ata_identify.static -%endif - +install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static %if %{with_persistent} #persistent @@ -231,15 +213,21 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static +%attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/udevstart.static %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id +%attr(0755,root,root) /sbin/udev_run_devd +%attr(0755,root,root) /sbin/udev_run_hotplugd %attr(755,root,root) /sbin/chassis_id %attr(755,root,root) /sbin/scsi_id %attr(755,root,root) /sbin/scsi_id.static +%attr(755,root,root) /sbin/ata_id +%attr(755,root,root) /sbin/ata_id.static +%attr(755,root,root) /sbin/usb_id %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -251,10 +239,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{_sysconfdir}/udev/scripts/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev -%config(missingok) %{_sysconfdir}/dev.d/net/hotplug.dev %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/net # floppy madness %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ @@ -265,7 +251,6 @@ rm -rf $RPM_BUILD_ROOT %config(missingok) %{_sysconfdir}/dev.d/fd?/* %attr(0755,root,root) %{_sysconfdir}/udev/scripts/MAKEDEV.dev -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/hotplug.dev %attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh %attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh @@ -273,6 +258,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/hotplug.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -283,11 +269,6 @@ rm -rf $RPM_BUILD_ROOT %if %{with_persistent} %files -n udev-persistent - %if %{with_persistent} - %attr(0755,root,root) /sbin/ata_identify - %attr(0755,root,root) /sbin/ata_identify.static - %endif - %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh @@ -296,6 +277,11 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Jul 08 2005 Bill Nottingham - 062-1 +- update to 062 +- use included ata_id, build usb_id +- load modules for pci, usb, pcmcia + * Thu Jul 07 2005 Harald Hoyer - 058-2 - compile with pie From 6e5cd3a635663ec179697f2f1728c72e6689adbc Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 14 Jul 2005 04:05:11 +0000 Subject: [PATCH 067/640] ship release-notes in %%doc --- udev.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index c4ea6a1..b969400 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 062 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -209,7 +209,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html +%doc COPYING README TODO ChangeLog HOWTO* RELEASE-NOTES docs/* udev.html %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -277,10 +277,11 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Fri Jul 08 2005 Bill Nottingham - 062-1 +* Fri Jul 08 2005 Bill Nottingham - 062-2 - update to 062 - use included ata_id, build usb_id - load modules for pci, usb, pcmcia +- ship RELEASE-NOTES in %%doc * Thu Jul 07 2005 Harald Hoyer - 058-2 - compile with pie From c6b772ba10802ab5b016e7481600cbca42dcfe3e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 14 Jul 2005 04:05:11 +0000 Subject: [PATCH 068/640] ship release-notes in %%doc --- udev.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index c4ea6a1..b969400 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 062 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -209,7 +209,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog HOWTO* docs/* udev.html +%doc COPYING README TODO ChangeLog HOWTO* RELEASE-NOTES docs/* udev.html %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -277,10 +277,11 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Fri Jul 08 2005 Bill Nottingham - 062-1 +* Fri Jul 08 2005 Bill Nottingham - 062-2 - update to 062 - use included ata_id, build usb_id - load modules for pci, usb, pcmcia +- ship RELEASE-NOTES in %%doc * Thu Jul 07 2005 Harald Hoyer - 058-2 - compile with pie From 14b5ed6ffbb8b0714f76b70422f5a98feb545c47 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 19 Jul 2005 23:59:03 +0000 Subject: [PATCH 069/640] obsolete firmware.agent too --- firmware_helper.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++ udev.spec | 7 ++- 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 firmware_helper.c diff --git a/firmware_helper.c b/firmware_helper.c new file mode 100644 index 0000000..d03f0b8 --- /dev/null +++ b/firmware_helper.c @@ -0,0 +1,140 @@ +/* + * A simple firmware helper program. + * + * Copyright 2005 Red Hat, Inc. + * + * This software may be freely redistributed under the terms of the GNU + * public license. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define FIRMWARE_PATH "/lib/firmware" + + +void log_err(char *firmware, int err) { + char *driver; + + driver = getenv("PHYSDEVDRIVER"); + if (!driver) + driver = "(unknown)"; + openlog("firmware_helper",LOG_PID,LOG_USER); + syslog(LOG_ERR,"Loading of %s for %s driver failed: %s",firmware, driver, strerror(err)); + closelog(); +} + +/* Set the 'loading' attribute for a firmware device. + * 1 == currently loading + * 0 == done loading + * -1 == error + */ +int set_loading(char *device, int value) { + char *path; + int rc; + FILE *f; + + path = alloca(strlen(device)+15); + sprintf(path,"/sys/%s/loading", device); + f = fopen(path, "w"); + if (!f) + return 1; + rc = fprintf(f, "%d", value); + fclose(f); + if (rc < 0) + return rc; + return 0; +} + + +int main(int argc, char **argv) { + char *devpath, *firmware, *action; + struct stat sbuf; + int fw_fd, count; + int rc; + char *fw_path, *data_path; + char *fw_buffer; + + devpath = getenv("DEVPATH"); + if (!devpath) return 0; + + firmware = getenv("FIRMWARE"); + if (!firmware) return 0; + + action = getenv("ACTION"); + if (strcmp(action,"add")) + return 0; + + set_loading(devpath, 1); + + fw_path = malloc(strlen(FIRMWARE_PATH) + strlen(firmware) + 2); + if (!fw_path) { + rc = errno; + goto out_err; + } + + sprintf(fw_path,"%s/%s", FIRMWARE_PATH, firmware); + fw_fd = open(fw_path, O_RDONLY); + if (fw_fd == -1) { + rc = errno; + goto out_err; + } + + fstat(fw_fd, &sbuf); + fw_buffer = malloc(sbuf.st_size); + if (!fw_buffer) { + rc = errno; + goto out_err; + } + if (read(fw_fd, fw_buffer, sbuf.st_size) != sbuf.st_size) { + rc = errno; + goto out_err; + } + close(fw_fd); + + data_path = malloc(strlen(devpath) + 12); + if (!data_path) { + rc = errno; + goto out_err; + } + + sprintf(data_path,"/sys/%s/data", devpath); + + fw_fd = open(data_path, O_RDWR); + if (fw_fd == -1) { + rc = errno; + goto out_err; + } + + count = 0; + while (count < sbuf.st_size) { + int c; + + c = write(fw_fd,fw_buffer+count,sbuf.st_size-count); + if (c <= 0) { + rc = errno; + goto out_err; + } + count += c; + } + close(fw_fd); + set_loading(devpath, 0); + return 0; +out_err: + close(fw_fd); + set_loading(devpath, -1); + log_err(fw_path, rc); + return rc; +} diff --git a/udev.spec b/udev.spec index b969400..61ee7d7 100644 --- a/udev.spec +++ b/udev.spec @@ -36,6 +36,8 @@ Source22: udev.nodes Source23: udevpermconv.sh +Source30: firmware_helper.c + Patch1: udev-062-build.patch Patch50: udev-039-scsi_id-tmp_dir.patch @@ -111,6 +113,8 @@ make \ " #extras/volume_id +%{__cc} %{optflags} -o firmware_helper %{SOURCE30} + %install rm -rf $RPM_BUILD_ROOT @@ -175,7 +179,7 @@ for i in 0 1 2 3;do done install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ - +install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then @@ -228,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id +%attr(755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo From d7fbf6a26f31aff7cc380cf5952fb9437fc6e638 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 19 Jul 2005 23:59:03 +0000 Subject: [PATCH 070/640] obsolete firmware.agent too --- firmware_helper.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++ udev.spec | 7 ++- 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 firmware_helper.c diff --git a/firmware_helper.c b/firmware_helper.c new file mode 100644 index 0000000..d03f0b8 --- /dev/null +++ b/firmware_helper.c @@ -0,0 +1,140 @@ +/* + * A simple firmware helper program. + * + * Copyright 2005 Red Hat, Inc. + * + * This software may be freely redistributed under the terms of the GNU + * public license. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define FIRMWARE_PATH "/lib/firmware" + + +void log_err(char *firmware, int err) { + char *driver; + + driver = getenv("PHYSDEVDRIVER"); + if (!driver) + driver = "(unknown)"; + openlog("firmware_helper",LOG_PID,LOG_USER); + syslog(LOG_ERR,"Loading of %s for %s driver failed: %s",firmware, driver, strerror(err)); + closelog(); +} + +/* Set the 'loading' attribute for a firmware device. + * 1 == currently loading + * 0 == done loading + * -1 == error + */ +int set_loading(char *device, int value) { + char *path; + int rc; + FILE *f; + + path = alloca(strlen(device)+15); + sprintf(path,"/sys/%s/loading", device); + f = fopen(path, "w"); + if (!f) + return 1; + rc = fprintf(f, "%d", value); + fclose(f); + if (rc < 0) + return rc; + return 0; +} + + +int main(int argc, char **argv) { + char *devpath, *firmware, *action; + struct stat sbuf; + int fw_fd, count; + int rc; + char *fw_path, *data_path; + char *fw_buffer; + + devpath = getenv("DEVPATH"); + if (!devpath) return 0; + + firmware = getenv("FIRMWARE"); + if (!firmware) return 0; + + action = getenv("ACTION"); + if (strcmp(action,"add")) + return 0; + + set_loading(devpath, 1); + + fw_path = malloc(strlen(FIRMWARE_PATH) + strlen(firmware) + 2); + if (!fw_path) { + rc = errno; + goto out_err; + } + + sprintf(fw_path,"%s/%s", FIRMWARE_PATH, firmware); + fw_fd = open(fw_path, O_RDONLY); + if (fw_fd == -1) { + rc = errno; + goto out_err; + } + + fstat(fw_fd, &sbuf); + fw_buffer = malloc(sbuf.st_size); + if (!fw_buffer) { + rc = errno; + goto out_err; + } + if (read(fw_fd, fw_buffer, sbuf.st_size) != sbuf.st_size) { + rc = errno; + goto out_err; + } + close(fw_fd); + + data_path = malloc(strlen(devpath) + 12); + if (!data_path) { + rc = errno; + goto out_err; + } + + sprintf(data_path,"/sys/%s/data", devpath); + + fw_fd = open(data_path, O_RDWR); + if (fw_fd == -1) { + rc = errno; + goto out_err; + } + + count = 0; + while (count < sbuf.st_size) { + int c; + + c = write(fw_fd,fw_buffer+count,sbuf.st_size-count); + if (c <= 0) { + rc = errno; + goto out_err; + } + count += c; + } + close(fw_fd); + set_loading(devpath, 0); + return 0; +out_err: + close(fw_fd); + set_loading(devpath, -1); + log_err(fw_path, rc); + return rc; +} diff --git a/udev.spec b/udev.spec index b969400..61ee7d7 100644 --- a/udev.spec +++ b/udev.spec @@ -36,6 +36,8 @@ Source22: udev.nodes Source23: udevpermconv.sh +Source30: firmware_helper.c + Patch1: udev-062-build.patch Patch50: udev-039-scsi_id-tmp_dir.patch @@ -111,6 +113,8 @@ make \ " #extras/volume_id +%{__cc} %{optflags} -o firmware_helper %{SOURCE30} + %install rm -rf $RPM_BUILD_ROOT @@ -175,7 +179,7 @@ for i in 0 1 2 3;do done install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ - +install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then @@ -228,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id +%attr(755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo From a0d2b27043ee8daf1445a8db56f2c7547e9bd1a5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 20 Jul 2005 00:59:21 +0000 Subject: [PATCH 071/640] update to 063 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index e269952..3e0754b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-062.tar.bz2 +udev-063.tar.bz2 diff --git a/sources b/sources index 647f729..120c64c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1535a62e2ae9a6a1cdd6857f6fc3da33 udev-062.tar.bz2 +70c5a1c45a8df0ff1e21fa9b89486ab4 udev-063.tar.bz2 diff --git a/udev.spec b/udev.spec index 61ee7d7..f88a68b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 062 -Release: 2 +Version: 063 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -109,6 +109,9 @@ make \ extras/chassis_id \ extras/ata_id \ extras/usb_id \ +%ifarch s390 s390x + extras/dasd_id \ +%endif extras/run_directory \ " #extras/volume_id @@ -126,6 +129,9 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/chassis_id \ extras/ata_id \ extras/usb_id \ +%ifarch s390 s390x + extras/dasd_id \ +%endif extras/run_directory \ " @@ -143,8 +149,6 @@ install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.r install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -# obsoleted by selinux patch -#install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static @@ -232,6 +236,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id +%ifarch s390 s390x +%attr(755,root,root) /sbin/dasd_id +%endif %attr(755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest @@ -282,6 +289,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Jul 19 2005 Bill Nottingham - 063-1 +- update to 063 +- handle the hotplug events for ieee1394, scsi, firmware + * Fri Jul 08 2005 Bill Nottingham - 062-2 - update to 062 - use included ata_id, build usb_id From 5dd3b5697ee5405f75a7eb3137a5f1dc851275d0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 20 Jul 2005 00:59:21 +0000 Subject: [PATCH 072/640] update to 063 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index e269952..3e0754b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-062.tar.bz2 +udev-063.tar.bz2 diff --git a/sources b/sources index 647f729..120c64c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1535a62e2ae9a6a1cdd6857f6fc3da33 udev-062.tar.bz2 +70c5a1c45a8df0ff1e21fa9b89486ab4 udev-063.tar.bz2 diff --git a/udev.spec b/udev.spec index 61ee7d7..f88a68b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 062 -Release: 2 +Version: 063 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -109,6 +109,9 @@ make \ extras/chassis_id \ extras/ata_id \ extras/usb_id \ +%ifarch s390 s390x + extras/dasd_id \ +%endif extras/run_directory \ " #extras/volume_id @@ -126,6 +129,9 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/chassis_id \ extras/ata_id \ extras/usb_id \ +%ifarch s390 s390x + extras/dasd_id \ +%endif extras/run_directory \ " @@ -143,8 +149,6 @@ install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.r install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -# obsoleted by selinux patch -#install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static @@ -232,6 +236,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id +%ifarch s390 s390x +%attr(755,root,root) /sbin/dasd_id +%endif %attr(755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest @@ -282,6 +289,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Jul 19 2005 Bill Nottingham - 063-1 +- update to 063 +- handle the hotplug events for ieee1394, scsi, firmware + * Fri Jul 08 2005 Bill Nottingham - 062-2 - update to 062 - use included ata_id, build usb_id From 6ad46f3bf320dce7035a4b8e6e1b1c22e0e553c2 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 25 Jul 2005 03:05:27 +0000 Subject: [PATCH 073/640] From the udev relnotes: udev 059 ======== ... o udevd listens to netlink events now. The first valid netlink event will make udevd ignore any message from udevsend that contains a SEQNUM, to avoid duplicate events. Ergo, don't set it for replay events (#163729). --- start_udev | 4 ---- udev.spec | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index 5e1f112..3dca02a 100755 --- a/start_udev +++ b/start_udev @@ -142,22 +142,18 @@ scsi_replay () { [ -z "$HOTPLUG" ] && return 1 scsi_hosts=$(find_d /sys/devices host\*) - SEQNUM=1 for host in $scsi_hosts;do [ -d $host ] || continue devs=$(find_f $host type) for dev in $devs;do [ -f $dev ] || continue - export SEQNUM DEVPATH=${dev%/type} DEVPATH=${DEVPATH#/sys} export DEVPATH export ACTION=add $HOTPLUG scsi_device - SEQNUM=$[$SEQNUM + 1] $HOTPLUG scsi - SEQNUM=$[$SEQNUM + 1] done done return 0 diff --git a/udev.spec b/udev.spec index f88a68b..f9a0baa 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Jul 24 2005 Bill Nottingham - 063-2 +- don't set SEQNUM for scsi replay events (#163729) + * Tue Jul 19 2005 Bill Nottingham - 063-1 - update to 063 - handle the hotplug events for ieee1394, scsi, firmware From 1b5feedb36233841ac9f4fd58c0d3e6a1b4667a5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 25 Jul 2005 03:05:27 +0000 Subject: [PATCH 074/640] From the udev relnotes: udev 059 ======== ... o udevd listens to netlink events now. The first valid netlink event will make udevd ignore any message from udevsend that contains a SEQNUM, to avoid duplicate events. Ergo, don't set it for replay events (#163729). --- start_udev | 4 ---- udev.spec | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index 5e1f112..3dca02a 100755 --- a/start_udev +++ b/start_udev @@ -142,22 +142,18 @@ scsi_replay () { [ -z "$HOTPLUG" ] && return 1 scsi_hosts=$(find_d /sys/devices host\*) - SEQNUM=1 for host in $scsi_hosts;do [ -d $host ] || continue devs=$(find_f $host type) for dev in $devs;do [ -f $dev ] || continue - export SEQNUM DEVPATH=${dev%/type} DEVPATH=${DEVPATH#/sys} export DEVPATH export ACTION=add $HOTPLUG scsi_device - SEQNUM=$[$SEQNUM + 1] $HOTPLUG scsi - SEQNUM=$[$SEQNUM + 1] done done return 0 diff --git a/udev.spec b/udev.spec index f88a68b..f9a0baa 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Jul 24 2005 Bill Nottingham - 063-2 +- don't set SEQNUM for scsi replay events (#163729) + * Tue Jul 19 2005 Bill Nottingham - 063-1 - update to 063 - handle the hotplug events for ieee1394, scsi, firmware From a73cdc0aeba3d86e9f96e0f28f7831230163f538 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 28 Jul 2005 11:44:53 +0000 Subject: [PATCH 075/640] changed SYMLINK= to SYMLINK+= --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f9a0baa..5338bfc 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Jul 28 2005 Harald Hoyer - 063-3 +- changed "SYMLINK=" to "SYMLINK+=" + * Sun Jul 24 2005 Bill Nottingham - 063-2 - don't set SEQNUM for scsi replay events (#163729) From 5dd903e9413f5735804c0cd953c666f6cf35d26c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 28 Jul 2005 11:44:53 +0000 Subject: [PATCH 076/640] changed SYMLINK= to SYMLINK+= --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f9a0baa..5338bfc 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Jul 28 2005 Harald Hoyer - 063-3 +- changed "SYMLINK=" to "SYMLINK+=" + * Sun Jul 24 2005 Bill Nottingham - 063-2 - don't set SEQNUM for scsi replay events (#163729) From 40a19a21df149acfa2330a5028d5d6347635d379 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Aug 2005 15:23:38 +0000 Subject: [PATCH 077/640] changed mode to 0660 for tape devices --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 5338bfc..ebf2837 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 02 2005 Harald Hoyer - 063-4 +- fixed typo for tape devices and changed mode to 0660 + * Thu Jul 28 2005 Harald Hoyer - 063-3 - changed "SYMLINK=" to "SYMLINK+=" From 09b238109ba8f0811d077b16d89f799c27ae61c8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Aug 2005 15:23:38 +0000 Subject: [PATCH 078/640] changed mode to 0660 for tape devices --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 5338bfc..ebf2837 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 02 2005 Harald Hoyer - 063-4 +- fixed typo for tape devices and changed mode to 0660 + * Thu Jul 28 2005 Harald Hoyer - 063-3 - changed "SYMLINK=" to "SYMLINK+=" From ffe870ce74f000a3da99c70da5daa36f19ff67c9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Aug 2005 16:46:33 +0000 Subject: [PATCH 079/640] fixed scsi replay --- start_udev | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/start_udev b/start_udev index 3dca02a..0532d8e 100755 --- a/start_udev +++ b/start_udev @@ -138,8 +138,7 @@ kill_udevd() { # call hotplug with the scsi devices scsi_replay () { - HOTPLUG=$(cat /proc/sys/kernel/hotplug) - [ -z "$HOTPLUG" ] && return 1 + HOTPLUG="/sbin/udevsend" scsi_hosts=$(find_d /sys/devices host\*) @@ -150,10 +149,8 @@ scsi_replay () { [ -f $dev ] || continue DEVPATH=${dev%/type} DEVPATH=${DEVPATH#/sys} - export DEVPATH - export ACTION=add - $HOTPLUG scsi_device - $HOTPLUG scsi + /bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device + /bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi done done return 0 From 5de74438c53950a97565abe304152dfa9b393768 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Aug 2005 16:46:33 +0000 Subject: [PATCH 080/640] fixed scsi replay --- start_udev | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/start_udev b/start_udev index 3dca02a..0532d8e 100755 --- a/start_udev +++ b/start_udev @@ -138,8 +138,7 @@ kill_udevd() { # call hotplug with the scsi devices scsi_replay () { - HOTPLUG=$(cat /proc/sys/kernel/hotplug) - [ -z "$HOTPLUG" ] && return 1 + HOTPLUG="/sbin/udevsend" scsi_hosts=$(find_d /sys/devices host\*) @@ -150,10 +149,8 @@ scsi_replay () { [ -f $dev ] || continue DEVPATH=${dev%/type} DEVPATH=${DEVPATH#/sys} - export DEVPATH - export ACTION=add - $HOTPLUG scsi_device - $HOTPLUG scsi + /bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device + /bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi done done return 0 From 21237992ed92d8db4e7fd91aeec8f9ddb22e872a Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 3 Aug 2005 03:01:38 +0000 Subject: [PATCH 081/640] allow pcmcia function id matching (#164665) --- udev.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index ebf2837..bbc605a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 02 2005 Bill Nottingham - 063-5 +- add rule to allow function id matching for pcmcia after loading + modules (#164665) + * Tue Aug 02 2005 Harald Hoyer - 063-4 - fixed typo for tape devices and changed mode to 0660 From b39909ba2e6626d167ca6a80ac2643c1a76f0781 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 3 Aug 2005 03:01:38 +0000 Subject: [PATCH 082/640] allow pcmcia function id matching (#164665) --- udev.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index ebf2837..bbc605a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -289,6 +289,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 02 2005 Bill Nottingham - 063-5 +- add rule to allow function id matching for pcmcia after loading + modules (#164665) + * Tue Aug 02 2005 Harald Hoyer - 063-4 - fixed typo for tape devices and changed mode to 0660 From b674ce74fa30fde60ca134d723da80170eec7aad Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 Aug 2005 09:37:29 +0000 Subject: [PATCH 083/640] *** empty log message *** --- udev.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/udev.spec b/udev.spec index bbc605a..f4a854e 100644 --- a/udev.spec +++ b/udev.spec @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 02 2005 Harald Hoyer - 063-5 +- fixed scsi hotplug replay + * Tue Aug 02 2005 Bill Nottingham - 063-5 - add rule to allow function id matching for pcmcia after loading modules (#164665) From f66253e1527c9be081a862d4004cb457d8afedd4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 Aug 2005 09:37:29 +0000 Subject: [PATCH 084/640] *** empty log message *** --- udev.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/udev.spec b/udev.spec index bbc605a..f4a854e 100644 --- a/udev.spec +++ b/udev.spec @@ -289,6 +289,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Aug 02 2005 Harald Hoyer - 063-5 +- fixed scsi hotplug replay + * Tue Aug 02 2005 Bill Nottingham - 063-5 - add rule to allow function id matching for pcmcia after loading modules (#164665) From 08abd96bc65712f113e558227465d18f5bf6cbc1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Aug 2005 09:01:10 +0000 Subject: [PATCH 085/640] fixed typo bz #138509 --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 0532d8e..5998e07 100755 --- a/start_udev +++ b/start_udev @@ -190,7 +190,7 @@ prog=udev ret=0 STRING=$"Starting $prog: " # propagate $udev_root from /sys -echo -n "$STRING " +echo -n $STRING # mount the tmpfs on ${udev_root%/}, if not already done LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { From dc2e00c475756718bbccbb4aced56af4de508215 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Aug 2005 09:01:10 +0000 Subject: [PATCH 086/640] fixed typo bz #138509 --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 0532d8e..5998e07 100755 --- a/start_udev +++ b/start_udev @@ -190,7 +190,7 @@ prog=udev ret=0 STRING=$"Starting $prog: " # propagate $udev_root from /sys -echo -n "$STRING " +echo -n $STRING # mount the tmpfs on ${udev_root%/}, if not already done LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { From f94df72a6b782b58a6d808376de93a84620bd998 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Aug 2005 15:11:43 +0000 Subject: [PATCH 087/640] compile with pie --- udev.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index f4a854e..8780109 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -98,7 +98,7 @@ mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static make clean -make \ +make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -289,6 +289,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Jul 07 2005 Harald Hoyer - 063-6 +- compile with pie .. again... (#158935) +- fixed typo in echo (#138509) + * Tue Aug 02 2005 Harald Hoyer - 063-5 - fixed scsi hotplug replay From fcfdcc0dd5660c7f301a9f3f2cccfcc21b2dc3e4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Aug 2005 15:11:43 +0000 Subject: [PATCH 088/640] compile with pie --- udev.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index f4a854e..8780109 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 063 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -98,7 +98,7 @@ mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static make clean -make \ +make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ @@ -289,6 +289,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Jul 07 2005 Harald Hoyer - 063-6 +- compile with pie .. again... (#158935) +- fixed typo in echo (#138509) + * Tue Aug 02 2005 Harald Hoyer - 063-5 - fixed scsi hotplug replay From f76388842cbb57b9ef769f1162b6a931b078e770 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Aug 2005 15:12:14 +0000 Subject: [PATCH 089/640] compile with pie --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 8780109..9887dde 100644 --- a/udev.spec +++ b/udev.spec @@ -289,7 +289,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Thu Jul 07 2005 Harald Hoyer - 063-6 +* Thu Aug 04 2005 Harald Hoyer - 063-6 - compile with pie .. again... (#158935) - fixed typo in echo (#138509) From 64130047475e7b2c3c12b8473345c4e5841eaa26 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 4 Aug 2005 15:12:14 +0000 Subject: [PATCH 090/640] compile with pie --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 8780109..9887dde 100644 --- a/udev.spec +++ b/udev.spec @@ -289,7 +289,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Thu Jul 07 2005 Harald Hoyer - 063-6 +* Thu Aug 04 2005 Harald Hoyer - 063-6 - compile with pie .. again... (#158935) - fixed typo in echo (#138509) From 208f1b3c29eb6d5c04052168b5bdbf806d878eaa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Sep 2005 11:51:46 +0000 Subject: [PATCH 091/640] - version 069 - updated rules file --- start_udev | 2 ++ udev.spec | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/start_udev b/start_udev index 5998e07..933c368 100755 --- a/start_udev +++ b/start_udev @@ -24,6 +24,8 @@ sysfs_dir=/sys +export TZ=/etc/localtime + [ -d $sysfs_dir/class ] || exit 1 [ -r /proc/mounts ] || exit 1 [ -x /sbin/udev ] || exit 1 diff --git a/udev.spec b/udev.spec index 9887dde..c5e61e4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 063 -Release: 6 +Version: 069 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,6 +39,7 @@ Source23: udevpermconv.sh Source30: firmware_helper.c Patch1: udev-062-build.patch +Patch2: udev-069-install.patch Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux @@ -75,7 +76,8 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -%patch1 -p1 -b .build +#%patch1 -p1 -b .build +%patch2 -p1 -b .mkinst %patch50 -p1 -b .tmp_dir cp %{SOURCE21} . @@ -87,6 +89,7 @@ make \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ + STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ EXTRAS="extras/scsi_id extras/ata_id \ @@ -104,9 +107,9 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ udevdir="/dev" \ USE_LOG=true \ DEBUG=%{debug} \ + STRIP="/bin/true" \ EXTRAS=" \ extras/scsi_id \ - extras/chassis_id \ extras/ata_id \ extras/usb_id \ %ifarch s390 s390x @@ -126,7 +129,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ - extras/chassis_id \ extras/ata_id \ extras/usb_id \ %ifarch s390 s390x @@ -230,7 +232,6 @@ rm -rf $RPM_BUILD_ROOT #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) /sbin/udev_run_devd %attr(0755,root,root) /sbin/udev_run_hotplugd -%attr(755,root,root) /sbin/chassis_id %attr(755,root,root) /sbin/scsi_id %attr(755,root,root) /sbin/scsi_id.static %attr(755,root,root) /sbin/ata_id @@ -244,6 +245,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo +%attr(0755,root,root) %{_sbindir}/udevmonitor + %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ @@ -289,6 +292,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 14 2005 Harald Hoyer - 069-1 +- version 069 + * Thu Aug 04 2005 Harald Hoyer - 063-6 - compile with pie .. again... (#158935) - fixed typo in echo (#138509) From 1e16a1d5b35115601d3e9c53653750b171e0558c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Sep 2005 11:51:46 +0000 Subject: [PATCH 092/640] - version 069 - updated rules file --- start_udev | 2 ++ udev.spec | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/start_udev b/start_udev index 5998e07..933c368 100755 --- a/start_udev +++ b/start_udev @@ -24,6 +24,8 @@ sysfs_dir=/sys +export TZ=/etc/localtime + [ -d $sysfs_dir/class ] || exit 1 [ -r /proc/mounts ] || exit 1 [ -x /sbin/udev ] || exit 1 diff --git a/udev.spec b/udev.spec index 9887dde..c5e61e4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 063 -Release: 6 +Version: 069 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -39,6 +39,7 @@ Source23: udevpermconv.sh Source30: firmware_helper.c Patch1: udev-062-build.patch +Patch2: udev-069-install.patch Patch50: udev-039-scsi_id-tmp_dir.patch ExclusiveOS: Linux @@ -75,7 +76,8 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -%patch1 -p1 -b .build +#%patch1 -p1 -b .build +%patch2 -p1 -b .mkinst %patch50 -p1 -b .tmp_dir cp %{SOURCE21} . @@ -87,6 +89,7 @@ make \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ + STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ EXTRAS="extras/scsi_id extras/ata_id \ @@ -104,9 +107,9 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ udevdir="/dev" \ USE_LOG=true \ DEBUG=%{debug} \ + STRIP="/bin/true" \ EXTRAS=" \ extras/scsi_id \ - extras/chassis_id \ extras/ata_id \ extras/usb_id \ %ifarch s390 s390x @@ -126,7 +129,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ - extras/chassis_id \ extras/ata_id \ extras/usb_id \ %ifarch s390 s390x @@ -230,7 +232,6 @@ rm -rf $RPM_BUILD_ROOT #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) /sbin/udev_run_devd %attr(0755,root,root) /sbin/udev_run_hotplugd -%attr(755,root,root) /sbin/chassis_id %attr(755,root,root) /sbin/scsi_id %attr(755,root,root) /sbin/scsi_id.static %attr(755,root,root) /sbin/ata_id @@ -244,6 +245,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo +%attr(0755,root,root) %{_sbindir}/udevmonitor + %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ @@ -289,6 +292,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 14 2005 Harald Hoyer - 069-1 +- version 069 + * Thu Aug 04 2005 Harald Hoyer - 063-6 - compile with pie .. again... (#158935) - fixed typo in echo (#138509) From d3bb62048180a60bb94b8d73d5de2b0b52780cc2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Sep 2005 11:53:03 +0000 Subject: [PATCH 093/640] version 069 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3e0754b..a23a728 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-063.tar.bz2 +udev-069.tar.bz2 diff --git a/sources b/sources index 120c64c..6923817 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -70c5a1c45a8df0ff1e21fa9b89486ab4 udev-063.tar.bz2 +4693092422576c258b8b068811de559c udev-069.tar.bz2 From 10981960a34690d5051606044158a1b4829a1a08 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Sep 2005 11:53:03 +0000 Subject: [PATCH 094/640] version 069 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3e0754b..a23a728 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-063.tar.bz2 +udev-069.tar.bz2 diff --git a/sources b/sources index 120c64c..6923817 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -70c5a1c45a8df0ff1e21fa9b89486ab4 udev-063.tar.bz2 +4693092422576c258b8b068811de559c udev-069.tar.bz2 From 0420d6c43ac08c803dd6130ecba7e2981699f17e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:31:07 +0000 Subject: [PATCH 095/640] own /lib/firmware (#167016) --- udev.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/udev.spec b/udev.spec index c5e61e4..f4450ef 100644 --- a/udev.spec +++ b/udev.spec @@ -187,6 +187,8 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin +install -d -m 0755 /lib/firmware + %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then /sbin/chkconfig --del udev @@ -279,6 +281,7 @@ rm -rf $RPM_BUILD_ROOT #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* @@ -292,6 +295,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 14 2005 Bill Nottingham - 069-2 +- own /lib/firmware (#167016) + * Wed Sep 14 2005 Harald Hoyer - 069-1 - version 069 From 97e8ede5727e55685472635d5cf0f438e21016da Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:31:07 +0000 Subject: [PATCH 096/640] own /lib/firmware (#167016) --- udev.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/udev.spec b/udev.spec index c5e61e4..f4450ef 100644 --- a/udev.spec +++ b/udev.spec @@ -187,6 +187,8 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin +install -d -m 0755 /lib/firmware + %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then /sbin/chkconfig --del udev @@ -279,6 +281,7 @@ rm -rf $RPM_BUILD_ROOT #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* @@ -292,6 +295,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 14 2005 Bill Nottingham - 069-2 +- own /lib/firmware (#167016) + * Wed Sep 14 2005 Harald Hoyer - 069-1 - version 069 From 8bc213fad45a869a97dbc6e8b8d8e3d3f1e4094b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:31:59 +0000 Subject: [PATCH 097/640] bump releases --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f4450ef..8668903 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} From 7c0527fe2f44e6a660e32d5d61aece194658bf74 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:31:59 +0000 Subject: [PATCH 098/640] bump releases --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f4450ef..8668903 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base %if !%{with_persistent} From 5fd2c373c693b9d83a4218c0d9e14e663fc459d0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:35:08 +0000 Subject: [PATCH 099/640] duh --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 8668903..77f1698 100644 --- a/udev.spec +++ b/udev.spec @@ -187,7 +187,7 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin -install -d -m 0755 /lib/firmware +install -d -m 0755 %RPM_BUILD_ROOT/lib/firmware %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then From b48a86514485abcb73d004803da8ff065f0567be Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:35:08 +0000 Subject: [PATCH 100/640] duh --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 8668903..77f1698 100644 --- a/udev.spec +++ b/udev.spec @@ -187,7 +187,7 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin -install -d -m 0755 /lib/firmware +install -d -m 0755 %RPM_BUILD_ROOT/lib/firmware %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then From b7f78b31edda551da0272775a58e229ab908fd8a Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:39:04 +0000 Subject: [PATCH 101/640] bad day. fix build --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 77f1698..0c31ae7 100644 --- a/udev.spec +++ b/udev.spec @@ -187,7 +187,7 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin -install -d -m 0755 %RPM_BUILD_ROOT/lib/firmware +mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then From 1d3eed8331081cd98d0d7751969ceb1bd5f67585 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 14 Sep 2005 13:39:04 +0000 Subject: [PATCH 102/640] bad day. fix build --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 77f1698..0c31ae7 100644 --- a/udev.spec +++ b/udev.spec @@ -187,7 +187,7 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin -install -d -m 0755 %RPM_BUILD_ROOT/lib/firmware +mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then From 1afddeb410e7ad13e71fd833991fe242a4bc0411 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 15 Sep 2005 12:34:55 +0000 Subject: [PATCH 103/640] fix firmware loading --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0c31ae7..da43770 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -295,6 +295,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Sep 15 2005 Bill Nottingham - 069-3 +- fix firmware loading + * Wed Sep 14 2005 Bill Nottingham - 069-2 - own /lib/firmware (#167016) From 81638c327d52af3ed0061ef4c4834f70d0b72b44 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 15 Sep 2005 12:34:55 +0000 Subject: [PATCH 104/640] fix firmware loading --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0c31ae7..da43770 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -295,6 +295,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Sep 15 2005 Bill Nottingham - 069-3 +- fix firmware loading + * Wed Sep 14 2005 Bill Nottingham - 069-2 - own /lib/firmware (#167016) From 1bfc08fe693418498b6f86a249c654a11b43fb53 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Sep 2005 07:32:10 +0000 Subject: [PATCH 105/640] readded volume_id now known as vol_id, bug #168883 --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index da43770..3f0d4a8 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -112,6 +112,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ %endif @@ -131,6 +132,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ %endif @@ -239,6 +241,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id +%attr(755,root,root) /sbin/vol_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id %endif @@ -295,6 +298,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 21 2005 Harald Hoyer - 069-4 +- readded volume_id now known as vol_id, bug #168883 + * Thu Sep 15 2005 Bill Nottingham - 069-3 - fix firmware loading From 5174c128fa79d09250e59d849de2c8933dda3bec Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Sep 2005 07:32:10 +0000 Subject: [PATCH 106/640] readded volume_id now known as vol_id, bug #168883 --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index da43770..3f0d4a8 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -112,6 +112,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ %endif @@ -131,6 +132,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ %endif @@ -239,6 +241,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id +%attr(755,root,root) /sbin/vol_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id %endif @@ -295,6 +298,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Sep 21 2005 Harald Hoyer - 069-4 +- readded volume_id now known as vol_id, bug #168883 + * Thu Sep 15 2005 Bill Nottingham - 069-3 - fix firmware loading From 24ef4a439216e85c94fade1a14de66758c31d88d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Sep 2005 10:46:26 +0000 Subject: [PATCH 107/640] added missing path_id --- udev.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 3f0d4a8..a8f0cba 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -36,6 +36,8 @@ Source22: udev.nodes Source23: udevpermconv.sh +Source24: path_id + Source30: firmware_helper.c Patch1: udev-062-build.patch @@ -177,8 +179,11 @@ install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes + + mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev +install -m 0644 %{SOURCE24} $RPM_BUILD_ROOT/sbin/path_id # floppy madness for i in 0 1 2 3;do @@ -242,6 +247,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id %attr(755,root,root) /sbin/vol_id +%attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id %endif @@ -298,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Sep 23 2005 Harald Hoyer - 069-5 +- added missing path_id + * Wed Sep 21 2005 Harald Hoyer - 069-4 - readded volume_id now known as vol_id, bug #168883 From f3564757ad5bc1a5284e635ec25e556ef9e5cc6b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Sep 2005 10:46:26 +0000 Subject: [PATCH 108/640] added missing path_id --- udev.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 3f0d4a8..a8f0cba 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -36,6 +36,8 @@ Source22: udev.nodes Source23: udevpermconv.sh +Source24: path_id + Source30: firmware_helper.c Patch1: udev-062-build.patch @@ -177,8 +179,11 @@ install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes + + mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev +install -m 0644 %{SOURCE24} $RPM_BUILD_ROOT/sbin/path_id # floppy madness for i in 0 1 2 3;do @@ -242,6 +247,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/usb_id %attr(755,root,root) /sbin/vol_id +%attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id %endif @@ -298,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Sep 23 2005 Harald Hoyer - 069-5 +- added missing path_id + * Wed Sep 21 2005 Harald Hoyer - 069-4 - readded volume_id now known as vol_id, bug #168883 From 01ec7ffda3250fec59c088c378593d3c28df6cfa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 30 Sep 2005 12:23:22 +0000 Subject: [PATCH 109/640] special handling of IEEE1394 firewire devices (bug #168093) --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index a8f0cba..56141bd 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -304,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Sep 30 2005 Harald Hoyer - 069-6 +- special handling of IEEE1394 firewire devices (bug #168093) + * Fri Sep 23 2005 Harald Hoyer - 069-5 - added missing path_id From 0131431c967d415aa37f94156a241bc876f07e31 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 30 Sep 2005 12:23:22 +0000 Subject: [PATCH 110/640] special handling of IEEE1394 firewire devices (bug #168093) --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index a8f0cba..56141bd 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -304,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Sep 30 2005 Harald Hoyer - 069-6 +- special handling of IEEE1394 firewire devices (bug #168093) + * Fri Sep 23 2005 Harald Hoyer - 069-5 - added missing path_id From cca555da48123e611a7d09481029863a522f54e3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Oct 2005 07:19:33 +0000 Subject: [PATCH 111/640] added edd_id --- udev.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 56141bd..54631af 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -94,13 +94,14 @@ make \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id extras/ata_id \ + EXTRAS="extras/scsi_id extras/ata_id extras/edd_id \ " all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static +mv extras/edd_id/edd_id extras/edd_id/edd_id.static make clean make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ @@ -114,6 +115,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/edd_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -134,6 +136,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/edd_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -159,6 +162,7 @@ install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static +install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static %if %{with_persistent} #persistent @@ -245,6 +249,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/scsi_id.static %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static +%attr(755,root,root) /sbin/edd_id +%attr(755,root,root) /sbin/edd_id.static %attr(755,root,root) /sbin/usb_id %attr(755,root,root) /sbin/vol_id %attr(755,root,root) /sbin/path_id @@ -304,6 +310,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Oct 06 2005 Harald Hoyer - 069-7 +- added edd_id + * Fri Sep 30 2005 Harald Hoyer - 069-6 - special handling of IEEE1394 firewire devices (bug #168093) From 8f9b6c9f1cdabf644a57b6e74c9b71e064d0d7a1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Oct 2005 07:19:33 +0000 Subject: [PATCH 112/640] added edd_id --- udev.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 56141bd..54631af 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -94,13 +94,14 @@ make \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id extras/ata_id \ + EXTRAS="extras/scsi_id extras/ata_id extras/edd_id \ " all mv udev udev.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static +mv extras/edd_id/edd_id extras/edd_id/edd_id.static make clean make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ @@ -114,6 +115,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/edd_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -134,6 +136,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/scsi_id \ extras/ata_id \ extras/usb_id \ + extras/edd_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -159,6 +162,7 @@ install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static +install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static %if %{with_persistent} #persistent @@ -245,6 +249,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/scsi_id.static %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/ata_id.static +%attr(755,root,root) /sbin/edd_id +%attr(755,root,root) /sbin/edd_id.static %attr(755,root,root) /sbin/usb_id %attr(755,root,root) /sbin/vol_id %attr(755,root,root) /sbin/path_id @@ -304,6 +310,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Oct 06 2005 Harald Hoyer - 069-7 +- added edd_id + * Fri Sep 30 2005 Harald Hoyer - 069-6 - special handling of IEEE1394 firewire devices (bug #168093) From f429dee409dbfc26f6fa2084b7d20ac56691a908 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 7 Oct 2005 14:40:52 +0000 Subject: [PATCH 113/640] corrected c&p edd_id rule, symlink for js devices --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 54631af..b66efa9 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -310,6 +310,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Oct 06 2005 Harald Hoyer - 069-8 +- corrected c&p edd_id rule, symlink for js devices + * Thu Oct 06 2005 Harald Hoyer - 069-7 - added edd_id From 50e08bddca13fa845b1ce2444ad6d1c4c8210ea2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 7 Oct 2005 14:40:52 +0000 Subject: [PATCH 114/640] corrected c&p edd_id rule, symlink for js devices --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 54631af..b66efa9 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -310,6 +310,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Thu Oct 06 2005 Harald Hoyer - 069-8 +- corrected c&p edd_id rule, symlink for js devices + * Thu Oct 06 2005 Harald Hoyer - 069-7 - added edd_id From 0cdda30affab2fb15a539faee126719cf03b9b2e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Oct 2005 06:41:55 +0000 Subject: [PATCH 115/640] added -lsepol --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index b66efa9..80bab90 100644 --- a/udev.spec +++ b/udev.spec @@ -43,6 +43,7 @@ Source30: firmware_helper.c Patch1: udev-062-build.patch Patch2: udev-069-install.patch Patch50: udev-039-scsi_id-tmp_dir.patch +Patch51: udev-069-sepol.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -81,6 +82,7 @@ udev-persistent enables persistent device naming with udev. #%patch1 -p1 -b .build %patch2 -p1 -b .mkinst %patch50 -p1 -b .tmp_dir +%patch51 -p1 -b .sepol cp %{SOURCE21} . @@ -310,8 +312,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Thu Oct 06 2005 Harald Hoyer - 069-8 +* Mon Oct 10 2005 Harald Hoyer - 069-8 - corrected c&p edd_id rule, symlink for js devices +- added -lsepol * Thu Oct 06 2005 Harald Hoyer - 069-7 - added edd_id From 5f9b8f914d942127dbd1ed66d51dc0987cc349fc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Oct 2005 06:41:55 +0000 Subject: [PATCH 116/640] added -lsepol --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index b66efa9..80bab90 100644 --- a/udev.spec +++ b/udev.spec @@ -43,6 +43,7 @@ Source30: firmware_helper.c Patch1: udev-062-build.patch Patch2: udev-069-install.patch Patch50: udev-039-scsi_id-tmp_dir.patch +Patch51: udev-069-sepol.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -81,6 +82,7 @@ udev-persistent enables persistent device naming with udev. #%patch1 -p1 -b .build %patch2 -p1 -b .mkinst %patch50 -p1 -b .tmp_dir +%patch51 -p1 -b .sepol cp %{SOURCE21} . @@ -310,8 +312,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Thu Oct 06 2005 Harald Hoyer - 069-8 +* Mon Oct 10 2005 Harald Hoyer - 069-8 - corrected c&p edd_id rule, symlink for js devices +- added -lsepol * Thu Oct 06 2005 Harald Hoyer - 069-7 - added edd_id From 42ba1f491b01a37b351916064d1ee01cf8fe452e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Oct 2005 08:03:06 +0000 Subject: [PATCH 117/640] added libsepol-devel BuildReq, refined persistent rules --- udev.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 80bab90..cd1ce7a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -50,7 +50,7 @@ URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Prereq: /bin/sh fileutils hotplug Prereq: MAKEDEV >= 0:3.11 -BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex +BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel Requires: libselinux >= 0:1.17.9-2 MAKEDEV Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev @@ -312,6 +312,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Oct 10 2005 Harald Hoyer - 069-9 +- added libsepol-devel BuildReq +- refined persistent rules + * Mon Oct 10 2005 Harald Hoyer - 069-8 - corrected c&p edd_id rule, symlink for js devices - added -lsepol From 8593922a5a18ec86c3ee14454ce25fa9c6f3d9ed Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Oct 2005 08:03:06 +0000 Subject: [PATCH 118/640] added libsepol-devel BuildReq, refined persistent rules --- udev.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 80bab90..cd1ce7a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -50,7 +50,7 @@ URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Prereq: /bin/sh fileutils hotplug Prereq: MAKEDEV >= 0:3.11 -BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex +BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel Requires: libselinux >= 0:1.17.9-2 MAKEDEV Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev @@ -312,6 +312,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Oct 10 2005 Harald Hoyer - 069-9 +- added libsepol-devel BuildReq +- refined persistent rules + * Mon Oct 10 2005 Harald Hoyer - 069-8 - corrected c&p edd_id rule, symlink for js devices - added -lsepol From 150d933f5d1e6e359acec2f050f14208de7aaf4e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Oct 2005 09:44:52 +0000 Subject: [PATCH 119/640] removed group usb --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cd1ce7a..a08d97c 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -312,6 +312,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Oct 10 2005 Harald Hoyer - 069-10 +- removed group usb + * Mon Oct 10 2005 Harald Hoyer - 069-9 - added libsepol-devel BuildReq - refined persistent rules From 285fc6caaa0f12cf496a23ecbd57afbac439509a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Oct 2005 09:44:52 +0000 Subject: [PATCH 120/640] removed group usb --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cd1ce7a..a08d97c 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 069 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -312,6 +312,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Oct 10 2005 Harald Hoyer - 069-10 +- removed group usb + * Mon Oct 10 2005 Harald Hoyer - 069-9 - added libsepol-devel BuildReq - refined persistent rules From 7ec47ce06c2005df052573532511729cfdd245bd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 25 Oct 2005 11:21:26 +0000 Subject: [PATCH 121/640] udev-071 --- udev.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index a08d97c..923c677 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 069 -Release: 10 +Version: 071 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -80,9 +80,9 @@ udev-persistent enables persistent device naming with udev. %setup -q #%patch1 -p1 -b .build -%patch2 -p1 -b .mkinst -%patch50 -p1 -b .tmp_dir -%patch51 -p1 -b .sepol +#%patch2 -p1 -b .mkinst +#%patch50 -p1 -b .tmp_dir +#%patch51 -p1 -b .sepol cp %{SOURCE21} . From 902abf37cfc2125a83cd468332d251cb7b7115b5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 25 Oct 2005 11:21:26 +0000 Subject: [PATCH 122/640] udev-071 --- udev.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index a08d97c..923c677 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 069 -Release: 10 +Version: 071 +Release: 1 License: GPL Group: System Environment/Base %if !%{with_persistent} @@ -80,9 +80,9 @@ udev-persistent enables persistent device naming with udev. %setup -q #%patch1 -p1 -b .build -%patch2 -p1 -b .mkinst -%patch50 -p1 -b .tmp_dir -%patch51 -p1 -b .sepol +#%patch2 -p1 -b .mkinst +#%patch50 -p1 -b .tmp_dir +#%patch51 -p1 -b .sepol cp %{SOURCE21} . From 4e926cc718cf7ea47b98ca931c62441908406e1e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 25 Oct 2005 11:24:16 +0000 Subject: [PATCH 123/640] udev-071 --- .cvsignore | 2 +- sources | 2 +- start_udev | 1 + udev.spec | 13 +++---------- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.cvsignore b/.cvsignore index a23a728..34a4df7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-069.tar.bz2 +udev-071.tar.bz2 diff --git a/sources b/sources index 6923817..895ea0d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4693092422576c258b8b068811de559c udev-069.tar.bz2 +6325fda7a6f29ef9fce3bcf73db3ad89 udev-071.tar.bz2 diff --git a/start_udev b/start_udev index 933c368..134d967 100755 --- a/start_udev +++ b/start_udev @@ -222,6 +222,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun rm -fr "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 +udevd -d scsi_replay > "$udev_root/null" 2>&1 ret=$[$ret + $?] ide_scan > "$udev_root/null" 2>&1 diff --git a/udev.spec b/udev.spec index 923c677..bab07c4 100644 --- a/udev.spec +++ b/udev.spec @@ -40,11 +40,6 @@ Source24: path_id Source30: firmware_helper.c -Patch1: udev-062-build.patch -Patch2: udev-069-install.patch -Patch50: udev-039-scsi_id-tmp_dir.patch -Patch51: udev-069-sepol.patch - ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -79,11 +74,6 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -#%patch1 -p1 -b .build -#%patch2 -p1 -b .mkinst -#%patch50 -p1 -b .tmp_dir -#%patch51 -p1 -b .sepol - cp %{SOURCE21} . %build @@ -312,6 +302,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Oct 25 2005 Harald Hoyer - 071-1 +- version 071 + * Mon Oct 10 2005 Harald Hoyer - 069-10 - removed group usb From 2a6c1dbd3f65459d0930dcc79177861c839ebc1c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 25 Oct 2005 11:24:16 +0000 Subject: [PATCH 124/640] udev-071 --- .cvsignore | 2 +- sources | 2 +- start_udev | 1 + udev.spec | 13 +++---------- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.cvsignore b/.cvsignore index a23a728..34a4df7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-069.tar.bz2 +udev-071.tar.bz2 diff --git a/sources b/sources index 6923817..895ea0d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4693092422576c258b8b068811de559c udev-069.tar.bz2 +6325fda7a6f29ef9fce3bcf73db3ad89 udev-071.tar.bz2 diff --git a/start_udev b/start_udev index 933c368..134d967 100755 --- a/start_udev +++ b/start_udev @@ -222,6 +222,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun rm -fr "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 +udevd -d scsi_replay > "$udev_root/null" 2>&1 ret=$[$ret + $?] ide_scan > "$udev_root/null" 2>&1 diff --git a/udev.spec b/udev.spec index 923c677..bab07c4 100644 --- a/udev.spec +++ b/udev.spec @@ -40,11 +40,6 @@ Source24: path_id Source30: firmware_helper.c -Patch1: udev-062-build.patch -Patch2: udev-069-install.patch -Patch50: udev-039-scsi_id-tmp_dir.patch -Patch51: udev-069-sepol.patch - ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -79,11 +74,6 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q -#%patch1 -p1 -b .build -#%patch2 -p1 -b .mkinst -#%patch50 -p1 -b .tmp_dir -#%patch51 -p1 -b .sepol - cp %{SOURCE21} . %build @@ -312,6 +302,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Oct 25 2005 Harald Hoyer - 071-1 +- version 071 + * Mon Oct 10 2005 Harald Hoyer - 069-10 - removed group usb From 79d25109ad2d499dda3a5ad08c7e7223682664d5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 11 Nov 2005 13:06:41 +0000 Subject: [PATCH 125/640] - version 075 --- sources | 1 + udev.spec | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 895ea0d..56279bf 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 6325fda7a6f29ef9fce3bcf73db3ad89 udev-071.tar.bz2 +024ce408f74b05ff6b52b4ff250359da udev-075.tar.bz2 diff --git a/udev.spec b/udev.spec index bab07c4..9516c61 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 071 +Version: 075 Release: 1 License: GPL Group: System Environment/Base @@ -40,6 +40,8 @@ Source24: path_id Source30: firmware_helper.c +Patch1: udev-075-inc.patch + ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -73,6 +75,7 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q +%patch1 -p1 -b .incl cp %{SOURCE21} . @@ -224,7 +227,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog HOWTO* RELEASE-NOTES docs/* udev.html +%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* udev.html %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -291,6 +294,9 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* +%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* %if %{with_persistent} %files -n udev-persistent @@ -302,6 +308,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Nov 11 2005 Harald Hoyer - 075-1 +- version 075 + * Tue Oct 25 2005 Harald Hoyer - 071-1 - version 071 From 24f280441e545bb72e9189872c92dc7c81360ee8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 11 Nov 2005 13:06:41 +0000 Subject: [PATCH 126/640] - version 075 --- sources | 1 + udev.spec | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 895ea0d..56279bf 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 6325fda7a6f29ef9fce3bcf73db3ad89 udev-071.tar.bz2 +024ce408f74b05ff6b52b4ff250359da udev-075.tar.bz2 diff --git a/udev.spec b/udev.spec index bab07c4..9516c61 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 071 +Version: 075 Release: 1 License: GPL Group: System Environment/Base @@ -40,6 +40,8 @@ Source24: path_id Source30: firmware_helper.c +Patch1: udev-075-inc.patch + ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -73,6 +75,7 @@ udev-persistent enables persistent device naming with udev. %prep %setup -q +%patch1 -p1 -b .incl cp %{SOURCE21} . @@ -224,7 +227,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog HOWTO* RELEASE-NOTES docs/* udev.html +%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* udev.html %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -291,6 +294,9 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* +%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* %if %{with_persistent} %files -n udev-persistent @@ -302,6 +308,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Nov 11 2005 Harald Hoyer - 075-1 +- version 075 + * Tue Oct 25 2005 Harald Hoyer - 071-1 - version 071 From 292d9e03b57d768647f61adee1af2aa91a7f9f5e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 11 Nov 2005 13:26:37 +0000 Subject: [PATCH 127/640] - version 075 --- .cvsignore | 1 + sources | 1 - udev.spec | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 34a4df7..48b216e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ udev-071.tar.bz2 +udev-075.tar.bz2 diff --git a/sources b/sources index 56279bf..bf06d44 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -6325fda7a6f29ef9fce3bcf73db3ad89 udev-071.tar.bz2 024ce408f74b05ff6b52b4ff250359da udev-075.tar.bz2 diff --git a/udev.spec b/udev.spec index 9516c61..9c3a064 100644 --- a/udev.spec +++ b/udev.spec @@ -298,6 +298,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* +%ifarch s390 s390x +%attr(0644,root,root) %{_mandir}/man8/dasd_id*.8* +%endif + %if %{with_persistent} %files -n udev-persistent %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules From 805b38527302a180da4f79968591589b172676e4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 11 Nov 2005 13:26:37 +0000 Subject: [PATCH 128/640] - version 075 --- .cvsignore | 1 + sources | 1 - udev.spec | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 34a4df7..48b216e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ udev-071.tar.bz2 +udev-075.tar.bz2 diff --git a/sources b/sources index 56279bf..bf06d44 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -6325fda7a6f29ef9fce3bcf73db3ad89 udev-071.tar.bz2 024ce408f74b05ff6b52b4ff250359da udev-075.tar.bz2 diff --git a/udev.spec b/udev.spec index 9516c61..9c3a064 100644 --- a/udev.spec +++ b/udev.spec @@ -298,6 +298,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* +%ifarch s390 s390x +%attr(0644,root,root) %{_mandir}/man8/dasd_id*.8* +%endif + %if %{with_persistent} %files -n udev-persistent %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules From dece018eebe4540bdf885fc683645824a90b71ed Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Nov 2005 17:42:04 +0000 Subject: [PATCH 129/640] - moved /etc/udev/scripts to /lib/udev - moved /etc/udev/devices to /lib/udev/devices - added new event replay for kernel >= 2.6.15 - added usb devices - renamed cpu device to cpuid (bug #161538) - changed vendor string "Onstream" to "On[sS]tream" (bug #173043) - compiled all *_id programs statically --- start_udev | 63 +++++++++++++++++++++------ udev.spec | 126 ++++++++++++++++++++++++++--------------------------- 2 files changed, 113 insertions(+), 76 deletions(-) diff --git a/start_udev b/start_udev index 134d967..d4d5746 100755 --- a/start_udev +++ b/start_udev @@ -85,15 +85,18 @@ make_extra_nodes () { fi done fi - pushd /etc/udev/devices &> "$udev_root/null" - set * - if [ "$1" != "*" ]; then - cp -ar "$@" $udev_root/ - pushd "$udev_root" &> "$udev_root/null" - [ -x /sbin/restorecon ] && /sbin/restorecon "$@" + for devdir in /etc/udev/devices /lib/udev/devices; do + [ -d "$devdir" ] || continue + pushd $devdir &> "$udev_root/null" + set * + if [ "$1" != "*" ]; then + cp -ar "$@" $udev_root/ + pushd "$udev_root" &> "$udev_root/null" + [ -x /sbin/restorecon ] && /sbin/restorecon "$@" + popd &> "$udev_root/null" + fi popd &> "$udev_root/null" - fi - popd &> "$udev_root/null" + done } # we cannot use /usr/bin/find here @@ -186,6 +189,44 @@ ide_scan() { return 0 } +event_replay () { + # generate events with the sysfs trigger + list=$(echo /sys/bus/*/devices/*/uevent) + list="$list $(echo /sys/class/*/*/uevent)" + list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)" + for i in $list; do + case "$i" in + */device/uevent) + # skip followed device symlinks + continue + ;; + */class/mem/*|*/class/tty/*) + first="$first $i" + ;; + */block/md*) + last="$last $i" + ;; + */*) + default="$default $i" + ;; + esac + done + + # trigger the sorted events + set $first $default $last + if [ $# -gt 1 ]; then + echo -e '\000' > /proc/sys/kernel/hotplug + for i in $@; do + echo "add" > "$i" + done + else + scsi_replay > "$udev_root/null" 2>&1 + ide_scan > "$udev_root/null" 2>&1 + return /sbin/udevstart + fi + return 0 +} + export ACTION=add prog=udev @@ -218,15 +259,11 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } - rm -fr "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 udevd -d -scsi_replay > "$udev_root/null" 2>&1 -ret=$[$ret + $?] -ide_scan > "$udev_root/null" 2>&1 -/sbin/udevstart +event_replay ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo diff --git a/udev.spec b/udev.spec index 9c3a064..6ca0e54 100644 --- a/udev.spec +++ b/udev.spec @@ -2,18 +2,14 @@ %define debug false -%define with_persistent 0 - Summary: A userspace implementation of devfs Name: udev Version: 075 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base -%if !%{with_persistent} Provides: udev-persistent = 0:%{version}-%{release} Obsoletes: udev-persistent < 0:030-5 -%endif Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: udev.rules Source3: udev.conf @@ -21,10 +17,6 @@ Source4: pam_console.dev Source5: MAKEDEV.dev Source10: hotplug.rules -Source13: udev.get_persistent_device_name.sh -Source14: udev.get_unique_hardware_path.sh -Source15: udev.get_unique_drive_id.sh -Source16: udev.rules.persistent Source17: check-cdrom.sh Source18: ide-media.sh @@ -60,17 +52,8 @@ Requires: pam udev is a implementation of devfs in userspace using sysfs and /sbin/hotplug. It requires a 2.6 kernel to run properly. -%if %{with_persistent} -%package -n udev-persistent -Summary: Persistent device naming with udev -Group: Utilities/System -PreReq: udev = 0:%{version}-%{release} Requires: sed -%description -n udev-persistent -udev-persistent enables persistent device naming with udev. -%endif - %define add %{nil} %prep @@ -89,14 +72,28 @@ make \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id extras/ata_id extras/edd_id \ + EXTRAS=" \ + extras/scsi_id \ + extras/ata_id \ + extras/usb_id \ + extras/edd_id \ + extras/volume_id \ +%ifarch s390 s390x + extras/dasd_id \ +%endif " all mv udev udev.static +mv udevd udevd.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static +%ifarch s390 s390x + mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static +%endif +mv extras/usb_id/usb_id extras/usb_id/usb_id.static +mv extras/volume_id/vol_id extras/volume_id/vol_id.static make clean make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ @@ -126,6 +123,15 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} +mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id +mv extras/ata_id/ata_id.static extras/ata_id/ata_id +mv extras/edd_id/edd_id.static extras/edd_id/edd_id +%ifarch s390 s390x + mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id +%endif +mv extras/usb_id/usb_id.static extras/usb_id/usb_id +mv extras/volume_id/vol_id.static extras/volume_id/vol_id + make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ @@ -144,7 +150,7 @@ 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 -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules @@ -154,27 +160,26 @@ install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.r install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static +install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static -install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static -install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static +#install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static +#install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static +#install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static +#install -m 0755 extras/dasd_id/dasd_id.static $RPM_BUILD_ROOT/sbin/dasd_id.static -%if %{with_persistent} -#persistent -install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/sbin -install -m 0755 %{SOURCE14} $RPM_BUILD_ROOT/sbin -install -m 0755 %{SOURCE15} $RPM_BUILD_ROOT/sbin -install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/49-udev-persistent.rules -#install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules -%endif -install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev -install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ + +%define udev_scriptdir /lib/udev + +mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} +install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{udev_scriptdir} install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -187,9 +192,8 @@ install -m 0644 %{SOURCE24} $RPM_BUILD_ROOT/sbin/path_id # floppy madness for i in 0 1 2 3;do mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i - ln -s ../../udev/scripts/MAKEDEV.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i/10-MAKEDEV.dev + ln -s %{udev_scriptdir}/MAKEDEV.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i/10-MAKEDEV.dev done -install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin @@ -231,6 +235,7 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static +%attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd @@ -241,16 +246,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udev_run_devd %attr(0755,root,root) /sbin/udev_run_hotplugd %attr(755,root,root) /sbin/scsi_id -%attr(755,root,root) /sbin/scsi_id.static %attr(755,root,root) /sbin/ata_id -%attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/edd_id -%attr(755,root,root) /sbin/edd_id.static %attr(755,root,root) /sbin/usb_id %attr(755,root,root) /sbin/vol_id %attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id +%attr(755,root,root) /sbin/dasd_id.static %endif %attr(755,root,root) /sbin/firmware_helper @@ -261,10 +264,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ +%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) %{_sysconfdir}/udev/scripts/pam_console.dev +%attr(0755,root,root) %{udev_scriptdir}/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default @@ -276,12 +281,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd2 %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd3 %config(missingok) %{_sysconfdir}/dev.d/fd?/* -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/MAKEDEV.dev - -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/udevpermconv.sh +%attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev +%attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh +%attr(0755,root,root) %{udev_scriptdir}/ide-media.sh +%attr(0755,root,root) %{udev_scriptdir}/dvb.sh +%attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules @@ -298,20 +302,16 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* -%ifarch s390 s390x -%attr(0644,root,root) %{_mandir}/man8/dasd_id*.8* -%endif - -%if %{with_persistent} -%files -n udev-persistent - %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules - %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh - %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh - %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh -#%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules -%endif - %changelog +* Fri Nov 11 2005 Harald Hoyer - 075-2 +- moved /etc/udev/scripts to /lib/udev +- moved /etc/udev/devices to /lib/udev/devices +- added new event replay for kernel >= 2.6.15 +- added usb devices +- renamed cpu device to cpuid (bug #161538) +- changed vendor string "Onstream" to "On[sS]tream" (bug #173043) +- compiled all *_id programs statically + * Fri Nov 11 2005 Harald Hoyer - 075-1 - version 075 From 5cc58e0e2086d402481d256f1431fc4b4a4f63e6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Nov 2005 17:42:04 +0000 Subject: [PATCH 130/640] - moved /etc/udev/scripts to /lib/udev - moved /etc/udev/devices to /lib/udev/devices - added new event replay for kernel >= 2.6.15 - added usb devices - renamed cpu device to cpuid (bug #161538) - changed vendor string "Onstream" to "On[sS]tream" (bug #173043) - compiled all *_id programs statically --- start_udev | 63 +++++++++++++++++++++------ udev.spec | 126 ++++++++++++++++++++++++++--------------------------- 2 files changed, 113 insertions(+), 76 deletions(-) diff --git a/start_udev b/start_udev index 134d967..d4d5746 100755 --- a/start_udev +++ b/start_udev @@ -85,15 +85,18 @@ make_extra_nodes () { fi done fi - pushd /etc/udev/devices &> "$udev_root/null" - set * - if [ "$1" != "*" ]; then - cp -ar "$@" $udev_root/ - pushd "$udev_root" &> "$udev_root/null" - [ -x /sbin/restorecon ] && /sbin/restorecon "$@" + for devdir in /etc/udev/devices /lib/udev/devices; do + [ -d "$devdir" ] || continue + pushd $devdir &> "$udev_root/null" + set * + if [ "$1" != "*" ]; then + cp -ar "$@" $udev_root/ + pushd "$udev_root" &> "$udev_root/null" + [ -x /sbin/restorecon ] && /sbin/restorecon "$@" + popd &> "$udev_root/null" + fi popd &> "$udev_root/null" - fi - popd &> "$udev_root/null" + done } # we cannot use /usr/bin/find here @@ -186,6 +189,44 @@ ide_scan() { return 0 } +event_replay () { + # generate events with the sysfs trigger + list=$(echo /sys/bus/*/devices/*/uevent) + list="$list $(echo /sys/class/*/*/uevent)" + list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)" + for i in $list; do + case "$i" in + */device/uevent) + # skip followed device symlinks + continue + ;; + */class/mem/*|*/class/tty/*) + first="$first $i" + ;; + */block/md*) + last="$last $i" + ;; + */*) + default="$default $i" + ;; + esac + done + + # trigger the sorted events + set $first $default $last + if [ $# -gt 1 ]; then + echo -e '\000' > /proc/sys/kernel/hotplug + for i in $@; do + echo "add" > "$i" + done + else + scsi_replay > "$udev_root/null" 2>&1 + ide_scan > "$udev_root/null" 2>&1 + return /sbin/udevstart + fi + return 0 +} + export ACTION=add prog=udev @@ -218,15 +259,11 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } - rm -fr "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 udevd -d -scsi_replay > "$udev_root/null" 2>&1 -ret=$[$ret + $?] -ide_scan > "$udev_root/null" 2>&1 -/sbin/udevstart +event_replay ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo diff --git a/udev.spec b/udev.spec index 9c3a064..6ca0e54 100644 --- a/udev.spec +++ b/udev.spec @@ -2,18 +2,14 @@ %define debug false -%define with_persistent 0 - Summary: A userspace implementation of devfs Name: udev Version: 075 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base -%if !%{with_persistent} Provides: udev-persistent = 0:%{version}-%{release} Obsoletes: udev-persistent < 0:030-5 -%endif Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: udev.rules Source3: udev.conf @@ -21,10 +17,6 @@ Source4: pam_console.dev Source5: MAKEDEV.dev Source10: hotplug.rules -Source13: udev.get_persistent_device_name.sh -Source14: udev.get_unique_hardware_path.sh -Source15: udev.get_unique_drive_id.sh -Source16: udev.rules.persistent Source17: check-cdrom.sh Source18: ide-media.sh @@ -60,17 +52,8 @@ Requires: pam udev is a implementation of devfs in userspace using sysfs and /sbin/hotplug. It requires a 2.6 kernel to run properly. -%if %{with_persistent} -%package -n udev-persistent -Summary: Persistent device naming with udev -Group: Utilities/System -PreReq: udev = 0:%{version}-%{release} Requires: sed -%description -n udev-persistent -udev-persistent enables persistent device naming with udev. -%endif - %define add %{nil} %prep @@ -89,14 +72,28 @@ make \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ - EXTRAS="extras/scsi_id extras/ata_id extras/edd_id \ + EXTRAS=" \ + extras/scsi_id \ + extras/ata_id \ + extras/usb_id \ + extras/edd_id \ + extras/volume_id \ +%ifarch s390 s390x + extras/dasd_id \ +%endif " all mv udev udev.static +mv udevd udevd.static mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static +%ifarch s390 s390x + mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static +%endif +mv extras/usb_id/usb_id extras/usb_id/usb_id.static +mv extras/volume_id/vol_id extras/volume_id/vol_id.static make clean make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ @@ -126,6 +123,15 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} +mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id +mv extras/ata_id/ata_id.static extras/ata_id/ata_id +mv extras/edd_id/edd_id.static extras/edd_id/edd_id +%ifarch s390 s390x + mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id +%endif +mv extras/usb_id/usb_id.static extras/usb_id/usb_id +mv extras/volume_id/vol_id.static extras/volume_id/vol_id + make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ extras/scsi_id \ @@ -144,7 +150,7 @@ 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 -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices,makedev.d} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules @@ -154,27 +160,26 @@ install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.r install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static +install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static -install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static -install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static +#install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static +#install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static +#install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static +#install -m 0755 extras/dasd_id/dasd_id.static $RPM_BUILD_ROOT/sbin/dasd_id.static -%if %{with_persistent} -#persistent -install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/sbin -install -m 0755 %{SOURCE14} $RPM_BUILD_ROOT/sbin -install -m 0755 %{SOURCE15} $RPM_BUILD_ROOT/sbin -install -m 0644 %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/49-udev-persistent.rules -#install -m 0644 extras/volume_id/s390-dasd.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules -%endif -install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev -install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ -install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ + +%define udev_scriptdir /lib/udev + +mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} +install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{udev_scriptdir} +install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{udev_scriptdir} install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -187,9 +192,8 @@ install -m 0644 %{SOURCE24} $RPM_BUILD_ROOT/sbin/path_id # floppy madness for i in 0 1 2 3;do mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i - ln -s ../../udev/scripts/MAKEDEV.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i/10-MAKEDEV.dev + ln -s %{udev_scriptdir}/MAKEDEV.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i/10-MAKEDEV.dev done -install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/udev/scripts/ install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin @@ -231,6 +235,7 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static +%attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd @@ -241,16 +246,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udev_run_devd %attr(0755,root,root) /sbin/udev_run_hotplugd %attr(755,root,root) /sbin/scsi_id -%attr(755,root,root) /sbin/scsi_id.static %attr(755,root,root) /sbin/ata_id -%attr(755,root,root) /sbin/ata_id.static %attr(755,root,root) /sbin/edd_id -%attr(755,root,root) /sbin/edd_id.static %attr(755,root,root) /sbin/usb_id %attr(755,root,root) /sbin/vol_id %attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id +%attr(755,root,root) /sbin/dasd_id.static %endif %attr(755,root,root) /sbin/firmware_helper @@ -261,10 +264,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/scripts/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/devices/ +%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) %{_sysconfdir}/udev/scripts/pam_console.dev +%attr(0755,root,root) %{udev_scriptdir}/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default @@ -276,12 +281,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd2 %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd3 %config(missingok) %{_sysconfdir}/dev.d/fd?/* -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/MAKEDEV.dev - -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/check-cdrom.sh -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/ide-media.sh -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/dvb.sh -%attr(0755,root,root) %{_sysconfdir}/udev/scripts/udevpermconv.sh +%attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev +%attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh +%attr(0755,root,root) %{udev_scriptdir}/ide-media.sh +%attr(0755,root,root) %{udev_scriptdir}/dvb.sh +%attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules @@ -298,20 +302,16 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* -%ifarch s390 s390x -%attr(0644,root,root) %{_mandir}/man8/dasd_id*.8* -%endif - -%if %{with_persistent} -%files -n udev-persistent - %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/49-udev-persistent.rules - %attr(0755,root,root) /sbin/udev.get_persistent_device_name.sh - %attr(0755,root,root) /sbin/udev.get_unique_hardware_path.sh - %attr(0755,root,root) /sbin/udev.get_unique_drive_id.sh -#%attr(0644,root,root) %{_sysconfdir}/udev/rules.d/52-udev-s390-persistent.rules -%endif - %changelog +* Fri Nov 11 2005 Harald Hoyer - 075-2 +- moved /etc/udev/scripts to /lib/udev +- moved /etc/udev/devices to /lib/udev/devices +- added new event replay for kernel >= 2.6.15 +- added usb devices +- renamed cpu device to cpuid (bug #161538) +- changed vendor string "Onstream" to "On[sS]tream" (bug #173043) +- compiled all *_id programs statically + * Fri Nov 11 2005 Harald Hoyer - 075-1 - version 075 From 180677a83013cfe71e4932836fccd8d8013c1a14 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 15 Nov 2005 11:16:11 +0000 Subject: [PATCH 131/640] *** empty log message *** --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index 6ca0e54..54f2151 100644 --- a/udev.spec +++ b/udev.spec @@ -253,7 +253,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id -%attr(755,root,root) /sbin/dasd_id.static %endif %attr(755,root,root) /sbin/firmware_helper From ccbb0e0820cb18fb43f54756f3423f140f39bc75 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 15 Nov 2005 11:16:11 +0000 Subject: [PATCH 132/640] *** empty log message *** --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index 6ca0e54..54f2151 100644 --- a/udev.spec +++ b/udev.spec @@ -253,7 +253,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id -%attr(755,root,root) /sbin/dasd_id.static %endif %attr(755,root,root) /sbin/firmware_helper From 9facb8e38d464efa74ba3436e477f7a67e27f645 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 15 Nov 2005 11:22:23 +0000 Subject: [PATCH 133/640] *** empty log message *** --- udev.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/udev.spec b/udev.spec index 54f2151..9ddbd9c 100644 --- a/udev.spec +++ b/udev.spec @@ -253,6 +253,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id +%attr(0644,root,root) %{_mandir}/man8/dasd_id*.8* %endif %attr(755,root,root) /sbin/firmware_helper From b2213416f92372820df69dfacae7691e2eb26739 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 15 Nov 2005 11:22:23 +0000 Subject: [PATCH 134/640] *** empty log message *** --- udev.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/udev.spec b/udev.spec index 54f2151..9ddbd9c 100644 --- a/udev.spec +++ b/udev.spec @@ -253,6 +253,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/path_id %ifarch s390 s390x %attr(755,root,root) /sbin/dasd_id +%attr(0644,root,root) %{_mandir}/man8/dasd_id*.8* %endif %attr(755,root,root) /sbin/firmware_helper From 3a22ece851dec18610b76b58cdb6121c716661b8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 21 Nov 2005 07:25:27 +0000 Subject: [PATCH 135/640] refined start_udev for old kernels --- start_udev | 11 +++++------ udev.spec | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/start_udev b/start_udev index d4d5746..d7f891d 100755 --- a/start_udev +++ b/start_udev @@ -191,9 +191,8 @@ ide_scan() { event_replay () { # generate events with the sysfs trigger - list=$(echo /sys/bus/*/devices/*/uevent) - list="$list $(echo /sys/class/*/*/uevent)" - list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)" + list="$(find_f /sys/bus uevent) $(find_f /sys/class uevent) $(find_f /sys/block uevent)" + for i in $list; do case "$i" in */device/uevent) @@ -212,9 +211,9 @@ event_replay () { esac done - # trigger the sorted events - set $first $default $last - if [ $# -gt 1 ]; then + if [ -n "$first" -o -n "$default" -o -n "$last" ]; then + # trigger the sorted events + set $first $default $last echo -e '\000' > /proc/sys/kernel/hotplug for i in $@; do echo "add" > "$i" diff --git a/udev.spec b/udev.spec index 9ddbd9c..532de04 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 075 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -303,6 +303,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Nov 18 2005 Harald Hoyer - 075-3 +- refined start_udev for old kernels + * Fri Nov 11 2005 Harald Hoyer - 075-2 - moved /etc/udev/scripts to /lib/udev - moved /etc/udev/devices to /lib/udev/devices From 62bf5c0de08cd88f0dc50c328e9b04427ef75518 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 21 Nov 2005 07:25:27 +0000 Subject: [PATCH 136/640] refined start_udev for old kernels --- start_udev | 11 +++++------ udev.spec | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/start_udev b/start_udev index d4d5746..d7f891d 100755 --- a/start_udev +++ b/start_udev @@ -191,9 +191,8 @@ ide_scan() { event_replay () { # generate events with the sysfs trigger - list=$(echo /sys/bus/*/devices/*/uevent) - list="$list $(echo /sys/class/*/*/uevent)" - list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)" + list="$(find_f /sys/bus uevent) $(find_f /sys/class uevent) $(find_f /sys/block uevent)" + for i in $list; do case "$i" in */device/uevent) @@ -212,9 +211,9 @@ event_replay () { esac done - # trigger the sorted events - set $first $default $last - if [ $# -gt 1 ]; then + if [ -n "$first" -o -n "$default" -o -n "$last" ]; then + # trigger the sorted events + set $first $default $last echo -e '\000' > /proc/sys/kernel/hotplug for i in $@; do echo "add" > "$i" diff --git a/udev.spec b/udev.spec index 9ddbd9c..532de04 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 075 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -303,6 +303,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Nov 18 2005 Harald Hoyer - 075-3 +- refined start_udev for old kernels + * Fri Nov 11 2005 Harald Hoyer - 075-2 - moved /etc/udev/scripts to /lib/udev - moved /etc/udev/devices to /lib/udev/devices From 7e8bfdbdb240541d0447f642405240755dc75a27 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 21 Nov 2005 12:04:44 +0000 Subject: [PATCH 137/640] speedup udev event replay with udevstart2 --- start_udev | 37 +---- udev.spec | 15 +- udevstart2.patch | 401 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 418 insertions(+), 35 deletions(-) create mode 100644 udevstart2.patch diff --git a/start_udev b/start_udev index d7f891d..f95bc32 100755 --- a/start_udev +++ b/start_udev @@ -190,40 +190,18 @@ ide_scan() { } event_replay () { - # generate events with the sysfs trigger - list="$(find_f /sys/bus uevent) $(find_f /sys/class uevent) $(find_f /sys/block uevent)" - - for i in $list; do - case "$i" in - */device/uevent) - # skip followed device symlinks - continue - ;; - */class/mem/*|*/class/tty/*) - first="$first $i" - ;; - */block/md*) - last="$last $i" - ;; - */*) - default="$default $i" - ;; - esac - done - - if [ -n "$first" -o -n "$default" -o -n "$last" ]; then + if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events - set $first $default $last - echo -e '\000' > /proc/sys/kernel/hotplug - for i in $@; do - echo "add" > "$i" - done + echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevstart2 + return $? else + sysctl -w kernel.hotplug="/sbin/udevsend" >/dev/null 2>&1 scsi_replay > "$udev_root/null" 2>&1 ide_scan > "$udev_root/null" 2>&1 - return /sbin/udevstart + /sbin/udevstart + return $? fi - return 0 } @@ -259,6 +237,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } rm -fr "$udev_db" +mkdir "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 udevd -d diff --git a/udev.spec b/udev.spec index 532de04..ee72af7 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 075 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -33,6 +33,7 @@ Source24: path_id Source30: firmware_helper.c Patch1: udev-075-inc.patch +Patch2: udevstart2.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -59,6 +60,7 @@ Requires: sed %prep %setup -q %patch1 -p1 -b .incl +%patch2 -p1 -b .udevstart2 cp %{SOURCE21} . @@ -85,7 +87,6 @@ make \ mv udev udev.static mv udevd udevd.static -mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static @@ -155,13 +156,12 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules # Backwards compat -install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.rules +install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static -install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static #install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static #install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static #install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static @@ -240,7 +240,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart -%attr(0755,root,root) /sbin/udevstart.static +%attr(0755,root,root) /sbin/udevstart2 %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) /sbin/udev_run_devd @@ -289,7 +289,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/hotplug.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -303,6 +303,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Nov 21 2005 Harald Hoyer - 075-4 +- speedup udev event replay with udevstart2 + * Fri Nov 18 2005 Harald Hoyer - 075-3 - refined start_udev for old kernels diff --git a/udevstart2.patch b/udevstart2.patch new file mode 100644 index 0000000..445ecf0 --- /dev/null +++ b/udevstart2.patch @@ -0,0 +1,401 @@ +--- /dev/null 2005-10-06 16:59:29.170954848 +0200 ++++ udev-075/udevstart2.c 2005-11-21 12:04:22.000000000 +0100 +@@ -0,0 +1,372 @@ ++/* ++ * udevstart.c ++ * ++ * Copyright (C) 2004 Greg Kroah-Hartman ++ * Copyright (C) 2004 Kay Sievers ++ * ++ * Quick and dirty way to populate a /dev with udev if your system ++ * does not have access to a shell. Based originally on a patch ++ * from: ++ * Harald Hoyer ++ * ++ * 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 program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "libsysfs/sysfs/libsysfs.h" ++#include "udev_libc_wrapper.h" ++#include "udev_sysfs.h" ++#include "udev.h" ++#include "udev_version.h" ++#include "logging.h" ++#include "udev_utils.h" ++#include "udev_rules.h" ++#include "list.h" ++ ++static const char *udev_log_str; ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ ++ if (priority > udev_log_priority) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++struct device { ++ struct list_head node; ++ char path[PATH_SIZE]; ++ char subsys[NAME_SIZE]; ++}; ++ ++/* sort files in lexical order */ ++static int device_list_insert(const char *path, char *subsystem, struct list_head *device_list) ++{ ++ struct device *loop_device; ++ struct device *new_device; ++ const char *devpath = &path[strlen(sysfs_path)]; ++ ++ dbg("insert: '%s'\n", devpath); ++ ++ list_for_each_entry(loop_device, device_list, node) { ++ if (strcmp(loop_device->path, devpath) > 0) { ++ break; ++ } ++ } ++ ++ new_device = malloc(sizeof(struct device)); ++ if (new_device == NULL) { ++ dbg("error malloc"); ++ return -ENOMEM; ++ } ++ ++ strlcpy(new_device->path, devpath, sizeof(new_device->path)); ++ strlcpy(new_device->subsys, subsystem, sizeof(new_device->subsys)); ++ list_add_tail(&new_device->node, &loop_device->node); ++ dbg("add '%s' from subsys '%s'", new_device->path, new_device->subsys); ++ return 0; ++} ++ ++/* list of devices that we should run last due to any one of a number of reasons */ ++static char *last_list[] = { ++ "/block/dm", /* on here because dm wants to have the block devices around before it */ ++ NULL, ++}; ++ ++/* list of devices that we should run first due to any one of a number of reasons */ ++static char *first_list[] = { ++ "/class/mem", ++ "/class/tty", ++ "/bus", ++ NULL, ++}; ++ ++static int add_device(const char *devpath, const char *subsystem) ++{ ++ 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; ++} ++ ++static void exec_list(struct list_head *device_list) ++{ ++ struct device *loop_device; ++ struct device *tmp_device; ++ int i; ++ ++ /* handle the "first" type devices first */ ++ 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) { ++ add_device(loop_device->path, loop_device->subsys); ++ list_del(&loop_device->node); ++ free(loop_device); ++ break; ++ } ++ } ++ } ++ ++ /* handle the devices we are allowed to, excluding the "last" type devices */ ++ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { ++ int found = 0; ++ for (i = 0; last_list[i] != NULL; i++) { ++ if (strncmp(loop_device->path, last_list[i], strlen(last_list[i])) == 0) { ++ found = 1; ++ break; ++ } ++ } ++ if (found) ++ continue; ++ ++ add_device(loop_device->path, loop_device->subsys); ++ list_del(&loop_device->node); ++ free(loop_device); ++ } ++ ++ /* handle the rest of the devices left over, if any */ ++ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { ++ add_device(loop_device->path, loop_device->subsys); ++ list_del(&loop_device->node); ++ free(loop_device); ++ } ++} ++ ++static int has_devt(const char *path) ++{ ++ char filename[PATH_SIZE]; ++ struct stat statbuf; ++ ++ snprintf(filename, sizeof(filename), "%s/uevent", path); ++ filename[sizeof(filename)-1] = '\0'; ++ ++ if (stat(filename, &statbuf) == 0) ++ return 1; ++ ++ return 0; ++} ++ ++static void udev_scan_block(struct list_head *device_list) ++{ ++ char base[PATH_SIZE]; ++ DIR *dir; ++ struct dirent *dent; ++ ++ snprintf(base, sizeof(base), "%s/block", 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", base, dent->d_name); ++ dirname[sizeof(dirname)-1] = '\0'; ++ if (has_devt(dirname)) ++ device_list_insert(dirname, "block", device_list); ++ else ++ continue; ++ ++ /* look for partitions */ ++ 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, "block", device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++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, dent->d_name, device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++ ++static void udev_scan_class(struct list_head *device_list) ++{ ++ char base[PATH_SIZE]; ++ DIR *dir; ++ struct dirent *dent; ++ ++ snprintf(base, sizeof(base), "%s/class", 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", 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, dent->d_name, device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++static void asmlinkage sig_handler(int signum) ++{ ++ switch (signum) { ++ case SIGALRM: ++ exit(1); ++ case SIGINT: ++ case SIGTERM: ++ exit(20 + signum); ++ } ++} ++ ++int main(int argc, char *argv[], char *envp[]) ++{ ++ LIST_HEAD(device_list); ++ struct sigaction act; ++ ++ logging_init("udevstart2"); ++ udev_init_config(); ++ dbg("version %s", UDEV_VERSION); ++ ++ udev_log_str = getenv("UDEV_LOG"); ++ ++ /* disable all logging if not explicitely requested */ ++ if (udev_log_str == NULL) ++ udev_log_priority = 0; ++ ++ /* set signal handlers */ ++ memset(&act, 0x00, sizeof(act)); ++ act.sa_handler = (void (*) (int))sig_handler; ++ sigemptyset (&act.sa_mask); ++ act.sa_flags = 0; ++ sigaction(SIGALRM, &act, NULL); ++ sigaction(SIGINT, &act, NULL); ++ sigaction(SIGTERM, &act, NULL); ++ ++ /* trigger timeout to prevent hanging processes */ ++ alarm(UDEV_ALARM_TIMEOUT); ++ ++ udev_scan_bus(&device_list); ++ udev_scan_class(&device_list); ++ udev_scan_block(&device_list); ++ exec_list(&device_list); ++ ++ logging_close(); ++ return 0; ++} +--- udev-075/Makefile.udevstart2 2005-11-10 02:20:25.000000000 +0100 ++++ udev-075/Makefile 2005-11-21 11:16:40.000000000 +0100 +@@ -54,6 +54,7 @@ + udevmonitor \ + udevinfo \ + udevtest \ ++ udevstart2 \ + udevstart + + HEADERS = \ +@@ -343,6 +344,7 @@ + $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo + $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest + $(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart ++ $(INSTALL_PROGRAM) -D udevstart2 $(DESTDIR)$(sbindir)/udevstart2 + @extras="$(EXTRAS)"; for target in $$extras; do \ + echo $$target; \ + $(MAKE) -C $$target $@; \ +@@ -360,6 +362,7 @@ + - rm -f $(DESTDIR)$(sbindir)/udevsend + - rm -f $(DESTDIR)$(sbindir)/udevcontrol + - rm -f $(DESTDIR)$(sbindir)/udevstart ++ - rm -f $(DESTDIR)$(sbindir)/udevstart2 + - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor + - rm -f $(usrbindir)/udevinfo + - rm -f $(DESTDIR)$(DESTDIR)$(usrbindir)/udevtest From 6878729651b3fb1da295c76fa8b6fceda2de664f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 21 Nov 2005 12:04:44 +0000 Subject: [PATCH 138/640] speedup udev event replay with udevstart2 --- start_udev | 37 +---- udev.spec | 15 +- udevstart2.patch | 401 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 418 insertions(+), 35 deletions(-) create mode 100644 udevstart2.patch diff --git a/start_udev b/start_udev index d7f891d..f95bc32 100755 --- a/start_udev +++ b/start_udev @@ -190,40 +190,18 @@ ide_scan() { } event_replay () { - # generate events with the sysfs trigger - list="$(find_f /sys/bus uevent) $(find_f /sys/class uevent) $(find_f /sys/block uevent)" - - for i in $list; do - case "$i" in - */device/uevent) - # skip followed device symlinks - continue - ;; - */class/mem/*|*/class/tty/*) - first="$first $i" - ;; - */block/md*) - last="$last $i" - ;; - */*) - default="$default $i" - ;; - esac - done - - if [ -n "$first" -o -n "$default" -o -n "$last" ]; then + if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events - set $first $default $last - echo -e '\000' > /proc/sys/kernel/hotplug - for i in $@; do - echo "add" > "$i" - done + echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevstart2 + return $? else + sysctl -w kernel.hotplug="/sbin/udevsend" >/dev/null 2>&1 scsi_replay > "$udev_root/null" 2>&1 ide_scan > "$udev_root/null" 2>&1 - return /sbin/udevstart + /sbin/udevstart + return $? fi - return 0 } @@ -259,6 +237,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } rm -fr "$udev_db" +mkdir "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 udevd -d diff --git a/udev.spec b/udev.spec index 532de04..ee72af7 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 075 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -33,6 +33,7 @@ Source24: path_id Source30: firmware_helper.c Patch1: udev-075-inc.patch +Patch2: udevstart2.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -59,6 +60,7 @@ Requires: sed %prep %setup -q %patch1 -p1 -b .incl +%patch2 -p1 -b .udevstart2 cp %{SOURCE21} . @@ -85,7 +87,6 @@ make \ mv udev udev.static mv udevd udevd.static -mv udevstart udevstart.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static @@ -155,13 +156,12 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules # Backwards compat -install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/hotplug.rules +install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static -install -m 0755 udevstart.static $RPM_BUILD_ROOT/sbin/udevstart.static #install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static #install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static #install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static @@ -240,7 +240,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart -%attr(0755,root,root) /sbin/udevstart.static +%attr(0755,root,root) /sbin/udevstart2 %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) /sbin/udev_run_devd @@ -289,7 +289,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/hotplug.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -303,6 +303,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Nov 21 2005 Harald Hoyer - 075-4 +- speedup udev event replay with udevstart2 + * Fri Nov 18 2005 Harald Hoyer - 075-3 - refined start_udev for old kernels diff --git a/udevstart2.patch b/udevstart2.patch new file mode 100644 index 0000000..445ecf0 --- /dev/null +++ b/udevstart2.patch @@ -0,0 +1,401 @@ +--- /dev/null 2005-10-06 16:59:29.170954848 +0200 ++++ udev-075/udevstart2.c 2005-11-21 12:04:22.000000000 +0100 +@@ -0,0 +1,372 @@ ++/* ++ * udevstart.c ++ * ++ * Copyright (C) 2004 Greg Kroah-Hartman ++ * Copyright (C) 2004 Kay Sievers ++ * ++ * Quick and dirty way to populate a /dev with udev if your system ++ * does not have access to a shell. Based originally on a patch ++ * from: ++ * Harald Hoyer ++ * ++ * 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 program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "libsysfs/sysfs/libsysfs.h" ++#include "udev_libc_wrapper.h" ++#include "udev_sysfs.h" ++#include "udev.h" ++#include "udev_version.h" ++#include "logging.h" ++#include "udev_utils.h" ++#include "udev_rules.h" ++#include "list.h" ++ ++static const char *udev_log_str; ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ ++ if (priority > udev_log_priority) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++struct device { ++ struct list_head node; ++ char path[PATH_SIZE]; ++ char subsys[NAME_SIZE]; ++}; ++ ++/* sort files in lexical order */ ++static int device_list_insert(const char *path, char *subsystem, struct list_head *device_list) ++{ ++ struct device *loop_device; ++ struct device *new_device; ++ const char *devpath = &path[strlen(sysfs_path)]; ++ ++ dbg("insert: '%s'\n", devpath); ++ ++ list_for_each_entry(loop_device, device_list, node) { ++ if (strcmp(loop_device->path, devpath) > 0) { ++ break; ++ } ++ } ++ ++ new_device = malloc(sizeof(struct device)); ++ if (new_device == NULL) { ++ dbg("error malloc"); ++ return -ENOMEM; ++ } ++ ++ strlcpy(new_device->path, devpath, sizeof(new_device->path)); ++ strlcpy(new_device->subsys, subsystem, sizeof(new_device->subsys)); ++ list_add_tail(&new_device->node, &loop_device->node); ++ dbg("add '%s' from subsys '%s'", new_device->path, new_device->subsys); ++ return 0; ++} ++ ++/* list of devices that we should run last due to any one of a number of reasons */ ++static char *last_list[] = { ++ "/block/dm", /* on here because dm wants to have the block devices around before it */ ++ NULL, ++}; ++ ++/* list of devices that we should run first due to any one of a number of reasons */ ++static char *first_list[] = { ++ "/class/mem", ++ "/class/tty", ++ "/bus", ++ NULL, ++}; ++ ++static int add_device(const char *devpath, const char *subsystem) ++{ ++ 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; ++} ++ ++static void exec_list(struct list_head *device_list) ++{ ++ struct device *loop_device; ++ struct device *tmp_device; ++ int i; ++ ++ /* handle the "first" type devices first */ ++ 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) { ++ add_device(loop_device->path, loop_device->subsys); ++ list_del(&loop_device->node); ++ free(loop_device); ++ break; ++ } ++ } ++ } ++ ++ /* handle the devices we are allowed to, excluding the "last" type devices */ ++ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { ++ int found = 0; ++ for (i = 0; last_list[i] != NULL; i++) { ++ if (strncmp(loop_device->path, last_list[i], strlen(last_list[i])) == 0) { ++ found = 1; ++ break; ++ } ++ } ++ if (found) ++ continue; ++ ++ add_device(loop_device->path, loop_device->subsys); ++ list_del(&loop_device->node); ++ free(loop_device); ++ } ++ ++ /* handle the rest of the devices left over, if any */ ++ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { ++ add_device(loop_device->path, loop_device->subsys); ++ list_del(&loop_device->node); ++ free(loop_device); ++ } ++} ++ ++static int has_devt(const char *path) ++{ ++ char filename[PATH_SIZE]; ++ struct stat statbuf; ++ ++ snprintf(filename, sizeof(filename), "%s/uevent", path); ++ filename[sizeof(filename)-1] = '\0'; ++ ++ if (stat(filename, &statbuf) == 0) ++ return 1; ++ ++ return 0; ++} ++ ++static void udev_scan_block(struct list_head *device_list) ++{ ++ char base[PATH_SIZE]; ++ DIR *dir; ++ struct dirent *dent; ++ ++ snprintf(base, sizeof(base), "%s/block", 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", base, dent->d_name); ++ dirname[sizeof(dirname)-1] = '\0'; ++ if (has_devt(dirname)) ++ device_list_insert(dirname, "block", device_list); ++ else ++ continue; ++ ++ /* look for partitions */ ++ 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, "block", device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++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, dent->d_name, device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++ ++static void udev_scan_class(struct list_head *device_list) ++{ ++ char base[PATH_SIZE]; ++ DIR *dir; ++ struct dirent *dent; ++ ++ snprintf(base, sizeof(base), "%s/class", 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", 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, dent->d_name, device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++static void asmlinkage sig_handler(int signum) ++{ ++ switch (signum) { ++ case SIGALRM: ++ exit(1); ++ case SIGINT: ++ case SIGTERM: ++ exit(20 + signum); ++ } ++} ++ ++int main(int argc, char *argv[], char *envp[]) ++{ ++ LIST_HEAD(device_list); ++ struct sigaction act; ++ ++ logging_init("udevstart2"); ++ udev_init_config(); ++ dbg("version %s", UDEV_VERSION); ++ ++ udev_log_str = getenv("UDEV_LOG"); ++ ++ /* disable all logging if not explicitely requested */ ++ if (udev_log_str == NULL) ++ udev_log_priority = 0; ++ ++ /* set signal handlers */ ++ memset(&act, 0x00, sizeof(act)); ++ act.sa_handler = (void (*) (int))sig_handler; ++ sigemptyset (&act.sa_mask); ++ act.sa_flags = 0; ++ sigaction(SIGALRM, &act, NULL); ++ sigaction(SIGINT, &act, NULL); ++ sigaction(SIGTERM, &act, NULL); ++ ++ /* trigger timeout to prevent hanging processes */ ++ alarm(UDEV_ALARM_TIMEOUT); ++ ++ udev_scan_bus(&device_list); ++ udev_scan_class(&device_list); ++ udev_scan_block(&device_list); ++ exec_list(&device_list); ++ ++ logging_close(); ++ return 0; ++} +--- udev-075/Makefile.udevstart2 2005-11-10 02:20:25.000000000 +0100 ++++ udev-075/Makefile 2005-11-21 11:16:40.000000000 +0100 +@@ -54,6 +54,7 @@ + udevmonitor \ + udevinfo \ + udevtest \ ++ udevstart2 \ + udevstart + + HEADERS = \ +@@ -343,6 +344,7 @@ + $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo + $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest + $(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart ++ $(INSTALL_PROGRAM) -D udevstart2 $(DESTDIR)$(sbindir)/udevstart2 + @extras="$(EXTRAS)"; for target in $$extras; do \ + echo $$target; \ + $(MAKE) -C $$target $@; \ +@@ -360,6 +362,7 @@ + - rm -f $(DESTDIR)$(sbindir)/udevsend + - rm -f $(DESTDIR)$(sbindir)/udevcontrol + - rm -f $(DESTDIR)$(sbindir)/udevstart ++ - rm -f $(DESTDIR)$(sbindir)/udevstart2 + - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor + - rm -f $(usrbindir)/udevinfo + - rm -f $(DESTDIR)$(DESTDIR)$(usrbindir)/udevtest From c0524fbf0725670b5e48cfbaa70e33dffa0134f6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 29 Nov 2005 13:25:51 +0000 Subject: [PATCH 139/640] version 076 --- start_udev | 2 -- udev.spec | 6 ++---- udevstart2.patch | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/start_udev b/start_udev index f95bc32..e30d1d3 100755 --- a/start_udev +++ b/start_udev @@ -236,8 +236,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } -rm -fr "$udev_db" -mkdir "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 udevd -d diff --git a/udev.spec b/udev.spec index ee72af7..4371d25 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 075 -Release: 4 +Version: 076 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -32,7 +32,6 @@ Source24: path_id Source30: firmware_helper.c -Patch1: udev-075-inc.patch Patch2: udevstart2.patch ExclusiveOS: Linux @@ -59,7 +58,6 @@ Requires: sed %prep %setup -q -%patch1 -p1 -b .incl %patch2 -p1 -b .udevstart2 cp %{SOURCE21} . diff --git a/udevstart2.patch b/udevstart2.patch index 445ecf0..fd37a39 100644 --- a/udevstart2.patch +++ b/udevstart2.patch @@ -44,7 +44,7 @@ + +#include "libsysfs/sysfs/libsysfs.h" +#include "udev_libc_wrapper.h" -+#include "udev_sysfs.h" ++/*#include "udev_sysfs.h"*/ +#include "udev.h" +#include "udev_version.h" +#include "logging.h" From 26b9ad252b6ec4fbdfe3011327b3cacc1200fccd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 29 Nov 2005 13:25:51 +0000 Subject: [PATCH 140/640] version 076 --- start_udev | 2 -- udev.spec | 6 ++---- udevstart2.patch | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/start_udev b/start_udev index f95bc32..e30d1d3 100755 --- a/start_udev +++ b/start_udev @@ -236,8 +236,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } -rm -fr "$udev_db" -mkdir "$udev_db" make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 udevd -d diff --git a/udev.spec b/udev.spec index ee72af7..4371d25 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 075 -Release: 4 +Version: 076 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -32,7 +32,6 @@ Source24: path_id Source30: firmware_helper.c -Patch1: udev-075-inc.patch Patch2: udevstart2.patch ExclusiveOS: Linux @@ -59,7 +58,6 @@ Requires: sed %prep %setup -q -%patch1 -p1 -b .incl %patch2 -p1 -b .udevstart2 cp %{SOURCE21} . diff --git a/udevstart2.patch b/udevstart2.patch index 445ecf0..fd37a39 100644 --- a/udevstart2.patch +++ b/udevstart2.patch @@ -44,7 +44,7 @@ + +#include "libsysfs/sysfs/libsysfs.h" +#include "udev_libc_wrapper.h" -+#include "udev_sysfs.h" ++/*#include "udev_sysfs.h"*/ +#include "udev.h" +#include "udev_version.h" +#include "logging.h" From d6ea1ff887483b245cc634f86a344946cf2b0990 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 6 Dec 2005 17:48:12 +0000 Subject: [PATCH 141/640] - speedup udevd with selinux by calling matchpathcon_init_prefix() - version 076 --- .cvsignore | 3 +-- sources | 2 +- udev.spec | 10 ++++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 48b216e..486e2f2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -udev-071.tar.bz2 -udev-075.tar.bz2 +udev-076.tar.bz2 diff --git a/sources b/sources index bf06d44..1a92f56 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -024ce408f74b05ff6b52b4ff250359da udev-075.tar.bz2 +9054b6e8e2b20a8e73e9a7bc7f4d67d0 udev-076.tar.bz2 diff --git a/udev.spec b/udev.spec index 4371d25..9a465b4 100644 --- a/udev.spec +++ b/udev.spec @@ -33,6 +33,7 @@ Source24: path_id Source30: firmware_helper.c Patch2: udevstart2.patch +Patch3: udev-075-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -59,6 +60,7 @@ Requires: sed %prep %setup -q %patch2 -p1 -b .udevstart2 +%patch3 -p1 -b .selinux cp %{SOURCE21} . @@ -241,8 +243,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart2 %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id -%attr(0755,root,root) /sbin/udev_run_devd -%attr(0755,root,root) /sbin/udev_run_hotplugd +%attr(0755,root,root) %{udev_scriptdir}/udev_run_devd +%attr(0755,root,root) %{udev_scriptdir}/udev_run_hotplugd %attr(755,root,root) /sbin/scsi_id %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/edd_id @@ -301,6 +303,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Dec 06 2005 Harald Hoyer - 076-1 +- speedup udevd with selinux by calling matchpathcon_init_prefix() +- version 076 + * Mon Nov 21 2005 Harald Hoyer - 075-4 - speedup udev event replay with udevstart2 From 6c25f29a81b6ffe3d2d9dcc7df4b5205a09c870a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 6 Dec 2005 17:48:12 +0000 Subject: [PATCH 142/640] - speedup udevd with selinux by calling matchpathcon_init_prefix() - version 076 --- .cvsignore | 3 +-- sources | 2 +- udev.spec | 10 ++++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 48b216e..486e2f2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -udev-071.tar.bz2 -udev-075.tar.bz2 +udev-076.tar.bz2 diff --git a/sources b/sources index bf06d44..1a92f56 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -024ce408f74b05ff6b52b4ff250359da udev-075.tar.bz2 +9054b6e8e2b20a8e73e9a7bc7f4d67d0 udev-076.tar.bz2 diff --git a/udev.spec b/udev.spec index 4371d25..9a465b4 100644 --- a/udev.spec +++ b/udev.spec @@ -33,6 +33,7 @@ Source24: path_id Source30: firmware_helper.c Patch2: udevstart2.patch +Patch3: udev-075-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -59,6 +60,7 @@ Requires: sed %prep %setup -q %patch2 -p1 -b .udevstart2 +%patch3 -p1 -b .selinux cp %{SOURCE21} . @@ -241,8 +243,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevstart2 %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id -%attr(0755,root,root) /sbin/udev_run_devd -%attr(0755,root,root) /sbin/udev_run_hotplugd +%attr(0755,root,root) %{udev_scriptdir}/udev_run_devd +%attr(0755,root,root) %{udev_scriptdir}/udev_run_hotplugd %attr(755,root,root) /sbin/scsi_id %attr(755,root,root) /sbin/ata_id %attr(755,root,root) /sbin/edd_id @@ -301,6 +303,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Dec 06 2005 Harald Hoyer - 076-1 +- speedup udevd with selinux by calling matchpathcon_init_prefix() +- version 076 + * Mon Nov 21 2005 Harald Hoyer - 075-4 - speedup udev event replay with udevstart2 From a6e26500c4c8a37b30a940bd1c2acd31a851c148 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 9 Dec 2005 22:43:40 +0000 Subject: [PATCH 143/640] gcc update bump --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 9a465b4..3e4e650 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 076 -Release: 1 +Release: 1.1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -303,6 +303,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Dec 09 2005 Jesse Keating +- rebuilt + * Tue Dec 06 2005 Harald Hoyer - 076-1 - speedup udevd with selinux by calling matchpathcon_init_prefix() - version 076 From b3e7af9c8582a8de58de9fe77dd482d4dbeed6ab Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 9 Dec 2005 22:43:40 +0000 Subject: [PATCH 144/640] gcc update bump --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 9a465b4..3e4e650 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 076 -Release: 1 +Release: 1.1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -303,6 +303,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Dec 09 2005 Jesse Keating +- rebuilt + * Tue Dec 06 2005 Harald Hoyer - 076-1 - speedup udevd with selinux by calling matchpathcon_init_prefix() - version 076 From cda5da237319dc5306229479ed5fa3d5a267c10d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Dec 2005 15:36:46 +0000 Subject: [PATCH 145/640] - version 077 - patch to include udevstart2 in udevd and delay daemonize until queue is empty --- start_udev | 4 +- udev.spec | 14 +- udevstart2.patch | 401 ----------------------------------------------- 3 files changed, 11 insertions(+), 408 deletions(-) delete mode 100644 udevstart2.patch diff --git a/start_udev b/start_udev index e30d1d3..83330c0 100755 --- a/start_udev +++ b/start_udev @@ -193,12 +193,13 @@ event_replay () { if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevstart2 + /sbin/udevd -w -d return $? else sysctl -w kernel.hotplug="/sbin/udevsend" >/dev/null 2>&1 scsi_replay > "$udev_root/null" 2>&1 ide_scan > "$udev_root/null" 2>&1 + udevd -d /sbin/udevstart return $? fi @@ -238,7 +239,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun } make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 -udevd -d event_replay ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.spec b/udev.spec index 3e4e650..9d51d36 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 076 -Release: 1.1 +Version: 077 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -32,7 +32,8 @@ Source24: path_id Source30: firmware_helper.c -Patch2: udevstart2.patch +Patch2: udev-075-daemon.patch + Patch3: udev-075-selinux.patch ExclusiveOS: Linux @@ -59,7 +60,7 @@ Requires: sed %prep %setup -q -%patch2 -p1 -b .udevstart2 +%patch2 -p1 -b .waitdaemon %patch3 -p1 -b .selinux cp %{SOURCE21} . @@ -240,7 +241,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart -%attr(0755,root,root) /sbin/udevstart2 %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) %{udev_scriptdir}/udev_run_devd @@ -303,6 +303,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Dec 13 2005 Harald Hoyer - 077-1 +- version 077 +- patch to include udevstart2 in udevd and delay daemonize until queue is empty + * Fri Dec 09 2005 Jesse Keating - rebuilt diff --git a/udevstart2.patch b/udevstart2.patch deleted file mode 100644 index fd37a39..0000000 --- a/udevstart2.patch +++ /dev/null @@ -1,401 +0,0 @@ ---- /dev/null 2005-10-06 16:59:29.170954848 +0200 -+++ udev-075/udevstart2.c 2005-11-21 12:04:22.000000000 +0100 -@@ -0,0 +1,372 @@ -+/* -+ * udevstart.c -+ * -+ * Copyright (C) 2004 Greg Kroah-Hartman -+ * Copyright (C) 2004 Kay Sievers -+ * -+ * Quick and dirty way to populate a /dev with udev if your system -+ * does not have access to a shell. Based originally on a patch -+ * from: -+ * Harald Hoyer -+ * -+ * 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 program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "libsysfs/sysfs/libsysfs.h" -+#include "udev_libc_wrapper.h" -+/*#include "udev_sysfs.h"*/ -+#include "udev.h" -+#include "udev_version.h" -+#include "logging.h" -+#include "udev_utils.h" -+#include "udev_rules.h" -+#include "list.h" -+ -+static const char *udev_log_str; -+ -+#ifdef USE_LOG -+void log_message(int priority, const char *format, ...) -+{ -+ va_list args; -+ -+ if (priority > udev_log_priority) -+ return; -+ -+ va_start(args, format); -+ vsyslog(priority, format, args); -+ va_end(args); -+} -+#endif -+ -+struct device { -+ struct list_head node; -+ char path[PATH_SIZE]; -+ char subsys[NAME_SIZE]; -+}; -+ -+/* sort files in lexical order */ -+static int device_list_insert(const char *path, char *subsystem, struct list_head *device_list) -+{ -+ struct device *loop_device; -+ struct device *new_device; -+ const char *devpath = &path[strlen(sysfs_path)]; -+ -+ dbg("insert: '%s'\n", devpath); -+ -+ list_for_each_entry(loop_device, device_list, node) { -+ if (strcmp(loop_device->path, devpath) > 0) { -+ break; -+ } -+ } -+ -+ new_device = malloc(sizeof(struct device)); -+ if (new_device == NULL) { -+ dbg("error malloc"); -+ return -ENOMEM; -+ } -+ -+ strlcpy(new_device->path, devpath, sizeof(new_device->path)); -+ strlcpy(new_device->subsys, subsystem, sizeof(new_device->subsys)); -+ list_add_tail(&new_device->node, &loop_device->node); -+ dbg("add '%s' from subsys '%s'", new_device->path, new_device->subsys); -+ return 0; -+} -+ -+/* list of devices that we should run last due to any one of a number of reasons */ -+static char *last_list[] = { -+ "/block/dm", /* on here because dm wants to have the block devices around before it */ -+ NULL, -+}; -+ -+/* list of devices that we should run first due to any one of a number of reasons */ -+static char *first_list[] = { -+ "/class/mem", -+ "/class/tty", -+ "/bus", -+ NULL, -+}; -+ -+static int add_device(const char *devpath, const char *subsystem) -+{ -+ 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; -+} -+ -+static void exec_list(struct list_head *device_list) -+{ -+ struct device *loop_device; -+ struct device *tmp_device; -+ int i; -+ -+ /* handle the "first" type devices first */ -+ 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) { -+ add_device(loop_device->path, loop_device->subsys); -+ list_del(&loop_device->node); -+ free(loop_device); -+ break; -+ } -+ } -+ } -+ -+ /* handle the devices we are allowed to, excluding the "last" type devices */ -+ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { -+ int found = 0; -+ for (i = 0; last_list[i] != NULL; i++) { -+ if (strncmp(loop_device->path, last_list[i], strlen(last_list[i])) == 0) { -+ found = 1; -+ break; -+ } -+ } -+ if (found) -+ continue; -+ -+ add_device(loop_device->path, loop_device->subsys); -+ list_del(&loop_device->node); -+ free(loop_device); -+ } -+ -+ /* handle the rest of the devices left over, if any */ -+ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { -+ add_device(loop_device->path, loop_device->subsys); -+ list_del(&loop_device->node); -+ free(loop_device); -+ } -+} -+ -+static int has_devt(const char *path) -+{ -+ char filename[PATH_SIZE]; -+ struct stat statbuf; -+ -+ snprintf(filename, sizeof(filename), "%s/uevent", path); -+ filename[sizeof(filename)-1] = '\0'; -+ -+ if (stat(filename, &statbuf) == 0) -+ return 1; -+ -+ return 0; -+} -+ -+static void udev_scan_block(struct list_head *device_list) -+{ -+ char base[PATH_SIZE]; -+ DIR *dir; -+ struct dirent *dent; -+ -+ snprintf(base, sizeof(base), "%s/block", 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", base, dent->d_name); -+ dirname[sizeof(dirname)-1] = '\0'; -+ if (has_devt(dirname)) -+ device_list_insert(dirname, "block", device_list); -+ else -+ continue; -+ -+ /* look for partitions */ -+ 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, "block", device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+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, dent->d_name, device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+ -+static void udev_scan_class(struct list_head *device_list) -+{ -+ char base[PATH_SIZE]; -+ DIR *dir; -+ struct dirent *dent; -+ -+ snprintf(base, sizeof(base), "%s/class", 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", 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, dent->d_name, device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+static void asmlinkage sig_handler(int signum) -+{ -+ switch (signum) { -+ case SIGALRM: -+ exit(1); -+ case SIGINT: -+ case SIGTERM: -+ exit(20 + signum); -+ } -+} -+ -+int main(int argc, char *argv[], char *envp[]) -+{ -+ LIST_HEAD(device_list); -+ struct sigaction act; -+ -+ logging_init("udevstart2"); -+ udev_init_config(); -+ dbg("version %s", UDEV_VERSION); -+ -+ udev_log_str = getenv("UDEV_LOG"); -+ -+ /* disable all logging if not explicitely requested */ -+ if (udev_log_str == NULL) -+ udev_log_priority = 0; -+ -+ /* set signal handlers */ -+ memset(&act, 0x00, sizeof(act)); -+ act.sa_handler = (void (*) (int))sig_handler; -+ sigemptyset (&act.sa_mask); -+ act.sa_flags = 0; -+ sigaction(SIGALRM, &act, NULL); -+ sigaction(SIGINT, &act, NULL); -+ sigaction(SIGTERM, &act, NULL); -+ -+ /* trigger timeout to prevent hanging processes */ -+ alarm(UDEV_ALARM_TIMEOUT); -+ -+ udev_scan_bus(&device_list); -+ udev_scan_class(&device_list); -+ udev_scan_block(&device_list); -+ exec_list(&device_list); -+ -+ logging_close(); -+ return 0; -+} ---- udev-075/Makefile.udevstart2 2005-11-10 02:20:25.000000000 +0100 -+++ udev-075/Makefile 2005-11-21 11:16:40.000000000 +0100 -@@ -54,6 +54,7 @@ - udevmonitor \ - udevinfo \ - udevtest \ -+ udevstart2 \ - udevstart - - HEADERS = \ -@@ -343,6 +344,7 @@ - $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo - $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest - $(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart -+ $(INSTALL_PROGRAM) -D udevstart2 $(DESTDIR)$(sbindir)/udevstart2 - @extras="$(EXTRAS)"; for target in $$extras; do \ - echo $$target; \ - $(MAKE) -C $$target $@; \ -@@ -360,6 +362,7 @@ - - rm -f $(DESTDIR)$(sbindir)/udevsend - - rm -f $(DESTDIR)$(sbindir)/udevcontrol - - rm -f $(DESTDIR)$(sbindir)/udevstart -+ - rm -f $(DESTDIR)$(sbindir)/udevstart2 - - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor - - rm -f $(usrbindir)/udevinfo - - rm -f $(DESTDIR)$(DESTDIR)$(usrbindir)/udevtest From 54b5db6c130b1ee281f2a31877dd84d6adf4595c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Dec 2005 15:36:46 +0000 Subject: [PATCH 146/640] - version 077 - patch to include udevstart2 in udevd and delay daemonize until queue is empty --- start_udev | 4 +- udev.spec | 14 +- udevstart2.patch | 401 ----------------------------------------------- 3 files changed, 11 insertions(+), 408 deletions(-) delete mode 100644 udevstart2.patch diff --git a/start_udev b/start_udev index e30d1d3..83330c0 100755 --- a/start_udev +++ b/start_udev @@ -193,12 +193,13 @@ event_replay () { if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevstart2 + /sbin/udevd -w -d return $? else sysctl -w kernel.hotplug="/sbin/udevsend" >/dev/null 2>&1 scsi_replay > "$udev_root/null" 2>&1 ide_scan > "$udev_root/null" 2>&1 + udevd -d /sbin/udevstart return $? fi @@ -238,7 +239,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun } make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 -udevd -d event_replay ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev.spec b/udev.spec index 3e4e650..9d51d36 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 076 -Release: 1.1 +Version: 077 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -32,7 +32,8 @@ Source24: path_id Source30: firmware_helper.c -Patch2: udevstart2.patch +Patch2: udev-075-daemon.patch + Patch3: udev-075-selinux.patch ExclusiveOS: Linux @@ -59,7 +60,7 @@ Requires: sed %prep %setup -q -%patch2 -p1 -b .udevstart2 +%patch2 -p1 -b .waitdaemon %patch3 -p1 -b .selinux cp %{SOURCE21} . @@ -240,7 +241,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart -%attr(0755,root,root) /sbin/udevstart2 %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) %{udev_scriptdir}/udev_run_devd @@ -303,6 +303,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Dec 13 2005 Harald Hoyer - 077-1 +- version 077 +- patch to include udevstart2 in udevd and delay daemonize until queue is empty + * Fri Dec 09 2005 Jesse Keating - rebuilt diff --git a/udevstart2.patch b/udevstart2.patch deleted file mode 100644 index fd37a39..0000000 --- a/udevstart2.patch +++ /dev/null @@ -1,401 +0,0 @@ ---- /dev/null 2005-10-06 16:59:29.170954848 +0200 -+++ udev-075/udevstart2.c 2005-11-21 12:04:22.000000000 +0100 -@@ -0,0 +1,372 @@ -+/* -+ * udevstart.c -+ * -+ * Copyright (C) 2004 Greg Kroah-Hartman -+ * Copyright (C) 2004 Kay Sievers -+ * -+ * Quick and dirty way to populate a /dev with udev if your system -+ * does not have access to a shell. Based originally on a patch -+ * from: -+ * Harald Hoyer -+ * -+ * 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 program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "libsysfs/sysfs/libsysfs.h" -+#include "udev_libc_wrapper.h" -+/*#include "udev_sysfs.h"*/ -+#include "udev.h" -+#include "udev_version.h" -+#include "logging.h" -+#include "udev_utils.h" -+#include "udev_rules.h" -+#include "list.h" -+ -+static const char *udev_log_str; -+ -+#ifdef USE_LOG -+void log_message(int priority, const char *format, ...) -+{ -+ va_list args; -+ -+ if (priority > udev_log_priority) -+ return; -+ -+ va_start(args, format); -+ vsyslog(priority, format, args); -+ va_end(args); -+} -+#endif -+ -+struct device { -+ struct list_head node; -+ char path[PATH_SIZE]; -+ char subsys[NAME_SIZE]; -+}; -+ -+/* sort files in lexical order */ -+static int device_list_insert(const char *path, char *subsystem, struct list_head *device_list) -+{ -+ struct device *loop_device; -+ struct device *new_device; -+ const char *devpath = &path[strlen(sysfs_path)]; -+ -+ dbg("insert: '%s'\n", devpath); -+ -+ list_for_each_entry(loop_device, device_list, node) { -+ if (strcmp(loop_device->path, devpath) > 0) { -+ break; -+ } -+ } -+ -+ new_device = malloc(sizeof(struct device)); -+ if (new_device == NULL) { -+ dbg("error malloc"); -+ return -ENOMEM; -+ } -+ -+ strlcpy(new_device->path, devpath, sizeof(new_device->path)); -+ strlcpy(new_device->subsys, subsystem, sizeof(new_device->subsys)); -+ list_add_tail(&new_device->node, &loop_device->node); -+ dbg("add '%s' from subsys '%s'", new_device->path, new_device->subsys); -+ return 0; -+} -+ -+/* list of devices that we should run last due to any one of a number of reasons */ -+static char *last_list[] = { -+ "/block/dm", /* on here because dm wants to have the block devices around before it */ -+ NULL, -+}; -+ -+/* list of devices that we should run first due to any one of a number of reasons */ -+static char *first_list[] = { -+ "/class/mem", -+ "/class/tty", -+ "/bus", -+ NULL, -+}; -+ -+static int add_device(const char *devpath, const char *subsystem) -+{ -+ 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; -+} -+ -+static void exec_list(struct list_head *device_list) -+{ -+ struct device *loop_device; -+ struct device *tmp_device; -+ int i; -+ -+ /* handle the "first" type devices first */ -+ 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) { -+ add_device(loop_device->path, loop_device->subsys); -+ list_del(&loop_device->node); -+ free(loop_device); -+ break; -+ } -+ } -+ } -+ -+ /* handle the devices we are allowed to, excluding the "last" type devices */ -+ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { -+ int found = 0; -+ for (i = 0; last_list[i] != NULL; i++) { -+ if (strncmp(loop_device->path, last_list[i], strlen(last_list[i])) == 0) { -+ found = 1; -+ break; -+ } -+ } -+ if (found) -+ continue; -+ -+ add_device(loop_device->path, loop_device->subsys); -+ list_del(&loop_device->node); -+ free(loop_device); -+ } -+ -+ /* handle the rest of the devices left over, if any */ -+ list_for_each_entry_safe(loop_device, tmp_device, device_list, node) { -+ add_device(loop_device->path, loop_device->subsys); -+ list_del(&loop_device->node); -+ free(loop_device); -+ } -+} -+ -+static int has_devt(const char *path) -+{ -+ char filename[PATH_SIZE]; -+ struct stat statbuf; -+ -+ snprintf(filename, sizeof(filename), "%s/uevent", path); -+ filename[sizeof(filename)-1] = '\0'; -+ -+ if (stat(filename, &statbuf) == 0) -+ return 1; -+ -+ return 0; -+} -+ -+static void udev_scan_block(struct list_head *device_list) -+{ -+ char base[PATH_SIZE]; -+ DIR *dir; -+ struct dirent *dent; -+ -+ snprintf(base, sizeof(base), "%s/block", 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", base, dent->d_name); -+ dirname[sizeof(dirname)-1] = '\0'; -+ if (has_devt(dirname)) -+ device_list_insert(dirname, "block", device_list); -+ else -+ continue; -+ -+ /* look for partitions */ -+ 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, "block", device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+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, dent->d_name, device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+ -+static void udev_scan_class(struct list_head *device_list) -+{ -+ char base[PATH_SIZE]; -+ DIR *dir; -+ struct dirent *dent; -+ -+ snprintf(base, sizeof(base), "%s/class", 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", 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, dent->d_name, device_list); -+ } -+ closedir(dir2); -+ } -+ } -+ closedir(dir); -+ } -+} -+ -+static void asmlinkage sig_handler(int signum) -+{ -+ switch (signum) { -+ case SIGALRM: -+ exit(1); -+ case SIGINT: -+ case SIGTERM: -+ exit(20 + signum); -+ } -+} -+ -+int main(int argc, char *argv[], char *envp[]) -+{ -+ LIST_HEAD(device_list); -+ struct sigaction act; -+ -+ logging_init("udevstart2"); -+ udev_init_config(); -+ dbg("version %s", UDEV_VERSION); -+ -+ udev_log_str = getenv("UDEV_LOG"); -+ -+ /* disable all logging if not explicitely requested */ -+ if (udev_log_str == NULL) -+ udev_log_priority = 0; -+ -+ /* set signal handlers */ -+ memset(&act, 0x00, sizeof(act)); -+ act.sa_handler = (void (*) (int))sig_handler; -+ sigemptyset (&act.sa_mask); -+ act.sa_flags = 0; -+ sigaction(SIGALRM, &act, NULL); -+ sigaction(SIGINT, &act, NULL); -+ sigaction(SIGTERM, &act, NULL); -+ -+ /* trigger timeout to prevent hanging processes */ -+ alarm(UDEV_ALARM_TIMEOUT); -+ -+ udev_scan_bus(&device_list); -+ udev_scan_class(&device_list); -+ udev_scan_block(&device_list); -+ exec_list(&device_list); -+ -+ logging_close(); -+ return 0; -+} ---- udev-075/Makefile.udevstart2 2005-11-10 02:20:25.000000000 +0100 -+++ udev-075/Makefile 2005-11-21 11:16:40.000000000 +0100 -@@ -54,6 +54,7 @@ - udevmonitor \ - udevinfo \ - udevtest \ -+ udevstart2 \ - udevstart - - HEADERS = \ -@@ -343,6 +344,7 @@ - $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo - $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest - $(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart -+ $(INSTALL_PROGRAM) -D udevstart2 $(DESTDIR)$(sbindir)/udevstart2 - @extras="$(EXTRAS)"; for target in $$extras; do \ - echo $$target; \ - $(MAKE) -C $$target $@; \ -@@ -360,6 +362,7 @@ - - rm -f $(DESTDIR)$(sbindir)/udevsend - - rm -f $(DESTDIR)$(sbindir)/udevcontrol - - rm -f $(DESTDIR)$(sbindir)/udevstart -+ - rm -f $(DESTDIR)$(sbindir)/udevstart2 - - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor - - rm -f $(usrbindir)/udevinfo - - rm -f $(DESTDIR)$(DESTDIR)$(usrbindir)/udevtest From f0328a5793387d9666735b1ac04886985ed3c0e1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Dec 2005 15:38:10 +0000 Subject: [PATCH 147/640] version 077 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 486e2f2..4c3d494 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-076.tar.bz2 +udev-077.tar.bz2 diff --git a/sources b/sources index 1a92f56..f597d24 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9054b6e8e2b20a8e73e9a7bc7f4d67d0 udev-076.tar.bz2 +61ec646daf7795e9777e8f33975408fe udev-077.tar.bz2 From 7af6ec89ac8056be5464742ba7a4c96ab3b118cd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Dec 2005 15:38:10 +0000 Subject: [PATCH 148/640] version 077 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 486e2f2..4c3d494 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-076.tar.bz2 +udev-077.tar.bz2 diff --git a/sources b/sources index 1a92f56..f597d24 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9054b6e8e2b20a8e73e9a7bc7f4d67d0 udev-076.tar.bz2 +61ec646daf7795e9777e8f33975408fe udev-077.tar.bz2 From b088d50d80ccd6acf231663b51cbc27bedda2bdf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 15 Dec 2005 11:46:52 +0000 Subject: [PATCH 149/640] - switched back to udevstart and use active /dev/.udev/queue waiting in start_udev - removed support for old kernels - refined some udev.rules --- start_udev | 46 ++++++++++++++++++++++++++++++---------------- udev.spec | 16 +++++++++++----- 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/start_udev b/start_udev index 83330c0..122df95 100755 --- a/start_udev +++ b/start_udev @@ -189,22 +189,22 @@ ide_scan() { return 0 } -event_replay () { - if [ -f "/sys/class/tty/console/uevent" ]; then - # trigger the sorted events - echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevd -w -d - return $? - else - sysctl -w kernel.hotplug="/sbin/udevsend" >/dev/null 2>&1 - scsi_replay > "$udev_root/null" 2>&1 - ide_scan > "$udev_root/null" 2>&1 - udevd -d - /sbin/udevstart - return $? - fi -} +wait_for_queue() { + loop=20 + while test ! -d /dev/.udev/queue; do + usleep 100000; + test "$loop" -gt 0 || return 1 + loop=$(($loop - 1)) + done + loop=200 + while test -d /dev/.udev/queue; do + usleep 100000; + test "$loop" -gt 0 || return 1 + loop=$(($loop - 1)) + done + return 0 +} export ACTION=add prog=udev @@ -239,7 +239,21 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun } make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 -event_replay +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 + $?] + /sbin/udevstart + ret=$[$ret + $?] + wait_for_queue + ret=$[$ret + $?] +else + echo -n " kernel too old for this udev version " + /sbin/udevd -d + ret=10 +fi + ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo diff --git a/udev.spec b/udev.spec index 9d51d36..23b72e5 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 077 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -32,7 +32,7 @@ Source24: path_id Source30: firmware_helper.c -Patch2: udev-075-daemon.patch +Patch2: udevstart2.patch Patch3: udev-075-selinux.patch @@ -51,8 +51,8 @@ BuildRequires: pam-devel glib2-devel bison Requires: pam %description -udev is a implementation of devfs in userspace using sysfs and -/sbin/hotplug. It requires a 2.6 kernel to run properly. +The udev package contains an implementation of devfs in +userspace using sysfs and netlink. Requires: sed @@ -60,7 +60,7 @@ Requires: sed %prep %setup -q -%patch2 -p1 -b .waitdaemon +%patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux cp %{SOURCE21} . @@ -303,6 +303,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Dec 15 2005 Harald Hoyer - 077-2 +- switched back to udevstart and use active /dev/.udev/queue waiting + in start_udev +- removed support for old kernels +- refined some udev.rules + * Mon Dec 13 2005 Harald Hoyer - 077-1 - version 077 - patch to include udevstart2 in udevd and delay daemonize until queue is empty From 5b946d5c2321b7055cbbe86bf45894c3fb73f92b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 15 Dec 2005 11:46:52 +0000 Subject: [PATCH 150/640] - switched back to udevstart and use active /dev/.udev/queue waiting in start_udev - removed support for old kernels - refined some udev.rules --- start_udev | 46 ++++++++++++++++++++++++++++++---------------- udev.spec | 16 +++++++++++----- 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/start_udev b/start_udev index 83330c0..122df95 100755 --- a/start_udev +++ b/start_udev @@ -189,22 +189,22 @@ ide_scan() { return 0 } -event_replay () { - if [ -f "/sys/class/tty/console/uevent" ]; then - # trigger the sorted events - echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevd -w -d - return $? - else - sysctl -w kernel.hotplug="/sbin/udevsend" >/dev/null 2>&1 - scsi_replay > "$udev_root/null" 2>&1 - ide_scan > "$udev_root/null" 2>&1 - udevd -d - /sbin/udevstart - return $? - fi -} +wait_for_queue() { + loop=20 + while test ! -d /dev/.udev/queue; do + usleep 100000; + test "$loop" -gt 0 || return 1 + loop=$(($loop - 1)) + done + loop=200 + while test -d /dev/.udev/queue; do + usleep 100000; + test "$loop" -gt 0 || return 1 + loop=$(($loop - 1)) + done + return 0 +} export ACTION=add prog=udev @@ -239,7 +239,21 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun } make_extra_nodes kill_udevd > "$udev_root/null" 2>&1 -event_replay +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 + $?] + /sbin/udevstart + ret=$[$ret + $?] + wait_for_queue + ret=$[$ret + $?] +else + echo -n " kernel too old for this udev version " + /sbin/udevd -d + ret=10 +fi + ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo diff --git a/udev.spec b/udev.spec index 9d51d36..23b72e5 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 077 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -32,7 +32,7 @@ Source24: path_id Source30: firmware_helper.c -Patch2: udev-075-daemon.patch +Patch2: udevstart2.patch Patch3: udev-075-selinux.patch @@ -51,8 +51,8 @@ BuildRequires: pam-devel glib2-devel bison Requires: pam %description -udev is a implementation of devfs in userspace using sysfs and -/sbin/hotplug. It requires a 2.6 kernel to run properly. +The udev package contains an implementation of devfs in +userspace using sysfs and netlink. Requires: sed @@ -60,7 +60,7 @@ Requires: sed %prep %setup -q -%patch2 -p1 -b .waitdaemon +%patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux cp %{SOURCE21} . @@ -303,6 +303,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Dec 15 2005 Harald Hoyer - 077-2 +- switched back to udevstart and use active /dev/.udev/queue waiting + in start_udev +- removed support for old kernels +- refined some udev.rules + * Mon Dec 13 2005 Harald Hoyer - 077-1 - version 077 - patch to include udevstart2 in udevd and delay daemonize until queue is empty From 9f3db1c82d885ff52595a7a82db1a6dd83bc2762 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 15 Dec 2005 11:47:26 +0000 Subject: [PATCH 151/640] *** empty log message *** --- udevstart2.patch | 198 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 udevstart2.patch diff --git a/udevstart2.patch b/udevstart2.patch new file mode 100644 index 0000000..d2b05d1 --- /dev/null +++ b/udevstart2.patch @@ -0,0 +1,198 @@ +--- udev-077/udevstart.c.udevstart2 2005-12-04 03:01:48.000000000 +0100 ++++ udev-077/udevstart.c 2005-12-15 11:15:37.000000000 +0100 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include "libsysfs/sysfs/libsysfs.h" + #include "udev_libc_wrapper.h" +@@ -47,9 +48,7 @@ + #include "udev_rules.h" + #include "list.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, ...) +@@ -109,71 +108,27 @@ + static char *first_list[] = { + "/class/mem", + "/class/tty", ++ "/bus", + NULL, + }; + + static int add_device(const char *devpath, const char *subsystem) + { +- struct udevice udev; +- struct sysfs_class_device *class_dev; +- char path[PATH_SIZE]; +- +- /* clear and set environment for next event */ +- clearenv(); +- setenv("ACTION", "add", 1); +- setenv("DEVPATH", devpath, 1); +- setenv("SUBSYSTEM", subsystem, 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); +- dbg("add '%s'", devpath); +- +- snprintf(path, sizeof(path), "%s%s", sysfs_path, devpath); +- path[sizeof(path)-1] = '\0'; +- class_dev = sysfs_open_class_device_path(path); +- if (class_dev == NULL) { +- dbg("sysfs_open_class_device_path failed"); +- return -1; +- } +- +- udev_init_device(&udev, &class_dev->path[strlen(sysfs_path)], subsystem, "add"); +- udev.devt = get_devt(class_dev); +- if (!udev.devt && udev.type != DEV_NET) { +- dbg("sysfs_open_class_device_path failed"); +- return -1; +- } +- udev_rules_get_name(&rules, &udev, class_dev); +- if (udev.ignore_device) { +- dbg("device event will be ignored"); +- goto exit; +- } +- if (udev.name[0] == '\0') { +- dbg("device node creation supressed"); +- goto run; +- } ++ char filename[PATH_SIZE]; ++ int fd; + +- udev_add_device(&udev, class_dev); +- if (udev.devname[0] != '\0') +- setenv("DEVNAME", udev.devname, 1); +-run: +- if (udev_run && !list_empty(&udev.run_list)) { +- 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:")], devpath, "add"); +- else +- run_program(name_loop->name, udev.subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); +- } +- } +-exit: +- sysfs_close_class_device(class_dev); +- udev_cleanup_device(&udev); ++ snprintf(filename, sizeof(filename), "%s/%s/uevent", sysfs_path, devpath); ++ filename[sizeof(filename)-1] = '\0'; + +- return 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; + } + + static void exec_list(struct list_head *device_list) +@@ -224,7 +179,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) +@@ -281,6 +236,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, dent->d_name, device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++ + static void udev_scan_class(struct list_head *device_list) + { + char base[PATH_SIZE]; +@@ -314,7 +313,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, dent->d_name, device_list); + } + closedir(dir2); +@@ -344,7 +343,6 @@ + udev_init_config(); + dbg("version %s", UDEV_VERSION); + +- udev_run_str = getenv("UDEV_RUN"); + udev_log_str = getenv("UDEV_LOG"); + + /* disable all logging if not explicitely requested */ +@@ -363,13 +361,11 @@ + /* trigger timeout to prevent hanging processes */ + alarm(UDEV_ALARM_TIMEOUT); + +- 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_close(&rules); + logging_close(); + return 0; + } From ba918a836b4f65356009d3c35917950205661420 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 15 Dec 2005 11:47:26 +0000 Subject: [PATCH 152/640] *** empty log message *** --- udevstart2.patch | 198 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 udevstart2.patch diff --git a/udevstart2.patch b/udevstart2.patch new file mode 100644 index 0000000..d2b05d1 --- /dev/null +++ b/udevstart2.patch @@ -0,0 +1,198 @@ +--- udev-077/udevstart.c.udevstart2 2005-12-04 03:01:48.000000000 +0100 ++++ udev-077/udevstart.c 2005-12-15 11:15:37.000000000 +0100 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include "libsysfs/sysfs/libsysfs.h" + #include "udev_libc_wrapper.h" +@@ -47,9 +48,7 @@ + #include "udev_rules.h" + #include "list.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, ...) +@@ -109,71 +108,27 @@ + static char *first_list[] = { + "/class/mem", + "/class/tty", ++ "/bus", + NULL, + }; + + static int add_device(const char *devpath, const char *subsystem) + { +- struct udevice udev; +- struct sysfs_class_device *class_dev; +- char path[PATH_SIZE]; +- +- /* clear and set environment for next event */ +- clearenv(); +- setenv("ACTION", "add", 1); +- setenv("DEVPATH", devpath, 1); +- setenv("SUBSYSTEM", subsystem, 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); +- dbg("add '%s'", devpath); +- +- snprintf(path, sizeof(path), "%s%s", sysfs_path, devpath); +- path[sizeof(path)-1] = '\0'; +- class_dev = sysfs_open_class_device_path(path); +- if (class_dev == NULL) { +- dbg("sysfs_open_class_device_path failed"); +- return -1; +- } +- +- udev_init_device(&udev, &class_dev->path[strlen(sysfs_path)], subsystem, "add"); +- udev.devt = get_devt(class_dev); +- if (!udev.devt && udev.type != DEV_NET) { +- dbg("sysfs_open_class_device_path failed"); +- return -1; +- } +- udev_rules_get_name(&rules, &udev, class_dev); +- if (udev.ignore_device) { +- dbg("device event will be ignored"); +- goto exit; +- } +- if (udev.name[0] == '\0') { +- dbg("device node creation supressed"); +- goto run; +- } ++ char filename[PATH_SIZE]; ++ int fd; + +- udev_add_device(&udev, class_dev); +- if (udev.devname[0] != '\0') +- setenv("DEVNAME", udev.devname, 1); +-run: +- if (udev_run && !list_empty(&udev.run_list)) { +- 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:")], devpath, "add"); +- else +- run_program(name_loop->name, udev.subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); +- } +- } +-exit: +- sysfs_close_class_device(class_dev); +- udev_cleanup_device(&udev); ++ snprintf(filename, sizeof(filename), "%s/%s/uevent", sysfs_path, devpath); ++ filename[sizeof(filename)-1] = '\0'; + +- return 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; + } + + static void exec_list(struct list_head *device_list) +@@ -224,7 +179,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) +@@ -281,6 +236,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, dent->d_name, device_list); ++ } ++ closedir(dir2); ++ } ++ } ++ closedir(dir); ++ } ++} ++ ++ + static void udev_scan_class(struct list_head *device_list) + { + char base[PATH_SIZE]; +@@ -314,7 +313,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, dent->d_name, device_list); + } + closedir(dir2); +@@ -344,7 +343,6 @@ + udev_init_config(); + dbg("version %s", UDEV_VERSION); + +- udev_run_str = getenv("UDEV_RUN"); + udev_log_str = getenv("UDEV_LOG"); + + /* disable all logging if not explicitely requested */ +@@ -363,13 +361,11 @@ + /* trigger timeout to prevent hanging processes */ + alarm(UDEV_ALARM_TIMEOUT); + +- 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_close(&rules); + logging_close(); + return 0; + } From ac0575b898cb4236b1fd93c11281630490562aba Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Dec 2005 11:36:19 +0000 Subject: [PATCH 153/640] version 078 --- .cvsignore | 2 +- sources | 2 +- start_udev | 1 + udev.spec | 75 +++++++++++++++++++----------------------------- udevstart2.patch | 38 +++++++++++++----------- 5 files changed, 53 insertions(+), 65 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4c3d494..c69d66d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-077.tar.bz2 +udev-078.tar.bz2 diff --git a/sources b/sources index f597d24..8c39d60 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61ec646daf7795e9777e8f33975408fe udev-077.tar.bz2 +afdacc5f3e6ced2923479b37da41fd0b udev-078.tar.bz2 diff --git a/start_udev b/start_udev index 122df95..968e81b 100755 --- a/start_udev +++ b/start_udev @@ -30,6 +30,7 @@ export TZ=/etc/localtime [ -r /proc/mounts ] || exit 1 [ -x /sbin/udev ] || exit 1 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf +udev_root=${udev_root-/dev} . /etc/init.d/functions diff --git a/udev.spec b/udev.spec index 23b72e5..f98b1c1 100644 --- a/udev.spec +++ b/udev.spec @@ -4,36 +4,21 @@ Summary: A userspace implementation of devfs Name: udev -Version: 077 -Release: 2 +Version: 078 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Source1: udev.rules -Source3: udev.conf -Source4: pam_console.dev -Source5: MAKEDEV.dev -Source10: hotplug.rules +Source1: start_udev +Source2: udev.nodes -Source17: check-cdrom.sh -Source18: ide-media.sh -Source19: dvb.sh - -Source20: start_udev -Source21: udev.html -Source22: udev.nodes - -Source23: udevpermconv.sh - -Source24: path_id - -Source30: firmware_helper.c +Source10: firmware_helper.c +Patch1: udev-078-redhat.patch Patch2: udevstart2.patch - Patch3: udev-075-selinux.patch ExclusiveOS: Linux @@ -60,11 +45,10 @@ Requires: sed %prep %setup -q +%patch1 -p1 -b .redhat %patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux -cp %{SOURCE21} . - %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) @@ -118,7 +102,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " #extras/volume_id -%{__cc} %{optflags} -o firmware_helper %{SOURCE30} +%{__cc} %{optflags} -o firmware_helper %{SOURCE10} %install rm -rf $RPM_BUILD_ROOT @@ -145,6 +129,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/dasd_id \ %endif extras/run_directory \ + extras/floppy \ " @@ -155,41 +140,33 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} -install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules +install -m 0644 etc/udev/redhat/udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules # Backwards compat -install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules +install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules -install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf +install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static -#install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -#install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static -#install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static -#install -m 0755 extras/dasd_id/dasd_id.static $RPM_BUILD_ROOT/sbin/dasd_id.static - - -ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev %define udev_scriptdir /lib/udev mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes +install -m 0644 extras/run_directory/dev.d/default/pam_console.dev $RPM_BUILD_ROOT%{udev_scriptdir} +ln -s %{udev_scriptdir}/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev +for i in load_floppy_modules.sh check-cdrom.sh ide-media.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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev -install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev -install -m 0644 %{SOURCE24} $RPM_BUILD_ROOT/sbin/path_id - +install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev +install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id +install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev # floppy madness for i in 0 1 2 3;do mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i @@ -232,7 +209,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* udev.html +%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -284,8 +261,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev %attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh %attr(0755,root,root) %{udev_scriptdir}/ide-media.sh -%attr(0755,root,root) %{udev_scriptdir}/dvb.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh +%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices +%attr(0755,root,root) %{udev_scriptdir}/load_floppy_modules.sh + %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules @@ -303,6 +282,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Dec 21 2005 Harald Hoyer - 078-1 +- version 078 +- fixed symlink to pam_console.dev + * Thu Dec 15 2005 Harald Hoyer - 077-2 - switched back to udevstart and use active /dev/.udev/queue waiting in start_udev diff --git a/udevstart2.patch b/udevstart2.patch index d2b05d1..788f0e3 100644 --- a/udevstart2.patch +++ b/udevstart2.patch @@ -1,5 +1,5 @@ ---- udev-077/udevstart.c.udevstart2 2005-12-04 03:01:48.000000000 +0100 -+++ udev-077/udevstart.c 2005-12-15 11:15:37.000000000 +0100 +--- udev-078/udevstart.c.udevstart2 2005-12-17 16:40:29.000000000 +0100 ++++ udev-078/udevstart.c 2005-12-21 10:57:18.000000000 +0100 @@ -37,6 +37,7 @@ #include #include @@ -18,14 +18,15 @@ #ifdef USE_LOG void log_message(int priority, const char *format, ...) -@@ -109,71 +108,27 @@ +@@ -109,71 +108,29 @@ static char *first_list[] = { "/class/mem", "/class/tty", + "/bus", NULL, }; - +- ++ static int add_device(const char *devpath, const char *subsystem) { - struct udevice udev; @@ -67,12 +68,8 @@ - dbg("device node creation supressed"); - goto run; - } -+ char filename[PATH_SIZE]; -+ int fd; - +- - udev_add_device(&udev, class_dev); -- if (udev.devname[0] != '\0') -- setenv("DEVNAME", udev.devname, 1); -run: - if (udev_run && !list_empty(&udev.run_list)) { - struct name_entry *name_loop; @@ -88,10 +85,14 @@ -exit: - sysfs_close_class_device(class_dev); - udev_cleanup_device(&udev); +- +- return 0; ++ char filename[PATH_SIZE]; ++ int fd; ++ + snprintf(filename, sizeof(filename), "%s/%s/uevent", sysfs_path, devpath); + filename[sizeof(filename)-1] = '\0'; - -- return 0; ++ + dbg("Trigger %s", filename); + fd = open(filename, O_WRONLY); + if (fd > 0) { @@ -102,9 +103,12 @@ + + return 0; } - +- ++ static void exec_list(struct list_head *device_list) -@@ -224,7 +179,7 @@ + { + struct device *loop_device; +@@ -222,7 +179,7 @@ char filename[PATH_SIZE]; struct stat statbuf; @@ -113,7 +117,7 @@ filename[sizeof(filename)-1] = '\0'; if (stat(filename, &statbuf) == 0) -@@ -281,6 +236,50 @@ +@@ -279,6 +236,50 @@ } } @@ -164,7 +168,7 @@ static void udev_scan_class(struct list_head *device_list) { char base[PATH_SIZE]; -@@ -314,7 +313,7 @@ +@@ -312,7 +313,7 @@ snprintf(dirname2, sizeof(dirname2), "%s/%s", dirname, dent2->d_name); dirname2[sizeof(dirname2)-1] = '\0'; @@ -173,7 +177,7 @@ device_list_insert(dirname2, dent->d_name, device_list); } closedir(dir2); -@@ -344,7 +343,6 @@ +@@ -342,7 +343,6 @@ udev_init_config(); dbg("version %s", UDEV_VERSION); @@ -181,7 +185,7 @@ udev_log_str = getenv("UDEV_LOG"); /* disable all logging if not explicitely requested */ -@@ -363,13 +361,11 @@ +@@ -361,13 +361,11 @@ /* trigger timeout to prevent hanging processes */ alarm(UDEV_ALARM_TIMEOUT); From b2c48e51e13c24c9581ad48b52a84c3d7fbf6522 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Dec 2005 11:36:19 +0000 Subject: [PATCH 154/640] version 078 --- .cvsignore | 2 +- sources | 2 +- start_udev | 1 + udev.spec | 75 +++++++++++++++++++----------------------------- udevstart2.patch | 38 +++++++++++++----------- 5 files changed, 53 insertions(+), 65 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4c3d494..c69d66d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-077.tar.bz2 +udev-078.tar.bz2 diff --git a/sources b/sources index f597d24..8c39d60 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61ec646daf7795e9777e8f33975408fe udev-077.tar.bz2 +afdacc5f3e6ced2923479b37da41fd0b udev-078.tar.bz2 diff --git a/start_udev b/start_udev index 122df95..968e81b 100755 --- a/start_udev +++ b/start_udev @@ -30,6 +30,7 @@ export TZ=/etc/localtime [ -r /proc/mounts ] || exit 1 [ -x /sbin/udev ] || exit 1 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf +udev_root=${udev_root-/dev} . /etc/init.d/functions diff --git a/udev.spec b/udev.spec index 23b72e5..f98b1c1 100644 --- a/udev.spec +++ b/udev.spec @@ -4,36 +4,21 @@ Summary: A userspace implementation of devfs Name: udev -Version: 077 -Release: 2 +Version: 078 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Source1: udev.rules -Source3: udev.conf -Source4: pam_console.dev -Source5: MAKEDEV.dev -Source10: hotplug.rules +Source1: start_udev +Source2: udev.nodes -Source17: check-cdrom.sh -Source18: ide-media.sh -Source19: dvb.sh - -Source20: start_udev -Source21: udev.html -Source22: udev.nodes - -Source23: udevpermconv.sh - -Source24: path_id - -Source30: firmware_helper.c +Source10: firmware_helper.c +Patch1: udev-078-redhat.patch Patch2: udevstart2.patch - Patch3: udev-075-selinux.patch ExclusiveOS: Linux @@ -60,11 +45,10 @@ Requires: sed %prep %setup -q +%patch1 -p1 -b .redhat %patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux -cp %{SOURCE21} . - %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) @@ -118,7 +102,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " #extras/volume_id -%{__cc} %{optflags} -o firmware_helper %{SOURCE30} +%{__cc} %{optflags} -o firmware_helper %{SOURCE10} %install rm -rf $RPM_BUILD_ROOT @@ -145,6 +129,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/dasd_id \ %endif extras/run_directory \ + extras/floppy \ " @@ -155,41 +140,33 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} -install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules +install -m 0644 etc/udev/redhat/udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules # Backwards compat -install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules +install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules -install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf +install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static -#install -m 0755 extras/scsi_id/scsi_id.static $RPM_BUILD_ROOT/sbin/scsi_id.static -#install -m 0755 extras/ata_id/ata_id.static $RPM_BUILD_ROOT/sbin/ata_id.static -#install -m 0755 extras/edd_id/edd_id.static $RPM_BUILD_ROOT/sbin/edd_id.static -#install -m 0755 extras/dasd_id/dasd_id.static $RPM_BUILD_ROOT/sbin/dasd_id.static - - -ln -s ../../udev/scripts/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev %define udev_scriptdir /lib/udev mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE17} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE18} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE19} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{udev_scriptdir} -install -m 0755 %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes +install -m 0644 extras/run_directory/dev.d/default/pam_console.dev $RPM_BUILD_ROOT%{udev_scriptdir} +ln -s %{udev_scriptdir}/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev +for i in load_floppy_modules.sh check-cdrom.sh ide-media.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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev -install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/sbin/start_udev -install -m 0644 %{SOURCE24} $RPM_BUILD_ROOT/sbin/path_id - +install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev +install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id +install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev # floppy madness for i in 0 1 2 3;do mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i @@ -232,7 +209,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* udev.html +%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udev.static @@ -284,8 +261,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev %attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh %attr(0755,root,root) %{udev_scriptdir}/ide-media.sh -%attr(0755,root,root) %{udev_scriptdir}/dvb.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh +%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices +%attr(0755,root,root) %{udev_scriptdir}/load_floppy_modules.sh + %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules @@ -303,6 +282,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Dec 21 2005 Harald Hoyer - 078-1 +- version 078 +- fixed symlink to pam_console.dev + * Thu Dec 15 2005 Harald Hoyer - 077-2 - switched back to udevstart and use active /dev/.udev/queue waiting in start_udev diff --git a/udevstart2.patch b/udevstart2.patch index d2b05d1..788f0e3 100644 --- a/udevstart2.patch +++ b/udevstart2.patch @@ -1,5 +1,5 @@ ---- udev-077/udevstart.c.udevstart2 2005-12-04 03:01:48.000000000 +0100 -+++ udev-077/udevstart.c 2005-12-15 11:15:37.000000000 +0100 +--- udev-078/udevstart.c.udevstart2 2005-12-17 16:40:29.000000000 +0100 ++++ udev-078/udevstart.c 2005-12-21 10:57:18.000000000 +0100 @@ -37,6 +37,7 @@ #include #include @@ -18,14 +18,15 @@ #ifdef USE_LOG void log_message(int priority, const char *format, ...) -@@ -109,71 +108,27 @@ +@@ -109,71 +108,29 @@ static char *first_list[] = { "/class/mem", "/class/tty", + "/bus", NULL, }; - +- ++ static int add_device(const char *devpath, const char *subsystem) { - struct udevice udev; @@ -67,12 +68,8 @@ - dbg("device node creation supressed"); - goto run; - } -+ char filename[PATH_SIZE]; -+ int fd; - +- - udev_add_device(&udev, class_dev); -- if (udev.devname[0] != '\0') -- setenv("DEVNAME", udev.devname, 1); -run: - if (udev_run && !list_empty(&udev.run_list)) { - struct name_entry *name_loop; @@ -88,10 +85,14 @@ -exit: - sysfs_close_class_device(class_dev); - udev_cleanup_device(&udev); +- +- return 0; ++ char filename[PATH_SIZE]; ++ int fd; ++ + snprintf(filename, sizeof(filename), "%s/%s/uevent", sysfs_path, devpath); + filename[sizeof(filename)-1] = '\0'; - -- return 0; ++ + dbg("Trigger %s", filename); + fd = open(filename, O_WRONLY); + if (fd > 0) { @@ -102,9 +103,12 @@ + + return 0; } - +- ++ static void exec_list(struct list_head *device_list) -@@ -224,7 +179,7 @@ + { + struct device *loop_device; +@@ -222,7 +179,7 @@ char filename[PATH_SIZE]; struct stat statbuf; @@ -113,7 +117,7 @@ filename[sizeof(filename)-1] = '\0'; if (stat(filename, &statbuf) == 0) -@@ -281,6 +236,50 @@ +@@ -279,6 +236,50 @@ } } @@ -164,7 +168,7 @@ static void udev_scan_class(struct list_head *device_list) { char base[PATH_SIZE]; -@@ -314,7 +313,7 @@ +@@ -312,7 +313,7 @@ snprintf(dirname2, sizeof(dirname2), "%s/%s", dirname, dent2->d_name); dirname2[sizeof(dirname2)-1] = '\0'; @@ -173,7 +177,7 @@ device_list_insert(dirname2, dent->d_name, device_list); } closedir(dir2); -@@ -344,7 +343,6 @@ +@@ -342,7 +343,6 @@ udev_init_config(); dbg("version %s", UDEV_VERSION); @@ -181,7 +185,7 @@ udev_log_str = getenv("UDEV_LOG"); /* disable all logging if not explicitely requested */ -@@ -363,13 +361,11 @@ +@@ -361,13 +361,11 @@ /* trigger timeout to prevent hanging processes */ alarm(UDEV_ALARM_TIMEOUT); From edb32338e657f644a182e45709c5bcae829bc4f4 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 21 Dec 2005 22:43:32 +0000 Subject: [PATCH 155/640] greylist usb/firewire controllers in udevstart --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f98b1c1..6da6aac 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -20,6 +20,7 @@ Source10: firmware_helper.c Patch1: udev-078-redhat.patch Patch2: udevstart2.patch Patch3: udev-075-selinux.patch +Patch4: udev-078-udevstart-greylist.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -48,6 +49,7 @@ Requires: sed %patch1 -p1 -b .redhat %patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux +%patch4 -p1 -b .greylist %build @@ -282,6 +284,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Dec 21 2005 Bill Nottingham - 078-2 +- udevstart change: allow greylisting of certain modaliases (usb, firewire) + * Wed Dec 21 2005 Harald Hoyer - 078-1 - version 078 - fixed symlink to pam_console.dev From 4963a5abc644b1ea08b33804e30a70306372b4c6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 21 Dec 2005 22:43:32 +0000 Subject: [PATCH 156/640] greylist usb/firewire controllers in udevstart --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f98b1c1..6da6aac 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -20,6 +20,7 @@ Source10: firmware_helper.c Patch1: udev-078-redhat.patch Patch2: udevstart2.patch Patch3: udev-075-selinux.patch +Patch4: udev-078-udevstart-greylist.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -48,6 +49,7 @@ Requires: sed %patch1 -p1 -b .redhat %patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux +%patch4 -p1 -b .greylist %build @@ -282,6 +284,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Dec 21 2005 Bill Nottingham - 078-2 +- udevstart change: allow greylisting of certain modaliases (usb, firewire) + * Wed Dec 21 2005 Harald Hoyer - 078-1 - version 078 - fixed symlink to pam_console.dev From ec15aa35005a28397b40666a865331c9067f67f8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Dec 2005 12:41:33 +0000 Subject: [PATCH 157/640] - fixed floppy module loading - added monitor socket - fixed typo in dvb rule --- udev.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/udev.spec b/udev.spec index 6da6aac..f7a64f4 100644 --- a/udev.spec +++ b/udev.spec @@ -168,14 +168,9 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id -install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev -# floppy madness -for i in 0 1 2 3;do - mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i - ln -s %{udev_scriptdir}/MAKEDEV.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i/10-MAKEDEV.dev -done - install -m 0755 firmware_helper $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/lib/firmware @@ -284,6 +279,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Dec 23 2005 Harald Hoyer - 078-3 +- fixed floppy module loading +- added monitor socket +- fixed typo in dvb rule + * Wed Dec 21 2005 Bill Nottingham - 078-2 - udevstart change: allow greylisting of certain modaliases (usb, firewire) From 25b1a2f2ccad2e6a95c1187805c02dd9c0383f23 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Dec 2005 12:41:33 +0000 Subject: [PATCH 158/640] - fixed floppy module loading - added monitor socket - fixed typo in dvb rule --- udev.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/udev.spec b/udev.spec index 6da6aac..f7a64f4 100644 --- a/udev.spec +++ b/udev.spec @@ -168,14 +168,9 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id -install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev -# floppy madness -for i in 0 1 2 3;do - mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i - ln -s %{udev_scriptdir}/MAKEDEV.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/fd$i/10-MAKEDEV.dev -done - install -m 0755 firmware_helper $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/lib/firmware @@ -284,6 +279,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Dec 23 2005 Harald Hoyer - 078-3 +- fixed floppy module loading +- added monitor socket +- fixed typo in dvb rule + * Wed Dec 21 2005 Bill Nottingham - 078-2 - udevstart change: allow greylisting of certain modaliases (usb, firewire) From cae4d5634d3bbe5dd4a84e9b6cfb991c08c937a3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Dec 2005 12:42:02 +0000 Subject: [PATCH 159/640] *** empty log message *** --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f7a64f4..7c4f954 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} From a6a2d82126baa3eb417363925e68885e7dd1bf74 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Dec 2005 12:42:02 +0000 Subject: [PATCH 160/640] *** empty log message *** --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f7a64f4..7c4f954 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} From 8732912db7a1f9cd6e8b57fd7e9ccabc26167094 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Dec 2005 12:48:26 +0000 Subject: [PATCH 161/640] *** empty log message *** --- udev.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/udev.spec b/udev.spec index 7c4f954..1534cef 100644 --- a/udev.spec +++ b/udev.spec @@ -245,16 +245,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{udev_scriptdir}/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev - %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default - -# floppy madness %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd0 -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd1 -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd2 -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd3 -%config(missingok) %{_sysconfdir}/dev.d/fd?/* %attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev %attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh %attr(0755,root,root) %{udev_scriptdir}/ide-media.sh From 069e790657464e82a1e858eeeec4f14798ec3d43 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Dec 2005 12:48:26 +0000 Subject: [PATCH 162/640] *** empty log message *** --- udev.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/udev.spec b/udev.spec index 7c4f954..1534cef 100644 --- a/udev.spec +++ b/udev.spec @@ -245,16 +245,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ %attr(0755,root,root) %{udev_scriptdir}/pam_console.dev %config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev - %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/default - -# floppy madness %attr(0755,root,root) %dir %{_sysconfdir}/dev.d/ -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd0 -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd1 -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd2 -%attr(0755,root,root) %dir %{_sysconfdir}/dev.d/fd3 -%config(missingok) %{_sysconfdir}/dev.d/fd?/* %attr(0755,root,root) %{udev_scriptdir}/MAKEDEV.dev %attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh %attr(0755,root,root) %{udev_scriptdir}/ide-media.sh From ad3a3fa5242edfbb5f6442266cc225d57d0a35ad Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 11 Jan 2006 12:11:24 +0000 Subject: [PATCH 163/640] - removed group "video" from the rules - fixed specfile - load nvram, floppy, parport and lp modules in /etc/sysconfig/modules/udev-stw.modules until there is a better solution - fixed more floppy module loading --- start_udev | 82 ------------------------------------------------------ udev.nodes | 4 --- udev.spec | 36 ++++++++++++++++-------- 3 files changed, 25 insertions(+), 97 deletions(-) diff --git a/start_udev b/start_udev index 968e81b..5c4979e 100755 --- a/start_udev +++ b/start_udev @@ -100,40 +100,6 @@ make_extra_nodes () { done } -# we cannot use /usr/bin/find here -find_d () { - where=$1 - what=$2 - found="" - for f in $where/*; do - if [ -d "$f" -a ! -L "$f" ]; then - if [ "$f" != "${f%%$what}" ];then - # make sure we are at the path end - # we have no dirname and basename - rest="${f#*$what}" - [ "${rest##*/}" = "$rest" ] && found="$found $f" - fi - found="$found $(find_d $f $what)" - fi - done - echo "$found" -} - -# we cannot use /usr/bin/find here -find_f () { - where=$1 - what=$2 - found="" - for f in $where/*; do - if [ -d "$f" -a ! -L "$f" ]; then - found="$found $(find_f $f $what)" - elif [ -e "$f" ]; then - [ "$where/" = "${f%$what}" ] && found="$found $f" - fi - done - [ -n "$found" ] && echo "$found" -} - kill_udevd() { if [ -x /sbin/pidof ]; then pid=`/sbin/pidof -x udevd` @@ -142,54 +108,6 @@ kill_udevd() { } -# call hotplug with the scsi devices -scsi_replay () { - HOTPLUG="/sbin/udevsend" - - scsi_hosts=$(find_d /sys/devices host\*) - - for host in $scsi_hosts;do - [ -d $host ] || continue - devs=$(find_f $host type) - for dev in $devs;do - [ -f $dev ] || continue - DEVPATH=${dev%/type} - DEVPATH=${DEVPATH#/sys} - /bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device - /bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi - done - done - return 0 -} - -ide_scan() { - if [ ! -d /proc/ide ]; then - return 1 - fi - for i in /proc/ide/*/media; do - read media < "$i" - case "$media" in - disk) - module=ide-disk - ;; - cdrom) - module=ide-cd - ;; - tape) - module=ide-tape - ;; - floppy) - module=ide-floppy - ;; - *) - module=ide-generic - ;; - esac - /sbin/modprobe $module - done - return 0 -} - wait_for_queue() { loop=20 while test ! -d /dev/.udev/queue; do diff --git a/udev.nodes b/udev.nodes index 7f01785..c374fad 100644 --- a/udev.nodes +++ b/udev.nodes @@ -13,10 +13,6 @@ loop4 loop5 loop6 loop7 -lp0 -lp1 -lp2 -lp3 parport0 parport1 parport2 diff --git a/udev.spec b/udev.spec index 1534cef..661c05a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -28,22 +28,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Prereq: /bin/sh fileutils hotplug Prereq: MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel -Requires: libselinux >= 0:1.17.9-2 MAKEDEV +BuildRequires: pam-devel glib2-devel bison +Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev Provides: dev = 0:3.12-1 -BuildRequires: pam-devel glib2-devel bison -Requires: pam - %description The udev package contains an implementation of devfs in userspace using sysfs and netlink. -Requires: sed - -%define add %{nil} - %prep %setup -q %patch1 -p1 -b .redhat @@ -159,7 +153,7 @@ mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} install -m 0644 extras/run_directory/dev.d/default/pam_console.dev $RPM_BUILD_ROOT%{udev_scriptdir} ln -s %{udev_scriptdir}/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev -for i in load_floppy_modules.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do +for i in load_floppy_module.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done @@ -174,6 +168,16 @@ install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdi mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware +# 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 +done +EOF + + %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then /sbin/chkconfig --del udev @@ -252,7 +256,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/ide-media.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices -%attr(0755,root,root) %{udev_scriptdir}/load_floppy_modules.sh +%attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf @@ -263,6 +267,8 @@ rm -rf $RPM_BUILD_ROOT #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%config %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules + %dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* @@ -271,6 +277,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Jan 11 2006 Harald Hoyer - 078-4 +- removed group "video" from the rules +- fixed specfile +- load nvram, floppy, parport and lp modules in + /etc/sysconfig/modules/udev-stw.modules until there + is a better solution +- fixed more floppy module loading + * Fri Dec 23 2005 Harald Hoyer - 078-3 - fixed floppy module loading - added monitor socket From bdceeec2ea67f3d83acc85d28baeb3d6c4cb62e8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 11 Jan 2006 12:11:24 +0000 Subject: [PATCH 164/640] - removed group "video" from the rules - fixed specfile - load nvram, floppy, parport and lp modules in /etc/sysconfig/modules/udev-stw.modules until there is a better solution - fixed more floppy module loading --- start_udev | 82 ------------------------------------------------------ udev.nodes | 4 --- udev.spec | 36 ++++++++++++++++-------- 3 files changed, 25 insertions(+), 97 deletions(-) diff --git a/start_udev b/start_udev index 968e81b..5c4979e 100755 --- a/start_udev +++ b/start_udev @@ -100,40 +100,6 @@ make_extra_nodes () { done } -# we cannot use /usr/bin/find here -find_d () { - where=$1 - what=$2 - found="" - for f in $where/*; do - if [ -d "$f" -a ! -L "$f" ]; then - if [ "$f" != "${f%%$what}" ];then - # make sure we are at the path end - # we have no dirname and basename - rest="${f#*$what}" - [ "${rest##*/}" = "$rest" ] && found="$found $f" - fi - found="$found $(find_d $f $what)" - fi - done - echo "$found" -} - -# we cannot use /usr/bin/find here -find_f () { - where=$1 - what=$2 - found="" - for f in $where/*; do - if [ -d "$f" -a ! -L "$f" ]; then - found="$found $(find_f $f $what)" - elif [ -e "$f" ]; then - [ "$where/" = "${f%$what}" ] && found="$found $f" - fi - done - [ -n "$found" ] && echo "$found" -} - kill_udevd() { if [ -x /sbin/pidof ]; then pid=`/sbin/pidof -x udevd` @@ -142,54 +108,6 @@ kill_udevd() { } -# call hotplug with the scsi devices -scsi_replay () { - HOTPLUG="/sbin/udevsend" - - scsi_hosts=$(find_d /sys/devices host\*) - - for host in $scsi_hosts;do - [ -d $host ] || continue - devs=$(find_f $host type) - for dev in $devs;do - [ -f $dev ] || continue - DEVPATH=${dev%/type} - DEVPATH=${DEVPATH#/sys} - /bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device - /bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi - done - done - return 0 -} - -ide_scan() { - if [ ! -d /proc/ide ]; then - return 1 - fi - for i in /proc/ide/*/media; do - read media < "$i" - case "$media" in - disk) - module=ide-disk - ;; - cdrom) - module=ide-cd - ;; - tape) - module=ide-tape - ;; - floppy) - module=ide-floppy - ;; - *) - module=ide-generic - ;; - esac - /sbin/modprobe $module - done - return 0 -} - wait_for_queue() { loop=20 while test ! -d /dev/.udev/queue; do diff --git a/udev.nodes b/udev.nodes index 7f01785..c374fad 100644 --- a/udev.nodes +++ b/udev.nodes @@ -13,10 +13,6 @@ loop4 loop5 loop6 loop7 -lp0 -lp1 -lp2 -lp3 parport0 parport1 parport2 diff --git a/udev.spec b/udev.spec index 1534cef..661c05a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -28,22 +28,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Prereq: /bin/sh fileutils hotplug Prereq: MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel -Requires: libselinux >= 0:1.17.9-2 MAKEDEV +BuildRequires: pam-devel glib2-devel bison +Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev Provides: dev = 0:3.12-1 -BuildRequires: pam-devel glib2-devel bison -Requires: pam - %description The udev package contains an implementation of devfs in userspace using sysfs and netlink. -Requires: sed - -%define add %{nil} - %prep %setup -q %patch1 -p1 -b .redhat @@ -159,7 +153,7 @@ mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} install -m 0644 extras/run_directory/dev.d/default/pam_console.dev $RPM_BUILD_ROOT%{udev_scriptdir} ln -s %{udev_scriptdir}/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev -for i in load_floppy_modules.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do +for i in load_floppy_module.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done @@ -174,6 +168,16 @@ install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdi mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware +# 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 +done +EOF + + %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then /sbin/chkconfig --del udev @@ -252,7 +256,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/ide-media.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices -%attr(0755,root,root) %{udev_scriptdir}/load_floppy_modules.sh +%attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf @@ -263,6 +267,8 @@ rm -rf $RPM_BUILD_ROOT #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%config %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules + %dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* @@ -271,6 +277,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Jan 11 2006 Harald Hoyer - 078-4 +- removed group "video" from the rules +- fixed specfile +- load nvram, floppy, parport and lp modules in + /etc/sysconfig/modules/udev-stw.modules until there + is a better solution +- fixed more floppy module loading + * Fri Dec 23 2005 Harald Hoyer - 078-3 - fixed floppy module loading - added monitor socket From 30e9fb1b99de1b210b98f1afc2b92494457c398e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Sun, 22 Jan 2006 18:47:58 +0000 Subject: [PATCH 165/640] - Drop udev dependency (#178621). --- udev.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 661c05a..6921e2a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,7 +25,7 @@ Patch4: udev-078-udevstart-greylist.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Prereq: /bin/sh fileutils hotplug +Prereq: /bin/sh fileutils Prereq: MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: pam-devel glib2-devel bison @@ -277,6 +277,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Sun Jan 22 2006 Kristian Høgsberg 078-5 +- Drop udev dependency (#178621). + * Tue Jan 11 2006 Harald Hoyer - 078-4 - removed group "video" from the rules - fixed specfile From 986dcaeed00ac20db650743e5fcb9c5adcc022f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Sun, 22 Jan 2006 18:47:58 +0000 Subject: [PATCH 166/640] - Drop udev dependency (#178621). --- udev.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 661c05a..6921e2a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,7 +25,7 @@ Patch4: udev-078-udevstart-greylist.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Prereq: /bin/sh fileutils hotplug +Prereq: /bin/sh fileutils Prereq: MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: pam-devel glib2-devel bison @@ -277,6 +277,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Sun Jan 22 2006 Kristian Høgsberg 078-5 +- Drop udev dependency (#178621). + * Tue Jan 11 2006 Harald Hoyer - 078-4 - removed group "video" from the rules - fixed specfile From 8a99a76aa0ae3697ccc435516e845ac76935a7db Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 23 Jan 2006 10:38:21 +0000 Subject: [PATCH 167/640] - added some WAIT_FOR_SYSFS rules - removed warning message, if udev_db is not available --- udev.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/udev.spec b/udev.spec index 6921e2a..42d126a 100644 --- a/udev.spec +++ b/udev.spec @@ -21,6 +21,7 @@ Patch1: udev-078-redhat.patch Patch2: udevstart2.patch Patch3: udev-075-selinux.patch Patch4: udev-078-udevstart-greylist.patch +Patch5: udev-078-nodberr.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -44,6 +45,7 @@ userspace using sysfs and netlink. %patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux %patch4 -p1 -b .greylist +%patch5 -p1 -b .nodberr %build @@ -188,6 +190,7 @@ exit 0 if [ "$1" -ge "1" -a -x /sbin/pidof ]; then pid=`/sbin/pidof -x udevd` [ -n "$pid" ] && kill $pid + /sbin/udevd -d fi exit 0 @@ -277,6 +280,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Jan 23 2006 Harald Hoyer - 078-5 +- added some WAIT_FOR_SYSFS rules +- removed warning message, if udev_db is not available + * Sun Jan 22 2006 Kristian Høgsberg 078-5 - Drop udev dependency (#178621). From d6fb46868672a2f8cc9e58c4ebc355f9eb68a67e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 23 Jan 2006 10:38:21 +0000 Subject: [PATCH 168/640] - added some WAIT_FOR_SYSFS rules - removed warning message, if udev_db is not available --- udev.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/udev.spec b/udev.spec index 6921e2a..42d126a 100644 --- a/udev.spec +++ b/udev.spec @@ -21,6 +21,7 @@ Patch1: udev-078-redhat.patch Patch2: udevstart2.patch Patch3: udev-075-selinux.patch Patch4: udev-078-udevstart-greylist.patch +Patch5: udev-078-nodberr.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -44,6 +45,7 @@ userspace using sysfs and netlink. %patch2 -p1 -b .udevstart2 %patch3 -p1 -b .selinux %patch4 -p1 -b .greylist +%patch5 -p1 -b .nodberr %build @@ -188,6 +190,7 @@ exit 0 if [ "$1" -ge "1" -a -x /sbin/pidof ]; then pid=`/sbin/pidof -x udevd` [ -n "$pid" ] && kill $pid + /sbin/udevd -d fi exit 0 @@ -277,6 +280,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Jan 23 2006 Harald Hoyer - 078-5 +- added some WAIT_FOR_SYSFS rules +- removed warning message, if udev_db is not available + * Sun Jan 22 2006 Kristian Høgsberg 078-5 - Drop udev dependency (#178621). From 91b0730d35c4b192fb9a36b929c1613ffdfbabbc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 23 Jan 2006 10:39:02 +0000 Subject: [PATCH 169/640] *** empty log message *** --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 42d126a..adbca41 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -280,7 +280,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Mon Jan 23 2006 Harald Hoyer - 078-5 +* Mon Jan 23 2006 Harald Hoyer - 078-6 - added some WAIT_FOR_SYSFS rules - removed warning message, if udev_db is not available From 05e9aae4f8e7759a91824a54aebcb376912d4c44 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 23 Jan 2006 10:39:02 +0000 Subject: [PATCH 170/640] *** empty log message *** --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 42d126a..adbca41 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -280,7 +280,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Mon Jan 23 2006 Harald Hoyer - 078-5 +* Mon Jan 23 2006 Harald Hoyer - 078-6 - added some WAIT_FOR_SYSFS rules - removed warning message, if udev_db is not available From 6caf5e02738bf0be0e3ae0beee69f35132878180 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 24 Jan 2006 12:37:12 +0000 Subject: [PATCH 171/640] - put WAIT_FOR_SYSFS rules in 05-udev-early.rules --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index adbca41..8d3d318 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -138,6 +138,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} +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/udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules # Backwards compat install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules @@ -263,6 +264,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -280,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Jan 24 2006 Harald Hoyer - 078-7 +- put WAIT_FOR_SYSFS rules in 05-udev-early.rules + * Mon Jan 23 2006 Harald Hoyer - 078-6 - added some WAIT_FOR_SYSFS rules - removed warning message, if udev_db is not available From 2fd405182f11b9580a42e8ce63cf517b4833a506 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 24 Jan 2006 12:37:12 +0000 Subject: [PATCH 172/640] - put WAIT_FOR_SYSFS rules in 05-udev-early.rules --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index adbca41..8d3d318 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -138,6 +138,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} +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/udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.rules # Backwards compat install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules @@ -263,6 +264,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -280,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Jan 24 2006 Harald Hoyer - 078-7 +- put WAIT_FOR_SYSFS rules in 05-udev-early.rules + * Mon Jan 23 2006 Harald Hoyer - 078-6 - added some WAIT_FOR_SYSFS rules - removed warning message, if udev_db is not available From e7c55fe821900d08eab6d4a7e23e70fed2980116 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 26 Jan 2006 08:12:17 +0000 Subject: [PATCH 173/640] - changed usb device naming --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 8d3d318..122cfdb 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -282,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Jan 26 2006 Harald Hoyer - 078-8 +- changed usb device naming + * Tue Jan 24 2006 Harald Hoyer - 078-7 - put WAIT_FOR_SYSFS rules in 05-udev-early.rules From 869e091c24718f1ceff8d1ffbf40722a581ee5a4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 26 Jan 2006 08:12:17 +0000 Subject: [PATCH 174/640] - changed usb device naming --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 8d3d318..122cfdb 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -282,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Jan 26 2006 Harald Hoyer - 078-8 +- changed usb device naming + * Tue Jan 24 2006 Harald Hoyer - 078-7 - put WAIT_FOR_SYSFS rules in 05-udev-early.rules From 01f7ae296aecae6326c5b2028ea91d0c9d5cfc5d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 6 Feb 2006 15:30:27 +0000 Subject: [PATCH 175/640] closed fd leak --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 122cfdb..f775a27 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -282,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Feb 06 2006 Harald Hoyer - 078-9 +- closed fd leak (bug #179980) + * Thu Jan 26 2006 Harald Hoyer - 078-8 - changed usb device naming From 745b7ce640d0d81136615ce7b36ec6d74f3f5f5c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 6 Feb 2006 15:30:27 +0000 Subject: [PATCH 176/640] closed fd leak --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 122cfdb..f775a27 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 078 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -282,6 +282,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Feb 06 2006 Harald Hoyer - 078-9 +- closed fd leak (bug #179980) + * Thu Jan 26 2006 Harald Hoyer - 078-8 - changed usb device naming From 5a533bf047fbddd14b0417175dc6e1b6adef8794 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Feb 2006 11:06:20 +0000 Subject: [PATCH 177/640] version 084 --- udev-extras.patch | 131 ++++++++++++++++++++++++++ udev-rules.patch | 234 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 udev-extras.patch create mode 100644 udev-rules.patch diff --git a/udev-extras.patch b/udev-extras.patch new file mode 100644 index 0000000..0625264 --- /dev/null +++ b/udev-extras.patch @@ -0,0 +1,131 @@ +--- /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,1 +1,40 @@ ++#!/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/ide-media.sh 2006-02-07 10:58:51.000000000 +0100 +@@ -0,1 +1,8 @@ ++#!/bin/bash ++i=0 ++while [[ ! -a /proc/ide/$1/media && $i -lt 10 ]]; do ++ /bin/usleep 100000; ++ i=$[i+1]; ++done ++/bin/cat /proc/ide/$1/media +--- /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,1 +1,36 @@ ++#!/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-rules.patch b/udev-rules.patch new file mode 100644 index 0000000..5166361 --- /dev/null +++ b/udev-rules.patch @@ -0,0 +1,234 @@ +--- /dev/null 2006-02-07 10:47:25.401206250 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-07 11:30:42.000000000 +0100 +@@ -0,0 +1 @@ ++ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" +--- udev-084/etc/udev/redhat/hotplug.rules.redhat 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-07 10:58:51.000000000 +0100 +@@ -1,9 +1,16 @@ + # do not call hotplug.d and dev.d for "drivers" and "module" events +-SUBSYSTEM=="drivers", OPTIONS="last_rule" +-SUBSYSTEM=="module", OPTIONS="last_rule" ++SUBSYSTEM=="drivers", GOTO="hotplug_end" ++SUBSYSTEM=="module", GOTO="hotplug_end" ++ACTION="add", GOTO="hotplug_comp" ++ACTION="remove", GOTO="hotplug_comp" + ++GOTO="hotplug_end" ++ ++LABEL="hotplug_comp" + # compatibility support for the obsolete hotplug.d and dev.d directories +-ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" ++ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" + RUN+="/lib/udev/udev_run_devd" + ++ ++LABEL="hotplug_end" +--- /dev/null 2006-02-07 10:47:25.401206250 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-07 11:30:42.000000000 +0100 +@@ -0,1 +1,10 @@ ++# 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" ++ ++# ignore these events until someone needs them ++SUBSYSTEM=="drivers", OPTIONS="ignore_device" ++SUBSYSTEM=="module", OPTIONS="ignore_device" ++ ++ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" +--- udev-084/etc/udev/redhat/udev.rules.redhat 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-02-07 11:30:42.000000000 +0100 +@@ -3,6 +3,7 @@ + # + # default is OWNER="root" GROUP="root", MODE="0600" + # ++ + KERNEL="*", OWNER="root" GROUP="root", MODE="0600" + + # all block devices +@@ -10,40 +11,44 @@ + KERNEL=="root", GROUP="disk", MODE="0640" + + # console devices +-KERNEL=="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="console", MODE="0600", OPTIONS="last_rule" +-KERNEL=="tty[0-9]", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="tty[0-9][0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="vc/[0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++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" + + # pty devices + # Set this to 0660 if you only want users belonging to tty group + # to be able to allocate PTYs +-KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="pty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="tty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="pty/m*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="vc/s*", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++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" + + # serial+dialup devices +-KERNEL=="ttyS*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" +-KERNEL=="ttyACM*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" +-KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" +-KERNEL=="ippp*", MODE="0660" +-KERNEL=="isdn*", MODE="0660" +-KERNEL=="isdnctrl*", MODE="0660" +-KERNEL=="capi*", MODE="0660" +-KERNEL=="dcbri*", MODE="0660" +-KERNEL=="ircomm*", GROUP="uucp", MODE="0660" +-KERNEL=="tts/[0-9]*", GROUP="uucp", MODE="0660" +-KERNEL=="tts/USB[0-9]*", GROUP="uucp", MODE="0660" ++KERNEL=="ippp*", NAME="%k", MODE="0660" ++KERNEL=="isdn*", NAME="%k", MODE="0660" ++KERNEL=="isdnctrl*", NAME="%k", MODE="0660" ++KERNEL=="capi*", NAME="%k", MODE="0660" ++KERNEL=="dcbri*", NAME="%k", MODE="0660" ++KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" ++KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" + + # vc devices +-KERNEL=="vcs", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcsa", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" ++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" + + # memory devices + KERNEL=="random", MODE="0666", OPTIONS="last_rule" +@@ -54,6 +59,8 @@ + KERNEL=="full", MODE="0666", OPTIONS="last_rule" + KERNEL=="null", MODE="0666", OPTIONS="last_rule" + KERNEL=="zero", MODE="0666", OPTIONS="last_rule" ++# 183 = /dev/hwrng Generic random number generator ++KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" + + # misc devices + KERNEL=="nvram", MODE="0660" +@@ -61,6 +68,10 @@ + + # 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", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k" ++KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'" + + # audio devices + KERNEL=="dsp*", MODE="0660" +@@ -209,7 +220,7 @@ + KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" + KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" + KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +-KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" ++KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="[36]", SYMLINK+="scanner%e", MODE="0660" + + KERNEL=="umad*", NAME="infiniband/%k" + KERNEL=="issm*", NAME="infiniband/%k" +@@ -224,24 +235,25 @@ + BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" + + # do not seperate the next 2 lines!! +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" + + KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" + + # rename sr* to scd* + KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" + KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" + +-KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" ++# dvb ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" + + ####################################### + # Persistent block device stuff - begin +@@ -297,37 +309,31 @@ + # Persistent block device stuff - end + ##################################### + +-ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" +- ++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" + + # Perhaps this should just be for all subsystems? ++ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias" + +-ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" +-ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" +-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" + ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ + RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + +-ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" ++# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC ++# sr: 4 TYPE_WORM, 5 TYPE_ROM ++# st/osst: 1 TYPE_TAPE ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ + RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ +- RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ + RUN+="/sbin/modprobe sr_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ + SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ + SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="On[sS]tream", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ + RUN+="/sbin/modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ +- RUN+="/sbin/modprobe sg" ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" ++ ++RUN+="socket:/org/kernel/udev/monitor" + +-ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", \ +- RUN+="/sbin/firmware_helper" From 96d1914827e6d710da59e1c5e0661d0d6e218430 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Feb 2006 11:06:20 +0000 Subject: [PATCH 178/640] version 084 --- udev-extras.patch | 131 ++++++++++++++++++++++++++ udev-rules.patch | 234 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 udev-extras.patch create mode 100644 udev-rules.patch diff --git a/udev-extras.patch b/udev-extras.patch new file mode 100644 index 0000000..0625264 --- /dev/null +++ b/udev-extras.patch @@ -0,0 +1,131 @@ +--- /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,1 +1,40 @@ ++#!/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/ide-media.sh 2006-02-07 10:58:51.000000000 +0100 +@@ -0,1 +1,8 @@ ++#!/bin/bash ++i=0 ++while [[ ! -a /proc/ide/$1/media && $i -lt 10 ]]; do ++ /bin/usleep 100000; ++ i=$[i+1]; ++done ++/bin/cat /proc/ide/$1/media +--- /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,1 +1,36 @@ ++#!/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-rules.patch b/udev-rules.patch new file mode 100644 index 0000000..5166361 --- /dev/null +++ b/udev-rules.patch @@ -0,0 +1,234 @@ +--- /dev/null 2006-02-07 10:47:25.401206250 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-07 11:30:42.000000000 +0100 +@@ -0,0 +1 @@ ++ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" +--- udev-084/etc/udev/redhat/hotplug.rules.redhat 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-07 10:58:51.000000000 +0100 +@@ -1,9 +1,16 @@ + # do not call hotplug.d and dev.d for "drivers" and "module" events +-SUBSYSTEM=="drivers", OPTIONS="last_rule" +-SUBSYSTEM=="module", OPTIONS="last_rule" ++SUBSYSTEM=="drivers", GOTO="hotplug_end" ++SUBSYSTEM=="module", GOTO="hotplug_end" ++ACTION="add", GOTO="hotplug_comp" ++ACTION="remove", GOTO="hotplug_comp" + ++GOTO="hotplug_end" ++ ++LABEL="hotplug_comp" + # compatibility support for the obsolete hotplug.d and dev.d directories +-ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" ++ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" + RUN+="/lib/udev/udev_run_devd" + ++ ++LABEL="hotplug_end" +--- /dev/null 2006-02-07 10:47:25.401206250 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-07 11:30:42.000000000 +0100 +@@ -0,1 +1,10 @@ ++# 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" ++ ++# ignore these events until someone needs them ++SUBSYSTEM=="drivers", OPTIONS="ignore_device" ++SUBSYSTEM=="module", OPTIONS="ignore_device" ++ ++ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" +--- udev-084/etc/udev/redhat/udev.rules.redhat 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-02-07 11:30:42.000000000 +0100 +@@ -3,6 +3,7 @@ + # + # default is OWNER="root" GROUP="root", MODE="0600" + # ++ + KERNEL="*", OWNER="root" GROUP="root", MODE="0600" + + # all block devices +@@ -10,40 +11,44 @@ + KERNEL=="root", GROUP="disk", MODE="0640" + + # console devices +-KERNEL=="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="console", MODE="0600", OPTIONS="last_rule" +-KERNEL=="tty[0-9]", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="tty[0-9][0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="vc/[0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++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" + + # pty devices + # Set this to 0660 if you only want users belonging to tty group + # to be able to allocate PTYs +-KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="pty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="tty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="pty/m*", GROUP="tty", MODE="0660", OPTIONS="last_rule" +-KERNEL=="vc/s*", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++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" + + # serial+dialup devices +-KERNEL=="ttyS*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" +-KERNEL=="ttyACM*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" +-KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" +-KERNEL=="ippp*", MODE="0660" +-KERNEL=="isdn*", MODE="0660" +-KERNEL=="isdnctrl*", MODE="0660" +-KERNEL=="capi*", MODE="0660" +-KERNEL=="dcbri*", MODE="0660" +-KERNEL=="ircomm*", GROUP="uucp", MODE="0660" +-KERNEL=="tts/[0-9]*", GROUP="uucp", MODE="0660" +-KERNEL=="tts/USB[0-9]*", GROUP="uucp", MODE="0660" ++KERNEL=="ippp*", NAME="%k", MODE="0660" ++KERNEL=="isdn*", NAME="%k", MODE="0660" ++KERNEL=="isdnctrl*", NAME="%k", MODE="0660" ++KERNEL=="capi*", NAME="%k", MODE="0660" ++KERNEL=="dcbri*", NAME="%k", MODE="0660" ++KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" ++KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" ++KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" + + # vc devices +-KERNEL=="vcs", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcsa", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +-KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" ++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" + + # memory devices + KERNEL=="random", MODE="0666", OPTIONS="last_rule" +@@ -54,6 +59,8 @@ + KERNEL=="full", MODE="0666", OPTIONS="last_rule" + KERNEL=="null", MODE="0666", OPTIONS="last_rule" + KERNEL=="zero", MODE="0666", OPTIONS="last_rule" ++# 183 = /dev/hwrng Generic random number generator ++KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" + + # misc devices + KERNEL=="nvram", MODE="0660" +@@ -61,6 +68,10 @@ + + # 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", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k" ++KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'" + + # audio devices + KERNEL=="dsp*", MODE="0660" +@@ -209,7 +220,7 @@ + KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" + KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" + KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +-KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" ++KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="[36]", SYMLINK+="scanner%e", MODE="0660" + + KERNEL=="umad*", NAME="infiniband/%k" + KERNEL=="issm*", NAME="infiniband/%k" +@@ -224,24 +235,25 @@ + BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" + + # do not seperate the next 2 lines!! +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" + + KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" +-KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" + + # rename sr* to scd* + KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" + KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" + +-KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" ++# dvb ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" + + ####################################### + # Persistent block device stuff - begin +@@ -297,37 +309,31 @@ + # Persistent block device stuff - end + ##################################### + +-ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" +- ++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" + + # Perhaps this should just be for all subsystems? ++ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias" + +-ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" +-ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" +-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" + ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ + RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + +-ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ +- RUN+="/sbin/modprobe $modalias" ++# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC ++# sr: 4 TYPE_WORM, 5 TYPE_ROM ++# st/osst: 1 TYPE_TAPE ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ + RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ +- RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ + RUN+="/sbin/modprobe sr_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ + SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ + SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="On[sS]tream", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ + RUN+="/sbin/modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ +- RUN+="/sbin/modprobe sg" ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" ++ ++RUN+="socket:/org/kernel/udev/monitor" + +-ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", \ +- RUN+="/sbin/firmware_helper" From 42ddda11e30863349042ae8a256089da135ed4ad Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Feb 2006 11:13:42 +0000 Subject: [PATCH 179/640] version 084 --- .cvsignore | 2 +- sources | 2 +- start_udev | 7 +- udev-084-floppy.patch | 29 +++++++ udev-extras.patch | 6 +- udev-permconv.patch | 97 ++++++++++++++++++++++ udev-rules.patch | 4 +- udev.spec | 39 ++++----- udevstart2.patch | 189 ++++++++++++++++++++++++++---------------- upstream | 2 +- 10 files changed, 276 insertions(+), 101 deletions(-) create mode 100644 udev-084-floppy.patch create mode 100644 udev-permconv.patch diff --git a/.cvsignore b/.cvsignore index c69d66d..53dafbc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-078.tar.bz2 +udev-084.tar.bz2 diff --git a/sources b/sources index 8c39d60..3f7295b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -afdacc5f3e6ced2923479b37da41fd0b udev-078.tar.bz2 +143b3691ae5e6f96995e5749894f78e4 udev-084.tar.bz2 diff --git a/start_udev b/start_udev index 5c4979e..e0991f7 100755 --- a/start_udev +++ b/start_udev @@ -28,7 +28,7 @@ export TZ=/etc/localtime [ -d $sysfs_dir/class ] || exit 1 [ -r /proc/mounts ] || exit 1 -[ -x /sbin/udev ] || exit 1 +[ -x /sbin/udevd ] || exit 1 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf udev_root=${udev_root-/dev} @@ -119,7 +119,10 @@ wait_for_queue() { loop=200 while test -d /dev/.udev/queue; do usleep 100000; - test "$loop" -gt 0 || return 1 + if [ "$loop" -le 0 ]; then + echo -n "Wait timeout. Will continue in the background." + return 1 + fi loop=$(($loop - 1)) done return 0 diff --git a/udev-084-floppy.patch b/udev-084-floppy.patch new file mode 100644 index 0000000..de5fb51 --- /dev/null +++ b/udev-084-floppy.patch @@ -0,0 +1,29 @@ +--- 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-extras.patch b/udev-extras.patch index 0625264..a4c0226 100644 --- a/udev-extras.patch +++ b/udev-extras.patch @@ -1,6 +1,6 @@ --- /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,1 +1,40 @@ +@@ -0,0 +1,39 @@ +#!/bin/bash + +pos=0 @@ -42,7 +42,7 @@ +} --- /dev/null 2006-02-07 10:47:25.401206250 +0100 +++ udev-084/extras/ide-media.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,1 +1,8 @@ +@@ -0,0 +1,7 @@ +#!/bin/bash +i=0 +while [[ ! -a /proc/ide/$1/media && $i -lt 10 ]]; do @@ -93,7 +93,7 @@ +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,1 +1,36 @@ +@@ -0,0 +1,35 @@ +#!/bin/sh +######################################################################## +# diff --git a/udev-permconv.patch b/udev-permconv.patch new file mode 100644 index 0000000..37e0959 --- /dev/null +++ b/udev-permconv.patch @@ -0,0 +1,97 @@ +--- /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-rules.patch b/udev-rules.patch index 5166361..e2f1658 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -2,6 +2,7 @@ +++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-07 11:30:42.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" + --- udev-084/etc/udev/redhat/hotplug.rules.redhat 2006-01-30 08:51:38.000000000 +0100 +++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-07 10:58:51.000000000 +0100 @@ -1,9 +1,16 @@ @@ -23,9 +24,10 @@ + +LABEL="hotplug_end" + --- /dev/null 2006-02-07 10:47:25.401206250 +0100 +++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-07 11:30:42.000000000 +0100 -@@ -0,1 +1,10 @@ +@@ -0,0 +1,9 @@ +# 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" diff --git a/udev.spec b/udev.spec index f775a27..db0abe2 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 078 -Release: 9 +Version: 084 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -17,11 +17,11 @@ Source2: udev.nodes Source10: firmware_helper.c -Patch1: udev-078-redhat.patch -Patch2: udevstart2.patch -Patch3: udev-075-selinux.patch -Patch4: udev-078-udevstart-greylist.patch -Patch5: udev-078-nodberr.patch +Patch1: udev-permconv.patch +Patch2: udev-rules.patch +Patch3: udevstart2.patch +Patch4: udev-084-floppy.patch +Patch5: udev-extras.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -41,11 +41,11 @@ userspace using sysfs and netlink. %prep %setup -q -%patch1 -p1 -b .redhat -%patch2 -p1 -b .udevstart2 -%patch3 -p1 -b .selinux -%patch4 -p1 -b .greylist -%patch5 -p1 -b .nodberr +%patch1 -p1 -b .rhpermconv +%patch2 -p1 -b .rhrules +%patch3 -p1 -b .rhudevstart +%patch4 -p1 -b .rhfloppy +%patch5 -p1 -b .rhextras %build @@ -68,7 +68,6 @@ make \ %endif " all -mv udev udev.static mv udevd udevd.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static @@ -145,7 +144,6 @@ install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static @@ -153,9 +151,6 @@ install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -install -m 0644 extras/run_directory/dev.d/default/pam_console.dev $RPM_BUILD_ROOT%{udev_scriptdir} -ln -s %{udev_scriptdir}/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev - for i in load_floppy_module.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done @@ -166,6 +161,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin +install -m 0755 udevstart $RPM_BUILD_ROOT/sbin install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev @@ -216,11 +212,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %doc etc/udev/redhat/udev.rules -%attr(0755,root,root) /sbin/udev -%attr(0755,root,root) /sbin/udev.static %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol -%attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/start_udev @@ -251,8 +244,6 @@ rm -rf $RPM_BUILD_ROOT %ghost %dir %{_sysconfdir}/udev/scripts/ %ghost %dir %{_sysconfdir}/udev/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ -%attr(0755,root,root) %{udev_scriptdir}/pam_console.dev -%config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev %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 @@ -276,12 +267,16 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* +%attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* %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* %changelog +* Tue Feb 07 2006 Harald Hoyer - 084-1 +- version 084 + * Mon Feb 06 2006 Harald Hoyer - 078-9 - closed fd leak (bug #179980) diff --git a/udevstart2.patch b/udevstart2.patch index 788f0e3..3caaed1 100644 --- a/udevstart2.patch +++ b/udevstart2.patch @@ -1,16 +1,14 @@ ---- udev-078/udevstart.c.udevstart2 2005-12-17 16:40:29.000000000 +0100 -+++ udev-078/udevstart.c 2005-12-21 10:57:18.000000000 +0100 -@@ -37,6 +37,7 @@ +--- 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 "libsysfs/sysfs/libsysfs.h" - #include "udev_libc_wrapper.h" -@@ -47,9 +48,7 @@ + #include "udev.h" #include "udev_rules.h" - #include "list.h" -static const char *udev_run_str; static const char *udev_log_str; @@ -18,75 +16,54 @@ #ifdef USE_LOG void log_message(int priority, const char *format, ...) -@@ -109,71 +108,29 @@ +@@ -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, const char *subsystem) + + static int add_device(const char *devpath) { -- struct udevice udev; -- struct sysfs_class_device *class_dev; -- char path[PATH_SIZE]; +- struct sysfs_device *dev; +- struct udevice *udev; +- int retval = 0; - - /* clear and set environment for next event */ - clearenv(); - setenv("ACTION", "add", 1); -- setenv("DEVPATH", devpath, 1); -- setenv("SUBSYSTEM", subsystem, 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); -- dbg("add '%s'", devpath); - -- snprintf(path, sizeof(path), "%s%s", sysfs_path, devpath); -- path[sizeof(path)-1] = '\0'; -- class_dev = sysfs_open_class_device_path(path); -- if (class_dev == NULL) { -- dbg("sysfs_open_class_device_path failed"); +- dev = sysfs_device_get(devpath); +- if (dev == NULL) - return -1; -- } - -- udev_init_device(&udev, &class_dev->path[strlen(sysfs_path)], subsystem, "add"); -- udev.devt = get_devt(class_dev); -- if (!udev.devt && udev.type != DEV_NET) { -- dbg("sysfs_open_class_device_path failed"); +- udev = udev_device_init(); +- if (udev == NULL) - return -1; -- } -- udev_rules_get_name(&rules, &udev, class_dev); -- if (udev.ignore_device) { -- dbg("device event will be ignored"); -- goto exit; -- } -- if (udev.name[0] == '\0') { -- dbg("device node creation supressed"); -- goto run; -- } - -- udev_add_device(&udev, class_dev); --run: -- if (udev_run && !list_empty(&udev.run_list)) { -- struct name_entry *name_loop; +- /* override built-in sysfs device */ +- udev->dev = dev; +- strcpy(udev->action, "add"); +- udev->devt = udev_device_get_devt(udev); - -- 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:")], devpath, "add"); -- else -- run_program(name_loop->name, udev.subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); -- } +- if (strcmp(udev->dev->subsystem, "net") != 0) { +- udev->devt = udev_device_get_devt(udev); +- if (major(udev->devt) == 0) +- return -1; - } --exit: -- sysfs_close_class_device(class_dev); -- udev_cleanup_device(&udev); -- -- return 0; + char filename[PATH_SIZE]; + int fd; + @@ -102,13 +79,85 @@ + else return 1; + + return 0; - } ++} + +- dbg("add '%s'", udev->dev->devpath); +- setenv("DEVPATH", udev->dev->devpath, 1); +- setenv("SUBSYSTEM", udev->dev->subsystem, 1); - -+ - static void exec_list(struct list_head *device_list) - { - struct device *loop_device; -@@ -222,7 +179,7 @@ +- 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; @@ -117,7 +166,7 @@ filename[sizeof(filename)-1] = '\0'; if (stat(filename, &statbuf) == 0) -@@ -279,6 +236,50 @@ +@@ -279,6 +267,50 @@ } } @@ -155,7 +204,7 @@ + dirname2[sizeof(dirname2)-1] = '\0'; + + if (has_devt(dirname2)) -+ device_list_insert(dirname2, dent->d_name, device_list); ++ device_list_insert(dirname2, device_list); + } + closedir(dir2); + } @@ -168,35 +217,35 @@ static void udev_scan_class(struct list_head *device_list) { char base[PATH_SIZE]; -@@ -312,7 +313,7 @@ +@@ -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, dent->d_name, device_list); + device_list_insert(dirname2, device_list); } closedir(dir2); -@@ -342,7 +343,6 @@ - udev_init_config(); +@@ -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 */ -@@ -361,13 +361,11 @@ - /* trigger timeout to prevent hanging processes */ +@@ -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_close(&rules); +- udev_rules_cleanup(&rules); + sysfs_cleanup(); logging_close(); return 0; - } diff --git a/upstream b/upstream index 47068e4..53dafbc 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-050.tar.bz2 +udev-084.tar.bz2 From e6df39c973bf2558931702bd7385bc2bbf5444f0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Feb 2006 11:13:42 +0000 Subject: [PATCH 180/640] version 084 --- .cvsignore | 2 +- sources | 2 +- start_udev | 7 +- udev-084-floppy.patch | 29 +++++++ udev-extras.patch | 6 +- udev-permconv.patch | 97 ++++++++++++++++++++++ udev-rules.patch | 4 +- udev.spec | 39 ++++----- udevstart2.patch | 189 ++++++++++++++++++++++++++---------------- upstream | 2 +- 10 files changed, 276 insertions(+), 101 deletions(-) create mode 100644 udev-084-floppy.patch create mode 100644 udev-permconv.patch diff --git a/.cvsignore b/.cvsignore index c69d66d..53dafbc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-078.tar.bz2 +udev-084.tar.bz2 diff --git a/sources b/sources index 8c39d60..3f7295b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -afdacc5f3e6ced2923479b37da41fd0b udev-078.tar.bz2 +143b3691ae5e6f96995e5749894f78e4 udev-084.tar.bz2 diff --git a/start_udev b/start_udev index 5c4979e..e0991f7 100755 --- a/start_udev +++ b/start_udev @@ -28,7 +28,7 @@ export TZ=/etc/localtime [ -d $sysfs_dir/class ] || exit 1 [ -r /proc/mounts ] || exit 1 -[ -x /sbin/udev ] || exit 1 +[ -x /sbin/udevd ] || exit 1 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf udev_root=${udev_root-/dev} @@ -119,7 +119,10 @@ wait_for_queue() { loop=200 while test -d /dev/.udev/queue; do usleep 100000; - test "$loop" -gt 0 || return 1 + if [ "$loop" -le 0 ]; then + echo -n "Wait timeout. Will continue in the background." + return 1 + fi loop=$(($loop - 1)) done return 0 diff --git a/udev-084-floppy.patch b/udev-084-floppy.patch new file mode 100644 index 0000000..de5fb51 --- /dev/null +++ b/udev-084-floppy.patch @@ -0,0 +1,29 @@ +--- 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-extras.patch b/udev-extras.patch index 0625264..a4c0226 100644 --- a/udev-extras.patch +++ b/udev-extras.patch @@ -1,6 +1,6 @@ --- /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,1 +1,40 @@ +@@ -0,0 +1,39 @@ +#!/bin/bash + +pos=0 @@ -42,7 +42,7 @@ +} --- /dev/null 2006-02-07 10:47:25.401206250 +0100 +++ udev-084/extras/ide-media.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,1 +1,8 @@ +@@ -0,0 +1,7 @@ +#!/bin/bash +i=0 +while [[ ! -a /proc/ide/$1/media && $i -lt 10 ]]; do @@ -93,7 +93,7 @@ +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,1 +1,36 @@ +@@ -0,0 +1,35 @@ +#!/bin/sh +######################################################################## +# diff --git a/udev-permconv.patch b/udev-permconv.patch new file mode 100644 index 0000000..37e0959 --- /dev/null +++ b/udev-permconv.patch @@ -0,0 +1,97 @@ +--- /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-rules.patch b/udev-rules.patch index 5166361..e2f1658 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -2,6 +2,7 @@ +++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-07 11:30:42.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" + --- udev-084/etc/udev/redhat/hotplug.rules.redhat 2006-01-30 08:51:38.000000000 +0100 +++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-07 10:58:51.000000000 +0100 @@ -1,9 +1,16 @@ @@ -23,9 +24,10 @@ + +LABEL="hotplug_end" + --- /dev/null 2006-02-07 10:47:25.401206250 +0100 +++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-07 11:30:42.000000000 +0100 -@@ -0,1 +1,10 @@ +@@ -0,0 +1,9 @@ +# 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" diff --git a/udev.spec b/udev.spec index f775a27..db0abe2 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 078 -Release: 9 +Version: 084 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -17,11 +17,11 @@ Source2: udev.nodes Source10: firmware_helper.c -Patch1: udev-078-redhat.patch -Patch2: udevstart2.patch -Patch3: udev-075-selinux.patch -Patch4: udev-078-udevstart-greylist.patch -Patch5: udev-078-nodberr.patch +Patch1: udev-permconv.patch +Patch2: udev-rules.patch +Patch3: udevstart2.patch +Patch4: udev-084-floppy.patch +Patch5: udev-extras.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -41,11 +41,11 @@ userspace using sysfs and netlink. %prep %setup -q -%patch1 -p1 -b .redhat -%patch2 -p1 -b .udevstart2 -%patch3 -p1 -b .selinux -%patch4 -p1 -b .greylist -%patch5 -p1 -b .nodberr +%patch1 -p1 -b .rhpermconv +%patch2 -p1 -b .rhrules +%patch3 -p1 -b .rhudevstart +%patch4 -p1 -b .rhfloppy +%patch5 -p1 -b .rhextras %build @@ -68,7 +68,6 @@ make \ %endif " all -mv udev udev.static mv udevd udevd.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static @@ -145,7 +144,6 @@ install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -install -m 0755 udev.static $RPM_BUILD_ROOT/sbin/udev.static install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static @@ -153,9 +151,6 @@ install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -install -m 0644 extras/run_directory/dev.d/default/pam_console.dev $RPM_BUILD_ROOT%{udev_scriptdir} -ln -s %{udev_scriptdir}/pam_console.dev $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/default/05-pam_console.dev - for i in load_floppy_module.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done @@ -166,6 +161,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin +install -m 0755 udevstart $RPM_BUILD_ROOT/sbin install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev @@ -216,11 +212,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %doc etc/udev/redhat/udev.rules -%attr(0755,root,root) /sbin/udev -%attr(0755,root,root) /sbin/udev.static %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol -%attr(0755,root,root) /sbin/udevsend %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/start_udev @@ -251,8 +244,6 @@ rm -rf $RPM_BUILD_ROOT %ghost %dir %{_sysconfdir}/udev/scripts/ %ghost %dir %{_sysconfdir}/udev/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ -%attr(0755,root,root) %{udev_scriptdir}/pam_console.dev -%config(missingok) %{_sysconfdir}/dev.d/default/05-pam_console.dev %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 @@ -276,12 +267,16 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0755,root,root) /lib/firmware %attr(0644,root,root) %{_mandir}/man8/udev*.8* +%attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* %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* %changelog +* Tue Feb 07 2006 Harald Hoyer - 084-1 +- version 084 + * Mon Feb 06 2006 Harald Hoyer - 078-9 - closed fd leak (bug #179980) diff --git a/udevstart2.patch b/udevstart2.patch index 788f0e3..3caaed1 100644 --- a/udevstart2.patch +++ b/udevstart2.patch @@ -1,16 +1,14 @@ ---- udev-078/udevstart.c.udevstart2 2005-12-17 16:40:29.000000000 +0100 -+++ udev-078/udevstart.c 2005-12-21 10:57:18.000000000 +0100 -@@ -37,6 +37,7 @@ +--- 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 "libsysfs/sysfs/libsysfs.h" - #include "udev_libc_wrapper.h" -@@ -47,9 +48,7 @@ + #include "udev.h" #include "udev_rules.h" - #include "list.h" -static const char *udev_run_str; static const char *udev_log_str; @@ -18,75 +16,54 @@ #ifdef USE_LOG void log_message(int priority, const char *format, ...) -@@ -109,71 +108,29 @@ +@@ -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, const char *subsystem) + + static int add_device(const char *devpath) { -- struct udevice udev; -- struct sysfs_class_device *class_dev; -- char path[PATH_SIZE]; +- struct sysfs_device *dev; +- struct udevice *udev; +- int retval = 0; - - /* clear and set environment for next event */ - clearenv(); - setenv("ACTION", "add", 1); -- setenv("DEVPATH", devpath, 1); -- setenv("SUBSYSTEM", subsystem, 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); -- dbg("add '%s'", devpath); - -- snprintf(path, sizeof(path), "%s%s", sysfs_path, devpath); -- path[sizeof(path)-1] = '\0'; -- class_dev = sysfs_open_class_device_path(path); -- if (class_dev == NULL) { -- dbg("sysfs_open_class_device_path failed"); +- dev = sysfs_device_get(devpath); +- if (dev == NULL) - return -1; -- } - -- udev_init_device(&udev, &class_dev->path[strlen(sysfs_path)], subsystem, "add"); -- udev.devt = get_devt(class_dev); -- if (!udev.devt && udev.type != DEV_NET) { -- dbg("sysfs_open_class_device_path failed"); +- udev = udev_device_init(); +- if (udev == NULL) - return -1; -- } -- udev_rules_get_name(&rules, &udev, class_dev); -- if (udev.ignore_device) { -- dbg("device event will be ignored"); -- goto exit; -- } -- if (udev.name[0] == '\0') { -- dbg("device node creation supressed"); -- goto run; -- } - -- udev_add_device(&udev, class_dev); --run: -- if (udev_run && !list_empty(&udev.run_list)) { -- struct name_entry *name_loop; +- /* override built-in sysfs device */ +- udev->dev = dev; +- strcpy(udev->action, "add"); +- udev->devt = udev_device_get_devt(udev); - -- 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:")], devpath, "add"); -- else -- run_program(name_loop->name, udev.subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); -- } +- if (strcmp(udev->dev->subsystem, "net") != 0) { +- udev->devt = udev_device_get_devt(udev); +- if (major(udev->devt) == 0) +- return -1; - } --exit: -- sysfs_close_class_device(class_dev); -- udev_cleanup_device(&udev); -- -- return 0; + char filename[PATH_SIZE]; + int fd; + @@ -102,13 +79,85 @@ + else return 1; + + return 0; - } ++} + +- dbg("add '%s'", udev->dev->devpath); +- setenv("DEVPATH", udev->dev->devpath, 1); +- setenv("SUBSYSTEM", udev->dev->subsystem, 1); - -+ - static void exec_list(struct list_head *device_list) - { - struct device *loop_device; -@@ -222,7 +179,7 @@ +- 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; @@ -117,7 +166,7 @@ filename[sizeof(filename)-1] = '\0'; if (stat(filename, &statbuf) == 0) -@@ -279,6 +236,50 @@ +@@ -279,6 +267,50 @@ } } @@ -155,7 +204,7 @@ + dirname2[sizeof(dirname2)-1] = '\0'; + + if (has_devt(dirname2)) -+ device_list_insert(dirname2, dent->d_name, device_list); ++ device_list_insert(dirname2, device_list); + } + closedir(dir2); + } @@ -168,35 +217,35 @@ static void udev_scan_class(struct list_head *device_list) { char base[PATH_SIZE]; -@@ -312,7 +313,7 @@ +@@ -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, dent->d_name, device_list); + device_list_insert(dirname2, device_list); } closedir(dir2); -@@ -342,7 +343,6 @@ - udev_init_config(); +@@ -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 */ -@@ -361,13 +361,11 @@ - /* trigger timeout to prevent hanging processes */ +@@ -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_close(&rules); +- udev_rules_cleanup(&rules); + sysfs_cleanup(); logging_close(); return 0; - } diff --git a/upstream b/upstream index 47068e4..53dafbc 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-050.tar.bz2 +udev-084.tar.bz2 From faa7f43302e75e9aeb37c0e7fc9f73c45dede113 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 7 Feb 2006 21:23:49 +0000 Subject: [PATCH 181/640] - continue to include /sbin/udev for now as it's needed for determining the version of udev --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index db0abe2..40cb63b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -162,6 +162,7 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin install -m 0755 udevstart $RPM_BUILD_ROOT/sbin +install -m 0755 udev $RPM_BUILD_ROOT/sbin install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev @@ -214,6 +215,7 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol +%attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/start_udev @@ -274,6 +276,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Feb 7 2006 Jeremy Katz - 084-2 +- continue to include /sbin/udev for now as it's needed for determining + the version of udev + * Tue Feb 07 2006 Harald Hoyer - 084-1 - version 084 From 5c6d821ff829728c8f56113f45ad105e14d40695 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 7 Feb 2006 21:23:49 +0000 Subject: [PATCH 182/640] - continue to include /sbin/udev for now as it's needed for determining the version of udev --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index db0abe2..40cb63b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -162,6 +162,7 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin install -m 0755 udevstart $RPM_BUILD_ROOT/sbin +install -m 0755 udev $RPM_BUILD_ROOT/sbin install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev @@ -214,6 +215,7 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol +%attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/start_udev @@ -274,6 +276,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Feb 7 2006 Jeremy Katz - 084-2 +- continue to include /sbin/udev for now as it's needed for determining + the version of udev + * Tue Feb 07 2006 Harald Hoyer - 084-1 - version 084 From f70d2d2b2de1ce01bd4cc785f96f20f5440f2518 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 7 Feb 2006 21:45:33 +0000 Subject: [PATCH 183/640] okay, don't need this --- udev.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/udev.spec b/udev.spec index 40cb63b..db0abe2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 2 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -162,7 +162,6 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin install -m 0755 udevstart $RPM_BUILD_ROOT/sbin -install -m 0755 udev $RPM_BUILD_ROOT/sbin install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev @@ -215,7 +214,6 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol -%attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/start_udev @@ -276,10 +274,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Tue Feb 7 2006 Jeremy Katz - 084-2 -- continue to include /sbin/udev for now as it's needed for determining - the version of udev - * Tue Feb 07 2006 Harald Hoyer - 084-1 - version 084 From 43f97d0c53a15295338388b32b441ecec2254e39 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 7 Feb 2006 21:45:33 +0000 Subject: [PATCH 184/640] okay, don't need this --- udev.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/udev.spec b/udev.spec index 40cb63b..db0abe2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 2 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -162,7 +162,6 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin install -m 0755 udevstart $RPM_BUILD_ROOT/sbin -install -m 0755 udev $RPM_BUILD_ROOT/sbin install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdir}/MAKEDEV.dev @@ -215,7 +214,6 @@ rm -rf $RPM_BUILD_ROOT %doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol -%attr(0755,root,root) /sbin/udev %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevstart %attr(0755,root,root) /sbin/start_udev @@ -276,10 +274,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Tue Feb 7 2006 Jeremy Katz - 084-2 -- continue to include /sbin/udev for now as it's needed for determining - the version of udev - * Tue Feb 07 2006 Harald Hoyer - 084-1 - version 084 From 81b3909c855e7bb046c2fc2b811e22b84eb429b7 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 11 Feb 2006 05:54:36 +0000 Subject: [PATCH 185/640] bump for bug in double-long on ppc(64) --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index db0abe2..f195505 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 1 +Release: 1.1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -274,6 +274,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 10 2006 Jesse Keating - 084-1.1 +- bump again for double-long bug on ppc(64) + * Tue Feb 07 2006 Harald Hoyer - 084-1 - version 084 From ae856446bfec1d6dbc212599327be7083b2c53a7 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 11 Feb 2006 05:54:36 +0000 Subject: [PATCH 186/640] bump for bug in double-long on ppc(64) --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index db0abe2..f195505 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 1 +Release: 1.1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -274,6 +274,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 10 2006 Jesse Keating - 084-1.1 +- bump again for double-long bug on ppc(64) + * Tue Feb 07 2006 Harald Hoyer - 084-1 - version 084 From 76aea984e90f85e502444535f8bee847975ee3e0 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 21 Feb 2006 19:35:08 +0000 Subject: [PATCH 187/640] - also output space at end of startup message --- start_udev | 2 +- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index e0991f7..69e627f 100755 --- a/start_udev +++ b/start_udev @@ -133,7 +133,7 @@ prog=udev ret=0 STRING=$"Starting $prog: " # propagate $udev_root from /sys -echo -n $STRING +echo -n "$STRING" # mount the tmpfs on ${udev_root%/}, if not already done LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { diff --git a/udev.spec b/udev.spec index f195505..95a051b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 1.1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -274,6 +274,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Feb 21 2006 Florian La Roche - 084-2 +- also output the additional space char as part of the startup message + * Fri Feb 10 2006 Jesse Keating - 084-1.1 - bump again for double-long bug on ppc(64) From ee52139bd5964342671ec8610981069b48ab7afc Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 21 Feb 2006 19:35:08 +0000 Subject: [PATCH 188/640] - also output space at end of startup message --- start_udev | 2 +- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index e0991f7..69e627f 100755 --- a/start_udev +++ b/start_udev @@ -133,7 +133,7 @@ prog=udev ret=0 STRING=$"Starting $prog: " # propagate $udev_root from /sys -echo -n $STRING +echo -n "$STRING" # mount the tmpfs on ${udev_root%/}, if not already done LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { diff --git a/udev.spec b/udev.spec index f195505..95a051b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 1.1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -274,6 +274,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Tue Feb 21 2006 Florian La Roche - 084-2 +- also output the additional space char as part of the startup message + * Fri Feb 10 2006 Jesse Keating - 084-1.1 - bump again for double-long bug on ppc(64) From 35d832f5584b91b34921cc56bb04bdcde48790e9 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 21 Feb 2006 19:47:21 +0000 Subject: [PATCH 189/640] - auch, seems -2 is already commited from Jeremy??? --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 95a051b..392b686 100644 --- a/udev.spec +++ b/udev.spec @@ -274,7 +274,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Tue Feb 21 2006 Florian La Roche - 084-2 +* Tue Feb 21 2006 Florian La Roche - 084-3 - also output the additional space char as part of the startup message * Fri Feb 10 2006 Jesse Keating - 084-1.1 From f65c3cb4a8e811c230e420a38d1d1d8042ad4b13 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 21 Feb 2006 19:47:21 +0000 Subject: [PATCH 190/640] - auch, seems -2 is already commited from Jeremy??? --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 95a051b..392b686 100644 --- a/udev.spec +++ b/udev.spec @@ -274,7 +274,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Tue Feb 21 2006 Florian La Roche - 084-2 +* Tue Feb 21 2006 Florian La Roche - 084-3 - also output the additional space char as part of the startup message * Fri Feb 10 2006 Jesse Keating - 084-1.1 From 77b1c4d77594b16ebc581cbcc9e61902fe505be6 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 21 Feb 2006 19:47:51 +0000 Subject: [PATCH 191/640] - -3 --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 392b686..6a6da89 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} From 96540393735282ceb674e1dbe725af947c2d6951 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 21 Feb 2006 19:47:51 +0000 Subject: [PATCH 192/640] - -3 --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 392b686..6a6da89 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} From 205e54f2c1c60fdaf648138bb8e390f60d9e6dbe Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 22 Feb 2006 08:19:05 +0000 Subject: [PATCH 193/640] - fixed group issue with vol_id (bz #181432) - fixed dvb permissions (bz #179993) - added support for scsi media changer (bz #181911) - fixed pktcdvd device creation (bz #161268) --- udev-084-pg.patch | 105 ++++++++++++++++++++++++++++++++++++++++++++++ udev-rules.patch | 67 +++++++++++++++++++---------- udev.spec | 10 ++++- 3 files changed, 158 insertions(+), 24 deletions(-) create mode 100644 udev-084-pg.patch diff --git a/udev-084-pg.patch b/udev-084-pg.patch new file mode 100644 index 0000000..9cdc1e9 --- /dev/null +++ b/udev-084-pg.patch @@ -0,0 +1,105 @@ +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-rules.patch b/udev-rules.patch index e2f1658..8b85a7c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,11 +1,6 @@ ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-07 11:30:42.000000000 +0100 -@@ -0,0 +1 @@ -+ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" - ---- udev-084/etc/udev/redhat/hotplug.rules.redhat 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-07 10:58:51.000000000 +0100 -@@ -1,9 +1,16 @@ +--- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-22 09:13:38.000000000 +0100 +@@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" -SUBSYSTEM=="module", OPTIONS="last_rule" @@ -24,12 +19,15 @@ + +LABEL="hotplug_end" - ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-07 11:30:42.000000000 +0100 +--- /dev/null 2006-02-15 18:27:05.942547250 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-22 09:13:38.000000000 +0100 +@@ -0,0 +1 @@ ++ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" +--- /dev/null 2006-02-15 18:27:05.942547250 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-22 09:13:38.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent -+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" ++ACTION=="add", DEVPATH=="/devices/*", DEVPATH!="*usb*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + +# ignore these events until someone needs them @@ -37,8 +35,8 @@ +SUBSYSTEM=="module", OPTIONS="ignore_device" + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" ---- udev-084/etc/udev/redhat/udev.rules.redhat 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-02-07 11:30:42.000000000 +0100 +--- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-02-22 09:15:39.000000000 +0100 @@ -3,6 +3,7 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -138,7 +136,20 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -209,7 +220,7 @@ +@@ -142,9 +153,10 @@ + KERNEL=="z90crypt", MODE="0666" + + # DVB +-KERNEL=="dvb/*", MODE="0660" + KERNEL=="dvb", MODE="0660" +-KERNEL=="dvb/adapter*", MODE="0660" ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660" ++ ++ + + # create a symlink named after the device map name + # note devmap_name comes with extras/multipath +@@ -209,7 +221,7 @@ KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" @@ -147,9 +158,16 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -224,24 +235,25 @@ +@@ -221,28 +233,30 @@ + KERNEL=="zappseudo", NAME="zap/pseudo" + KERNEL=="zap[0-9]*", NAME="zap/%n" + ++KERNEL="pktcdvd", NAME="%k/control" ++ BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" ++BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" ++ # do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" @@ -176,17 +194,19 @@ KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" -KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" -+# dvb -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" - +- ####################################### # Persistent block device stuff - begin -@@ -297,37 +309,31 @@ + ####################################### +@@ -297,37 +311,36 @@ # Persistent block device stuff - end ##################################### -ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" -- ++# workaround for devices which do not report media changes ++BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \ ++ ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" + +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" # Perhaps this should just be for all subsystems? @@ -210,14 +230,15 @@ +ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ +- RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ -- RUN+="/sbin/modprobe sd_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ RUN+="/sbin/modprobe sr_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ ++ +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ diff --git a/udev.spec b/udev.spec index 6a6da89..a42fe2e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -22,6 +22,7 @@ Patch2: udev-rules.patch Patch3: udevstart2.patch Patch4: udev-084-floppy.patch Patch5: udev-extras.patch +Patch6: udev-084-pg.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -46,6 +47,7 @@ userspace using sysfs and netlink. %patch3 -p1 -b .rhudevstart %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras +%patch6 -p1 -b .pg %build @@ -274,6 +276,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Feb 22 2006 Harald Hoyer - 084-4 +- fixed group issue with vol_id (bz #181432) +- fixed dvb permissions (bz #179993) +- added support for scsi media changer (bz #181911) +- fixed pktcdvd device creation (bz #161268) + * Tue Feb 21 2006 Florian La Roche - 084-3 - also output the additional space char as part of the startup message From 897627043ad1466a539daa644d1e3a99a4296599 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 22 Feb 2006 08:19:05 +0000 Subject: [PATCH 194/640] - fixed group issue with vol_id (bz #181432) - fixed dvb permissions (bz #179993) - added support for scsi media changer (bz #181911) - fixed pktcdvd device creation (bz #161268) --- udev-084-pg.patch | 105 ++++++++++++++++++++++++++++++++++++++++++++++ udev-rules.patch | 67 +++++++++++++++++++---------- udev.spec | 10 ++++- 3 files changed, 158 insertions(+), 24 deletions(-) create mode 100644 udev-084-pg.patch diff --git a/udev-084-pg.patch b/udev-084-pg.patch new file mode 100644 index 0000000..9cdc1e9 --- /dev/null +++ b/udev-084-pg.patch @@ -0,0 +1,105 @@ +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-rules.patch b/udev-rules.patch index e2f1658..8b85a7c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,11 +1,6 @@ ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-07 11:30:42.000000000 +0100 -@@ -0,0 +1 @@ -+ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" - ---- udev-084/etc/udev/redhat/hotplug.rules.redhat 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-07 10:58:51.000000000 +0100 -@@ -1,9 +1,16 @@ +--- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-22 09:13:38.000000000 +0100 +@@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" -SUBSYSTEM=="module", OPTIONS="last_rule" @@ -24,12 +19,15 @@ + +LABEL="hotplug_end" - ---- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-07 11:30:42.000000000 +0100 +--- /dev/null 2006-02-15 18:27:05.942547250 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-22 09:13:38.000000000 +0100 +@@ -0,0 +1 @@ ++ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" +--- /dev/null 2006-02-15 18:27:05.942547250 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-22 09:13:38.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent -+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" ++ACTION=="add", DEVPATH=="/devices/*", DEVPATH!="*usb*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + +# ignore these events until someone needs them @@ -37,8 +35,8 @@ +SUBSYSTEM=="module", OPTIONS="ignore_device" + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" ---- udev-084/etc/udev/redhat/udev.rules.redhat 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-02-07 11:30:42.000000000 +0100 +--- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-02-22 09:15:39.000000000 +0100 @@ -3,6 +3,7 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -138,7 +136,20 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -209,7 +220,7 @@ +@@ -142,9 +153,10 @@ + KERNEL=="z90crypt", MODE="0666" + + # DVB +-KERNEL=="dvb/*", MODE="0660" + KERNEL=="dvb", MODE="0660" +-KERNEL=="dvb/adapter*", MODE="0660" ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660" ++ ++ + + # create a symlink named after the device map name + # note devmap_name comes with extras/multipath +@@ -209,7 +221,7 @@ KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" @@ -147,9 +158,16 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -224,24 +235,25 @@ +@@ -221,28 +233,30 @@ + KERNEL=="zappseudo", NAME="zap/pseudo" + KERNEL=="zap[0-9]*", NAME="zap/%n" + ++KERNEL="pktcdvd", NAME="%k/control" ++ BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" ++BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" ++ # do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" @@ -176,17 +194,19 @@ KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" -KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" -+# dvb -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" - +- ####################################### # Persistent block device stuff - begin -@@ -297,37 +309,31 @@ + ####################################### +@@ -297,37 +311,36 @@ # Persistent block device stuff - end ##################################### -ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" -- ++# workaround for devices which do not report media changes ++BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \ ++ ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" + +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" # Perhaps this should just be for all subsystems? @@ -210,14 +230,15 @@ +ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ +- RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ -- RUN+="/sbin/modprobe sd_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ RUN+="/sbin/modprobe sr_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ ++ +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ diff --git a/udev.spec b/udev.spec index 6a6da89..a42fe2e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -22,6 +22,7 @@ Patch2: udev-rules.patch Patch3: udevstart2.patch Patch4: udev-084-floppy.patch Patch5: udev-extras.patch +Patch6: udev-084-pg.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -46,6 +47,7 @@ userspace using sysfs and netlink. %patch3 -p1 -b .rhudevstart %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras +%patch6 -p1 -b .pg %build @@ -274,6 +276,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Feb 22 2006 Harald Hoyer - 084-4 +- fixed group issue with vol_id (bz #181432) +- fixed dvb permissions (bz #179993) +- added support for scsi media changer (bz #181911) +- fixed pktcdvd device creation (bz #161268) + * Tue Feb 21 2006 Florian La Roche - 084-3 - also output the additional space char as part of the startup message From 8f5d2af8dc47887aeb5dd373a2eec8ff35c1af29 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Feb 2006 14:55:34 +0000 Subject: [PATCH 195/640] - removed WAIT_FOR_SYSFS rule --- udev-rules.patch | 24 ++++++++++++------------ udev.spec | 5 ++++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 8b85a7c..adfab6c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-22 09:13:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-24 08:17:39.000000000 +0100 @@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" @@ -20,14 +20,14 @@ + +LABEL="hotplug_end" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-22 09:13:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-24 08:17:39.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-22 09:13:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 15:09:54.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent -+ACTION=="add", DEVPATH=="/devices/*", DEVPATH!="*usb*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" ++ +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + +# ignore these events until someone needs them @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-02-22 09:15:39.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-02-24 15:35:26.000000000 +0100 @@ -3,6 +3,7 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -158,16 +158,17 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,28 +233,30 @@ +@@ -221,27 +233,30 @@ KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" +-BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" +KERNEL="pktcdvd", NAME="%k/control" + - BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" - -+BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" ++BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK+="scanner%e", MODE="0660" + ++BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" + # do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" @@ -194,11 +195,10 @@ KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" -KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" -- + ####################################### # Persistent block device stuff - begin - ####################################### -@@ -297,37 +311,36 @@ +@@ -297,37 +312,36 @@ # Persistent block device stuff - end ##################################### diff --git a/udev.spec b/udev.spec index a42fe2e..a834b8b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -276,6 +276,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 24 2006 Harald Hoyer - 084-5 +- removed WAIT_FOR_SYSFS rule + * Wed Feb 22 2006 Harald Hoyer - 084-4 - fixed group issue with vol_id (bz #181432) - fixed dvb permissions (bz #179993) From 88af617e092dfc4d456b95801fca4b4bd211b449 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Feb 2006 14:55:34 +0000 Subject: [PATCH 196/640] - removed WAIT_FOR_SYSFS rule --- udev-rules.patch | 24 ++++++++++++------------ udev.spec | 5 ++++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 8b85a7c..adfab6c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-22 09:13:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-24 08:17:39.000000000 +0100 @@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" @@ -20,14 +20,14 @@ + +LABEL="hotplug_end" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-22 09:13:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-24 08:17:39.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-22 09:13:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 15:09:54.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent -+ACTION=="add", DEVPATH=="/devices/*", DEVPATH!="*usb*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" ++ +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + +# ignore these events until someone needs them @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-02-22 09:15:39.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-02-24 15:35:26.000000000 +0100 @@ -3,6 +3,7 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -158,16 +158,17 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,28 +233,30 @@ +@@ -221,27 +233,30 @@ KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" +-BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" +KERNEL="pktcdvd", NAME="%k/control" + - BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" - -+BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" ++BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK+="scanner%e", MODE="0660" + ++BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" + # do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" @@ -194,11 +195,10 @@ KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" -KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" -- + ####################################### # Persistent block device stuff - begin - ####################################### -@@ -297,37 +311,36 @@ +@@ -297,37 +312,36 @@ # Persistent block device stuff - end ##################################### diff --git a/udev.spec b/udev.spec index a42fe2e..a834b8b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -276,6 +276,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 24 2006 Harald Hoyer - 084-5 +- removed WAIT_FOR_SYSFS rule + * Wed Feb 22 2006 Harald Hoyer - 084-4 - fixed group issue with vol_id (bz #181432) - fixed dvb permissions (bz #179993) From 5013d060176f2d52a2b37995676aead4b6a57894 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Feb 2006 16:14:11 +0000 Subject: [PATCH 197/640] - put back original WAIT_FOR_SYSFS rule --- udev-rules.patch | 4 ++-- udev.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index adfab6c..5b107d9 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -24,10 +24,10 @@ @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 15:09:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 17:11:23.000000000 +0100 @@ -0,0 +1,9 @@ +# 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" + +# ignore these events until someone needs them diff --git a/udev.spec b/udev.spec index a834b8b..4b7b852 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -276,6 +276,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 24 2006 Harald Hoyer - 084-6 +- put back original WAIT_FOR_SYSFS rule + * Fri Feb 24 2006 Harald Hoyer - 084-5 - removed WAIT_FOR_SYSFS rule From 9aaef42608aefc63c5ed61495189515b696310a9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Feb 2006 16:14:11 +0000 Subject: [PATCH 198/640] - put back original WAIT_FOR_SYSFS rule --- udev-rules.patch | 4 ++-- udev.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index adfab6c..5b107d9 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -24,10 +24,10 @@ @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 15:09:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 17:11:23.000000000 +0100 @@ -0,0 +1,9 @@ +# 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" + +# ignore these events until someone needs them diff --git a/udev.spec b/udev.spec index a834b8b..4b7b852 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -276,6 +276,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 24 2006 Harald Hoyer - 084-6 +- put back original WAIT_FOR_SYSFS rule + * Fri Feb 24 2006 Harald Hoyer - 084-5 - removed WAIT_FOR_SYSFS rule From 82dd2151475f6f53456611c9d402cf12de6698d0 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 24 Feb 2006 23:23:09 +0000 Subject: [PATCH 199/640] - don't start udev in %post unless it's already running - turn udev off in %preun before chkconfig --del - changelog + release --- udev.spec | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index 4b7b852..a80b648 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -181,15 +181,23 @@ EOF %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then + if [ -x /sbin/pidof ]; then + pid=$(/sbin/pidof -x udevd) + if [ -n "$pid" ]; then + kill $pid + fi + fi /sbin/chkconfig --del udev fi exit 0 %post -if [ "$1" -ge "1" -a -x /sbin/pidof ]; then - pid=`/sbin/pidof -x udevd` - [ -n "$pid" ] && kill $pid - /sbin/udevd -d +if [ "$1" -ge "1" -a -x /sbin/pidof ]; then + pid=$(/sbin/pidof -x udevd) + if [ -n "$pid" ]; then + kill $pid + /sbin/udevd -d + fi fi exit 0 @@ -276,6 +284,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 24 2006 Peter Jones - 084-7 +- Don't start udevd in %%post unless it's already running +- Stop udevd before chkconfig --del in %%preun + * Fri Feb 24 2006 Harald Hoyer - 084-6 - put back original WAIT_FOR_SYSFS rule From 3892caa2214457ce588bc70eecf41fc6ac55abcc Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 24 Feb 2006 23:23:09 +0000 Subject: [PATCH 200/640] - don't start udev in %post unless it's already running - turn udev off in %preun before chkconfig --del - changelog + release --- udev.spec | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index 4b7b852..a80b648 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -181,15 +181,23 @@ EOF %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then + if [ -x /sbin/pidof ]; then + pid=$(/sbin/pidof -x udevd) + if [ -n "$pid" ]; then + kill $pid + fi + fi /sbin/chkconfig --del udev fi exit 0 %post -if [ "$1" -ge "1" -a -x /sbin/pidof ]; then - pid=`/sbin/pidof -x udevd` - [ -n "$pid" ] && kill $pid - /sbin/udevd -d +if [ "$1" -ge "1" -a -x /sbin/pidof ]; then + pid=$(/sbin/pidof -x udevd) + if [ -n "$pid" ]; then + kill $pid + /sbin/udevd -d + fi fi exit 0 @@ -276,6 +284,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Fri Feb 24 2006 Peter Jones - 084-7 +- Don't start udevd in %%post unless it's already running +- Stop udevd before chkconfig --del in %%preun + * Fri Feb 24 2006 Harald Hoyer - 084-6 - put back original WAIT_FOR_SYSFS rule From a4aecd4b459c4e9db61eeb3df25fb39717e84957 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 24 Feb 2006 23:40:51 +0000 Subject: [PATCH 201/640] - input from notting WRT pidof arguments --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index a80b648..069b74e 100644 --- a/udev.spec +++ b/udev.spec @@ -182,7 +182,7 @@ EOF %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then - pid=$(/sbin/pidof -x udevd) + pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid fi @@ -193,7 +193,7 @@ exit 0 %post if [ "$1" -ge "1" -a -x /sbin/pidof ]; then - pid=$(/sbin/pidof -x udevd) + pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid /sbin/udevd -d From 60b94c9c31e4114a6c52dc2564f3f084a0ff232e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 24 Feb 2006 23:40:51 +0000 Subject: [PATCH 202/640] - input from notting WRT pidof arguments --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index a80b648..069b74e 100644 --- a/udev.spec +++ b/udev.spec @@ -182,7 +182,7 @@ EOF %preun if [ $1 = 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then - pid=$(/sbin/pidof -x udevd) + pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid fi @@ -193,7 +193,7 @@ exit 0 %post if [ "$1" -ge "1" -a -x /sbin/pidof ]; then - pid=$(/sbin/pidof -x udevd) + pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid /sbin/udevd -d From c1a67e70a4827b8086172545ed47638b25b66d47 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Mar 2006 16:31:25 +0000 Subject: [PATCH 203/640] - fixed ZIP drive thrashing (bz #181041 #182601) - fixed enumeration (%e does not work anymore) (bz #183288) --- udev-extras.patch | 10 ---- udev-rules.patch | 122 +++++++++++++++++++++++++++++++--------------- udev.spec | 9 ++-- 3 files changed, 89 insertions(+), 52 deletions(-) diff --git a/udev-extras.patch b/udev-extras.patch index a4c0226..2e66d3c 100644 --- a/udev-extras.patch +++ b/udev-extras.patch @@ -41,16 +41,6 @@ + exit 1 +} --- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/extras/ide-media.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,0 +1,7 @@ -+#!/bin/bash -+i=0 -+while [[ ! -a /proc/ide/$1/media && $i -lt 10 ]]; do -+ /bin/usleep 100000; -+ i=$[i+1]; -+done -+/bin/cat /proc/ide/$1/media ---- /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 diff --git a/udev-rules.patch b/udev-rules.patch index 5b107d9..2d17ccb 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -36,16 +36,17 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-02-24 15:35:26.000000000 +0100 -@@ -3,6 +3,7 @@ ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:18:34.000000000 +0100 +@@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" # +-KERNEL="*", OWNER="root" GROUP="root", MODE="0600" + - KERNEL="*", OWNER="root" GROUP="root", MODE="0600" ++KERNEL=="*", OWNER="root" GROUP="root", MODE="0600" # all block devices -@@ -10,40 +11,44 @@ + SUBSYSTEM=="block", GROUP="disk", MODE="0640" KERNEL=="root", GROUP="disk", MODE="0640" # console devices @@ -136,82 +137,115 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -142,9 +153,10 @@ +@@ -142,9 +153,9 @@ KERNEL=="z90crypt", MODE="0666" # DVB -KERNEL=="dvb/*", MODE="0660" KERNEL=="dvb", MODE="0660" -KERNEL=="dvb/adapter*", MODE="0660" -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660" -+ -+ ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ ++ NAME="%c", MODE="0660" # create a symlink named after the device map name # note devmap_name comes with extras/multipath -@@ -209,7 +221,7 @@ - KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" - KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" - KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +@@ -179,8 +190,8 @@ + BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" + + KERNEL=="microcode", NAME="cpu/%k" +-KERNEL="msr[0-9]*", NAME="cpu/%n/msr" +-KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid" ++KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" ++KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" + + KERNEL=="ram1", SYMLINK+="ram" + KERNEL=="video0", SYMLINK+="video" +@@ -203,13 +214,12 @@ + KERNEL=="device-mapper", NAME="mapper/control" + + # old compat symlinks with enumeration +-KERNEL=="sr[0-9]*", SYMLINK+="cdrom%e" +-KERNEL=="scd[0-9]*", SYMLINK+="cdrom%e" +-KERNEL=="pcd[0-9]*", SYMLINK+="cdrom%e" +-KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" +-KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +-KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" -KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" -+KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="[36]", SYMLINK+="scanner%e", MODE="0660" ++KERNEL=="sr[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="scd[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="pcd[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" ++KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" ++KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,27 +233,30 @@ +@@ -221,27 +231,30 @@ KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" -BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" -+KERNEL="pktcdvd", NAME="%k/control" ++KERNEL=="pktcdvd", NAME="%k/control" + -+BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK+="scanner%e", MODE="0660" + -+BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" - # do not seperate the next 2 lines!! +-# do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ ++ SYSFS{device/media}=="floppy", \ ++ SYMLINK+="floppy-%k", OPTIONS+="ignore_remove, all_partitions" - KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" # rename sr* to scd* KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" - KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" +-KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" ++KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ ++ OPTIONS+="ignore_remove" -KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" ####################################### # Persistent block device stuff - begin -@@ -297,37 +312,36 @@ +@@ -256,7 +269,8 @@ + KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" + + # never access removable ide devices, the drivers are causing event loops on open() +-BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end" ++BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" ++BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" + + # by-id (hardware serial number) + KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" +@@ -297,37 +311,43 @@ # Persistent block device stuff - end ##################################### -ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" -+# workaround for devices which do not report media changes -+BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \ -+ ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" ++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_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644" - - # Perhaps this should just be for all subsystems? +ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias" +-# Perhaps this should just be for all subsystems? +- -ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ - RUN+="/sbin/modprobe $modalias" -ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ @@ -226,12 +260,17 @@ +# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC +# sr: 4 TYPE_WORM, 5 TYPE_ROM +# st/osst: 1 TYPE_TAPE -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" ++# sg: 8 changer, [36] scanner ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ ++ RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ ++ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ - RUN+="/sbin/modprobe sd_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ ++ ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ RUN+="/sbin/modprobe sd_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ @@ -239,6 +278,12 @@ RUN+="/sbin/modprobe sr_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ + ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ ++ SYMLINK+="scanner-%k", MODE="0660" ++ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ ++ SYMLINK+="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" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ @@ -249,9 +294,8 @@ RUN+="/sbin/modprobe st" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ - RUN+="/sbin/modprobe sg" -+ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" -+ -+RUN+="socket:/org/kernel/udev/monitor" -ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", \ - RUN+="/sbin/firmware_helper" ++RUN+="socket:/org/kernel/udev/monitor" ++ diff --git a/udev.spec b/udev.spec index 069b74e..39972b1 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -153,7 +153,7 @@ install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -for i in load_floppy_module.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do +for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done @@ -258,7 +258,6 @@ rm -rf $RPM_BUILD_ROOT %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}/ide-media.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh @@ -284,6 +283,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Mar 01 2006 Harald Hoyer - 084-8 +- fixed ZIP drive thrashing (bz #181041 #182601) +- fixed enumeration (%%e does not work anymore) (bz #183288) + * Fri Feb 24 2006 Peter Jones - 084-7 - Don't start udevd in %%post unless it's already running - Stop udevd before chkconfig --del in %%preun From 9becaa37c66251798ec91c8217e0d8bc96118540 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Mar 2006 16:31:25 +0000 Subject: [PATCH 204/640] - fixed ZIP drive thrashing (bz #181041 #182601) - fixed enumeration (%e does not work anymore) (bz #183288) --- udev-extras.patch | 10 ---- udev-rules.patch | 122 +++++++++++++++++++++++++++++++--------------- udev.spec | 9 ++-- 3 files changed, 89 insertions(+), 52 deletions(-) diff --git a/udev-extras.patch b/udev-extras.patch index a4c0226..2e66d3c 100644 --- a/udev-extras.patch +++ b/udev-extras.patch @@ -41,16 +41,6 @@ + exit 1 +} --- /dev/null 2006-02-07 10:47:25.401206250 +0100 -+++ udev-084/extras/ide-media.sh 2006-02-07 10:58:51.000000000 +0100 -@@ -0,0 +1,7 @@ -+#!/bin/bash -+i=0 -+while [[ ! -a /proc/ide/$1/media && $i -lt 10 ]]; do -+ /bin/usleep 100000; -+ i=$[i+1]; -+done -+/bin/cat /proc/ide/$1/media ---- /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 diff --git a/udev-rules.patch b/udev-rules.patch index 5b107d9..2d17ccb 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -36,16 +36,17 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-02-24 15:35:26.000000000 +0100 -@@ -3,6 +3,7 @@ ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:18:34.000000000 +0100 +@@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" # +-KERNEL="*", OWNER="root" GROUP="root", MODE="0600" + - KERNEL="*", OWNER="root" GROUP="root", MODE="0600" ++KERNEL=="*", OWNER="root" GROUP="root", MODE="0600" # all block devices -@@ -10,40 +11,44 @@ + SUBSYSTEM=="block", GROUP="disk", MODE="0640" KERNEL=="root", GROUP="disk", MODE="0640" # console devices @@ -136,82 +137,115 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -142,9 +153,10 @@ +@@ -142,9 +153,9 @@ KERNEL=="z90crypt", MODE="0666" # DVB -KERNEL=="dvb/*", MODE="0660" KERNEL=="dvb", MODE="0660" -KERNEL=="dvb/adapter*", MODE="0660" -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660" -+ -+ ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ ++ NAME="%c", MODE="0660" # create a symlink named after the device map name # note devmap_name comes with extras/multipath -@@ -209,7 +221,7 @@ - KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" - KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" - KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +@@ -179,8 +190,8 @@ + BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" + + KERNEL=="microcode", NAME="cpu/%k" +-KERNEL="msr[0-9]*", NAME="cpu/%n/msr" +-KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid" ++KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" ++KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" + + KERNEL=="ram1", SYMLINK+="ram" + KERNEL=="video0", SYMLINK+="video" +@@ -203,13 +214,12 @@ + KERNEL=="device-mapper", NAME="mapper/control" + + # old compat symlinks with enumeration +-KERNEL=="sr[0-9]*", SYMLINK+="cdrom%e" +-KERNEL=="scd[0-9]*", SYMLINK+="cdrom%e" +-KERNEL=="pcd[0-9]*", SYMLINK+="cdrom%e" +-KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" +-KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +-KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" -KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" -+KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="[36]", SYMLINK+="scanner%e", MODE="0660" ++KERNEL=="sr[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="scd[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="pcd[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" ++KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" ++KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,27 +233,30 @@ +@@ -221,27 +231,30 @@ KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" -BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" -+KERNEL="pktcdvd", NAME="%k/control" ++KERNEL=="pktcdvd", NAME="%k/control" + -+BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK+="scanner%e", MODE="0660" + -+BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="8", SYMLINK+="changer%e", MODE="0660" - # do not seperate the next 2 lines!! +-# do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ ++ SYSFS{device/media}=="floppy", \ ++ SYMLINK+="floppy-%k", OPTIONS+="ignore_remove, all_partitions" - KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" ++KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" # rename sr* to scd* KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" - KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" +-KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" ++KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ ++ OPTIONS+="ignore_remove" -KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" ####################################### # Persistent block device stuff - begin -@@ -297,37 +312,36 @@ +@@ -256,7 +269,8 @@ + KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" + + # never access removable ide devices, the drivers are causing event loops on open() +-BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end" ++BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" ++BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" + + # by-id (hardware serial number) + KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" +@@ -297,37 +311,43 @@ # Persistent block device stuff - end ##################################### -ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" -+# workaround for devices which do not report media changes -+BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \ -+ ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" ++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_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644" - - # Perhaps this should just be for all subsystems? +ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias" +-# Perhaps this should just be for all subsystems? +- -ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ - RUN+="/sbin/modprobe $modalias" -ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ @@ -226,12 +260,17 @@ +# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC +# sr: 4 TYPE_WORM, 5 TYPE_ROM +# st/osst: 1 TYPE_TAPE -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" ++# sg: 8 changer, [36] scanner ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ ++ RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" ++ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ ++ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ - RUN+="/sbin/modprobe sd_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ ++ ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" +ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ RUN+="/sbin/modprobe sd_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ @@ -239,6 +278,12 @@ RUN+="/sbin/modprobe sr_mod" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ + ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ ++ SYMLINK+="scanner-%k", MODE="0660" ++ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ ++ SYMLINK+="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" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ @@ -249,9 +294,8 @@ RUN+="/sbin/modprobe st" -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ - RUN+="/sbin/modprobe sg" -+ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" -+ -+RUN+="socket:/org/kernel/udev/monitor" -ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", \ - RUN+="/sbin/firmware_helper" ++RUN+="socket:/org/kernel/udev/monitor" ++ diff --git a/udev.spec b/udev.spec index 069b74e..39972b1 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -153,7 +153,7 @@ install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -for i in load_floppy_module.sh check-cdrom.sh ide-media.sh udevpermconv.sh; do +for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir} done @@ -258,7 +258,6 @@ rm -rf $RPM_BUILD_ROOT %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}/ide-media.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh @@ -284,6 +283,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Mar 01 2006 Harald Hoyer - 084-8 +- fixed ZIP drive thrashing (bz #181041 #182601) +- fixed enumeration (%%e does not work anymore) (bz #183288) + * Fri Feb 24 2006 Peter Jones - 084-7 - Don't start udevd in %%post unless it's already running - Stop udevd before chkconfig --del in %%preun From c3c5561cb287d0adc4ec52365e50be0d09b02979 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Mar 2006 17:09:15 +0000 Subject: [PATCH 205/640] *docs* - Enumeration for cdrom, floppy, scanner, changer is gone (no more /dev/cdrom1). udev now creates one device (cdrom, floppy, scanner, changer) for compatibility (random device wins) and e.g. for cdrom: e.g. /dev/cdrom -> hdd /dev/cdrom-hdc -> hdc /dev/cdrom-hdd -> hdd --- udev-rules.patch | 28 ++++++++++++++-------------- udev.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 2d17ccb..db5f87c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:18:34.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:49:38.000000000 +0100 @@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -171,9 +171,9 @@ -KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" -KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" -KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" -+KERNEL=="sr[0-9]*", SYMLINK+="cdrom-%k" -+KERNEL=="scd[0-9]*", SYMLINK+="cdrom-%k" -+KERNEL=="pcd[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k" +KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" +KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" +KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" @@ -193,25 +193,25 @@ -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ + SYSFS{device/media}=="floppy", \ -+ SYMLINK+="floppy-%k", OPTIONS+="ignore_remove, all_partitions" ++ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom cdrom-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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" # rename sr* to scd* KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" @@ -279,10 +279,10 @@ -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ + +ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ -+ SYMLINK+="scanner-%k", MODE="0660" ++ SYMLINK+="scanner scanner-%k", MODE="0660" + +ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ -+ SYMLINK+="changer-%k", MODE="0660", GROUP="disk" ++ 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" diff --git a/udev.spec b/udev.spec index 39972b1..803558c 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Mar 01 2006 Harald Hoyer - 084-9 +- create non-enum device (cdrom, floppy, scanner, changer) + for compatibility (random device wins) + e.g. /dev/cdrom -> hdd + /dev/cdrom-hdc -> hdc + /dev/cdrom-hdd -> hdd + * Wed Mar 01 2006 Harald Hoyer - 084-8 - fixed ZIP drive thrashing (bz #181041 #182601) - fixed enumeration (%%e does not work anymore) (bz #183288) From 2df070cad8d9688c63f58dd36e833b8de625683c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Mar 2006 17:09:15 +0000 Subject: [PATCH 206/640] *docs* - Enumeration for cdrom, floppy, scanner, changer is gone (no more /dev/cdrom1). udev now creates one device (cdrom, floppy, scanner, changer) for compatibility (random device wins) and e.g. for cdrom: e.g. /dev/cdrom -> hdd /dev/cdrom-hdc -> hdc /dev/cdrom-hdd -> hdd --- udev-rules.patch | 28 ++++++++++++++-------------- udev.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 2d17ccb..db5f87c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:18:34.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:49:38.000000000 +0100 @@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -171,9 +171,9 @@ -KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" -KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" -KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" -+KERNEL=="sr[0-9]*", SYMLINK+="cdrom-%k" -+KERNEL=="scd[0-9]*", SYMLINK+="cdrom-%k" -+KERNEL=="pcd[0-9]*", SYMLINK+="cdrom-%k" ++KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k" +KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" +KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" +KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" @@ -193,25 +193,25 @@ -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ + SYSFS{device/media}=="floppy", \ -+ SYMLINK+="floppy-%k", OPTIONS+="ignore_remove, all_partitions" ++ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom cdrom-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", SYMLINK+="cdwriter-%k cdrw-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter-%k dvdrw-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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" # rename sr* to scd* KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" @@ -279,10 +279,10 @@ -ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ + +ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ -+ SYMLINK+="scanner-%k", MODE="0660" ++ SYMLINK+="scanner scanner-%k", MODE="0660" + +ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ -+ SYMLINK+="changer-%k", MODE="0660", GROUP="disk" ++ 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" diff --git a/udev.spec b/udev.spec index 39972b1..803558c 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Mar 01 2006 Harald Hoyer - 084-9 +- create non-enum device (cdrom, floppy, scanner, changer) + for compatibility (random device wins) + e.g. /dev/cdrom -> hdd + /dev/cdrom-hdc -> hdc + /dev/cdrom-hdd -> hdd + * Wed Mar 01 2006 Harald Hoyer - 084-8 - fixed ZIP drive thrashing (bz #181041 #182601) - fixed enumeration (%%e does not work anymore) (bz #183288) From a0ba0ae9a3f786a123b01ab9ea391b829c5cad7b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 2 Mar 2006 07:33:00 +0000 Subject: [PATCH 207/640] fixed cdrom rule --- udev-rules.patch | 10 +++++----- udev.spec | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index db5f87c..2b2e1f6 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-24 08:17:39.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-02 08:29:54.000000000 +0100 @@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" @@ -20,11 +20,11 @@ + +LABEL="hotplug_end" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-24 08:17:39.000000000 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-02 08:29:54.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 17:11:23.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-02 08:29:54.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent +ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:49:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-02 08:30:33.000000000 +0100 @@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -196,7 +196,7 @@ + SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" diff --git a/udev.spec b/udev.spec index 803558c..d0255c3 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Mar 02 2006 Harald Hoyer - 084-10 +- fixed cdrom rule + * Wed Mar 01 2006 Harald Hoyer - 084-9 - create non-enum device (cdrom, floppy, scanner, changer) for compatibility (random device wins) From 4f5a6fab69147fab80692bcdba57c05aba37fb8e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 2 Mar 2006 07:33:00 +0000 Subject: [PATCH 208/640] fixed cdrom rule --- udev-rules.patch | 10 +++++----- udev.spec | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index db5f87c..2b2e1f6 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-02-24 08:17:39.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-02 08:29:54.000000000 +0100 @@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" @@ -20,11 +20,11 @@ + +LABEL="hotplug_end" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-02-24 08:17:39.000000000 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-02 08:29:54.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-02-24 17:11:23.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-02 08:29:54.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent +ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-01 17:49:38.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-02 08:30:33.000000000 +0100 @@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -196,7 +196,7 @@ + SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k CDROM", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" diff --git a/udev.spec b/udev.spec index 803558c..d0255c3 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Mar 02 2006 Harald Hoyer - 084-10 +- fixed cdrom rule + * Wed Mar 01 2006 Harald Hoyer - 084-9 - create non-enum device (cdrom, floppy, scanner, changer) for compatibility (random device wins) From 92075f0849aa91ce851ab7be50e38e6652e3257e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 5 Mar 2006 05:42:06 +0000 Subject: [PATCH 209/640] $modalias is deprecated in favor of $env{MODALIAS}. And it appears to break with things that only have MODALIAS in the environment, as opposed to sysfs files. Such as, say, firewire. (#181494) --- udev-rules.patch | 2 +- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 2b2e1f6..e1868c8 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -242,7 +242,7 @@ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" -+ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias" ++ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" -# Perhaps this should just be for all subsystems? - diff --git a/udev.spec b/udev.spec index d0255c3..04bbfa2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 10 +Release: 11 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Sum Mar 05 2006 Bill Nottingham - 084-11 +- use $ENV{MODALIAS}, not $modalias (#181494) + * Thu Mar 02 2006 Harald Hoyer - 084-10 - fixed cdrom rule From ebe26124beefe94cdbfd8e33b3c3ed39f18a5b02 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 5 Mar 2006 05:42:06 +0000 Subject: [PATCH 210/640] $modalias is deprecated in favor of $env{MODALIAS}. And it appears to break with things that only have MODALIAS in the environment, as opposed to sysfs files. Such as, say, firewire. (#181494) --- udev-rules.patch | 2 +- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 2b2e1f6..e1868c8 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -242,7 +242,7 @@ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" -+ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias" ++ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" -# Perhaps this should just be for all subsystems? - diff --git a/udev.spec b/udev.spec index d0255c3..04bbfa2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 10 +Release: 11 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Sum Mar 05 2006 Bill Nottingham - 084-11 +- use $ENV{MODALIAS}, not $modalias (#181494) + * Thu Mar 02 2006 Harald Hoyer - 084-10 - fixed cdrom rule From dde4b309c0d9415efce892c81f6bd6e51948b4ec Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 5 Mar 2006 05:43:08 +0000 Subject: [PATCH 211/640] type much? --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 04bbfa2..6ff8b18 100644 --- a/udev.spec +++ b/udev.spec @@ -283,7 +283,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Sum Mar 05 2006 Bill Nottingham - 084-11 +* Sun Mar 05 2006 Bill Nottingham - 084-11 - use $ENV{MODALIAS}, not $modalias (#181494) * Thu Mar 02 2006 Harald Hoyer - 084-10 From a826011309e176037d905ce2582747e5895864f6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 5 Mar 2006 05:43:08 +0000 Subject: [PATCH 212/640] type much? --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 04bbfa2..6ff8b18 100644 --- a/udev.spec +++ b/udev.spec @@ -283,7 +283,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog -* Sum Mar 05 2006 Bill Nottingham - 084-11 +* Sun Mar 05 2006 Bill Nottingham - 084-11 - use $ENV{MODALIAS}, not $modalias (#181494) * Thu Mar 02 2006 Harald Hoyer - 084-10 From 208737699c6b8097b84ee2cb8b2bb74325fd01af Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 5 Mar 2006 05:59:32 +0000 Subject: [PATCH 213/640] need ENV{MODALIAS} as well --- udev-rules.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index e1868c8..6cc2bbd 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -242,7 +242,7 @@ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" -+ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" -# Perhaps this should just be for all subsystems? - @@ -252,7 +252,8 @@ - RUN+="/sbin/modprobe $modalias" -ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ - RUN+="/sbin/modprobe $modalias" - ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ +-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ ++ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" -ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ From 090431059467965d1abf162d82f131609335877f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 5 Mar 2006 05:59:32 +0000 Subject: [PATCH 214/640] need ENV{MODALIAS} as well --- udev-rules.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index e1868c8..6cc2bbd 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -242,7 +242,7 @@ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" -+ACTION=="add", SUBSYSTEM=="?*", MODALIAS=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" -# Perhaps this should just be for all subsystems? - @@ -252,7 +252,8 @@ - RUN+="/sbin/modprobe $modalias" -ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ - RUN+="/sbin/modprobe $modalias" - ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ +-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ ++ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" -ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ From 764b5c7e237276297b9b99cc170f51509d89ed5a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 6 Mar 2006 15:35:13 +0000 Subject: [PATCH 215/640] fixed DRI permissions --- udev-rules.patch | 36 ++++++++++++++++++++++++++---------- udev.spec | 5 ++++- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 6cc2bbd..c490dcd 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-02 08:29:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-06 13:55:18.000000000 +0100 @@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" @@ -20,11 +20,11 @@ + +LABEL="hotplug_end" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-02 08:29:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-06 13:55:18.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-02 08:29:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-06 13:55:18.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent +ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-02 08:30:33.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-06 14:56:28.000000000 +0100 @@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -137,7 +137,16 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -142,9 +153,9 @@ +@@ -131,7 +142,7 @@ + # dri devices + KERNEL=="nvidia*", MODE="0660" + KERNEL=="3dfx*", MODE="0660" +-KERNEL=="dri/*", MODE="0666" ++KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" + + # usb devices + KERNEL=="usb/dabusb*", MODE="0660" +@@ -142,16 +153,14 @@ KERNEL=="z90crypt", MODE="0666" # DVB @@ -149,7 +158,14 @@ # create a symlink named after the device map name # note devmap_name comes with extras/multipath -@@ -179,8 +190,8 @@ + #KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" + +-# DRI devices always go into a subdirectory (as per the LSB spec) +-KERNEL=="card*", NAME="dri/card%n" + + # alsa devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +@@ -179,8 +188,8 @@ BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" KERNEL=="microcode", NAME="cpu/%k" @@ -160,7 +176,7 @@ KERNEL=="ram1", SYMLINK+="ram" KERNEL=="video0", SYMLINK+="video" -@@ -203,13 +214,12 @@ +@@ -203,13 +212,12 @@ KERNEL=="device-mapper", NAME="mapper/control" # old compat symlinks with enumeration @@ -180,7 +196,7 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,27 +231,30 @@ +@@ -221,27 +229,30 @@ KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" @@ -223,7 +239,7 @@ ####################################### # Persistent block device stuff - begin -@@ -256,7 +269,8 @@ +@@ -256,7 +267,8 @@ KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" # never access removable ide devices, the drivers are causing event loops on open() @@ -233,7 +249,7 @@ # by-id (hardware serial number) KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" -@@ -297,37 +311,43 @@ +@@ -297,37 +309,43 @@ # Persistent block device stuff - end ##################################### diff --git a/udev.spec b/udev.spec index 6ff8b18..f9999bb 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 11 +Release: 12 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Mar 06 2006 Harald Hoyer - 084-12 +- fixed DRI permissions + * Sun Mar 05 2006 Bill Nottingham - 084-11 - use $ENV{MODALIAS}, not $modalias (#181494) From 9a32ee02ac45466cae61030d85da86864182ee3a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 6 Mar 2006 15:35:13 +0000 Subject: [PATCH 216/640] fixed DRI permissions --- udev-rules.patch | 36 ++++++++++++++++++++++++++---------- udev.spec | 5 ++++- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 6cc2bbd..c490dcd 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-02 08:29:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-06 13:55:18.000000000 +0100 @@ -1,8 +1,15 @@ # do not call hotplug.d and dev.d for "drivers" and "module" events -SUBSYSTEM=="drivers", OPTIONS="last_rule" @@ -20,11 +20,11 @@ + +LABEL="hotplug_end" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-02 08:29:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-06 13:55:18.000000000 +0100 @@ -0,0 +1 @@ +ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" --- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-02 08:29:54.000000000 +0100 ++++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-06 13:55:18.000000000 +0100 @@ -0,0 +1,9 @@ +# sysfs is populated after the event is sent +ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" @@ -36,7 +36,7 @@ + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" --- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-02 08:30:33.000000000 +0100 ++++ udev-084/etc/udev/redhat/udev.rules 2006-03-06 14:56:28.000000000 +0100 @@ -3,47 +3,52 @@ # # default is OWNER="root" GROUP="root", MODE="0600" @@ -137,7 +137,16 @@ # audio devices KERNEL=="dsp*", MODE="0660" -@@ -142,9 +153,9 @@ +@@ -131,7 +142,7 @@ + # dri devices + KERNEL=="nvidia*", MODE="0660" + KERNEL=="3dfx*", MODE="0660" +-KERNEL=="dri/*", MODE="0666" ++KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" + + # usb devices + KERNEL=="usb/dabusb*", MODE="0660" +@@ -142,16 +153,14 @@ KERNEL=="z90crypt", MODE="0666" # DVB @@ -149,7 +158,14 @@ # create a symlink named after the device map name # note devmap_name comes with extras/multipath -@@ -179,8 +190,8 @@ + #KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" + +-# DRI devices always go into a subdirectory (as per the LSB spec) +-KERNEL=="card*", NAME="dri/card%n" + + # alsa devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +@@ -179,8 +188,8 @@ BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" KERNEL=="microcode", NAME="cpu/%k" @@ -160,7 +176,7 @@ KERNEL=="ram1", SYMLINK+="ram" KERNEL=="video0", SYMLINK+="video" -@@ -203,13 +214,12 @@ +@@ -203,13 +212,12 @@ KERNEL=="device-mapper", NAME="mapper/control" # old compat symlinks with enumeration @@ -180,7 +196,7 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,27 +231,30 @@ +@@ -221,27 +229,30 @@ KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" @@ -223,7 +239,7 @@ ####################################### # Persistent block device stuff - begin -@@ -256,7 +269,8 @@ +@@ -256,7 +267,8 @@ KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" # never access removable ide devices, the drivers are causing event loops on open() @@ -233,7 +249,7 @@ # by-id (hardware serial number) KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" -@@ -297,37 +311,43 @@ +@@ -297,37 +309,43 @@ # Persistent block device stuff - end ##################################### diff --git a/udev.spec b/udev.spec index 6ff8b18..f9999bb 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 11 +Release: 12 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -283,6 +283,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Mon Mar 06 2006 Harald Hoyer - 084-12 +- fixed DRI permissions + * Sun Mar 05 2006 Bill Nottingham - 084-11 - use $ENV{MODALIAS}, not $modalias (#181494) From 100cc6a6c9e51b49546610556783e8627c27fb3a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 8 Mar 2006 10:14:43 +0000 Subject: [PATCH 217/640] fixed pam_console rule --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f9999bb..ae36b7e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 12 +Release: 13 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -141,6 +141,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} 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/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 # Backwards compat install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules @@ -267,6 +268,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -283,6 +285,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Mar 08 2006 Harald Hoyer - 084-13 +- fixed pam_console rules (#182600) + * Mon Mar 06 2006 Harald Hoyer - 084-12 - fixed DRI permissions From 48e0255fe1551a09244fbbaea33ada300594119e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 8 Mar 2006 10:14:43 +0000 Subject: [PATCH 218/640] fixed pam_console rule --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index f9999bb..ae36b7e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 084 -Release: 12 +Release: 13 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -141,6 +141,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} 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/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 # Backwards compat install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules @@ -267,6 +268,7 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules +%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug @@ -283,6 +285,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Mar 08 2006 Harald Hoyer - 084-13 +- fixed pam_console rules (#182600) + * Mon Mar 06 2006 Harald Hoyer - 084-12 - fixed DRI permissions From 91c5ea6ed84f25f0792728dd1e49ec54b3bcc32b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 08:46:43 +0000 Subject: [PATCH 219/640] - version 089 - do not force loading of parport_pc (bug #186850) - manually load snd-powermac (bug #176761) - added usb floppy symlink (bug #185171) - start_udev uses udevtrigger now instead of udevstart --- .cvsignore | 2 +- sources | 2 +- start_udev | 2 +- udev-089-last_modalias.patch | 68 +++++++ udev-089-nopie.patch | 11 ++ udev-089.tar.bz2.sign | 8 + udev-rules.patch | 348 ++++------------------------------- udev.spec | 61 ++++-- upstream | 2 +- 9 files changed, 173 insertions(+), 331 deletions(-) create mode 100644 udev-089-last_modalias.patch create mode 100644 udev-089-nopie.patch create mode 100644 udev-089.tar.bz2.sign diff --git a/.cvsignore b/.cvsignore index 53dafbc..2d45884 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-084.tar.bz2 +udev-089.tar.bz2 diff --git a/sources b/sources index 3f7295b..ba3bfd1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -143b3691ae5e6f96995e5749894f78e4 udev-084.tar.bz2 +ed2d885527da9c5f72abd9a43cb1af98 udev-089.tar.bz2 diff --git a/start_udev b/start_udev index 69e627f..6c0248c 100755 --- a/start_udev +++ b/start_udev @@ -166,7 +166,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug /sbin/udevd -d ret=$[$ret + $?] - /sbin/udevstart + /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue ret=$[$ret + $?] diff --git a/udev-089-last_modalias.patch b/udev-089-last_modalias.patch new file mode 100644 index 0000000..63886c2 --- /dev/null +++ b/udev-089-last_modalias.patch @@ -0,0 +1,68 @@ +--- udev-089/udevtrigger.c.last_modalias 2006-04-03 14:41:10.000000000 +0200 ++++ udev-089/udevtrigger.c 2006-04-13 08:11:59.000000000 +0200 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "udev.h" + +@@ -67,10 +68,46 @@ + 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, ++}; ++ ++ + LIST_HEAD(device_first_list); + LIST_HEAD(device_default_list); + LIST_HEAD(device_last_list); + ++ ++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) + { + struct list_head *device_list = &device_default_list; +@@ -87,6 +124,10 @@ + device_list = &device_last_list; + break; + } ++ if (modalias_is_greylisted(path)) { ++ device_list = &device_last_list; ++ break; ++ } + } + + dbg("add '%s'" , path); diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch new file mode 100644 index 0000000..01e5791 --- /dev/null +++ b/udev-089-nopie.patch @@ -0,0 +1,11 @@ +--- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-12 15:03:07.000000000 +0200 ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-12 15:03:19.000000000 +0200 +@@ -78,7 +78,7 @@ + + $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) + $(E) " CC " $@ +- $(Q) $(CC) -shared $(CFLAGS) -o $@ \ ++ $(Q) $(LD) -shared -o $@ \ + -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ + $(addprefix .shlib/,$(OBJS)) + $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) diff --git a/udev-089.tar.bz2.sign b/udev-089.tar.bz2.sign new file mode 100644 index 0000000..5bd8278 --- /dev/null +++ b/udev-089.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2.2 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBEMVclyGugalF9Dw4RAkuzAJ9u9BKZ86Pv/KLYSK5bJyhXACMCEACdFEjl +e0bVNMtNCImQEiK8abUsIQw= +=Gyt7 +-----END PGP SIGNATURE----- diff --git a/udev-rules.patch b/udev-rules.patch index c490dcd..bd57b54 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,318 +1,46 @@ ---- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-06 13:55:18.000000000 +0100 -@@ -1,8 +1,15 @@ - # do not call hotplug.d and dev.d for "drivers" and "module" events --SUBSYSTEM=="drivers", OPTIONS="last_rule" --SUBSYSTEM=="module", OPTIONS="last_rule" -+SUBSYSTEM=="drivers", GOTO="hotplug_end" -+SUBSYSTEM=="module", GOTO="hotplug_end" -+ACTION="add", GOTO="hotplug_comp" -+ACTION="remove", GOTO="hotplug_comp" - -+GOTO="hotplug_end" -+ -+LABEL="hotplug_comp" - # compatibility support for the obsolete hotplug.d and dev.d directories --ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" -+ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" - RUN+="/lib/udev/udev_run_devd" - -+ -+LABEL="hotplug_end" ---- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-06 13:55:18.000000000 +0100 -@@ -0,0 +1 @@ -+ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" ---- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-06 13:55:18.000000000 +0100 -@@ -0,0 +1,9 @@ -+# 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" -+ -+# ignore these events until someone needs them -+SUBSYSTEM=="drivers", OPTIONS="ignore_device" -+SUBSYSTEM=="module", OPTIONS="ignore_device" -+ -+ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" ---- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-06 14:56:28.000000000 +0100 -@@ -3,47 +3,52 @@ - # - # 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", MODE="0666", OPTIONS="last_rule" --KERNEL=="console", MODE="0600", OPTIONS="last_rule" --KERNEL=="tty[0-9]", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="tty[0-9][0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="vc/[0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+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" - - # pty devices - # Set this to 0660 if you only want users belonging to tty group - # to be able to allocate PTYs --KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="pty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="tty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="pty/m*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="vc/s*", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+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" - - # serial+dialup devices --KERNEL=="ttyS*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" --KERNEL=="ttyACM*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" --KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" --KERNEL=="ippp*", MODE="0660" --KERNEL=="isdn*", MODE="0660" --KERNEL=="isdnctrl*", MODE="0660" --KERNEL=="capi*", MODE="0660" --KERNEL=="dcbri*", MODE="0660" --KERNEL=="ircomm*", GROUP="uucp", MODE="0660" --KERNEL=="tts/[0-9]*", GROUP="uucp", MODE="0660" --KERNEL=="tts/USB[0-9]*", GROUP="uucp", MODE="0660" -+KERNEL=="ippp*", NAME="%k", MODE="0660" -+KERNEL=="isdn*", NAME="%k", MODE="0660" -+KERNEL=="isdnctrl*", NAME="%k", MODE="0660" -+KERNEL=="capi*", NAME="%k", MODE="0660" -+KERNEL=="dcbri*", NAME="%k", MODE="0660" -+KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" -+KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" - - # vc devices --KERNEL=="vcs", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcsa", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -+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" - - # memory devices - KERNEL=="random", MODE="0666", OPTIONS="last_rule" -@@ -54,6 +59,8 @@ - KERNEL=="full", MODE="0666", OPTIONS="last_rule" - KERNEL=="null", MODE="0666", OPTIONS="last_rule" - KERNEL=="zero", MODE="0666", OPTIONS="last_rule" -+# 183 = /dev/hwrng Generic random number generator -+KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" - - # misc devices - KERNEL=="nvram", MODE="0660" -@@ -61,6 +68,10 @@ - - # 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", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k" -+KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'" - - # audio devices - KERNEL=="dsp*", MODE="0660" -@@ -131,7 +142,7 @@ - # dri devices - KERNEL=="nvidia*", MODE="0660" - KERNEL=="3dfx*", MODE="0660" --KERNEL=="dri/*", MODE="0666" -+KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" - - # usb devices - KERNEL=="usb/dabusb*", MODE="0660" -@@ -142,16 +153,14 @@ - KERNEL=="z90crypt", MODE="0666" - - # DVB --KERNEL=="dvb/*", MODE="0660" - KERNEL=="dvb", MODE="0660" --KERNEL=="dvb/adapter*", MODE="0660" -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ -+ NAME="%c", MODE="0660" - - # create a symlink named after the device map name - # note devmap_name comes with extras/multipath - #KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" - --# DRI devices always go into a subdirectory (as per the LSB spec) --KERNEL=="card*", NAME="dri/card%n" - - # alsa devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -179,8 +188,8 @@ - BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" - - KERNEL=="microcode", NAME="cpu/%k" --KERNEL="msr[0-9]*", NAME="cpu/%n/msr" --KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid" -+KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -+KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" - - KERNEL=="ram1", SYMLINK+="ram" - KERNEL=="video0", SYMLINK+="video" -@@ -203,13 +212,12 @@ - KERNEL=="device-mapper", NAME="mapper/control" - - # old compat symlinks with enumeration --KERNEL=="sr[0-9]*", SYMLINK+="cdrom%e" --KERNEL=="scd[0-9]*", SYMLINK+="cdrom%e" --KERNEL=="pcd[0-9]*", SYMLINK+="cdrom%e" --KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" --KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" --KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" --KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" -+KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" -+KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -+KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - - KERNEL=="umad*", NAME="infiniband/%k" - KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,27 +229,30 @@ - KERNEL=="zappseudo", NAME="zap/pseudo" - KERNEL=="zap[0-9]*", NAME="zap/%n" - --BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" -+KERNEL=="pktcdvd", NAME="%k/control" -+ -+ - --# do not seperate the next 2 lines!! --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ -+ SYSFS{device/media}=="floppy", \ -+ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" - --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" - --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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" - - # rename sr* to scd* - KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" --KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" -+KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ -+ OPTIONS+="ignore_remove" - --KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" - - ####################################### - # Persistent block device stuff - begin -@@ -256,7 +267,8 @@ - KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" - - # never access removable ide devices, the drivers are causing event loops on open() --BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end" -+BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" -+BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" +--- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-12 15:27:32.000000000 +0200 ++++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-12 15:29:35.000000000 +0200 +@@ -271,15 +271,15 @@ + BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" # by-id (hardware serial number) - KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" -@@ -297,37 +309,43 @@ - # Persistent block device stuff - end - ##################################### +-KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" ++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" --ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" -+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" + KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode" +-KERNEL=="dasd*[!0-9]", IMPORT{program}="/sbin/dasd_id --export $tempnode" ++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}" -+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + # for partitions import parent information +@@ -287,19 +287,19 @@ + KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" --# Perhaps this should just be for all subsystems? -- --ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" --ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" --ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" --ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ -+ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ - RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + # by-path (shortest physical path) +-KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_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" --ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" -+# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC -+# sr: 4 TYPE_WORM, 5 TYPE_ROM -+# st/osst: 1 TYPE_TAPE -+# sg: 8 changer, [36] scanner -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ -+ RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ -+ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + # by-label/by-uuid (filesystem properties) + KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end" +-IMPORT{program}="/sbin/vol_id --export $tempnode" ++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}" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ -- RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ -+ -+ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ - RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ - RUN+="/sbin/modprobe sr_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ -+ SYMLINK+="scanner scanner-%k", MODE="0660" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ -+ 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" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ - SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="On[sS]tream", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ - RUN+="/sbin/modprobe st" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ -- RUN+="/sbin/modprobe sg" + # BIOS Enhanced Disk Device +-KERNEL=="*[!0-9]", IMPORT{program}="/sbin/edd_id --export $tempnode" ++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" --ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", \ -- RUN+="/sbin/firmware_helper" -+RUN+="socket:/org/kernel/udev/monitor" -+ diff --git a/udev.spec b/udev.spec index ae36b7e..3a20dbf 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 084 -Release: 13 +Version: 089 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -19,10 +19,12 @@ Source10: firmware_helper.c Patch1: udev-permconv.patch Patch2: udev-rules.patch -Patch3: udevstart2.patch +#Patch3: udevstart2.patch Patch4: udev-084-floppy.patch Patch5: udev-extras.patch Patch6: udev-084-pg.patch +Patch7: udev-089-nopie.patch +Patch8: udev-089-last_modalias.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -44,10 +46,12 @@ userspace using sysfs and netlink. %setup -q %patch1 -p1 -b .rhpermconv %patch2 -p1 -b .rhrules -%patch3 -p1 -b .rhudevstart +#%patch3 -p1 -b .rhudevstart %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras %patch6 -p1 -b .pg +%patch7 -p1 -b .nopie +%patch8 -p1 -b .last_modalias %build @@ -64,6 +68,7 @@ make \ extras/ata_id \ extras/usb_id \ extras/edd_id \ + extras/path_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -74,12 +79,14 @@ mv udevd udevd.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static +mv extras/path_id/path_id extras/path_id/path_id.static %ifarch s390 s390x mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static %endif mv extras/usb_id/usb_id extras/usb_id/usb_id.static mv extras/volume_id/vol_id extras/volume_id/vol_id.static make clean +make E='@echo' Q='@' -C extras/volume_id/lib clean make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_KLIBC=false \ @@ -111,11 +118,13 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id mv extras/ata_id/ata_id.static extras/ata_id/ata_id mv extras/edd_id/edd_id.static extras/edd_id/edd_id +mv extras/path_id/path_id.static extras/path_id/path_id %ifarch s390 s390x mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id %endif mv extras/usb_id/usb_id.static extras/usb_id/usb_id mv extras/volume_id/vol_id.static extras/volume_id/vol_id +touch extras/volume_id/vol_id make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ @@ -123,6 +132,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/ata_id \ extras/usb_id \ extras/edd_id \ + extras/path_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -140,10 +150,10 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} 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/udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.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 # Backwards compat -install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules +install -m 0644 etc/udev/redhat/51-hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf @@ -162,19 +172,27 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev -install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id +#install -m 0644 extras/path_id/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin -install -m 0755 udevstart $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/lib/firmware +pushd $RPM_BUILD_ROOT +rm -f usr/include/libvolume_id.h \ + usr/lib*/libvolume_id.a \ + usr/lib*/libvolume_id.so \ + usr/lib*/pkgconfig/libvolume_id.pc \ + lib*/libvolume_id.* +popd + # 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 done EOF @@ -222,26 +240,28 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* -%doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd -%attr(0755,root,root) /sbin/udevstart +%attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) %{udev_scriptdir}/udev_run_devd %attr(0755,root,root) %{udev_scriptdir}/udev_run_hotplugd %attr(755,root,root) /sbin/scsi_id -%attr(755,root,root) /sbin/ata_id -%attr(755,root,root) /sbin/edd_id -%attr(755,root,root) /sbin/usb_id -%attr(755,root,root) /sbin/vol_id -%attr(755,root,root) /sbin/path_id +%attr(755,root,root) %{udev_scriptdir}/scsi_id +%attr(755,root,root) %{udev_scriptdir}/ata_id +%attr(755,root,root) %{udev_scriptdir}/edd_id +%attr(755,root,root) %{udev_scriptdir}/usb_id +%attr(755,root,root) %{udev_scriptdir}/vol_id +%attr(755,root,root) %{udev_scriptdir}/path_id %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 %attr(755,root,root) /sbin/firmware_helper +#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0 +#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0.61.0 %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -285,6 +305,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Apr 13 2006 Harald Hoyer - 089-1 +- version 089 +- do not force loading of parport_pc (bug #186850) +- manually load snd-powermac (bug #176761) +- added usb floppy symlink (bug #185171) +- start_udev uses udevtrigger now instead of udevstart + * Wed Mar 08 2006 Harald Hoyer - 084-13 - fixed pam_console rules (#182600) diff --git a/upstream b/upstream index 53dafbc..2d45884 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-084.tar.bz2 +udev-089.tar.bz2 From 7206c443f241f085bf1a64a296060bf1d24ec21e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 08:46:43 +0000 Subject: [PATCH 220/640] - version 089 - do not force loading of parport_pc (bug #186850) - manually load snd-powermac (bug #176761) - added usb floppy symlink (bug #185171) - start_udev uses udevtrigger now instead of udevstart --- .cvsignore | 2 +- sources | 2 +- start_udev | 2 +- udev-089-last_modalias.patch | 68 +++++++ udev-089-nopie.patch | 11 ++ udev-089.tar.bz2.sign | 8 + udev-rules.patch | 348 ++++------------------------------- udev.spec | 61 ++++-- upstream | 2 +- 9 files changed, 173 insertions(+), 331 deletions(-) create mode 100644 udev-089-last_modalias.patch create mode 100644 udev-089-nopie.patch create mode 100644 udev-089.tar.bz2.sign diff --git a/.cvsignore b/.cvsignore index 53dafbc..2d45884 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-084.tar.bz2 +udev-089.tar.bz2 diff --git a/sources b/sources index 3f7295b..ba3bfd1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -143b3691ae5e6f96995e5749894f78e4 udev-084.tar.bz2 +ed2d885527da9c5f72abd9a43cb1af98 udev-089.tar.bz2 diff --git a/start_udev b/start_udev index 69e627f..6c0248c 100755 --- a/start_udev +++ b/start_udev @@ -166,7 +166,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug /sbin/udevd -d ret=$[$ret + $?] - /sbin/udevstart + /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue ret=$[$ret + $?] diff --git a/udev-089-last_modalias.patch b/udev-089-last_modalias.patch new file mode 100644 index 0000000..63886c2 --- /dev/null +++ b/udev-089-last_modalias.patch @@ -0,0 +1,68 @@ +--- udev-089/udevtrigger.c.last_modalias 2006-04-03 14:41:10.000000000 +0200 ++++ udev-089/udevtrigger.c 2006-04-13 08:11:59.000000000 +0200 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "udev.h" + +@@ -67,10 +68,46 @@ + 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, ++}; ++ ++ + LIST_HEAD(device_first_list); + LIST_HEAD(device_default_list); + LIST_HEAD(device_last_list); + ++ ++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) + { + struct list_head *device_list = &device_default_list; +@@ -87,6 +124,10 @@ + device_list = &device_last_list; + break; + } ++ if (modalias_is_greylisted(path)) { ++ device_list = &device_last_list; ++ break; ++ } + } + + dbg("add '%s'" , path); diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch new file mode 100644 index 0000000..01e5791 --- /dev/null +++ b/udev-089-nopie.patch @@ -0,0 +1,11 @@ +--- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-12 15:03:07.000000000 +0200 ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-12 15:03:19.000000000 +0200 +@@ -78,7 +78,7 @@ + + $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) + $(E) " CC " $@ +- $(Q) $(CC) -shared $(CFLAGS) -o $@ \ ++ $(Q) $(LD) -shared -o $@ \ + -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ + $(addprefix .shlib/,$(OBJS)) + $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) diff --git a/udev-089.tar.bz2.sign b/udev-089.tar.bz2.sign new file mode 100644 index 0000000..5bd8278 --- /dev/null +++ b/udev-089.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2.2 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBEMVclyGugalF9Dw4RAkuzAJ9u9BKZ86Pv/KLYSK5bJyhXACMCEACdFEjl +e0bVNMtNCImQEiK8abUsIQw= +=Gyt7 +-----END PGP SIGNATURE----- diff --git a/udev-rules.patch b/udev-rules.patch index c490dcd..bd57b54 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,318 +1,46 @@ ---- udev-084/etc/udev/redhat/hotplug.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/hotplug.rules 2006-03-06 13:55:18.000000000 +0100 -@@ -1,8 +1,15 @@ - # do not call hotplug.d and dev.d for "drivers" and "module" events --SUBSYSTEM=="drivers", OPTIONS="last_rule" --SUBSYSTEM=="module", OPTIONS="last_rule" -+SUBSYSTEM=="drivers", GOTO="hotplug_end" -+SUBSYSTEM=="module", GOTO="hotplug_end" -+ACTION="add", GOTO="hotplug_comp" -+ACTION="remove", GOTO="hotplug_comp" - -+GOTO="hotplug_end" -+ -+LABEL="hotplug_comp" - # compatibility support for the obsolete hotplug.d and dev.d directories --ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" -+ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd" - RUN+="/lib/udev/udev_run_devd" - -+ -+LABEL="hotplug_end" ---- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/95-pam-console.rules 2006-03-06 13:55:18.000000000 +0100 -@@ -0,0 +1 @@ -+ACTION=="add", SYSFS{dev}="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}" ---- /dev/null 2006-02-15 18:27:05.942547250 +0100 -+++ udev-084/etc/udev/redhat/05-udev-early.rules 2006-03-06 13:55:18.000000000 +0100 -@@ -0,0 +1,9 @@ -+# 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" -+ -+# ignore these events until someone needs them -+SUBSYSTEM=="drivers", OPTIONS="ignore_device" -+SUBSYSTEM=="module", OPTIONS="ignore_device" -+ -+ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" ---- udev-084/etc/udev/redhat/udev.rules.rhrules 2006-01-30 08:51:38.000000000 +0100 -+++ udev-084/etc/udev/redhat/udev.rules 2006-03-06 14:56:28.000000000 +0100 -@@ -3,47 +3,52 @@ - # - # 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", MODE="0666", OPTIONS="last_rule" --KERNEL=="console", MODE="0600", OPTIONS="last_rule" --KERNEL=="tty[0-9]", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="tty[0-9][0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="vc/[0-9]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+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" - - # pty devices - # Set this to 0660 if you only want users belonging to tty group - # to be able to allocate PTYs --KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="pty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="tty[p-za-e][0-9a-f]*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="pty/m*", GROUP="tty", MODE="0660", OPTIONS="last_rule" --KERNEL=="vc/s*", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+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" - - # serial+dialup devices --KERNEL=="ttyS*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" --KERNEL=="ttyACM*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" --KERNEL=="ttyUSB*", GROUP="uucp", MODE="0660", OPTIONS="last_rule" --KERNEL=="ippp*", MODE="0660" --KERNEL=="isdn*", MODE="0660" --KERNEL=="isdnctrl*", MODE="0660" --KERNEL=="capi*", MODE="0660" --KERNEL=="dcbri*", MODE="0660" --KERNEL=="ircomm*", GROUP="uucp", MODE="0660" --KERNEL=="tts/[0-9]*", GROUP="uucp", MODE="0660" --KERNEL=="tts/USB[0-9]*", GROUP="uucp", MODE="0660" -+KERNEL=="ippp*", NAME="%k", MODE="0660" -+KERNEL=="isdn*", NAME="%k", MODE="0660" -+KERNEL=="isdnctrl*", NAME="%k", MODE="0660" -+KERNEL=="capi*", NAME="%k", MODE="0660" -+KERNEL=="dcbri*", NAME="%k", MODE="0660" -+KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" -+KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" -+KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" - - # vc devices --KERNEL=="vcs", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcsa", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" --KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -+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" - - # memory devices - KERNEL=="random", MODE="0666", OPTIONS="last_rule" -@@ -54,6 +59,8 @@ - KERNEL=="full", MODE="0666", OPTIONS="last_rule" - KERNEL=="null", MODE="0666", OPTIONS="last_rule" - KERNEL=="zero", MODE="0666", OPTIONS="last_rule" -+# 183 = /dev/hwrng Generic random number generator -+KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" - - # misc devices - KERNEL=="nvram", MODE="0660" -@@ -61,6 +68,10 @@ - - # 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", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k" -+KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'" - - # audio devices - KERNEL=="dsp*", MODE="0660" -@@ -131,7 +142,7 @@ - # dri devices - KERNEL=="nvidia*", MODE="0660" - KERNEL=="3dfx*", MODE="0660" --KERNEL=="dri/*", MODE="0666" -+KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" - - # usb devices - KERNEL=="usb/dabusb*", MODE="0660" -@@ -142,16 +153,14 @@ - KERNEL=="z90crypt", MODE="0666" - - # DVB --KERNEL=="dvb/*", MODE="0660" - KERNEL=="dvb", MODE="0660" --KERNEL=="dvb/adapter*", MODE="0660" -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ -+ NAME="%c", MODE="0660" - - # create a symlink named after the device map name - # note devmap_name comes with extras/multipath - #KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" - --# DRI devices always go into a subdirectory (as per the LSB spec) --KERNEL=="card*", NAME="dri/card%n" - - # alsa devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -179,8 +188,8 @@ - BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" - - KERNEL=="microcode", NAME="cpu/%k" --KERNEL="msr[0-9]*", NAME="cpu/%n/msr" --KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid" -+KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -+KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" - - KERNEL=="ram1", SYMLINK+="ram" - KERNEL=="video0", SYMLINK+="video" -@@ -203,13 +212,12 @@ - KERNEL=="device-mapper", NAME="mapper/control" - - # old compat symlinks with enumeration --KERNEL=="sr[0-9]*", SYMLINK+="cdrom%e" --KERNEL=="scd[0-9]*", SYMLINK+="cdrom%e" --KERNEL=="pcd[0-9]*", SYMLINK+="cdrom%e" --KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" --KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" --KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" --KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" -+KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" -+KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -+KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - - KERNEL=="umad*", NAME="infiniband/%k" - KERNEL=="issm*", NAME="infiniband/%k" -@@ -221,27 +229,30 @@ - KERNEL=="zappseudo", NAME="zap/pseudo" - KERNEL=="zap[0-9]*", NAME="zap/%n" - --BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" -+KERNEL=="pktcdvd", NAME="%k/control" -+ -+ - --# do not seperate the next 2 lines!! --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ -+ SYSFS{device/media}=="floppy", \ -+ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" - --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" - --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" --KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" -+KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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" - - # rename sr* to scd* - KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" --KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" -+KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ -+ OPTIONS+="ignore_remove" - --KERNEL=="dvb*", PROGRAM=="/lib/udev/dvb.sh %k", NAME="%c" - - ####################################### - # Persistent block device stuff - begin -@@ -256,7 +267,8 @@ - KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" - - # never access removable ide devices, the drivers are causing event loops on open() --BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end" -+BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" -+BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" +--- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-12 15:27:32.000000000 +0200 ++++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-12 15:29:35.000000000 +0200 +@@ -271,15 +271,15 @@ + BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" # by-id (hardware serial number) - KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" -@@ -297,37 +309,43 @@ - # Persistent block device stuff - end - ##################################### +-KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" ++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" --ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" -+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" + KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode" +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode" +-KERNEL=="dasd*[!0-9]", IMPORT{program}="/sbin/dasd_id --export $tempnode" ++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}" -+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + # for partitions import parent information +@@ -287,19 +287,19 @@ + KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" --# Perhaps this should just be for all subsystems? -- --ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" --ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" --ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" --ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ -+ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ - RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + # by-path (shortest physical path) +-KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_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" --ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ -- RUN+="/sbin/modprobe $modalias" -+# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC -+# sr: 4 TYPE_WORM, 5 TYPE_ROM -+# st/osst: 1 TYPE_TAPE -+# sg: 8 changer, [36] scanner -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ -+ RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" -+ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ -+ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + # by-label/by-uuid (filesystem properties) + KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end" +-IMPORT{program}="/sbin/vol_id --export $tempnode" ++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}" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ -- RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ -+ -+ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ - RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ - RUN+="/sbin/modprobe sr_mod" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ -+ SYMLINK+="scanner scanner-%k", MODE="0660" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ -+ 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" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ - SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="On[sS]tream", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ - RUN+="/sbin/modprobe st" --ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ -- RUN+="/sbin/modprobe sg" + # BIOS Enhanced Disk Device +-KERNEL=="*[!0-9]", IMPORT{program}="/sbin/edd_id --export $tempnode" ++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" --ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", \ -- RUN+="/sbin/firmware_helper" -+RUN+="socket:/org/kernel/udev/monitor" -+ diff --git a/udev.spec b/udev.spec index ae36b7e..3a20dbf 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 084 -Release: 13 +Version: 089 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -19,10 +19,12 @@ Source10: firmware_helper.c Patch1: udev-permconv.patch Patch2: udev-rules.patch -Patch3: udevstart2.patch +#Patch3: udevstart2.patch Patch4: udev-084-floppy.patch Patch5: udev-extras.patch Patch6: udev-084-pg.patch +Patch7: udev-089-nopie.patch +Patch8: udev-089-last_modalias.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -44,10 +46,12 @@ userspace using sysfs and netlink. %setup -q %patch1 -p1 -b .rhpermconv %patch2 -p1 -b .rhrules -%patch3 -p1 -b .rhudevstart +#%patch3 -p1 -b .rhudevstart %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras %patch6 -p1 -b .pg +%patch7 -p1 -b .nopie +%patch8 -p1 -b .last_modalias %build @@ -64,6 +68,7 @@ make \ extras/ata_id \ extras/usb_id \ extras/edd_id \ + extras/path_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -74,12 +79,14 @@ mv udevd udevd.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static +mv extras/path_id/path_id extras/path_id/path_id.static %ifarch s390 s390x mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static %endif mv extras/usb_id/usb_id extras/usb_id/usb_id.static mv extras/volume_id/vol_id extras/volume_id/vol_id.static make clean +make E='@echo' Q='@' -C extras/volume_id/lib clean make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_KLIBC=false \ @@ -111,11 +118,13 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id mv extras/ata_id/ata_id.static extras/ata_id/ata_id mv extras/edd_id/edd_id.static extras/edd_id/edd_id +mv extras/path_id/path_id.static extras/path_id/path_id %ifarch s390 s390x mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id %endif mv extras/usb_id/usb_id.static extras/usb_id/usb_id mv extras/volume_id/vol_id.static extras/volume_id/vol_id +touch extras/volume_id/vol_id make DESTDIR=$RPM_BUILD_ROOT install \ EXTRAS=" \ @@ -123,6 +132,7 @@ make DESTDIR=$RPM_BUILD_ROOT install \ extras/ata_id \ extras/usb_id \ extras/edd_id \ + extras/path_id \ extras/volume_id \ %ifarch s390 s390x extras/dasd_id \ @@ -140,10 +150,10 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} 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/udev.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-udev.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 # Backwards compat -install -m 0644 etc/udev/redhat/hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules +install -m 0644 etc/udev/redhat/51-hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf @@ -162,19 +172,27 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev -install -m 0644 extras/path_id $RPM_BUILD_ROOT/sbin/path_id +#install -m 0644 extras/path_id/path_id $RPM_BUILD_ROOT/sbin/path_id install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin -install -m 0755 udevstart $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/lib/firmware +pushd $RPM_BUILD_ROOT +rm -f usr/include/libvolume_id.h \ + usr/lib*/libvolume_id.a \ + usr/lib*/libvolume_id.so \ + usr/lib*/pkgconfig/libvolume_id.pc \ + lib*/libvolume_id.* +popd + # 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 done EOF @@ -222,26 +240,28 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* -%doc etc/udev/redhat/udev.rules %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd -%attr(0755,root,root) /sbin/udevstart +%attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) %{udev_scriptdir}/udev_run_devd %attr(0755,root,root) %{udev_scriptdir}/udev_run_hotplugd %attr(755,root,root) /sbin/scsi_id -%attr(755,root,root) /sbin/ata_id -%attr(755,root,root) /sbin/edd_id -%attr(755,root,root) /sbin/usb_id -%attr(755,root,root) /sbin/vol_id -%attr(755,root,root) /sbin/path_id +%attr(755,root,root) %{udev_scriptdir}/scsi_id +%attr(755,root,root) %{udev_scriptdir}/ata_id +%attr(755,root,root) %{udev_scriptdir}/edd_id +%attr(755,root,root) %{udev_scriptdir}/usb_id +%attr(755,root,root) %{udev_scriptdir}/vol_id +%attr(755,root,root) %{udev_scriptdir}/path_id %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 %attr(755,root,root) /sbin/firmware_helper +#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0 +#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0.61.0 %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -285,6 +305,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Thu Apr 13 2006 Harald Hoyer - 089-1 +- version 089 +- do not force loading of parport_pc (bug #186850) +- manually load snd-powermac (bug #176761) +- added usb floppy symlink (bug #185171) +- start_udev uses udevtrigger now instead of udevstart + * Wed Mar 08 2006 Harald Hoyer - 084-13 - fixed pam_console rules (#182600) diff --git a/upstream b/upstream index 53dafbc..2d45884 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-084.tar.bz2 +udev-089.tar.bz2 From 4326637d6c07aad748e89516c52f0907c424d52f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 09:48:33 +0000 Subject: [PATCH 221/640] correction for shlib --- udev-089-nopie.patch | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 01e5791..c4aae83 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,11 +1,15 @@ ---- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-12 15:03:07.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-12 15:03:19.000000000 +0200 -@@ -78,7 +78,7 @@ +--- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:41:46.000000000 +0200 +@@ -76,9 +76,11 @@ + $(E) " RANLIB " $@ + $(Q) $(RANLIB) $@ ++SHLIBFLAGS:=$(shell echo $(LDFLAGS)|sed -e 's/-pie//g') ++ $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ - $(Q) $(CC) -shared $(CFLAGS) -o $@ \ -+ $(Q) $(LD) -shared -o $@ \ ++ $(LD) $(SHLIBFLAGS) -shared -o $@ \ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) From f486785e6583cbe561f108c8eff3e062be5e9c1e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 09:48:33 +0000 Subject: [PATCH 222/640] correction for shlib --- udev-089-nopie.patch | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 01e5791..c4aae83 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,11 +1,15 @@ ---- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-12 15:03:07.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-12 15:03:19.000000000 +0200 -@@ -78,7 +78,7 @@ +--- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:41:46.000000000 +0200 +@@ -76,9 +76,11 @@ + $(E) " RANLIB " $@ + $(Q) $(RANLIB) $@ ++SHLIBFLAGS:=$(shell echo $(LDFLAGS)|sed -e 's/-pie//g') ++ $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ - $(Q) $(CC) -shared $(CFLAGS) -o $@ \ -+ $(Q) $(LD) -shared -o $@ \ ++ $(LD) $(SHLIBFLAGS) -shared -o $@ \ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) From e33d945d10e9f0abe73766856f5a9392b6b1fbf3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 09:58:06 +0000 Subject: [PATCH 223/640] correction for shlib --- udev-089-nopie.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index c4aae83..340c4a5 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,10 +1,10 @@ --- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:41:46.000000000 +0200 ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:56:56.000000000 +0200 @@ -76,9 +76,11 @@ $(E) " RANLIB " $@ $(Q) $(RANLIB) $@ -+SHLIBFLAGS:=$(shell echo $(LDFLAGS)|sed -e 's/-pie//g') ++SHLIBFLAGS:=$(shell echo $(LDFLAGS) $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') + $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ From 1b564818162df55d0132b4ab29e4f5433449207b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 09:58:06 +0000 Subject: [PATCH 224/640] correction for shlib --- udev-089-nopie.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index c4aae83..340c4a5 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,10 +1,10 @@ --- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:41:46.000000000 +0200 ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:56:56.000000000 +0200 @@ -76,9 +76,11 @@ $(E) " RANLIB " $@ $(Q) $(RANLIB) $@ -+SHLIBFLAGS:=$(shell echo $(LDFLAGS)|sed -e 's/-pie//g') ++SHLIBFLAGS:=$(shell echo $(LDFLAGS) $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') + $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ From 6026b801d4c93f7962c30da68a7a47d38781c72c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 10:36:46 +0000 Subject: [PATCH 225/640] correction for shlib --- udev-089-nopie.patch | 17 +++++++++++++++-- udev.spec | 2 -- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 340c4a5..8ccb55a 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,6 +1,19 @@ --- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:56:56.000000000 +0200 -@@ -76,9 +76,11 @@ ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 12:31:51.000000000 +0200 +@@ -65,9 +65,11 @@ + .shlib: + $(Q) mkdir .shlib + ++SHCFLAGS:=$(shell echo $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') ++ + .shlib/%.o: %.c + $(E) " CC " $@ +- $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ ++ $(Q) $(CC) -c $(SHCFLAGS) $< -o $@ + + libvolume_id.a: $(HEADERS) $(OBJS) + $(Q) rm -f $@ +@@ -76,9 +78,11 @@ $(E) " RANLIB " $@ $(Q) $(RANLIB) $@ diff --git a/udev.spec b/udev.spec index 3a20dbf..f2c4c1d 100644 --- a/udev.spec +++ b/udev.spec @@ -19,7 +19,6 @@ Source10: firmware_helper.c Patch1: udev-permconv.patch Patch2: udev-rules.patch -#Patch3: udevstart2.patch Patch4: udev-084-floppy.patch Patch5: udev-extras.patch Patch6: udev-084-pg.patch @@ -46,7 +45,6 @@ userspace using sysfs and netlink. %setup -q %patch1 -p1 -b .rhpermconv %patch2 -p1 -b .rhrules -#%patch3 -p1 -b .rhudevstart %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras %patch6 -p1 -b .pg From f8783dfa92f9de03da44fa95e9b8b7658e3b5725 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 10:36:46 +0000 Subject: [PATCH 226/640] correction for shlib --- udev-089-nopie.patch | 17 +++++++++++++++-- udev.spec | 2 -- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 340c4a5..8ccb55a 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,6 +1,19 @@ --- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 11:56:56.000000000 +0200 -@@ -76,9 +76,11 @@ ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 12:31:51.000000000 +0200 +@@ -65,9 +65,11 @@ + .shlib: + $(Q) mkdir .shlib + ++SHCFLAGS:=$(shell echo $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') ++ + .shlib/%.o: %.c + $(E) " CC " $@ +- $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ ++ $(Q) $(CC) -c $(SHCFLAGS) $< -o $@ + + libvolume_id.a: $(HEADERS) $(OBJS) + $(Q) rm -f $@ +@@ -76,9 +78,11 @@ $(E) " RANLIB " $@ $(Q) $(RANLIB) $@ diff --git a/udev.spec b/udev.spec index 3a20dbf..f2c4c1d 100644 --- a/udev.spec +++ b/udev.spec @@ -19,7 +19,6 @@ Source10: firmware_helper.c Patch1: udev-permconv.patch Patch2: udev-rules.patch -#Patch3: udevstart2.patch Patch4: udev-084-floppy.patch Patch5: udev-extras.patch Patch6: udev-084-pg.patch @@ -46,7 +45,6 @@ userspace using sysfs and netlink. %setup -q %patch1 -p1 -b .rhpermconv %patch2 -p1 -b .rhrules -#%patch3 -p1 -b .rhudevstart %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras %patch6 -p1 -b .pg From d7d38eba96db19b2f9793219ac660797feb99aef Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 12:37:35 +0000 Subject: [PATCH 227/640] correction for shlib --- udev-089-nopie.patch | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 8ccb55a..ffd0345 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,19 +1,28 @@ --- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 12:31:51.000000000 +0200 -@@ -65,9 +65,11 @@ ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 14:36:08.000000000 +0200 +@@ -54,7 +54,7 @@ + libvolume_id.h \ + util.h + +-all: libvolume_id.a $(SHLIB) libvolume_id.pc ++all: libvolume_id.a + .PHONY: all + .DEFAULT: all + +@@ -65,9 +65,10 @@ .shlib: $(Q) mkdir .shlib +SHCFLAGS:=$(shell echo $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') + .shlib/%.o: %.c - $(E) " CC " $@ +- $(E) " CC " $@ - $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ -+ $(Q) $(CC) -c $(SHCFLAGS) $< -o $@ ++ $(CC) -c $(SHCFLAGS) $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -76,9 +78,11 @@ +@@ -76,9 +77,11 @@ $(E) " RANLIB " $@ $(Q) $(RANLIB) $@ @@ -26,3 +35,22 @@ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) +@@ -97,12 +100,12 @@ + $(Q) echo "Cflags: -I\$${includedir}" >> $@ + + install: all +- $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h +- $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a +- $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) +- 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 ++ #$(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h ++ #$(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a ++ #$(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) ++ #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 + .PHONY: install + + uninstall: From e3cabf43702f5d8feda98e45189e69b74723d1e7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Apr 2006 12:37:35 +0000 Subject: [PATCH 228/640] correction for shlib --- udev-089-nopie.patch | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index 8ccb55a..ffd0345 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,19 +1,28 @@ --- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 12:31:51.000000000 +0200 -@@ -65,9 +65,11 @@ ++++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 14:36:08.000000000 +0200 +@@ -54,7 +54,7 @@ + libvolume_id.h \ + util.h + +-all: libvolume_id.a $(SHLIB) libvolume_id.pc ++all: libvolume_id.a + .PHONY: all + .DEFAULT: all + +@@ -65,9 +65,10 @@ .shlib: $(Q) mkdir .shlib +SHCFLAGS:=$(shell echo $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') + .shlib/%.o: %.c - $(E) " CC " $@ +- $(E) " CC " $@ - $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ -+ $(Q) $(CC) -c $(SHCFLAGS) $< -o $@ ++ $(CC) -c $(SHCFLAGS) $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -76,9 +78,11 @@ +@@ -76,9 +77,11 @@ $(E) " RANLIB " $@ $(Q) $(RANLIB) $@ @@ -26,3 +35,22 @@ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) +@@ -97,12 +100,12 @@ + $(Q) echo "Cflags: -I\$${includedir}" >> $@ + + install: all +- $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h +- $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a +- $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) +- 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 ++ #$(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h ++ #$(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a ++ #$(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) ++ #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 + .PHONY: install + + uninstall: From cccc0b3e45933732da5188253a0d863386cbe32b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 19 Apr 2006 11:48:15 +0000 Subject: [PATCH 229/640] version 090 --- .cvsignore | 2 +- sources | 2 +- start_udev | 24 +++++++----------------- udev-rules.patch | 30 ++++++++++++++++++++++++++---- udev.spec | 6 +++++- 5 files changed, 40 insertions(+), 24 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2d45884..059d7bb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-089.tar.bz2 +udev-090.tar.bz2 diff --git a/sources b/sources index ba3bfd1..1a28986 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ed2d885527da9c5f72abd9a43cb1af98 udev-089.tar.bz2 +44acf418a23b0be826aa55828ada07db udev-090.tar.bz2 diff --git a/start_udev b/start_udev index 6c0248c..6e5ffa8 100755 --- a/start_udev +++ b/start_udev @@ -109,23 +109,13 @@ kill_udevd() { wait_for_queue() { - loop=20 - while test ! -d /dev/.udev/queue; do - usleep 100000; - test "$loop" -gt 0 || return 1 - loop=$(($loop - 1)) - done - - loop=200 - while test -d /dev/.udev/queue; do - usleep 100000; - if [ "$loop" -le 0 ]; then - echo -n "Wait timeout. Will continue in the background." - return 1 - fi - loop=$(($loop - 1)) - done - return 0 + local ret=0 + /sbin/udevsettle --timeout=100 + ret=$? + if [ $ret -ne 0 ]; then + echo -n "Wait timeout. Will continue in the background." + fi + return $ret; } export ACTION=add diff --git a/udev-rules.patch b/udev-rules.patch index bd57b54..806680a 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,28 @@ ---- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-12 15:27:32.000000000 +0200 -+++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-12 15:29:35.000000000 +0200 -@@ -271,15 +271,15 @@ +--- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-03 14:41:10.000000000 +0200 ++++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-18 12:00:25.000000000 +0200 +@@ -40,8 +40,9 @@ + KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" +-KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" ++KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" ++KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" ++KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" + + # vc devices + KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +@@ -90,9 +91,6 @@ + KERNEL=="dmmidi*", MODE="0660" + KERNEL=="sndstat", MODE="0660" + +-# pilot/palm devices +-KERNEL=="pilot", GROUP="uucp", MODE="0660" +- + # lp devices + KERNEL=="lp*", GROUP="lp", MODE="0660" + KERNEL=="parport*", GROUP="lp", MODE="0660" +@@ -271,15 +269,15 @@ BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" # by-id (hardware serial number) @@ -21,7 +43,7 @@ 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 -@@ -287,19 +287,19 @@ +@@ -287,19 +285,19 @@ 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) diff --git a/udev.spec b/udev.spec index f2c4c1d..1425b57 100644 --- a/udev.spec +++ b/udev.spec @@ -4,7 +4,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 089 +Version: 090 Release: 1 License: GPL Group: System Environment/Base @@ -242,6 +242,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevtrigger +%attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) %{udev_scriptdir}/udev_run_devd @@ -303,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Apr 19 2006 Harald Hoyer - 090-1 +- version 090 + * Thu Apr 13 2006 Harald Hoyer - 089-1 - version 089 - do not force loading of parport_pc (bug #186850) From fdab2e6f19f8f1561f9524a0771d992f94694e11 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 19 Apr 2006 11:48:15 +0000 Subject: [PATCH 230/640] version 090 --- .cvsignore | 2 +- sources | 2 +- start_udev | 24 +++++++----------------- udev-rules.patch | 30 ++++++++++++++++++++++++++---- udev.spec | 6 +++++- 5 files changed, 40 insertions(+), 24 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2d45884..059d7bb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-089.tar.bz2 +udev-090.tar.bz2 diff --git a/sources b/sources index ba3bfd1..1a28986 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ed2d885527da9c5f72abd9a43cb1af98 udev-089.tar.bz2 +44acf418a23b0be826aa55828ada07db udev-090.tar.bz2 diff --git a/start_udev b/start_udev index 6c0248c..6e5ffa8 100755 --- a/start_udev +++ b/start_udev @@ -109,23 +109,13 @@ kill_udevd() { wait_for_queue() { - loop=20 - while test ! -d /dev/.udev/queue; do - usleep 100000; - test "$loop" -gt 0 || return 1 - loop=$(($loop - 1)) - done - - loop=200 - while test -d /dev/.udev/queue; do - usleep 100000; - if [ "$loop" -le 0 ]; then - echo -n "Wait timeout. Will continue in the background." - return 1 - fi - loop=$(($loop - 1)) - done - return 0 + local ret=0 + /sbin/udevsettle --timeout=100 + ret=$? + if [ $ret -ne 0 ]; then + echo -n "Wait timeout. Will continue in the background." + fi + return $ret; } export ACTION=add diff --git a/udev-rules.patch b/udev-rules.patch index bd57b54..806680a 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,28 @@ ---- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-12 15:27:32.000000000 +0200 -+++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-12 15:29:35.000000000 +0200 -@@ -271,15 +271,15 @@ +--- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-03 14:41:10.000000000 +0200 ++++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-18 12:00:25.000000000 +0200 +@@ -40,8 +40,9 @@ + KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" +-KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" ++KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" ++KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" ++KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" + + # vc devices + KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +@@ -90,9 +91,6 @@ + KERNEL=="dmmidi*", MODE="0660" + KERNEL=="sndstat", MODE="0660" + +-# pilot/palm devices +-KERNEL=="pilot", GROUP="uucp", MODE="0660" +- + # lp devices + KERNEL=="lp*", GROUP="lp", MODE="0660" + KERNEL=="parport*", GROUP="lp", MODE="0660" +@@ -271,15 +269,15 @@ BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" # by-id (hardware serial number) @@ -21,7 +43,7 @@ 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 -@@ -287,19 +287,19 @@ +@@ -287,19 +285,19 @@ 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) diff --git a/udev.spec b/udev.spec index f2c4c1d..1425b57 100644 --- a/udev.spec +++ b/udev.spec @@ -4,7 +4,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 089 +Version: 090 Release: 1 License: GPL Group: System Environment/Base @@ -242,6 +242,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevtrigger +%attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/start_udev #%attr(755,root,root) /sbin/udev_volume_id %attr(0755,root,root) %{udev_scriptdir}/udev_run_devd @@ -303,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed Apr 19 2006 Harald Hoyer - 090-1 +- version 090 + * Thu Apr 13 2006 Harald Hoyer - 089-1 - version 089 - do not force loading of parport_pc (bug #186850) From 39ba214178fcc5bbdce7856c208c114fe87d5d38 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 May 2006 11:20:16 +0000 Subject: [PATCH 231/640] version 091 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 059d7bb..3df0397 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-090.tar.bz2 +udev-091.tar.bz2 diff --git a/sources b/sources index 1a28986..585de98 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -44acf418a23b0be826aa55828ada07db udev-090.tar.bz2 +4151022ea7b4dcfaa768c1b7bf2ab9e5 udev-091.tar.bz2 diff --git a/udev.spec b/udev.spec index 1425b57..ec1a3d3 100644 --- a/udev.spec +++ b/udev.spec @@ -4,7 +4,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 090 +Version: 091 Release: 1 License: GPL Group: System Environment/Base @@ -304,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed May 03 2006 Harald Hoyer - 091-1 +- version 091 + * Wed Apr 19 2006 Harald Hoyer - 090-1 - version 090 From f738113d4a10c4046c13718b78e16b3f66a20263 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 May 2006 11:20:16 +0000 Subject: [PATCH 232/640] version 091 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 059d7bb..3df0397 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-090.tar.bz2 +udev-091.tar.bz2 diff --git a/sources b/sources index 1a28986..585de98 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -44acf418a23b0be826aa55828ada07db udev-090.tar.bz2 +4151022ea7b4dcfaa768c1b7bf2ab9e5 udev-091.tar.bz2 diff --git a/udev.spec b/udev.spec index 1425b57..ec1a3d3 100644 --- a/udev.spec +++ b/udev.spec @@ -4,7 +4,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 090 +Version: 091 Release: 1 License: GPL Group: System Environment/Base @@ -304,6 +304,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* %changelog +* Wed May 03 2006 Harald Hoyer - 091-1 +- version 091 + * Wed Apr 19 2006 Harald Hoyer - 090-1 - version 090 From 67c4ed9f4c83c9ed47a3dbff7937c24a4e4a2d2b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 May 2006 15:54:21 +0000 Subject: [PATCH 233/640] - added subpackages libvolume_id and libvolume_id-devel --- udev-089-nopie.patch | 50 +++++++------------------------------------- udev.spec | 44 ++++++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 54 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index ffd0345..2a1fa12 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,56 +1,20 @@ ---- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 14:36:08.000000000 +0200 -@@ -54,7 +54,7 @@ - libvolume_id.h \ - util.h +--- 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 @@ --all: libvolume_id.a $(SHLIB) libvolume_id.pc -+all: libvolume_id.a - .PHONY: all - .DEFAULT: all - -@@ -65,9 +65,10 @@ - .shlib: - $(Q) mkdir .shlib - -+SHCFLAGS:=$(shell echo $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') -+ .shlib/%.o: %.c -- $(E) " CC " $@ + $(E) " CC " $@ - $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ -+ $(CC) -c $(SHCFLAGS) $< -o $@ ++ $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -c $(CFLAGS) -fPIC $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -76,9 +77,11 @@ - $(E) " RANLIB " $@ - $(Q) $(RANLIB) $@ +@@ -78,7 +78,7 @@ -+SHLIBFLAGS:=$(shell echo $(LDFLAGS) $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') -+ $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ - $(Q) $(CC) -shared $(CFLAGS) -o $@ \ -+ $(LD) $(SHLIBFLAGS) -shared -o $@ \ ++ $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -shared $(CFLAGS) -o $@ \ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) -@@ -97,12 +100,12 @@ - $(Q) echo "Cflags: -I\$${includedir}" >> $@ - - install: all -- $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h -- $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a -- $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) -- 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 -+ #$(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h -+ #$(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a -+ #$(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) -+ #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 - .PHONY: install - - uninstall: diff --git a/udev.spec b/udev.spec index ec1a3d3..a210c2c 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 091 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -41,6 +41,23 @@ Provides: dev = 0:3.12-1 The udev package contains an implementation of devfs in userspace using sysfs and netlink. +%package -n libvolume_id-devel +Summary: Static libraries and headers for libvolume_id +Group: Development/Libraries +Requires: libvolume_id = %{version}-%{release} + +%description -n libvolume_id-devel +This package contains libraries and include files, +which needed to link against libvolume_id. + +%package -n libvolume_id +Summary: Dynamic libraries to get volume ids +Group: System Environment/Libraries + +%description -n libvolume_id +This package contains the libvolume_id.so dynamic library, +which contains functions to get volume ids. + %prep %setup -q %patch1 -p1 -b .rhpermconv @@ -106,7 +123,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " #extras/volume_id -%{__cc} %{optflags} -o firmware_helper %{SOURCE10} +%{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} %install rm -rf $RPM_BUILD_ROOT @@ -124,7 +141,7 @@ mv extras/usb_id/usb_id.static extras/usb_id/usb_id mv extras/volume_id/vol_id.static extras/volume_id/vol_id touch extras/volume_id/vol_id -make DESTDIR=$RPM_BUILD_ROOT install \ +make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" install \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ @@ -178,14 +195,6 @@ install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdi mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware -pushd $RPM_BUILD_ROOT -rm -f usr/include/libvolume_id.h \ - usr/lib*/libvolume_id.a \ - usr/lib*/libvolume_id.so \ - usr/lib*/pkgconfig/libvolume_id.pc \ - lib*/libvolume_id.* -popd - # short-term workaround mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules < - 091-2 +- added subpackages libvolume_id and libvolume_id-devel + * Wed May 03 2006 Harald Hoyer - 091-1 - version 091 From 6fd25ff85da93724ac26b9330bb49f894d001f52 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 May 2006 15:54:21 +0000 Subject: [PATCH 234/640] - added subpackages libvolume_id and libvolume_id-devel --- udev-089-nopie.patch | 50 +++++++------------------------------------- udev.spec | 44 ++++++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 54 deletions(-) diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index ffd0345..2a1fa12 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,56 +1,20 @@ ---- udev-089/extras/volume_id/lib/Makefile.nopie 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/extras/volume_id/lib/Makefile 2006-04-13 14:36:08.000000000 +0200 -@@ -54,7 +54,7 @@ - libvolume_id.h \ - util.h +--- 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 @@ --all: libvolume_id.a $(SHLIB) libvolume_id.pc -+all: libvolume_id.a - .PHONY: all - .DEFAULT: all - -@@ -65,9 +65,10 @@ - .shlib: - $(Q) mkdir .shlib - -+SHCFLAGS:=$(shell echo $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') -+ .shlib/%.o: %.c -- $(E) " CC " $@ + $(E) " CC " $@ - $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ -+ $(CC) -c $(SHCFLAGS) $< -o $@ ++ $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -c $(CFLAGS) -fPIC $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -76,9 +77,11 @@ - $(E) " RANLIB " $@ - $(Q) $(RANLIB) $@ +@@ -78,7 +78,7 @@ -+SHLIBFLAGS:=$(shell echo $(LDFLAGS) $(CFLAGS) -fpic -fPIC|sed -e 's/-pie//g') -+ $(SHLIB): $(HEADERS) .shlib $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ - $(Q) $(CC) -shared $(CFLAGS) -o $@ \ -+ $(LD) $(SHLIBFLAGS) -shared -o $@ \ ++ $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -shared $(CFLAGS) -o $@ \ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) -@@ -97,12 +100,12 @@ - $(Q) echo "Cflags: -I\$${includedir}" >> $@ - - install: all -- $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h -- $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a -- $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) -- 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 -+ #$(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h -+ #$(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a -+ #$(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB) -+ #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 - .PHONY: install - - uninstall: diff --git a/udev.spec b/udev.spec index ec1a3d3..a210c2c 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 091 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -41,6 +41,23 @@ Provides: dev = 0:3.12-1 The udev package contains an implementation of devfs in userspace using sysfs and netlink. +%package -n libvolume_id-devel +Summary: Static libraries and headers for libvolume_id +Group: Development/Libraries +Requires: libvolume_id = %{version}-%{release} + +%description -n libvolume_id-devel +This package contains libraries and include files, +which needed to link against libvolume_id. + +%package -n libvolume_id +Summary: Dynamic libraries to get volume ids +Group: System Environment/Libraries + +%description -n libvolume_id +This package contains the libvolume_id.so dynamic library, +which contains functions to get volume ids. + %prep %setup -q %patch1 -p1 -b .rhpermconv @@ -106,7 +123,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " #extras/volume_id -%{__cc} %{optflags} -o firmware_helper %{SOURCE10} +%{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} %install rm -rf $RPM_BUILD_ROOT @@ -124,7 +141,7 @@ mv extras/usb_id/usb_id.static extras/usb_id/usb_id mv extras/volume_id/vol_id.static extras/volume_id/vol_id touch extras/volume_id/vol_id -make DESTDIR=$RPM_BUILD_ROOT install \ +make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" install \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ @@ -178,14 +195,6 @@ install -m 0644 extras/run_directory/MAKEDEV.dev $RPM_BUILD_ROOT/%{udev_scriptdi mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware -pushd $RPM_BUILD_ROOT -rm -f usr/include/libvolume_id.h \ - usr/lib*/libvolume_id.a \ - usr/lib*/libvolume_id.so \ - usr/lib*/pkgconfig/libvolume_id.pc \ - lib*/libvolume_id.* -popd - # short-term workaround mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules < - 091-2 +- added subpackages libvolume_id and libvolume_id-devel + * Wed May 03 2006 Harald Hoyer - 091-1 - version 091 From 3ecb8f9522a1d64e514da6c14dd91deeeb746554 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 May 2006 16:19:56 +0000 Subject: [PATCH 235/640] patched for lib64 --- udev-091-lib64.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++ udev.spec | 4 +++ 2 files changed, 63 insertions(+) create mode 100644 udev-091-lib64.patch diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch new file mode 100644 index 0000000..83e8741 --- /dev/null +++ b/udev-091-lib64.patch @@ -0,0 +1,59 @@ +--- 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 @@ + libudevdir = ${prefix}/lib/udev + mandir = ${prefix}/usr/share/man + configdir = ${etcdir}/udev ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib + udevdir = /dev + DESTDIR = + +@@ -179,6 +181,8 @@ + RANLIB="$(RANLIB)" \ + LIB_OBJS="$(LIB_OBJS)" \ + LIBUDEV="$(PWD)/$(LIBUDEV)" \ ++ libdir=$(libdir) \ ++ usrlibdir=$(usrlibdir) \ + -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 +@@ -4,9 +4,9 @@ + # + # Released under the GNU General Public License, version 2. + # +-includedir = ${prefix}/usr/include +-libdir = ${prefix}/lib +-usrlibdir = ${prefix}/usr/lib ++includedir ?= ${prefix}/usr/include ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib + + INSTALL = /usr/bin/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 +@@ -17,6 +17,9 @@ + libudevdir = ${prefix}/lib/udev + mandir = ${prefix}/usr/share/man + configdir = ${etcdir}/udev/ ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib ++ + + INSTALL = /usr/bin/install -c + INSTALL_PROGRAM = ${INSTALL} +@@ -32,7 +35,10 @@ + $(Q) $(CC) -c $(CFLAGS) $< -o $@ + + lib/libvolume_id.a: +- $(Q) $(MAKE) -C lib ++ $(Q) $(MAKE) \ ++ libdir=$(libdir) \ ++ usrlibdir=$(usrlibdir) \ ++ -C lib + + $(PROG): %: $(HEADERS) %.o lib/libvolume_id.a + $(E) " LD " $@ diff --git a/udev.spec b/udev.spec index a210c2c..598b28c 100644 --- a/udev.spec +++ b/udev.spec @@ -24,6 +24,7 @@ Patch5: udev-extras.patch Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch +Patch9: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -67,6 +68,7 @@ which contains functions to get volume ids. %patch6 -p1 -b .pg %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias +%patch9 -p1 -b .lib64 %build @@ -142,6 +144,8 @@ mv extras/volume_id/vol_id.static extras/volume_id/vol_id touch extras/volume_id/vol_id make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" install \ + libdir="/%{_lib}" \ + usrlibdir="%{_libdir}" \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ From 63e9a00026f8a1579f9e2a7855ac3c15537d33fb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 May 2006 16:19:56 +0000 Subject: [PATCH 236/640] patched for lib64 --- udev-091-lib64.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++ udev.spec | 4 +++ 2 files changed, 63 insertions(+) create mode 100644 udev-091-lib64.patch diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch new file mode 100644 index 0000000..83e8741 --- /dev/null +++ b/udev-091-lib64.patch @@ -0,0 +1,59 @@ +--- 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 @@ + libudevdir = ${prefix}/lib/udev + mandir = ${prefix}/usr/share/man + configdir = ${etcdir}/udev ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib + udevdir = /dev + DESTDIR = + +@@ -179,6 +181,8 @@ + RANLIB="$(RANLIB)" \ + LIB_OBJS="$(LIB_OBJS)" \ + LIBUDEV="$(PWD)/$(LIBUDEV)" \ ++ libdir=$(libdir) \ ++ usrlibdir=$(usrlibdir) \ + -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 +@@ -4,9 +4,9 @@ + # + # Released under the GNU General Public License, version 2. + # +-includedir = ${prefix}/usr/include +-libdir = ${prefix}/lib +-usrlibdir = ${prefix}/usr/lib ++includedir ?= ${prefix}/usr/include ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib + + INSTALL = /usr/bin/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 +@@ -17,6 +17,9 @@ + libudevdir = ${prefix}/lib/udev + mandir = ${prefix}/usr/share/man + configdir = ${etcdir}/udev/ ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib ++ + + INSTALL = /usr/bin/install -c + INSTALL_PROGRAM = ${INSTALL} +@@ -32,7 +35,10 @@ + $(Q) $(CC) -c $(CFLAGS) $< -o $@ + + lib/libvolume_id.a: +- $(Q) $(MAKE) -C lib ++ $(Q) $(MAKE) \ ++ libdir=$(libdir) \ ++ usrlibdir=$(usrlibdir) \ ++ -C lib + + $(PROG): %: $(HEADERS) %.o lib/libvolume_id.a + $(E) " LD " $@ diff --git a/udev.spec b/udev.spec index a210c2c..598b28c 100644 --- a/udev.spec +++ b/udev.spec @@ -24,6 +24,7 @@ Patch5: udev-extras.patch Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch +Patch9: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -67,6 +68,7 @@ which contains functions to get volume ids. %patch6 -p1 -b .pg %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias +%patch9 -p1 -b .lib64 %build @@ -142,6 +144,8 @@ mv extras/volume_id/vol_id.static extras/volume_id/vol_id touch extras/volume_id/vol_id make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" install \ + libdir="/%{_lib}" \ + usrlibdir="%{_libdir}" \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ From e204ad31a552bc133c49f863936b340539fd66fd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 9 May 2006 10:06:13 +0000 Subject: [PATCH 237/640] corrected some rules --- udev-rules.patch | 31 +++++++++++++++++++++++++++++-- udev.spec | 5 ++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 806680a..d5da4ff 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ ---- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-18 12:00:25.000000000 +0200 +--- udev-091/etc/udev/redhat/50-udev.rules.rhrules 2006-04-25 22:39:59.000000000 +0200 ++++ udev-091/etc/udev/redhat/50-udev.rules 2006-05-09 11:56:06.000000000 +0200 @@ -40,8 +40,9 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -66,3 +66,30 @@ 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" +@@ -309,22 +307,22 @@ + # Persistent block device stuff - end + ##################################### + ++ + 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+="/sbin/modprobe $env{MODALIAS}" + +-ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ +- RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" ++ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + + # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC + # sr: 4 TYPE_WORM, 5 TYPE_ROM + # st/osst: 1 TYPE_TAPE + # sg: 8 changer, [36] scanner +-ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ ++ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ + RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" +-ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ ++ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ + RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + + diff --git a/udev.spec b/udev.spec index 598b28c..60b5440 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 091 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -327,6 +327,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue May 09 2006 Harald Hoyer - 091-3 +- corrected some rules + * Wed May 03 2006 Harald Hoyer - 091-2 - added subpackages libvolume_id and libvolume_id-devel From b494cb39bf813294214787a099f6ca017bbdd0af Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 9 May 2006 10:06:13 +0000 Subject: [PATCH 238/640] corrected some rules --- udev-rules.patch | 31 +++++++++++++++++++++++++++++-- udev.spec | 5 ++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 806680a..d5da4ff 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ ---- udev-089/etc/udev/redhat/50-udev.rules.rhrules 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/etc/udev/redhat/50-udev.rules 2006-04-18 12:00:25.000000000 +0200 +--- udev-091/etc/udev/redhat/50-udev.rules.rhrules 2006-04-25 22:39:59.000000000 +0200 ++++ udev-091/etc/udev/redhat/50-udev.rules 2006-05-09 11:56:06.000000000 +0200 @@ -40,8 +40,9 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -66,3 +66,30 @@ 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" +@@ -309,22 +307,22 @@ + # Persistent block device stuff - end + ##################################### + ++ + 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+="/sbin/modprobe $env{MODALIAS}" + +-ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ +- RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" ++ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + + # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC + # sr: 4 TYPE_WORM, 5 TYPE_ROM + # st/osst: 1 TYPE_TAPE + # sg: 8 changer, [36] scanner +-ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ ++ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ + RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" +-ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ ++ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ + RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + + diff --git a/udev.spec b/udev.spec index 598b28c..60b5440 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 091 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -327,6 +327,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue May 09 2006 Harald Hoyer - 091-3 +- corrected some rules + * Wed May 03 2006 Harald Hoyer - 091-2 - added subpackages libvolume_id and libvolume_id-devel From 5f0c226881b29f9c92b4d9a2ce81d4a830bdce77 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 18 May 2006 15:38:32 +0000 Subject: [PATCH 239/640] -version 092 --- .cvsignore | 2 +- sources | 2 +- udev-rules.patch | 104 +++++------------------------------------------ udev.spec | 10 +++-- 4 files changed, 20 insertions(+), 98 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3df0397..7d35fbf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-091.tar.bz2 +udev-092.tar.bz2 diff --git a/sources b/sources index 585de98..9122069 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4151022ea7b4dcfaa768c1b7bf2ab9e5 udev-091.tar.bz2 +5e9ff419ac0132531990a7c5db80ef3e udev-092.tar.bz2 diff --git a/udev-rules.patch b/udev-rules.patch index d5da4ff..2f632e9 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,95 +1,13 @@ ---- udev-091/etc/udev/redhat/50-udev.rules.rhrules 2006-04-25 22:39:59.000000000 +0200 -+++ udev-091/etc/udev/redhat/50-udev.rules 2006-05-09 11:56:06.000000000 +0200 -@@ -40,8 +40,9 @@ - KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" --KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" -+KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" -+KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" -+KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" - - # vc devices - KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -90,9 +91,6 @@ - KERNEL=="dmmidi*", MODE="0660" - KERNEL=="sndstat", MODE="0660" - --# pilot/palm devices --KERNEL=="pilot", GROUP="uucp", MODE="0660" -- - # lp devices - KERNEL=="lp*", GROUP="lp", MODE="0660" - KERNEL=="parport*", GROUP="lp", MODE="0660" -@@ -271,15 +269,15 @@ - BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" - - # by-id (hardware serial number) --KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" -+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*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode" --KERNEL=="dasd*[!0-9]", IMPORT{program}="/sbin/dasd_id --export $tempnode" -+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 -@@ -287,19 +285,19 @@ - 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}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_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]", SYSFS{removable}=="1", GOTO="persistent_end" --IMPORT{program}="/sbin/vol_id --export $tempnode" -+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}="/sbin/edd_id --export $tempnode" -+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" - -@@ -309,22 +307,22 @@ - # Persistent block device stuff - end - ##################################### - -+ - 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+="/sbin/modprobe $env{MODALIAS}" - --ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ -- RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" -+ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" - - # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC - # sr: 4 TYPE_WORM, 5 TYPE_ROM - # st/osst: 1 TYPE_TAPE - # sg: 8 changer, [36] scanner --ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ -+ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ - RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" --ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ -+ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ - RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" +--- udev-092/etc/udev/redhat/51-hotplug.rules.rhrules 2006-05-12 15:25:17.000000000 +0200 ++++ udev-092/etc/udev/redhat/51-hotplug.rules 2006-05-18 17:34:07.000000000 +0200 +@@ -1,8 +1,8 @@ + # do not call hotplug.d and dev.d for "drivers" and "module" events + SUBSYSTEM=="drivers", GOTO="hotplug_end" + SUBSYSTEM=="module", GOTO="hotplug_end" +-ACTION="add", GOTO="hotplug_comp" +-ACTION="remove", GOTO="hotplug_comp" ++ACTION=="add", GOTO="hotplug_comp" ++ACTION=="remove", GOTO="hotplug_comp" + GOTO="hotplug_end" diff --git a/udev.spec b/udev.spec index 60b5440..cde105f 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 091 -Release: 3 +Version: 092 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -327,8 +327,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed May 18 2006 Harald Hoyer - 092-1 +- version 092 +- corrected some rules (bug #192210 #190927) + * Tue May 09 2006 Harald Hoyer - 091-3 -- corrected some rules +- corrected some rules (bug #190927) * Wed May 03 2006 Harald Hoyer - 091-2 - added subpackages libvolume_id and libvolume_id-devel From 840764946834baa72513b8fd91dd3c76aec90cd0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 18 May 2006 15:38:32 +0000 Subject: [PATCH 240/640] -version 092 --- .cvsignore | 2 +- sources | 2 +- udev-rules.patch | 104 +++++------------------------------------------ udev.spec | 10 +++-- 4 files changed, 20 insertions(+), 98 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3df0397..7d35fbf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-091.tar.bz2 +udev-092.tar.bz2 diff --git a/sources b/sources index 585de98..9122069 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4151022ea7b4dcfaa768c1b7bf2ab9e5 udev-091.tar.bz2 +5e9ff419ac0132531990a7c5db80ef3e udev-092.tar.bz2 diff --git a/udev-rules.patch b/udev-rules.patch index d5da4ff..2f632e9 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,95 +1,13 @@ ---- udev-091/etc/udev/redhat/50-udev.rules.rhrules 2006-04-25 22:39:59.000000000 +0200 -+++ udev-091/etc/udev/redhat/50-udev.rules 2006-05-09 11:56:06.000000000 +0200 -@@ -40,8 +40,9 @@ - KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot" --KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot" -+KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" -+KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" -+KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" - - # vc devices - KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -90,9 +91,6 @@ - KERNEL=="dmmidi*", MODE="0660" - KERNEL=="sndstat", MODE="0660" - --# pilot/palm devices --KERNEL=="pilot", GROUP="uucp", MODE="0660" -- - # lp devices - KERNEL=="lp*", GROUP="lp", MODE="0660" - KERNEL=="parport*", GROUP="lp", MODE="0660" -@@ -271,15 +269,15 @@ - BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" - - # by-id (hardware serial number) --KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode" -+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*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode" --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode" --KERNEL=="dasd*[!0-9]", IMPORT{program}="/sbin/dasd_id --export $tempnode" -+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 -@@ -287,19 +285,19 @@ - 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}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_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]", SYSFS{removable}=="1", GOTO="persistent_end" --IMPORT{program}="/sbin/vol_id --export $tempnode" -+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}="/sbin/edd_id --export $tempnode" -+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" - -@@ -309,22 +307,22 @@ - # Persistent block device stuff - end - ##################################### - -+ - 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+="/sbin/modprobe $env{MODALIAS}" - --ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="*", \ -- RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" -+ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" - - # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC - # sr: 4 TYPE_WORM, 5 TYPE_ROM - # st/osst: 1 TYPE_TAPE - # sg: 8 changer, [36] scanner --ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", \ -+ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ - RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" --ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", \ -+ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ - RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" +--- udev-092/etc/udev/redhat/51-hotplug.rules.rhrules 2006-05-12 15:25:17.000000000 +0200 ++++ udev-092/etc/udev/redhat/51-hotplug.rules 2006-05-18 17:34:07.000000000 +0200 +@@ -1,8 +1,8 @@ + # do not call hotplug.d and dev.d for "drivers" and "module" events + SUBSYSTEM=="drivers", GOTO="hotplug_end" + SUBSYSTEM=="module", GOTO="hotplug_end" +-ACTION="add", GOTO="hotplug_comp" +-ACTION="remove", GOTO="hotplug_comp" ++ACTION=="add", GOTO="hotplug_comp" ++ACTION=="remove", GOTO="hotplug_comp" + GOTO="hotplug_end" diff --git a/udev.spec b/udev.spec index 60b5440..cde105f 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 091 -Release: 3 +Version: 092 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -327,8 +327,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed May 18 2006 Harald Hoyer - 092-1 +- version 092 +- corrected some rules (bug #192210 #190927) + * Tue May 09 2006 Harald Hoyer - 091-3 -- corrected some rules +- corrected some rules (bug #190927) * Wed May 03 2006 Harald Hoyer - 091-2 - added subpackages libvolume_id and libvolume_id-devel From 508c20a9a154b8f602be073bb6f903af7e1d1c80 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Sun, 21 May 2006 21:06:55 +0000 Subject: [PATCH 241/640] - fix typo in pam-console rule --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cde105f..52cde31 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 092 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,6 +25,7 @@ Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch +Patch10: udev-092-pamtypo.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,6 +70,7 @@ which contains functions to get volume ids. %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 +%patch10 -p1 -b .pamtypo %build @@ -327,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Sun May 21 2006 Peter Jones - 092-2 +- Fix typo in pam-console rule + * Wed May 18 2006 Harald Hoyer - 092-1 - version 092 - corrected some rules (bug #192210 #190927) From 2d22e1c5c18160c1c843a579813c9641257368fc Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Sun, 21 May 2006 21:06:55 +0000 Subject: [PATCH 242/640] - fix typo in pam-console rule --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index cde105f..52cde31 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 092 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,6 +25,7 @@ Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch +Patch10: udev-092-pamtypo.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,6 +70,7 @@ which contains functions to get volume ids. %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 +%patch10 -p1 -b .pamtypo %build @@ -327,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Sun May 21 2006 Peter Jones - 092-2 +- Fix typo in pam-console rule + * Wed May 18 2006 Harald Hoyer - 092-1 - version 092 - corrected some rules (bug #192210 #190927) From 7a83ca49386c7cdd82451cf1b70c639e5f945547 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Jun 2006 10:21:55 +0000 Subject: [PATCH 243/640] version 094 --- .cvsignore | 2 +- sources | 2 +- udev-rules.patch | 13 ------------- udev.spec | 9 +++++---- upstream | 2 +- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7d35fbf..55f8847 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-092.tar.bz2 +udev-094.tar.bz2 diff --git a/sources b/sources index 9122069..0371225 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5e9ff419ac0132531990a7c5db80ef3e udev-092.tar.bz2 +9e525da5c8cce9ed2c6d7812016df1f7 udev-094.tar.bz2 diff --git a/udev-rules.patch b/udev-rules.patch index 2f632e9..e69de29 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,13 +0,0 @@ ---- udev-092/etc/udev/redhat/51-hotplug.rules.rhrules 2006-05-12 15:25:17.000000000 +0200 -+++ udev-092/etc/udev/redhat/51-hotplug.rules 2006-05-18 17:34:07.000000000 +0200 -@@ -1,8 +1,8 @@ - # do not call hotplug.d and dev.d for "drivers" and "module" events - SUBSYSTEM=="drivers", GOTO="hotplug_end" - SUBSYSTEM=="module", GOTO="hotplug_end" --ACTION="add", GOTO="hotplug_comp" --ACTION="remove", GOTO="hotplug_comp" -+ACTION=="add", GOTO="hotplug_comp" -+ACTION=="remove", GOTO="hotplug_comp" - - GOTO="hotplug_end" - diff --git a/udev.spec b/udev.spec index 52cde31..c0c1d98 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 092 -Release: 2 +Version: 094 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,7 +25,6 @@ Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch -Patch10: udev-092-pamtypo.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -70,7 +69,6 @@ which contains functions to get volume ids. %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 -%patch10 -p1 -b .pamtypo %build @@ -329,6 +327,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jun 14 2006 Harald Hoyer - 094-1 +- version 094 + * Sun May 21 2006 Peter Jones - 092-2 - Fix typo in pam-console rule diff --git a/upstream b/upstream index 2d45884..55f8847 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-089.tar.bz2 +udev-094.tar.bz2 From e07d68eda36abaf8191fa7e62615b5eb42b8a52a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Jun 2006 10:21:55 +0000 Subject: [PATCH 244/640] version 094 --- .cvsignore | 2 +- sources | 2 +- udev-rules.patch | 13 ------------- udev.spec | 9 +++++---- upstream | 2 +- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7d35fbf..55f8847 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-092.tar.bz2 +udev-094.tar.bz2 diff --git a/sources b/sources index 9122069..0371225 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5e9ff419ac0132531990a7c5db80ef3e udev-092.tar.bz2 +9e525da5c8cce9ed2c6d7812016df1f7 udev-094.tar.bz2 diff --git a/udev-rules.patch b/udev-rules.patch index 2f632e9..e69de29 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,13 +0,0 @@ ---- udev-092/etc/udev/redhat/51-hotplug.rules.rhrules 2006-05-12 15:25:17.000000000 +0200 -+++ udev-092/etc/udev/redhat/51-hotplug.rules 2006-05-18 17:34:07.000000000 +0200 -@@ -1,8 +1,8 @@ - # do not call hotplug.d and dev.d for "drivers" and "module" events - SUBSYSTEM=="drivers", GOTO="hotplug_end" - SUBSYSTEM=="module", GOTO="hotplug_end" --ACTION="add", GOTO="hotplug_comp" --ACTION="remove", GOTO="hotplug_comp" -+ACTION=="add", GOTO="hotplug_comp" -+ACTION=="remove", GOTO="hotplug_comp" - - GOTO="hotplug_end" - diff --git a/udev.spec b/udev.spec index 52cde31..c0c1d98 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 092 -Release: 2 +Version: 094 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,7 +25,6 @@ Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch -Patch10: udev-092-pamtypo.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -70,7 +69,6 @@ which contains functions to get volume ids. %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 -%patch10 -p1 -b .pamtypo %build @@ -329,6 +327,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jun 14 2006 Harald Hoyer - 094-1 +- version 094 + * Sun May 21 2006 Peter Jones - 092-2 - Fix typo in pam-console rule diff --git a/upstream b/upstream index 2d45884..55f8847 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-089.tar.bz2 +udev-094.tar.bz2 From e0c5f362b696232dc195acc9e1de4f1d6f43a62a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 5 Jul 2006 11:50:38 +0000 Subject: [PATCH 245/640] version 095 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 55f8847..9fd1c1f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-094.tar.bz2 +udev-095.tar.bz2 diff --git a/sources b/sources index 0371225..cd1ffb8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e525da5c8cce9ed2c6d7812016df1f7 udev-094.tar.bz2 +587e1b43cddb5e71196a38818e8938b0 udev-095.tar.bz2 diff --git a/udev.spec b/udev.spec index c0c1d98..58c6fae 100644 --- a/udev.spec +++ b/udev.spec @@ -1,10 +1,8 @@ -%define udev_kernel_includes 2.6.6 - %define debug false Summary: A userspace implementation of devfs Name: udev -Version: 094 +Version: 095 Release: 1 License: GPL Group: System Environment/Base @@ -327,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jul 5 2006 Harald Hoyer - 095-1 +- version 095 + * Wed Jun 14 2006 Harald Hoyer - 094-1 - version 094 From e308c60caf88290952e98840575b73dea317eff7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 5 Jul 2006 11:50:38 +0000 Subject: [PATCH 246/640] version 095 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 55f8847..9fd1c1f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-094.tar.bz2 +udev-095.tar.bz2 diff --git a/sources b/sources index 0371225..cd1ffb8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e525da5c8cce9ed2c6d7812016df1f7 udev-094.tar.bz2 +587e1b43cddb5e71196a38818e8938b0 udev-095.tar.bz2 diff --git a/udev.spec b/udev.spec index c0c1d98..58c6fae 100644 --- a/udev.spec +++ b/udev.spec @@ -1,10 +1,8 @@ -%define udev_kernel_includes 2.6.6 - %define debug false Summary: A userspace implementation of devfs Name: udev -Version: 094 +Version: 095 Release: 1 License: GPL Group: System Environment/Base @@ -327,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jul 5 2006 Harald Hoyer - 095-1 +- version 095 + * Wed Jun 14 2006 Harald Hoyer - 094-1 - version 094 From 2819f21324816ab425a1743c035f5abc370f54c7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Jul 2006 07:17:43 +0000 Subject: [PATCH 247/640] - added option to debug udev with kernel cmdline option "udevdebug" --- start_udev | 11 +++++++++++ udev.spec | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 6e5ffa8..aba9cf0 100755 --- a/start_udev +++ b/start_udev @@ -149,13 +149,24 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } + +# returns OK if $1 contains $2 +strstr() { + [ "${1#*$2*}" = "$1" ] && return 1 + return 0 +} + make_extra_nodes +cmdline=$(cat /proc/cmdline) 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" debugudev; then + /sbin/udevcontrol log_priority=debug + fi /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue diff --git a/udev.spec b/udev.spec index 58c6fae..72c79eb 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Jul 6 2006 Harald Hoyer - 095-2 +- added option to debug udev with kernel cmdline option "udevdebug" + * Wed Jul 5 2006 Harald Hoyer - 095-1 - version 095 From 8678664c78576022452d344b52c0b0920f859154 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Jul 2006 07:17:43 +0000 Subject: [PATCH 248/640] - added option to debug udev with kernel cmdline option "udevdebug" --- start_udev | 11 +++++++++++ udev.spec | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 6e5ffa8..aba9cf0 100755 --- a/start_udev +++ b/start_udev @@ -149,13 +149,24 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } + +# returns OK if $1 contains $2 +strstr() { + [ "${1#*$2*}" = "$1" ] && return 1 + return 0 +} + make_extra_nodes +cmdline=$(cat /proc/cmdline) 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" debugudev; then + /sbin/udevcontrol log_priority=debug + fi /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue diff --git a/udev.spec b/udev.spec index 58c6fae..72c79eb 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Jul 6 2006 Harald Hoyer - 095-2 +- added option to debug udev with kernel cmdline option "udevdebug" + * Wed Jul 5 2006 Harald Hoyer - 095-1 - version 095 From a6ba76f7ea3c7801458fad376fdd0d52cc420866 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Jul 2006 07:18:04 +0000 Subject: [PATCH 249/640] *** empty log message *** --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index aba9cf0..f85057f 100755 --- a/start_udev +++ b/start_udev @@ -164,7 +164,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug /sbin/udevd -d ret=$[$ret + $?] - if strstr "$cmdline" debugudev; then + if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi /sbin/udevtrigger From 1cf039df540a88d5b10af1859c905977d9acaec1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Jul 2006 07:18:04 +0000 Subject: [PATCH 250/640] *** empty log message *** --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index aba9cf0..f85057f 100755 --- a/start_udev +++ b/start_udev @@ -164,7 +164,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug /sbin/udevd -d ret=$[$ret + $?] - if strstr "$cmdline" debugudev; then + if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi /sbin/udevtrigger From aabb5be520b30abffdc70eb9d01dc1dfde4d39a8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 12 Jul 2006 08:35:18 +0000 Subject: [PATCH 251/640] bumped for rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 72c79eb..969deaf 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 2 +Release: 2.1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jul 12 2006 Jesse Keating - 095-2.1 +- rebuild + * Thu Jul 6 2006 Harald Hoyer - 095-2 - added option to debug udev with kernel cmdline option "udevdebug" From 17ce3a409f0018d40c70086b8e116d2701ed70b9 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 12 Jul 2006 08:35:18 +0000 Subject: [PATCH 252/640] bumped for rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 72c79eb..969deaf 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 2 +Release: 2.1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jul 12 2006 Jesse Keating - 095-2.1 +- rebuild + * Thu Jul 6 2006 Harald Hoyer - 095-2 - added option to debug udev with kernel cmdline option "udevdebug" From a4724b996b075fc9ea6955a6d37066f50c91486e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 12 Jul 2006 09:26:05 +0000 Subject: [PATCH 253/640] - more infiniband rules (bug #198501) --- udev.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 969deaf..c962ee1 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 2.1 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +<<<<<<< udev.spec +* Wed Jul 12 2006 Harald Hoyer - 095-3 +- more infiniband rules (bug #198501) + * Wed Jul 12 2006 Jesse Keating - 095-2.1 - rebuild From 2d859988b1759daff726f3a44442a9535b09022e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 12 Jul 2006 09:26:05 +0000 Subject: [PATCH 254/640] - more infiniband rules (bug #198501) --- udev.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 969deaf..c962ee1 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 2.1 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +<<<<<<< udev.spec +* Wed Jul 12 2006 Harald Hoyer - 095-3 +- more infiniband rules (bug #198501) + * Wed Jul 12 2006 Jesse Keating - 095-2.1 - rebuild From a8b7c5571fad9c6f85fb233d7368a99eb6df539a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 12 Jul 2006 09:27:01 +0000 Subject: [PATCH 255/640] - more infiniband rules (bug #198501) --- udev-rules.patch | 25 +++++++++++++++++++++++++ udev.spec | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/udev-rules.patch b/udev-rules.patch index e69de29..6f51b53 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -0,0 +1,25 @@ +--- udev-095/etc/udev/redhat/50-udev.rules.rhrules 2006-07-12 11:20:05.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-07-12 11:19:47.000000000 +0200 +@@ -217,8 +217,11 @@ + KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" + KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" + +-KERNEL=="umad*", NAME="infiniband/%k" +-KERNEL=="issm*", NAME="infiniband/%k" ++KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" + + # Section for zaptel device + KERNEL=="zapctl", NAME="zap/ctl" +@@ -229,8 +232,6 @@ + + KERNEL=="pktcdvd", NAME="%k/control" + +- +- + KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ + SYSFS{device/media}=="floppy", \ + SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" diff --git a/udev.spec b/udev.spec index c962ee1..6020ef4 100644 --- a/udev.spec +++ b/udev.spec @@ -325,7 +325,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog -<<<<<<< udev.spec * Wed Jul 12 2006 Harald Hoyer - 095-3 - more infiniband rules (bug #198501) From fdb25436cf8f4bda69ee7aa88f002baf7f12475b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 12 Jul 2006 09:27:01 +0000 Subject: [PATCH 256/640] - more infiniband rules (bug #198501) --- udev-rules.patch | 25 +++++++++++++++++++++++++ udev.spec | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/udev-rules.patch b/udev-rules.patch index e69de29..6f51b53 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -0,0 +1,25 @@ +--- udev-095/etc/udev/redhat/50-udev.rules.rhrules 2006-07-12 11:20:05.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-07-12 11:19:47.000000000 +0200 +@@ -217,8 +217,11 @@ + KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" + KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" + +-KERNEL=="umad*", NAME="infiniband/%k" +-KERNEL=="issm*", NAME="infiniband/%k" ++KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" ++KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" + + # Section for zaptel device + KERNEL=="zapctl", NAME="zap/ctl" +@@ -229,8 +232,6 @@ + + KERNEL=="pktcdvd", NAME="%k/control" + +- +- + KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ + SYSFS{device/media}=="floppy", \ + SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" diff --git a/udev.spec b/udev.spec index c962ee1..6020ef4 100644 --- a/udev.spec +++ b/udev.spec @@ -325,7 +325,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog -<<<<<<< udev.spec * Wed Jul 12 2006 Harald Hoyer - 095-3 - more infiniband rules (bug #198501) From 5f733958d45bd2b9800edf9c0173d1710f3221e1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 7 Aug 2006 12:59:00 +0000 Subject: [PATCH 257/640] - fixed CAPI device nodes (bug #139321) - fixed bug #201422 --- udev-rules.patch | 28 ++++++++++++++++++++++++---- udev.spec | 6 +++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 6f51b53..47b3c2f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,16 @@ ---- udev-095/etc/udev/redhat/50-udev.rules.rhrules 2006-07-12 11:20:05.000000000 +0200 -+++ udev-095/etc/udev/redhat/50-udev.rules 2006-07-12 11:19:47.000000000 +0200 -@@ -217,8 +217,11 @@ +--- 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-08-07 14:53:56.000000000 +0200 +@@ -28,7 +28,8 @@ + KERNEL=="ippp*", NAME="%k", MODE="0660" + KERNEL=="isdn*", NAME="%k", MODE="0660" + KERNEL=="isdnctrl*", NAME="%k", MODE="0660" +-KERNEL=="capi*", NAME="%k", MODE="0660" ++KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" ++KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" + KERNEL=="dcbri*", NAME="%k", MODE="0660" + KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" +@@ -217,8 +218,11 @@ KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" @@ -14,7 +24,7 @@ # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -229,8 +232,6 @@ +@@ -229,8 +233,6 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -23,3 +33,13 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" +--- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-08-07 14:58:23.000000000 +0200 ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-08-07 14:50:58.000000000 +0200 +@@ -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" diff --git a/udev.spec b/udev.spec index 6020ef4..f22b900 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Aug 7 2006 Harald Hoyer - 095-4 +- fixed CAPI device nodes (bug #139321) +- fixed bug #201422 + * Wed Jul 12 2006 Harald Hoyer - 095-3 - more infiniband rules (bug #198501) From 1aaca4fdb781fe73e4cbe361140fe1168063d2cf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 7 Aug 2006 12:59:00 +0000 Subject: [PATCH 258/640] - fixed CAPI device nodes (bug #139321) - fixed bug #201422 --- udev-rules.patch | 28 ++++++++++++++++++++++++---- udev.spec | 6 +++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 6f51b53..47b3c2f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,16 @@ ---- udev-095/etc/udev/redhat/50-udev.rules.rhrules 2006-07-12 11:20:05.000000000 +0200 -+++ udev-095/etc/udev/redhat/50-udev.rules 2006-07-12 11:19:47.000000000 +0200 -@@ -217,8 +217,11 @@ +--- 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-08-07 14:53:56.000000000 +0200 +@@ -28,7 +28,8 @@ + KERNEL=="ippp*", NAME="%k", MODE="0660" + KERNEL=="isdn*", NAME="%k", MODE="0660" + KERNEL=="isdnctrl*", NAME="%k", MODE="0660" +-KERNEL=="capi*", NAME="%k", MODE="0660" ++KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" ++KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" + KERNEL=="dcbri*", NAME="%k", MODE="0660" + KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" +@@ -217,8 +218,11 @@ KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" @@ -14,7 +24,7 @@ # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -229,8 +232,6 @@ +@@ -229,8 +233,6 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -23,3 +33,13 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" +--- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-08-07 14:58:23.000000000 +0200 ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-08-07 14:50:58.000000000 +0200 +@@ -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" diff --git a/udev.spec b/udev.spec index 6020ef4..f22b900 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -325,6 +325,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Aug 7 2006 Harald Hoyer - 095-4 +- fixed CAPI device nodes (bug #139321) +- fixed bug #201422 + * Wed Jul 12 2006 Harald Hoyer - 095-3 - more infiniband rules (bug #198501) From 31f40a010f68e3b2820a17c625f49f4ceff8b6ac Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Aug 2006 12:08:39 +0000 Subject: [PATCH 259/640] allow long comments --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index f22b900..3d526e5 100644 --- a/udev.spec +++ b/udev.spec @@ -23,6 +23,7 @@ Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch +Patch10: udev-095-longcomment.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -67,6 +68,7 @@ which contains functions to get volume ids. %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 +%patch10 -p1 -b .longcomment %build From 6e058278a3451623417700d62183318a509cbfab Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Aug 2006 12:08:39 +0000 Subject: [PATCH 260/640] allow long comments --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index f22b900..3d526e5 100644 --- a/udev.spec +++ b/udev.spec @@ -23,6 +23,7 @@ Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch +Patch10: udev-095-longcomment.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -67,6 +68,7 @@ which contains functions to get volume ids. %patch7 -p1 -b .nopie %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 +%patch10 -p1 -b .longcomment %build From d8976451b06f5b26162b36b693632d096740ee02 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Aug 2006 12:08:54 +0000 Subject: [PATCH 261/640] allow long comments --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 3d526e5..a51eac0 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} From a4391af2e9976d898ef674b08c8077691d10bb8d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Aug 2006 12:08:54 +0000 Subject: [PATCH 262/640] allow long comments --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 3d526e5..a51eac0 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} From 5bc3b73e6ddf04d34064bd2b08661cfbafe9cbd1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Aug 2006 12:13:36 +0000 Subject: [PATCH 263/640] allow long comments --- udev-095-longcomment.patch | 24 ++++++++++++++++++++++++ udev.spec | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 udev-095-longcomment.patch diff --git a/udev-095-longcomment.patch b/udev-095-longcomment.patch new file mode 100644 index 0000000..4360a80 --- /dev/null +++ b/udev-095-longcomment.patch @@ -0,0 +1,24 @@ +--- 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.spec b/udev.spec index a51eac0..bb18453 100644 --- a/udev.spec +++ b/udev.spec @@ -327,6 +327,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Aug 10 2006 Harald Hoyer - 095-5 +- allow long comments (bug #200244) + * Mon Aug 7 2006 Harald Hoyer - 095-4 - fixed CAPI device nodes (bug #139321) - fixed bug #201422 From 7742e8f29d7fb151158e4430c3d2654cd741e415 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 10 Aug 2006 12:13:36 +0000 Subject: [PATCH 264/640] allow long comments --- udev-095-longcomment.patch | 24 ++++++++++++++++++++++++ udev.spec | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 udev-095-longcomment.patch diff --git a/udev-095-longcomment.patch b/udev-095-longcomment.patch new file mode 100644 index 0000000..4360a80 --- /dev/null +++ b/udev-095-longcomment.patch @@ -0,0 +1,24 @@ +--- 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.spec b/udev.spec index a51eac0..bb18453 100644 --- a/udev.spec +++ b/udev.spec @@ -327,6 +327,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Aug 10 2006 Harald Hoyer - 095-5 +- allow long comments (bug #200244) + * Mon Aug 7 2006 Harald Hoyer - 095-4 - fixed CAPI device nodes (bug #139321) - fixed bug #201422 From 7e61e26873520b7681dfa3254e3e3b5520a4448a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Aug 2006 12:10:56 +0000 Subject: [PATCH 265/640] - new speedup patch for selinux (bug #202673) --- udev-095-selinux.patch | 65 ++++++++++++++++++++++++++++++++++++++++++ udev.spec | 7 ++++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 udev-095-selinux.patch diff --git a/udev-095-selinux.patch b/udev-095-selinux.patch new file mode 100644 index 0000000..508dc02 --- /dev/null +++ b/udev-095-selinux.patch @@ -0,0 +1,65 @@ +--- 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.spec b/udev.spec index bb18453..ec2afc6 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -24,6 +24,7 @@ Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch Patch10: udev-095-longcomment.patch +Patch11: udev-095-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,6 +70,7 @@ which contains functions to get volume ids. %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 %patch10 -p1 -b .longcomment +%patch11 -p1 -b .selinux %build @@ -327,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Aug 16 2006 Harald Hoyer - 095-6 +- new speedup patch for selinux (bug #202673) + * Thu Aug 10 2006 Harald Hoyer - 095-5 - allow long comments (bug #200244) From 51a22f5380d8c148649ba652311034ad33c0c898 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Aug 2006 12:10:56 +0000 Subject: [PATCH 266/640] - new speedup patch for selinux (bug #202673) --- udev-095-selinux.patch | 65 ++++++++++++++++++++++++++++++++++++++++++ udev.spec | 7 ++++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 udev-095-selinux.patch diff --git a/udev-095-selinux.patch b/udev-095-selinux.patch new file mode 100644 index 0000000..508dc02 --- /dev/null +++ b/udev-095-selinux.patch @@ -0,0 +1,65 @@ +--- 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.spec b/udev.spec index bb18453..ec2afc6 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 5 +Release: 6 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -24,6 +24,7 @@ Patch7: udev-089-nopie.patch Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch Patch10: udev-095-longcomment.patch +Patch11: udev-095-selinux.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,6 +70,7 @@ which contains functions to get volume ids. %patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 %patch10 -p1 -b .longcomment +%patch11 -p1 -b .selinux %build @@ -327,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Aug 16 2006 Harald Hoyer - 095-6 +- new speedup patch for selinux (bug #202673) + * Thu Aug 10 2006 Harald Hoyer - 095-5 - allow long comments (bug #200244) From 43c8550b6c86d48aadff0cf971656de72f5a87e8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Aug 2006 15:27:55 +0000 Subject: [PATCH 267/640] - added udevtimeout= kernel command line parameters for start_udev (default is to wait forever) --- start_udev | 22 ++++++++++++++++++++-- udev.spec | 7 ++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/start_udev b/start_udev index f85057f..d4b8b9a 100755 --- a/start_udev +++ b/start_udev @@ -109,8 +109,13 @@ kill_udevd() { wait_for_queue() { + local timeout=${1:-0} local ret=0 - /sbin/udevsettle --timeout=100 + if [ $timeout -gt 0 ]; then + /sbin/udevsettle --timeout=$timeout + else + /sbin/udevsettle + fi ret=$? if [ $ret -ne 0 ]; then echo -n "Wait timeout. Will continue in the background." @@ -156,6 +161,19 @@ strstr() { return 0 } +getval() { + what=$1 + shift + for arg; do + if strstr "$arg" "$what="; then + val=${arg#${what}=*} + echo $val + return 0 + fi + done + return 1 +} + make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 @@ -169,7 +187,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then fi /sbin/udevtrigger ret=$[$ret + $?] - wait_for_queue + wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] else echo -n " kernel too old for this udev version " diff --git a/udev.spec b/udev.spec index ec2afc6..75bc71d 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -329,6 +329,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Aug 16 2006 Harald Hoyer - 095-7 +- added udevtimeout= + kernel command line parameters for start_udev + (default is to wait forever) + * Wed Aug 16 2006 Harald Hoyer - 095-6 - new speedup patch for selinux (bug #202673) From aadbc380b9d1bcc6523223c55945337894e6d71c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Aug 2006 15:27:55 +0000 Subject: [PATCH 268/640] - added udevtimeout= kernel command line parameters for start_udev (default is to wait forever) --- start_udev | 22 ++++++++++++++++++++-- udev.spec | 7 ++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/start_udev b/start_udev index f85057f..d4b8b9a 100755 --- a/start_udev +++ b/start_udev @@ -109,8 +109,13 @@ kill_udevd() { wait_for_queue() { + local timeout=${1:-0} local ret=0 - /sbin/udevsettle --timeout=100 + if [ $timeout -gt 0 ]; then + /sbin/udevsettle --timeout=$timeout + else + /sbin/udevsettle + fi ret=$? if [ $ret -ne 0 ]; then echo -n "Wait timeout. Will continue in the background." @@ -156,6 +161,19 @@ strstr() { return 0 } +getval() { + what=$1 + shift + for arg; do + if strstr "$arg" "$what="; then + val=${arg#${what}=*} + echo $val + return 0 + fi + done + return 1 +} + make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 @@ -169,7 +187,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then fi /sbin/udevtrigger ret=$[$ret + $?] - wait_for_queue + wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] else echo -n " kernel too old for this udev version " diff --git a/udev.spec b/udev.spec index ec2afc6..75bc71d 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 6 +Release: 7 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -329,6 +329,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Aug 16 2006 Harald Hoyer - 095-7 +- added udevtimeout= + kernel command line parameters for start_udev + (default is to wait forever) + * Wed Aug 16 2006 Harald Hoyer - 095-6 - new speedup patch for selinux (bug #202673) From 6835307e2113ce38fd36bbb04b1336e2f5226993 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 29 Aug 2006 08:09:03 +0000 Subject: [PATCH 269/640] fixed bug #204157 --- udev-rules.patch | 22 +++++++++++++++++----- udev.spec | 5 ++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 47b3c2f..0e13467 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-08-07 14:53:56.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-08-29 10:06:55.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -10,7 +10,19 @@ KERNEL=="dcbri*", NAME="%k", MODE="0660" KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -@@ -217,8 +218,11 @@ +@@ -155,10 +156,7 @@ + SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0660" + +-# create a symlink named after the device map name +-# note devmap_name comes with extras/multipath +-#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" +- ++KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" + + # alsa devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +@@ -217,8 +215,11 @@ KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" @@ -24,7 +36,7 @@ # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -229,8 +233,6 @@ +@@ -229,8 +230,6 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -33,8 +45,8 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" ---- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-08-07 14:58:23.000000000 +0200 -+++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-08-07 14:50:58.000000000 +0200 +--- 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-08-29 10:06:05.000000000 +0200 @@ -1,6 +1,7 @@ # 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 75bc71d..b97bd11 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -329,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Aug 29 2006 Harald Hoyer - 095-8 +- fixed bug #204157 + * Wed Aug 16 2006 Harald Hoyer - 095-7 - added udevtimeout= kernel command line parameters for start_udev From 1bfaa201d635a6621fd228fd8ccef9bf343c7171 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 29 Aug 2006 08:09:03 +0000 Subject: [PATCH 270/640] fixed bug #204157 --- udev-rules.patch | 22 +++++++++++++++++----- udev.spec | 5 ++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 47b3c2f..0e13467 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-08-07 14:53:56.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-08-29 10:06:55.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -10,7 +10,19 @@ KERNEL=="dcbri*", NAME="%k", MODE="0660" KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -@@ -217,8 +218,11 @@ +@@ -155,10 +156,7 @@ + SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0660" + +-# create a symlink named after the device map name +-# note devmap_name comes with extras/multipath +-#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" +- ++KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" + + # alsa devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +@@ -217,8 +215,11 @@ KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" @@ -24,7 +36,7 @@ # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -229,8 +233,6 @@ +@@ -229,8 +230,6 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -33,8 +45,8 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" ---- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-08-07 14:58:23.000000000 +0200 -+++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-08-07 14:50:58.000000000 +0200 +--- 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-08-29 10:06:05.000000000 +0200 @@ -1,6 +1,7 @@ # 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 75bc71d..b97bd11 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 7 +Release: 8 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -329,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Aug 29 2006 Harald Hoyer - 095-8 +- fixed bug #204157 + * Wed Aug 16 2006 Harald Hoyer - 095-7 - added udevtimeout= kernel command line parameters for start_udev From 5a0a7e049e59b20ea5f2d03b28e68839a6712678 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 25 Sep 2006 15:02:11 +0000 Subject: [PATCH 271/640] - improved error msg for firmware_helper (bug #206944) - added xpram symlink to slram device nodes (bug #135733) - removed infiniband rules (bug #206224) - use newest path_id script (bug #207139) --- firmware_helper.c | 4 +++- udev-rules.patch | 25 ++++++++++++++----------- udev.spec | 13 +++++++++---- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/firmware_helper.c b/firmware_helper.c index d03f0b8..061beef 100644 --- a/firmware_helper.c +++ b/firmware_helper.c @@ -115,6 +115,7 @@ int main(int argc, char **argv) { fw_fd = open(data_path, O_RDWR); if (fw_fd == -1) { rc = errno; + fw_path = data_path; goto out_err; } @@ -133,7 +134,8 @@ int main(int argc, char **argv) { set_loading(devpath, 0); return 0; out_err: - close(fw_fd); + if (fw_fd >= 0) + close(fw_fd); set_loading(devpath, -1); log_err(fw_path, rc); return rc; diff --git a/udev-rules.patch b/udev-rules.patch index 0e13467..0c28451 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-08-29 10:06:55.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-09-25 15:53:53.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -10,7 +10,14 @@ KERNEL=="dcbri*", NAME="%k", MODE="0660" KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -@@ -155,10 +156,7 @@ +@@ -149,16 +150,14 @@ + + # s390 devices + KERNEL=="z90crypt", MODE="0666" ++KERNEL="slram[0-9]*", SYMLINK="xpram%n" + + # DVB + KERNEL=="dvb", MODE="0660" SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0660" @@ -22,21 +29,17 @@ # alsa devices KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -217,8 +215,11 @@ +@@ -217,9 +216,6 @@ KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -KERNEL=="umad*", NAME="infiniband/%k" -KERNEL=="issm*", NAME="infiniband/%k" -+KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" - +- # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -229,8 +230,6 @@ + KERNEL=="zaptimer", NAME="zap/timer" +@@ -229,8 +225,6 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -46,7 +49,7 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --- 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-08-29 10:06:05.000000000 +0200 ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-09-25 13:16:26.000000000 +0200 @@ -1,6 +1,7 @@ # 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 b97bd11..0d0f1b0 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,6 +25,7 @@ Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch Patch10: udev-095-longcomment.patch Patch11: udev-095-selinux.patch +Patch12: udev-095-path_id.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -71,6 +72,7 @@ which contains functions to get volume ids. %patch9 -p1 -b .lib64 %patch10 -p1 -b .longcomment %patch11 -p1 -b .selinux +%patch12 -p1 -b .pathid %build @@ -98,7 +100,6 @@ mv udevd udevd.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static -mv extras/path_id/path_id extras/path_id/path_id.static %ifarch s390 s390x mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static %endif @@ -137,7 +138,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id mv extras/ata_id/ata_id.static extras/ata_id/ata_id mv extras/edd_id/edd_id.static extras/edd_id/edd_id -mv extras/path_id/path_id.static extras/path_id/path_id %ifarch s390 s390x mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id %endif @@ -193,7 +193,6 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev -#install -m 0644 extras/path_id/path_id $RPM_BUILD_ROOT/sbin/path_id 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 @@ -329,6 +328,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Sep 25 2006 Harald Hoyer - 095-9 +- improved error msg for firmware_helper (bug #206944) +- added xpram symlink to slram device nodes (bug #135733) +- removed infiniband rules (bug #206224) +- use newest path_id script (bug #207139) + * Tue Aug 29 2006 Harald Hoyer - 095-8 - fixed bug #204157 From 44e34d207993e9e1fc0dbe08dc4eed9af3ce40ce Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 25 Sep 2006 15:02:11 +0000 Subject: [PATCH 272/640] - improved error msg for firmware_helper (bug #206944) - added xpram symlink to slram device nodes (bug #135733) - removed infiniband rules (bug #206224) - use newest path_id script (bug #207139) --- firmware_helper.c | 4 +++- udev-rules.patch | 25 ++++++++++++++----------- udev.spec | 13 +++++++++---- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/firmware_helper.c b/firmware_helper.c index d03f0b8..061beef 100644 --- a/firmware_helper.c +++ b/firmware_helper.c @@ -115,6 +115,7 @@ int main(int argc, char **argv) { fw_fd = open(data_path, O_RDWR); if (fw_fd == -1) { rc = errno; + fw_path = data_path; goto out_err; } @@ -133,7 +134,8 @@ int main(int argc, char **argv) { set_loading(devpath, 0); return 0; out_err: - close(fw_fd); + if (fw_fd >= 0) + close(fw_fd); set_loading(devpath, -1); log_err(fw_path, rc); return rc; diff --git a/udev-rules.patch b/udev-rules.patch index 0e13467..0c28451 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-08-29 10:06:55.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-09-25 15:53:53.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -10,7 +10,14 @@ KERNEL=="dcbri*", NAME="%k", MODE="0660" KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -@@ -155,10 +156,7 @@ +@@ -149,16 +150,14 @@ + + # s390 devices + KERNEL=="z90crypt", MODE="0666" ++KERNEL="slram[0-9]*", SYMLINK="xpram%n" + + # DVB + KERNEL=="dvb", MODE="0660" SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0660" @@ -22,21 +29,17 @@ # alsa devices KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -217,8 +215,11 @@ +@@ -217,9 +216,6 @@ KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -KERNEL=="umad*", NAME="infiniband/%k" -KERNEL=="issm*", NAME="infiniband/%k" -+KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" -+KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" - +- # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -229,8 +230,6 @@ + KERNEL=="zaptimer", NAME="zap/timer" +@@ -229,8 +225,6 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -46,7 +49,7 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --- 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-08-29 10:06:05.000000000 +0200 ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-09-25 13:16:26.000000000 +0200 @@ -1,6 +1,7 @@ # 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 b97bd11..0d0f1b0 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 8 +Release: 9 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -25,6 +25,7 @@ Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch Patch10: udev-095-longcomment.patch Patch11: udev-095-selinux.patch +Patch12: udev-095-path_id.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -71,6 +72,7 @@ which contains functions to get volume ids. %patch9 -p1 -b .lib64 %patch10 -p1 -b .longcomment %patch11 -p1 -b .selinux +%patch12 -p1 -b .pathid %build @@ -98,7 +100,6 @@ mv udevd udevd.static mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static mv extras/ata_id/ata_id extras/ata_id/ata_id.static mv extras/edd_id/edd_id extras/edd_id/edd_id.static -mv extras/path_id/path_id extras/path_id/path_id.static %ifarch s390 s390x mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static %endif @@ -137,7 +138,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id mv extras/ata_id/ata_id.static extras/ata_id/ata_id mv extras/edd_id/edd_id.static extras/edd_id/edd_id -mv extras/path_id/path_id.static extras/path_id/path_id %ifarch s390 s390x mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id %endif @@ -193,7 +193,6 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev -#install -m 0644 extras/path_id/path_id $RPM_BUILD_ROOT/sbin/path_id 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 @@ -329,6 +328,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Sep 25 2006 Harald Hoyer - 095-9 +- improved error msg for firmware_helper (bug #206944) +- added xpram symlink to slram device nodes (bug #135733) +- removed infiniband rules (bug #206224) +- use newest path_id script (bug #207139) + * Tue Aug 29 2006 Harald Hoyer - 095-8 - fixed bug #204157 From 74f03f6eef68bbce76a6e5e50c13a76f75407f80 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 25 Sep 2006 15:08:44 +0000 Subject: [PATCH 273/640] *** empty log message *** --- udev-095-path_id.patch | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 udev-095-path_id.patch diff --git a/udev-095-path_id.patch b/udev-095-path_id.patch new file mode 100644 index 0000000..e06f045 --- /dev/null +++ b/udev-095-path_id.patch @@ -0,0 +1,70 @@ +--- 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 From e708ad0b18af0fcd7bbbbef618860cdfffd3e914 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 25 Sep 2006 15:08:44 +0000 Subject: [PATCH 274/640] *** empty log message *** --- udev-095-path_id.patch | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 udev-095-path_id.patch diff --git a/udev-095-path_id.patch b/udev-095-path_id.patch new file mode 100644 index 0000000..e06f045 --- /dev/null +++ b/udev-095-path_id.patch @@ -0,0 +1,70 @@ +--- 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 From 6e07a04b5db6f5570a5129491ce667d46a020b6a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 27 Sep 2006 16:18:08 +0000 Subject: [PATCH 275/640] - typo in xpram/slram rule (bug #205563) --- udev-rules.patch | 4 ++-- udev.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 0c28451..ba7f472 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-09-25 15:53:53.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-09-27 18:13:24.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -14,7 +14,7 @@ # s390 devices KERNEL=="z90crypt", MODE="0666" -+KERNEL="slram[0-9]*", SYMLINK="xpram%n" ++KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" # DVB KERNEL=="dvb", MODE="0660" diff --git a/udev.spec b/udev.spec index 0d0f1b0..9239f80 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -328,9 +328,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Sep 27 2006 Harald Hoyer - 095-10 +- typo in xpram/slram rule (bug #205563) + * Mon Sep 25 2006 Harald Hoyer - 095-9 - improved error msg for firmware_helper (bug #206944) -- added xpram symlink to slram device nodes (bug #135733) +- added xpram symlink to slram device nodes (bug #205563) - removed infiniband rules (bug #206224) - use newest path_id script (bug #207139) From b4febc7639dd651fb433beda1a3cf1bc5086ade7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 27 Sep 2006 16:18:08 +0000 Subject: [PATCH 276/640] - typo in xpram/slram rule (bug #205563) --- udev-rules.patch | 4 ++-- udev.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 0c28451..ba7f472 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-09-25 15:53:53.000000000 +0200 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-09-27 18:13:24.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -14,7 +14,7 @@ # s390 devices KERNEL=="z90crypt", MODE="0666" -+KERNEL="slram[0-9]*", SYMLINK="xpram%n" ++KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" # DVB KERNEL=="dvb", MODE="0660" diff --git a/udev.spec b/udev.spec index 0d0f1b0..9239f80 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 9 +Release: 10 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -328,9 +328,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Sep 27 2006 Harald Hoyer - 095-10 +- typo in xpram/slram rule (bug #205563) + * Mon Sep 25 2006 Harald Hoyer - 095-9 - improved error msg for firmware_helper (bug #206944) -- added xpram symlink to slram device nodes (bug #135733) +- added xpram symlink to slram device nodes (bug #205563) - removed infiniband rules (bug #206224) - use newest path_id script (bug #207139) From 313008525e7b6780e99ef1038333a9ec6ff13c5c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 28 Sep 2006 13:58:57 +0000 Subject: [PATCH 277/640] - load the mptctl module, if mptbase is loaded (bug #205510) --- udev-rules.patch | 14 ++++++++++++-- udev.spec | 5 ++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index ba7f472..94e5c87 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -49,12 +49,22 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --- 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-09-25 13:16:26.000000000 +0200 -@@ -1,6 +1,7 @@ ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-09-28 15:56:15.000000000 +0200 +@@ -1,9 +1,16 @@ # 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" ++ ++ACTION=="add", SUBSYSTEM=="module", KERNEL=="mptbase", \ ++ RUN="/sbin/modprobe mptctl", OPTIONS="last_rule", \ ++ GOTO="processed_modules" ++ ++SUBSYSTEM=="module", OPTIONS="ignore_device" ++LABEL="processed_modules" # ignore these events until someone needs them SUBSYSTEM=="drivers", OPTIONS="ignore_device" +-SUBSYSTEM=="module", OPTIONS="ignore_device" + + ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index 9239f80..7b96bfd 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 10 +Release: 11 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -328,6 +328,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Sep 28 2006 Harald Hoyer - 095-11 +- load the mptctl module, if mptbase is loaded (bug #205510) + * Wed Sep 27 2006 Harald Hoyer - 095-10 - typo in xpram/slram rule (bug #205563) From 51abef88edeefa02b9f9267f523da0edb8a724a2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 28 Sep 2006 13:58:57 +0000 Subject: [PATCH 278/640] - load the mptctl module, if mptbase is loaded (bug #205510) --- udev-rules.patch | 14 ++++++++++++-- udev.spec | 5 ++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index ba7f472..94e5c87 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -49,12 +49,22 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --- 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-09-25 13:16:26.000000000 +0200 -@@ -1,6 +1,7 @@ ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-09-28 15:56:15.000000000 +0200 +@@ -1,9 +1,16 @@ # 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" ++ ++ACTION=="add", SUBSYSTEM=="module", KERNEL=="mptbase", \ ++ RUN="/sbin/modprobe mptctl", OPTIONS="last_rule", \ ++ GOTO="processed_modules" ++ ++SUBSYSTEM=="module", OPTIONS="ignore_device" ++LABEL="processed_modules" # ignore these events until someone needs them SUBSYSTEM=="drivers", OPTIONS="ignore_device" +-SUBSYSTEM=="module", OPTIONS="ignore_device" + + ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index 9239f80..7b96bfd 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 10 +Release: 11 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -328,6 +328,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Sep 28 2006 Harald Hoyer - 095-11 +- load the mptctl module, if mptbase is loaded (bug #205510) + * Wed Sep 27 2006 Harald Hoyer - 095-10 - typo in xpram/slram rule (bug #205563) From b9bcdcb26accd7a1b5259fe4ffd53ca0bdb1c6c0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 28 Sep 2006 14:10:54 +0000 Subject: [PATCH 279/640] removed modprobe uglieness... better done by /etc/modprobe.d --- udev-rules.patch | 14 ++------------ udev.spec | 3 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 94e5c87..a2221c1 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -49,22 +49,12 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --- 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-09-28 15:56:15.000000000 +0200 -@@ -1,9 +1,16 @@ ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-09-28 16:08:23.000000000 +0200 +@@ -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" -+ -+ACTION=="add", SUBSYSTEM=="module", KERNEL=="mptbase", \ -+ RUN="/sbin/modprobe mptctl", OPTIONS="last_rule", \ -+ GOTO="processed_modules" -+ -+SUBSYSTEM=="module", OPTIONS="ignore_device" -+LABEL="processed_modules" # ignore these events until someone needs them SUBSYSTEM=="drivers", OPTIONS="ignore_device" --SUBSYSTEM=="module", OPTIONS="ignore_device" - - ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index 7b96bfd..3d670be 100644 --- a/udev.spec +++ b/udev.spec @@ -328,9 +328,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog -* Thu Sep 28 2006 Harald Hoyer - 095-11 -- load the mptctl module, if mptbase is loaded (bug #205510) - * Wed Sep 27 2006 Harald Hoyer - 095-10 - typo in xpram/slram rule (bug #205563) From 0664b17c28a67e9c7c5b8913c403da9c8b872b4a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 28 Sep 2006 14:10:54 +0000 Subject: [PATCH 280/640] removed modprobe uglieness... better done by /etc/modprobe.d --- udev-rules.patch | 14 ++------------ udev.spec | 3 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 94e5c87..a2221c1 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -49,22 +49,12 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" --- 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-09-28 15:56:15.000000000 +0200 -@@ -1,9 +1,16 @@ ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-09-28 16:08:23.000000000 +0200 +@@ -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" -+ -+ACTION=="add", SUBSYSTEM=="module", KERNEL=="mptbase", \ -+ RUN="/sbin/modprobe mptctl", OPTIONS="last_rule", \ -+ GOTO="processed_modules" -+ -+SUBSYSTEM=="module", OPTIONS="ignore_device" -+LABEL="processed_modules" # ignore these events until someone needs them SUBSYSTEM=="drivers", OPTIONS="ignore_device" --SUBSYSTEM=="module", OPTIONS="ignore_device" - - ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" diff --git a/udev.spec b/udev.spec index 7b96bfd..3d670be 100644 --- a/udev.spec +++ b/udev.spec @@ -328,9 +328,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog -* Thu Sep 28 2006 Harald Hoyer - 095-11 -- load the mptctl module, if mptbase is loaded (bug #205510) - * Wed Sep 27 2006 Harald Hoyer - 095-10 - typo in xpram/slram rule (bug #205563) From 608a9a87bac62db4d35770bb849fe1646c6c90f6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 3 Oct 2006 20:18:25 +0000 Subject: [PATCH 281/640] - autoload mmc_block (#171687) --- udev-rules.patch | 31 ++++++++++++++++++++----------- udev.spec | 5 ++++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index a2221c1..81d7a7c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,15 @@ ---- 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-09-27 18:13:24.000000000 +0200 +--- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-07-04 06:34:55.000000000 -0400 ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-10-03 16:10:41.000000000 -0400 +@@ -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 06:34:55.000000000 -0400 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-10-03 16:14:24.000000000 -0400 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -48,13 +58,12 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" ---- 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-09-28 16:08:23.000000000 +0200 -@@ -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" +@@ -345,5 +339,8 @@ + 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+="socket:/org/kernel/udev/monitor" - # ignore these events until someone needs them - SUBSYSTEM=="drivers", OPTIONS="ignore_device" diff --git a/udev.spec b/udev.spec index 3d670be..94b0921 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 11 +Release: 12 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -328,6 +328,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Oct 3 2006 Jeremy Katz - 095-12 +- autoload mmc_block (#171687) + * Wed Sep 27 2006 Harald Hoyer - 095-10 - typo in xpram/slram rule (bug #205563) From 3edf874f7b743ccc83cf283497c51447b47e744d Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 3 Oct 2006 20:18:25 +0000 Subject: [PATCH 282/640] - autoload mmc_block (#171687) --- udev-rules.patch | 31 ++++++++++++++++++++----------- udev.spec | 5 ++++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index a2221c1..81d7a7c 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,15 @@ ---- 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-09-27 18:13:24.000000000 +0200 +--- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-07-04 06:34:55.000000000 -0400 ++++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-10-03 16:10:41.000000000 -0400 +@@ -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 06:34:55.000000000 -0400 ++++ udev-095/etc/udev/redhat/50-udev.rules 2006-10-03 16:14:24.000000000 -0400 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -48,13 +58,12 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" ---- 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-09-28 16:08:23.000000000 +0200 -@@ -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" +@@ -345,5 +339,8 @@ + 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+="socket:/org/kernel/udev/monitor" - # ignore these events until someone needs them - SUBSYSTEM=="drivers", OPTIONS="ignore_device" diff --git a/udev.spec b/udev.spec index 3d670be..94b0921 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 11 +Release: 12 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -328,6 +328,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Oct 3 2006 Jeremy Katz - 095-12 +- autoload mmc_block (#171687) + * Wed Sep 27 2006 Harald Hoyer - 095-10 - typo in xpram/slram rule (bug #205563) From 6771560622d3c45e653679f463869d58bac7dec1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 4 Oct 2006 08:24:32 +0000 Subject: [PATCH 283/640] - fixed path_id script (bug #207139) --- udev-095-path_id2.patch | 73 +++++++++++++++++++++++++++++++++++++++++ udev.spec | 7 +++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 udev-095-path_id2.patch diff --git a/udev-095-path_id2.patch b/udev-095-path_id2.patch new file mode 100644 index 0000000..2328172 --- /dev/null +++ b/udev-095-path_id2.patch @@ -0,0 +1,73 @@ +--- 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.spec b/udev.spec index 94b0921..bc36e56 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 12 +Release: 13 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -26,6 +26,7 @@ Patch9: udev-091-lib64.patch Patch10: udev-095-longcomment.patch Patch11: udev-095-selinux.patch Patch12: udev-095-path_id.patch +Patch13: udev-095-path_id2.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -73,6 +74,7 @@ which contains functions to get volume ids. %patch10 -p1 -b .longcomment %patch11 -p1 -b .selinux %patch12 -p1 -b .pathid +%patch13 -p1 -b .pathid2 %build @@ -328,6 +330,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Oct 4 2006 Harald Hoyer - 095-13 +- fixed path_id script (bug #207139) + * Tue Oct 3 2006 Jeremy Katz - 095-12 - autoload mmc_block (#171687) From fe7568c8999fd12ea1bc17e70efabc6b217d4b8d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 4 Oct 2006 08:24:32 +0000 Subject: [PATCH 284/640] - fixed path_id script (bug #207139) --- udev-095-path_id2.patch | 73 +++++++++++++++++++++++++++++++++++++++++ udev.spec | 7 +++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 udev-095-path_id2.patch diff --git a/udev-095-path_id2.patch b/udev-095-path_id2.patch new file mode 100644 index 0000000..2328172 --- /dev/null +++ b/udev-095-path_id2.patch @@ -0,0 +1,73 @@ +--- 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.spec b/udev.spec index 94b0921..bc36e56 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 12 +Release: 13 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -26,6 +26,7 @@ Patch9: udev-091-lib64.patch Patch10: udev-095-longcomment.patch Patch11: udev-095-selinux.patch Patch12: udev-095-path_id.patch +Patch13: udev-095-path_id2.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -73,6 +74,7 @@ which contains functions to get volume ids. %patch10 -p1 -b .longcomment %patch11 -p1 -b .selinux %patch12 -p1 -b .pathid +%patch13 -p1 -b .pathid2 %build @@ -328,6 +330,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Oct 4 2006 Harald Hoyer - 095-13 +- fixed path_id script (bug #207139) + * Tue Oct 3 2006 Jeremy Katz - 095-12 - autoload mmc_block (#171687) From f067c6a9e5b2171874e43712e88fd2a3fa37327b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 11 Oct 2006 06:49:42 +0000 Subject: [PATCH 285/640] - skip persistent block for gnbd devices (bug #210227) --- udev-rules.patch | 33 +++++++++++++++++++++------------ udev.spec | 5 ++++- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 81d7a7c..94e6662 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,15 +1,5 @@ ---- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-07-04 06:34:55.000000000 -0400 -+++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-10-03 16:10:41.000000000 -0400 -@@ -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 06:34:55.000000000 -0400 -+++ udev-095/etc/udev/redhat/50-udev.rules 2006-10-03 16:14:24.000000000 -0400 +--- 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-10-11 08:45:35.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -58,6 +48,15 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" +@@ -262,7 +256,7 @@ + SUBSYSTEM!="block", GOTO="persistent_end" + + # skip rules for inappropriate block devices +-KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" ++KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" + + # 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 +339,8 @@ ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ RUN+="/sbin/modprobe st" @@ -67,3 +66,13 @@ + RUN+="socket:/org/kernel/udev/monitor" +--- 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-10-11 08:45:05.000000000 +0200 +@@ -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" diff --git a/udev.spec b/udev.spec index bc36e56..9bab702 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 13 +Release: 14 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -330,6 +330,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Oct 11 2006 Harald Hoyer - 095-14 +- skip persistent block for gnbd devices (bug #210227) + * Wed Oct 4 2006 Harald Hoyer - 095-13 - fixed path_id script (bug #207139) From 9aa3450a5b0b369395aba823729afb37920c71e0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 11 Oct 2006 06:49:42 +0000 Subject: [PATCH 286/640] - skip persistent block for gnbd devices (bug #210227) --- udev-rules.patch | 33 +++++++++++++++++++++------------ udev.spec | 5 ++++- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 81d7a7c..94e6662 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,15 +1,5 @@ ---- udev-095/etc/udev/redhat/05-udev-early.rules.rhrules 2006-07-04 06:34:55.000000000 -0400 -+++ udev-095/etc/udev/redhat/05-udev-early.rules 2006-10-03 16:10:41.000000000 -0400 -@@ -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 06:34:55.000000000 -0400 -+++ udev-095/etc/udev/redhat/50-udev.rules 2006-10-03 16:14:24.000000000 -0400 +--- 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-10-11 08:45:35.000000000 +0200 @@ -28,7 +28,8 @@ KERNEL=="ippp*", NAME="%k", MODE="0660" KERNEL=="isdn*", NAME="%k", MODE="0660" @@ -58,6 +48,15 @@ KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" +@@ -262,7 +256,7 @@ + SUBSYSTEM!="block", GOTO="persistent_end" + + # skip rules for inappropriate block devices +-KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" ++KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" + + # 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 +339,8 @@ ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ RUN+="/sbin/modprobe st" @@ -67,3 +66,13 @@ + RUN+="socket:/org/kernel/udev/monitor" +--- 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-10-11 08:45:05.000000000 +0200 +@@ -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" diff --git a/udev.spec b/udev.spec index bc36e56..9bab702 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 095 -Release: 13 +Release: 14 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -330,6 +330,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Oct 11 2006 Harald Hoyer - 095-14 +- skip persistent block for gnbd devices (bug #210227) + * Wed Oct 4 2006 Harald Hoyer - 095-13 - fixed path_id script (bug #207139) From 084706393f1e507d47849c7b674f446373c832f4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Nov 2006 14:25:07 +0000 Subject: [PATCH 287/640] version 103 --- .cvsignore | 2 +- sources | 2 +- start_udev | 4 +++- udev-089-last_modalias.patch | 36 ++++++++++++++++++++---------------- udev.spec | 19 ++++++++++--------- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9fd1c1f..89c1354 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-095.tar.bz2 +udev-103.tar.bz2 diff --git a/sources b/sources index cd1ffb8..0a2e57d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -587e1b43cddb5e71196a38818e8938b0 udev-095.tar.bz2 +7360ce47b5ec3f9fa71f18071ecb8b97 udev-103.tar.bz2 diff --git a/start_udev b/start_udev index d4b8b9a..801980e 100755 --- a/start_udev +++ b/start_udev @@ -185,7 +185,9 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi - /sbin/udevtrigger + /sbin/udevtrigger --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc00i10*' --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc03i*' + /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc00i10*' + /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc03i*' ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] diff --git a/udev-089-last_modalias.patch b/udev-089-last_modalias.patch index 63886c2..a9ce08c 100644 --- a/udev-089-last_modalias.patch +++ b/udev-089-last_modalias.patch @@ -1,16 +1,16 @@ ---- udev-089/udevtrigger.c.last_modalias 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/udevtrigger.c 2006-04-13 08:11:59.000000000 +0200 +--- 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 #include "udev.h" - -@@ -67,10 +68,46 @@ - NULL - }; + #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[] = { @@ -19,12 +19,15 @@ + NULL, +}; + -+ - LIST_HEAD(device_first_list); - LIST_HEAD(device_default_list); - LIST_HEAD(device_last_list); + #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) +{ + @@ -51,13 +54,14 @@ + close(fd); + return 0; +} ++ + static int device_list_insert(const char *path) { - struct list_head *device_list = &device_default_list; -@@ -87,6 +124,10 @@ - device_list = &device_last_list; - break; + char filename[PATH_SIZE]; +@@ -495,6 +533,10 @@ + default: + goto exit; } + if (modalias_is_greylisted(path)) { + device_list = &device_last_list; @@ -65,4 +69,4 @@ + } } - dbg("add '%s'" , path); + if (failed) diff --git a/udev.spec b/udev.spec index 9bab702..d7d16a3 100644 --- a/udev.spec +++ b/udev.spec @@ -2,8 +2,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 095 -Release: 14 +Version: 103 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -64,17 +64,17 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .rhpermconv -%patch2 -p1 -b .rhrules +#%patch2 -p1 -b .rhrules %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras -%patch6 -p1 -b .pg +#%patch6 -p1 -b .pg %patch7 -p1 -b .nopie -%patch8 -p1 -b .last_modalias +#%patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 -%patch10 -p1 -b .longcomment -%patch11 -p1 -b .selinux -%patch12 -p1 -b .pathid -%patch13 -p1 -b .pathid2 +#%patch10 -p1 -b .longcomment +#%patch11 -p1 -b .selinux +#%patch12 -p1 -b .pathid +#%patch13 -p1 -b .pathid2 %build @@ -168,6 +168,7 @@ make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" i 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 +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} From 076b875099a5a5ac6b56431ba47500bfb64fa001 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Nov 2006 14:25:07 +0000 Subject: [PATCH 288/640] version 103 --- .cvsignore | 2 +- sources | 2 +- start_udev | 4 +++- udev-089-last_modalias.patch | 36 ++++++++++++++++++++---------------- udev.spec | 19 ++++++++++--------- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9fd1c1f..89c1354 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-095.tar.bz2 +udev-103.tar.bz2 diff --git a/sources b/sources index cd1ffb8..0a2e57d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -587e1b43cddb5e71196a38818e8938b0 udev-095.tar.bz2 +7360ce47b5ec3f9fa71f18071ecb8b97 udev-103.tar.bz2 diff --git a/start_udev b/start_udev index d4b8b9a..801980e 100755 --- a/start_udev +++ b/start_udev @@ -185,7 +185,9 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi - /sbin/udevtrigger + /sbin/udevtrigger --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc00i10*' --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc03i*' + /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc00i10*' + /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc03i*' ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] diff --git a/udev-089-last_modalias.patch b/udev-089-last_modalias.patch index 63886c2..a9ce08c 100644 --- a/udev-089-last_modalias.patch +++ b/udev-089-last_modalias.patch @@ -1,16 +1,16 @@ ---- udev-089/udevtrigger.c.last_modalias 2006-04-03 14:41:10.000000000 +0200 -+++ udev-089/udevtrigger.c 2006-04-13 08:11:59.000000000 +0200 +--- 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 #include "udev.h" - -@@ -67,10 +68,46 @@ - NULL - }; + #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[] = { @@ -19,12 +19,15 @@ + NULL, +}; + -+ - LIST_HEAD(device_first_list); - LIST_HEAD(device_default_list); - LIST_HEAD(device_last_list); + #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) +{ + @@ -51,13 +54,14 @@ + close(fd); + return 0; +} ++ + static int device_list_insert(const char *path) { - struct list_head *device_list = &device_default_list; -@@ -87,6 +124,10 @@ - device_list = &device_last_list; - break; + char filename[PATH_SIZE]; +@@ -495,6 +533,10 @@ + default: + goto exit; } + if (modalias_is_greylisted(path)) { + device_list = &device_last_list; @@ -65,4 +69,4 @@ + } } - dbg("add '%s'" , path); + if (failed) diff --git a/udev.spec b/udev.spec index 9bab702..d7d16a3 100644 --- a/udev.spec +++ b/udev.spec @@ -2,8 +2,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 095 -Release: 14 +Version: 103 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -64,17 +64,17 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .rhpermconv -%patch2 -p1 -b .rhrules +#%patch2 -p1 -b .rhrules %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras -%patch6 -p1 -b .pg +#%patch6 -p1 -b .pg %patch7 -p1 -b .nopie -%patch8 -p1 -b .last_modalias +#%patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 -%patch10 -p1 -b .longcomment -%patch11 -p1 -b .selinux -%patch12 -p1 -b .pathid -%patch13 -p1 -b .pathid2 +#%patch10 -p1 -b .longcomment +#%patch11 -p1 -b .selinux +#%patch12 -p1 -b .pathid +#%patch13 -p1 -b .pathid2 %build @@ -168,6 +168,7 @@ make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" i 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 +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} From 70dd8819a2e61c30b8253ef0a9fce56123c732ce Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Nov 2006 09:58:51 +0000 Subject: [PATCH 289/640] - changed SYSFS to new ATTR rules - Resolves: rhbz#214898 --- udev.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/udev.spec b/udev.spec index d7d16a3..e105ac4 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 103 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -75,7 +75,7 @@ which contains functions to get volume ids. #%patch11 -p1 -b .selinux #%patch12 -p1 -b .pathid #%patch13 -p1 -b .pathid2 - +rm -f etc/udev/redhat/51-hotplug.rules %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) @@ -168,7 +168,6 @@ make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" i 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 -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} @@ -176,8 +175,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} 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 -# Backwards compat -install -m 0644 etc/udev/redhat/51-hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf @@ -303,7 +300,6 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -331,6 +327,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Nov 10 2006 Harald Hoyer - 103-2 +- changed SYSFS to new ATTR rules +- Resolves: rhbz#214898 + +* Fri Nov 10 2006 Harald Hoyer - 103-1 +- Removed 51-hotplug.rules +- Resolves: rhbz#214277 + * Wed Oct 11 2006 Harald Hoyer - 095-14 - skip persistent block for gnbd devices (bug #210227) From 9b390c63670bf7530e6d3aed3a7f1d183cc05ab4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Nov 2006 09:58:51 +0000 Subject: [PATCH 290/640] - changed SYSFS to new ATTR rules - Resolves: rhbz#214898 --- udev.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/udev.spec b/udev.spec index d7d16a3..e105ac4 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 103 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -75,7 +75,7 @@ which contains functions to get volume ids. #%patch11 -p1 -b .selinux #%patch12 -p1 -b .pathid #%patch13 -p1 -b .pathid2 - +rm -f etc/udev/redhat/51-hotplug.rules %build # Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) @@ -168,7 +168,6 @@ make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" i 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 -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} @@ -176,8 +175,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} 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 -# Backwards compat -install -m 0644 etc/udev/redhat/51-hotplug.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/51-hotplug.rules install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf @@ -303,7 +300,6 @@ rm -rf $RPM_BUILD_ROOT %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/51-hotplug.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -331,6 +327,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Nov 10 2006 Harald Hoyer - 103-2 +- changed SYSFS to new ATTR rules +- Resolves: rhbz#214898 + +* Fri Nov 10 2006 Harald Hoyer - 103-1 +- Removed 51-hotplug.rules +- Resolves: rhbz#214277 + * Wed Oct 11 2006 Harald Hoyer - 095-14 - skip persistent block for gnbd devices (bug #210227) From 9636bd1e2f03943bf148e824b48c9c40f449e43c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Nov 2006 10:06:15 +0000 Subject: [PATCH 291/640] - changed SYSFS to new ATTR rules - Resolves: rhbz#214898 --- udev-rules.patch | 181 +++++++++++++++++++++++++++++------------------ udev.spec | 2 +- 2 files changed, 115 insertions(+), 68 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 94e6662..a0ea8ab 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,78 +1,125 @@ ---- 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-10-11 08:45:35.000000000 +0200 -@@ -28,7 +28,8 @@ - KERNEL=="ippp*", NAME="%k", MODE="0660" - KERNEL=="isdn*", NAME="%k", MODE="0660" - KERNEL=="isdnctrl*", NAME="%k", MODE="0660" --KERNEL=="capi*", NAME="%k", MODE="0660" -+KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" -+KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" - KERNEL=="dcbri*", NAME="%k", MODE="0660" - KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -@@ -149,16 +150,14 @@ +--- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-11-10 11:04:04.000000000 +0100 ++++ udev-103/etc/udev/redhat/50-udev.rules 2006-11-10 11:04:07.000000000 +0100 +@@ -41,9 +41,9 @@ + KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", 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" - # s390 devices - KERNEL=="z90crypt", MODE="0666" -+KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" + # vc devices + KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +@@ -72,7 +72,7 @@ + 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", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/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*'" - # DVB - KERNEL=="dvb", MODE="0660" - SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ - NAME="%c", MODE="0660" - --# create a symlink named after the device map name --# note devmap_name comes with extras/multipath --#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" -- -+KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" - - # alsa devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -217,9 +216,6 @@ - KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - --KERNEL=="umad*", NAME="infiniband/%k" --KERNEL=="issm*", NAME="infiniband/%k" -- - # Section for zaptel device - KERNEL=="zapctl", NAME="zap/ctl" - KERNEL=="zaptimer", NAME="zap/timer" -@@ -229,8 +225,6 @@ + # audio devices +@@ -231,24 +231,24 @@ KERNEL=="pktcdvd", NAME="%k/control" -- -- - KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ - SYSFS{device/media}=="floppy", \ +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ +- SYSFS{device/media}=="floppy", \ ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ ++ ATTRS{media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -@@ -262,7 +256,7 @@ - SUBSYSTEM!="block", GOTO="persistent_end" - # skip rules for inappropriate block devices --KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" -+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%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", SYSFS{removable}=="1", 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 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", SYSFS{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" + + # rename sr* to scd* + KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" +-KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ ++KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ + OPTIONS+="ignore_remove" + + +@@ -265,15 +265,15 @@ + KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" # 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 +339,8 @@ - ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ +-BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" +-BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" ++BUS=="ide", DRIVER!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" ++BUS=="ide", 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*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" ++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" +@@ -291,7 +291,7 @@ + KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" + + # by-label/by-uuid (filesystem properties) +-KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end" ++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}" +@@ -320,29 +320,29 @@ + # sr: 4 TYPE_WORM, 5 TYPE_ROM + # st/osst: 1 TYPE_TAPE + # sg: 8 changer, [36] scanner +-ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ ++ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ + RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" +-ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ ++ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ + RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + + + ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ + RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ + RUN+="/sbin/modprobe sr_mod" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ + SYMLINK+="scanner scanner-%k", MODE="0660" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ + 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" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ +- SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ ++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+="/sbin/modprobe mmc_block" -+ - RUN+="socket:/org/kernel/udev/monitor" - ---- 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-10-11 08:45:05.000000000 +0200 -@@ -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" + # mmc block devices diff --git a/udev.spec b/udev.spec index e105ac4..6161276 100644 --- a/udev.spec +++ b/udev.spec @@ -64,7 +64,7 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .rhpermconv -#%patch2 -p1 -b .rhrules +%patch2 -p1 -b .rhrules %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras #%patch6 -p1 -b .pg From 7af16423514a4da4caff82feae2ad86da8bbd3bd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Nov 2006 10:06:15 +0000 Subject: [PATCH 292/640] - changed SYSFS to new ATTR rules - Resolves: rhbz#214898 --- udev-rules.patch | 181 +++++++++++++++++++++++++++++------------------ udev.spec | 2 +- 2 files changed, 115 insertions(+), 68 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 94e6662..a0ea8ab 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,78 +1,125 @@ ---- 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-10-11 08:45:35.000000000 +0200 -@@ -28,7 +28,8 @@ - KERNEL=="ippp*", NAME="%k", MODE="0660" - KERNEL=="isdn*", NAME="%k", MODE="0660" - KERNEL=="isdnctrl*", NAME="%k", MODE="0660" --KERNEL=="capi*", NAME="%k", MODE="0660" -+KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" -+KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" - KERNEL=="dcbri*", NAME="%k", MODE="0660" - KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" -@@ -149,16 +150,14 @@ +--- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-11-10 11:04:04.000000000 +0100 ++++ udev-103/etc/udev/redhat/50-udev.rules 2006-11-10 11:04:07.000000000 +0100 +@@ -41,9 +41,9 @@ + KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" +-KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", 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" - # s390 devices - KERNEL=="z90crypt", MODE="0666" -+KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" + # vc devices + KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +@@ -72,7 +72,7 @@ + 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", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/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*'" - # DVB - KERNEL=="dvb", MODE="0660" - SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ - NAME="%c", MODE="0660" - --# create a symlink named after the device map name --# note devmap_name comes with extras/multipath --#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" -- -+KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" - - # alsa devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -217,9 +216,6 @@ - KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" - --KERNEL=="umad*", NAME="infiniband/%k" --KERNEL=="issm*", NAME="infiniband/%k" -- - # Section for zaptel device - KERNEL=="zapctl", NAME="zap/ctl" - KERNEL=="zaptimer", NAME="zap/timer" -@@ -229,8 +225,6 @@ + # audio devices +@@ -231,24 +231,24 @@ KERNEL=="pktcdvd", NAME="%k/control" -- -- - KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ - SYSFS{device/media}=="floppy", \ +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ +- SYSFS{device/media}=="floppy", \ ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ ++ ATTRS{media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -@@ -262,7 +256,7 @@ - SUBSYSTEM!="block", GOTO="persistent_end" - # skip rules for inappropriate block devices --KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end" -+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" ++KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k" + +-KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%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", SYSFS{removable}=="1", 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 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", SYSFS{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" + + # rename sr* to scd* + KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" +-KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ ++KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ + OPTIONS+="ignore_remove" + + +@@ -265,15 +265,15 @@ + KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" # 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 +339,8 @@ - ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ +-BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" +-BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" ++BUS=="ide", DRIVER!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" ++BUS=="ide", 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*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" ++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" +@@ -291,7 +291,7 @@ + KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" + + # by-label/by-uuid (filesystem properties) +-KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end" ++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}" +@@ -320,29 +320,29 @@ + # sr: 4 TYPE_WORM, 5 TYPE_ROM + # st/osst: 1 TYPE_TAPE + # sg: 8 changer, [36] scanner +-ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ ++ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ + RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" +-ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ ++ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ + RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" + + + ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ + RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ + RUN+="/sbin/modprobe sr_mod" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ + SYMLINK+="scanner scanner-%k", MODE="0660" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ + 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" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ +- SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" +-ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ ++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+="/sbin/modprobe mmc_block" -+ - RUN+="socket:/org/kernel/udev/monitor" - ---- 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-10-11 08:45:05.000000000 +0200 -@@ -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" + # mmc block devices diff --git a/udev.spec b/udev.spec index e105ac4..6161276 100644 --- a/udev.spec +++ b/udev.spec @@ -64,7 +64,7 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .rhpermconv -#%patch2 -p1 -b .rhrules +%patch2 -p1 -b .rhrules %patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras #%patch6 -p1 -b .pg From fb8d91fe42ce0094c3629d14c1840d63436c83fc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 6 Dec 2006 12:13:57 +0000 Subject: [PATCH 293/640] - changed DRIVER to DRIVERS - Resolves: rhbz#218160 --- udev-rules.patch | 6 +++--- udev.spec | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index a0ea8ab..19ad30d 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ ---- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-11-10 11:04:04.000000000 +0100 -+++ udev-103/etc/udev/redhat/50-udev.rules 2006-11-10 11:04:07.000000000 +0100 +--- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-10-20 14:43:35.000000000 +0200 ++++ udev-103/etc/udev/redhat/50-udev.rules 2006-12-06 13:10:19.000000000 +0100 @@ -41,9 +41,9 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -60,7 +60,7 @@ # never access removable ide devices, the drivers are causing event loops on open() -BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" -BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" -+BUS=="ide", DRIVER!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" ++BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" +BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" # by-id (hardware serial number) diff --git a/udev.spec b/udev.spec index 6161276..0b233e1 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 103 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -327,6 +327,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Dec 6 2006 Harald Hoyer - 103-3 +- changed DRIVER to DRIVERS +- Resolves: rhbz#218160 + * Fri Nov 10 2006 Harald Hoyer - 103-2 - changed SYSFS to new ATTR rules - Resolves: rhbz#214898 From 84691f7da4b2b35f9c1a229b33d97a4ec66546e2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 6 Dec 2006 12:13:57 +0000 Subject: [PATCH 294/640] - changed DRIVER to DRIVERS - Resolves: rhbz#218160 --- udev-rules.patch | 6 +++--- udev.spec | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index a0ea8ab..19ad30d 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ ---- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-11-10 11:04:04.000000000 +0100 -+++ udev-103/etc/udev/redhat/50-udev.rules 2006-11-10 11:04:07.000000000 +0100 +--- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-10-20 14:43:35.000000000 +0200 ++++ udev-103/etc/udev/redhat/50-udev.rules 2006-12-06 13:10:19.000000000 +0100 @@ -41,9 +41,9 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -60,7 +60,7 @@ # never access removable ide devices, the drivers are causing event loops on open() -BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" -BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" -+BUS=="ide", DRIVER!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" ++BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" +BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" # by-id (hardware serial number) diff --git a/udev.spec b/udev.spec index 6161276..0b233e1 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 103 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -327,6 +327,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Dec 6 2006 Harald Hoyer - 103-3 +- changed DRIVER to DRIVERS +- Resolves: rhbz#218160 + * Fri Nov 10 2006 Harald Hoyer - 103-2 - changed SYSFS to new ATTR rules - Resolves: rhbz#214898 From 98705b9413e597f65805dd934efeb6930cf8e5f1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 23 Jan 2007 14:53:25 +0000 Subject: [PATCH 295/640] - version 104 - merged changes from RHEL --- .cvsignore | 2 +- modprobe | 7 ++ sources | 2 +- start_udev | 9 ++- udev-rules.patch | 179 +++++++++++++++++++---------------------------- udev.spec | 21 ++++-- upstream | 1 + 7 files changed, 106 insertions(+), 115 deletions(-) create mode 100755 modprobe diff --git a/.cvsignore b/.cvsignore index 89c1354..7101e76 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-103.tar.bz2 +udev-104.tar.bz2 diff --git a/modprobe b/modprobe new file mode 100755 index 0000000..b8173f2 --- /dev/null +++ b/modprobe @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -f /dev/.modprobe_debug ]; then + /sbin/modprobe -v -s $@ &>/dev/console +else + /sbin/modprobe $@ +fi + diff --git a/sources b/sources index 0a2e57d..fd84cec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7360ce47b5ec3f9fa71f18071ecb8b97 udev-103.tar.bz2 +9bcfc782d40db2b406a9c1172defda8f udev-104.tar.bz2 diff --git a/start_udev b/start_udev index 801980e..89d6d8b 100755 --- a/start_udev +++ b/start_udev @@ -180,14 +180,17 @@ 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 + 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 /sbin/udevcontrol log_priority=debug fi - /sbin/udevtrigger --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc00i10*' --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc03i*' - /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc00i10*' - /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc03i*' + /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] diff --git a/udev-rules.patch b/udev-rules.patch index 19ad30d..20599f1 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,125 +1,92 @@ ---- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-10-20 14:43:35.000000000 +0200 -+++ udev-103/etc/udev/redhat/50-udev.rules 2006-12-06 13:10:19.000000000 +0100 -@@ -41,9 +41,9 @@ - KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", 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" +--- udev-104/etc/udev/redhat/50-udev.rules.rhrules 2007-01-02 15:58:41.000000000 +0100 ++++ udev-104/etc/udev/redhat/50-udev.rules 2007-01-23 15:45:56.000000000 +0100 +@@ -68,6 +68,9 @@ + KERNEL=="nvram", MODE="0660" + KERNEL=="rtc", MODE="0644" - # vc devices - KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -72,7 +72,7 @@ ++# 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 - KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh" --KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/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*'" +@@ -100,6 +103,8 @@ + KERNEL=="usb/lp*", GROUP="lp", MODE="0660" - # audio devices -@@ -231,24 +231,24 @@ + # tape devices ++SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ ++ RUN+="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" +@@ -157,7 +162,7 @@ + SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0660" - KERNEL=="pktcdvd", NAME="%k/control" +-KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" ++KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ -- SYSFS{device/media}=="floppy", \ -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ ATTRS{media}=="floppy", \ - SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" + # alsa devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +@@ -212,15 +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" +-KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" +-KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" +-KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" +- +-KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" ++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=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k" + # Section for zaptel device + KERNEL=="zapctl", NAME="zap/ctl" +@@ -312,7 +311,7 @@ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%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" +-ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", 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 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" + ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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" - - # rename sr* to scd* - KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" --KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ -+KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ - OPTIONS+="ignore_remove" - - -@@ -265,15 +265,15 @@ - KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" - - # never access removable ide devices, the drivers are causing event loops on open() --BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" --BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" -+BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" -+BUS=="ide", 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*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" -+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" -@@ -291,7 +291,7 @@ - KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" - - # by-label/by-uuid (filesystem properties) --KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end" -+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}" -@@ -320,29 +320,29 @@ - # sr: 4 TYPE_WORM, 5 TYPE_ROM - # st/osst: 1 TYPE_TAPE - # sg: 8 changer, [36] scanner --ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ -+ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ - RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" --ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ -+ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ +@@ -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", SYSFS{type}=="0|7|14", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ - RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ - RUN+="/sbin/modprobe sr_mod" +-ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="modprobe sg" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ +- RUN+="/sbin/modprobe sd_mod" ++ RUN+="modprobe sd_mod" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ +- RUN+="/sbin/modprobe sr_mod" ++ RUN+="modprobe sr_mod" --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ + ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" - --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ +@@ -339,14 +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" --ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ -- SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" --ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ -+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" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst" ++ ATTRS{model}!="ADR*", RUN+="modprobe osst" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st" ++ ATTRS{model}=="ADR*", RUN+="modprobe st" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \ +- RUN+="/sbin/modprobe st" ++ RUN+="modprobe st" # mmc block devices +-ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" ++ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" + + RUN+="socket:/org/kernel/udev/monitor" + diff --git a/udev.spec b/udev.spec index 0b233e1..c2c5ade 100644 --- a/udev.spec +++ b/udev.spec @@ -2,8 +2,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 103 -Release: 3 +Version: 104 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -12,6 +12,7 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev.nodes +Source3: modprobe Source10: firmware_helper.c @@ -27,6 +28,7 @@ Patch10: udev-095-longcomment.patch Patch11: udev-095-selinux.patch Patch12: udev-095-path_id.patch Patch13: udev-095-path_id2.patch +Patch14: udev-095-dbgwait.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -75,6 +77,8 @@ which contains functions to get volume ids. #%patch11 -p1 -b .selinux #%patch12 -p1 -b .pathid #%patch13 -p1 -b .pathid2 +%patch14 -p1 -b .dbgwait + rm -f etc/udev/redhat/51-hotplug.rules %build @@ -190,6 +194,7 @@ for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do 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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev @@ -197,6 +202,9 @@ 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 @@ -204,7 +212,7 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules </dev/null 2>&1 done EOF @@ -268,7 +276,9 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -296,7 +306,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh - %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules @@ -327,6 +336,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jan 23 2007 Harald Hoyer - 104-1 +- version 104 +- merged changes from RHEL + * Wed Dec 6 2006 Harald Hoyer - 103-3 - changed DRIVER to DRIVERS - Resolves: rhbz#218160 diff --git a/upstream b/upstream index 55f8847..4487ead 100644 --- a/upstream +++ b/upstream @@ -1 +1,2 @@ udev-094.tar.bz2 +udev-104.tar.bz2 From 743bae2ad5dafaa1d0caba804db4f812620f2250 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 23 Jan 2007 14:53:25 +0000 Subject: [PATCH 296/640] - version 104 - merged changes from RHEL --- .cvsignore | 2 +- modprobe | 7 ++ sources | 2 +- start_udev | 9 ++- udev-rules.patch | 179 +++++++++++++++++++---------------------------- udev.spec | 21 ++++-- upstream | 1 + 7 files changed, 106 insertions(+), 115 deletions(-) create mode 100755 modprobe diff --git a/.cvsignore b/.cvsignore index 89c1354..7101e76 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-103.tar.bz2 +udev-104.tar.bz2 diff --git a/modprobe b/modprobe new file mode 100755 index 0000000..b8173f2 --- /dev/null +++ b/modprobe @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -f /dev/.modprobe_debug ]; then + /sbin/modprobe -v -s $@ &>/dev/console +else + /sbin/modprobe $@ +fi + diff --git a/sources b/sources index 0a2e57d..fd84cec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7360ce47b5ec3f9fa71f18071ecb8b97 udev-103.tar.bz2 +9bcfc782d40db2b406a9c1172defda8f udev-104.tar.bz2 diff --git a/start_udev b/start_udev index 801980e..89d6d8b 100755 --- a/start_udev +++ b/start_udev @@ -180,14 +180,17 @@ 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 + 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 /sbin/udevcontrol log_priority=debug fi - /sbin/udevtrigger --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc00i10*' --attr-nomatch='modalias=pci:v*d*sv*sd*bc0Csc03i*' - /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc00i10*' - /sbin/udevtrigger --attr-match='modalias=pci:v*d*sv*sd*bc0Csc03i*' + /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] diff --git a/udev-rules.patch b/udev-rules.patch index 19ad30d..20599f1 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,125 +1,92 @@ ---- udev-103/etc/udev/redhat/50-udev.rules.rhrules 2006-10-20 14:43:35.000000000 +0200 -+++ udev-103/etc/udev/redhat/50-udev.rules 2006-12-06 13:10:19.000000000 +0100 -@@ -41,9 +41,9 @@ - KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" - KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660" --KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", 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" +--- udev-104/etc/udev/redhat/50-udev.rules.rhrules 2007-01-02 15:58:41.000000000 +0100 ++++ udev-104/etc/udev/redhat/50-udev.rules 2007-01-23 15:45:56.000000000 +0100 +@@ -68,6 +68,9 @@ + KERNEL=="nvram", MODE="0660" + KERNEL=="rtc", MODE="0644" - # vc devices - KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -72,7 +72,7 @@ ++# 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 - KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh" --KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/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*'" +@@ -100,6 +103,8 @@ + KERNEL=="usb/lp*", GROUP="lp", MODE="0660" - # audio devices -@@ -231,24 +231,24 @@ + # tape devices ++SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ ++ RUN+="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" +@@ -157,7 +162,7 @@ + SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0660" - KERNEL=="pktcdvd", NAME="%k/control" +-KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" ++KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", \ -- SYSFS{device/media}=="floppy", \ -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ ATTRS{media}=="floppy", \ - SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" + # alsa devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +@@ -212,15 +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" +-KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" +-KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" +-KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" +- +-KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" +-KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" ++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=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k" + # Section for zaptel device + KERNEL=="zapctl", NAME="zap/ctl" +@@ -312,7 +311,7 @@ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%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" +-ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", 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 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" + ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" --KERNEL=="hd[a-z]", BUS=="ide", SYSFS{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" - - # rename sr* to scd* - KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" --KERNEL=="hd*[0-9]", BUS=="ide", SYSFS{../removable}=="1", \ -+KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ - OPTIONS+="ignore_remove" - - -@@ -265,15 +265,15 @@ - KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" - - # never access removable ide devices, the drivers are causing event loops on open() --BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end" --BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end" -+BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" -+BUS=="ide", 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*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394" -+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" -@@ -291,7 +291,7 @@ - KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" - - # by-label/by-uuid (filesystem properties) --KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end" -+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}" -@@ -320,29 +320,29 @@ - # sr: 4 TYPE_WORM, 5 TYPE_ROM - # st/osst: 1 TYPE_TAPE - # sg: 8 changer, [36] scanner --ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ -+ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ - RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" --ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \ -+ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ +@@ -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", SYSFS{type}=="0|7|14", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ - RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ - RUN+="/sbin/modprobe sr_mod" +-ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" ++ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="modprobe sg" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ +- RUN+="/sbin/modprobe sd_mod" ++ RUN+="modprobe sd_mod" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ +- RUN+="/sbin/modprobe sr_mod" ++ RUN+="modprobe sr_mod" --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ + ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" - --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", \ +@@ -339,14 +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" --ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}=="On[sS]tream", \ -- SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" --ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1", SYSFS{device/vendor}!="On[sS]tream", \ -+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" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst" ++ ATTRS{model}!="ADR*", RUN+="modprobe osst" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ +- ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st" ++ ATTRS{model}=="ADR*", RUN+="modprobe st" + ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \ +- RUN+="/sbin/modprobe st" ++ RUN+="modprobe st" # mmc block devices +-ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" ++ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" + + RUN+="socket:/org/kernel/udev/monitor" + diff --git a/udev.spec b/udev.spec index 0b233e1..c2c5ade 100644 --- a/udev.spec +++ b/udev.spec @@ -2,8 +2,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 103 -Release: 3 +Version: 104 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -12,6 +12,7 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev.nodes +Source3: modprobe Source10: firmware_helper.c @@ -27,6 +28,7 @@ Patch10: udev-095-longcomment.patch Patch11: udev-095-selinux.patch Patch12: udev-095-path_id.patch Patch13: udev-095-path_id2.patch +Patch14: udev-095-dbgwait.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -75,6 +77,8 @@ which contains functions to get volume ids. #%patch11 -p1 -b .selinux #%patch12 -p1 -b .pathid #%patch13 -p1 -b .pathid2 +%patch14 -p1 -b .dbgwait + rm -f etc/udev/redhat/51-hotplug.rules %build @@ -190,6 +194,7 @@ for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do 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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev @@ -197,6 +202,9 @@ 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 @@ -204,7 +212,7 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/modules cat >$RPM_BUILD_ROOT/etc/sysconfig/modules/udev-stw.modules </dev/null 2>&1 done EOF @@ -268,7 +276,9 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -296,7 +306,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh - %config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules @@ -327,6 +336,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jan 23 2007 Harald Hoyer - 104-1 +- version 104 +- merged changes from RHEL + * Wed Dec 6 2006 Harald Hoyer - 103-3 - changed DRIVER to DRIVERS - Resolves: rhbz#218160 diff --git a/upstream b/upstream index 55f8847..4487ead 100644 --- a/upstream +++ b/upstream @@ -1 +1,2 @@ udev-094.tar.bz2 +udev-104.tar.bz2 From 618e6f6261d6e40eba9ec5912eaffad517d40ffd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 23 Jan 2007 14:54:57 +0000 Subject: [PATCH 297/640] merged in RHEL changes --- udev-095-dbgwait.patch | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 udev-095-dbgwait.patch diff --git a/udev-095-dbgwait.patch b/udev-095-dbgwait.patch new file mode 100644 index 0000000..4129ae1 --- /dev/null +++ b/udev-095-dbgwait.patch @@ -0,0 +1,80 @@ +--- 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; + } + } + From cd5b874b8759a9e61c19e675b98db598890f135b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 23 Jan 2007 14:54:57 +0000 Subject: [PATCH 298/640] merged in RHEL changes --- udev-095-dbgwait.patch | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 udev-095-dbgwait.patch diff --git a/udev-095-dbgwait.patch b/udev-095-dbgwait.patch new file mode 100644 index 0000000..4129ae1 --- /dev/null +++ b/udev-095-dbgwait.patch @@ -0,0 +1,80 @@ +--- 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; + } + } + From fadf33e335093b40b921136c7a67bcecdb1af5de Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 6 Feb 2007 12:59:51 +0000 Subject: [PATCH 299/640] - moved uinput to input subdirectory (rhbz#213854) - added USB floppy symlinks (rhbz#185171) - fixed ZIP drive handling (rhbz#223016) - Resolves: rhbz#213854,rhbz#185171,rhbz#223016 --- udev-rules.patch | 55 ++++++++++++++++++++++++++++++++++++++++++------ udev.spec | 8 ++++++- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 20599f1..6fdd2a4 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-104/etc/udev/redhat/50-udev.rules.rhrules 2007-01-02 15:58:41.000000000 +0100 -+++ udev-104/etc/udev/redhat/50-udev.rules 2007-01-23 15:45:56.000000000 +0100 ++++ udev-104/etc/udev/redhat/50-udev.rules 2007-02-06 13:52:15.000000000 +0100 @@ -68,6 +68,9 @@ KERNEL=="nvram", MODE="0660" KERNEL=="rtc", MODE="0644" @@ -10,7 +10,16 @@ # floppy devices KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" # fix floppy devices -@@ -100,6 +103,8 @@ +@@ -75,6 +78,8 @@ + 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" ++ + # audio devices + KERNEL=="dsp*", MODE="0660" + KERNEL=="audio*", MODE="0660" +@@ -100,6 +105,8 @@ KERNEL=="usb/lp*", GROUP="lp", MODE="0660" # tape devices @@ -19,7 +28,7 @@ KERNEL=="ht*", GROUP="disk", MODE="0660" KERNEL=="nht*", GROUP="disk", MODE="0660" KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" -@@ -157,7 +162,7 @@ +@@ -157,7 +164,7 @@ SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0660" @@ -28,7 +37,15 @@ # alsa devices KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -212,15 +217,9 @@ +@@ -173,6 +180,7 @@ + KERNEL=="event*", NAME="input/%k" + KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" + KERNEL=="ts*", NAME="input/%k" ++KERNEL=="uinput", NAME="input/%k" + + # IEEE1394 (firewire) devices (must be before raw devices below) + KERNEL=="raw1394", NAME="%k" +@@ -212,15 +220,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" @@ -47,7 +64,31 @@ # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -312,7 +311,7 @@ +@@ -231,9 +233,10 @@ + + KERNEL=="pktcdvd", NAME="%k/control" + +-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ +- ATTRS{media}=="floppy", \ ++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" + +@@ -265,8 +268,8 @@ + KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" + + # never access removable ide devices, the drivers are causing event loops on open() +-BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" +-BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" ++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" +@@ -312,7 +315,7 @@ PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0644" @@ -56,7 +97,7 @@ ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" -@@ -326,11 +325,11 @@ +@@ -326,11 +329,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -71,7 +112,7 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -339,14 +338,14 @@ +@@ -339,14 +342,14 @@ SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ diff --git a/udev.spec b/udev.spec index c2c5ade..0ce09bf 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 104 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -336,6 +336,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Feb 6 2007 Harald Hoyer - 104-2 +- moved uinput to input subdirectory (rhbz#213854) +- added USB floppy symlinks (rhbz#185171) +- fixed ZIP drive handling (rhbz#223016) +- Resolves: rhbz#213854,rhbz#185171,rhbz#223016 + * Tue Jan 23 2007 Harald Hoyer - 104-1 - version 104 - merged changes from RHEL From be27b3c4c3fcb759eca13d1912073f54dd0e4b6b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 6 Feb 2007 12:59:51 +0000 Subject: [PATCH 300/640] - moved uinput to input subdirectory (rhbz#213854) - added USB floppy symlinks (rhbz#185171) - fixed ZIP drive handling (rhbz#223016) - Resolves: rhbz#213854,rhbz#185171,rhbz#223016 --- udev-rules.patch | 55 ++++++++++++++++++++++++++++++++++++++++++------ udev.spec | 8 ++++++- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 20599f1..6fdd2a4 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- udev-104/etc/udev/redhat/50-udev.rules.rhrules 2007-01-02 15:58:41.000000000 +0100 -+++ udev-104/etc/udev/redhat/50-udev.rules 2007-01-23 15:45:56.000000000 +0100 ++++ udev-104/etc/udev/redhat/50-udev.rules 2007-02-06 13:52:15.000000000 +0100 @@ -68,6 +68,9 @@ KERNEL=="nvram", MODE="0660" KERNEL=="rtc", MODE="0644" @@ -10,7 +10,16 @@ # floppy devices KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" # fix floppy devices -@@ -100,6 +103,8 @@ +@@ -75,6 +78,8 @@ + 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" ++ + # audio devices + KERNEL=="dsp*", MODE="0660" + KERNEL=="audio*", MODE="0660" +@@ -100,6 +105,8 @@ KERNEL=="usb/lp*", GROUP="lp", MODE="0660" # tape devices @@ -19,7 +28,7 @@ KERNEL=="ht*", GROUP="disk", MODE="0660" KERNEL=="nht*", GROUP="disk", MODE="0660" KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" -@@ -157,7 +162,7 @@ +@@ -157,7 +164,7 @@ SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0660" @@ -28,7 +37,15 @@ # alsa devices KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -212,15 +217,9 @@ +@@ -173,6 +180,7 @@ + KERNEL=="event*", NAME="input/%k" + KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" + KERNEL=="ts*", NAME="input/%k" ++KERNEL=="uinput", NAME="input/%k" + + # IEEE1394 (firewire) devices (must be before raw devices below) + KERNEL=="raw1394", NAME="%k" +@@ -212,15 +220,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" @@ -47,7 +64,31 @@ # Section for zaptel device KERNEL=="zapctl", NAME="zap/ctl" -@@ -312,7 +311,7 @@ +@@ -231,9 +233,10 @@ + + KERNEL=="pktcdvd", NAME="%k/control" + +-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ +- ATTRS{media}=="floppy", \ ++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" + +@@ -265,8 +268,8 @@ + KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" + + # never access removable ide devices, the drivers are causing event loops on open() +-BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" +-BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" ++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" +@@ -312,7 +315,7 @@ PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0644" @@ -56,7 +97,7 @@ ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" -@@ -326,11 +325,11 @@ +@@ -326,11 +329,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -71,7 +112,7 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -339,14 +338,14 @@ +@@ -339,14 +342,14 @@ SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ diff --git a/udev.spec b/udev.spec index c2c5ade..0ce09bf 100644 --- a/udev.spec +++ b/udev.spec @@ -3,7 +3,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 104 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -336,6 +336,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Feb 6 2007 Harald Hoyer - 104-2 +- moved uinput to input subdirectory (rhbz#213854) +- added USB floppy symlinks (rhbz#185171) +- fixed ZIP drive handling (rhbz#223016) +- Resolves: rhbz#213854,rhbz#185171,rhbz#223016 + * Tue Jan 23 2007 Harald Hoyer - 104-1 - version 104 - merged changes from RHEL From 2e382f6b1e93156e6ae3f29be2f5624caa0b2769 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Feb 2007 13:19:32 +0000 Subject: [PATCH 301/640] version 105 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7101e76..cd98d21 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-104.tar.bz2 +udev-105.tar.bz2 diff --git a/sources b/sources index fd84cec..4360dbc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9bcfc782d40db2b406a9c1172defda8f udev-104.tar.bz2 +e789686432bfdcb6ec23661b111364fa udev-105.tar.bz2 diff --git a/udev.spec b/udev.spec index 0ce09bf..a812ba3 100644 --- a/udev.spec +++ b/udev.spec @@ -2,8 +2,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 104 -Release: 2 +Version: 105 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -336,6 +336,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Feb 21 2007 Harald Hoyer - 105-1 +- version 105 + * Tue Feb 6 2007 Harald Hoyer - 104-2 - moved uinput to input subdirectory (rhbz#213854) - added USB floppy symlinks (rhbz#185171) From 43a10928d3d547a0bc9e53a738adbca53581a269 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Feb 2007 13:19:32 +0000 Subject: [PATCH 302/640] version 105 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7101e76..cd98d21 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-104.tar.bz2 +udev-105.tar.bz2 diff --git a/sources b/sources index fd84cec..4360dbc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9bcfc782d40db2b406a9c1172defda8f udev-104.tar.bz2 +e789686432bfdcb6ec23661b111364fa udev-105.tar.bz2 diff --git a/udev.spec b/udev.spec index 0ce09bf..a812ba3 100644 --- a/udev.spec +++ b/udev.spec @@ -2,8 +2,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 104 -Release: 2 +Version: 105 +Release: 1 License: GPL Group: System Environment/Base Provides: udev-persistent = 0:%{version}-%{release} @@ -336,6 +336,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Feb 21 2007 Harald Hoyer - 105-1 +- version 105 + * Tue Feb 6 2007 Harald Hoyer - 104-2 - moved uinput to input subdirectory (rhbz#213854) - added USB floppy symlinks (rhbz#185171) From 5df8d6599826f59d38b2d6feba903ae66f684e0c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 7 Mar 2007 18:01:25 +0000 Subject: [PATCH 303/640] - version 106 - specfile cleanup - removed pilot rule - removed dasd_id and dasd_id rule - provide static versions in a subpackage --- .cvsignore | 2 +- sources | 2 +- udev-rules.patch | 149 ++++------------------------- udev.spec | 241 +++++++++++++++++++++++++---------------------- 4 files changed, 149 insertions(+), 245 deletions(-) diff --git a/.cvsignore b/.cvsignore index cd98d21..229ec71 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-105.tar.bz2 +udev-106.tar.bz2 diff --git a/sources b/sources index 4360dbc..425f1fb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e789686432bfdcb6ec23661b111364fa udev-105.tar.bz2 +320ccd2d0f4540d10e021bafa14f8985 udev-106.tar.bz2 diff --git a/udev-rules.patch b/udev-rules.patch index 6fdd2a4..1d06d2f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,133 +1,20 @@ ---- udev-104/etc/udev/redhat/50-udev.rules.rhrules 2007-01-02 15:58:41.000000000 +0100 -+++ udev-104/etc/udev/redhat/50-udev.rules 2007-02-06 13:52:15.000000000 +0100 -@@ -68,6 +68,9 @@ - KERNEL=="nvram", MODE="0660" - KERNEL=="rtc", MODE="0644" +--- 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-03-07 16:49:26.000000000 +0100 +@@ -41,9 +41,6 @@ + KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" + 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" -+# 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 -@@ -75,6 +78,8 @@ - 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" -+ - # audio devices - KERNEL=="dsp*", MODE="0660" - KERNEL=="audio*", MODE="0660" -@@ -100,6 +105,8 @@ - KERNEL=="usb/lp*", GROUP="lp", MODE="0660" - - # tape devices -+SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ -+ RUN+="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" -@@ -157,7 +164,7 @@ - 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]*", OPTIONS+="ignore_device" -+KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" - - # alsa devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -173,6 +180,7 @@ - KERNEL=="event*", NAME="input/%k" - KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" - KERNEL=="ts*", NAME="input/%k" -+KERNEL=="uinput", NAME="input/%k" - - # IEEE1394 (firewire) devices (must be before raw devices below) - KERNEL=="raw1394", NAME="%k" -@@ -212,15 +220,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" --KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" --KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" --KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -- --KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" --KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" --KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" --KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" --KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" -+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" - - # Section for zaptel device - KERNEL=="zapctl", NAME="zap/ctl" -@@ -231,9 +233,10 @@ - - KERNEL=="pktcdvd", NAME="%k/control" - --KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -- ATTRS{media}=="floppy", \ -+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" - -@@ -265,8 +268,8 @@ - KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" - - # never access removable ide devices, the drivers are causing event loops on open() --BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" --BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" -+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" -@@ -312,7 +315,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{MODALIAS}" - - ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" - -@@ -326,11 +329,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", ATTRS{type}=="0|7|14", \ -- RUN+="/sbin/modprobe sd_mod" -+ RUN+="modprobe sd_mod" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -- RUN+="/sbin/modprobe sr_mod" -+ RUN+="modprobe sr_mod" - - ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ - SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -339,14 +342,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+="/sbin/modprobe osst" -+ ATTRS{model}!="ADR*", RUN+="modprobe osst" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st" -+ ATTRS{model}=="ADR*", RUN+="modprobe st" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \ -- RUN+="/sbin/modprobe st" -+ RUN+="modprobe st" - - # mmc block devices --ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" -+ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" - - RUN+="socket:/org/kernel/udev/monitor" + # vc devices + KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +@@ -280,7 +277,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 diff --git a/udev.spec b/udev.spec index a812ba3..ffecf47 100644 --- a/udev.spec +++ b/udev.spec @@ -1,12 +1,15 @@ %define debug false +%define with_static 1 +%define udev_scriptdir /lib/udev +%define firmwaredir /lib/firmware Summary: A userspace implementation of devfs Name: udev -Version: 105 -Release: 1 +Version: 106 +Release: 1%{?dist} License: GPL Group: System Environment/Base -Provides: udev-persistent = 0:%{version}-%{release} +Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 @@ -18,34 +21,38 @@ Source10: firmware_helper.c Patch1: udev-permconv.patch Patch2: udev-rules.patch -Patch4: udev-084-floppy.patch Patch5: udev-extras.patch -Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch -Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch -Patch10: udev-095-longcomment.patch -Patch11: udev-095-selinux.patch -Patch12: udev-095-path_id.patch -Patch13: udev-095-path_id2.patch Patch14: udev-095-dbgwait.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Prereq: /bin/sh fileutils -Prereq: MAKEDEV >= 0:3.11 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires(pre): /bin/sh fileutils +Requires(pre): MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: pam-devel glib2-devel bison Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 -Obsoletes: dev +Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 %description The udev package contains an implementation of devfs in userspace using sysfs and netlink. +%if %{with_static} +%package static +Summary: Static udev binaries for init environments +Group: System Environment/Base +Requires: udev = %{version}-%{release} + +%description static +This package contains static versions of the udev binaries, +to build e.g. an initramfs. +%endif + %package -n libvolume_id-devel Summary: Static libraries and headers for libvolume_id Group: Development/Libraries @@ -67,72 +74,68 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .rhpermconv %patch2 -p1 -b .rhrules -%patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras -#%patch6 -p1 -b .pg %patch7 -p1 -b .nopie -#%patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 -#%patch10 -p1 -b .longcomment -#%patch11 -p1 -b .selinux -#%patch12 -p1 -b .pathid -#%patch13 -p1 -b .pathid2 %patch14 -p1 -b .dbgwait rm -f etc/udev/redhat/51-hotplug.rules %build -# Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) +%if %{with_static} +# Do not USE_LOG in udev.static, +# because it causes segfaults on openlog (bug 136005) make \ - USE_KLIBC=false \ - USE_SELINUX=true \ + USE_KLIBC=false \ + USE_SELINUX=true \ USE_STATIC=true \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/path_id \ - extras/volume_id \ -%ifarch s390 s390x - extras/dasd_id \ -%endif + extras/scsi_id \ + extras/ata_id \ + extras/usb_id \ + extras/edd_id \ + extras/volume_id \ + extras/run_directory \ + extras/floppy \ " all -mv udevd udevd.static -mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static -mv extras/ata_id/ata_id extras/ata_id/ata_id.static -mv extras/edd_id/edd_id extras/edd_id/edd_id.static -%ifarch s390 s390x - mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static -%endif -mv extras/usb_id/usb_id extras/usb_id/usb_id.static -mv extras/volume_id/vol_id extras/volume_id/vol_id.static +for i in udevd udevtrigger udevsettle \ + extras/scsi_id/scsi_id \ + extras/ata_id/ata_id \ + extras/edd_id/edd_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 + mv $i $i.static + touch $i +done + make clean make E='@echo' Q='@' -C extras/volume_id/lib clean +%endif make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ - USE_KLIBC=false \ + USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ USE_LOG=true \ DEBUG=%{debug} \ STRIP="/bin/true" \ EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ + extras/scsi_id \ + extras/ata_id \ extras/usb_id \ extras/edd_id \ + extras/path_id \ extras/volume_id \ -%ifarch s390 s390x - extras/dasd_id \ -%endif extras/run_directory \ - " - #extras/volume_id + extras/floppy \ + " all %{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} @@ -141,33 +144,19 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} -mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id -mv extras/ata_id/ata_id.static extras/ata_id/ata_id -mv extras/edd_id/edd_id.static extras/edd_id/edd_id -%ifarch s390 s390x - mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id -%endif -mv extras/usb_id/usb_id.static extras/usb_id/usb_id -mv extras/volume_id/vol_id.static extras/volume_id/vol_id -touch extras/volume_id/vol_id - -make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" install \ +make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ EXTRAS=" \ extras/scsi_id \ - extras/ata_id \ + extras/ata_id \ extras/usb_id \ extras/edd_id \ extras/path_id \ extras/volume_id \ -%ifarch s390 s390x - extras/dasd_id \ -%endif extras/run_directory \ extras/floppy \ - " - + " install rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev @@ -176,17 +165,34 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} +# force relative symlinks +ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id +ln -sf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libvolume_id.so.*.*) \ + $RPM_BUILD_ROOT%{_libdir}/libvolume_id.so + +%if %{with_static} +for i in extras/scsi_id/scsi_id \ + extras/ata_id/ata_id \ + extras/edd_id/edd_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 + install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static +done + +for i in udevd udevtrigger udevsettle; do + install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$i.static +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 install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static - - -%define udev_scriptdir /lib/udev - mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do @@ -202,18 +208,14 @@ 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 +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 + modprobe \$i >/dev/null 2>&1 done EOF @@ -254,43 +256,35 @@ if [ $2 = 0 ]; then fi exit 0 +%post -n libvolume_id -p /sbin/ldconfig +%postun -n libvolume_id -p /sbin/ldconfig + + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* -%attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/start_udev -#%attr(755,root,root) /sbin/udev_volume_id +%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(755,root,root) /sbin/scsi_id -%attr(755,root,root) %{udev_scriptdir}/scsi_id -%attr(755,root,root) %{udev_scriptdir}/ata_id -%attr(755,root,root) %{udev_scriptdir}/edd_id -%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 -%attr(755,root,root) /sbin/firmware_helper -#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0 -#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0.61.0 - +%attr(0755,root,root) %{udev_scriptdir}/scsi_id +%attr(0755,root,root) %{udev_scriptdir}/ata_id +%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}/path_id +%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices +%attr(0755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo - %attr(0755,root,root) %{_sbindir}/udevmonitor - %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -303,21 +297,21 @@ rm -rf $RPM_BUILD_ROOT %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}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh +%attr(0755,root,root) %{udev_scriptdir}/modprobe -%config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules -%config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes +%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) %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 %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules +%config(noreplace) %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules -%dir %attr(0755,root,root) /lib/firmware +%dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* @@ -325,10 +319,28 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* +%if %{with_static} +%files static +%doc COPYING +%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 +%attr(755,root,root) %{udev_scriptdir}/usb_id.static +%attr(755,root,root) %{udev_scriptdir}/vol_id.static +%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static +%endif + %files -n libvolume_id -%attr(755,root,root) /%{_lib}/libvolume_id.so.* +%doc COPYING +%attr(0755,root,root) /%{_lib}/libvolume_id.so.* %files -n libvolume_id-devel +%doc COPYING %defattr(0644, root, root, 0755) %{_includedir}/libvolume_id.h %{_libdir}/libvolume_id.a @@ -336,6 +348,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Mar 7 2007 Harald Hoyer - 106-1%{?dist} +- version 106 +- specfile cleanup +- removed pilot rule +- removed dasd_id and dasd_id rule +- provide static versions in a subpackage + * Wed Feb 21 2007 Harald Hoyer - 105-1 - version 105 @@ -453,9 +472,7 @@ rm -rf $RPM_BUILD_ROOT * Wed Mar 01 2006 Harald Hoyer - 084-9 - create non-enum device (cdrom, floppy, scanner, changer) for compatibility (random device wins) - e.g. /dev/cdrom -> hdd - /dev/cdrom-hdc -> hdc - /dev/cdrom-hdd -> hdd + e.g. /dev/cdrom -> hdd /dev/cdrom-hdc -> hdc /dev/cdrom-hdd -> hdd * Wed Mar 01 2006 Harald Hoyer - 084-8 - fixed ZIP drive thrashing (bz #181041 #182601) @@ -877,7 +894,7 @@ rm -rf $RPM_BUILD_ROOT when start_udev runs * Thu Sep 02 2004 Harald Hoyer - 030-16 -- moved %{_sysconfdir}/hotplug.d/default/udev.hotplug to %{_sysconfdir}/hotplug.d/default/10-udev.hotplug +- moved %%{_sysconfdir}/hotplug.d/default/udev.hotplug to %%{_sysconfdir}/hotplug.d/default/10-udev.hotplug * Thu Sep 02 2004 Harald Hoyer - 030-15 - added nvidia devices to start_udev From a10f11986e01957d201c883badfa27c98885e366 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 7 Mar 2007 18:01:25 +0000 Subject: [PATCH 304/640] - version 106 - specfile cleanup - removed pilot rule - removed dasd_id and dasd_id rule - provide static versions in a subpackage --- .cvsignore | 2 +- sources | 2 +- udev-rules.patch | 149 ++++------------------------- udev.spec | 241 +++++++++++++++++++++++++---------------------- 4 files changed, 149 insertions(+), 245 deletions(-) diff --git a/.cvsignore b/.cvsignore index cd98d21..229ec71 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-105.tar.bz2 +udev-106.tar.bz2 diff --git a/sources b/sources index 4360dbc..425f1fb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e789686432bfdcb6ec23661b111364fa udev-105.tar.bz2 +320ccd2d0f4540d10e021bafa14f8985 udev-106.tar.bz2 diff --git a/udev-rules.patch b/udev-rules.patch index 6fdd2a4..1d06d2f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,133 +1,20 @@ ---- udev-104/etc/udev/redhat/50-udev.rules.rhrules 2007-01-02 15:58:41.000000000 +0100 -+++ udev-104/etc/udev/redhat/50-udev.rules 2007-02-06 13:52:15.000000000 +0100 -@@ -68,6 +68,9 @@ - KERNEL=="nvram", MODE="0660" - KERNEL=="rtc", MODE="0644" +--- 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-03-07 16:49:26.000000000 +0100 +@@ -41,9 +41,6 @@ + KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" + KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" + 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" -+# 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 -@@ -75,6 +78,8 @@ - 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" -+ - # audio devices - KERNEL=="dsp*", MODE="0660" - KERNEL=="audio*", MODE="0660" -@@ -100,6 +105,8 @@ - KERNEL=="usb/lp*", GROUP="lp", MODE="0660" - - # tape devices -+SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ -+ RUN+="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" -@@ -157,7 +164,7 @@ - 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]*", OPTIONS+="ignore_device" -+KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device" - - # alsa devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -@@ -173,6 +180,7 @@ - KERNEL=="event*", NAME="input/%k" - KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" - KERNEL=="ts*", NAME="input/%k" -+KERNEL=="uinput", NAME="input/%k" - - # IEEE1394 (firewire) devices (must be before raw devices below) - KERNEL=="raw1394", NAME="%k" -@@ -212,15 +220,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" --KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k" --KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" --KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660" -- --KERNEL=="umad*", NAME="infiniband/%k", MODE="0660" --KERNEL=="issm*", NAME="infiniband/%k", MODE="0660" --KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660" --KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660" --KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660" -+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" - - # Section for zaptel device - KERNEL=="zapctl", NAME="zap/ctl" -@@ -231,9 +233,10 @@ - - KERNEL=="pktcdvd", NAME="%k/control" - --KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -- ATTRS{media}=="floppy", \ -+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" - -@@ -265,8 +268,8 @@ - KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end" - - # never access removable ide devices, the drivers are causing event loops on open() --BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end" --BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end" -+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" -@@ -312,7 +315,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{MODALIAS}" - - ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" - -@@ -326,11 +329,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", ATTRS{type}=="0|7|14", \ -- RUN+="/sbin/modprobe sd_mod" -+ RUN+="modprobe sd_mod" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -- RUN+="/sbin/modprobe sr_mod" -+ RUN+="modprobe sr_mod" - - ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ - SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -339,14 +342,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+="/sbin/modprobe osst" -+ ATTRS{model}!="ADR*", RUN+="modprobe osst" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ -- ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st" -+ ATTRS{model}=="ADR*", RUN+="modprobe st" - ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \ -- RUN+="/sbin/modprobe st" -+ RUN+="modprobe st" - - # mmc block devices --ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" -+ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" - - RUN+="socket:/org/kernel/udev/monitor" + # vc devices + KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" +@@ -280,7 +277,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 diff --git a/udev.spec b/udev.spec index a812ba3..ffecf47 100644 --- a/udev.spec +++ b/udev.spec @@ -1,12 +1,15 @@ %define debug false +%define with_static 1 +%define udev_scriptdir /lib/udev +%define firmwaredir /lib/firmware Summary: A userspace implementation of devfs Name: udev -Version: 105 -Release: 1 +Version: 106 +Release: 1%{?dist} License: GPL Group: System Environment/Base -Provides: udev-persistent = 0:%{version}-%{release} +Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 @@ -18,34 +21,38 @@ Source10: firmware_helper.c Patch1: udev-permconv.patch Patch2: udev-rules.patch -Patch4: udev-084-floppy.patch Patch5: udev-extras.patch -Patch6: udev-084-pg.patch Patch7: udev-089-nopie.patch -Patch8: udev-089-last_modalias.patch Patch9: udev-091-lib64.patch -Patch10: udev-095-longcomment.patch -Patch11: udev-095-selinux.patch -Patch12: udev-095-path_id.patch -Patch13: udev-095-path_id2.patch Patch14: udev-095-dbgwait.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Prereq: /bin/sh fileutils -Prereq: MAKEDEV >= 0:3.11 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires(pre): /bin/sh fileutils +Requires(pre): MAKEDEV >= 0:3.11 BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: pam-devel glib2-devel bison Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 -Obsoletes: dev +Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 %description The udev package contains an implementation of devfs in userspace using sysfs and netlink. +%if %{with_static} +%package static +Summary: Static udev binaries for init environments +Group: System Environment/Base +Requires: udev = %{version}-%{release} + +%description static +This package contains static versions of the udev binaries, +to build e.g. an initramfs. +%endif + %package -n libvolume_id-devel Summary: Static libraries and headers for libvolume_id Group: Development/Libraries @@ -67,72 +74,68 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .rhpermconv %patch2 -p1 -b .rhrules -%patch4 -p1 -b .rhfloppy %patch5 -p1 -b .rhextras -#%patch6 -p1 -b .pg %patch7 -p1 -b .nopie -#%patch8 -p1 -b .last_modalias %patch9 -p1 -b .lib64 -#%patch10 -p1 -b .longcomment -#%patch11 -p1 -b .selinux -#%patch12 -p1 -b .pathid -#%patch13 -p1 -b .pathid2 %patch14 -p1 -b .dbgwait rm -f etc/udev/redhat/51-hotplug.rules %build -# Do not USE_LOG in udev.static, cause it causes segfaults on openlog (bug 136005) +%if %{with_static} +# Do not USE_LOG in udev.static, +# because it causes segfaults on openlog (bug 136005) make \ - USE_KLIBC=false \ - USE_SELINUX=true \ + USE_KLIBC=false \ + USE_SELINUX=true \ USE_STATIC=true \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/path_id \ - extras/volume_id \ -%ifarch s390 s390x - extras/dasd_id \ -%endif + extras/scsi_id \ + extras/ata_id \ + extras/usb_id \ + extras/edd_id \ + extras/volume_id \ + extras/run_directory \ + extras/floppy \ " all -mv udevd udevd.static -mv extras/scsi_id/scsi_id extras/scsi_id/scsi_id.static -mv extras/ata_id/ata_id extras/ata_id/ata_id.static -mv extras/edd_id/edd_id extras/edd_id/edd_id.static -%ifarch s390 s390x - mv extras/dasd_id/dasd_id extras/dasd_id/dasd_id.static -%endif -mv extras/usb_id/usb_id extras/usb_id/usb_id.static -mv extras/volume_id/vol_id extras/volume_id/vol_id.static +for i in udevd udevtrigger udevsettle \ + extras/scsi_id/scsi_id \ + extras/ata_id/ata_id \ + extras/edd_id/edd_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 + mv $i $i.static + touch $i +done + make clean make E='@echo' Q='@' -C extras/volume_id/lib clean +%endif make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ - USE_KLIBC=false \ + USE_KLIBC=false \ USE_SELINUX=true \ udevdir="/dev" \ USE_LOG=true \ DEBUG=%{debug} \ STRIP="/bin/true" \ EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ + extras/scsi_id \ + extras/ata_id \ extras/usb_id \ extras/edd_id \ + extras/path_id \ extras/volume_id \ -%ifarch s390 s390x - extras/dasd_id \ -%endif extras/run_directory \ - " - #extras/volume_id + extras/floppy \ + " all %{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} @@ -141,33 +144,19 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} -mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id -mv extras/ata_id/ata_id.static extras/ata_id/ata_id -mv extras/edd_id/edd_id.static extras/edd_id/edd_id -%ifarch s390 s390x - mv extras/dasd_id/dasd_id.static extras/dasd_id/dasd_id -%endif -mv extras/usb_id/usb_id.static extras/usb_id/usb_id -mv extras/volume_id/vol_id.static extras/volume_id/vol_id -touch extras/volume_id/vol_id - -make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" install \ +make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ EXTRAS=" \ extras/scsi_id \ - extras/ata_id \ + extras/ata_id \ extras/usb_id \ extras/edd_id \ extras/path_id \ extras/volume_id \ -%ifarch s390 s390x - extras/dasd_id \ -%endif extras/run_directory \ extras/floppy \ - " - + " install rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev @@ -176,17 +165,34 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/{default,block} +# force relative symlinks +ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id +ln -sf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libvolume_id.so.*.*) \ + $RPM_BUILD_ROOT%{_libdir}/libvolume_id.so + +%if %{with_static} +for i in extras/scsi_id/scsi_id \ + extras/ata_id/ata_id \ + extras/edd_id/edd_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 + install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static +done + +for i in udevd udevtrigger udevsettle; do + install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$i.static +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 install -m 0644 etc/udev/udev.conf $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.conf -install -m 0755 udevd.static $RPM_BUILD_ROOT/sbin/udevd.static - - -%define udev_scriptdir /lib/udev - mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do @@ -202,18 +208,14 @@ 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 +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 + modprobe \$i >/dev/null 2>&1 done EOF @@ -254,43 +256,35 @@ if [ $2 = 0 ]; then fi exit 0 +%post -n libvolume_id -p /sbin/ldconfig +%postun -n libvolume_id -p /sbin/ldconfig + + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* -%attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/start_udev -#%attr(755,root,root) /sbin/udev_volume_id +%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(755,root,root) /sbin/scsi_id -%attr(755,root,root) %{udev_scriptdir}/scsi_id -%attr(755,root,root) %{udev_scriptdir}/ata_id -%attr(755,root,root) %{udev_scriptdir}/edd_id -%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 -%attr(755,root,root) /sbin/firmware_helper -#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0 -#%attr(0755,root,root) /%{_lib}/libvolume_id.so.0.61.0 - +%attr(0755,root,root) %{udev_scriptdir}/scsi_id +%attr(0755,root,root) %{udev_scriptdir}/ata_id +%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}/path_id +%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices +%attr(0755,root,root) /sbin/firmware_helper %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo - %attr(0755,root,root) %{_sbindir}/udevmonitor - %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -303,21 +297,21 @@ rm -rf $RPM_BUILD_ROOT %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}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh +%attr(0755,root,root) %{udev_scriptdir}/modprobe -%config %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/05-udev-early.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/50-udev.rules -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/95-pam-console.rules -%config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes +%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) %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 %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules +%config(noreplace) %attr(0755,root,root)/etc/sysconfig/modules/udev-stw.modules -%dir %attr(0755,root,root) /lib/firmware +%dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* @@ -325,10 +319,28 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/edd_id*.8* %attr(0644,root,root) %{_mandir}/man8/vol_id*.8* +%if %{with_static} +%files static +%doc COPYING +%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 +%attr(755,root,root) %{udev_scriptdir}/usb_id.static +%attr(755,root,root) %{udev_scriptdir}/vol_id.static +%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static +%endif + %files -n libvolume_id -%attr(755,root,root) /%{_lib}/libvolume_id.so.* +%doc COPYING +%attr(0755,root,root) /%{_lib}/libvolume_id.so.* %files -n libvolume_id-devel +%doc COPYING %defattr(0644, root, root, 0755) %{_includedir}/libvolume_id.h %{_libdir}/libvolume_id.a @@ -336,6 +348,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Mar 7 2007 Harald Hoyer - 106-1%{?dist} +- version 106 +- specfile cleanup +- removed pilot rule +- removed dasd_id and dasd_id rule +- provide static versions in a subpackage + * Wed Feb 21 2007 Harald Hoyer - 105-1 - version 105 @@ -453,9 +472,7 @@ rm -rf $RPM_BUILD_ROOT * Wed Mar 01 2006 Harald Hoyer - 084-9 - create non-enum device (cdrom, floppy, scanner, changer) for compatibility (random device wins) - e.g. /dev/cdrom -> hdd - /dev/cdrom-hdc -> hdc - /dev/cdrom-hdd -> hdd + e.g. /dev/cdrom -> hdd /dev/cdrom-hdc -> hdc /dev/cdrom-hdd -> hdd * Wed Mar 01 2006 Harald Hoyer - 084-8 - fixed ZIP drive thrashing (bz #181041 #182601) @@ -877,7 +894,7 @@ rm -rf $RPM_BUILD_ROOT when start_udev runs * Thu Sep 02 2004 Harald Hoyer - 030-16 -- moved %{_sysconfdir}/hotplug.d/default/udev.hotplug to %{_sysconfdir}/hotplug.d/default/10-udev.hotplug +- moved %%{_sysconfdir}/hotplug.d/default/udev.hotplug to %%{_sysconfdir}/hotplug.d/default/10-udev.hotplug * Thu Sep 02 2004 Harald Hoyer - 030-15 - added nvidia devices to start_udev From 2740f62afe5addd6b6b03424813238bc97182287 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 11 Apr 2007 09:53:30 +0000 Subject: [PATCH 305/640] - create floppy device nodes with the correct selinux context (bug #235953) - Resolves: rhbz#235953 --- udev-106-selinuxmedia.patch | 38 +++++++++++++++++++++++++++++++++++++ udev.spec | 10 ++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 udev-106-selinuxmedia.patch diff --git a/udev-106-selinuxmedia.patch b/udev-106-selinuxmedia.patch new file mode 100644 index 0000000..fc7ea42 --- /dev/null +++ b/udev-106-selinuxmedia.patch @@ -0,0 +1,38 @@ +--- 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.spec b/udev.spec index ffecf47..07ba3a0 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -24,6 +24,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 ExclusiveOS: Linux @@ -77,6 +78,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 rm -f etc/udev/redhat/51-hotplug.rules @@ -348,7 +350,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog -* Wed Mar 7 2007 Harald Hoyer - 106-1%{?dist} +* Wed Apr 11 2007 Harald Hoyer - 106-2 +- create floppy device nodes with the correct selinux context (bug #235953) +- Resolves: rhbz#235953 + +* Wed Mar 7 2007 Harald Hoyer - 106-1 - version 106 - specfile cleanup - removed pilot rule From 52ea19d569133533b8ea1e9fd652d31d05cf5694 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 11 Apr 2007 09:53:30 +0000 Subject: [PATCH 306/640] - create floppy device nodes with the correct selinux context (bug #235953) - Resolves: rhbz#235953 --- udev-106-selinuxmedia.patch | 38 +++++++++++++++++++++++++++++++++++++ udev.spec | 10 ++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 udev-106-selinuxmedia.patch diff --git a/udev-106-selinuxmedia.patch b/udev-106-selinuxmedia.patch new file mode 100644 index 0000000..fc7ea42 --- /dev/null +++ b/udev-106-selinuxmedia.patch @@ -0,0 +1,38 @@ +--- 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.spec b/udev.spec index ffecf47..07ba3a0 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -24,6 +24,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 ExclusiveOS: Linux @@ -77,6 +78,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 rm -f etc/udev/redhat/51-hotplug.rules @@ -348,7 +350,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog -* Wed Mar 7 2007 Harald Hoyer - 106-1%{?dist} +* Wed Apr 11 2007 Harald Hoyer - 106-2 +- create floppy device nodes with the correct selinux context (bug #235953) +- Resolves: rhbz#235953 + +* Wed Mar 7 2007 Harald Hoyer - 106-1 - version 106 - specfile cleanup - removed pilot rule From 06da6a6069e18bcca75a8b510a4a610f1b1a8de2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 12:47:41 +0000 Subject: [PATCH 307/640] - added env patch - moved modprobe to the beginning - added some speedups --- modprobe | 13 ++++-- start_udev | 29 +++++++++++-- udev-106-setenv.patch | 99 +++++++++++++++++++++++++++++++++++++++++++ udev-rules.patch | 52 ++++++++++++++++++++++- udev.spec | 8 ++-- 5 files changed, 190 insertions(+), 11 deletions(-) create mode 100644 udev-106-setenv.patch diff --git a/modprobe b/modprobe index b8173f2..0a98685 100755 --- a/modprobe +++ b/modprobe @@ -1,7 +1,14 @@ #!/bin/sh -if [ -f /dev/.modprobe_debug ]; then - /sbin/modprobe -v -s $@ &>/dev/console +if [ -n "$MODPROBE_COLLECT" ]; then + echo $@ >> /dev/MODPROBE else - /sbin/modprobe $@ + if [ -n "$MODPROBE_DEBUG" ]; then + /sbin/modprobe -v -s $@ &>/dev/console + else + /sbin/modprobe $@ + fi fi + + + diff --git a/start_udev b/start_udev index 89d6d8b..5a31b54 100755 --- a/start_udev +++ b/start_udev @@ -181,23 +181,46 @@ 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 + /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 + if strstr "$cmdline" fastudev; then + /sbin/udevcontrol env FASTUDEV=1 + fi + if strstr "$cmdline" mcollect; then + /sbin/udevcontrol env MODPROBE_COLLECT=1 + MCOLLECT=1 + fi + if strstr "$cmdline" udevchilds; then + /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) + fi + + rm -f /dev/MODPROBE + /sbin/udevcontrol env STARTUP=1 /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] + test -e "$MCOLLECT" && /sbin/udevcontrol env MODPROBE_COLLECT= + unset MCOLLECT + if [ -e /dev/MODPROBE ]; then + (xargs_simple /sbin/modprobe -a) < /dev/MODPROBE 2>/dev/null + rm -f /dev/MODPROBE + wait_for_queue $(getval udevtimeout $cmdline) + ret=$[$ret + $?] + fi + /sbin/udevcontrol env STARTUP= + /sbin/udevcontrol env MODPROBE_DEBUG= else echo -n " kernel too old for this udev version " /sbin/udevd -d ret=10 + fi ret=$[$ret + $?] diff --git a/udev-106-setenv.patch b/udev-106-setenv.patch new file mode 100644 index 0000000..93ae8f7 --- /dev/null +++ b/udev-106-setenv.patch @@ -0,0 +1,99 @@ +--- 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-rules.patch b/udev-rules.patch index 1d06d2f..18699f1 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,10 @@ +--- 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-04-27 13:16:43.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/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-03-07 16:49:26.000000000 +0100 ++++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:45:33.000000000 +0200 @@ -41,9 +41,6 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -10,7 +15,33 @@ # vc devices KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -280,7 +277,6 @@ +@@ -68,9 +65,6 @@ + KERNEL=="nvram", MODE="0660" + KERNEL=="rtc", MODE="0644" + +-# 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 +@@ -233,6 +227,7 @@ + + 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 @@ + OPTIONS+="ignore_remove" + + ++ + ####################################### + # 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" @@ -18,3 +49,20 @@ 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 @@ + 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'" + + # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC + # sr: 4 TYPE_WORM, 5 TYPE_ROM +@@ -351,5 +343,6 @@ + # mmc block devices + ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" + ++ + RUN+="socket:/org/kernel/udev/monitor" + diff --git a/udev.spec b/udev.spec index 07ba3a0..4e7684e 100644 --- a/udev.spec +++ b/udev.spec @@ -1,4 +1,4 @@ -%define debug false +%define debug true %define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 2%{?dist} +Release: 2.hh.7%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -26,6 +26,7 @@ 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/ @@ -80,6 +81,7 @@ which contains functions to get volume ids. %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 @@ -216,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 From fe89c88d6cce28eb23b88594c4a15acb05da06a7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 12:47:41 +0000 Subject: [PATCH 308/640] - added env patch - moved modprobe to the beginning - added some speedups --- modprobe | 13 ++++-- start_udev | 29 +++++++++++-- udev-106-setenv.patch | 99 +++++++++++++++++++++++++++++++++++++++++++ udev-rules.patch | 52 ++++++++++++++++++++++- udev.spec | 8 ++-- 5 files changed, 190 insertions(+), 11 deletions(-) create mode 100644 udev-106-setenv.patch diff --git a/modprobe b/modprobe index b8173f2..0a98685 100755 --- a/modprobe +++ b/modprobe @@ -1,7 +1,14 @@ #!/bin/sh -if [ -f /dev/.modprobe_debug ]; then - /sbin/modprobe -v -s $@ &>/dev/console +if [ -n "$MODPROBE_COLLECT" ]; then + echo $@ >> /dev/MODPROBE else - /sbin/modprobe $@ + if [ -n "$MODPROBE_DEBUG" ]; then + /sbin/modprobe -v -s $@ &>/dev/console + else + /sbin/modprobe $@ + fi fi + + + diff --git a/start_udev b/start_udev index 89d6d8b..5a31b54 100755 --- a/start_udev +++ b/start_udev @@ -181,23 +181,46 @@ 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 + /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 + if strstr "$cmdline" fastudev; then + /sbin/udevcontrol env FASTUDEV=1 + fi + if strstr "$cmdline" mcollect; then + /sbin/udevcontrol env MODPROBE_COLLECT=1 + MCOLLECT=1 + fi + if strstr "$cmdline" udevchilds; then + /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) + fi + + rm -f /dev/MODPROBE + /sbin/udevcontrol env STARTUP=1 /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] + test -e "$MCOLLECT" && /sbin/udevcontrol env MODPROBE_COLLECT= + unset MCOLLECT + if [ -e /dev/MODPROBE ]; then + (xargs_simple /sbin/modprobe -a) < /dev/MODPROBE 2>/dev/null + rm -f /dev/MODPROBE + wait_for_queue $(getval udevtimeout $cmdline) + ret=$[$ret + $?] + fi + /sbin/udevcontrol env STARTUP= + /sbin/udevcontrol env MODPROBE_DEBUG= else echo -n " kernel too old for this udev version " /sbin/udevd -d ret=10 + fi ret=$[$ret + $?] diff --git a/udev-106-setenv.patch b/udev-106-setenv.patch new file mode 100644 index 0000000..93ae8f7 --- /dev/null +++ b/udev-106-setenv.patch @@ -0,0 +1,99 @@ +--- 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-rules.patch b/udev-rules.patch index 1d06d2f..18699f1 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,10 @@ +--- 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-04-27 13:16:43.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/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-03-07 16:49:26.000000000 +0100 ++++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:45:33.000000000 +0200 @@ -41,9 +41,6 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -10,7 +15,33 @@ # vc devices KERNEL=="vcs", NAME="%k", OWNER="vcsa", GROUP="tty", OPTIONS="last_rule" -@@ -280,7 +277,6 @@ +@@ -68,9 +65,6 @@ + KERNEL=="nvram", MODE="0660" + KERNEL=="rtc", MODE="0644" + +-# 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 +@@ -233,6 +227,7 @@ + + 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 @@ + OPTIONS+="ignore_remove" + + ++ + ####################################### + # 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" @@ -18,3 +49,20 @@ 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 @@ + 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'" + + # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC + # sr: 4 TYPE_WORM, 5 TYPE_ROM +@@ -351,5 +343,6 @@ + # mmc block devices + ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" + ++ + RUN+="socket:/org/kernel/udev/monitor" + diff --git a/udev.spec b/udev.spec index 07ba3a0..4e7684e 100644 --- a/udev.spec +++ b/udev.spec @@ -1,4 +1,4 @@ -%define debug false +%define debug true %define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 2%{?dist} +Release: 2.hh.7%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -26,6 +26,7 @@ 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/ @@ -80,6 +81,7 @@ which contains functions to get volume ids. %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 @@ -216,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 From 75c73d28b7df51ef4eeb51b337f4b42e7092a44e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 12:48:07 +0000 Subject: [PATCH 309/640] fixed console output --- start_udev | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 5a31b54..5849a8b 100755 --- a/start_udev +++ b/start_udev @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # start_udev # @@ -32,6 +32,9 @@ export TZ=/etc/localtime [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf udev_root=${udev_root-/dev} +if [ -f /dev/.in_sysinit ]; then + exec >/dev/console 2>/dev/console Date: Fri, 27 Apr 2007 12:48:07 +0000 Subject: [PATCH 310/640] fixed console output --- start_udev | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 5a31b54..5849a8b 100755 --- a/start_udev +++ b/start_udev @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # start_udev # @@ -32,6 +32,9 @@ export TZ=/etc/localtime [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf udev_root=${udev_root-/dev} +if [ -f /dev/.in_sysinit ]; then + exec >/dev/console 2>/dev/console Date: Fri, 27 Apr 2007 12:55:14 +0000 Subject: [PATCH 311/640] moved modprobe rules --- udev-rules.patch | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 18699f1..a096293 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,10 +1,10 @@ --- 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-04-27 13:16:43.000000000 +0200 ++++ udev-106/etc/udev/redhat/95-pam-console.rules 2007-04-27 14:54:37.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/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:45:33.000000000 +0200 ++++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:54:37.000000000 +0200 @@ -41,9 +41,6 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -66,3 +66,26 @@ + RUN+="socket:/org/kernel/udev/monitor" +--- 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-04-27 14:55:00.000000000 +0200 +@@ -1,10 +1,17 @@ + # 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" + SUBSYSTEM=="module", OPTIONS="ignore_device" + ++ ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", OPTIONS="last_rule" ++ ++# pnp devices ++ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'", OPTIONS="last_rule" ++ ++ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" ++ ++ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt", RUN+="touch /dev/WAITED" ++ + ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" From 0f63ee45550be48d003c9e7792c4c5a16e03d9c8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 12:55:14 +0000 Subject: [PATCH 312/640] moved modprobe rules --- udev-rules.patch | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 18699f1..a096293 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,10 +1,10 @@ --- 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-04-27 13:16:43.000000000 +0200 ++++ udev-106/etc/udev/redhat/95-pam-console.rules 2007-04-27 14:54:37.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/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:45:33.000000000 +0200 ++++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:54:37.000000000 +0200 @@ -41,9 +41,6 @@ KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" @@ -66,3 +66,26 @@ + RUN+="socket:/org/kernel/udev/monitor" +--- 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-04-27 14:55:00.000000000 +0200 +@@ -1,10 +1,17 @@ + # 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" + SUBSYSTEM=="module", OPTIONS="ignore_device" + ++ ++ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", OPTIONS="last_rule" ++ ++# pnp devices ++ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'", OPTIONS="last_rule" ++ ++ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" ++ ++ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt", RUN+="touch /dev/WAITED" ++ + ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" From 4934a315913e74304bcfa283e47c31d823176f80 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 12:55:55 +0000 Subject: [PATCH 313/640] removed debugging actions --- modprobe | 3 --- udev-rules.patch | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modprobe b/modprobe index 0a98685..638c9cc 100755 --- a/modprobe +++ b/modprobe @@ -9,6 +9,3 @@ else fi fi - - - diff --git a/udev-rules.patch b/udev-rules.patch index a096293..97b8851 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -86,6 +86,6 @@ + +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + -+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt", RUN+="touch /dev/WAITED" ++ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" + ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" From 80bb3482f954a77c1cadcf7493b251dbec11d4fc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 12:55:55 +0000 Subject: [PATCH 314/640] removed debugging actions --- modprobe | 3 --- udev-rules.patch | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modprobe b/modprobe index 0a98685..638c9cc 100755 --- a/modprobe +++ b/modprobe @@ -9,6 +9,3 @@ else fi fi - - - diff --git a/udev-rules.patch b/udev-rules.patch index a096293..97b8851 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -86,6 +86,6 @@ + +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + -+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt", RUN+="touch /dev/WAITED" ++ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" + ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule" From a3cd1a496936d803cb64933e60d933bb2739c167 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 13:47:00 +0000 Subject: [PATCH 315/640] - modprobe only on modalias (bug #238140) - make startup messages visible again - speedup boot process by not executing pam_console_apply while booting - Resolves: rhbz#238140 --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 4e7684e..4f16ffc 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 2.hh.7%{?dist} +Release: 3%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -352,6 +352,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Apr 27 2007 Harald Hoyer - 106-3 +- modprobe only on modalias (bug #238140) +- make startup messages visible again +- speedup boot process by not executing pam_console_apply while booting +- Resolves: rhbz#238140 + * Wed Apr 11 2007 Harald Hoyer - 106-2 - create floppy device nodes with the correct selinux context (bug #235953) - Resolves: rhbz#235953 From 99bbbf0c28d430799839c477eb628ccbddd03705 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Apr 2007 13:47:00 +0000 Subject: [PATCH 316/640] - modprobe only on modalias (bug #238140) - make startup messages visible again - speedup boot process by not executing pam_console_apply while booting - Resolves: rhbz#238140 --- udev.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 4e7684e..4f16ffc 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 2.hh.7%{?dist} +Release: 3%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -352,6 +352,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Apr 27 2007 Harald Hoyer - 106-3 +- modprobe only on modalias (bug #238140) +- make startup messages visible again +- speedup boot process by not executing pam_console_apply while booting +- Resolves: rhbz#238140 + * Wed Apr 11 2007 Harald Hoyer - 106-2 - create floppy device nodes with the correct selinux context (bug #235953) - Resolves: rhbz#235953 From c02d5e7aa3a44ce743328eb1bd7b115e8037bff9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 May 2007 10:18:23 +0000 Subject: [PATCH 317/640] - do not skip all events on modprobe (#238385) - Resolves: rhbz#238385 --- udev-rules.patch | 31 +++++++++++++++++++++---------- udev.spec | 6 +++++- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 97b8851..ed2213b 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,10 +1,5 @@ ---- 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-04-27 14:54:37.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/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:54:37.000000000 +0200 ++++ 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" @@ -25,6 +20,15 @@ # 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=="tun", NAME="net/%k" ++KERNEL=="tun", NAME="net/%k", MODE="0666" + + KERNEL=="device-mapper", NAME="mapper/control" + @@ -233,6 +227,7 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -66,9 +70,14 @@ + 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-04-27 14:55:00.000000000 +0200 -@@ -1,10 +1,17 @@ ++++ 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" @@ -79,13 +88,15 @@ SUBSYSTEM=="module", OPTIONS="ignore_device" + -+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", OPTIONS="last_rule" ++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'", OPTIONS="last_rule" ++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 4f16ffc..6460d7c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -352,6 +352,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed May 02 2007 Harald Hoyer - 106-4 +- do not skip all events on modprobe (#238385) +- Resolves: rhbz#238385 + * Fri Apr 27 2007 Harald Hoyer - 106-3 - modprobe only on modalias (bug #238140) - make startup messages visible again From 419422bec288c2c32830f0cdf75c4c027735094a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 May 2007 10:18:23 +0000 Subject: [PATCH 318/640] - do not skip all events on modprobe (#238385) - Resolves: rhbz#238385 --- udev-rules.patch | 31 +++++++++++++++++++++---------- udev.spec | 6 +++++- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 97b8851..ed2213b 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,10 +1,5 @@ ---- 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-04-27 14:54:37.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/50-udev.rules.rhrules 2007-03-03 18:42:09.000000000 +0100 -+++ udev-106/etc/udev/redhat/50-udev.rules 2007-04-27 14:54:37.000000000 +0200 ++++ 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" @@ -25,6 +20,15 @@ # 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=="tun", NAME="net/%k" ++KERNEL=="tun", NAME="net/%k", MODE="0666" + + KERNEL=="device-mapper", NAME="mapper/control" + @@ -233,6 +227,7 @@ KERNEL=="pktcdvd", NAME="%k/control" @@ -66,9 +70,14 @@ + 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-04-27 14:55:00.000000000 +0200 -@@ -1,10 +1,17 @@ ++++ 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" @@ -79,13 +88,15 @@ SUBSYSTEM=="module", OPTIONS="ignore_device" + -+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", OPTIONS="last_rule" ++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'", OPTIONS="last_rule" ++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 4f16ffc..6460d7c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 106 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -352,6 +352,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed May 02 2007 Harald Hoyer - 106-4 +- do not skip all events on modprobe (#238385) +- Resolves: rhbz#238385 + * Fri Apr 27 2007 Harald Hoyer - 106-3 - modprobe only on modalias (bug #238140) - make startup messages visible again From e3118d12c91226812423cabd3dd0d0e7bd96aab2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 26 Jun 2007 14:39:44 +0000 Subject: [PATCH 319/640] version 113 --- .cvsignore | 2 +- sources | 2 +- start_udev | 5 ++- udev-089-nopie.patch | 13 +++--- udev-091-lib64.patch | 39 ++++++++++------- udev-rules.patch | 102 ------------------------------------------- udev.spec | 39 ++++++++--------- 7 files changed, 55 insertions(+), 147 deletions(-) diff --git a/.cvsignore b/.cvsignore index 229ec71..6f576bb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-106.tar.bz2 +udev-113.tar.bz2 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/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-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..63943de 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:29:17.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:29:17.000000000 +0200 ++++ udev-113/extras/volume_id/lib/Makefile 2007-06-26 16:35:40.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:29:17.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-rules.patch b/udev-rules.patch index ed2213b..e69de29 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,102 +0,0 @@ ---- 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" - 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" - --# 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=="tun", NAME="net/%k" -+KERNEL=="tun", NAME="net/%k", MODE="0666" - - KERNEL=="device-mapper", NAME="mapper/control" - -@@ -233,6 +227,7 @@ - - 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 @@ - OPTIONS+="ignore_remove" - - -+ - ####################################### - # 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 @@ - 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'" - - # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC - # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -351,5 +343,6 @@ - # mmc block devices - ACTION=="add", SUBSYSTEM=="mmc", RUN+="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" -- - # 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 6460d7c..f5dae54 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 106 -Release: 4%{?dist} +Version: 113 +Release: 1%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -24,9 +24,9 @@ Patch2: udev-rules.patch Patch5: udev-extras.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch -Patch10: udev-106-selinuxmedia.patch +#Patch10: udev-106-selinuxmedia.patch Patch14: udev-095-dbgwait.patch -Patch15: udev-106-setenv.patch +#Patch15: udev-106-setenv.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -79,9 +79,9 @@ which contains functions to get volume ids. %patch5 -p1 -b .rhextras %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 -%patch10 -p1 -b .selinuxmedia +#%patch10 -p1 -b .selinuxmedia %patch14 -p1 -b .dbgwait -%patch15 -p1 -b .setenv +#%patch15 -p1 -b .setenv rm -f etc/udev/redhat/51-hotplug.rules %build @@ -96,13 +96,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 +113,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 +136,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 +156,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 @@ -181,8 +178,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 @@ -210,7 +206,6 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{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,7 +213,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 @@ -276,8 +271,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 @@ -298,7 +291,6 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -322,6 +314,8 @@ 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* %if %{with_static} %files static @@ -329,8 +323,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 +344,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 26 2007 Harald Hoyer - 113-1 +- version 113 + +* 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 e45ef51da4d524599b0e16522fdd9d8c008ae091 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 26 Jun 2007 14:39:44 +0000 Subject: [PATCH 320/640] version 113 --- .cvsignore | 2 +- sources | 2 +- start_udev | 5 ++- udev-089-nopie.patch | 13 +++--- udev-091-lib64.patch | 39 ++++++++++------- udev-rules.patch | 102 ------------------------------------------- udev.spec | 39 ++++++++--------- 7 files changed, 55 insertions(+), 147 deletions(-) diff --git a/.cvsignore b/.cvsignore index 229ec71..6f576bb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-106.tar.bz2 +udev-113.tar.bz2 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/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-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..63943de 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:29:17.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:29:17.000000000 +0200 ++++ udev-113/extras/volume_id/lib/Makefile 2007-06-26 16:35:40.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:29:17.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-rules.patch b/udev-rules.patch index ed2213b..e69de29 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,102 +0,0 @@ ---- 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" - 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" - --# 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=="tun", NAME="net/%k" -+KERNEL=="tun", NAME="net/%k", MODE="0666" - - KERNEL=="device-mapper", NAME="mapper/control" - -@@ -233,6 +227,7 @@ - - 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 @@ - OPTIONS+="ignore_remove" - - -+ - ####################################### - # 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 @@ - 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'" - - # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC - # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -351,5 +343,6 @@ - # mmc block devices - ACTION=="add", SUBSYSTEM=="mmc", RUN+="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" -- - # 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 6460d7c..f5dae54 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 106 -Release: 4%{?dist} +Version: 113 +Release: 1%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -24,9 +24,9 @@ Patch2: udev-rules.patch Patch5: udev-extras.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch -Patch10: udev-106-selinuxmedia.patch +#Patch10: udev-106-selinuxmedia.patch Patch14: udev-095-dbgwait.patch -Patch15: udev-106-setenv.patch +#Patch15: udev-106-setenv.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -79,9 +79,9 @@ which contains functions to get volume ids. %patch5 -p1 -b .rhextras %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 -%patch10 -p1 -b .selinuxmedia +#%patch10 -p1 -b .selinuxmedia %patch14 -p1 -b .dbgwait -%patch15 -p1 -b .setenv +#%patch15 -p1 -b .setenv rm -f etc/udev/redhat/51-hotplug.rules %build @@ -96,13 +96,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 +113,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 +136,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 +156,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 @@ -181,8 +178,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 @@ -210,7 +206,6 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{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,7 +213,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 @@ -276,8 +271,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 @@ -298,7 +291,6 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -322,6 +314,8 @@ 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* %if %{with_static} %files static @@ -329,8 +323,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 +344,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 26 2007 Harald Hoyer - 113-1 +- version 113 + +* 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 0baca8cc2830411663669cefb036a5db3520f00e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 27 Jun 2007 08:32:59 +0000 Subject: [PATCH 321/640] - added rule for SD cards in a TI FlashMedia slot (#217070) --- udev-091-lib64.patch | 8 +-- udev-106-selinuxmedia.patch | 38 -------------- udev-106-setenv.patch | 99 ------------------------------------- udev-rules.patch | 12 +++++ udev.spec | 17 +++---- 5 files changed, 24 insertions(+), 150 deletions(-) delete mode 100644 udev-106-selinuxmedia.patch delete mode 100644 udev-106-setenv.patch diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch index 63943de..d29aaca 100644 --- a/udev-091-lib64.patch +++ b/udev-091-lib64.patch @@ -1,5 +1,5 @@ --- udev-113/Makefile.lib64 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/Makefile 2007-06-26 16:29:17.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 @@ -18,8 +18,8 @@ -C $$target $@ || exit 1; \ done; .PHONY: all ---- udev-113/extras/volume_id/lib/Makefile.lib64 2007-06-26 16:29:17.000000000 +0200 -+++ udev-113/extras/volume_id/lib/Makefile 2007-06-26 16:35:40.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. @@ -42,7 +42,7 @@ 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:29:17.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 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-rules.patch b/udev-rules.patch index e69de29..d5d09e0 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -0,0 +1,12 @@ +--- 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-26 16:52:47.000000000 +0200 +@@ -12,7 +12,8 @@ + + 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" + diff --git a/udev.spec b/udev.spec index f5dae54..469067a 100644 --- a/udev.spec +++ b/udev.spec @@ -24,9 +24,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 +77,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 @@ -163,8 +159,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 @@ -286,11 +283,7 @@ 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}/check-cdrom.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh @@ -317,6 +310,11 @@ rm -rf $RPM_BUILD_ROOT %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 %doc COPYING @@ -346,6 +344,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * 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 From 9a1b893d924e73da5da37e48a7375b23ad4d5266 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 27 Jun 2007 08:32:59 +0000 Subject: [PATCH 322/640] - added rule for SD cards in a TI FlashMedia slot (#217070) --- udev-091-lib64.patch | 8 +-- udev-106-selinuxmedia.patch | 38 -------------- udev-106-setenv.patch | 99 ------------------------------------- udev-rules.patch | 12 +++++ udev.spec | 17 +++---- 5 files changed, 24 insertions(+), 150 deletions(-) delete mode 100644 udev-106-selinuxmedia.patch delete mode 100644 udev-106-setenv.patch diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch index 63943de..d29aaca 100644 --- a/udev-091-lib64.patch +++ b/udev-091-lib64.patch @@ -1,5 +1,5 @@ --- udev-113/Makefile.lib64 2007-06-23 17:44:48.000000000 +0200 -+++ udev-113/Makefile 2007-06-26 16:29:17.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 @@ -18,8 +18,8 @@ -C $$target $@ || exit 1; \ done; .PHONY: all ---- udev-113/extras/volume_id/lib/Makefile.lib64 2007-06-26 16:29:17.000000000 +0200 -+++ udev-113/extras/volume_id/lib/Makefile 2007-06-26 16:35:40.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. @@ -42,7 +42,7 @@ 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:29:17.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 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-rules.patch b/udev-rules.patch index e69de29..d5d09e0 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -0,0 +1,12 @@ +--- 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-26 16:52:47.000000000 +0200 +@@ -12,7 +12,8 @@ + + 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" + diff --git a/udev.spec b/udev.spec index f5dae54..469067a 100644 --- a/udev.spec +++ b/udev.spec @@ -24,9 +24,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 +77,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 @@ -163,8 +159,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 @@ -286,11 +283,7 @@ 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}/check-cdrom.sh %attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh %attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh @@ -317,6 +310,11 @@ rm -rf $RPM_BUILD_ROOT %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 %doc COPYING @@ -346,6 +344,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * 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 From 850b10c0119b6735936c283f4a3662804a31d60a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Jul 2007 10:18:00 +0000 Subject: [PATCH 323/640] - added more firewire symlinks (#240770) - minor rule patches --- udev-rules.patch | 40 +++++++++++++++++++++++++++++++++++++++- udev.spec | 10 ++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index d5d09e0..4c4d60f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,43 @@ +--- 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 +@@ -4,7 +4,7 @@ + # 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" +@@ -72,7 +72,7 @@ + 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,7 +99,7 @@ + KERNEL=="usb/lp*", GROUP="lp", MODE="0660" + + # tape devices +-SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ ++SUBSYSTEM=="ide", ATTRS{media}=="tape", ACTION=="add", \ + RUN+="modprobe ide-scsi idescsi_nocd=1" + KERNEL=="ht*", GROUP="disk", MODE="0660" + KERNEL=="nht*", GROUP="disk", MODE="0660" +@@ -181,6 +181,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" --- 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-26 16:52:47.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-06-27 10:26:40.000000000 +0200 @@ -12,7 +12,8 @@ ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" diff --git a/udev.spec b/udev.spec index 469067a..99f25c6 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -16,7 +16,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 @@ -198,6 +198,7 @@ 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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev @@ -288,6 +289,7 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -342,6 +344,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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) From d866c814090d77f1382258e6460f7f1cfa33ab86 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Jul 2007 10:18:00 +0000 Subject: [PATCH 324/640] - added more firewire symlinks (#240770) - minor rule patches --- udev-rules.patch | 40 +++++++++++++++++++++++++++++++++++++++- udev.spec | 10 ++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index d5d09e0..4c4d60f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,43 @@ +--- 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 +@@ -4,7 +4,7 @@ + # 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" +@@ -72,7 +72,7 @@ + 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,7 +99,7 @@ + KERNEL=="usb/lp*", GROUP="lp", MODE="0660" + + # tape devices +-SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \ ++SUBSYSTEM=="ide", ATTRS{media}=="tape", ACTION=="add", \ + RUN+="modprobe ide-scsi idescsi_nocd=1" + KERNEL=="ht*", GROUP="disk", MODE="0660" + KERNEL=="nht*", GROUP="disk", MODE="0660" +@@ -181,6 +181,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" --- 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-26 16:52:47.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-06-27 10:26:40.000000000 +0200 @@ -12,7 +12,8 @@ ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" diff --git a/udev.spec b/udev.spec index 469067a..99f25c6 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -16,7 +16,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 @@ -198,6 +198,7 @@ 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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev @@ -288,6 +289,7 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -342,6 +344,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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) From d225aa6f077eda966b40a9e2799f0e0fce689736 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Jul 2007 10:24:16 +0000 Subject: [PATCH 325/640] fw_unit_symlinks.sh added --- 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 e84f72ec149f3bbee8be565a3e270a9d455ad7c4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Jul 2007 10:24:16 +0000 Subject: [PATCH 326/640] fw_unit_symlinks.sh added --- 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 838d6f0abcca01733e2dacd1cd3da5f262ebe433 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 9 Jul 2007 15:46:45 +0000 Subject: [PATCH 327/640] some speedups --- modprobe | 11 --------- modprobe_helper.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ start_udev | 33 +++++++++++++++++++-------- udev-rules.patch | 58 +++++++++++++++++++++++++++++++++++++++++------ udev.nodes | 4 ++++ udev.spec | 30 ++++++++++++------------ 6 files changed, 151 insertions(+), 41 deletions(-) delete mode 100755 modprobe create mode 100644 modprobe_helper.c diff --git a/modprobe b/modprobe deleted file mode 100755 index 638c9cc..0000000 --- a/modprobe +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ -n "$MODPROBE_COLLECT" ]; then - echo $@ >> /dev/MODPROBE -else - if [ -n "$MODPROBE_DEBUG" ]; then - /sbin/modprobe -v -s $@ &>/dev/console - else - /sbin/modprobe $@ - fi -fi - diff --git a/modprobe_helper.c b/modprobe_helper.c new file mode 100644 index 0000000..70bbf1e --- /dev/null +++ b/modprobe_helper.c @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include + +#define PNP_STR "pnp:d" + +extern char **environ; + +int main(int argc, char **argv) +{ + int fd = 0; + int len, i; + + if (getenv("MODPROBE_DEBUG")) { + int confd = open("/dev/console", O_RDWR); + if (confd >= 0) { + dup2(confd, 0); + dup2(confd, 1); + dup2(confd, 2); + close(confd); + } + + fprintf(stderr, "modprobe "); + for (i=1; i < argc; i++) + fprintf(stderr, "%s ", argv[1]); + fprintf(stderr, "\n"); + } + + if (! getenv("MODPROBE_COLLECT")) + goto fallback; + + if ( argc != 2 ) + goto fallback; + + fd = open("/dev/MODPROBE", O_CREAT|O_WRONLY|O_APPEND); + + if (fd < 0) + goto fallback; + + len = strlen(argv[1]); + + if ((write(fd, argv[1], len) != len) || (write(fd, "\n", 1) != 1)) { + close(fd); + goto fallback; + } + close(fd); + exit(0); + + fallback: + execve ("/sbin/modprobe", argv, environ); + +} diff --git a/start_udev b/start_udev index b895c72..cd5591c 100755 --- a/start_udev +++ b/start_udev @@ -84,8 +84,8 @@ make_extra_nodes () { 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 @@ if [ -f "/sys/class/tty/console/uevent" ]; then 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 [ -f "/sys/class/tty/console/uevent" ]; then 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 @@ if [ -f "/sys/class/tty/console/uevent" ]; then 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 diff --git a/udev-rules.patch b/udev-rules.patch index 4c4d60f..bdd88ad 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -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" 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 99f25c6..611a049 100644 --- a/udev.spec +++ b/udev.spec @@ -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 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t 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 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " 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 @@ 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 %{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 -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,6 +275,11 @@ 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}/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 @@ rm -rf $RPM_BUILD_ROOT %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 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From c0da6ce07376d219a9d4527127159b4858683a8e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 9 Jul 2007 15:46:45 +0000 Subject: [PATCH 328/640] some speedups --- modprobe | 11 --------- modprobe_helper.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ start_udev | 33 +++++++++++++++++++-------- udev-rules.patch | 58 +++++++++++++++++++++++++++++++++++++++++------ udev.nodes | 4 ++++ udev.spec | 30 ++++++++++++------------ 6 files changed, 151 insertions(+), 41 deletions(-) delete mode 100755 modprobe create mode 100644 modprobe_helper.c diff --git a/modprobe b/modprobe deleted file mode 100755 index 638c9cc..0000000 --- a/modprobe +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ -n "$MODPROBE_COLLECT" ]; then - echo $@ >> /dev/MODPROBE -else - if [ -n "$MODPROBE_DEBUG" ]; then - /sbin/modprobe -v -s $@ &>/dev/console - else - /sbin/modprobe $@ - fi -fi - diff --git a/modprobe_helper.c b/modprobe_helper.c new file mode 100644 index 0000000..70bbf1e --- /dev/null +++ b/modprobe_helper.c @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include + +#define PNP_STR "pnp:d" + +extern char **environ; + +int main(int argc, char **argv) +{ + int fd = 0; + int len, i; + + if (getenv("MODPROBE_DEBUG")) { + int confd = open("/dev/console", O_RDWR); + if (confd >= 0) { + dup2(confd, 0); + dup2(confd, 1); + dup2(confd, 2); + close(confd); + } + + fprintf(stderr, "modprobe "); + for (i=1; i < argc; i++) + fprintf(stderr, "%s ", argv[1]); + fprintf(stderr, "\n"); + } + + if (! getenv("MODPROBE_COLLECT")) + goto fallback; + + if ( argc != 2 ) + goto fallback; + + fd = open("/dev/MODPROBE", O_CREAT|O_WRONLY|O_APPEND); + + if (fd < 0) + goto fallback; + + len = strlen(argv[1]); + + if ((write(fd, argv[1], len) != len) || (write(fd, "\n", 1) != 1)) { + close(fd); + goto fallback; + } + close(fd); + exit(0); + + fallback: + execve ("/sbin/modprobe", argv, environ); + +} diff --git a/start_udev b/start_udev index b895c72..cd5591c 100755 --- a/start_udev +++ b/start_udev @@ -84,8 +84,8 @@ make_extra_nodes () { 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 @@ if [ -f "/sys/class/tty/console/uevent" ]; then 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 [ -f "/sys/class/tty/console/uevent" ]; then 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 @@ if [ -f "/sys/class/tty/console/uevent" ]; then 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 diff --git a/udev-rules.patch b/udev-rules.patch index 4c4d60f..bdd88ad 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -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" 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 99f25c6..611a049 100644 --- a/udev.spec +++ b/udev.spec @@ -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 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t 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 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " 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 @@ 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 %{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 -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,6 +275,11 @@ 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}/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 @@ rm -rf $RPM_BUILD_ROOT %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 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From b2eb2386420eeefe1d33daa8e61c66b1d0212d3a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 14 Jul 2007 10:12:48 +0000 Subject: [PATCH 329/640] - do not collect modprobes (bug #222542), because firmware loading seems to depend on it. --- start_udev | 5 +---- udev.spec | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index cd5591c..f5b799e 100755 --- a/start_udev +++ b/start_udev @@ -197,10 +197,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" fastudev; then /sbin/udevcontrol env FASTUDEV=1 fi - if strstr "$cmdline" nomcollect; then - # make module collection the default - : - else + if strstr "$cmdline" mcollect; then /sbin/udevcontrol env MODPROBE_COLLECT=1 MODPROBE_COLLECT=1 fi diff --git a/udev.spec b/udev.spec index 611a049..6766c9e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -343,6 +343,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From 000e6f0367efe2845ba48bea3284fd9bdfe3e92b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 14 Jul 2007 10:12:48 +0000 Subject: [PATCH 330/640] - do not collect modprobes (bug #222542), because firmware loading seems to depend on it. --- start_udev | 5 +---- udev.spec | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index cd5591c..f5b799e 100755 --- a/start_udev +++ b/start_udev @@ -197,10 +197,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" fastudev; then /sbin/udevcontrol env FASTUDEV=1 fi - if strstr "$cmdline" nomcollect; then - # make module collection the default - : - else + if strstr "$cmdline" mcollect; then /sbin/udevcontrol env MODPROBE_COLLECT=1 MODPROBE_COLLECT=1 fi diff --git a/udev.spec b/udev.spec index 611a049..6766c9e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -343,6 +343,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From 3df6869de7200e10100d5b03452be71d78f6cce7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 19 Jul 2007 16:46:06 +0000 Subject: [PATCH 331/640] - kernel changed subsystem name from usb_device to usb_endpoint, corrected the rule (#248916) --- udev-rules.patch | 13 +++++++++++-- udev.spec | 6 +++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index bdd88ad..82b0a36 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-07-19 18:43:32.000000000 +0200 @@ -4,7 +4,7 @@ # default is OWNER="root" GROUP="root", MODE="0600" # @@ -38,6 +38,15 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" +@@ -306,7 +308,7 @@ + ##################################### + + +-ACTION=="add", SUBSYSTEM=="usb_device", \ ++ACTION=="add", SUBSYSTEM=="usb_endpoint", \ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" + @@ -321,11 +323,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -73,7 +82,7 @@ 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-07-09 15:43:49.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-07-19 18:43:06.000000000 +0200 @@ -5,14 +5,14 @@ SUBSYSTEM=="module", OPTIONS="ignore_device" diff --git a/udev.spec b/udev.spec index 6766c9e..56b7f14 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -343,6 +343,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Jul 19 2007 Harald Hoyer - 113-5 +- kernel changed subsystem name from usb_device to usb_endpoint, + corrected the rule (#248916) + * Sat Jul 14 2007 Harald Hoyer - 113-4 - do not collect modprobes (bug #222542), because firmware loading seems to depend on it. From bf94b5f5d64a71861b3f65f245464e027783974c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 19 Jul 2007 16:46:06 +0000 Subject: [PATCH 332/640] - kernel changed subsystem name from usb_device to usb_endpoint, corrected the rule (#248916) --- udev-rules.patch | 13 +++++++++++-- udev.spec | 6 +++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index bdd88ad..82b0a36 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-07-19 18:43:32.000000000 +0200 @@ -4,7 +4,7 @@ # default is OWNER="root" GROUP="root", MODE="0600" # @@ -38,6 +38,15 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" +@@ -306,7 +308,7 @@ + ##################################### + + +-ACTION=="add", SUBSYSTEM=="usb_device", \ ++ACTION=="add", SUBSYSTEM=="usb_endpoint", \ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ + NAME="%c", MODE="0644" + @@ -321,11 +323,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -73,7 +82,7 @@ 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-07-09 15:43:49.000000000 +0200 ++++ udev-113/etc/udev/redhat/05-udev-early.rules 2007-07-19 18:43:06.000000000 +0200 @@ -5,14 +5,14 @@ SUBSYSTEM=="module", OPTIONS="ignore_device" diff --git a/udev.spec b/udev.spec index 6766c9e..56b7f14 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -343,6 +343,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Jul 19 2007 Harald Hoyer - 113-5 +- kernel changed subsystem name from usb_device to usb_endpoint, + corrected the rule (#248916) + * Sat Jul 14 2007 Harald Hoyer - 113-4 - do not collect modprobes (bug #222542), because firmware loading seems to depend on it. From a89500695c86b78951f8ea5b3c2a1bf15870ba92 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 Jul 2007 12:58:24 +0000 Subject: [PATCH 333/640] - kernel does not provide usb_device anymore, corrected the rules (#248916) --- udev-rules.patch | 22 +++++++++++++++------- udev.spec | 9 ++++++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 82b0a36..6e07ef5 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-19 18:43:32.000000000 +0200 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-07-20 14:55:37.000000000 +0200 @@ -4,7 +4,7 @@ # default is OWNER="root" GROUP="root", MODE="0600" # @@ -38,16 +38,24 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" -@@ -306,7 +308,7 @@ +@@ -306,10 +308,13 @@ ##################################### -ACTION=="add", SUBSYSTEM=="usb_device", \ -+ACTION=="add", SUBSYSTEM=="usb_endpoint", \ - PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ - NAME="%c", MODE="0644" +- PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ +- NAME="%c", MODE="0644" ++ACTION=="add", SUBSYSTEM=="usb", ATTR{devnum}=="?*", ATTR{busnum}=="?*", \ ++ NAME="bus/usb/$attr{busnum}/$attr{devnum}", MODE="0644" -@@ -321,11 +323,11 @@ ++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 +326,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -62,7 +70,7 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -334,14 +336,14 @@ +@@ -334,14 +339,14 @@ SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ diff --git a/udev.spec b/udev.spec index 56b7f14..95be872 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -343,9 +343,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 -- kernel changed subsystem name from usb_device to usb_endpoint, - corrected the rule (#248916) +- corrected the rule for usb devices (#248916) * Sat Jul 14 2007 Harald Hoyer - 113-4 - do not collect modprobes (bug #222542), because firmware From 756aedf68edd5166b4c17ae17665afcf5a60812f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 Jul 2007 12:58:24 +0000 Subject: [PATCH 334/640] - kernel does not provide usb_device anymore, corrected the rules (#248916) --- udev-rules.patch | 22 +++++++++++++++------- udev.spec | 9 ++++++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/udev-rules.patch b/udev-rules.patch index 82b0a36..6e07ef5 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,5 +1,5 @@ --- 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-19 18:43:32.000000000 +0200 ++++ udev-113/etc/udev/redhat/50-udev.rules 2007-07-20 14:55:37.000000000 +0200 @@ -4,7 +4,7 @@ # default is OWNER="root" GROUP="root", MODE="0600" # @@ -38,16 +38,24 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" -@@ -306,7 +308,7 @@ +@@ -306,10 +308,13 @@ ##################################### -ACTION=="add", SUBSYSTEM=="usb_device", \ -+ACTION=="add", SUBSYSTEM=="usb_endpoint", \ - PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ - NAME="%c", MODE="0644" +- PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ +- NAME="%c", MODE="0644" ++ACTION=="add", SUBSYSTEM=="usb", ATTR{devnum}=="?*", ATTR{busnum}=="?*", \ ++ NAME="bus/usb/$attr{busnum}/$attr{devnum}", MODE="0644" -@@ -321,11 +323,11 @@ ++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 +326,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -62,7 +70,7 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -334,14 +336,14 @@ +@@ -334,14 +339,14 @@ SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ diff --git a/udev.spec b/udev.spec index 56b7f14..95be872 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -343,9 +343,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 -- kernel changed subsystem name from usb_device to usb_endpoint, - corrected the rule (#248916) +- corrected the rule for usb devices (#248916) * Sat Jul 14 2007 Harald Hoyer - 113-4 - do not collect modprobes (bug #222542), because firmware From 0c7e43fa82f9bf8edd64eadd5abd1fd51543f502 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Jul 2007 16:51:38 +0000 Subject: [PATCH 335/640] - major rule cleanup - removed persistent rules from 50 and included upstream rules - removed skip_wait from modprobe --- modprobe_helper.c | 56 ---------- start_udev | 23 ---- udev-rules.patch | 277 +++++++++++++++++++++++++++++++++++++++------- udev.spec | 28 +++-- 4 files changed, 256 insertions(+), 128 deletions(-) delete mode 100644 modprobe_helper.c diff --git a/modprobe_helper.c b/modprobe_helper.c deleted file mode 100644 index 70bbf1e..0000000 --- a/modprobe_helper.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#define PNP_STR "pnp:d" - -extern char **environ; - -int main(int argc, char **argv) -{ - int fd = 0; - int len, i; - - if (getenv("MODPROBE_DEBUG")) { - int confd = open("/dev/console", O_RDWR); - if (confd >= 0) { - dup2(confd, 0); - dup2(confd, 1); - dup2(confd, 2); - close(confd); - } - - fprintf(stderr, "modprobe "); - for (i=1; i < argc; i++) - fprintf(stderr, "%s ", argv[1]); - fprintf(stderr, "\n"); - } - - if (! getenv("MODPROBE_COLLECT")) - goto fallback; - - if ( argc != 2 ) - goto fallback; - - fd = open("/dev/MODPROBE", O_CREAT|O_WRONLY|O_APPEND); - - if (fd < 0) - goto fallback; - - len = strlen(argv[1]); - - if ((write(fd, argv[1], len) != len) || (write(fd, "\n", 1) != 1)) { - close(fd); - goto fallback; - } - close(fd); - exit(0); - - fallback: - execve ("/sbin/modprobe", argv, environ); - -} diff --git a/start_udev b/start_udev index f5b799e..4bdac13 100755 --- a/start_udev +++ b/start_udev @@ -197,38 +197,15 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" fastudev; then /sbin/udevcontrol env FASTUDEV=1 fi - if strstr "$cmdline" mcollect; then - /sbin/udevcontrol env MODPROBE_COLLECT=1 - MODPROBE_COLLECT=1 - fi if strstr "$cmdline" udevchilds; then /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) fi - rm -f /dev/MODPROBE /sbin/udevcontrol env STARTUP=1 /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] - - 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 - [ $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= diff --git a/udev-rules.patch b/udev-rules.patch index 6e07ef5..68b6d11 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,6 @@ --- 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-20 14:55:37.000000000 +0200 -@@ -4,7 +4,7 @@ ++++ 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" # @@ -9,16 +9,89 @@ # all block devices SUBSYSTEM=="block", GROUP="disk", MODE="0640" -@@ -72,7 +72,7 @@ - KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k" + 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" + + # 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 @@ + + # 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" ++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 +99,8 @@ +@@ -99,8 +105,8 @@ KERNEL=="usb/lp*", GROUP="lp", MODE="0660" # tape devices @@ -29,7 +102,17 @@ KERNEL=="ht*", GROUP="disk", MODE="0660" KERNEL=="nht*", GROUP="disk", MODE="0660" KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" -@@ -181,6 +181,8 @@ +@@ -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" @@ -38,15 +121,115 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" -@@ -306,10 +308,13 @@ - ##################################### +@@ -227,89 +236,51 @@ + KERNEL=="pktcdvd", NAME="%k/control" --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", ATTR{devnum}=="?*", ATTR{busnum}=="?*", \ -+ NAME="bus/usb/$attr{busnum}/$attr{devnum}", MODE="0644" +- + 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}=="?*", \ @@ -55,7 +238,7 @@ # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -321,11 +326,11 @@ +@@ -321,11 +292,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -70,17 +253,24 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -334,14 +339,14 @@ +@@ -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", \ +-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", \ +-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", \ +-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 @@ -90,22 +280,35 @@ 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-07-19 18:43:06.000000000 +0200 -@@ -5,14 +5,14 @@ - SUBSYSTEM=="module", OPTIONS="ignore_device" - - ++++ 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" +- +- -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 +- +-# 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=="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" - +- +-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 95be872..5966a1e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 6%{?dist} +Release: 7%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,7 +15,6 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev.nodes -Source3: modprobe_helper.c Source4: fw_unit_symlinks.sh Source10: firmware_helper.c @@ -136,7 +135,6 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " all %{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} -%{__cc} %{optflags} -fpie -pie -o modprobe_helper %{SOURCE3} %install rm -rf $RPM_BUILD_ROOT @@ -185,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,7 +206,6 @@ 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 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} @@ -275,7 +277,6 @@ 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}/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 @@ -291,9 +292,7 @@ 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/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 @@ -343,6 +342,11 @@ 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) From 6df79e09b9956398482af0f22f9a8ccb82344074 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Jul 2007 16:51:38 +0000 Subject: [PATCH 336/640] - major rule cleanup - removed persistent rules from 50 and included upstream rules - removed skip_wait from modprobe --- modprobe_helper.c | 56 ---------- start_udev | 23 ---- udev-rules.patch | 277 +++++++++++++++++++++++++++++++++++++++------- udev.spec | 28 +++-- 4 files changed, 256 insertions(+), 128 deletions(-) delete mode 100644 modprobe_helper.c diff --git a/modprobe_helper.c b/modprobe_helper.c deleted file mode 100644 index 70bbf1e..0000000 --- a/modprobe_helper.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#define PNP_STR "pnp:d" - -extern char **environ; - -int main(int argc, char **argv) -{ - int fd = 0; - int len, i; - - if (getenv("MODPROBE_DEBUG")) { - int confd = open("/dev/console", O_RDWR); - if (confd >= 0) { - dup2(confd, 0); - dup2(confd, 1); - dup2(confd, 2); - close(confd); - } - - fprintf(stderr, "modprobe "); - for (i=1; i < argc; i++) - fprintf(stderr, "%s ", argv[1]); - fprintf(stderr, "\n"); - } - - if (! getenv("MODPROBE_COLLECT")) - goto fallback; - - if ( argc != 2 ) - goto fallback; - - fd = open("/dev/MODPROBE", O_CREAT|O_WRONLY|O_APPEND); - - if (fd < 0) - goto fallback; - - len = strlen(argv[1]); - - if ((write(fd, argv[1], len) != len) || (write(fd, "\n", 1) != 1)) { - close(fd); - goto fallback; - } - close(fd); - exit(0); - - fallback: - execve ("/sbin/modprobe", argv, environ); - -} diff --git a/start_udev b/start_udev index f5b799e..4bdac13 100755 --- a/start_udev +++ b/start_udev @@ -197,38 +197,15 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" fastudev; then /sbin/udevcontrol env FASTUDEV=1 fi - if strstr "$cmdline" mcollect; then - /sbin/udevcontrol env MODPROBE_COLLECT=1 - MODPROBE_COLLECT=1 - fi if strstr "$cmdline" udevchilds; then /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) fi - rm -f /dev/MODPROBE /sbin/udevcontrol env STARTUP=1 /sbin/udevtrigger ret=$[$ret + $?] wait_for_queue $(getval udevtimeout $cmdline) ret=$[$ret + $?] - - 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 - [ $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= diff --git a/udev-rules.patch b/udev-rules.patch index 6e07ef5..68b6d11 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,6 +1,6 @@ --- 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-20 14:55:37.000000000 +0200 -@@ -4,7 +4,7 @@ ++++ 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" # @@ -9,16 +9,89 @@ # all block devices SUBSYSTEM=="block", GROUP="disk", MODE="0640" -@@ -72,7 +72,7 @@ - KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k" + 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" + + # 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 @@ + + # 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" ++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 +99,8 @@ +@@ -99,8 +105,8 @@ KERNEL=="usb/lp*", GROUP="lp", MODE="0660" # tape devices @@ -29,7 +102,17 @@ KERNEL=="ht*", GROUP="disk", MODE="0660" KERNEL=="nht*", GROUP="disk", MODE="0660" KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" -@@ -181,6 +181,8 @@ +@@ -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" @@ -38,15 +121,115 @@ KERNEL=="raw[0-9]*", NAME="raw/%k" KERNEL=="lp[0-9]*", SYMLINK+="par%n" -@@ -306,10 +308,13 @@ - ##################################### +@@ -227,89 +236,51 @@ + KERNEL=="pktcdvd", NAME="%k/control" --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", ATTR{devnum}=="?*", ATTR{busnum}=="?*", \ -+ NAME="bus/usb/$attr{busnum}/$attr{devnum}", MODE="0644" +- + 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}=="?*", \ @@ -55,7 +238,7 @@ # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC # sr: 4 TYPE_WORM, 5 TYPE_ROM -@@ -321,11 +326,11 @@ +@@ -321,11 +292,11 @@ RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" @@ -70,17 +253,24 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ SYMLINK+="scanner scanner-%k", MODE="0660" -@@ -334,14 +339,14 @@ +@@ -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", \ +-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", \ +-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", \ +-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 @@ -90,22 +280,35 @@ 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-07-19 18:43:06.000000000 +0200 -@@ -5,14 +5,14 @@ - SUBSYSTEM=="module", OPTIONS="ignore_device" - - ++++ 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" +- +- -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 +- +-# 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=="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" - +- +-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 95be872..5966a1e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 113 -Release: 6%{?dist} +Release: 7%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,7 +15,6 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev.nodes -Source3: modprobe_helper.c Source4: fw_unit_symlinks.sh Source10: firmware_helper.c @@ -136,7 +135,6 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ " all %{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10} -%{__cc} %{optflags} -fpie -pie -o modprobe_helper %{SOURCE3} %install rm -rf $RPM_BUILD_ROOT @@ -185,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,7 +206,6 @@ 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 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} @@ -275,7 +277,6 @@ 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}/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 @@ -291,9 +292,7 @@ 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/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 @@ -343,6 +342,11 @@ 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) From 288053072ec9aa664e51738cc0379721e7386027 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 30 Jul 2007 16:24:32 +0000 Subject: [PATCH 337/640] - removed "noreplace" config tag from rules (#250043) --- udev-084-floppy.patch | 29 ---- udev-084-pg.patch | 105 --------------- udev-089-last_modalias.patch | 72 ---------- udev-095-longcomment.patch | 24 ---- udev-095-path_id.patch | 70 ---------- udev-095-path_id2.patch | 73 ---------- udev-095-selinux.patch | 65 --------- udev.spec | 11 +- udevstart2.patch | 251 ----------------------------------- 9 files changed, 7 insertions(+), 693 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/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-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.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 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 dff4f6c7622588bc1f1e37717f0c363462bf818f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 30 Jul 2007 16:24:32 +0000 Subject: [PATCH 338/640] - removed "noreplace" config tag from rules (#250043) --- udev-084-floppy.patch | 29 ---- udev-084-pg.patch | 105 --------------- udev-089-last_modalias.patch | 72 ---------- udev-095-longcomment.patch | 24 ---- udev-095-path_id.patch | 70 ---------- udev-095-path_id2.patch | 73 ---------- udev-095-selinux.patch | 65 --------- udev.spec | 11 +- udevstart2.patch | 251 ----------------------------------- 9 files changed, 7 insertions(+), 693 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/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-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.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 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 86664196dcacb91726900c1ed1d791c7a6a605ce Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Aug 2007 14:37:15 +0000 Subject: [PATCH 339/640] - version 114 - big rule unification and cleanup - added persistent names for network and cdrom devices over reboot --- firmware_helper.c | 142 ------------------ udev-095-dbgwait.patch | 80 ---------- udev-extras.patch | 121 --------------- udev-permconv.patch | 97 ------------ udev-post.init | 47 ++++++ udev-rules.patch | 328 +++-------------------------------------- udev.spec | 66 +++++---- upstream | 3 +- 8 files changed, 110 insertions(+), 774 deletions(-) delete mode 100644 firmware_helper.c delete mode 100644 udev-095-dbgwait.patch delete mode 100644 udev-extras.patch delete mode 100644 udev-permconv.patch create mode 100644 udev-post.init diff --git a/firmware_helper.c b/firmware_helper.c deleted file mode 100644 index 061beef..0000000 --- a/firmware_helper.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * A simple firmware helper program. - * - * Copyright 2005 Red Hat, Inc. - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define FIRMWARE_PATH "/lib/firmware" - - -void log_err(char *firmware, int err) { - char *driver; - - driver = getenv("PHYSDEVDRIVER"); - if (!driver) - driver = "(unknown)"; - openlog("firmware_helper",LOG_PID,LOG_USER); - syslog(LOG_ERR,"Loading of %s for %s driver failed: %s",firmware, driver, strerror(err)); - closelog(); -} - -/* Set the 'loading' attribute for a firmware device. - * 1 == currently loading - * 0 == done loading - * -1 == error - */ -int set_loading(char *device, int value) { - char *path; - int rc; - FILE *f; - - path = alloca(strlen(device)+15); - sprintf(path,"/sys/%s/loading", device); - f = fopen(path, "w"); - if (!f) - return 1; - rc = fprintf(f, "%d", value); - fclose(f); - if (rc < 0) - return rc; - return 0; -} - - -int main(int argc, char **argv) { - char *devpath, *firmware, *action; - struct stat sbuf; - int fw_fd, count; - int rc; - char *fw_path, *data_path; - char *fw_buffer; - - devpath = getenv("DEVPATH"); - if (!devpath) return 0; - - firmware = getenv("FIRMWARE"); - if (!firmware) return 0; - - action = getenv("ACTION"); - if (strcmp(action,"add")) - return 0; - - set_loading(devpath, 1); - - fw_path = malloc(strlen(FIRMWARE_PATH) + strlen(firmware) + 2); - if (!fw_path) { - rc = errno; - goto out_err; - } - - sprintf(fw_path,"%s/%s", FIRMWARE_PATH, firmware); - fw_fd = open(fw_path, O_RDONLY); - if (fw_fd == -1) { - rc = errno; - goto out_err; - } - - fstat(fw_fd, &sbuf); - fw_buffer = malloc(sbuf.st_size); - if (!fw_buffer) { - rc = errno; - goto out_err; - } - if (read(fw_fd, fw_buffer, sbuf.st_size) != sbuf.st_size) { - rc = errno; - goto out_err; - } - close(fw_fd); - - data_path = malloc(strlen(devpath) + 12); - if (!data_path) { - rc = errno; - goto out_err; - } - - sprintf(data_path,"/sys/%s/data", devpath); - - fw_fd = open(data_path, O_RDWR); - if (fw_fd == -1) { - rc = errno; - fw_path = data_path; - goto out_err; - } - - count = 0; - while (count < sbuf.st_size) { - int c; - - c = write(fw_fd,fw_buffer+count,sbuf.st_size-count); - if (c <= 0) { - rc = errno; - goto out_err; - } - count += c; - } - close(fw_fd); - set_loading(devpath, 0); - return 0; -out_err: - if (fw_fd >= 0) - close(fw_fd); - set_loading(devpath, -1); - log_err(fw_path, rc); - return rc; -} 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-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 index 68b6d11..c8ea16e 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,314 +1,30 @@ ---- 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" - - # 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 @@ - - # floppy devices - KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" +--- /dev/null 2007-07-17 14:43:58.691704070 +0200 ++++ udev-114/etc/udev/redhat/40-redhat.rules 2007-08-10 16:27:01.000000000 +0200 +@@ -0,0 +1,27 @@ ++# do not edit this file, it will be overwritten on update + - # 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=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" ++KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" + -+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=="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 @@ - - # 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" --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" ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" + -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ PROGRAM=="check-cdrom.sh %k CD-R", \ -+ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" + -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", \ -+ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++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" + -+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 @@ - 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+="/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-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" -- -- --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" ++BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" + -+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" ++KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" ++ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ ++ RUN+="/sbin/modprobe sd_mod" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ ++ RUN+="/sbin/modprobe sr_mod" ++ ++KERNEL=="vcs", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" diff --git a/udev.spec b/udev.spec index 54aea5f..87b986d 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 113 -Release: 8%{?dist} +Version: 114 +Release: 1%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,15 +15,13 @@ 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 +Patch1: udev-rules.patch +Patch3: udev-114+git-fcfeda.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch -Patch14: udev-095-dbgwait.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -71,14 +69,12 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .rhpermconv -%patch2 -p1 -b .rhrules -%patch5 -p1 -b .rhextras +%patch1 -p1 -b .rhrules +%patch3 -p1 -b .git %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 -%patch14 -p1 -b .dbgwait -rm -f etc/udev/redhat/51-hotplug.rules +rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build %if %{with_static} @@ -98,6 +94,7 @@ make \ extras/usb_id \ extras/edd_id \ extras/volume_id \ + extras/cdrom_id \ extras/floppy \ " all @@ -106,6 +103,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 +129,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 +150,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 +186,15 @@ 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/redhat/*.rules \ etc/udev/rules.d/*.rules \ + etc/udev/suse/64-device-mapper.rules \ + etc/udev/suse/64-md-raid.rules \ + etc/udev/packages/40-alsa.rules \ + etc/udev/packages/40-ppc.rules \ + etc/udev/packages/40-s390.rules \ + etc/udev/packages/40-zaptel.rules \ + etc/udev/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}" done @@ -196,16 +203,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 +219,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 +232,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 +243,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 +281,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 +316,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,6 +351,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 + * Mon Jul 30 2007 Harald Hoyer - 113-8 - removed "noreplace" config tag from rules (#250043) diff --git a/upstream b/upstream index 4487ead..0a3c741 100644 --- a/upstream +++ b/upstream @@ -1,2 +1 @@ -udev-094.tar.bz2 -udev-104.tar.bz2 +udev-114.tar.bz2 From 59eb68e649dc16ba4d78f92eb3353fd7cc893aaf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Aug 2007 14:37:15 +0000 Subject: [PATCH 340/640] - version 114 - big rule unification and cleanup - added persistent names for network and cdrom devices over reboot --- firmware_helper.c | 142 ------------------ udev-095-dbgwait.patch | 80 ---------- udev-extras.patch | 121 --------------- udev-permconv.patch | 97 ------------ udev-post.init | 47 ++++++ udev-rules.patch | 328 +++-------------------------------------- udev.spec | 66 +++++---- upstream | 3 +- 8 files changed, 110 insertions(+), 774 deletions(-) delete mode 100644 firmware_helper.c delete mode 100644 udev-095-dbgwait.patch delete mode 100644 udev-extras.patch delete mode 100644 udev-permconv.patch create mode 100644 udev-post.init diff --git a/firmware_helper.c b/firmware_helper.c deleted file mode 100644 index 061beef..0000000 --- a/firmware_helper.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * A simple firmware helper program. - * - * Copyright 2005 Red Hat, Inc. - * - * This software may be freely redistributed under the terms of the GNU - * public license. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define FIRMWARE_PATH "/lib/firmware" - - -void log_err(char *firmware, int err) { - char *driver; - - driver = getenv("PHYSDEVDRIVER"); - if (!driver) - driver = "(unknown)"; - openlog("firmware_helper",LOG_PID,LOG_USER); - syslog(LOG_ERR,"Loading of %s for %s driver failed: %s",firmware, driver, strerror(err)); - closelog(); -} - -/* Set the 'loading' attribute for a firmware device. - * 1 == currently loading - * 0 == done loading - * -1 == error - */ -int set_loading(char *device, int value) { - char *path; - int rc; - FILE *f; - - path = alloca(strlen(device)+15); - sprintf(path,"/sys/%s/loading", device); - f = fopen(path, "w"); - if (!f) - return 1; - rc = fprintf(f, "%d", value); - fclose(f); - if (rc < 0) - return rc; - return 0; -} - - -int main(int argc, char **argv) { - char *devpath, *firmware, *action; - struct stat sbuf; - int fw_fd, count; - int rc; - char *fw_path, *data_path; - char *fw_buffer; - - devpath = getenv("DEVPATH"); - if (!devpath) return 0; - - firmware = getenv("FIRMWARE"); - if (!firmware) return 0; - - action = getenv("ACTION"); - if (strcmp(action,"add")) - return 0; - - set_loading(devpath, 1); - - fw_path = malloc(strlen(FIRMWARE_PATH) + strlen(firmware) + 2); - if (!fw_path) { - rc = errno; - goto out_err; - } - - sprintf(fw_path,"%s/%s", FIRMWARE_PATH, firmware); - fw_fd = open(fw_path, O_RDONLY); - if (fw_fd == -1) { - rc = errno; - goto out_err; - } - - fstat(fw_fd, &sbuf); - fw_buffer = malloc(sbuf.st_size); - if (!fw_buffer) { - rc = errno; - goto out_err; - } - if (read(fw_fd, fw_buffer, sbuf.st_size) != sbuf.st_size) { - rc = errno; - goto out_err; - } - close(fw_fd); - - data_path = malloc(strlen(devpath) + 12); - if (!data_path) { - rc = errno; - goto out_err; - } - - sprintf(data_path,"/sys/%s/data", devpath); - - fw_fd = open(data_path, O_RDWR); - if (fw_fd == -1) { - rc = errno; - fw_path = data_path; - goto out_err; - } - - count = 0; - while (count < sbuf.st_size) { - int c; - - c = write(fw_fd,fw_buffer+count,sbuf.st_size-count); - if (c <= 0) { - rc = errno; - goto out_err; - } - count += c; - } - close(fw_fd); - set_loading(devpath, 0); - return 0; -out_err: - if (fw_fd >= 0) - close(fw_fd); - set_loading(devpath, -1); - log_err(fw_path, rc); - return rc; -} 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-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 index 68b6d11..c8ea16e 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,314 +1,30 @@ ---- 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" - - # 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 @@ - - # floppy devices - KERNEL=="fd[01]*", GROUP="floppy", MODE="0660" +--- /dev/null 2007-07-17 14:43:58.691704070 +0200 ++++ udev-114/etc/udev/redhat/40-redhat.rules 2007-08-10 16:27:01.000000000 +0200 +@@ -0,0 +1,27 @@ ++# do not edit this file, it will be overwritten on update + - # 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=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" ++KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" + -+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=="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 @@ - - # 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" --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" ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" + -+KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \ -+ PROGRAM=="check-cdrom.sh %k CD-R", \ -+ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" + -+KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k CD-R", \ -+ SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k" ++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" + -+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 @@ - 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+="/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-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" -- -- --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" ++BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" + -+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" ++KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" ++ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ ++ RUN+="/sbin/modprobe sd_mod" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ ++ RUN+="/sbin/modprobe sr_mod" ++ ++KERNEL=="vcs", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" diff --git a/udev.spec b/udev.spec index 54aea5f..87b986d 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 113 -Release: 8%{?dist} +Version: 114 +Release: 1%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,15 +15,13 @@ 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 +Patch1: udev-rules.patch +Patch3: udev-114+git-fcfeda.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch -Patch14: udev-095-dbgwait.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -71,14 +69,12 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .rhpermconv -%patch2 -p1 -b .rhrules -%patch5 -p1 -b .rhextras +%patch1 -p1 -b .rhrules +%patch3 -p1 -b .git %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 -%patch14 -p1 -b .dbgwait -rm -f etc/udev/redhat/51-hotplug.rules +rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build %if %{with_static} @@ -98,6 +94,7 @@ make \ extras/usb_id \ extras/edd_id \ extras/volume_id \ + extras/cdrom_id \ extras/floppy \ " all @@ -106,6 +103,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 +129,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 +150,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 +186,15 @@ 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/redhat/*.rules \ etc/udev/rules.d/*.rules \ + etc/udev/suse/64-device-mapper.rules \ + etc/udev/suse/64-md-raid.rules \ + etc/udev/packages/40-alsa.rules \ + etc/udev/packages/40-ppc.rules \ + etc/udev/packages/40-s390.rules \ + etc/udev/packages/40-zaptel.rules \ + etc/udev/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}" done @@ -196,16 +203,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 +219,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 +232,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 +243,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 +281,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 +316,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,6 +351,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 + * Mon Jul 30 2007 Harald Hoyer - 113-8 - removed "noreplace" config tag from rules (#250043) diff --git a/upstream b/upstream index 4487ead..0a3c741 100644 --- a/upstream +++ b/upstream @@ -1,2 +1 @@ -udev-094.tar.bz2 -udev-104.tar.bz2 +udev-114.tar.bz2 From 381aac33067edb6261cccc0b3ff347c08d30bccf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Aug 2007 14:38:10 +0000 Subject: [PATCH 341/640] preview of rules unification --- udev-114+git-fcfeda.patch | 748 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 748 insertions(+) create mode 100644 udev-114+git-fcfeda.patch diff --git a/udev-114+git-fcfeda.patch b/udev-114+git-fcfeda.patch new file mode 100644 index 0000000..e3da05a --- /dev/null +++ b/udev-114+git-fcfeda.patch @@ -0,0 +1,748 @@ +diff --git a/etc/udev/debian/cd-aliases-generator.rules b/etc/udev/debian/cd-aliases-generator.rules +new file mode 100644 +index 0000000..f655488 +--- /dev/null ++++ b/etc/udev/debian/cd-aliases-generator.rules +@@ -0,0 +1,13 @@ ++# These rules generate rules for the /dev/{cdrom,dvd,...} symlinks and ++# write them to /etc/udev/rules.d/z20_persistent-cd.rules. ++# ++# The default name for this file is z75_cd-aliases-generator.rules. ++ ++ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ ++ SUBSYSTEMS!="usb|ieee1394", \ ++ PROGRAM="write_cd_rules", SYMLINK+="%c" ++ ++ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ ++ SUBSYSTEMS=="usb|ieee1394", \ ++ PROGRAM="write_cd_rules by-id", SYMLINK+="%c" ++ +diff --git a/etc/udev/debian/devfs.rules b/etc/udev/debian/devfs.rules +index 2e0caa1..56ed1a8 100644 +--- a/etc/udev/debian/devfs.rules ++++ b/etc/udev/debian/devfs.rules +@@ -50,6 +50,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ + # usbfs-like devices + SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ + NAME="%c" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" + + # serial devices + KERNEL=="ttyS[0-9]*", NAME="tts/%n" +@@ -104,6 +105,7 @@ KERNEL=="umad*", NAME="infiniband/%k" + KERNEL=="issm*", NAME="infiniband/%k" + KERNEL=="uverbs*", NAME="infiniband/%k" + KERNEL=="ucm*", NAME="infiniband/%k" ++KERNEL=="rdma_ucm", NAME="infiniband/%k" + + # sound devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/hotplug.rules +index 0b2fc57..662e997 100644 +--- a/etc/udev/debian/hotplug.rules ++++ b/etc/udev/debian/hotplug.rules +@@ -7,16 +7,20 @@ ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded" + SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded" + + # load the drivers +-ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" ++ENV{MODALIAS}=="?*", \ ++ RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" + SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent" + +-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" ++SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \ ++ RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" + + SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia" + + # rules for subsystems which lack proper hotplug support + SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" + SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" ++SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe tifm_sd" ++SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe tifm_ms" + + SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" + SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \ +diff --git a/etc/udev/debian/hotplugd.rules b/etc/udev/debian/hotplugd.rules +deleted file mode 100644 +index cd30fa4..0000000 +--- a/etc/udev/debian/hotplugd.rules ++++ /dev/null +@@ -1,8 +0,0 @@ +-# do not call hotplug.d and dev.d for "drivers" and "module" events +-SUBSYSTEM=="drivers", OPTIONS="last_rule" +-SUBSYSTEM=="module", OPTIONS="last_rule" +- +-# compatibility support for the obsolete hotplug.d and dev.d directories +-RUN+="udev_run_hotplugd $env{SUBSYSTEM}" +-RUN+="udev_run_devd $env{SUBSYSTEM}" +- +diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/permissions.rules +index ac6c0be..205b733 100644 +--- a/etc/udev/debian/permissions.rules ++++ b/etc/udev/debian/permissions.rules +@@ -3,12 +3,17 @@ ACTION!="add", GOTO="permissions_end" + # workarounds needed to synchronize with sysfs + # only needed for kernels < v2.6.18-rc1 + ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +-SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" ++SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" + # only needed for kernels < 2.6.16 + SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + # only needed for kernels < 2.6.17 + SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" + ++# devices needed to load the drivers providing them ++KERNEL=="tun", OPTIONS+="ignore_remove" ++KERNEL=="ppp", OPTIONS+="ignore_remove" ++KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove" ++ + # default permissions for block devices + SUBSYSTEM=="block", GROUP="disk" + # the aacraid driver is broken and reports that disks removable (see #404927) +@@ -30,6 +35,7 @@ SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" + SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" + SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" + SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" ++SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" + SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" + SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" + SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape" +@@ -39,10 +45,11 @@ KERNEL=="legousbtower*", MODE="0666" + KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" + + # usbfs-like devices +-SUBSYSTEM=="usb_device", MODE="0664" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ ++ MODE="0664" + + # iRiver music players +-SUBSYSTEM=="usb_device", GROUP="plugdev", \ ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ + ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" + + # serial devices +@@ -85,7 +92,7 @@ KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" + KERNEL=="fuse", GROUP="fuse" + KERNEL=="kqemu", MODE="0666" + KERNEL=="kvm", GROUP="kvm" +-KERNEL=="tun", MODE="0666" ++KERNEL=="tun", MODE="0666", + + KERNEL=="cdemu[0-9]*", GROUP="cdrom" + KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +@@ -93,6 +100,7 @@ KERNEL=="pktcdvd", MODE="0644" + + KERNEL=="uverbs*", GROUP="rdma" + KERNEL=="ucm*", GROUP="rdma" ++KERNEL=="rdma_ucm", GROUP="rdma" + + # printers and parallel devices + SUBSYSTEM=="printer", GROUP="lp" +diff --git a/etc/udev/debian/persistent-input.rules b/etc/udev/debian/persistent-input.rules +index a9005e0..47c4ae9 100644 +--- a/etc/udev/debian/persistent-input.rules ++++ b/etc/udev/debian/persistent-input.rules +@@ -4,7 +4,7 @@ ACTION!="add", GOTO="persistent_input_end" + KERNEL=="input[0-9]*", GOTO="persistent_input_end" + + # usb devices +-SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x" ++SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export" + SUBSYSTEMS=="usb", \ + ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", \ + ENV{ID_CLASS}="kbd" +@@ -25,14 +25,14 @@ ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", \ + ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" + + # by-id links, generic and for the event devices +-KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ ++KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ + SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" + KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ + SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" + + # by-path links + IMPORT{program}="path_id %p" +-KERNEL=="mouse*", ENV{ID_PATH}=="?*", \ ++KERNEL=="mouse*|js*", ENV{ID_PATH}=="?*", \ + SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" + KERNEL=="event*", ENV{ID_PATH}=="?*", \ + SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}" +diff --git a/etc/udev/debian/persistent-net-generator.rules b/etc/udev/debian/persistent-net-generator.rules +new file mode 100644 +index 0000000..6df00bf +--- /dev/null ++++ b/etc/udev/debian/persistent-net-generator.rules +@@ -0,0 +1,48 @@ ++# These rules generate rules to keep network interface names unchanged ++# across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules. ++# ++# The default name for this file is z45_persistent-net-generator.rules. ++ ++ACTION!="add", GOTO="persistent_net_generator_end" ++SUBSYSTEM!="net", GOTO="persistent_net_generator_end" ++ ++# ignore the interface if a name has already been set ++NAME=="?*", GOTO="persistent_net_generator_end" ++ ++# ignore Xen virtual interfaces ++SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" ++ ++# ignore UML virtual interfaces ++DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end" ++ ++# ignore VMWare virtual interfaces ++ATTR{address}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" ++ ++# ignore interfaces with random MAC addresses ++ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" ++ ++# ignore "secondary" raw interfaces of the madwifi driver ++KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" ++ ++# provide nice comments for the generated rules ++SUBSYSTEMS=="pci", \ ++ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" ++SUBSYSTEMS=="usb", \ ++ ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}" ++SUBSYSTEMS=="ccwgroup", \ ++ ENV{COMMENT}="S/390 device at $id", ++SUBSYSTEMS=="ieee1394", \ ++ ENV{COMMENT}="Firewire device $attr{host_id}" ++ENV{COMMENT}=="", \ ++ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" ++ATTRS{driver}=="?*", \ ++ ENV{COMMENT}="$env{COMMENT} ($attr{driver})" ++ ++# ignore interfaces without a driver link like bridges and VLANs ++KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", DRIVERS=="?*",\ ++ IMPORT{program}="write_net_rules $attr{address}" ++ ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ ++LABEL="persistent_net_generator_end" ++ +diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules +index c82a639..de2fa2a 100644 +--- a/etc/udev/debian/persistent.rules ++++ b/etc/udev/debian/persistent.rules +@@ -1,17 +1,20 @@ + # This file contains the rules needed to create persistent device names. + + # we are only interested in add actions for block devices +-SUBSYSTEM!="block", GOTO="no_volume_id" +-ACTION!="add", GOTO="no_volume_id" ++ACTION!="add", GOTO="persistent_storage_end" ++SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # and we can safely ignore these kinds of devices +-KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id" ++KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" + + # skip removable ide devices, because open(2) on them causes an events loop + KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \ +- GOTO="no_volume_id" ++ GOTO="persistent_storage_end" + KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \ +- GOTO="no_volume_id" ++ GOTO="persistent_storage_end" ++ ++# ignore partitions that span the entire disk ++ATTR{whole_disk}=="*", GOTO="persistent_storage_end" + + # skip xen virtual hard disks + DRIVERS=="vbd", GOTO="no_hardware_id" +@@ -28,6 +31,8 @@ KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ + IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" + KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ + IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode" ++KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", ++ IMPORT{program}="scsi_id -g -x -n -s $devpath -d $tempnode" + KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ + IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" + KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ +@@ -51,10 +56,10 @@ 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*", ENV{ID_SERIAL_SHORT}=="?*", \ ++KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_VENDOR}=="ATA", \ + SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}" +-KERNEL=="sd*[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ ++KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_VENDOR}=="ATA", \ + SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n" + +@@ -81,22 +86,22 @@ KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \ + KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + +-KERNEL=="*[!0-9]|sr*", ENV{ID_PATH}=="?*", \ ++KERNEL=="*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_PATH}=="?*", \ + SYMLINK+="disk/by-path/$env{ID_PATH}" ++KERNEL=="*[0-9]|cciss*p[0-9]", 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="no_volume_id" +-KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \ +- SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" ++KERNEL=="sr*|st*", GOTO="persistent_storage_end" + + # UUID and volume label +-KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="no_volume_id" ++KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" + IMPORT{program}="vol_id --export $tempnode" +-ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ +- SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" +-ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ +- SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" ++ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ ++ SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ++ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ ++ SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + + # end of processing +-LABEL="no_volume_id" ++LABEL="persistent_storage_end" + +diff --git a/etc/udev/debian/udev.rules b/etc/udev/debian/udev.rules +index 3f7b704..af16c17 100644 +--- a/etc/udev/debian/udev.rules ++++ b/etc/udev/debian/udev.rules +@@ -35,6 +35,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ + # usbfs-like devices + SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ + NAME="%c" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" + + # serial devices + KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" +@@ -62,6 +63,7 @@ KERNEL=="umad*", NAME="infiniband/%k" + KERNEL=="issm*", NAME="infiniband/%k" + KERNEL=="uverbs*", NAME="infiniband/%k" + KERNEL=="ucm*", NAME="infiniband/%k" ++KERNEL=="rdma_ucm", NAME="infiniband/%k" + + # ALSA devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +diff --git a/etc/udev/packages/40-alsa.rules b/etc/udev/packages/40-alsa.rules +new file mode 100644 +index 0000000..d30a1da +--- /dev/null ++++ b/etc/udev/packages/40-alsa.rules +@@ -0,0 +1,11 @@ ++# do not edit this file, it will be overwritten on update ++ ++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" ++KERNEL=="mixer0", SYMLINK+="mixer" ++KERNEL=="dsp0", SYMLINK+="dsp" ++KERNEL=="audio0", SYMLINK+="audio" +diff --git a/etc/udev/packages/40-pilot-links.rules b/etc/udev/packages/40-pilot-links.rules +new file mode 100644 +index 0000000..1242fff +--- /dev/null ++++ b/etc/udev/packages/40-pilot-links.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*|[Pp]alm*Handheld*", SYMLINK+="pilot" ++ +diff --git a/etc/udev/packages/40-ppc.rules b/etc/udev/packages/40-ppc.rules +new file mode 100644 +index 0000000..8b62d79 +--- /dev/null ++++ b/etc/udev/packages/40-ppc.rules +@@ -0,0 +1,6 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" ++KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" ++KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" ++KERNEL=="iseries/vtty*", GROUP="uucp" +diff --git a/etc/udev/packages/40-s390.rules b/etc/udev/packages/40-s390.rules +new file mode 100644 +index 0000000..43035db +--- /dev/null ++++ b/etc/udev/packages/40-s390.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="z90crypt", MODE="0666" ++ +diff --git a/etc/udev/packages/40-zaptel.rules b/etc/udev/packages/40-zaptel.rules +new file mode 100644 +index 0000000..4313a91 +--- /dev/null ++++ b/etc/udev/packages/40-zaptel.rules +@@ -0,0 +1,8 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="zap[0-9]*", NAME="zap/%n" ++KERNEL=="zapchannel", NAME="zap/channel" ++KERNEL=="zapctl", NAME="zap/ctl" ++KERNEL=="zappseudo", NAME="zap/pseudo" ++KERNEL=="zaptimer", NAME="zap/timer" ++ +diff --git a/etc/udev/packages/64-device-mapper.rules b/etc/udev/packages/64-device-mapper.rules +new file mode 100644 +index 0000000..8154ef3 +--- /dev/null ++++ b/etc/udev/packages/64-device-mapper.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="device-mapper", NAME="mapper/control" ++ +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +new file mode 100644 +index 0000000..35ac99e +--- /dev/null ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -0,0 +1,104 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" ++KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" ++KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", OPTIONS="last_rule" ++KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", OPTIONS="last_rule" ++KERNEL=="console", MODE="0600", OPTIONS="last_rule" ++KERNEL=="tty0", SYMLINK+="systty" ++ ++# serial ++KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" ++KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" ++KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp" ++KERNEL=="hvc*|hvsi*", GROUP="uucp" ++KERNEL=="lirc0", SYMLINK+="lirc" ++ ++# mem ++KERNEL=="null|zero|random", 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=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k" ++ ++# video4linux ++KERNEL=="vbi0", SYMLINK+="vbi" ++KERNEL=="radio0", SYMLINK+="radio" ++KERNEL=="video0", SYMLINK+="video" ++ ++# graphics ++KERNEL=="agpgart", MODE="0600" ++KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" ++KERNEL=="fb0", SYMLINK+="fb" ++ ++# DVB video ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" ++ ++# Firewire ++KERNEL=="dv1394*", SYMLINK+="dv1394/%n" ++KERNEL=="video1394*", NAME="video1394/%n" ++ ++# firmware class requests ++SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" ++ ++# libusb device nodes ++SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" ++ ++# printer ++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=="irlpt[0-9]*", GROUP="lp" ++ ++# block, tapes, block-releated ++SUBSYSTEM=="block", GROUP="disk", MODE="0640" ++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" ++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" ++KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" ++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=="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" ++KERNEL=="rawctl", NAME="raw/%k", GROUP="disk" ++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" ++ ++# network ++KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" ++ ++# CPU ++KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" ++KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" ++KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" ++ ++# miscellaneous ++KERNEL=="fuse", MODE="0666" ++KERNEL=="rtc", MODE="0644" ++KERNEL=="auer[0-9]*" NAME="usb/%k" ++KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" ++KERNEL=="mmtimer", MODE="0644" ++KERNEL=="rflash[0-9]*", MODE="0400" ++KERNEL=="rrom[0-9]*", MODE="0400" ++KERNEL=="sbpcd0", SYMLINK+="sbpcd" ++KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" ++KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" ++KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" ++ +diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules +new file mode 100644 +index 0000000..c7ba54f +--- /dev/null ++++ b/etc/udev/rules.d/80-drivers.rules +@@ -0,0 +1,14 @@ ++# do not edit this file, it will be overwritten on update ++ ++ACTION!="add", GOTO="drivers_end" ++ ++DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" ++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=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" ++SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" ++ ++LABEL="drivers_end" ++ +diff --git a/etc/udev/suse/40-suse.rules b/etc/udev/suse/40-suse.rules +new file mode 100644 +index 0000000..863da88 +--- /dev/null ++++ b/etc/udev/suse/40-suse.rules +@@ -0,0 +1,14 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="pmu", GROUP="video" ++KERNEL=="nvidia*|nvidiactl*", GROUP="video" ++KERNEL=="nvidia*|nvidiactl*", GROUP="video" ++KERNEL=="dv1394*|video1394*|raw1394*", GROUP="video" ++KERNEL=="vttuner*", GROUP="video" ++KERNEL=="vtx*|vbi*", GROUP="video" ++KERNEL=="winradio*", GROUP="video" ++SUBSYSTEM=="dvb", GROUP="video" ++SUBSYSTEM=="graphics" GROUP="video" ++SUBSYSTEM=="video4linux", GROUP="video" ++KERNEL=="agpgart", GROUP="video" ++ +diff --git a/etc/udev/suse/50-udev-default.rules b/etc/udev/suse/50-udev-default.rules +deleted file mode 100644 +index 4a3fe2c..0000000 +--- a/etc/udev/suse/50-udev-default.rules ++++ /dev/null +@@ -1,126 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-# console +-KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="tty[0-9]*|vcs*", GROUP="tty", MODE="0620", OPTIONS="last_rule" +-KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="console", MODE="0600", OPTIONS="last_rule" +- +-# serial devices +-KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" +-KERNEL=="hvc*|hvsi*", GROUP="uucp" +-KERNEL=="iseries/vtty*", GROUP="uucp" +-KERNEL=="mwave", NAME="modems/%k", GROUP="uucp" +-KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot" +-KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*", SYMLINK+="pilot" +-KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" +- +-# video/graphics +-SUBSYSTEM=="video4linux", GROUP="video" +-SUBSYSTEM=="graphics" GROUP="video" +-KERNEL=="vtx*|vbi*", GROUP="video" +-KERNEL=="winradio*", GROUP="video" +-KERNEL=="vttuner*", GROUP="video" +-KERNEL=="nvidia*|nvidiactl*", GROUP="video" +-KERNEL=="video0", SYMLINK+="video" +-KERNEL=="radio0", SYMLINK+="radio" +-KERNEL=="vbi0", SYMLINK+="vbi" +-KERNEL=="pmu", GROUP="video" +- +-# dvb +-SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video" +- +-# input devices +-KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" +-KERNEL=="js*", NAME="input/%k", MODE="0644" +-KERNEL=="ts*|uinput", NAME="input/%k", MODE="0600" +-KERNEL=="lirc0", SYMLINK+="lirc" +- +-# printer +-SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" +-SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" +-KERNEL=="irlpt*", GROUP="lp" +- +-# cpu devices +-KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" +-KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" +-KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" +- +-# IEEE1394 devices +-KERNEL=="raw1394*", GROUP="video" +-KERNEL=="dv1394*", SYMLINK+="dv1394/%n", GROUP="video" +-KERNEL=="video1394*", SYMLINK+="video1394/%n", GROUP="video" +- +-KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" +-KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" +-KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" +- +-# network +-KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" +- +-# misc devices +-KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" +-KERNEL=="nvram", GROUP="kmem", MODE="0600" +-KERNEL=="null|zero|random", MODE="0666" +-KERNEL=="full", MODE="0622" +-KERNEL=="urandom", MODE="0644" +-KERNEL=="rtc", MODE="0600" +-KERNEL=="fuse", MODE="0666" +-KERNEL=="sonypi", MODE="0666" +-KERNEL=="agpgart", MODE="0600", GROUP="video" +-KERNEL=="djs*", MODE="0644" +-KERNEL=="sgi_*", MODE="0666" +-KERNEL=="rrom*", MODE="0400" +-KERNEL=="rflash*", MODE="0400" +-KERNEL=="usbscanner*", MODE="0644" +-KERNEL=="3270/ttycons*", MODE="0600" +-KERNEL=="3270/tub*", MODE="0666" +-KERNEL=="3270/tubcons*", MODE="0600" +-KERNEL=="ica", MODE="0666" +-KERNEL=="z90crypt", MODE="0666" +-KERNEL=="mmtimer", MODE="0644" +-KERNEL=="auer[0-9]*" NAME="usb/%k" +- +-# packet writing interface +-KERNEL=="pktcdvd", NAME="pktcdvd/control" +-KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" +- +-# additional floppy devices (no sysfs entries) +-KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k" +- +-# block devices +-SUBSYSTEM=="block", GROUP="disk", MODE="0640" +-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" +- +-# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC +-# sr: 4 TYPE_WORM, 5 TYPE_ROM +-# st/osst: 1 TYPE_TAPE +-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" +-KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" +- +-# misc storage devices (non-block) +-KERNEL=="sg*", GROUP="disk", MODE="0640" +-KERNEL=="st*|nst*", GROUP="disk" +-KERNEL=="qft*|nqft*|zqft*|nzqft*|rawqft*|nrawqft", GROUP="disk" +-KERNEL=="ht*|nht*", GROUP="disk" +-KERNEL=="pf*", GROUP="disk" +-KERNEL=="sch*", GROUP="disk" +-KERNEL=="pt*|npt*", GROUP="disk" +-KERNEL=="pg*", GROUP="disk" +-KERNEL=="evms/block_device*", GROUP="disk" +-KERNEL=="rawctl*", NAME="raw/%k", GROUP="disk" +-SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" +-KERNEL=="osst*|nosst*", NAME="%k", GROUP="disk" +-KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" +-KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" +-KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" +- +-# libusb device access +-SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" +- +-# kernel firmware loader +-SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" +- +diff --git a/etc/udev/suse/80-drivers.rules b/etc/udev/suse/80-drivers.rules +deleted file mode 100644 +index e7ae8dc..0000000 +--- a/etc/udev/suse/80-drivers.rules ++++ /dev/null +@@ -1,15 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-ACTION!="add", GOTO="drivers_end" +- +-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" +- +-SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /sbin/modprobe 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", ATTRS{type}=="1", ATTR{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst" +-SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" +- +-LABEL="drivers_end" +diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules +index c3eb887..e357a6a 100644 +--- a/extras/rule_generator/75-cd-aliases-generator.rules ++++ b/extras/rule_generator/75-cd-aliases-generator.rules +@@ -1,3 +1,6 @@ + # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks + ++# the path of removable devices changes frequently ++ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" ++ + ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" +diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules +index bd951c5..d74b201 100644 +--- a/extras/rule_generator/write_cd_rules ++++ b/extras/rule_generator/write_cd_rules +@@ -16,7 +16,7 @@ RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" + . /lib/udev/rule_generator.functions + + find_next_available() { +- raw_find_next_available "$(find_all_rules 'SYMLINK+=' $1)" ++ raw_find_next_available "$(find_all_rules 'SYMLINK+=' "$1")" + } + + write_rule() { +@@ -53,15 +53,7 @@ fi + if [ "$1" ]; then + METHOD="$1" + else +- case "$ID_BUS" in +- usb|ieee1394) +- METHOD='by-id' +- ;; +- +- *) +- METHOD='by-path' +- ;; +- esac ++ METHOD='by-path' + fi + + case "$METHOD" in From 6b943c46bbdb147180d03cbae1e8c97809f4bc1f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Aug 2007 14:38:10 +0000 Subject: [PATCH 342/640] preview of rules unification --- udev-114+git-fcfeda.patch | 748 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 748 insertions(+) create mode 100644 udev-114+git-fcfeda.patch diff --git a/udev-114+git-fcfeda.patch b/udev-114+git-fcfeda.patch new file mode 100644 index 0000000..e3da05a --- /dev/null +++ b/udev-114+git-fcfeda.patch @@ -0,0 +1,748 @@ +diff --git a/etc/udev/debian/cd-aliases-generator.rules b/etc/udev/debian/cd-aliases-generator.rules +new file mode 100644 +index 0000000..f655488 +--- /dev/null ++++ b/etc/udev/debian/cd-aliases-generator.rules +@@ -0,0 +1,13 @@ ++# These rules generate rules for the /dev/{cdrom,dvd,...} symlinks and ++# write them to /etc/udev/rules.d/z20_persistent-cd.rules. ++# ++# The default name for this file is z75_cd-aliases-generator.rules. ++ ++ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ ++ SUBSYSTEMS!="usb|ieee1394", \ ++ PROGRAM="write_cd_rules", SYMLINK+="%c" ++ ++ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ ++ SUBSYSTEMS=="usb|ieee1394", \ ++ PROGRAM="write_cd_rules by-id", SYMLINK+="%c" ++ +diff --git a/etc/udev/debian/devfs.rules b/etc/udev/debian/devfs.rules +index 2e0caa1..56ed1a8 100644 +--- a/etc/udev/debian/devfs.rules ++++ b/etc/udev/debian/devfs.rules +@@ -50,6 +50,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ + # usbfs-like devices + SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ + NAME="%c" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" + + # serial devices + KERNEL=="ttyS[0-9]*", NAME="tts/%n" +@@ -104,6 +105,7 @@ KERNEL=="umad*", NAME="infiniband/%k" + KERNEL=="issm*", NAME="infiniband/%k" + KERNEL=="uverbs*", NAME="infiniband/%k" + KERNEL=="ucm*", NAME="infiniband/%k" ++KERNEL=="rdma_ucm", NAME="infiniband/%k" + + # sound devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/hotplug.rules +index 0b2fc57..662e997 100644 +--- a/etc/udev/debian/hotplug.rules ++++ b/etc/udev/debian/hotplug.rules +@@ -7,16 +7,20 @@ ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded" + SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded" + + # load the drivers +-ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" ++ENV{MODALIAS}=="?*", \ ++ RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" + SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent" + +-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" ++SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \ ++ RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" + + SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia" + + # rules for subsystems which lack proper hotplug support + SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" + SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" ++SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe tifm_sd" ++SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe tifm_ms" + + SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" + SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \ +diff --git a/etc/udev/debian/hotplugd.rules b/etc/udev/debian/hotplugd.rules +deleted file mode 100644 +index cd30fa4..0000000 +--- a/etc/udev/debian/hotplugd.rules ++++ /dev/null +@@ -1,8 +0,0 @@ +-# do not call hotplug.d and dev.d for "drivers" and "module" events +-SUBSYSTEM=="drivers", OPTIONS="last_rule" +-SUBSYSTEM=="module", OPTIONS="last_rule" +- +-# compatibility support for the obsolete hotplug.d and dev.d directories +-RUN+="udev_run_hotplugd $env{SUBSYSTEM}" +-RUN+="udev_run_devd $env{SUBSYSTEM}" +- +diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/permissions.rules +index ac6c0be..205b733 100644 +--- a/etc/udev/debian/permissions.rules ++++ b/etc/udev/debian/permissions.rules +@@ -3,12 +3,17 @@ ACTION!="add", GOTO="permissions_end" + # workarounds needed to synchronize with sysfs + # only needed for kernels < v2.6.18-rc1 + ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +-SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" ++SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" + # only needed for kernels < 2.6.16 + SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + # only needed for kernels < 2.6.17 + SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" + ++# devices needed to load the drivers providing them ++KERNEL=="tun", OPTIONS+="ignore_remove" ++KERNEL=="ppp", OPTIONS+="ignore_remove" ++KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove" ++ + # default permissions for block devices + SUBSYSTEM=="block", GROUP="disk" + # the aacraid driver is broken and reports that disks removable (see #404927) +@@ -30,6 +35,7 @@ SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" + SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" + SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" + SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" ++SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" + SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" + SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" + SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape" +@@ -39,10 +45,11 @@ KERNEL=="legousbtower*", MODE="0666" + KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" + + # usbfs-like devices +-SUBSYSTEM=="usb_device", MODE="0664" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ ++ MODE="0664" + + # iRiver music players +-SUBSYSTEM=="usb_device", GROUP="plugdev", \ ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ + ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" + + # serial devices +@@ -85,7 +92,7 @@ KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" + KERNEL=="fuse", GROUP="fuse" + KERNEL=="kqemu", MODE="0666" + KERNEL=="kvm", GROUP="kvm" +-KERNEL=="tun", MODE="0666" ++KERNEL=="tun", MODE="0666", + + KERNEL=="cdemu[0-9]*", GROUP="cdrom" + KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +@@ -93,6 +100,7 @@ KERNEL=="pktcdvd", MODE="0644" + + KERNEL=="uverbs*", GROUP="rdma" + KERNEL=="ucm*", GROUP="rdma" ++KERNEL=="rdma_ucm", GROUP="rdma" + + # printers and parallel devices + SUBSYSTEM=="printer", GROUP="lp" +diff --git a/etc/udev/debian/persistent-input.rules b/etc/udev/debian/persistent-input.rules +index a9005e0..47c4ae9 100644 +--- a/etc/udev/debian/persistent-input.rules ++++ b/etc/udev/debian/persistent-input.rules +@@ -4,7 +4,7 @@ ACTION!="add", GOTO="persistent_input_end" + KERNEL=="input[0-9]*", GOTO="persistent_input_end" + + # usb devices +-SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x" ++SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export" + SUBSYSTEMS=="usb", \ + ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", \ + ENV{ID_CLASS}="kbd" +@@ -25,14 +25,14 @@ ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", \ + ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" + + # by-id links, generic and for the event devices +-KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ ++KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ + SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" + KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ + SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" + + # by-path links + IMPORT{program}="path_id %p" +-KERNEL=="mouse*", ENV{ID_PATH}=="?*", \ ++KERNEL=="mouse*|js*", ENV{ID_PATH}=="?*", \ + SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" + KERNEL=="event*", ENV{ID_PATH}=="?*", \ + SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}" +diff --git a/etc/udev/debian/persistent-net-generator.rules b/etc/udev/debian/persistent-net-generator.rules +new file mode 100644 +index 0000000..6df00bf +--- /dev/null ++++ b/etc/udev/debian/persistent-net-generator.rules +@@ -0,0 +1,48 @@ ++# These rules generate rules to keep network interface names unchanged ++# across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules. ++# ++# The default name for this file is z45_persistent-net-generator.rules. ++ ++ACTION!="add", GOTO="persistent_net_generator_end" ++SUBSYSTEM!="net", GOTO="persistent_net_generator_end" ++ ++# ignore the interface if a name has already been set ++NAME=="?*", GOTO="persistent_net_generator_end" ++ ++# ignore Xen virtual interfaces ++SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" ++ ++# ignore UML virtual interfaces ++DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end" ++ ++# ignore VMWare virtual interfaces ++ATTR{address}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" ++ ++# ignore interfaces with random MAC addresses ++ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" ++ ++# ignore "secondary" raw interfaces of the madwifi driver ++KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" ++ ++# provide nice comments for the generated rules ++SUBSYSTEMS=="pci", \ ++ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" ++SUBSYSTEMS=="usb", \ ++ ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}" ++SUBSYSTEMS=="ccwgroup", \ ++ ENV{COMMENT}="S/390 device at $id", ++SUBSYSTEMS=="ieee1394", \ ++ ENV{COMMENT}="Firewire device $attr{host_id}" ++ENV{COMMENT}=="", \ ++ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" ++ATTRS{driver}=="?*", \ ++ ENV{COMMENT}="$env{COMMENT} ($attr{driver})" ++ ++# ignore interfaces without a driver link like bridges and VLANs ++KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", DRIVERS=="?*",\ ++ IMPORT{program}="write_net_rules $attr{address}" ++ ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ ++LABEL="persistent_net_generator_end" ++ +diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules +index c82a639..de2fa2a 100644 +--- a/etc/udev/debian/persistent.rules ++++ b/etc/udev/debian/persistent.rules +@@ -1,17 +1,20 @@ + # This file contains the rules needed to create persistent device names. + + # we are only interested in add actions for block devices +-SUBSYSTEM!="block", GOTO="no_volume_id" +-ACTION!="add", GOTO="no_volume_id" ++ACTION!="add", GOTO="persistent_storage_end" ++SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # and we can safely ignore these kinds of devices +-KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id" ++KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" + + # skip removable ide devices, because open(2) on them causes an events loop + KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \ +- GOTO="no_volume_id" ++ GOTO="persistent_storage_end" + KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \ +- GOTO="no_volume_id" ++ GOTO="persistent_storage_end" ++ ++# ignore partitions that span the entire disk ++ATTR{whole_disk}=="*", GOTO="persistent_storage_end" + + # skip xen virtual hard disks + DRIVERS=="vbd", GOTO="no_hardware_id" +@@ -28,6 +31,8 @@ KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ + IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" + KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ + IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode" ++KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", ++ IMPORT{program}="scsi_id -g -x -n -s $devpath -d $tempnode" + KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ + IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" + KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ +@@ -51,10 +56,10 @@ 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*", ENV{ID_SERIAL_SHORT}=="?*", \ ++KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_VENDOR}=="ATA", \ + SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}" +-KERNEL=="sd*[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ ++KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_VENDOR}=="ATA", \ + SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n" + +@@ -81,22 +86,22 @@ KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \ + KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + +-KERNEL=="*[!0-9]|sr*", ENV{ID_PATH}=="?*", \ ++KERNEL=="*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_PATH}=="?*", \ + SYMLINK+="disk/by-path/$env{ID_PATH}" ++KERNEL=="*[0-9]|cciss*p[0-9]", 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="no_volume_id" +-KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \ +- SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" ++KERNEL=="sr*|st*", GOTO="persistent_storage_end" + + # UUID and volume label +-KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="no_volume_id" ++KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" + IMPORT{program}="vol_id --export $tempnode" +-ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ +- SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" +-ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ +- SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" ++ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ ++ SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ++ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ ++ SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + + # end of processing +-LABEL="no_volume_id" ++LABEL="persistent_storage_end" + +diff --git a/etc/udev/debian/udev.rules b/etc/udev/debian/udev.rules +index 3f7b704..af16c17 100644 +--- a/etc/udev/debian/udev.rules ++++ b/etc/udev/debian/udev.rules +@@ -35,6 +35,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ + # usbfs-like devices + SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ + NAME="%c" ++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" + + # serial devices + KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" +@@ -62,6 +63,7 @@ KERNEL=="umad*", NAME="infiniband/%k" + KERNEL=="issm*", NAME="infiniband/%k" + KERNEL=="uverbs*", NAME="infiniband/%k" + KERNEL=="ucm*", NAME="infiniband/%k" ++KERNEL=="rdma_ucm", NAME="infiniband/%k" + + # ALSA devices + KERNEL=="controlC[0-9]*", NAME="snd/%k" +diff --git a/etc/udev/packages/40-alsa.rules b/etc/udev/packages/40-alsa.rules +new file mode 100644 +index 0000000..d30a1da +--- /dev/null ++++ b/etc/udev/packages/40-alsa.rules +@@ -0,0 +1,11 @@ ++# do not edit this file, it will be overwritten on update ++ ++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" ++KERNEL=="mixer0", SYMLINK+="mixer" ++KERNEL=="dsp0", SYMLINK+="dsp" ++KERNEL=="audio0", SYMLINK+="audio" +diff --git a/etc/udev/packages/40-pilot-links.rules b/etc/udev/packages/40-pilot-links.rules +new file mode 100644 +index 0000000..1242fff +--- /dev/null ++++ b/etc/udev/packages/40-pilot-links.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*|[Pp]alm*Handheld*", SYMLINK+="pilot" ++ +diff --git a/etc/udev/packages/40-ppc.rules b/etc/udev/packages/40-ppc.rules +new file mode 100644 +index 0000000..8b62d79 +--- /dev/null ++++ b/etc/udev/packages/40-ppc.rules +@@ -0,0 +1,6 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" ++KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" ++KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" ++KERNEL=="iseries/vtty*", GROUP="uucp" +diff --git a/etc/udev/packages/40-s390.rules b/etc/udev/packages/40-s390.rules +new file mode 100644 +index 0000000..43035db +--- /dev/null ++++ b/etc/udev/packages/40-s390.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="z90crypt", MODE="0666" ++ +diff --git a/etc/udev/packages/40-zaptel.rules b/etc/udev/packages/40-zaptel.rules +new file mode 100644 +index 0000000..4313a91 +--- /dev/null ++++ b/etc/udev/packages/40-zaptel.rules +@@ -0,0 +1,8 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="zap[0-9]*", NAME="zap/%n" ++KERNEL=="zapchannel", NAME="zap/channel" ++KERNEL=="zapctl", NAME="zap/ctl" ++KERNEL=="zappseudo", NAME="zap/pseudo" ++KERNEL=="zaptimer", NAME="zap/timer" ++ +diff --git a/etc/udev/packages/64-device-mapper.rules b/etc/udev/packages/64-device-mapper.rules +new file mode 100644 +index 0000000..8154ef3 +--- /dev/null ++++ b/etc/udev/packages/64-device-mapper.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="device-mapper", NAME="mapper/control" ++ +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +new file mode 100644 +index 0000000..35ac99e +--- /dev/null ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -0,0 +1,104 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" ++KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" ++KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" ++KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", OPTIONS="last_rule" ++KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", OPTIONS="last_rule" ++KERNEL=="console", MODE="0600", OPTIONS="last_rule" ++KERNEL=="tty0", SYMLINK+="systty" ++ ++# serial ++KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" ++KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" ++KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp" ++KERNEL=="hvc*|hvsi*", GROUP="uucp" ++KERNEL=="lirc0", SYMLINK+="lirc" ++ ++# mem ++KERNEL=="null|zero|random", 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=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k" ++ ++# video4linux ++KERNEL=="vbi0", SYMLINK+="vbi" ++KERNEL=="radio0", SYMLINK+="radio" ++KERNEL=="video0", SYMLINK+="video" ++ ++# graphics ++KERNEL=="agpgart", MODE="0600" ++KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" ++KERNEL=="fb0", SYMLINK+="fb" ++ ++# DVB video ++SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" ++ ++# Firewire ++KERNEL=="dv1394*", SYMLINK+="dv1394/%n" ++KERNEL=="video1394*", NAME="video1394/%n" ++ ++# firmware class requests ++SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" ++ ++# libusb device nodes ++SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" ++ ++# printer ++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=="irlpt[0-9]*", GROUP="lp" ++ ++# block, tapes, block-releated ++SUBSYSTEM=="block", GROUP="disk", MODE="0640" ++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" ++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" ++KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" ++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=="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" ++KERNEL=="rawctl", NAME="raw/%k", GROUP="disk" ++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" ++ ++# network ++KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" ++ ++# CPU ++KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" ++KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" ++KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" ++ ++# miscellaneous ++KERNEL=="fuse", MODE="0666" ++KERNEL=="rtc", MODE="0644" ++KERNEL=="auer[0-9]*" NAME="usb/%k" ++KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" ++KERNEL=="mmtimer", MODE="0644" ++KERNEL=="rflash[0-9]*", MODE="0400" ++KERNEL=="rrom[0-9]*", MODE="0400" ++KERNEL=="sbpcd0", SYMLINK+="sbpcd" ++KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" ++KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" ++KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" ++ +diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules +new file mode 100644 +index 0000000..c7ba54f +--- /dev/null ++++ b/etc/udev/rules.d/80-drivers.rules +@@ -0,0 +1,14 @@ ++# do not edit this file, it will be overwritten on update ++ ++ACTION!="add", GOTO="drivers_end" ++ ++DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" ++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=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" ++SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" ++ ++LABEL="drivers_end" ++ +diff --git a/etc/udev/suse/40-suse.rules b/etc/udev/suse/40-suse.rules +new file mode 100644 +index 0000000..863da88 +--- /dev/null ++++ b/etc/udev/suse/40-suse.rules +@@ -0,0 +1,14 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="pmu", GROUP="video" ++KERNEL=="nvidia*|nvidiactl*", GROUP="video" ++KERNEL=="nvidia*|nvidiactl*", GROUP="video" ++KERNEL=="dv1394*|video1394*|raw1394*", GROUP="video" ++KERNEL=="vttuner*", GROUP="video" ++KERNEL=="vtx*|vbi*", GROUP="video" ++KERNEL=="winradio*", GROUP="video" ++SUBSYSTEM=="dvb", GROUP="video" ++SUBSYSTEM=="graphics" GROUP="video" ++SUBSYSTEM=="video4linux", GROUP="video" ++KERNEL=="agpgart", GROUP="video" ++ +diff --git a/etc/udev/suse/50-udev-default.rules b/etc/udev/suse/50-udev-default.rules +deleted file mode 100644 +index 4a3fe2c..0000000 +--- a/etc/udev/suse/50-udev-default.rules ++++ /dev/null +@@ -1,126 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-# console +-KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="tty[0-9]*|vcs*", GROUP="tty", MODE="0620", OPTIONS="last_rule" +-KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" +-KERNEL=="console", MODE="0600", OPTIONS="last_rule" +- +-# serial devices +-KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" +-KERNEL=="hvc*|hvsi*", GROUP="uucp" +-KERNEL=="iseries/vtty*", GROUP="uucp" +-KERNEL=="mwave", NAME="modems/%k", GROUP="uucp" +-KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot" +-KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*", SYMLINK+="pilot" +-KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" +- +-# video/graphics +-SUBSYSTEM=="video4linux", GROUP="video" +-SUBSYSTEM=="graphics" GROUP="video" +-KERNEL=="vtx*|vbi*", GROUP="video" +-KERNEL=="winradio*", GROUP="video" +-KERNEL=="vttuner*", GROUP="video" +-KERNEL=="nvidia*|nvidiactl*", GROUP="video" +-KERNEL=="video0", SYMLINK+="video" +-KERNEL=="radio0", SYMLINK+="radio" +-KERNEL=="vbi0", SYMLINK+="vbi" +-KERNEL=="pmu", GROUP="video" +- +-# dvb +-SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video" +- +-# input devices +-KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" +-KERNEL=="js*", NAME="input/%k", MODE="0644" +-KERNEL=="ts*|uinput", NAME="input/%k", MODE="0600" +-KERNEL=="lirc0", SYMLINK+="lirc" +- +-# printer +-SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" +-SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" +-KERNEL=="irlpt*", GROUP="lp" +- +-# cpu devices +-KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" +-KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" +-KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" +- +-# IEEE1394 devices +-KERNEL=="raw1394*", GROUP="video" +-KERNEL=="dv1394*", SYMLINK+="dv1394/%n", GROUP="video" +-KERNEL=="video1394*", SYMLINK+="video1394/%n", GROUP="video" +- +-KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" +-KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" +-KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" +- +-# network +-KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" +- +-# misc devices +-KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" +-KERNEL=="nvram", GROUP="kmem", MODE="0600" +-KERNEL=="null|zero|random", MODE="0666" +-KERNEL=="full", MODE="0622" +-KERNEL=="urandom", MODE="0644" +-KERNEL=="rtc", MODE="0600" +-KERNEL=="fuse", MODE="0666" +-KERNEL=="sonypi", MODE="0666" +-KERNEL=="agpgart", MODE="0600", GROUP="video" +-KERNEL=="djs*", MODE="0644" +-KERNEL=="sgi_*", MODE="0666" +-KERNEL=="rrom*", MODE="0400" +-KERNEL=="rflash*", MODE="0400" +-KERNEL=="usbscanner*", MODE="0644" +-KERNEL=="3270/ttycons*", MODE="0600" +-KERNEL=="3270/tub*", MODE="0666" +-KERNEL=="3270/tubcons*", MODE="0600" +-KERNEL=="ica", MODE="0666" +-KERNEL=="z90crypt", MODE="0666" +-KERNEL=="mmtimer", MODE="0644" +-KERNEL=="auer[0-9]*" NAME="usb/%k" +- +-# packet writing interface +-KERNEL=="pktcdvd", NAME="pktcdvd/control" +-KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" +- +-# additional floppy devices (no sysfs entries) +-KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k" +- +-# block devices +-SUBSYSTEM=="block", GROUP="disk", MODE="0640" +-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" +- +-# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC +-# sr: 4 TYPE_WORM, 5 TYPE_ROM +-# st/osst: 1 TYPE_TAPE +-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" +-KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" +- +-# misc storage devices (non-block) +-KERNEL=="sg*", GROUP="disk", MODE="0640" +-KERNEL=="st*|nst*", GROUP="disk" +-KERNEL=="qft*|nqft*|zqft*|nzqft*|rawqft*|nrawqft", GROUP="disk" +-KERNEL=="ht*|nht*", GROUP="disk" +-KERNEL=="pf*", GROUP="disk" +-KERNEL=="sch*", GROUP="disk" +-KERNEL=="pt*|npt*", GROUP="disk" +-KERNEL=="pg*", GROUP="disk" +-KERNEL=="evms/block_device*", GROUP="disk" +-KERNEL=="rawctl*", NAME="raw/%k", GROUP="disk" +-SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" +-KERNEL=="osst*|nosst*", NAME="%k", GROUP="disk" +-KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" +-KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" +-KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" +- +-# libusb device access +-SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" +- +-# kernel firmware loader +-SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" +- +diff --git a/etc/udev/suse/80-drivers.rules b/etc/udev/suse/80-drivers.rules +deleted file mode 100644 +index e7ae8dc..0000000 +--- a/etc/udev/suse/80-drivers.rules ++++ /dev/null +@@ -1,15 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-ACTION!="add", GOTO="drivers_end" +- +-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" +- +-SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /sbin/modprobe 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", ATTRS{type}=="1", ATTR{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst" +-SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" +- +-LABEL="drivers_end" +diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules +index c3eb887..e357a6a 100644 +--- a/extras/rule_generator/75-cd-aliases-generator.rules ++++ b/extras/rule_generator/75-cd-aliases-generator.rules +@@ -1,3 +1,6 @@ + # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks + ++# the path of removable devices changes frequently ++ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" ++ + ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" +diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules +index bd951c5..d74b201 100644 +--- a/extras/rule_generator/write_cd_rules ++++ b/extras/rule_generator/write_cd_rules +@@ -16,7 +16,7 @@ RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" + . /lib/udev/rule_generator.functions + + find_next_available() { +- raw_find_next_available "$(find_all_rules 'SYMLINK+=' $1)" ++ raw_find_next_available "$(find_all_rules 'SYMLINK+=' "$1")" + } + + write_rule() { +@@ -53,15 +53,7 @@ fi + if [ "$1" ]; then + METHOD="$1" + else +- case "$ID_BUS" in +- usb|ieee1394) +- METHOD='by-id' +- ;; +- +- *) +- METHOD='by-path' +- ;; +- esac ++ METHOD='by-path' + fi + + case "$METHOD" in From 238417da34c354692b91377f81b3d561b372ab89 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Aug 2007 14:43:14 +0000 Subject: [PATCH 343/640] version 114 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6f576bb..0a3c741 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-113.tar.bz2 +udev-114.tar.bz2 diff --git a/sources b/sources index 72dcc28..6e4edcd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb9a227206b9d85ae8cfc88fc51c1710 udev-113.tar.bz2 +c597b3544e650560479edd13b5a5dc8a udev-114.tar.bz2 From dd250c2ac78e551a978ce777e949f7e3e3d9da62 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 10 Aug 2007 14:43:14 +0000 Subject: [PATCH 344/640] version 114 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6f576bb..0a3c741 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-113.tar.bz2 +udev-114.tar.bz2 diff --git a/sources b/sources index 72dcc28..6e4edcd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb9a227206b9d85ae8cfc88fc51c1710 udev-113.tar.bz2 +c597b3544e650560479edd13b5a5dc8a udev-114.tar.bz2 From 16c9d87686061964a7236327478470dc8efd3338 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 13 Aug 2007 08:39:12 +0000 Subject: [PATCH 345/640] - fixed isapnp rule (bug #251815) - fix for nikon cameras (bug #251401) --- udev-114+git-fcfeda.patch | 2 +- udev-114-strg.patch | 11 +++++++++++ udev.spec | 12 +++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 udev-114-strg.patch diff --git a/udev-114+git-fcfeda.patch b/udev-114+git-fcfeda.patch index e3da05a..bc3ff17 100644 --- a/udev-114+git-fcfeda.patch +++ b/udev-114+git-fcfeda.patch @@ -524,7 +524,7 @@ index 0000000..c7ba54f + +DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" +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)'" ++ 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=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" diff --git a/udev-114-strg.patch b/udev-114-strg.patch new file mode 100644 index 0000000..d2c5e9a --- /dev/null +++ b/udev-114-strg.patch @@ -0,0 +1,11 @@ +--- udev-114/etc/udev/rules.d/60-persistent-storage.rules.strg 2007-08-05 14:08:47.000000000 +0200 ++++ udev-114/etc/udev/rules.d/60-persistent-storage.rules 2007-08-13 10:33:37.000000000 +0200 +@@ -59,7 +59,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}" + diff --git a/udev.spec b/udev.spec index 87b986d..1149c5c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,7 +19,8 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Patch1: udev-rules.patch -Patch3: udev-114+git-fcfeda.patch +Patch2: udev-114+git-fcfeda.patch +Patch3: udev-114-strg.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch @@ -70,7 +71,8 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .rhrules -%patch3 -p1 -b .git +%patch2 -p1 -b .git +%patch3 -p1 -b .strg %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 @@ -351,6 +353,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 97c8b1ad1f86b01d51332f89bb6b6606618acf0f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 13 Aug 2007 08:39:12 +0000 Subject: [PATCH 346/640] - fixed isapnp rule (bug #251815) - fix for nikon cameras (bug #251401) --- udev-114+git-fcfeda.patch | 2 +- udev-114-strg.patch | 11 +++++++++++ udev.spec | 12 +++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 udev-114-strg.patch diff --git a/udev-114+git-fcfeda.patch b/udev-114+git-fcfeda.patch index e3da05a..bc3ff17 100644 --- a/udev-114+git-fcfeda.patch +++ b/udev-114+git-fcfeda.patch @@ -524,7 +524,7 @@ index 0000000..c7ba54f + +DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" +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)'" ++ 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=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" diff --git a/udev-114-strg.patch b/udev-114-strg.patch new file mode 100644 index 0000000..d2c5e9a --- /dev/null +++ b/udev-114-strg.patch @@ -0,0 +1,11 @@ +--- udev-114/etc/udev/rules.d/60-persistent-storage.rules.strg 2007-08-05 14:08:47.000000000 +0200 ++++ udev-114/etc/udev/rules.d/60-persistent-storage.rules 2007-08-13 10:33:37.000000000 +0200 +@@ -59,7 +59,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}" + diff --git a/udev.spec b/udev.spec index 87b986d..1149c5c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,7 +19,8 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Patch1: udev-rules.patch -Patch3: udev-114+git-fcfeda.patch +Patch2: udev-114+git-fcfeda.patch +Patch3: udev-114-strg.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch @@ -70,7 +71,8 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .rhrules -%patch3 -p1 -b .git +%patch2 -p1 -b .git +%patch3 -p1 -b .strg %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 @@ -351,6 +353,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 d5ad1a068a67f17b85de369187f6d30501d8ac62 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 23 Aug 2007 08:24:09 +0000 Subject: [PATCH 347/640] - changed license tag - changed to latest upstream rule ordering --- udev.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/udev.spec b/udev.spec index 1149c5c..3884231 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 Release: 2%{?dist} -License: GPL +License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 @@ -18,9 +18,7 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: udev-rules.patch -Patch2: udev-114+git-fcfeda.patch -Patch3: udev-114-strg.patch +Patch1: udev-git-HEAD.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch @@ -70,9 +68,7 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .rhrules -%patch2 -p1 -b .git -%patch3 -p1 -b .strg +%patch1 -p1 -b .git %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 @@ -190,12 +186,12 @@ done for i in \ etc/udev/redhat/*.rules \ etc/udev/rules.d/*.rules \ - etc/udev/suse/64-device-mapper.rules \ - etc/udev/suse/64-md-raid.rules \ + etc/udev/packages/40-ia64.rules \ etc/udev/packages/40-alsa.rules \ etc/udev/packages/40-ppc.rules \ etc/udev/packages/40-s390.rules \ etc/udev/packages/40-zaptel.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##*/}" @@ -353,6 +349,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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) From 6710a9140a124c940845f45b71fb593696ce9b03 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 23 Aug 2007 08:24:09 +0000 Subject: [PATCH 348/640] - changed license tag - changed to latest upstream rule ordering --- udev.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/udev.spec b/udev.spec index 1149c5c..3884231 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 Release: 2%{?dist} -License: GPL +License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 @@ -18,9 +18,7 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: udev-rules.patch -Patch2: udev-114+git-fcfeda.patch -Patch3: udev-114-strg.patch +Patch1: udev-git-HEAD.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch @@ -70,9 +68,7 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .rhrules -%patch2 -p1 -b .git -%patch3 -p1 -b .strg +%patch1 -p1 -b .git %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 @@ -190,12 +186,12 @@ done for i in \ etc/udev/redhat/*.rules \ etc/udev/rules.d/*.rules \ - etc/udev/suse/64-device-mapper.rules \ - etc/udev/suse/64-md-raid.rules \ + etc/udev/packages/40-ia64.rules \ etc/udev/packages/40-alsa.rules \ etc/udev/packages/40-ppc.rules \ etc/udev/packages/40-s390.rules \ etc/udev/packages/40-zaptel.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##*/}" @@ -353,6 +349,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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) From 7f7c2af6bd02520fa6f1bd63f7ae5efd2a3d6daa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 23 Aug 2007 08:24:52 +0000 Subject: [PATCH 349/640] - changed license tag - changed to latest upstream rule ordering --- udev-114-strg.patch | 11 - ...14+git-fcfeda.patch => udev-git-HEAD.patch | 434 +++++++++++++++++- udev-rules.patch | 30 -- udev.spec | 2 +- 4 files changed, 434 insertions(+), 43 deletions(-) delete mode 100644 udev-114-strg.patch rename udev-114+git-fcfeda.patch => udev-git-HEAD.patch (64%) delete mode 100644 udev-rules.patch diff --git a/udev-114-strg.patch b/udev-114-strg.patch deleted file mode 100644 index d2c5e9a..0000000 --- a/udev-114-strg.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- udev-114/etc/udev/rules.d/60-persistent-storage.rules.strg 2007-08-05 14:08:47.000000000 +0200 -+++ udev-114/etc/udev/rules.d/60-persistent-storage.rules 2007-08-13 10:33:37.000000000 +0200 -@@ -59,7 +59,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}" - diff --git a/udev-114+git-fcfeda.patch b/udev-git-HEAD.patch similarity index 64% rename from udev-114+git-fcfeda.patch rename to udev-git-HEAD.patch index bc3ff17..b0ef65e 100644 --- a/udev-114+git-fcfeda.patch +++ b/udev-git-HEAD.patch @@ -346,6 +346,16 @@ index 0000000..d30a1da +KERNEL=="mixer0", SYMLINK+="mixer" +KERNEL=="dsp0", SYMLINK+="dsp" +KERNEL=="audio0", SYMLINK+="audio" +diff --git a/etc/udev/packages/40-ia64.rules b/etc/udev/packages/40-ia64.rules +new file mode 100644 +index 0000000..5846f88 +--- /dev/null ++++ b/etc/udev/packages/40-ia64.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="sgi_*", MODE="0666" ++ diff --git a/etc/udev/packages/40-pilot-links.rules b/etc/udev/packages/40-pilot-links.rules new file mode 100644 index 0000000..1242fff @@ -402,6 +412,391 @@ index 0000000..8154ef3 + +KERNEL=="device-mapper", NAME="mapper/control" + +diff --git a/etc/udev/packages/64-md-raid.rules b/etc/udev/packages/64-md-raid.rules +new file mode 100644 +index 0000000..02f27ee +--- /dev/null ++++ b/etc/udev/packages/64-md-raid.rules +@@ -0,0 +1,18 @@ ++# do not edit this file, it will be overwritten on update ++ ++SUBSYSTEM!="block", GOTO="md_end" ++KERNEL!="md[0-9]*", GOTO="md_end" ++ACTION!="add|change", GOTO="md_end" ++ ++ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" ++ ++IMPORT{program}="/sbin/mdadm --detail --export $tempnode" ++ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" ++ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" ++ ++IMPORT{program}="vol_id --export $tempnode" ++OPTIONS="link_priority=100" ++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}" ++ ++LABEL="md_end" +diff --git a/etc/udev/redhat/40-redhat.rules b/etc/udev/redhat/40-redhat.rules +new file mode 100644 +index 0000000..30da7d3 +--- /dev/null ++++ b/etc/udev/redhat/40-redhat.rules +@@ -0,0 +1,27 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" ++KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" ++ ++KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" ++ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" ++ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ++ ++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" ++ ++BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" ++ ++KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" ++ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ ++ RUN+="/sbin/modprobe sd_mod" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ ++ RUN+="/sbin/modprobe sr_mod" ++ ++KERNEL=="vcs", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" +diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules +deleted file mode 100644 +index 668785f..0000000 +--- a/etc/udev/redhat/50-udev.rules ++++ /dev/null +@@ -1,322 +0,0 @@ +-# 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. +-# +-# default is 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" +-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" +-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" +-KERNEL=="isdn*", NAME="%k", MODE="0660" +-KERNEL=="isdnctrl*", NAME="%k", MODE="0660" +-KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" +-KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" +-KERNEL=="dcbri*", NAME="%k", MODE="0660" +-KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" +- +-# vc devices +-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" +-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" +- +-# misc devices +-KERNEL=="nvram", MODE="0660" +-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=="remove", RUN+="/bin/sh -c 'rm -f /dev/%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" +-KERNEL=="audio*", MODE="0660" +-KERNEL=="midi*", MODE="0660" +-KERNEL=="mixer*", MODE="0660" +-KERNEL=="sequencer*", MODE="0660" +-KERNEL=="sound/*", MODE="0660" +-KERNEL=="snd/*", MODE="0660" +-KERNEL=="beep", MODE="0660" +-KERNEL=="admm*", MODE="0660" +-KERNEL=="adsp*", MODE="0660" +-KERNEL=="aload*", MODE="0660" +-KERNEL=="amidi*", MODE="0660" +-KERNEL=="dmfm*", MODE="0660" +-KERNEL=="dmmidi*", MODE="0660" +-KERNEL=="sndstat", MODE="0660" +- +-# lp devices +-KERNEL=="lp*", GROUP="lp", MODE="0660" +-KERNEL=="parport*", GROUP="lp", MODE="0660" +-KERNEL=="irlpt*", GROUP="lp", MODE="0660" +-KERNEL=="usblp*", GROUP="lp", MODE="0660" +-KERNEL=="usb/lp*", GROUP="lp", MODE="0660" +- +-# tape devices +-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" +-KERNEL=="npt*", GROUP="disk", MODE="0660" +-KERNEL=="st*", GROUP="disk", MODE="0660" +-KERNEL=="nst*", GROUP="disk", MODE="0660" +-KERNEL=="osst*", GROUP="disk", MODE="0660" +-KERNEL=="nosst*", GROUP="disk", MODE="0660" +- +-# diskonkey devices +-KERNEL=="diskonkey*", GROUP="disk", MODE="0640" +- +-# rem_ide devices +-KERNEL=="microdrive*", GROUP="disk", MODE="0640" +- +-# kbd devices +-KERNEL=="kbd", MODE="0644" +- +-# joystick devices +-KERNEL=="js[0-9]*", MODE="0644" +-KERNEL=="djs[0-9]*", MODE="0644" +- +-# v4l devices +-KERNEL=="video*", MODE="0660" +-KERNEL=="radio*", MODE="0660" +-KERNEL=="winradio*", MODE="0660" +-KERNEL=="vtx*", MODE="0660" +-KERNEL=="vbi*", MODE="0660" +-KERNEL=="video/*", MODE="0660" +-KERNEL=="vttuner", MODE="0660" +-KERNEL=="v4l/*", MODE="0660" +- +-# input devices +-KERNEL=="input/*", MODE="0660" +- +-# gpm devices +-KERNEL=="gpmctl", MODE="0700" +- +-# dri devices +-KERNEL=="nvidia*", MODE="0660" +-KERNEL=="3dfx*", MODE="0660" +-KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" +- +-# usb devices +-KERNEL=="usb/dabusb*", MODE="0660" +-KERNEL=="usb/mdc800*", MODE="0660" +-KERNEL=="usb/rio500", MODE="0660" +- +-# s390 devices +-KERNEL=="z90crypt", MODE="0666" +-KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" +- +-# DVB +-KERNEL=="dvb", MODE="0660" +-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" +- +-# alsa devices +-KERNEL=="controlC[0-9]*", NAME="snd/%k" +-KERNEL=="hw[CD0-9]*", NAME="snd/%k" +-KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" +-KERNEL=="midi[CD0-9]*", NAME="snd/%k" +-KERNEL=="timer", NAME="snd/%k" +-KERNEL=="seq", NAME="snd/%k" +- +-# input devices +-KERNEL=="mice", NAME="input/%k" +-KERNEL=="mouse*", NAME="input/%k" +-KERNEL=="event*", NAME="input/%k" +-KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" +-KERNEL=="ts*", NAME="input/%k" +-KERNEL=="uinput", NAME="input/%k" +- +-# IEEE1394 (firewire) devices (must be before raw devices below) +-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" +-BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" +- +-KERNEL=="microcode", NAME="cpu/%k" +-KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" +-KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" +- +-KERNEL=="ram1", SYMLINK+="ram" +-KERNEL=="video0", SYMLINK+="video" +-KERNEL=="radio0", SYMLINK+="radio" +-KERNEL=="audio0", SYMLINK+="audio" +-KERNEL=="dsp0", SYMLINK+="dsp" +-KERNEL=="fb0", SYMLINK+="fb" +-KERNEL=="qft0", SYMLINK+="ftape" +-KERNEL=="isdnctrl0", SYMLINK+="isdnctrl" +-KERNEL=="mixer0", SYMLINK+="mixer" +-KERNEL=="ram0", SYMLINK+="ramdisk" +-KERNEL=="sbpcd0", SYMLINK+="sbpcd" +-KERNEL=="radio0", SYMLINK+="radio" +-KERNEL=="tty0", SYMLINK+="systty" +-KERNEL=="vbi0", SYMLINK+="vbi" +-KERNEL=="null", SYMLINK+="XOR" +- +-KERNEL=="tun", NAME="net/%k", MODE="0666" +- +-KERNEL=="device-mapper", NAME="mapper/control" +- +-# old compat symlinks with enumeration +-KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" +-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" +- +-# Section for zaptel device +-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" +- +-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[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=="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" +- +-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 +-# st/osst: 1 TYPE_TAPE +-# sg: 8 changer, [36] scanner +-ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ +- RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" +-ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ +- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" +- +- +-ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ +- RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ +- RUN+="/sbin/modprobe sr_mod" +- +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ +- SYMLINK+="scanner scanner-%k", MODE="0660" +- +-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+="/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+="/sbin/modprobe mmc_block" +- +- +-RUN+="socket:/org/kernel/udev/monitor" +- diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules new file mode 100644 index 0000000..35ac99e @@ -512,9 +907,22 @@ index 0000000..35ac99e +KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" +KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index a49321c..62cdad6 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -59,7 +59,7 @@ KERNEL=="sr*|st*", GOTO="persistent_storage_end" + 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}" + diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules new file mode 100644 -index 0000000..c7ba54f +index 0000000..e71f135 --- /dev/null +++ b/etc/udev/rules.d/80-drivers.rules @@ -0,0 +1,14 @@ @@ -684,6 +1092,30 @@ index 4a3fe2c..0000000 -# kernel firmware loader -SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" - +diff --git a/etc/udev/suse/64-md-raid.rules b/etc/udev/suse/64-md-raid.rules +deleted file mode 100644 +index 02f27ee..0000000 +--- a/etc/udev/suse/64-md-raid.rules ++++ /dev/null +@@ -1,18 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-SUBSYSTEM!="block", GOTO="md_end" +-KERNEL!="md[0-9]*", GOTO="md_end" +-ACTION!="add|change", GOTO="md_end" +- +-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" +- +-IMPORT{program}="/sbin/mdadm --detail --export $tempnode" +-ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" +-ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" +- +-IMPORT{program}="vol_id --export $tempnode" +-OPTIONS="link_priority=100" +-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}" +- +-LABEL="md_end" diff --git a/etc/udev/suse/80-drivers.rules b/etc/udev/suse/80-drivers.rules deleted file mode 100644 index e7ae8dc..0000000 diff --git a/udev-rules.patch b/udev-rules.patch deleted file mode 100644 index c8ea16e..0000000 --- a/udev-rules.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /dev/null 2007-07-17 14:43:58.691704070 +0200 -+++ udev-114/etc/udev/redhat/40-redhat.rules 2007-08-10 16:27:01.000000000 +0200 -@@ -0,0 +1,27 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" -+KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" -+ -+KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" -+ -+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" -+ -+BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" -+ -+KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" -+ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -+ RUN+="/sbin/modprobe sd_mod" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -+ RUN+="/sbin/modprobe sr_mod" -+ -+KERNEL=="vcs", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" diff --git a/udev.spec b/udev.spec index 3884231..1577f0a 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} From 658661bad29db3221fcdb8a94a0a6f8d353b4cbf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 23 Aug 2007 08:24:52 +0000 Subject: [PATCH 350/640] - changed license tag - changed to latest upstream rule ordering --- udev-114-strg.patch | 11 - ...14+git-fcfeda.patch => udev-git-HEAD.patch | 434 +++++++++++++++++- udev-rules.patch | 30 -- udev.spec | 2 +- 4 files changed, 434 insertions(+), 43 deletions(-) delete mode 100644 udev-114-strg.patch rename udev-114+git-fcfeda.patch => udev-git-HEAD.patch (64%) delete mode 100644 udev-rules.patch diff --git a/udev-114-strg.patch b/udev-114-strg.patch deleted file mode 100644 index d2c5e9a..0000000 --- a/udev-114-strg.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- udev-114/etc/udev/rules.d/60-persistent-storage.rules.strg 2007-08-05 14:08:47.000000000 +0200 -+++ udev-114/etc/udev/rules.d/60-persistent-storage.rules 2007-08-13 10:33:37.000000000 +0200 -@@ -59,7 +59,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}" - diff --git a/udev-114+git-fcfeda.patch b/udev-git-HEAD.patch similarity index 64% rename from udev-114+git-fcfeda.patch rename to udev-git-HEAD.patch index bc3ff17..b0ef65e 100644 --- a/udev-114+git-fcfeda.patch +++ b/udev-git-HEAD.patch @@ -346,6 +346,16 @@ index 0000000..d30a1da +KERNEL=="mixer0", SYMLINK+="mixer" +KERNEL=="dsp0", SYMLINK+="dsp" +KERNEL=="audio0", SYMLINK+="audio" +diff --git a/etc/udev/packages/40-ia64.rules b/etc/udev/packages/40-ia64.rules +new file mode 100644 +index 0000000..5846f88 +--- /dev/null ++++ b/etc/udev/packages/40-ia64.rules +@@ -0,0 +1,4 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="sgi_*", MODE="0666" ++ diff --git a/etc/udev/packages/40-pilot-links.rules b/etc/udev/packages/40-pilot-links.rules new file mode 100644 index 0000000..1242fff @@ -402,6 +412,391 @@ index 0000000..8154ef3 + +KERNEL=="device-mapper", NAME="mapper/control" + +diff --git a/etc/udev/packages/64-md-raid.rules b/etc/udev/packages/64-md-raid.rules +new file mode 100644 +index 0000000..02f27ee +--- /dev/null ++++ b/etc/udev/packages/64-md-raid.rules +@@ -0,0 +1,18 @@ ++# do not edit this file, it will be overwritten on update ++ ++SUBSYSTEM!="block", GOTO="md_end" ++KERNEL!="md[0-9]*", GOTO="md_end" ++ACTION!="add|change", GOTO="md_end" ++ ++ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" ++ ++IMPORT{program}="/sbin/mdadm --detail --export $tempnode" ++ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" ++ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" ++ ++IMPORT{program}="vol_id --export $tempnode" ++OPTIONS="link_priority=100" ++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}" ++ ++LABEL="md_end" +diff --git a/etc/udev/redhat/40-redhat.rules b/etc/udev/redhat/40-redhat.rules +new file mode 100644 +index 0000000..30da7d3 +--- /dev/null ++++ b/etc/udev/redhat/40-redhat.rules +@@ -0,0 +1,27 @@ ++# do not edit this file, it will be overwritten on update ++ ++KERNEL=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" ++KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" ++ ++KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" ++ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" ++ ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ++ ++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" ++ ++BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" ++ ++KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" ++ ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ ++ RUN+="/sbin/modprobe sd_mod" ++ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ ++ RUN+="/sbin/modprobe sr_mod" ++ ++KERNEL=="vcs", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" ++KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" +diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules +deleted file mode 100644 +index 668785f..0000000 +--- a/etc/udev/redhat/50-udev.rules ++++ /dev/null +@@ -1,322 +0,0 @@ +-# 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. +-# +-# default is 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" +-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" +-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" +-KERNEL=="isdn*", NAME="%k", MODE="0660" +-KERNEL=="isdnctrl*", NAME="%k", MODE="0660" +-KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" +-KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" +-KERNEL=="dcbri*", NAME="%k", MODE="0660" +-KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" +-KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" +- +-# vc devices +-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" +-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" +- +-# misc devices +-KERNEL=="nvram", MODE="0660" +-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=="remove", RUN+="/bin/sh -c 'rm -f /dev/%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" +-KERNEL=="audio*", MODE="0660" +-KERNEL=="midi*", MODE="0660" +-KERNEL=="mixer*", MODE="0660" +-KERNEL=="sequencer*", MODE="0660" +-KERNEL=="sound/*", MODE="0660" +-KERNEL=="snd/*", MODE="0660" +-KERNEL=="beep", MODE="0660" +-KERNEL=="admm*", MODE="0660" +-KERNEL=="adsp*", MODE="0660" +-KERNEL=="aload*", MODE="0660" +-KERNEL=="amidi*", MODE="0660" +-KERNEL=="dmfm*", MODE="0660" +-KERNEL=="dmmidi*", MODE="0660" +-KERNEL=="sndstat", MODE="0660" +- +-# lp devices +-KERNEL=="lp*", GROUP="lp", MODE="0660" +-KERNEL=="parport*", GROUP="lp", MODE="0660" +-KERNEL=="irlpt*", GROUP="lp", MODE="0660" +-KERNEL=="usblp*", GROUP="lp", MODE="0660" +-KERNEL=="usb/lp*", GROUP="lp", MODE="0660" +- +-# tape devices +-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" +-KERNEL=="npt*", GROUP="disk", MODE="0660" +-KERNEL=="st*", GROUP="disk", MODE="0660" +-KERNEL=="nst*", GROUP="disk", MODE="0660" +-KERNEL=="osst*", GROUP="disk", MODE="0660" +-KERNEL=="nosst*", GROUP="disk", MODE="0660" +- +-# diskonkey devices +-KERNEL=="diskonkey*", GROUP="disk", MODE="0640" +- +-# rem_ide devices +-KERNEL=="microdrive*", GROUP="disk", MODE="0640" +- +-# kbd devices +-KERNEL=="kbd", MODE="0644" +- +-# joystick devices +-KERNEL=="js[0-9]*", MODE="0644" +-KERNEL=="djs[0-9]*", MODE="0644" +- +-# v4l devices +-KERNEL=="video*", MODE="0660" +-KERNEL=="radio*", MODE="0660" +-KERNEL=="winradio*", MODE="0660" +-KERNEL=="vtx*", MODE="0660" +-KERNEL=="vbi*", MODE="0660" +-KERNEL=="video/*", MODE="0660" +-KERNEL=="vttuner", MODE="0660" +-KERNEL=="v4l/*", MODE="0660" +- +-# input devices +-KERNEL=="input/*", MODE="0660" +- +-# gpm devices +-KERNEL=="gpmctl", MODE="0700" +- +-# dri devices +-KERNEL=="nvidia*", MODE="0660" +-KERNEL=="3dfx*", MODE="0660" +-KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" +- +-# usb devices +-KERNEL=="usb/dabusb*", MODE="0660" +-KERNEL=="usb/mdc800*", MODE="0660" +-KERNEL=="usb/rio500", MODE="0660" +- +-# s390 devices +-KERNEL=="z90crypt", MODE="0666" +-KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" +- +-# DVB +-KERNEL=="dvb", MODE="0660" +-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" +- +-# alsa devices +-KERNEL=="controlC[0-9]*", NAME="snd/%k" +-KERNEL=="hw[CD0-9]*", NAME="snd/%k" +-KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" +-KERNEL=="midi[CD0-9]*", NAME="snd/%k" +-KERNEL=="timer", NAME="snd/%k" +-KERNEL=="seq", NAME="snd/%k" +- +-# input devices +-KERNEL=="mice", NAME="input/%k" +-KERNEL=="mouse*", NAME="input/%k" +-KERNEL=="event*", NAME="input/%k" +-KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" +-KERNEL=="ts*", NAME="input/%k" +-KERNEL=="uinput", NAME="input/%k" +- +-# IEEE1394 (firewire) devices (must be before raw devices below) +-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" +-BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" +- +-KERNEL=="microcode", NAME="cpu/%k" +-KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" +-KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" +- +-KERNEL=="ram1", SYMLINK+="ram" +-KERNEL=="video0", SYMLINK+="video" +-KERNEL=="radio0", SYMLINK+="radio" +-KERNEL=="audio0", SYMLINK+="audio" +-KERNEL=="dsp0", SYMLINK+="dsp" +-KERNEL=="fb0", SYMLINK+="fb" +-KERNEL=="qft0", SYMLINK+="ftape" +-KERNEL=="isdnctrl0", SYMLINK+="isdnctrl" +-KERNEL=="mixer0", SYMLINK+="mixer" +-KERNEL=="ram0", SYMLINK+="ramdisk" +-KERNEL=="sbpcd0", SYMLINK+="sbpcd" +-KERNEL=="radio0", SYMLINK+="radio" +-KERNEL=="tty0", SYMLINK+="systty" +-KERNEL=="vbi0", SYMLINK+="vbi" +-KERNEL=="null", SYMLINK+="XOR" +- +-KERNEL=="tun", NAME="net/%k", MODE="0666" +- +-KERNEL=="device-mapper", NAME="mapper/control" +- +-# old compat symlinks with enumeration +-KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" +-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" +- +-# Section for zaptel device +-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" +- +-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[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=="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" +- +-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 +-# st/osst: 1 TYPE_TAPE +-# sg: 8 changer, [36] scanner +-ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ +- RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" +-ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ +- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" +- +- +-ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ +- RUN+="/sbin/modprobe sd_mod" +-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ +- RUN+="/sbin/modprobe sr_mod" +- +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ +- SYMLINK+="scanner scanner-%k", MODE="0660" +- +-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+="/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+="/sbin/modprobe mmc_block" +- +- +-RUN+="socket:/org/kernel/udev/monitor" +- diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules new file mode 100644 index 0000000..35ac99e @@ -512,9 +907,22 @@ index 0000000..35ac99e +KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" +KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index a49321c..62cdad6 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -59,7 +59,7 @@ KERNEL=="sr*|st*", GOTO="persistent_storage_end" + 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}" + diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules new file mode 100644 -index 0000000..c7ba54f +index 0000000..e71f135 --- /dev/null +++ b/etc/udev/rules.d/80-drivers.rules @@ -0,0 +1,14 @@ @@ -684,6 +1092,30 @@ index 4a3fe2c..0000000 -# kernel firmware loader -SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" - +diff --git a/etc/udev/suse/64-md-raid.rules b/etc/udev/suse/64-md-raid.rules +deleted file mode 100644 +index 02f27ee..0000000 +--- a/etc/udev/suse/64-md-raid.rules ++++ /dev/null +@@ -1,18 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-SUBSYSTEM!="block", GOTO="md_end" +-KERNEL!="md[0-9]*", GOTO="md_end" +-ACTION!="add|change", GOTO="md_end" +- +-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" +- +-IMPORT{program}="/sbin/mdadm --detail --export $tempnode" +-ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" +-ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" +- +-IMPORT{program}="vol_id --export $tempnode" +-OPTIONS="link_priority=100" +-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}" +- +-LABEL="md_end" diff --git a/etc/udev/suse/80-drivers.rules b/etc/udev/suse/80-drivers.rules deleted file mode 100644 index e7ae8dc..0000000 diff --git a/udev-rules.patch b/udev-rules.patch deleted file mode 100644 index c8ea16e..0000000 --- a/udev-rules.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /dev/null 2007-07-17 14:43:58.691704070 +0200 -+++ udev-114/etc/udev/redhat/40-redhat.rules 2007-08-10 16:27:01.000000000 +0200 -@@ -0,0 +1,27 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" -+KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" -+ -+KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" -+ -+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" -+ -+BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" -+ -+KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" -+ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -+ RUN+="/sbin/modprobe sd_mod" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -+ RUN+="/sbin/modprobe sr_mod" -+ -+KERNEL=="vcs", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" diff --git a/udev.spec b/udev.spec index 3884231..1577f0a 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} From 347b9e7b57efab2a16cc8b8a5ddb46034ff522c4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 23 Aug 2007 09:11:21 +0000 Subject: [PATCH 351/640] - added patch to prevent persistent net rules for virtual network interfaces, like vmware and vlans --- udev-114-netgen.patch | 12 ++++++++++++ udev.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 udev-114-netgen.patch diff --git a/udev-114-netgen.patch b/udev-114-netgen.patch new file mode 100644 index 0000000..4cbf165 --- /dev/null +++ b/udev-114-netgen.patch @@ -0,0 +1,12 @@ +diff -up udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen udev-114/extras/rule_generator/75-persistent-net-generator.rules +--- udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen 2007-08-23 11:07:36.000000000 +0200 ++++ udev-114/extras/rule_generator/75-persistent-net-generator.rules 2007-08-23 11:07:51.000000000 +0200 +@@ -27,7 +27,7 @@ DRIVERS!="?*", ENV{NETDEV}=="?*", IMPORT + # skip "locally administered" MAC addresses + ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" + +-DRIVERS!="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" ++DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" + ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" + + LABEL="persistent_net_generator_end" diff --git a/udev.spec b/udev.spec index 1577f0a..5969744 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Patch1: udev-git-HEAD.patch +Patch2: udev-114-netgen.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch @@ -69,6 +70,7 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .git +%patch2 -p1 -b .netgen %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 @@ -349,6 +351,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From c4ef96efd166e1ea5b1c99310d09ce8168e1cedb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 23 Aug 2007 09:11:21 +0000 Subject: [PATCH 352/640] - added patch to prevent persistent net rules for virtual network interfaces, like vmware and vlans --- udev-114-netgen.patch | 12 ++++++++++++ udev.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 udev-114-netgen.patch diff --git a/udev-114-netgen.patch b/udev-114-netgen.patch new file mode 100644 index 0000000..4cbf165 --- /dev/null +++ b/udev-114-netgen.patch @@ -0,0 +1,12 @@ +diff -up udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen udev-114/extras/rule_generator/75-persistent-net-generator.rules +--- udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen 2007-08-23 11:07:36.000000000 +0200 ++++ udev-114/extras/rule_generator/75-persistent-net-generator.rules 2007-08-23 11:07:51.000000000 +0200 +@@ -27,7 +27,7 @@ DRIVERS!="?*", ENV{NETDEV}=="?*", IMPORT + # skip "locally administered" MAC addresses + ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" + +-DRIVERS!="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" ++DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" + ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" + + LABEL="persistent_net_generator_end" diff --git a/udev.spec b/udev.spec index 1577f0a..5969744 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 114 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Patch1: udev-git-HEAD.patch +Patch2: udev-114-netgen.patch Patch7: udev-089-nopie.patch Patch9: udev-091-lib64.patch @@ -69,6 +70,7 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .git +%patch2 -p1 -b .netgen %patch7 -p1 -b .nopie %patch9 -p1 -b .lib64 @@ -349,6 +351,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From 5954cf5860d45f29db76a6eed4041a2e6fcf2e9c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Aug 2007 08:37:19 +0000 Subject: [PATCH 353/640] - version 115 --- udev-114-netgen.patch | 12 - udev-git-HEAD.patch | 1180 ----------------------------------------- udev.spec | 19 +- 3 files changed, 9 insertions(+), 1202 deletions(-) delete mode 100644 udev-114-netgen.patch delete mode 100644 udev-git-HEAD.patch diff --git a/udev-114-netgen.patch b/udev-114-netgen.patch deleted file mode 100644 index 4cbf165..0000000 --- a/udev-114-netgen.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen udev-114/extras/rule_generator/75-persistent-net-generator.rules ---- udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen 2007-08-23 11:07:36.000000000 +0200 -+++ udev-114/extras/rule_generator/75-persistent-net-generator.rules 2007-08-23 11:07:51.000000000 +0200 -@@ -27,7 +27,7 @@ DRIVERS!="?*", ENV{NETDEV}=="?*", IMPORT - # skip "locally administered" MAC addresses - ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" - --DRIVERS!="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" -+DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" - ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" - - LABEL="persistent_net_generator_end" diff --git a/udev-git-HEAD.patch b/udev-git-HEAD.patch deleted file mode 100644 index b0ef65e..0000000 --- a/udev-git-HEAD.patch +++ /dev/null @@ -1,1180 +0,0 @@ -diff --git a/etc/udev/debian/cd-aliases-generator.rules b/etc/udev/debian/cd-aliases-generator.rules -new file mode 100644 -index 0000000..f655488 ---- /dev/null -+++ b/etc/udev/debian/cd-aliases-generator.rules -@@ -0,0 +1,13 @@ -+# These rules generate rules for the /dev/{cdrom,dvd,...} symlinks and -+# write them to /etc/udev/rules.d/z20_persistent-cd.rules. -+# -+# The default name for this file is z75_cd-aliases-generator.rules. -+ -+ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ -+ SUBSYSTEMS!="usb|ieee1394", \ -+ PROGRAM="write_cd_rules", SYMLINK+="%c" -+ -+ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ -+ SUBSYSTEMS=="usb|ieee1394", \ -+ PROGRAM="write_cd_rules by-id", SYMLINK+="%c" -+ -diff --git a/etc/udev/debian/devfs.rules b/etc/udev/debian/devfs.rules -index 2e0caa1..56ed1a8 100644 ---- a/etc/udev/debian/devfs.rules -+++ b/etc/udev/debian/devfs.rules -@@ -50,6 +50,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ - # usbfs-like devices - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ - NAME="%c" -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" - - # serial devices - KERNEL=="ttyS[0-9]*", NAME="tts/%n" -@@ -104,6 +105,7 @@ KERNEL=="umad*", NAME="infiniband/%k" - KERNEL=="issm*", NAME="infiniband/%k" - KERNEL=="uverbs*", NAME="infiniband/%k" - KERNEL=="ucm*", NAME="infiniband/%k" -+KERNEL=="rdma_ucm", NAME="infiniband/%k" - - # sound devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/hotplug.rules -index 0b2fc57..662e997 100644 ---- a/etc/udev/debian/hotplug.rules -+++ b/etc/udev/debian/hotplug.rules -@@ -7,16 +7,20 @@ ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded" - SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded" - - # load the drivers --ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" -+ENV{MODALIAS}=="?*", \ -+ RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" - SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent" - --SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" -+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \ -+ RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" - - SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia" - - # rules for subsystems which lack proper hotplug support - SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" - SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" -+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe tifm_sd" -+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe tifm_ms" - - SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" - SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \ -diff --git a/etc/udev/debian/hotplugd.rules b/etc/udev/debian/hotplugd.rules -deleted file mode 100644 -index cd30fa4..0000000 ---- a/etc/udev/debian/hotplugd.rules -+++ /dev/null -@@ -1,8 +0,0 @@ --# do not call hotplug.d and dev.d for "drivers" and "module" events --SUBSYSTEM=="drivers", OPTIONS="last_rule" --SUBSYSTEM=="module", OPTIONS="last_rule" -- --# compatibility support for the obsolete hotplug.d and dev.d directories --RUN+="udev_run_hotplugd $env{SUBSYSTEM}" --RUN+="udev_run_devd $env{SUBSYSTEM}" -- -diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/permissions.rules -index ac6c0be..205b733 100644 ---- a/etc/udev/debian/permissions.rules -+++ b/etc/udev/debian/permissions.rules -@@ -3,12 +3,17 @@ ACTION!="add", GOTO="permissions_end" - # workarounds needed to synchronize with sysfs - # only needed for kernels < v2.6.18-rc1 - ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" --SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" - # only needed for kernels < 2.6.16 - SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" - # only needed for kernels < 2.6.17 - SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" - -+# devices needed to load the drivers providing them -+KERNEL=="tun", OPTIONS+="ignore_remove" -+KERNEL=="ppp", OPTIONS+="ignore_remove" -+KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove" -+ - # default permissions for block devices - SUBSYSTEM=="block", GROUP="disk" - # the aacraid driver is broken and reports that disks removable (see #404927) -@@ -30,6 +35,7 @@ SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" - SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" - SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" - SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" -+SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" - SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" - SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" - SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape" -@@ -39,10 +45,11 @@ KERNEL=="legousbtower*", MODE="0666" - KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" - - # usbfs-like devices --SUBSYSTEM=="usb_device", MODE="0664" -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ -+ MODE="0664" - - # iRiver music players --SUBSYSTEM=="usb_device", GROUP="plugdev", \ -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ - ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" - - # serial devices -@@ -85,7 +92,7 @@ KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" - KERNEL=="fuse", GROUP="fuse" - KERNEL=="kqemu", MODE="0666" - KERNEL=="kvm", GROUP="kvm" --KERNEL=="tun", MODE="0666" -+KERNEL=="tun", MODE="0666", - - KERNEL=="cdemu[0-9]*", GROUP="cdrom" - KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" -@@ -93,6 +100,7 @@ KERNEL=="pktcdvd", MODE="0644" - - KERNEL=="uverbs*", GROUP="rdma" - KERNEL=="ucm*", GROUP="rdma" -+KERNEL=="rdma_ucm", GROUP="rdma" - - # printers and parallel devices - SUBSYSTEM=="printer", GROUP="lp" -diff --git a/etc/udev/debian/persistent-input.rules b/etc/udev/debian/persistent-input.rules -index a9005e0..47c4ae9 100644 ---- a/etc/udev/debian/persistent-input.rules -+++ b/etc/udev/debian/persistent-input.rules -@@ -4,7 +4,7 @@ ACTION!="add", GOTO="persistent_input_end" - KERNEL=="input[0-9]*", GOTO="persistent_input_end" - - # usb devices --SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x" -+SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export" - SUBSYSTEMS=="usb", \ - ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", \ - ENV{ID_CLASS}="kbd" -@@ -25,14 +25,14 @@ ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", \ - ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" - - # by-id links, generic and for the event devices --KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ -+KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ - SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" - KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ - SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" - - # by-path links - IMPORT{program}="path_id %p" --KERNEL=="mouse*", ENV{ID_PATH}=="?*", \ -+KERNEL=="mouse*|js*", ENV{ID_PATH}=="?*", \ - SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" - KERNEL=="event*", ENV{ID_PATH}=="?*", \ - SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}" -diff --git a/etc/udev/debian/persistent-net-generator.rules b/etc/udev/debian/persistent-net-generator.rules -new file mode 100644 -index 0000000..6df00bf ---- /dev/null -+++ b/etc/udev/debian/persistent-net-generator.rules -@@ -0,0 +1,48 @@ -+# These rules generate rules to keep network interface names unchanged -+# across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules. -+# -+# The default name for this file is z45_persistent-net-generator.rules. -+ -+ACTION!="add", GOTO="persistent_net_generator_end" -+SUBSYSTEM!="net", GOTO="persistent_net_generator_end" -+ -+# ignore the interface if a name has already been set -+NAME=="?*", GOTO="persistent_net_generator_end" -+ -+# ignore Xen virtual interfaces -+SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" -+ -+# ignore UML virtual interfaces -+DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end" -+ -+# ignore VMWare virtual interfaces -+ATTR{address}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" -+ -+# ignore interfaces with random MAC addresses -+ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" -+ -+# ignore "secondary" raw interfaces of the madwifi driver -+KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" -+ -+# provide nice comments for the generated rules -+SUBSYSTEMS=="pci", \ -+ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" -+SUBSYSTEMS=="usb", \ -+ ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}" -+SUBSYSTEMS=="ccwgroup", \ -+ ENV{COMMENT}="S/390 device at $id", -+SUBSYSTEMS=="ieee1394", \ -+ ENV{COMMENT}="Firewire device $attr{host_id}" -+ENV{COMMENT}=="", \ -+ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" -+ATTRS{driver}=="?*", \ -+ ENV{COMMENT}="$env{COMMENT} ($attr{driver})" -+ -+# ignore interfaces without a driver link like bridges and VLANs -+KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", DRIVERS=="?*",\ -+ IMPORT{program}="write_net_rules $attr{address}" -+ -+ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" -+ -+LABEL="persistent_net_generator_end" -+ -diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules -index c82a639..de2fa2a 100644 ---- a/etc/udev/debian/persistent.rules -+++ b/etc/udev/debian/persistent.rules -@@ -1,17 +1,20 @@ - # This file contains the rules needed to create persistent device names. - - # we are only interested in add actions for block devices --SUBSYSTEM!="block", GOTO="no_volume_id" --ACTION!="add", GOTO="no_volume_id" -+ACTION!="add", GOTO="persistent_storage_end" -+SUBSYSTEM!="block", GOTO="persistent_storage_end" - - # and we can safely ignore these kinds of devices --KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id" -+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" - - # skip removable ide devices, because open(2) on them causes an events loop - KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \ -- GOTO="no_volume_id" -+ GOTO="persistent_storage_end" - KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \ -- GOTO="no_volume_id" -+ GOTO="persistent_storage_end" -+ -+# ignore partitions that span the entire disk -+ATTR{whole_disk}=="*", GOTO="persistent_storage_end" - - # skip xen virtual hard disks - DRIVERS=="vbd", GOTO="no_hardware_id" -@@ -28,6 +31,8 @@ KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" - KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode" -+KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", -+ IMPORT{program}="scsi_id -g -x -n -s $devpath -d $tempnode" - KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" - KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ -@@ -51,10 +56,10 @@ 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*", ENV{ID_SERIAL_SHORT}=="?*", \ -+KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_VENDOR}=="ATA", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}" --KERNEL=="sd*[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ -+KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_VENDOR}=="ATA", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n" - -@@ -81,22 +86,22 @@ KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \ - KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - --KERNEL=="*[!0-9]|sr*", ENV{ID_PATH}=="?*", \ -+KERNEL=="*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_PATH}=="?*", \ - SYMLINK+="disk/by-path/$env{ID_PATH}" -+KERNEL=="*[0-9]|cciss*p[0-9]", 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="no_volume_id" --KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \ -- SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" -+KERNEL=="sr*|st*", GOTO="persistent_storage_end" - - # UUID and volume label --KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="no_volume_id" -+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" - IMPORT{program}="vol_id --export $tempnode" --ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ -- SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" --ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ -- SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" -+ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ -+ SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -+ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ -+ SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - - # end of processing --LABEL="no_volume_id" -+LABEL="persistent_storage_end" - -diff --git a/etc/udev/debian/udev.rules b/etc/udev/debian/udev.rules -index 3f7b704..af16c17 100644 ---- a/etc/udev/debian/udev.rules -+++ b/etc/udev/debian/udev.rules -@@ -35,6 +35,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ - # usbfs-like devices - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ - NAME="%c" -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" - - # serial devices - KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" -@@ -62,6 +63,7 @@ KERNEL=="umad*", NAME="infiniband/%k" - KERNEL=="issm*", NAME="infiniband/%k" - KERNEL=="uverbs*", NAME="infiniband/%k" - KERNEL=="ucm*", NAME="infiniband/%k" -+KERNEL=="rdma_ucm", NAME="infiniband/%k" - - # ALSA devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -diff --git a/etc/udev/packages/40-alsa.rules b/etc/udev/packages/40-alsa.rules -new file mode 100644 -index 0000000..d30a1da ---- /dev/null -+++ b/etc/udev/packages/40-alsa.rules -@@ -0,0 +1,11 @@ -+# do not edit this file, it will be overwritten on update -+ -+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" -+KERNEL=="mixer0", SYMLINK+="mixer" -+KERNEL=="dsp0", SYMLINK+="dsp" -+KERNEL=="audio0", SYMLINK+="audio" -diff --git a/etc/udev/packages/40-ia64.rules b/etc/udev/packages/40-ia64.rules -new file mode 100644 -index 0000000..5846f88 ---- /dev/null -+++ b/etc/udev/packages/40-ia64.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="sgi_*", MODE="0666" -+ -diff --git a/etc/udev/packages/40-pilot-links.rules b/etc/udev/packages/40-pilot-links.rules -new file mode 100644 -index 0000000..1242fff ---- /dev/null -+++ b/etc/udev/packages/40-pilot-links.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*|[Pp]alm*Handheld*", SYMLINK+="pilot" -+ -diff --git a/etc/udev/packages/40-ppc.rules b/etc/udev/packages/40-ppc.rules -new file mode 100644 -index 0000000..8b62d79 ---- /dev/null -+++ b/etc/udev/packages/40-ppc.rules -@@ -0,0 +1,6 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" -+KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" -+KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" -+KERNEL=="iseries/vtty*", GROUP="uucp" -diff --git a/etc/udev/packages/40-s390.rules b/etc/udev/packages/40-s390.rules -new file mode 100644 -index 0000000..43035db ---- /dev/null -+++ b/etc/udev/packages/40-s390.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="z90crypt", MODE="0666" -+ -diff --git a/etc/udev/packages/40-zaptel.rules b/etc/udev/packages/40-zaptel.rules -new file mode 100644 -index 0000000..4313a91 ---- /dev/null -+++ b/etc/udev/packages/40-zaptel.rules -@@ -0,0 +1,8 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="zap[0-9]*", NAME="zap/%n" -+KERNEL=="zapchannel", NAME="zap/channel" -+KERNEL=="zapctl", NAME="zap/ctl" -+KERNEL=="zappseudo", NAME="zap/pseudo" -+KERNEL=="zaptimer", NAME="zap/timer" -+ -diff --git a/etc/udev/packages/64-device-mapper.rules b/etc/udev/packages/64-device-mapper.rules -new file mode 100644 -index 0000000..8154ef3 ---- /dev/null -+++ b/etc/udev/packages/64-device-mapper.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="device-mapper", NAME="mapper/control" -+ -diff --git a/etc/udev/packages/64-md-raid.rules b/etc/udev/packages/64-md-raid.rules -new file mode 100644 -index 0000000..02f27ee ---- /dev/null -+++ b/etc/udev/packages/64-md-raid.rules -@@ -0,0 +1,18 @@ -+# do not edit this file, it will be overwritten on update -+ -+SUBSYSTEM!="block", GOTO="md_end" -+KERNEL!="md[0-9]*", GOTO="md_end" -+ACTION!="add|change", GOTO="md_end" -+ -+ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -+ -+IMPORT{program}="/sbin/mdadm --detail --export $tempnode" -+ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" -+ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" -+ -+IMPORT{program}="vol_id --export $tempnode" -+OPTIONS="link_priority=100" -+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}" -+ -+LABEL="md_end" -diff --git a/etc/udev/redhat/40-redhat.rules b/etc/udev/redhat/40-redhat.rules -new file mode 100644 -index 0000000..30da7d3 ---- /dev/null -+++ b/etc/udev/redhat/40-redhat.rules -@@ -0,0 +1,27 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" -+KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" -+ -+KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" -+ -+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" -+ -+BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" -+ -+KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" -+ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -+ RUN+="/sbin/modprobe sd_mod" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -+ RUN+="/sbin/modprobe sr_mod" -+ -+KERNEL=="vcs", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" -diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules -deleted file mode 100644 -index 668785f..0000000 ---- a/etc/udev/redhat/50-udev.rules -+++ /dev/null -@@ -1,322 +0,0 @@ --# 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. --# --# default is 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" --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" --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" --KERNEL=="isdn*", NAME="%k", MODE="0660" --KERNEL=="isdnctrl*", NAME="%k", MODE="0660" --KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" --KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" --KERNEL=="dcbri*", NAME="%k", MODE="0660" --KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" -- --# vc devices --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" --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" -- --# misc devices --KERNEL=="nvram", MODE="0660" --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=="remove", RUN+="/bin/sh -c 'rm -f /dev/%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" --KERNEL=="audio*", MODE="0660" --KERNEL=="midi*", MODE="0660" --KERNEL=="mixer*", MODE="0660" --KERNEL=="sequencer*", MODE="0660" --KERNEL=="sound/*", MODE="0660" --KERNEL=="snd/*", MODE="0660" --KERNEL=="beep", MODE="0660" --KERNEL=="admm*", MODE="0660" --KERNEL=="adsp*", MODE="0660" --KERNEL=="aload*", MODE="0660" --KERNEL=="amidi*", MODE="0660" --KERNEL=="dmfm*", MODE="0660" --KERNEL=="dmmidi*", MODE="0660" --KERNEL=="sndstat", MODE="0660" -- --# lp devices --KERNEL=="lp*", GROUP="lp", MODE="0660" --KERNEL=="parport*", GROUP="lp", MODE="0660" --KERNEL=="irlpt*", GROUP="lp", MODE="0660" --KERNEL=="usblp*", GROUP="lp", MODE="0660" --KERNEL=="usb/lp*", GROUP="lp", MODE="0660" -- --# tape devices --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" --KERNEL=="npt*", GROUP="disk", MODE="0660" --KERNEL=="st*", GROUP="disk", MODE="0660" --KERNEL=="nst*", GROUP="disk", MODE="0660" --KERNEL=="osst*", GROUP="disk", MODE="0660" --KERNEL=="nosst*", GROUP="disk", MODE="0660" -- --# diskonkey devices --KERNEL=="diskonkey*", GROUP="disk", MODE="0640" -- --# rem_ide devices --KERNEL=="microdrive*", GROUP="disk", MODE="0640" -- --# kbd devices --KERNEL=="kbd", MODE="0644" -- --# joystick devices --KERNEL=="js[0-9]*", MODE="0644" --KERNEL=="djs[0-9]*", MODE="0644" -- --# v4l devices --KERNEL=="video*", MODE="0660" --KERNEL=="radio*", MODE="0660" --KERNEL=="winradio*", MODE="0660" --KERNEL=="vtx*", MODE="0660" --KERNEL=="vbi*", MODE="0660" --KERNEL=="video/*", MODE="0660" --KERNEL=="vttuner", MODE="0660" --KERNEL=="v4l/*", MODE="0660" -- --# input devices --KERNEL=="input/*", MODE="0660" -- --# gpm devices --KERNEL=="gpmctl", MODE="0700" -- --# dri devices --KERNEL=="nvidia*", MODE="0660" --KERNEL=="3dfx*", MODE="0660" --KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" -- --# usb devices --KERNEL=="usb/dabusb*", MODE="0660" --KERNEL=="usb/mdc800*", MODE="0660" --KERNEL=="usb/rio500", MODE="0660" -- --# s390 devices --KERNEL=="z90crypt", MODE="0666" --KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" -- --# DVB --KERNEL=="dvb", MODE="0660" --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" -- --# alsa devices --KERNEL=="controlC[0-9]*", NAME="snd/%k" --KERNEL=="hw[CD0-9]*", NAME="snd/%k" --KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" --KERNEL=="midi[CD0-9]*", NAME="snd/%k" --KERNEL=="timer", NAME="snd/%k" --KERNEL=="seq", NAME="snd/%k" -- --# input devices --KERNEL=="mice", NAME="input/%k" --KERNEL=="mouse*", NAME="input/%k" --KERNEL=="event*", NAME="input/%k" --KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" --KERNEL=="ts*", NAME="input/%k" --KERNEL=="uinput", NAME="input/%k" -- --# IEEE1394 (firewire) devices (must be before raw devices below) --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" --BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" -- --KERNEL=="microcode", NAME="cpu/%k" --KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" --KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" -- --KERNEL=="ram1", SYMLINK+="ram" --KERNEL=="video0", SYMLINK+="video" --KERNEL=="radio0", SYMLINK+="radio" --KERNEL=="audio0", SYMLINK+="audio" --KERNEL=="dsp0", SYMLINK+="dsp" --KERNEL=="fb0", SYMLINK+="fb" --KERNEL=="qft0", SYMLINK+="ftape" --KERNEL=="isdnctrl0", SYMLINK+="isdnctrl" --KERNEL=="mixer0", SYMLINK+="mixer" --KERNEL=="ram0", SYMLINK+="ramdisk" --KERNEL=="sbpcd0", SYMLINK+="sbpcd" --KERNEL=="radio0", SYMLINK+="radio" --KERNEL=="tty0", SYMLINK+="systty" --KERNEL=="vbi0", SYMLINK+="vbi" --KERNEL=="null", SYMLINK+="XOR" -- --KERNEL=="tun", NAME="net/%k", MODE="0666" -- --KERNEL=="device-mapper", NAME="mapper/control" -- --# old compat symlinks with enumeration --KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" --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" -- --# Section for zaptel device --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" -- --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[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=="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" -- --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 --# st/osst: 1 TYPE_TAPE --# sg: 8 changer, [36] scanner --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ -- RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ -- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -- -- --ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -- RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -- RUN+="/sbin/modprobe sr_mod" -- --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ -- SYMLINK+="scanner scanner-%k", MODE="0660" -- --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+="/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+="/sbin/modprobe mmc_block" -- -- --RUN+="socket:/org/kernel/udev/monitor" -- -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -new file mode 100644 -index 0000000..35ac99e ---- /dev/null -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -0,0 +1,104 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" -+KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" -+KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", OPTIONS="last_rule" -+KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", OPTIONS="last_rule" -+KERNEL=="console", MODE="0600", OPTIONS="last_rule" -+KERNEL=="tty0", SYMLINK+="systty" -+ -+# serial -+KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" -+KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" -+KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp" -+KERNEL=="hvc*|hvsi*", GROUP="uucp" -+KERNEL=="lirc0", SYMLINK+="lirc" -+ -+# mem -+KERNEL=="null|zero|random", 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=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k" -+ -+# video4linux -+KERNEL=="vbi0", SYMLINK+="vbi" -+KERNEL=="radio0", SYMLINK+="radio" -+KERNEL=="video0", SYMLINK+="video" -+ -+# graphics -+KERNEL=="agpgart", MODE="0600" -+KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" -+KERNEL=="fb0", SYMLINK+="fb" -+ -+# DVB video -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" -+ -+# Firewire -+KERNEL=="dv1394*", SYMLINK+="dv1394/%n" -+KERNEL=="video1394*", NAME="video1394/%n" -+ -+# firmware class requests -+SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" -+ -+# libusb device nodes -+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" -+ -+# printer -+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=="irlpt[0-9]*", GROUP="lp" -+ -+# block, tapes, block-releated -+SUBSYSTEM=="block", GROUP="disk", MODE="0640" -+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" -+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" -+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" -+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=="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" -+KERNEL=="rawctl", NAME="raw/%k", GROUP="disk" -+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" -+ -+# network -+KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" -+ -+# CPU -+KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" -+KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -+KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" -+ -+# miscellaneous -+KERNEL=="fuse", MODE="0666" -+KERNEL=="rtc", MODE="0644" -+KERNEL=="auer[0-9]*" NAME="usb/%k" -+KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" -+KERNEL=="mmtimer", MODE="0644" -+KERNEL=="rflash[0-9]*", MODE="0400" -+KERNEL=="rrom[0-9]*", MODE="0400" -+KERNEL=="sbpcd0", SYMLINK+="sbpcd" -+KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" -+KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" -+KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" -+ -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index a49321c..62cdad6 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -59,7 +59,7 @@ KERNEL=="sr*|st*", GOTO="persistent_storage_end" - 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}" - -diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules -new file mode 100644 -index 0000000..e71f135 ---- /dev/null -+++ b/etc/udev/rules.d/80-drivers.rules -@@ -0,0 +1,14 @@ -+# do not edit this file, it will be overwritten on update -+ -+ACTION!="add", GOTO="drivers_end" -+ -+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" -+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=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" -+SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" -+ -+LABEL="drivers_end" -+ -diff --git a/etc/udev/suse/40-suse.rules b/etc/udev/suse/40-suse.rules -new file mode 100644 -index 0000000..863da88 ---- /dev/null -+++ b/etc/udev/suse/40-suse.rules -@@ -0,0 +1,14 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="pmu", GROUP="video" -+KERNEL=="nvidia*|nvidiactl*", GROUP="video" -+KERNEL=="nvidia*|nvidiactl*", GROUP="video" -+KERNEL=="dv1394*|video1394*|raw1394*", GROUP="video" -+KERNEL=="vttuner*", GROUP="video" -+KERNEL=="vtx*|vbi*", GROUP="video" -+KERNEL=="winradio*", GROUP="video" -+SUBSYSTEM=="dvb", GROUP="video" -+SUBSYSTEM=="graphics" GROUP="video" -+SUBSYSTEM=="video4linux", GROUP="video" -+KERNEL=="agpgart", GROUP="video" -+ -diff --git a/etc/udev/suse/50-udev-default.rules b/etc/udev/suse/50-udev-default.rules -deleted file mode 100644 -index 4a3fe2c..0000000 ---- a/etc/udev/suse/50-udev-default.rules -+++ /dev/null -@@ -1,126 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --# console --KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="tty[0-9]*|vcs*", GROUP="tty", MODE="0620", OPTIONS="last_rule" --KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="console", MODE="0600", OPTIONS="last_rule" -- --# serial devices --KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" --KERNEL=="hvc*|hvsi*", GROUP="uucp" --KERNEL=="iseries/vtty*", GROUP="uucp" --KERNEL=="mwave", NAME="modems/%k", GROUP="uucp" --KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot" --KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*", SYMLINK+="pilot" --KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" -- --# video/graphics --SUBSYSTEM=="video4linux", GROUP="video" --SUBSYSTEM=="graphics" GROUP="video" --KERNEL=="vtx*|vbi*", GROUP="video" --KERNEL=="winradio*", GROUP="video" --KERNEL=="vttuner*", GROUP="video" --KERNEL=="nvidia*|nvidiactl*", GROUP="video" --KERNEL=="video0", SYMLINK+="video" --KERNEL=="radio0", SYMLINK+="radio" --KERNEL=="vbi0", SYMLINK+="vbi" --KERNEL=="pmu", GROUP="video" -- --# dvb --SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video" -- --# input devices --KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" --KERNEL=="js*", NAME="input/%k", MODE="0644" --KERNEL=="ts*|uinput", NAME="input/%k", MODE="0600" --KERNEL=="lirc0", SYMLINK+="lirc" -- --# printer --SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" --SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" --KERNEL=="irlpt*", GROUP="lp" -- --# cpu devices --KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" --KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" --KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" -- --# IEEE1394 devices --KERNEL=="raw1394*", GROUP="video" --KERNEL=="dv1394*", SYMLINK+="dv1394/%n", GROUP="video" --KERNEL=="video1394*", SYMLINK+="video1394/%n", GROUP="video" -- --KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" --KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" --KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" -- --# network --KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" -- --# misc devices --KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" --KERNEL=="nvram", GROUP="kmem", MODE="0600" --KERNEL=="null|zero|random", MODE="0666" --KERNEL=="full", MODE="0622" --KERNEL=="urandom", MODE="0644" --KERNEL=="rtc", MODE="0600" --KERNEL=="fuse", MODE="0666" --KERNEL=="sonypi", MODE="0666" --KERNEL=="agpgart", MODE="0600", GROUP="video" --KERNEL=="djs*", MODE="0644" --KERNEL=="sgi_*", MODE="0666" --KERNEL=="rrom*", MODE="0400" --KERNEL=="rflash*", MODE="0400" --KERNEL=="usbscanner*", MODE="0644" --KERNEL=="3270/ttycons*", MODE="0600" --KERNEL=="3270/tub*", MODE="0666" --KERNEL=="3270/tubcons*", MODE="0600" --KERNEL=="ica", MODE="0666" --KERNEL=="z90crypt", MODE="0666" --KERNEL=="mmtimer", MODE="0644" --KERNEL=="auer[0-9]*" NAME="usb/%k" -- --# packet writing interface --KERNEL=="pktcdvd", NAME="pktcdvd/control" --KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" -- --# additional floppy devices (no sysfs entries) --KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k" -- --# block devices --SUBSYSTEM=="block", GROUP="disk", MODE="0640" --SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" -- --# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC --# sr: 4 TYPE_WORM, 5 TYPE_ROM --# st/osst: 1 TYPE_TAPE --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" --KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" -- --# misc storage devices (non-block) --KERNEL=="sg*", GROUP="disk", MODE="0640" --KERNEL=="st*|nst*", GROUP="disk" --KERNEL=="qft*|nqft*|zqft*|nzqft*|rawqft*|nrawqft", GROUP="disk" --KERNEL=="ht*|nht*", GROUP="disk" --KERNEL=="pf*", GROUP="disk" --KERNEL=="sch*", GROUP="disk" --KERNEL=="pt*|npt*", GROUP="disk" --KERNEL=="pg*", GROUP="disk" --KERNEL=="evms/block_device*", GROUP="disk" --KERNEL=="rawctl*", NAME="raw/%k", GROUP="disk" --SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" --KERNEL=="osst*|nosst*", NAME="%k", GROUP="disk" --KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" --KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" --KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" -- --# libusb device access --SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" -- --# kernel firmware loader --SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" -- -diff --git a/etc/udev/suse/64-md-raid.rules b/etc/udev/suse/64-md-raid.rules -deleted file mode 100644 -index 02f27ee..0000000 ---- a/etc/udev/suse/64-md-raid.rules -+++ /dev/null -@@ -1,18 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --SUBSYSTEM!="block", GOTO="md_end" --KERNEL!="md[0-9]*", GOTO="md_end" --ACTION!="add|change", GOTO="md_end" -- --ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -- --IMPORT{program}="/sbin/mdadm --detail --export $tempnode" --ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" --ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" -- --IMPORT{program}="vol_id --export $tempnode" --OPTIONS="link_priority=100" --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}" -- --LABEL="md_end" -diff --git a/etc/udev/suse/80-drivers.rules b/etc/udev/suse/80-drivers.rules -deleted file mode 100644 -index e7ae8dc..0000000 ---- a/etc/udev/suse/80-drivers.rules -+++ /dev/null -@@ -1,15 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --ACTION!="add", GOTO="drivers_end" -- --DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" -- --SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /sbin/modprobe 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", ATTRS{type}=="1", ATTR{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst" --SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" -- --LABEL="drivers_end" -diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules -index c3eb887..e357a6a 100644 ---- a/extras/rule_generator/75-cd-aliases-generator.rules -+++ b/extras/rule_generator/75-cd-aliases-generator.rules -@@ -1,3 +1,6 @@ - # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks - -+# the path of removable devices changes frequently -+ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" -+ - ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" -diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules -index bd951c5..d74b201 100644 ---- a/extras/rule_generator/write_cd_rules -+++ b/extras/rule_generator/write_cd_rules -@@ -16,7 +16,7 @@ RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" - . /lib/udev/rule_generator.functions - - find_next_available() { -- raw_find_next_available "$(find_all_rules 'SYMLINK+=' $1)" -+ raw_find_next_available "$(find_all_rules 'SYMLINK+=' "$1")" - } - - write_rule() { -@@ -53,15 +53,7 @@ fi - if [ "$1" ]; then - METHOD="$1" - else -- case "$ID_BUS" in -- usb|ieee1394) -- METHOD='by-id' -- ;; -- -- *) -- METHOD='by-path' -- ;; -- esac -+ METHOD='by-path' - fi - - case "$METHOD" in diff --git a/udev.spec b/udev.spec index 5969744..72b97aa 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 114 -Release: 4%{?dist} +Version: 115 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,10 +18,8 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: udev-git-HEAD.patch -Patch2: udev-114-netgen.patch -Patch7: udev-089-nopie.patch -Patch9: udev-091-lib64.patch +Patch1: udev-089-nopie.patch +Patch2: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,10 +67,8 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .git -%patch2 -p1 -b .netgen -%patch7 -p1 -b .nopie -%patch9 -p1 -b .lib64 +%patch1 -p1 -b .nopie +%patch2 -p1 -b .lib64 rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build @@ -351,6 +347,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From 0789c11c2a5cfbfc78a522601353a229a3012949 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Aug 2007 08:37:19 +0000 Subject: [PATCH 354/640] - version 115 --- udev-114-netgen.patch | 12 - udev-git-HEAD.patch | 1180 ----------------------------------------- udev.spec | 19 +- 3 files changed, 9 insertions(+), 1202 deletions(-) delete mode 100644 udev-114-netgen.patch delete mode 100644 udev-git-HEAD.patch diff --git a/udev-114-netgen.patch b/udev-114-netgen.patch deleted file mode 100644 index 4cbf165..0000000 --- a/udev-114-netgen.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen udev-114/extras/rule_generator/75-persistent-net-generator.rules ---- udev-114/extras/rule_generator/75-persistent-net-generator.rules.netgen 2007-08-23 11:07:36.000000000 +0200 -+++ udev-114/extras/rule_generator/75-persistent-net-generator.rules 2007-08-23 11:07:51.000000000 +0200 -@@ -27,7 +27,7 @@ DRIVERS!="?*", ENV{NETDEV}=="?*", IMPORT - # skip "locally administered" MAC addresses - ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" - --DRIVERS!="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" -+DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" - ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" - - LABEL="persistent_net_generator_end" diff --git a/udev-git-HEAD.patch b/udev-git-HEAD.patch deleted file mode 100644 index b0ef65e..0000000 --- a/udev-git-HEAD.patch +++ /dev/null @@ -1,1180 +0,0 @@ -diff --git a/etc/udev/debian/cd-aliases-generator.rules b/etc/udev/debian/cd-aliases-generator.rules -new file mode 100644 -index 0000000..f655488 ---- /dev/null -+++ b/etc/udev/debian/cd-aliases-generator.rules -@@ -0,0 +1,13 @@ -+# These rules generate rules for the /dev/{cdrom,dvd,...} symlinks and -+# write them to /etc/udev/rules.d/z20_persistent-cd.rules. -+# -+# The default name for this file is z75_cd-aliases-generator.rules. -+ -+ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ -+ SUBSYSTEMS!="usb|ieee1394", \ -+ PROGRAM="write_cd_rules", SYMLINK+="%c" -+ -+ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ -+ SUBSYSTEMS=="usb|ieee1394", \ -+ PROGRAM="write_cd_rules by-id", SYMLINK+="%c" -+ -diff --git a/etc/udev/debian/devfs.rules b/etc/udev/debian/devfs.rules -index 2e0caa1..56ed1a8 100644 ---- a/etc/udev/debian/devfs.rules -+++ b/etc/udev/debian/devfs.rules -@@ -50,6 +50,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ - # usbfs-like devices - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ - NAME="%c" -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" - - # serial devices - KERNEL=="ttyS[0-9]*", NAME="tts/%n" -@@ -104,6 +105,7 @@ KERNEL=="umad*", NAME="infiniband/%k" - KERNEL=="issm*", NAME="infiniband/%k" - KERNEL=="uverbs*", NAME="infiniband/%k" - KERNEL=="ucm*", NAME="infiniband/%k" -+KERNEL=="rdma_ucm", NAME="infiniband/%k" - - # sound devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/hotplug.rules -index 0b2fc57..662e997 100644 ---- a/etc/udev/debian/hotplug.rules -+++ b/etc/udev/debian/hotplug.rules -@@ -7,16 +7,20 @@ ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded" - SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded" - - # load the drivers --ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" -+ENV{MODALIAS}=="?*", \ -+ RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" - SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent" - --SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" -+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \ -+ RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" - - SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia" - - # rules for subsystems which lack proper hotplug support - SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" - SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" -+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe tifm_sd" -+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe tifm_ms" - - SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" - SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \ -diff --git a/etc/udev/debian/hotplugd.rules b/etc/udev/debian/hotplugd.rules -deleted file mode 100644 -index cd30fa4..0000000 ---- a/etc/udev/debian/hotplugd.rules -+++ /dev/null -@@ -1,8 +0,0 @@ --# do not call hotplug.d and dev.d for "drivers" and "module" events --SUBSYSTEM=="drivers", OPTIONS="last_rule" --SUBSYSTEM=="module", OPTIONS="last_rule" -- --# compatibility support for the obsolete hotplug.d and dev.d directories --RUN+="udev_run_hotplugd $env{SUBSYSTEM}" --RUN+="udev_run_devd $env{SUBSYSTEM}" -- -diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/permissions.rules -index ac6c0be..205b733 100644 ---- a/etc/udev/debian/permissions.rules -+++ b/etc/udev/debian/permissions.rules -@@ -3,12 +3,17 @@ ACTION!="add", GOTO="permissions_end" - # workarounds needed to synchronize with sysfs - # only needed for kernels < v2.6.18-rc1 - ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" --SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" - # only needed for kernels < 2.6.16 - SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" - # only needed for kernels < 2.6.17 - SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" - -+# devices needed to load the drivers providing them -+KERNEL=="tun", OPTIONS+="ignore_remove" -+KERNEL=="ppp", OPTIONS+="ignore_remove" -+KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove" -+ - # default permissions for block devices - SUBSYSTEM=="block", GROUP="disk" - # the aacraid driver is broken and reports that disks removable (see #404927) -@@ -30,6 +35,7 @@ SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" - SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" - SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" - SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" -+SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" - SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" - SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" - SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape" -@@ -39,10 +45,11 @@ KERNEL=="legousbtower*", MODE="0666" - KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" - - # usbfs-like devices --SUBSYSTEM=="usb_device", MODE="0664" -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ -+ MODE="0664" - - # iRiver music players --SUBSYSTEM=="usb_device", GROUP="plugdev", \ -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ - ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" - - # serial devices -@@ -85,7 +92,7 @@ KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" - KERNEL=="fuse", GROUP="fuse" - KERNEL=="kqemu", MODE="0666" - KERNEL=="kvm", GROUP="kvm" --KERNEL=="tun", MODE="0666" -+KERNEL=="tun", MODE="0666", - - KERNEL=="cdemu[0-9]*", GROUP="cdrom" - KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" -@@ -93,6 +100,7 @@ KERNEL=="pktcdvd", MODE="0644" - - KERNEL=="uverbs*", GROUP="rdma" - KERNEL=="ucm*", GROUP="rdma" -+KERNEL=="rdma_ucm", GROUP="rdma" - - # printers and parallel devices - SUBSYSTEM=="printer", GROUP="lp" -diff --git a/etc/udev/debian/persistent-input.rules b/etc/udev/debian/persistent-input.rules -index a9005e0..47c4ae9 100644 ---- a/etc/udev/debian/persistent-input.rules -+++ b/etc/udev/debian/persistent-input.rules -@@ -4,7 +4,7 @@ ACTION!="add", GOTO="persistent_input_end" - KERNEL=="input[0-9]*", GOTO="persistent_input_end" - - # usb devices --SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x" -+SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export" - SUBSYSTEMS=="usb", \ - ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", \ - ENV{ID_CLASS}="kbd" -@@ -25,14 +25,14 @@ ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", \ - ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" - - # by-id links, generic and for the event devices --KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ -+KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ - SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" - KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ - SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" - - # by-path links - IMPORT{program}="path_id %p" --KERNEL=="mouse*", ENV{ID_PATH}=="?*", \ -+KERNEL=="mouse*|js*", ENV{ID_PATH}=="?*", \ - SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" - KERNEL=="event*", ENV{ID_PATH}=="?*", \ - SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}" -diff --git a/etc/udev/debian/persistent-net-generator.rules b/etc/udev/debian/persistent-net-generator.rules -new file mode 100644 -index 0000000..6df00bf ---- /dev/null -+++ b/etc/udev/debian/persistent-net-generator.rules -@@ -0,0 +1,48 @@ -+# These rules generate rules to keep network interface names unchanged -+# across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules. -+# -+# The default name for this file is z45_persistent-net-generator.rules. -+ -+ACTION!="add", GOTO="persistent_net_generator_end" -+SUBSYSTEM!="net", GOTO="persistent_net_generator_end" -+ -+# ignore the interface if a name has already been set -+NAME=="?*", GOTO="persistent_net_generator_end" -+ -+# ignore Xen virtual interfaces -+SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" -+ -+# ignore UML virtual interfaces -+DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end" -+ -+# ignore VMWare virtual interfaces -+ATTR{address}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" -+ -+# ignore interfaces with random MAC addresses -+ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" -+ -+# ignore "secondary" raw interfaces of the madwifi driver -+KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" -+ -+# provide nice comments for the generated rules -+SUBSYSTEMS=="pci", \ -+ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" -+SUBSYSTEMS=="usb", \ -+ ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}" -+SUBSYSTEMS=="ccwgroup", \ -+ ENV{COMMENT}="S/390 device at $id", -+SUBSYSTEMS=="ieee1394", \ -+ ENV{COMMENT}="Firewire device $attr{host_id}" -+ENV{COMMENT}=="", \ -+ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" -+ATTRS{driver}=="?*", \ -+ ENV{COMMENT}="$env{COMMENT} ($attr{driver})" -+ -+# ignore interfaces without a driver link like bridges and VLANs -+KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", DRIVERS=="?*",\ -+ IMPORT{program}="write_net_rules $attr{address}" -+ -+ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" -+ -+LABEL="persistent_net_generator_end" -+ -diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules -index c82a639..de2fa2a 100644 ---- a/etc/udev/debian/persistent.rules -+++ b/etc/udev/debian/persistent.rules -@@ -1,17 +1,20 @@ - # This file contains the rules needed to create persistent device names. - - # we are only interested in add actions for block devices --SUBSYSTEM!="block", GOTO="no_volume_id" --ACTION!="add", GOTO="no_volume_id" -+ACTION!="add", GOTO="persistent_storage_end" -+SUBSYSTEM!="block", GOTO="persistent_storage_end" - - # and we can safely ignore these kinds of devices --KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id" -+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" - - # skip removable ide devices, because open(2) on them causes an events loop - KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \ -- GOTO="no_volume_id" -+ GOTO="persistent_storage_end" - KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \ -- GOTO="no_volume_id" -+ GOTO="persistent_storage_end" -+ -+# ignore partitions that span the entire disk -+ATTR{whole_disk}=="*", GOTO="persistent_storage_end" - - # skip xen virtual hard disks - DRIVERS=="vbd", GOTO="no_hardware_id" -@@ -28,6 +31,8 @@ KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" - KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode" -+KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", -+ IMPORT{program}="scsi_id -g -x -n -s $devpath -d $tempnode" - KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" - KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ -@@ -51,10 +56,10 @@ 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*", ENV{ID_SERIAL_SHORT}=="?*", \ -+KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_VENDOR}=="ATA", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}" --KERNEL=="sd*[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ -+KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_VENDOR}=="ATA", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n" - -@@ -81,22 +86,22 @@ KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \ - KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - --KERNEL=="*[!0-9]|sr*", ENV{ID_PATH}=="?*", \ -+KERNEL=="*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_PATH}=="?*", \ - SYMLINK+="disk/by-path/$env{ID_PATH}" -+KERNEL=="*[0-9]|cciss*p[0-9]", 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="no_volume_id" --KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \ -- SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" -+KERNEL=="sr*|st*", GOTO="persistent_storage_end" - - # UUID and volume label --KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="no_volume_id" -+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" - IMPORT{program}="vol_id --export $tempnode" --ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ -- SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" --ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ -- SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" -+ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ -+ SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -+ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ -+ SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - - # end of processing --LABEL="no_volume_id" -+LABEL="persistent_storage_end" - -diff --git a/etc/udev/debian/udev.rules b/etc/udev/debian/udev.rules -index 3f7b704..af16c17 100644 ---- a/etc/udev/debian/udev.rules -+++ b/etc/udev/debian/udev.rules -@@ -35,6 +35,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ - # usbfs-like devices - SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ - NAME="%c" -+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" - - # serial devices - KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" -@@ -62,6 +63,7 @@ KERNEL=="umad*", NAME="infiniband/%k" - KERNEL=="issm*", NAME="infiniband/%k" - KERNEL=="uverbs*", NAME="infiniband/%k" - KERNEL=="ucm*", NAME="infiniband/%k" -+KERNEL=="rdma_ucm", NAME="infiniband/%k" - - # ALSA devices - KERNEL=="controlC[0-9]*", NAME="snd/%k" -diff --git a/etc/udev/packages/40-alsa.rules b/etc/udev/packages/40-alsa.rules -new file mode 100644 -index 0000000..d30a1da ---- /dev/null -+++ b/etc/udev/packages/40-alsa.rules -@@ -0,0 +1,11 @@ -+# do not edit this file, it will be overwritten on update -+ -+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" -+KERNEL=="mixer0", SYMLINK+="mixer" -+KERNEL=="dsp0", SYMLINK+="dsp" -+KERNEL=="audio0", SYMLINK+="audio" -diff --git a/etc/udev/packages/40-ia64.rules b/etc/udev/packages/40-ia64.rules -new file mode 100644 -index 0000000..5846f88 ---- /dev/null -+++ b/etc/udev/packages/40-ia64.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="sgi_*", MODE="0666" -+ -diff --git a/etc/udev/packages/40-pilot-links.rules b/etc/udev/packages/40-pilot-links.rules -new file mode 100644 -index 0000000..1242fff ---- /dev/null -+++ b/etc/udev/packages/40-pilot-links.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*|[Pp]alm*Handheld*", SYMLINK+="pilot" -+ -diff --git a/etc/udev/packages/40-ppc.rules b/etc/udev/packages/40-ppc.rules -new file mode 100644 -index 0000000..8b62d79 ---- /dev/null -+++ b/etc/udev/packages/40-ppc.rules -@@ -0,0 +1,6 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" -+KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" -+KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" -+KERNEL=="iseries/vtty*", GROUP="uucp" -diff --git a/etc/udev/packages/40-s390.rules b/etc/udev/packages/40-s390.rules -new file mode 100644 -index 0000000..43035db ---- /dev/null -+++ b/etc/udev/packages/40-s390.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="z90crypt", MODE="0666" -+ -diff --git a/etc/udev/packages/40-zaptel.rules b/etc/udev/packages/40-zaptel.rules -new file mode 100644 -index 0000000..4313a91 ---- /dev/null -+++ b/etc/udev/packages/40-zaptel.rules -@@ -0,0 +1,8 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="zap[0-9]*", NAME="zap/%n" -+KERNEL=="zapchannel", NAME="zap/channel" -+KERNEL=="zapctl", NAME="zap/ctl" -+KERNEL=="zappseudo", NAME="zap/pseudo" -+KERNEL=="zaptimer", NAME="zap/timer" -+ -diff --git a/etc/udev/packages/64-device-mapper.rules b/etc/udev/packages/64-device-mapper.rules -new file mode 100644 -index 0000000..8154ef3 ---- /dev/null -+++ b/etc/udev/packages/64-device-mapper.rules -@@ -0,0 +1,4 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="device-mapper", NAME="mapper/control" -+ -diff --git a/etc/udev/packages/64-md-raid.rules b/etc/udev/packages/64-md-raid.rules -new file mode 100644 -index 0000000..02f27ee ---- /dev/null -+++ b/etc/udev/packages/64-md-raid.rules -@@ -0,0 +1,18 @@ -+# do not edit this file, it will be overwritten on update -+ -+SUBSYSTEM!="block", GOTO="md_end" -+KERNEL!="md[0-9]*", GOTO="md_end" -+ACTION!="add|change", GOTO="md_end" -+ -+ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -+ -+IMPORT{program}="/sbin/mdadm --detail --export $tempnode" -+ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" -+ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" -+ -+IMPORT{program}="vol_id --export $tempnode" -+OPTIONS="link_priority=100" -+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}" -+ -+LABEL="md_end" -diff --git a/etc/udev/redhat/40-redhat.rules b/etc/udev/redhat/40-redhat.rules -new file mode 100644 -index 0000000..30da7d3 ---- /dev/null -+++ b/etc/udev/redhat/40-redhat.rules -@@ -0,0 +1,27 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="hd*[!0-9]", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove" -+KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k", OPTIONS+="ignore_remove" -+ -+KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" -+ -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" -+ -+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" -+ -+BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" -+ -+KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" -+ -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -+ RUN+="/sbin/modprobe sd_mod" -+ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -+ RUN+="/sbin/modprobe sr_mod" -+ -+KERNEL=="vcs", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcs[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" -+KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" -diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules -deleted file mode 100644 -index 668785f..0000000 ---- a/etc/udev/redhat/50-udev.rules -+++ /dev/null -@@ -1,322 +0,0 @@ --# 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. --# --# default is 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" --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" --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" --KERNEL=="isdn*", NAME="%k", MODE="0660" --KERNEL=="isdnctrl*", NAME="%k", MODE="0660" --KERNEL=="capi", NAME="capi20", GROUP="uucp", MODE="0660" --KERNEL=="capi*", NAME="capi/%n", GROUP="uucp", MODE="0660" --KERNEL=="dcbri*", NAME="%k", MODE="0660" --KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="tts/[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="tts/USB[0-9]*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="pppox*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="ircomm*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="hvc*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="hvsi*", NAME="%k", GROUP="uucp", MODE="0660" --KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp", MODE="0660" -- --# vc devices --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" --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" -- --# misc devices --KERNEL=="nvram", MODE="0660" --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=="remove", RUN+="/bin/sh -c 'rm -f /dev/%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" --KERNEL=="audio*", MODE="0660" --KERNEL=="midi*", MODE="0660" --KERNEL=="mixer*", MODE="0660" --KERNEL=="sequencer*", MODE="0660" --KERNEL=="sound/*", MODE="0660" --KERNEL=="snd/*", MODE="0660" --KERNEL=="beep", MODE="0660" --KERNEL=="admm*", MODE="0660" --KERNEL=="adsp*", MODE="0660" --KERNEL=="aload*", MODE="0660" --KERNEL=="amidi*", MODE="0660" --KERNEL=="dmfm*", MODE="0660" --KERNEL=="dmmidi*", MODE="0660" --KERNEL=="sndstat", MODE="0660" -- --# lp devices --KERNEL=="lp*", GROUP="lp", MODE="0660" --KERNEL=="parport*", GROUP="lp", MODE="0660" --KERNEL=="irlpt*", GROUP="lp", MODE="0660" --KERNEL=="usblp*", GROUP="lp", MODE="0660" --KERNEL=="usb/lp*", GROUP="lp", MODE="0660" -- --# tape devices --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" --KERNEL=="npt*", GROUP="disk", MODE="0660" --KERNEL=="st*", GROUP="disk", MODE="0660" --KERNEL=="nst*", GROUP="disk", MODE="0660" --KERNEL=="osst*", GROUP="disk", MODE="0660" --KERNEL=="nosst*", GROUP="disk", MODE="0660" -- --# diskonkey devices --KERNEL=="diskonkey*", GROUP="disk", MODE="0640" -- --# rem_ide devices --KERNEL=="microdrive*", GROUP="disk", MODE="0640" -- --# kbd devices --KERNEL=="kbd", MODE="0644" -- --# joystick devices --KERNEL=="js[0-9]*", MODE="0644" --KERNEL=="djs[0-9]*", MODE="0644" -- --# v4l devices --KERNEL=="video*", MODE="0660" --KERNEL=="radio*", MODE="0660" --KERNEL=="winradio*", MODE="0660" --KERNEL=="vtx*", MODE="0660" --KERNEL=="vbi*", MODE="0660" --KERNEL=="video/*", MODE="0660" --KERNEL=="vttuner", MODE="0660" --KERNEL=="v4l/*", MODE="0660" -- --# input devices --KERNEL=="input/*", MODE="0660" -- --# gpm devices --KERNEL=="gpmctl", MODE="0700" -- --# dri devices --KERNEL=="nvidia*", MODE="0660" --KERNEL=="3dfx*", MODE="0660" --KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" -- --# usb devices --KERNEL=="usb/dabusb*", MODE="0660" --KERNEL=="usb/mdc800*", MODE="0660" --KERNEL=="usb/rio500", MODE="0660" -- --# s390 devices --KERNEL=="z90crypt", MODE="0666" --KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" -- --# DVB --KERNEL=="dvb", MODE="0660" --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" -- --# alsa devices --KERNEL=="controlC[0-9]*", NAME="snd/%k" --KERNEL=="hw[CD0-9]*", NAME="snd/%k" --KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" --KERNEL=="midi[CD0-9]*", NAME="snd/%k" --KERNEL=="timer", NAME="snd/%k" --KERNEL=="seq", NAME="snd/%k" -- --# input devices --KERNEL=="mice", NAME="input/%k" --KERNEL=="mouse*", NAME="input/%k" --KERNEL=="event*", NAME="input/%k" --KERNEL=="js*", NAME="input/%k", SYMLINK+="%k" --KERNEL=="ts*", NAME="input/%k" --KERNEL=="uinput", NAME="input/%k" -- --# IEEE1394 (firewire) devices (must be before raw devices below) --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" --BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" -- --KERNEL=="microcode", NAME="cpu/%k" --KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" --KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" -- --KERNEL=="ram1", SYMLINK+="ram" --KERNEL=="video0", SYMLINK+="video" --KERNEL=="radio0", SYMLINK+="radio" --KERNEL=="audio0", SYMLINK+="audio" --KERNEL=="dsp0", SYMLINK+="dsp" --KERNEL=="fb0", SYMLINK+="fb" --KERNEL=="qft0", SYMLINK+="ftape" --KERNEL=="isdnctrl0", SYMLINK+="isdnctrl" --KERNEL=="mixer0", SYMLINK+="mixer" --KERNEL=="ram0", SYMLINK+="ramdisk" --KERNEL=="sbpcd0", SYMLINK+="sbpcd" --KERNEL=="radio0", SYMLINK+="radio" --KERNEL=="tty0", SYMLINK+="systty" --KERNEL=="vbi0", SYMLINK+="vbi" --KERNEL=="null", SYMLINK+="XOR" -- --KERNEL=="tun", NAME="net/%k", MODE="0666" -- --KERNEL=="device-mapper", NAME="mapper/control" -- --# old compat symlinks with enumeration --KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k" --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" -- --# Section for zaptel device --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" -- --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[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=="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" -- --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 --# st/osst: 1 TYPE_TAPE --# sg: 8 changer, [36] scanner --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="0|7|14", \ -- RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" --ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \ -- RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'" -- -- --ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg" --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \ -- RUN+="/sbin/modprobe sd_mod" --ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \ -- RUN+="/sbin/modprobe sr_mod" -- --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \ -- SYMLINK+="scanner scanner-%k", MODE="0660" -- --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+="/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+="/sbin/modprobe mmc_block" -- -- --RUN+="socket:/org/kernel/udev/monitor" -- -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -new file mode 100644 -index 0000000..35ac99e ---- /dev/null -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -0,0 +1,104 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule" -+KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" -+KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" -+KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", OPTIONS="last_rule" -+KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", OPTIONS="last_rule" -+KERNEL=="console", MODE="0600", OPTIONS="last_rule" -+KERNEL=="tty0", SYMLINK+="systty" -+ -+# serial -+KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" -+KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" -+KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp" -+KERNEL=="hvc*|hvsi*", GROUP="uucp" -+KERNEL=="lirc0", SYMLINK+="lirc" -+ -+# mem -+KERNEL=="null|zero|random", 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=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k" -+ -+# video4linux -+KERNEL=="vbi0", SYMLINK+="vbi" -+KERNEL=="radio0", SYMLINK+="radio" -+KERNEL=="video0", SYMLINK+="video" -+ -+# graphics -+KERNEL=="agpgart", MODE="0600" -+KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" -+KERNEL=="fb0", SYMLINK+="fb" -+ -+# DVB video -+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" -+ -+# Firewire -+KERNEL=="dv1394*", SYMLINK+="dv1394/%n" -+KERNEL=="video1394*", NAME="video1394/%n" -+ -+# firmware class requests -+SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" -+ -+# libusb device nodes -+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" -+ -+# printer -+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=="irlpt[0-9]*", GROUP="lp" -+ -+# block, tapes, block-releated -+SUBSYSTEM=="block", GROUP="disk", MODE="0640" -+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" -+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" -+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" -+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=="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" -+KERNEL=="rawctl", NAME="raw/%k", GROUP="disk" -+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" -+ -+# network -+KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" -+ -+# CPU -+KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" -+KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -+KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" -+ -+# miscellaneous -+KERNEL=="fuse", MODE="0666" -+KERNEL=="rtc", MODE="0644" -+KERNEL=="auer[0-9]*" NAME="usb/%k" -+KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" -+KERNEL=="mmtimer", MODE="0644" -+KERNEL=="rflash[0-9]*", MODE="0400" -+KERNEL=="rrom[0-9]*", MODE="0400" -+KERNEL=="sbpcd0", SYMLINK+="sbpcd" -+KERNEL=="slram[0-9]*", SYMLINK+="xpram%n" -+KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" -+KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" -+ -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index a49321c..62cdad6 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -59,7 +59,7 @@ KERNEL=="sr*|st*", GOTO="persistent_storage_end" - 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}" - -diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules -new file mode 100644 -index 0000000..e71f135 ---- /dev/null -+++ b/etc/udev/rules.d/80-drivers.rules -@@ -0,0 +1,14 @@ -+# do not edit this file, it will be overwritten on update -+ -+ACTION!="add", GOTO="drivers_end" -+ -+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" -+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=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" -+SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" -+ -+LABEL="drivers_end" -+ -diff --git a/etc/udev/suse/40-suse.rules b/etc/udev/suse/40-suse.rules -new file mode 100644 -index 0000000..863da88 ---- /dev/null -+++ b/etc/udev/suse/40-suse.rules -@@ -0,0 +1,14 @@ -+# do not edit this file, it will be overwritten on update -+ -+KERNEL=="pmu", GROUP="video" -+KERNEL=="nvidia*|nvidiactl*", GROUP="video" -+KERNEL=="nvidia*|nvidiactl*", GROUP="video" -+KERNEL=="dv1394*|video1394*|raw1394*", GROUP="video" -+KERNEL=="vttuner*", GROUP="video" -+KERNEL=="vtx*|vbi*", GROUP="video" -+KERNEL=="winradio*", GROUP="video" -+SUBSYSTEM=="dvb", GROUP="video" -+SUBSYSTEM=="graphics" GROUP="video" -+SUBSYSTEM=="video4linux", GROUP="video" -+KERNEL=="agpgart", GROUP="video" -+ -diff --git a/etc/udev/suse/50-udev-default.rules b/etc/udev/suse/50-udev-default.rules -deleted file mode 100644 -index 4a3fe2c..0000000 ---- a/etc/udev/suse/50-udev-default.rules -+++ /dev/null -@@ -1,126 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --# console --KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="tty[0-9]*|vcs*", GROUP="tty", MODE="0620", OPTIONS="last_rule" --KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" --KERNEL=="console", MODE="0600", OPTIONS="last_rule" -- --# serial devices --KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" --KERNEL=="hvc*|hvsi*", GROUP="uucp" --KERNEL=="iseries/vtty*", GROUP="uucp" --KERNEL=="mwave", NAME="modems/%k", GROUP="uucp" --KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot" --KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*", SYMLINK+="pilot" --KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" -- --# video/graphics --SUBSYSTEM=="video4linux", GROUP="video" --SUBSYSTEM=="graphics" GROUP="video" --KERNEL=="vtx*|vbi*", GROUP="video" --KERNEL=="winradio*", GROUP="video" --KERNEL=="vttuner*", GROUP="video" --KERNEL=="nvidia*|nvidiactl*", GROUP="video" --KERNEL=="video0", SYMLINK+="video" --KERNEL=="radio0", SYMLINK+="radio" --KERNEL=="vbi0", SYMLINK+="vbi" --KERNEL=="pmu", GROUP="video" -- --# dvb --SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video" -- --# input devices --KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" --KERNEL=="js*", NAME="input/%k", MODE="0644" --KERNEL=="ts*|uinput", NAME="input/%k", MODE="0600" --KERNEL=="lirc0", SYMLINK+="lirc" -- --# printer --SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" --SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" --KERNEL=="irlpt*", GROUP="lp" -- --# cpu devices --KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" --KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" --KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" -- --# IEEE1394 devices --KERNEL=="raw1394*", GROUP="video" --KERNEL=="dv1394*", SYMLINK+="dv1394/%n", GROUP="video" --KERNEL=="video1394*", SYMLINK+="video1394/%n", GROUP="video" -- --KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" --KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k" --KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k" -- --# network --KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" -- --# misc devices --KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" --KERNEL=="nvram", GROUP="kmem", MODE="0600" --KERNEL=="null|zero|random", MODE="0666" --KERNEL=="full", MODE="0622" --KERNEL=="urandom", MODE="0644" --KERNEL=="rtc", MODE="0600" --KERNEL=="fuse", MODE="0666" --KERNEL=="sonypi", MODE="0666" --KERNEL=="agpgart", MODE="0600", GROUP="video" --KERNEL=="djs*", MODE="0644" --KERNEL=="sgi_*", MODE="0666" --KERNEL=="rrom*", MODE="0400" --KERNEL=="rflash*", MODE="0400" --KERNEL=="usbscanner*", MODE="0644" --KERNEL=="3270/ttycons*", MODE="0600" --KERNEL=="3270/tub*", MODE="0666" --KERNEL=="3270/tubcons*", MODE="0600" --KERNEL=="ica", MODE="0666" --KERNEL=="z90crypt", MODE="0666" --KERNEL=="mmtimer", MODE="0644" --KERNEL=="auer[0-9]*" NAME="usb/%k" -- --# packet writing interface --KERNEL=="pktcdvd", NAME="pktcdvd/control" --KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" -- --# additional floppy devices (no sysfs entries) --KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k" -- --# block devices --SUBSYSTEM=="block", GROUP="disk", MODE="0640" --SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" -- --# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC --# sr: 4 TYPE_WORM, 5 TYPE_ROM --# st/osst: 1 TYPE_TAPE --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" --KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" -- --# misc storage devices (non-block) --KERNEL=="sg*", GROUP="disk", MODE="0640" --KERNEL=="st*|nst*", GROUP="disk" --KERNEL=="qft*|nqft*|zqft*|nzqft*|rawqft*|nrawqft", GROUP="disk" --KERNEL=="ht*|nht*", GROUP="disk" --KERNEL=="pf*", GROUP="disk" --KERNEL=="sch*", GROUP="disk" --KERNEL=="pt*|npt*", GROUP="disk" --KERNEL=="pg*", GROUP="disk" --KERNEL=="evms/block_device*", GROUP="disk" --KERNEL=="rawctl*", NAME="raw/%k", GROUP="disk" --SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" --KERNEL=="osst*|nosst*", NAME="%k", GROUP="disk" --KERNEL=="iseries/vt*", NAME="%k", GROUP="disk" --KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk" --KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk" -- --# libusb device access --SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" -- --# kernel firmware loader --SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh" -- -diff --git a/etc/udev/suse/64-md-raid.rules b/etc/udev/suse/64-md-raid.rules -deleted file mode 100644 -index 02f27ee..0000000 ---- a/etc/udev/suse/64-md-raid.rules -+++ /dev/null -@@ -1,18 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --SUBSYSTEM!="block", GOTO="md_end" --KERNEL!="md[0-9]*", GOTO="md_end" --ACTION!="add|change", GOTO="md_end" -- --ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -- --IMPORT{program}="/sbin/mdadm --detail --export $tempnode" --ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}" --ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" -- --IMPORT{program}="vol_id --export $tempnode" --OPTIONS="link_priority=100" --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}" -- --LABEL="md_end" -diff --git a/etc/udev/suse/80-drivers.rules b/etc/udev/suse/80-drivers.rules -deleted file mode 100644 -index e7ae8dc..0000000 ---- a/etc/udev/suse/80-drivers.rules -+++ /dev/null -@@ -1,15 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --ACTION!="add", GOTO="drivers_end" -- --DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" -- --SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /sbin/modprobe 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", ATTRS{type}=="1", ATTR{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst" --SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" -- --LABEL="drivers_end" -diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules -index c3eb887..e357a6a 100644 ---- a/extras/rule_generator/75-cd-aliases-generator.rules -+++ b/extras/rule_generator/75-cd-aliases-generator.rules -@@ -1,3 +1,6 @@ - # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks - -+# the path of removable devices changes frequently -+ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" -+ - ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" -diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules -index bd951c5..d74b201 100644 ---- a/extras/rule_generator/write_cd_rules -+++ b/extras/rule_generator/write_cd_rules -@@ -16,7 +16,7 @@ RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" - . /lib/udev/rule_generator.functions - - find_next_available() { -- raw_find_next_available "$(find_all_rules 'SYMLINK+=' $1)" -+ raw_find_next_available "$(find_all_rules 'SYMLINK+=' "$1")" - } - - write_rule() { -@@ -53,15 +53,7 @@ fi - if [ "$1" ]; then - METHOD="$1" - else -- case "$ID_BUS" in -- usb|ieee1394) -- METHOD='by-id' -- ;; -- -- *) -- METHOD='by-path' -- ;; -- esac -+ METHOD='by-path' - fi - - case "$METHOD" in diff --git a/udev.spec b/udev.spec index 5969744..72b97aa 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 114 -Release: 4%{?dist} +Version: 115 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,10 +18,8 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: udev-git-HEAD.patch -Patch2: udev-114-netgen.patch -Patch7: udev-089-nopie.patch -Patch9: udev-091-lib64.patch +Patch1: udev-089-nopie.patch +Patch2: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,10 +67,8 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .git -%patch2 -p1 -b .netgen -%patch7 -p1 -b .nopie -%patch9 -p1 -b .lib64 +%patch1 -p1 -b .nopie +%patch2 -p1 -b .lib64 rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build @@ -351,6 +347,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From b08eedbbbe3bc41938afa2afe8a08ca656c49231 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Aug 2007 09:42:49 +0000 Subject: [PATCH 355/640] - version 115 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 0a3c741..da580a5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-114.tar.bz2 +udev-115.tar.bz2 diff --git a/sources b/sources index 6e4edcd..dc8ea95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c597b3544e650560479edd13b5a5dc8a udev-114.tar.bz2 +39bbe5ddcd62d35cd56b184d6862c540 udev-115.tar.bz2 From 3cc65b7cd1bffd8cc23422b0b584e3e4be6d6c9c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Aug 2007 09:42:49 +0000 Subject: [PATCH 356/640] - version 115 --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 0a3c741..da580a5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-114.tar.bz2 +udev-115.tar.bz2 diff --git a/sources b/sources index 6e4edcd..dc8ea95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c597b3544e650560479edd13b5a5dc8a udev-114.tar.bz2 +39bbe5ddcd62d35cd56b184d6862c540 udev-115.tar.bz2 From 32d4d659a38e2a8f97bed416c4ee0c1c640cd4e5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 7 Sep 2007 12:52:05 +0000 Subject: [PATCH 357/640] - some upstream fixes from git - last_rule for loop rules (speedup for live-cds/qemu with 128 loop devices) --- udev-115-git-20070907.patch | 1887 +++++++++++++++++++++++++++++++++++ udev-115-looplast.patch | 12 + udev-115-rulesinstall.patch | 15 + udev.spec | 13 +- 4 files changed, 1925 insertions(+), 2 deletions(-) create mode 100644 udev-115-git-20070907.patch create mode 100644 udev-115-looplast.patch create mode 100644 udev-115-rulesinstall.patch diff --git a/udev-115-git-20070907.patch b/udev-115-git-20070907.patch new file mode 100644 index 0000000..41284a7 --- /dev/null +++ b/udev-115-git-20070907.patch @@ -0,0 +1,1887 @@ +diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules +deleted file mode 100644 +index ee349dc..0000000 +--- a/etc/udev/gentoo/05-udev-early.rules ++++ /dev/null +@@ -1,9 +0,0 @@ +-# ignore these events until someone needs them +-SUBSYSTEM=="drivers", OPTIONS="ignore_device" +-SUBSYSTEM=="module", OPTIONS="ignore_device" +- +-# 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", 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 dd32971..7c2ac81 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 +@@ -241,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-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" +- +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index bff2fe5..bdce004 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -17,18 +17,15 @@ 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 +@@ -58,7 +55,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 +68,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" +@@ -80,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" +@@ -91,7 +89,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" +@@ -103,3 +102,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" ++ +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" + +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" + +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; + +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..874c9ab 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. ++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 + .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,85 +328,90 @@ 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 ++\fB$driver\fR + .RS 4 + The driver name of the device matched while searching the devpath upwards for + \fBSUBSYSTEMS\fR, + \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$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. ++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/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.xml b/udev.xml +index b43abb7..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. + + + +@@ -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_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..62217ff 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)) { +@@ -262,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); +@@ -281,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_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; + } + } +diff --git a/udev_rules.c b/udev_rules.c +index 0dcbf15..dcd0914 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) +@@ -604,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, +@@ -625,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 }, +@@ -843,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); +@@ -986,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; +@@ -1031,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; + } +@@ -1464,9 +1473,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; + } +@@ -1477,6 +1491,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; +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); +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" +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/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/udevd.c b/udevd.c +index 8f56de6..5ff5d3f 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,22 +504,27 @@ 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; + } + } + +- /* 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); + 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]; +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/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.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/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/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) +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); diff --git a/udev-115-looplast.patch b/udev-115-looplast.patch new file mode 100644 index 0000000..1ae1b88 --- /dev/null +++ b/udev-115-looplast.patch @@ -0,0 +1,12 @@ +--- udev-115/etc/udev/rules.d/50-udev-default.rules.looplast 2007-09-07 14:32:01.000000000 +0200 ++++ udev-115/etc/udev/rules.d/50-udev-default.rules 2007-09-07 14:33:14.000000000 +0200 +@@ -9,6 +9,9 @@ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", + KERNEL=="console", MODE="0600", OPTIONS="last_rule" + KERNEL=="tty0", SYMLINK+="systty" + ++# loop ++KERNEL=="loop[0-9]", SUBSYSTEM=="block", GROUP="disk", MODE="0640", OPTIONS+="last_rule" ++ + # serial + KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" + KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" diff --git a/udev-115-rulesinstall.patch b/udev-115-rulesinstall.patch new file mode 100644 index 0000000..50d5a44 --- /dev/null +++ b/udev-115-rulesinstall.patch @@ -0,0 +1,15 @@ +--- udev-115/Makefile.rulesinstall 2007-09-07 14:46:07.000000000 +0200 ++++ udev-115/Makefile 2007-09-07 14:46:38.000000000 +0200 +@@ -234,9 +234,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 \ diff --git a/udev.spec b/udev.spec index 72b97aa..bbbfc27 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,9 @@ Source4: fw_unit_symlinks.sh Patch1: udev-089-nopie.patch Patch2: udev-091-lib64.patch +Patch3: udev-115-git-20070907.patch +Patch4: udev-115-looplast.patch +Patch5: udev-115-rulesinstall.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,6 +72,9 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .nopie %patch2 -p1 -b .lib64 +%patch3 -p1 -b .git20070907 +%patch4 -p1 -b .looplast +%patch5 -p1 -b .rulesinstall rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build @@ -183,7 +189,6 @@ done for i in \ etc/udev/redhat/*.rules \ - etc/udev/rules.d/*.rules \ etc/udev/packages/40-ia64.rules \ etc/udev/packages/40-alsa.rules \ etc/udev/packages/40-ppc.rules \ @@ -347,6 +352,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From 5d7b98eb8a8f004e6ed0a41c0b1c60a773d35c04 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 7 Sep 2007 12:52:05 +0000 Subject: [PATCH 358/640] - some upstream fixes from git - last_rule for loop rules (speedup for live-cds/qemu with 128 loop devices) --- udev-115-git-20070907.patch | 1887 +++++++++++++++++++++++++++++++++++ udev-115-looplast.patch | 12 + udev-115-rulesinstall.patch | 15 + udev.spec | 13 +- 4 files changed, 1925 insertions(+), 2 deletions(-) create mode 100644 udev-115-git-20070907.patch create mode 100644 udev-115-looplast.patch create mode 100644 udev-115-rulesinstall.patch diff --git a/udev-115-git-20070907.patch b/udev-115-git-20070907.patch new file mode 100644 index 0000000..41284a7 --- /dev/null +++ b/udev-115-git-20070907.patch @@ -0,0 +1,1887 @@ +diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules +deleted file mode 100644 +index ee349dc..0000000 +--- a/etc/udev/gentoo/05-udev-early.rules ++++ /dev/null +@@ -1,9 +0,0 @@ +-# ignore these events until someone needs them +-SUBSYSTEM=="drivers", OPTIONS="ignore_device" +-SUBSYSTEM=="module", OPTIONS="ignore_device" +- +-# 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", 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 dd32971..7c2ac81 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 +@@ -241,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-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" +- +diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules +index bff2fe5..bdce004 100644 +--- a/etc/udev/rules.d/50-udev-default.rules ++++ b/etc/udev/rules.d/50-udev-default.rules +@@ -17,18 +17,15 @@ 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 +@@ -58,7 +55,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 +68,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" +@@ -80,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" +@@ -91,7 +89,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" +@@ -103,3 +102,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" ++ +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" + +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" + +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; + +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..874c9ab 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. ++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 + .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,85 +328,90 @@ 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 ++\fB$driver\fR + .RS 4 + The driver name of the device matched while searching the devpath upwards for + \fBSUBSYSTEMS\fR, + \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$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. ++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/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.xml b/udev.xml +index b43abb7..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. + + + +@@ -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_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..62217ff 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)) { +@@ -262,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); +@@ -281,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_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; + } + } +diff --git a/udev_rules.c b/udev_rules.c +index 0dcbf15..dcd0914 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) +@@ -604,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, +@@ -625,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 }, +@@ -843,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); +@@ -986,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; +@@ -1031,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; + } +@@ -1464,9 +1473,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; + } +@@ -1477,6 +1491,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; +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); +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" +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/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/udevd.c b/udevd.c +index 8f56de6..5ff5d3f 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,22 +504,27 @@ 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; + } + } + +- /* 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); + 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]; +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/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.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/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/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) +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); diff --git a/udev-115-looplast.patch b/udev-115-looplast.patch new file mode 100644 index 0000000..1ae1b88 --- /dev/null +++ b/udev-115-looplast.patch @@ -0,0 +1,12 @@ +--- udev-115/etc/udev/rules.d/50-udev-default.rules.looplast 2007-09-07 14:32:01.000000000 +0200 ++++ udev-115/etc/udev/rules.d/50-udev-default.rules 2007-09-07 14:33:14.000000000 +0200 +@@ -9,6 +9,9 @@ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", + KERNEL=="console", MODE="0600", OPTIONS="last_rule" + KERNEL=="tty0", SYMLINK+="systty" + ++# loop ++KERNEL=="loop[0-9]", SUBSYSTEM=="block", GROUP="disk", MODE="0640", OPTIONS+="last_rule" ++ + # serial + KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" + KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" diff --git a/udev-115-rulesinstall.patch b/udev-115-rulesinstall.patch new file mode 100644 index 0000000..50d5a44 --- /dev/null +++ b/udev-115-rulesinstall.patch @@ -0,0 +1,15 @@ +--- udev-115/Makefile.rulesinstall 2007-09-07 14:46:07.000000000 +0200 ++++ udev-115/Makefile 2007-09-07 14:46:38.000000000 +0200 +@@ -234,9 +234,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 \ diff --git a/udev.spec b/udev.spec index 72b97aa..bbbfc27 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,9 @@ Source4: fw_unit_symlinks.sh Patch1: udev-089-nopie.patch Patch2: udev-091-lib64.patch +Patch3: udev-115-git-20070907.patch +Patch4: udev-115-looplast.patch +Patch5: udev-115-rulesinstall.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -69,6 +72,9 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .nopie %patch2 -p1 -b .lib64 +%patch3 -p1 -b .git20070907 +%patch4 -p1 -b .looplast +%patch5 -p1 -b .rulesinstall rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build @@ -183,7 +189,6 @@ done for i in \ etc/udev/redhat/*.rules \ - etc/udev/rules.d/*.rules \ etc/udev/packages/40-ia64.rules \ etc/udev/packages/40-alsa.rules \ etc/udev/packages/40-ppc.rules \ @@ -347,6 +352,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 From 7276a579d3c623a60ce8e0cf10e42ff91f58a867 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 20 Sep 2007 12:27:11 +0000 Subject: [PATCH 359/640] - some upstream fixes from git - removed last_rule for loop rules - added "udevinfo udevtrace" kernel command line options for better debugging --- ...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 + ...patch => 0008-man-recreate-man-pages.patch | 843 +----------------- ...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 ++ ...ll.patch => 0022-only-install-.rules.patch | 20 +- ...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 + Makefile.git | 6 + start_udev | 13 +- udev-115-looplast.patch | 12 - udev.spec | 83 +- 30 files changed, 1711 insertions(+), 851 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 rename udev-115-git-20070907.patch => 0008-man-recreate-man-pages.patch (58%) 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 rename udev-115-rulesinstall.patch => 0022-only-install-.rules.patch (57%) 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-Removed-extra-space-from-udevinfo-symlink-output.patch create mode 100644 Makefile.git delete mode 100644 udev-115-looplast.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/udev-115-git-20070907.patch b/0008-man-recreate-man-pages.patch similarity index 58% rename from udev-115-git-20070907.patch rename to 0008-man-recreate-man-pages.patch index 41284a7..d22c38a 100644 --- a/udev-115-git-20070907.patch +++ b/0008-man-recreate-man-pages.patch @@ -1,314 +1,20 @@ -diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules -deleted file mode 100644 -index ee349dc..0000000 ---- a/etc/udev/gentoo/05-udev-early.rules -+++ /dev/null -@@ -1,9 +0,0 @@ --# ignore these events until someone needs them --SUBSYSTEM=="drivers", OPTIONS="ignore_device" --SUBSYSTEM=="module", OPTIONS="ignore_device" -- --# 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", 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 dd32971..7c2ac81 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 -@@ -241,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-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" -- -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index bff2fe5..bdce004 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -17,18 +17,15 @@ 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 -@@ -58,7 +55,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 +68,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" -@@ -80,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" -@@ -91,7 +89,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" -@@ -103,3 +102,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" -+ -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" - -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" - -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; - +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 @@ -405,7 +111,7 @@ index 7594253..daa583b 100644 .PP \fBudev\fR(7) diff --git a/udev.7 b/udev.7 -index 821a476..874c9ab 100644 +index 821a476..5f0ebb9 100644 --- a/udev.7 +++ b/udev.7 @@ -1,6 +1,6 @@ @@ -744,7 +450,7 @@ index 821a476..874c9ab 100644 \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\. ++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 @@ -796,7 +502,7 @@ index 821a476..874c9ab 100644 .RE .PP \fB$id\fR, \fB%b\fR -@@ -332,85 +328,90 @@ The name of the device matched while searching the devpath upwards for +@@ -332,7 +328,7 @@ The name of the device matched while searching the devpath upwards for \fBKERNELS\fR, \fBDRIVERS\fR and @@ -804,11 +510,8 @@ index 821a476..874c9ab 100644 +\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, + \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 @@ -853,11 +556,6 @@ index 821a476..874c9ab 100644 .RS 4 -The node name of the parent device. +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 @@ -907,272 +605,6 @@ index 821a476..874c9ab 100644 .SH "SEE ALSO" .PP \fBudevd\fR(8), -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.xml b/udev.xml -index b43abb7..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. - - - -@@ -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_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..62217ff 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)) { -@@ -262,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); -@@ -281,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_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; - } - } -diff --git a/udev_rules.c b/udev_rules.c -index 0dcbf15..dcd0914 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) -@@ -604,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, -@@ -625,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 }, -@@ -843,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); -@@ -986,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; -@@ -1031,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; - } -@@ -1464,9 +1473,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; - } -@@ -1477,6 +1491,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; -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); -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" -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/udevd.8 b/udevd.8 index 25996d1..46edde4 100644 --- a/udevd.8 @@ -1299,186 +731,6 @@ index 25996d1..46edde4 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -diff --git a/udevd.c b/udevd.c -index 8f56de6..5ff5d3f 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,22 +504,27 @@ 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; - } - } - -- /* 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); - 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]; diff --git a/udevinfo.8 b/udevinfo.8 index 337f206..6115f29 100644 --- a/udevinfo.8 @@ -1574,19 +826,6 @@ index 337f206..6115f29 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -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.8 b/udevmonitor.8 index 0adb998..5b624a7 100644 --- a/udevmonitor.8 @@ -1645,28 +884,6 @@ index 0adb998..5b624a7 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -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/udevsettle.8 b/udevsettle.8 index 818a7ff..39054d9 100644 --- a/udevsettle.8 @@ -1872,16 +1089,6 @@ index 5ef9e8f..06c7e45 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -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/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/udev-115-rulesinstall.patch b/0022-only-install-.rules.patch similarity index 57% rename from udev-115-rulesinstall.patch rename to 0022-only-install-.rules.patch index 50d5a44..04a0d13 100644 --- a/udev-115-rulesinstall.patch +++ b/0022-only-install-.rules.patch @@ -1,6 +1,17 @@ ---- udev-115/Makefile.rulesinstall 2007-09-07 14:46:07.000000000 +0200 -+++ udev-115/Makefile 2007-09-07 14:46:38.000000000 +0200 -@@ -234,9 +234,9 @@ install-config: +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 @@ -13,3 +24,6 @@ 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-Removed-extra-space-from-udevinfo-symlink-output.patch b/0026-Removed-extra-space-from-udevinfo-symlink-output.patch new file mode 100644 index 0000000..5f4a289 --- /dev/null +++ b/0026-Removed-extra-space-from-udevinfo-symlink-output.patch @@ -0,0 +1,35 @@ +From 1e3ee197983daecbe78ff5cf7e4dc8f431ccf185 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Sep 2007 13:53:26 +0200 +Subject: [PATCH] Removed extra space from udevinfo symlink output. +See also https://bugzilla.redhat.com/show_bug.cgi?id=173001 +--- + 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/Makefile.git b/Makefile.git new file mode 100644 index 0000000..ea5486a --- /dev/null +++ b/Makefile.git @@ -0,0 +1,6 @@ +Patch: + @for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done + +patch: + @for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done + diff --git a/start_udev b/start_udev index 4bdac13..f3c86c7 100755 --- a/start_udev +++ b/start_udev @@ -94,6 +94,7 @@ make_extra_nodes () { pushd $devdir &> "$udev_root/null" set * if [ "$1" != "*" ]; then + echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." cp -ar "$@" $udev_root/ pushd "$udev_root" &> "$udev_root/null" [ -x /sbin/restorecon ] && /sbin/restorecon "$@" @@ -180,6 +181,7 @@ getval() { make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 +UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug @@ -194,9 +196,12 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi - if strstr "$cmdline" fastudev; then - /sbin/udevcontrol env FASTUDEV=1 - fi + if strstr "$cmdline" udevinfo; then + /sbin/udevcontrol log_priority=info + fi + if strstr "$cmdline" udevtrace; then + UDEV_OPTS="$UDEV_OPTS --debug-trace" + fi if strstr "$cmdline" udevchilds; then /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) fi @@ -211,7 +216,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevcontrol env MODPROBE_DEBUG= else echo -n " kernel too old for this udev version " - /sbin/udevd -d + /sbin/udevd -d $UDEV_OPTS ret=10 fi diff --git a/udev-115-looplast.patch b/udev-115-looplast.patch deleted file mode 100644 index 1ae1b88..0000000 --- a/udev-115-looplast.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- udev-115/etc/udev/rules.d/50-udev-default.rules.looplast 2007-09-07 14:32:01.000000000 +0200 -+++ udev-115/etc/udev/rules.d/50-udev-default.rules 2007-09-07 14:33:14.000000000 +0200 -@@ -9,6 +9,9 @@ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", - KERNEL=="console", MODE="0600", OPTIONS="last_rule" - KERNEL=="tty0", SYMLINK+="systty" - -+# loop -+KERNEL=="loop[0-9]", SUBSYSTEM=="block", GROUP="disk", MODE="0640", OPTIONS+="last_rule" -+ - # serial - KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" - KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" diff --git a/udev.spec b/udev.spec index bbbfc27..663bbe5 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 2%{?dist} +Release: 3.20070920git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,11 +18,35 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: udev-089-nopie.patch -Patch2: udev-091-lib64.patch -Patch3: udev-115-git-20070907.patch -Patch4: udev-115-looplast.patch -Patch5: udev-115-rulesinstall.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-Removed-extra-space-from-udevinfo-symlink-output.patch + +Patch100: udev-089-nopie.patch +Patch101: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -70,13 +94,34 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .nopie -%patch2 -p1 -b .lib64 -%patch3 -p1 -b .git20070907 -%patch4 -p1 -b .looplast -%patch5 -p1 -b .rulesinstall +%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 + +%patch100 -p1 -b .nopie +%patch101 -p1 -b .lib64 -rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build %if %{with_static} @@ -189,11 +234,16 @@ done for i in \ etc/udev/redhat/*.rules \ +%ifarch ia64 etc/udev/packages/40-ia64.rules \ - etc/udev/packages/40-alsa.rules \ +%endif +%ifarch ppc ppc64 etc/udev/packages/40-ppc.rules \ +%endif +%ifarch s390 s390x etc/udev/packages/40-s390.rules \ - etc/udev/packages/40-zaptel.rules \ +%endif + etc/udev/packages/40-alsa.rules \ etc/udev/packages/64-md-raid.rules \ etc/udev/packages/64-device-mapper.rules \ ; do @@ -352,6 +402,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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) From ee9c1f7f35c6fc2b99c8400bebe5e3d9f16aa1d2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 20 Sep 2007 12:27:11 +0000 Subject: [PATCH 360/640] - some upstream fixes from git - removed last_rule for loop rules - added "udevinfo udevtrace" kernel command line options for better debugging --- ...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 + ...patch => 0008-man-recreate-man-pages.patch | 843 +----------------- ...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 ++ ...ll.patch => 0022-only-install-.rules.patch | 20 +- ...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 + Makefile.git | 6 + start_udev | 13 +- udev-115-looplast.patch | 12 - udev.spec | 83 +- 30 files changed, 1711 insertions(+), 851 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 rename udev-115-git-20070907.patch => 0008-man-recreate-man-pages.patch (58%) 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 rename udev-115-rulesinstall.patch => 0022-only-install-.rules.patch (57%) 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-Removed-extra-space-from-udevinfo-symlink-output.patch create mode 100644 Makefile.git delete mode 100644 udev-115-looplast.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/udev-115-git-20070907.patch b/0008-man-recreate-man-pages.patch similarity index 58% rename from udev-115-git-20070907.patch rename to 0008-man-recreate-man-pages.patch index 41284a7..d22c38a 100644 --- a/udev-115-git-20070907.patch +++ b/0008-man-recreate-man-pages.patch @@ -1,314 +1,20 @@ -diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules -deleted file mode 100644 -index ee349dc..0000000 ---- a/etc/udev/gentoo/05-udev-early.rules -+++ /dev/null -@@ -1,9 +0,0 @@ --# ignore these events until someone needs them --SUBSYSTEM=="drivers", OPTIONS="ignore_device" --SUBSYSTEM=="module", OPTIONS="ignore_device" -- --# 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", 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 dd32971..7c2ac81 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 -@@ -241,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-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" -- -diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules -index bff2fe5..bdce004 100644 ---- a/etc/udev/rules.d/50-udev-default.rules -+++ b/etc/udev/rules.d/50-udev-default.rules -@@ -17,18 +17,15 @@ 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 -@@ -58,7 +55,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 +68,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" -@@ -80,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" -@@ -91,7 +89,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" -@@ -103,3 +102,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" -+ -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" - -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" - -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; - +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 @@ -405,7 +111,7 @@ index 7594253..daa583b 100644 .PP \fBudev\fR(7) diff --git a/udev.7 b/udev.7 -index 821a476..874c9ab 100644 +index 821a476..5f0ebb9 100644 --- a/udev.7 +++ b/udev.7 @@ -1,6 +1,6 @@ @@ -744,7 +450,7 @@ index 821a476..874c9ab 100644 \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\. ++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 @@ -796,7 +502,7 @@ index 821a476..874c9ab 100644 .RE .PP \fB$id\fR, \fB%b\fR -@@ -332,85 +328,90 @@ The name of the device matched while searching the devpath upwards for +@@ -332,7 +328,7 @@ The name of the device matched while searching the devpath upwards for \fBKERNELS\fR, \fBDRIVERS\fR and @@ -804,11 +510,8 @@ index 821a476..874c9ab 100644 +\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, + \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 @@ -853,11 +556,6 @@ index 821a476..874c9ab 100644 .RS 4 -The node name of the parent device. +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 @@ -907,272 +605,6 @@ index 821a476..874c9ab 100644 .SH "SEE ALSO" .PP \fBudevd\fR(8), -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.xml b/udev.xml -index b43abb7..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. - - - -@@ -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_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..62217ff 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)) { -@@ -262,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); -@@ -281,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_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; - } - } -diff --git a/udev_rules.c b/udev_rules.c -index 0dcbf15..dcd0914 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) -@@ -604,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, -@@ -625,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 }, -@@ -843,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); -@@ -986,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; -@@ -1031,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; - } -@@ -1464,9 +1473,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; - } -@@ -1477,6 +1491,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; -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); -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" -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/udevd.8 b/udevd.8 index 25996d1..46edde4 100644 --- a/udevd.8 @@ -1299,186 +731,6 @@ index 25996d1..46edde4 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -diff --git a/udevd.c b/udevd.c -index 8f56de6..5ff5d3f 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,22 +504,27 @@ 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; - } - } - -- /* 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); - 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]; diff --git a/udevinfo.8 b/udevinfo.8 index 337f206..6115f29 100644 --- a/udevinfo.8 @@ -1574,19 +826,6 @@ index 337f206..6115f29 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -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.8 b/udevmonitor.8 index 0adb998..5b624a7 100644 --- a/udevmonitor.8 @@ -1645,28 +884,6 @@ index 0adb998..5b624a7 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -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/udevsettle.8 b/udevsettle.8 index 818a7ff..39054d9 100644 --- a/udevsettle.8 @@ -1872,16 +1089,6 @@ index 5ef9e8f..06c7e45 100644 .SH "SEE ALSO" .PP \fBudev\fR(7) -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/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/udev-115-rulesinstall.patch b/0022-only-install-.rules.patch similarity index 57% rename from udev-115-rulesinstall.patch rename to 0022-only-install-.rules.patch index 50d5a44..04a0d13 100644 --- a/udev-115-rulesinstall.patch +++ b/0022-only-install-.rules.patch @@ -1,6 +1,17 @@ ---- udev-115/Makefile.rulesinstall 2007-09-07 14:46:07.000000000 +0200 -+++ udev-115/Makefile 2007-09-07 14:46:38.000000000 +0200 -@@ -234,9 +234,9 @@ install-config: +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 @@ -13,3 +24,6 @@ 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-Removed-extra-space-from-udevinfo-symlink-output.patch b/0026-Removed-extra-space-from-udevinfo-symlink-output.patch new file mode 100644 index 0000000..5f4a289 --- /dev/null +++ b/0026-Removed-extra-space-from-udevinfo-symlink-output.patch @@ -0,0 +1,35 @@ +From 1e3ee197983daecbe78ff5cf7e4dc8f431ccf185 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Sep 2007 13:53:26 +0200 +Subject: [PATCH] Removed extra space from udevinfo symlink output. +See also https://bugzilla.redhat.com/show_bug.cgi?id=173001 +--- + 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/Makefile.git b/Makefile.git new file mode 100644 index 0000000..ea5486a --- /dev/null +++ b/Makefile.git @@ -0,0 +1,6 @@ +Patch: + @for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done + +patch: + @for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done + diff --git a/start_udev b/start_udev index 4bdac13..f3c86c7 100755 --- a/start_udev +++ b/start_udev @@ -94,6 +94,7 @@ make_extra_nodes () { pushd $devdir &> "$udev_root/null" set * if [ "$1" != "*" ]; then + echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." cp -ar "$@" $udev_root/ pushd "$udev_root" &> "$udev_root/null" [ -x /sbin/restorecon ] && /sbin/restorecon "$@" @@ -180,6 +181,7 @@ getval() { make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 +UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug @@ -194,9 +196,12 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi - if strstr "$cmdline" fastudev; then - /sbin/udevcontrol env FASTUDEV=1 - fi + if strstr "$cmdline" udevinfo; then + /sbin/udevcontrol log_priority=info + fi + if strstr "$cmdline" udevtrace; then + UDEV_OPTS="$UDEV_OPTS --debug-trace" + fi if strstr "$cmdline" udevchilds; then /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) fi @@ -211,7 +216,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevcontrol env MODPROBE_DEBUG= else echo -n " kernel too old for this udev version " - /sbin/udevd -d + /sbin/udevd -d $UDEV_OPTS ret=10 fi diff --git a/udev-115-looplast.patch b/udev-115-looplast.patch deleted file mode 100644 index 1ae1b88..0000000 --- a/udev-115-looplast.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- udev-115/etc/udev/rules.d/50-udev-default.rules.looplast 2007-09-07 14:32:01.000000000 +0200 -+++ udev-115/etc/udev/rules.d/50-udev-default.rules 2007-09-07 14:33:14.000000000 +0200 -@@ -9,6 +9,9 @@ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", - KERNEL=="console", MODE="0600", OPTIONS="last_rule" - KERNEL=="tty0", SYMLINK+="systty" - -+# loop -+KERNEL=="loop[0-9]", SUBSYSTEM=="block", GROUP="disk", MODE="0640", OPTIONS+="last_rule" -+ - # serial - KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" - KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" diff --git a/udev.spec b/udev.spec index bbbfc27..663bbe5 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 2%{?dist} +Release: 3.20070920git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,11 +18,35 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh -Patch1: udev-089-nopie.patch -Patch2: udev-091-lib64.patch -Patch3: udev-115-git-20070907.patch -Patch4: udev-115-looplast.patch -Patch5: udev-115-rulesinstall.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-Removed-extra-space-from-udevinfo-symlink-output.patch + +Patch100: udev-089-nopie.patch +Patch101: udev-091-lib64.patch ExclusiveOS: Linux URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ @@ -70,13 +94,34 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .nopie -%patch2 -p1 -b .lib64 -%patch3 -p1 -b .git20070907 -%patch4 -p1 -b .looplast -%patch5 -p1 -b .rulesinstall +%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 + +%patch100 -p1 -b .nopie +%patch101 -p1 -b .lib64 -rm -f etc/udev/redhat/51-hotplug.rules etc/udev/redhat/50* etc/udev/redhat/06* %build %if %{with_static} @@ -189,11 +234,16 @@ done for i in \ etc/udev/redhat/*.rules \ +%ifarch ia64 etc/udev/packages/40-ia64.rules \ - etc/udev/packages/40-alsa.rules \ +%endif +%ifarch ppc ppc64 etc/udev/packages/40-ppc.rules \ +%endif +%ifarch s390 s390x etc/udev/packages/40-s390.rules \ - etc/udev/packages/40-zaptel.rules \ +%endif + etc/udev/packages/40-alsa.rules \ etc/udev/packages/64-md-raid.rules \ etc/udev/packages/64-device-mapper.rules \ ; do @@ -352,6 +402,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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) From 0a45e02b4bfcba2777732293420852be2b96f1ce Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 21 Sep 2007 16:32:15 +0000 Subject: [PATCH 361/640] - more upstream fixes from git --- ...a-space-from-udevinfo-symlink-output.patch | 8 +- ...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 ++++++++++++++++++ udev.spec | 16 +- 7 files changed, 412 insertions(+), 5 deletions(-) rename 0026-Removed-extra-space-from-udevinfo-symlink-output.patch => 0026-remove-extra-space-from-udevinfo-symlink-output.patch (80%) 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 diff --git a/0026-Removed-extra-space-from-udevinfo-symlink-output.patch b/0026-remove-extra-space-from-udevinfo-symlink-output.patch similarity index 80% rename from 0026-Removed-extra-space-from-udevinfo-symlink-output.patch rename to 0026-remove-extra-space-from-udevinfo-symlink-output.patch index 5f4a289..8342baa 100644 --- a/0026-Removed-extra-space-from-udevinfo-symlink-output.patch +++ b/0026-remove-extra-space-from-udevinfo-symlink-output.patch @@ -1,8 +1,8 @@ -From 1e3ee197983daecbe78ff5cf7e4dc8f431ccf185 Mon Sep 17 00:00:00 2001 +From c952356635a30f610a4d1b84e84d678fee7772c8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer -Date: Thu, 20 Sep 2007 13:53:26 +0200 -Subject: [PATCH] Removed extra space from udevinfo symlink output. -See also https://bugzilla.redhat.com/show_bug.cgi?id=173001 +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/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/udev.spec b/udev.spec index 663bbe5..cbeacfb 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 3.20070920git%{?dist} +Release: 4.20070921git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -44,6 +44,12 @@ 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-Removed-extra-space-from-udevinfo-symlink-output.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 @@ -118,6 +124,11 @@ which contains functions to get volume ids. %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 @@ -402,6 +413,9 @@ 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 From b4a3ffd5823a5401c7304d4ff3b0ba908f547f98 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 21 Sep 2007 16:32:15 +0000 Subject: [PATCH 362/640] - more upstream fixes from git --- ...a-space-from-udevinfo-symlink-output.patch | 8 +- ...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 ++++++++++++++++++ udev.spec | 16 +- 7 files changed, 412 insertions(+), 5 deletions(-) rename 0026-Removed-extra-space-from-udevinfo-symlink-output.patch => 0026-remove-extra-space-from-udevinfo-symlink-output.patch (80%) 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 diff --git a/0026-Removed-extra-space-from-udevinfo-symlink-output.patch b/0026-remove-extra-space-from-udevinfo-symlink-output.patch similarity index 80% rename from 0026-Removed-extra-space-from-udevinfo-symlink-output.patch rename to 0026-remove-extra-space-from-udevinfo-symlink-output.patch index 5f4a289..8342baa 100644 --- a/0026-Removed-extra-space-from-udevinfo-symlink-output.patch +++ b/0026-remove-extra-space-from-udevinfo-symlink-output.patch @@ -1,8 +1,8 @@ -From 1e3ee197983daecbe78ff5cf7e4dc8f431ccf185 Mon Sep 17 00:00:00 2001 +From c952356635a30f610a4d1b84e84d678fee7772c8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer -Date: Thu, 20 Sep 2007 13:53:26 +0200 -Subject: [PATCH] Removed extra space from udevinfo symlink output. -See also https://bugzilla.redhat.com/show_bug.cgi?id=173001 +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/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/udev.spec b/udev.spec index 663bbe5..cbeacfb 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 3.20070920git%{?dist} +Release: 4.20070921git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -44,6 +44,12 @@ 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-Removed-extra-space-from-udevinfo-symlink-output.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 @@ -118,6 +124,11 @@ which contains functions to get volume ids. %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 @@ -402,6 +413,9 @@ 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 From fbebb54fa560a4f06e848c69bc5e2a36c72a6bc7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 21 Sep 2007 16:34:52 +0000 Subject: [PATCH 363/640] removed duplicate patch --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index cbeacfb..fbdf4f8 100644 --- a/udev.spec +++ b/udev.spec @@ -43,7 +43,6 @@ 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-Removed-extra-space-from-udevinfo-symlink-output.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 From 64b78c212495146b6583050ced1a1c975533562e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 21 Sep 2007 16:34:52 +0000 Subject: [PATCH 364/640] removed duplicate patch --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index cbeacfb..fbdf4f8 100644 --- a/udev.spec +++ b/udev.spec @@ -43,7 +43,6 @@ 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-Removed-extra-space-from-udevinfo-symlink-output.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 From 71fa48ad546aeceff44acb30bf62927821dce4dc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 10 Oct 2007 13:08:00 +0000 Subject: [PATCH 365/640] - better modprobe options for the kernel command line 'modprobedebug' option --- start_udev | 5 +---- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index f3c86c7..84c0667 100755 --- a/start_udev +++ b/start_udev @@ -189,9 +189,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] if strstr "$cmdline" modprobedebug; then - export MODPROBE_OPTIONS="-s -v" - /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v" - /sbin/udevcontrol env MODPROBE_DEBUG="1" + /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" fi if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug @@ -213,7 +211,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] wait /sbin/udevcontrol env STARTUP= - /sbin/udevcontrol env MODPROBE_DEBUG= else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev.spec b/udev.spec index fbdf4f8..bf4fd59 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.20070921git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -412,6 +412,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 96e7b59ebacde16ba3dff751ab6082305f1e98da Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 10 Oct 2007 13:08:00 +0000 Subject: [PATCH 366/640] - better modprobe options for the kernel command line 'modprobedebug' option --- start_udev | 5 +---- udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index f3c86c7..84c0667 100755 --- a/start_udev +++ b/start_udev @@ -189,9 +189,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] if strstr "$cmdline" modprobedebug; then - export MODPROBE_OPTIONS="-s -v" - /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v" - /sbin/udevcontrol env MODPROBE_DEBUG="1" + /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" fi if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug @@ -213,7 +211,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] wait /sbin/udevcontrol env STARTUP= - /sbin/udevcontrol env MODPROBE_DEBUG= else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev.spec b/udev.spec index fbdf4f8..bf4fd59 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.20070921git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -412,6 +412,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 8fc8ffa9528257d08ebcc155bfb699a54d9255f0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 12 Oct 2007 11:53:35 +0000 Subject: [PATCH 367/640] - added upstream patch for rhbz#328691 - moved floppy module loading to pnp-alias in /etc/modprobe.d/floppy-pnp --- ...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 | 32 +- 38 files changed, 672 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 bf4fd59..94c7601 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 5.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 From 014d60c40e8ae744abc70d4c80ae1edb964e8b23 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 12 Oct 2007 11:53:35 +0000 Subject: [PATCH 368/640] - added upstream patch for rhbz#328691 - moved floppy module loading to pnp-alias in /etc/modprobe.d/floppy-pnp --- ...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 | 32 +- 38 files changed, 672 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 bf4fd59..94c7601 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 115 -Release: 5.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 From e238b076d0957ceaee83d7ca89eb189cf54d1d16 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 15 Oct 2007 13:20:44 +0000 Subject: [PATCH 369/640] - version 116 --- .cvsignore | 2 +- ...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 | 95 +- 40 files changed, 21 insertions(+), 3797 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/.cvsignore b/.cvsignore index da580a5..ada644e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-115.tar.bz2 +udev-116.tar.bz2 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 94c7601..0f8d843 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: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,44 +18,6 @@ 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 - Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -105,42 +67,6 @@ 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 - %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -422,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 @@ -444,6 +373,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 @@ -452,6 +385,13 @@ 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) + +* 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) @@ -461,6 +401,9 @@ rm -rf $RPM_BUILD_ROOT - big rule unification and cleanup - added persistent names for network and cdrom devices over reboot +* 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 2c757bb7e346a2f3222b3a55cc4c63f96e282bef Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 15 Oct 2007 13:20:44 +0000 Subject: [PATCH 370/640] - version 116 --- .cvsignore | 2 +- ...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 | 95 +- 40 files changed, 21 insertions(+), 3797 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/.cvsignore b/.cvsignore index da580a5..ada644e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-115.tar.bz2 +udev-116.tar.bz2 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 94c7601..0f8d843 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: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,44 +18,6 @@ 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 - Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -105,42 +67,6 @@ 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 - %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -422,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* 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 @@ -444,6 +373,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 @@ -452,6 +385,13 @@ 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) + +* 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) @@ -461,6 +401,9 @@ rm -rf $RPM_BUILD_ROOT - big rule unification and cleanup - added persistent names for network and cdrom devices over reboot +* 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 c5a016502bcbf5decae971dbcf63ecbe93ecae3d Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 15 Oct 2007 19:29:11 +0000 Subject: [PATCH 371/640] makefile update to properly grab makefile.common --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d1146a6..0fd5003 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,19 @@ NAME := udev SPECFILE = $(firstword $(wildcard *.spec)) UPSTREAM_CHECKS = sign -include ../common/Makefile.common +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attempt a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) From 3d3a3af4585155b7cb400d054de02007f475110e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 15 Oct 2007 19:29:11 +0000 Subject: [PATCH 372/640] makefile update to properly grab makefile.common --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c1b764a..79bd188 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,22 @@ # Makefile for source rpm: udev -# $Id: Makefile,v 1.1 2004/09/09 13:42:32 cvsdist Exp $ +# $Id: Makefile,v 1.2 2004/11/04 16:16:37 harald Exp $ NAME := udev SPECFILE = $(firstword $(wildcard *.spec)) UPSTREAM_CHECKS = sign -include ../common/Makefile.common +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attempt a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) From 8c436454d5cc85461411604877f178ab2ae65c02 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 16 Oct 2007 15:52:09 +0000 Subject: [PATCH 373/640] sparc64 requires -fPIE not -fpie --- udev.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0f8d843..4fa39ad 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 116 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -110,7 +110,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" \ @@ -135,7 +139,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=" \ @@ -348,6 +356,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Oct 16 2007 Dennis Gilmore 116-2 +- sparc64 requires -fPIE not -fpie + * Mon Oct 15 2007 Harald Hoyer 116-1 - version 116 From 092d541b37beb9d6ea1bb9cb130f3f93c3ae45d2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 16 Oct 2007 15:52:09 +0000 Subject: [PATCH 374/640] sparc64 requires -fPIE not -fpie --- udev.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0f8d843..4fa39ad 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 116 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -110,7 +110,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" \ @@ -135,7 +139,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=" \ @@ -348,6 +356,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Oct 16 2007 Dennis Gilmore 116-2 +- sparc64 requires -fPIE not -fpie + * Mon Oct 15 2007 Harald Hoyer 116-1 - version 116 From 9cdf66968ae34f21c5ee6489a2b2f590c2e263d4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 18 Oct 2007 19:50:31 +0000 Subject: [PATCH 375/640] - 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 --- udev-116-nettype.patch | 14 ++++++++++++++ udev.spec | 21 ++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) 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() { diff --git a/udev.spec b/udev.spec index 4fa39ad..7e1c9d0 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 116 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,13 +18,15 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh +Patch1: udev-116-nettype.patch + Patch100: udev-089-nopie.patch 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 @@ -67,6 +69,7 @@ which contains functions to get volume ids. %prep %setup -q +%patch1 -p1 -b .nettype %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -228,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 @@ -237,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 @@ -248,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 @@ -356,6 +361,12 @@ 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 From 61e50e95cd4159e7065485ecef3900c46525a621 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 18 Oct 2007 19:50:31 +0000 Subject: [PATCH 376/640] - 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 --- udev-116-nettype.patch | 14 ++++++++++++++ udev.spec | 21 ++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) 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() { diff --git a/udev.spec b/udev.spec index 4fa39ad..7e1c9d0 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 116 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,13 +18,15 @@ Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh +Patch1: udev-116-nettype.patch + Patch100: udev-089-nopie.patch 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 @@ -67,6 +69,7 @@ which contains functions to get volume ids. %prep %setup -q +%patch1 -p1 -b .nettype %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -228,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 @@ -237,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 @@ -248,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 @@ -356,6 +361,12 @@ 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 From 98b3b5a9d8dc930494becc4310bb240187bb28f3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 8 Jan 2008 13:29:53 +0000 Subject: [PATCH 377/640] - version 118 - removed old USB compat rule (rhbz#424331) --- .cvsignore | 2 +- sources | 2 +- udev-116-rhrules.patch | 12 ++++++++++++ udev.spec | 21 ++++++++++++++------- 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 udev-116-rhrules.patch diff --git a/.cvsignore b/.cvsignore index ada644e..3ecdfda 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-116.tar.bz2 +udev-118.tar.bz2 diff --git a/sources b/sources index 64f130a..40d297a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -02c49d93ffda4a104c853c082138b835 udev-116.tar.bz2 +39ab2404464c7026c65eb878827192b9 udev-118.tar.bz2 diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch new file mode 100644 index 0000000..85f5fd8 --- /dev/null +++ b/udev-116-rhrules.patch @@ -0,0 +1,12 @@ +diff -up udev-116/etc/udev/redhat/40-redhat.rules.rhrules udev-116/etc/udev/redhat/40-redhat.rules +--- udev-116/etc/udev/redhat/40-redhat.rules.rhrules 2008-01-08 12:25:00.000000000 +0100 ++++ udev-116/etc/udev/redhat/40-redhat.rules 2008-01-08 12:25:53.000000000 +0100 +@@ -9,8 +9,6 @@ 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=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644" +- + BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" + + KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" diff --git a/udev.spec b/udev.spec index 7e1c9d0..9053d81 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 116 -Release: 3%{?dist} +Version: 118 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Patch1: udev-116-nettype.patch +Patch2: udev-116-rhrules.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -70,6 +71,7 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .nettype +%patch2 -p1 -b .rhrules %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -96,7 +98,8 @@ make \ extras/floppy \ " all -for i in udevd udevtrigger udevsettle \ +for i in udevd \ + udevadm \ extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ extras/edd_id/edd_id \ @@ -186,7 +189,7 @@ for i in extras/scsi_id/scsi_id \ install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static done -for i in udevd udevtrigger udevsettle; do +for i in udevd udevadm; do install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$i.static done %endif @@ -281,9 +284,10 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %attr(0755,root,root) /sbin/udevcontrol -%attr(0755,root,root) /sbin/udevd +%attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevsettle +%attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id %attr(0755,root,root) %{udev_scriptdir}/scsi_id @@ -338,8 +342,7 @@ rm -rf $RPM_BUILD_ROOT %files static %doc COPYING %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) /sbin/udevadm.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 @@ -361,6 +364,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jan 08 2008 Harald Hoyer 118-1 +- version 118 +- removed old USB compat rule (rhbz#424331) + * Thu Oct 18 2007 Harald Hoyer 116-3 - fixed preun chkconfig - added /sbin path to chkconfig in post section From e7cf708e92e14ca3ee329651b6f70cb4d431a343 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 8 Jan 2008 13:29:53 +0000 Subject: [PATCH 378/640] - version 118 - removed old USB compat rule (rhbz#424331) --- .cvsignore | 2 +- sources | 2 +- udev-116-rhrules.patch | 12 ++++++++++++ udev.spec | 21 ++++++++++++++------- 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 udev-116-rhrules.patch diff --git a/.cvsignore b/.cvsignore index ada644e..3ecdfda 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-116.tar.bz2 +udev-118.tar.bz2 diff --git a/sources b/sources index 64f130a..40d297a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -02c49d93ffda4a104c853c082138b835 udev-116.tar.bz2 +39ab2404464c7026c65eb878827192b9 udev-118.tar.bz2 diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch new file mode 100644 index 0000000..85f5fd8 --- /dev/null +++ b/udev-116-rhrules.patch @@ -0,0 +1,12 @@ +diff -up udev-116/etc/udev/redhat/40-redhat.rules.rhrules udev-116/etc/udev/redhat/40-redhat.rules +--- udev-116/etc/udev/redhat/40-redhat.rules.rhrules 2008-01-08 12:25:00.000000000 +0100 ++++ udev-116/etc/udev/redhat/40-redhat.rules 2008-01-08 12:25:53.000000000 +0100 +@@ -9,8 +9,6 @@ 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=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644" +- + BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" + + KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" diff --git a/udev.spec b/udev.spec index 7e1c9d0..9053d81 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 116 -Release: 3%{?dist} +Version: 118 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Patch1: udev-116-nettype.patch +Patch2: udev-116-rhrules.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -70,6 +71,7 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .nettype +%patch2 -p1 -b .rhrules %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 @@ -96,7 +98,8 @@ make \ extras/floppy \ " all -for i in udevd udevtrigger udevsettle \ +for i in udevd \ + udevadm \ extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ extras/edd_id/edd_id \ @@ -186,7 +189,7 @@ for i in extras/scsi_id/scsi_id \ install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static done -for i in udevd udevtrigger udevsettle; do +for i in udevd udevadm; do install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$i.static done %endif @@ -281,9 +284,10 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %attr(0755,root,root) /sbin/udevcontrol -%attr(0755,root,root) /sbin/udevd +%attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevsettle +%attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id %attr(0755,root,root) %{udev_scriptdir}/scsi_id @@ -338,8 +342,7 @@ rm -rf $RPM_BUILD_ROOT %files static %doc COPYING %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) /sbin/udevadm.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 @@ -361,6 +364,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jan 08 2008 Harald Hoyer 118-1 +- version 118 +- removed old USB compat rule (rhbz#424331) + * Thu Oct 18 2007 Harald Hoyer 116-3 - fixed preun chkconfig - added /sbin path to chkconfig in post section From 01f9c12dacdf639efb5e861acbbc786d3666cce2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 8 Jan 2008 14:04:12 +0000 Subject: [PATCH 379/640] -disabled static version --- udev.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 9053d81..898a77a 100644 --- a/udev.spec +++ b/udev.spec @@ -1,5 +1,5 @@ %define debug true -%define with_static 1 +%define with_static 0 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware @@ -367,6 +367,7 @@ rm -rf $RPM_BUILD_ROOT * Tue Jan 08 2008 Harald Hoyer 118-1 - version 118 - removed old USB compat rule (rhbz#424331) +- disabled static version * Thu Oct 18 2007 Harald Hoyer 116-3 - fixed preun chkconfig From fccce2dfec1b2c3600c19097ecb6f42adbe3b8d2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 8 Jan 2008 14:04:12 +0000 Subject: [PATCH 380/640] -disabled static version --- udev.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 9053d81..898a77a 100644 --- a/udev.spec +++ b/udev.spec @@ -1,5 +1,5 @@ %define debug true -%define with_static 1 +%define with_static 0 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware @@ -367,6 +367,7 @@ rm -rf $RPM_BUILD_ROOT * Tue Jan 08 2008 Harald Hoyer 118-1 - version 118 - removed old USB compat rule (rhbz#424331) +- disabled static version * Thu Oct 18 2007 Harald Hoyer 116-3 - fixed preun chkconfig From 300efe54f4cfa1016c5a951fe9ae88d60fa8e298 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 9 Jan 2008 12:22:57 +0000 Subject: [PATCH 381/640] - reenabled static version --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 898a77a..bff0e7e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -81,6 +81,8 @@ which contains functions to get volume ids. # Do not USE_LOG in udev.static, # because it causes segfaults on openlog (bug 136005) make \ + libdir="/%{_lib}" \ + usrlibdir="%{_libdir}" \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ @@ -364,6 +366,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jan 09 2008 Harald Hoyer 118-2 +- reenabled static version + * Tue Jan 08 2008 Harald Hoyer 118-1 - version 118 - removed old USB compat rule (rhbz#424331) From 044f8613a109338f2b1b6d5785454867c0f09d7d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 9 Jan 2008 12:22:57 +0000 Subject: [PATCH 382/640] - reenabled static version --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 898a77a..bff0e7e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -81,6 +81,8 @@ which contains functions to get volume ids. # Do not USE_LOG in udev.static, # because it causes segfaults on openlog (bug 136005) make \ + libdir="/%{_lib}" \ + usrlibdir="%{_libdir}" \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ @@ -364,6 +366,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Jan 09 2008 Harald Hoyer 118-2 +- reenabled static version + * Tue Jan 08 2008 Harald Hoyer 118-1 - version 118 - removed old USB compat rule (rhbz#424331) From 9c261920b245d618907acbfcc330e7059914555f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 9 Jan 2008 12:23:31 +0000 Subject: [PATCH 383/640] - reenabled static version --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bff0e7e..99b8dbf 100644 --- a/udev.spec +++ b/udev.spec @@ -1,5 +1,5 @@ %define debug true -%define with_static 0 +%define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware From fcbc73b894b1d7150b9358d941616e420c1e0ecb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 9 Jan 2008 12:23:31 +0000 Subject: [PATCH 384/640] - reenabled static version --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bff0e7e..99b8dbf 100644 --- a/udev.spec +++ b/udev.spec @@ -1,5 +1,5 @@ %define debug true -%define with_static 0 +%define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware From 8ceed97a39f1a2f5919464d2af6d9e0a42d04cf5 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 04:41:57 +0000 Subject: [PATCH 385/640] - Autorebuild for GCC 4.3 --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 99b8dbf..5e3a5c9 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -366,6 +366,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Feb 18 2008 Fedora Release Engineering - 118-3 +- Autorebuild for GCC 4.3 + * Wed Jan 09 2008 Harald Hoyer 118-2 - reenabled static version From 909e9abf9b5837b2006e182e49bb8817aa056939 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 04:41:57 +0000 Subject: [PATCH 386/640] - Autorebuild for GCC 4.3 --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 99b8dbf..5e3a5c9 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -366,6 +366,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Feb 18 2008 Fedora Release Engineering - 118-3 +- Autorebuild for GCC 4.3 + * Wed Jan 09 2008 Harald Hoyer 118-2 - reenabled static version From 77cc6a4be0daf996ce97a2ec77175af38dccb457 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 11:07:27 +0000 Subject: [PATCH 387/640] - removed the backgrounding of node creation (rhbz#381461) --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 84c0667..3c4f40c 100755 --- a/start_udev +++ b/start_udev @@ -85,7 +85,7 @@ make_extra_nodes () { for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then ( sed -e 's,#.*,,g' "$i" | \ - xargs_simple -n 100 $MAKEDEV -x ) & + xargs_simple -n 100 $MAKEDEV -x ) fi done fi From 117812f91a8029a4c0ee33914f41576b60bdc60a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 11:07:27 +0000 Subject: [PATCH 388/640] - removed the backgrounding of node creation (rhbz#381461) --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 84c0667..3c4f40c 100755 --- a/start_udev +++ b/start_udev @@ -85,7 +85,7 @@ make_extra_nodes () { for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then ( sed -e 's,#.*,,g' "$i" | \ - xargs_simple -n 100 $MAKEDEV -x ) & + xargs_simple -n 100 $MAKEDEV -x ) fi done fi From 9aadd0eaf5d2db3810c18aa72ffc66c7ed7e6e0b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 11:26:02 +0000 Subject: [PATCH 389/640] satisfied rpmlint --- udev-post.init | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/udev-post.init b/udev-post.init index 478f352..b2a0f87 100644 --- a/udev-post.init +++ b/udev-post.init @@ -8,14 +8,18 @@ # description: Moves the generated persistent udev rules to /etc/udev/rules.d # ### BEGIN INIT INFO -# Requires: $local_fs +# Default-Start: 345 +# Required-Start: $local_fs +# Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d +# Description: Moves the generated persistent udev rules to /etc/udev/rules.d +# Provides: udev-post ### END INIT INFO . /etc/rc.d/init.d/functions # See how we were called. case "$1" in - start) + start|reload) STRING=$"Adding udev persistent rules" # copy the rules generated before / was mounted read-write @@ -35,11 +39,15 @@ case "$1" in echo fi done + touch /var/lock/subsys/udev-post exit 0 ;; stop) exit 0 ;; + status) + exit 0 + ;; *) echo $"Usage: $0 {start}" exit 1 From 8f604df8fa542ba596f1a9073ef9f34f67d8c0c5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 11:26:02 +0000 Subject: [PATCH 390/640] satisfied rpmlint --- udev-post.init | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/udev-post.init b/udev-post.init index 478f352..b2a0f87 100644 --- a/udev-post.init +++ b/udev-post.init @@ -8,14 +8,18 @@ # description: Moves the generated persistent udev rules to /etc/udev/rules.d # ### BEGIN INIT INFO -# Requires: $local_fs +# Default-Start: 345 +# Required-Start: $local_fs +# Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d +# Description: Moves the generated persistent udev rules to /etc/udev/rules.d +# Provides: udev-post ### END INIT INFO . /etc/rc.d/init.d/functions # See how we were called. case "$1" in - start) + start|reload) STRING=$"Adding udev persistent rules" # copy the rules generated before / was mounted read-write @@ -35,11 +39,15 @@ case "$1" in echo fi done + touch /var/lock/subsys/udev-post exit 0 ;; stop) exit 0 ;; + status) + exit 0 + ;; *) echo $"Usage: $0 {start}" exit 1 From 7d4c197cd67b9dacf73a91415bb8153b8c235dfd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 11:36:39 +0000 Subject: [PATCH 391/640] - do not change sg group ownership to disk for scanners (rhbz#432602) --- udev-116-rhrules.patch | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch index 85f5fd8..6e3bc73 100644 --- a/udev-116-rhrules.patch +++ b/udev-116-rhrules.patch @@ -1,7 +1,24 @@ -diff -up udev-116/etc/udev/redhat/40-redhat.rules.rhrules udev-116/etc/udev/redhat/40-redhat.rules ---- udev-116/etc/udev/redhat/40-redhat.rules.rhrules 2008-01-08 12:25:00.000000000 +0100 -+++ udev-116/etc/udev/redhat/40-redhat.rules 2008-01-08 12:25:53.000000000 +0100 -@@ -9,8 +9,6 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS== +diff -up udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules udev-118/etc/udev/rules.d/50-udev-default.rules +--- udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 ++++ udev-118/etc/udev/rules.d/50-udev-default.rules 2008-02-20 12:17:26.000000000 +0100 +@@ -67,7 +67,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{ + 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=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640" + KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" + KERNEL=="pg[0-9]*", GROUP="disk" + KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" +diff -up udev-118/etc/udev/redhat/40-redhat.rules.rhrules udev-118/etc/udev/redhat/40-redhat.rules +--- udev-118/etc/udev/redhat/40-redhat.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 ++++ udev-118/etc/udev/redhat/40-redhat.rules 2008-02-20 12:19:07.000000000 +0100 +@@ -5,12 +5,10 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="flopp + + KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" From 1c37832687248090d30ac3c29b01d1805e9033c1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 11:36:39 +0000 Subject: [PATCH 392/640] - do not change sg group ownership to disk for scanners (rhbz#432602) --- udev-116-rhrules.patch | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch index 85f5fd8..6e3bc73 100644 --- a/udev-116-rhrules.patch +++ b/udev-116-rhrules.patch @@ -1,7 +1,24 @@ -diff -up udev-116/etc/udev/redhat/40-redhat.rules.rhrules udev-116/etc/udev/redhat/40-redhat.rules ---- udev-116/etc/udev/redhat/40-redhat.rules.rhrules 2008-01-08 12:25:00.000000000 +0100 -+++ udev-116/etc/udev/redhat/40-redhat.rules 2008-01-08 12:25:53.000000000 +0100 -@@ -9,8 +9,6 @@ ACTION=="add", KERNEL=="sg[0-9]*", BUS== +diff -up udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules udev-118/etc/udev/rules.d/50-udev-default.rules +--- udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 ++++ udev-118/etc/udev/rules.d/50-udev-default.rules 2008-02-20 12:17:26.000000000 +0100 +@@ -67,7 +67,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{ + 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=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640" + KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" + KERNEL=="pg[0-9]*", GROUP="disk" + KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" +diff -up udev-118/etc/udev/redhat/40-redhat.rules.rhrules udev-118/etc/udev/redhat/40-redhat.rules +--- udev-118/etc/udev/redhat/40-redhat.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 ++++ udev-118/etc/udev/redhat/40-redhat.rules 2008-02-20 12:19:07.000000000 +0100 +@@ -5,12 +5,10 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="flopp + + KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" ++ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" From cbc032e6713d2c815348a5060663fc6fadc74752 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 17:05:41 +0000 Subject: [PATCH 393/640] - made symlinks relative (rhbz#432878) - removed the backgrounding of node creation (rhbz#381461) - do not change sg group ownership to disk for scanners (rhbz#432602) - attempt to fix selinux symlink bug (rhbz#345071) - fixed URL - made rpmlint mostly happy --- udev-118-slink-selinux.patch | 21 +++++++++++++++++++++ udev.spec | 22 ++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 udev-118-slink-selinux.patch diff --git a/udev-118-slink-selinux.patch b/udev-118-slink-selinux.patch new file mode 100644 index 0000000..5599796 --- /dev/null +++ b/udev-118-slink-selinux.patch @@ -0,0 +1,21 @@ +diff -up udev-118/udev_node.c.slink udev-118/udev_node.c +--- udev-118/udev_node.c.slink 2008-02-20 17:52:39.000000000 +0100 ++++ udev-118/udev_node.c 2008-02-20 17:56:55.000000000 +0100 +@@ -146,7 +146,7 @@ static int node_symlink(const char *node + buf[len] = '\0'; + if (strcmp(target, buf) == 0) { + info("preserve already existing symlink '%s' to '%s'", slink, target); +- selinux_setfilecon(slink, NULL, S_IFLNK); ++ /*selinux_setfilecon(slink, NULL, S_IFLNK);*/ + goto exit; + } + } +@@ -164,7 +164,7 @@ static int node_symlink(const char *node + strlcpy(slink_tmp, slink, sizeof(slink_tmp)); + strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); + unlink(slink_tmp); +- selinux_setfscreatecon(slink_tmp, NULL, S_IFLNK); ++ selinux_setfscreatecon(slink, NULL, S_IFLNK); + retval = symlink(target, slink_tmp); + selinux_resetfscreatecon(); + if (retval != 0) { diff --git a/udev.spec b/udev.spec index 5e3a5c9..1985c49 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 3%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -23,9 +23,10 @@ Patch2: udev-116-rhrules.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch +Patch102: udev-118-slink-selinux.patch ExclusiveOS: Linux -URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ +URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): MAKEDEV >= 0:3.11 @@ -74,6 +75,7 @@ which contains functions to get volume ids. %patch2 -p1 -b .rhrules %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 +%patch102 -p1 -b .slink %build @@ -180,6 +182,10 @@ ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id ln -sf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libvolume_id.so.*.*) \ $RPM_BUILD_ROOT%{_libdir}/libvolume_id.so +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor + %if %{with_static} for i in extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ @@ -302,7 +308,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh %attr(0755,root,root) %{udev_scriptdir}/firmware.sh -%attr(0755,root,root) %{udev_scriptdir}/rule_generator.functions +%attr(0644,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 @@ -322,7 +328,7 @@ rm -rf $RPM_BUILD_ROOT #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config -%attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp +%config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp %dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* @@ -366,6 +372,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Feb 20 2008 Harald Hoyer 118-4 +- made symlinks relative (rhbz#432878) +- removed the backgrounding of node creation (rhbz#381461) +- do not change sg group ownership to disk for scanners (rhbz#432602) +- attempt to fix selinux symlink bug (rhbz#345071) +- fixed URL +- made rpmlint mostly happy + * Mon Feb 18 2008 Fedora Release Engineering - 118-3 - Autorebuild for GCC 4.3 From 79dad1f706b4f65b60a2d776d8231fd3487a692a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 17:05:41 +0000 Subject: [PATCH 394/640] - made symlinks relative (rhbz#432878) - removed the backgrounding of node creation (rhbz#381461) - do not change sg group ownership to disk for scanners (rhbz#432602) - attempt to fix selinux symlink bug (rhbz#345071) - fixed URL - made rpmlint mostly happy --- udev-118-slink-selinux.patch | 21 +++++++++++++++++++++ udev.spec | 22 ++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 udev-118-slink-selinux.patch diff --git a/udev-118-slink-selinux.patch b/udev-118-slink-selinux.patch new file mode 100644 index 0000000..5599796 --- /dev/null +++ b/udev-118-slink-selinux.patch @@ -0,0 +1,21 @@ +diff -up udev-118/udev_node.c.slink udev-118/udev_node.c +--- udev-118/udev_node.c.slink 2008-02-20 17:52:39.000000000 +0100 ++++ udev-118/udev_node.c 2008-02-20 17:56:55.000000000 +0100 +@@ -146,7 +146,7 @@ static int node_symlink(const char *node + buf[len] = '\0'; + if (strcmp(target, buf) == 0) { + info("preserve already existing symlink '%s' to '%s'", slink, target); +- selinux_setfilecon(slink, NULL, S_IFLNK); ++ /*selinux_setfilecon(slink, NULL, S_IFLNK);*/ + goto exit; + } + } +@@ -164,7 +164,7 @@ static int node_symlink(const char *node + strlcpy(slink_tmp, slink, sizeof(slink_tmp)); + strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); + unlink(slink_tmp); +- selinux_setfscreatecon(slink_tmp, NULL, S_IFLNK); ++ selinux_setfscreatecon(slink, NULL, S_IFLNK); + retval = symlink(target, slink_tmp); + selinux_resetfscreatecon(); + if (retval != 0) { diff --git a/udev.spec b/udev.spec index 5e3a5c9..1985c49 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 3%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -23,9 +23,10 @@ Patch2: udev-116-rhrules.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch +Patch102: udev-118-slink-selinux.patch ExclusiveOS: Linux -URL: http://kernel.org/pub/linux/utils/kernel/hotplug/ +URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): MAKEDEV >= 0:3.11 @@ -74,6 +75,7 @@ which contains functions to get volume ids. %patch2 -p1 -b .rhrules %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 +%patch102 -p1 -b .slink %build @@ -180,6 +182,10 @@ ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id ln -sf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libvolume_id.so.*.*) \ $RPM_BUILD_ROOT%{_libdir}/libvolume_id.so +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor + %if %{with_static} for i in extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ @@ -302,7 +308,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh %attr(0755,root,root) %{udev_scriptdir}/firmware.sh -%attr(0755,root,root) %{udev_scriptdir}/rule_generator.functions +%attr(0644,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 @@ -322,7 +328,7 @@ rm -rf $RPM_BUILD_ROOT #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config -%attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp +%config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp %dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* @@ -366,6 +372,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Wed Feb 20 2008 Harald Hoyer 118-4 +- made symlinks relative (rhbz#432878) +- removed the backgrounding of node creation (rhbz#381461) +- do not change sg group ownership to disk for scanners (rhbz#432602) +- attempt to fix selinux symlink bug (rhbz#345071) +- fixed URL +- made rpmlint mostly happy + * Mon Feb 18 2008 Fedora Release Engineering - 118-3 - Autorebuild for GCC 4.3 From 0df45d9402e2221b1cd57bbb53ae57d408defad0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 17:33:26 +0000 Subject: [PATCH 395/640] - disabled static version (no static selinux lib) --- udev.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 1985c49..59e710d 100644 --- a/udev.spec +++ b/udev.spec @@ -1,5 +1,5 @@ %define debug true -%define with_static 1 +%define with_static 0 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware @@ -379,6 +379,7 @@ rm -rf $RPM_BUILD_ROOT - attempt to fix selinux symlink bug (rhbz#345071) - fixed URL - made rpmlint mostly happy +- disabled static version (no static selinux lib) * Mon Feb 18 2008 Fedora Release Engineering - 118-3 - Autorebuild for GCC 4.3 From c84cd4cf3d18230a1e77af1f64260a5ee78362dd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Feb 2008 17:33:26 +0000 Subject: [PATCH 396/640] - disabled static version (no static selinux lib) --- udev.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 1985c49..59e710d 100644 --- a/udev.spec +++ b/udev.spec @@ -1,5 +1,5 @@ %define debug true -%define with_static 1 +%define with_static 0 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware @@ -379,6 +379,7 @@ rm -rf $RPM_BUILD_ROOT - attempt to fix selinux symlink bug (rhbz#345071) - fixed URL - made rpmlint mostly happy +- disabled static version (no static selinux lib) * Mon Feb 18 2008 Fedora Release Engineering - 118-3 - Autorebuild for GCC 4.3 From 1b14e18140e0dd8b6420c95330cbd0ce1d3fbac9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 13:00:10 +0000 Subject: [PATCH 397/640] - moved all generated files to /var/lib/udev (also 70-persistent-cd.rules 70-persistent-net.rules) - added a caching mechanism for MAKEDEV (saves some seconds on startup) - added trigger for selinux-policy and MAKEDEV to remove the udev cache files --- start_udev | 36 ++++++++++++++++++++++++++---- udev-post.init | 60 ++++++++++++++++++++++++++++++++++++++++++++------ udev.spec | 28 ++++++++++++++++++++++- 3 files changed, 112 insertions(+), 12 deletions(-) diff --git a/start_udev b/start_udev index 3c4f40c..52da578 100755 --- a/start_udev +++ b/start_udev @@ -81,14 +81,34 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - if [ -x $MAKEDEV ]; then + [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d + USE_MD5="false" + [ -x /usr/bin/md5sum ] && USE_MD5="true" + if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do - if [ -f "$i" ]; then - ( sed -e 's,#.*,,g' "$i" | \ - xargs_simple -n 100 $MAKEDEV -x ) + if [ -f "$i" ]; then + # use a little caching to speedup things + if [ "$USE_MD5" == "true" ]; then + md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) + if [ -f "/var/lib/udev/makedev.d/${md5}.sh" ];then + md5file="/var/lib/udev/makedev.d/${md5}.sh" + else + md5file="/dev/.udev/makedev.d/${md5}.sh" + fi + if [ ! -f "$md5file" ]; then + ( sed -e 's,#.*,,g' "$i" | \ + xargs_simple -n 100 $MAKEDEV -x -a -S ) \ + > "$md5file" + fi + . "$md5file" >/dev/null 2>&1 + else + ( sed -e 's,#.*,,g' "$i" | \ + xargs_simple -n 100 $MAKEDEV -x ) + fi fi done fi + for devdir in /etc/udev/devices /lib/udev/devices; do [ -d "$devdir" ] || continue pushd $devdir &> "$udev_root/null" @@ -185,6 +205,14 @@ UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + + mkdir -p /dev/.udev/rules.d/ + for i in /var/lib/udev/rules.d/*.rules; do + if [ -f "$i" ]; then + cp "$i" /dev/.udev/rules.d/ >/dev/null 2>&1 + fi + done + /sbin/udevd -d ret=$[$ret + $?] diff --git a/udev-post.init b/udev-post.init index b2a0f87..5659d33 100644 --- a/udev-post.init +++ b/udev-post.init @@ -4,11 +4,12 @@ # # Authors: Harald Hoyer # -# chkconfig: 345 26 75 +# chkconfig: 12345 26 75 # description: Moves the generated persistent udev rules to /etc/udev/rules.d # ### BEGIN INIT INFO -# Default-Start: 345 +# Default-Start: 12345 +# Default-Stop: 0 6 # Required-Start: $local_fs # Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Description: Moves the generated persistent udev rules to /etc/udev/rules.d @@ -20,15 +21,32 @@ # See how we were called. case "$1" in start|reload) - STRING=$"Adding udev persistent rules" - + STRING=$"Adding udev makedev cache file" + # copy the MAKEDEV shell scripts generated before / was mounted read-write + for file in /dev/.udev/makedev.d/*; do + if [ -f "$file" ]; then + echo -n $STRING + cp "$file" /var/lib/udev/makedev.d/ + rc=$? + rm -f "$file" + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + fi + done + + STRING=$"Adding udev persistent rule" # 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 + [ "$dest" = '*' ] && break echo -n $STRING - cat $file >> /etc/udev/rules.d/$dest + cat $file >> /var/lib/udev/rules.d/$dest && cp /var/lib/udev/rules.d/$dest /dev/.udev/rules.d/ rc=$? rm -f $file if [ "$rc" -eq "0" ]; then @@ -43,13 +61,41 @@ case "$1" in exit 0 ;; stop) + STRING=$"Generating udev makedev cache file" + MAKEDEV="/sbin/MAKEDEV" + USE_MD5="false" + [ -x /usr/bin/md5sum ] && USE_MD5="true" + if [ "$USE_MD5" == "true" -a -x "$MAKEDEV" ]; then + for i in /etc/udev/makedev.d/*.nodes; do + if [ -f "$i" ]; then + # use a little caching to speedup things + md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) + md5file="/var/lib/udev/makedev.d/${md5}.sh" + if [ ! -f "$md5file" ]; then + echo -n $STRING + ( sed -e 's,#.*,,g' "$i" | \ + xargs $MAKEDEV -x -a -S ) \ + > "$md5file" + rc=$? + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + fi + fi + done + fi + rm -f /var/lock/subsys/udev-post exit 0 ;; status) exit 0 ;; *) - echo $"Usage: $0 {start}" + echo $"Usage: $0 {start|stop|reload}" exit 1 esac exit 0 diff --git a/udev.spec b/udev.spec index 59e710d..2075b5b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -241,6 +241,10 @@ EOF mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post +mkdir -p $RPM_BUILD_ROOT/var/lib/udev/ +mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d +mkdir -p $RPM_BUILD_ROOT/var/lib/udev/rules.d + %preun if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then @@ -264,6 +268,12 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then /sbin/udevd -d fi fi + +for i in 70-persistent-cd.rules 70-persistent-net.rules; do + [ -f "/etc/udev/rules.d/$i" ] && ( mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 ) +done + +/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : /sbin/chkconfig --add udev-post exit 0 @@ -281,6 +291,12 @@ if [ $2 = 0 ]; then fi exit 0 +%triggerin -- selinux-policy +rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : + +%triggerin -- MAKEDEV +rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : + %post -n libvolume_id -p /sbin/ldconfig %postun -n libvolume_id -p /sbin/ldconfig @@ -341,6 +357,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/cdrom_id*.8* %attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* +%dir %attr(0755,root,root) /var/lib/udev +%dir %attr(0755,root,root) /var/lib/udev/makedev.d +%dir %attr(0755,root,root) /var/lib/udev/rules.d + # Deprecated, but keep the ownership %ghost %dir %{_sysconfdir}/udev/scripts/ %ghost %dir %{_sysconfdir}/udev/devices/ @@ -372,6 +392,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-6 +- moved all generated files to /var/lib/udev + (also 70-persistent-cd.rules 70-persistent-net.rules) +- added a caching mechanism for MAKEDEV (saves some seconds on startup) +- added trigger for selinux-policy and MAKEDEV to remove the udev cache files + * Wed Feb 20 2008 Harald Hoyer 118-4 - made symlinks relative (rhbz#432878) - removed the backgrounding of node creation (rhbz#381461) From 2a36d8e6953096d4445e4ea6c2c302effe230dfd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 13:00:10 +0000 Subject: [PATCH 398/640] - moved all generated files to /var/lib/udev (also 70-persistent-cd.rules 70-persistent-net.rules) - added a caching mechanism for MAKEDEV (saves some seconds on startup) - added trigger for selinux-policy and MAKEDEV to remove the udev cache files --- start_udev | 36 ++++++++++++++++++++++++++---- udev-post.init | 60 ++++++++++++++++++++++++++++++++++++++++++++------ udev.spec | 28 ++++++++++++++++++++++- 3 files changed, 112 insertions(+), 12 deletions(-) diff --git a/start_udev b/start_udev index 3c4f40c..52da578 100755 --- a/start_udev +++ b/start_udev @@ -81,14 +81,34 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - if [ -x $MAKEDEV ]; then + [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d + USE_MD5="false" + [ -x /usr/bin/md5sum ] && USE_MD5="true" + if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do - if [ -f "$i" ]; then - ( sed -e 's,#.*,,g' "$i" | \ - xargs_simple -n 100 $MAKEDEV -x ) + if [ -f "$i" ]; then + # use a little caching to speedup things + if [ "$USE_MD5" == "true" ]; then + md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) + if [ -f "/var/lib/udev/makedev.d/${md5}.sh" ];then + md5file="/var/lib/udev/makedev.d/${md5}.sh" + else + md5file="/dev/.udev/makedev.d/${md5}.sh" + fi + if [ ! -f "$md5file" ]; then + ( sed -e 's,#.*,,g' "$i" | \ + xargs_simple -n 100 $MAKEDEV -x -a -S ) \ + > "$md5file" + fi + . "$md5file" >/dev/null 2>&1 + else + ( sed -e 's,#.*,,g' "$i" | \ + xargs_simple -n 100 $MAKEDEV -x ) + fi fi done fi + for devdir in /etc/udev/devices /lib/udev/devices; do [ -d "$devdir" ] || continue pushd $devdir &> "$udev_root/null" @@ -185,6 +205,14 @@ UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + + mkdir -p /dev/.udev/rules.d/ + for i in /var/lib/udev/rules.d/*.rules; do + if [ -f "$i" ]; then + cp "$i" /dev/.udev/rules.d/ >/dev/null 2>&1 + fi + done + /sbin/udevd -d ret=$[$ret + $?] diff --git a/udev-post.init b/udev-post.init index b2a0f87..5659d33 100644 --- a/udev-post.init +++ b/udev-post.init @@ -4,11 +4,12 @@ # # Authors: Harald Hoyer # -# chkconfig: 345 26 75 +# chkconfig: 12345 26 75 # description: Moves the generated persistent udev rules to /etc/udev/rules.d # ### BEGIN INIT INFO -# Default-Start: 345 +# Default-Start: 12345 +# Default-Stop: 0 6 # Required-Start: $local_fs # Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Description: Moves the generated persistent udev rules to /etc/udev/rules.d @@ -20,15 +21,32 @@ # See how we were called. case "$1" in start|reload) - STRING=$"Adding udev persistent rules" - + STRING=$"Adding udev makedev cache file" + # copy the MAKEDEV shell scripts generated before / was mounted read-write + for file in /dev/.udev/makedev.d/*; do + if [ -f "$file" ]; then + echo -n $STRING + cp "$file" /var/lib/udev/makedev.d/ + rc=$? + rm -f "$file" + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + fi + done + + STRING=$"Adding udev persistent rule" # 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 + [ "$dest" = '*' ] && break echo -n $STRING - cat $file >> /etc/udev/rules.d/$dest + cat $file >> /var/lib/udev/rules.d/$dest && cp /var/lib/udev/rules.d/$dest /dev/.udev/rules.d/ rc=$? rm -f $file if [ "$rc" -eq "0" ]; then @@ -43,13 +61,41 @@ case "$1" in exit 0 ;; stop) + STRING=$"Generating udev makedev cache file" + MAKEDEV="/sbin/MAKEDEV" + USE_MD5="false" + [ -x /usr/bin/md5sum ] && USE_MD5="true" + if [ "$USE_MD5" == "true" -a -x "$MAKEDEV" ]; then + for i in /etc/udev/makedev.d/*.nodes; do + if [ -f "$i" ]; then + # use a little caching to speedup things + md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) + md5file="/var/lib/udev/makedev.d/${md5}.sh" + if [ ! -f "$md5file" ]; then + echo -n $STRING + ( sed -e 's,#.*,,g' "$i" | \ + xargs $MAKEDEV -x -a -S ) \ + > "$md5file" + rc=$? + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + fi + fi + done + fi + rm -f /var/lock/subsys/udev-post exit 0 ;; status) exit 0 ;; *) - echo $"Usage: $0 {start}" + echo $"Usage: $0 {start|stop|reload}" exit 1 esac exit 0 diff --git a/udev.spec b/udev.spec index 59e710d..2075b5b 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -241,6 +241,10 @@ EOF mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post +mkdir -p $RPM_BUILD_ROOT/var/lib/udev/ +mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d +mkdir -p $RPM_BUILD_ROOT/var/lib/udev/rules.d + %preun if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then @@ -264,6 +268,12 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then /sbin/udevd -d fi fi + +for i in 70-persistent-cd.rules 70-persistent-net.rules; do + [ -f "/etc/udev/rules.d/$i" ] && ( mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 ) +done + +/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : /sbin/chkconfig --add udev-post exit 0 @@ -281,6 +291,12 @@ if [ $2 = 0 ]; then fi exit 0 +%triggerin -- selinux-policy +rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : + +%triggerin -- MAKEDEV +rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : + %post -n libvolume_id -p /sbin/ldconfig %postun -n libvolume_id -p /sbin/ldconfig @@ -341,6 +357,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/cdrom_id*.8* %attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* +%dir %attr(0755,root,root) /var/lib/udev +%dir %attr(0755,root,root) /var/lib/udev/makedev.d +%dir %attr(0755,root,root) /var/lib/udev/rules.d + # Deprecated, but keep the ownership %ghost %dir %{_sysconfdir}/udev/scripts/ %ghost %dir %{_sysconfdir}/udev/devices/ @@ -372,6 +392,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-6 +- moved all generated files to /var/lib/udev + (also 70-persistent-cd.rules 70-persistent-net.rules) +- added a caching mechanism for MAKEDEV (saves some seconds on startup) +- added trigger for selinux-policy and MAKEDEV to remove the udev cache files + * Wed Feb 20 2008 Harald Hoyer 118-4 - made symlinks relative (rhbz#432878) - removed the backgrounding of node creation (rhbz#381461) From 30648cd5cfbf1b40a3a8a2d5f78ba0cc561b546a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 14:33:00 +0000 Subject: [PATCH 399/640] - files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d at startup and back at shutdown - persistent cd and net rules generate the files in /dev/.udev/rules.d now - added post section to symlink 70-persistent-cd.rules 70-persistent-net.rules from /etc/udev/rules.d to /dev/.udev/rules.d --- udev-118-varlib.patch | 25 +++++++++++++++++++++ udev-post.init | 51 +++++++++++++------------------------------ udev.spec | 27 +++++++++++++++++++---- 3 files changed, 63 insertions(+), 40 deletions(-) create mode 100644 udev-118-varlib.patch diff --git a/udev-118-varlib.patch b/udev-118-varlib.patch new file mode 100644 index 0000000..a7a0baa --- /dev/null +++ b/udev-118-varlib.patch @@ -0,0 +1,25 @@ +diff -up udev-118/extras/rule_generator/write_net_rules.varlib udev-118/extras/rule_generator/write_net_rules +--- udev-118/extras/rule_generator/write_net_rules.varlib 2008-03-13 14:28:23.000000000 +0100 ++++ udev-118/extras/rule_generator/write_net_rules 2008-03-13 14:32:10.000000000 +0100 +@@ -21,7 +21,7 @@ + # 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' ++RULES_FILE='/dev/.udev/rules.d/70-persistent-net.rules' + + if [ "$MATCHIFTYPE" ]; then + [ $[MATCHIFTYPE] -gt 256 ] && return 0 +diff -up udev-118/extras/rule_generator/write_cd_rules.varlib udev-118/extras/rule_generator/write_cd_rules +--- udev-118/extras/rule_generator/write_cd_rules.varlib 2008-03-13 14:28:16.000000000 +0100 ++++ udev-118/extras/rule_generator/write_cd_rules 2008-03-13 14:32:23.000000000 +0100 +@@ -11,7 +11,7 @@ + # under the terms of the GNU General Public License as published by the + # Free Software Foundation version 2 of the License. + +-RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" ++RULES_FILE="/dev/.udev/rules.d/70-persistent-cd.rules" + + . /lib/udev/rule_generator.functions + +diff -up udev-118/extras/rule_generator/rule_generator.functions.varlib udev-118/extras/rule_generator/rule_generator.functions diff --git a/udev-post.init b/udev-post.init index 5659d33..fc5765d 100644 --- a/udev-post.init +++ b/udev-post.init @@ -21,42 +21,6 @@ # See how we were called. case "$1" in start|reload) - STRING=$"Adding udev makedev cache file" - # copy the MAKEDEV shell scripts generated before / was mounted read-write - for file in /dev/.udev/makedev.d/*; do - if [ -f "$file" ]; then - echo -n $STRING - cp "$file" /var/lib/udev/makedev.d/ - rc=$? - rm -f "$file" - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - fi - done - - STRING=$"Adding udev persistent rule" - # 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" = '*' ] && break - echo -n $STRING - cat $file >> /var/lib/udev/rules.d/$dest && cp /var/lib/udev/rules.d/$dest /dev/.udev/rules.d/ - rc=$? - rm -f $file - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - done touch /var/lock/subsys/udev-post exit 0 ;; @@ -88,6 +52,21 @@ case "$1" in fi done fi + STRING=$"Adding udev persistent rule" + for file in /dev/.udev/rules.d/*; do + if [ -f "$i" ]; then + echo -n $STRING + cp "$i" /var/lib/udev/rules.d/ + rc=$? + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + fi + done rm -f /var/lock/subsys/udev-post exit 0 ;; diff --git a/udev.spec b/udev.spec index 2075b5b..2d319d0 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,7 @@ Source4: fw_unit_symlinks.sh Patch1: udev-116-nettype.patch Patch2: udev-116-rhrules.patch +Patch3: udev-118-varlib.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -73,6 +74,7 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .nettype %patch2 -p1 -b .rhrules +%patch3 -p1 -b .varlib %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 %patch102 -p1 -b .slink @@ -265,15 +267,24 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid - /sbin/udevd -d fi fi +[ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d/ >/dev/null 2>&1 for i in 70-persistent-cd.rules 70-persistent-net.rules; do - [ -f "/etc/udev/rules.d/$i" ] && ( mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 ) + [ -L "/etc/udev/rules.d/$i" ] && continue + if [ -f "/etc/udev/rules.d/$i" ]; then + mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 + cp /var/lib/udev/rules.d/* /dev/.udev/rules.d/ >/dev/null 2>&1 + ln -s ../../../dev/.udev/rules.d/$i /etc/udev/rules.d/$i >/dev/null 2>&1 + fi done -/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : +if [ "$1" -ge "1" ]; then + /sbin/udevd -d + /sbin/chkconfig --del udev-post >/dev/null 2>&1 || : +fi + /sbin/chkconfig --add udev-post exit 0 @@ -392,6 +403,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-7 +- files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d + at startup and back at shutdown +- persistent cd and net rules generate the files in + /dev/.udev/rules.d now +- added post section to symlink 70-persistent-cd.rules 70-persistent-net.rules + from /etc/udev/rules.d to /dev/.udev/rules.d + * Thu Mar 13 2008 Harald Hoyer 118-6 - moved all generated files to /var/lib/udev (also 70-persistent-cd.rules 70-persistent-net.rules) From 31d0512f743d93581492486ec372b756258fe112 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 14:33:00 +0000 Subject: [PATCH 400/640] - files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d at startup and back at shutdown - persistent cd and net rules generate the files in /dev/.udev/rules.d now - added post section to symlink 70-persistent-cd.rules 70-persistent-net.rules from /etc/udev/rules.d to /dev/.udev/rules.d --- udev-118-varlib.patch | 25 +++++++++++++++++++++ udev-post.init | 51 +++++++++++++------------------------------ udev.spec | 27 +++++++++++++++++++---- 3 files changed, 63 insertions(+), 40 deletions(-) create mode 100644 udev-118-varlib.patch diff --git a/udev-118-varlib.patch b/udev-118-varlib.patch new file mode 100644 index 0000000..a7a0baa --- /dev/null +++ b/udev-118-varlib.patch @@ -0,0 +1,25 @@ +diff -up udev-118/extras/rule_generator/write_net_rules.varlib udev-118/extras/rule_generator/write_net_rules +--- udev-118/extras/rule_generator/write_net_rules.varlib 2008-03-13 14:28:23.000000000 +0100 ++++ udev-118/extras/rule_generator/write_net_rules 2008-03-13 14:32:10.000000000 +0100 +@@ -21,7 +21,7 @@ + # 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' ++RULES_FILE='/dev/.udev/rules.d/70-persistent-net.rules' + + if [ "$MATCHIFTYPE" ]; then + [ $[MATCHIFTYPE] -gt 256 ] && return 0 +diff -up udev-118/extras/rule_generator/write_cd_rules.varlib udev-118/extras/rule_generator/write_cd_rules +--- udev-118/extras/rule_generator/write_cd_rules.varlib 2008-03-13 14:28:16.000000000 +0100 ++++ udev-118/extras/rule_generator/write_cd_rules 2008-03-13 14:32:23.000000000 +0100 +@@ -11,7 +11,7 @@ + # under the terms of the GNU General Public License as published by the + # Free Software Foundation version 2 of the License. + +-RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" ++RULES_FILE="/dev/.udev/rules.d/70-persistent-cd.rules" + + . /lib/udev/rule_generator.functions + +diff -up udev-118/extras/rule_generator/rule_generator.functions.varlib udev-118/extras/rule_generator/rule_generator.functions diff --git a/udev-post.init b/udev-post.init index 5659d33..fc5765d 100644 --- a/udev-post.init +++ b/udev-post.init @@ -21,42 +21,6 @@ # See how we were called. case "$1" in start|reload) - STRING=$"Adding udev makedev cache file" - # copy the MAKEDEV shell scripts generated before / was mounted read-write - for file in /dev/.udev/makedev.d/*; do - if [ -f "$file" ]; then - echo -n $STRING - cp "$file" /var/lib/udev/makedev.d/ - rc=$? - rm -f "$file" - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - fi - done - - STRING=$"Adding udev persistent rule" - # 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" = '*' ] && break - echo -n $STRING - cat $file >> /var/lib/udev/rules.d/$dest && cp /var/lib/udev/rules.d/$dest /dev/.udev/rules.d/ - rc=$? - rm -f $file - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - done touch /var/lock/subsys/udev-post exit 0 ;; @@ -88,6 +52,21 @@ case "$1" in fi done fi + STRING=$"Adding udev persistent rule" + for file in /dev/.udev/rules.d/*; do + if [ -f "$i" ]; then + echo -n $STRING + cp "$i" /var/lib/udev/rules.d/ + rc=$? + if [ "$rc" -eq "0" ]; then + success "$STRING" + echo + elif [ "$rc" -eq "1" ]; then + failure "$STRING" + echo + fi + fi + done rm -f /var/lock/subsys/udev-post exit 0 ;; diff --git a/udev.spec b/udev.spec index 2075b5b..2d319d0 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,7 @@ Source4: fw_unit_symlinks.sh Patch1: udev-116-nettype.patch Patch2: udev-116-rhrules.patch +Patch3: udev-118-varlib.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -73,6 +74,7 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .nettype %patch2 -p1 -b .rhrules +%patch3 -p1 -b .varlib %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 %patch102 -p1 -b .slink @@ -265,15 +267,24 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid - /sbin/udevd -d fi fi +[ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d/ >/dev/null 2>&1 for i in 70-persistent-cd.rules 70-persistent-net.rules; do - [ -f "/etc/udev/rules.d/$i" ] && ( mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 ) + [ -L "/etc/udev/rules.d/$i" ] && continue + if [ -f "/etc/udev/rules.d/$i" ]; then + mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 + cp /var/lib/udev/rules.d/* /dev/.udev/rules.d/ >/dev/null 2>&1 + ln -s ../../../dev/.udev/rules.d/$i /etc/udev/rules.d/$i >/dev/null 2>&1 + fi done -/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : +if [ "$1" -ge "1" ]; then + /sbin/udevd -d + /sbin/chkconfig --del udev-post >/dev/null 2>&1 || : +fi + /sbin/chkconfig --add udev-post exit 0 @@ -392,6 +403,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-7 +- files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d + at startup and back at shutdown +- persistent cd and net rules generate the files in + /dev/.udev/rules.d now +- added post section to symlink 70-persistent-cd.rules 70-persistent-net.rules + from /etc/udev/rules.d to /dev/.udev/rules.d + * Thu Mar 13 2008 Harald Hoyer 118-6 - moved all generated files to /var/lib/udev (also 70-persistent-cd.rules 70-persistent-net.rules) From cb52ede995f83b2a675dcc1d066caac2448623f8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 15:28:17 +0000 Subject: [PATCH 401/640] - added /etc/sysconfig/udev to configure some speedups - added "udevnopersist" as a kernel command line, to disable persistent storage symlink generation --- start_udev | 11 ++++++++++- udev-118-sysconf.patch | 22 ++++++++++++++++++++++ udev-post.init | 3 ++- udev.spec | 16 +++++++++++++++- udev.sysconfig | 7 +++++++ 5 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 udev-118-sysconf.patch create mode 100644 udev.sysconfig diff --git a/start_udev b/start_udev index 52da578..a40215d 100755 --- a/start_udev +++ b/start_udev @@ -37,6 +37,7 @@ if [ -f /dev/.in_sysinit ]; then fi . /etc/init.d/functions +. /etc/sysconfig/udev prog=udev bin=/sbin/udev @@ -83,7 +84,7 @@ make_extra_nodes () { [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d USE_MD5="false" - [ -x /usr/bin/md5sum ] && USE_MD5="true" + [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then @@ -232,6 +233,14 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) fi + if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then + /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + fi + + if strstr "$cmdline" udevnopersist; then + /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + fi + /sbin/udevcontrol env STARTUP=1 /sbin/udevtrigger ret=$[$ret + $?] diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch new file mode 100644 index 0000000..503e172 --- /dev/null +++ b/udev-118-sysconf.patch @@ -0,0 +1,22 @@ +diff -up udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules +--- udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-03-13 16:10:00.000000000 +0100 ++++ udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-03-13 16:12:52.000000000 +0100 +@@ -3,6 +3,7 @@ + # persistent storage links: /dev/tape/{by-id,by-path} + + ACTION!="add", GOTO="persistent_storage_tape_end" ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", 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" + +diff -up udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage.rules +--- udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-03-13 16:09:51.000000000 +0100 ++++ udev-118/etc/udev/rules.d/60-persistent-storage.rules 2008-03-13 16:12:55.000000000 +0100 +@@ -4,6 +4,7 @@ + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + + ACTION!="add", GOTO="persistent_storage_end" ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # skip rules for inappropriate block devices diff --git a/udev-post.init b/udev-post.init index fc5765d..a15713a 100644 --- a/udev-post.init +++ b/udev-post.init @@ -17,6 +17,7 @@ ### END INIT INFO . /etc/rc.d/init.d/functions +. /etc/sysconfig/udev # See how we were called. case "$1" in @@ -28,7 +29,7 @@ case "$1" in STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" - [ -x /usr/bin/md5sum ] && USE_MD5="true" + [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" if [ "$USE_MD5" == "true" -a -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then diff --git a/udev.spec b/udev.spec index 2d319d0..7edc6be 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -17,10 +17,12 @@ Source1: start_udev Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh +Source5: udev.sysconfig Patch1: udev-116-nettype.patch Patch2: udev-116-rhrules.patch Patch3: udev-118-varlib.patch +Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -75,6 +77,8 @@ which contains functions to get volume ids. %patch1 -p1 -b .nettype %patch2 -p1 -b .rhrules %patch3 -p1 -b .varlib +%patch4 -p1 -b .sysconf + %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 %patch102 -p1 -b .slink @@ -243,6 +247,9 @@ EOF mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev + mkdir -p $RPM_BUILD_ROOT/var/lib/udev/ mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d mkdir -p $RPM_BUILD_ROOT/var/lib/udev/rules.d @@ -348,6 +355,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{udev_scriptdir}/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev + %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -403,6 +412,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-8 +- added /etc/sysconfig/udev to configure some speedups +- added "udevnopersist" as a kernel command line, to disable + persistent storage symlink generation + * Thu Mar 13 2008 Harald Hoyer 118-7 - files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d at startup and back at shutdown diff --git a/udev.sysconfig b/udev.sysconfig new file mode 100644 index 0000000..4ff1e6a --- /dev/null +++ b/udev.sysconfig @@ -0,0 +1,7 @@ +# generate a cache shell file of what MAKEDEV would do +# speedup some systems with slow disks +UDEV_USE_MAKEDEV_CACHE="yes" + +# generates /dev/disk/by* symlinks +# set to "no", if you don't need it and want a speedup at boot time +UDEV_PERSISTENT_STORAGE="yes" From 8a8111a52f8bba1fa9894df09bdc22f6a2e3aa71 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 15:28:17 +0000 Subject: [PATCH 402/640] - added /etc/sysconfig/udev to configure some speedups - added "udevnopersist" as a kernel command line, to disable persistent storage symlink generation --- start_udev | 11 ++++++++++- udev-118-sysconf.patch | 22 ++++++++++++++++++++++ udev-post.init | 3 ++- udev.spec | 16 +++++++++++++++- udev.sysconfig | 7 +++++++ 5 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 udev-118-sysconf.patch create mode 100644 udev.sysconfig diff --git a/start_udev b/start_udev index 52da578..a40215d 100755 --- a/start_udev +++ b/start_udev @@ -37,6 +37,7 @@ if [ -f /dev/.in_sysinit ]; then fi . /etc/init.d/functions +. /etc/sysconfig/udev prog=udev bin=/sbin/udev @@ -83,7 +84,7 @@ make_extra_nodes () { [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d USE_MD5="false" - [ -x /usr/bin/md5sum ] && USE_MD5="true" + [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then @@ -232,6 +233,14 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) fi + if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then + /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + fi + + if strstr "$cmdline" udevnopersist; then + /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + fi + /sbin/udevcontrol env STARTUP=1 /sbin/udevtrigger ret=$[$ret + $?] diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch new file mode 100644 index 0000000..503e172 --- /dev/null +++ b/udev-118-sysconf.patch @@ -0,0 +1,22 @@ +diff -up udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules +--- udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-03-13 16:10:00.000000000 +0100 ++++ udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-03-13 16:12:52.000000000 +0100 +@@ -3,6 +3,7 @@ + # persistent storage links: /dev/tape/{by-id,by-path} + + ACTION!="add", GOTO="persistent_storage_tape_end" ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", 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" + +diff -up udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage.rules +--- udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-03-13 16:09:51.000000000 +0100 ++++ udev-118/etc/udev/rules.d/60-persistent-storage.rules 2008-03-13 16:12:55.000000000 +0100 +@@ -4,6 +4,7 @@ + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + + ACTION!="add", GOTO="persistent_storage_end" ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # skip rules for inappropriate block devices diff --git a/udev-post.init b/udev-post.init index fc5765d..a15713a 100644 --- a/udev-post.init +++ b/udev-post.init @@ -17,6 +17,7 @@ ### END INIT INFO . /etc/rc.d/init.d/functions +. /etc/sysconfig/udev # See how we were called. case "$1" in @@ -28,7 +29,7 @@ case "$1" in STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" - [ -x /usr/bin/md5sum ] && USE_MD5="true" + [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" if [ "$USE_MD5" == "true" -a -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then diff --git a/udev.spec b/udev.spec index 2d319d0..7edc6be 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -17,10 +17,12 @@ Source1: start_udev Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh +Source5: udev.sysconfig Patch1: udev-116-nettype.patch Patch2: udev-116-rhrules.patch Patch3: udev-118-varlib.patch +Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch @@ -75,6 +77,8 @@ which contains functions to get volume ids. %patch1 -p1 -b .nettype %patch2 -p1 -b .rhrules %patch3 -p1 -b .varlib +%patch4 -p1 -b .sysconf + %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 %patch102 -p1 -b .slink @@ -243,6 +247,9 @@ EOF mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev + mkdir -p $RPM_BUILD_ROOT/var/lib/udev/ mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d mkdir -p $RPM_BUILD_ROOT/var/lib/udev/rules.d @@ -348,6 +355,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{udev_scriptdir}/devices/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/ +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev + %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules %config %attr(0644,root,root) %dir %{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -403,6 +412,11 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-8 +- added /etc/sysconfig/udev to configure some speedups +- added "udevnopersist" as a kernel command line, to disable + persistent storage symlink generation + * Thu Mar 13 2008 Harald Hoyer 118-7 - files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d at startup and back at shutdown diff --git a/udev.sysconfig b/udev.sysconfig new file mode 100644 index 0000000..4ff1e6a --- /dev/null +++ b/udev.sysconfig @@ -0,0 +1,7 @@ +# generate a cache shell file of what MAKEDEV would do +# speedup some systems with slow disks +UDEV_USE_MAKEDEV_CACHE="yes" + +# generates /dev/disk/by* symlinks +# set to "no", if you don't need it and want a speedup at boot time +UDEV_PERSISTENT_STORAGE="yes" From 0de73c8761a9d547b30614490a5e33fe13ec2ebd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 16:45:35 +0000 Subject: [PATCH 403/640] - added more support for the "modprobedebug" kernel command line option, to debug hanging kernel modules --- start_udev | 19 +++++++++++++++---- udev-post.init | 1 + udev.spec | 6 +++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index a40215d..a4e2c62 100755 --- a/start_udev +++ b/start_udev @@ -217,9 +217,8 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevd -d ret=$[$ret + $?] - if strstr "$cmdline" modprobedebug; then - /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" - fi + udevtimeout=$(getval udevtimeout $cmdline) + if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi @@ -242,9 +241,21 @@ if [ -f "/sys/class/tty/console/uevent" ]; then fi /sbin/udevcontrol env STARTUP=1 + + if strstr "$cmdline" modprobedebug; then + /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" + echo + for i in $(find /sys -name modalias); do + modules=$(cat $i) + modprobe -a -v -q $modules + wait_for_queue $udevtimeout + done + echo "Triggering Rest" + fi + /sbin/udevtrigger ret=$[$ret + $?] - wait_for_queue $(getval udevtimeout $cmdline) + wait_for_queue $udevtimeout ret=$[$ret + $?] wait /sbin/udevcontrol env STARTUP= diff --git a/udev-post.init b/udev-post.init index a15713a..d081d94 100644 --- a/udev-post.init +++ b/udev-post.init @@ -36,6 +36,7 @@ case "$1" in # use a little caching to speedup things md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) md5file="/var/lib/udev/makedev.d/${md5}.sh" + if [ ! -f "$md5file" ]; then echo -n $STRING ( sed -e 's,#.*,,g' "$i" | \ diff --git a/udev.spec b/udev.spec index 7edc6be..05e05fd 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -412,6 +412,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-9 +- added more support for the "modprobedebug" kernel command + line option, to debug hanging kernel modules + * Thu Mar 13 2008 Harald Hoyer 118-8 - added /etc/sysconfig/udev to configure some speedups - added "udevnopersist" as a kernel command line, to disable From 16b250a44cd97eaf220206d28851736c32cbeb11 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Mar 2008 16:45:35 +0000 Subject: [PATCH 404/640] - added more support for the "modprobedebug" kernel command line option, to debug hanging kernel modules --- start_udev | 19 +++++++++++++++---- udev-post.init | 1 + udev.spec | 6 +++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index a40215d..a4e2c62 100755 --- a/start_udev +++ b/start_udev @@ -217,9 +217,8 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevd -d ret=$[$ret + $?] - if strstr "$cmdline" modprobedebug; then - /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" - fi + udevtimeout=$(getval udevtimeout $cmdline) + if strstr "$cmdline" udevdebug; then /sbin/udevcontrol log_priority=debug fi @@ -242,9 +241,21 @@ if [ -f "/sys/class/tty/console/uevent" ]; then fi /sbin/udevcontrol env STARTUP=1 + + if strstr "$cmdline" modprobedebug; then + /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" + echo + for i in $(find /sys -name modalias); do + modules=$(cat $i) + modprobe -a -v -q $modules + wait_for_queue $udevtimeout + done + echo "Triggering Rest" + fi + /sbin/udevtrigger ret=$[$ret + $?] - wait_for_queue $(getval udevtimeout $cmdline) + wait_for_queue $udevtimeout ret=$[$ret + $?] wait /sbin/udevcontrol env STARTUP= diff --git a/udev-post.init b/udev-post.init index a15713a..d081d94 100644 --- a/udev-post.init +++ b/udev-post.init @@ -36,6 +36,7 @@ case "$1" in # use a little caching to speedup things md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) md5file="/var/lib/udev/makedev.d/${md5}.sh" + if [ ! -f "$md5file" ]; then echo -n $STRING ( sed -e 's,#.*,,g' "$i" | \ diff --git a/udev.spec b/udev.spec index 7edc6be..05e05fd 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -412,6 +412,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Mar 13 2008 Harald Hoyer 118-9 +- added more support for the "modprobedebug" kernel command + line option, to debug hanging kernel modules + * Thu Mar 13 2008 Harald Hoyer 118-8 - added /etc/sysconfig/udev to configure some speedups - added "udevnopersist" as a kernel command line, to disable From fafa12124717a5c55835b3ac047ef9d18c973b5b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 14 Mar 2008 22:37:47 +0000 Subject: [PATCH 405/640] - turned off MAKEDEV cache, until the generated shell scripts create new directories --- start_udev | 20 +++++++++++++++++++- udev.spec | 6 +++++- udev.sysconfig | 11 ++++++----- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/start_udev b/start_udev index a4e2c62..e94688f 100755 --- a/start_udev +++ b/start_udev @@ -44,6 +44,20 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" +# Check SELinux status +selinuxfs="$(fstab_decode_str `LC_ALL=C awk '/ selinuxfs / { print $2 }' /proc/mounts`)" +SELINUX_STATE= +if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then + if [ -r "$selinuxfs/enforce" ] ; then + SELINUX_STATE=`cat "$selinuxfs/enforce"` + else + # assume enforcing if you can't read it + SELINUX_STATE=1 + fi +fi + + + xargs_simple () { if [ "$1" = "-n" ]; then shift @@ -85,12 +99,16 @@ make_extra_nodes () { [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d USE_MD5="false" [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + + if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things if [ "$USE_MD5" == "true" ]; then - md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) + # fix for MAKEDEV shell scripts + [ -d /dev/net ] || mkdir -p /dev/net + md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a))-se$SELINUX_STATE if [ -f "/var/lib/udev/makedev.d/${md5}.sh" ];then md5file="/var/lib/udev/makedev.d/${md5}.sh" else diff --git a/udev.spec b/udev.spec index 05e05fd..bf5cb72 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -412,6 +412,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Mar 14 2008 Harald Hoyer 118-10 +- turned off MAKEDEV cache, until the generated shell scripts + create new directories + * Thu Mar 13 2008 Harald Hoyer 118-9 - added more support for the "modprobedebug" kernel command line option, to debug hanging kernel modules diff --git a/udev.sysconfig b/udev.sysconfig index 4ff1e6a..e7c13cf 100644 --- a/udev.sysconfig +++ b/udev.sysconfig @@ -1,7 +1,8 @@ -# generate a cache shell file of what MAKEDEV would do -# speedup some systems with slow disks -UDEV_USE_MAKEDEV_CACHE="yes" +# If set to "yes", generates cache shell files of what MAKEDEV would do. +# May speedup some systems with slow disks. +# EXPERIMENTAL - use at your own risk +UDEV_USE_MAKEDEV_CACHE="no" -# generates /dev/disk/by* symlinks -# set to "no", if you don't need it and want a speedup at boot time +# Generates /dev/disk/by* symlinks. +# Set to "no", if you *really* don't need them and want a speedup at boot time. UDEV_PERSISTENT_STORAGE="yes" From d2a67004f37443ffc2800803b2fccf2d65878931 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 14 Mar 2008 22:37:47 +0000 Subject: [PATCH 406/640] - turned off MAKEDEV cache, until the generated shell scripts create new directories --- start_udev | 20 +++++++++++++++++++- udev.spec | 6 +++++- udev.sysconfig | 11 ++++++----- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/start_udev b/start_udev index a4e2c62..e94688f 100755 --- a/start_udev +++ b/start_udev @@ -44,6 +44,20 @@ bin=/sbin/udev udevd=/sbin/udevd MAKEDEV="/sbin/MAKEDEV" +# Check SELinux status +selinuxfs="$(fstab_decode_str `LC_ALL=C awk '/ selinuxfs / { print $2 }' /proc/mounts`)" +SELINUX_STATE= +if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then + if [ -r "$selinuxfs/enforce" ] ; then + SELINUX_STATE=`cat "$selinuxfs/enforce"` + else + # assume enforcing if you can't read it + SELINUX_STATE=1 + fi +fi + + + xargs_simple () { if [ "$1" = "-n" ]; then shift @@ -85,12 +99,16 @@ make_extra_nodes () { [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d USE_MD5="false" [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + + if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things if [ "$USE_MD5" == "true" ]; then - md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) + # fix for MAKEDEV shell scripts + [ -d /dev/net ] || mkdir -p /dev/net + md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a))-se$SELINUX_STATE if [ -f "/var/lib/udev/makedev.d/${md5}.sh" ];then md5file="/var/lib/udev/makedev.d/${md5}.sh" else diff --git a/udev.spec b/udev.spec index 05e05fd..bf5cb72 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -412,6 +412,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Mar 14 2008 Harald Hoyer 118-10 +- turned off MAKEDEV cache, until the generated shell scripts + create new directories + * Thu Mar 13 2008 Harald Hoyer 118-9 - added more support for the "modprobedebug" kernel command line option, to debug hanging kernel modules diff --git a/udev.sysconfig b/udev.sysconfig index 4ff1e6a..e7c13cf 100644 --- a/udev.sysconfig +++ b/udev.sysconfig @@ -1,7 +1,8 @@ -# generate a cache shell file of what MAKEDEV would do -# speedup some systems with slow disks -UDEV_USE_MAKEDEV_CACHE="yes" +# If set to "yes", generates cache shell files of what MAKEDEV would do. +# May speedup some systems with slow disks. +# EXPERIMENTAL - use at your own risk +UDEV_USE_MAKEDEV_CACHE="no" -# generates /dev/disk/by* symlinks -# set to "no", if you don't need it and want a speedup at boot time +# Generates /dev/disk/by* symlinks. +# Set to "no", if you *really* don't need them and want a speedup at boot time. UDEV_PERSISTENT_STORAGE="yes" From 1fac5b6c175ddb2d9364751b43a641ca8e82f880 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 17 Mar 2008 18:09:38 +0000 Subject: [PATCH 407/640] - removed /var/lib/udev/rules.d again --- start_udev | 7 ------- udev-post.init | 35 ++++++++++++++++++++--------------- udev.spec | 19 ++++--------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/start_udev b/start_udev index e94688f..45146f4 100755 --- a/start_udev +++ b/start_udev @@ -225,13 +225,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - mkdir -p /dev/.udev/rules.d/ - for i in /var/lib/udev/rules.d/*.rules; do - if [ -f "$i" ]; then - cp "$i" /dev/.udev/rules.d/ >/dev/null 2>&1 - fi - done - /sbin/udevd -d ret=$[$ret + $?] diff --git a/udev-post.init b/udev-post.init index d081d94..cfffd3c 100644 --- a/udev-post.init +++ b/udev-post.init @@ -22,6 +22,26 @@ # See how we were called. case "$1" in start|reload) + 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 + touch /var/lock/subsys/udev-post exit 0 ;; @@ -54,21 +74,6 @@ case "$1" in fi done fi - STRING=$"Adding udev persistent rule" - for file in /dev/.udev/rules.d/*; do - if [ -f "$i" ]; then - echo -n $STRING - cp "$i" /var/lib/udev/rules.d/ - rc=$? - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - fi - done rm -f /var/lock/subsys/udev-post exit 0 ;; diff --git a/udev.spec b/udev.spec index bf5cb72..db7f746 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -21,7 +21,6 @@ Source5: udev.sysconfig Patch1: udev-116-nettype.patch Patch2: udev-116-rhrules.patch -Patch3: udev-118-varlib.patch Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch @@ -76,7 +75,6 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .nettype %patch2 -p1 -b .rhrules -%patch3 -p1 -b .varlib %patch4 -p1 -b .sysconf %patch100 -p1 -b .nopie @@ -250,9 +248,7 @@ install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev -mkdir -p $RPM_BUILD_ROOT/var/lib/udev/ mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d -mkdir -p $RPM_BUILD_ROOT/var/lib/udev/rules.d %preun if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then @@ -277,15 +273,6 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then fi fi -[ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d/ >/dev/null 2>&1 -for i in 70-persistent-cd.rules 70-persistent-net.rules; do - [ -L "/etc/udev/rules.d/$i" ] && continue - if [ -f "/etc/udev/rules.d/$i" ]; then - mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 - cp /var/lib/udev/rules.d/* /dev/.udev/rules.d/ >/dev/null 2>&1 - ln -s ../../../dev/.udev/rules.d/$i /etc/udev/rules.d/$i >/dev/null 2>&1 - fi -done if [ "$1" -ge "1" ]; then /sbin/udevd -d @@ -379,7 +366,6 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0755,root,root) /var/lib/udev %dir %attr(0755,root,root) /var/lib/udev/makedev.d -%dir %attr(0755,root,root) /var/lib/udev/rules.d # Deprecated, but keep the ownership %ghost %dir %{_sysconfdir}/udev/scripts/ @@ -412,6 +398,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Mar 17 2008 Harald Hoyer 118-11 +- removed /var/lib/udev/rules.d again + * Fri Mar 14 2008 Harald Hoyer 118-10 - turned off MAKEDEV cache, until the generated shell scripts create new directories From 61a823a384da8c76e3c8a68d45dbd276ee796103 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 17 Mar 2008 18:09:38 +0000 Subject: [PATCH 408/640] - removed /var/lib/udev/rules.d again --- start_udev | 7 ------- udev-post.init | 35 ++++++++++++++++++++--------------- udev.spec | 19 ++++--------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/start_udev b/start_udev index e94688f..45146f4 100755 --- a/start_udev +++ b/start_udev @@ -225,13 +225,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - mkdir -p /dev/.udev/rules.d/ - for i in /var/lib/udev/rules.d/*.rules; do - if [ -f "$i" ]; then - cp "$i" /dev/.udev/rules.d/ >/dev/null 2>&1 - fi - done - /sbin/udevd -d ret=$[$ret + $?] diff --git a/udev-post.init b/udev-post.init index d081d94..cfffd3c 100644 --- a/udev-post.init +++ b/udev-post.init @@ -22,6 +22,26 @@ # See how we were called. case "$1" in start|reload) + 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 + touch /var/lock/subsys/udev-post exit 0 ;; @@ -54,21 +74,6 @@ case "$1" in fi done fi - STRING=$"Adding udev persistent rule" - for file in /dev/.udev/rules.d/*; do - if [ -f "$i" ]; then - echo -n $STRING - cp "$i" /var/lib/udev/rules.d/ - rc=$? - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - fi - done rm -f /var/lock/subsys/udev-post exit 0 ;; diff --git a/udev.spec b/udev.spec index bf5cb72..db7f746 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 118 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -21,7 +21,6 @@ Source5: udev.sysconfig Patch1: udev-116-nettype.patch Patch2: udev-116-rhrules.patch -Patch3: udev-118-varlib.patch Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch @@ -76,7 +75,6 @@ which contains functions to get volume ids. %setup -q %patch1 -p1 -b .nettype %patch2 -p1 -b .rhrules -%patch3 -p1 -b .varlib %patch4 -p1 -b .sysconf %patch100 -p1 -b .nopie @@ -250,9 +248,7 @@ install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev -mkdir -p $RPM_BUILD_ROOT/var/lib/udev/ mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d -mkdir -p $RPM_BUILD_ROOT/var/lib/udev/rules.d %preun if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then @@ -277,15 +273,6 @@ if [ "$1" -ge "1" -a -x /sbin/pidof ]; then fi fi -[ -d /dev/.udev/rules.d ] || mkdir -p /dev/.udev/rules.d/ >/dev/null 2>&1 -for i in 70-persistent-cd.rules 70-persistent-net.rules; do - [ -L "/etc/udev/rules.d/$i" ] && continue - if [ -f "/etc/udev/rules.d/$i" ]; then - mv /etc/udev/rules.d/$i /var/lib/udev/rules.d >/dev/null 2>&1 - cp /var/lib/udev/rules.d/* /dev/.udev/rules.d/ >/dev/null 2>&1 - ln -s ../../../dev/.udev/rules.d/$i /etc/udev/rules.d/$i >/dev/null 2>&1 - fi -done if [ "$1" -ge "1" ]; then /sbin/udevd -d @@ -379,7 +366,6 @@ rm -rf $RPM_BUILD_ROOT %dir %attr(0755,root,root) /var/lib/udev %dir %attr(0755,root,root) /var/lib/udev/makedev.d -%dir %attr(0755,root,root) /var/lib/udev/rules.d # Deprecated, but keep the ownership %ghost %dir %{_sysconfdir}/udev/scripts/ @@ -412,6 +398,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Mar 17 2008 Harald Hoyer 118-11 +- removed /var/lib/udev/rules.d again + * Fri Mar 14 2008 Harald Hoyer 118-10 - turned off MAKEDEV cache, until the generated shell scripts create new directories From 14262589b4ed2cc1cf17d17de48c5b7e8753784a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 4 Apr 2008 13:35:38 +0000 Subject: [PATCH 409/640] - version 120 --- .cvsignore | 2 +- sources | 2 +- udev-089-nopie.patch | 16 ++++----- udev-091-lib64.patch | 69 +++++++++++++++++++----------------- udev-116-rhrules.patch | 12 ------- udev-118-slink-selinux.patch | 15 ++------ udev-118-sysconf.patch | 36 ++++++++++--------- udev.spec | 28 +++++++++------ 8 files changed, 85 insertions(+), 95 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3ecdfda..616156a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-118.tar.bz2 +udev-120.tar.bz2 diff --git a/sources b/sources index 40d297a..29ee647 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -39ab2404464c7026c65eb878827192b9 udev-118.tar.bz2 +71d10400458de14f6e46f52a1a591532 udev-120.tar.bz2 diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index b7d45c5..c2babda 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,21 +1,21 @@ ---- 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 @@ +diff -up udev-120/extras/volume_id/lib/Makefile.nopie udev-120/extras/volume_id/lib/Makefile +--- udev-120/extras/volume_id/lib/Makefile.nopie 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:49:10.000000000 +0200 +@@ -72,7 +72,7 @@ all: libvolume_id.a $(SHLIB) libvolume_i .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 $@ ++ $(Q) $(CC) $(subst -fpie,,$(subst -pie,,$(CFLAGS) )) -fPIC -c $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -83,7 +84,7 @@ +@@ -83,7 +83,7 @@ libvolume_id.a: $(HEADERS) $(OBJS) $(SHLIB): $(HEADERS) exported_symbols $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ -- $(Q) $(CC) -shared $(CFLAGS) -o $@ \ -+ $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -shared $(CFLAGS) -o $@ \ +- $(Q) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ ++ $(Q) $(CC) -shared $(subst -static,,$(subst -pie,,$(LDFLAGS))) $(subst -fpie,,$(subst -pie,,$(CFLAGS))) -o $@ \ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch index d29aaca..dcb8210 100644 --- a/udev-091-lib64.patch +++ b/udev-091-lib64.patch @@ -1,25 +1,6 @@ ---- 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 -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib - udevdir = /dev - DESTDIR = - -@@ -168,6 +170,8 @@ - RANLIB="$(RANLIB)" \ - LIB_OBJS="$(LIB_OBJS)" \ - LIBUDEV="$(PWD)/$(LIBUDEV)" \ -+ libdir=$(libdir) \ -+ usrlibdir=$(usrlibdir) \ - -C $$target $@ || exit 1; \ - done; - .PHONY: all ---- 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 +diff -up udev-120/extras/volume_id/lib/Makefile.lib64 udev-120/extras/volume_id/lib/Makefile +--- udev-120/extras/volume_id/lib/Makefile.lib64 2008-04-04 14:13:33.000000000 +0200 ++++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:15:05.000000000 +0200 @@ -4,9 +4,9 @@ # # Released under the GNU General Public License, version 2. @@ -33,17 +14,18 @@ INSTALL = install -c INSTALL_DATA = ${INSTALL} -m 644 -@@ -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) +@@ -115,6 +115,7 @@ ifeq ($(libdir),$(usrlibdir)) + else 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 @@ + endif ++ $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a + $(INSTALL) -d $(DESTDIR)$(usrlibdir)/pkgconfig + $(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc + .PHONY: install +diff -up udev-120/extras/volume_id/Makefile.lib64 udev-120/extras/volume_id/Makefile +--- udev-120/extras/volume_id/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/extras/volume_id/Makefile 2008-04-04 14:13:33.000000000 +0200 +@@ -17,6 +17,9 @@ usrsbindir = ${prefix}/usr/sbin libudevdir = ${prefix}/lib/udev mandir = ${prefix}/usr/share/man configdir = ${etcdir}/udev/ @@ -53,7 +35,7 @@ INSTALL = install -c INSTALL_PROGRAM = ${INSTALL} -@@ -34,7 +37,11 @@ +@@ -34,7 +37,11 @@ all: lib $(PROG) $(MAN_PAGES) $(Q) $(CC) -c $(CFLAGS) $< -o $@ lib: @@ -66,3 +48,24 @@ .PHONY: lib lib/libvolume_id.a: lib +diff -up udev-120/Makefile.lib64 udev-120/Makefile +--- udev-120/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/Makefile 2008-04-04 14:13:33.000000000 +0200 +@@ -91,6 +91,8 @@ usrbindir = ${prefix}/usr/bin + libudevdir = ${prefix}/lib/udev + mandir = ${prefix}/usr/share/man + configdir = ${etcdir}/udev ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib + udevdir = /dev + DESTDIR = + +@@ -161,6 +163,8 @@ all: $(PROGRAMS) $(MAN_PAGES) + RANLIB="$(RANLIB)" \ + LIB_OBJS="$(LIB_OBJS)" \ + LIBUDEV="$(PWD)/$(LIBUDEV)" \ ++ libdir=$(libdir) \ ++ usrlibdir=$(usrlibdir) \ + -C $$target $@ || exit 1; \ + done; + .PHONY: all diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch index 6e3bc73..0de3545 100644 --- a/udev-116-rhrules.patch +++ b/udev-116-rhrules.patch @@ -1,15 +1,3 @@ -diff -up udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules udev-118/etc/udev/rules.d/50-udev-default.rules ---- udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 -+++ udev-118/etc/udev/rules.d/50-udev-default.rules 2008-02-20 12:17:26.000000000 +0100 -@@ -67,7 +67,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{ - 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=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640" - KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" - KERNEL=="pg[0-9]*", GROUP="disk" - KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" diff -up udev-118/etc/udev/redhat/40-redhat.rules.rhrules udev-118/etc/udev/redhat/40-redhat.rules --- udev-118/etc/udev/redhat/40-redhat.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 +++ udev-118/etc/udev/redhat/40-redhat.rules 2008-02-20 12:19:07.000000000 +0100 diff --git a/udev-118-slink-selinux.patch b/udev-118-slink-selinux.patch index 5599796..f70d027 100644 --- a/udev-118-slink-selinux.patch +++ b/udev-118-slink-selinux.patch @@ -1,6 +1,6 @@ -diff -up udev-118/udev_node.c.slink udev-118/udev_node.c ---- udev-118/udev_node.c.slink 2008-02-20 17:52:39.000000000 +0100 -+++ udev-118/udev_node.c 2008-02-20 17:56:55.000000000 +0100 +diff -up udev-120/udev_node.c.slink udev-120/udev_node.c +--- udev-120/udev_node.c.slink 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/udev_node.c 2008-04-04 14:15:33.000000000 +0200 @@ -146,7 +146,7 @@ static int node_symlink(const char *node buf[len] = '\0'; if (strcmp(target, buf) == 0) { @@ -10,12 +10,3 @@ diff -up udev-118/udev_node.c.slink udev-118/udev_node.c goto exit; } } -@@ -164,7 +164,7 @@ static int node_symlink(const char *node - strlcpy(slink_tmp, slink, sizeof(slink_tmp)); - strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); - unlink(slink_tmp); -- selinux_setfscreatecon(slink_tmp, NULL, S_IFLNK); -+ selinux_setfscreatecon(slink, NULL, S_IFLNK); - retval = symlink(target, slink_tmp); - selinux_resetfscreatecon(); - if (retval != 0) { diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch index 503e172..272ca72 100644 --- a/udev-118-sysconf.patch +++ b/udev-118-sysconf.patch @@ -1,22 +1,24 @@ -diff -up udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules ---- udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-03-13 16:10:00.000000000 +0100 -+++ udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-03-13 16:12:52.000000000 +0100 -@@ -3,6 +3,7 @@ - # persistent storage links: /dev/tape/{by-id,by-path} - - ACTION!="add", GOTO="persistent_storage_tape_end" -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", 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" - -diff -up udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage.rules ---- udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-03-13 16:09:51.000000000 +0100 -+++ udev-118/etc/udev/rules.d/60-persistent-storage.rules 2008-03-13 16:12:55.000000000 +0100 -@@ -4,6 +4,7 @@ +diff -up udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage.rules +--- udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/etc/udev/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 +@@ -3,6 +3,8 @@ + # 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" +ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" ++ + ACTION!="add|change", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end" - # skip rules for inappropriate block devices +diff -up udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules +--- udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 +@@ -2,6 +2,8 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" ++ + ACTION!="add|change", 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" diff --git a/udev.spec b/udev.spec index db7f746..4d1d08a 100644 --- a/udev.spec +++ b/udev.spec @@ -1,12 +1,12 @@ %define debug true -%define with_static 0 +%define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware Summary: A userspace implementation of devfs Name: udev -Version: 118 -Release: 11%{?dist} +Version: 120 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,7 +20,6 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch1: udev-116-nettype.patch -Patch2: udev-116-rhrules.patch Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch @@ -34,6 +33,9 @@ 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 +%if %{with_static} +BuildRequires: libselinux-static libsepol-static +%endif Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev <= 0:3.12-1 @@ -74,7 +76,6 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .nettype -%patch2 -p1 -b .rhrules %patch4 -p1 -b .sysconf %patch100 -p1 -b .nopie @@ -86,22 +87,23 @@ which contains functions to get volume ids. %if %{with_static} # Do not USE_LOG in udev.static, # because it causes segfaults on openlog (bug 136005) -make \ +make OPTFLAGS="$RPM_OPT_FLAGS" \ libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ + V=true \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ VOLUME_ID_STATIC=true \ EXTRAS=" \ extras/scsi_id \ + extras/volume_id \ extras/ata_id \ extras/usb_id \ extras/edd_id \ - extras/volume_id \ extras/cdrom_id \ extras/floppy \ " all @@ -125,9 +127,9 @@ make E='@echo' Q='@' -C extras/volume_id/lib clean %endif %ifarch sparc64 -make CC="gcc $RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ +make OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ %else -make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ +make OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ %endif USE_KLIBC=false \ USE_SELINUX=true \ @@ -135,6 +137,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_LOG=true \ DEBUG=%{debug} \ STRIP="/bin/true" \ + V=true \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ @@ -154,9 +157,9 @@ 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"\ +make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie"\ %else -make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ +make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ %endif libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ @@ -398,6 +401,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Apr 04 2008 Harald Hoyer 120-1 +- version 120 + * Mon Mar 17 2008 Harald Hoyer 118-11 - removed /var/lib/udev/rules.d again From b9c56fc59bb3cbf3cdc501f5efc8be12d5c634d9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 4 Apr 2008 13:35:38 +0000 Subject: [PATCH 410/640] - version 120 --- .cvsignore | 2 +- sources | 2 +- udev-089-nopie.patch | 16 ++++----- udev-091-lib64.patch | 69 +++++++++++++++++++----------------- udev-116-rhrules.patch | 12 ------- udev-118-slink-selinux.patch | 15 ++------ udev-118-sysconf.patch | 36 ++++++++++--------- udev.spec | 28 +++++++++------ 8 files changed, 85 insertions(+), 95 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3ecdfda..616156a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-118.tar.bz2 +udev-120.tar.bz2 diff --git a/sources b/sources index 40d297a..29ee647 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -39ab2404464c7026c65eb878827192b9 udev-118.tar.bz2 +71d10400458de14f6e46f52a1a591532 udev-120.tar.bz2 diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch index b7d45c5..c2babda 100644 --- a/udev-089-nopie.patch +++ b/udev-089-nopie.patch @@ -1,21 +1,21 @@ ---- 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 @@ +diff -up udev-120/extras/volume_id/lib/Makefile.nopie udev-120/extras/volume_id/lib/Makefile +--- udev-120/extras/volume_id/lib/Makefile.nopie 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:49:10.000000000 +0200 +@@ -72,7 +72,7 @@ all: libvolume_id.a $(SHLIB) libvolume_i .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 $@ ++ $(Q) $(CC) $(subst -fpie,,$(subst -pie,,$(CFLAGS) )) -fPIC -c $< -o $@ libvolume_id.a: $(HEADERS) $(OBJS) $(Q) rm -f $@ -@@ -83,7 +84,7 @@ +@@ -83,7 +83,7 @@ libvolume_id.a: $(HEADERS) $(OBJS) $(SHLIB): $(HEADERS) exported_symbols $(addprefix .shlib/,$(OBJS)) $(E) " CC " $@ -- $(Q) $(CC) -shared $(CFLAGS) -o $@ \ -+ $(Q) $(subst -fpie,,$(subst -pie,,$(CC) )) -shared $(CFLAGS) -o $@ \ +- $(Q) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ ++ $(Q) $(CC) -shared $(subst -static,,$(subst -pie,,$(LDFLAGS))) $(subst -fpie,,$(subst -pie,,$(CFLAGS))) -o $@ \ -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ $(addprefix .shlib/,$(OBJS)) $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch index d29aaca..dcb8210 100644 --- a/udev-091-lib64.patch +++ b/udev-091-lib64.patch @@ -1,25 +1,6 @@ ---- 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 -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib - udevdir = /dev - DESTDIR = - -@@ -168,6 +170,8 @@ - RANLIB="$(RANLIB)" \ - LIB_OBJS="$(LIB_OBJS)" \ - LIBUDEV="$(PWD)/$(LIBUDEV)" \ -+ libdir=$(libdir) \ -+ usrlibdir=$(usrlibdir) \ - -C $$target $@ || exit 1; \ - done; - .PHONY: all ---- 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 +diff -up udev-120/extras/volume_id/lib/Makefile.lib64 udev-120/extras/volume_id/lib/Makefile +--- udev-120/extras/volume_id/lib/Makefile.lib64 2008-04-04 14:13:33.000000000 +0200 ++++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:15:05.000000000 +0200 @@ -4,9 +4,9 @@ # # Released under the GNU General Public License, version 2. @@ -33,17 +14,18 @@ INSTALL = install -c INSTALL_DATA = ${INSTALL} -m 644 -@@ -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) +@@ -115,6 +115,7 @@ ifeq ($(libdir),$(usrlibdir)) + else 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 @@ + endif ++ $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a + $(INSTALL) -d $(DESTDIR)$(usrlibdir)/pkgconfig + $(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc + .PHONY: install +diff -up udev-120/extras/volume_id/Makefile.lib64 udev-120/extras/volume_id/Makefile +--- udev-120/extras/volume_id/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/extras/volume_id/Makefile 2008-04-04 14:13:33.000000000 +0200 +@@ -17,6 +17,9 @@ usrsbindir = ${prefix}/usr/sbin libudevdir = ${prefix}/lib/udev mandir = ${prefix}/usr/share/man configdir = ${etcdir}/udev/ @@ -53,7 +35,7 @@ INSTALL = install -c INSTALL_PROGRAM = ${INSTALL} -@@ -34,7 +37,11 @@ +@@ -34,7 +37,11 @@ all: lib $(PROG) $(MAN_PAGES) $(Q) $(CC) -c $(CFLAGS) $< -o $@ lib: @@ -66,3 +48,24 @@ .PHONY: lib lib/libvolume_id.a: lib +diff -up udev-120/Makefile.lib64 udev-120/Makefile +--- udev-120/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/Makefile 2008-04-04 14:13:33.000000000 +0200 +@@ -91,6 +91,8 @@ usrbindir = ${prefix}/usr/bin + libudevdir = ${prefix}/lib/udev + mandir = ${prefix}/usr/share/man + configdir = ${etcdir}/udev ++libdir ?= ${prefix}/lib ++usrlibdir ?= ${prefix}/usr/lib + udevdir = /dev + DESTDIR = + +@@ -161,6 +163,8 @@ all: $(PROGRAMS) $(MAN_PAGES) + RANLIB="$(RANLIB)" \ + LIB_OBJS="$(LIB_OBJS)" \ + LIBUDEV="$(PWD)/$(LIBUDEV)" \ ++ libdir=$(libdir) \ ++ usrlibdir=$(usrlibdir) \ + -C $$target $@ || exit 1; \ + done; + .PHONY: all diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch index 6e3bc73..0de3545 100644 --- a/udev-116-rhrules.patch +++ b/udev-116-rhrules.patch @@ -1,15 +1,3 @@ -diff -up udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules udev-118/etc/udev/rules.d/50-udev-default.rules ---- udev-118/etc/udev/rules.d/50-udev-default.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 -+++ udev-118/etc/udev/rules.d/50-udev-default.rules 2008-02-20 12:17:26.000000000 +0100 -@@ -67,7 +67,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{ - 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=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640" - KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" - KERNEL=="pg[0-9]*", GROUP="disk" - KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" diff -up udev-118/etc/udev/redhat/40-redhat.rules.rhrules udev-118/etc/udev/redhat/40-redhat.rules --- udev-118/etc/udev/redhat/40-redhat.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 +++ udev-118/etc/udev/redhat/40-redhat.rules 2008-02-20 12:19:07.000000000 +0100 diff --git a/udev-118-slink-selinux.patch b/udev-118-slink-selinux.patch index 5599796..f70d027 100644 --- a/udev-118-slink-selinux.patch +++ b/udev-118-slink-selinux.patch @@ -1,6 +1,6 @@ -diff -up udev-118/udev_node.c.slink udev-118/udev_node.c ---- udev-118/udev_node.c.slink 2008-02-20 17:52:39.000000000 +0100 -+++ udev-118/udev_node.c 2008-02-20 17:56:55.000000000 +0100 +diff -up udev-120/udev_node.c.slink udev-120/udev_node.c +--- udev-120/udev_node.c.slink 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/udev_node.c 2008-04-04 14:15:33.000000000 +0200 @@ -146,7 +146,7 @@ static int node_symlink(const char *node buf[len] = '\0'; if (strcmp(target, buf) == 0) { @@ -10,12 +10,3 @@ diff -up udev-118/udev_node.c.slink udev-118/udev_node.c goto exit; } } -@@ -164,7 +164,7 @@ static int node_symlink(const char *node - strlcpy(slink_tmp, slink, sizeof(slink_tmp)); - strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); - unlink(slink_tmp); -- selinux_setfscreatecon(slink_tmp, NULL, S_IFLNK); -+ selinux_setfscreatecon(slink, NULL, S_IFLNK); - retval = symlink(target, slink_tmp); - selinux_resetfscreatecon(); - if (retval != 0) { diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch index 503e172..272ca72 100644 --- a/udev-118-sysconf.patch +++ b/udev-118-sysconf.patch @@ -1,22 +1,24 @@ -diff -up udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules ---- udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-03-13 16:10:00.000000000 +0100 -+++ udev-118/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-03-13 16:12:52.000000000 +0100 -@@ -3,6 +3,7 @@ - # persistent storage links: /dev/tape/{by-id,by-path} - - ACTION!="add", GOTO="persistent_storage_tape_end" -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", 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" - -diff -up udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-118/etc/udev/rules.d/60-persistent-storage.rules ---- udev-118/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-03-13 16:09:51.000000000 +0100 -+++ udev-118/etc/udev/rules.d/60-persistent-storage.rules 2008-03-13 16:12:55.000000000 +0100 -@@ -4,6 +4,7 @@ +diff -up udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage.rules +--- udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/etc/udev/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 +@@ -3,6 +3,8 @@ + # 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" +ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" ++ + ACTION!="add|change", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end" - # skip rules for inappropriate block devices +diff -up udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules +--- udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 +@@ -2,6 +2,8 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" ++ + ACTION!="add|change", 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" diff --git a/udev.spec b/udev.spec index db7f746..4d1d08a 100644 --- a/udev.spec +++ b/udev.spec @@ -1,12 +1,12 @@ %define debug true -%define with_static 0 +%define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware Summary: A userspace implementation of devfs Name: udev -Version: 118 -Release: 11%{?dist} +Version: 120 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,7 +20,6 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch1: udev-116-nettype.patch -Patch2: udev-116-rhrules.patch Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch @@ -34,6 +33,9 @@ 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 +%if %{with_static} +BuildRequires: libselinux-static libsepol-static +%endif Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev <= 0:3.12-1 @@ -74,7 +76,6 @@ which contains functions to get volume ids. %prep %setup -q %patch1 -p1 -b .nettype -%patch2 -p1 -b .rhrules %patch4 -p1 -b .sysconf %patch100 -p1 -b .nopie @@ -86,22 +87,23 @@ which contains functions to get volume ids. %if %{with_static} # Do not USE_LOG in udev.static, # because it causes segfaults on openlog (bug 136005) -make \ +make OPTFLAGS="$RPM_OPT_FLAGS" \ libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ USE_KLIBC=false \ USE_SELINUX=true \ USE_STATIC=true \ + V=true \ STRIP="/bin/true" \ udevdir="/dev" \ USE_LOG=false DEBUG=%{debug} \ VOLUME_ID_STATIC=true \ EXTRAS=" \ extras/scsi_id \ + extras/volume_id \ extras/ata_id \ extras/usb_id \ extras/edd_id \ - extras/volume_id \ extras/cdrom_id \ extras/floppy \ " all @@ -125,9 +127,9 @@ make E='@echo' Q='@' -C extras/volume_id/lib clean %endif %ifarch sparc64 -make CC="gcc $RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ +make OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ %else -make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ +make OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ %endif USE_KLIBC=false \ USE_SELINUX=true \ @@ -135,6 +137,7 @@ make CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ USE_LOG=true \ DEBUG=%{debug} \ STRIP="/bin/true" \ + V=true \ EXTRAS=" \ extras/scsi_id \ extras/ata_id \ @@ -154,9 +157,9 @@ 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"\ +make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie"\ %else -make DESTDIR=$RPM_BUILD_ROOT CC="gcc $RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ +make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ %endif libdir="/%{_lib}" \ usrlibdir="%{_libdir}" \ @@ -398,6 +401,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Apr 04 2008 Harald Hoyer 120-1 +- version 120 + * Mon Mar 17 2008 Harald Hoyer 118-11 - removed /var/lib/udev/rules.d again From 363e26a66c2c5fbdc948bffdb15d7e1ca887e949 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 5 Apr 2008 16:29:16 +0000 Subject: [PATCH 411/640] - removed warning about deprecated /lib/udev/devices (rhbz#440961) - replaced /usr/bin/find with shell find function (rhbz#440961) --- start_udev | 19 ++++++++++++++----- udev.spec | 6 +++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/start_udev b/start_udev index 45146f4..1d99b3c 100755 --- a/start_udev +++ b/start_udev @@ -133,7 +133,7 @@ make_extra_nodes () { pushd $devdir &> "$udev_root/null" set * if [ "$1" != "*" ]; then - echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." + #echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." cp -ar "$@" $udev_root/ pushd "$udev_root" &> "$udev_root/null" [ -x /sbin/restorecon ] && /sbin/restorecon "$@" @@ -150,6 +150,14 @@ kill_udevd() { fi } +findalias () { + local n + for n in "$1"/* ; do + [ -h "$n" ] && continue + [ -d "$n" ] && { findalias "$n" ; continue; } + [ "${n##*/}" == "modalias" ] && echo $(cat $n) + done +} wait_for_queue() { local timeout=${1:-0} @@ -256,10 +264,11 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" modprobedebug; then /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" echo - for i in $(find /sys -name modalias); do - modules=$(cat $i) - modprobe -a -v -q $modules - wait_for_queue $udevtimeout + findalias /sys | while read modules ; do + if [ -n "$modules" ]; then + /sbin/modprobe -a -v -q $modules + wait_for_queue $udevtimeout + fi done echo "Triggering Rest" fi diff --git a/udev.spec b/udev.spec index 4d1d08a..c68961e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 120 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -401,6 +401,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Sat Apr 05 2008 Harald Hoyer 120-2 +- removed warning about deprecated /lib/udev/devices (rhbz#440961) +- replaced /usr/bin/find with shell find function (rhbz#440961) + * Fri Apr 04 2008 Harald Hoyer 120-1 - version 120 From 062c6309a9673fa811e20c0a16491877f5db7fe5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 5 Apr 2008 16:29:16 +0000 Subject: [PATCH 412/640] - removed warning about deprecated /lib/udev/devices (rhbz#440961) - replaced /usr/bin/find with shell find function (rhbz#440961) --- start_udev | 19 ++++++++++++++----- udev.spec | 6 +++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/start_udev b/start_udev index 45146f4..1d99b3c 100755 --- a/start_udev +++ b/start_udev @@ -133,7 +133,7 @@ make_extra_nodes () { pushd $devdir &> "$udev_root/null" set * if [ "$1" != "*" ]; then - echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." + #echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." cp -ar "$@" $udev_root/ pushd "$udev_root" &> "$udev_root/null" [ -x /sbin/restorecon ] && /sbin/restorecon "$@" @@ -150,6 +150,14 @@ kill_udevd() { fi } +findalias () { + local n + for n in "$1"/* ; do + [ -h "$n" ] && continue + [ -d "$n" ] && { findalias "$n" ; continue; } + [ "${n##*/}" == "modalias" ] && echo $(cat $n) + done +} wait_for_queue() { local timeout=${1:-0} @@ -256,10 +264,11 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" modprobedebug; then /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" echo - for i in $(find /sys -name modalias); do - modules=$(cat $i) - modprobe -a -v -q $modules - wait_for_queue $udevtimeout + findalias /sys | while read modules ; do + if [ -n "$modules" ]; then + /sbin/modprobe -a -v -q $modules + wait_for_queue $udevtimeout + fi done echo "Triggering Rest" fi diff --git a/udev.spec b/udev.spec index 4d1d08a..c68961e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 120 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -401,6 +401,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Sat Apr 05 2008 Harald Hoyer 120-2 +- removed warning about deprecated /lib/udev/devices (rhbz#440961) +- replaced /usr/bin/find with shell find function (rhbz#440961) + * Fri Apr 04 2008 Harald Hoyer 120-1 - version 120 From 238456bb1077717ddcf47af48fd6b6acfb2a8677 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 11 Apr 2008 14:21:50 +0000 Subject: [PATCH 413/640] - fixed pre/preun scriptlets (bug #441941) - removed fedora specific patch for selinux symlink handling --- udev.spec | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/udev.spec b/udev.spec index c68961e..6bd809c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 120 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -24,7 +24,6 @@ Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch -Patch102: udev-118-slink-selinux.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -80,7 +79,6 @@ which contains functions to get volume ids. %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 -%patch102 -p1 -b .slink %build @@ -254,7 +252,7 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d %preun -if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then +if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then @@ -263,25 +261,20 @@ if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then fi /sbin/chkconfig --del udev fi -if [ "$1" = 0 ]; then +if [ "$1" -eq 0 ]; then /sbin/chkconfig --del udev-post fi exit 0 %post -if [ "$1" -ge "1" -a -x /sbin/pidof ]; then +if [ "$1" -gt 1 -a -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid + /sbin/udevd -d fi fi - -if [ "$1" -ge "1" ]; then - /sbin/udevd -d - /sbin/chkconfig --del udev-post >/dev/null 2>&1 || : -fi - /sbin/chkconfig --add udev-post exit 0 @@ -401,6 +394,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Apr 11 2008 Harald Hoyer 120-3 +- fixed pre/preun scriptlets (bug #441941) +- removed fedora specific patch for selinux symlink handling + * Sat Apr 05 2008 Harald Hoyer 120-2 - removed warning about deprecated /lib/udev/devices (rhbz#440961) - replaced /usr/bin/find with shell find function (rhbz#440961) From c5a0ade1245e741ce66e21a4da99f458b92383f7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 11 Apr 2008 14:21:50 +0000 Subject: [PATCH 414/640] - fixed pre/preun scriptlets (bug #441941) - removed fedora specific patch for selinux symlink handling --- udev.spec | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/udev.spec b/udev.spec index c68961e..6bd809c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 120 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -24,7 +24,6 @@ Patch4: udev-118-sysconf.patch Patch100: udev-089-nopie.patch Patch101: udev-091-lib64.patch -Patch102: udev-118-slink-selinux.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -80,7 +79,6 @@ which contains functions to get volume ids. %patch100 -p1 -b .nopie %patch101 -p1 -b .lib64 -%patch102 -p1 -b .slink %build @@ -254,7 +252,7 @@ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d %preun -if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then +if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then @@ -263,25 +261,20 @@ if [ "$1" = 0 -a -f %{_initrddir}/udev ]; then fi /sbin/chkconfig --del udev fi -if [ "$1" = 0 ]; then +if [ "$1" -eq 0 ]; then /sbin/chkconfig --del udev-post fi exit 0 %post -if [ "$1" -ge "1" -a -x /sbin/pidof ]; then +if [ "$1" -gt 1 -a -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) if [ -n "$pid" ]; then kill $pid + /sbin/udevd -d fi fi - -if [ "$1" -ge "1" ]; then - /sbin/udevd -d - /sbin/chkconfig --del udev-post >/dev/null 2>&1 || : -fi - /sbin/chkconfig --add udev-post exit 0 @@ -401,6 +394,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Apr 11 2008 Harald Hoyer 120-3 +- fixed pre/preun scriptlets (bug #441941) +- removed fedora specific patch for selinux symlink handling + * Sat Apr 05 2008 Harald Hoyer 120-2 - removed warning about deprecated /lib/udev/devices (rhbz#440961) - replaced /usr/bin/find with shell find function (rhbz#440961) From 8bc2a79fab4db75f1966a567f445a5e94e640c9e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Apr 2008 15:45:38 +0000 Subject: [PATCH 415/640] - added patches from git: - persistent device naming: also read unpartitioned media - scsi_id: initialize serial strings - logging: add trailing newline to all strings - path_id: remove subsystem whitelist - allow setting of MODE="0000" - selinux: more context settings - rules_generator: net rules - always add KERNEL== match to generated rules - cdrom_id: replace with version which also exports media properties - vol_id: add --offset option - udevinfo: do not replace chars when printing ATTR== matches --- 0001-writing-udev-rules-fix-rule-typos.patch | 51 + ...not-replace-chars-when-printing-ATTR.patch | 24 + 0003-vol_id-add-offset-option.patch | 135 + ...e-with-version-which-also-exports-me.patch | 834 +++ ...p-write-message-including-version-nu.patch | 31 + ...ator-net-rules-always-add-KERNEL-mat.patch | 49 + 0007-selinux-more-context-settings.patch | 88 + 0008-selinux-fix-missing-includes.patch | 63 + 0009-allow-setting-of-MODE-0000.patch | 93 + 0010-path_id-remove-subsystem-whitelist.patch | 54 + ...-add-trailing-newline-to-all-strings.patch | 5323 +++++++++++++++++ 0012-scsi_id-initialize-serial-strings.patch | 27 + ...ce-naming-also-read-unpartitioned-me.patch | 42 + start_udev | 3 + udev.spec | 59 +- 15 files changed, 6867 insertions(+), 9 deletions(-) create mode 100644 0001-writing-udev-rules-fix-rule-typos.patch create mode 100644 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch create mode 100644 0003-vol_id-add-offset-option.patch create mode 100644 0004-cdrom_id-replace-with-version-which-also-exports-me.patch create mode 100644 0005-udevd-at-startup-write-message-including-version-nu.patch create mode 100644 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch create mode 100644 0007-selinux-more-context-settings.patch create mode 100644 0008-selinux-fix-missing-includes.patch create mode 100644 0009-allow-setting-of-MODE-0000.patch create mode 100644 0010-path_id-remove-subsystem-whitelist.patch create mode 100644 0011-logging-add-trailing-newline-to-all-strings.patch create mode 100644 0012-scsi_id-initialize-serial-strings.patch create mode 100644 0013-persistent-device-naming-also-read-unpartitioned-me.patch diff --git a/0001-writing-udev-rules-fix-rule-typos.patch b/0001-writing-udev-rules-fix-rule-typos.patch new file mode 100644 index 0000000..7c8a2a1 --- /dev/null +++ b/0001-writing-udev-rules-fix-rule-typos.patch @@ -0,0 +1,51 @@ +From 8c1711dcd03e84bfec4bb2ee767d0467fd32f6a5 Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Sun, 6 Apr 2008 07:12:20 +0200 +Subject: [PATCH] writing udev rules: fix rule typos + +--- + docs/writing_udev_rules/index.html | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/docs/writing_udev_rules/index.html b/docs/writing_udev_rules/index.html +index 9289137..5fedb3f 100644 +--- a/docs/writing_udev_rules/index.html ++++ b/docs/writing_udev_rules/index.html +@@ -17,7 +17,7 @@ + +

Writing udev rules

+ by Daniel Drake (dsd)
+-Version 0.73

++Version 0.74

+ + The most recent version of this document can always be found at:
+ +@@ -114,6 +114,7 @@ This document uses various examples (many of which are entirely fictional) to il +

History

+ +
    ++
  • April 5th 2008 v0.74: Typo fixes.
  • +
  • December 3rd 2007 v0.73: Update for new udev versions, and some miscellaneous improvements.
  • +
  • October 2nd 2006 v0.72: Fixed a typo in one of the example rules.
  • +
  • June 10th 2006 v0.71: Misc changes based on recent feedback - thanks!
  • +@@ -480,7 +481,7 @@ As you can see, udevinfo simply produces a list of attributes you can use as-is + +
    + SUBSYSTEM=="block", ATTR{size}=="234441648", NAME="my_hard_disk"
    +-SUBSYSTEM="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk"
    ++SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk" + +

    + You may have noted the use of colour in the above examples. This is to demonstrate that while it is legal to combine the attributes from the device in question and a single parent device, you cannot mix-and-match attributes from multiple parent devices - your rule will not work. For example, the following rule is invalid as it attempts to match attributes from two parent devices: +@@ -735,7 +736,7 @@ A USB hard disk is comparable to the USB camera I described above, however typic + Of course, if you have a 100GB USB hard disk, it is perfectly understandable that you might want to partition it, in which case we can take advantage of udev's string substitutions: +

    + +-
    KERNEL=="sd*", SUBSYSTEMS="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
    ++
    KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
    + +

    + This rule creates symlinks such as: +-- +1.5.4.5 + diff --git a/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch b/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch new file mode 100644 index 0000000..c6b7893 --- /dev/null +++ b/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch @@ -0,0 +1,24 @@ +From 573bdd7e7588b70105c2976859696037899e9d4d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 7 Apr 2008 01:57:31 +0200 +Subject: [PATCH] udevinfo: do not replace chars when printing ATTR== matches + +--- + udevinfo.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/udevinfo.c b/udevinfo.c +index 85899cf..52d409d 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -83,7 +83,6 @@ static void print_all_attributes(const char *devpath, const char *key) + continue; + } + +- replace_chars(value, ALLOWED_CHARS_INPUT); + printf(" %s{%s}==\"%s\"\n", key, dent->d_name, value); + } + } +-- +1.5.4.5 + diff --git a/0003-vol_id-add-offset-option.patch b/0003-vol_id-add-offset-option.patch new file mode 100644 index 0000000..45784ad --- /dev/null +++ b/0003-vol_id-add-offset-option.patch @@ -0,0 +1,135 @@ +From 8b5238670d2e741bc71ae3e79b499682965dc2fd Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 9 Apr 2008 12:35:03 +0200 +Subject: [PATCH] vol_id: add --offset option + +--- + extras/volume_id/lib/Makefile | 2 +- + extras/volume_id/lib/volume_id.c | 10 +++++----- + extras/volume_id/vol_id.c | 14 ++++++++++---- + 3 files changed, 16 insertions(+), 10 deletions(-) + +diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile +index c0905f4..0e1565f 100644 +--- a/extras/volume_id/lib/Makefile ++++ b/extras/volume_id/lib/Makefile +@@ -13,7 +13,7 @@ INSTALL_DATA = ${INSTALL} -m 644 + INSTALL_LIB = ${INSTALL} -m 755 + + SHLIB_CUR = 0 +-SHLIB_REV = 82 ++SHLIB_REV = 83 + SHLIB_AGE = 0 + SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE) + +diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c +index e8f6de3..7c68fb1 100644 +--- a/extras/volume_id/lib/volume_id.c ++++ b/extras/volume_id/lib/volume_id.c +@@ -331,9 +331,9 @@ err: + } + + /* run only once into a timeout for unreadable devices */ +-static int device_is_readable(struct volume_id *id) ++static int device_is_readable(struct volume_id *id, uint64_t off) + { +- if (volume_id_get_buffer(id, 0x00, 0x200) != NULL) ++ if (volume_id_get_buffer(id, off, 0x200) != NULL) + return 1; + return 0; + } +@@ -355,7 +355,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) + if (id == NULL) + return -EINVAL; + +- if (!device_is_readable(id)) ++ if (!device_is_readable(id, off)) + return -1; + + info("probing at offset 0x%llx, size 0x%llx", +@@ -389,7 +389,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size + if (id == NULL) + return -EINVAL; + +- if (!device_is_readable(id)) ++ if (!device_is_readable(id, off)) + return -1; + + info("probing at offset 0x%llx, size 0x%llx", +@@ -421,7 +421,7 @@ int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size) + if (id == NULL) + return -EINVAL; + +- if (!device_is_readable(id)) ++ if (!device_is_readable(id, off)) + return -1; + + /* probe for raid first, because fs probes may be successful on raid members */ +diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c +index 38950ee..04e85ab 100644 +--- a/extras/volume_id/vol_id.c ++++ b/extras/volume_id/vol_id.c +@@ -134,6 +134,7 @@ int main(int argc, char *argv[]) + { "export", 0, NULL, 'x' }, + { "skip-raid", 0, NULL, 's' }, + { "probe-all", 0, NULL, 'a' }, ++ { "offset", 1, NULL, 'o' }, + { "help", 0, NULL, 'h' }, + {} + }; +@@ -153,6 +154,7 @@ int main(int argc, char *argv[]) + uint64_t size; + int skip_raid = 0; + int probe_all = 0; ++ uint64_t offset = 0; + const char *node; + int fd; + const char *label, *uuid, *type, *type_version, *usage; +@@ -167,7 +169,7 @@ int main(int argc, char *argv[]) + while (1) { + int option; + +- option = getopt_long(argc, argv, "lLutxsah", options, NULL); ++ option = getopt_long(argc, argv, "lLutxsaoh", options, NULL); + if (option == -1) + break; + +@@ -193,6 +195,9 @@ int main(int argc, char *argv[]) + case 'a': + probe_all = 1; + break; ++ case 'o': ++ offset = strtoull(optarg, NULL, 0); ++ break; + case 'h': + printf("Usage: vol_id [options] \n" + " --export export key/value pairs\n" +@@ -202,6 +207,7 @@ int main(int argc, char *argv[]) + " --uuid filesystem uuid\n" + " --skip-raid don't probe for raid\n" + " --probe-all find possibly conflicting signatures\n" ++ " --offset skip given number of bytes of input\n" + " --help\n\n"); + goto exit; + default: +@@ -249,14 +255,14 @@ int main(int argc, char *argv[]) + } + + if (probe_all) { +- volume_id_all_probers(all_probers, vid, 0, size, NULL); ++ volume_id_all_probers(all_probers, vid, offset, size, NULL); + goto exit; + } + + if (skip_raid) +- retval = volume_id_probe_filesystem(vid, 0, size); ++ retval = volume_id_probe_filesystem(vid, offset, size); + else +- retval = volume_id_probe_all(vid, 0, size); ++ retval = volume_id_probe_all(vid, offset, size); + if (retval != 0) { + fprintf(stderr, "%s: unknown volume type\n", node); + rc = 4; +-- +1.5.4.5 + diff --git a/0004-cdrom_id-replace-with-version-which-also-exports-me.patch b/0004-cdrom_id-replace-with-version-which-also-exports-me.patch new file mode 100644 index 0000000..bc71cd5 --- /dev/null +++ b/0004-cdrom_id-replace-with-version-which-also-exports-me.patch @@ -0,0 +1,834 @@ +From fd7a285e6293fddd3fbc68b519dcd367adeb72c4 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 9 Apr 2008 23:17:39 +0200 +Subject: [PATCH] cdrom_id: replace with version which also exports media properties + +This is a 12 track audio CD with additional data session: + $ extras/cdrom_id/cdrom_id /dev/dvd + ID_CDROM=1 + ID_CDROM_CD_R=1 + ID_CDROM_CD_RW=1 + ID_CDROM_DVD=1 + ID_CDROM_DVD_R=1 + ID_CDROM_DVD_RW=1 + ID_CDROM_DVD_RAM=1 + ID_CDROM_DVD_PLUS_R=1 + ID_CDROM_DVD_PLUS_RW=1 + ID_CDROM_DVD_PLUS_R_DL=1 + ID_CDROM_MEDIA_CD=1 + ID_CDROM_MEDIA_STATE=complete + ID_CDROM_MEDIA_HAS_AUDIO=1 + ID_CDROM_MEDIA_SESSION_COUNT=2 + ID_CDROM_MEDIA_TRACK_COUNT=13 + ID_CDROM_MEDIA_SESSION_LAST_OFFSET=444508160 +--- + extras/cdrom_id/60-cdrom_id.rules | 2 +- + extras/cdrom_id/cdrom_id.8 | 15 +- + extras/cdrom_id/cdrom_id.c | 677 +++++++++++++++++++++++++++++++++---- + 3 files changed, 617 insertions(+), 77 deletions(-) + +diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules +index b06dafd..12fbf63 100644 +--- a/extras/cdrom_id/60-cdrom_id.rules ++++ b/extras/cdrom_id/60-cdrom_id.rules +@@ -1,3 +1,3 @@ + # import optical drive properties + +-KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" ++ACTION=="add|change", KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" +diff --git a/extras/cdrom_id/cdrom_id.8 b/extras/cdrom_id/cdrom_id.8 +index 4194ae4..1d4d70d 100644 +--- a/extras/cdrom_id/cdrom_id.8 ++++ b/extras/cdrom_id/cdrom_id.8 +@@ -1,17 +1,16 @@ +-.TH CDROM_ID 8 "November 2005" "" "Linux Administrator's Manual" ++.TH CDROM_ID 8 "April 2008" "" "Linux Administrator's Manual" + .SH NAME +-cdrom_id \- udev callout to determine the capabilities of cd/dvd drives ++cdrom_id \- udev callout to determine the capabilities of optical drives and media + .SH SYNOPSIS + .BI cdrom_id +-[\fI--export\fP] \fIblockdevice\fP ++[\fI--export\fP] \fIdevice\fP + .SH "DESCRIPTION" + .B cdrom_id +-is normally called from a udev rule, to provide udev with the capabilities +-of a cdrom or dvdrom drive. Udev can use this information to create +-symlinks like /dev/cdrom or /dev/dvd to the real device node. ++is normally called from a udev rule, to provide udev with the list of ++capabilities of a optical drive. + .SH USAGE + .B cdrom_id +-opens the blockdevice node specified at the commandline and prints the ++opens the device node specified at the commandline and prints the + discovered capabilities. + .SH OPTIONS + The following commandline switches are supported to specify what cdrom_id +@@ -23,5 +22,5 @@ print all values (default) + .SH SEE ALSO + .BR udev (7) + .SH AUTHORS +-Developed by Greg Kroah\-Hartman . ++Developed by Kay Sievers . + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 0d4a8c1..315d276 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -1,12 +1,21 @@ + /* +- * cdrom_id - determines the capabilities of cdrom drives ++ * cdrom_id - optical drive and media information prober + * +- * Copyright (C) 2005 Greg Kroah-Hartman ++ * Copyright (C) 2008 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 program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * + */ + + #ifndef _GNU_SOURCE +@@ -14,50 +23,27 @@ + #endif + + #include ++#include + #include + #include +-#include +-#include + #include ++#include ++#include + #include +-#include ++#include ++#include + #include + #include +-#include +- ++#include ++#include ++#include + #include "../../udev.h" + +-/* +- * Taken from the cdrom.h kernel include file. +- * Included here as some distros don't have an updated version +- * with all of the DVD flags. So we just include our own, aren't +- * we so nice... +- */ +-#define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ +- +-/* capability flags used with the uniform CD-ROM driver */ +-#define CDC_CLOSE_TRAY 0x1 /* caddy systems _can't_ close */ +-#define CDC_OPEN_TRAY 0x2 /* but _can_ eject. */ +-#define CDC_LOCK 0x4 /* disable manual eject */ +-#define CDC_SELECT_SPEED 0x8 /* programmable speed */ +-#define CDC_SELECT_DISC 0x10 /* select disc from juke-box */ +-#define CDC_MULTI_SESSION 0x20 /* read sessions>1 */ +-#define CDC_MCN 0x40 /* Medium Catalog Number */ +-#define CDC_MEDIA_CHANGED 0x80 /* media changed */ +-#define CDC_PLAY_AUDIO 0x100 /* audio functions */ +-#define CDC_RESET 0x200 /* hard reset device */ +-#define CDC_IOCTLS 0x400 /* driver has non-standard ioctls */ +-#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */ +-#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */ +-#define CDC_CD_R 0x2000 /* drive is a CD-R */ +-#define CDC_CD_RW 0x4000 /* drive is a CD-RW */ +-#define CDC_DVD 0x8000 /* drive is a DVD */ +-#define CDC_DVD_R 0x10000 /* drive can write DVD-R */ +-#define CDC_DVD_RAM 0x20000 /* drive can write DVD-RAM */ +-#define CDC_MO_DRIVE 0x40000 /* drive is an MO device */ +-#define CDC_MRW 0x80000 /* drive can read MRW */ +-#define CDC_MRW_W 0x100000 /* drive can write MRW */ +-#define CDC_RAM 0x200000 /* ok to open for WRITE */ ++#ifndef ARRAY_SIZE ++#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) ++#endif ++ ++static int debug; + + #ifdef USE_LOG + void log_message(int priority, const char *format, ...) +@@ -73,80 +59,635 @@ void log_message(int priority, const char *format, ...) + udev_log = log_priority(value); + else + udev_log = LOG_ERR; ++ ++ if (debug && udev_log < LOG_INFO) ++ udev_log = LOG_INFO; + } + + if (priority > udev_log) + return; + + va_start(args, format); +- vsyslog(priority, format, args); ++ if (debug) { ++ fprintf(stderr, "[%d] ", (int) getpid()); ++ vfprintf(stderr, format, args); ++ fprintf(stderr, "\n"); ++ } else ++ vsyslog(priority, format, args); + va_end(args); + } + #endif + ++/* device info */ ++static unsigned int cd_cd_rom; ++static unsigned int cd_cd_r; ++static unsigned int cd_cd_rw; ++static unsigned int cd_dvd_rom; ++static unsigned int cd_dvd_r; ++static unsigned int cd_dvd_rw; ++static unsigned int cd_dvd_ram; ++static unsigned int cd_dvd_plus_r; ++static unsigned int cd_dvd_plus_rw; ++static unsigned int cd_dvd_plus_r_dl; ++static unsigned int cd_dvd_plus_rw_dl; ++static unsigned int cd_bd; ++static unsigned int cd_bd_r; ++static unsigned int cd_bd_re; ++static unsigned int cd_hddvd; ++static unsigned int cd_hddvd_r; ++static unsigned int cd_hddvd_rw; ++static unsigned int cd_mo; ++static unsigned int cd_mrw; ++static unsigned int cd_mrw_w; ++ ++/* media info */ ++static unsigned int cd_media_cd_rom; ++static unsigned int cd_media_cd_r; ++static unsigned int cd_media_cd_rw; ++static unsigned int cd_media_dvd_rom; ++static unsigned int cd_media_dvd_r; ++static unsigned int cd_media_dvd_rw; ++static unsigned int cd_media_dvd_ram; ++static unsigned int cd_media_dvd_plus_r; ++static unsigned int cd_media_dvd_plus_rw; ++static unsigned int cd_media_dvd_plus_r_dl; ++static unsigned int cd_media_dvd_plus_rw_dl; ++static unsigned int cd_media_bd; ++static unsigned int cd_media_bd_r; ++static unsigned int cd_media_bd_re; ++static unsigned int cd_media_hddvd; ++static unsigned int cd_media_hddvd_r; ++static unsigned int cd_media_hddvd_rw; ++static unsigned int cd_media_mo; ++static unsigned int cd_media_mrw; ++static unsigned int cd_media_mrw_w; ++ ++static const char *cd_media_state; ++static unsigned int cd_media_has_audio; ++static unsigned int cd_media_session_next; ++static unsigned int cd_media_session_count; ++static unsigned int cd_media_track_count; ++static unsigned long long int cd_media_session_last_offset; ++ ++#define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) ++#define SK(errcode) (((errcode) >> 16) & 0xF) ++#define ASC(errcode) (((errcode) >> 8) & 0xFF) ++#define ASCQ(errcode) ((errcode) & 0xFF) ++ ++static void info_scsi_cmd_err(const char *cmd, int err) ++{ ++ if (err == -1) { ++ info("%s failed", cmd); ++ return; ++ } ++ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); ++} ++ ++struct scsi_cmd { ++ struct cdrom_generic_command cgc; ++ union { ++ struct request_sense s; ++ unsigned char u[18]; ++ } _sense; ++ struct sg_io_hdr sg_io; ++}; ++ ++static void scsi_cmd_set(struct scsi_cmd *cmd, size_t i, int arg) ++{ ++ if (i == 0) { ++ memset(cmd, 0x00, sizeof(struct scsi_cmd)); ++ cmd->cgc.quiet = 1; ++ cmd->cgc.sense = &cmd->_sense.s; ++ memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); ++ cmd->sg_io.interface_id = 'S'; ++ cmd->sg_io.mx_sb_len = sizeof(cmd->_sense); ++ cmd->sg_io.cmdp = cmd->cgc.cmd; ++ cmd->sg_io.sbp = cmd->_sense.u; ++ cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO; ++ } ++ cmd->sg_io.cmd_len = i + 1; ++ cmd->cgc.cmd[i] = arg; ++} ++ ++#define CHECK_CONDITION 0x01 ++ ++static int scsi_cmd_run(struct scsi_cmd *cmd, int fd, unsigned char *buf, size_t bufsize) ++{ ++ int ret = 0; ++ ++ cmd->sg_io.dxferp = buf; ++ cmd->sg_io.dxfer_len = bufsize; ++ cmd->sg_io.dxfer_direction = SG_DXFER_FROM_DEV; ++ if (ioctl(fd, SG_IO, &cmd->sg_io)) ++ return -1; ++ ++ if ((cmd->sg_io.info & SG_INFO_OK_MASK) != SG_INFO_OK) { ++ errno = EIO; ++ ret = -1; ++ if (cmd->sg_io.masked_status & CHECK_CONDITION) { ++ ret = ERRCODE(cmd->_sense.u); ++ if (ret == 0) ++ ret = -1; ++ } ++ } ++ return ret; ++} ++ ++static int cd_capability_compat(int fd) ++{ ++ int capabilty; ++ ++ capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); ++ if (capabilty < 0) { ++ info("CDROM_GET_CAPABILITY failed"); ++ return -1; ++ } ++ ++ if (capabilty & CDC_CD_R) ++ cd_cd_r = 1; ++ if (capabilty & CDC_CD_RW) ++ cd_cd_rw = 1; ++ if (capabilty & CDC_DVD) ++ cd_dvd_rom = 1; ++ if (capabilty & CDC_DVD_R) ++ cd_dvd_r = 1; ++ if (capabilty & CDC_DVD_RAM) ++ cd_dvd_ram = 1; ++ if (capabilty & CDC_MRW) ++ cd_mrw = 1; ++ if (capabilty & CDC_MRW_W) ++ cd_mrw_w = 1; ++ return 0; ++} ++ ++static int cd_inquiry(int fd) { ++ struct scsi_cmd sc; ++ unsigned char inq[128]; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x12); ++ scsi_cmd_set(&sc, 4, 36); ++ scsi_cmd_set(&sc, 5, 0); ++ err = scsi_cmd_run(&sc, fd, inq, 36); ++ if ((err < 0)) { ++ info_scsi_cmd_err("INQUIRY", err); ++ return -1; ++ } ++ ++ if ((inq[0] & 0x1F) != 5) { ++ info("not an MMC unit"); ++ return -1; ++ } ++ ++ info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); ++ return 0; ++} ++ ++static int cd_profiles(int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char header[8]; ++ unsigned char profiles[512]; ++ unsigned int cur_profile; ++ unsigned int len; ++ unsigned int i; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x46); ++ scsi_cmd_set(&sc, 1, 0); ++ scsi_cmd_set(&sc, 8, sizeof(header)); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("GET CONFIGURATION", err); ++ return -1; ++ } ++ ++ len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); ++ info("GET CONFIGURATION: number of profiles %i", len); ++ if (len > sizeof(profiles)) { ++ info("invalid number of profiles"); ++ return -1; ++ } ++ ++ scsi_cmd_set(&sc, 0, 0x46); ++ scsi_cmd_set(&sc, 1, 1); ++ scsi_cmd_set(&sc, 6, len >> 16); ++ scsi_cmd_set(&sc, 7, len >> 8); ++ scsi_cmd_set(&sc, 8, len); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, profiles, len); ++ if ((err < 0)) { ++ info_scsi_cmd_err("GET CONFIGURATION", err); ++ return -1; ++ } ++ ++ /* device profiles */ ++ for (i = 12; i < profiles[11]; i += 4) { ++ unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); ++ if (profile == 0) ++ continue; ++ info("profile 0x%02x", profile); ++ ++ switch (profile) { ++ case 0x03: ++ case 0x04: ++ case 0x05: ++ cd_mo = 1; ++ break; ++ case 0x10: ++ cd_dvd_rom = 1; ++ break; ++ case 0x12: ++ cd_dvd_ram = 1; ++ break; ++ case 0x13: ++ case 0x14: ++ cd_dvd_rw = 1; ++ break; ++ case 0x1B: ++ cd_dvd_plus_r = 1; ++ break; ++ case 0x1A: ++ cd_dvd_plus_rw = 1; ++ break; ++ case 0x2A: ++ cd_dvd_plus_rw_dl = 1; ++ break; ++ case 0x2B: ++ cd_dvd_plus_r_dl = 1; ++ break; ++ case 0x40: ++ cd_bd = 1; ++ break; ++ case 0x41: ++ case 0x42: ++ cd_bd_r = 1; ++ break; ++ case 0x43: ++ cd_bd_re = 1; ++ break; ++ case 0x50: ++ cd_hddvd = 1; ++ break; ++ case 0x51: ++ cd_hddvd_r = 1; ++ break; ++ case 0x52: ++ cd_hddvd_rw = 1; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ /* current media profile */ ++ cur_profile = header[6] << 8 | header[7]; ++ info("current profile 0x%02x", cur_profile); ++ if (cur_profile == 0) { ++ info("no current profile, assuming no media"); ++ return -1; ++ } ++ ++ switch (cur_profile) { ++ case 0x03: ++ case 0x04: ++ case 0x05: ++ cd_media_mo = 1; ++ break; ++ case 0x08: ++ cd_media_cd_rom = 1; ++ break; ++ case 0x09: ++ cd_media_cd_r = 1; ++ break; ++ case 0x0a: ++ cd_media_cd_rw = 1; ++ break; ++ case 0x10: ++ cd_media_dvd_rom = 1; ++ break; ++ case 0x11: ++ cd_media_dvd_r = 1; ++ break; ++ case 0x12: ++ cd_media_dvd_ram = 1; ++ break; ++ case 0x13: ++ case 0x14: ++ cd_media_dvd_rw = 1; ++ break; ++ case 0x1B: ++ cd_media_dvd_plus_r = 1; ++ break; ++ case 0x1A: ++ cd_media_dvd_plus_rw = 1; ++ break; ++ case 0x2A: ++ cd_media_dvd_plus_rw_dl = 1; ++ break; ++ case 0x2B: ++ cd_media_dvd_plus_r_dl = 1; ++ break; ++ case 0x40: ++ cd_media_bd = 1; ++ break; ++ case 0x41: ++ case 0x42: ++ cd_media_bd_r = 1; ++ break; ++ case 0x43: ++ cd_media_bd_re = 1; ++ break; ++ case 0x50: ++ cd_media_hddvd = 1; ++ break; ++ case 0x51: ++ cd_media_hddvd_r = 1; ++ break; ++ case 0x52: ++ cd_media_hddvd_rw = 1; ++ break; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++static int cd_media_info(int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char header[32]; ++ static const char *media_status[] = { ++ "blank", ++ "appendable", ++ "complete", ++ "other" ++ }; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x51); ++ scsi_cmd_set(&sc, 8, sizeof(header)); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ DISC INFORMATION", err); ++ return -1; ++ }; ++ ++ info("disk type %02x", header[8]); ++ ++ if ((header[2] & 3) < 4) ++ cd_media_state = media_status[header[2] & 3]; ++ if ((header[2] & 3) != 2) ++ cd_media_session_next = header[10] << 8 | header[5]; ++ cd_media_session_count = header[9] << 8 | header[4]; ++ cd_media_track_count = header[11] << 8 | header[6]; ++ ++ return 0; ++} ++ ++static int cd_media_toc(int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char header[12]; ++ unsigned char toc[2048]; ++ unsigned int len, i; ++ unsigned char *p; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x43); ++ scsi_cmd_set(&sc, 6, 1); ++ scsi_cmd_set(&sc, 8, sizeof(header)); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ TOC", err); ++ return -1; ++ } ++ ++ len = (header[0] << 8 | header[1]) + 2; ++ info("READ TOC: len: %d", len); ++ if (len > sizeof(toc)) ++ return -1; ++ ++ /* check if we have a data track */ ++ info("ctl %02x (0x04 is data/audio)", header[5]); ++ cd_media_has_audio = (header[5] & 0x04) == 0; ++ ++ scsi_cmd_set(&sc, 0, 0x43); ++ scsi_cmd_set(&sc, 6, header[2]); /* First Track/Session Number */ ++ scsi_cmd_set(&sc, 7, len >> 8); ++ scsi_cmd_set(&sc, 8, len); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, toc, len); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ TOC (tracks)", err); ++ return -1; ++ } ++ ++ for (p = toc+4, i = 4; i < len-8; i += 8, p += 8) { ++ unsigned int block; ++ ++ block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; ++ info("track %u starts at block %u", p[2], block); ++ } ++ ++ scsi_cmd_set(&sc, 0, 0x43); ++ scsi_cmd_set(&sc, 2, 1); /* Session Info */ ++ scsi_cmd_set(&sc, 8, 12); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ TOC (multi session)", err); ++ return -1; ++ } ++ len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; ++ info("last track %u starts at block %u", header[4+2], len); ++ cd_media_session_last_offset = (unsigned long long int)len * 2048; ++ return 0; ++} ++ + int main(int argc, char *argv[]) + { ++ static const struct option options[] = { ++ { "export", 0, NULL, 'x' }, ++ { "debug", 0, NULL, 'd' }, ++ { "help", 0, NULL, 'h' }, ++ {} ++ }; + const char *node = NULL; +- int i; + int export = 0; +- int fd; ++ int fd = -1; + int rc = 0; +- int result; + + logging_init("cdrom_id"); + +- for (i = 1 ; i < argc; i++) { +- char *arg = argv[i]; ++ while (1) { ++ int option; + +- if (strcmp(arg, "--export") == 0) { ++ option = getopt_long(argc, argv, "dxh", options, NULL); ++ if (option == -1) ++ break; ++ ++ switch (option) { ++ case 'd': ++ debug = 1; ++ break; ++ case 'x': + export = 1; +- } else +- node = arg; ++ break; ++ case 'h': ++ printf("Usage: cdrom_id [options] \n" ++ " --export export key/value pairs\n" ++ " --help\n\n"); ++ goto exit; ++ default: ++ rc = 1; ++ goto exit; ++ } + } ++ ++ node = argv[optind]; + if (!node) { +- info("no node specified"); ++ err("no device"); ++ fprintf(stderr, "no device\n"); + rc = 1; + goto exit; + } + +- fd = open(node, O_RDONLY|O_NONBLOCK); ++ fd = open(node, O_RDONLY | O_NONBLOCK); + if (fd < 0) { + info("unable to open '%s'", node); + rc = 1; + goto exit; + } ++ info("probing: '%s'", node); ++ ++ /* same data as original cdrom_id */ ++ if (cd_capability_compat(fd) < 0) { ++ rc = 1; ++ goto exit; ++ } + +- result = ioctl(fd, CDROM_GET_CAPABILITY, NULL); +- if (result < 0) { +- info("CDROM_GET_CAPABILITY failed for '%s'", node); +- rc = 3; +- goto close; ++ /* check drive */ ++ if (cd_inquiry(fd) < 0) { ++ rc = 2; ++ goto exit; + } + +- printf("ID_CDROM=1\n"); ++ /* read drive and possibly current profile */ ++ if (cd_profiles(fd) < 0) ++ goto print; ++ ++ /* get session/track info */ ++ if (cd_media_toc(fd) < 0) ++ goto print; + +- if (result & CDC_CD_R) ++ /* get writable media state */ ++ if (cd_media_info(fd) < 0) ++ goto print; ++ ++print: ++ printf("ID_CDROM=1\n"); ++ if (cd_cd_rom) ++ printf("ID_CDROM_CD=1\n"); ++ if (cd_cd_r) + printf("ID_CDROM_CD_R=1\n"); +- if (result & CDC_CD_RW) ++ if (cd_cd_rw) + printf("ID_CDROM_CD_RW=1\n"); +- +- if (result & CDC_DVD) ++ if (cd_dvd_rom) + printf("ID_CDROM_DVD=1\n"); +- if (result & CDC_DVD_R) ++ if (cd_dvd_r) + printf("ID_CDROM_DVD_R=1\n"); +- if (result & CDC_DVD_RAM) ++ if (cd_dvd_rw) ++ printf("ID_CDROM_DVD_RW=1\n"); ++ if (cd_dvd_ram) + printf("ID_CDROM_DVD_RAM=1\n"); +- +- if (result & CDC_MRW) ++ if (cd_dvd_plus_r) ++ printf("ID_CDROM_DVD_PLUS_R=1\n"); ++ if (cd_dvd_plus_rw) ++ printf("ID_CDROM_DVD_PLUS_RW=1\n"); ++ if (cd_dvd_plus_r_dl) ++ printf("ID_CDROM_DVD_PLUS_R_DL=1\n"); ++ if (cd_dvd_plus_rw_dl) ++ printf("ID_CDROM_DVD_PLUS_RW_DL=1\n"); ++ if (cd_bd) ++ printf("ID_CDROM_BD=1\n"); ++ if (cd_bd_r) ++ printf("ID_CDROM_BD_R=1\n"); ++ if (cd_bd_re) ++ printf("ID_CDROM_BD_RE=1\n"); ++ if (cd_hddvd) ++ printf("ID_CDROM_HDDVD=1\n"); ++ if (cd_hddvd_r) ++ printf("ID_CDROM_HDDVD_R=1\n"); ++ if (cd_hddvd_rw) ++ printf("ID_CDROM_HDDVD_RW=1\n"); ++ if (cd_mo) ++ printf("ID_CDROM_MO=1\n"); ++ if (cd_mrw) + printf("ID_CDROM_MRW=1\n"); +- if (result & CDC_MRW_W) ++ if (cd_mrw_w) + printf("ID_CDROM_MRW_W=1\n"); + +- if (result & CDC_RAM) +- printf("ID_CDROM_RAM=1\n"); +-close: +- close(fd); ++ if (cd_media_mo) ++ printf("ID_CDROM_MEDIA_MO=1\n"); ++ if (cd_media_mrw) ++ printf("ID_CDROM_MEDIA_MRW=1\n"); ++ if (cd_media_mrw_w) ++ printf("ID_CDROM_MEDIA_MRW_W=1\n"); ++ if (cd_media_cd_rom) ++ printf("ID_CDROM_MEDIA_CD=1\n"); ++ if (cd_media_cd_r) ++ printf("ID_CDROM_MEDIA_CD_R=1\n"); ++ if (cd_media_cd_rw) ++ printf("ID_CDROM_MEDIA_CD_RW=1\n"); ++ if (cd_media_dvd_rom) ++ printf("ID_CDROM_MEDIA_DVD=1\n"); ++ if (cd_media_dvd_r) ++ printf("ID_CDROM_MEDIA_DVD_R=1\n"); ++ if (cd_media_dvd_ram) ++ printf("ID_CDROM_MEDIA_DVD_RAM=1\n"); ++ if (cd_media_dvd_rw) ++ printf("ID_CDROM_MEDIA_DVD_RW=1\n"); ++ if (cd_media_dvd_plus_r) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_R=1\n"); ++ if (cd_media_dvd_plus_rw) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_RW=1\n"); ++ if (cd_media_dvd_plus_rw_dl) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_RW_DL=1\n"); ++ if (cd_media_dvd_plus_r_dl) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_R_DL=1\n"); ++ if (cd_media_bd) ++ printf("ID_CDROM_MEDIA_BD=1\n"); ++ if (cd_media_bd_r) ++ printf("ID_CDROM_MEDIA_BD_R=1\n"); ++ if (cd_media_bd_re) ++ printf("ID_CDROM_MEDIA_BD_RE=1\n"); ++ if (cd_media_hddvd) ++ printf("ID_CDROM_MEDIA_HDDVD=1\n"); ++ if (cd_media_hddvd_r) ++ printf("ID_CDROM_MEDIA_HDDVD_R=1\n"); ++ if (cd_media_hddvd_rw) ++ printf("ID_CDROM_MEDIA_HDDVD_RW=1\n"); ++ ++ if (cd_media_state != NULL) ++ printf("ID_CDROM_MEDIA_STATE=%s\n", cd_media_state); ++ if (cd_media_has_audio) ++ printf("ID_CDROM_MEDIA_HAS_AUDIO=1\n"); ++ if (cd_media_session_next > 0) ++ printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next); ++ if (cd_media_session_count > 0) ++ printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count); ++ if (cd_media_track_count > 0) ++ printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count); ++ if (cd_media_session_last_offset) ++ printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); + exit: ++ if (fd >= 0) ++ close(fd); + logging_close(); + return rc; + } ++ +-- +1.5.4.5 + diff --git a/0005-udevd-at-startup-write-message-including-version-nu.patch b/0005-udevd-at-startup-write-message-including-version-nu.patch new file mode 100644 index 0000000..4033f2f --- /dev/null +++ b/0005-udevd-at-startup-write-message-including-version-nu.patch @@ -0,0 +1,31 @@ +From 798d7ab60c476a2c7bcef6918a40dce1756204d1 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 10 Apr 2008 21:35:40 +0200 +Subject: [PATCH] udevd: at startup write message including version number to kernel log + +--- + udevd.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/udevd.c b/udevd.c +index 493bb54..530fc59 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -1116,6 +1116,14 @@ int main(int argc, char *argv[], char *envp[]) + close(fd); + } + ++ fd = open("/dev/kmsg", O_WRONLY); ++ if (fd > 0) { ++ const char *str = "<6>udevd version " UDEV_VERSION " started\n"; ++ ++ write(fd, str, strlen(str)); ++ close(fd); ++ } ++ + /* set signal handlers */ + memset(&act, 0x00, sizeof(struct sigaction)); + act.sa_handler = (void (*)(int)) sig_handler; +-- +1.5.4.5 + diff --git a/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch b/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch new file mode 100644 index 0000000..dd4f665 --- /dev/null +++ b/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch @@ -0,0 +1,49 @@ +From e6d70ed63a03f39de148e6b0afb47cbbc5ec78eb Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 15 Apr 2008 00:21:51 +0200 +Subject: [PATCH] rules_generator: net rules - always add KERNEL== match to generated rules + +--- + .../75-persistent-net-generator.rules | 2 +- + extras/rule_generator/write_net_rules | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules +index 2aa3076..85a4c5b 100644 +--- a/extras/rule_generator/75-persistent-net-generator.rules ++++ b/extras/rule_generator/75-persistent-net-generator.rules +@@ -18,7 +18,7 @@ SUBSYSTEM!="net", GOTO="persistent_net_generator_end" + 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" ++KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" + + # ignore Xen virtual interfaces + SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" +diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules +index 765e56f..322398b 100644 +--- a/extras/rule_generator/write_net_rules ++++ b/extras/rule_generator/write_net_rules +@@ -92,6 +92,9 @@ if [ -z "$match" ]; then + exit 1 + fi + ++basename=${INTERFACE%%[0-9]*} ++match="$match, KERNEL==\"$basename*\"" ++ + if [ "$INTERFACE_NAME" ]; then + # external tools may request a custom name + COMMENT="$COMMENT (custom name provided by external tool)" +@@ -101,8 +104,6 @@ if [ "$INTERFACE_NAME" ]; then + fi + else + # if a rule using the current name already exists, find a new name +- basename=${INTERFACE%%[0-9]*} +- match="$match, KERNEL==\"$basename*\"" + if interface_name_taken; then + INTERFACE="$basename$(find_next_available "$basename[0-9]*")" + echo "INTERFACE_NEW=$INTERFACE" +-- +1.5.4.5 + diff --git a/0007-selinux-more-context-settings.patch b/0007-selinux-more-context-settings.patch new file mode 100644 index 0000000..056a40c --- /dev/null +++ b/0007-selinux-more-context-settings.patch @@ -0,0 +1,88 @@ +From 6056d9b3400fe0349d86636cbbf93f069bb5639a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 17 Apr 2008 16:03:03 +0200 +Subject: [PATCH] selinux: more context settings + +Signed-off-by: Harald Hoyer +--- + udev_db.c | 6 +++++- + udev_rules_parse.c | 2 ++ + udev_utils_file.c | 7 ++++++- + udevd.c | 2 ++ + 4 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/udev_db.c b/udev_db.c +index 518ace9..4447253 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -144,8 +144,12 @@ int udev_db_add_device(struct udevice *udev) + */ + if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && + !udev->partitions && !udev->ignore_remove) { ++ int ret; + dbg("nothing interesting to store, create symlink"); +- if (symlink(udev->name, filename) != 0) { ++ selinux_setfscreatecon(filename, NULL, S_IFLNK); ++ ret = symlink(udev->name, filename); ++ selinux_resetfscreatecon(); ++ if (ret != 0) { + err("unable to create db link '%s': %s", filename, strerror(errno)); + return -1; + } +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index 9e43581..d2392c3 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -745,7 +745,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) + strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); + if (stat(filename, &statbuf) != 0) { + create_path(filename); ++ selinux_setfscreatecon(filename, NULL, S_IFDIR|0755); + mkdir(filename, 0755); ++ selinux_resetfscreatecon(); + } + add_matching_files(&dyn_list, filename, RULESFILE_SUFFIX); + +diff --git a/udev_utils_file.c b/udev_utils_file.c +index 0ceefe1..9ab3470 100644 +--- a/udev_utils_file.c ++++ b/udev_utils_file.c +@@ -35,6 +35,7 @@ int create_path(const char *path) + char p[PATH_SIZE]; + char *pos; + struct stat stats; ++ int ret; + + strlcpy(p, path, sizeof(p)); + pos = strrchr(p, '/'); +@@ -53,8 +54,12 @@ int create_path(const char *path) + return -1; + + dbg("mkdir '%s'", p); +- if (mkdir(p, 0755) == 0) ++ selinux_setfscreatecon(p, NULL, S_IFDIR|0755); ++ ret = mkdir(p, 0755); ++ selinux_resetfscreatecon(); ++ if (ret == 0) + return 0; ++ + if (errno == EEXIST) + if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) + return 0; +diff --git a/udevd.c b/udevd.c +index 530fc59..7786ae6 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -168,7 +168,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + delete_path(filename_failed); + + create_path(filename); ++ selinux_setfscreatecon(filename, NULL, S_IFLNK); + symlink(msg->devpath, filename); ++ selinux_resetfscreatecon(); + break; + case EVENT_FINISHED: + if (msg->devpath_old != NULL) { +-- +1.5.4.5 + diff --git a/0008-selinux-fix-missing-includes.patch b/0008-selinux-fix-missing-includes.patch new file mode 100644 index 0000000..f17d119 --- /dev/null +++ b/0008-selinux-fix-missing-includes.patch @@ -0,0 +1,63 @@ +From 4278ab015d76876f61821b293df07e0c3746bfd5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 17 Apr 2008 23:31:09 +0200 +Subject: [PATCH] selinux: fix missing includes + +--- + udev_db.c | 1 + + udev_rules.c | 1 + + udev_rules_parse.c | 1 + + udev_utils_file.c | 1 + + 4 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/udev_db.c b/udev_db.c +index 4447253..1feab7d 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -31,6 +31,7 @@ + #include + + #include "udev.h" ++#include "udev_selinux.h" + + + static size_t devpath_to_db_path(const char *devpath, char *filename, size_t len) +diff --git a/udev_rules.c b/udev_rules.c +index eccea3b..6565a2e 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -35,6 +35,7 @@ + + #include "udev.h" + #include "udev_rules.h" ++#include "udev_selinux.h" + + extern char **environ; + +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index d2392c3..ce659d7 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -28,6 +28,7 @@ + + #include "udev.h" + #include "udev_rules.h" ++#include "udev_selinux.h" + + + void udev_rules_iter_init(struct udev_rules *rules) +diff --git a/udev_utils_file.c b/udev_utils_file.c +index 9ab3470..19668b9 100644 +--- a/udev_utils_file.c ++++ b/udev_utils_file.c +@@ -29,6 +29,7 @@ + #include + + #include "udev.h" ++#include "udev_selinux.h" + + int create_path(const char *path) + { +-- +1.5.4.5 + diff --git a/0009-allow-setting-of-MODE-0000.patch b/0009-allow-setting-of-MODE-0000.patch new file mode 100644 index 0000000..8f85310 --- /dev/null +++ b/0009-allow-setting-of-MODE-0000.patch @@ -0,0 +1,93 @@ +From cf100ca71bf365d8898e97d4ec9dd05c3941cae8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 18 Apr 2008 21:07:29 +0200 +Subject: [PATCH] allow setting of MODE="0000" + +--- + test/udev-test.pl | 10 ++++++++++ + udev_rules.c | 10 +++++----- + udev_rules.h | 3 +-- + udev_rules_parse.c | 3 +-- + 4 files changed, 17 insertions(+), 9 deletions(-) + +diff --git a/test/udev-test.pl b/test/udev-test.pl +index 2621e2b..fee62a6 100755 +--- a/test/udev-test.pl ++++ b/test/udev-test.pl +@@ -1607,6 +1607,16 @@ EOF + KERNEL=="sda", TEST=="*/nr_requests", NAME="found-subdir" + EOF + }, ++ { ++ desc => "TEST MODE=0000", ++ subsys => "block", ++ devpath => "/block/sda", ++ exp_name => "sda", ++ exp_perms => "0:0:0000", ++ rules => <mode_final && rule->mode != 0000) { +- if (rule->mode_operation == KEY_OP_ASSIGN_FINAL) ++ if (!udev->mode_final && rule->mode.operation != KEY_OP_UNSET) { ++ if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) + udev->mode_final = 1; +- udev->mode = rule->mode; +- dbg("applied mode=%#o to '%s'", rule->mode, udev->dev->kernel); ++ udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); ++ dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); + } + if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { + if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) +@@ -1534,7 +1534,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + 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->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; +diff --git a/udev_rules.h b/udev_rules.h +index 0ad4ec3..a84b0de 100644 +--- a/udev_rules.h ++++ b/udev_rules.h +@@ -93,8 +93,7 @@ struct udev_rule { + struct key symlink_match; + struct key owner; + struct key group; +- mode_t mode; +- enum key_operation mode_operation; ++ struct key mode; + enum escape_type string_escape; + + unsigned int link_priority; +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index ce659d7..6d88354 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -579,8 +579,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + } + + if (strcasecmp(key, "MODE") == 0) { +- rule->mode = strtol(value, NULL, 8); +- rule->mode_operation = operation; ++ add_rule_key(rule, &rule->mode, operation, value); + valid = 1; + continue; + } +-- +1.5.4.5 + diff --git a/0010-path_id-remove-subsystem-whitelist.patch b/0010-path_id-remove-subsystem-whitelist.patch new file mode 100644 index 0000000..3ae1bea --- /dev/null +++ b/0010-path_id-remove-subsystem-whitelist.patch @@ -0,0 +1,54 @@ +From 1d918b50cddc975abbfd06af134a6d843d9bc7f0 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 18 Apr 2008 21:08:07 +0200 +Subject: [PATCH] path_id: remove subsystem whitelist + +--- + extras/path_id/path_id | 27 +++++++-------------------- + 1 files changed, 7 insertions(+), 20 deletions(-) + +diff --git a/extras/path_id/path_id b/extras/path_id/path_id +index a3a627e..7a37700 100755 +--- a/extras/path_id/path_id ++++ b/extras/path_id/path_id +@@ -549,7 +549,7 @@ handle_device () { + ;; + *) + mode="" +- ;; ++ ;; + esac + if [ "$d" ]; then + d="$d-${rewind}st${mode}" +@@ -557,22 +557,9 @@ handle_device () { + fi + } + +-case "$TYPE" in +- block) +- handle_device +- echo "ID_PATH=$d" +- ;; +- scsi_tape) +- handle_device +- echo "ID_PATH=$d" +- ;; +- input) +- handle_device +- echo "ID_PATH=$d" +- ;; +- *) +- RESULT=1 +- ;; +-esac +- +-exit $RESULT ++handle_device ++if [ -z "$d" ]; then ++ exit 1 ++fi ++echo "ID_PATH=$d" ++exit 0 +-- +1.5.4.5 + diff --git a/0011-logging-add-trailing-newline-to-all-strings.patch b/0011-logging-add-trailing-newline-to-all-strings.patch new file mode 100644 index 0000000..a4a3bd5 --- /dev/null +++ b/0011-logging-add-trailing-newline-to-all-strings.patch @@ -0,0 +1,5323 @@ +From c70560feef0eb61a150cd2f956f0beead4313ffe Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Apr 2008 21:07:06 +0200 +Subject: [PATCH] logging: add trailing newline to all strings + +--- + extras/ata_id/ata_id.c | 8 +- + extras/cdrom_id/cdrom_id.c | 37 +++--- + extras/edd_id/edd_id.c | 28 ++-- + extras/scsi_id/scsi_id.c | 40 +++--- + extras/scsi_id/scsi_serial.c | 76 +++++----- + extras/usb_id/usb_id.c | 24 ++-- + extras/volume_id/lib/adaptec_raid.c | 2 +- + extras/volume_id/lib/cramfs.c | 2 +- + extras/volume_id/lib/ddf_raid.c | 2 +- + extras/volume_id/lib/ext.c | 6 +- + extras/volume_id/lib/fat.c | 40 +++--- + extras/volume_id/lib/gfs.c | 2 +- + extras/volume_id/lib/hfs.c | 32 ++-- + extras/volume_id/lib/highpoint.c | 4 +- + extras/volume_id/lib/hpfs.c | 2 +- + extras/volume_id/lib/iso9660.c | 12 +- + extras/volume_id/lib/isw_raid.c | 2 +- + extras/volume_id/lib/jfs.c | 2 +- + extras/volume_id/lib/jmicron_raid.c | 2 +- + extras/volume_id/lib/linux_raid.c | 4 +- + extras/volume_id/lib/linux_swap.c | 2 +- + extras/volume_id/lib/lsi_raid.c | 2 +- + extras/volume_id/lib/lvm.c | 6 +- + extras/volume_id/lib/minix.c | 2 +- + extras/volume_id/lib/netware.c | 2 +- + extras/volume_id/lib/ntfs.c | 24 ++-- + extras/volume_id/lib/nvidia_raid.c | 2 +- + extras/volume_id/lib/ocfs.c | 6 +- + extras/volume_id/lib/promise_raid.c | 2 +- + extras/volume_id/lib/reiserfs.c | 2 +- + extras/volume_id/lib/romfs.c | 2 +- + extras/volume_id/lib/silicon_raid.c | 2 +- + extras/volume_id/lib/squashfs.c | 2 +- + extras/volume_id/lib/sysv.c | 2 +- + extras/volume_id/lib/udf.c | 12 +- + extras/volume_id/lib/ufs.c | 8 +- + extras/volume_id/lib/util.c | 28 ++-- + extras/volume_id/lib/via_raid.c | 2 +- + extras/volume_id/lib/volume_id.c | 6 +- + extras/volume_id/lib/vxfs.c | 2 +- + extras/volume_id/lib/xfs.c | 2 +- + extras/volume_id/vol_id.c | 6 +- + test-udev.c | 8 +- + udev_config.c | 14 +- + udev_db.c | 30 ++-- + udev_device.c | 40 +++--- + udev_node.c | 68 +++++----- + udev_rules.c | 268 +++++++++++++++++----------------- + udev_rules_parse.c | 128 +++++++++--------- + udev_selinux.c | 18 ++-- + udev_sysfs.c | 52 ++++---- + udev_utils.c | 22 ++-- + udev_utils_file.c | 14 +- + udevadm.c | 11 +- + udevcontrol.c | 16 +- + udevd.8 | 4 +- + udevd.c | 147 ++++++++++---------- + udevd.xml | 4 +- + udevinfo.c | 16 +- + udevsettle.c | 16 +- + udevtest.c | 10 +- + udevtrigger.c | 8 +- + 62 files changed, 671 insertions(+), 674 deletions(-) + +diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c +index f94cdc0..6d3c233 100644 +--- a/extras/ata_id/ata_id.c ++++ b/extras/ata_id/ata_id.c +@@ -126,24 +126,24 @@ int main(int argc, char *argv[]) + + node = argv[optind]; + if (node == NULL) { +- err("no node specified"); ++ err("no node specified\n"); + rc = 1; + goto exit; + } + + fd = open(node, O_RDONLY|O_NONBLOCK); + if (fd < 0) { +- err("unable to open '%s'", node); ++ err("unable to open '%s'\n", node); + rc = 1; + goto exit; + } + + if (ioctl(fd, HDIO_GET_IDENTITY, &id)) { + if (errno == ENOTTY) { +- info("HDIO_GET_IDENTITY unsupported for '%s'", node); ++ info("HDIO_GET_IDENTITY unsupported for '%s'\n", node); + rc = 2; + } else { +- err("HDIO_GET_IDENTITY failed for '%s'", node); ++ err("HDIO_GET_IDENTITY failed for '%s'\n", node); + rc = 3; + } + goto close; +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 315d276..b88f5b4 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -71,7 +71,6 @@ void log_message(int priority, const char *format, ...) + if (debug) { + fprintf(stderr, "[%d] ", (int) getpid()); + vfprintf(stderr, format, args); +- fprintf(stderr, "\n"); + } else + vsyslog(priority, format, args); + va_end(args); +@@ -137,10 +136,10 @@ static unsigned long long int cd_media_session_last_offset; + static void info_scsi_cmd_err(const char *cmd, int err) + { + if (err == -1) { +- info("%s failed", cmd); ++ info("%s failed\n", cmd); + return; + } +- info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); ++ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh\n", cmd, SK(err), ASC(err), ASCQ(err)); + } + + struct scsi_cmd { +@@ -199,7 +198,7 @@ static int cd_capability_compat(int fd) + + capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); + if (capabilty < 0) { +- info("CDROM_GET_CAPABILITY failed"); ++ info("CDROM_GET_CAPABILITY failed\n"); + return -1; + } + +@@ -235,11 +234,11 @@ static int cd_inquiry(int fd) { + } + + if ((inq[0] & 0x1F) != 5) { +- info("not an MMC unit"); ++ info("not an MMC unit\n"); + return -1; + } + +- info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); ++ info("INQUIRY: [%.8s][%.16s][%.4s]\n", inq + 8, inq + 16, inq + 32); + return 0; + } + +@@ -264,9 +263,9 @@ static int cd_profiles(int fd) + } + + len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); +- info("GET CONFIGURATION: number of profiles %i", len); ++ info("GET CONFIGURATION: number of profiles %i\n", len); + if (len > sizeof(profiles)) { +- info("invalid number of profiles"); ++ info("invalid number of profiles\n"); + return -1; + } + +@@ -287,7 +286,7 @@ static int cd_profiles(int fd) + unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); + if (profile == 0) + continue; +- info("profile 0x%02x", profile); ++ info("profile 0x%02x\n", profile); + + switch (profile) { + case 0x03: +@@ -343,9 +342,9 @@ static int cd_profiles(int fd) + + /* current media profile */ + cur_profile = header[6] << 8 | header[7]; +- info("current profile 0x%02x", cur_profile); ++ info("current profile 0x%02x\n", cur_profile); + if (cur_profile == 0) { +- info("no current profile, assuming no media"); ++ info("no current profile, assuming no media\n"); + return -1; + } + +@@ -435,7 +434,7 @@ static int cd_media_info(int fd) + return -1; + }; + +- info("disk type %02x", header[8]); ++ info("disk type %02x\n", header[8]); + + if ((header[2] & 3) < 4) + cd_media_state = media_status[header[2] & 3]; +@@ -467,12 +466,12 @@ static int cd_media_toc(int fd) + } + + len = (header[0] << 8 | header[1]) + 2; +- info("READ TOC: len: %d", len); ++ info("READ TOC: len: %d\n", len); + if (len > sizeof(toc)) + return -1; + + /* check if we have a data track */ +- info("ctl %02x (0x04 is data/audio)", header[5]); ++ info("ctl %02x (0x04 is data/audio)\n", header[5]); + cd_media_has_audio = (header[5] & 0x04) == 0; + + scsi_cmd_set(&sc, 0, 0x43); +@@ -490,7 +489,7 @@ static int cd_media_toc(int fd) + unsigned int block; + + block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; +- info("track %u starts at block %u", p[2], block); ++ info("track %u starts at block %u\n", p[2], block); + } + + scsi_cmd_set(&sc, 0, 0x43); +@@ -503,7 +502,7 @@ static int cd_media_toc(int fd) + return -1; + } + len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; +- info("last track %u starts at block %u", header[4+2], len); ++ info("last track %u starts at block %u\n", header[4+2], len); + cd_media_session_last_offset = (unsigned long long int)len * 2048; + return 0; + } +@@ -550,7 +549,7 @@ int main(int argc, char *argv[]) + + node = argv[optind]; + if (!node) { +- err("no device"); ++ err("no device\n"); + fprintf(stderr, "no device\n"); + rc = 1; + goto exit; +@@ -558,11 +557,11 @@ int main(int argc, char *argv[]) + + fd = open(node, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("unable to open '%s'", node); ++ info("unable to open '%s'\n", node); + rc = 1; + goto exit; + } +- info("probing: '%s'", node); ++ info("probing: '%s'\n", node); + + /* same data as original cdrom_id */ + if (cd_capability_compat(fd) < 0) { +diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c +index 4ba89ed..4a17770 100644 +--- a/extras/edd_id/edd_id.c ++++ b/extras/edd_id/edd_id.c +@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) + node = arg; + } + if (node == NULL) { +- err("no node specified"); ++ err("no node specified\n"); + fprintf(stderr, "no node specified\n"); + goto exit; + } +@@ -83,7 +83,7 @@ int main(int argc, char *argv[]) + /* check for kernel support */ + dir = opendir("/sys/firmware/edd"); + if (dir == NULL) { +- info("no kernel EDD support"); ++ info("no kernel EDD support\n"); + fprintf(stderr, "no kernel EDD support\n"); + rc = 2; + goto exit; +@@ -91,7 +91,7 @@ int main(int argc, char *argv[]) + + disk_fd = open(node, O_RDONLY); + if (disk_fd < 0) { +- info("unable to open '%s'", node); ++ info("unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); + rc = 3; + goto closedir; +@@ -99,38 +99,38 @@ int main(int argc, char *argv[]) + + /* check for valid MBR signature */ + if (lseek(disk_fd, 510, SEEK_SET) < 0) { +- info("seek to MBR validity failed '%s'", node); ++ info("seek to MBR validity failed '%s'\n", node); + rc = 4; + goto close; + } + if (read(disk_fd, &mbr_valid, sizeof(mbr_valid)) != sizeof(mbr_valid)) { +- info("read MBR validity failed '%s'", node); ++ info("read MBR validity failed '%s'\n", node); + rc = 5; + goto close; + } + if (mbr_valid != 0xAA55) { + fprintf(stderr, "no valid MBR signature '%s'\n", node); +- info("no valid MBR signature '%s'", node); ++ info("no valid MBR signature '%s'\n", node); + rc=6; + goto close; + } + + /* read EDD signature */ + if (lseek(disk_fd, 440, SEEK_SET) < 0) { +- info("seek to signature failed '%s'", node); ++ info("seek to signature failed '%s'\n", node); + rc = 7; + goto close; + } + if (read(disk_fd, &disk_id, sizeof(disk_id)) != sizeof(disk_id)) { +- info("read signature failed '%s'", node); ++ info("read signature failed '%s'\n", node); + rc = 8; + goto close; + } + /* all zero is invalid */ +- info("read id 0x%08x from '%s'", disk_id, node); ++ info("read id 0x%08x from '%s'\n", disk_id, node); + if (disk_id == 0) { + fprintf(stderr, "no EDD signature '%s'\n", node); +- info("'%s' signature is zero", node); ++ info("'%s' signature is zero\n", node); + rc = 9; + goto close; + } +@@ -150,18 +150,18 @@ int main(int argc, char *argv[]) + + sysfs_fd = open(file, O_RDONLY); + if (sysfs_fd < 0) { +- info("unable to open sysfs '%s'", file); ++ info("unable to open sysfs '%s'\n", file); + continue; + } + + size = read(sysfs_fd, sysfs_id_buf, sizeof(sysfs_id_buf)-1); + close(sysfs_fd); + if (size <= 0) { +- info("read sysfs '%s' failed", file); ++ info("read sysfs '%s' failed\n", file); + continue; + } + sysfs_id_buf[size] = '\0'; +- info("read '%s' from '%s'", sysfs_id_buf, file); ++ info("read '%s' from '%s'\n", sysfs_id_buf, file); + sysfs_id = strtoul(sysfs_id_buf, NULL, 16); + + /* look for matching value, that appears only once */ +@@ -171,7 +171,7 @@ int main(int argc, char *argv[]) + strlcpy(match, dent->d_name, sizeof(match)); + } else { + /* error, same signature for another device */ +- info("'%s' does not have a unique signature", node); ++ info("'%s' does not have a unique signature\n", node); + fprintf(stderr, "'%s' does not have a unique signature\n", node); + rc = 10; + goto exit; +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index d8b269a..463b377 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -174,25 +174,25 @@ static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) + unsigned int maj, min; + const char *attr; + +- dbg("%s", devpath); ++ dbg("%s\n", devpath); + attr = sysfs_attr_get_value(devpath, "dev"); + if (attr == NULL) { +- dbg("%s: could not get dev attribute: %s", devpath, strerror(errno)); ++ dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); + return -1; + } + +- dbg("dev value %s", attr); ++ dbg("dev value %s\n", attr); + if (sscanf(attr, "%u:%u", &maj, &min) != 2) { +- err("%s: invalid dev major/minor", devpath); ++ err("%s: invalid dev major/minor\n", devpath); + return -1; + } + + snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", + TMP_DIR, TMP_PREFIX, maj, min, getpid()); + +- dbg("tmpdev '%s'", tmpdev); ++ dbg("tmpdev '%s'\n", tmpdev); + if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { +- err("mknod failed: %s", strerror(errno)); ++ err("mknod failed: %s\n", strerror(errno)); + return -1; + } + return 0; +@@ -273,7 +273,7 @@ static int get_file_options(const char *vendor, const char *model, + if (errno == ENOENT) { + return 1; + } else { +- err("can't open %s: %s", config_file, strerror(errno)); ++ err("can't open %s: %s\n", config_file, strerror(errno)); + return -1; + } + } +@@ -285,7 +285,7 @@ static int get_file_options(const char *vendor, const char *model, + */ + buffer = malloc(MAX_BUFFER_LEN); + if (!buffer) { +- err("Can't allocate memory."); ++ err("can't allocate memory\n"); + return -1; + } + +@@ -299,7 +299,7 @@ static int get_file_options(const char *vendor, const char *model, + break; + lineno++; + if (buf[strlen(buffer) - 1] != '\n') { +- info("Config file line %d too long.\n", lineno); ++ info("Config file line %d too long\n", lineno); + break; + } + +@@ -344,14 +344,14 @@ static int get_file_options(const char *vendor, const char *model, + } + options_in = str1; + } +- dbg("config file line %d:" ++ dbg("config file line %d:\n" + " vendor '%s'; model '%s'; options '%s'\n", + lineno, vendor_in, model_in, options_in); + /* + * Only allow: [vendor=foo[,model=bar]]options=stuff + */ + if (!options_in || (!vendor_in && model_in)) { +- info("Error parsing config file line %d '%s'", lineno, buffer); ++ info("Error parsing config file line %d '%s'\n", lineno, buffer); + retval = -1; + break; + } +@@ -389,7 +389,7 @@ static int get_file_options(const char *vendor, const char *model, + c = argc_count(buffer) + 2; + *newargv = calloc(c, sizeof(**newargv)); + if (!*newargv) { +- err("Can't allocate memory."); ++ err("can't allocate memory\n"); + retval = -1; + } else { + *argc = c; +@@ -492,7 +492,7 @@ static int set_options(int argc, char **argv, const char *short_opts, + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + default_page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'", optarg); ++ info("Unknown page code '%s'\n", optarg); + return -1; + } + break; +@@ -571,13 +571,13 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + *page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'", optarg); ++ info("Unknown page code '%s'\n", optarg); + retval = -1; + } + break; + + default: +- info("Unknown or bad option '%c' (0x%x)", option, option); ++ info("Unknown or bad option '%c' (0x%x)\n", option, option); + retval = -1; + break; + } +@@ -596,7 +596,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) + + vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!vendor) { +- info("%s: cannot get vendor attribute", dev_scsi->devpath); ++ info("%s: cannot get vendor attribute\n", dev_scsi->devpath); + return -1; + } + set_str(vendor_str, vendor, sizeof(vendor_str)-1); +@@ -610,7 +610,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) + + type = sysfs_attr_get_value(dev_scsi->devpath, "type"); + if (!type) { +- info("%s: cannot get type attribute", dev_scsi->devpath); ++ info("%s: cannot get type attribute\n", dev_scsi->devpath); + return -1; + } + set_type(type_str, type, sizeof(type_str)); +@@ -690,7 +690,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + + dev = sysfs_device_get(devpath); + if (dev == NULL) { +- err("unable to access '%s'", devpath); ++ err("unable to access '%s'\n", devpath); + return 1; + } + +@@ -709,7 +709,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + /* get scsi parent device */ + dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); + if (dev_scsi == NULL) { +- err("unable to access parent device of '%s'", devpath); ++ err("unable to access parent device of '%s'\n", devpath); + return 1; + } + set_sysfs_values(dev_scsi); +@@ -721,7 +721,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + + /* get per device (vendor + model) options from the config file */ + retval = per_dev_options(dev_scsi, &good_dev, &page_code); +- dbg("per dev options: good %d; page code 0x%x", good_dev, page_code); ++ dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); + + if (!good_dev) { + retval = 1; +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index c84f41e..28e82db 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -179,7 +179,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + + sb_len = io->sb_len_wr; + if (sb_len < 1) { +- info("%s: sense buffer empty", dev_scsi->kernel); ++ info("%s: sense buffer empty\n", dev_scsi->kernel); + return -1; + } + +@@ -193,7 +193,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + */ + s = sense_buffer[7] + 8; + if (sb_len < s) { +- info("%s: sense buffer too small %d bytes, %d bytes too short", ++ info("%s: sense buffer too small %d bytes, %d bytes too short\n", + dev_scsi->kernel, sb_len, s - sb_len); + return -1; + } +@@ -204,7 +204,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + /* + * Possible? + */ +- info("%s: sense result too" " small %d bytes", ++ info("%s: sense result too" " small %d bytes\n", + dev_scsi->kernel, s); + return -1; + } +@@ -216,25 +216,25 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + asc = sense_buffer[2]; + ascq = sense_buffer[3]; + } else { +- info("%s: invalid sense code 0x%x", ++ info("%s: invalid sense code 0x%x\n", + dev_scsi->kernel, code); + return -1; + } +- info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x", ++ info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x\n", + dev_scsi->kernel, sense_key, asc, ascq); + } else { + if (sb_len < 4) { +- info("%s: sense buffer too small %d bytes, %d bytes too short", ++ info("%s: sense buffer too small %d bytes, %d bytes too short\n", + dev_scsi->kernel, sb_len, 4 - sb_len); + return -1; + } + + if (sense_buffer[0] < 15) +- info("%s: old sense key: 0x%x", dev_scsi->kernel, sense_buffer[0] & 0x0f); ++ info("%s: old sense key: 0x%x\n", dev_scsi->kernel, sense_buffer[0] & 0x0f); + else +- info("%s: sense = %2x %2x", ++ info("%s: sense = %2x %2x\n", + dev_scsi->kernel, sense_buffer[0], sense_buffer[2]); +- info("%s: non-extended sense class %d code 0x%0x", ++ info("%s: non-extended sense class %d code 0x%0x\n", + dev_scsi->kernel, sense_class, code); + + } +@@ -247,8 +247,8 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + out_buffer[j++] = ' '; + } + out_buffer[j] = '\0'; +- info("%s: sense dump:", dev_scsi->kernel); +- info("%s: %s", dev_scsi->kernel, out_buffer); ++ info("%s: sense dump:\n", dev_scsi->kernel); ++ info("%s: %s\n", dev_scsi->kernel, out_buffer); + + #endif + return -1; +@@ -261,11 +261,11 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + /* + * Impossible, should not be called. + */ +- info("%s: called with no error", __FUNCTION__); ++ info("%s: called with no error\n", __FUNCTION__); + return -1; + } + +- info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x", ++ info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", + dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); + if (io->status == SCSI_CHECK_CONDITION) + return scsi_dump_sense(dev_scsi, io); +@@ -285,7 +285,7 @@ static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, + int retry = 3; /* rather random */ + + if (buflen > SCSI_INQ_BUFF_LEN) { +- info("buflen %d too long", buflen); ++ info("buflen %d too long\n", buflen); + return -1; + } + +@@ -304,7 +304,7 @@ resend: + io_hdr.timeout = DEF_TIMEOUT; + + if (ioctl(fd, SG_IO, &io_hdr) < 0) { +- info("%s: ioctl failed: %s", dev_scsi->kernel, strerror(errno)); ++ info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); + retval = -1; + goto error; + } +@@ -336,7 +336,7 @@ resend: + + error: + if (retval < 0) +- info("%s: Unable to get INQUIRY vpd %d page 0x%x.", ++ info("%s: Unable to get INQUIRY vpd %d page 0x%x.\n", + dev_scsi->kernel, evpd, page); + + return retval; +@@ -355,11 +355,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + return 1; + + if (buffer[1] != 0) { +- info("%s: page 0 not available.", dev_scsi->kernel); ++ info("%s: page 0 not available.\n", dev_scsi->kernel); + return 1; + } + if (buffer[3] > len) { +- info("%s: page 0 buffer too long %d", dev_scsi->kernel, buffer[3]); ++ info("%s: page 0 buffer too long %d\n", dev_scsi->kernel, buffer[3]); + return 1; + } + +@@ -377,11 +377,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + */ + vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!vendor) { +- info("%s: cannot get model attribute", dev_scsi->kernel); ++ info("%s: cannot get model attribute\n", dev_scsi->kernel); + return 1; + } + if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { +- info("%s: invalid page0 data", dev_scsi->kernel); ++ info("%s: invalid page0 data\n", dev_scsi->kernel); + return 1; + } + } +@@ -399,7 +399,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + + attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!attr) { +- info("%s: cannot get vendor attribute", dev_scsi->kernel); ++ info("%s: cannot get vendor attribute\n", dev_scsi->kernel); + return 1; + } + strncpy(serial, attr, VENDOR_LENGTH); +@@ -407,7 +407,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + + attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); + if (!attr) { +- info("%s: cannot get model attribute", dev_scsi->kernel); ++ info("%s: cannot get model attribute\n", dev_scsi->kernel); + return 1; + } + strncat(serial, attr, MODEL_LENGTH); +@@ -419,7 +419,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + * above, ind will never be too large. + */ + if (ind != (VENDOR_LENGTH + MODEL_LENGTH)) { +- info("%s: expected length %d, got length %d", ++ info("%s: expected length %d, got length %d\n", + dev_scsi->kernel, (VENDOR_LENGTH + MODEL_LENGTH), ind); + return 1; + } +@@ -477,7 +477,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, + len += VENDOR_LENGTH + MODEL_LENGTH; + + if (max_len < len) { +- info("%s: length %d too short - need %d", ++ info("%s: length %d too short - need %d\n", + dev_scsi->kernel, max_len, len); + return 1; + } +@@ -528,7 +528,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, + { + int i, j; + +- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); ++ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); + serial[0] = hex_str[id_search->id_type]; + /* serial has been memset to zero before */ + j = strlen(serial); /* j = 1; */ +@@ -557,7 +557,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, + return 1; + + if (page_83[1] != PAGE_83) { +- info("%s: Invalid page 0x83", dev_scsi->kernel); ++ info("%s: Invalid page 0x83\n", dev_scsi->kernel); + return 1; + } + +@@ -613,13 +613,13 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, + id_search_list[id_ind].naa_type, + id_search_list[id_ind].code_set); + if (!retval) { +- dbg(" used\n"); ++ dbg(" used\n"); + return retval; + } else if (retval < 0) { +- dbg(" failed\n"); ++ dbg(" failed\n"); + return retval; + } else { +- dbg(" not used\n"); ++ dbg(" not used\n"); + } + } + } +@@ -646,7 +646,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, + return 1; + + if (page_83[1] != PAGE_83) { +- info("%s: Invalid page 0x83", dev_scsi->kernel); ++ info("%s: Invalid page 0x83\n", dev_scsi->kernel); + return 1; + } + /* +@@ -690,7 +690,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, + serial[j++] = hex_str[page_83[i] & 0x0f]; + i++; + } +- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); ++ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); + return 0; + } + +@@ -710,13 +710,13 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, + return retval; + + if (buf[1] != PAGE_80) { +- info("%s: Invalid page 0x80", dev_scsi->kernel); ++ info("%s: Invalid page 0x80\n", dev_scsi->kernel); + return 1; + } + + len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3]; + if (max_len < len) { +- info("%s: length %d too short - need %d", ++ info("%s: length %d too short - need %d\n", + dev_scsi->kernel, max_len, len); + return 1; + } +@@ -746,7 +746,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("%s: cannot open %s: %s", ++ info("%s: cannot open %s: %s\n", + dev_scsi->kernel, devname, strerror(errno)); + return 1; + } +@@ -762,7 +762,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, + sprintf(type,"%x", buf[0] & 0x1f); + + if (close(fd) < 0) +- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); ++ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); + + return 0; + } +@@ -779,7 +779,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("%s: cannot open %s: %s", ++ info("%s: cannot open %s: %s\n", + dev_scsi->kernel, devname, strerror(errno)); + return 1; + } +@@ -826,7 +826,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + goto completed; + } + } else if (page_code != 0x00) { +- info("%s: unsupported page code 0x%d", dev_scsi->kernel, page_code); ++ info("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code); + return 1; + } + +@@ -870,6 +870,6 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + retval = 1; + completed: + if (close(fd) < 0) +- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); ++ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); + return retval; + } +diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c +index 5fb030d..fed6631 100644 +--- a/extras/usb_id/usb_id.c ++++ b/extras/usb_id/usb_id.c +@@ -231,20 +231,20 @@ static int usb_id(const char *devpath) + /* get all usb specific information: dev_interface, if_class, dev_usb */ + dev = sysfs_device_get(devpath); + if (dev == NULL) { +- err("unable to access '%s'", devpath); ++ err("unable to access '%s'\n", devpath); + return 1; + } + + /* usb interface directory */ + dev_interface = sysfs_device_get_parent_with_subsystem(dev, "usb"); + if (dev_interface == NULL) { +- info("unable to access usb_interface device of '%s'", devpath); ++ info("unable to access usb_interface device of '%s'\n", devpath); + return 1; + } + + if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass"); + if (!if_class) { +- info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel); ++ info("%s: cannot get bInterfaceClass attribute\n", dev_interface->kernel); + return 1; + } + if_class_num = strtoul(if_class, NULL, 16); +@@ -260,7 +260,7 @@ static int usb_id(const char *devpath) + /* usb device directory */ + dev_usb = sysfs_device_get_parent_with_subsystem(dev_interface, "usb"); + if (!dev_usb) { +- info("unable to find parent 'usb' device of '%s'", devpath); ++ info("unable to find parent 'usb' device of '%s'\n", devpath); + return 1; + } + +@@ -273,39 +273,39 @@ static int usb_id(const char *devpath) + /* get scsi device */ + dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); + if (dev_scsi == NULL) { +- info("unable to find parent 'scsi' device of '%s'", devpath); ++ info("unable to find parent 'scsi' device of '%s'\n", devpath); + goto fallback; + } + if (sscanf(dev_scsi->kernel, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) { +- info("invalid scsi device '%s'", dev_scsi->kernel); ++ info("invalid scsi device '%s'\n", dev_scsi->kernel); + goto fallback; + } + + /* Generic SPC-2 device */ + scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!scsi_vendor) { +- info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI vendor attribute\n", dev_scsi->kernel); + goto fallback; + } + set_str(vendor_str, scsi_vendor, sizeof(vendor_str)-1); + + scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model"); + if (!scsi_model) { +- info("%s: cannot get SCSI model attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI model attribute\n", dev_scsi->kernel); + goto fallback; + } + set_str(model_str, scsi_model, sizeof(model_str)-1); + + scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type"); + if (!scsi_type) { +- info("%s: cannot get SCSI type attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI type attribute\n", dev_scsi->kernel); + goto fallback; + } + set_scsi_type(type_str, scsi_type, sizeof(type_str)-1); + + scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev"); + if (!scsi_rev) { +- info("%s: cannot get SCSI revision attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI revision attribute\n", dev_scsi->kernel); + goto fallback; + } + set_str(revision_str, scsi_rev, sizeof(revision_str)-1); +@@ -329,7 +329,7 @@ fallback: + usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "idVendor"); + + if (!usb_vendor) { +- info("No USB vendor information available"); ++ info("No USB vendor information available\n"); + return 1; + } + set_str(vendor_str, usb_vendor, sizeof(vendor_str)-1); +@@ -345,7 +345,7 @@ fallback: + usb_model = sysfs_attr_get_value(dev_usb->devpath, "idProduct"); + + if (!usb_model) { +- dbg("No USB model information available"); ++ dbg("No USB model information available\n"); + return 1; + } + set_str(model_str, usb_model, sizeof(model_str)-1); +diff --git a/extras/volume_id/lib/adaptec_raid.c b/extras/volume_id/lib/adaptec_raid.c +index 858c3ba..5ab9451 100644 +--- a/extras/volume_id/lib/adaptec_raid.c ++++ b/extras/volume_id/lib/adaptec_raid.c +@@ -86,7 +86,7 @@ int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t si + uint64_t meta_off; + struct adaptec_meta *ad; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/cramfs.c b/extras/volume_id/lib/cramfs.c +index bf32950..9c7eaf6 100644 +--- a/extras/volume_id/lib/cramfs.c ++++ b/extras/volume_id/lib/cramfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct cramfs_super *cs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200); + if (cs == NULL) +diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c +index 560e6bd..60837a4 100644 +--- a/extras/volume_id/lib/ddf_raid.c ++++ b/extras/volume_id/lib/ddf_raid.c +@@ -45,7 +45,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) + uint64_t ddf_off = ((size / 0x200)-1) * 0x200; + const uint8_t *buf; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + if (size < 0x10000) + return -1; +diff --git a/extras/volume_id/lib/ext.c b/extras/volume_id/lib/ext.c +index ac21f12..56edd25 100644 +--- a/extras/volume_id/lib/ext.c ++++ b/extras/volume_id/lib/ext.c +@@ -132,7 +132,7 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) + uint32_t feature_incompat; + uint32_t flags; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200); + if (es == NULL) +@@ -142,9 +142,9 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + + bsize = 0x400 << le32_to_cpu(es->s_log_block_size); +- dbg("ext blocksize 0x%zx", bsize); ++ dbg("ext blocksize 0x%zx\n", bsize); + if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) { +- dbg("invalid ext blocksize"); ++ dbg("invalid ext blocksize\n"); + return -1; + } + +diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c +index 3ddf025..58f8f82 100644 +--- a/extras/volume_id/lib/fat.c ++++ b/extras/volume_id/lib/fat.c +@@ -217,7 +217,7 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, + for (i = 0; i < count; i++) { + /* end marker */ + if (dir[i].name[0] == 0x00) { +- dbg("end of dir"); ++ dbg("end of dir\n"); + break; + } + +@@ -234,11 +234,11 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, + if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0) + continue; + +- dbg("found ATTR_VOLUME_ID id in root dir"); ++ dbg("found ATTR_VOLUME_ID id in root dir\n"); + return fat_read_filename(filename, fnsize, dir, &dir[i]); + } + +- dbg("skip dir entry"); ++ dbg("skip dir entry\n"); + } + + return 0; +@@ -270,7 +270,7 @@ int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size) + int maxloop; + size_t fnlen; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off, 0x400); + if (buf == NULL) +@@ -328,22 +328,22 @@ magic: + if (sector_size == 0 || ((sector_size & (sector_size-1)) != 0)) + return -1; + +- dbg("sector_size 0x%x", sector_size); +- dbg("sectors_per_cluster 0x%x", vs->sectors_per_cluster); ++ dbg("sector_size 0x%x\n", sector_size); ++ dbg("sectors_per_cluster 0x%x\n", vs->sectors_per_cluster); + + dir_entries = le16_to_cpu(vs->dir_entries); + reserved = le16_to_cpu(vs->reserved); +- dbg("reserved 0x%x", reserved); ++ dbg("reserved 0x%x\n", reserved); + + sect_count = le16_to_cpu(vs->sectors); + if (sect_count == 0) + sect_count = le32_to_cpu(vs->total_sect); +- dbg("sect_count 0x%x", sect_count); ++ dbg("sect_count 0x%x\n", sect_count); + + fat_length = le16_to_cpu(vs->fat_length); +- dbg("fat_length 0x%x", fat_length); ++ dbg("fat_length 0x%x\n", fat_length); + fat32_length = le32_to_cpu(vs->type.fat32.fat32_length); +- dbg("fat32_length 0x%x", fat32_length); ++ dbg("fat32_length 0x%x\n", fat32_length); + + if (fat_length) + fat_size = fat_length * vs->fats; +@@ -351,15 +351,15 @@ magic: + fat_size = fat32_length * vs->fats; + else + return -1; +- dbg("fat_size 0x%x", fat_size); ++ dbg("fat_size 0x%x\n", fat_size); + + dir_size = ((dir_entries * sizeof(struct vfat_dir_entry)) + + (sector_size-1)) / sector_size; +- dbg("dir_size 0x%x", dir_size); ++ dbg("dir_size 0x%x\n", dir_size); + + cluster_count = sect_count - (reserved + fat_size + dir_size); + cluster_count /= vs->sectors_per_cluster; +- dbg("cluster_count 0x%x", cluster_count); ++ dbg("cluster_count 0x%x\n", cluster_count); + + /* must be FAT32 */ + if (!fat_length && fat32_length) +@@ -375,9 +375,9 @@ magic: + + /* the label may be an attribute in the root directory */ + root_start = (reserved + fat_size) * sector_size; +- dbg("root dir start 0x%llx", (unsigned long long) root_start); ++ dbg("root dir start 0x%llx\n", (unsigned long long) root_start); + root_dir_entries = le16_to_cpu(vs->dir_entries); +- dbg("expected entries 0x%x", root_dir_entries); ++ dbg("expected entries 0x%x\n", root_dir_entries); + + buf_size = root_dir_entries * sizeof(struct vfat_dir_entry); + buf = volume_id_get_buffer(id, off + root_start, buf_size); +@@ -423,7 +423,7 @@ fat32: + /* FAT32 root dir is a cluster chain like any other directory */ + buf_size = vs->sectors_per_cluster * sector_size; + root_cluster = le32_to_cpu(vs->type.fat32.root_cluster); +- dbg("root dir cluster %u", root_cluster); ++ dbg("root dir cluster %u\n", root_cluster); + start_data_sect = reserved + fat_size; + + next = root_cluster; +@@ -434,10 +434,10 @@ fat32: + uint64_t fat_entry_off; + int count; + +- dbg("next cluster %u", next); ++ dbg("next cluster %u\n", next); + next_sect_off = (next - 2) * vs->sectors_per_cluster; + next_off = (start_data_sect + next_sect_off) * sector_size; +- dbg("cluster offset 0x%llx", (unsigned long long) next_off); ++ dbg("cluster offset 0x%llx\n", (unsigned long long) next_off); + + /* get cluster */ + buf = volume_id_get_buffer(id, off + next_off, buf_size); +@@ -446,7 +446,7 @@ fat32: + + dir = (struct vfat_dir_entry*) buf; + count = buf_size / sizeof(struct vfat_dir_entry); +- dbg("expected entries 0x%x", count); ++ dbg("expected entries 0x%x\n", count); + + fnlen = get_fat_attr_volume_id(filename, sizeof(filename), dir, count); + if (fnlen > 0) +@@ -464,7 +464,7 @@ fat32: + break; + } + if (maxloop == 0) +- dbg("reached maximum follow count of root cluster chain, give up"); ++ dbg("reached maximum follow count of root cluster chain, give up\n"); + + vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200); + if (vs == NULL) +diff --git a/extras/volume_id/lib/gfs.c b/extras/volume_id/lib/gfs.c +index 1d3a4a0..5338222 100644 +--- a/extras/volume_id/lib/gfs.c ++++ b/extras/volume_id/lib/gfs.c +@@ -78,7 +78,7 @@ static int volume_id_probe_gfs_generic(struct volume_id *id, uint64_t off, int v + { + struct gfs2_sb *sbd; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + sbd = (struct gfs2_sb *) + volume_id_get_buffer(id, off + GFS_SUPERBLOCK_OFFSET, sizeof(struct gfs2_sb)); +diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c +index 70a6b4a..b6d7e02 100644 +--- a/extras/volume_id/lib/hfs.c ++++ b/extras/volume_id/lib/hfs.c +@@ -186,7 +186,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz + struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; + const uint8_t *buf; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +@@ -199,17 +199,17 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz + /* it may be just a hfs wrapper for hfs+ */ + if (memcmp(hfs->embed_sig, "H+", 2) == 0) { + alloc_block_size = be32_to_cpu(hfs->al_blk_size); +- dbg("alloc_block_size 0x%x", alloc_block_size); ++ dbg("alloc_block_size 0x%x\n", alloc_block_size); + + alloc_first_block = be16_to_cpu(hfs->al_bl_st); +- dbg("alloc_first_block 0x%x", alloc_first_block); ++ dbg("alloc_first_block 0x%x\n", alloc_first_block); + + embed_first_block = be16_to_cpu(hfs->embed_startblock); +- dbg("embed_first_block 0x%x", embed_first_block); ++ dbg("embed_first_block 0x%x\n", embed_first_block); + + off += (alloc_first_block * 512) + + (embed_first_block * alloc_block_size); +- dbg("hfs wrapped hfs+ found at offset 0x%llx", (unsigned long long) off); ++ dbg("hfs wrapped hfs+ found at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +@@ -241,11 +241,11 @@ hfsplus: + hfsid_set_uuid(id, hfsplus->finder_info.id); + + blocksize = be32_to_cpu(hfsplus->blocksize); +- dbg("blocksize %u", blocksize); ++ dbg("blocksize %u\n", blocksize); + + memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); + cat_block = be32_to_cpu(extents[0].start_block); +- dbg("catalog start block 0x%x", cat_block); ++ dbg("catalog start block 0x%x\n", cat_block); + + buf = volume_id_get_buffer(id, off + (cat_block * blocksize), 0x2000); + if (buf == NULL) +@@ -255,13 +255,13 @@ hfsplus: + &buf[sizeof(struct hfsplus_bnode_descriptor)]; + + leaf_node_head = be32_to_cpu(bnode->leaf_head); +- dbg("catalog leaf node 0x%x", leaf_node_head); ++ dbg("catalog leaf node 0x%x\n", leaf_node_head); + + leaf_node_size = be16_to_cpu(bnode->node_size); +- dbg("leaf node size 0x%x", leaf_node_size); ++ dbg("leaf node size 0x%x\n", leaf_node_size); + + leaf_node_count = be32_to_cpu(bnode->leaf_count); +- dbg("leaf node count 0x%x", leaf_node_count); ++ dbg("leaf node count 0x%x\n", leaf_node_count); + if (leaf_node_count == 0) + goto found; + +@@ -271,7 +271,7 @@ hfsplus: + for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) { + ext_block_start = be32_to_cpu(extents[ext].start_block); + ext_block_count = be32_to_cpu(extents[ext].block_count); +- dbg("extent start block 0x%x, count 0x%x", ext_block_start, ext_block_count); ++ dbg("extent start block 0x%x, count 0x%x\n", ext_block_start, ext_block_count); + + if (ext_block_count == 0) + goto found; +@@ -284,7 +284,7 @@ hfsplus: + } + if (ext == HFSPLUS_EXTENT_COUNT) + goto found; +- dbg("found block in extent %i", ext); ++ dbg("found block in extent %i\n", ext); + + leaf_off = (ext_block_start + leaf_block) * blocksize; + +@@ -293,10 +293,10 @@ hfsplus: + goto found; + + descr = (struct hfsplus_bnode_descriptor *) buf; +- dbg("descriptor type 0x%x", descr->type); ++ dbg("descriptor type 0x%x\n", descr->type); + + record_count = be16_to_cpu(descr->num_recs); +- dbg("number of records %u", record_count); ++ dbg("number of records %u\n", record_count); + if (record_count == 0) + goto found; + +@@ -306,12 +306,12 @@ hfsplus: + key = (struct hfsplus_catalog_key *) + &buf[sizeof(struct hfsplus_bnode_descriptor)]; + +- dbg("parent id 0x%x", be32_to_cpu(key->parent_id)); ++ dbg("parent id 0x%x\n", be32_to_cpu(key->parent_id)); + if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID) + goto found; + + label_len = be16_to_cpu(key->unicode_len) * 2; +- dbg("label unicode16 len %i", label_len); ++ dbg("label unicode16 len %i\n", label_len); + volume_id_set_label_raw(id, key->unicode, label_len); + volume_id_set_label_unicode16(id, key->unicode, BE, label_len); + +diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c +index f2c4069..0629015 100644 +--- a/extras/volume_id/lib/highpoint.c ++++ b/extras/volume_id/lib/highpoint.c +@@ -49,7 +49,7 @@ int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint6 + struct hpt37x_meta *hpt; + uint32_t magic; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200); + if (buf == NULL) +@@ -73,7 +73,7 @@ int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint6 + uint64_t meta_off; + uint32_t magic; + +- dbg("probing at offset 0x%llx, size 0x%llx", ++ dbg("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/hpfs.c b/extras/volume_id/lib/hpfs.c +index edcf066..ac5a354 100644 +--- a/extras/volume_id/lib/hpfs.c ++++ b/extras/volume_id/lib/hpfs.c +@@ -38,7 +38,7 @@ int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct hpfs_super *hs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200); + if (hs == NULL) +diff --git a/extras/volume_id/lib/iso9660.c b/extras/volume_id/lib/iso9660.c +index 1d8bdff..0e2c686 100644 +--- a/extras/volume_id/lib/iso9660.c ++++ b/extras/volume_id/lib/iso9660.c +@@ -59,7 +59,7 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) + struct iso_volume_descriptor *is; + struct high_sierra_volume_descriptor *hs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +@@ -71,11 +71,11 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) + int vd_offset; + int i; + +- dbg("read label from PVD"); ++ dbg("read label from PVD\n"); + volume_id_set_label_raw(id, is->volume_id, 32); + volume_id_set_label_string(id, is->volume_id, 32); + +- dbg("looking for SVDs"); ++ dbg("looking for SVDs\n"); + vd_offset = ISO_VD_OFFSET; + for (i = 0; i < ISO_VD_MAX; i++) { + uint8_t svd_label[64]; +@@ -86,14 +86,14 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) + if (is->type != ISO_VD_SUPPLEMENTARY) + continue; + +- dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset)); ++ dbg("found SVD at offset 0x%llx\n", (unsigned long long) (off + vd_offset)); + if (memcmp(is->escape_sequences, "%/@", 3) == 0|| + memcmp(is->escape_sequences, "%/C", 3) == 0|| + memcmp(is->escape_sequences, "%/E", 3) == 0) { +- dbg("Joliet extension found"); ++ dbg("Joliet extension found\n"); + volume_id_set_unicode16(svd_label, sizeof(svd_label), is->volume_id, BE, 32); + if (memcmp(id->label, svd_label, 16) == 0) { +- dbg("SVD label is identical, use the possibly longer PVD one"); ++ dbg("SVD label is identical, use the possibly longer PVD one\n"); + break; + } + +diff --git a/extras/volume_id/lib/isw_raid.c b/extras/volume_id/lib/isw_raid.c +index f5761e8..337a9ce 100644 +--- a/extras/volume_id/lib/isw_raid.c ++++ b/extras/volume_id/lib/isw_raid.c +@@ -43,7 +43,7 @@ int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint + uint64_t meta_off; + struct isw_meta *isw; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/jfs.c b/extras/volume_id/lib/jfs.c +index 00b66cc..950ba43 100644 +--- a/extras/volume_id/lib/jfs.c ++++ b/extras/volume_id/lib/jfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct jfs_super_block *js; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200); + if (js == NULL) +diff --git a/extras/volume_id/lib/jmicron_raid.c b/extras/volume_id/lib/jmicron_raid.c +index 5182a3e..6cb1f6f 100644 +--- a/extras/volume_id/lib/jmicron_raid.c ++++ b/extras/volume_id/lib/jmicron_raid.c +@@ -39,7 +39,7 @@ int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t si + uint64_t meta_off; + struct jmicron_meta *jm; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 5e0c4a4..96ae7c3 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -66,7 +66,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 + uint8_t bytes[16]; + } uuid; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + if (size < 0x10000) + return -1; +@@ -120,7 +120,7 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6 + { + const uint8_t *buf; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + buf = volume_id_get_buffer(id, off, 0x800); +diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c +index 50d43cc..9ff16e2 100644 +--- a/extras/volume_id/lib/linux_swap.c ++++ b/extras/volume_id/lib/linux_swap.c +@@ -43,7 +43,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size + unsigned int page; + struct swap_header_v1_2 *sw; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + /* eek, the swap signature is at the end of the PAGE_SIZE */ + for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) { +diff --git a/extras/volume_id/lib/lsi_raid.c b/extras/volume_id/lib/lsi_raid.c +index 56fd567..eef8714 100644 +--- a/extras/volume_id/lib/lsi_raid.c ++++ b/extras/volume_id/lib/lsi_raid.c +@@ -38,7 +38,7 @@ int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t s + uint64_t meta_off; + struct lsi_meta *lsi; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/lvm.c b/extras/volume_id/lib/lvm.c +index 7c4f811..d234113 100644 +--- a/extras/volume_id/lib/lvm.c ++++ b/extras/volume_id/lib/lvm.c +@@ -51,7 +51,7 @@ int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size) + const uint8_t *buf; + struct lvm1_super_block *lvm; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800); + if (buf == NULL) +@@ -78,7 +78,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) + struct lvm2_super_block *lvm; + struct lvm2_pv_header *pvhdr; + +- dbg("probing at offset 0x%llx", (unsigned long long) off); ++ dbg("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200); + if (buf == NULL) +@@ -95,7 +95,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + + found: +- dbg("found at offset 0x%x (pv hdr offset 0x%x)", ++ dbg("found at offset 0x%x (pv hdr offset 0x%x)\n", + soff, cpu_to_le32(lvm->offset_xl)); + soff += cpu_to_le32(lvm->offset_xl); + pvhdr = (struct lvm2_pv_header *) &buf[soff]; +diff --git a/extras/volume_id/lib/minix.c b/extras/volume_id/lib/minix.c +index 6494506..88b4c18 100644 +--- a/extras/volume_id/lib/minix.c ++++ b/extras/volume_id/lib/minix.c +@@ -70,7 +70,7 @@ int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size) + struct minix_super_block *ms; + struct minix3_super_block *m3s; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +diff --git a/extras/volume_id/lib/netware.c b/extras/volume_id/lib/netware.c +index 4d157aa..c034557 100644 +--- a/extras/volume_id/lib/netware.c ++++ b/extras/volume_id/lib/netware.c +@@ -82,7 +82,7 @@ int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size) + { + struct netware_super_block *nw; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + nw = (struct netware_super_block *) volume_id_get_buffer(id, off + NW_SUPERBLOCK_OFFSET, 0x200); + if (nw == NULL) +diff --git a/extras/volume_id/lib/ntfs.c b/extras/volume_id/lib/ntfs.c +index f63804d..1e73bc8 100644 +--- a/extras/volume_id/lib/ntfs.c ++++ b/extras/volume_id/lib/ntfs.c +@@ -105,7 +105,7 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + const uint8_t *buf; + const uint8_t *val; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200); + if (ns == NULL) +@@ -130,12 +130,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + else + mft_record_size = ns->cluster_per_mft_record * cluster_size; + +- dbg("sectorsize 0x%x", sector_size); +- dbg("clustersize 0x%x", cluster_size); +- dbg("mftcluster %llu", (unsigned long long) mft_cluster); +- dbg("mftoffset 0x%llx", (unsigned long long) mft_off); +- dbg("cluster per mft_record %i", ns->cluster_per_mft_record); +- dbg("mft record size %i", mft_record_size); ++ dbg("sectorsize 0x%x\n", sector_size); ++ dbg("clustersize 0x%x\n", cluster_size); ++ dbg("mftcluster %llu\n", (unsigned long long) mft_cluster); ++ dbg("mftoffset 0x%llx\n", (unsigned long long) mft_off); ++ dbg("cluster per mft_record %i\n", ns->cluster_per_mft_record); ++ dbg("mft record size %i\n", mft_record_size); + + buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size), + mft_record_size); +@@ -143,12 +143,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + + mftr = (struct master_file_table_record*) buf; +- dbg("mftr->magic '%c%c%c%c'", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); ++ dbg("mftr->magic '%c%c%c%c'\n", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); + if (memcmp(mftr->magic, "FILE", 4) != 0) + return -1; + + attr_off = le16_to_cpu(mftr->attrs_offset); +- dbg("file $Volume's attributes are at offset %i", attr_off); ++ dbg("file $Volume's attributes are at offset %i\n", attr_off); + + while (1) { + attr = (struct file_attribute*) &buf[attr_off]; +@@ -167,18 +167,18 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + if (attr_type == MFT_RECORD_ATTR_END) + break; + +- dbg("found attribute type 0x%x, len %i, at offset %i", ++ dbg("found attribute type 0x%x, len %i, at offset %i\n", + attr_type, attr_len, attr_off); + + if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) { +- dbg("found info, len %i", val_len); ++ dbg("found info, len %i\n", val_len); + info = (struct volume_info*) (((uint8_t *) attr) + val_off); + snprintf(id->type_version, sizeof(id->type_version)-1, + "%u.%u", info->major_ver, info->minor_ver); + } + + if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) { +- dbg("found label, len %i", val_len); ++ dbg("found label, len %i\n", val_len); + if (val_len > VOLUME_ID_LABEL_SIZE) + val_len = VOLUME_ID_LABEL_SIZE; + +diff --git a/extras/volume_id/lib/nvidia_raid.c b/extras/volume_id/lib/nvidia_raid.c +index ca42459..c6b5185 100644 +--- a/extras/volume_id/lib/nvidia_raid.c ++++ b/extras/volume_id/lib/nvidia_raid.c +@@ -41,7 +41,7 @@ int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t siz + uint64_t meta_off; + struct nvidia_meta *nv; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/ocfs.c b/extras/volume_id/lib/ocfs.c +index 9f251f1..ec81f5e 100644 +--- a/extras/volume_id/lib/ocfs.c ++++ b/extras/volume_id/lib/ocfs.c +@@ -132,7 +132,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) + struct ocfs1_super_block_header *osh; + struct ocfs1_super_block_label *osl; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off, 0x200); + if (buf == NULL) +@@ -144,7 +144,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) + snprintf(id->type_version, sizeof(id->type_version)-1, + "%u.%u", osh->major_version, osh->minor_version); + +- dbg("found OracleCFS signature, now reading label"); ++ dbg("found OracleCFS signature, now reading label\n"); + buf = volume_id_get_buffer(id, off + 0x200, 0x200); + if (buf == NULL) + return -1; +@@ -170,7 +170,7 @@ int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size) + struct ocfs2_super_block *os; + size_t blksize; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + for (blksize = 0x200; blksize <= OCFS2_MAX_BLOCKSIZE; blksize <<= 1) { + buf = volume_id_get_buffer(id, off + OCFS2_SUPER_BLOCK_BLKNO * blksize, 0x200); +diff --git a/extras/volume_id/lib/promise_raid.c b/extras/volume_id/lib/promise_raid.c +index 1c4d365..ecaed00 100644 +--- a/extras/volume_id/lib/promise_raid.c ++++ b/extras/volume_id/lib/promise_raid.c +@@ -42,7 +42,7 @@ int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, u + 63, 255, 256, 16, 399, 0 + }; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x40000) +diff --git a/extras/volume_id/lib/reiserfs.c b/extras/volume_id/lib/reiserfs.c +index 18db638..0f30233 100644 +--- a/extras/volume_id/lib/reiserfs.c ++++ b/extras/volume_id/lib/reiserfs.c +@@ -60,7 +60,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size) + struct reiser4_super_block *rs4; + uint8_t *buf; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +diff --git a/extras/volume_id/lib/romfs.c b/extras/volume_id/lib/romfs.c +index 2db36d6..303a1fb 100644 +--- a/extras/volume_id/lib/romfs.c ++++ b/extras/volume_id/lib/romfs.c +@@ -37,7 +37,7 @@ int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct romfs_super *rfs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200); + if (rfs == NULL) +diff --git a/extras/volume_id/lib/silicon_raid.c b/extras/volume_id/lib/silicon_raid.c +index 634e4ab..cfdcbcb 100644 +--- a/extras/volume_id/lib/silicon_raid.c ++++ b/extras/volume_id/lib/silicon_raid.c +@@ -53,7 +53,7 @@ int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint + uint64_t meta_off; + struct silicon_meta *sil; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/squashfs.c b/extras/volume_id/lib/squashfs.c +index 035d6fb..18e44ab 100644 +--- a/extras/volume_id/lib/squashfs.c ++++ b/extras/volume_id/lib/squashfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct squashfs_super *sqs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + sqs = (struct squashfs_super *) volume_id_get_buffer(id, off, 0x200); + if (sqs == NULL) +diff --git a/extras/volume_id/lib/sysv.c b/extras/volume_id/lib/sysv.c +index e48013c..ba37c4d 100644 +--- a/extras/volume_id/lib/sysv.c ++++ b/extras/volume_id/lib/sysv.c +@@ -95,7 +95,7 @@ int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size) + struct xenix_super *xs; + unsigned int boff; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) { + vs = (struct sysv_super *) +diff --git a/extras/volume_id/lib/udf.c b/extras/volume_id/lib/udf.c +index ac2f40a..2a589c5 100644 +--- a/extras/volume_id/lib/udf.c ++++ b/extras/volume_id/lib/udf.c +@@ -72,7 +72,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size) + unsigned int loc; + unsigned int clen; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200); + if (vsd == NULL) +@@ -100,7 +100,7 @@ blocksize: + vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET + bs, 0x800); + if (vsd == NULL) + return -1; +- dbg("test for blocksize: 0x%x", bs); ++ dbg("test for blocksize: 0x%x\n", bs); + if (vsd->id[0] != '\0') + goto nsr; + } +@@ -113,7 +113,7 @@ nsr: + if (vsd == NULL) + return -1; + +- dbg("vsd: %c%c%c%c%c", ++ dbg("vsd: %c%c%c%c%c\n", + vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]); + + if (vsd->id[0] == '\0') +@@ -138,7 +138,7 @@ anchor: + /* get desriptor list address and block count */ + count = le32_to_cpu(vd->type.anchor.length) / bs; + loc = le32_to_cpu(vd->type.anchor.location); +- dbg("0x%x descriptors starting at logical secor 0x%x", count, loc); ++ dbg("0x%x descriptors starting at logical secor 0x%x\n", count, loc); + + /* pick the primary descriptor from the list */ + for (b = 0; b < count; b++) { +@@ -147,7 +147,7 @@ anchor: + return -1; + + type = le16_to_cpu(vd->tag.id); +- dbg("descriptor type %i", type); ++ dbg("descriptor type %i\n", type); + + /* check validity */ + if (type == 0) +@@ -164,7 +164,7 @@ pvd: + volume_id_set_label_raw(id, &(vd->type.primary.ident.clen), 32); + + clen = vd->type.primary.ident.clen; +- dbg("label string charsize=%i bit", clen); ++ dbg("label string charsize=%i bit\n", clen); + if (clen == 8) + volume_id_set_label_string(id, vd->type.primary.ident.c, 31); + else if (clen == 16) +diff --git a/extras/volume_id/lib/ufs.c b/extras/volume_id/lib/ufs.c +index 4ace8c9..bedcfa4 100644 +--- a/extras/volume_id/lib/ufs.c ++++ b/extras/volume_id/lib/ufs.c +@@ -175,20 +175,20 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) + struct ufs_super_block *ufs; + int offsets[] = {0, 8, 64, 256, -1}; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + for (i = 0; offsets[i] >= 0; i++) { + ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800); + if (ufs == NULL) + return -1; + +- dbg("offset 0x%x", offsets[i] * 0x400); ++ dbg("offset 0x%x\n", offsets[i] * 0x400); + magic = be32_to_cpu(ufs->fs_magic); + if ((magic == UFS_MAGIC) || + (magic == UFS2_MAGIC) || + (magic == UFS_MAGIC_FEA) || + (magic == UFS_MAGIC_LFN)) { +- dbg("magic 0x%08x(be)", magic); ++ dbg("magic 0x%08x(be)\n", magic); + goto found; + } + magic = le32_to_cpu(ufs->fs_magic); +@@ -196,7 +196,7 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) + (magic == UFS2_MAGIC) || + (magic == UFS_MAGIC_FEA) || + (magic == UFS_MAGIC_LFN)) { +- dbg("magic 0x%08x(le)", magic); ++ dbg("magic 0x%08x(le)\n", magic); + goto found; + } + } +diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c +index 0a3bd39..2a63efe 100644 +--- a/extras/volume_id/lib/util.c ++++ b/extras/volume_id/lib/util.c +@@ -353,33 +353,33 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) + { + ssize_t buf_len; + +- info("get buffer off 0x%llx(%llu), len 0x%zx", (unsigned long long) off, (unsigned long long) off, len); ++ info("get buffer off 0x%llx(%llu), len 0x%zx\n", (unsigned long long) off, (unsigned long long) off, len); + /* check if requested area fits in superblock buffer */ + if (off + len <= SB_BUFFER_SIZE) { + if (id->sbbuf == NULL) { + id->sbbuf = malloc(SB_BUFFER_SIZE); + if (id->sbbuf == NULL) { +- dbg("error malloc"); ++ dbg("error malloc\n"); + return NULL; + } + } + + /* check if we need to read */ + if ((off + len) > id->sbbuf_len) { +- info("read sbbuf len:0x%llx", (unsigned long long) (off + len)); ++ info("read sbbuf len:0x%llx\n", (unsigned long long) (off + len)); + if (lseek(id->fd, 0, SEEK_SET) < 0) { +- dbg("lseek failed (%s)", strerror(errno)); ++ dbg("lseek failed (%s)\n", strerror(errno)); + return NULL; + } + buf_len = read(id->fd, id->sbbuf, off + len); + if (buf_len < 0) { +- dbg("read failed (%s)", strerror(errno)); ++ dbg("read failed (%s)\n", strerror(errno)); + return NULL; + } +- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); ++ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); + id->sbbuf_len = buf_len; + if ((size_t)buf_len < off + len) { +- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); ++ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); + return NULL; + } + } +@@ -387,7 +387,7 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) + return &(id->sbbuf[off]); + } else { + if (len > SEEK_BUFFER_SIZE) { +- dbg("seek buffer too small %d", SEEK_BUFFER_SIZE); ++ dbg("seek buffer too small %d\n", SEEK_BUFFER_SIZE); + return NULL; + } + +@@ -395,28 +395,28 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) + if (id->seekbuf == NULL) { + id->seekbuf = malloc(SEEK_BUFFER_SIZE); + if (id->seekbuf == NULL) { +- dbg("error malloc"); ++ dbg("error malloc\n"); + return NULL; + } + } + + /* check if we need to read */ + if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) { +- info("read seekbuf off:0x%llx len:0x%zx", (unsigned long long) off, len); ++ info("read seekbuf off:0x%llx len:0x%zx\n", (unsigned long long) off, len); + if (lseek(id->fd, off, SEEK_SET) < 0) { +- dbg("lseek failed (%s)", strerror(errno)); ++ dbg("lseek failed (%s)\n", strerror(errno)); + return NULL; + } + buf_len = read(id->fd, id->seekbuf, len); + if (buf_len < 0) { +- dbg("read failed (%s)", strerror(errno)); ++ dbg("read failed (%s)\n", strerror(errno)); + return NULL; + } +- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); ++ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); + id->seekbuf_off = off; + id->seekbuf_len = buf_len; + if ((size_t)buf_len < len) { +- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); ++ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); + return NULL; + } + } +diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c +index 62c165e..9965e13 100644 +--- a/extras/volume_id/lib/via_raid.c ++++ b/extras/volume_id/lib/via_raid.c +@@ -63,7 +63,7 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size) + uint64_t meta_off; + struct via_meta *via; + +- dbg("probing at offset 0x%llx, size 0x%llx", ++ dbg("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c +index 7c68fb1..bb909c9 100644 +--- a/extras/volume_id/lib/volume_id.c ++++ b/extras/volume_id/lib/volume_id.c +@@ -358,7 +358,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) + if (!device_is_readable(id, off)) + return -1; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + for (i = 0; i < ARRAY_SIZE(prober_raid); i++) +@@ -392,7 +392,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size + if (!device_is_readable(id, off)) + return -1; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + for (i = 0; i < ARRAY_SIZE(prober_filesystem); i++) +@@ -493,7 +493,7 @@ struct volume_id *volume_id_open_node(const char *path) + + fd = open(path, O_RDONLY); + if (fd < 0) { +- dbg("unable to open '%s'", path); ++ dbg("unable to open '%s'\n", path); + return NULL; + } + +diff --git a/extras/volume_id/lib/vxfs.c b/extras/volume_id/lib/vxfs.c +index c9b7628..33d357b 100644 +--- a/extras/volume_id/lib/vxfs.c ++++ b/extras/volume_id/lib/vxfs.c +@@ -37,7 +37,7 @@ int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct vxfs_super *vxs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + vxs = (struct vxfs_super *) volume_id_get_buffer(id, off + 0x200, 0x200); + if (vxs == NULL) +diff --git a/extras/volume_id/lib/xfs.c b/extras/volume_id/lib/xfs.c +index 9eac827..3e10560 100644 +--- a/extras/volume_id/lib/xfs.c ++++ b/extras/volume_id/lib/xfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct xfs_super_block *xs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200); + if (xs == NULL) +diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c +index 04e85ab..5c4e05d 100644 +--- a/extras/volume_id/vol_id.c ++++ b/extras/volume_id/vol_id.c +@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) + + node = argv[optind]; + if (!node) { +- err("no device"); ++ err("no device\n"); + fprintf(stderr, "no device\n"); + rc = 1; + goto exit; +@@ -239,7 +239,7 @@ int main(int argc, char *argv[]) + + if (ioctl(fd, BLKGETSIZE64, &size) != 0) + size = 0; +- dbg("BLKGETSIZE64=%llu", (unsigned long long)size); ++ dbg("BLKGETSIZE64=%llu\n", (unsigned long long)size); + + /* try to drop all privileges before reading disk content */ + if (getuid() == 0) { +@@ -250,7 +250,7 @@ int main(int argc, char *argv[]) + if (setgroups(0, NULL) != 0 || + setgid(pw->pw_gid) != 0 || + setuid(pw->pw_uid) != 0) +- info("unable to drop privileges: %s\n", strerror(errno)); ++ info("unable to drop privileges: %s\n\n", strerror(errno)); + } + } + +diff --git a/test-udev.c b/test-udev.c +index 0c25778..e341b74 100644 +--- a/test-udev.c ++++ b/test-udev.c +@@ -90,10 +90,10 @@ int main(int argc, char *argv[], char *envp[]) + + logging_init("udev"); + if (devnull < 0) +- err("open /dev/null failed: %s", strerror(errno)); ++ err("open /dev/null failed: %s\n", strerror(errno)); + udev_config_init(); + selinux_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + + /* set signal handlers */ + memset(&act, 0x00, sizeof(act)); +@@ -115,7 +115,7 @@ int main(int argc, char *argv[], char *envp[]) + subsystem = argv[1]; + + if (action == NULL || subsystem == NULL || devpath == NULL) { +- err("action, subsystem or devpath missing"); ++ err("action, subsystem or devpath missing\n"); + goto exit; + } + +@@ -132,7 +132,7 @@ int main(int argc, char *argv[], char *envp[]) + + dev = sysfs_device_get(devpath); + if (dev == NULL) { +- info("unable to open '%s'", devpath); ++ info("unable to open '%s'\n", devpath); + goto fail; + } + +diff --git a/udev_config.c b/udev_config.c +index 2f2a69e..4219094 100644 +--- a/udev_config.c ++++ b/udev_config.c +@@ -98,7 +98,7 @@ static int parse_config_file(void) + int retval = 0; + + if (file_map(udev_config_filename, &buf, &bufsize) != 0) { +- err("can't open '%s' as config file: %s", udev_config_filename, strerror(errno)); ++ err("can't open '%s' as config file: %s\n", udev_config_filename, strerror(errno)); + return -ENODEV; + } + +@@ -124,7 +124,7 @@ static int parse_config_file(void) + continue; + + if (count >= sizeof(line)) { +- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); ++ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); + continue; + } + +@@ -134,7 +134,7 @@ static int parse_config_file(void) + linepos = line; + retval = get_key(&linepos, &variable, &value); + if (retval != 0) { +- err("error parsing %s, line %d:%d", udev_config_filename, lineno, (int)(linepos-line)); ++ err("error parsing %s, line %d:%d\n", udev_config_filename, lineno, (int)(linepos-line)); + continue; + } + +@@ -193,8 +193,8 @@ void udev_config_init(void) + if (env) + udev_log_priority = log_priority(env); + +- dbg("UDEV_CONFIG_FILE='%s'", udev_config_filename); +- dbg("udev_root='%s'", udev_root); +- dbg("udev_rules='%s'", udev_rules_dir); +- dbg("udev_log=%d", udev_log_priority); ++ dbg("UDEV_CONFIG_FILE='%s'\n", udev_config_filename); ++ dbg("udev_root='%s'\n", udev_root); ++ dbg("udev_rules='%s'\n", udev_rules_dir); ++ dbg("udev_log=%d\n", udev_log_priority); + } +diff --git a/udev_db.c b/udev_db.c +index 1feab7d..ddcf85e 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -65,13 +65,13 @@ static int name_index(const char *devpath, const char *name, int add) + strlcat(filename, device, sizeof(filename)); + + if (add) { +- info("creating index: '%s'", filename); ++ info("creating index: '%s'\n", filename); + create_path(filename); + fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); + if (fd > 0) + close(fd); + } else { +- info("removing index: '%s'", filename); ++ info("removing index: '%s'\n", filename); + unlink(filename); + delete_path(filename); + } +@@ -92,12 +92,12 @@ int udev_db_get_devices_by_name(const char *name, struct list_head *name_list) + + dir = opendir(dirname); + if (dir == NULL) { +- info("no index directory '%s': %s", dirname, strerror(errno)); ++ info("no index directory '%s': %s\n", dirname, strerror(errno)); + rc = -1; + goto out; + } + +- info("found index directory '%s'", dirname); ++ info("found index directory '%s'\n", dirname); + while (1) { + struct dirent *ent; + char device[PATH_SIZE]; +@@ -146,12 +146,12 @@ int udev_db_add_device(struct udevice *udev) + if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && + !udev->partitions && !udev->ignore_remove) { + int ret; +- dbg("nothing interesting to store, create symlink"); ++ dbg("nothing interesting to store, create symlink\n"); + selinux_setfscreatecon(filename, NULL, S_IFLNK); + ret = symlink(udev->name, filename); + selinux_resetfscreatecon(); + if (ret != 0) { +- err("unable to create db link '%s': %s", filename, strerror(errno)); ++ err("unable to create db link '%s': %s\n", filename, strerror(errno)); + return -1; + } + } else { +@@ -160,10 +160,10 @@ int udev_db_add_device(struct udevice *udev) + + f = fopen(filename, "w"); + if (f == NULL) { +- err("unable to create db file '%s': %s", filename, strerror(errno)); ++ err("unable to create db file '%s': %s\n", filename, strerror(errno)); + return -1; + } +- dbg("storing data for device '%s' in '%s'", udev->dev->devpath, filename); ++ dbg("storing data for device '%s' in '%s'\n", udev->dev->devpath, filename); + + fprintf(f, "N:%s\n", udev->name); + list_for_each_entry(name_loop, &udev->symlink_list, node) { +@@ -205,28 +205,28 @@ int udev_db_get_device(struct udevice *udev, const char *devpath) + devpath_to_db_path(devpath, filename, sizeof(filename)); + + if (lstat(filename, &stats) != 0) { +- info("no db file to read %s: %s", filename, strerror(errno)); ++ info("no db file to read %s: %s\n", filename, strerror(errno)); + return -1; + } + if ((stats.st_mode & S_IFMT) == S_IFLNK) { + char target[NAME_SIZE]; + int target_len; + +- info("found a symlink as db file"); ++ info("found a symlink as db file\n"); + target_len = readlink(filename, target, sizeof(target)); + if (target_len > 0) + target[target_len] = '\0'; + else { +- info("error reading db link %s: %s", filename, strerror(errno)); ++ info("error reading db link %s: %s\n", filename, strerror(errno)); + return -1; + } +- dbg("db link points to '%s'", target); ++ dbg("db link points to '%s'\n", target); + strlcpy(udev->name, target, sizeof(udev->name)); + return 0; + } + + if (file_map(filename, &buf, &bufsize) != 0) { +- info("error reading db file %s: %s", filename, strerror(errno)); ++ info("error reading db file %s: %s\n", filename, strerror(errno)); + return -1; + } + +@@ -323,7 +323,7 @@ int udev_db_get_all_entries(struct list_head *name_list) + strlcat(dbpath, "/"DB_DIR, sizeof(dbpath)); + dir = opendir(dbpath); + if (dir == NULL) { +- info("no udev_db available '%s': %s", dbpath, strerror(errno)); ++ info("no udev_db available '%s': %s\n", dbpath, strerror(errno)); + return -1; + } + +@@ -340,7 +340,7 @@ int udev_db_get_all_entries(struct list_head *name_list) + strlcpy(device, ent->d_name, sizeof(device)); + path_decode(device); + name_list_add(name_list, device, 1); +- dbg("added '%s'", device); ++ dbg("added '%s'\n", device); + } + + closedir(dir); +diff --git a/udev_device.c b/udev_device.c +index 62217ff..6546db4 100644 +--- a/udev_device.c ++++ b/udev_device.c +@@ -104,13 +104,13 @@ static int rename_netif(struct udevice *udev) + struct ifreq ifr; + int retval; + +- info("changing net interface name from '%s' to '%s'", udev->dev->kernel, udev->name); ++ info("changing net interface name from '%s' to '%s'\n", udev->dev->kernel, udev->name); + if (udev->test_run) + return 0; + + sk = socket(PF_INET, SOCK_DGRAM, 0); + if (sk < 0) { +- err("error opening socket: %s", strerror(errno)); ++ err("error opening socket: %s\n", strerror(errno)); + return -1; + } + +@@ -125,7 +125,7 @@ static int rename_netif(struct udevice *udev) + + /* see if the destination interface name already exists */ + if (errno != EEXIST) { +- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); ++ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); + goto exit; + } + +@@ -134,7 +134,7 @@ static int rename_netif(struct udevice *udev) + strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ); + retval = ioctl(sk, SIOCSIFNAME, &ifr); + if (retval != 0) { +- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); ++ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); + goto exit; + } + +@@ -150,11 +150,11 @@ static int rename_netif(struct udevice *udev) + } + + if (errno != EEXIST) { +- err("error changing net interface name %s to %s: %s", ++ err("error changing net interface name %s to %s: %s\n", + ifr.ifr_name, ifr.ifr_newname, strerror(errno)); + break; + } +- dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop); ++ dbg("wait for netif '%s' to become free, loop=%i\n", udev->name, (30 * 20) - loop); + usleep(1000 * 1000 / 20); + } + } +@@ -170,22 +170,22 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + + 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); ++ info("moved database from '%s' to '%s'\n", udev->devpath_old, udev->dev->devpath); + + /* add device node */ + if (major(udev->devt) != 0 && + (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) { + struct udevice *udev_old; + +- dbg("device node add '%s'", udev->dev->devpath); ++ dbg("device node add '%s'\n", udev->dev->devpath); + + udev_rules_get_name(rules, udev); + if (udev->ignore_device) { +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + goto exit; + } + if (udev->name[0] == '\0') { +- info("device node creation supressed"); ++ info("device node creation supressed\n"); + goto exit; + } + +@@ -194,7 +194,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + if (udev_old != NULL) { + udev_old->test_run = udev->test_run; + if (udev_db_get_device(udev_old, udev->dev->devpath) == 0) { +- info("device '%s' already in database, cleanup", udev->dev->devpath); ++ info("device '%s' already in database, cleanup\n", udev->dev->devpath); + udev_db_delete_device(udev_old); + } else { + udev_device_cleanup(udev_old); +@@ -220,14 +220,14 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + + /* add netif */ + if (strcmp(udev->dev->subsystem, "net") == 0 && strcmp(udev->action, "add") == 0) { +- dbg("netif add '%s'", udev->dev->devpath); ++ dbg("netif add '%s'\n", udev->dev->devpath); + udev_rules_get_name(rules, udev); + if (udev->ignore_device) { +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + goto exit; + } + if (udev->name[0] == '\0') { +- info("device renaming supressed"); ++ info("device renaming supressed\n"); + goto exit; + } + +@@ -239,7 +239,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + retval = rename_netif(udev); + if (retval != 0) + goto exit; +- info("renamed netif to '%s'", udev->name); ++ info("renamed netif to '%s'\n", udev->name); + + /* export old name */ + setenv("INTERFACE_OLD", udev->dev->kernel, 1); +@@ -253,7 +253,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + sysfs_device_set_values(udev->dev, devpath, NULL, NULL); + setenv("DEVPATH", udev->dev->devpath, 1); + setenv("INTERFACE", udev->name, 1); +- info("changed devpath to '%s'", udev->dev->devpath); ++ info("changed devpath to '%s'\n", udev->dev->devpath); + } + } + goto exit; +@@ -270,19 +270,19 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + list_for_each_entry(name_loop, &udev->env_list, node) + putenv(name_loop->name); + } else { +- dbg("'%s' not found in database, using kernel name '%s'", ++ dbg("'%s' not found in database, using kernel name '%s'\n", + udev->dev->devpath, udev->dev->kernel); + strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); + } + + udev_rules_get_run(rules, udev); + if (udev->ignore_device) { +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + goto exit; + } + + if (udev->ignore_remove) { +- info("ignore_remove for '%s'", udev->name); ++ info("ignore_remove for '%s'\n", udev->name); + goto exit; + } + /* remove the node */ +@@ -296,7 +296,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + /* default devices */ + udev_rules_get_run(rules, udev); + if (udev->ignore_device) +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + + exit: + return retval; +diff --git a/udev_node.c b/udev_node.c +index 6ca0601..0e59e2d 100644 +--- a/udev_node.c ++++ b/udev_node.c +@@ -48,7 +48,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m + + if (lstat(file, &stats) == 0) { + if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) { +- info("preserve file '%s', because it has correct dev_t", file); ++ info("preserve file '%s', because it has correct dev_t\n", file); + selinux_setfilecon(file, udev->dev->kernel, stats.st_mode); + goto perms; + } +@@ -60,7 +60,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m + goto perms; + } + +- info("atomically replace '%s'", file); ++ info("atomically replace '%s'\n", file); + strlcpy(file_tmp, file, sizeof(file_tmp)); + strlcat(file_tmp, TMP_FILE_EXT, sizeof(file_tmp)); + unlink(file_tmp); +@@ -68,29 +68,29 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m + retval = mknod(file_tmp, mode, devt); + selinux_resetfscreatecon(); + if (retval != 0) { +- err("mknod(%s, %#o, %u, %u) failed: %s", ++ err("mknod(%s, %#o, %u, %u) failed: %s\n", + file_tmp, mode, major(devt), minor(devt), strerror(errno)); + goto exit; + } + retval = rename(file_tmp, file); + if (retval != 0) { +- err("rename(%s, %s) failed: %s", ++ err("rename(%s, %s) failed: %s\n", + file_tmp, file, strerror(errno)); + unlink(file_tmp); + goto exit; + } + + perms: +- dbg("chmod(%s, %#o)", file, mode); ++ dbg("chmod(%s, %#o)\n", file, mode); + if (chmod(file, mode) != 0) { +- err("chmod(%s, %#o) failed: %s", file, mode, strerror(errno)); ++ err("chmod(%s, %#o) failed: %s\n", file, mode, strerror(errno)); + goto exit; + } + + if (uid != 0 || gid != 0) { +- dbg("chown(%s, %u, %u)", file, uid, gid); ++ dbg("chown(%s, %u, %u)\n", file, uid, gid); + if (chown(file, uid, gid) != 0) { +- err("chown(%s, %u, %u) failed: %s", ++ err("chown(%s, %u, %u) failed: %s\n", + file, uid, gid, strerror(errno)); + goto exit; + } +@@ -127,32 +127,32 @@ static int node_symlink(const char *node, const char *slink) + if (S_ISBLK(stats.st_mode) || S_ISCHR(stats.st_mode)) { + struct stat stats2; + +- info("found existing node instead of symlink '%s'", slink); ++ info("found existing node instead of symlink '%s'\n", slink); + if (lstat(node, &stats2) == 0) { + if ((stats.st_mode & S_IFMT) == (stats2.st_mode & S_IFMT) && + stats.st_rdev == stats2.st_rdev) { +- info("replace device node '%s' with symlink to our node '%s'", slink, node); ++ info("replace device node '%s' with symlink to our node '%s'\n", slink, node); + } else { +- err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node); ++ err("device node '%s' already exists, link to '%s' will not overwrite it\n", slink, node); + goto exit; + } + } + } else if (S_ISLNK(stats.st_mode)) { + char buf[PATH_SIZE]; + +- info("found existing symlink '%s'", slink); ++ info("found existing symlink '%s'\n", slink); + len = readlink(slink, buf, sizeof(buf)); + if (len > 0) { + buf[len] = '\0'; + if (strcmp(target, buf) == 0) { +- info("preserve already existing symlink '%s' to '%s'", slink, target); ++ info("preserve already existing symlink '%s' to '%s'\n", slink, target); + selinux_setfilecon(slink, NULL, S_IFLNK); + goto exit; + } + } + } + } else { +- info("creating symlink '%s' to '%s'", slink, target); ++ info("creating symlink '%s' to '%s'\n", slink, target); + selinux_setfscreatecon(slink, NULL, S_IFLNK); + retval = symlink(target, slink); + selinux_resetfscreatecon(); +@@ -160,7 +160,7 @@ static int node_symlink(const char *node, const char *slink) + goto exit; + } + +- info("atomically replace '%s'", slink); ++ info("atomically replace '%s'\n", slink); + strlcpy(slink_tmp, slink, sizeof(slink_tmp)); + strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); + unlink(slink_tmp); +@@ -168,12 +168,12 @@ static int node_symlink(const char *node, const char *slink) + retval = symlink(target, slink_tmp); + selinux_resetfscreatecon(); + if (retval != 0) { +- err("symlink(%s, %s) failed: %s", target, slink_tmp, strerror(errno)); ++ err("symlink(%s, %s) failed: %s\n", target, slink_tmp, strerror(errno)); + goto exit; + } + retval = rename(slink_tmp, slink); + if (retval != 0) { +- err("rename(%s, %s) failed: %s", slink_tmp, slink, strerror(errno)); ++ err("rename(%s, %s) failed: %s\n", slink_tmp, slink, strerror(errno)); + unlink(slink_tmp); + goto exit; + } +@@ -198,11 +198,11 @@ static int update_link(struct udevice *udev, const char *name) + strlcat(slink, name, sizeof(slink)); + + count = udev_db_get_devices_by_name(name, &name_list); +- info("found %i devices with name '%s'", count, name); ++ info("found %i devices with name '%s'\n", count, name); + + /* if we don't have a reference, delete it */ + if (count <= 0) { +- info("no reference left, remove '%s'", name); ++ info("no reference left, remove '%s'\n", name); + if (!udev->test_run) { + unlink(slink); + delete_path(slink); +@@ -212,14 +212,14 @@ static int update_link(struct udevice *udev, const char *name) + + /* find the device with the highest priority */ + list_for_each_entry(device, &name_list, node) { +- info("found '%s' for '%s'", device->name, name); ++ info("found '%s' for '%s'\n", device->name, name); + + /* did we find ourself? we win, if we have the same priority */ + if (strcmp(udev->dev->devpath, device->name) == 0) { +- info("compare (our own) priority of '%s' %i >= %i", ++ info("compare (our own) priority of '%s' %i >= %i\n", + udev->dev->devpath, udev->link_priority, priority); + if (strcmp(udev->name, name) == 0) { +- info("'%s' is our device node, database inconsistent, skip link update", udev->name); ++ info("'%s' is our device node, database inconsistent, skip link update\n", udev->name); + } else if (target[0] == '\0' || udev->link_priority >= priority) { + priority = udev->link_priority; + strlcpy(target, udev->name, sizeof(target)); +@@ -233,9 +233,9 @@ static int update_link(struct udevice *udev, const char *name) + continue; + if (udev_db_get_device(udev_db, device->name) == 0) { + if (strcmp(udev_db->name, name) == 0) { +- info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name); ++ info("'%s' is a device node of '%s', skip link update\n", udev_db->name, device->name); + } else { +- info("compare priority of '%s' %i > %i", ++ info("compare priority of '%s' %i > %i\n", + udev_db->dev->devpath, udev_db->link_priority, priority); + if (target[0] == '\0' || udev_db->link_priority > priority) { + priority = udev_db->link_priority; +@@ -248,7 +248,7 @@ static int update_link(struct udevice *udev, const char *name) + name_list_cleanup(&name_list); + + if (target[0] == '\0') { +- info("no current target for '%s' found", name); ++ info("no current target for '%s' found\n", name); + rc = 1; + goto out; + } +@@ -257,7 +257,7 @@ static int update_link(struct udevice *udev, const char *name) + strlcpy(node, udev_root, sizeof(node)); + strlcat(node, "/", sizeof(node)); + strlcat(node, target, sizeof(node)); +- info("'%s' with target '%s' has the highest priority %i, create it", name, target, priority); ++ info("'%s' with target '%s' has the highest priority %i, create it\n", name, target, priority); + if (!udev->test_run) { + create_path(slink); + node_symlink(node, slink); +@@ -272,7 +272,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) + char symlinks[PATH_SIZE] = ""; + + list_for_each_entry(name_loop, &udev->symlink_list, node) { +- info("update symlink '%s' of '%s'", name_loop->name, udev->dev->devpath); ++ info("update symlink '%s' of '%s'\n", name_loop->name, udev->dev->devpath); + update_link(udev, name_loop->name); + strlcat(symlinks, udev_root, sizeof(symlinks)); + strlcat(symlinks, "/", sizeof(symlinks)); +@@ -302,7 +302,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) + } + if (!found) { + /* link does no longer belong to this device */ +- info("update old symlink '%s' no longer belonging to '%s'", ++ info("update old symlink '%s' no longer belonging to '%s'\n", + link_old_loop->name, udev->dev->devpath); + update_link(udev, link_old_loop->name); + } +@@ -356,7 +356,7 @@ int udev_node_add(struct udevice *udev) + gid = lookup_group(udev->group); + } + +- info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d", ++ info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d\n", + filename, major(udev->devt), minor(udev->devt), udev->mode, uid, gid); + + if (!udev->test_run) +@@ -380,7 +380,7 @@ int udev_node_add(struct udevice *udev) + if (range > 1) + udev->partitions = range-1; + } +- info("creating device partition nodes '%s[1-%i]'", filename, udev->partitions); ++ info("creating device partition nodes '%s[1-%i]'\n", filename, udev->partitions); + if (!udev->test_run) { + for (i = 1; i <= udev->partitions; i++) { + dev_t part_devt; +@@ -408,15 +408,15 @@ int udev_node_remove(struct udevice *udev) + strlcat(filename, "/", sizeof(filename)); + strlcat(filename, udev->name, sizeof(filename)); + if (stat(filename, &stats) != 0) { +- info("device node '%s' not found", filename); ++ info("device node '%s' not found\n", filename); + return 0; + } + if (udev->devt && stats.st_rdev != udev->devt) { +- info("device node '%s' points to a different device, skip removal", filename); ++ info("device node '%s' points to a different device, skip removal\n", filename); + return -1; + } + +- info("removing device node '%s'", filename); ++ info("removing device node '%s'\n", filename); + if (!udev->test_run) + retval = unlink_secure(filename); + if (retval) +@@ -427,7 +427,7 @@ int udev_node_remove(struct udevice *udev) + if (num > 0) { + int i; + +- info("removing all_partitions '%s[1-%i]'", filename, num); ++ info("removing all_partitions '%s[1-%i]'\n", filename, num); + if (num > 255) + return -1; + for (i = 1; i <= num; i++) { +diff --git a/udev_rules.c b/udev_rules.c +index 8a793ff..884cb70 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -48,13 +48,13 @@ static char *get_format_attribute(char **str) + if (*str[0] == '{') { + pos = strchr(*str, '}'); + if (pos == NULL) { +- err("missing closing brace for format"); ++ err("missing closing brace for format\n"); + return NULL; + } + pos[0] = '\0'; + attr = *str+1; + *str = pos+1; +- dbg("attribute='%s', str='%s'", attr, *str); ++ dbg("attribute='%s', str='%s'\n", attr, *str); + } + return attr; + } +@@ -69,10 +69,10 @@ static int get_format_len(char **str) + num = (int) strtoul(*str, &tail, 10); + if (num > 0) { + *str = tail; +- dbg("format length=%i", num); ++ dbg("format length=%i\n", num); + return num; + } else { +- err("format parsing error '%s'", *str); ++ err("format parsing error '%s'\n", *str); + } + } + return -1; +@@ -148,7 +148,7 @@ static int run_program(const char *command, const char *subsystem, + } else { + argv[i] = strsep(&pos, " "); + } +- dbg("arg[%i] '%s'", i, argv[i]); ++ dbg("arg[%i] '%s'\n", i, argv[i]); + i++; + } + argv[i] = NULL; +@@ -156,18 +156,18 @@ static int run_program(const char *command, const char *subsystem, + argv[0] = arg; + argv[1] = NULL; + } +- info("'%s'", command); ++ info("'%s'\n", command); + + /* prepare pipes from child to parent */ + if (result != NULL || udev_log_priority >= LOG_INFO) { + if (pipe(outpipe) != 0) { +- err("pipe failed: %s", strerror(errno)); ++ err("pipe failed: %s\n", strerror(errno)); + return -1; + } + } + if (udev_log_priority >= LOG_INFO) { + if (pipe(errpipe) != 0) { +- err("pipe failed: %s", strerror(errno)); ++ err("pipe failed: %s\n", strerror(errno)); + return -1; + } + } +@@ -198,7 +198,7 @@ static int run_program(const char *command, const char *subsystem, + dup2(devnull, STDERR_FILENO); + close(devnull); + } else +- err("open /dev/null failed: %s", strerror(errno)); ++ err("open /dev/null failed: %s\n", strerror(errno)); + if (outpipe[WRITE_END] > 0) { + dup2(outpipe[WRITE_END], STDOUT_FILENO); + close(outpipe[WRITE_END]); +@@ -210,14 +210,14 @@ static int run_program(const char *command, const char *subsystem, + execv(argv[0], argv); + if (errno == ENOENT || errno == ENOTDIR) { + /* may be on a filesytem which is not mounted right now */ +- info("program '%s' not found", argv[0]); ++ info("program '%s' not found\n", argv[0]); + } else { + /* other problems */ +- err("exec of program '%s' failed", argv[0]); ++ err("exec of program '%s' failed\n", argv[0]); + } + _exit(1); + case -1: +- err("fork of '%s' failed: %s", argv[0], strerror(errno)); ++ err("fork of '%s' failed: %s\n", argv[0], strerror(errno)); + return -1; + default: + /* read from child if requested */ +@@ -260,7 +260,7 @@ static int run_program(const char *command, const char *subsystem, + close(outpipe[READ_END]); + outpipe[READ_END] = -1; + if (count < 0) { +- err("stdin read failed: %s", strerror(errno)); ++ err("stdin read failed: %s\n", strerror(errno)); + retval = -1; + } + continue; +@@ -273,14 +273,14 @@ static int run_program(const char *command, const char *subsystem, + memcpy(&result[respos], inbuf, count); + respos += count; + } else { +- err("ressize %ld too short", (long)ressize); ++ err("ressize %ld too short\n", (long)ressize); + retval = -1; + } + } + pos = inbuf; + while ((line = strsep(&pos, "\n"))) + if (pos || line[0] != '\0') +- info("'%s' (stdout) '%s'", argv[0], line); ++ info("'%s' (stdout) '%s'\n", argv[0], line); + } + + /* get stderr */ +@@ -294,14 +294,14 @@ static int run_program(const char *command, const char *subsystem, + close(errpipe[READ_END]); + errpipe[READ_END] = -1; + if (count < 0) +- err("stderr read failed: %s", strerror(errno)); ++ err("stderr read failed: %s\n", strerror(errno)); + continue; + } + errbuf[count] = '\0'; + pos = errbuf; + while ((line = strsep(&pos, "\n"))) + if (pos || line[0] != '\0') +- info("'%s' (stderr) '%s'", argv[0], line); ++ info("'%s' (stderr) '%s'\n", argv[0], line); + } + } + if (outpipe[READ_END] > 0) +@@ -312,18 +312,18 @@ static int run_program(const char *command, const char *subsystem, + /* return the childs stdout string */ + if (result) { + result[respos] = '\0'; +- dbg("result='%s'", result); ++ dbg("result='%s'\n", result); + if (reslen) + *reslen = respos; + } + } + waitpid(pid, &status, 0); + if (WIFEXITED(status)) { +- info("'%s' returned with status %i", argv[0], WEXITSTATUS(status)); ++ info("'%s' returned with status %i\n", argv[0], WEXITSTATUS(status)); + if (WEXITSTATUS(status) != 0) + retval = -1; + } else { +- err("'%s' abnormal exit", argv[0]); ++ err("'%s' abnormal exit\n", argv[0]); + retval = -1; + } + } +@@ -364,7 +364,7 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu + continue; + + if (count >= sizeof(line)) { +- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); ++ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); + continue; + } + +@@ -373,11 +373,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu + + linepos = line; + if (get_key(&linepos, &variable, &value) == 0) { +- dbg("import '%s=%s'", variable, value); ++ dbg("import '%s=%s'\n", variable, value); + + /* handle device, renamed by external tool, returning new path */ + if (strcmp(variable, "DEVPATH") == 0) { +- info("updating devpath from '%s' to '%s'", udev->dev->devpath, value); ++ info("updating devpath from '%s' to '%s'\n", udev->dev->devpath, value); + sysfs_device_set_values(udev->dev, value, NULL, NULL); + } else + name_list_key_add(&udev->env_list, variable, value); +@@ -394,7 +394,7 @@ static int import_file_into_env(struct udevice *udev, const char *filename) + size_t bufsize; + + if (file_map(filename, &buf, &bufsize) != 0) { +- err("can't open '%s': %s", filename, strerror(errno)); ++ err("can't open '%s': %s\n", filename, strerror(errno)); + return -1; + } + import_keys_into_env(udev, buf, bufsize); +@@ -423,13 +423,13 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) + struct udevice *udev_parent; + struct name_entry *name_loop; + +- dbg("found parent '%s', get the node name", dev_parent->devpath); ++ dbg("found parent '%s', get the node name\n", dev_parent->devpath); + udev_parent = udev_device_init(NULL); + if (udev_parent == NULL) + return -1; + /* import the udev_db of the parent */ + if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { +- dbg("import stored parent env '%s'", udev_parent->name); ++ dbg("import stored parent env '%s'\n", udev_parent->name); + list_for_each_entry(name_loop, &udev_parent->env_list, node) { + char name[NAME_SIZE]; + char *pos; +@@ -440,16 +440,16 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) + pos[0] = '\0'; + pos++; + if (fnmatch(filter, name, 0) == 0) { +- dbg("import key '%s'", name_loop->name); ++ dbg("import key '%s'\n", name_loop->name); + name_list_add(&udev->env_list, name_loop->name, 0); + setenv(name, pos, 1); + } else +- dbg("skip key '%s'", name_loop->name); ++ dbg("skip key '%s'\n", name_loop->name); + } + } + rc = 0; + } else +- dbg("parent not found in database"); ++ dbg("parent not found in database\n"); + udev_device_cleanup(udev_parent); + } + +@@ -468,7 +468,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c + ssize_t count; + int retval = 0; + +- dbg("pass environment to socket '%s'", sockpath); ++ dbg("pass environment to socket '%s'\n", sockpath); + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + memset(&saddr, 0x00, sizeof(struct sockaddr_un)); + saddr.sun_family = AF_LOCAL; +@@ -498,7 +498,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c + count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, saddrlen); + if (count < 0) + retval = -1; +- info("passed %zi bytes to socket '%s', ", count, sockpath); ++ info("passed %zi bytes to socket '%s', \n", count, sockpath); + + close(sock); + return retval; +@@ -509,7 +509,7 @@ int udev_rules_run(struct udevice *udev) + struct name_entry *name_loop; + int retval = 0; + +- dbg("executing run list"); ++ dbg("executing run list\n"); + 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, udev->action); +@@ -541,22 +541,22 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout) + strlcat(filepath, "/", sizeof(filepath)); + strlcat(filepath, file, sizeof(filepath)); + +- dbg("will wait %i sec for '%s'", timeout, filepath); ++ dbg("will wait %i sec for '%s'\n", timeout, filepath); + while (--loop) { + /* lookup file */ + if (stat(filepath, &stats) == 0) { +- info("file '%s' appeared after %i loops", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); ++ info("file '%s' appeared after %i loops\n", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); + return 0; + } + /* make sure, the device did not disappear in the meantime */ + if (stat(devicepath, &stats) != 0) { +- info("device disappeared while waiting for '%s'", filepath); ++ info("device disappeared while waiting for '%s'\n", filepath); + return -2; + } +- info("wait for '%s' for %i mseconds", filepath, 1000 / WAIT_LOOP_PER_SECOND); ++ info("wait for '%s' for %i mseconds\n", filepath, 1000 / WAIT_LOOP_PER_SECOND); + usleep(1000 * 1000 / WAIT_LOOP_PER_SECOND); + } +- info("waiting for '%s' failed", filepath); ++ info("waiting for '%s' failed\n", filepath); + return -1; + } + +@@ -707,12 +707,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + if (strncasecmp(&head[1], subst->name, strlen(subst->name)) == 0) { + type = subst->type; + tail = head + strlen(subst->name)+1; +- dbg("will substitute format name '%s'", subst->name); ++ dbg("will substitute format name '%s'\n", subst->name); + goto found; + } + } + head[0] = '$'; +- err("unknown format variable '%s'", head); ++ err("unknown format variable '%s'\n", head); + } else if (head[0] == '%') { + /* substitute format char */ + if (head[1] == '\0') +@@ -730,12 +730,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + if (tail[0] == subst->fmt) { + type = subst->type; + tail++; +- dbg("will substitute format char '%c'", subst->fmt); ++ dbg("will substitute format char '%c'\n", subst->fmt); + goto found; + } + } + head[0] = '%'; +- err("unknown format char '%c'", tail[0]); ++ err("unknown format char '%c'\n", tail[0]); + } + head++; + } +@@ -743,42 +743,42 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + found: + attr = get_format_attribute(&tail); + strlcpy(temp, tail, sizeof(temp)); +- dbg("format=%i, string='%s', tail='%s'", type ,string, tail); ++ dbg("format=%i, string='%s', tail='%s'\n", type ,string, tail); + + switch (type) { + case SUBST_DEVPATH: + strlcat(string, udev->dev->devpath, maxsize); +- dbg("substitute devpath '%s'", udev->dev->devpath); ++ dbg("substitute devpath '%s'\n", udev->dev->devpath); + break; + case SUBST_KERNEL: + strlcat(string, udev->dev->kernel, maxsize); +- dbg("substitute kernel name '%s'", udev->dev->kernel); ++ dbg("substitute kernel name '%s'\n", udev->dev->kernel); + break; + case SUBST_KERNEL_NUMBER: + strlcat(string, udev->dev->kernel_number, maxsize); +- dbg("substitute kernel number '%s'", udev->dev->kernel_number); ++ dbg("substitute kernel number '%s'\n", udev->dev->kernel_number); + break; + case SUBST_ID: + if (udev->dev_parent != NULL) { + strlcat(string, udev->dev_parent->kernel, maxsize); +- dbg("substitute id '%s'", udev->dev_parent->kernel); ++ dbg("substitute id '%s'\n", udev->dev_parent->kernel); + } + break; + case SUBST_DRIVER: + if (udev->dev_parent != NULL) { + strlcat(string, udev->dev_parent->driver, maxsize); +- dbg("substitute driver '%s'", udev->dev_parent->driver); ++ dbg("substitute driver '%s'\n", udev->dev_parent->driver); + } + break; + case SUBST_MAJOR: + sprintf(temp2, "%d", major(udev->devt)); + strlcat(string, temp2, maxsize); +- dbg("substitute major number '%s'", temp2); ++ dbg("substitute major number '%s'\n", temp2); + break; + case SUBST_MINOR: + sprintf(temp2, "%d", minor(udev->devt)); + strlcat(string, temp2, maxsize); +- dbg("substitute minor number '%s'", temp2); ++ dbg("substitute minor number '%s'\n", temp2); + break; + case SUBST_RESULT: + if (udev->program_result[0] == '\0') +@@ -788,7 +788,7 @@ found: + if (attr != NULL) + i = strtoul(attr, &rest, 10); + if (i > 0) { +- dbg("request part #%d of result string", i); ++ dbg("request part #%d of result string\n", i); + cpos = udev->program_result; + while (--i) { + while (cpos[0] != '\0' && !isspace(cpos[0])) +@@ -797,7 +797,7 @@ found: + cpos++; + } + if (i > 0) { +- err("requested part of result string not found"); ++ err("requested part of result string not found\n"); + break; + } + strlcpy(temp2, cpos, sizeof(temp2)); +@@ -808,15 +808,15 @@ found: + cpos[0] = '\0'; + } + strlcat(string, temp2, maxsize); +- dbg("substitute part of result string '%s'", temp2); ++ dbg("substitute part of result string '%s'\n", temp2); + } else { + strlcat(string, udev->program_result, maxsize); +- dbg("substitute result string '%s'", udev->program_result); ++ dbg("substitute result string '%s'\n", udev->program_result); + } + break; + case SUBST_ATTR: + if (attr == NULL) +- err("missing file parameter for attr"); ++ err("missing file parameter for attr\n"); + else { + char devpath[PATH_SIZE]; + char *attrib; +@@ -839,7 +839,7 @@ found: + struct sysfs_device *dev_parent = udev->dev; + + do { +- dbg("looking at '%s'", dev_parent->devpath); ++ dbg("looking at '%s'\n", dev_parent->devpath); + value = sysfs_attr_get_value(dev_parent->devpath, attr); + if (value != NULL) { + strlcpy(temp2, value, sizeof(temp2)); +@@ -860,9 +860,9 @@ found: + temp2[--size] = '\0'; + count = replace_chars(temp2, ALLOWED_CHARS_INPUT); + if (count > 0) +- info("%i character(s) replaced" , count); ++ info("%i character(s) replaced\n" , count); + strlcat(string, temp2, maxsize); +- dbg("substitute sysfs value '%s'", temp2); ++ dbg("substitute sysfs value '%s'\n", temp2); + } + break; + case SUBST_PARENT: +@@ -873,15 +873,15 @@ found: + if (dev_parent != NULL) { + struct udevice *udev_parent; + +- dbg("found parent '%s', get the node name", dev_parent->devpath); ++ dbg("found parent '%s', get the node name\n", dev_parent->devpath); + udev_parent = udev_device_init(NULL); + if (udev_parent != NULL) { + /* lookup the name in the udev_db with the DEVPATH of the parent */ + if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { + strlcat(string, udev_parent->name, maxsize); +- dbg("substitute parent node name'%s'", udev_parent->name); ++ dbg("substitute parent node name'%s'\n", udev_parent->name); + } else +- dbg("parent not found in database"); ++ dbg("parent not found in database\n"); + udev_device_cleanup(udev_parent); + } + } +@@ -889,48 +889,48 @@ found: + break; + case SUBST_TEMP_NODE: + if (udev->tmp_node[0] == '\0' && major(udev->devt) > 0) { +- dbg("create temporary device node for callout"); ++ dbg("create temporary device node for callout\n"); + snprintf(udev->tmp_node, sizeof(udev->tmp_node), "%s/.tmp-%u-%u", + udev_root, major(udev->devt), minor(udev->devt)); + udev->tmp_node[sizeof(udev->tmp_node)-1] = '\0'; + udev_node_mknod(udev, udev->tmp_node, udev->devt, 0600, 0, 0); + } + strlcat(string, udev->tmp_node, maxsize); +- dbg("substitute temporary device node name '%s'", udev->tmp_node); ++ dbg("substitute temporary device node name '%s'\n", udev->tmp_node); + break; + case SUBST_NAME: + strlcat(string, udev->name, maxsize); +- dbg("substitute udev->name '%s'", udev->name); ++ dbg("substitute udev->name '%s'\n", udev->name); + break; + case SUBST_ROOT: + strlcat(string, udev_root, maxsize); +- dbg("substitute udev_root '%s'", udev_root); ++ dbg("substitute udev_root '%s'\n", udev_root); + break; + case SUBST_SYS: + strlcat(string, sysfs_path, maxsize); +- dbg("substitute sysfs_path '%s'", sysfs_path); ++ dbg("substitute sysfs_path '%s'\n", sysfs_path); + break; + case SUBST_ENV: + if (attr == NULL) { +- dbg("missing attribute"); ++ dbg("missing attribute\n"); + break; + } + pos = getenv(attr); + if (pos == NULL) { +- dbg("env '%s' not available", attr); ++ dbg("env '%s' not available\n", attr); + break; + } +- dbg("substitute env '%s=%s'", attr, pos); ++ dbg("substitute env '%s=%s'\n", attr, pos); + strlcat(string, pos, maxsize); + break; + default: +- err("unknown substitution type=%i", type); ++ err("unknown substitution type=%i\n", type); + break; + } + /* possibly truncate to format-char specified length */ + if (len >= 0 && len < (int)strlen(head)) { + head[len] = '\0'; +- dbg("truncate to %i chars, subtitution string becomes '%s'", len, head); ++ dbg("truncate to %i chars, subtitution string becomes '%s'\n", len, head); + } + strlcat(string, temp, maxsize); + } +@@ -960,7 +960,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k + /* look for a matching string, parts are separated by '|' */ + strlcpy(value, rule->buf + key->val_off, sizeof(value)); + key_value = value; +- dbg("key %s value='%s'", key_name, key_value); ++ dbg("key %s value='%s'\n", key_name, key_value); + while (key_value) { + pos = strchr(key_value, '|'); + if (pos) { +@@ -968,7 +968,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k + pos++; + } + +- dbg("match %s '%s' <-> '%s'", key_name, key_value, val); ++ dbg("match %s '%s' <-> '%s'\n", key_name, key_value, val); + match = (fnmatch(key_value, val, 0) == 0); + if (match) + break; +@@ -977,11 +977,11 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k + } + + if (match && (key->operation == KEY_OP_MATCH)) { +- dbg("%s is true (matching value)", key_name); ++ dbg("%s is true (matching value)\n", key_name); + return 0; + } + if (!match && (key->operation == KEY_OP_NOMATCH)) { +- dbg("%s is true (non-matching value)", key_name); ++ dbg("%s is true (non-matching value)\n", key_name); + return 0; + } + return -1; +@@ -1037,7 +1037,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + const char *value = getenv(key_name); + + if (!value) { +- dbg("ENV{'%s'} is not set, treat as empty", key_name); ++ dbg("ENV{'%s'} is not set, treat as empty\n", key_name); + value = ""; + } + if (match_key("ENV", rule, &pair->key, value)) +@@ -1076,10 +1076,10 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + attr_subst_subdir(filename, sizeof(filename)); + + match = (stat(filename, &statbuf) == 0); +- info("'%s' %s", filename, match ? "exists" : "does not exist"); ++ info("'%s' %s", filename, match ? "exists" : "does not exist\n"); + if (match && rule->test_mode_mask > 0) { + match = ((statbuf.st_mode & rule->test_mode_mask) > 0); +- info("'%s' has mode=%#o and %s %#o", filename, statbuf.st_mode, ++ info("'%s' has mode=%#o and %s %#o\n", filename, statbuf.st_mode, + match ? "matches" : "does not match", + rule->test_mode_mask); + } +@@ -1087,7 +1087,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + goto nomatch; + if (!match && rule->test.operation == KEY_OP_MATCH) + goto nomatch; +- dbg("TEST key is true"); ++ dbg("TEST key is true\n"); + } + + if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) { +@@ -1130,7 +1130,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + len = strlen(val); + while (len > 0 && isspace(val[len-1])) + val[--len] = '\0'; +- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); ++ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); + } + + if (match_key("ATTR", rule, &pair->key, val)) +@@ -1178,7 +1178,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + len = strlen(val); + while (len > 0 && isspace(val[len-1])) + val[--len] = '\0'; +- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); ++ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); + } + + if (match_key("ATTRS", rule, &pair->key, val)) +@@ -1190,12 +1190,12 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + break; + try_parent: + /* move to parent device */ +- dbg("try parent sysfs device"); ++ dbg("try parent sysfs device\n"); + udev->dev_parent = sysfs_device_get_parent(udev->dev_parent); + if (udev->dev_parent == NULL) + goto nomatch; +- dbg("looking at dev_parent->devpath='%s'", udev->dev_parent->devpath); +- dbg("looking at dev_parent->kernel='%s'", udev->dev_parent->kernel); ++ dbg("looking at dev_parent->devpath='%s'\n", udev->dev_parent->devpath); ++ dbg("looking at dev_parent->kernel='%s'\n", udev->dev_parent->kernel); + } + + /* execute external program */ +@@ -1206,28 +1206,28 @@ try_parent: + strlcpy(program, key_val(rule, &rule->program), sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); + if (run_program(program, udev->dev->subsystem, result, sizeof(result), NULL) != 0) { +- dbg("PROGRAM is false"); ++ dbg("PROGRAM is false\n"); + udev->program_result[0] = '\0'; + if (rule->program.operation != KEY_OP_NOMATCH) + goto nomatch; + } else { + int count; + +- dbg("PROGRAM matches"); ++ dbg("PROGRAM matches\n"); + remove_trailing_chars(result, '\n'); + if (rule->string_escape == ESCAPE_UNSET || + rule->string_escape == ESCAPE_REPLACE) { + count = replace_chars(result, ALLOWED_CHARS_INPUT); + if (count > 0) +- info("%i character(s) replaced" , count); ++ info("%i character(s) replaced\n" , count); + } +- dbg("result is '%s'", result); ++ dbg("result is '%s'\n", result); + strlcpy(udev->program_result, result, sizeof(udev->program_result)); +- dbg("PROGRAM returned successful"); ++ dbg("PROGRAM returned successful\n"); + if (rule->program.operation == KEY_OP_NOMATCH) + goto nomatch; + } +- dbg("PROGRAM key is true"); ++ dbg("PROGRAM key is true\n"); + } + + /* check for matching result of external program */ +@@ -1241,23 +1241,23 @@ try_parent: + + strlcpy(import, key_val(rule, &rule->import), sizeof(import)); + udev_rules_apply_format(udev, import, sizeof(import)); +- dbg("check for IMPORT import='%s'", import); ++ dbg("check for IMPORT import='%s'\n", import); + if (rule->import_type == IMPORT_PROGRAM) { + rc = import_program_into_env(udev, import); + } else if (rule->import_type == IMPORT_FILE) { +- dbg("import file import='%s'", import); ++ dbg("import file import='%s'\n", import); + rc = import_file_into_env(udev, import); + } else if (rule->import_type == IMPORT_PARENT) { +- dbg("import parent import='%s'", import); ++ dbg("import parent import='%s'\n", import); + rc = import_parent_into_env(udev, import); + } + if (rc != 0) { +- dbg("IMPORT failed"); ++ dbg("IMPORT failed\n"); + if (rule->import.operation != KEY_OP_NOMATCH) + goto nomatch; + } else +- dbg("IMPORT '%s' imported", key_val(rule, &rule->import)); +- dbg("IMPORT key is true"); ++ dbg("IMPORT '%s' imported\n", key_val(rule, &rule->import)); ++ dbg("IMPORT key is true\n"); + } + + /* rule matches, if we have ENV assignments export it */ +@@ -1276,7 +1276,7 @@ try_parent: + if (temp_value[0] == '\0') { + name_list_key_remove(&udev->env_list, key_name); + unsetenv(key_name); +- info("unset ENV '%s'", key_name); ++ info("unset ENV '%s'\n", key_name); + } else { + struct name_entry *entry; + +@@ -1284,7 +1284,7 @@ try_parent: + if (entry == NULL) + break; + putenv(entry->name); +- info("set ENV '%s'", entry->name); ++ info("set ENV '%s'\n", entry->name); + } + } + } +@@ -1321,15 +1321,15 @@ try_parent: + + strlcpy(value, key_val(rule, &pair->key), sizeof(value)); + udev_rules_apply_format(udev, value, sizeof(value)); +- info("writing '%s' to sysfs file '%s'", value, attr); ++ info("writing '%s' to sysfs file '%s'\n", value, attr); + f = fopen(attr, "w"); + if (f != NULL) { + if (!udev->test_run) + if (fprintf(f, "%s", value) <= 0) +- err("error writing ATTR{%s}: %s", attr, strerror(errno)); ++ err("error writing ATTR{%s}: %s\n", attr, strerror(errno)); + fclose(f); + } else +- err("error opening ATTR{%s} for writing: %s", attr, strerror(errno)); ++ err("error opening ATTR{%s} for writing: %s\n", attr, strerror(errno)); + } + } + return 0; +@@ -1343,8 +1343,8 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + struct udev_rule *rule; + int name_set = 0; + +- dbg("udev->dev->devpath='%s'", udev->dev->devpath); +- dbg("udev->dev->kernel='%s'", udev->dev->kernel); ++ dbg("udev->dev->devpath='%s'\n", udev->dev->devpath); ++ dbg("udev->dev->kernel='%s'\n", udev->dev->kernel); + + /* look for a matching rule to apply */ + udev_rules_iter_init(rules); +@@ -1357,31 +1357,31 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + (rule->name.operation == KEY_OP_ASSIGN || + rule->name.operation == KEY_OP_ASSIGN_FINAL || + rule->name.operation == KEY_OP_ADD)) { +- dbg("node name already set, rule ignored"); ++ dbg("node name already set, rule ignored\n"); + continue; + } + +- dbg("process rule"); ++ dbg("process rule\n"); + if (match_rule(udev, rule) == 0) { + /* apply options */ + if (rule->ignore_device) { +- info("rule applied, '%s' is ignored", udev->dev->kernel); ++ info("rule applied, '%s' is ignored\n", udev->dev->kernel); + udev->ignore_device = 1; + return 0; + } + if (rule->ignore_remove) { + udev->ignore_remove = 1; +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + } + if (rule->link_priority != 0) { + udev->link_priority = rule->link_priority; +- info("link_priority=%i", udev->link_priority); ++ info("link_priority=%i\n", udev->link_priority); + } + /* apply all_partitions option only at a main block device */ + if (rule->partitions && + strcmp(udev->dev->subsystem, "block") == 0 && udev->dev->kernel_number[0] == '\0') { + udev->partitions = rule->partitions; +- dbg("creation of partition nodes requested"); ++ dbg("creation of partition nodes requested\n"); + } + + /* apply permissions */ +@@ -1389,21 +1389,21 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) + udev->mode_final = 1; + udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); +- dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); ++ dbg("applied mode=%#o to '%s'\n", udev->mode, udev->dev->kernel); + } + if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { + if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) + udev->owner_final = 1; + strlcpy(udev->owner, key_val(rule, &rule->owner), sizeof(udev->owner)); + udev_rules_apply_format(udev, udev->owner, sizeof(udev->owner)); +- dbg("applied owner='%s' to '%s'", udev->owner, udev->dev->kernel); ++ dbg("applied owner='%s' to '%s'\n", udev->owner, udev->dev->kernel); + } + if (!udev->group_final && rule->group.operation != KEY_OP_UNSET) { + if (rule->group.operation == KEY_OP_ASSIGN_FINAL) + udev->group_final = 1; + strlcpy(udev->group, key_val(rule, &rule->group), sizeof(udev->group)); + udev_rules_apply_format(udev, udev->group, sizeof(udev->group)); +- dbg("applied group='%s' to '%s'", udev->group, udev->dev->kernel); ++ dbg("applied group='%s' to '%s'\n", udev->group, udev->dev->kernel); + } + + /* collect symlinks */ +@@ -1419,7 +1419,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + udev->symlink_final = 1; + if (rule->symlink.operation == KEY_OP_ASSIGN || + rule->symlink.operation == KEY_OP_ASSIGN_FINAL) { +- info("reset symlink list"); ++ info("reset symlink list\n"); + name_list_cleanup(&udev->symlink_list); + } + /* allow multiple symlinks separated by spaces */ +@@ -1429,16 +1429,16 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + rule->string_escape == ESCAPE_REPLACE) { + count = replace_chars(temp, ALLOWED_CHARS_FILE " "); + if (count > 0) +- info("%i character(s) replaced" , count); ++ info("%i character(s) replaced\n" , count); + } +- dbg("rule applied, added symlink(s) '%s'", temp); ++ dbg("rule applied, added symlink(s) '%s'\n", temp); + pos = temp; + while (isspace(pos[0])) + pos++; + next = strchr(pos, ' '); + while (next) { + next[0] = '\0'; +- info("add symlink '%s'", pos); ++ info("add symlink '%s'\n", pos); + name_list_add(&udev->symlink_list, pos, 0); + while (isspace(next[1])) + next++; +@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + next = strchr(pos, ' '); + } + if (pos[0] != '\0') { +- info("add symlink '%s'", pos); ++ info("add symlink '%s'\n", pos); + name_list_add(&udev->symlink_list, pos, 0); + } + } +@@ -1464,12 +1464,12 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + rule->string_escape == ESCAPE_REPLACE) { + count = replace_chars(udev->name, ALLOWED_CHARS_FILE); + if (count > 0) +- info("%i character(s) replaced", count); ++ info("%i character(s) replaced\n", count); + } + +- info("rule applied, '%s' becomes '%s'", udev->dev->kernel, udev->name); ++ info("rule applied, '%s' becomes '%s'\n", udev->dev->kernel, udev->name); + if (strcmp(udev->dev->subsystem, "net") != 0) +- dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i", ++ dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i\n", + udev->name, udev->owner, udev->group, udev->mode, udev->partitions); + } + +@@ -1479,34 +1479,34 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + if (rule->run.operation == KEY_OP_ASSIGN_FINAL) + udev->run_final = 1; + if (rule->run.operation == KEY_OP_ASSIGN || rule->run.operation == KEY_OP_ASSIGN_FINAL) { +- info("reset run list"); ++ info("reset run list\n"); + name_list_cleanup(&udev->run_list); + } +- dbg("add run '%s'", key_val(rule, &rule->run)); ++ dbg("add run '%s'\n", key_val(rule, &rule->run)); + entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); + if (rule->run_ignore_error) + entry->ignore_error = 1; + } + + if (rule->last_rule) { +- dbg("last rule to be applied"); ++ dbg("last rule to be applied\n"); + break; + } + + if (rule->goto_label.operation != KEY_OP_UNSET) { +- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); ++ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); + udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); + } + } + } + + if (!name_set) { +- info("no node name set, will use kernel name '%s'", udev->dev->kernel); ++ info("no node name set, will use kernel name '%s'\n", udev->dev->kernel); + strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); + } + + if (udev->tmp_node[0] != '\0') { +- dbg("removing temporary device node"); ++ dbg("removing temporary device node\n"); + unlink_secure(udev->tmp_node); + udev->tmp_node[0] = '\0'; + } +@@ -1518,7 +1518,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + { + struct udev_rule *rule; + +- dbg("udev->kernel='%s'", udev->dev->kernel); ++ dbg("udev->kernel='%s'\n", udev->dev->kernel); + + /* look for a matching rule to apply */ + udev_rules_iter_init(rules); +@@ -1527,7 +1527,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + if (rule == NULL) + break; + +- dbg("process rule"); ++ dbg("process rule\n"); + if (rule->name.operation == KEY_OP_ASSIGN || + rule->name.operation == KEY_OP_ASSIGN_FINAL || + rule->name.operation == KEY_OP_ADD || +@@ -1536,19 +1536,19 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + 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"); ++ dbg("skip rule that names a device\n"); + continue; + } + + if (match_rule(udev, rule) == 0) { + if (rule->ignore_device) { +- info("rule applied, '%s' is ignored", udev->dev->kernel); ++ info("rule applied, '%s' is ignored\n", udev->dev->kernel); + udev->ignore_device = 1; + return 0; + } + if (rule->ignore_remove) { + udev->ignore_remove = 1; +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + } + + if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { +@@ -1556,10 +1556,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + + if (rule->run.operation == KEY_OP_ASSIGN || + rule->run.operation == KEY_OP_ASSIGN_FINAL) { +- info("reset run list"); ++ info("reset run list\n"); + name_list_cleanup(&udev->run_list); + } +- dbg("add run '%s'", key_val(rule, &rule->run)); ++ dbg("add run '%s'\n", key_val(rule, &rule->run)); + entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); + if (rule->run_ignore_error) + entry->ignore_error = 1; +@@ -1568,12 +1568,12 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + } + + if (rule->last_rule) { +- dbg("last rule to be applied"); ++ dbg("last rule to be applied\n"); + break; + } + + if (rule->goto_label.operation != KEY_OP_UNSET) { +- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); ++ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); + udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); + } + } +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index 6d88354..b586df1 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -33,7 +33,7 @@ + + void udev_rules_iter_init(struct udev_rules *rules) + { +- dbg("bufsize=%zi", rules->bufsize); ++ dbg("bufsize=%zi\n", rules->bufsize); + rules->current = 0; + } + +@@ -44,9 +44,9 @@ struct udev_rule *udev_rules_iter_next(struct udev_rules *rules) + if (!rules) + return NULL; + +- dbg("current=%zi", rules->current); ++ dbg("current=%zi\n", rules->current); + if (rules->current >= rules->bufsize) { +- dbg("no more rules"); ++ dbg("no more rules\n"); + return NULL; + } + +@@ -62,20 +62,20 @@ struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *la + static struct udev_rule *rule; + + next: +- dbg("current=%zi", rules->current); ++ dbg("current=%zi\n", rules->current); + if (rules->current >= rules->bufsize) { +- dbg("no more rules"); ++ dbg("no more rules\n"); + return NULL; + } + rule = (struct udev_rule *) (rules->buf + rules->current); + + if (strcmp(&rule->buf[rule->label.val_off], label) != 0) { +- dbg("moving forward, looking for label '%s'", label); ++ dbg("moving forward, looking for label '%s'\n", label); + rules->current += sizeof(struct udev_rule) + rule->bufsize; + goto next; + } + +- dbg("found label '%s'", label); ++ dbg("found label '%s'\n", label); + return rule; + } + +@@ -123,29 +123,29 @@ static int get_key(char **line, char **key, enum key_operation *operation, char + if (linepos[0] == '=' && linepos[1] == '=') { + *operation = KEY_OP_MATCH; + linepos += 2; +- dbg("operator=match"); ++ dbg("operator=match\n"); + } else if (linepos[0] == '!' && linepos[1] == '=') { + *operation = KEY_OP_NOMATCH; + linepos += 2; +- dbg("operator=nomatch"); ++ dbg("operator=nomatch\n"); + } else if (linepos[0] == '+' && linepos[1] == '=') { + *operation = KEY_OP_ADD; + linepos += 2; +- dbg("operator=add"); ++ dbg("operator=add\n"); + } else if (linepos[0] == '=') { + *operation = KEY_OP_ASSIGN; + linepos++; +- dbg("operator=assign"); ++ dbg("operator=assign\n"); + } else if (linepos[0] == ':' && linepos[1] == '=') { + *operation = KEY_OP_ASSIGN_FINAL; + linepos += 2; +- dbg("operator=assign_final"); ++ dbg("operator=assign_final\n"); + } else + return -1; + + /* terminate key */ + temp[0] = '\0'; +- dbg("key='%s'", *key); ++ dbg("key='%s'\n", *key); + + /* skip whitespace after operator */ + while (isspace(linepos[0])) +@@ -165,7 +165,7 @@ static int get_key(char **line, char **key, enum key_operation *operation, char + return -1; + temp[0] = '\0'; + temp++; +- dbg("value='%s'", *value); ++ dbg("value='%s'\n", *value); + + /* move line to next key */ + *line = temp; +@@ -184,11 +184,11 @@ static char *get_key_attribute(char *str) + attr++; + pos = strchr(attr, '}'); + if (pos == NULL) { +- err("missing closing brace for format"); ++ err("missing closing brace for format\n"); + return NULL; + } + pos[0] = '\0'; +- dbg("attribute='%s'", attr); ++ dbg("attribute='%s'\n", attr); + return attr; + } + +@@ -215,7 +215,7 @@ static int add_rule_key_pair(struct udev_rule *rule, struct key_pairs *pairs, + size_t key_len = strnlen(key, PATH_SIZE); + + if (pairs->count >= PAIRS_MAX) { +- err("skip, too many keys of the same type in a single rule"); ++ err("skip, too many keys of the same type in a single rule\n"); + return -1; + } + +@@ -261,7 +261,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "ACTION") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid ACTION operation"); ++ err("invalid ACTION operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->action, operation, value); +@@ -272,7 +272,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "DEVPATH") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid DEVPATH operation"); ++ err("invalid DEVPATH operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->devpath, operation, value); +@@ -283,7 +283,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "KERNEL") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid KERNEL operation"); ++ err("invalid KERNEL operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->kernel, operation, value); +@@ -294,7 +294,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "SUBSYSTEM") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid SUBSYSTEM operation"); ++ err("invalid SUBSYSTEM operation\n"); + goto invalid; + } + /* bus, class, subsystem events should all be the same */ +@@ -302,7 +302,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strcmp(value, "bus") == 0 || + strcmp(value, "class") == 0) { + if (strcmp(value, "bus") == 0 || strcmp(value, "class") == 0) +- err("'%s' must be specified as 'subsystem' " ++ err("'%s' must be specified as 'subsystem' \n" + "please fix it in %s:%u", value, filename, lineno); + add_rule_key(rule, &rule->subsystem, operation, "subsystem|class|bus"); + } else +@@ -314,7 +314,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "DRIVER") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid DRIVER operation"); ++ err("invalid DRIVER operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->driver, operation, value); +@@ -325,7 +325,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strncasecmp(key, "ATTR{", sizeof("ATTR{")-1) == 0) { + attr = get_key_attribute(key + sizeof("ATTR")-1); + if (attr == NULL) { +- err("error parsing ATTR attribute"); ++ err("error parsing ATTR attribute\n"); + goto invalid; + } + if (add_rule_key_pair(rule, &rule->attr, operation, attr, value) != 0) +@@ -338,7 +338,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strcasecmp(key, "ID") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid KERNELS operation"); ++ err("invalid KERNELS operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->kernels, operation, value); +@@ -350,7 +350,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strcasecmp(key, "BUS") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid SUBSYSTEMS operation"); ++ err("invalid SUBSYSTEMS operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->subsystems, operation, value); +@@ -361,7 +361,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "DRIVERS") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid DRIVERS operation"); ++ err("invalid DRIVERS operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->drivers, operation, value); +@@ -373,19 +373,19 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strncasecmp(key, "SYSFS{", sizeof("SYSFS{")-1) == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid ATTRS operation"); ++ err("invalid ATTRS operation\n"); + goto invalid; + } + attr = get_key_attribute(key + sizeof("ATTRS")-1); + if (attr == NULL) { +- err("error parsing ATTRS attribute"); ++ err("error parsing ATTRS attribute\n"); + goto invalid; + } + if (strncmp(attr, "device/", 7) == 0) +- err("the 'device' link is deprecated and will be removed from a future kernel, " ++ err("the 'device' link is deprecated and will be removed from a future kernel, \n" + "please fix it in %s:%u", filename, lineno); + else if (strstr(attr, "../") != NULL) +- err("do not reference parent sysfs directories directly, that may break with a future kernel, " ++ err("do not reference parent sysfs directories directly, that may break with a future kernel, \n" + "please fix it in %s:%u", filename, lineno); + if (add_rule_key_pair(rule, &rule->attrs, operation, attr, value) != 0) + goto invalid; +@@ -396,7 +396,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strncasecmp(key, "ENV{", sizeof("ENV{")-1) == 0) { + attr = get_key_attribute(key + sizeof("ENV")-1); + if (attr == NULL) { +- err("error parsing ENV attribute"); ++ err("error parsing ENV attribute\n"); + goto invalid; + } + if (strncmp(attr, "PHYSDEV", 7) == 0) +@@ -416,7 +416,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "RESULT") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid RESULT operation"); ++ err("invalid RESULT operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->result, operation, value); +@@ -427,13 +427,13 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strncasecmp(key, "IMPORT", sizeof("IMPORT")-1) == 0) { + attr = get_key_attribute(key + sizeof("IMPORT")-1); + if (attr != NULL && strstr(attr, "program")) { +- dbg("IMPORT will be executed"); ++ dbg("IMPORT will be executed\n"); + rule->import_type = IMPORT_PROGRAM; + } else if (attr != NULL && strstr(attr, "file")) { +- dbg("IMPORT will be included as file"); ++ dbg("IMPORT will be included as file\n"); + rule->import_type = IMPORT_FILE; + } else if (attr != NULL && strstr(attr, "parent")) { +- dbg("IMPORT will include the parent values"); ++ dbg("IMPORT will include the parent values\n"); + rule->import_type = IMPORT_PARENT; + } else { + /* figure it out if it is executable */ +@@ -455,12 +455,12 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + pos[0] = '\0'; + } + +- dbg("IMPORT auto mode for '%s'", file); ++ dbg("IMPORT auto mode for '%s'\n", file); + if (!lstat(file, &statbuf) && (statbuf.st_mode & S_IXUSR)) { +- dbg("IMPORT is executable, will be executed (autotype)"); ++ dbg("IMPORT is executable, will be executed (autotype)\n"); + rule->import_type = IMPORT_PROGRAM; + } else { +- dbg("IMPORT is not executable, will be included as file (autotype)"); ++ dbg("IMPORT is not executable, will be included as file (autotype)\n"); + rule->import_type = IMPORT_FILE; + } + } +@@ -472,7 +472,7 @@ 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"); ++ err("invalid TEST operation\n"); + goto invalid; + } + attr = get_key_attribute(key + sizeof("TEST")-1); +@@ -516,16 +516,16 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + attr = get_key_attribute(key + sizeof("NAME")-1); + if (attr != NULL) { + if (strstr(attr, "all_partitions") != NULL) { +- dbg("creation of partition nodes requested"); ++ dbg("creation of partition nodes requested\n"); + rule->partitions = DEFAULT_PARTITIONS_COUNT; + } + if (strstr(attr, "ignore_remove") != NULL) { +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + rule->ignore_remove = 1; + } + } + if (value[0] == '\0') +- dbg("name empty, node creation supressed"); ++ dbg("name empty, node creation supressed\n"); + add_rule_key(rule, &rule->name, operation, value); + continue; + } +@@ -548,7 +548,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (endptr[0] != '\0') { + char owner[32]; + uid_t uid = lookup_user(value); +- dbg("replacing username='%s' by id=%i", value, uid); ++ dbg("replacing username='%s' by id=%i\n", value, uid); + sprintf(owner, "%u", (unsigned int) uid); + add_rule_key(rule, &rule->owner, operation, owner); + continue; +@@ -567,7 +567,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (endptr[0] != '\0') { + char group[32]; + gid_t gid = lookup_group(value); +- dbg("replacing groupname='%s' by id=%i", value, gid); ++ dbg("replacing groupname='%s' by id=%i\n", value, gid); + sprintf(group, "%u", (unsigned int) gid); + add_rule_key(rule, &rule->group, operation, group); + continue; +@@ -588,21 +588,21 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + const char *pos; + + if (strstr(value, "last_rule") != NULL) { +- dbg("last rule to be applied"); ++ dbg("last rule to be applied\n"); + rule->last_rule = 1; + } + if (strstr(value, "ignore_device") != NULL) { +- dbg("device should be ignored"); ++ dbg("device should be ignored\n"); + rule->ignore_device = 1; + } + if (strstr(value, "ignore_remove") != NULL) { +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + rule->ignore_remove = 1; + } + pos = strstr(value, "link_priority="); + if (pos != NULL) { + rule->link_priority = atoi(&pos[strlen("link_priority=")]); +- dbg("link priority=%i", rule->link_priority); ++ dbg("link priority=%i\n", rule->link_priority); + } + pos = strstr(value, "string_escape="); + if (pos != NULL) { +@@ -613,18 +613,18 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + rule->string_escape = ESCAPE_REPLACE; + } + if (strstr(value, "all_partitions") != NULL) { +- dbg("creation of partition nodes requested"); ++ dbg("creation of partition nodes requested\n"); + rule->partitions = DEFAULT_PARTITIONS_COUNT; + } + valid = 1; + continue; + } + +- err("unknown key '%s' in %s:%u", key, filename, lineno); ++ err("unknown key '%s' in %s:%u\n", key, filename, lineno); + } + + if (physdev && rule->wait_for_sysfs.operation == KEY_OP_UNSET) +- err("PHYSDEV* values are deprecated and will be removed from a future kernel, " ++ err("PHYSDEV* values are deprecated and will be removed from a future kernel, \n" + "please fix it in %s:%u", filename, lineno); + + /* skip line if not any valid key was found */ +@@ -634,23 +634,23 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + /* grow buffer and add rule */ + rule_size = sizeof(struct udev_rule) + rule->bufsize; + padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t); +- dbg("add %zi padding bytes", padding); ++ dbg("add %zi padding bytes\n", padding); + rule_size += padding; + rule->bufsize += padding; + + rules->buf = realloc(rules->buf, rules->bufsize + rule_size); + if (!rules->buf) { +- err("realloc failed"); ++ err("realloc failed\n"); + goto exit; + } +- dbg("adding rule to offset %zi", rules->bufsize); ++ dbg("adding rule to offset %zi\n", rules->bufsize); + memcpy(rules->buf + rules->bufsize, rule, rule_size); + rules->bufsize += rule_size; + exit: + return 0; + + invalid: +- err("invalid rule '%s:%u'", filename, lineno); ++ err("invalid rule '%s:%u'\n", filename, lineno); + return -1; + } + +@@ -666,10 +666,10 @@ static int parse_file(struct udev_rules *rules, const char *filename) + int retval = 0; + + if (file_map(filename, &buf, &bufsize) != 0) { +- err("can't open '%s' as rules file: %s", filename, strerror(errno)); ++ err("can't open '%s' as rules file: %s\n", filename, strerror(errno)); + return -1; + } +- info("reading '%s' as rules file", filename); ++ info("reading '%s' as rules file\n", filename); + + /* loop through the whole file */ + cur = 0; +@@ -695,7 +695,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) + continue; + + if (count >= sizeof(line)) { +- err("line too long, rule skipped '%s:%u'", filename, lineno); ++ err("line too long, rule skipped '%s:%u'\n", filename, lineno); + continue; + } + +@@ -708,7 +708,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) + } + line[j] = '\0'; + +- dbg("read '%s'", line); ++ dbg("read '%s'\n", line); + add_to_rules(rules, line, filename, lineno); + } + +@@ -733,10 +733,10 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) + if (stat(udev_rules_dir, &statbuf) != 0) + return -1; + if ((statbuf.st_mode & S_IFMT) != S_IFDIR) { +- dbg("parse single rules file '%s'", udev_rules_dir); ++ dbg("parse single rules file '%s'\n", udev_rules_dir); + name_list_add(&name_list, udev_rules_dir, 1); + } else { +- dbg("parse rules directory '%s'", udev_rules_dir); ++ dbg("parse rules directory '%s'\n", udev_rules_dir); + retval = add_matching_files(&name_list, udev_rules_dir, RULESFILE_SUFFIX); + } + +@@ -776,9 +776,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) + if (statbuf.st_size) + parse_file(rules, name_loop->name); + else +- dbg("empty rules file '%s'", name_loop->name); ++ dbg("empty rules file '%s'\n", name_loop->name); + } else +- err("could not read '%s': %s", name_loop->name, strerror(errno)); ++ err("could not read '%s': %s\n", name_loop->name, strerror(errno)); + list_del(&name_loop->node); + free(name_loop); + } +diff --git a/udev_selinux.c b/udev_selinux.c +index 3fa84a0..eec9501 100644 +--- a/udev_selinux.c ++++ b/udev_selinux.c +@@ -40,7 +40,7 @@ static int is_selinux_running(void) + if (selinux_enabled == -1) + selinux_enabled = (is_selinux_enabled() > 0); + +- dbg("selinux=%i", selinux_enabled); ++ dbg("selinux=%i\n", selinux_enabled); + return selinux_enabled; + } + +@@ -75,7 +75,7 @@ static char *get_media(const char *devname, int mode) + } + + media = strdup(mediabuf); +- info("selinux_get_media(%s)='%s'", devname, media); ++ info("selinux_get_media(%s)='%s'\n", devname, media); + + close_out: + fclose(fp); +@@ -100,12 +100,12 @@ void selinux_setfilecon(const char *file, const char *devname, unsigned int mode + + if (ret < 0) + if (matchpathcon(file, mode, &scontext) < 0) { +- err("matchpathcon(%s) failed", file); ++ err("matchpathcon(%s) failed\n", file); + return; + } + + if (lsetfilecon(file, scontext) < 0) +- err("setfilecon %s failed: %s", file, strerror(errno)); ++ err("setfilecon %s failed: %s\n", file, strerror(errno)); + + freecon(scontext); + } +@@ -128,12 +128,12 @@ void selinux_setfscreatecon(const char *file, const char *devname, unsigned int + + if (ret < 0) + if (matchpathcon(file, mode, &scontext) < 0) { +- err("matchpathcon(%s) failed", file); ++ err("matchpathcon(%s) failed\n", file); + return; + } + + if (setfscreatecon(scontext) < 0) +- err("setfscreatecon %s failed: %s", file, strerror(errno)); ++ err("setfscreatecon %s failed: %s\n", file, strerror(errno)); + + freecon(scontext); + } +@@ -143,7 +143,7 @@ void selinux_resetfscreatecon(void) + { + if (is_selinux_running()) { + if (setfscreatecon(prev_scontext) < 0) +- err("setfscreatecon failed: %s", strerror(errno)); ++ err("setfscreatecon failed: %s\n", strerror(errno)); + } + } + +@@ -155,10 +155,10 @@ void selinux_init(void) + */ + if (is_selinux_running()) { + if (!udev_root[0]) +- err("selinux_init: udev_root not set"); ++ err("selinux_init: udev_root not set\n"); + matchpathcon_init_prefix(NULL, udev_root); + if (getfscreatecon(&prev_scontext) < 0) { +- err("getfscreatecon failed"); ++ err("getfscreatecon failed\n"); + prev_scontext = NULL; + } + } +diff --git a/udev_sysfs.c b/udev_sysfs.c +index 9293305..c4cd4ab 100644 +--- a/udev_sysfs.c ++++ b/udev_sysfs.c +@@ -52,7 +52,7 @@ int sysfs_init(void) + remove_trailing_chars(sysfs_path, '/'); + } else + strlcpy(sysfs_path, "/sys", sizeof(sysfs_path)); +- dbg("sysfs_path='%s'", sysfs_path); ++ dbg("sysfs_path='%s'\n", sysfs_path); + + INIT_LIST_HEAD(&dev_list); + INIT_LIST_HEAD(&attr_list); +@@ -93,7 +93,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, + if (pos == NULL) + return; + strlcpy(dev->kernel, &pos[1], sizeof(dev->kernel)); +- dbg("kernel='%s'", dev->kernel); ++ dbg("kernel='%s'\n", dev->kernel); + + /* some devices have '!' in their name, change that to '/' */ + pos = dev->kernel; +@@ -108,7 +108,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, + while (isdigit(pos[-1])) + pos--; + strlcpy(dev->kernel_number, pos, sizeof(dev->kernel_number)); +- dbg("kernel_number='%s'", dev->kernel_number); ++ dbg("kernel_number='%s'\n", dev->kernel_number); + } + + int sysfs_resolve_link(char *devpath, size_t size) +@@ -125,11 +125,11 @@ int sysfs_resolve_link(char *devpath, size_t size) + if (len <= 0) + return -1; + link_target[len] = '\0'; +- dbg("path link '%s' points to '%s'", devpath, link_target); ++ dbg("path link '%s' points to '%s'\n", devpath, link_target); + + for (back = 0; strncmp(&link_target[back * 3], "../", 3) == 0; back++) + ; +- dbg("base '%s', tail '%s', back %i", devpath, &link_target[back * 3], back); ++ dbg("base '%s', tail '%s', back %i\n", devpath, &link_target[back * 3], back); + for (i = 0; i <= back; i++) { + char *pos = strrchr(devpath, '/'); + +@@ -137,7 +137,7 @@ int sysfs_resolve_link(char *devpath, size_t size) + return -1; + pos[0] = '\0'; + } +- dbg("after moving back '%s'", devpath); ++ dbg("after moving back '%s'\n", devpath); + strlcat(devpath, "/", size); + strlcat(devpath, &link_target[back * 3], size); + return 0; +@@ -165,7 +165,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + strncmp(devpath, "/block/", 7) != 0) + return NULL; + +- dbg("open '%s'", devpath); ++ dbg("open '%s'\n", devpath); + strlcpy(devpath_real, devpath, sizeof(devpath_real)); + remove_trailing_chars(devpath_real, '/'); + if (devpath[0] == '\0' ) +@@ -174,7 +174,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + /* look for device already in cache (we never put an untranslated path in the cache) */ + list_for_each_entry(dev_loop, &dev_list, node) { + if (strcmp(dev_loop->devpath, devpath_real) == 0) { +- dbg("found in cache '%s'", dev_loop->devpath); ++ dbg("found in cache '%s'\n", dev_loop->devpath); + return dev_loop; + } + } +@@ -183,7 +183,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + strlcpy(path, sysfs_path, sizeof(path)); + strlcat(path, devpath_real, sizeof(path)); + if (lstat(path, &statbuf) != 0) { +- dbg("stat '%s' failed: %s", path, strerror(errno)); ++ dbg("stat '%s' failed: %s\n", path, strerror(errno)); + return NULL; + } + if (S_ISLNK(statbuf.st_mode)) { +@@ -193,14 +193,14 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + /* now look for device in cache after path translation */ + list_for_each_entry(dev_loop, &dev_list, node) { + if (strcmp(dev_loop->devpath, devpath_real) == 0) { +- dbg("found in cache '%s'", dev_loop->devpath); ++ dbg("found in cache '%s'\n", dev_loop->devpath); + return dev_loop; + } + } + } + + /* it is a new device */ +- dbg("new uncached device '%s'", devpath_real); ++ dbg("new uncached device '%s'\n", devpath_real); + dev = malloc(sizeof(struct sysfs_device)); + if (dev == NULL) + return NULL; +@@ -216,7 +216,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + if (len > 0) { + /* get subsystem from "subsystem" link */ + link_target[len] = '\0'; +- dbg("subsystem link '%s' points to '%s'", link_path, link_target); ++ dbg("subsystem link '%s' points to '%s'\n", link_path, link_target); + pos = strrchr(link_target, '/'); + if (pos != NULL) + strlcpy(dev->subsystem, &pos[1], sizeof(dev->subsystem)); +@@ -245,13 +245,13 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + len = readlink(link_path, link_target, sizeof(link_target)); + if (len > 0) { + link_target[len] = '\0'; +- dbg("driver link '%s' points to '%s'", link_path, link_target); ++ dbg("driver link '%s' points to '%s'\n", link_path, link_target); + pos = strrchr(link_target, '/'); + if (pos != NULL) + strlcpy(dev->driver, &pos[1], sizeof(dev->driver)); + } + +- dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'", dev->devpath, dev->subsystem, dev->driver); ++ dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'\n", dev->devpath, dev->subsystem, dev->driver); + list_add(&dev->node, &dev_list); + + return dev; +@@ -262,14 +262,14 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) + char parent_devpath[PATH_SIZE]; + char *pos; + +- dbg("open '%s'", dev->devpath); ++ dbg("open '%s'\n", dev->devpath); + + /* look if we already know the parent */ + if (dev->parent != NULL) + return dev->parent; + + strlcpy(parent_devpath, dev->devpath, sizeof(parent_devpath)); +- dbg("'%s'", parent_devpath); ++ dbg("'%s'\n", parent_devpath); + + /* strip last element */ + pos = strrchr(parent_devpath, '/'); +@@ -280,12 +280,12 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) + if (strncmp(parent_devpath, "/class", 6) == 0) { + pos = strrchr(parent_devpath, '/'); + if (pos == &parent_devpath[6] || pos == parent_devpath) { +- dbg("/class top level, look for device link"); ++ dbg("/class top level, look for device link\n"); + goto device_link; + } + } + if (strcmp(parent_devpath, "/block") == 0) { +- dbg("/block top level, look for device link"); ++ dbg("/block top level, look for device link\n"); + goto device_link; + } + +@@ -334,7 +334,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + ssize_t size; + size_t sysfs_len; + +- dbg("open '%s'/'%s'", devpath, attr_name); ++ dbg("open '%s'/'%s'\n", 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; +@@ -346,23 +346,23 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + /* look for attribute in cache */ + list_for_each_entry(attr_loop, &attr_list, node) { + if (strcmp(attr_loop->path, path) == 0) { +- dbg("found in cache '%s'", attr_loop->path); ++ dbg("found in cache '%s'\n", attr_loop->path); + return attr_loop->value; + } + } + + /* store attribute in cache (also negatives are kept in cache) */ +- dbg("new uncached attribute '%s'", path_full); ++ dbg("new uncached attribute '%s'\n", path_full); + attr = malloc(sizeof(struct sysfs_attr)); + if (attr == NULL) + return NULL; + memset(attr, 0x00, sizeof(struct sysfs_attr)); + strlcpy(attr->path, path, sizeof(attr->path)); +- dbg("add to cache '%s'", path_full); ++ dbg("add to cache '%s'\n", path_full); + list_add(&attr->node, &attr_list); + + if (lstat(path_full, &statbuf) != 0) { +- dbg("stat '%s' failed: %s", path_full, strerror(errno)); ++ dbg("stat '%s' failed: %s\n", path_full, strerror(errno)); + goto out; + } + +@@ -377,7 +377,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + link_target[len] = '\0'; + pos = strrchr(link_target, '/'); + if (pos != NULL) { +- dbg("cache '%s' with link value '%s'", path_full, value); ++ dbg("cache '%s' with link value '%s'\n", path_full, value); + strlcpy(attr->value_local, &pos[1], sizeof(attr->value_local)); + attr->value = attr->value_local; + } +@@ -396,7 +396,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' can not be opened", path_full); ++ dbg("attribute '%s' can not be opened\n", path_full); + goto out; + } + size = read(fd, value, sizeof(value)); +@@ -409,7 +409,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + /* got a valid value, store and return it */ + value[size] = '\0'; + remove_trailing_chars(value, '\n'); +- dbg("cache '%s' with attribute value '%s'", path_full, value); ++ dbg("cache '%s' with attribute value '%s'\n", path_full, value); + strlcpy(attr->value_local, value, sizeof(attr->value_local)); + attr->value = attr->value_local; + +diff --git a/udev_utils.c b/udev_utils.c +index e1630b6..00b67da 100644 +--- a/udev_utils.c ++++ b/udev_utils.c +@@ -62,7 +62,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, + /* avoid duplicate entries */ + list_for_each_entry(name_loop, name_list, node) { + if (strcmp(name_loop->name, name) == 0) { +- dbg("'%s' is already in the list", name); ++ dbg("'%s' is already in the list\n", name); + return name_loop; + } + } +@@ -78,7 +78,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, + return NULL; + + strlcpy(name_new->name, name, sizeof(name_new->name)); +- dbg("adding '%s'", name_new->name); ++ dbg("adding '%s'\n", name_new->name); + list_add_tail(&name_new->node, &name_loop->node); + + return name_new; +@@ -91,7 +91,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke + + list_for_each_entry(name_loop, name_list, node) { + if (strncmp(name_loop->name, key, strlen(key)) == 0) { +- dbg("key already present '%s', replace it", name_loop->name); ++ dbg("key already present '%s', replace it\n", name_loop->name); + snprintf(name_loop->name, sizeof(name_loop->name), "%s=%s", key, value); + name_loop->name[sizeof(name_loop->name)-1] = '\0'; + return name_loop; +@@ -104,7 +104,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke + + snprintf(name_new->name, sizeof(name_new->name), "%s=%s", key, value); + name_new->name[sizeof(name_new->name)-1] = '\0'; +- dbg("adding '%s'", name_new->name); ++ dbg("adding '%s'\n", name_new->name); + list_add_tail(&name_new->node, &name_loop->node); + + return name_new; +@@ -148,10 +148,10 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c + DIR *dir; + char filename[PATH_SIZE]; + +- dbg("open directory '%s'", dirname); ++ dbg("open directory '%s'\n", dirname); + dir = opendir(dirname); + if (dir == NULL) { +- err("unable to open '%s': %s", dirname, strerror(errno)); ++ err("unable to open '%s': %s\n", dirname, strerror(errno)); + return -1; + } + +@@ -173,7 +173,7 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c + if (strcmp(ext, suffix) != 0) + continue; + } +- dbg("put file '%s/%s' into list", dirname, ent->d_name); ++ dbg("put file '%s/%s' into list\n", dirname, ent->d_name); + + snprintf(filename, sizeof(filename), "%s/%s", dirname, ent->d_name); + filename[sizeof(filename)-1] = '\0'; +@@ -193,9 +193,9 @@ uid_t lookup_user(const char *user) + pw = getpwnam(user); + if (pw == NULL) { + if (errno == 0 || errno == ENOENT || errno == ESRCH) +- err("specified user '%s' unknown", user); ++ err("specified user '%s' unknown\n", user); + else +- err("error resolving user '%s': %s", user, strerror(errno)); ++ err("error resolving user '%s': %s\n", user, strerror(errno)); + } else + uid = pw->pw_uid; + +@@ -211,9 +211,9 @@ extern gid_t lookup_group(const char *group) + gr = getgrnam(group); + if (gr == NULL) { + if (errno == 0 || errno == ENOENT || errno == ESRCH) +- err("specified group '%s' unknown", group); ++ err("specified group '%s' unknown\n", group); + else +- err("error resolving group '%s': %s", group, strerror(errno)); ++ err("error resolving group '%s': %s\n", group, strerror(errno)); + } else + gid = gr->gr_gid; + +diff --git a/udev_utils_file.c b/udev_utils_file.c +index 19668b9..a492785 100644 +--- a/udev_utils_file.c ++++ b/udev_utils_file.c +@@ -47,14 +47,14 @@ int create_path(const char *path) + pos--; + pos[0] = '\0'; + +- dbg("stat '%s'", p); ++ dbg("stat '%s'\n", p); + if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) + return 0; + + if (create_path(p) != 0) + return -1; + +- dbg("mkdir '%s'", p); ++ dbg("mkdir '%s'\n", p); + selinux_setfscreatecon(p, NULL, S_IFDIR|0755); + ret = mkdir(p, 0755); + selinux_resetfscreatecon(); +@@ -93,10 +93,10 @@ int delete_path(const char *path) + if (retval) { + if (errno == ENOTEMPTY) + return 0; +- err("rmdir(%s) failed: %s", p, strerror(errno)); ++ err("rmdir(%s) failed: %s\n", p, strerror(errno)); + break; + } +- dbg("removed '%s'", p); ++ dbg("removed '%s'\n", p); + } + return 0; + } +@@ -110,18 +110,18 @@ int unlink_secure(const char *filename) + + retval = chown(filename, 0, 0); + if (retval) +- err("chown(%s, 0, 0) failed: %s", filename, strerror(errno)); ++ err("chown(%s, 0, 0) failed: %s\n", filename, strerror(errno)); + + retval = chmod(filename, 0000); + if (retval) +- err("chmod(%s, 0000) failed: %s", filename, strerror(errno)); ++ err("chmod(%s, 0000) failed: %s\n", filename, strerror(errno)); + + retval = unlink(filename); + if (errno == ENOENT) + retval = 0; + + if (retval) +- err("unlink(%s) failed: %s", filename, strerror(errno)); ++ err("unlink(%s) failed: %s\n", filename, strerror(errno)); + + return retval; + } +diff --git a/udevadm.c b/udevadm.c +index e2b7779..6e7d773 100644 +--- a/udevadm.c ++++ b/udevadm.c +@@ -26,7 +26,7 @@ + + #include "udev.h" + +-static int verbose; ++static int debug; + + #ifdef USE_LOG + void log_message(int priority, const char *format, ...) +@@ -37,9 +37,8 @@ void log_message(int priority, const char *format, ...) + return; + + va_start(args, format); +- if (verbose) { ++ if (debug) { + vprintf(format, args); +- printf("\n"); + } else + vsyslog(priority, format, args); + va_end(args); +@@ -50,7 +49,7 @@ struct command { + const char *name; + int (*cmd)(int argc, char *argv[], char *envp[]); + const char *help; +- int verbose; ++ int debug; + }; + + static const struct command cmds[]; +@@ -102,7 +101,7 @@ static const struct command cmds[] = { + .name = "test", + .cmd = udevtest, + .help = "simulation run", +- .verbose = 1, ++ .debug = 1, + }, + { + .name = "version", +@@ -155,7 +154,7 @@ int main(int argc, char *argv[], char *envp[]) + /* find and execute command */ + for (cmd = cmds; cmd->name != NULL; cmd++) { + if (strcmp(cmd->name, command) == 0) { +- verbose = cmd->verbose; ++ debug = cmd->debug; + rc = cmd->cmd(argc, argv, envp); + goto out; + } +diff --git a/udevcontrol.c b/udevcontrol.c +index f6b5dd9..287e8aa 100644 +--- a/udevcontrol.c ++++ b/udevcontrol.c +@@ -50,7 +50,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + udev_log = log_priority(env); + + logging_init("udevcontrol"); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + + if (argc < 2) { + fprintf(stderr, "missing command\n\n"); +@@ -75,7 +75,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + val = &arg[strlen("log_priority=")]; + ctrl_msg.type = UDEVD_CTRL_SET_LOG_LEVEL; + *intval = log_priority(val); +- info("send log_priority=%i", *intval); ++ info("send log_priority=%i\n", *intval); + } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) { + char *endp; + int count; +@@ -89,7 +89,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + goto exit; + } + *intval = count; +- info("send max_childs=%i", *intval); ++ info("send max_childs=%i\n", *intval); + } else if (!strncmp(arg, "max_childs_running=", strlen("max_childs_running="))) { + char *endp; + int count; +@@ -103,7 +103,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + goto exit; + } + *intval = count; +- info("send max_childs_running=%i", *intval); ++ info("send max_childs_running=%i\n", *intval); + } else if (!strncmp(arg, "env", strlen("env"))) { + val = argv[2]; + if (val == NULL) { +@@ -112,7 +112,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + } + ctrl_msg.type = UDEVD_CTRL_ENV; + strlcpy(ctrl_msg.buf, val, sizeof(ctrl_msg.buf)); +- info("send env '%s'", val); ++ info("send env '%s'\n", val); + } else if (strcmp(arg, "help") == 0 || strcmp(arg, "-h") == 0) { + printf("Usage: udevadm control COMMAND\n" + " --log_priority= set the udev log level for the daemon\n" +@@ -136,7 +136,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + if (sock == -1) { +- err("error getting socket: %s", strerror(errno)); ++ err("error getting socket: %s\n", strerror(errno)); + goto exit; + } + +@@ -148,10 +148,10 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + + retval = sendto(sock, &ctrl_msg, sizeof(ctrl_msg), 0, (struct sockaddr *)&saddr, addrlen); + if (retval == -1) { +- err("error sending message: %s", strerror(errno)); ++ err("error sending message: %s\n", strerror(errno)); + retval = 1; + } else { +- dbg("sent message type=0x%02x, %u bytes sent", ctrl_msg.type, retval); ++ dbg("sent message type=0x%02x, %u bytes sent\n", ctrl_msg.type, retval); + retval = 0; + } + +diff --git a/udevd.8 b/udevd.8 +index 1323313..210ed3f 100644 +--- a/udevd.8 ++++ b/udevd.8 +@@ -14,7 +14,7 @@ + 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] ++\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] + .SH "DESCRIPTION" + .PP + udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the correct event order and takes care, that events for child devices are delayed until the parent event has finished the device handling\. The behavior of the running daemon can be changed with +@@ -31,7 +31,7 @@ Detach and run in the background\. + 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 ++\fB\-\-debug\fR + .RS 4 + Print log messages to stdout\. + .RE +diff --git a/udevd.c b/udevd.c +index 7786ae6..66a410e 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -46,7 +46,7 @@ + #include "udev_selinux.h" + + static int debug_trace; +-static int verbose; ++static int debug; + + static struct udev_rules rules; + static int udevd_sock = -1; +@@ -77,10 +77,9 @@ void log_message(int priority, const char *format, ...) + return; + + va_start(args, format); +- if (verbose) { ++ if (debug) { + printf("[%d] ", (int) getpid()); + vprintf(format, args); +- printf("\n"); + } else + vsyslog(priority, format, args); + va_end(args); +@@ -184,7 +183,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + 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'", ++ info("renamed devpath, moved failed state of '%s' to %s'\n", + msg->devpath_old, msg->devpath); + } else { + unlink(filename_failed); +@@ -241,19 +240,19 @@ static void udev_event_run(struct udevd_uevent_msg *msg) + setpriority(PRIO_PROCESS, 0, UDEV_PRIORITY); + + retval = udev_event_process(msg); +- info("seq %llu finished with %i", msg->seqnum, retval); ++ info("seq %llu finished with %i\n", msg->seqnum, retval); + + logging_close(); + if (retval) + exit(1); + exit(0); + case -1: +- err("fork of child failed: %s", strerror(errno)); ++ err("fork of child failed: %s\n", strerror(errno)); + msg_queue_delete(msg); + break; + default: + /* get SIGCHLD in main loop */ +- info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old", ++ info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old\n", + msg->seqnum, pid, msg->action, msg->subsystem, time(NULL) - msg->queue_time); + msg->pid = pid; + } +@@ -279,7 +278,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) + } + + export_event_state(msg, EVENT_QUEUED); +- info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); ++ info("seq %llu queued, '%s' '%s'\n", msg->seqnum, msg->action, msg->subsystem); + + /* run one event after the other in debug mode */ + if (debug_trace) { +@@ -476,7 +475,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + + /* check identical, parent, or child device event */ + if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { +- dbg("%llu, device event still pending %llu (%s)", ++ dbg("%llu, device event still pending %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 3; + } +@@ -484,7 +483,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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, ++ dbg("%llu, device event still pending %llu (%d:%d)\n", msg->seqnum, + loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); + return 4; + } +@@ -492,7 +491,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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)", ++ dbg("%llu, physical device event still pending %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 5; + } +@@ -501,7 +500,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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); ++ dbg("%llu, maximum number (%i) of childs reached\n", msg->seqnum, childs_count); + return 1; + } + +@@ -512,7 +511,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + + /* check identical, parent, or child device event */ + if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { +- dbg("%llu, device event still running %llu (%s)", ++ dbg("%llu, device event still running %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 3; + } +@@ -520,7 +519,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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, ++ dbg("%llu, device event still running %llu (%d:%d)\n", msg->seqnum, + loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); + return 4; + } +@@ -528,7 +527,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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)", ++ dbg("%llu, physical device event still running %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 5; + } +@@ -547,7 +546,7 @@ static void msg_queue_manager(void) + return; + + running = running_processes(); +- dbg("%d processes runnning on system", running); ++ dbg("%d processes runnning on system\n", running); + if (running < 0) + running = max_childs_running; + +@@ -555,16 +554,16 @@ static void msg_queue_manager(void) + /* check running processes in our session and possibly throttle */ + if (running >= max_childs_running) { + running = running_processes_in_session(sid, max_childs_running+10); +- dbg("at least %d processes running in session", running); ++ dbg("at least %d processes running in session\n", running); + if (running >= max_childs_running) { +- dbg("delay seq %llu, too many processes already running", loop_msg->seqnum); ++ dbg("delay seq %llu, too many processes already running\n", loop_msg->seqnum); + return; + } + } + + /* serialize and wait for parent or child events */ + if (devpath_busy(loop_msg, max_childs) != 0) { +- dbg("delay seq %llu (%s)", loop_msg->seqnum, loop_msg->devpath); ++ dbg("delay seq %llu (%s)\n", loop_msg->seqnum, loop_msg->devpath); + continue; + } + +@@ -572,7 +571,7 @@ static void msg_queue_manager(void) + list_move_tail(&loop_msg->node, &running_list); + udev_event_run(loop_msg); + running++; +- dbg("moved seq %llu to running list", loop_msg->seqnum); ++ dbg("moved seq %llu to running list\n", loop_msg->seqnum); + } + } + +@@ -601,7 +600,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz + keylen = strlen(key); + msg->envp[i] = key; + bufpos += keylen + 1; +- dbg("add '%s' to msg.envp[%i]", msg->envp[i], i); ++ dbg("add '%s' to msg.envp[%i]\n", msg->envp[i], i); + + /* remember some keys for further processing */ + if (strncmp(key, "ACTION=", 7) == 0) +@@ -639,7 +638,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz + msg->envp[i] = NULL; + + if (msg->devpath == NULL || msg->action == NULL) { +- info("DEVPATH or ACTION missing, ignore message"); ++ info("DEVPATH or ACTION missing, ignore message\n"); + free(msg); + return NULL; + } +@@ -672,24 +671,24 @@ static void get_ctrl_msg(void) + size = recvmsg(udevd_sock, &smsg, 0); + if (size < 0) { + if (errno != EINTR) +- err("unable to receive user udevd message: %s", strerror(errno)); ++ err("unable to receive user udevd message: %s\n", strerror(errno)); + return; + } + cmsg = CMSG_FIRSTHDR(&smsg); + cred = (struct ucred *) CMSG_DATA(cmsg); + + if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { +- err("no sender credentials received, message ignored"); ++ err("no sender credentials received, message ignored\n"); + return; + } + + if (cred->uid != 0) { +- err("sender uid=%i, message ignored", cred->uid); ++ err("sender uid=%i, message ignored\n", cred->uid); + return; + } + + if (strncmp(ctrl_msg.magic, UDEVD_CTRL_MAGIC, sizeof(UDEVD_CTRL_MAGIC)) != 0 ) { +- err("message magic '%s' doesn't match, ignore it", ctrl_msg.magic); ++ err("message magic '%s' doesn't match, ignore it\n", ctrl_msg.magic); + return; + } + +@@ -697,50 +696,50 @@ static void get_ctrl_msg(void) + case UDEVD_CTRL_ENV: + pos = strchr(ctrl_msg.buf, '='); + if (pos == NULL) { +- err("wrong key format '%s'", ctrl_msg.buf); ++ err("wrong key format '%s'\n", ctrl_msg.buf); + break; + } + pos[0] = '\0'; + if (pos[1] == '\0') { +- info("udevd message (ENV) received, unset '%s'", ctrl_msg.buf); ++ info("udevd message (ENV) received, unset '%s'\n", ctrl_msg.buf); + unsetenv(ctrl_msg.buf); + } else { +- info("udevd message (ENV) received, set '%s=%s'", ctrl_msg.buf, &pos[1]); ++ info("udevd message (ENV) received, set '%s=%s'\n", 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"); ++ info("udevd message (STOP_EXEC_QUEUE) received\n"); + stop_exec_q = 1; + break; + case UDEVD_CTRL_START_EXEC_QUEUE: +- info("udevd message (START_EXEC_QUEUE) received"); ++ info("udevd message (START_EXEC_QUEUE) received\n"); + stop_exec_q = 0; + msg_queue_manager(); + break; + case UDEVD_CTRL_SET_LOG_LEVEL: + intval = (int *) ctrl_msg.buf; +- info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i", *intval); ++ info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i\n", *intval); + udev_log_priority = *intval; + sprintf(udev_log, "UDEV_LOG=%i", udev_log_priority); + putenv(udev_log); + break; + case UDEVD_CTRL_SET_MAX_CHILDS: + intval = (int *) ctrl_msg.buf; +- info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i", *intval); ++ info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i\n", *intval); + max_childs = *intval; + break; + case UDEVD_CTRL_SET_MAX_CHILDS_RUNNING: + intval = (int *) ctrl_msg.buf; +- info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i", *intval); ++ info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i\n", *intval); + max_childs_running = *intval; + break; + case UDEVD_CTRL_RELOAD_RULES: +- info("udevd message (RELOAD_RULES) received"); ++ info("udevd message (RELOAD_RULES) received\n"); + reload_config = 1; + break; + default: +- err("unknown control message type"); ++ err("unknown control message type\n"); + } + } + +@@ -756,14 +755,14 @@ static struct udevd_uevent_msg *get_netlink_msg(void) + size = recv(uevent_netlink_sock, &buffer, sizeof(buffer), 0); + if (size < 0) { + if (errno != EINTR) +- err("unable to receive kernel netlink message: %s", strerror(errno)); ++ err("unable to receive kernel netlink message: %s\n", strerror(errno)); + return NULL; + } + + if ((size_t)size > sizeof(buffer)-1) + size = sizeof(buffer)-1; + buffer[size] = '\0'; +- dbg("uevent_size=%zi", size); ++ dbg("uevent_size=%zi\n", size); + + /* start of event payload */ + bufpos = strlen(buffer)+1; +@@ -774,20 +773,20 @@ static struct udevd_uevent_msg *get_netlink_msg(void) + /* validate message */ + pos = strchr(buffer, '@'); + if (pos == NULL) { +- err("invalid uevent '%s'", buffer); ++ err("invalid uevent '%s'\n", buffer); + free(msg); + return NULL; + } + pos[0] = '\0'; + + if (msg->action == NULL) { +- info("no ACTION in payload found, skip event '%s'", buffer); ++ info("no ACTION in payload found, skip event '%s'\n", buffer); + free(msg); + return NULL; + } + + if (strcmp(msg->action, buffer) != 0) { +- err("ACTION in payload does not match uevent, skip event '%s'", buffer); ++ err("ACTION in payload does not match uevent, skip event '%s'\n", buffer); + free(msg); + return NULL; + } +@@ -822,7 +821,7 @@ static void udev_done(int pid, int exitstatus) + + list_for_each_entry(msg, &running_list, node) { + if (msg->pid == pid) { +- info("seq %llu, pid [%d] exit with %i, %ld seconds old", msg->seqnum, msg->pid, ++ info("seq %llu, pid [%d] exit with %i, %ld seconds old\n", msg->seqnum, msg->pid, + exitstatus, time(NULL) - msg->queue_time); + msg->exitstatus = exitstatus; + msg_queue_delete(msg); +@@ -868,14 +867,14 @@ static int init_udevd_socket(void) + + udevd_sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + if (udevd_sock == -1) { +- err("error getting socket: %s", strerror(errno)); ++ err("error getting socket: %s\n", strerror(errno)); + return -1; + } + + /* the bind takes care of ensuring only one copy running */ + retval = bind(udevd_sock, (struct sockaddr *) &saddr, addrlen); + if (retval < 0) { +- err("bind failed: %s", strerror(errno)); ++ err("bind failed: %s\n", strerror(errno)); + close(udevd_sock); + udevd_sock = -1; + return -1; +@@ -900,7 +899,7 @@ static int init_uevent_netlink_sock(void) + + uevent_netlink_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); + if (uevent_netlink_sock == -1) { +- err("error getting socket: %s", strerror(errno)); ++ err("error getting socket: %s\n", strerror(errno)); + return -1; + } + +@@ -909,7 +908,7 @@ static int init_uevent_netlink_sock(void) + + retval = bind(uevent_netlink_sock, (struct sockaddr *) &snl, sizeof(struct sockaddr_nl)); + if (retval < 0) { +- err("bind failed: %s", strerror(errno)); ++ err("bind failed: %s\n", strerror(errno)); + close(uevent_netlink_sock); + uevent_netlink_sock = -1; + return -1; +@@ -957,7 +956,7 @@ int main(int argc, char *argv[], char *envp[]) + static const struct option options[] = { + { "daemon", 0, NULL, 'd' }, + { "debug-trace", 0, NULL, 't' }, +- { "verbose", 0, NULL, 'v' }, ++ { "debug", 0, NULL, 'D' }, + { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'V' }, + {} +@@ -968,10 +967,10 @@ int main(int argc, char *argv[], char *envp[]) + logging_init("udevd"); + udev_config_init(); + selinux_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + + while (1) { +- option = getopt_long(argc, argv, "dtvhV", options, NULL); ++ option = getopt_long(argc, argv, "dDthV", options, NULL); + if (option == -1) + break; + +@@ -982,13 +981,13 @@ int main(int argc, char *argv[], char *envp[]) + case 't': + debug_trace = 1; + break; +- case 'v': +- verbose = 1; ++ case 'D': ++ debug = 1; + if (udev_log_priority < LOG_INFO) + udev_log_priority = LOG_INFO; + break; + case 'h': +- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n"); ++ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--version]\n"); + goto exit; + case 'V': + printf("%s\n", UDEV_VERSION); +@@ -1000,7 +999,7 @@ int main(int argc, char *argv[], char *envp[]) + + if (getuid() != 0) { + fprintf(stderr, "root privileges required\n"); +- err("root privileges required"); ++ err("root privileges required\n"); + goto exit; + } + +@@ -1008,7 +1007,7 @@ int main(int argc, char *argv[], char *envp[]) + fd = open("/dev/null", O_RDWR); + if (fd < 0) { + fprintf(stderr, "cannot open /dev/null\n"); +- err("cannot open /dev/null"); ++ err("cannot open /dev/null\n"); + } + if (fd > STDIN_FILENO) + dup2(fd, STDIN_FILENO); +@@ -1021,11 +1020,11 @@ int main(int argc, char *argv[], char *envp[]) + if (init_udevd_socket() < 0) { + if (errno == EADDRINUSE) { + fprintf(stderr, "another udev daemon already running\n"); +- err("another udev daemon already running"); ++ err("another udev daemon already running\n"); + rc = 1; + } else { + fprintf(stderr, "error initializing udevd socket\n"); +- err("error initializing udevd socket"); ++ err("error initializing udevd socket\n"); + rc = 2; + } + goto exit; +@@ -1033,7 +1032,7 @@ int main(int argc, char *argv[], char *envp[]) + + if (init_uevent_netlink_sock() < 0) { + fprintf(stderr, "error initializing netlink socket\n"); +- err("error initializing netlink socket"); ++ err("error initializing netlink socket\n"); + rc = 3; + goto exit; + } +@@ -1041,29 +1040,29 @@ int main(int argc, char *argv[], char *envp[]) + /* setup signal handler pipe */ + retval = pipe(signal_pipe); + if (retval < 0) { +- err("error getting pipes: %s", strerror(errno)); ++ err("error getting pipes: %s\n", strerror(errno)); + goto exit; + } + + retval = fcntl(signal_pipe[READ_END], F_GETFL, 0); + if (retval < 0) { +- err("error fcntl on read pipe: %s", strerror(errno)); ++ err("error fcntl on read pipe: %s\n", strerror(errno)); + goto exit; + } + retval = fcntl(signal_pipe[READ_END], F_SETFL, retval | O_NONBLOCK); + if (retval < 0) { +- err("error fcntl on read pipe: %s", strerror(errno)); ++ err("error fcntl on read pipe: %s\n", strerror(errno)); + goto exit; + } + + retval = fcntl(signal_pipe[WRITE_END], F_GETFL, 0); + if (retval < 0) { +- err("error fcntl on write pipe: %s", strerror(errno)); ++ err("error fcntl on write pipe: %s\n", strerror(errno)); + goto exit; + } + retval = fcntl(signal_pipe[WRITE_END], F_SETFL, retval | O_NONBLOCK); + if (retval < 0) { +- err("error fcntl on write pipe: %s", strerror(errno)); ++ err("error fcntl on write pipe: %s\n", strerror(errno)); + goto exit; + } + +@@ -1079,21 +1078,21 @@ int main(int argc, char *argv[], char *envp[]) + pid = fork(); + switch (pid) { + case 0: +- dbg("daemonized fork running"); ++ dbg("daemonized fork running\n"); + break; + case -1: +- err("fork of daemon failed: %s", strerror(errno)); ++ err("fork of daemon failed: %s\n", strerror(errno)); + rc = 4; + goto exit; + default: +- dbg("child [%u] running, parent exits", pid); ++ dbg("child [%u] running, parent exits\n", pid); + rc = 0; + goto exit; + } + } + + /* redirect std{out,err} fd's */ +- if (!verbose) ++ if (!debug) + dup2(fd, STDOUT_FILENO); + dup2(fd, STDERR_FILENO); + if (fd > STDERR_FILENO) +@@ -1107,12 +1106,12 @@ int main(int argc, char *argv[], char *envp[]) + + /* become session leader */ + sid = setsid(); +- dbg("our session is %d", sid); ++ dbg("our session is %d\n", sid); + + /* OOM_DISABLE == -17 */ + fd = open("/proc/self/oom_adj", O_RDWR); + if (fd < 0) +- err("error disabling OOM: %s", strerror(errno)); ++ err("error disabling OOM: %s\n", strerror(errno)); + else { + write(fd, "-17", 3); + close(fd); +@@ -1148,9 +1147,9 @@ int main(int argc, char *argv[], char *envp[]) + strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); + inotify_add_watch(inotify_fd, filename, IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); + } else if (errno == ENOSYS) +- err("the kernel does not support inotify, udevd can't monitor rules file changes"); ++ err("the kernel does not support inotify, udevd can't monitor rules file changes\n"); + else +- err("inotify_init failed: %s", strerror(errno)); ++ err("inotify_init failed: %s\n", strerror(errno)); + + /* maximum limit of forked childs */ + value = getenv("UDEVD_MAX_CHILDS"); +@@ -1163,7 +1162,7 @@ int main(int argc, char *argv[], char *envp[]) + else + max_childs = UDEVD_MAX_CHILDS; + } +- info("initialize max_childs to %u", max_childs); ++ info("initialize max_childs to %u\n", max_childs); + + /* start to throttle forking if maximum number of _running_ childs is reached */ + value = getenv("UDEVD_MAX_CHILDS_RUNNING"); +@@ -1176,7 +1175,7 @@ int main(int argc, char *argv[], char *envp[]) + else + max_childs_running = UDEVD_MAX_CHILDS_RUNNING; + } +- info("initialize max_childs_running to %u", max_childs_running); ++ info("initialize max_childs_running to %u\n", max_childs_running); + + /* clear environment for forked event processes */ + clearenv(); +@@ -1206,7 +1205,7 @@ int main(int argc, char *argv[], char *envp[]) + fdcount = select(maxfd+1, &readfds, NULL, NULL, NULL); + if (fdcount < 0) { + if (errno != EINTR) +- err("error in select: %s", strerror(errno)); ++ err("error in select: %s\n", strerror(errno)); + continue; + } + +@@ -1239,7 +1238,7 @@ int main(int argc, char *argv[], char *envp[]) + reload_config = 1; + buf = malloc(nbytes); + if (buf == NULL) { +- err("error getting buffer for inotify, disable watching"); ++ err("error getting buffer for inotify, disable watching\n"); + close(inotify_fd); + inotify_fd = -1; + } +diff --git a/udevd.xml b/udevd.xml +index 0b3c017..178af4c 100644 +--- a/udevd.xml ++++ b/udevd.xml +@@ -27,7 +27,7 @@ + udevd + + +- ++ + + + +@@ -59,7 +59,7 @@ + + + +- ++ + + Print log messages to stdout. + +diff --git a/udevinfo.c b/udevinfo.c +index 52d409d..a0d6cac 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -69,7 +69,7 @@ static void print_all_attributes(const char *devpath, const char *key) + 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); ++ dbg("attr '%s'='%s'(%zi)\n", dent->d_name, value, len); + + /* remove trailing newlines */ + while (len && value[len-1] == '\n') +@@ -79,7 +79,7 @@ static void print_all_attributes(const char *devpath, const char *key) + while (len && isprint(value[len-1])) + len--; + if (len) { +- dbg("attribute value of '%s' non-printable, skip", dent->d_name); ++ dbg("attribute value of '%s' non-printable, skip\n", dent->d_name); + continue; + } + +@@ -175,7 +175,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) + if (count <= 0) + goto out; + +- info("found %i devices for '%s'", count, name); ++ info("found %i devices for '%s'\n", count, name); + + /* select the device that seems to match */ + list_for_each_entry(device, &name_list, node) { +@@ -185,7 +185,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) + udev_device_init(udev); + if (udev_db_get_device(udev, device->name) != 0) + continue; +- info("found db entry '%s'", device->name); ++ info("found db entry '%s'\n", device->name); + + /* make sure, we don't get a link of a differnt device */ + strlcpy(filename, udev_root, sizeof(filename)); +@@ -194,7 +194,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) + if (stat(filename, &statbuf) != 0) + continue; + if (major(udev->devt) > 0 && udev->devt != statbuf.st_rdev) { +- info("skip '%s', dev_t doesn't match", udev->name); ++ info("skip '%s', dev_t doesn't match\n", udev->name); + continue; + } + rc = 0; +@@ -272,7 +272,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) + if (option == -1) + break; + +- dbg("option '%c'", option); ++ dbg("option '%c'\n", option); + switch (option) { + case 'n': + /* remove /dev if given */ +@@ -281,7 +281,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) + else + strlcpy(name, optarg, sizeof(name)); + remove_trailing_chars(name, '/'); +- dbg("name: %s", name); ++ dbg("name: %s\n", name); + break; + case 'p': + /* remove /sys if given */ +@@ -310,7 +310,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) + } + } + } +- dbg("path: %s", path); ++ dbg("path: %s\n", path); + break; + case 'q': + action = ACTION_QUERY; +diff --git a/udevsettle.c b/udevsettle.c +index e3982a4..4b66f89 100644 +--- a/udevsettle.c ++++ b/udevsettle.c +@@ -57,7 +57,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) + + logging_init("udevsettle"); + udev_config_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + sysfs_init(); + + while (1) { +@@ -72,7 +72,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) + timeout = seconds; + else + fprintf(stderr, "invalid timeout value\n"); +- dbg("timeout=%i", timeout); ++ dbg("timeout=%i\n", timeout); + break; + case 'h': + printf("Usage: udevadm settle [--help] [--timeout=]\n\n"); +@@ -90,13 +90,13 @@ int udevsettle(int argc, char *argv[], char *envp[]) + struct stat statbuf; + + if (stat(queuename, &statbuf) < 0) { +- info("queue is empty"); ++ info("queue is empty\n"); + break; + } + usleep(1000 * 1000 / LOOP_PER_SECOND); + } + if (loop <= 0) { +- info("timeout waiting for queue"); ++ info("timeout waiting for queue\n"); + goto exit; + } + +@@ -112,7 +112,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) + goto exit; + seqnum[len] = '\0'; + seq_udev = strtoull(seqnum, NULL, 10); +- info("udev seqnum = %llu", seq_udev); ++ info("udev seqnum = %llu\n", seq_udev); + + /* read current kernel seqnum */ + strlcpy(filename, sysfs_path, sizeof(filename)); +@@ -126,16 +126,16 @@ int udevsettle(int argc, char *argv[], char *envp[]) + goto exit; + seqnum[len] = '\0'; + seq_kernel = strtoull(seqnum, NULL, 10); +- info("kernel seqnum = %llu", seq_kernel); ++ info("kernel seqnum = %llu\n", seq_kernel); + + /* make sure all kernel events have arrived in the queue */ + if (seq_udev >= seq_kernel) { +- info("queue is empty and no pending events left"); ++ info("queue is empty and no pending events left\n"); + rc = 0; + goto exit; + } + usleep(1000 * 1000 / LOOP_PER_SECOND); +- info("queue is empty, but events still pending"); ++ info("queue is empty, but events still pending\n"); + } + + exit: +diff --git a/udevtest.c b/udevtest.c +index a36e503..8beba21 100644 +--- a/udevtest.c ++++ b/udevtest.c +@@ -62,7 +62,7 @@ static int import_uevent_var(const char *devpath) + if (next == NULL) + goto out; + next[0] = '\0'; +- info("import into environment: '%s'", key); ++ info("import into environment: '%s'\n", key); + putenv(key); + key = &next[1]; + } +@@ -91,7 +91,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + {} + }; + +- info("version %s", UDEV_VERSION); ++ info("version %s\n", UDEV_VERSION); + udev_config_init(); + if (udev_log_priority < LOG_INFO) { + char priority[32]; +@@ -108,7 +108,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + if (option == -1) + break; + +- dbg("option '%c'", option); ++ dbg("option '%c'\n", option); + switch (option) { + case 'a': + action = optarg; +@@ -181,7 +181,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + setenv("ACTION", udev->action, 1); + import_uevent_var(udev->dev->devpath); + +- info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem); ++ info("looking at device '%s' from subsystem '%s'\n", udev->dev->devpath, udev->dev->subsystem); + retval = udev_device_event(&rules, udev); + if (retval == 0 && !udev->ignore_device && udev_run) { + struct name_entry *name_loop; +@@ -191,7 +191,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + + strlcpy(program, name_loop->name, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); +- info("run: '%s'", program); ++ info("run: '%s'\n", program); + } + } + udev_device_cleanup(udev); +diff --git a/udevtrigger.c b/udevtrigger.c +index e50fd4e..72464c8 100644 +--- a/udevtrigger.c ++++ b/udevtrigger.c +@@ -70,7 +70,7 @@ static int device_list_insert(const char *path) + char devpath[PATH_SIZE]; + struct stat statbuf; + +- dbg("add '%s'" , path); ++ dbg("add '%s'\n" , path); + + /* we only have a device, if we have an uevent file */ + strlcpy(filename, path, sizeof(filename)); +@@ -110,12 +110,12 @@ static void trigger_uevent(const char *devpath, const char *action) + + fd = open(filename, O_WRONLY); + if (fd < 0) { +- dbg("error on opening %s: %s", filename, strerror(errno)); ++ dbg("error on opening %s: %s\n", filename, strerror(errno)); + return; + } + + if (write(fd, action, strlen(action)) < 0) +- info("error writing '%s' to '%s': %s", action, filename, strerror(errno)); ++ info("error writing '%s' to '%s': %s\n", action, filename, strerror(errno)); + + close(fd); + } +@@ -574,7 +574,7 @@ int udevtrigger(int argc, char *argv[], char *envp[]) + + logging_init("udevtrigger"); + udev_config_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + sysfs_init(); + + while (1) { +-- +1.5.4.5 + diff --git a/0012-scsi_id-initialize-serial-strings.patch b/0012-scsi_id-initialize-serial-strings.patch new file mode 100644 index 0000000..6ce9da1 --- /dev/null +++ b/0012-scsi_id-initialize-serial-strings.patch @@ -0,0 +1,27 @@ +From 803ac7a6d8d06787305a01a068c2e0ca47e2536d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Apr 2008 21:08:45 +0200 +Subject: [PATCH] scsi_id: initialize serial strings + +--- + extras/scsi_id/scsi_id.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 463b377..5381087 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -682,8 +682,8 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + struct sysfs_device *dev_scsi = NULL; + int good_dev; + int page_code; +- char serial[MAX_SERIAL_LEN]; +- char serial_short[MAX_SERIAL_LEN]; ++ char serial[MAX_SERIAL_LEN] = ""; ++ char serial_short[MAX_SERIAL_LEN] = ""; + const char *bus_str = NULL; + + dbg("devpath %s\n", devpath); +-- +1.5.4.5 + diff --git a/0013-persistent-device-naming-also-read-unpartitioned-me.patch b/0013-persistent-device-naming-also-read-unpartitioned-me.patch new file mode 100644 index 0000000..0fa12fe --- /dev/null +++ b/0013-persistent-device-naming-also-read-unpartitioned-me.patch @@ -0,0 +1,42 @@ +From 41677cf51fb2c14aa512ecf9410e43eb35560408 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Apr 2008 21:15:00 +0200 +Subject: [PATCH] persistent device naming: also read unpartitioned media + +--- + etc/udev/rules.d/60-persistent-storage.rules | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index a1e0917..85a9270 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -3,6 +3,9 @@ + # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + ++# forward scsi device event to corresponding block device ++ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" ++ + ACTION!="add|change", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + +@@ -47,8 +50,13 @@ 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" + +-# by-label/by-uuid (filesystem properties) +-ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" ++# skip unpartitioned removable media devices from drivers which do not send "change" events ++ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" ++ ++# import filesystem metadata ++IMPORT{program}="vol_id --export $tempnode" ++ ++# by-label/by-uuid links (filesystem metadata) + 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}" + +-- +1.5.4.5 + diff --git a/start_udev b/start_udev index 1d99b3c..d77cb4f 100755 --- a/start_udev +++ b/start_udev @@ -102,6 +102,8 @@ make_extra_nodes () { if [ -x "$MAKEDEV" ]; then + $MAKEDEV -x /dev/null + /sbin/restorecon -R /dev for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things @@ -192,6 +194,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" + /sbin/restorecon /dev mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then diff --git a/udev.spec b/udev.spec index 6bd809c..2eb1ced 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 120 -Release: 3%{?dist} +Release: 5.20080421git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,11 +19,25 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-116-nettype.patch -Patch4: udev-118-sysconf.patch +Patch1: 0001-writing-udev-rules-fix-rule-typos.patch +Patch2: 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch +Patch3: 0003-vol_id-add-offset-option.patch +Patch4: 0004-cdrom_id-replace-with-version-which-also-exports-me.patch +Patch5: 0005-udevd-at-startup-write-message-including-version-nu.patch +Patch6: 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch +Patch7: 0007-selinux-more-context-settings.patch +Patch8: 0008-selinux-fix-missing-includes.patch +Patch9: 0009-allow-setting-of-MODE-0000.patch +Patch10: 0010-path_id-remove-subsystem-whitelist.patch +Patch11: 0011-logging-add-trailing-newline-to-all-strings.patch +Patch12: 0012-scsi_id-initialize-serial-strings.patch +Patch13: 0013-persistent-device-naming-also-read-unpartitioned-me.patch -Patch100: udev-089-nopie.patch -Patch101: udev-091-lib64.patch + +Patch101: udev-116-nettype.patch +Patch102: udev-118-sysconf.patch +Patch103: udev-089-nopie.patch +Patch104: udev-091-lib64.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -74,11 +88,25 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .nettype -%patch4 -p1 -b .sysconf +%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 -%patch100 -p1 -b .nopie -%patch101 -p1 -b .lib64 +%patch101 -p1 -b .nettype +%patch102 -p1 -b .sysconf + +%patch103 -p1 -b .nopie +%patch104 -p1 -b .lib64 %build @@ -394,6 +422,19 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Apr 21 2008 Harald Hoyer 120-4.20080421git +- added patches from git: +- persistent device naming: also read unpartitioned media +- scsi_id: initialize serial strings +- logging: add trailing newline to all strings +- path_id: remove subsystem whitelist +- allow setting of MODE="0000" +- selinux: more context settings +- rules_generator: net rules - always add KERNEL== match to generated rules +- cdrom_id: replace with version which also exports media properties +- vol_id: add --offset option +- udevinfo: do not replace chars when printing ATTR== matches + * Fri Apr 11 2008 Harald Hoyer 120-3 - fixed pre/preun scriptlets (bug #441941) - removed fedora specific patch for selinux symlink handling From 161545341e95e6183f8fe1a3854ab287972f3494 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Apr 2008 15:45:38 +0000 Subject: [PATCH 416/640] - added patches from git: - persistent device naming: also read unpartitioned media - scsi_id: initialize serial strings - logging: add trailing newline to all strings - path_id: remove subsystem whitelist - allow setting of MODE="0000" - selinux: more context settings - rules_generator: net rules - always add KERNEL== match to generated rules - cdrom_id: replace with version which also exports media properties - vol_id: add --offset option - udevinfo: do not replace chars when printing ATTR== matches --- 0001-writing-udev-rules-fix-rule-typos.patch | 51 + ...not-replace-chars-when-printing-ATTR.patch | 24 + 0003-vol_id-add-offset-option.patch | 135 + ...e-with-version-which-also-exports-me.patch | 834 +++ ...p-write-message-including-version-nu.patch | 31 + ...ator-net-rules-always-add-KERNEL-mat.patch | 49 + 0007-selinux-more-context-settings.patch | 88 + 0008-selinux-fix-missing-includes.patch | 63 + 0009-allow-setting-of-MODE-0000.patch | 93 + 0010-path_id-remove-subsystem-whitelist.patch | 54 + ...-add-trailing-newline-to-all-strings.patch | 5323 +++++++++++++++++ 0012-scsi_id-initialize-serial-strings.patch | 27 + ...ce-naming-also-read-unpartitioned-me.patch | 42 + start_udev | 3 + udev.spec | 59 +- 15 files changed, 6867 insertions(+), 9 deletions(-) create mode 100644 0001-writing-udev-rules-fix-rule-typos.patch create mode 100644 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch create mode 100644 0003-vol_id-add-offset-option.patch create mode 100644 0004-cdrom_id-replace-with-version-which-also-exports-me.patch create mode 100644 0005-udevd-at-startup-write-message-including-version-nu.patch create mode 100644 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch create mode 100644 0007-selinux-more-context-settings.patch create mode 100644 0008-selinux-fix-missing-includes.patch create mode 100644 0009-allow-setting-of-MODE-0000.patch create mode 100644 0010-path_id-remove-subsystem-whitelist.patch create mode 100644 0011-logging-add-trailing-newline-to-all-strings.patch create mode 100644 0012-scsi_id-initialize-serial-strings.patch create mode 100644 0013-persistent-device-naming-also-read-unpartitioned-me.patch diff --git a/0001-writing-udev-rules-fix-rule-typos.patch b/0001-writing-udev-rules-fix-rule-typos.patch new file mode 100644 index 0000000..7c8a2a1 --- /dev/null +++ b/0001-writing-udev-rules-fix-rule-typos.patch @@ -0,0 +1,51 @@ +From 8c1711dcd03e84bfec4bb2ee767d0467fd32f6a5 Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Sun, 6 Apr 2008 07:12:20 +0200 +Subject: [PATCH] writing udev rules: fix rule typos + +--- + docs/writing_udev_rules/index.html | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/docs/writing_udev_rules/index.html b/docs/writing_udev_rules/index.html +index 9289137..5fedb3f 100644 +--- a/docs/writing_udev_rules/index.html ++++ b/docs/writing_udev_rules/index.html +@@ -17,7 +17,7 @@ + +

    Writing udev rules

    + by Daniel Drake (dsd)
    +-Version 0.73

    ++Version 0.74

    + + The most recent version of this document can always be found at:
    + +@@ -114,6 +114,7 @@ This document uses various examples (many of which are entirely fictional) to il +

    History

    + +
      ++
    • April 5th 2008 v0.74: Typo fixes.
    • +
    • December 3rd 2007 v0.73: Update for new udev versions, and some miscellaneous improvements.
    • +
    • October 2nd 2006 v0.72: Fixed a typo in one of the example rules.
    • +
    • June 10th 2006 v0.71: Misc changes based on recent feedback - thanks!
    • +@@ -480,7 +481,7 @@ As you can see, udevinfo simply produces a list of attributes you can use as-is + +
      + SUBSYSTEM=="block", ATTR{size}=="234441648", NAME="my_hard_disk"
      +-SUBSYSTEM="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk"
      ++SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk" + +

      + You may have noted the use of colour in the above examples. This is to demonstrate that while it is legal to combine the attributes from the device in question and a single parent device, you cannot mix-and-match attributes from multiple parent devices - your rule will not work. For example, the following rule is invalid as it attempts to match attributes from two parent devices: +@@ -735,7 +736,7 @@ A USB hard disk is comparable to the USB camera I described above, however typic + Of course, if you have a 100GB USB hard disk, it is perfectly understandable that you might want to partition it, in which case we can take advantage of udev's string substitutions: +

      + +-
      KERNEL=="sd*", SUBSYSTEMS="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
      ++
      KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
      + +

      + This rule creates symlinks such as: +-- +1.5.4.5 + diff --git a/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch b/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch new file mode 100644 index 0000000..c6b7893 --- /dev/null +++ b/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch @@ -0,0 +1,24 @@ +From 573bdd7e7588b70105c2976859696037899e9d4d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 7 Apr 2008 01:57:31 +0200 +Subject: [PATCH] udevinfo: do not replace chars when printing ATTR== matches + +--- + udevinfo.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/udevinfo.c b/udevinfo.c +index 85899cf..52d409d 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -83,7 +83,6 @@ static void print_all_attributes(const char *devpath, const char *key) + continue; + } + +- replace_chars(value, ALLOWED_CHARS_INPUT); + printf(" %s{%s}==\"%s\"\n", key, dent->d_name, value); + } + } +-- +1.5.4.5 + diff --git a/0003-vol_id-add-offset-option.patch b/0003-vol_id-add-offset-option.patch new file mode 100644 index 0000000..45784ad --- /dev/null +++ b/0003-vol_id-add-offset-option.patch @@ -0,0 +1,135 @@ +From 8b5238670d2e741bc71ae3e79b499682965dc2fd Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 9 Apr 2008 12:35:03 +0200 +Subject: [PATCH] vol_id: add --offset option + +--- + extras/volume_id/lib/Makefile | 2 +- + extras/volume_id/lib/volume_id.c | 10 +++++----- + extras/volume_id/vol_id.c | 14 ++++++++++---- + 3 files changed, 16 insertions(+), 10 deletions(-) + +diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile +index c0905f4..0e1565f 100644 +--- a/extras/volume_id/lib/Makefile ++++ b/extras/volume_id/lib/Makefile +@@ -13,7 +13,7 @@ INSTALL_DATA = ${INSTALL} -m 644 + INSTALL_LIB = ${INSTALL} -m 755 + + SHLIB_CUR = 0 +-SHLIB_REV = 82 ++SHLIB_REV = 83 + SHLIB_AGE = 0 + SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE) + +diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c +index e8f6de3..7c68fb1 100644 +--- a/extras/volume_id/lib/volume_id.c ++++ b/extras/volume_id/lib/volume_id.c +@@ -331,9 +331,9 @@ err: + } + + /* run only once into a timeout for unreadable devices */ +-static int device_is_readable(struct volume_id *id) ++static int device_is_readable(struct volume_id *id, uint64_t off) + { +- if (volume_id_get_buffer(id, 0x00, 0x200) != NULL) ++ if (volume_id_get_buffer(id, off, 0x200) != NULL) + return 1; + return 0; + } +@@ -355,7 +355,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) + if (id == NULL) + return -EINVAL; + +- if (!device_is_readable(id)) ++ if (!device_is_readable(id, off)) + return -1; + + info("probing at offset 0x%llx, size 0x%llx", +@@ -389,7 +389,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size + if (id == NULL) + return -EINVAL; + +- if (!device_is_readable(id)) ++ if (!device_is_readable(id, off)) + return -1; + + info("probing at offset 0x%llx, size 0x%llx", +@@ -421,7 +421,7 @@ int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size) + if (id == NULL) + return -EINVAL; + +- if (!device_is_readable(id)) ++ if (!device_is_readable(id, off)) + return -1; + + /* probe for raid first, because fs probes may be successful on raid members */ +diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c +index 38950ee..04e85ab 100644 +--- a/extras/volume_id/vol_id.c ++++ b/extras/volume_id/vol_id.c +@@ -134,6 +134,7 @@ int main(int argc, char *argv[]) + { "export", 0, NULL, 'x' }, + { "skip-raid", 0, NULL, 's' }, + { "probe-all", 0, NULL, 'a' }, ++ { "offset", 1, NULL, 'o' }, + { "help", 0, NULL, 'h' }, + {} + }; +@@ -153,6 +154,7 @@ int main(int argc, char *argv[]) + uint64_t size; + int skip_raid = 0; + int probe_all = 0; ++ uint64_t offset = 0; + const char *node; + int fd; + const char *label, *uuid, *type, *type_version, *usage; +@@ -167,7 +169,7 @@ int main(int argc, char *argv[]) + while (1) { + int option; + +- option = getopt_long(argc, argv, "lLutxsah", options, NULL); ++ option = getopt_long(argc, argv, "lLutxsaoh", options, NULL); + if (option == -1) + break; + +@@ -193,6 +195,9 @@ int main(int argc, char *argv[]) + case 'a': + probe_all = 1; + break; ++ case 'o': ++ offset = strtoull(optarg, NULL, 0); ++ break; + case 'h': + printf("Usage: vol_id [options] \n" + " --export export key/value pairs\n" +@@ -202,6 +207,7 @@ int main(int argc, char *argv[]) + " --uuid filesystem uuid\n" + " --skip-raid don't probe for raid\n" + " --probe-all find possibly conflicting signatures\n" ++ " --offset skip given number of bytes of input\n" + " --help\n\n"); + goto exit; + default: +@@ -249,14 +255,14 @@ int main(int argc, char *argv[]) + } + + if (probe_all) { +- volume_id_all_probers(all_probers, vid, 0, size, NULL); ++ volume_id_all_probers(all_probers, vid, offset, size, NULL); + goto exit; + } + + if (skip_raid) +- retval = volume_id_probe_filesystem(vid, 0, size); ++ retval = volume_id_probe_filesystem(vid, offset, size); + else +- retval = volume_id_probe_all(vid, 0, size); ++ retval = volume_id_probe_all(vid, offset, size); + if (retval != 0) { + fprintf(stderr, "%s: unknown volume type\n", node); + rc = 4; +-- +1.5.4.5 + diff --git a/0004-cdrom_id-replace-with-version-which-also-exports-me.patch b/0004-cdrom_id-replace-with-version-which-also-exports-me.patch new file mode 100644 index 0000000..bc71cd5 --- /dev/null +++ b/0004-cdrom_id-replace-with-version-which-also-exports-me.patch @@ -0,0 +1,834 @@ +From fd7a285e6293fddd3fbc68b519dcd367adeb72c4 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 9 Apr 2008 23:17:39 +0200 +Subject: [PATCH] cdrom_id: replace with version which also exports media properties + +This is a 12 track audio CD with additional data session: + $ extras/cdrom_id/cdrom_id /dev/dvd + ID_CDROM=1 + ID_CDROM_CD_R=1 + ID_CDROM_CD_RW=1 + ID_CDROM_DVD=1 + ID_CDROM_DVD_R=1 + ID_CDROM_DVD_RW=1 + ID_CDROM_DVD_RAM=1 + ID_CDROM_DVD_PLUS_R=1 + ID_CDROM_DVD_PLUS_RW=1 + ID_CDROM_DVD_PLUS_R_DL=1 + ID_CDROM_MEDIA_CD=1 + ID_CDROM_MEDIA_STATE=complete + ID_CDROM_MEDIA_HAS_AUDIO=1 + ID_CDROM_MEDIA_SESSION_COUNT=2 + ID_CDROM_MEDIA_TRACK_COUNT=13 + ID_CDROM_MEDIA_SESSION_LAST_OFFSET=444508160 +--- + extras/cdrom_id/60-cdrom_id.rules | 2 +- + extras/cdrom_id/cdrom_id.8 | 15 +- + extras/cdrom_id/cdrom_id.c | 677 +++++++++++++++++++++++++++++++++---- + 3 files changed, 617 insertions(+), 77 deletions(-) + +diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules +index b06dafd..12fbf63 100644 +--- a/extras/cdrom_id/60-cdrom_id.rules ++++ b/extras/cdrom_id/60-cdrom_id.rules +@@ -1,3 +1,3 @@ + # import optical drive properties + +-KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" ++ACTION=="add|change", KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" +diff --git a/extras/cdrom_id/cdrom_id.8 b/extras/cdrom_id/cdrom_id.8 +index 4194ae4..1d4d70d 100644 +--- a/extras/cdrom_id/cdrom_id.8 ++++ b/extras/cdrom_id/cdrom_id.8 +@@ -1,17 +1,16 @@ +-.TH CDROM_ID 8 "November 2005" "" "Linux Administrator's Manual" ++.TH CDROM_ID 8 "April 2008" "" "Linux Administrator's Manual" + .SH NAME +-cdrom_id \- udev callout to determine the capabilities of cd/dvd drives ++cdrom_id \- udev callout to determine the capabilities of optical drives and media + .SH SYNOPSIS + .BI cdrom_id +-[\fI--export\fP] \fIblockdevice\fP ++[\fI--export\fP] \fIdevice\fP + .SH "DESCRIPTION" + .B cdrom_id +-is normally called from a udev rule, to provide udev with the capabilities +-of a cdrom or dvdrom drive. Udev can use this information to create +-symlinks like /dev/cdrom or /dev/dvd to the real device node. ++is normally called from a udev rule, to provide udev with the list of ++capabilities of a optical drive. + .SH USAGE + .B cdrom_id +-opens the blockdevice node specified at the commandline and prints the ++opens the device node specified at the commandline and prints the + discovered capabilities. + .SH OPTIONS + The following commandline switches are supported to specify what cdrom_id +@@ -23,5 +22,5 @@ print all values (default) + .SH SEE ALSO + .BR udev (7) + .SH AUTHORS +-Developed by Greg Kroah\-Hartman . ++Developed by Kay Sievers . + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 0d4a8c1..315d276 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -1,12 +1,21 @@ + /* +- * cdrom_id - determines the capabilities of cdrom drives ++ * cdrom_id - optical drive and media information prober + * +- * Copyright (C) 2005 Greg Kroah-Hartman ++ * Copyright (C) 2008 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 program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ * + */ + + #ifndef _GNU_SOURCE +@@ -14,50 +23,27 @@ + #endif + + #include ++#include + #include + #include +-#include +-#include + #include ++#include ++#include + #include +-#include ++#include ++#include + #include + #include +-#include +- ++#include ++#include ++#include + #include "../../udev.h" + +-/* +- * Taken from the cdrom.h kernel include file. +- * Included here as some distros don't have an updated version +- * with all of the DVD flags. So we just include our own, aren't +- * we so nice... +- */ +-#define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ +- +-/* capability flags used with the uniform CD-ROM driver */ +-#define CDC_CLOSE_TRAY 0x1 /* caddy systems _can't_ close */ +-#define CDC_OPEN_TRAY 0x2 /* but _can_ eject. */ +-#define CDC_LOCK 0x4 /* disable manual eject */ +-#define CDC_SELECT_SPEED 0x8 /* programmable speed */ +-#define CDC_SELECT_DISC 0x10 /* select disc from juke-box */ +-#define CDC_MULTI_SESSION 0x20 /* read sessions>1 */ +-#define CDC_MCN 0x40 /* Medium Catalog Number */ +-#define CDC_MEDIA_CHANGED 0x80 /* media changed */ +-#define CDC_PLAY_AUDIO 0x100 /* audio functions */ +-#define CDC_RESET 0x200 /* hard reset device */ +-#define CDC_IOCTLS 0x400 /* driver has non-standard ioctls */ +-#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */ +-#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */ +-#define CDC_CD_R 0x2000 /* drive is a CD-R */ +-#define CDC_CD_RW 0x4000 /* drive is a CD-RW */ +-#define CDC_DVD 0x8000 /* drive is a DVD */ +-#define CDC_DVD_R 0x10000 /* drive can write DVD-R */ +-#define CDC_DVD_RAM 0x20000 /* drive can write DVD-RAM */ +-#define CDC_MO_DRIVE 0x40000 /* drive is an MO device */ +-#define CDC_MRW 0x80000 /* drive can read MRW */ +-#define CDC_MRW_W 0x100000 /* drive can write MRW */ +-#define CDC_RAM 0x200000 /* ok to open for WRITE */ ++#ifndef ARRAY_SIZE ++#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) ++#endif ++ ++static int debug; + + #ifdef USE_LOG + void log_message(int priority, const char *format, ...) +@@ -73,80 +59,635 @@ void log_message(int priority, const char *format, ...) + udev_log = log_priority(value); + else + udev_log = LOG_ERR; ++ ++ if (debug && udev_log < LOG_INFO) ++ udev_log = LOG_INFO; + } + + if (priority > udev_log) + return; + + va_start(args, format); +- vsyslog(priority, format, args); ++ if (debug) { ++ fprintf(stderr, "[%d] ", (int) getpid()); ++ vfprintf(stderr, format, args); ++ fprintf(stderr, "\n"); ++ } else ++ vsyslog(priority, format, args); + va_end(args); + } + #endif + ++/* device info */ ++static unsigned int cd_cd_rom; ++static unsigned int cd_cd_r; ++static unsigned int cd_cd_rw; ++static unsigned int cd_dvd_rom; ++static unsigned int cd_dvd_r; ++static unsigned int cd_dvd_rw; ++static unsigned int cd_dvd_ram; ++static unsigned int cd_dvd_plus_r; ++static unsigned int cd_dvd_plus_rw; ++static unsigned int cd_dvd_plus_r_dl; ++static unsigned int cd_dvd_plus_rw_dl; ++static unsigned int cd_bd; ++static unsigned int cd_bd_r; ++static unsigned int cd_bd_re; ++static unsigned int cd_hddvd; ++static unsigned int cd_hddvd_r; ++static unsigned int cd_hddvd_rw; ++static unsigned int cd_mo; ++static unsigned int cd_mrw; ++static unsigned int cd_mrw_w; ++ ++/* media info */ ++static unsigned int cd_media_cd_rom; ++static unsigned int cd_media_cd_r; ++static unsigned int cd_media_cd_rw; ++static unsigned int cd_media_dvd_rom; ++static unsigned int cd_media_dvd_r; ++static unsigned int cd_media_dvd_rw; ++static unsigned int cd_media_dvd_ram; ++static unsigned int cd_media_dvd_plus_r; ++static unsigned int cd_media_dvd_plus_rw; ++static unsigned int cd_media_dvd_plus_r_dl; ++static unsigned int cd_media_dvd_plus_rw_dl; ++static unsigned int cd_media_bd; ++static unsigned int cd_media_bd_r; ++static unsigned int cd_media_bd_re; ++static unsigned int cd_media_hddvd; ++static unsigned int cd_media_hddvd_r; ++static unsigned int cd_media_hddvd_rw; ++static unsigned int cd_media_mo; ++static unsigned int cd_media_mrw; ++static unsigned int cd_media_mrw_w; ++ ++static const char *cd_media_state; ++static unsigned int cd_media_has_audio; ++static unsigned int cd_media_session_next; ++static unsigned int cd_media_session_count; ++static unsigned int cd_media_track_count; ++static unsigned long long int cd_media_session_last_offset; ++ ++#define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) ++#define SK(errcode) (((errcode) >> 16) & 0xF) ++#define ASC(errcode) (((errcode) >> 8) & 0xFF) ++#define ASCQ(errcode) ((errcode) & 0xFF) ++ ++static void info_scsi_cmd_err(const char *cmd, int err) ++{ ++ if (err == -1) { ++ info("%s failed", cmd); ++ return; ++ } ++ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); ++} ++ ++struct scsi_cmd { ++ struct cdrom_generic_command cgc; ++ union { ++ struct request_sense s; ++ unsigned char u[18]; ++ } _sense; ++ struct sg_io_hdr sg_io; ++}; ++ ++static void scsi_cmd_set(struct scsi_cmd *cmd, size_t i, int arg) ++{ ++ if (i == 0) { ++ memset(cmd, 0x00, sizeof(struct scsi_cmd)); ++ cmd->cgc.quiet = 1; ++ cmd->cgc.sense = &cmd->_sense.s; ++ memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); ++ cmd->sg_io.interface_id = 'S'; ++ cmd->sg_io.mx_sb_len = sizeof(cmd->_sense); ++ cmd->sg_io.cmdp = cmd->cgc.cmd; ++ cmd->sg_io.sbp = cmd->_sense.u; ++ cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO; ++ } ++ cmd->sg_io.cmd_len = i + 1; ++ cmd->cgc.cmd[i] = arg; ++} ++ ++#define CHECK_CONDITION 0x01 ++ ++static int scsi_cmd_run(struct scsi_cmd *cmd, int fd, unsigned char *buf, size_t bufsize) ++{ ++ int ret = 0; ++ ++ cmd->sg_io.dxferp = buf; ++ cmd->sg_io.dxfer_len = bufsize; ++ cmd->sg_io.dxfer_direction = SG_DXFER_FROM_DEV; ++ if (ioctl(fd, SG_IO, &cmd->sg_io)) ++ return -1; ++ ++ if ((cmd->sg_io.info & SG_INFO_OK_MASK) != SG_INFO_OK) { ++ errno = EIO; ++ ret = -1; ++ if (cmd->sg_io.masked_status & CHECK_CONDITION) { ++ ret = ERRCODE(cmd->_sense.u); ++ if (ret == 0) ++ ret = -1; ++ } ++ } ++ return ret; ++} ++ ++static int cd_capability_compat(int fd) ++{ ++ int capabilty; ++ ++ capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); ++ if (capabilty < 0) { ++ info("CDROM_GET_CAPABILITY failed"); ++ return -1; ++ } ++ ++ if (capabilty & CDC_CD_R) ++ cd_cd_r = 1; ++ if (capabilty & CDC_CD_RW) ++ cd_cd_rw = 1; ++ if (capabilty & CDC_DVD) ++ cd_dvd_rom = 1; ++ if (capabilty & CDC_DVD_R) ++ cd_dvd_r = 1; ++ if (capabilty & CDC_DVD_RAM) ++ cd_dvd_ram = 1; ++ if (capabilty & CDC_MRW) ++ cd_mrw = 1; ++ if (capabilty & CDC_MRW_W) ++ cd_mrw_w = 1; ++ return 0; ++} ++ ++static int cd_inquiry(int fd) { ++ struct scsi_cmd sc; ++ unsigned char inq[128]; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x12); ++ scsi_cmd_set(&sc, 4, 36); ++ scsi_cmd_set(&sc, 5, 0); ++ err = scsi_cmd_run(&sc, fd, inq, 36); ++ if ((err < 0)) { ++ info_scsi_cmd_err("INQUIRY", err); ++ return -1; ++ } ++ ++ if ((inq[0] & 0x1F) != 5) { ++ info("not an MMC unit"); ++ return -1; ++ } ++ ++ info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); ++ return 0; ++} ++ ++static int cd_profiles(int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char header[8]; ++ unsigned char profiles[512]; ++ unsigned int cur_profile; ++ unsigned int len; ++ unsigned int i; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x46); ++ scsi_cmd_set(&sc, 1, 0); ++ scsi_cmd_set(&sc, 8, sizeof(header)); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("GET CONFIGURATION", err); ++ return -1; ++ } ++ ++ len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); ++ info("GET CONFIGURATION: number of profiles %i", len); ++ if (len > sizeof(profiles)) { ++ info("invalid number of profiles"); ++ return -1; ++ } ++ ++ scsi_cmd_set(&sc, 0, 0x46); ++ scsi_cmd_set(&sc, 1, 1); ++ scsi_cmd_set(&sc, 6, len >> 16); ++ scsi_cmd_set(&sc, 7, len >> 8); ++ scsi_cmd_set(&sc, 8, len); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, profiles, len); ++ if ((err < 0)) { ++ info_scsi_cmd_err("GET CONFIGURATION", err); ++ return -1; ++ } ++ ++ /* device profiles */ ++ for (i = 12; i < profiles[11]; i += 4) { ++ unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); ++ if (profile == 0) ++ continue; ++ info("profile 0x%02x", profile); ++ ++ switch (profile) { ++ case 0x03: ++ case 0x04: ++ case 0x05: ++ cd_mo = 1; ++ break; ++ case 0x10: ++ cd_dvd_rom = 1; ++ break; ++ case 0x12: ++ cd_dvd_ram = 1; ++ break; ++ case 0x13: ++ case 0x14: ++ cd_dvd_rw = 1; ++ break; ++ case 0x1B: ++ cd_dvd_plus_r = 1; ++ break; ++ case 0x1A: ++ cd_dvd_plus_rw = 1; ++ break; ++ case 0x2A: ++ cd_dvd_plus_rw_dl = 1; ++ break; ++ case 0x2B: ++ cd_dvd_plus_r_dl = 1; ++ break; ++ case 0x40: ++ cd_bd = 1; ++ break; ++ case 0x41: ++ case 0x42: ++ cd_bd_r = 1; ++ break; ++ case 0x43: ++ cd_bd_re = 1; ++ break; ++ case 0x50: ++ cd_hddvd = 1; ++ break; ++ case 0x51: ++ cd_hddvd_r = 1; ++ break; ++ case 0x52: ++ cd_hddvd_rw = 1; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ /* current media profile */ ++ cur_profile = header[6] << 8 | header[7]; ++ info("current profile 0x%02x", cur_profile); ++ if (cur_profile == 0) { ++ info("no current profile, assuming no media"); ++ return -1; ++ } ++ ++ switch (cur_profile) { ++ case 0x03: ++ case 0x04: ++ case 0x05: ++ cd_media_mo = 1; ++ break; ++ case 0x08: ++ cd_media_cd_rom = 1; ++ break; ++ case 0x09: ++ cd_media_cd_r = 1; ++ break; ++ case 0x0a: ++ cd_media_cd_rw = 1; ++ break; ++ case 0x10: ++ cd_media_dvd_rom = 1; ++ break; ++ case 0x11: ++ cd_media_dvd_r = 1; ++ break; ++ case 0x12: ++ cd_media_dvd_ram = 1; ++ break; ++ case 0x13: ++ case 0x14: ++ cd_media_dvd_rw = 1; ++ break; ++ case 0x1B: ++ cd_media_dvd_plus_r = 1; ++ break; ++ case 0x1A: ++ cd_media_dvd_plus_rw = 1; ++ break; ++ case 0x2A: ++ cd_media_dvd_plus_rw_dl = 1; ++ break; ++ case 0x2B: ++ cd_media_dvd_plus_r_dl = 1; ++ break; ++ case 0x40: ++ cd_media_bd = 1; ++ break; ++ case 0x41: ++ case 0x42: ++ cd_media_bd_r = 1; ++ break; ++ case 0x43: ++ cd_media_bd_re = 1; ++ break; ++ case 0x50: ++ cd_media_hddvd = 1; ++ break; ++ case 0x51: ++ cd_media_hddvd_r = 1; ++ break; ++ case 0x52: ++ cd_media_hddvd_rw = 1; ++ break; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++static int cd_media_info(int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char header[32]; ++ static const char *media_status[] = { ++ "blank", ++ "appendable", ++ "complete", ++ "other" ++ }; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x51); ++ scsi_cmd_set(&sc, 8, sizeof(header)); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ DISC INFORMATION", err); ++ return -1; ++ }; ++ ++ info("disk type %02x", header[8]); ++ ++ if ((header[2] & 3) < 4) ++ cd_media_state = media_status[header[2] & 3]; ++ if ((header[2] & 3) != 2) ++ cd_media_session_next = header[10] << 8 | header[5]; ++ cd_media_session_count = header[9] << 8 | header[4]; ++ cd_media_track_count = header[11] << 8 | header[6]; ++ ++ return 0; ++} ++ ++static int cd_media_toc(int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char header[12]; ++ unsigned char toc[2048]; ++ unsigned int len, i; ++ unsigned char *p; ++ int err; ++ ++ scsi_cmd_set(&sc, 0, 0x43); ++ scsi_cmd_set(&sc, 6, 1); ++ scsi_cmd_set(&sc, 8, sizeof(header)); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ TOC", err); ++ return -1; ++ } ++ ++ len = (header[0] << 8 | header[1]) + 2; ++ info("READ TOC: len: %d", len); ++ if (len > sizeof(toc)) ++ return -1; ++ ++ /* check if we have a data track */ ++ info("ctl %02x (0x04 is data/audio)", header[5]); ++ cd_media_has_audio = (header[5] & 0x04) == 0; ++ ++ scsi_cmd_set(&sc, 0, 0x43); ++ scsi_cmd_set(&sc, 6, header[2]); /* First Track/Session Number */ ++ scsi_cmd_set(&sc, 7, len >> 8); ++ scsi_cmd_set(&sc, 8, len); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, toc, len); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ TOC (tracks)", err); ++ return -1; ++ } ++ ++ for (p = toc+4, i = 4; i < len-8; i += 8, p += 8) { ++ unsigned int block; ++ ++ block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; ++ info("track %u starts at block %u", p[2], block); ++ } ++ ++ scsi_cmd_set(&sc, 0, 0x43); ++ scsi_cmd_set(&sc, 2, 1); /* Session Info */ ++ scsi_cmd_set(&sc, 8, 12); ++ scsi_cmd_set(&sc, 9, 0); ++ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); ++ if ((err < 0)) { ++ info_scsi_cmd_err("READ TOC (multi session)", err); ++ return -1; ++ } ++ len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; ++ info("last track %u starts at block %u", header[4+2], len); ++ cd_media_session_last_offset = (unsigned long long int)len * 2048; ++ return 0; ++} ++ + int main(int argc, char *argv[]) + { ++ static const struct option options[] = { ++ { "export", 0, NULL, 'x' }, ++ { "debug", 0, NULL, 'd' }, ++ { "help", 0, NULL, 'h' }, ++ {} ++ }; + const char *node = NULL; +- int i; + int export = 0; +- int fd; ++ int fd = -1; + int rc = 0; +- int result; + + logging_init("cdrom_id"); + +- for (i = 1 ; i < argc; i++) { +- char *arg = argv[i]; ++ while (1) { ++ int option; + +- if (strcmp(arg, "--export") == 0) { ++ option = getopt_long(argc, argv, "dxh", options, NULL); ++ if (option == -1) ++ break; ++ ++ switch (option) { ++ case 'd': ++ debug = 1; ++ break; ++ case 'x': + export = 1; +- } else +- node = arg; ++ break; ++ case 'h': ++ printf("Usage: cdrom_id [options] \n" ++ " --export export key/value pairs\n" ++ " --help\n\n"); ++ goto exit; ++ default: ++ rc = 1; ++ goto exit; ++ } + } ++ ++ node = argv[optind]; + if (!node) { +- info("no node specified"); ++ err("no device"); ++ fprintf(stderr, "no device\n"); + rc = 1; + goto exit; + } + +- fd = open(node, O_RDONLY|O_NONBLOCK); ++ fd = open(node, O_RDONLY | O_NONBLOCK); + if (fd < 0) { + info("unable to open '%s'", node); + rc = 1; + goto exit; + } ++ info("probing: '%s'", node); ++ ++ /* same data as original cdrom_id */ ++ if (cd_capability_compat(fd) < 0) { ++ rc = 1; ++ goto exit; ++ } + +- result = ioctl(fd, CDROM_GET_CAPABILITY, NULL); +- if (result < 0) { +- info("CDROM_GET_CAPABILITY failed for '%s'", node); +- rc = 3; +- goto close; ++ /* check drive */ ++ if (cd_inquiry(fd) < 0) { ++ rc = 2; ++ goto exit; + } + +- printf("ID_CDROM=1\n"); ++ /* read drive and possibly current profile */ ++ if (cd_profiles(fd) < 0) ++ goto print; ++ ++ /* get session/track info */ ++ if (cd_media_toc(fd) < 0) ++ goto print; + +- if (result & CDC_CD_R) ++ /* get writable media state */ ++ if (cd_media_info(fd) < 0) ++ goto print; ++ ++print: ++ printf("ID_CDROM=1\n"); ++ if (cd_cd_rom) ++ printf("ID_CDROM_CD=1\n"); ++ if (cd_cd_r) + printf("ID_CDROM_CD_R=1\n"); +- if (result & CDC_CD_RW) ++ if (cd_cd_rw) + printf("ID_CDROM_CD_RW=1\n"); +- +- if (result & CDC_DVD) ++ if (cd_dvd_rom) + printf("ID_CDROM_DVD=1\n"); +- if (result & CDC_DVD_R) ++ if (cd_dvd_r) + printf("ID_CDROM_DVD_R=1\n"); +- if (result & CDC_DVD_RAM) ++ if (cd_dvd_rw) ++ printf("ID_CDROM_DVD_RW=1\n"); ++ if (cd_dvd_ram) + printf("ID_CDROM_DVD_RAM=1\n"); +- +- if (result & CDC_MRW) ++ if (cd_dvd_plus_r) ++ printf("ID_CDROM_DVD_PLUS_R=1\n"); ++ if (cd_dvd_plus_rw) ++ printf("ID_CDROM_DVD_PLUS_RW=1\n"); ++ if (cd_dvd_plus_r_dl) ++ printf("ID_CDROM_DVD_PLUS_R_DL=1\n"); ++ if (cd_dvd_plus_rw_dl) ++ printf("ID_CDROM_DVD_PLUS_RW_DL=1\n"); ++ if (cd_bd) ++ printf("ID_CDROM_BD=1\n"); ++ if (cd_bd_r) ++ printf("ID_CDROM_BD_R=1\n"); ++ if (cd_bd_re) ++ printf("ID_CDROM_BD_RE=1\n"); ++ if (cd_hddvd) ++ printf("ID_CDROM_HDDVD=1\n"); ++ if (cd_hddvd_r) ++ printf("ID_CDROM_HDDVD_R=1\n"); ++ if (cd_hddvd_rw) ++ printf("ID_CDROM_HDDVD_RW=1\n"); ++ if (cd_mo) ++ printf("ID_CDROM_MO=1\n"); ++ if (cd_mrw) + printf("ID_CDROM_MRW=1\n"); +- if (result & CDC_MRW_W) ++ if (cd_mrw_w) + printf("ID_CDROM_MRW_W=1\n"); + +- if (result & CDC_RAM) +- printf("ID_CDROM_RAM=1\n"); +-close: +- close(fd); ++ if (cd_media_mo) ++ printf("ID_CDROM_MEDIA_MO=1\n"); ++ if (cd_media_mrw) ++ printf("ID_CDROM_MEDIA_MRW=1\n"); ++ if (cd_media_mrw_w) ++ printf("ID_CDROM_MEDIA_MRW_W=1\n"); ++ if (cd_media_cd_rom) ++ printf("ID_CDROM_MEDIA_CD=1\n"); ++ if (cd_media_cd_r) ++ printf("ID_CDROM_MEDIA_CD_R=1\n"); ++ if (cd_media_cd_rw) ++ printf("ID_CDROM_MEDIA_CD_RW=1\n"); ++ if (cd_media_dvd_rom) ++ printf("ID_CDROM_MEDIA_DVD=1\n"); ++ if (cd_media_dvd_r) ++ printf("ID_CDROM_MEDIA_DVD_R=1\n"); ++ if (cd_media_dvd_ram) ++ printf("ID_CDROM_MEDIA_DVD_RAM=1\n"); ++ if (cd_media_dvd_rw) ++ printf("ID_CDROM_MEDIA_DVD_RW=1\n"); ++ if (cd_media_dvd_plus_r) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_R=1\n"); ++ if (cd_media_dvd_plus_rw) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_RW=1\n"); ++ if (cd_media_dvd_plus_rw_dl) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_RW_DL=1\n"); ++ if (cd_media_dvd_plus_r_dl) ++ printf("ID_CDROM_MEDIA_DVD_PLUS_R_DL=1\n"); ++ if (cd_media_bd) ++ printf("ID_CDROM_MEDIA_BD=1\n"); ++ if (cd_media_bd_r) ++ printf("ID_CDROM_MEDIA_BD_R=1\n"); ++ if (cd_media_bd_re) ++ printf("ID_CDROM_MEDIA_BD_RE=1\n"); ++ if (cd_media_hddvd) ++ printf("ID_CDROM_MEDIA_HDDVD=1\n"); ++ if (cd_media_hddvd_r) ++ printf("ID_CDROM_MEDIA_HDDVD_R=1\n"); ++ if (cd_media_hddvd_rw) ++ printf("ID_CDROM_MEDIA_HDDVD_RW=1\n"); ++ ++ if (cd_media_state != NULL) ++ printf("ID_CDROM_MEDIA_STATE=%s\n", cd_media_state); ++ if (cd_media_has_audio) ++ printf("ID_CDROM_MEDIA_HAS_AUDIO=1\n"); ++ if (cd_media_session_next > 0) ++ printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next); ++ if (cd_media_session_count > 0) ++ printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count); ++ if (cd_media_track_count > 0) ++ printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count); ++ if (cd_media_session_last_offset) ++ printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); + exit: ++ if (fd >= 0) ++ close(fd); + logging_close(); + return rc; + } ++ +-- +1.5.4.5 + diff --git a/0005-udevd-at-startup-write-message-including-version-nu.patch b/0005-udevd-at-startup-write-message-including-version-nu.patch new file mode 100644 index 0000000..4033f2f --- /dev/null +++ b/0005-udevd-at-startup-write-message-including-version-nu.patch @@ -0,0 +1,31 @@ +From 798d7ab60c476a2c7bcef6918a40dce1756204d1 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 10 Apr 2008 21:35:40 +0200 +Subject: [PATCH] udevd: at startup write message including version number to kernel log + +--- + udevd.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/udevd.c b/udevd.c +index 493bb54..530fc59 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -1116,6 +1116,14 @@ int main(int argc, char *argv[], char *envp[]) + close(fd); + } + ++ fd = open("/dev/kmsg", O_WRONLY); ++ if (fd > 0) { ++ const char *str = "<6>udevd version " UDEV_VERSION " started\n"; ++ ++ write(fd, str, strlen(str)); ++ close(fd); ++ } ++ + /* set signal handlers */ + memset(&act, 0x00, sizeof(struct sigaction)); + act.sa_handler = (void (*)(int)) sig_handler; +-- +1.5.4.5 + diff --git a/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch b/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch new file mode 100644 index 0000000..dd4f665 --- /dev/null +++ b/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch @@ -0,0 +1,49 @@ +From e6d70ed63a03f39de148e6b0afb47cbbc5ec78eb Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 15 Apr 2008 00:21:51 +0200 +Subject: [PATCH] rules_generator: net rules - always add KERNEL== match to generated rules + +--- + .../75-persistent-net-generator.rules | 2 +- + extras/rule_generator/write_net_rules | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules +index 2aa3076..85a4c5b 100644 +--- a/extras/rule_generator/75-persistent-net-generator.rules ++++ b/extras/rule_generator/75-persistent-net-generator.rules +@@ -18,7 +18,7 @@ SUBSYSTEM!="net", GOTO="persistent_net_generator_end" + 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" ++KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" + + # ignore Xen virtual interfaces + SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" +diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules +index 765e56f..322398b 100644 +--- a/extras/rule_generator/write_net_rules ++++ b/extras/rule_generator/write_net_rules +@@ -92,6 +92,9 @@ if [ -z "$match" ]; then + exit 1 + fi + ++basename=${INTERFACE%%[0-9]*} ++match="$match, KERNEL==\"$basename*\"" ++ + if [ "$INTERFACE_NAME" ]; then + # external tools may request a custom name + COMMENT="$COMMENT (custom name provided by external tool)" +@@ -101,8 +104,6 @@ if [ "$INTERFACE_NAME" ]; then + fi + else + # if a rule using the current name already exists, find a new name +- basename=${INTERFACE%%[0-9]*} +- match="$match, KERNEL==\"$basename*\"" + if interface_name_taken; then + INTERFACE="$basename$(find_next_available "$basename[0-9]*")" + echo "INTERFACE_NEW=$INTERFACE" +-- +1.5.4.5 + diff --git a/0007-selinux-more-context-settings.patch b/0007-selinux-more-context-settings.patch new file mode 100644 index 0000000..056a40c --- /dev/null +++ b/0007-selinux-more-context-settings.patch @@ -0,0 +1,88 @@ +From 6056d9b3400fe0349d86636cbbf93f069bb5639a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 17 Apr 2008 16:03:03 +0200 +Subject: [PATCH] selinux: more context settings + +Signed-off-by: Harald Hoyer +--- + udev_db.c | 6 +++++- + udev_rules_parse.c | 2 ++ + udev_utils_file.c | 7 ++++++- + udevd.c | 2 ++ + 4 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/udev_db.c b/udev_db.c +index 518ace9..4447253 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -144,8 +144,12 @@ int udev_db_add_device(struct udevice *udev) + */ + if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && + !udev->partitions && !udev->ignore_remove) { ++ int ret; + dbg("nothing interesting to store, create symlink"); +- if (symlink(udev->name, filename) != 0) { ++ selinux_setfscreatecon(filename, NULL, S_IFLNK); ++ ret = symlink(udev->name, filename); ++ selinux_resetfscreatecon(); ++ if (ret != 0) { + err("unable to create db link '%s': %s", filename, strerror(errno)); + return -1; + } +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index 9e43581..d2392c3 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -745,7 +745,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) + strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); + if (stat(filename, &statbuf) != 0) { + create_path(filename); ++ selinux_setfscreatecon(filename, NULL, S_IFDIR|0755); + mkdir(filename, 0755); ++ selinux_resetfscreatecon(); + } + add_matching_files(&dyn_list, filename, RULESFILE_SUFFIX); + +diff --git a/udev_utils_file.c b/udev_utils_file.c +index 0ceefe1..9ab3470 100644 +--- a/udev_utils_file.c ++++ b/udev_utils_file.c +@@ -35,6 +35,7 @@ int create_path(const char *path) + char p[PATH_SIZE]; + char *pos; + struct stat stats; ++ int ret; + + strlcpy(p, path, sizeof(p)); + pos = strrchr(p, '/'); +@@ -53,8 +54,12 @@ int create_path(const char *path) + return -1; + + dbg("mkdir '%s'", p); +- if (mkdir(p, 0755) == 0) ++ selinux_setfscreatecon(p, NULL, S_IFDIR|0755); ++ ret = mkdir(p, 0755); ++ selinux_resetfscreatecon(); ++ if (ret == 0) + return 0; ++ + if (errno == EEXIST) + if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) + return 0; +diff --git a/udevd.c b/udevd.c +index 530fc59..7786ae6 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -168,7 +168,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + delete_path(filename_failed); + + create_path(filename); ++ selinux_setfscreatecon(filename, NULL, S_IFLNK); + symlink(msg->devpath, filename); ++ selinux_resetfscreatecon(); + break; + case EVENT_FINISHED: + if (msg->devpath_old != NULL) { +-- +1.5.4.5 + diff --git a/0008-selinux-fix-missing-includes.patch b/0008-selinux-fix-missing-includes.patch new file mode 100644 index 0000000..f17d119 --- /dev/null +++ b/0008-selinux-fix-missing-includes.patch @@ -0,0 +1,63 @@ +From 4278ab015d76876f61821b293df07e0c3746bfd5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 17 Apr 2008 23:31:09 +0200 +Subject: [PATCH] selinux: fix missing includes + +--- + udev_db.c | 1 + + udev_rules.c | 1 + + udev_rules_parse.c | 1 + + udev_utils_file.c | 1 + + 4 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/udev_db.c b/udev_db.c +index 4447253..1feab7d 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -31,6 +31,7 @@ + #include + + #include "udev.h" ++#include "udev_selinux.h" + + + static size_t devpath_to_db_path(const char *devpath, char *filename, size_t len) +diff --git a/udev_rules.c b/udev_rules.c +index eccea3b..6565a2e 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -35,6 +35,7 @@ + + #include "udev.h" + #include "udev_rules.h" ++#include "udev_selinux.h" + + extern char **environ; + +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index d2392c3..ce659d7 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -28,6 +28,7 @@ + + #include "udev.h" + #include "udev_rules.h" ++#include "udev_selinux.h" + + + void udev_rules_iter_init(struct udev_rules *rules) +diff --git a/udev_utils_file.c b/udev_utils_file.c +index 9ab3470..19668b9 100644 +--- a/udev_utils_file.c ++++ b/udev_utils_file.c +@@ -29,6 +29,7 @@ + #include + + #include "udev.h" ++#include "udev_selinux.h" + + int create_path(const char *path) + { +-- +1.5.4.5 + diff --git a/0009-allow-setting-of-MODE-0000.patch b/0009-allow-setting-of-MODE-0000.patch new file mode 100644 index 0000000..8f85310 --- /dev/null +++ b/0009-allow-setting-of-MODE-0000.patch @@ -0,0 +1,93 @@ +From cf100ca71bf365d8898e97d4ec9dd05c3941cae8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 18 Apr 2008 21:07:29 +0200 +Subject: [PATCH] allow setting of MODE="0000" + +--- + test/udev-test.pl | 10 ++++++++++ + udev_rules.c | 10 +++++----- + udev_rules.h | 3 +-- + udev_rules_parse.c | 3 +-- + 4 files changed, 17 insertions(+), 9 deletions(-) + +diff --git a/test/udev-test.pl b/test/udev-test.pl +index 2621e2b..fee62a6 100755 +--- a/test/udev-test.pl ++++ b/test/udev-test.pl +@@ -1607,6 +1607,16 @@ EOF + KERNEL=="sda", TEST=="*/nr_requests", NAME="found-subdir" + EOF + }, ++ { ++ desc => "TEST MODE=0000", ++ subsys => "block", ++ devpath => "/block/sda", ++ exp_name => "sda", ++ exp_perms => "0:0:0000", ++ rules => <mode_final && rule->mode != 0000) { +- if (rule->mode_operation == KEY_OP_ASSIGN_FINAL) ++ if (!udev->mode_final && rule->mode.operation != KEY_OP_UNSET) { ++ if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) + udev->mode_final = 1; +- udev->mode = rule->mode; +- dbg("applied mode=%#o to '%s'", rule->mode, udev->dev->kernel); ++ udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); ++ dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); + } + if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { + if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) +@@ -1534,7 +1534,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + 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->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; +diff --git a/udev_rules.h b/udev_rules.h +index 0ad4ec3..a84b0de 100644 +--- a/udev_rules.h ++++ b/udev_rules.h +@@ -93,8 +93,7 @@ struct udev_rule { + struct key symlink_match; + struct key owner; + struct key group; +- mode_t mode; +- enum key_operation mode_operation; ++ struct key mode; + enum escape_type string_escape; + + unsigned int link_priority; +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index ce659d7..6d88354 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -579,8 +579,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + } + + if (strcasecmp(key, "MODE") == 0) { +- rule->mode = strtol(value, NULL, 8); +- rule->mode_operation = operation; ++ add_rule_key(rule, &rule->mode, operation, value); + valid = 1; + continue; + } +-- +1.5.4.5 + diff --git a/0010-path_id-remove-subsystem-whitelist.patch b/0010-path_id-remove-subsystem-whitelist.patch new file mode 100644 index 0000000..3ae1bea --- /dev/null +++ b/0010-path_id-remove-subsystem-whitelist.patch @@ -0,0 +1,54 @@ +From 1d918b50cddc975abbfd06af134a6d843d9bc7f0 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 18 Apr 2008 21:08:07 +0200 +Subject: [PATCH] path_id: remove subsystem whitelist + +--- + extras/path_id/path_id | 27 +++++++-------------------- + 1 files changed, 7 insertions(+), 20 deletions(-) + +diff --git a/extras/path_id/path_id b/extras/path_id/path_id +index a3a627e..7a37700 100755 +--- a/extras/path_id/path_id ++++ b/extras/path_id/path_id +@@ -549,7 +549,7 @@ handle_device () { + ;; + *) + mode="" +- ;; ++ ;; + esac + if [ "$d" ]; then + d="$d-${rewind}st${mode}" +@@ -557,22 +557,9 @@ handle_device () { + fi + } + +-case "$TYPE" in +- block) +- handle_device +- echo "ID_PATH=$d" +- ;; +- scsi_tape) +- handle_device +- echo "ID_PATH=$d" +- ;; +- input) +- handle_device +- echo "ID_PATH=$d" +- ;; +- *) +- RESULT=1 +- ;; +-esac +- +-exit $RESULT ++handle_device ++if [ -z "$d" ]; then ++ exit 1 ++fi ++echo "ID_PATH=$d" ++exit 0 +-- +1.5.4.5 + diff --git a/0011-logging-add-trailing-newline-to-all-strings.patch b/0011-logging-add-trailing-newline-to-all-strings.patch new file mode 100644 index 0000000..a4a3bd5 --- /dev/null +++ b/0011-logging-add-trailing-newline-to-all-strings.patch @@ -0,0 +1,5323 @@ +From c70560feef0eb61a150cd2f956f0beead4313ffe Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Apr 2008 21:07:06 +0200 +Subject: [PATCH] logging: add trailing newline to all strings + +--- + extras/ata_id/ata_id.c | 8 +- + extras/cdrom_id/cdrom_id.c | 37 +++--- + extras/edd_id/edd_id.c | 28 ++-- + extras/scsi_id/scsi_id.c | 40 +++--- + extras/scsi_id/scsi_serial.c | 76 +++++----- + extras/usb_id/usb_id.c | 24 ++-- + extras/volume_id/lib/adaptec_raid.c | 2 +- + extras/volume_id/lib/cramfs.c | 2 +- + extras/volume_id/lib/ddf_raid.c | 2 +- + extras/volume_id/lib/ext.c | 6 +- + extras/volume_id/lib/fat.c | 40 +++--- + extras/volume_id/lib/gfs.c | 2 +- + extras/volume_id/lib/hfs.c | 32 ++-- + extras/volume_id/lib/highpoint.c | 4 +- + extras/volume_id/lib/hpfs.c | 2 +- + extras/volume_id/lib/iso9660.c | 12 +- + extras/volume_id/lib/isw_raid.c | 2 +- + extras/volume_id/lib/jfs.c | 2 +- + extras/volume_id/lib/jmicron_raid.c | 2 +- + extras/volume_id/lib/linux_raid.c | 4 +- + extras/volume_id/lib/linux_swap.c | 2 +- + extras/volume_id/lib/lsi_raid.c | 2 +- + extras/volume_id/lib/lvm.c | 6 +- + extras/volume_id/lib/minix.c | 2 +- + extras/volume_id/lib/netware.c | 2 +- + extras/volume_id/lib/ntfs.c | 24 ++-- + extras/volume_id/lib/nvidia_raid.c | 2 +- + extras/volume_id/lib/ocfs.c | 6 +- + extras/volume_id/lib/promise_raid.c | 2 +- + extras/volume_id/lib/reiserfs.c | 2 +- + extras/volume_id/lib/romfs.c | 2 +- + extras/volume_id/lib/silicon_raid.c | 2 +- + extras/volume_id/lib/squashfs.c | 2 +- + extras/volume_id/lib/sysv.c | 2 +- + extras/volume_id/lib/udf.c | 12 +- + extras/volume_id/lib/ufs.c | 8 +- + extras/volume_id/lib/util.c | 28 ++-- + extras/volume_id/lib/via_raid.c | 2 +- + extras/volume_id/lib/volume_id.c | 6 +- + extras/volume_id/lib/vxfs.c | 2 +- + extras/volume_id/lib/xfs.c | 2 +- + extras/volume_id/vol_id.c | 6 +- + test-udev.c | 8 +- + udev_config.c | 14 +- + udev_db.c | 30 ++-- + udev_device.c | 40 +++--- + udev_node.c | 68 +++++----- + udev_rules.c | 268 +++++++++++++++++----------------- + udev_rules_parse.c | 128 +++++++++--------- + udev_selinux.c | 18 ++-- + udev_sysfs.c | 52 ++++---- + udev_utils.c | 22 ++-- + udev_utils_file.c | 14 +- + udevadm.c | 11 +- + udevcontrol.c | 16 +- + udevd.8 | 4 +- + udevd.c | 147 ++++++++++---------- + udevd.xml | 4 +- + udevinfo.c | 16 +- + udevsettle.c | 16 +- + udevtest.c | 10 +- + udevtrigger.c | 8 +- + 62 files changed, 671 insertions(+), 674 deletions(-) + +diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c +index f94cdc0..6d3c233 100644 +--- a/extras/ata_id/ata_id.c ++++ b/extras/ata_id/ata_id.c +@@ -126,24 +126,24 @@ int main(int argc, char *argv[]) + + node = argv[optind]; + if (node == NULL) { +- err("no node specified"); ++ err("no node specified\n"); + rc = 1; + goto exit; + } + + fd = open(node, O_RDONLY|O_NONBLOCK); + if (fd < 0) { +- err("unable to open '%s'", node); ++ err("unable to open '%s'\n", node); + rc = 1; + goto exit; + } + + if (ioctl(fd, HDIO_GET_IDENTITY, &id)) { + if (errno == ENOTTY) { +- info("HDIO_GET_IDENTITY unsupported for '%s'", node); ++ info("HDIO_GET_IDENTITY unsupported for '%s'\n", node); + rc = 2; + } else { +- err("HDIO_GET_IDENTITY failed for '%s'", node); ++ err("HDIO_GET_IDENTITY failed for '%s'\n", node); + rc = 3; + } + goto close; +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 315d276..b88f5b4 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -71,7 +71,6 @@ void log_message(int priority, const char *format, ...) + if (debug) { + fprintf(stderr, "[%d] ", (int) getpid()); + vfprintf(stderr, format, args); +- fprintf(stderr, "\n"); + } else + vsyslog(priority, format, args); + va_end(args); +@@ -137,10 +136,10 @@ static unsigned long long int cd_media_session_last_offset; + static void info_scsi_cmd_err(const char *cmd, int err) + { + if (err == -1) { +- info("%s failed", cmd); ++ info("%s failed\n", cmd); + return; + } +- info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); ++ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh\n", cmd, SK(err), ASC(err), ASCQ(err)); + } + + struct scsi_cmd { +@@ -199,7 +198,7 @@ static int cd_capability_compat(int fd) + + capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); + if (capabilty < 0) { +- info("CDROM_GET_CAPABILITY failed"); ++ info("CDROM_GET_CAPABILITY failed\n"); + return -1; + } + +@@ -235,11 +234,11 @@ static int cd_inquiry(int fd) { + } + + if ((inq[0] & 0x1F) != 5) { +- info("not an MMC unit"); ++ info("not an MMC unit\n"); + return -1; + } + +- info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); ++ info("INQUIRY: [%.8s][%.16s][%.4s]\n", inq + 8, inq + 16, inq + 32); + return 0; + } + +@@ -264,9 +263,9 @@ static int cd_profiles(int fd) + } + + len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); +- info("GET CONFIGURATION: number of profiles %i", len); ++ info("GET CONFIGURATION: number of profiles %i\n", len); + if (len > sizeof(profiles)) { +- info("invalid number of profiles"); ++ info("invalid number of profiles\n"); + return -1; + } + +@@ -287,7 +286,7 @@ static int cd_profiles(int fd) + unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); + if (profile == 0) + continue; +- info("profile 0x%02x", profile); ++ info("profile 0x%02x\n", profile); + + switch (profile) { + case 0x03: +@@ -343,9 +342,9 @@ static int cd_profiles(int fd) + + /* current media profile */ + cur_profile = header[6] << 8 | header[7]; +- info("current profile 0x%02x", cur_profile); ++ info("current profile 0x%02x\n", cur_profile); + if (cur_profile == 0) { +- info("no current profile, assuming no media"); ++ info("no current profile, assuming no media\n"); + return -1; + } + +@@ -435,7 +434,7 @@ static int cd_media_info(int fd) + return -1; + }; + +- info("disk type %02x", header[8]); ++ info("disk type %02x\n", header[8]); + + if ((header[2] & 3) < 4) + cd_media_state = media_status[header[2] & 3]; +@@ -467,12 +466,12 @@ static int cd_media_toc(int fd) + } + + len = (header[0] << 8 | header[1]) + 2; +- info("READ TOC: len: %d", len); ++ info("READ TOC: len: %d\n", len); + if (len > sizeof(toc)) + return -1; + + /* check if we have a data track */ +- info("ctl %02x (0x04 is data/audio)", header[5]); ++ info("ctl %02x (0x04 is data/audio)\n", header[5]); + cd_media_has_audio = (header[5] & 0x04) == 0; + + scsi_cmd_set(&sc, 0, 0x43); +@@ -490,7 +489,7 @@ static int cd_media_toc(int fd) + unsigned int block; + + block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; +- info("track %u starts at block %u", p[2], block); ++ info("track %u starts at block %u\n", p[2], block); + } + + scsi_cmd_set(&sc, 0, 0x43); +@@ -503,7 +502,7 @@ static int cd_media_toc(int fd) + return -1; + } + len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; +- info("last track %u starts at block %u", header[4+2], len); ++ info("last track %u starts at block %u\n", header[4+2], len); + cd_media_session_last_offset = (unsigned long long int)len * 2048; + return 0; + } +@@ -550,7 +549,7 @@ int main(int argc, char *argv[]) + + node = argv[optind]; + if (!node) { +- err("no device"); ++ err("no device\n"); + fprintf(stderr, "no device\n"); + rc = 1; + goto exit; +@@ -558,11 +557,11 @@ int main(int argc, char *argv[]) + + fd = open(node, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("unable to open '%s'", node); ++ info("unable to open '%s'\n", node); + rc = 1; + goto exit; + } +- info("probing: '%s'", node); ++ info("probing: '%s'\n", node); + + /* same data as original cdrom_id */ + if (cd_capability_compat(fd) < 0) { +diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c +index 4ba89ed..4a17770 100644 +--- a/extras/edd_id/edd_id.c ++++ b/extras/edd_id/edd_id.c +@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) + node = arg; + } + if (node == NULL) { +- err("no node specified"); ++ err("no node specified\n"); + fprintf(stderr, "no node specified\n"); + goto exit; + } +@@ -83,7 +83,7 @@ int main(int argc, char *argv[]) + /* check for kernel support */ + dir = opendir("/sys/firmware/edd"); + if (dir == NULL) { +- info("no kernel EDD support"); ++ info("no kernel EDD support\n"); + fprintf(stderr, "no kernel EDD support\n"); + rc = 2; + goto exit; +@@ -91,7 +91,7 @@ int main(int argc, char *argv[]) + + disk_fd = open(node, O_RDONLY); + if (disk_fd < 0) { +- info("unable to open '%s'", node); ++ info("unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); + rc = 3; + goto closedir; +@@ -99,38 +99,38 @@ int main(int argc, char *argv[]) + + /* check for valid MBR signature */ + if (lseek(disk_fd, 510, SEEK_SET) < 0) { +- info("seek to MBR validity failed '%s'", node); ++ info("seek to MBR validity failed '%s'\n", node); + rc = 4; + goto close; + } + if (read(disk_fd, &mbr_valid, sizeof(mbr_valid)) != sizeof(mbr_valid)) { +- info("read MBR validity failed '%s'", node); ++ info("read MBR validity failed '%s'\n", node); + rc = 5; + goto close; + } + if (mbr_valid != 0xAA55) { + fprintf(stderr, "no valid MBR signature '%s'\n", node); +- info("no valid MBR signature '%s'", node); ++ info("no valid MBR signature '%s'\n", node); + rc=6; + goto close; + } + + /* read EDD signature */ + if (lseek(disk_fd, 440, SEEK_SET) < 0) { +- info("seek to signature failed '%s'", node); ++ info("seek to signature failed '%s'\n", node); + rc = 7; + goto close; + } + if (read(disk_fd, &disk_id, sizeof(disk_id)) != sizeof(disk_id)) { +- info("read signature failed '%s'", node); ++ info("read signature failed '%s'\n", node); + rc = 8; + goto close; + } + /* all zero is invalid */ +- info("read id 0x%08x from '%s'", disk_id, node); ++ info("read id 0x%08x from '%s'\n", disk_id, node); + if (disk_id == 0) { + fprintf(stderr, "no EDD signature '%s'\n", node); +- info("'%s' signature is zero", node); ++ info("'%s' signature is zero\n", node); + rc = 9; + goto close; + } +@@ -150,18 +150,18 @@ int main(int argc, char *argv[]) + + sysfs_fd = open(file, O_RDONLY); + if (sysfs_fd < 0) { +- info("unable to open sysfs '%s'", file); ++ info("unable to open sysfs '%s'\n", file); + continue; + } + + size = read(sysfs_fd, sysfs_id_buf, sizeof(sysfs_id_buf)-1); + close(sysfs_fd); + if (size <= 0) { +- info("read sysfs '%s' failed", file); ++ info("read sysfs '%s' failed\n", file); + continue; + } + sysfs_id_buf[size] = '\0'; +- info("read '%s' from '%s'", sysfs_id_buf, file); ++ info("read '%s' from '%s'\n", sysfs_id_buf, file); + sysfs_id = strtoul(sysfs_id_buf, NULL, 16); + + /* look for matching value, that appears only once */ +@@ -171,7 +171,7 @@ int main(int argc, char *argv[]) + strlcpy(match, dent->d_name, sizeof(match)); + } else { + /* error, same signature for another device */ +- info("'%s' does not have a unique signature", node); ++ info("'%s' does not have a unique signature\n", node); + fprintf(stderr, "'%s' does not have a unique signature\n", node); + rc = 10; + goto exit; +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index d8b269a..463b377 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -174,25 +174,25 @@ static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) + unsigned int maj, min; + const char *attr; + +- dbg("%s", devpath); ++ dbg("%s\n", devpath); + attr = sysfs_attr_get_value(devpath, "dev"); + if (attr == NULL) { +- dbg("%s: could not get dev attribute: %s", devpath, strerror(errno)); ++ dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); + return -1; + } + +- dbg("dev value %s", attr); ++ dbg("dev value %s\n", attr); + if (sscanf(attr, "%u:%u", &maj, &min) != 2) { +- err("%s: invalid dev major/minor", devpath); ++ err("%s: invalid dev major/minor\n", devpath); + return -1; + } + + snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", + TMP_DIR, TMP_PREFIX, maj, min, getpid()); + +- dbg("tmpdev '%s'", tmpdev); ++ dbg("tmpdev '%s'\n", tmpdev); + if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { +- err("mknod failed: %s", strerror(errno)); ++ err("mknod failed: %s\n", strerror(errno)); + return -1; + } + return 0; +@@ -273,7 +273,7 @@ static int get_file_options(const char *vendor, const char *model, + if (errno == ENOENT) { + return 1; + } else { +- err("can't open %s: %s", config_file, strerror(errno)); ++ err("can't open %s: %s\n", config_file, strerror(errno)); + return -1; + } + } +@@ -285,7 +285,7 @@ static int get_file_options(const char *vendor, const char *model, + */ + buffer = malloc(MAX_BUFFER_LEN); + if (!buffer) { +- err("Can't allocate memory."); ++ err("can't allocate memory\n"); + return -1; + } + +@@ -299,7 +299,7 @@ static int get_file_options(const char *vendor, const char *model, + break; + lineno++; + if (buf[strlen(buffer) - 1] != '\n') { +- info("Config file line %d too long.\n", lineno); ++ info("Config file line %d too long\n", lineno); + break; + } + +@@ -344,14 +344,14 @@ static int get_file_options(const char *vendor, const char *model, + } + options_in = str1; + } +- dbg("config file line %d:" ++ dbg("config file line %d:\n" + " vendor '%s'; model '%s'; options '%s'\n", + lineno, vendor_in, model_in, options_in); + /* + * Only allow: [vendor=foo[,model=bar]]options=stuff + */ + if (!options_in || (!vendor_in && model_in)) { +- info("Error parsing config file line %d '%s'", lineno, buffer); ++ info("Error parsing config file line %d '%s'\n", lineno, buffer); + retval = -1; + break; + } +@@ -389,7 +389,7 @@ static int get_file_options(const char *vendor, const char *model, + c = argc_count(buffer) + 2; + *newargv = calloc(c, sizeof(**newargv)); + if (!*newargv) { +- err("Can't allocate memory."); ++ err("can't allocate memory\n"); + retval = -1; + } else { + *argc = c; +@@ -492,7 +492,7 @@ static int set_options(int argc, char **argv, const char *short_opts, + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + default_page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'", optarg); ++ info("Unknown page code '%s'\n", optarg); + return -1; + } + break; +@@ -571,13 +571,13 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + *page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'", optarg); ++ info("Unknown page code '%s'\n", optarg); + retval = -1; + } + break; + + default: +- info("Unknown or bad option '%c' (0x%x)", option, option); ++ info("Unknown or bad option '%c' (0x%x)\n", option, option); + retval = -1; + break; + } +@@ -596,7 +596,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) + + vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!vendor) { +- info("%s: cannot get vendor attribute", dev_scsi->devpath); ++ info("%s: cannot get vendor attribute\n", dev_scsi->devpath); + return -1; + } + set_str(vendor_str, vendor, sizeof(vendor_str)-1); +@@ -610,7 +610,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) + + type = sysfs_attr_get_value(dev_scsi->devpath, "type"); + if (!type) { +- info("%s: cannot get type attribute", dev_scsi->devpath); ++ info("%s: cannot get type attribute\n", dev_scsi->devpath); + return -1; + } + set_type(type_str, type, sizeof(type_str)); +@@ -690,7 +690,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + + dev = sysfs_device_get(devpath); + if (dev == NULL) { +- err("unable to access '%s'", devpath); ++ err("unable to access '%s'\n", devpath); + return 1; + } + +@@ -709,7 +709,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + /* get scsi parent device */ + dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); + if (dev_scsi == NULL) { +- err("unable to access parent device of '%s'", devpath); ++ err("unable to access parent device of '%s'\n", devpath); + return 1; + } + set_sysfs_values(dev_scsi); +@@ -721,7 +721,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + + /* get per device (vendor + model) options from the config file */ + retval = per_dev_options(dev_scsi, &good_dev, &page_code); +- dbg("per dev options: good %d; page code 0x%x", good_dev, page_code); ++ dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); + + if (!good_dev) { + retval = 1; +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index c84f41e..28e82db 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -179,7 +179,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + + sb_len = io->sb_len_wr; + if (sb_len < 1) { +- info("%s: sense buffer empty", dev_scsi->kernel); ++ info("%s: sense buffer empty\n", dev_scsi->kernel); + return -1; + } + +@@ -193,7 +193,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + */ + s = sense_buffer[7] + 8; + if (sb_len < s) { +- info("%s: sense buffer too small %d bytes, %d bytes too short", ++ info("%s: sense buffer too small %d bytes, %d bytes too short\n", + dev_scsi->kernel, sb_len, s - sb_len); + return -1; + } +@@ -204,7 +204,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + /* + * Possible? + */ +- info("%s: sense result too" " small %d bytes", ++ info("%s: sense result too" " small %d bytes\n", + dev_scsi->kernel, s); + return -1; + } +@@ -216,25 +216,25 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + asc = sense_buffer[2]; + ascq = sense_buffer[3]; + } else { +- info("%s: invalid sense code 0x%x", ++ info("%s: invalid sense code 0x%x\n", + dev_scsi->kernel, code); + return -1; + } +- info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x", ++ info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x\n", + dev_scsi->kernel, sense_key, asc, ascq); + } else { + if (sb_len < 4) { +- info("%s: sense buffer too small %d bytes, %d bytes too short", ++ info("%s: sense buffer too small %d bytes, %d bytes too short\n", + dev_scsi->kernel, sb_len, 4 - sb_len); + return -1; + } + + if (sense_buffer[0] < 15) +- info("%s: old sense key: 0x%x", dev_scsi->kernel, sense_buffer[0] & 0x0f); ++ info("%s: old sense key: 0x%x\n", dev_scsi->kernel, sense_buffer[0] & 0x0f); + else +- info("%s: sense = %2x %2x", ++ info("%s: sense = %2x %2x\n", + dev_scsi->kernel, sense_buffer[0], sense_buffer[2]); +- info("%s: non-extended sense class %d code 0x%0x", ++ info("%s: non-extended sense class %d code 0x%0x\n", + dev_scsi->kernel, sense_class, code); + + } +@@ -247,8 +247,8 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + out_buffer[j++] = ' '; + } + out_buffer[j] = '\0'; +- info("%s: sense dump:", dev_scsi->kernel); +- info("%s: %s", dev_scsi->kernel, out_buffer); ++ info("%s: sense dump:\n", dev_scsi->kernel); ++ info("%s: %s\n", dev_scsi->kernel, out_buffer); + + #endif + return -1; +@@ -261,11 +261,11 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + /* + * Impossible, should not be called. + */ +- info("%s: called with no error", __FUNCTION__); ++ info("%s: called with no error\n", __FUNCTION__); + return -1; + } + +- info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x", ++ info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", + dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); + if (io->status == SCSI_CHECK_CONDITION) + return scsi_dump_sense(dev_scsi, io); +@@ -285,7 +285,7 @@ static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, + int retry = 3; /* rather random */ + + if (buflen > SCSI_INQ_BUFF_LEN) { +- info("buflen %d too long", buflen); ++ info("buflen %d too long\n", buflen); + return -1; + } + +@@ -304,7 +304,7 @@ resend: + io_hdr.timeout = DEF_TIMEOUT; + + if (ioctl(fd, SG_IO, &io_hdr) < 0) { +- info("%s: ioctl failed: %s", dev_scsi->kernel, strerror(errno)); ++ info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); + retval = -1; + goto error; + } +@@ -336,7 +336,7 @@ resend: + + error: + if (retval < 0) +- info("%s: Unable to get INQUIRY vpd %d page 0x%x.", ++ info("%s: Unable to get INQUIRY vpd %d page 0x%x.\n", + dev_scsi->kernel, evpd, page); + + return retval; +@@ -355,11 +355,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + return 1; + + if (buffer[1] != 0) { +- info("%s: page 0 not available.", dev_scsi->kernel); ++ info("%s: page 0 not available.\n", dev_scsi->kernel); + return 1; + } + if (buffer[3] > len) { +- info("%s: page 0 buffer too long %d", dev_scsi->kernel, buffer[3]); ++ info("%s: page 0 buffer too long %d\n", dev_scsi->kernel, buffer[3]); + return 1; + } + +@@ -377,11 +377,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + */ + vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!vendor) { +- info("%s: cannot get model attribute", dev_scsi->kernel); ++ info("%s: cannot get model attribute\n", dev_scsi->kernel); + return 1; + } + if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { +- info("%s: invalid page0 data", dev_scsi->kernel); ++ info("%s: invalid page0 data\n", dev_scsi->kernel); + return 1; + } + } +@@ -399,7 +399,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + + attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!attr) { +- info("%s: cannot get vendor attribute", dev_scsi->kernel); ++ info("%s: cannot get vendor attribute\n", dev_scsi->kernel); + return 1; + } + strncpy(serial, attr, VENDOR_LENGTH); +@@ -407,7 +407,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + + attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); + if (!attr) { +- info("%s: cannot get model attribute", dev_scsi->kernel); ++ info("%s: cannot get model attribute\n", dev_scsi->kernel); + return 1; + } + strncat(serial, attr, MODEL_LENGTH); +@@ -419,7 +419,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + * above, ind will never be too large. + */ + if (ind != (VENDOR_LENGTH + MODEL_LENGTH)) { +- info("%s: expected length %d, got length %d", ++ info("%s: expected length %d, got length %d\n", + dev_scsi->kernel, (VENDOR_LENGTH + MODEL_LENGTH), ind); + return 1; + } +@@ -477,7 +477,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, + len += VENDOR_LENGTH + MODEL_LENGTH; + + if (max_len < len) { +- info("%s: length %d too short - need %d", ++ info("%s: length %d too short - need %d\n", + dev_scsi->kernel, max_len, len); + return 1; + } +@@ -528,7 +528,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, + { + int i, j; + +- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); ++ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); + serial[0] = hex_str[id_search->id_type]; + /* serial has been memset to zero before */ + j = strlen(serial); /* j = 1; */ +@@ -557,7 +557,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, + return 1; + + if (page_83[1] != PAGE_83) { +- info("%s: Invalid page 0x83", dev_scsi->kernel); ++ info("%s: Invalid page 0x83\n", dev_scsi->kernel); + return 1; + } + +@@ -613,13 +613,13 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, + id_search_list[id_ind].naa_type, + id_search_list[id_ind].code_set); + if (!retval) { +- dbg(" used\n"); ++ dbg(" used\n"); + return retval; + } else if (retval < 0) { +- dbg(" failed\n"); ++ dbg(" failed\n"); + return retval; + } else { +- dbg(" not used\n"); ++ dbg(" not used\n"); + } + } + } +@@ -646,7 +646,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, + return 1; + + if (page_83[1] != PAGE_83) { +- info("%s: Invalid page 0x83", dev_scsi->kernel); ++ info("%s: Invalid page 0x83\n", dev_scsi->kernel); + return 1; + } + /* +@@ -690,7 +690,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, + serial[j++] = hex_str[page_83[i] & 0x0f]; + i++; + } +- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); ++ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); + return 0; + } + +@@ -710,13 +710,13 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, + return retval; + + if (buf[1] != PAGE_80) { +- info("%s: Invalid page 0x80", dev_scsi->kernel); ++ info("%s: Invalid page 0x80\n", dev_scsi->kernel); + return 1; + } + + len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3]; + if (max_len < len) { +- info("%s: length %d too short - need %d", ++ info("%s: length %d too short - need %d\n", + dev_scsi->kernel, max_len, len); + return 1; + } +@@ -746,7 +746,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("%s: cannot open %s: %s", ++ info("%s: cannot open %s: %s\n", + dev_scsi->kernel, devname, strerror(errno)); + return 1; + } +@@ -762,7 +762,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, + sprintf(type,"%x", buf[0] & 0x1f); + + if (close(fd) < 0) +- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); ++ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); + + return 0; + } +@@ -779,7 +779,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("%s: cannot open %s: %s", ++ info("%s: cannot open %s: %s\n", + dev_scsi->kernel, devname, strerror(errno)); + return 1; + } +@@ -826,7 +826,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + goto completed; + } + } else if (page_code != 0x00) { +- info("%s: unsupported page code 0x%d", dev_scsi->kernel, page_code); ++ info("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code); + return 1; + } + +@@ -870,6 +870,6 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + retval = 1; + completed: + if (close(fd) < 0) +- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); ++ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); + return retval; + } +diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c +index 5fb030d..fed6631 100644 +--- a/extras/usb_id/usb_id.c ++++ b/extras/usb_id/usb_id.c +@@ -231,20 +231,20 @@ static int usb_id(const char *devpath) + /* get all usb specific information: dev_interface, if_class, dev_usb */ + dev = sysfs_device_get(devpath); + if (dev == NULL) { +- err("unable to access '%s'", devpath); ++ err("unable to access '%s'\n", devpath); + return 1; + } + + /* usb interface directory */ + dev_interface = sysfs_device_get_parent_with_subsystem(dev, "usb"); + if (dev_interface == NULL) { +- info("unable to access usb_interface device of '%s'", devpath); ++ info("unable to access usb_interface device of '%s'\n", devpath); + return 1; + } + + if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass"); + if (!if_class) { +- info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel); ++ info("%s: cannot get bInterfaceClass attribute\n", dev_interface->kernel); + return 1; + } + if_class_num = strtoul(if_class, NULL, 16); +@@ -260,7 +260,7 @@ static int usb_id(const char *devpath) + /* usb device directory */ + dev_usb = sysfs_device_get_parent_with_subsystem(dev_interface, "usb"); + if (!dev_usb) { +- info("unable to find parent 'usb' device of '%s'", devpath); ++ info("unable to find parent 'usb' device of '%s'\n", devpath); + return 1; + } + +@@ -273,39 +273,39 @@ static int usb_id(const char *devpath) + /* get scsi device */ + dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); + if (dev_scsi == NULL) { +- info("unable to find parent 'scsi' device of '%s'", devpath); ++ info("unable to find parent 'scsi' device of '%s'\n", devpath); + goto fallback; + } + if (sscanf(dev_scsi->kernel, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) { +- info("invalid scsi device '%s'", dev_scsi->kernel); ++ info("invalid scsi device '%s'\n", dev_scsi->kernel); + goto fallback; + } + + /* Generic SPC-2 device */ + scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); + if (!scsi_vendor) { +- info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI vendor attribute\n", dev_scsi->kernel); + goto fallback; + } + set_str(vendor_str, scsi_vendor, sizeof(vendor_str)-1); + + scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model"); + if (!scsi_model) { +- info("%s: cannot get SCSI model attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI model attribute\n", dev_scsi->kernel); + goto fallback; + } + set_str(model_str, scsi_model, sizeof(model_str)-1); + + scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type"); + if (!scsi_type) { +- info("%s: cannot get SCSI type attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI type attribute\n", dev_scsi->kernel); + goto fallback; + } + set_scsi_type(type_str, scsi_type, sizeof(type_str)-1); + + scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev"); + if (!scsi_rev) { +- info("%s: cannot get SCSI revision attribute", dev_scsi->kernel); ++ info("%s: cannot get SCSI revision attribute\n", dev_scsi->kernel); + goto fallback; + } + set_str(revision_str, scsi_rev, sizeof(revision_str)-1); +@@ -329,7 +329,7 @@ fallback: + usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "idVendor"); + + if (!usb_vendor) { +- info("No USB vendor information available"); ++ info("No USB vendor information available\n"); + return 1; + } + set_str(vendor_str, usb_vendor, sizeof(vendor_str)-1); +@@ -345,7 +345,7 @@ fallback: + usb_model = sysfs_attr_get_value(dev_usb->devpath, "idProduct"); + + if (!usb_model) { +- dbg("No USB model information available"); ++ dbg("No USB model information available\n"); + return 1; + } + set_str(model_str, usb_model, sizeof(model_str)-1); +diff --git a/extras/volume_id/lib/adaptec_raid.c b/extras/volume_id/lib/adaptec_raid.c +index 858c3ba..5ab9451 100644 +--- a/extras/volume_id/lib/adaptec_raid.c ++++ b/extras/volume_id/lib/adaptec_raid.c +@@ -86,7 +86,7 @@ int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t si + uint64_t meta_off; + struct adaptec_meta *ad; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/cramfs.c b/extras/volume_id/lib/cramfs.c +index bf32950..9c7eaf6 100644 +--- a/extras/volume_id/lib/cramfs.c ++++ b/extras/volume_id/lib/cramfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct cramfs_super *cs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200); + if (cs == NULL) +diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c +index 560e6bd..60837a4 100644 +--- a/extras/volume_id/lib/ddf_raid.c ++++ b/extras/volume_id/lib/ddf_raid.c +@@ -45,7 +45,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) + uint64_t ddf_off = ((size / 0x200)-1) * 0x200; + const uint8_t *buf; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + if (size < 0x10000) + return -1; +diff --git a/extras/volume_id/lib/ext.c b/extras/volume_id/lib/ext.c +index ac21f12..56edd25 100644 +--- a/extras/volume_id/lib/ext.c ++++ b/extras/volume_id/lib/ext.c +@@ -132,7 +132,7 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) + uint32_t feature_incompat; + uint32_t flags; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200); + if (es == NULL) +@@ -142,9 +142,9 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + + bsize = 0x400 << le32_to_cpu(es->s_log_block_size); +- dbg("ext blocksize 0x%zx", bsize); ++ dbg("ext blocksize 0x%zx\n", bsize); + if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) { +- dbg("invalid ext blocksize"); ++ dbg("invalid ext blocksize\n"); + return -1; + } + +diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c +index 3ddf025..58f8f82 100644 +--- a/extras/volume_id/lib/fat.c ++++ b/extras/volume_id/lib/fat.c +@@ -217,7 +217,7 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, + for (i = 0; i < count; i++) { + /* end marker */ + if (dir[i].name[0] == 0x00) { +- dbg("end of dir"); ++ dbg("end of dir\n"); + break; + } + +@@ -234,11 +234,11 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, + if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0) + continue; + +- dbg("found ATTR_VOLUME_ID id in root dir"); ++ dbg("found ATTR_VOLUME_ID id in root dir\n"); + return fat_read_filename(filename, fnsize, dir, &dir[i]); + } + +- dbg("skip dir entry"); ++ dbg("skip dir entry\n"); + } + + return 0; +@@ -270,7 +270,7 @@ int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size) + int maxloop; + size_t fnlen; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off, 0x400); + if (buf == NULL) +@@ -328,22 +328,22 @@ magic: + if (sector_size == 0 || ((sector_size & (sector_size-1)) != 0)) + return -1; + +- dbg("sector_size 0x%x", sector_size); +- dbg("sectors_per_cluster 0x%x", vs->sectors_per_cluster); ++ dbg("sector_size 0x%x\n", sector_size); ++ dbg("sectors_per_cluster 0x%x\n", vs->sectors_per_cluster); + + dir_entries = le16_to_cpu(vs->dir_entries); + reserved = le16_to_cpu(vs->reserved); +- dbg("reserved 0x%x", reserved); ++ dbg("reserved 0x%x\n", reserved); + + sect_count = le16_to_cpu(vs->sectors); + if (sect_count == 0) + sect_count = le32_to_cpu(vs->total_sect); +- dbg("sect_count 0x%x", sect_count); ++ dbg("sect_count 0x%x\n", sect_count); + + fat_length = le16_to_cpu(vs->fat_length); +- dbg("fat_length 0x%x", fat_length); ++ dbg("fat_length 0x%x\n", fat_length); + fat32_length = le32_to_cpu(vs->type.fat32.fat32_length); +- dbg("fat32_length 0x%x", fat32_length); ++ dbg("fat32_length 0x%x\n", fat32_length); + + if (fat_length) + fat_size = fat_length * vs->fats; +@@ -351,15 +351,15 @@ magic: + fat_size = fat32_length * vs->fats; + else + return -1; +- dbg("fat_size 0x%x", fat_size); ++ dbg("fat_size 0x%x\n", fat_size); + + dir_size = ((dir_entries * sizeof(struct vfat_dir_entry)) + + (sector_size-1)) / sector_size; +- dbg("dir_size 0x%x", dir_size); ++ dbg("dir_size 0x%x\n", dir_size); + + cluster_count = sect_count - (reserved + fat_size + dir_size); + cluster_count /= vs->sectors_per_cluster; +- dbg("cluster_count 0x%x", cluster_count); ++ dbg("cluster_count 0x%x\n", cluster_count); + + /* must be FAT32 */ + if (!fat_length && fat32_length) +@@ -375,9 +375,9 @@ magic: + + /* the label may be an attribute in the root directory */ + root_start = (reserved + fat_size) * sector_size; +- dbg("root dir start 0x%llx", (unsigned long long) root_start); ++ dbg("root dir start 0x%llx\n", (unsigned long long) root_start); + root_dir_entries = le16_to_cpu(vs->dir_entries); +- dbg("expected entries 0x%x", root_dir_entries); ++ dbg("expected entries 0x%x\n", root_dir_entries); + + buf_size = root_dir_entries * sizeof(struct vfat_dir_entry); + buf = volume_id_get_buffer(id, off + root_start, buf_size); +@@ -423,7 +423,7 @@ fat32: + /* FAT32 root dir is a cluster chain like any other directory */ + buf_size = vs->sectors_per_cluster * sector_size; + root_cluster = le32_to_cpu(vs->type.fat32.root_cluster); +- dbg("root dir cluster %u", root_cluster); ++ dbg("root dir cluster %u\n", root_cluster); + start_data_sect = reserved + fat_size; + + next = root_cluster; +@@ -434,10 +434,10 @@ fat32: + uint64_t fat_entry_off; + int count; + +- dbg("next cluster %u", next); ++ dbg("next cluster %u\n", next); + next_sect_off = (next - 2) * vs->sectors_per_cluster; + next_off = (start_data_sect + next_sect_off) * sector_size; +- dbg("cluster offset 0x%llx", (unsigned long long) next_off); ++ dbg("cluster offset 0x%llx\n", (unsigned long long) next_off); + + /* get cluster */ + buf = volume_id_get_buffer(id, off + next_off, buf_size); +@@ -446,7 +446,7 @@ fat32: + + dir = (struct vfat_dir_entry*) buf; + count = buf_size / sizeof(struct vfat_dir_entry); +- dbg("expected entries 0x%x", count); ++ dbg("expected entries 0x%x\n", count); + + fnlen = get_fat_attr_volume_id(filename, sizeof(filename), dir, count); + if (fnlen > 0) +@@ -464,7 +464,7 @@ fat32: + break; + } + if (maxloop == 0) +- dbg("reached maximum follow count of root cluster chain, give up"); ++ dbg("reached maximum follow count of root cluster chain, give up\n"); + + vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200); + if (vs == NULL) +diff --git a/extras/volume_id/lib/gfs.c b/extras/volume_id/lib/gfs.c +index 1d3a4a0..5338222 100644 +--- a/extras/volume_id/lib/gfs.c ++++ b/extras/volume_id/lib/gfs.c +@@ -78,7 +78,7 @@ static int volume_id_probe_gfs_generic(struct volume_id *id, uint64_t off, int v + { + struct gfs2_sb *sbd; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + sbd = (struct gfs2_sb *) + volume_id_get_buffer(id, off + GFS_SUPERBLOCK_OFFSET, sizeof(struct gfs2_sb)); +diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c +index 70a6b4a..b6d7e02 100644 +--- a/extras/volume_id/lib/hfs.c ++++ b/extras/volume_id/lib/hfs.c +@@ -186,7 +186,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz + struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; + const uint8_t *buf; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +@@ -199,17 +199,17 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz + /* it may be just a hfs wrapper for hfs+ */ + if (memcmp(hfs->embed_sig, "H+", 2) == 0) { + alloc_block_size = be32_to_cpu(hfs->al_blk_size); +- dbg("alloc_block_size 0x%x", alloc_block_size); ++ dbg("alloc_block_size 0x%x\n", alloc_block_size); + + alloc_first_block = be16_to_cpu(hfs->al_bl_st); +- dbg("alloc_first_block 0x%x", alloc_first_block); ++ dbg("alloc_first_block 0x%x\n", alloc_first_block); + + embed_first_block = be16_to_cpu(hfs->embed_startblock); +- dbg("embed_first_block 0x%x", embed_first_block); ++ dbg("embed_first_block 0x%x\n", embed_first_block); + + off += (alloc_first_block * 512) + + (embed_first_block * alloc_block_size); +- dbg("hfs wrapped hfs+ found at offset 0x%llx", (unsigned long long) off); ++ dbg("hfs wrapped hfs+ found at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +@@ -241,11 +241,11 @@ hfsplus: + hfsid_set_uuid(id, hfsplus->finder_info.id); + + blocksize = be32_to_cpu(hfsplus->blocksize); +- dbg("blocksize %u", blocksize); ++ dbg("blocksize %u\n", blocksize); + + memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); + cat_block = be32_to_cpu(extents[0].start_block); +- dbg("catalog start block 0x%x", cat_block); ++ dbg("catalog start block 0x%x\n", cat_block); + + buf = volume_id_get_buffer(id, off + (cat_block * blocksize), 0x2000); + if (buf == NULL) +@@ -255,13 +255,13 @@ hfsplus: + &buf[sizeof(struct hfsplus_bnode_descriptor)]; + + leaf_node_head = be32_to_cpu(bnode->leaf_head); +- dbg("catalog leaf node 0x%x", leaf_node_head); ++ dbg("catalog leaf node 0x%x\n", leaf_node_head); + + leaf_node_size = be16_to_cpu(bnode->node_size); +- dbg("leaf node size 0x%x", leaf_node_size); ++ dbg("leaf node size 0x%x\n", leaf_node_size); + + leaf_node_count = be32_to_cpu(bnode->leaf_count); +- dbg("leaf node count 0x%x", leaf_node_count); ++ dbg("leaf node count 0x%x\n", leaf_node_count); + if (leaf_node_count == 0) + goto found; + +@@ -271,7 +271,7 @@ hfsplus: + for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) { + ext_block_start = be32_to_cpu(extents[ext].start_block); + ext_block_count = be32_to_cpu(extents[ext].block_count); +- dbg("extent start block 0x%x, count 0x%x", ext_block_start, ext_block_count); ++ dbg("extent start block 0x%x, count 0x%x\n", ext_block_start, ext_block_count); + + if (ext_block_count == 0) + goto found; +@@ -284,7 +284,7 @@ hfsplus: + } + if (ext == HFSPLUS_EXTENT_COUNT) + goto found; +- dbg("found block in extent %i", ext); ++ dbg("found block in extent %i\n", ext); + + leaf_off = (ext_block_start + leaf_block) * blocksize; + +@@ -293,10 +293,10 @@ hfsplus: + goto found; + + descr = (struct hfsplus_bnode_descriptor *) buf; +- dbg("descriptor type 0x%x", descr->type); ++ dbg("descriptor type 0x%x\n", descr->type); + + record_count = be16_to_cpu(descr->num_recs); +- dbg("number of records %u", record_count); ++ dbg("number of records %u\n", record_count); + if (record_count == 0) + goto found; + +@@ -306,12 +306,12 @@ hfsplus: + key = (struct hfsplus_catalog_key *) + &buf[sizeof(struct hfsplus_bnode_descriptor)]; + +- dbg("parent id 0x%x", be32_to_cpu(key->parent_id)); ++ dbg("parent id 0x%x\n", be32_to_cpu(key->parent_id)); + if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID) + goto found; + + label_len = be16_to_cpu(key->unicode_len) * 2; +- dbg("label unicode16 len %i", label_len); ++ dbg("label unicode16 len %i\n", label_len); + volume_id_set_label_raw(id, key->unicode, label_len); + volume_id_set_label_unicode16(id, key->unicode, BE, label_len); + +diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c +index f2c4069..0629015 100644 +--- a/extras/volume_id/lib/highpoint.c ++++ b/extras/volume_id/lib/highpoint.c +@@ -49,7 +49,7 @@ int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint6 + struct hpt37x_meta *hpt; + uint32_t magic; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200); + if (buf == NULL) +@@ -73,7 +73,7 @@ int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint6 + uint64_t meta_off; + uint32_t magic; + +- dbg("probing at offset 0x%llx, size 0x%llx", ++ dbg("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/hpfs.c b/extras/volume_id/lib/hpfs.c +index edcf066..ac5a354 100644 +--- a/extras/volume_id/lib/hpfs.c ++++ b/extras/volume_id/lib/hpfs.c +@@ -38,7 +38,7 @@ int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct hpfs_super *hs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200); + if (hs == NULL) +diff --git a/extras/volume_id/lib/iso9660.c b/extras/volume_id/lib/iso9660.c +index 1d8bdff..0e2c686 100644 +--- a/extras/volume_id/lib/iso9660.c ++++ b/extras/volume_id/lib/iso9660.c +@@ -59,7 +59,7 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) + struct iso_volume_descriptor *is; + struct high_sierra_volume_descriptor *hs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +@@ -71,11 +71,11 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) + int vd_offset; + int i; + +- dbg("read label from PVD"); ++ dbg("read label from PVD\n"); + volume_id_set_label_raw(id, is->volume_id, 32); + volume_id_set_label_string(id, is->volume_id, 32); + +- dbg("looking for SVDs"); ++ dbg("looking for SVDs\n"); + vd_offset = ISO_VD_OFFSET; + for (i = 0; i < ISO_VD_MAX; i++) { + uint8_t svd_label[64]; +@@ -86,14 +86,14 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) + if (is->type != ISO_VD_SUPPLEMENTARY) + continue; + +- dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset)); ++ dbg("found SVD at offset 0x%llx\n", (unsigned long long) (off + vd_offset)); + if (memcmp(is->escape_sequences, "%/@", 3) == 0|| + memcmp(is->escape_sequences, "%/C", 3) == 0|| + memcmp(is->escape_sequences, "%/E", 3) == 0) { +- dbg("Joliet extension found"); ++ dbg("Joliet extension found\n"); + volume_id_set_unicode16(svd_label, sizeof(svd_label), is->volume_id, BE, 32); + if (memcmp(id->label, svd_label, 16) == 0) { +- dbg("SVD label is identical, use the possibly longer PVD one"); ++ dbg("SVD label is identical, use the possibly longer PVD one\n"); + break; + } + +diff --git a/extras/volume_id/lib/isw_raid.c b/extras/volume_id/lib/isw_raid.c +index f5761e8..337a9ce 100644 +--- a/extras/volume_id/lib/isw_raid.c ++++ b/extras/volume_id/lib/isw_raid.c +@@ -43,7 +43,7 @@ int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint + uint64_t meta_off; + struct isw_meta *isw; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/jfs.c b/extras/volume_id/lib/jfs.c +index 00b66cc..950ba43 100644 +--- a/extras/volume_id/lib/jfs.c ++++ b/extras/volume_id/lib/jfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct jfs_super_block *js; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200); + if (js == NULL) +diff --git a/extras/volume_id/lib/jmicron_raid.c b/extras/volume_id/lib/jmicron_raid.c +index 5182a3e..6cb1f6f 100644 +--- a/extras/volume_id/lib/jmicron_raid.c ++++ b/extras/volume_id/lib/jmicron_raid.c +@@ -39,7 +39,7 @@ int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t si + uint64_t meta_off; + struct jmicron_meta *jm; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 5e0c4a4..96ae7c3 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -66,7 +66,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 + uint8_t bytes[16]; + } uuid; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + if (size < 0x10000) + return -1; +@@ -120,7 +120,7 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6 + { + const uint8_t *buf; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + buf = volume_id_get_buffer(id, off, 0x800); +diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c +index 50d43cc..9ff16e2 100644 +--- a/extras/volume_id/lib/linux_swap.c ++++ b/extras/volume_id/lib/linux_swap.c +@@ -43,7 +43,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size + unsigned int page; + struct swap_header_v1_2 *sw; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + /* eek, the swap signature is at the end of the PAGE_SIZE */ + for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) { +diff --git a/extras/volume_id/lib/lsi_raid.c b/extras/volume_id/lib/lsi_raid.c +index 56fd567..eef8714 100644 +--- a/extras/volume_id/lib/lsi_raid.c ++++ b/extras/volume_id/lib/lsi_raid.c +@@ -38,7 +38,7 @@ int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t s + uint64_t meta_off; + struct lsi_meta *lsi; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/lvm.c b/extras/volume_id/lib/lvm.c +index 7c4f811..d234113 100644 +--- a/extras/volume_id/lib/lvm.c ++++ b/extras/volume_id/lib/lvm.c +@@ -51,7 +51,7 @@ int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size) + const uint8_t *buf; + struct lvm1_super_block *lvm; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800); + if (buf == NULL) +@@ -78,7 +78,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) + struct lvm2_super_block *lvm; + struct lvm2_pv_header *pvhdr; + +- dbg("probing at offset 0x%llx", (unsigned long long) off); ++ dbg("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200); + if (buf == NULL) +@@ -95,7 +95,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + + found: +- dbg("found at offset 0x%x (pv hdr offset 0x%x)", ++ dbg("found at offset 0x%x (pv hdr offset 0x%x)\n", + soff, cpu_to_le32(lvm->offset_xl)); + soff += cpu_to_le32(lvm->offset_xl); + pvhdr = (struct lvm2_pv_header *) &buf[soff]; +diff --git a/extras/volume_id/lib/minix.c b/extras/volume_id/lib/minix.c +index 6494506..88b4c18 100644 +--- a/extras/volume_id/lib/minix.c ++++ b/extras/volume_id/lib/minix.c +@@ -70,7 +70,7 @@ int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size) + struct minix_super_block *ms; + struct minix3_super_block *m3s; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +diff --git a/extras/volume_id/lib/netware.c b/extras/volume_id/lib/netware.c +index 4d157aa..c034557 100644 +--- a/extras/volume_id/lib/netware.c ++++ b/extras/volume_id/lib/netware.c +@@ -82,7 +82,7 @@ int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size) + { + struct netware_super_block *nw; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + nw = (struct netware_super_block *) volume_id_get_buffer(id, off + NW_SUPERBLOCK_OFFSET, 0x200); + if (nw == NULL) +diff --git a/extras/volume_id/lib/ntfs.c b/extras/volume_id/lib/ntfs.c +index f63804d..1e73bc8 100644 +--- a/extras/volume_id/lib/ntfs.c ++++ b/extras/volume_id/lib/ntfs.c +@@ -105,7 +105,7 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + const uint8_t *buf; + const uint8_t *val; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200); + if (ns == NULL) +@@ -130,12 +130,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + else + mft_record_size = ns->cluster_per_mft_record * cluster_size; + +- dbg("sectorsize 0x%x", sector_size); +- dbg("clustersize 0x%x", cluster_size); +- dbg("mftcluster %llu", (unsigned long long) mft_cluster); +- dbg("mftoffset 0x%llx", (unsigned long long) mft_off); +- dbg("cluster per mft_record %i", ns->cluster_per_mft_record); +- dbg("mft record size %i", mft_record_size); ++ dbg("sectorsize 0x%x\n", sector_size); ++ dbg("clustersize 0x%x\n", cluster_size); ++ dbg("mftcluster %llu\n", (unsigned long long) mft_cluster); ++ dbg("mftoffset 0x%llx\n", (unsigned long long) mft_off); ++ dbg("cluster per mft_record %i\n", ns->cluster_per_mft_record); ++ dbg("mft record size %i\n", mft_record_size); + + buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size), + mft_record_size); +@@ -143,12 +143,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + + mftr = (struct master_file_table_record*) buf; +- dbg("mftr->magic '%c%c%c%c'", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); ++ dbg("mftr->magic '%c%c%c%c'\n", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); + if (memcmp(mftr->magic, "FILE", 4) != 0) + return -1; + + attr_off = le16_to_cpu(mftr->attrs_offset); +- dbg("file $Volume's attributes are at offset %i", attr_off); ++ dbg("file $Volume's attributes are at offset %i\n", attr_off); + + while (1) { + attr = (struct file_attribute*) &buf[attr_off]; +@@ -167,18 +167,18 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) + if (attr_type == MFT_RECORD_ATTR_END) + break; + +- dbg("found attribute type 0x%x, len %i, at offset %i", ++ dbg("found attribute type 0x%x, len %i, at offset %i\n", + attr_type, attr_len, attr_off); + + if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) { +- dbg("found info, len %i", val_len); ++ dbg("found info, len %i\n", val_len); + info = (struct volume_info*) (((uint8_t *) attr) + val_off); + snprintf(id->type_version, sizeof(id->type_version)-1, + "%u.%u", info->major_ver, info->minor_ver); + } + + if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) { +- dbg("found label, len %i", val_len); ++ dbg("found label, len %i\n", val_len); + if (val_len > VOLUME_ID_LABEL_SIZE) + val_len = VOLUME_ID_LABEL_SIZE; + +diff --git a/extras/volume_id/lib/nvidia_raid.c b/extras/volume_id/lib/nvidia_raid.c +index ca42459..c6b5185 100644 +--- a/extras/volume_id/lib/nvidia_raid.c ++++ b/extras/volume_id/lib/nvidia_raid.c +@@ -41,7 +41,7 @@ int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t siz + uint64_t meta_off; + struct nvidia_meta *nv; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/ocfs.c b/extras/volume_id/lib/ocfs.c +index 9f251f1..ec81f5e 100644 +--- a/extras/volume_id/lib/ocfs.c ++++ b/extras/volume_id/lib/ocfs.c +@@ -132,7 +132,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) + struct ocfs1_super_block_header *osh; + struct ocfs1_super_block_label *osl; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off, 0x200); + if (buf == NULL) +@@ -144,7 +144,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) + snprintf(id->type_version, sizeof(id->type_version)-1, + "%u.%u", osh->major_version, osh->minor_version); + +- dbg("found OracleCFS signature, now reading label"); ++ dbg("found OracleCFS signature, now reading label\n"); + buf = volume_id_get_buffer(id, off + 0x200, 0x200); + if (buf == NULL) + return -1; +@@ -170,7 +170,7 @@ int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size) + struct ocfs2_super_block *os; + size_t blksize; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + for (blksize = 0x200; blksize <= OCFS2_MAX_BLOCKSIZE; blksize <<= 1) { + buf = volume_id_get_buffer(id, off + OCFS2_SUPER_BLOCK_BLKNO * blksize, 0x200); +diff --git a/extras/volume_id/lib/promise_raid.c b/extras/volume_id/lib/promise_raid.c +index 1c4d365..ecaed00 100644 +--- a/extras/volume_id/lib/promise_raid.c ++++ b/extras/volume_id/lib/promise_raid.c +@@ -42,7 +42,7 @@ int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, u + 63, 255, 256, 16, 399, 0 + }; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x40000) +diff --git a/extras/volume_id/lib/reiserfs.c b/extras/volume_id/lib/reiserfs.c +index 18db638..0f30233 100644 +--- a/extras/volume_id/lib/reiserfs.c ++++ b/extras/volume_id/lib/reiserfs.c +@@ -60,7 +60,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size) + struct reiser4_super_block *rs4; + uint8_t *buf; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200); + if (buf == NULL) +diff --git a/extras/volume_id/lib/romfs.c b/extras/volume_id/lib/romfs.c +index 2db36d6..303a1fb 100644 +--- a/extras/volume_id/lib/romfs.c ++++ b/extras/volume_id/lib/romfs.c +@@ -37,7 +37,7 @@ int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct romfs_super *rfs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200); + if (rfs == NULL) +diff --git a/extras/volume_id/lib/silicon_raid.c b/extras/volume_id/lib/silicon_raid.c +index 634e4ab..cfdcbcb 100644 +--- a/extras/volume_id/lib/silicon_raid.c ++++ b/extras/volume_id/lib/silicon_raid.c +@@ -53,7 +53,7 @@ int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint + uint64_t meta_off; + struct silicon_meta *sil; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/squashfs.c b/extras/volume_id/lib/squashfs.c +index 035d6fb..18e44ab 100644 +--- a/extras/volume_id/lib/squashfs.c ++++ b/extras/volume_id/lib/squashfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct squashfs_super *sqs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + sqs = (struct squashfs_super *) volume_id_get_buffer(id, off, 0x200); + if (sqs == NULL) +diff --git a/extras/volume_id/lib/sysv.c b/extras/volume_id/lib/sysv.c +index e48013c..ba37c4d 100644 +--- a/extras/volume_id/lib/sysv.c ++++ b/extras/volume_id/lib/sysv.c +@@ -95,7 +95,7 @@ int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size) + struct xenix_super *xs; + unsigned int boff; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) { + vs = (struct sysv_super *) +diff --git a/extras/volume_id/lib/udf.c b/extras/volume_id/lib/udf.c +index ac2f40a..2a589c5 100644 +--- a/extras/volume_id/lib/udf.c ++++ b/extras/volume_id/lib/udf.c +@@ -72,7 +72,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size) + unsigned int loc; + unsigned int clen; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200); + if (vsd == NULL) +@@ -100,7 +100,7 @@ blocksize: + vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET + bs, 0x800); + if (vsd == NULL) + return -1; +- dbg("test for blocksize: 0x%x", bs); ++ dbg("test for blocksize: 0x%x\n", bs); + if (vsd->id[0] != '\0') + goto nsr; + } +@@ -113,7 +113,7 @@ nsr: + if (vsd == NULL) + return -1; + +- dbg("vsd: %c%c%c%c%c", ++ dbg("vsd: %c%c%c%c%c\n", + vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]); + + if (vsd->id[0] == '\0') +@@ -138,7 +138,7 @@ anchor: + /* get desriptor list address and block count */ + count = le32_to_cpu(vd->type.anchor.length) / bs; + loc = le32_to_cpu(vd->type.anchor.location); +- dbg("0x%x descriptors starting at logical secor 0x%x", count, loc); ++ dbg("0x%x descriptors starting at logical secor 0x%x\n", count, loc); + + /* pick the primary descriptor from the list */ + for (b = 0; b < count; b++) { +@@ -147,7 +147,7 @@ anchor: + return -1; + + type = le16_to_cpu(vd->tag.id); +- dbg("descriptor type %i", type); ++ dbg("descriptor type %i\n", type); + + /* check validity */ + if (type == 0) +@@ -164,7 +164,7 @@ pvd: + volume_id_set_label_raw(id, &(vd->type.primary.ident.clen), 32); + + clen = vd->type.primary.ident.clen; +- dbg("label string charsize=%i bit", clen); ++ dbg("label string charsize=%i bit\n", clen); + if (clen == 8) + volume_id_set_label_string(id, vd->type.primary.ident.c, 31); + else if (clen == 16) +diff --git a/extras/volume_id/lib/ufs.c b/extras/volume_id/lib/ufs.c +index 4ace8c9..bedcfa4 100644 +--- a/extras/volume_id/lib/ufs.c ++++ b/extras/volume_id/lib/ufs.c +@@ -175,20 +175,20 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) + struct ufs_super_block *ufs; + int offsets[] = {0, 8, 64, 256, -1}; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + for (i = 0; offsets[i] >= 0; i++) { + ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800); + if (ufs == NULL) + return -1; + +- dbg("offset 0x%x", offsets[i] * 0x400); ++ dbg("offset 0x%x\n", offsets[i] * 0x400); + magic = be32_to_cpu(ufs->fs_magic); + if ((magic == UFS_MAGIC) || + (magic == UFS2_MAGIC) || + (magic == UFS_MAGIC_FEA) || + (magic == UFS_MAGIC_LFN)) { +- dbg("magic 0x%08x(be)", magic); ++ dbg("magic 0x%08x(be)\n", magic); + goto found; + } + magic = le32_to_cpu(ufs->fs_magic); +@@ -196,7 +196,7 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) + (magic == UFS2_MAGIC) || + (magic == UFS_MAGIC_FEA) || + (magic == UFS_MAGIC_LFN)) { +- dbg("magic 0x%08x(le)", magic); ++ dbg("magic 0x%08x(le)\n", magic); + goto found; + } + } +diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c +index 0a3bd39..2a63efe 100644 +--- a/extras/volume_id/lib/util.c ++++ b/extras/volume_id/lib/util.c +@@ -353,33 +353,33 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) + { + ssize_t buf_len; + +- info("get buffer off 0x%llx(%llu), len 0x%zx", (unsigned long long) off, (unsigned long long) off, len); ++ info("get buffer off 0x%llx(%llu), len 0x%zx\n", (unsigned long long) off, (unsigned long long) off, len); + /* check if requested area fits in superblock buffer */ + if (off + len <= SB_BUFFER_SIZE) { + if (id->sbbuf == NULL) { + id->sbbuf = malloc(SB_BUFFER_SIZE); + if (id->sbbuf == NULL) { +- dbg("error malloc"); ++ dbg("error malloc\n"); + return NULL; + } + } + + /* check if we need to read */ + if ((off + len) > id->sbbuf_len) { +- info("read sbbuf len:0x%llx", (unsigned long long) (off + len)); ++ info("read sbbuf len:0x%llx\n", (unsigned long long) (off + len)); + if (lseek(id->fd, 0, SEEK_SET) < 0) { +- dbg("lseek failed (%s)", strerror(errno)); ++ dbg("lseek failed (%s)\n", strerror(errno)); + return NULL; + } + buf_len = read(id->fd, id->sbbuf, off + len); + if (buf_len < 0) { +- dbg("read failed (%s)", strerror(errno)); ++ dbg("read failed (%s)\n", strerror(errno)); + return NULL; + } +- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); ++ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); + id->sbbuf_len = buf_len; + if ((size_t)buf_len < off + len) { +- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); ++ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); + return NULL; + } + } +@@ -387,7 +387,7 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) + return &(id->sbbuf[off]); + } else { + if (len > SEEK_BUFFER_SIZE) { +- dbg("seek buffer too small %d", SEEK_BUFFER_SIZE); ++ dbg("seek buffer too small %d\n", SEEK_BUFFER_SIZE); + return NULL; + } + +@@ -395,28 +395,28 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) + if (id->seekbuf == NULL) { + id->seekbuf = malloc(SEEK_BUFFER_SIZE); + if (id->seekbuf == NULL) { +- dbg("error malloc"); ++ dbg("error malloc\n"); + return NULL; + } + } + + /* check if we need to read */ + if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) { +- info("read seekbuf off:0x%llx len:0x%zx", (unsigned long long) off, len); ++ info("read seekbuf off:0x%llx len:0x%zx\n", (unsigned long long) off, len); + if (lseek(id->fd, off, SEEK_SET) < 0) { +- dbg("lseek failed (%s)", strerror(errno)); ++ dbg("lseek failed (%s)\n", strerror(errno)); + return NULL; + } + buf_len = read(id->fd, id->seekbuf, len); + if (buf_len < 0) { +- dbg("read failed (%s)", strerror(errno)); ++ dbg("read failed (%s)\n", strerror(errno)); + return NULL; + } +- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); ++ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); + id->seekbuf_off = off; + id->seekbuf_len = buf_len; + if ((size_t)buf_len < len) { +- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); ++ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); + return NULL; + } + } +diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c +index 62c165e..9965e13 100644 +--- a/extras/volume_id/lib/via_raid.c ++++ b/extras/volume_id/lib/via_raid.c +@@ -63,7 +63,7 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size) + uint64_t meta_off; + struct via_meta *via; + +- dbg("probing at offset 0x%llx, size 0x%llx", ++ dbg("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + if (size < 0x10000) +diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c +index 7c68fb1..bb909c9 100644 +--- a/extras/volume_id/lib/volume_id.c ++++ b/extras/volume_id/lib/volume_id.c +@@ -358,7 +358,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) + if (!device_is_readable(id, off)) + return -1; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + for (i = 0; i < ARRAY_SIZE(prober_raid); i++) +@@ -392,7 +392,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size + if (!device_is_readable(id, off)) + return -1; + +- info("probing at offset 0x%llx, size 0x%llx", ++ info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); + + for (i = 0; i < ARRAY_SIZE(prober_filesystem); i++) +@@ -493,7 +493,7 @@ struct volume_id *volume_id_open_node(const char *path) + + fd = open(path, O_RDONLY); + if (fd < 0) { +- dbg("unable to open '%s'", path); ++ dbg("unable to open '%s'\n", path); + return NULL; + } + +diff --git a/extras/volume_id/lib/vxfs.c b/extras/volume_id/lib/vxfs.c +index c9b7628..33d357b 100644 +--- a/extras/volume_id/lib/vxfs.c ++++ b/extras/volume_id/lib/vxfs.c +@@ -37,7 +37,7 @@ int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct vxfs_super *vxs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + vxs = (struct vxfs_super *) volume_id_get_buffer(id, off + 0x200, 0x200); + if (vxs == NULL) +diff --git a/extras/volume_id/lib/xfs.c b/extras/volume_id/lib/xfs.c +index 9eac827..3e10560 100644 +--- a/extras/volume_id/lib/xfs.c ++++ b/extras/volume_id/lib/xfs.c +@@ -45,7 +45,7 @@ int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size) + { + struct xfs_super_block *xs; + +- info("probing at offset 0x%llx", (unsigned long long) off); ++ info("probing at offset 0x%llx\n", (unsigned long long) off); + + xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200); + if (xs == NULL) +diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c +index 04e85ab..5c4e05d 100644 +--- a/extras/volume_id/vol_id.c ++++ b/extras/volume_id/vol_id.c +@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) + + node = argv[optind]; + if (!node) { +- err("no device"); ++ err("no device\n"); + fprintf(stderr, "no device\n"); + rc = 1; + goto exit; +@@ -239,7 +239,7 @@ int main(int argc, char *argv[]) + + if (ioctl(fd, BLKGETSIZE64, &size) != 0) + size = 0; +- dbg("BLKGETSIZE64=%llu", (unsigned long long)size); ++ dbg("BLKGETSIZE64=%llu\n", (unsigned long long)size); + + /* try to drop all privileges before reading disk content */ + if (getuid() == 0) { +@@ -250,7 +250,7 @@ int main(int argc, char *argv[]) + if (setgroups(0, NULL) != 0 || + setgid(pw->pw_gid) != 0 || + setuid(pw->pw_uid) != 0) +- info("unable to drop privileges: %s\n", strerror(errno)); ++ info("unable to drop privileges: %s\n\n", strerror(errno)); + } + } + +diff --git a/test-udev.c b/test-udev.c +index 0c25778..e341b74 100644 +--- a/test-udev.c ++++ b/test-udev.c +@@ -90,10 +90,10 @@ int main(int argc, char *argv[], char *envp[]) + + logging_init("udev"); + if (devnull < 0) +- err("open /dev/null failed: %s", strerror(errno)); ++ err("open /dev/null failed: %s\n", strerror(errno)); + udev_config_init(); + selinux_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + + /* set signal handlers */ + memset(&act, 0x00, sizeof(act)); +@@ -115,7 +115,7 @@ int main(int argc, char *argv[], char *envp[]) + subsystem = argv[1]; + + if (action == NULL || subsystem == NULL || devpath == NULL) { +- err("action, subsystem or devpath missing"); ++ err("action, subsystem or devpath missing\n"); + goto exit; + } + +@@ -132,7 +132,7 @@ int main(int argc, char *argv[], char *envp[]) + + dev = sysfs_device_get(devpath); + if (dev == NULL) { +- info("unable to open '%s'", devpath); ++ info("unable to open '%s'\n", devpath); + goto fail; + } + +diff --git a/udev_config.c b/udev_config.c +index 2f2a69e..4219094 100644 +--- a/udev_config.c ++++ b/udev_config.c +@@ -98,7 +98,7 @@ static int parse_config_file(void) + int retval = 0; + + if (file_map(udev_config_filename, &buf, &bufsize) != 0) { +- err("can't open '%s' as config file: %s", udev_config_filename, strerror(errno)); ++ err("can't open '%s' as config file: %s\n", udev_config_filename, strerror(errno)); + return -ENODEV; + } + +@@ -124,7 +124,7 @@ static int parse_config_file(void) + continue; + + if (count >= sizeof(line)) { +- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); ++ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); + continue; + } + +@@ -134,7 +134,7 @@ static int parse_config_file(void) + linepos = line; + retval = get_key(&linepos, &variable, &value); + if (retval != 0) { +- err("error parsing %s, line %d:%d", udev_config_filename, lineno, (int)(linepos-line)); ++ err("error parsing %s, line %d:%d\n", udev_config_filename, lineno, (int)(linepos-line)); + continue; + } + +@@ -193,8 +193,8 @@ void udev_config_init(void) + if (env) + udev_log_priority = log_priority(env); + +- dbg("UDEV_CONFIG_FILE='%s'", udev_config_filename); +- dbg("udev_root='%s'", udev_root); +- dbg("udev_rules='%s'", udev_rules_dir); +- dbg("udev_log=%d", udev_log_priority); ++ dbg("UDEV_CONFIG_FILE='%s'\n", udev_config_filename); ++ dbg("udev_root='%s'\n", udev_root); ++ dbg("udev_rules='%s'\n", udev_rules_dir); ++ dbg("udev_log=%d\n", udev_log_priority); + } +diff --git a/udev_db.c b/udev_db.c +index 1feab7d..ddcf85e 100644 +--- a/udev_db.c ++++ b/udev_db.c +@@ -65,13 +65,13 @@ static int name_index(const char *devpath, const char *name, int add) + strlcat(filename, device, sizeof(filename)); + + if (add) { +- info("creating index: '%s'", filename); ++ info("creating index: '%s'\n", filename); + create_path(filename); + fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); + if (fd > 0) + close(fd); + } else { +- info("removing index: '%s'", filename); ++ info("removing index: '%s'\n", filename); + unlink(filename); + delete_path(filename); + } +@@ -92,12 +92,12 @@ int udev_db_get_devices_by_name(const char *name, struct list_head *name_list) + + dir = opendir(dirname); + if (dir == NULL) { +- info("no index directory '%s': %s", dirname, strerror(errno)); ++ info("no index directory '%s': %s\n", dirname, strerror(errno)); + rc = -1; + goto out; + } + +- info("found index directory '%s'", dirname); ++ info("found index directory '%s'\n", dirname); + while (1) { + struct dirent *ent; + char device[PATH_SIZE]; +@@ -146,12 +146,12 @@ int udev_db_add_device(struct udevice *udev) + if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && + !udev->partitions && !udev->ignore_remove) { + int ret; +- dbg("nothing interesting to store, create symlink"); ++ dbg("nothing interesting to store, create symlink\n"); + selinux_setfscreatecon(filename, NULL, S_IFLNK); + ret = symlink(udev->name, filename); + selinux_resetfscreatecon(); + if (ret != 0) { +- err("unable to create db link '%s': %s", filename, strerror(errno)); ++ err("unable to create db link '%s': %s\n", filename, strerror(errno)); + return -1; + } + } else { +@@ -160,10 +160,10 @@ int udev_db_add_device(struct udevice *udev) + + f = fopen(filename, "w"); + if (f == NULL) { +- err("unable to create db file '%s': %s", filename, strerror(errno)); ++ err("unable to create db file '%s': %s\n", filename, strerror(errno)); + return -1; + } +- dbg("storing data for device '%s' in '%s'", udev->dev->devpath, filename); ++ dbg("storing data for device '%s' in '%s'\n", udev->dev->devpath, filename); + + fprintf(f, "N:%s\n", udev->name); + list_for_each_entry(name_loop, &udev->symlink_list, node) { +@@ -205,28 +205,28 @@ int udev_db_get_device(struct udevice *udev, const char *devpath) + devpath_to_db_path(devpath, filename, sizeof(filename)); + + if (lstat(filename, &stats) != 0) { +- info("no db file to read %s: %s", filename, strerror(errno)); ++ info("no db file to read %s: %s\n", filename, strerror(errno)); + return -1; + } + if ((stats.st_mode & S_IFMT) == S_IFLNK) { + char target[NAME_SIZE]; + int target_len; + +- info("found a symlink as db file"); ++ info("found a symlink as db file\n"); + target_len = readlink(filename, target, sizeof(target)); + if (target_len > 0) + target[target_len] = '\0'; + else { +- info("error reading db link %s: %s", filename, strerror(errno)); ++ info("error reading db link %s: %s\n", filename, strerror(errno)); + return -1; + } +- dbg("db link points to '%s'", target); ++ dbg("db link points to '%s'\n", target); + strlcpy(udev->name, target, sizeof(udev->name)); + return 0; + } + + if (file_map(filename, &buf, &bufsize) != 0) { +- info("error reading db file %s: %s", filename, strerror(errno)); ++ info("error reading db file %s: %s\n", filename, strerror(errno)); + return -1; + } + +@@ -323,7 +323,7 @@ int udev_db_get_all_entries(struct list_head *name_list) + strlcat(dbpath, "/"DB_DIR, sizeof(dbpath)); + dir = opendir(dbpath); + if (dir == NULL) { +- info("no udev_db available '%s': %s", dbpath, strerror(errno)); ++ info("no udev_db available '%s': %s\n", dbpath, strerror(errno)); + return -1; + } + +@@ -340,7 +340,7 @@ int udev_db_get_all_entries(struct list_head *name_list) + strlcpy(device, ent->d_name, sizeof(device)); + path_decode(device); + name_list_add(name_list, device, 1); +- dbg("added '%s'", device); ++ dbg("added '%s'\n", device); + } + + closedir(dir); +diff --git a/udev_device.c b/udev_device.c +index 62217ff..6546db4 100644 +--- a/udev_device.c ++++ b/udev_device.c +@@ -104,13 +104,13 @@ static int rename_netif(struct udevice *udev) + struct ifreq ifr; + int retval; + +- info("changing net interface name from '%s' to '%s'", udev->dev->kernel, udev->name); ++ info("changing net interface name from '%s' to '%s'\n", udev->dev->kernel, udev->name); + if (udev->test_run) + return 0; + + sk = socket(PF_INET, SOCK_DGRAM, 0); + if (sk < 0) { +- err("error opening socket: %s", strerror(errno)); ++ err("error opening socket: %s\n", strerror(errno)); + return -1; + } + +@@ -125,7 +125,7 @@ static int rename_netif(struct udevice *udev) + + /* see if the destination interface name already exists */ + if (errno != EEXIST) { +- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); ++ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); + goto exit; + } + +@@ -134,7 +134,7 @@ static int rename_netif(struct udevice *udev) + strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ); + retval = ioctl(sk, SIOCSIFNAME, &ifr); + if (retval != 0) { +- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); ++ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); + goto exit; + } + +@@ -150,11 +150,11 @@ static int rename_netif(struct udevice *udev) + } + + if (errno != EEXIST) { +- err("error changing net interface name %s to %s: %s", ++ err("error changing net interface name %s to %s: %s\n", + ifr.ifr_name, ifr.ifr_newname, strerror(errno)); + break; + } +- dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop); ++ dbg("wait for netif '%s' to become free, loop=%i\n", udev->name, (30 * 20) - loop); + usleep(1000 * 1000 / 20); + } + } +@@ -170,22 +170,22 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + + 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); ++ info("moved database from '%s' to '%s'\n", udev->devpath_old, udev->dev->devpath); + + /* add device node */ + if (major(udev->devt) != 0 && + (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) { + struct udevice *udev_old; + +- dbg("device node add '%s'", udev->dev->devpath); ++ dbg("device node add '%s'\n", udev->dev->devpath); + + udev_rules_get_name(rules, udev); + if (udev->ignore_device) { +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + goto exit; + } + if (udev->name[0] == '\0') { +- info("device node creation supressed"); ++ info("device node creation supressed\n"); + goto exit; + } + +@@ -194,7 +194,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + if (udev_old != NULL) { + udev_old->test_run = udev->test_run; + if (udev_db_get_device(udev_old, udev->dev->devpath) == 0) { +- info("device '%s' already in database, cleanup", udev->dev->devpath); ++ info("device '%s' already in database, cleanup\n", udev->dev->devpath); + udev_db_delete_device(udev_old); + } else { + udev_device_cleanup(udev_old); +@@ -220,14 +220,14 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + + /* add netif */ + if (strcmp(udev->dev->subsystem, "net") == 0 && strcmp(udev->action, "add") == 0) { +- dbg("netif add '%s'", udev->dev->devpath); ++ dbg("netif add '%s'\n", udev->dev->devpath); + udev_rules_get_name(rules, udev); + if (udev->ignore_device) { +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + goto exit; + } + if (udev->name[0] == '\0') { +- info("device renaming supressed"); ++ info("device renaming supressed\n"); + goto exit; + } + +@@ -239,7 +239,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + retval = rename_netif(udev); + if (retval != 0) + goto exit; +- info("renamed netif to '%s'", udev->name); ++ info("renamed netif to '%s'\n", udev->name); + + /* export old name */ + setenv("INTERFACE_OLD", udev->dev->kernel, 1); +@@ -253,7 +253,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + sysfs_device_set_values(udev->dev, devpath, NULL, NULL); + setenv("DEVPATH", udev->dev->devpath, 1); + setenv("INTERFACE", udev->name, 1); +- info("changed devpath to '%s'", udev->dev->devpath); ++ info("changed devpath to '%s'\n", udev->dev->devpath); + } + } + goto exit; +@@ -270,19 +270,19 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + list_for_each_entry(name_loop, &udev->env_list, node) + putenv(name_loop->name); + } else { +- dbg("'%s' not found in database, using kernel name '%s'", ++ dbg("'%s' not found in database, using kernel name '%s'\n", + udev->dev->devpath, udev->dev->kernel); + strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); + } + + udev_rules_get_run(rules, udev); + if (udev->ignore_device) { +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + goto exit; + } + + if (udev->ignore_remove) { +- info("ignore_remove for '%s'", udev->name); ++ info("ignore_remove for '%s'\n", udev->name); + goto exit; + } + /* remove the node */ +@@ -296,7 +296,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) + /* default devices */ + udev_rules_get_run(rules, udev); + if (udev->ignore_device) +- info("device event will be ignored"); ++ info("device event will be ignored\n"); + + exit: + return retval; +diff --git a/udev_node.c b/udev_node.c +index 6ca0601..0e59e2d 100644 +--- a/udev_node.c ++++ b/udev_node.c +@@ -48,7 +48,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m + + if (lstat(file, &stats) == 0) { + if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) { +- info("preserve file '%s', because it has correct dev_t", file); ++ info("preserve file '%s', because it has correct dev_t\n", file); + selinux_setfilecon(file, udev->dev->kernel, stats.st_mode); + goto perms; + } +@@ -60,7 +60,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m + goto perms; + } + +- info("atomically replace '%s'", file); ++ info("atomically replace '%s'\n", file); + strlcpy(file_tmp, file, sizeof(file_tmp)); + strlcat(file_tmp, TMP_FILE_EXT, sizeof(file_tmp)); + unlink(file_tmp); +@@ -68,29 +68,29 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m + retval = mknod(file_tmp, mode, devt); + selinux_resetfscreatecon(); + if (retval != 0) { +- err("mknod(%s, %#o, %u, %u) failed: %s", ++ err("mknod(%s, %#o, %u, %u) failed: %s\n", + file_tmp, mode, major(devt), minor(devt), strerror(errno)); + goto exit; + } + retval = rename(file_tmp, file); + if (retval != 0) { +- err("rename(%s, %s) failed: %s", ++ err("rename(%s, %s) failed: %s\n", + file_tmp, file, strerror(errno)); + unlink(file_tmp); + goto exit; + } + + perms: +- dbg("chmod(%s, %#o)", file, mode); ++ dbg("chmod(%s, %#o)\n", file, mode); + if (chmod(file, mode) != 0) { +- err("chmod(%s, %#o) failed: %s", file, mode, strerror(errno)); ++ err("chmod(%s, %#o) failed: %s\n", file, mode, strerror(errno)); + goto exit; + } + + if (uid != 0 || gid != 0) { +- dbg("chown(%s, %u, %u)", file, uid, gid); ++ dbg("chown(%s, %u, %u)\n", file, uid, gid); + if (chown(file, uid, gid) != 0) { +- err("chown(%s, %u, %u) failed: %s", ++ err("chown(%s, %u, %u) failed: %s\n", + file, uid, gid, strerror(errno)); + goto exit; + } +@@ -127,32 +127,32 @@ static int node_symlink(const char *node, const char *slink) + if (S_ISBLK(stats.st_mode) || S_ISCHR(stats.st_mode)) { + struct stat stats2; + +- info("found existing node instead of symlink '%s'", slink); ++ info("found existing node instead of symlink '%s'\n", slink); + if (lstat(node, &stats2) == 0) { + if ((stats.st_mode & S_IFMT) == (stats2.st_mode & S_IFMT) && + stats.st_rdev == stats2.st_rdev) { +- info("replace device node '%s' with symlink to our node '%s'", slink, node); ++ info("replace device node '%s' with symlink to our node '%s'\n", slink, node); + } else { +- err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node); ++ err("device node '%s' already exists, link to '%s' will not overwrite it\n", slink, node); + goto exit; + } + } + } else if (S_ISLNK(stats.st_mode)) { + char buf[PATH_SIZE]; + +- info("found existing symlink '%s'", slink); ++ info("found existing symlink '%s'\n", slink); + len = readlink(slink, buf, sizeof(buf)); + if (len > 0) { + buf[len] = '\0'; + if (strcmp(target, buf) == 0) { +- info("preserve already existing symlink '%s' to '%s'", slink, target); ++ info("preserve already existing symlink '%s' to '%s'\n", slink, target); + selinux_setfilecon(slink, NULL, S_IFLNK); + goto exit; + } + } + } + } else { +- info("creating symlink '%s' to '%s'", slink, target); ++ info("creating symlink '%s' to '%s'\n", slink, target); + selinux_setfscreatecon(slink, NULL, S_IFLNK); + retval = symlink(target, slink); + selinux_resetfscreatecon(); +@@ -160,7 +160,7 @@ static int node_symlink(const char *node, const char *slink) + goto exit; + } + +- info("atomically replace '%s'", slink); ++ info("atomically replace '%s'\n", slink); + strlcpy(slink_tmp, slink, sizeof(slink_tmp)); + strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); + unlink(slink_tmp); +@@ -168,12 +168,12 @@ static int node_symlink(const char *node, const char *slink) + retval = symlink(target, slink_tmp); + selinux_resetfscreatecon(); + if (retval != 0) { +- err("symlink(%s, %s) failed: %s", target, slink_tmp, strerror(errno)); ++ err("symlink(%s, %s) failed: %s\n", target, slink_tmp, strerror(errno)); + goto exit; + } + retval = rename(slink_tmp, slink); + if (retval != 0) { +- err("rename(%s, %s) failed: %s", slink_tmp, slink, strerror(errno)); ++ err("rename(%s, %s) failed: %s\n", slink_tmp, slink, strerror(errno)); + unlink(slink_tmp); + goto exit; + } +@@ -198,11 +198,11 @@ static int update_link(struct udevice *udev, const char *name) + strlcat(slink, name, sizeof(slink)); + + count = udev_db_get_devices_by_name(name, &name_list); +- info("found %i devices with name '%s'", count, name); ++ info("found %i devices with name '%s'\n", count, name); + + /* if we don't have a reference, delete it */ + if (count <= 0) { +- info("no reference left, remove '%s'", name); ++ info("no reference left, remove '%s'\n", name); + if (!udev->test_run) { + unlink(slink); + delete_path(slink); +@@ -212,14 +212,14 @@ static int update_link(struct udevice *udev, const char *name) + + /* find the device with the highest priority */ + list_for_each_entry(device, &name_list, node) { +- info("found '%s' for '%s'", device->name, name); ++ info("found '%s' for '%s'\n", device->name, name); + + /* did we find ourself? we win, if we have the same priority */ + if (strcmp(udev->dev->devpath, device->name) == 0) { +- info("compare (our own) priority of '%s' %i >= %i", ++ info("compare (our own) priority of '%s' %i >= %i\n", + udev->dev->devpath, udev->link_priority, priority); + if (strcmp(udev->name, name) == 0) { +- info("'%s' is our device node, database inconsistent, skip link update", udev->name); ++ info("'%s' is our device node, database inconsistent, skip link update\n", udev->name); + } else if (target[0] == '\0' || udev->link_priority >= priority) { + priority = udev->link_priority; + strlcpy(target, udev->name, sizeof(target)); +@@ -233,9 +233,9 @@ static int update_link(struct udevice *udev, const char *name) + continue; + if (udev_db_get_device(udev_db, device->name) == 0) { + if (strcmp(udev_db->name, name) == 0) { +- info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name); ++ info("'%s' is a device node of '%s', skip link update\n", udev_db->name, device->name); + } else { +- info("compare priority of '%s' %i > %i", ++ info("compare priority of '%s' %i > %i\n", + udev_db->dev->devpath, udev_db->link_priority, priority); + if (target[0] == '\0' || udev_db->link_priority > priority) { + priority = udev_db->link_priority; +@@ -248,7 +248,7 @@ static int update_link(struct udevice *udev, const char *name) + name_list_cleanup(&name_list); + + if (target[0] == '\0') { +- info("no current target for '%s' found", name); ++ info("no current target for '%s' found\n", name); + rc = 1; + goto out; + } +@@ -257,7 +257,7 @@ static int update_link(struct udevice *udev, const char *name) + strlcpy(node, udev_root, sizeof(node)); + strlcat(node, "/", sizeof(node)); + strlcat(node, target, sizeof(node)); +- info("'%s' with target '%s' has the highest priority %i, create it", name, target, priority); ++ info("'%s' with target '%s' has the highest priority %i, create it\n", name, target, priority); + if (!udev->test_run) { + create_path(slink); + node_symlink(node, slink); +@@ -272,7 +272,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) + char symlinks[PATH_SIZE] = ""; + + list_for_each_entry(name_loop, &udev->symlink_list, node) { +- info("update symlink '%s' of '%s'", name_loop->name, udev->dev->devpath); ++ info("update symlink '%s' of '%s'\n", name_loop->name, udev->dev->devpath); + update_link(udev, name_loop->name); + strlcat(symlinks, udev_root, sizeof(symlinks)); + strlcat(symlinks, "/", sizeof(symlinks)); +@@ -302,7 +302,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) + } + if (!found) { + /* link does no longer belong to this device */ +- info("update old symlink '%s' no longer belonging to '%s'", ++ info("update old symlink '%s' no longer belonging to '%s'\n", + link_old_loop->name, udev->dev->devpath); + update_link(udev, link_old_loop->name); + } +@@ -356,7 +356,7 @@ int udev_node_add(struct udevice *udev) + gid = lookup_group(udev->group); + } + +- info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d", ++ info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d\n", + filename, major(udev->devt), minor(udev->devt), udev->mode, uid, gid); + + if (!udev->test_run) +@@ -380,7 +380,7 @@ int udev_node_add(struct udevice *udev) + if (range > 1) + udev->partitions = range-1; + } +- info("creating device partition nodes '%s[1-%i]'", filename, udev->partitions); ++ info("creating device partition nodes '%s[1-%i]'\n", filename, udev->partitions); + if (!udev->test_run) { + for (i = 1; i <= udev->partitions; i++) { + dev_t part_devt; +@@ -408,15 +408,15 @@ int udev_node_remove(struct udevice *udev) + strlcat(filename, "/", sizeof(filename)); + strlcat(filename, udev->name, sizeof(filename)); + if (stat(filename, &stats) != 0) { +- info("device node '%s' not found", filename); ++ info("device node '%s' not found\n", filename); + return 0; + } + if (udev->devt && stats.st_rdev != udev->devt) { +- info("device node '%s' points to a different device, skip removal", filename); ++ info("device node '%s' points to a different device, skip removal\n", filename); + return -1; + } + +- info("removing device node '%s'", filename); ++ info("removing device node '%s'\n", filename); + if (!udev->test_run) + retval = unlink_secure(filename); + if (retval) +@@ -427,7 +427,7 @@ int udev_node_remove(struct udevice *udev) + if (num > 0) { + int i; + +- info("removing all_partitions '%s[1-%i]'", filename, num); ++ info("removing all_partitions '%s[1-%i]'\n", filename, num); + if (num > 255) + return -1; + for (i = 1; i <= num; i++) { +diff --git a/udev_rules.c b/udev_rules.c +index 8a793ff..884cb70 100644 +--- a/udev_rules.c ++++ b/udev_rules.c +@@ -48,13 +48,13 @@ static char *get_format_attribute(char **str) + if (*str[0] == '{') { + pos = strchr(*str, '}'); + if (pos == NULL) { +- err("missing closing brace for format"); ++ err("missing closing brace for format\n"); + return NULL; + } + pos[0] = '\0'; + attr = *str+1; + *str = pos+1; +- dbg("attribute='%s', str='%s'", attr, *str); ++ dbg("attribute='%s', str='%s'\n", attr, *str); + } + return attr; + } +@@ -69,10 +69,10 @@ static int get_format_len(char **str) + num = (int) strtoul(*str, &tail, 10); + if (num > 0) { + *str = tail; +- dbg("format length=%i", num); ++ dbg("format length=%i\n", num); + return num; + } else { +- err("format parsing error '%s'", *str); ++ err("format parsing error '%s'\n", *str); + } + } + return -1; +@@ -148,7 +148,7 @@ static int run_program(const char *command, const char *subsystem, + } else { + argv[i] = strsep(&pos, " "); + } +- dbg("arg[%i] '%s'", i, argv[i]); ++ dbg("arg[%i] '%s'\n", i, argv[i]); + i++; + } + argv[i] = NULL; +@@ -156,18 +156,18 @@ static int run_program(const char *command, const char *subsystem, + argv[0] = arg; + argv[1] = NULL; + } +- info("'%s'", command); ++ info("'%s'\n", command); + + /* prepare pipes from child to parent */ + if (result != NULL || udev_log_priority >= LOG_INFO) { + if (pipe(outpipe) != 0) { +- err("pipe failed: %s", strerror(errno)); ++ err("pipe failed: %s\n", strerror(errno)); + return -1; + } + } + if (udev_log_priority >= LOG_INFO) { + if (pipe(errpipe) != 0) { +- err("pipe failed: %s", strerror(errno)); ++ err("pipe failed: %s\n", strerror(errno)); + return -1; + } + } +@@ -198,7 +198,7 @@ static int run_program(const char *command, const char *subsystem, + dup2(devnull, STDERR_FILENO); + close(devnull); + } else +- err("open /dev/null failed: %s", strerror(errno)); ++ err("open /dev/null failed: %s\n", strerror(errno)); + if (outpipe[WRITE_END] > 0) { + dup2(outpipe[WRITE_END], STDOUT_FILENO); + close(outpipe[WRITE_END]); +@@ -210,14 +210,14 @@ static int run_program(const char *command, const char *subsystem, + execv(argv[0], argv); + if (errno == ENOENT || errno == ENOTDIR) { + /* may be on a filesytem which is not mounted right now */ +- info("program '%s' not found", argv[0]); ++ info("program '%s' not found\n", argv[0]); + } else { + /* other problems */ +- err("exec of program '%s' failed", argv[0]); ++ err("exec of program '%s' failed\n", argv[0]); + } + _exit(1); + case -1: +- err("fork of '%s' failed: %s", argv[0], strerror(errno)); ++ err("fork of '%s' failed: %s\n", argv[0], strerror(errno)); + return -1; + default: + /* read from child if requested */ +@@ -260,7 +260,7 @@ static int run_program(const char *command, const char *subsystem, + close(outpipe[READ_END]); + outpipe[READ_END] = -1; + if (count < 0) { +- err("stdin read failed: %s", strerror(errno)); ++ err("stdin read failed: %s\n", strerror(errno)); + retval = -1; + } + continue; +@@ -273,14 +273,14 @@ static int run_program(const char *command, const char *subsystem, + memcpy(&result[respos], inbuf, count); + respos += count; + } else { +- err("ressize %ld too short", (long)ressize); ++ err("ressize %ld too short\n", (long)ressize); + retval = -1; + } + } + pos = inbuf; + while ((line = strsep(&pos, "\n"))) + if (pos || line[0] != '\0') +- info("'%s' (stdout) '%s'", argv[0], line); ++ info("'%s' (stdout) '%s'\n", argv[0], line); + } + + /* get stderr */ +@@ -294,14 +294,14 @@ static int run_program(const char *command, const char *subsystem, + close(errpipe[READ_END]); + errpipe[READ_END] = -1; + if (count < 0) +- err("stderr read failed: %s", strerror(errno)); ++ err("stderr read failed: %s\n", strerror(errno)); + continue; + } + errbuf[count] = '\0'; + pos = errbuf; + while ((line = strsep(&pos, "\n"))) + if (pos || line[0] != '\0') +- info("'%s' (stderr) '%s'", argv[0], line); ++ info("'%s' (stderr) '%s'\n", argv[0], line); + } + } + if (outpipe[READ_END] > 0) +@@ -312,18 +312,18 @@ static int run_program(const char *command, const char *subsystem, + /* return the childs stdout string */ + if (result) { + result[respos] = '\0'; +- dbg("result='%s'", result); ++ dbg("result='%s'\n", result); + if (reslen) + *reslen = respos; + } + } + waitpid(pid, &status, 0); + if (WIFEXITED(status)) { +- info("'%s' returned with status %i", argv[0], WEXITSTATUS(status)); ++ info("'%s' returned with status %i\n", argv[0], WEXITSTATUS(status)); + if (WEXITSTATUS(status) != 0) + retval = -1; + } else { +- err("'%s' abnormal exit", argv[0]); ++ err("'%s' abnormal exit\n", argv[0]); + retval = -1; + } + } +@@ -364,7 +364,7 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu + continue; + + if (count >= sizeof(line)) { +- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); ++ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); + continue; + } + +@@ -373,11 +373,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu + + linepos = line; + if (get_key(&linepos, &variable, &value) == 0) { +- dbg("import '%s=%s'", variable, value); ++ dbg("import '%s=%s'\n", variable, value); + + /* handle device, renamed by external tool, returning new path */ + if (strcmp(variable, "DEVPATH") == 0) { +- info("updating devpath from '%s' to '%s'", udev->dev->devpath, value); ++ info("updating devpath from '%s' to '%s'\n", udev->dev->devpath, value); + sysfs_device_set_values(udev->dev, value, NULL, NULL); + } else + name_list_key_add(&udev->env_list, variable, value); +@@ -394,7 +394,7 @@ static int import_file_into_env(struct udevice *udev, const char *filename) + size_t bufsize; + + if (file_map(filename, &buf, &bufsize) != 0) { +- err("can't open '%s': %s", filename, strerror(errno)); ++ err("can't open '%s': %s\n", filename, strerror(errno)); + return -1; + } + import_keys_into_env(udev, buf, bufsize); +@@ -423,13 +423,13 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) + struct udevice *udev_parent; + struct name_entry *name_loop; + +- dbg("found parent '%s', get the node name", dev_parent->devpath); ++ dbg("found parent '%s', get the node name\n", dev_parent->devpath); + udev_parent = udev_device_init(NULL); + if (udev_parent == NULL) + return -1; + /* import the udev_db of the parent */ + if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { +- dbg("import stored parent env '%s'", udev_parent->name); ++ dbg("import stored parent env '%s'\n", udev_parent->name); + list_for_each_entry(name_loop, &udev_parent->env_list, node) { + char name[NAME_SIZE]; + char *pos; +@@ -440,16 +440,16 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) + pos[0] = '\0'; + pos++; + if (fnmatch(filter, name, 0) == 0) { +- dbg("import key '%s'", name_loop->name); ++ dbg("import key '%s'\n", name_loop->name); + name_list_add(&udev->env_list, name_loop->name, 0); + setenv(name, pos, 1); + } else +- dbg("skip key '%s'", name_loop->name); ++ dbg("skip key '%s'\n", name_loop->name); + } + } + rc = 0; + } else +- dbg("parent not found in database"); ++ dbg("parent not found in database\n"); + udev_device_cleanup(udev_parent); + } + +@@ -468,7 +468,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c + ssize_t count; + int retval = 0; + +- dbg("pass environment to socket '%s'", sockpath); ++ dbg("pass environment to socket '%s'\n", sockpath); + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + memset(&saddr, 0x00, sizeof(struct sockaddr_un)); + saddr.sun_family = AF_LOCAL; +@@ -498,7 +498,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c + count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, saddrlen); + if (count < 0) + retval = -1; +- info("passed %zi bytes to socket '%s', ", count, sockpath); ++ info("passed %zi bytes to socket '%s', \n", count, sockpath); + + close(sock); + return retval; +@@ -509,7 +509,7 @@ int udev_rules_run(struct udevice *udev) + struct name_entry *name_loop; + int retval = 0; + +- dbg("executing run list"); ++ dbg("executing run list\n"); + 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, udev->action); +@@ -541,22 +541,22 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout) + strlcat(filepath, "/", sizeof(filepath)); + strlcat(filepath, file, sizeof(filepath)); + +- dbg("will wait %i sec for '%s'", timeout, filepath); ++ dbg("will wait %i sec for '%s'\n", timeout, filepath); + while (--loop) { + /* lookup file */ + if (stat(filepath, &stats) == 0) { +- info("file '%s' appeared after %i loops", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); ++ info("file '%s' appeared after %i loops\n", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); + return 0; + } + /* make sure, the device did not disappear in the meantime */ + if (stat(devicepath, &stats) != 0) { +- info("device disappeared while waiting for '%s'", filepath); ++ info("device disappeared while waiting for '%s'\n", filepath); + return -2; + } +- info("wait for '%s' for %i mseconds", filepath, 1000 / WAIT_LOOP_PER_SECOND); ++ info("wait for '%s' for %i mseconds\n", filepath, 1000 / WAIT_LOOP_PER_SECOND); + usleep(1000 * 1000 / WAIT_LOOP_PER_SECOND); + } +- info("waiting for '%s' failed", filepath); ++ info("waiting for '%s' failed\n", filepath); + return -1; + } + +@@ -707,12 +707,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + if (strncasecmp(&head[1], subst->name, strlen(subst->name)) == 0) { + type = subst->type; + tail = head + strlen(subst->name)+1; +- dbg("will substitute format name '%s'", subst->name); ++ dbg("will substitute format name '%s'\n", subst->name); + goto found; + } + } + head[0] = '$'; +- err("unknown format variable '%s'", head); ++ err("unknown format variable '%s'\n", head); + } else if (head[0] == '%') { + /* substitute format char */ + if (head[1] == '\0') +@@ -730,12 +730,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + if (tail[0] == subst->fmt) { + type = subst->type; + tail++; +- dbg("will substitute format char '%c'", subst->fmt); ++ dbg("will substitute format char '%c'\n", subst->fmt); + goto found; + } + } + head[0] = '%'; +- err("unknown format char '%c'", tail[0]); ++ err("unknown format char '%c'\n", tail[0]); + } + head++; + } +@@ -743,42 +743,42 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) + found: + attr = get_format_attribute(&tail); + strlcpy(temp, tail, sizeof(temp)); +- dbg("format=%i, string='%s', tail='%s'", type ,string, tail); ++ dbg("format=%i, string='%s', tail='%s'\n", type ,string, tail); + + switch (type) { + case SUBST_DEVPATH: + strlcat(string, udev->dev->devpath, maxsize); +- dbg("substitute devpath '%s'", udev->dev->devpath); ++ dbg("substitute devpath '%s'\n", udev->dev->devpath); + break; + case SUBST_KERNEL: + strlcat(string, udev->dev->kernel, maxsize); +- dbg("substitute kernel name '%s'", udev->dev->kernel); ++ dbg("substitute kernel name '%s'\n", udev->dev->kernel); + break; + case SUBST_KERNEL_NUMBER: + strlcat(string, udev->dev->kernel_number, maxsize); +- dbg("substitute kernel number '%s'", udev->dev->kernel_number); ++ dbg("substitute kernel number '%s'\n", udev->dev->kernel_number); + break; + case SUBST_ID: + if (udev->dev_parent != NULL) { + strlcat(string, udev->dev_parent->kernel, maxsize); +- dbg("substitute id '%s'", udev->dev_parent->kernel); ++ dbg("substitute id '%s'\n", udev->dev_parent->kernel); + } + break; + case SUBST_DRIVER: + if (udev->dev_parent != NULL) { + strlcat(string, udev->dev_parent->driver, maxsize); +- dbg("substitute driver '%s'", udev->dev_parent->driver); ++ dbg("substitute driver '%s'\n", udev->dev_parent->driver); + } + break; + case SUBST_MAJOR: + sprintf(temp2, "%d", major(udev->devt)); + strlcat(string, temp2, maxsize); +- dbg("substitute major number '%s'", temp2); ++ dbg("substitute major number '%s'\n", temp2); + break; + case SUBST_MINOR: + sprintf(temp2, "%d", minor(udev->devt)); + strlcat(string, temp2, maxsize); +- dbg("substitute minor number '%s'", temp2); ++ dbg("substitute minor number '%s'\n", temp2); + break; + case SUBST_RESULT: + if (udev->program_result[0] == '\0') +@@ -788,7 +788,7 @@ found: + if (attr != NULL) + i = strtoul(attr, &rest, 10); + if (i > 0) { +- dbg("request part #%d of result string", i); ++ dbg("request part #%d of result string\n", i); + cpos = udev->program_result; + while (--i) { + while (cpos[0] != '\0' && !isspace(cpos[0])) +@@ -797,7 +797,7 @@ found: + cpos++; + } + if (i > 0) { +- err("requested part of result string not found"); ++ err("requested part of result string not found\n"); + break; + } + strlcpy(temp2, cpos, sizeof(temp2)); +@@ -808,15 +808,15 @@ found: + cpos[0] = '\0'; + } + strlcat(string, temp2, maxsize); +- dbg("substitute part of result string '%s'", temp2); ++ dbg("substitute part of result string '%s'\n", temp2); + } else { + strlcat(string, udev->program_result, maxsize); +- dbg("substitute result string '%s'", udev->program_result); ++ dbg("substitute result string '%s'\n", udev->program_result); + } + break; + case SUBST_ATTR: + if (attr == NULL) +- err("missing file parameter for attr"); ++ err("missing file parameter for attr\n"); + else { + char devpath[PATH_SIZE]; + char *attrib; +@@ -839,7 +839,7 @@ found: + struct sysfs_device *dev_parent = udev->dev; + + do { +- dbg("looking at '%s'", dev_parent->devpath); ++ dbg("looking at '%s'\n", dev_parent->devpath); + value = sysfs_attr_get_value(dev_parent->devpath, attr); + if (value != NULL) { + strlcpy(temp2, value, sizeof(temp2)); +@@ -860,9 +860,9 @@ found: + temp2[--size] = '\0'; + count = replace_chars(temp2, ALLOWED_CHARS_INPUT); + if (count > 0) +- info("%i character(s) replaced" , count); ++ info("%i character(s) replaced\n" , count); + strlcat(string, temp2, maxsize); +- dbg("substitute sysfs value '%s'", temp2); ++ dbg("substitute sysfs value '%s'\n", temp2); + } + break; + case SUBST_PARENT: +@@ -873,15 +873,15 @@ found: + if (dev_parent != NULL) { + struct udevice *udev_parent; + +- dbg("found parent '%s', get the node name", dev_parent->devpath); ++ dbg("found parent '%s', get the node name\n", dev_parent->devpath); + udev_parent = udev_device_init(NULL); + if (udev_parent != NULL) { + /* lookup the name in the udev_db with the DEVPATH of the parent */ + if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { + strlcat(string, udev_parent->name, maxsize); +- dbg("substitute parent node name'%s'", udev_parent->name); ++ dbg("substitute parent node name'%s'\n", udev_parent->name); + } else +- dbg("parent not found in database"); ++ dbg("parent not found in database\n"); + udev_device_cleanup(udev_parent); + } + } +@@ -889,48 +889,48 @@ found: + break; + case SUBST_TEMP_NODE: + if (udev->tmp_node[0] == '\0' && major(udev->devt) > 0) { +- dbg("create temporary device node for callout"); ++ dbg("create temporary device node for callout\n"); + snprintf(udev->tmp_node, sizeof(udev->tmp_node), "%s/.tmp-%u-%u", + udev_root, major(udev->devt), minor(udev->devt)); + udev->tmp_node[sizeof(udev->tmp_node)-1] = '\0'; + udev_node_mknod(udev, udev->tmp_node, udev->devt, 0600, 0, 0); + } + strlcat(string, udev->tmp_node, maxsize); +- dbg("substitute temporary device node name '%s'", udev->tmp_node); ++ dbg("substitute temporary device node name '%s'\n", udev->tmp_node); + break; + case SUBST_NAME: + strlcat(string, udev->name, maxsize); +- dbg("substitute udev->name '%s'", udev->name); ++ dbg("substitute udev->name '%s'\n", udev->name); + break; + case SUBST_ROOT: + strlcat(string, udev_root, maxsize); +- dbg("substitute udev_root '%s'", udev_root); ++ dbg("substitute udev_root '%s'\n", udev_root); + break; + case SUBST_SYS: + strlcat(string, sysfs_path, maxsize); +- dbg("substitute sysfs_path '%s'", sysfs_path); ++ dbg("substitute sysfs_path '%s'\n", sysfs_path); + break; + case SUBST_ENV: + if (attr == NULL) { +- dbg("missing attribute"); ++ dbg("missing attribute\n"); + break; + } + pos = getenv(attr); + if (pos == NULL) { +- dbg("env '%s' not available", attr); ++ dbg("env '%s' not available\n", attr); + break; + } +- dbg("substitute env '%s=%s'", attr, pos); ++ dbg("substitute env '%s=%s'\n", attr, pos); + strlcat(string, pos, maxsize); + break; + default: +- err("unknown substitution type=%i", type); ++ err("unknown substitution type=%i\n", type); + break; + } + /* possibly truncate to format-char specified length */ + if (len >= 0 && len < (int)strlen(head)) { + head[len] = '\0'; +- dbg("truncate to %i chars, subtitution string becomes '%s'", len, head); ++ dbg("truncate to %i chars, subtitution string becomes '%s'\n", len, head); + } + strlcat(string, temp, maxsize); + } +@@ -960,7 +960,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k + /* look for a matching string, parts are separated by '|' */ + strlcpy(value, rule->buf + key->val_off, sizeof(value)); + key_value = value; +- dbg("key %s value='%s'", key_name, key_value); ++ dbg("key %s value='%s'\n", key_name, key_value); + while (key_value) { + pos = strchr(key_value, '|'); + if (pos) { +@@ -968,7 +968,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k + pos++; + } + +- dbg("match %s '%s' <-> '%s'", key_name, key_value, val); ++ dbg("match %s '%s' <-> '%s'\n", key_name, key_value, val); + match = (fnmatch(key_value, val, 0) == 0); + if (match) + break; +@@ -977,11 +977,11 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k + } + + if (match && (key->operation == KEY_OP_MATCH)) { +- dbg("%s is true (matching value)", key_name); ++ dbg("%s is true (matching value)\n", key_name); + return 0; + } + if (!match && (key->operation == KEY_OP_NOMATCH)) { +- dbg("%s is true (non-matching value)", key_name); ++ dbg("%s is true (non-matching value)\n", key_name); + return 0; + } + return -1; +@@ -1037,7 +1037,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + const char *value = getenv(key_name); + + if (!value) { +- dbg("ENV{'%s'} is not set, treat as empty", key_name); ++ dbg("ENV{'%s'} is not set, treat as empty\n", key_name); + value = ""; + } + if (match_key("ENV", rule, &pair->key, value)) +@@ -1076,10 +1076,10 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + attr_subst_subdir(filename, sizeof(filename)); + + match = (stat(filename, &statbuf) == 0); +- info("'%s' %s", filename, match ? "exists" : "does not exist"); ++ info("'%s' %s", filename, match ? "exists" : "does not exist\n"); + if (match && rule->test_mode_mask > 0) { + match = ((statbuf.st_mode & rule->test_mode_mask) > 0); +- info("'%s' has mode=%#o and %s %#o", filename, statbuf.st_mode, ++ info("'%s' has mode=%#o and %s %#o\n", filename, statbuf.st_mode, + match ? "matches" : "does not match", + rule->test_mode_mask); + } +@@ -1087,7 +1087,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + goto nomatch; + if (!match && rule->test.operation == KEY_OP_MATCH) + goto nomatch; +- dbg("TEST key is true"); ++ dbg("TEST key is true\n"); + } + + if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) { +@@ -1130,7 +1130,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + len = strlen(val); + while (len > 0 && isspace(val[len-1])) + val[--len] = '\0'; +- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); ++ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); + } + + if (match_key("ATTR", rule, &pair->key, val)) +@@ -1178,7 +1178,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + len = strlen(val); + while (len > 0 && isspace(val[len-1])) + val[--len] = '\0'; +- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); ++ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); + } + + if (match_key("ATTRS", rule, &pair->key, val)) +@@ -1190,12 +1190,12 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) + break; + try_parent: + /* move to parent device */ +- dbg("try parent sysfs device"); ++ dbg("try parent sysfs device\n"); + udev->dev_parent = sysfs_device_get_parent(udev->dev_parent); + if (udev->dev_parent == NULL) + goto nomatch; +- dbg("looking at dev_parent->devpath='%s'", udev->dev_parent->devpath); +- dbg("looking at dev_parent->kernel='%s'", udev->dev_parent->kernel); ++ dbg("looking at dev_parent->devpath='%s'\n", udev->dev_parent->devpath); ++ dbg("looking at dev_parent->kernel='%s'\n", udev->dev_parent->kernel); + } + + /* execute external program */ +@@ -1206,28 +1206,28 @@ try_parent: + strlcpy(program, key_val(rule, &rule->program), sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); + if (run_program(program, udev->dev->subsystem, result, sizeof(result), NULL) != 0) { +- dbg("PROGRAM is false"); ++ dbg("PROGRAM is false\n"); + udev->program_result[0] = '\0'; + if (rule->program.operation != KEY_OP_NOMATCH) + goto nomatch; + } else { + int count; + +- dbg("PROGRAM matches"); ++ dbg("PROGRAM matches\n"); + remove_trailing_chars(result, '\n'); + if (rule->string_escape == ESCAPE_UNSET || + rule->string_escape == ESCAPE_REPLACE) { + count = replace_chars(result, ALLOWED_CHARS_INPUT); + if (count > 0) +- info("%i character(s) replaced" , count); ++ info("%i character(s) replaced\n" , count); + } +- dbg("result is '%s'", result); ++ dbg("result is '%s'\n", result); + strlcpy(udev->program_result, result, sizeof(udev->program_result)); +- dbg("PROGRAM returned successful"); ++ dbg("PROGRAM returned successful\n"); + if (rule->program.operation == KEY_OP_NOMATCH) + goto nomatch; + } +- dbg("PROGRAM key is true"); ++ dbg("PROGRAM key is true\n"); + } + + /* check for matching result of external program */ +@@ -1241,23 +1241,23 @@ try_parent: + + strlcpy(import, key_val(rule, &rule->import), sizeof(import)); + udev_rules_apply_format(udev, import, sizeof(import)); +- dbg("check for IMPORT import='%s'", import); ++ dbg("check for IMPORT import='%s'\n", import); + if (rule->import_type == IMPORT_PROGRAM) { + rc = import_program_into_env(udev, import); + } else if (rule->import_type == IMPORT_FILE) { +- dbg("import file import='%s'", import); ++ dbg("import file import='%s'\n", import); + rc = import_file_into_env(udev, import); + } else if (rule->import_type == IMPORT_PARENT) { +- dbg("import parent import='%s'", import); ++ dbg("import parent import='%s'\n", import); + rc = import_parent_into_env(udev, import); + } + if (rc != 0) { +- dbg("IMPORT failed"); ++ dbg("IMPORT failed\n"); + if (rule->import.operation != KEY_OP_NOMATCH) + goto nomatch; + } else +- dbg("IMPORT '%s' imported", key_val(rule, &rule->import)); +- dbg("IMPORT key is true"); ++ dbg("IMPORT '%s' imported\n", key_val(rule, &rule->import)); ++ dbg("IMPORT key is true\n"); + } + + /* rule matches, if we have ENV assignments export it */ +@@ -1276,7 +1276,7 @@ try_parent: + if (temp_value[0] == '\0') { + name_list_key_remove(&udev->env_list, key_name); + unsetenv(key_name); +- info("unset ENV '%s'", key_name); ++ info("unset ENV '%s'\n", key_name); + } else { + struct name_entry *entry; + +@@ -1284,7 +1284,7 @@ try_parent: + if (entry == NULL) + break; + putenv(entry->name); +- info("set ENV '%s'", entry->name); ++ info("set ENV '%s'\n", entry->name); + } + } + } +@@ -1321,15 +1321,15 @@ try_parent: + + strlcpy(value, key_val(rule, &pair->key), sizeof(value)); + udev_rules_apply_format(udev, value, sizeof(value)); +- info("writing '%s' to sysfs file '%s'", value, attr); ++ info("writing '%s' to sysfs file '%s'\n", value, attr); + f = fopen(attr, "w"); + if (f != NULL) { + if (!udev->test_run) + if (fprintf(f, "%s", value) <= 0) +- err("error writing ATTR{%s}: %s", attr, strerror(errno)); ++ err("error writing ATTR{%s}: %s\n", attr, strerror(errno)); + fclose(f); + } else +- err("error opening ATTR{%s} for writing: %s", attr, strerror(errno)); ++ err("error opening ATTR{%s} for writing: %s\n", attr, strerror(errno)); + } + } + return 0; +@@ -1343,8 +1343,8 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + struct udev_rule *rule; + int name_set = 0; + +- dbg("udev->dev->devpath='%s'", udev->dev->devpath); +- dbg("udev->dev->kernel='%s'", udev->dev->kernel); ++ dbg("udev->dev->devpath='%s'\n", udev->dev->devpath); ++ dbg("udev->dev->kernel='%s'\n", udev->dev->kernel); + + /* look for a matching rule to apply */ + udev_rules_iter_init(rules); +@@ -1357,31 +1357,31 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + (rule->name.operation == KEY_OP_ASSIGN || + rule->name.operation == KEY_OP_ASSIGN_FINAL || + rule->name.operation == KEY_OP_ADD)) { +- dbg("node name already set, rule ignored"); ++ dbg("node name already set, rule ignored\n"); + continue; + } + +- dbg("process rule"); ++ dbg("process rule\n"); + if (match_rule(udev, rule) == 0) { + /* apply options */ + if (rule->ignore_device) { +- info("rule applied, '%s' is ignored", udev->dev->kernel); ++ info("rule applied, '%s' is ignored\n", udev->dev->kernel); + udev->ignore_device = 1; + return 0; + } + if (rule->ignore_remove) { + udev->ignore_remove = 1; +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + } + if (rule->link_priority != 0) { + udev->link_priority = rule->link_priority; +- info("link_priority=%i", udev->link_priority); ++ info("link_priority=%i\n", udev->link_priority); + } + /* apply all_partitions option only at a main block device */ + if (rule->partitions && + strcmp(udev->dev->subsystem, "block") == 0 && udev->dev->kernel_number[0] == '\0') { + udev->partitions = rule->partitions; +- dbg("creation of partition nodes requested"); ++ dbg("creation of partition nodes requested\n"); + } + + /* apply permissions */ +@@ -1389,21 +1389,21 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) + udev->mode_final = 1; + udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); +- dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); ++ dbg("applied mode=%#o to '%s'\n", udev->mode, udev->dev->kernel); + } + if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { + if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) + udev->owner_final = 1; + strlcpy(udev->owner, key_val(rule, &rule->owner), sizeof(udev->owner)); + udev_rules_apply_format(udev, udev->owner, sizeof(udev->owner)); +- dbg("applied owner='%s' to '%s'", udev->owner, udev->dev->kernel); ++ dbg("applied owner='%s' to '%s'\n", udev->owner, udev->dev->kernel); + } + if (!udev->group_final && rule->group.operation != KEY_OP_UNSET) { + if (rule->group.operation == KEY_OP_ASSIGN_FINAL) + udev->group_final = 1; + strlcpy(udev->group, key_val(rule, &rule->group), sizeof(udev->group)); + udev_rules_apply_format(udev, udev->group, sizeof(udev->group)); +- dbg("applied group='%s' to '%s'", udev->group, udev->dev->kernel); ++ dbg("applied group='%s' to '%s'\n", udev->group, udev->dev->kernel); + } + + /* collect symlinks */ +@@ -1419,7 +1419,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + udev->symlink_final = 1; + if (rule->symlink.operation == KEY_OP_ASSIGN || + rule->symlink.operation == KEY_OP_ASSIGN_FINAL) { +- info("reset symlink list"); ++ info("reset symlink list\n"); + name_list_cleanup(&udev->symlink_list); + } + /* allow multiple symlinks separated by spaces */ +@@ -1429,16 +1429,16 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + rule->string_escape == ESCAPE_REPLACE) { + count = replace_chars(temp, ALLOWED_CHARS_FILE " "); + if (count > 0) +- info("%i character(s) replaced" , count); ++ info("%i character(s) replaced\n" , count); + } +- dbg("rule applied, added symlink(s) '%s'", temp); ++ dbg("rule applied, added symlink(s) '%s'\n", temp); + pos = temp; + while (isspace(pos[0])) + pos++; + next = strchr(pos, ' '); + while (next) { + next[0] = '\0'; +- info("add symlink '%s'", pos); ++ info("add symlink '%s'\n", pos); + name_list_add(&udev->symlink_list, pos, 0); + while (isspace(next[1])) + next++; +@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + next = strchr(pos, ' '); + } + if (pos[0] != '\0') { +- info("add symlink '%s'", pos); ++ info("add symlink '%s'\n", pos); + name_list_add(&udev->symlink_list, pos, 0); + } + } +@@ -1464,12 +1464,12 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + rule->string_escape == ESCAPE_REPLACE) { + count = replace_chars(udev->name, ALLOWED_CHARS_FILE); + if (count > 0) +- info("%i character(s) replaced", count); ++ info("%i character(s) replaced\n", count); + } + +- info("rule applied, '%s' becomes '%s'", udev->dev->kernel, udev->name); ++ info("rule applied, '%s' becomes '%s'\n", udev->dev->kernel, udev->name); + if (strcmp(udev->dev->subsystem, "net") != 0) +- dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i", ++ dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i\n", + udev->name, udev->owner, udev->group, udev->mode, udev->partitions); + } + +@@ -1479,34 +1479,34 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) + if (rule->run.operation == KEY_OP_ASSIGN_FINAL) + udev->run_final = 1; + if (rule->run.operation == KEY_OP_ASSIGN || rule->run.operation == KEY_OP_ASSIGN_FINAL) { +- info("reset run list"); ++ info("reset run list\n"); + name_list_cleanup(&udev->run_list); + } +- dbg("add run '%s'", key_val(rule, &rule->run)); ++ dbg("add run '%s'\n", key_val(rule, &rule->run)); + entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); + if (rule->run_ignore_error) + entry->ignore_error = 1; + } + + if (rule->last_rule) { +- dbg("last rule to be applied"); ++ dbg("last rule to be applied\n"); + break; + } + + if (rule->goto_label.operation != KEY_OP_UNSET) { +- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); ++ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); + udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); + } + } + } + + if (!name_set) { +- info("no node name set, will use kernel name '%s'", udev->dev->kernel); ++ info("no node name set, will use kernel name '%s'\n", udev->dev->kernel); + strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); + } + + if (udev->tmp_node[0] != '\0') { +- dbg("removing temporary device node"); ++ dbg("removing temporary device node\n"); + unlink_secure(udev->tmp_node); + udev->tmp_node[0] = '\0'; + } +@@ -1518,7 +1518,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + { + struct udev_rule *rule; + +- dbg("udev->kernel='%s'", udev->dev->kernel); ++ dbg("udev->kernel='%s'\n", udev->dev->kernel); + + /* look for a matching rule to apply */ + udev_rules_iter_init(rules); +@@ -1527,7 +1527,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + if (rule == NULL) + break; + +- dbg("process rule"); ++ dbg("process rule\n"); + if (rule->name.operation == KEY_OP_ASSIGN || + rule->name.operation == KEY_OP_ASSIGN_FINAL || + rule->name.operation == KEY_OP_ADD || +@@ -1536,19 +1536,19 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + 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"); ++ dbg("skip rule that names a device\n"); + continue; + } + + if (match_rule(udev, rule) == 0) { + if (rule->ignore_device) { +- info("rule applied, '%s' is ignored", udev->dev->kernel); ++ info("rule applied, '%s' is ignored\n", udev->dev->kernel); + udev->ignore_device = 1; + return 0; + } + if (rule->ignore_remove) { + udev->ignore_remove = 1; +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + } + + if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { +@@ -1556,10 +1556,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + + if (rule->run.operation == KEY_OP_ASSIGN || + rule->run.operation == KEY_OP_ASSIGN_FINAL) { +- info("reset run list"); ++ info("reset run list\n"); + name_list_cleanup(&udev->run_list); + } +- dbg("add run '%s'", key_val(rule, &rule->run)); ++ dbg("add run '%s'\n", key_val(rule, &rule->run)); + entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); + if (rule->run_ignore_error) + entry->ignore_error = 1; +@@ -1568,12 +1568,12 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) + } + + if (rule->last_rule) { +- dbg("last rule to be applied"); ++ dbg("last rule to be applied\n"); + break; + } + + if (rule->goto_label.operation != KEY_OP_UNSET) { +- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); ++ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); + udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); + } + } +diff --git a/udev_rules_parse.c b/udev_rules_parse.c +index 6d88354..b586df1 100644 +--- a/udev_rules_parse.c ++++ b/udev_rules_parse.c +@@ -33,7 +33,7 @@ + + void udev_rules_iter_init(struct udev_rules *rules) + { +- dbg("bufsize=%zi", rules->bufsize); ++ dbg("bufsize=%zi\n", rules->bufsize); + rules->current = 0; + } + +@@ -44,9 +44,9 @@ struct udev_rule *udev_rules_iter_next(struct udev_rules *rules) + if (!rules) + return NULL; + +- dbg("current=%zi", rules->current); ++ dbg("current=%zi\n", rules->current); + if (rules->current >= rules->bufsize) { +- dbg("no more rules"); ++ dbg("no more rules\n"); + return NULL; + } + +@@ -62,20 +62,20 @@ struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *la + static struct udev_rule *rule; + + next: +- dbg("current=%zi", rules->current); ++ dbg("current=%zi\n", rules->current); + if (rules->current >= rules->bufsize) { +- dbg("no more rules"); ++ dbg("no more rules\n"); + return NULL; + } + rule = (struct udev_rule *) (rules->buf + rules->current); + + if (strcmp(&rule->buf[rule->label.val_off], label) != 0) { +- dbg("moving forward, looking for label '%s'", label); ++ dbg("moving forward, looking for label '%s'\n", label); + rules->current += sizeof(struct udev_rule) + rule->bufsize; + goto next; + } + +- dbg("found label '%s'", label); ++ dbg("found label '%s'\n", label); + return rule; + } + +@@ -123,29 +123,29 @@ static int get_key(char **line, char **key, enum key_operation *operation, char + if (linepos[0] == '=' && linepos[1] == '=') { + *operation = KEY_OP_MATCH; + linepos += 2; +- dbg("operator=match"); ++ dbg("operator=match\n"); + } else if (linepos[0] == '!' && linepos[1] == '=') { + *operation = KEY_OP_NOMATCH; + linepos += 2; +- dbg("operator=nomatch"); ++ dbg("operator=nomatch\n"); + } else if (linepos[0] == '+' && linepos[1] == '=') { + *operation = KEY_OP_ADD; + linepos += 2; +- dbg("operator=add"); ++ dbg("operator=add\n"); + } else if (linepos[0] == '=') { + *operation = KEY_OP_ASSIGN; + linepos++; +- dbg("operator=assign"); ++ dbg("operator=assign\n"); + } else if (linepos[0] == ':' && linepos[1] == '=') { + *operation = KEY_OP_ASSIGN_FINAL; + linepos += 2; +- dbg("operator=assign_final"); ++ dbg("operator=assign_final\n"); + } else + return -1; + + /* terminate key */ + temp[0] = '\0'; +- dbg("key='%s'", *key); ++ dbg("key='%s'\n", *key); + + /* skip whitespace after operator */ + while (isspace(linepos[0])) +@@ -165,7 +165,7 @@ static int get_key(char **line, char **key, enum key_operation *operation, char + return -1; + temp[0] = '\0'; + temp++; +- dbg("value='%s'", *value); ++ dbg("value='%s'\n", *value); + + /* move line to next key */ + *line = temp; +@@ -184,11 +184,11 @@ static char *get_key_attribute(char *str) + attr++; + pos = strchr(attr, '}'); + if (pos == NULL) { +- err("missing closing brace for format"); ++ err("missing closing brace for format\n"); + return NULL; + } + pos[0] = '\0'; +- dbg("attribute='%s'", attr); ++ dbg("attribute='%s'\n", attr); + return attr; + } + +@@ -215,7 +215,7 @@ static int add_rule_key_pair(struct udev_rule *rule, struct key_pairs *pairs, + size_t key_len = strnlen(key, PATH_SIZE); + + if (pairs->count >= PAIRS_MAX) { +- err("skip, too many keys of the same type in a single rule"); ++ err("skip, too many keys of the same type in a single rule\n"); + return -1; + } + +@@ -261,7 +261,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "ACTION") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid ACTION operation"); ++ err("invalid ACTION operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->action, operation, value); +@@ -272,7 +272,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "DEVPATH") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid DEVPATH operation"); ++ err("invalid DEVPATH operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->devpath, operation, value); +@@ -283,7 +283,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "KERNEL") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid KERNEL operation"); ++ err("invalid KERNEL operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->kernel, operation, value); +@@ -294,7 +294,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "SUBSYSTEM") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid SUBSYSTEM operation"); ++ err("invalid SUBSYSTEM operation\n"); + goto invalid; + } + /* bus, class, subsystem events should all be the same */ +@@ -302,7 +302,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strcmp(value, "bus") == 0 || + strcmp(value, "class") == 0) { + if (strcmp(value, "bus") == 0 || strcmp(value, "class") == 0) +- err("'%s' must be specified as 'subsystem' " ++ err("'%s' must be specified as 'subsystem' \n" + "please fix it in %s:%u", value, filename, lineno); + add_rule_key(rule, &rule->subsystem, operation, "subsystem|class|bus"); + } else +@@ -314,7 +314,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "DRIVER") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid DRIVER operation"); ++ err("invalid DRIVER operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->driver, operation, value); +@@ -325,7 +325,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strncasecmp(key, "ATTR{", sizeof("ATTR{")-1) == 0) { + attr = get_key_attribute(key + sizeof("ATTR")-1); + if (attr == NULL) { +- err("error parsing ATTR attribute"); ++ err("error parsing ATTR attribute\n"); + goto invalid; + } + if (add_rule_key_pair(rule, &rule->attr, operation, attr, value) != 0) +@@ -338,7 +338,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strcasecmp(key, "ID") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid KERNELS operation"); ++ err("invalid KERNELS operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->kernels, operation, value); +@@ -350,7 +350,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strcasecmp(key, "BUS") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid SUBSYSTEMS operation"); ++ err("invalid SUBSYSTEMS operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->subsystems, operation, value); +@@ -361,7 +361,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "DRIVERS") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid DRIVERS operation"); ++ err("invalid DRIVERS operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->drivers, operation, value); +@@ -373,19 +373,19 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + strncasecmp(key, "SYSFS{", sizeof("SYSFS{")-1) == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid ATTRS operation"); ++ err("invalid ATTRS operation\n"); + goto invalid; + } + attr = get_key_attribute(key + sizeof("ATTRS")-1); + if (attr == NULL) { +- err("error parsing ATTRS attribute"); ++ err("error parsing ATTRS attribute\n"); + goto invalid; + } + if (strncmp(attr, "device/", 7) == 0) +- err("the 'device' link is deprecated and will be removed from a future kernel, " ++ err("the 'device' link is deprecated and will be removed from a future kernel, \n" + "please fix it in %s:%u", filename, lineno); + else if (strstr(attr, "../") != NULL) +- err("do not reference parent sysfs directories directly, that may break with a future kernel, " ++ err("do not reference parent sysfs directories directly, that may break with a future kernel, \n" + "please fix it in %s:%u", filename, lineno); + if (add_rule_key_pair(rule, &rule->attrs, operation, attr, value) != 0) + goto invalid; +@@ -396,7 +396,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strncasecmp(key, "ENV{", sizeof("ENV{")-1) == 0) { + attr = get_key_attribute(key + sizeof("ENV")-1); + if (attr == NULL) { +- err("error parsing ENV attribute"); ++ err("error parsing ENV attribute\n"); + goto invalid; + } + if (strncmp(attr, "PHYSDEV", 7) == 0) +@@ -416,7 +416,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strcasecmp(key, "RESULT") == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { +- err("invalid RESULT operation"); ++ err("invalid RESULT operation\n"); + goto invalid; + } + add_rule_key(rule, &rule->result, operation, value); +@@ -427,13 +427,13 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (strncasecmp(key, "IMPORT", sizeof("IMPORT")-1) == 0) { + attr = get_key_attribute(key + sizeof("IMPORT")-1); + if (attr != NULL && strstr(attr, "program")) { +- dbg("IMPORT will be executed"); ++ dbg("IMPORT will be executed\n"); + rule->import_type = IMPORT_PROGRAM; + } else if (attr != NULL && strstr(attr, "file")) { +- dbg("IMPORT will be included as file"); ++ dbg("IMPORT will be included as file\n"); + rule->import_type = IMPORT_FILE; + } else if (attr != NULL && strstr(attr, "parent")) { +- dbg("IMPORT will include the parent values"); ++ dbg("IMPORT will include the parent values\n"); + rule->import_type = IMPORT_PARENT; + } else { + /* figure it out if it is executable */ +@@ -455,12 +455,12 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + pos[0] = '\0'; + } + +- dbg("IMPORT auto mode for '%s'", file); ++ dbg("IMPORT auto mode for '%s'\n", file); + if (!lstat(file, &statbuf) && (statbuf.st_mode & S_IXUSR)) { +- dbg("IMPORT is executable, will be executed (autotype)"); ++ dbg("IMPORT is executable, will be executed (autotype)\n"); + rule->import_type = IMPORT_PROGRAM; + } else { +- dbg("IMPORT is not executable, will be included as file (autotype)"); ++ dbg("IMPORT is not executable, will be included as file (autotype)\n"); + rule->import_type = IMPORT_FILE; + } + } +@@ -472,7 +472,7 @@ 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"); ++ err("invalid TEST operation\n"); + goto invalid; + } + attr = get_key_attribute(key + sizeof("TEST")-1); +@@ -516,16 +516,16 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + attr = get_key_attribute(key + sizeof("NAME")-1); + if (attr != NULL) { + if (strstr(attr, "all_partitions") != NULL) { +- dbg("creation of partition nodes requested"); ++ dbg("creation of partition nodes requested\n"); + rule->partitions = DEFAULT_PARTITIONS_COUNT; + } + if (strstr(attr, "ignore_remove") != NULL) { +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + rule->ignore_remove = 1; + } + } + if (value[0] == '\0') +- dbg("name empty, node creation supressed"); ++ dbg("name empty, node creation supressed\n"); + add_rule_key(rule, &rule->name, operation, value); + continue; + } +@@ -548,7 +548,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (endptr[0] != '\0') { + char owner[32]; + uid_t uid = lookup_user(value); +- dbg("replacing username='%s' by id=%i", value, uid); ++ dbg("replacing username='%s' by id=%i\n", value, uid); + sprintf(owner, "%u", (unsigned int) uid); + add_rule_key(rule, &rule->owner, operation, owner); + continue; +@@ -567,7 +567,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + if (endptr[0] != '\0') { + char group[32]; + gid_t gid = lookup_group(value); +- dbg("replacing groupname='%s' by id=%i", value, gid); ++ dbg("replacing groupname='%s' by id=%i\n", value, gid); + sprintf(group, "%u", (unsigned int) gid); + add_rule_key(rule, &rule->group, operation, group); + continue; +@@ -588,21 +588,21 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + const char *pos; + + if (strstr(value, "last_rule") != NULL) { +- dbg("last rule to be applied"); ++ dbg("last rule to be applied\n"); + rule->last_rule = 1; + } + if (strstr(value, "ignore_device") != NULL) { +- dbg("device should be ignored"); ++ dbg("device should be ignored\n"); + rule->ignore_device = 1; + } + if (strstr(value, "ignore_remove") != NULL) { +- dbg("remove event should be ignored"); ++ dbg("remove event should be ignored\n"); + rule->ignore_remove = 1; + } + pos = strstr(value, "link_priority="); + if (pos != NULL) { + rule->link_priority = atoi(&pos[strlen("link_priority=")]); +- dbg("link priority=%i", rule->link_priority); ++ dbg("link priority=%i\n", rule->link_priority); + } + pos = strstr(value, "string_escape="); + if (pos != NULL) { +@@ -613,18 +613,18 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + rule->string_escape = ESCAPE_REPLACE; + } + if (strstr(value, "all_partitions") != NULL) { +- dbg("creation of partition nodes requested"); ++ dbg("creation of partition nodes requested\n"); + rule->partitions = DEFAULT_PARTITIONS_COUNT; + } + valid = 1; + continue; + } + +- err("unknown key '%s' in %s:%u", key, filename, lineno); ++ err("unknown key '%s' in %s:%u\n", key, filename, lineno); + } + + if (physdev && rule->wait_for_sysfs.operation == KEY_OP_UNSET) +- err("PHYSDEV* values are deprecated and will be removed from a future kernel, " ++ err("PHYSDEV* values are deprecated and will be removed from a future kernel, \n" + "please fix it in %s:%u", filename, lineno); + + /* skip line if not any valid key was found */ +@@ -634,23 +634,23 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena + /* grow buffer and add rule */ + rule_size = sizeof(struct udev_rule) + rule->bufsize; + padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t); +- dbg("add %zi padding bytes", padding); ++ dbg("add %zi padding bytes\n", padding); + rule_size += padding; + rule->bufsize += padding; + + rules->buf = realloc(rules->buf, rules->bufsize + rule_size); + if (!rules->buf) { +- err("realloc failed"); ++ err("realloc failed\n"); + goto exit; + } +- dbg("adding rule to offset %zi", rules->bufsize); ++ dbg("adding rule to offset %zi\n", rules->bufsize); + memcpy(rules->buf + rules->bufsize, rule, rule_size); + rules->bufsize += rule_size; + exit: + return 0; + + invalid: +- err("invalid rule '%s:%u'", filename, lineno); ++ err("invalid rule '%s:%u'\n", filename, lineno); + return -1; + } + +@@ -666,10 +666,10 @@ static int parse_file(struct udev_rules *rules, const char *filename) + int retval = 0; + + if (file_map(filename, &buf, &bufsize) != 0) { +- err("can't open '%s' as rules file: %s", filename, strerror(errno)); ++ err("can't open '%s' as rules file: %s\n", filename, strerror(errno)); + return -1; + } +- info("reading '%s' as rules file", filename); ++ info("reading '%s' as rules file\n", filename); + + /* loop through the whole file */ + cur = 0; +@@ -695,7 +695,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) + continue; + + if (count >= sizeof(line)) { +- err("line too long, rule skipped '%s:%u'", filename, lineno); ++ err("line too long, rule skipped '%s:%u'\n", filename, lineno); + continue; + } + +@@ -708,7 +708,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) + } + line[j] = '\0'; + +- dbg("read '%s'", line); ++ dbg("read '%s'\n", line); + add_to_rules(rules, line, filename, lineno); + } + +@@ -733,10 +733,10 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) + if (stat(udev_rules_dir, &statbuf) != 0) + return -1; + if ((statbuf.st_mode & S_IFMT) != S_IFDIR) { +- dbg("parse single rules file '%s'", udev_rules_dir); ++ dbg("parse single rules file '%s'\n", udev_rules_dir); + name_list_add(&name_list, udev_rules_dir, 1); + } else { +- dbg("parse rules directory '%s'", udev_rules_dir); ++ dbg("parse rules directory '%s'\n", udev_rules_dir); + retval = add_matching_files(&name_list, udev_rules_dir, RULESFILE_SUFFIX); + } + +@@ -776,9 +776,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) + if (statbuf.st_size) + parse_file(rules, name_loop->name); + else +- dbg("empty rules file '%s'", name_loop->name); ++ dbg("empty rules file '%s'\n", name_loop->name); + } else +- err("could not read '%s': %s", name_loop->name, strerror(errno)); ++ err("could not read '%s': %s\n", name_loop->name, strerror(errno)); + list_del(&name_loop->node); + free(name_loop); + } +diff --git a/udev_selinux.c b/udev_selinux.c +index 3fa84a0..eec9501 100644 +--- a/udev_selinux.c ++++ b/udev_selinux.c +@@ -40,7 +40,7 @@ static int is_selinux_running(void) + if (selinux_enabled == -1) + selinux_enabled = (is_selinux_enabled() > 0); + +- dbg("selinux=%i", selinux_enabled); ++ dbg("selinux=%i\n", selinux_enabled); + return selinux_enabled; + } + +@@ -75,7 +75,7 @@ static char *get_media(const char *devname, int mode) + } + + media = strdup(mediabuf); +- info("selinux_get_media(%s)='%s'", devname, media); ++ info("selinux_get_media(%s)='%s'\n", devname, media); + + close_out: + fclose(fp); +@@ -100,12 +100,12 @@ void selinux_setfilecon(const char *file, const char *devname, unsigned int mode + + if (ret < 0) + if (matchpathcon(file, mode, &scontext) < 0) { +- err("matchpathcon(%s) failed", file); ++ err("matchpathcon(%s) failed\n", file); + return; + } + + if (lsetfilecon(file, scontext) < 0) +- err("setfilecon %s failed: %s", file, strerror(errno)); ++ err("setfilecon %s failed: %s\n", file, strerror(errno)); + + freecon(scontext); + } +@@ -128,12 +128,12 @@ void selinux_setfscreatecon(const char *file, const char *devname, unsigned int + + if (ret < 0) + if (matchpathcon(file, mode, &scontext) < 0) { +- err("matchpathcon(%s) failed", file); ++ err("matchpathcon(%s) failed\n", file); + return; + } + + if (setfscreatecon(scontext) < 0) +- err("setfscreatecon %s failed: %s", file, strerror(errno)); ++ err("setfscreatecon %s failed: %s\n", file, strerror(errno)); + + freecon(scontext); + } +@@ -143,7 +143,7 @@ void selinux_resetfscreatecon(void) + { + if (is_selinux_running()) { + if (setfscreatecon(prev_scontext) < 0) +- err("setfscreatecon failed: %s", strerror(errno)); ++ err("setfscreatecon failed: %s\n", strerror(errno)); + } + } + +@@ -155,10 +155,10 @@ void selinux_init(void) + */ + if (is_selinux_running()) { + if (!udev_root[0]) +- err("selinux_init: udev_root not set"); ++ err("selinux_init: udev_root not set\n"); + matchpathcon_init_prefix(NULL, udev_root); + if (getfscreatecon(&prev_scontext) < 0) { +- err("getfscreatecon failed"); ++ err("getfscreatecon failed\n"); + prev_scontext = NULL; + } + } +diff --git a/udev_sysfs.c b/udev_sysfs.c +index 9293305..c4cd4ab 100644 +--- a/udev_sysfs.c ++++ b/udev_sysfs.c +@@ -52,7 +52,7 @@ int sysfs_init(void) + remove_trailing_chars(sysfs_path, '/'); + } else + strlcpy(sysfs_path, "/sys", sizeof(sysfs_path)); +- dbg("sysfs_path='%s'", sysfs_path); ++ dbg("sysfs_path='%s'\n", sysfs_path); + + INIT_LIST_HEAD(&dev_list); + INIT_LIST_HEAD(&attr_list); +@@ -93,7 +93,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, + if (pos == NULL) + return; + strlcpy(dev->kernel, &pos[1], sizeof(dev->kernel)); +- dbg("kernel='%s'", dev->kernel); ++ dbg("kernel='%s'\n", dev->kernel); + + /* some devices have '!' in their name, change that to '/' */ + pos = dev->kernel; +@@ -108,7 +108,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, + while (isdigit(pos[-1])) + pos--; + strlcpy(dev->kernel_number, pos, sizeof(dev->kernel_number)); +- dbg("kernel_number='%s'", dev->kernel_number); ++ dbg("kernel_number='%s'\n", dev->kernel_number); + } + + int sysfs_resolve_link(char *devpath, size_t size) +@@ -125,11 +125,11 @@ int sysfs_resolve_link(char *devpath, size_t size) + if (len <= 0) + return -1; + link_target[len] = '\0'; +- dbg("path link '%s' points to '%s'", devpath, link_target); ++ dbg("path link '%s' points to '%s'\n", devpath, link_target); + + for (back = 0; strncmp(&link_target[back * 3], "../", 3) == 0; back++) + ; +- dbg("base '%s', tail '%s', back %i", devpath, &link_target[back * 3], back); ++ dbg("base '%s', tail '%s', back %i\n", devpath, &link_target[back * 3], back); + for (i = 0; i <= back; i++) { + char *pos = strrchr(devpath, '/'); + +@@ -137,7 +137,7 @@ int sysfs_resolve_link(char *devpath, size_t size) + return -1; + pos[0] = '\0'; + } +- dbg("after moving back '%s'", devpath); ++ dbg("after moving back '%s'\n", devpath); + strlcat(devpath, "/", size); + strlcat(devpath, &link_target[back * 3], size); + return 0; +@@ -165,7 +165,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + strncmp(devpath, "/block/", 7) != 0) + return NULL; + +- dbg("open '%s'", devpath); ++ dbg("open '%s'\n", devpath); + strlcpy(devpath_real, devpath, sizeof(devpath_real)); + remove_trailing_chars(devpath_real, '/'); + if (devpath[0] == '\0' ) +@@ -174,7 +174,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + /* look for device already in cache (we never put an untranslated path in the cache) */ + list_for_each_entry(dev_loop, &dev_list, node) { + if (strcmp(dev_loop->devpath, devpath_real) == 0) { +- dbg("found in cache '%s'", dev_loop->devpath); ++ dbg("found in cache '%s'\n", dev_loop->devpath); + return dev_loop; + } + } +@@ -183,7 +183,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + strlcpy(path, sysfs_path, sizeof(path)); + strlcat(path, devpath_real, sizeof(path)); + if (lstat(path, &statbuf) != 0) { +- dbg("stat '%s' failed: %s", path, strerror(errno)); ++ dbg("stat '%s' failed: %s\n", path, strerror(errno)); + return NULL; + } + if (S_ISLNK(statbuf.st_mode)) { +@@ -193,14 +193,14 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + /* now look for device in cache after path translation */ + list_for_each_entry(dev_loop, &dev_list, node) { + if (strcmp(dev_loop->devpath, devpath_real) == 0) { +- dbg("found in cache '%s'", dev_loop->devpath); ++ dbg("found in cache '%s'\n", dev_loop->devpath); + return dev_loop; + } + } + } + + /* it is a new device */ +- dbg("new uncached device '%s'", devpath_real); ++ dbg("new uncached device '%s'\n", devpath_real); + dev = malloc(sizeof(struct sysfs_device)); + if (dev == NULL) + return NULL; +@@ -216,7 +216,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + if (len > 0) { + /* get subsystem from "subsystem" link */ + link_target[len] = '\0'; +- dbg("subsystem link '%s' points to '%s'", link_path, link_target); ++ dbg("subsystem link '%s' points to '%s'\n", link_path, link_target); + pos = strrchr(link_target, '/'); + if (pos != NULL) + strlcpy(dev->subsystem, &pos[1], sizeof(dev->subsystem)); +@@ -245,13 +245,13 @@ struct sysfs_device *sysfs_device_get(const char *devpath) + len = readlink(link_path, link_target, sizeof(link_target)); + if (len > 0) { + link_target[len] = '\0'; +- dbg("driver link '%s' points to '%s'", link_path, link_target); ++ dbg("driver link '%s' points to '%s'\n", link_path, link_target); + pos = strrchr(link_target, '/'); + if (pos != NULL) + strlcpy(dev->driver, &pos[1], sizeof(dev->driver)); + } + +- dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'", dev->devpath, dev->subsystem, dev->driver); ++ dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'\n", dev->devpath, dev->subsystem, dev->driver); + list_add(&dev->node, &dev_list); + + return dev; +@@ -262,14 +262,14 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) + char parent_devpath[PATH_SIZE]; + char *pos; + +- dbg("open '%s'", dev->devpath); ++ dbg("open '%s'\n", dev->devpath); + + /* look if we already know the parent */ + if (dev->parent != NULL) + return dev->parent; + + strlcpy(parent_devpath, dev->devpath, sizeof(parent_devpath)); +- dbg("'%s'", parent_devpath); ++ dbg("'%s'\n", parent_devpath); + + /* strip last element */ + pos = strrchr(parent_devpath, '/'); +@@ -280,12 +280,12 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) + if (strncmp(parent_devpath, "/class", 6) == 0) { + pos = strrchr(parent_devpath, '/'); + if (pos == &parent_devpath[6] || pos == parent_devpath) { +- dbg("/class top level, look for device link"); ++ dbg("/class top level, look for device link\n"); + goto device_link; + } + } + if (strcmp(parent_devpath, "/block") == 0) { +- dbg("/block top level, look for device link"); ++ dbg("/block top level, look for device link\n"); + goto device_link; + } + +@@ -334,7 +334,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + ssize_t size; + size_t sysfs_len; + +- dbg("open '%s'/'%s'", devpath, attr_name); ++ dbg("open '%s'/'%s'\n", 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; +@@ -346,23 +346,23 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + /* look for attribute in cache */ + list_for_each_entry(attr_loop, &attr_list, node) { + if (strcmp(attr_loop->path, path) == 0) { +- dbg("found in cache '%s'", attr_loop->path); ++ dbg("found in cache '%s'\n", attr_loop->path); + return attr_loop->value; + } + } + + /* store attribute in cache (also negatives are kept in cache) */ +- dbg("new uncached attribute '%s'", path_full); ++ dbg("new uncached attribute '%s'\n", path_full); + attr = malloc(sizeof(struct sysfs_attr)); + if (attr == NULL) + return NULL; + memset(attr, 0x00, sizeof(struct sysfs_attr)); + strlcpy(attr->path, path, sizeof(attr->path)); +- dbg("add to cache '%s'", path_full); ++ dbg("add to cache '%s'\n", path_full); + list_add(&attr->node, &attr_list); + + if (lstat(path_full, &statbuf) != 0) { +- dbg("stat '%s' failed: %s", path_full, strerror(errno)); ++ dbg("stat '%s' failed: %s\n", path_full, strerror(errno)); + goto out; + } + +@@ -377,7 +377,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + link_target[len] = '\0'; + pos = strrchr(link_target, '/'); + if (pos != NULL) { +- dbg("cache '%s' with link value '%s'", path_full, value); ++ dbg("cache '%s' with link value '%s'\n", path_full, value); + strlcpy(attr->value_local, &pos[1], sizeof(attr->value_local)); + attr->value = attr->value_local; + } +@@ -396,7 +396,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' can not be opened", path_full); ++ dbg("attribute '%s' can not be opened\n", path_full); + goto out; + } + size = read(fd, value, sizeof(value)); +@@ -409,7 +409,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) + /* got a valid value, store and return it */ + value[size] = '\0'; + remove_trailing_chars(value, '\n'); +- dbg("cache '%s' with attribute value '%s'", path_full, value); ++ dbg("cache '%s' with attribute value '%s'\n", path_full, value); + strlcpy(attr->value_local, value, sizeof(attr->value_local)); + attr->value = attr->value_local; + +diff --git a/udev_utils.c b/udev_utils.c +index e1630b6..00b67da 100644 +--- a/udev_utils.c ++++ b/udev_utils.c +@@ -62,7 +62,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, + /* avoid duplicate entries */ + list_for_each_entry(name_loop, name_list, node) { + if (strcmp(name_loop->name, name) == 0) { +- dbg("'%s' is already in the list", name); ++ dbg("'%s' is already in the list\n", name); + return name_loop; + } + } +@@ -78,7 +78,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, + return NULL; + + strlcpy(name_new->name, name, sizeof(name_new->name)); +- dbg("adding '%s'", name_new->name); ++ dbg("adding '%s'\n", name_new->name); + list_add_tail(&name_new->node, &name_loop->node); + + return name_new; +@@ -91,7 +91,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke + + list_for_each_entry(name_loop, name_list, node) { + if (strncmp(name_loop->name, key, strlen(key)) == 0) { +- dbg("key already present '%s', replace it", name_loop->name); ++ dbg("key already present '%s', replace it\n", name_loop->name); + snprintf(name_loop->name, sizeof(name_loop->name), "%s=%s", key, value); + name_loop->name[sizeof(name_loop->name)-1] = '\0'; + return name_loop; +@@ -104,7 +104,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke + + snprintf(name_new->name, sizeof(name_new->name), "%s=%s", key, value); + name_new->name[sizeof(name_new->name)-1] = '\0'; +- dbg("adding '%s'", name_new->name); ++ dbg("adding '%s'\n", name_new->name); + list_add_tail(&name_new->node, &name_loop->node); + + return name_new; +@@ -148,10 +148,10 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c + DIR *dir; + char filename[PATH_SIZE]; + +- dbg("open directory '%s'", dirname); ++ dbg("open directory '%s'\n", dirname); + dir = opendir(dirname); + if (dir == NULL) { +- err("unable to open '%s': %s", dirname, strerror(errno)); ++ err("unable to open '%s': %s\n", dirname, strerror(errno)); + return -1; + } + +@@ -173,7 +173,7 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c + if (strcmp(ext, suffix) != 0) + continue; + } +- dbg("put file '%s/%s' into list", dirname, ent->d_name); ++ dbg("put file '%s/%s' into list\n", dirname, ent->d_name); + + snprintf(filename, sizeof(filename), "%s/%s", dirname, ent->d_name); + filename[sizeof(filename)-1] = '\0'; +@@ -193,9 +193,9 @@ uid_t lookup_user(const char *user) + pw = getpwnam(user); + if (pw == NULL) { + if (errno == 0 || errno == ENOENT || errno == ESRCH) +- err("specified user '%s' unknown", user); ++ err("specified user '%s' unknown\n", user); + else +- err("error resolving user '%s': %s", user, strerror(errno)); ++ err("error resolving user '%s': %s\n", user, strerror(errno)); + } else + uid = pw->pw_uid; + +@@ -211,9 +211,9 @@ extern gid_t lookup_group(const char *group) + gr = getgrnam(group); + if (gr == NULL) { + if (errno == 0 || errno == ENOENT || errno == ESRCH) +- err("specified group '%s' unknown", group); ++ err("specified group '%s' unknown\n", group); + else +- err("error resolving group '%s': %s", group, strerror(errno)); ++ err("error resolving group '%s': %s\n", group, strerror(errno)); + } else + gid = gr->gr_gid; + +diff --git a/udev_utils_file.c b/udev_utils_file.c +index 19668b9..a492785 100644 +--- a/udev_utils_file.c ++++ b/udev_utils_file.c +@@ -47,14 +47,14 @@ int create_path(const char *path) + pos--; + pos[0] = '\0'; + +- dbg("stat '%s'", p); ++ dbg("stat '%s'\n", p); + if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) + return 0; + + if (create_path(p) != 0) + return -1; + +- dbg("mkdir '%s'", p); ++ dbg("mkdir '%s'\n", p); + selinux_setfscreatecon(p, NULL, S_IFDIR|0755); + ret = mkdir(p, 0755); + selinux_resetfscreatecon(); +@@ -93,10 +93,10 @@ int delete_path(const char *path) + if (retval) { + if (errno == ENOTEMPTY) + return 0; +- err("rmdir(%s) failed: %s", p, strerror(errno)); ++ err("rmdir(%s) failed: %s\n", p, strerror(errno)); + break; + } +- dbg("removed '%s'", p); ++ dbg("removed '%s'\n", p); + } + return 0; + } +@@ -110,18 +110,18 @@ int unlink_secure(const char *filename) + + retval = chown(filename, 0, 0); + if (retval) +- err("chown(%s, 0, 0) failed: %s", filename, strerror(errno)); ++ err("chown(%s, 0, 0) failed: %s\n", filename, strerror(errno)); + + retval = chmod(filename, 0000); + if (retval) +- err("chmod(%s, 0000) failed: %s", filename, strerror(errno)); ++ err("chmod(%s, 0000) failed: %s\n", filename, strerror(errno)); + + retval = unlink(filename); + if (errno == ENOENT) + retval = 0; + + if (retval) +- err("unlink(%s) failed: %s", filename, strerror(errno)); ++ err("unlink(%s) failed: %s\n", filename, strerror(errno)); + + return retval; + } +diff --git a/udevadm.c b/udevadm.c +index e2b7779..6e7d773 100644 +--- a/udevadm.c ++++ b/udevadm.c +@@ -26,7 +26,7 @@ + + #include "udev.h" + +-static int verbose; ++static int debug; + + #ifdef USE_LOG + void log_message(int priority, const char *format, ...) +@@ -37,9 +37,8 @@ void log_message(int priority, const char *format, ...) + return; + + va_start(args, format); +- if (verbose) { ++ if (debug) { + vprintf(format, args); +- printf("\n"); + } else + vsyslog(priority, format, args); + va_end(args); +@@ -50,7 +49,7 @@ struct command { + const char *name; + int (*cmd)(int argc, char *argv[], char *envp[]); + const char *help; +- int verbose; ++ int debug; + }; + + static const struct command cmds[]; +@@ -102,7 +101,7 @@ static const struct command cmds[] = { + .name = "test", + .cmd = udevtest, + .help = "simulation run", +- .verbose = 1, ++ .debug = 1, + }, + { + .name = "version", +@@ -155,7 +154,7 @@ int main(int argc, char *argv[], char *envp[]) + /* find and execute command */ + for (cmd = cmds; cmd->name != NULL; cmd++) { + if (strcmp(cmd->name, command) == 0) { +- verbose = cmd->verbose; ++ debug = cmd->debug; + rc = cmd->cmd(argc, argv, envp); + goto out; + } +diff --git a/udevcontrol.c b/udevcontrol.c +index f6b5dd9..287e8aa 100644 +--- a/udevcontrol.c ++++ b/udevcontrol.c +@@ -50,7 +50,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + udev_log = log_priority(env); + + logging_init("udevcontrol"); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + + if (argc < 2) { + fprintf(stderr, "missing command\n\n"); +@@ -75,7 +75,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + val = &arg[strlen("log_priority=")]; + ctrl_msg.type = UDEVD_CTRL_SET_LOG_LEVEL; + *intval = log_priority(val); +- info("send log_priority=%i", *intval); ++ info("send log_priority=%i\n", *intval); + } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) { + char *endp; + int count; +@@ -89,7 +89,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + goto exit; + } + *intval = count; +- info("send max_childs=%i", *intval); ++ info("send max_childs=%i\n", *intval); + } else if (!strncmp(arg, "max_childs_running=", strlen("max_childs_running="))) { + char *endp; + int count; +@@ -103,7 +103,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + goto exit; + } + *intval = count; +- info("send max_childs_running=%i", *intval); ++ info("send max_childs_running=%i\n", *intval); + } else if (!strncmp(arg, "env", strlen("env"))) { + val = argv[2]; + if (val == NULL) { +@@ -112,7 +112,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + } + ctrl_msg.type = UDEVD_CTRL_ENV; + strlcpy(ctrl_msg.buf, val, sizeof(ctrl_msg.buf)); +- info("send env '%s'", val); ++ info("send env '%s'\n", val); + } else if (strcmp(arg, "help") == 0 || strcmp(arg, "-h") == 0) { + printf("Usage: udevadm control COMMAND\n" + " --log_priority= set the udev log level for the daemon\n" +@@ -136,7 +136,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + if (sock == -1) { +- err("error getting socket: %s", strerror(errno)); ++ err("error getting socket: %s\n", strerror(errno)); + goto exit; + } + +@@ -148,10 +148,10 @@ int udevcontrol(int argc, char *argv[], char *envp[]) + + retval = sendto(sock, &ctrl_msg, sizeof(ctrl_msg), 0, (struct sockaddr *)&saddr, addrlen); + if (retval == -1) { +- err("error sending message: %s", strerror(errno)); ++ err("error sending message: %s\n", strerror(errno)); + retval = 1; + } else { +- dbg("sent message type=0x%02x, %u bytes sent", ctrl_msg.type, retval); ++ dbg("sent message type=0x%02x, %u bytes sent\n", ctrl_msg.type, retval); + retval = 0; + } + +diff --git a/udevd.8 b/udevd.8 +index 1323313..210ed3f 100644 +--- a/udevd.8 ++++ b/udevd.8 +@@ -14,7 +14,7 @@ + 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] ++\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] + .SH "DESCRIPTION" + .PP + udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the correct event order and takes care, that events for child devices are delayed until the parent event has finished the device handling\. The behavior of the running daemon can be changed with +@@ -31,7 +31,7 @@ Detach and run in the background\. + 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 ++\fB\-\-debug\fR + .RS 4 + Print log messages to stdout\. + .RE +diff --git a/udevd.c b/udevd.c +index 7786ae6..66a410e 100644 +--- a/udevd.c ++++ b/udevd.c +@@ -46,7 +46,7 @@ + #include "udev_selinux.h" + + static int debug_trace; +-static int verbose; ++static int debug; + + static struct udev_rules rules; + static int udevd_sock = -1; +@@ -77,10 +77,9 @@ void log_message(int priority, const char *format, ...) + return; + + va_start(args, format); +- if (verbose) { ++ if (debug) { + printf("[%d] ", (int) getpid()); + vprintf(format, args); +- printf("\n"); + } else + vsyslog(priority, format, args); + va_end(args); +@@ -184,7 +183,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st + 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'", ++ info("renamed devpath, moved failed state of '%s' to %s'\n", + msg->devpath_old, msg->devpath); + } else { + unlink(filename_failed); +@@ -241,19 +240,19 @@ static void udev_event_run(struct udevd_uevent_msg *msg) + setpriority(PRIO_PROCESS, 0, UDEV_PRIORITY); + + retval = udev_event_process(msg); +- info("seq %llu finished with %i", msg->seqnum, retval); ++ info("seq %llu finished with %i\n", msg->seqnum, retval); + + logging_close(); + if (retval) + exit(1); + exit(0); + case -1: +- err("fork of child failed: %s", strerror(errno)); ++ err("fork of child failed: %s\n", strerror(errno)); + msg_queue_delete(msg); + break; + default: + /* get SIGCHLD in main loop */ +- info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old", ++ info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old\n", + msg->seqnum, pid, msg->action, msg->subsystem, time(NULL) - msg->queue_time); + msg->pid = pid; + } +@@ -279,7 +278,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) + } + + export_event_state(msg, EVENT_QUEUED); +- info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); ++ info("seq %llu queued, '%s' '%s'\n", msg->seqnum, msg->action, msg->subsystem); + + /* run one event after the other in debug mode */ + if (debug_trace) { +@@ -476,7 +475,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + + /* check identical, parent, or child device event */ + if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { +- dbg("%llu, device event still pending %llu (%s)", ++ dbg("%llu, device event still pending %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 3; + } +@@ -484,7 +483,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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, ++ dbg("%llu, device event still pending %llu (%d:%d)\n", msg->seqnum, + loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); + return 4; + } +@@ -492,7 +491,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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)", ++ dbg("%llu, physical device event still pending %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 5; + } +@@ -501,7 +500,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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); ++ dbg("%llu, maximum number (%i) of childs reached\n", msg->seqnum, childs_count); + return 1; + } + +@@ -512,7 +511,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + + /* check identical, parent, or child device event */ + if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { +- dbg("%llu, device event still running %llu (%s)", ++ dbg("%llu, device event still running %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 3; + } +@@ -520,7 +519,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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, ++ dbg("%llu, device event still running %llu (%d:%d)\n", msg->seqnum, + loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); + return 4; + } +@@ -528,7 +527,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) + /* 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)", ++ dbg("%llu, physical device event still running %llu (%s)\n", + msg->seqnum, loop_msg->seqnum, loop_msg->devpath); + return 5; + } +@@ -547,7 +546,7 @@ static void msg_queue_manager(void) + return; + + running = running_processes(); +- dbg("%d processes runnning on system", running); ++ dbg("%d processes runnning on system\n", running); + if (running < 0) + running = max_childs_running; + +@@ -555,16 +554,16 @@ static void msg_queue_manager(void) + /* check running processes in our session and possibly throttle */ + if (running >= max_childs_running) { + running = running_processes_in_session(sid, max_childs_running+10); +- dbg("at least %d processes running in session", running); ++ dbg("at least %d processes running in session\n", running); + if (running >= max_childs_running) { +- dbg("delay seq %llu, too many processes already running", loop_msg->seqnum); ++ dbg("delay seq %llu, too many processes already running\n", loop_msg->seqnum); + return; + } + } + + /* serialize and wait for parent or child events */ + if (devpath_busy(loop_msg, max_childs) != 0) { +- dbg("delay seq %llu (%s)", loop_msg->seqnum, loop_msg->devpath); ++ dbg("delay seq %llu (%s)\n", loop_msg->seqnum, loop_msg->devpath); + continue; + } + +@@ -572,7 +571,7 @@ static void msg_queue_manager(void) + list_move_tail(&loop_msg->node, &running_list); + udev_event_run(loop_msg); + running++; +- dbg("moved seq %llu to running list", loop_msg->seqnum); ++ dbg("moved seq %llu to running list\n", loop_msg->seqnum); + } + } + +@@ -601,7 +600,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz + keylen = strlen(key); + msg->envp[i] = key; + bufpos += keylen + 1; +- dbg("add '%s' to msg.envp[%i]", msg->envp[i], i); ++ dbg("add '%s' to msg.envp[%i]\n", msg->envp[i], i); + + /* remember some keys for further processing */ + if (strncmp(key, "ACTION=", 7) == 0) +@@ -639,7 +638,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz + msg->envp[i] = NULL; + + if (msg->devpath == NULL || msg->action == NULL) { +- info("DEVPATH or ACTION missing, ignore message"); ++ info("DEVPATH or ACTION missing, ignore message\n"); + free(msg); + return NULL; + } +@@ -672,24 +671,24 @@ static void get_ctrl_msg(void) + size = recvmsg(udevd_sock, &smsg, 0); + if (size < 0) { + if (errno != EINTR) +- err("unable to receive user udevd message: %s", strerror(errno)); ++ err("unable to receive user udevd message: %s\n", strerror(errno)); + return; + } + cmsg = CMSG_FIRSTHDR(&smsg); + cred = (struct ucred *) CMSG_DATA(cmsg); + + if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { +- err("no sender credentials received, message ignored"); ++ err("no sender credentials received, message ignored\n"); + return; + } + + if (cred->uid != 0) { +- err("sender uid=%i, message ignored", cred->uid); ++ err("sender uid=%i, message ignored\n", cred->uid); + return; + } + + if (strncmp(ctrl_msg.magic, UDEVD_CTRL_MAGIC, sizeof(UDEVD_CTRL_MAGIC)) != 0 ) { +- err("message magic '%s' doesn't match, ignore it", ctrl_msg.magic); ++ err("message magic '%s' doesn't match, ignore it\n", ctrl_msg.magic); + return; + } + +@@ -697,50 +696,50 @@ static void get_ctrl_msg(void) + case UDEVD_CTRL_ENV: + pos = strchr(ctrl_msg.buf, '='); + if (pos == NULL) { +- err("wrong key format '%s'", ctrl_msg.buf); ++ err("wrong key format '%s'\n", ctrl_msg.buf); + break; + } + pos[0] = '\0'; + if (pos[1] == '\0') { +- info("udevd message (ENV) received, unset '%s'", ctrl_msg.buf); ++ info("udevd message (ENV) received, unset '%s'\n", ctrl_msg.buf); + unsetenv(ctrl_msg.buf); + } else { +- info("udevd message (ENV) received, set '%s=%s'", ctrl_msg.buf, &pos[1]); ++ info("udevd message (ENV) received, set '%s=%s'\n", 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"); ++ info("udevd message (STOP_EXEC_QUEUE) received\n"); + stop_exec_q = 1; + break; + case UDEVD_CTRL_START_EXEC_QUEUE: +- info("udevd message (START_EXEC_QUEUE) received"); ++ info("udevd message (START_EXEC_QUEUE) received\n"); + stop_exec_q = 0; + msg_queue_manager(); + break; + case UDEVD_CTRL_SET_LOG_LEVEL: + intval = (int *) ctrl_msg.buf; +- info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i", *intval); ++ info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i\n", *intval); + udev_log_priority = *intval; + sprintf(udev_log, "UDEV_LOG=%i", udev_log_priority); + putenv(udev_log); + break; + case UDEVD_CTRL_SET_MAX_CHILDS: + intval = (int *) ctrl_msg.buf; +- info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i", *intval); ++ info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i\n", *intval); + max_childs = *intval; + break; + case UDEVD_CTRL_SET_MAX_CHILDS_RUNNING: + intval = (int *) ctrl_msg.buf; +- info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i", *intval); ++ info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i\n", *intval); + max_childs_running = *intval; + break; + case UDEVD_CTRL_RELOAD_RULES: +- info("udevd message (RELOAD_RULES) received"); ++ info("udevd message (RELOAD_RULES) received\n"); + reload_config = 1; + break; + default: +- err("unknown control message type"); ++ err("unknown control message type\n"); + } + } + +@@ -756,14 +755,14 @@ static struct udevd_uevent_msg *get_netlink_msg(void) + size = recv(uevent_netlink_sock, &buffer, sizeof(buffer), 0); + if (size < 0) { + if (errno != EINTR) +- err("unable to receive kernel netlink message: %s", strerror(errno)); ++ err("unable to receive kernel netlink message: %s\n", strerror(errno)); + return NULL; + } + + if ((size_t)size > sizeof(buffer)-1) + size = sizeof(buffer)-1; + buffer[size] = '\0'; +- dbg("uevent_size=%zi", size); ++ dbg("uevent_size=%zi\n", size); + + /* start of event payload */ + bufpos = strlen(buffer)+1; +@@ -774,20 +773,20 @@ static struct udevd_uevent_msg *get_netlink_msg(void) + /* validate message */ + pos = strchr(buffer, '@'); + if (pos == NULL) { +- err("invalid uevent '%s'", buffer); ++ err("invalid uevent '%s'\n", buffer); + free(msg); + return NULL; + } + pos[0] = '\0'; + + if (msg->action == NULL) { +- info("no ACTION in payload found, skip event '%s'", buffer); ++ info("no ACTION in payload found, skip event '%s'\n", buffer); + free(msg); + return NULL; + } + + if (strcmp(msg->action, buffer) != 0) { +- err("ACTION in payload does not match uevent, skip event '%s'", buffer); ++ err("ACTION in payload does not match uevent, skip event '%s'\n", buffer); + free(msg); + return NULL; + } +@@ -822,7 +821,7 @@ static void udev_done(int pid, int exitstatus) + + list_for_each_entry(msg, &running_list, node) { + if (msg->pid == pid) { +- info("seq %llu, pid [%d] exit with %i, %ld seconds old", msg->seqnum, msg->pid, ++ info("seq %llu, pid [%d] exit with %i, %ld seconds old\n", msg->seqnum, msg->pid, + exitstatus, time(NULL) - msg->queue_time); + msg->exitstatus = exitstatus; + msg_queue_delete(msg); +@@ -868,14 +867,14 @@ static int init_udevd_socket(void) + + udevd_sock = socket(AF_LOCAL, SOCK_DGRAM, 0); + if (udevd_sock == -1) { +- err("error getting socket: %s", strerror(errno)); ++ err("error getting socket: %s\n", strerror(errno)); + return -1; + } + + /* the bind takes care of ensuring only one copy running */ + retval = bind(udevd_sock, (struct sockaddr *) &saddr, addrlen); + if (retval < 0) { +- err("bind failed: %s", strerror(errno)); ++ err("bind failed: %s\n", strerror(errno)); + close(udevd_sock); + udevd_sock = -1; + return -1; +@@ -900,7 +899,7 @@ static int init_uevent_netlink_sock(void) + + uevent_netlink_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); + if (uevent_netlink_sock == -1) { +- err("error getting socket: %s", strerror(errno)); ++ err("error getting socket: %s\n", strerror(errno)); + return -1; + } + +@@ -909,7 +908,7 @@ static int init_uevent_netlink_sock(void) + + retval = bind(uevent_netlink_sock, (struct sockaddr *) &snl, sizeof(struct sockaddr_nl)); + if (retval < 0) { +- err("bind failed: %s", strerror(errno)); ++ err("bind failed: %s\n", strerror(errno)); + close(uevent_netlink_sock); + uevent_netlink_sock = -1; + return -1; +@@ -957,7 +956,7 @@ int main(int argc, char *argv[], char *envp[]) + static const struct option options[] = { + { "daemon", 0, NULL, 'd' }, + { "debug-trace", 0, NULL, 't' }, +- { "verbose", 0, NULL, 'v' }, ++ { "debug", 0, NULL, 'D' }, + { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'V' }, + {} +@@ -968,10 +967,10 @@ int main(int argc, char *argv[], char *envp[]) + logging_init("udevd"); + udev_config_init(); + selinux_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + + while (1) { +- option = getopt_long(argc, argv, "dtvhV", options, NULL); ++ option = getopt_long(argc, argv, "dDthV", options, NULL); + if (option == -1) + break; + +@@ -982,13 +981,13 @@ int main(int argc, char *argv[], char *envp[]) + case 't': + debug_trace = 1; + break; +- case 'v': +- verbose = 1; ++ case 'D': ++ debug = 1; + if (udev_log_priority < LOG_INFO) + udev_log_priority = LOG_INFO; + break; + case 'h': +- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n"); ++ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--version]\n"); + goto exit; + case 'V': + printf("%s\n", UDEV_VERSION); +@@ -1000,7 +999,7 @@ int main(int argc, char *argv[], char *envp[]) + + if (getuid() != 0) { + fprintf(stderr, "root privileges required\n"); +- err("root privileges required"); ++ err("root privileges required\n"); + goto exit; + } + +@@ -1008,7 +1007,7 @@ int main(int argc, char *argv[], char *envp[]) + fd = open("/dev/null", O_RDWR); + if (fd < 0) { + fprintf(stderr, "cannot open /dev/null\n"); +- err("cannot open /dev/null"); ++ err("cannot open /dev/null\n"); + } + if (fd > STDIN_FILENO) + dup2(fd, STDIN_FILENO); +@@ -1021,11 +1020,11 @@ int main(int argc, char *argv[], char *envp[]) + if (init_udevd_socket() < 0) { + if (errno == EADDRINUSE) { + fprintf(stderr, "another udev daemon already running\n"); +- err("another udev daemon already running"); ++ err("another udev daemon already running\n"); + rc = 1; + } else { + fprintf(stderr, "error initializing udevd socket\n"); +- err("error initializing udevd socket"); ++ err("error initializing udevd socket\n"); + rc = 2; + } + goto exit; +@@ -1033,7 +1032,7 @@ int main(int argc, char *argv[], char *envp[]) + + if (init_uevent_netlink_sock() < 0) { + fprintf(stderr, "error initializing netlink socket\n"); +- err("error initializing netlink socket"); ++ err("error initializing netlink socket\n"); + rc = 3; + goto exit; + } +@@ -1041,29 +1040,29 @@ int main(int argc, char *argv[], char *envp[]) + /* setup signal handler pipe */ + retval = pipe(signal_pipe); + if (retval < 0) { +- err("error getting pipes: %s", strerror(errno)); ++ err("error getting pipes: %s\n", strerror(errno)); + goto exit; + } + + retval = fcntl(signal_pipe[READ_END], F_GETFL, 0); + if (retval < 0) { +- err("error fcntl on read pipe: %s", strerror(errno)); ++ err("error fcntl on read pipe: %s\n", strerror(errno)); + goto exit; + } + retval = fcntl(signal_pipe[READ_END], F_SETFL, retval | O_NONBLOCK); + if (retval < 0) { +- err("error fcntl on read pipe: %s", strerror(errno)); ++ err("error fcntl on read pipe: %s\n", strerror(errno)); + goto exit; + } + + retval = fcntl(signal_pipe[WRITE_END], F_GETFL, 0); + if (retval < 0) { +- err("error fcntl on write pipe: %s", strerror(errno)); ++ err("error fcntl on write pipe: %s\n", strerror(errno)); + goto exit; + } + retval = fcntl(signal_pipe[WRITE_END], F_SETFL, retval | O_NONBLOCK); + if (retval < 0) { +- err("error fcntl on write pipe: %s", strerror(errno)); ++ err("error fcntl on write pipe: %s\n", strerror(errno)); + goto exit; + } + +@@ -1079,21 +1078,21 @@ int main(int argc, char *argv[], char *envp[]) + pid = fork(); + switch (pid) { + case 0: +- dbg("daemonized fork running"); ++ dbg("daemonized fork running\n"); + break; + case -1: +- err("fork of daemon failed: %s", strerror(errno)); ++ err("fork of daemon failed: %s\n", strerror(errno)); + rc = 4; + goto exit; + default: +- dbg("child [%u] running, parent exits", pid); ++ dbg("child [%u] running, parent exits\n", pid); + rc = 0; + goto exit; + } + } + + /* redirect std{out,err} fd's */ +- if (!verbose) ++ if (!debug) + dup2(fd, STDOUT_FILENO); + dup2(fd, STDERR_FILENO); + if (fd > STDERR_FILENO) +@@ -1107,12 +1106,12 @@ int main(int argc, char *argv[], char *envp[]) + + /* become session leader */ + sid = setsid(); +- dbg("our session is %d", sid); ++ dbg("our session is %d\n", sid); + + /* OOM_DISABLE == -17 */ + fd = open("/proc/self/oom_adj", O_RDWR); + if (fd < 0) +- err("error disabling OOM: %s", strerror(errno)); ++ err("error disabling OOM: %s\n", strerror(errno)); + else { + write(fd, "-17", 3); + close(fd); +@@ -1148,9 +1147,9 @@ int main(int argc, char *argv[], char *envp[]) + strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); + inotify_add_watch(inotify_fd, filename, IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); + } else if (errno == ENOSYS) +- err("the kernel does not support inotify, udevd can't monitor rules file changes"); ++ err("the kernel does not support inotify, udevd can't monitor rules file changes\n"); + else +- err("inotify_init failed: %s", strerror(errno)); ++ err("inotify_init failed: %s\n", strerror(errno)); + + /* maximum limit of forked childs */ + value = getenv("UDEVD_MAX_CHILDS"); +@@ -1163,7 +1162,7 @@ int main(int argc, char *argv[], char *envp[]) + else + max_childs = UDEVD_MAX_CHILDS; + } +- info("initialize max_childs to %u", max_childs); ++ info("initialize max_childs to %u\n", max_childs); + + /* start to throttle forking if maximum number of _running_ childs is reached */ + value = getenv("UDEVD_MAX_CHILDS_RUNNING"); +@@ -1176,7 +1175,7 @@ int main(int argc, char *argv[], char *envp[]) + else + max_childs_running = UDEVD_MAX_CHILDS_RUNNING; + } +- info("initialize max_childs_running to %u", max_childs_running); ++ info("initialize max_childs_running to %u\n", max_childs_running); + + /* clear environment for forked event processes */ + clearenv(); +@@ -1206,7 +1205,7 @@ int main(int argc, char *argv[], char *envp[]) + fdcount = select(maxfd+1, &readfds, NULL, NULL, NULL); + if (fdcount < 0) { + if (errno != EINTR) +- err("error in select: %s", strerror(errno)); ++ err("error in select: %s\n", strerror(errno)); + continue; + } + +@@ -1239,7 +1238,7 @@ int main(int argc, char *argv[], char *envp[]) + reload_config = 1; + buf = malloc(nbytes); + if (buf == NULL) { +- err("error getting buffer for inotify, disable watching"); ++ err("error getting buffer for inotify, disable watching\n"); + close(inotify_fd); + inotify_fd = -1; + } +diff --git a/udevd.xml b/udevd.xml +index 0b3c017..178af4c 100644 +--- a/udevd.xml ++++ b/udevd.xml +@@ -27,7 +27,7 @@ + udevd + + +- ++ + + + +@@ -59,7 +59,7 @@ + + + +- ++ + + Print log messages to stdout. + +diff --git a/udevinfo.c b/udevinfo.c +index 52d409d..a0d6cac 100644 +--- a/udevinfo.c ++++ b/udevinfo.c +@@ -69,7 +69,7 @@ static void print_all_attributes(const char *devpath, const char *key) + 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); ++ dbg("attr '%s'='%s'(%zi)\n", dent->d_name, value, len); + + /* remove trailing newlines */ + while (len && value[len-1] == '\n') +@@ -79,7 +79,7 @@ static void print_all_attributes(const char *devpath, const char *key) + while (len && isprint(value[len-1])) + len--; + if (len) { +- dbg("attribute value of '%s' non-printable, skip", dent->d_name); ++ dbg("attribute value of '%s' non-printable, skip\n", dent->d_name); + continue; + } + +@@ -175,7 +175,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) + if (count <= 0) + goto out; + +- info("found %i devices for '%s'", count, name); ++ info("found %i devices for '%s'\n", count, name); + + /* select the device that seems to match */ + list_for_each_entry(device, &name_list, node) { +@@ -185,7 +185,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) + udev_device_init(udev); + if (udev_db_get_device(udev, device->name) != 0) + continue; +- info("found db entry '%s'", device->name); ++ info("found db entry '%s'\n", device->name); + + /* make sure, we don't get a link of a differnt device */ + strlcpy(filename, udev_root, sizeof(filename)); +@@ -194,7 +194,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) + if (stat(filename, &statbuf) != 0) + continue; + if (major(udev->devt) > 0 && udev->devt != statbuf.st_rdev) { +- info("skip '%s', dev_t doesn't match", udev->name); ++ info("skip '%s', dev_t doesn't match\n", udev->name); + continue; + } + rc = 0; +@@ -272,7 +272,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) + if (option == -1) + break; + +- dbg("option '%c'", option); ++ dbg("option '%c'\n", option); + switch (option) { + case 'n': + /* remove /dev if given */ +@@ -281,7 +281,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) + else + strlcpy(name, optarg, sizeof(name)); + remove_trailing_chars(name, '/'); +- dbg("name: %s", name); ++ dbg("name: %s\n", name); + break; + case 'p': + /* remove /sys if given */ +@@ -310,7 +310,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) + } + } + } +- dbg("path: %s", path); ++ dbg("path: %s\n", path); + break; + case 'q': + action = ACTION_QUERY; +diff --git a/udevsettle.c b/udevsettle.c +index e3982a4..4b66f89 100644 +--- a/udevsettle.c ++++ b/udevsettle.c +@@ -57,7 +57,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) + + logging_init("udevsettle"); + udev_config_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + sysfs_init(); + + while (1) { +@@ -72,7 +72,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) + timeout = seconds; + else + fprintf(stderr, "invalid timeout value\n"); +- dbg("timeout=%i", timeout); ++ dbg("timeout=%i\n", timeout); + break; + case 'h': + printf("Usage: udevadm settle [--help] [--timeout=]\n\n"); +@@ -90,13 +90,13 @@ int udevsettle(int argc, char *argv[], char *envp[]) + struct stat statbuf; + + if (stat(queuename, &statbuf) < 0) { +- info("queue is empty"); ++ info("queue is empty\n"); + break; + } + usleep(1000 * 1000 / LOOP_PER_SECOND); + } + if (loop <= 0) { +- info("timeout waiting for queue"); ++ info("timeout waiting for queue\n"); + goto exit; + } + +@@ -112,7 +112,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) + goto exit; + seqnum[len] = '\0'; + seq_udev = strtoull(seqnum, NULL, 10); +- info("udev seqnum = %llu", seq_udev); ++ info("udev seqnum = %llu\n", seq_udev); + + /* read current kernel seqnum */ + strlcpy(filename, sysfs_path, sizeof(filename)); +@@ -126,16 +126,16 @@ int udevsettle(int argc, char *argv[], char *envp[]) + goto exit; + seqnum[len] = '\0'; + seq_kernel = strtoull(seqnum, NULL, 10); +- info("kernel seqnum = %llu", seq_kernel); ++ info("kernel seqnum = %llu\n", seq_kernel); + + /* make sure all kernel events have arrived in the queue */ + if (seq_udev >= seq_kernel) { +- info("queue is empty and no pending events left"); ++ info("queue is empty and no pending events left\n"); + rc = 0; + goto exit; + } + usleep(1000 * 1000 / LOOP_PER_SECOND); +- info("queue is empty, but events still pending"); ++ info("queue is empty, but events still pending\n"); + } + + exit: +diff --git a/udevtest.c b/udevtest.c +index a36e503..8beba21 100644 +--- a/udevtest.c ++++ b/udevtest.c +@@ -62,7 +62,7 @@ static int import_uevent_var(const char *devpath) + if (next == NULL) + goto out; + next[0] = '\0'; +- info("import into environment: '%s'", key); ++ info("import into environment: '%s'\n", key); + putenv(key); + key = &next[1]; + } +@@ -91,7 +91,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + {} + }; + +- info("version %s", UDEV_VERSION); ++ info("version %s\n", UDEV_VERSION); + udev_config_init(); + if (udev_log_priority < LOG_INFO) { + char priority[32]; +@@ -108,7 +108,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + if (option == -1) + break; + +- dbg("option '%c'", option); ++ dbg("option '%c'\n", option); + switch (option) { + case 'a': + action = optarg; +@@ -181,7 +181,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + setenv("ACTION", udev->action, 1); + import_uevent_var(udev->dev->devpath); + +- info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem); ++ info("looking at device '%s' from subsystem '%s'\n", udev->dev->devpath, udev->dev->subsystem); + retval = udev_device_event(&rules, udev); + if (retval == 0 && !udev->ignore_device && udev_run) { + struct name_entry *name_loop; +@@ -191,7 +191,7 @@ int udevtest(int argc, char *argv[], char *envp[]) + + strlcpy(program, name_loop->name, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); +- info("run: '%s'", program); ++ info("run: '%s'\n", program); + } + } + udev_device_cleanup(udev); +diff --git a/udevtrigger.c b/udevtrigger.c +index e50fd4e..72464c8 100644 +--- a/udevtrigger.c ++++ b/udevtrigger.c +@@ -70,7 +70,7 @@ static int device_list_insert(const char *path) + char devpath[PATH_SIZE]; + struct stat statbuf; + +- dbg("add '%s'" , path); ++ dbg("add '%s'\n" , path); + + /* we only have a device, if we have an uevent file */ + strlcpy(filename, path, sizeof(filename)); +@@ -110,12 +110,12 @@ static void trigger_uevent(const char *devpath, const char *action) + + fd = open(filename, O_WRONLY); + if (fd < 0) { +- dbg("error on opening %s: %s", filename, strerror(errno)); ++ dbg("error on opening %s: %s\n", filename, strerror(errno)); + return; + } + + if (write(fd, action, strlen(action)) < 0) +- info("error writing '%s' to '%s': %s", action, filename, strerror(errno)); ++ info("error writing '%s' to '%s': %s\n", action, filename, strerror(errno)); + + close(fd); + } +@@ -574,7 +574,7 @@ int udevtrigger(int argc, char *argv[], char *envp[]) + + logging_init("udevtrigger"); + udev_config_init(); +- dbg("version %s", UDEV_VERSION); ++ dbg("version %s\n", UDEV_VERSION); + sysfs_init(); + + while (1) { +-- +1.5.4.5 + diff --git a/0012-scsi_id-initialize-serial-strings.patch b/0012-scsi_id-initialize-serial-strings.patch new file mode 100644 index 0000000..6ce9da1 --- /dev/null +++ b/0012-scsi_id-initialize-serial-strings.patch @@ -0,0 +1,27 @@ +From 803ac7a6d8d06787305a01a068c2e0ca47e2536d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Apr 2008 21:08:45 +0200 +Subject: [PATCH] scsi_id: initialize serial strings + +--- + extras/scsi_id/scsi_id.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 463b377..5381087 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -682,8 +682,8 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + struct sysfs_device *dev_scsi = NULL; + int good_dev; + int page_code; +- char serial[MAX_SERIAL_LEN]; +- char serial_short[MAX_SERIAL_LEN]; ++ char serial[MAX_SERIAL_LEN] = ""; ++ char serial_short[MAX_SERIAL_LEN] = ""; + const char *bus_str = NULL; + + dbg("devpath %s\n", devpath); +-- +1.5.4.5 + diff --git a/0013-persistent-device-naming-also-read-unpartitioned-me.patch b/0013-persistent-device-naming-also-read-unpartitioned-me.patch new file mode 100644 index 0000000..0fa12fe --- /dev/null +++ b/0013-persistent-device-naming-also-read-unpartitioned-me.patch @@ -0,0 +1,42 @@ +From 41677cf51fb2c14aa512ecf9410e43eb35560408 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Apr 2008 21:15:00 +0200 +Subject: [PATCH] persistent device naming: also read unpartitioned media + +--- + etc/udev/rules.d/60-persistent-storage.rules | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index a1e0917..85a9270 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -3,6 +3,9 @@ + # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + ++# forward scsi device event to corresponding block device ++ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" ++ + ACTION!="add|change", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + +@@ -47,8 +50,13 @@ 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" + +-# by-label/by-uuid (filesystem properties) +-ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" ++# skip unpartitioned removable media devices from drivers which do not send "change" events ++ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" ++ ++# import filesystem metadata ++IMPORT{program}="vol_id --export $tempnode" ++ ++# by-label/by-uuid links (filesystem metadata) + 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}" + +-- +1.5.4.5 + diff --git a/start_udev b/start_udev index 1d99b3c..d77cb4f 100755 --- a/start_udev +++ b/start_udev @@ -102,6 +102,8 @@ make_extra_nodes () { if [ -x "$MAKEDEV" ]; then + $MAKEDEV -x /dev/null + /sbin/restorecon -R /dev for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things @@ -192,6 +194,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" + /sbin/restorecon /dev mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then diff --git a/udev.spec b/udev.spec index 6bd809c..2eb1ced 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 120 -Release: 3%{?dist} +Release: 5.20080421git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,11 +19,25 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-116-nettype.patch -Patch4: udev-118-sysconf.patch +Patch1: 0001-writing-udev-rules-fix-rule-typos.patch +Patch2: 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch +Patch3: 0003-vol_id-add-offset-option.patch +Patch4: 0004-cdrom_id-replace-with-version-which-also-exports-me.patch +Patch5: 0005-udevd-at-startup-write-message-including-version-nu.patch +Patch6: 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch +Patch7: 0007-selinux-more-context-settings.patch +Patch8: 0008-selinux-fix-missing-includes.patch +Patch9: 0009-allow-setting-of-MODE-0000.patch +Patch10: 0010-path_id-remove-subsystem-whitelist.patch +Patch11: 0011-logging-add-trailing-newline-to-all-strings.patch +Patch12: 0012-scsi_id-initialize-serial-strings.patch +Patch13: 0013-persistent-device-naming-also-read-unpartitioned-me.patch -Patch100: udev-089-nopie.patch -Patch101: udev-091-lib64.patch + +Patch101: udev-116-nettype.patch +Patch102: udev-118-sysconf.patch +Patch103: udev-089-nopie.patch +Patch104: udev-091-lib64.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -74,11 +88,25 @@ which contains functions to get volume ids. %prep %setup -q -%patch1 -p1 -b .nettype -%patch4 -p1 -b .sysconf +%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 -%patch100 -p1 -b .nopie -%patch101 -p1 -b .lib64 +%patch101 -p1 -b .nettype +%patch102 -p1 -b .sysconf + +%patch103 -p1 -b .nopie +%patch104 -p1 -b .lib64 %build @@ -394,6 +422,19 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Mon Apr 21 2008 Harald Hoyer 120-4.20080421git +- added patches from git: +- persistent device naming: also read unpartitioned media +- scsi_id: initialize serial strings +- logging: add trailing newline to all strings +- path_id: remove subsystem whitelist +- allow setting of MODE="0000" +- selinux: more context settings +- rules_generator: net rules - always add KERNEL== match to generated rules +- cdrom_id: replace with version which also exports media properties +- vol_id: add --offset option +- udevinfo: do not replace chars when printing ATTR== matches + * Fri Apr 11 2008 Harald Hoyer 120-3 - fixed pre/preun scriptlets (bug #441941) - removed fedora specific patch for selinux symlink handling From bf2483e47a20f7d2dfe64a2740efcecc6e6d5a1f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 16 May 2008 10:11:19 +0000 Subject: [PATCH 417/640] - version 121 + latest git fixes --- .cvsignore | 2 +- 0001-volume_id-clean-up-linux_raid-code.patch | 93 + 0001-writing-udev-rules-fix-rule-typos.patch | 51 - 0002-man-udevd-fix-udev-8-reference.patch | 37 + ...not-replace-chars-when-printing-ATTR.patch | 24 - 0003-man-scsi_id.patch | 37 + 0003-vol_id-add-offset-option.patch | 135 - ...e-with-version-which-also-exports-me.patch | 834 --- ...csi_id-remove-all-sysfs-dependencies.patch | 683 +++ 0005-scsi_id-add-SGv4-support.patch | 235 + ...p-write-message-including-version-nu.patch | 31 - ...ator-net-rules-always-add-KERNEL-mat.patch | 49 - 0006-scsi_id-update-man-page.patch | 66 + 0007-scsi_id-remove-bus_id-option.patch | 51 + 0007-selinux-more-context-settings.patch | 88 - 0008-scsi_id-add-sg-version-option.patch | 164 + 0008-selinux-fix-missing-includes.patch | 63 - 0009-allow-setting-of-MODE-0000.patch | 93 - 0009-rules-adapt-to-new-scsi_id.patch | 27 + 0010-path_id-remove-subsystem-whitelist.patch | 54 - ...ules-adapt-tape-rules-to-new-scsi_id.patch | 33 + 0011-cdrom_id-fix-segfault.patch | 25 + ...-add-trailing-newline-to-all-strings.patch | 5323 ----------------- 0012-scsi_id-initialize-serial-strings.patch | 27 - ...ce-naming-also-read-unpartitioned-me.patch | 42 - sources | 2 +- udev-120-rhrules.patch | 10 + udev-121-bsg.patch | 82 + udev.spec | 43 +- 29 files changed, 1570 insertions(+), 6834 deletions(-) create mode 100644 0001-volume_id-clean-up-linux_raid-code.patch delete mode 100644 0001-writing-udev-rules-fix-rule-typos.patch create mode 100644 0002-man-udevd-fix-udev-8-reference.patch delete mode 100644 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch create mode 100644 0003-man-scsi_id.patch delete mode 100644 0003-vol_id-add-offset-option.patch delete mode 100644 0004-cdrom_id-replace-with-version-which-also-exports-me.patch create mode 100644 0004-scsi_id-remove-all-sysfs-dependencies.patch create mode 100644 0005-scsi_id-add-SGv4-support.patch delete mode 100644 0005-udevd-at-startup-write-message-including-version-nu.patch delete mode 100644 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch create mode 100644 0006-scsi_id-update-man-page.patch create mode 100644 0007-scsi_id-remove-bus_id-option.patch delete mode 100644 0007-selinux-more-context-settings.patch create mode 100644 0008-scsi_id-add-sg-version-option.patch delete mode 100644 0008-selinux-fix-missing-includes.patch delete mode 100644 0009-allow-setting-of-MODE-0000.patch create mode 100644 0009-rules-adapt-to-new-scsi_id.patch delete mode 100644 0010-path_id-remove-subsystem-whitelist.patch create mode 100644 0010-rules-adapt-tape-rules-to-new-scsi_id.patch create mode 100644 0011-cdrom_id-fix-segfault.patch delete mode 100644 0011-logging-add-trailing-newline-to-all-strings.patch delete mode 100644 0012-scsi_id-initialize-serial-strings.patch delete mode 100644 0013-persistent-device-naming-also-read-unpartitioned-me.patch create mode 100644 udev-120-rhrules.patch create mode 100644 udev-121-bsg.patch diff --git a/.cvsignore b/.cvsignore index 616156a..1f46546 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-120.tar.bz2 +udev-121.tar.bz2 diff --git a/0001-volume_id-clean-up-linux_raid-code.patch b/0001-volume_id-clean-up-linux_raid-code.patch new file mode 100644 index 0000000..0dc7e78 --- /dev/null +++ b/0001-volume_id-clean-up-linux_raid-code.patch @@ -0,0 +1,93 @@ +From 661a0bea80d129d5df708e36dbaed745c9d8392e Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 13 May 2008 00:55:53 +0200 +Subject: [PATCH] volume_id: clean up linux_raid code + +extra global and/or non-static variables suck in shared libraries +use "else if" rather than many "return" calls + +Signed-off-by: Karel Zak +--- + extras/volume_id/lib/linux_raid.c | 25 ++++++++++++------------- + 1 files changed, 12 insertions(+), 13 deletions(-) + +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 96ae7c3..af49658 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -27,7 +27,7 @@ + #include "libvolume_id.h" + #include "util.h" + +-static struct mdp0_super_block { ++struct mdp0_super_block { + uint32_t md_magic; + uint32_t major_version; + uint32_t minor_version; +@@ -44,7 +44,7 @@ static struct mdp0_super_block { + uint32_t set_uuid1; + uint32_t set_uuid2; + uint32_t set_uuid3; +-} PACKED *mdp0; ++} PACKED; + + struct mdp1_super_block { + uint32_t magic; +@@ -53,7 +53,7 @@ struct mdp1_super_block { + uint32_t pad0; + uint8_t set_uuid[16]; + uint8_t set_name[32]; +-} PACKED *mdp1; ++} PACKED; + + #define MD_RESERVED_BYTES 0x10000 + #define MD_SB_MAGIC 0xa92b4efc +@@ -61,6 +61,7 @@ struct mdp1_super_block { + static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint64_t size) + { + const uint8_t *buf; ++ struct mdp0_super_block *mdp0; + union { + uint32_t ints[4]; + uint8_t bytes[16]; +@@ -119,6 +120,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 + static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint64_t size) + { + const uint8_t *buf; ++ struct mdp1_super_block *mdp1; + + info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); +@@ -153,22 +155,19 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size + + /* 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) { ++ if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0) + strcpy(id->type_version, "1.0"); +- return 0; +- } + + /* version 1.1 at the start of the device */ +- if (volume_id_probe_linux_raid1(id, off, size) == 0) { ++ else if (volume_id_probe_linux_raid1(id, off, size) == 0) + strcpy(id->type_version, "1.1"); +- return 0; +- } + + /* version 1.2 at 4k offset from the start */ +- if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { ++ else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) + strcpy(id->type_version, "1.2"); +- return 0; +- } + +- return -1; ++ else ++ return -1; ++ ++ return 0; + } +-- +1.5.4.5 + diff --git a/0001-writing-udev-rules-fix-rule-typos.patch b/0001-writing-udev-rules-fix-rule-typos.patch deleted file mode 100644 index 7c8a2a1..0000000 --- a/0001-writing-udev-rules-fix-rule-typos.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8c1711dcd03e84bfec4bb2ee767d0467fd32f6a5 Mon Sep 17 00:00:00 2001 -From: Daniel Drake -Date: Sun, 6 Apr 2008 07:12:20 +0200 -Subject: [PATCH] writing udev rules: fix rule typos - ---- - docs/writing_udev_rules/index.html | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/docs/writing_udev_rules/index.html b/docs/writing_udev_rules/index.html -index 9289137..5fedb3f 100644 ---- a/docs/writing_udev_rules/index.html -+++ b/docs/writing_udev_rules/index.html -@@ -17,7 +17,7 @@ - -

      Writing udev rules

      - by Daniel Drake (dsd)
      --Version 0.73

      -+Version 0.74

      - - The most recent version of this document can always be found at:
      - -@@ -114,6 +114,7 @@ This document uses various examples (many of which are entirely fictional) to il -

      History

      - -
        -+
      • April 5th 2008 v0.74: Typo fixes.
      • -
      • December 3rd 2007 v0.73: Update for new udev versions, and some miscellaneous improvements.
      • -
      • October 2nd 2006 v0.72: Fixed a typo in one of the example rules.
      • -
      • June 10th 2006 v0.71: Misc changes based on recent feedback - thanks!
      • -@@ -480,7 +481,7 @@ As you can see, udevinfo simply produces a list of attributes you can use as-is - -
        - SUBSYSTEM=="block", ATTR{size}=="234441648", NAME="my_hard_disk"
        --SUBSYSTEM="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk"
        -+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk" - -

        - You may have noted the use of colour in the above examples. This is to demonstrate that while it is legal to combine the attributes from the device in question and a single parent device, you cannot mix-and-match attributes from multiple parent devices - your rule will not work. For example, the following rule is invalid as it attempts to match attributes from two parent devices: -@@ -735,7 +736,7 @@ A USB hard disk is comparable to the USB camera I described above, however typic - Of course, if you have a 100GB USB hard disk, it is perfectly understandable that you might want to partition it, in which case we can take advantage of udev's string substitutions: -

        - --
        KERNEL=="sd*", SUBSYSTEMS="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
        -+
        KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
        - -

        - This rule creates symlinks such as: --- -1.5.4.5 - diff --git a/0002-man-udevd-fix-udev-8-reference.patch b/0002-man-udevd-fix-udev-8-reference.patch new file mode 100644 index 0000000..be1bf9c --- /dev/null +++ b/0002-man-udevd-fix-udev-8-reference.patch @@ -0,0 +1,37 @@ +From 877bded34a528b6436c12678f2430e2ad466f327 Mon Sep 17 00:00:00 2001 +From: MUNEDA Takahiro +Date: Wed, 14 May 2008 04:33:34 +0200 +Subject: [PATCH] man: udevd- fix udev(8) reference + +--- + udevd.8 | 2 +- + udevd.xml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/udevd.8 b/udevd.8 +index 210ed3f..c6b4811 100644 +--- a/udevd.8 ++++ b/udevd.8 +@@ -57,5 +57,5 @@ Written by Kay Sievers + \. + .SH "SEE ALSO" + .PP +-\fBudev\fR(8), ++\fBudev\fR(7), + \fBudevadm\fR(8) +diff --git a/udevd.xml b/udevd.xml +index 178af4c..8d22a0c 100644 +--- a/udevd.xml ++++ b/udevd.xml +@@ -97,7 +97,7 @@ + + SEE ALSO + +- udev8 ++ udev7 + , + + udevadm8 +-- +1.5.4.5 + diff --git a/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch b/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch deleted file mode 100644 index c6b7893..0000000 --- a/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 573bdd7e7588b70105c2976859696037899e9d4d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 7 Apr 2008 01:57:31 +0200 -Subject: [PATCH] udevinfo: do not replace chars when printing ATTR== matches - ---- - udevinfo.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/udevinfo.c b/udevinfo.c -index 85899cf..52d409d 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -83,7 +83,6 @@ static void print_all_attributes(const char *devpath, const char *key) - continue; - } - -- replace_chars(value, ALLOWED_CHARS_INPUT); - printf(" %s{%s}==\"%s\"\n", key, dent->d_name, value); - } - } --- -1.5.4.5 - diff --git a/0003-man-scsi_id.patch b/0003-man-scsi_id.patch new file mode 100644 index 0000000..41f7c16 --- /dev/null +++ b/0003-man-scsi_id.patch @@ -0,0 +1,37 @@ +From 838436fa328345ffb0b355e6921b6d75a9b2992f Mon Sep 17 00:00:00 2001 +From: MUNEDA Takahiro +Date: Wed, 14 May 2008 04:47:33 +0200 +Subject: [PATCH] man: scsi_id + +--- + extras/scsi_id/scsi_id.8 | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 +index 927549b..aa429a5 100644 +--- a/extras/scsi_id/scsi_id.8 ++++ b/extras/scsi_id/scsi_id.8 +@@ -45,7 +45,7 @@ identifier starts with the NAA value of 6): + + .sp + .nf +-# /sbin/scsi_id --page=0x83 --devpath=/block/sdg ++# scsi_id --page=0x83 --devpath=/block/sdg + 3600a0b80000b174b000000d63efc5c8c + .fi + .P +@@ -131,7 +131,10 @@ warnings are sent using syslog. + .nf + .ft B + .ft +-/etc/scsi_id.config configuration and black/white list entries ++.TP ++\fI/etc/scsi_id.config\fP ++configuration and black/white list entries ++.RE + .fi + .LP + .SH "SEE ALSO" +-- +1.5.4.5 + diff --git a/0003-vol_id-add-offset-option.patch b/0003-vol_id-add-offset-option.patch deleted file mode 100644 index 45784ad..0000000 --- a/0003-vol_id-add-offset-option.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 8b5238670d2e741bc71ae3e79b499682965dc2fd Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 9 Apr 2008 12:35:03 +0200 -Subject: [PATCH] vol_id: add --offset option - ---- - extras/volume_id/lib/Makefile | 2 +- - extras/volume_id/lib/volume_id.c | 10 +++++----- - extras/volume_id/vol_id.c | 14 ++++++++++---- - 3 files changed, 16 insertions(+), 10 deletions(-) - -diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile -index c0905f4..0e1565f 100644 ---- a/extras/volume_id/lib/Makefile -+++ b/extras/volume_id/lib/Makefile -@@ -13,7 +13,7 @@ INSTALL_DATA = ${INSTALL} -m 644 - INSTALL_LIB = ${INSTALL} -m 755 - - SHLIB_CUR = 0 --SHLIB_REV = 82 -+SHLIB_REV = 83 - SHLIB_AGE = 0 - SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE) - -diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c -index e8f6de3..7c68fb1 100644 ---- a/extras/volume_id/lib/volume_id.c -+++ b/extras/volume_id/lib/volume_id.c -@@ -331,9 +331,9 @@ err: - } - - /* run only once into a timeout for unreadable devices */ --static int device_is_readable(struct volume_id *id) -+static int device_is_readable(struct volume_id *id, uint64_t off) - { -- if (volume_id_get_buffer(id, 0x00, 0x200) != NULL) -+ if (volume_id_get_buffer(id, off, 0x200) != NULL) - return 1; - return 0; - } -@@ -355,7 +355,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) - if (id == NULL) - return -EINVAL; - -- if (!device_is_readable(id)) -+ if (!device_is_readable(id, off)) - return -1; - - info("probing at offset 0x%llx, size 0x%llx", -@@ -389,7 +389,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size - if (id == NULL) - return -EINVAL; - -- if (!device_is_readable(id)) -+ if (!device_is_readable(id, off)) - return -1; - - info("probing at offset 0x%llx, size 0x%llx", -@@ -421,7 +421,7 @@ int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size) - if (id == NULL) - return -EINVAL; - -- if (!device_is_readable(id)) -+ if (!device_is_readable(id, off)) - return -1; - - /* probe for raid first, because fs probes may be successful on raid members */ -diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c -index 38950ee..04e85ab 100644 ---- a/extras/volume_id/vol_id.c -+++ b/extras/volume_id/vol_id.c -@@ -134,6 +134,7 @@ int main(int argc, char *argv[]) - { "export", 0, NULL, 'x' }, - { "skip-raid", 0, NULL, 's' }, - { "probe-all", 0, NULL, 'a' }, -+ { "offset", 1, NULL, 'o' }, - { "help", 0, NULL, 'h' }, - {} - }; -@@ -153,6 +154,7 @@ int main(int argc, char *argv[]) - uint64_t size; - int skip_raid = 0; - int probe_all = 0; -+ uint64_t offset = 0; - const char *node; - int fd; - const char *label, *uuid, *type, *type_version, *usage; -@@ -167,7 +169,7 @@ int main(int argc, char *argv[]) - while (1) { - int option; - -- option = getopt_long(argc, argv, "lLutxsah", options, NULL); -+ option = getopt_long(argc, argv, "lLutxsaoh", options, NULL); - if (option == -1) - break; - -@@ -193,6 +195,9 @@ int main(int argc, char *argv[]) - case 'a': - probe_all = 1; - break; -+ case 'o': -+ offset = strtoull(optarg, NULL, 0); -+ break; - case 'h': - printf("Usage: vol_id [options] \n" - " --export export key/value pairs\n" -@@ -202,6 +207,7 @@ int main(int argc, char *argv[]) - " --uuid filesystem uuid\n" - " --skip-raid don't probe for raid\n" - " --probe-all find possibly conflicting signatures\n" -+ " --offset skip given number of bytes of input\n" - " --help\n\n"); - goto exit; - default: -@@ -249,14 +255,14 @@ int main(int argc, char *argv[]) - } - - if (probe_all) { -- volume_id_all_probers(all_probers, vid, 0, size, NULL); -+ volume_id_all_probers(all_probers, vid, offset, size, NULL); - goto exit; - } - - if (skip_raid) -- retval = volume_id_probe_filesystem(vid, 0, size); -+ retval = volume_id_probe_filesystem(vid, offset, size); - else -- retval = volume_id_probe_all(vid, 0, size); -+ retval = volume_id_probe_all(vid, offset, size); - if (retval != 0) { - fprintf(stderr, "%s: unknown volume type\n", node); - rc = 4; --- -1.5.4.5 - diff --git a/0004-cdrom_id-replace-with-version-which-also-exports-me.patch b/0004-cdrom_id-replace-with-version-which-also-exports-me.patch deleted file mode 100644 index bc71cd5..0000000 --- a/0004-cdrom_id-replace-with-version-which-also-exports-me.patch +++ /dev/null @@ -1,834 +0,0 @@ -From fd7a285e6293fddd3fbc68b519dcd367adeb72c4 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 9 Apr 2008 23:17:39 +0200 -Subject: [PATCH] cdrom_id: replace with version which also exports media properties - -This is a 12 track audio CD with additional data session: - $ extras/cdrom_id/cdrom_id /dev/dvd - ID_CDROM=1 - ID_CDROM_CD_R=1 - ID_CDROM_CD_RW=1 - ID_CDROM_DVD=1 - ID_CDROM_DVD_R=1 - ID_CDROM_DVD_RW=1 - ID_CDROM_DVD_RAM=1 - ID_CDROM_DVD_PLUS_R=1 - ID_CDROM_DVD_PLUS_RW=1 - ID_CDROM_DVD_PLUS_R_DL=1 - ID_CDROM_MEDIA_CD=1 - ID_CDROM_MEDIA_STATE=complete - ID_CDROM_MEDIA_HAS_AUDIO=1 - ID_CDROM_MEDIA_SESSION_COUNT=2 - ID_CDROM_MEDIA_TRACK_COUNT=13 - ID_CDROM_MEDIA_SESSION_LAST_OFFSET=444508160 ---- - extras/cdrom_id/60-cdrom_id.rules | 2 +- - extras/cdrom_id/cdrom_id.8 | 15 +- - extras/cdrom_id/cdrom_id.c | 677 +++++++++++++++++++++++++++++++++---- - 3 files changed, 617 insertions(+), 77 deletions(-) - -diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules -index b06dafd..12fbf63 100644 ---- a/extras/cdrom_id/60-cdrom_id.rules -+++ b/extras/cdrom_id/60-cdrom_id.rules -@@ -1,3 +1,3 @@ - # import optical drive properties - --KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" -+ACTION=="add|change", KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" -diff --git a/extras/cdrom_id/cdrom_id.8 b/extras/cdrom_id/cdrom_id.8 -index 4194ae4..1d4d70d 100644 ---- a/extras/cdrom_id/cdrom_id.8 -+++ b/extras/cdrom_id/cdrom_id.8 -@@ -1,17 +1,16 @@ --.TH CDROM_ID 8 "November 2005" "" "Linux Administrator's Manual" -+.TH CDROM_ID 8 "April 2008" "" "Linux Administrator's Manual" - .SH NAME --cdrom_id \- udev callout to determine the capabilities of cd/dvd drives -+cdrom_id \- udev callout to determine the capabilities of optical drives and media - .SH SYNOPSIS - .BI cdrom_id --[\fI--export\fP] \fIblockdevice\fP -+[\fI--export\fP] \fIdevice\fP - .SH "DESCRIPTION" - .B cdrom_id --is normally called from a udev rule, to provide udev with the capabilities --of a cdrom or dvdrom drive. Udev can use this information to create --symlinks like /dev/cdrom or /dev/dvd to the real device node. -+is normally called from a udev rule, to provide udev with the list of -+capabilities of a optical drive. - .SH USAGE - .B cdrom_id --opens the blockdevice node specified at the commandline and prints the -+opens the device node specified at the commandline and prints the - discovered capabilities. - .SH OPTIONS - The following commandline switches are supported to specify what cdrom_id -@@ -23,5 +22,5 @@ print all values (default) - .SH SEE ALSO - .BR udev (7) - .SH AUTHORS --Developed by Greg Kroah\-Hartman . -+Developed by Kay Sievers . - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0d4a8c1..315d276 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -1,12 +1,21 @@ - /* -- * cdrom_id - determines the capabilities of cdrom drives -+ * cdrom_id - optical drive and media information prober - * -- * Copyright (C) 2005 Greg Kroah-Hartman -+ * Copyright (C) 2008 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 program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * - */ - - #ifndef _GNU_SOURCE -@@ -14,50 +23,27 @@ - #endif - - #include -+#include - #include - #include --#include --#include - #include -+#include -+#include - #include --#include -+#include -+#include - #include - #include --#include -- -+#include -+#include -+#include - #include "../../udev.h" - --/* -- * Taken from the cdrom.h kernel include file. -- * Included here as some distros don't have an updated version -- * with all of the DVD flags. So we just include our own, aren't -- * we so nice... -- */ --#define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ -- --/* capability flags used with the uniform CD-ROM driver */ --#define CDC_CLOSE_TRAY 0x1 /* caddy systems _can't_ close */ --#define CDC_OPEN_TRAY 0x2 /* but _can_ eject. */ --#define CDC_LOCK 0x4 /* disable manual eject */ --#define CDC_SELECT_SPEED 0x8 /* programmable speed */ --#define CDC_SELECT_DISC 0x10 /* select disc from juke-box */ --#define CDC_MULTI_SESSION 0x20 /* read sessions>1 */ --#define CDC_MCN 0x40 /* Medium Catalog Number */ --#define CDC_MEDIA_CHANGED 0x80 /* media changed */ --#define CDC_PLAY_AUDIO 0x100 /* audio functions */ --#define CDC_RESET 0x200 /* hard reset device */ --#define CDC_IOCTLS 0x400 /* driver has non-standard ioctls */ --#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */ --#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */ --#define CDC_CD_R 0x2000 /* drive is a CD-R */ --#define CDC_CD_RW 0x4000 /* drive is a CD-RW */ --#define CDC_DVD 0x8000 /* drive is a DVD */ --#define CDC_DVD_R 0x10000 /* drive can write DVD-R */ --#define CDC_DVD_RAM 0x20000 /* drive can write DVD-RAM */ --#define CDC_MO_DRIVE 0x40000 /* drive is an MO device */ --#define CDC_MRW 0x80000 /* drive can read MRW */ --#define CDC_MRW_W 0x100000 /* drive can write MRW */ --#define CDC_RAM 0x200000 /* ok to open for WRITE */ -+#ifndef ARRAY_SIZE -+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -+#endif -+ -+static int debug; - - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) -@@ -73,80 +59,635 @@ void log_message(int priority, const char *format, ...) - udev_log = log_priority(value); - else - udev_log = LOG_ERR; -+ -+ if (debug && udev_log < LOG_INFO) -+ udev_log = LOG_INFO; - } - - if (priority > udev_log) - return; - - va_start(args, format); -- vsyslog(priority, format, args); -+ if (debug) { -+ fprintf(stderr, "[%d] ", (int) getpid()); -+ vfprintf(stderr, format, args); -+ fprintf(stderr, "\n"); -+ } else -+ vsyslog(priority, format, args); - va_end(args); - } - #endif - -+/* device info */ -+static unsigned int cd_cd_rom; -+static unsigned int cd_cd_r; -+static unsigned int cd_cd_rw; -+static unsigned int cd_dvd_rom; -+static unsigned int cd_dvd_r; -+static unsigned int cd_dvd_rw; -+static unsigned int cd_dvd_ram; -+static unsigned int cd_dvd_plus_r; -+static unsigned int cd_dvd_plus_rw; -+static unsigned int cd_dvd_plus_r_dl; -+static unsigned int cd_dvd_plus_rw_dl; -+static unsigned int cd_bd; -+static unsigned int cd_bd_r; -+static unsigned int cd_bd_re; -+static unsigned int cd_hddvd; -+static unsigned int cd_hddvd_r; -+static unsigned int cd_hddvd_rw; -+static unsigned int cd_mo; -+static unsigned int cd_mrw; -+static unsigned int cd_mrw_w; -+ -+/* media info */ -+static unsigned int cd_media_cd_rom; -+static unsigned int cd_media_cd_r; -+static unsigned int cd_media_cd_rw; -+static unsigned int cd_media_dvd_rom; -+static unsigned int cd_media_dvd_r; -+static unsigned int cd_media_dvd_rw; -+static unsigned int cd_media_dvd_ram; -+static unsigned int cd_media_dvd_plus_r; -+static unsigned int cd_media_dvd_plus_rw; -+static unsigned int cd_media_dvd_plus_r_dl; -+static unsigned int cd_media_dvd_plus_rw_dl; -+static unsigned int cd_media_bd; -+static unsigned int cd_media_bd_r; -+static unsigned int cd_media_bd_re; -+static unsigned int cd_media_hddvd; -+static unsigned int cd_media_hddvd_r; -+static unsigned int cd_media_hddvd_rw; -+static unsigned int cd_media_mo; -+static unsigned int cd_media_mrw; -+static unsigned int cd_media_mrw_w; -+ -+static const char *cd_media_state; -+static unsigned int cd_media_has_audio; -+static unsigned int cd_media_session_next; -+static unsigned int cd_media_session_count; -+static unsigned int cd_media_track_count; -+static unsigned long long int cd_media_session_last_offset; -+ -+#define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) -+#define SK(errcode) (((errcode) >> 16) & 0xF) -+#define ASC(errcode) (((errcode) >> 8) & 0xFF) -+#define ASCQ(errcode) ((errcode) & 0xFF) -+ -+static void info_scsi_cmd_err(const char *cmd, int err) -+{ -+ if (err == -1) { -+ info("%s failed", cmd); -+ return; -+ } -+ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); -+} -+ -+struct scsi_cmd { -+ struct cdrom_generic_command cgc; -+ union { -+ struct request_sense s; -+ unsigned char u[18]; -+ } _sense; -+ struct sg_io_hdr sg_io; -+}; -+ -+static void scsi_cmd_set(struct scsi_cmd *cmd, size_t i, int arg) -+{ -+ if (i == 0) { -+ memset(cmd, 0x00, sizeof(struct scsi_cmd)); -+ cmd->cgc.quiet = 1; -+ cmd->cgc.sense = &cmd->_sense.s; -+ memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); -+ cmd->sg_io.interface_id = 'S'; -+ cmd->sg_io.mx_sb_len = sizeof(cmd->_sense); -+ cmd->sg_io.cmdp = cmd->cgc.cmd; -+ cmd->sg_io.sbp = cmd->_sense.u; -+ cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO; -+ } -+ cmd->sg_io.cmd_len = i + 1; -+ cmd->cgc.cmd[i] = arg; -+} -+ -+#define CHECK_CONDITION 0x01 -+ -+static int scsi_cmd_run(struct scsi_cmd *cmd, int fd, unsigned char *buf, size_t bufsize) -+{ -+ int ret = 0; -+ -+ cmd->sg_io.dxferp = buf; -+ cmd->sg_io.dxfer_len = bufsize; -+ cmd->sg_io.dxfer_direction = SG_DXFER_FROM_DEV; -+ if (ioctl(fd, SG_IO, &cmd->sg_io)) -+ return -1; -+ -+ if ((cmd->sg_io.info & SG_INFO_OK_MASK) != SG_INFO_OK) { -+ errno = EIO; -+ ret = -1; -+ if (cmd->sg_io.masked_status & CHECK_CONDITION) { -+ ret = ERRCODE(cmd->_sense.u); -+ if (ret == 0) -+ ret = -1; -+ } -+ } -+ return ret; -+} -+ -+static int cd_capability_compat(int fd) -+{ -+ int capabilty; -+ -+ capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); -+ if (capabilty < 0) { -+ info("CDROM_GET_CAPABILITY failed"); -+ return -1; -+ } -+ -+ if (capabilty & CDC_CD_R) -+ cd_cd_r = 1; -+ if (capabilty & CDC_CD_RW) -+ cd_cd_rw = 1; -+ if (capabilty & CDC_DVD) -+ cd_dvd_rom = 1; -+ if (capabilty & CDC_DVD_R) -+ cd_dvd_r = 1; -+ if (capabilty & CDC_DVD_RAM) -+ cd_dvd_ram = 1; -+ if (capabilty & CDC_MRW) -+ cd_mrw = 1; -+ if (capabilty & CDC_MRW_W) -+ cd_mrw_w = 1; -+ return 0; -+} -+ -+static int cd_inquiry(int fd) { -+ struct scsi_cmd sc; -+ unsigned char inq[128]; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x12); -+ scsi_cmd_set(&sc, 4, 36); -+ scsi_cmd_set(&sc, 5, 0); -+ err = scsi_cmd_run(&sc, fd, inq, 36); -+ if ((err < 0)) { -+ info_scsi_cmd_err("INQUIRY", err); -+ return -1; -+ } -+ -+ if ((inq[0] & 0x1F) != 5) { -+ info("not an MMC unit"); -+ return -1; -+ } -+ -+ info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); -+ return 0; -+} -+ -+static int cd_profiles(int fd) -+{ -+ struct scsi_cmd sc; -+ unsigned char header[8]; -+ unsigned char profiles[512]; -+ unsigned int cur_profile; -+ unsigned int len; -+ unsigned int i; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x46); -+ scsi_cmd_set(&sc, 1, 0); -+ scsi_cmd_set(&sc, 8, sizeof(header)); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("GET CONFIGURATION", err); -+ return -1; -+ } -+ -+ len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); -+ info("GET CONFIGURATION: number of profiles %i", len); -+ if (len > sizeof(profiles)) { -+ info("invalid number of profiles"); -+ return -1; -+ } -+ -+ scsi_cmd_set(&sc, 0, 0x46); -+ scsi_cmd_set(&sc, 1, 1); -+ scsi_cmd_set(&sc, 6, len >> 16); -+ scsi_cmd_set(&sc, 7, len >> 8); -+ scsi_cmd_set(&sc, 8, len); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, profiles, len); -+ if ((err < 0)) { -+ info_scsi_cmd_err("GET CONFIGURATION", err); -+ return -1; -+ } -+ -+ /* device profiles */ -+ for (i = 12; i < profiles[11]; i += 4) { -+ unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); -+ if (profile == 0) -+ continue; -+ info("profile 0x%02x", profile); -+ -+ switch (profile) { -+ case 0x03: -+ case 0x04: -+ case 0x05: -+ cd_mo = 1; -+ break; -+ case 0x10: -+ cd_dvd_rom = 1; -+ break; -+ case 0x12: -+ cd_dvd_ram = 1; -+ break; -+ case 0x13: -+ case 0x14: -+ cd_dvd_rw = 1; -+ break; -+ case 0x1B: -+ cd_dvd_plus_r = 1; -+ break; -+ case 0x1A: -+ cd_dvd_plus_rw = 1; -+ break; -+ case 0x2A: -+ cd_dvd_plus_rw_dl = 1; -+ break; -+ case 0x2B: -+ cd_dvd_plus_r_dl = 1; -+ break; -+ case 0x40: -+ cd_bd = 1; -+ break; -+ case 0x41: -+ case 0x42: -+ cd_bd_r = 1; -+ break; -+ case 0x43: -+ cd_bd_re = 1; -+ break; -+ case 0x50: -+ cd_hddvd = 1; -+ break; -+ case 0x51: -+ cd_hddvd_r = 1; -+ break; -+ case 0x52: -+ cd_hddvd_rw = 1; -+ break; -+ default: -+ break; -+ } -+ } -+ -+ /* current media profile */ -+ cur_profile = header[6] << 8 | header[7]; -+ info("current profile 0x%02x", cur_profile); -+ if (cur_profile == 0) { -+ info("no current profile, assuming no media"); -+ return -1; -+ } -+ -+ switch (cur_profile) { -+ case 0x03: -+ case 0x04: -+ case 0x05: -+ cd_media_mo = 1; -+ break; -+ case 0x08: -+ cd_media_cd_rom = 1; -+ break; -+ case 0x09: -+ cd_media_cd_r = 1; -+ break; -+ case 0x0a: -+ cd_media_cd_rw = 1; -+ break; -+ case 0x10: -+ cd_media_dvd_rom = 1; -+ break; -+ case 0x11: -+ cd_media_dvd_r = 1; -+ break; -+ case 0x12: -+ cd_media_dvd_ram = 1; -+ break; -+ case 0x13: -+ case 0x14: -+ cd_media_dvd_rw = 1; -+ break; -+ case 0x1B: -+ cd_media_dvd_plus_r = 1; -+ break; -+ case 0x1A: -+ cd_media_dvd_plus_rw = 1; -+ break; -+ case 0x2A: -+ cd_media_dvd_plus_rw_dl = 1; -+ break; -+ case 0x2B: -+ cd_media_dvd_plus_r_dl = 1; -+ break; -+ case 0x40: -+ cd_media_bd = 1; -+ break; -+ case 0x41: -+ case 0x42: -+ cd_media_bd_r = 1; -+ break; -+ case 0x43: -+ cd_media_bd_re = 1; -+ break; -+ case 0x50: -+ cd_media_hddvd = 1; -+ break; -+ case 0x51: -+ cd_media_hddvd_r = 1; -+ break; -+ case 0x52: -+ cd_media_hddvd_rw = 1; -+ break; -+ default: -+ break; -+ } -+ return 0; -+} -+ -+static int cd_media_info(int fd) -+{ -+ struct scsi_cmd sc; -+ unsigned char header[32]; -+ static const char *media_status[] = { -+ "blank", -+ "appendable", -+ "complete", -+ "other" -+ }; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x51); -+ scsi_cmd_set(&sc, 8, sizeof(header)); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ DISC INFORMATION", err); -+ return -1; -+ }; -+ -+ info("disk type %02x", header[8]); -+ -+ if ((header[2] & 3) < 4) -+ cd_media_state = media_status[header[2] & 3]; -+ if ((header[2] & 3) != 2) -+ cd_media_session_next = header[10] << 8 | header[5]; -+ cd_media_session_count = header[9] << 8 | header[4]; -+ cd_media_track_count = header[11] << 8 | header[6]; -+ -+ return 0; -+} -+ -+static int cd_media_toc(int fd) -+{ -+ struct scsi_cmd sc; -+ unsigned char header[12]; -+ unsigned char toc[2048]; -+ unsigned int len, i; -+ unsigned char *p; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x43); -+ scsi_cmd_set(&sc, 6, 1); -+ scsi_cmd_set(&sc, 8, sizeof(header)); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ TOC", err); -+ return -1; -+ } -+ -+ len = (header[0] << 8 | header[1]) + 2; -+ info("READ TOC: len: %d", len); -+ if (len > sizeof(toc)) -+ return -1; -+ -+ /* check if we have a data track */ -+ info("ctl %02x (0x04 is data/audio)", header[5]); -+ cd_media_has_audio = (header[5] & 0x04) == 0; -+ -+ scsi_cmd_set(&sc, 0, 0x43); -+ scsi_cmd_set(&sc, 6, header[2]); /* First Track/Session Number */ -+ scsi_cmd_set(&sc, 7, len >> 8); -+ scsi_cmd_set(&sc, 8, len); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, toc, len); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ TOC (tracks)", err); -+ return -1; -+ } -+ -+ for (p = toc+4, i = 4; i < len-8; i += 8, p += 8) { -+ unsigned int block; -+ -+ block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; -+ info("track %u starts at block %u", p[2], block); -+ } -+ -+ scsi_cmd_set(&sc, 0, 0x43); -+ scsi_cmd_set(&sc, 2, 1); /* Session Info */ -+ scsi_cmd_set(&sc, 8, 12); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ TOC (multi session)", err); -+ return -1; -+ } -+ len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; -+ info("last track %u starts at block %u", header[4+2], len); -+ cd_media_session_last_offset = (unsigned long long int)len * 2048; -+ return 0; -+} -+ - int main(int argc, char *argv[]) - { -+ static const struct option options[] = { -+ { "export", 0, NULL, 'x' }, -+ { "debug", 0, NULL, 'd' }, -+ { "help", 0, NULL, 'h' }, -+ {} -+ }; - const char *node = NULL; -- int i; - int export = 0; -- int fd; -+ int fd = -1; - int rc = 0; -- int result; - - logging_init("cdrom_id"); - -- for (i = 1 ; i < argc; i++) { -- char *arg = argv[i]; -+ while (1) { -+ int option; - -- if (strcmp(arg, "--export") == 0) { -+ option = getopt_long(argc, argv, "dxh", options, NULL); -+ if (option == -1) -+ break; -+ -+ switch (option) { -+ case 'd': -+ debug = 1; -+ break; -+ case 'x': - export = 1; -- } else -- node = arg; -+ break; -+ case 'h': -+ printf("Usage: cdrom_id [options] \n" -+ " --export export key/value pairs\n" -+ " --help\n\n"); -+ goto exit; -+ default: -+ rc = 1; -+ goto exit; -+ } - } -+ -+ node = argv[optind]; - if (!node) { -- info("no node specified"); -+ err("no device"); -+ fprintf(stderr, "no device\n"); - rc = 1; - goto exit; - } - -- fd = open(node, O_RDONLY|O_NONBLOCK); -+ fd = open(node, O_RDONLY | O_NONBLOCK); - if (fd < 0) { - info("unable to open '%s'", node); - rc = 1; - goto exit; - } -+ info("probing: '%s'", node); -+ -+ /* same data as original cdrom_id */ -+ if (cd_capability_compat(fd) < 0) { -+ rc = 1; -+ goto exit; -+ } - -- result = ioctl(fd, CDROM_GET_CAPABILITY, NULL); -- if (result < 0) { -- info("CDROM_GET_CAPABILITY failed for '%s'", node); -- rc = 3; -- goto close; -+ /* check drive */ -+ if (cd_inquiry(fd) < 0) { -+ rc = 2; -+ goto exit; - } - -- printf("ID_CDROM=1\n"); -+ /* read drive and possibly current profile */ -+ if (cd_profiles(fd) < 0) -+ goto print; -+ -+ /* get session/track info */ -+ if (cd_media_toc(fd) < 0) -+ goto print; - -- if (result & CDC_CD_R) -+ /* get writable media state */ -+ if (cd_media_info(fd) < 0) -+ goto print; -+ -+print: -+ printf("ID_CDROM=1\n"); -+ if (cd_cd_rom) -+ printf("ID_CDROM_CD=1\n"); -+ if (cd_cd_r) - printf("ID_CDROM_CD_R=1\n"); -- if (result & CDC_CD_RW) -+ if (cd_cd_rw) - printf("ID_CDROM_CD_RW=1\n"); -- -- if (result & CDC_DVD) -+ if (cd_dvd_rom) - printf("ID_CDROM_DVD=1\n"); -- if (result & CDC_DVD_R) -+ if (cd_dvd_r) - printf("ID_CDROM_DVD_R=1\n"); -- if (result & CDC_DVD_RAM) -+ if (cd_dvd_rw) -+ printf("ID_CDROM_DVD_RW=1\n"); -+ if (cd_dvd_ram) - printf("ID_CDROM_DVD_RAM=1\n"); -- -- if (result & CDC_MRW) -+ if (cd_dvd_plus_r) -+ printf("ID_CDROM_DVD_PLUS_R=1\n"); -+ if (cd_dvd_plus_rw) -+ printf("ID_CDROM_DVD_PLUS_RW=1\n"); -+ if (cd_dvd_plus_r_dl) -+ printf("ID_CDROM_DVD_PLUS_R_DL=1\n"); -+ if (cd_dvd_plus_rw_dl) -+ printf("ID_CDROM_DVD_PLUS_RW_DL=1\n"); -+ if (cd_bd) -+ printf("ID_CDROM_BD=1\n"); -+ if (cd_bd_r) -+ printf("ID_CDROM_BD_R=1\n"); -+ if (cd_bd_re) -+ printf("ID_CDROM_BD_RE=1\n"); -+ if (cd_hddvd) -+ printf("ID_CDROM_HDDVD=1\n"); -+ if (cd_hddvd_r) -+ printf("ID_CDROM_HDDVD_R=1\n"); -+ if (cd_hddvd_rw) -+ printf("ID_CDROM_HDDVD_RW=1\n"); -+ if (cd_mo) -+ printf("ID_CDROM_MO=1\n"); -+ if (cd_mrw) - printf("ID_CDROM_MRW=1\n"); -- if (result & CDC_MRW_W) -+ if (cd_mrw_w) - printf("ID_CDROM_MRW_W=1\n"); - -- if (result & CDC_RAM) -- printf("ID_CDROM_RAM=1\n"); --close: -- close(fd); -+ if (cd_media_mo) -+ printf("ID_CDROM_MEDIA_MO=1\n"); -+ if (cd_media_mrw) -+ printf("ID_CDROM_MEDIA_MRW=1\n"); -+ if (cd_media_mrw_w) -+ printf("ID_CDROM_MEDIA_MRW_W=1\n"); -+ if (cd_media_cd_rom) -+ printf("ID_CDROM_MEDIA_CD=1\n"); -+ if (cd_media_cd_r) -+ printf("ID_CDROM_MEDIA_CD_R=1\n"); -+ if (cd_media_cd_rw) -+ printf("ID_CDROM_MEDIA_CD_RW=1\n"); -+ if (cd_media_dvd_rom) -+ printf("ID_CDROM_MEDIA_DVD=1\n"); -+ if (cd_media_dvd_r) -+ printf("ID_CDROM_MEDIA_DVD_R=1\n"); -+ if (cd_media_dvd_ram) -+ printf("ID_CDROM_MEDIA_DVD_RAM=1\n"); -+ if (cd_media_dvd_rw) -+ printf("ID_CDROM_MEDIA_DVD_RW=1\n"); -+ if (cd_media_dvd_plus_r) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_R=1\n"); -+ if (cd_media_dvd_plus_rw) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_RW=1\n"); -+ if (cd_media_dvd_plus_rw_dl) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_RW_DL=1\n"); -+ if (cd_media_dvd_plus_r_dl) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_R_DL=1\n"); -+ if (cd_media_bd) -+ printf("ID_CDROM_MEDIA_BD=1\n"); -+ if (cd_media_bd_r) -+ printf("ID_CDROM_MEDIA_BD_R=1\n"); -+ if (cd_media_bd_re) -+ printf("ID_CDROM_MEDIA_BD_RE=1\n"); -+ if (cd_media_hddvd) -+ printf("ID_CDROM_MEDIA_HDDVD=1\n"); -+ if (cd_media_hddvd_r) -+ printf("ID_CDROM_MEDIA_HDDVD_R=1\n"); -+ if (cd_media_hddvd_rw) -+ printf("ID_CDROM_MEDIA_HDDVD_RW=1\n"); -+ -+ if (cd_media_state != NULL) -+ printf("ID_CDROM_MEDIA_STATE=%s\n", cd_media_state); -+ if (cd_media_has_audio) -+ printf("ID_CDROM_MEDIA_HAS_AUDIO=1\n"); -+ if (cd_media_session_next > 0) -+ printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next); -+ if (cd_media_session_count > 0) -+ printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count); -+ if (cd_media_track_count > 0) -+ printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count); -+ if (cd_media_session_last_offset) -+ printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); - exit: -+ if (fd >= 0) -+ close(fd); - logging_close(); - return rc; - } -+ --- -1.5.4.5 - diff --git a/0004-scsi_id-remove-all-sysfs-dependencies.patch b/0004-scsi_id-remove-all-sysfs-dependencies.patch new file mode 100644 index 0000000..2143dcb --- /dev/null +++ b/0004-scsi_id-remove-all-sysfs-dependencies.patch @@ -0,0 +1,683 @@ +From 753417db2ba6faafa3aa30f6b15678e1557e20b8 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 14 May 2008 13:42:41 +0200 +Subject: [PATCH] scsi_id: remove all sysfs dependencies + +--- + extras/scsi_id/scsi_id.c | 213 ++++++------------------------------------ + extras/scsi_id/scsi_id.h | 19 +++- + extras/scsi_id/scsi_serial.c | 85 ++++++++--------- + 3 files changed, 83 insertions(+), 234 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 5381087..4f0233e 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -31,21 +31,14 @@ + #include "scsi_id.h" + #include "scsi_id_version.h" + +-/* temporary names for mknod */ +-#define TMP_DIR "/dev" +-#define TMP_PREFIX "tmp-scsi" +- + static const struct option options[] = { + { "device", 1, NULL, 'd' }, + { "config", 1, NULL, 'f' }, + { "page", 1, NULL, 'p' }, +- { "devpath", 1, NULL, 's' }, +- { "fallback-to-sysfs", 0, NULL, 'a' }, + { "blacklisted", 0, NULL, 'b' }, + { "whitelisted", 0, NULL, 'g' }, + { "prefix-bus-id", 0, NULL, 'i' }, + { "replace-whitespace", 0, NULL, 'u' }, +- { "ignore-sysfs", 0, NULL, 'n' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + { "export", 0, NULL, 'x' }, +@@ -53,21 +46,17 @@ static const struct option options[] = { + {} + }; + +-static const char short_options[] = "abd:f:ghinp:s:uvVx"; ++static const char short_options[] = "d:f:ghip:uvVx"; + static const char dev_short_options[] = "bgp:"; + + static int all_good; +-static int always_info; + static int dev_specified; +-static int sys_specified; + static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; + static int display_bus_id; + static enum page_code default_page_code; + static int use_stderr; + static int debug; +-static int hotplug_mode; + static int reformat_serial; +-static int ignore_sysfs; + static int export; + static char vendor_str[64]; + static char model_str[64]; +@@ -169,35 +158,6 @@ static void set_type(char *to, const char *from, size_t len) + to[len-1] = '\0'; + } + +-static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) +-{ +- unsigned int maj, min; +- const char *attr; +- +- dbg("%s\n", devpath); +- attr = sysfs_attr_get_value(devpath, "dev"); +- if (attr == NULL) { +- dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); +- return -1; +- } +- +- dbg("dev value %s\n", attr); +- if (sscanf(attr, "%u:%u", &maj, &min) != 2) { +- err("%s: invalid dev major/minor\n", devpath); +- return -1; +- } +- +- snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", +- TMP_DIR, TMP_PREFIX, maj, min, getpid()); +- +- dbg("tmpdev '%s'\n", tmpdev); +- if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { +- err("mknod failed: %s\n", strerror(errno)); +- return -1; +- } +- return 0; +-} +- + /* + * get_value: + * +@@ -415,7 +375,7 @@ static int get_file_options(const char *vendor, const char *model, + } + + static int set_options(int argc, char **argv, const char *short_opts, +- char *target, char *maj_min_dev) ++ char *maj_min_dev) + { + int option; + +@@ -436,9 +396,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + dbg("option '%c'\n", option); + + switch (option) { +- case 'a': +- always_info = 1; +- break; + case 'b': + all_good = 0; + break; +@@ -465,11 +422,8 @@ static int set_options(int argc, char **argv, const char *short_opts, + case 'h': + printf("Usage: scsi_id OPTIONS \n" + " --device device node for SG_IO commands\n" +- " --devpath sysfs devpath\n" + " --config location of config file\n" + " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" +- " --fallback-to-sysfs print sysfs values if inquiry fails\n" +- " --ignore-sysfs ignore sysfs entries\n" + " --blacklisted threat device as blacklisted\n" + " --whitelisted threat device as whitelisted\n" + " --prefix-bus-id prefix SCSI bus id\n" +@@ -497,16 +451,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + } + break; + +- case 'n': +- ignore_sysfs = 1; +- break; +- +- case 's': +- sys_specified = 1; +- strncpy(target, optarg, MAX_PATH_LEN); +- target[MAX_PATH_LEN-1] = '\0'; +- break; +- + case 'u': + reformat_serial = 1; + break; +@@ -528,10 +472,15 @@ static int set_options(int argc, char **argv, const char *short_opts, + exit(1); + } + } ++ if (optind < argc && !dev_specified) { ++ dev_specified = 1; ++ strncpy(maj_min_dev, argv[optind], MAX_PATH_LEN); ++ maj_min_dev[MAX_PATH_LEN-1] = '\0'; ++ } + return 0; + } + +-static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *page_code) ++static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int *page_code) + { + int retval; + int newargc; +@@ -590,54 +539,18 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa + return retval; + } + +-static int set_sysfs_values(struct sysfs_device *dev_scsi) +-{ +- const char *vendor, *model, *type; +- +- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); +- if (!vendor) { +- info("%s: cannot get vendor attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_str(vendor_str, vendor, sizeof(vendor_str)-1); +- +- model = sysfs_attr_get_value(dev_scsi->devpath, "model"); +- if (!model) { +- info("%s: cannot get model attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_str(model_str, model, sizeof(model_str)-1); +- +- type = sysfs_attr_get_value(dev_scsi->devpath, "type"); +- if (!type) { +- info("%s: cannot get type attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_type(type_str, type, sizeof(type_str)); +- +- type = sysfs_attr_get_value(dev_scsi->devpath, "rev"); +- if (!type) { +- info("%s: cannot get type attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_str(revision_str, type, sizeof(revision_str)-1); +- +- return 0; +-} +- +-static int set_inq_values(struct sysfs_device *dev_scsi, const char *path) ++static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) + { + int retval; +- char vendor[8], model[16], type[4], rev[4]; + +- retval = scsi_std_inquiry(dev_scsi, path, vendor, model, rev, type); ++ retval = scsi_std_inquiry(dev_scsi, path); + if (retval) + return retval; + +- set_str(vendor_str, vendor, 8); +- set_str(model_str, model, 16); +- set_type(type_str, type, sizeof(type_str) - 1); +- set_str(revision_str, rev, sizeof(revision_str) -1); ++ set_str(vendor_str, dev_scsi->vendor, 8); ++ set_str(model_str, dev_scsi->model, 16); ++ set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); ++ set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); + + return 0; + } +@@ -674,60 +587,25 @@ static void format_serial(char *serial) + * memory etc. return 2, and return 1 for expected cases (like broken + * device found) that do not print an id. + */ +-static int scsi_id(const char *devpath, char *maj_min_dev) ++static int scsi_id(char *maj_min_dev) + { + int retval; +- int dev_type = 0; +- struct sysfs_device *dev; +- struct sysfs_device *dev_scsi = NULL; ++ struct scsi_id_device dev_scsi; + int good_dev; + int page_code; +- char serial[MAX_SERIAL_LEN] = ""; + char serial_short[MAX_SERIAL_LEN] = ""; +- const char *bus_str = NULL; +- +- dbg("devpath %s\n", devpath); + +- dev = sysfs_device_get(devpath); +- if (dev == NULL) { +- err("unable to access '%s'\n", devpath); +- return 1; +- } +- +- if (strcmp(dev->subsystem, "block") == 0) +- dev_type = S_IFBLK; +- else +- dev_type = S_IFCHR; +- +- /* mknod a temp dev to communicate with the device */ +- if (!dev_specified && create_tmp_dev(dev->devpath, maj_min_dev, dev_type)) { +- dbg("create_tmp_dev failed\n"); +- return 1; +- } +- +- if (!ignore_sysfs) { +- /* get scsi parent device */ +- dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); +- if (dev_scsi == NULL) { +- err("unable to access parent device of '%s'\n", devpath); +- return 1; +- } +- set_sysfs_values(dev_scsi); +- bus_str = "scsi"; +- } else { +- dev_scsi = dev; +- set_inq_values(dev_scsi, maj_min_dev); +- } ++ set_inq_values(&dev_scsi, maj_min_dev); + + /* get per device (vendor + model) options from the config file */ +- retval = per_dev_options(dev_scsi, &good_dev, &page_code); ++ retval = per_dev_options(&dev_scsi, &good_dev, &page_code); + dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); + + if (!good_dev) { + retval = 1; +- } else if (scsi_get_serial(dev_scsi, maj_min_dev, page_code, +- serial, serial_short, MAX_SERIAL_LEN)) { +- retval = always_info?0:1; ++ } else if (scsi_get_serial(&dev_scsi, maj_min_dev, page_code, ++ serial_short, MAX_SERIAL_LEN)) { ++ retval = 1; + } else { + retval = 0; + } +@@ -738,59 +616,33 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + printf("ID_VENDOR=%s\n", vendor_str); + printf("ID_MODEL=%s\n", model_str); + printf("ID_REVISION=%s\n", revision_str); +- set_str(serial_str, serial, sizeof(serial_str)); ++ set_str(serial_str, dev_scsi.serial, sizeof(serial_str)); + printf("ID_SERIAL=%s\n", serial_str); + set_str(serial_str, serial_short, sizeof(serial_str)); + printf("ID_SERIAL_SHORT=%s\n", serial_str); + printf("ID_TYPE=%s\n", type_str); +- if (bus_str != NULL) +- printf("ID_BUS=%s\n", bus_str); + } else { + if (reformat_serial) +- format_serial(serial); +- if (display_bus_id) +- printf("%s: ", dev_scsi->kernel); +- printf("%s\n", serial); ++ format_serial(dev_scsi.serial); ++ printf("%s\n", dev_scsi.serial); + } +- dbg("%s\n", serial); ++ dbg("%s\n", dev_scsi.serial); + retval = 0; + } + +- if (!dev_specified) +- unlink(maj_min_dev); +- + return retval; + } + + int main(int argc, char **argv) + { + int retval = 0; +- char devpath[MAX_PATH_LEN]; + char maj_min_dev[MAX_PATH_LEN]; + int newargc; +- const char *env; + char **newargv; + + logging_init("scsi_id"); +- sysfs_init(); + dbg("argc is %d\n", argc); + +- /* sysfs path can be overridden for testing */ +- env = getenv("SYSFS_PATH"); +- if (env) { +- strncpy(sysfs_path, env, sizeof(sysfs_path)); +- sysfs_path[sizeof(sysfs_path)-1] = '\0'; +- } else +- strcpy(sysfs_path, "/sys"); +- +- env = getenv("DEVPATH"); +- if (env) { +- hotplug_mode = 1; +- sys_specified = 1; +- strncpy(devpath, env, MAX_PATH_LEN); +- devpath[sizeof(devpath)-1] = '\0'; +- } +- + /* + * Get config file options. + */ +@@ -801,8 +653,7 @@ int main(int argc, char **argv) + goto exit; + } + if (newargv && (retval == 0)) { +- if (set_options(newargc, newargv, short_options, devpath, +- maj_min_dev) < 0) { ++ if (set_options(newargc, newargv, short_options, maj_min_dev) < 0) { + retval = 2; + goto exit; + } +@@ -810,22 +661,20 @@ int main(int argc, char **argv) + } + + /* +- * Get command line options (overriding any config file or DEVPATH +- * settings). ++ * Get command line options (overriding any config file settings). + */ +- if (set_options(argc, argv, short_options, devpath, maj_min_dev) < 0) ++ if (set_options(argc, argv, short_options, maj_min_dev) < 0) + exit(1); + +- if (!sys_specified) { +- info("--devpath= must be specified\n"); ++ if (!dev_specified) { ++ info("no device specified\n"); + retval = 1; + goto exit; + } + +- retval = scsi_id(devpath, maj_min_dev); ++ retval = scsi_id(maj_min_dev); + + exit: +- sysfs_cleanup(); + logging_close(); + return retval; + } +diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h +index 0e2b297..3b3a000 100644 +--- a/extras/scsi_id/scsi_id.h ++++ b/extras/scsi_id/scsi_id.h +@@ -30,13 +30,21 @@ + */ + #define MAX_BUFFER_LEN 256 + +-extern int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, +- char *vendor, char *model, char *rev, char *type); +-extern int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, +- int page_code, char *serial, char *serial_short, int len); ++struct scsi_id_device { ++ char vendor[9]; ++ char model[17]; ++ char revision[5]; ++ char type[33]; ++ char kernel[64]; ++ char serial[MAX_SERIAL_LEN]; ++}; ++ ++extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); ++extern int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, ++ int page_code, char *serial_short, int len); + + /* +- * Page code values. ++ * Page code values. + */ + enum page_code { + PAGE_83_PRE_SPC3 = -0x83, +@@ -44,3 +52,4 @@ enum page_code { + PAGE_80 = 0x80, + PAGE_83 = 0x83, + }; ++ +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 28e82db..32bb0f4 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -148,7 +148,7 @@ static int sg_err_category3(struct sg_io_hdr *hp) + hp->sbp, hp->sb_len_wr); + } + +-static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) ++static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) + { + unsigned char *sense_buffer; + int s; +@@ -254,7 +254,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + return -1; + } + +-static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) ++static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) + { + if (!io->status && !io->host_status && !io->msg_status && + !io->driver_status) { +@@ -273,7 +273,7 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + return -1; + } + +-static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, + unsigned char evpd, unsigned char page, + unsigned char *buf, unsigned int buflen) + { +@@ -343,11 +343,10 @@ error: + } + + /* Get list of supported EVPD pages */ +-static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page0_inquiry(struct scsi_id_device *dev_scsi, int fd, + unsigned char *buffer, unsigned int len) + { + int retval; +- const char *vendor; + + memset(buffer, 0, len); + retval = scsi_inquiry(dev_scsi, fd, 1, 0x0, buffer, len); +@@ -375,12 +374,7 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + * If the vendor id appears in the page assume the page is + * invalid. + */ +- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); +- if (!vendor) { +- info("%s: cannot get model attribute\n", dev_scsi->kernel); +- return 1; +- } +- if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { ++ if (!strncmp((char *)&buffer[VENDOR_LENGTH], dev_scsi->vendor, VENDOR_LENGTH)) { + info("%s: invalid page0 data\n", dev_scsi->kernel); + return 1; + } +@@ -392,25 +386,14 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + * The caller checks that serial is long enough to include the vendor + + * model. + */ +-static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) ++static int prepend_vendor_model(struct scsi_id_device *dev_scsi, char *serial) + { +- const char *attr; + int ind; + +- attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); +- if (!attr) { +- info("%s: cannot get vendor attribute\n", dev_scsi->kernel); +- return 1; +- } +- strncpy(serial, attr, VENDOR_LENGTH); ++ strncpy(serial, dev_scsi->vendor, VENDOR_LENGTH); + ind = strlen(serial) - 1; + +- attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); +- if (!attr) { +- info("%s: cannot get model attribute\n", dev_scsi->kernel); +- return 1; +- } +- strncat(serial, attr, MODEL_LENGTH); ++ strncat(serial, dev_scsi->model, MODEL_LENGTH); + ind = strlen(serial) - 1; + ind++; + +@@ -430,7 +413,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + * check_fill_0x83_id - check the page 0x83 id, if OK allocate and fill + * serial number. + **/ +-static int check_fill_0x83_id(struct sysfs_device *dev_scsi, ++static int check_fill_0x83_id(struct scsi_id_device *dev_scsi, + unsigned char *page_83, + const struct scsi_id_search_values + *id_search, char *serial, char *serial_short, int max_len) +@@ -521,7 +504,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, + } + + /* Extract the raw binary from VPD 0x83 pre-SPC devices */ +-static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, ++static int check_fill_0x83_prespc3(struct scsi_id_device *dev_scsi, + unsigned char *page_83, + const struct scsi_id_search_values + *id_search, char *serial, char *serial_short, int max_len) +@@ -543,7 +526,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, + + + /* Get device identification VPD page */ +-static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page83_inquiry(struct scsi_id_device *dev_scsi, int fd, + char *serial, char *serial_short, int len) + { + int retval; +@@ -633,7 +616,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, + * Return the hard coded error code value 2 if the page 83 reply is not + * conformant to the SCSI-2 format. + */ +-static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page83_prespc3_inquiry(struct scsi_id_device *dev_scsi, int fd, + char *serial, char *serial_short, int len) + { + int retval; +@@ -695,7 +678,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, + } + + /* Get unit serial number VPD page */ +-static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page80_inquiry(struct scsi_id_device *dev_scsi, int fd, + char *serial, char *serial_short, int max_len) + { + int retval; +@@ -736,30 +719,38 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, + return 0; + } + +-int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, +- char *vendor, char *model, char *rev, char *type) ++int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) + { + int retval; + int fd; + unsigned char buf[SCSI_INQ_BUFF_LEN]; ++ struct stat statbuf; + + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("%s: cannot open %s: %s\n", +- dev_scsi->kernel, devname, strerror(errno)); ++ info("scsi_id: cannot open %s: %s\n", ++ devname, strerror(errno)); + return 1; + } + ++ if (fstat(fd, &statbuf) < 0) { ++ info("scsi_id: cannot stat %s: %s\n", ++ devname, strerror(errno)); ++ return 2; ++ } ++ sprintf(dev_scsi->kernel,"%d:%d", major(statbuf.st_rdev), ++ minor(statbuf.st_rdev)); ++ + memset(buf, 0, SCSI_INQ_BUFF_LEN); + retval = scsi_inquiry(dev_scsi, fd, 0, 0, buf, SCSI_INQ_BUFF_LEN); + if (retval < 0) + return retval; + +- memcpy(vendor, buf + 8, 8); +- memcpy(model, buf + 16, 16); +- memcpy(rev, buf + 32, 4); +- sprintf(type,"%x", buf[0] & 0x1f); ++ memcpy(dev_scsi->vendor, buf + 8, 8); ++ memcpy(dev_scsi->model, buf + 16, 16); ++ memcpy(dev_scsi->revision, buf + 32, 4); ++ sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); + + if (close(fd) < 0) + info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); +@@ -767,15 +758,15 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, + return 0; + } + +-int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, +- int page_code, char *serial, char *serial_short, int len) ++int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, ++ int page_code, char *serial_short, int len) + { + unsigned char page0[SCSI_INQ_BUFF_LEN]; + int fd; + int ind; + int retval; + +- memset(serial, 0, len); ++ memset(dev_scsi->serial, 0, len); + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +@@ -785,7 +776,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + } + + if (page_code == PAGE_80) { +- if (do_scsi_page80_inquiry(dev_scsi, fd, serial, serial_short, len)) { ++ if (do_scsi_page80_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { + retval = 1; + goto completed; + } else { +@@ -793,7 +784,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + goto completed; + } + } else if (page_code == PAGE_83) { +- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { ++ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { + retval = 1; + goto completed; + } else { +@@ -801,7 +792,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + goto completed; + } + } else if (page_code == PAGE_83_PRE_SPC3) { +- retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, serial, serial_short, len); ++ retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len); + if (retval) { + /* + * Fallback to servicing a SPC-2/3 compliant page 83 +@@ -809,7 +800,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + * conform to pre-SPC3 expectations. + */ + if (retval == 2) { +- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { ++ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { + retval = 1; + goto completed; + } else { +@@ -849,7 +840,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + for (ind = 4; ind <= page0[3] + 3; ind++) + if (page0[ind] == PAGE_83) + if (!do_scsi_page83_inquiry(dev_scsi, fd, +- serial, serial_short, len)) { ++ dev_scsi->serial, serial_short, len)) { + /* + * Success + */ +@@ -860,7 +851,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + for (ind = 4; ind <= page0[3] + 3; ind++) + if (page0[ind] == PAGE_80) + if (!do_scsi_page80_inquiry(dev_scsi, fd, +- serial, serial_short, len)) { ++ dev_scsi->serial, serial_short, len)) { + /* + * Success + */ +-- +1.5.4.5 + diff --git a/0005-scsi_id-add-SGv4-support.patch b/0005-scsi_id-add-SGv4-support.patch new file mode 100644 index 0000000..3cd03a4 --- /dev/null +++ b/0005-scsi_id-add-SGv4-support.patch @@ -0,0 +1,235 @@ +From 78d9ecfd4f1e37f7453e55e71f2909a58706ae10 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 14 May 2008 13:55:49 +0200 +Subject: [PATCH] scsi_id: add SGv4 support + +Fall back to SGv3, if SGv3 returns a failure/is not available. +--- + extras/scsi_id/Makefile | 4 +- + extras/scsi_id/scsi_id.c | 2 + + extras/scsi_id/scsi_id.h | 1 + + extras/scsi_id/scsi_serial.c | 103 ++++++++++++++++++++++++++++++++---------- + 4 files changed, 84 insertions(+), 26 deletions(-) + +diff --git a/extras/scsi_id/Makefile b/extras/scsi_id/Makefile +index 870296a..ca067d0 100644 +--- a/extras/scsi_id/Makefile ++++ b/extras/scsi_id/Makefile +@@ -6,11 +6,11 @@ + # Released under the GNU General Public License, version 2. + # + +-SCSI_ID_VERSION = 0.9 ++SCSI_ID_VERSION = 2.0 + + PROG = scsi_id + OBJS= scsi_serial.o +-HEADERS = scsi_id.h scsi.h scsi_id_version.h ++HEADERS = scsi_id.h scsi.h scsi_id_version.h bsg.h + GEN_HEADERS = scsi_id_version.h + MAN_PAGES = scsi_id.8 + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 4f0233e..0f09f29 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -543,6 +543,8 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) + { + int retval; + ++ dev_scsi->use_sg = 4; ++ + retval = scsi_std_inquiry(dev_scsi, path); + if (retval) + return retval; +diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h +index 3b3a000..680c39d 100644 +--- a/extras/scsi_id/scsi_id.h ++++ b/extras/scsi_id/scsi_id.h +@@ -37,6 +37,7 @@ struct scsi_id_device { + char type[33]; + char kernel[64]; + char serial[MAX_SERIAL_LEN]; ++ int use_sg; + }; + + extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 32bb0f4..202ffc0 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -22,7 +22,12 @@ + #include + #include + #include ++#include ++#include + #include ++#include ++/* #include */ ++#include "bsg.h" + + #include "../../udev.h" + #include "scsi.h" +@@ -94,10 +99,7 @@ static int sg_err_category_new(int scsi_status, int msg_status, int + * XXX change to return only two values - failed or OK. + */ + +- /* +- * checks msg_status +- */ +- if (!scsi_status && !msg_status && !host_status && !driver_status) ++ if (!scsi_status && !host_status && !driver_status) + return SG_ERR_CAT_CLEAN; + + if ((scsi_status == SCSI_CHECK_CONDITION) || +@@ -148,11 +150,18 @@ static int sg_err_category3(struct sg_io_hdr *hp) + hp->sbp, hp->sb_len_wr); + } + +-static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) ++static int sg_err_category4(struct sg_io_v4 *hp) ++{ ++ return sg_err_category_new(hp->device_status, 0, ++ hp->transport_status, hp->driver_status, ++ (unsigned char *)hp->response, ++ hp->response_len); ++} ++ ++static int scsi_dump_sense(struct scsi_id_device *dev_scsi, ++ unsigned char *sense_buffer, int sb_len) + { +- unsigned char *sense_buffer; + int s; +- int sb_len; + int code; + int sense_class; + int sense_key; +@@ -177,13 +186,11 @@ static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io + + dbg("got check condition\n"); + +- sb_len = io->sb_len_wr; + if (sb_len < 1) { + info("%s: sense buffer empty\n", dev_scsi->kernel); + return -1; + } + +- sense_buffer = io->sbp; + sense_class = (sense_buffer[0] >> 4) & 0x07; + code = sense_buffer[0] & 0xf; + +@@ -268,7 +275,28 @@ static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) + info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", + dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); + if (io->status == SCSI_CHECK_CONDITION) +- return scsi_dump_sense(dev_scsi, io); ++ return scsi_dump_sense(dev_scsi, io->sbp, io->sb_len_wr); ++ else ++ return -1; ++} ++ ++static int scsi_dump_v4(struct scsi_id_device *dev_scsi, struct sg_io_v4 *io) ++{ ++ if (!io->device_status && !io->transport_status && ++ !io->driver_status) { ++ /* ++ * Impossible, should not be called. ++ */ ++ info("%s: called with no error\n", __FUNCTION__); ++ return -1; ++ } ++ ++ info("%s: sg_io failed status 0x%x 0x%x 0x%x\n", ++ dev_scsi->kernel, io->driver_status, io->transport_status, ++ io->device_status); ++ if (io->device_status == SCSI_CHECK_CONDITION) ++ return scsi_dump_sense(dev_scsi, (unsigned char *)io->response, ++ io->response_len); + else + return -1; + } +@@ -281,6 +309,8 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, + { INQUIRY_CMD, evpd, page, 0, buflen, 0 }; + unsigned char sense[SENSE_BUFF_LEN]; + struct sg_io_hdr io_hdr; ++ struct sg_io_v4 io_v4; ++ void *io_buf; + int retval; + int retry = 3; /* rather random */ + +@@ -292,24 +322,46 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, + resend: + dbg("%s evpd %d, page 0x%x\n", dev_scsi->kernel, evpd, page); + +- memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); +- io_hdr.interface_id = 'S'; +- io_hdr.cmd_len = sizeof(inq_cmd); +- io_hdr.mx_sb_len = sizeof(sense); +- io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; +- io_hdr.dxfer_len = buflen; +- io_hdr.dxferp = buf; +- io_hdr.cmdp = inq_cmd; +- io_hdr.sbp = sense; +- io_hdr.timeout = DEF_TIMEOUT; +- +- if (ioctl(fd, SG_IO, &io_hdr) < 0) { ++ if (dev_scsi->use_sg == 4) { ++ memset(&io_v4, 0, sizeof(struct sg_io_v4)); ++ io_v4.guard = 'Q'; ++ io_v4.protocol = BSG_PROTOCOL_SCSI; ++ io_v4.subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD; ++ io_v4.request_len = sizeof(inq_cmd); ++ io_v4.request = (uintptr_t)inq_cmd; ++ io_v4.max_response_len = sizeof(sense); ++ io_v4.response = (uintptr_t)sense; ++ io_v4.din_xfer_len = buflen; ++ io_v4.din_xferp = (uintptr_t)buf; ++ io_buf = (void *)&io_v4; ++ } else { ++ memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); ++ io_hdr.interface_id = 'S'; ++ io_hdr.cmd_len = sizeof(inq_cmd); ++ io_hdr.mx_sb_len = sizeof(sense); ++ io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; ++ io_hdr.dxfer_len = buflen; ++ io_hdr.dxferp = buf; ++ io_hdr.cmdp = inq_cmd; ++ io_hdr.sbp = sense; ++ io_hdr.timeout = DEF_TIMEOUT; ++ io_buf = (void *)&io_hdr; ++ } ++ ++ if (ioctl(fd, SG_IO, io_buf) < 0) { ++ if (errno == EINVAL && dev_scsi->use_sg == 4) { ++ dev_scsi->use_sg = 3; ++ goto resend; ++ } + info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); + retval = -1; + goto error; + } + +- retval = sg_err_category3(&io_hdr); ++ if (dev_scsi->use_sg == 4) ++ retval = sg_err_category4(io_buf); ++ else ++ retval = sg_err_category3(io_buf); + + switch (retval) { + case SG_ERR_CAT_NOTSUPPORTED: +@@ -321,7 +373,10 @@ resend: + break; + + default: +- retval = scsi_dump(dev_scsi, &io_hdr); ++ if (dev_scsi->use_sg == 4) ++ retval = scsi_dump_v4(dev_scsi, io_buf); ++ else ++ retval = scsi_dump(dev_scsi, io_buf); + } + + if (!retval) { +-- +1.5.4.5 + diff --git a/0005-udevd-at-startup-write-message-including-version-nu.patch b/0005-udevd-at-startup-write-message-including-version-nu.patch deleted file mode 100644 index 4033f2f..0000000 --- a/0005-udevd-at-startup-write-message-including-version-nu.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 798d7ab60c476a2c7bcef6918a40dce1756204d1 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 10 Apr 2008 21:35:40 +0200 -Subject: [PATCH] udevd: at startup write message including version number to kernel log - ---- - udevd.c | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/udevd.c b/udevd.c -index 493bb54..530fc59 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -1116,6 +1116,14 @@ int main(int argc, char *argv[], char *envp[]) - close(fd); - } - -+ fd = open("/dev/kmsg", O_WRONLY); -+ if (fd > 0) { -+ const char *str = "<6>udevd version " UDEV_VERSION " started\n"; -+ -+ write(fd, str, strlen(str)); -+ close(fd); -+ } -+ - /* set signal handlers */ - memset(&act, 0x00, sizeof(struct sigaction)); - act.sa_handler = (void (*)(int)) sig_handler; --- -1.5.4.5 - diff --git a/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch b/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch deleted file mode 100644 index dd4f665..0000000 --- a/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch +++ /dev/null @@ -1,49 +0,0 @@ -From e6d70ed63a03f39de148e6b0afb47cbbc5ec78eb Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 15 Apr 2008 00:21:51 +0200 -Subject: [PATCH] rules_generator: net rules - always add KERNEL== match to generated rules - ---- - .../75-persistent-net-generator.rules | 2 +- - extras/rule_generator/write_net_rules | 5 +++-- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules -index 2aa3076..85a4c5b 100644 ---- a/extras/rule_generator/75-persistent-net-generator.rules -+++ b/extras/rule_generator/75-persistent-net-generator.rules -@@ -18,7 +18,7 @@ SUBSYSTEM!="net", GOTO="persistent_net_generator_end" - 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" -+KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" - - # ignore Xen virtual interfaces - SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" -diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules -index 765e56f..322398b 100644 ---- a/extras/rule_generator/write_net_rules -+++ b/extras/rule_generator/write_net_rules -@@ -92,6 +92,9 @@ if [ -z "$match" ]; then - exit 1 - fi - -+basename=${INTERFACE%%[0-9]*} -+match="$match, KERNEL==\"$basename*\"" -+ - if [ "$INTERFACE_NAME" ]; then - # external tools may request a custom name - COMMENT="$COMMENT (custom name provided by external tool)" -@@ -101,8 +104,6 @@ if [ "$INTERFACE_NAME" ]; then - fi - else - # if a rule using the current name already exists, find a new name -- basename=${INTERFACE%%[0-9]*} -- match="$match, KERNEL==\"$basename*\"" - if interface_name_taken; then - INTERFACE="$basename$(find_next_available "$basename[0-9]*")" - echo "INTERFACE_NEW=$INTERFACE" --- -1.5.4.5 - diff --git a/0006-scsi_id-update-man-page.patch b/0006-scsi_id-update-man-page.patch new file mode 100644 index 0000000..324fa27 --- /dev/null +++ b/0006-scsi_id-update-man-page.patch @@ -0,0 +1,66 @@ +From 138cf75e4eda54ab519c0d77ad3ca4b467dfe7ec Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 13:59:11 +0200 +Subject: [PATCH] scsi_id: update man page + +--- + extras/scsi_id/scsi_id.8 | 24 +----------------------- + 1 files changed, 1 insertions(+), 23 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 +index aa429a5..725b7d5 100644 +--- a/extras/scsi_id/scsi_id.8 ++++ b/extras/scsi_id/scsi_id.8 +@@ -52,25 +52,12 @@ identifier starts with the NAA value of 6): + + .SH OPTIONS + .TP +-.BI \-\-fallback-to-sysfs +-Always print information (model, vendor strings) about the device even +-if it does not support VPD pages. +-.TP +-.BI \-\-ignore-sysfs +-Ignore sysfs entries. Used for devices which are not represented as SCSI +-devices, but understand SG_IO commands. +-.TP + .BI \-\-blacklisted + The default behaviour \- treat the device as black listed, and do nothing + unless a white listed device is found in the scsi_id config\-file. + .TP + .BI \-\-device=\| device\^ +-Instead +-of determining and creating a device node based on a sysfs dev +-entry as done for the \fB\-s\fP, send SG_IO commands to +-\fBdevice\fP, such as \fB/dev/sdc\fP. +-This argument should also be used when invoked via udev to avoid problems +-with creation of temporary files on not-yet writable directories. ++Send SG_IO commands to \fBdevice\fP, such as \fB/dev/sdc\fP. + .TP + .BI \-\-config=\| config\-file + Read configuration and black/white list entries from +@@ -85,10 +72,6 @@ on the command line or in the scsi_id configuration file for + .B scsi_id + to generate any output. + .TP +-.BI \-\-prefix-bus-id +-Prefix the identification string with the driver model (sysfs) bus id of +-the SCSI device. +-.TP + .BI \-\-page=\| 0x80 | 0x83 | pre-spc3-83 + Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83. + .sp +@@ -102,11 +85,6 @@ option is used for older model 4, 5, and 6 EMC Symmetrix devices, its + use with SPC-2 or SPC-3 compliant devices will fallback to the page 83 + format supported by these devices. + .TP +-.BI \-\-devpath=\| sysfs\-devpath +-Generate an id for the +-.B sysfs\-devpath. +-The sysfs mount point must not be included. +-.TP + .BI \-\-replace-whitespace + Reformat the output : replace all whitespaces by underscores. + .TP +-- +1.5.4.5 + diff --git a/0007-scsi_id-remove-bus_id-option.patch b/0007-scsi_id-remove-bus_id-option.patch new file mode 100644 index 0000000..bcb5b82 --- /dev/null +++ b/0007-scsi_id-remove-bus_id-option.patch @@ -0,0 +1,51 @@ +From 2d05764a77078953849a1f84ac269c927904ca23 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 13:59:25 +0200 +Subject: [PATCH] scsi_id: remove bus_id option + +--- + extras/scsi_id/scsi_id.c | 7 ------- + 1 files changed, 0 insertions(+), 7 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 0f09f29..6194b71 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -37,7 +37,6 @@ static const struct option options[] = { + { "page", 1, NULL, 'p' }, + { "blacklisted", 0, NULL, 'b' }, + { "whitelisted", 0, NULL, 'g' }, +- { "prefix-bus-id", 0, NULL, 'i' }, + { "replace-whitespace", 0, NULL, 'u' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, +@@ -52,7 +51,6 @@ static const char dev_short_options[] = "bgp:"; + static int all_good; + static int dev_specified; + static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; +-static int display_bus_id; + static enum page_code default_page_code; + static int use_stderr; + static int debug; +@@ -426,7 +424,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" + " --blacklisted threat device as blacklisted\n" + " --whitelisted threat device as whitelisted\n" +- " --prefix-bus-id prefix SCSI bus id\n" + " --replace-whitespace replace all whitespaces by underscores\n" + " --verbose verbose logging\n" + " --version print version\n" +@@ -434,10 +431,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + " --help print this help text\n\n"); + exit(0); + +- case 'i': +- display_bus_id = 1; +- break; +- + case 'p': + if (strcmp(optarg, "0x80") == 0) { + default_page_code = PAGE_80; +-- +1.5.4.5 + diff --git a/0007-selinux-more-context-settings.patch b/0007-selinux-more-context-settings.patch deleted file mode 100644 index 056a40c..0000000 --- a/0007-selinux-more-context-settings.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 6056d9b3400fe0349d86636cbbf93f069bb5639a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 17 Apr 2008 16:03:03 +0200 -Subject: [PATCH] selinux: more context settings - -Signed-off-by: Harald Hoyer ---- - udev_db.c | 6 +++++- - udev_rules_parse.c | 2 ++ - udev_utils_file.c | 7 ++++++- - udevd.c | 2 ++ - 4 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/udev_db.c b/udev_db.c -index 518ace9..4447253 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -144,8 +144,12 @@ int udev_db_add_device(struct udevice *udev) - */ - if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && - !udev->partitions && !udev->ignore_remove) { -+ int ret; - dbg("nothing interesting to store, create symlink"); -- if (symlink(udev->name, filename) != 0) { -+ selinux_setfscreatecon(filename, NULL, S_IFLNK); -+ ret = symlink(udev->name, filename); -+ selinux_resetfscreatecon(); -+ if (ret != 0) { - err("unable to create db link '%s': %s", filename, strerror(errno)); - return -1; - } -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index 9e43581..d2392c3 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -745,7 +745,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) - strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); - if (stat(filename, &statbuf) != 0) { - create_path(filename); -+ selinux_setfscreatecon(filename, NULL, S_IFDIR|0755); - mkdir(filename, 0755); -+ selinux_resetfscreatecon(); - } - add_matching_files(&dyn_list, filename, RULESFILE_SUFFIX); - -diff --git a/udev_utils_file.c b/udev_utils_file.c -index 0ceefe1..9ab3470 100644 ---- a/udev_utils_file.c -+++ b/udev_utils_file.c -@@ -35,6 +35,7 @@ int create_path(const char *path) - char p[PATH_SIZE]; - char *pos; - struct stat stats; -+ int ret; - - strlcpy(p, path, sizeof(p)); - pos = strrchr(p, '/'); -@@ -53,8 +54,12 @@ int create_path(const char *path) - return -1; - - dbg("mkdir '%s'", p); -- if (mkdir(p, 0755) == 0) -+ selinux_setfscreatecon(p, NULL, S_IFDIR|0755); -+ ret = mkdir(p, 0755); -+ selinux_resetfscreatecon(); -+ if (ret == 0) - return 0; -+ - if (errno == EEXIST) - if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) - return 0; -diff --git a/udevd.c b/udevd.c -index 530fc59..7786ae6 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -168,7 +168,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - delete_path(filename_failed); - - create_path(filename); -+ selinux_setfscreatecon(filename, NULL, S_IFLNK); - symlink(msg->devpath, filename); -+ selinux_resetfscreatecon(); - break; - case EVENT_FINISHED: - if (msg->devpath_old != NULL) { --- -1.5.4.5 - diff --git a/0008-scsi_id-add-sg-version-option.patch b/0008-scsi_id-add-sg-version-option.patch new file mode 100644 index 0000000..9cd1819 --- /dev/null +++ b/0008-scsi_id-add-sg-version-option.patch @@ -0,0 +1,164 @@ +From 025570aa3e054d92d65f8d2de9f91d202f60c798 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 15:02:17 +0200 +Subject: [PATCH] scsi_id: add --sg-version= option + +--- + extras/scsi_id/scsi_id.c | 53 +++++++++++++++++++++++++---------------- + extras/scsi_id/scsi_serial.c | 6 +++- + 2 files changed, 36 insertions(+), 23 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 6194b71..5eb95e8 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -38,6 +38,7 @@ static const struct option options[] = { + { "blacklisted", 0, NULL, 'b' }, + { "whitelisted", 0, NULL, 'g' }, + { "replace-whitespace", 0, NULL, 'u' }, ++ { "sg-version", 1, NULL, 's' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + { "export", 0, NULL, 'x' }, +@@ -52,6 +53,7 @@ static int all_good; + static int dev_specified; + static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; + static enum page_code default_page_code; ++static int sg_version = 4; + static int use_stderr; + static int debug; + static int reformat_serial; +@@ -257,7 +259,7 @@ static int get_file_options(const char *vendor, const char *model, + break; + lineno++; + if (buf[strlen(buffer) - 1] != '\n') { +- info("Config file line %d too long\n", lineno); ++ err("Config file line %d too long\n", lineno); + break; + } + +@@ -309,7 +311,7 @@ static int get_file_options(const char *vendor, const char *model, + * Only allow: [vendor=foo[,model=bar]]options=stuff + */ + if (!options_in || (!vendor_in && model_in)) { +- info("Error parsing config file line %d '%s'\n", lineno, buffer); ++ err("Error parsing config file line %d '%s'\n", lineno, buffer); + retval = -1; + break; + } +@@ -419,16 +421,17 @@ static int set_options(int argc, char **argv, const char *short_opts, + + case 'h': + printf("Usage: scsi_id OPTIONS \n" +- " --device device node for SG_IO commands\n" +- " --config location of config file\n" +- " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" +- " --blacklisted threat device as blacklisted\n" +- " --whitelisted threat device as whitelisted\n" +- " --replace-whitespace replace all whitespaces by underscores\n" +- " --verbose verbose logging\n" +- " --version print version\n" +- " --export print values as environment keys\n" +- " --help print this help text\n\n"); ++ " --device= device node for SG_IO commands\n" ++ " --config= location of config file\n" ++ " --page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n" ++ " --sg-version=3|4 use SGv3 or SGv4\n" ++ " --blacklisted threat device as blacklisted\n" ++ " --whitelisted threat device as whitelisted\n" ++ " --replace-whitespace replace all whitespaces by underscores\n" ++ " --verbose verbose logging\n" ++ " --version print version\n" ++ " --export print values as environment keys\n" ++ " --help print this help text\n\n"); + exit(0); + + case 'p': +@@ -439,7 +442,15 @@ static int set_options(int argc, char **argv, const char *short_opts, + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + default_page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'\n", optarg); ++ err("Unknown page code '%s'\n", optarg); ++ return -1; ++ } ++ break; ++ ++ case 's': ++ sg_version = atoi(optarg); ++ if (sg_version < 3 || sg_version > 4) { ++ err("Unknown SG version '%s'\n", optarg); + return -1; + } + break; +@@ -513,13 +524,13 @@ static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int * + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + *page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'\n", optarg); ++ err("Unknown page code '%s'\n", optarg); + retval = -1; + } + break; + + default: +- info("Unknown or bad option '%c' (0x%x)\n", option, option); ++ err("Unknown or bad option '%c' (0x%x)\n", option, option); + retval = -1; + break; + } +@@ -536,16 +547,16 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) + { + int retval; + +- dev_scsi->use_sg = 4; ++ dev_scsi->use_sg = sg_version; + + retval = scsi_std_inquiry(dev_scsi, path); + if (retval) + return retval; + +- set_str(vendor_str, dev_scsi->vendor, 8); +- set_str(model_str, dev_scsi->model, 16); +- set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); +- set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); ++ set_str(vendor_str, dev_scsi->vendor, sizeof(vendor_str)); ++ set_str(model_str, dev_scsi->model, sizeof(model_str)); ++ set_type(type_str, dev_scsi->type, sizeof(type_str)); ++ set_str(revision_str, dev_scsi->revision, sizeof(revision_str)); + + return 0; + } +@@ -662,7 +673,7 @@ int main(int argc, char **argv) + exit(1); + + if (!dev_specified) { +- info("no device specified\n"); ++ err("no device specified\n"); + retval = 1; + goto exit; + } +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 202ffc0..c5cacfa 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -803,12 +803,14 @@ int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) + return retval; + + memcpy(dev_scsi->vendor, buf + 8, 8); ++ dev_scsi->vendor[8] = '\0'; + memcpy(dev_scsi->model, buf + 16, 16); ++ dev_scsi->model[16] = '\0'; + memcpy(dev_scsi->revision, buf + 32, 4); ++ dev_scsi->revision[4] = '\0'; + sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); + +- if (close(fd) < 0) +- info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); ++ close(fd); + + return 0; + } +-- +1.5.4.5 + diff --git a/0008-selinux-fix-missing-includes.patch b/0008-selinux-fix-missing-includes.patch deleted file mode 100644 index f17d119..0000000 --- a/0008-selinux-fix-missing-includes.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 4278ab015d76876f61821b293df07e0c3746bfd5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 17 Apr 2008 23:31:09 +0200 -Subject: [PATCH] selinux: fix missing includes - ---- - udev_db.c | 1 + - udev_rules.c | 1 + - udev_rules_parse.c | 1 + - udev_utils_file.c | 1 + - 4 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/udev_db.c b/udev_db.c -index 4447253..1feab7d 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -31,6 +31,7 @@ - #include - - #include "udev.h" -+#include "udev_selinux.h" - - - static size_t devpath_to_db_path(const char *devpath, char *filename, size_t len) -diff --git a/udev_rules.c b/udev_rules.c -index eccea3b..6565a2e 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -35,6 +35,7 @@ - - #include "udev.h" - #include "udev_rules.h" -+#include "udev_selinux.h" - - extern char **environ; - -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index d2392c3..ce659d7 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -28,6 +28,7 @@ - - #include "udev.h" - #include "udev_rules.h" -+#include "udev_selinux.h" - - - void udev_rules_iter_init(struct udev_rules *rules) -diff --git a/udev_utils_file.c b/udev_utils_file.c -index 9ab3470..19668b9 100644 ---- a/udev_utils_file.c -+++ b/udev_utils_file.c -@@ -29,6 +29,7 @@ - #include - - #include "udev.h" -+#include "udev_selinux.h" - - int create_path(const char *path) - { --- -1.5.4.5 - diff --git a/0009-allow-setting-of-MODE-0000.patch b/0009-allow-setting-of-MODE-0000.patch deleted file mode 100644 index 8f85310..0000000 --- a/0009-allow-setting-of-MODE-0000.patch +++ /dev/null @@ -1,93 +0,0 @@ -From cf100ca71bf365d8898e97d4ec9dd05c3941cae8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 18 Apr 2008 21:07:29 +0200 -Subject: [PATCH] allow setting of MODE="0000" - ---- - test/udev-test.pl | 10 ++++++++++ - udev_rules.c | 10 +++++----- - udev_rules.h | 3 +-- - udev_rules_parse.c | 3 +-- - 4 files changed, 17 insertions(+), 9 deletions(-) - -diff --git a/test/udev-test.pl b/test/udev-test.pl -index 2621e2b..fee62a6 100755 ---- a/test/udev-test.pl -+++ b/test/udev-test.pl -@@ -1607,6 +1607,16 @@ EOF - KERNEL=="sda", TEST=="*/nr_requests", NAME="found-subdir" - EOF - }, -+ { -+ desc => "TEST MODE=0000", -+ subsys => "block", -+ devpath => "/block/sda", -+ exp_name => "sda", -+ exp_perms => "0:0:0000", -+ rules => <mode_final && rule->mode != 0000) { -- if (rule->mode_operation == KEY_OP_ASSIGN_FINAL) -+ if (!udev->mode_final && rule->mode.operation != KEY_OP_UNSET) { -+ if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) - udev->mode_final = 1; -- udev->mode = rule->mode; -- dbg("applied mode=%#o to '%s'", rule->mode, udev->dev->kernel); -+ udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); -+ dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); - } - if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { - if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) -@@ -1534,7 +1534,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - 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->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; -diff --git a/udev_rules.h b/udev_rules.h -index 0ad4ec3..a84b0de 100644 ---- a/udev_rules.h -+++ b/udev_rules.h -@@ -93,8 +93,7 @@ struct udev_rule { - struct key symlink_match; - struct key owner; - struct key group; -- mode_t mode; -- enum key_operation mode_operation; -+ struct key mode; - enum escape_type string_escape; - - unsigned int link_priority; -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index ce659d7..6d88354 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -579,8 +579,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - } - - if (strcasecmp(key, "MODE") == 0) { -- rule->mode = strtol(value, NULL, 8); -- rule->mode_operation = operation; -+ add_rule_key(rule, &rule->mode, operation, value); - valid = 1; - continue; - } --- -1.5.4.5 - diff --git a/0009-rules-adapt-to-new-scsi_id.patch b/0009-rules-adapt-to-new-scsi_id.patch new file mode 100644 index 0000000..5c62fd8 --- /dev/null +++ b/0009-rules-adapt-to-new-scsi_id.patch @@ -0,0 +1,27 @@ +From 3d2aed9e869dc8abadb6f7919dcf9e35837d6181 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 15:14:23 +0200 +Subject: [PATCH] rules: adapt to new scsi_id + +--- + etc/udev/rules.d/60-persistent-storage.rules | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index 85a9270..b7c4337 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -33,8 +33,8 @@ KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL + + 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*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" ++KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -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" + +-- +1.5.4.5 + diff --git a/0010-path_id-remove-subsystem-whitelist.patch b/0010-path_id-remove-subsystem-whitelist.patch deleted file mode 100644 index 3ae1bea..0000000 --- a/0010-path_id-remove-subsystem-whitelist.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1d918b50cddc975abbfd06af134a6d843d9bc7f0 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 18 Apr 2008 21:08:07 +0200 -Subject: [PATCH] path_id: remove subsystem whitelist - ---- - extras/path_id/path_id | 27 +++++++-------------------- - 1 files changed, 7 insertions(+), 20 deletions(-) - -diff --git a/extras/path_id/path_id b/extras/path_id/path_id -index a3a627e..7a37700 100755 ---- a/extras/path_id/path_id -+++ b/extras/path_id/path_id -@@ -549,7 +549,7 @@ handle_device () { - ;; - *) - mode="" -- ;; -+ ;; - esac - if [ "$d" ]; then - d="$d-${rewind}st${mode}" -@@ -557,22 +557,9 @@ handle_device () { - fi - } - --case "$TYPE" in -- block) -- handle_device -- echo "ID_PATH=$d" -- ;; -- scsi_tape) -- handle_device -- echo "ID_PATH=$d" -- ;; -- input) -- handle_device -- echo "ID_PATH=$d" -- ;; -- *) -- RESULT=1 -- ;; --esac -- --exit $RESULT -+handle_device -+if [ -z "$d" ]; then -+ exit 1 -+fi -+echo "ID_PATH=$d" -+exit 0 --- -1.5.4.5 - diff --git a/0010-rules-adapt-tape-rules-to-new-scsi_id.patch b/0010-rules-adapt-tape-rules-to-new-scsi_id.patch new file mode 100644 index 0000000..9c06d15 --- /dev/null +++ b/0010-rules-adapt-tape-rules-to-new-scsi_id.patch @@ -0,0 +1,33 @@ +From 788096cb59a7ad1cdd08ccc59e5e3b1d2f4828c2 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 15:17:35 +0200 +Subject: [PATCH] rules: adapt tape rules to new scsi_id + +--- + etc/udev/rules.d/60-persistent-storage-tape.rules | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules +index e56d57a..45cac93 100644 +--- a/etc/udev/rules.d/60-persistent-storage-tape.rules ++++ b/etc/udev/rules.d/60-persistent-storage-tape.rules +@@ -5,14 +5,14 @@ + ACTION!="add|change", GOTO="persistent_storage_tape_end" + + # 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=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" + + SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" + + 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]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" ++KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" + KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" + +-- +1.5.4.5 + diff --git a/0011-cdrom_id-fix-segfault.patch b/0011-cdrom_id-fix-segfault.patch new file mode 100644 index 0000000..0d4aa23 --- /dev/null +++ b/0011-cdrom_id-fix-segfault.patch @@ -0,0 +1,25 @@ +From 4cd71da5603898cff68a31774be570750d7fd659 Mon Sep 17 00:00:00 2001 +From: Matthias Schwarzott +Date: Wed, 14 May 2008 16:03:49 +0200 +Subject: [PATCH] cdrom_id: fix segfault + +--- + extras/cdrom_id/cdrom_id.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 0e0a463..e0cbe9e 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -469,6 +469,8 @@ static int cd_media_toc(int fd) + info("READ TOC: len: %d\n", len); + if (len > sizeof(toc)) + return -1; ++ if (len < 8) ++ return -1; + + /* check if we have a data track */ + info("ctl %02x (0x04 is data/audio)\n", header[5]); +-- +1.5.4.5 + diff --git a/0011-logging-add-trailing-newline-to-all-strings.patch b/0011-logging-add-trailing-newline-to-all-strings.patch deleted file mode 100644 index a4a3bd5..0000000 --- a/0011-logging-add-trailing-newline-to-all-strings.patch +++ /dev/null @@ -1,5323 +0,0 @@ -From c70560feef0eb61a150cd2f956f0beead4313ffe Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 20 Apr 2008 21:07:06 +0200 -Subject: [PATCH] logging: add trailing newline to all strings - ---- - extras/ata_id/ata_id.c | 8 +- - extras/cdrom_id/cdrom_id.c | 37 +++--- - extras/edd_id/edd_id.c | 28 ++-- - extras/scsi_id/scsi_id.c | 40 +++--- - extras/scsi_id/scsi_serial.c | 76 +++++----- - extras/usb_id/usb_id.c | 24 ++-- - extras/volume_id/lib/adaptec_raid.c | 2 +- - extras/volume_id/lib/cramfs.c | 2 +- - extras/volume_id/lib/ddf_raid.c | 2 +- - extras/volume_id/lib/ext.c | 6 +- - extras/volume_id/lib/fat.c | 40 +++--- - extras/volume_id/lib/gfs.c | 2 +- - extras/volume_id/lib/hfs.c | 32 ++-- - extras/volume_id/lib/highpoint.c | 4 +- - extras/volume_id/lib/hpfs.c | 2 +- - extras/volume_id/lib/iso9660.c | 12 +- - extras/volume_id/lib/isw_raid.c | 2 +- - extras/volume_id/lib/jfs.c | 2 +- - extras/volume_id/lib/jmicron_raid.c | 2 +- - extras/volume_id/lib/linux_raid.c | 4 +- - extras/volume_id/lib/linux_swap.c | 2 +- - extras/volume_id/lib/lsi_raid.c | 2 +- - extras/volume_id/lib/lvm.c | 6 +- - extras/volume_id/lib/minix.c | 2 +- - extras/volume_id/lib/netware.c | 2 +- - extras/volume_id/lib/ntfs.c | 24 ++-- - extras/volume_id/lib/nvidia_raid.c | 2 +- - extras/volume_id/lib/ocfs.c | 6 +- - extras/volume_id/lib/promise_raid.c | 2 +- - extras/volume_id/lib/reiserfs.c | 2 +- - extras/volume_id/lib/romfs.c | 2 +- - extras/volume_id/lib/silicon_raid.c | 2 +- - extras/volume_id/lib/squashfs.c | 2 +- - extras/volume_id/lib/sysv.c | 2 +- - extras/volume_id/lib/udf.c | 12 +- - extras/volume_id/lib/ufs.c | 8 +- - extras/volume_id/lib/util.c | 28 ++-- - extras/volume_id/lib/via_raid.c | 2 +- - extras/volume_id/lib/volume_id.c | 6 +- - extras/volume_id/lib/vxfs.c | 2 +- - extras/volume_id/lib/xfs.c | 2 +- - extras/volume_id/vol_id.c | 6 +- - test-udev.c | 8 +- - udev_config.c | 14 +- - udev_db.c | 30 ++-- - udev_device.c | 40 +++--- - udev_node.c | 68 +++++----- - udev_rules.c | 268 +++++++++++++++++----------------- - udev_rules_parse.c | 128 +++++++++--------- - udev_selinux.c | 18 ++-- - udev_sysfs.c | 52 ++++---- - udev_utils.c | 22 ++-- - udev_utils_file.c | 14 +- - udevadm.c | 11 +- - udevcontrol.c | 16 +- - udevd.8 | 4 +- - udevd.c | 147 ++++++++++---------- - udevd.xml | 4 +- - udevinfo.c | 16 +- - udevsettle.c | 16 +- - udevtest.c | 10 +- - udevtrigger.c | 8 +- - 62 files changed, 671 insertions(+), 674 deletions(-) - -diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c -index f94cdc0..6d3c233 100644 ---- a/extras/ata_id/ata_id.c -+++ b/extras/ata_id/ata_id.c -@@ -126,24 +126,24 @@ int main(int argc, char *argv[]) - - node = argv[optind]; - if (node == NULL) { -- err("no node specified"); -+ err("no node specified\n"); - rc = 1; - goto exit; - } - - fd = open(node, O_RDONLY|O_NONBLOCK); - if (fd < 0) { -- err("unable to open '%s'", node); -+ err("unable to open '%s'\n", node); - rc = 1; - goto exit; - } - - if (ioctl(fd, HDIO_GET_IDENTITY, &id)) { - if (errno == ENOTTY) { -- info("HDIO_GET_IDENTITY unsupported for '%s'", node); -+ info("HDIO_GET_IDENTITY unsupported for '%s'\n", node); - rc = 2; - } else { -- err("HDIO_GET_IDENTITY failed for '%s'", node); -+ err("HDIO_GET_IDENTITY failed for '%s'\n", node); - rc = 3; - } - goto close; -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 315d276..b88f5b4 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -71,7 +71,6 @@ void log_message(int priority, const char *format, ...) - if (debug) { - fprintf(stderr, "[%d] ", (int) getpid()); - vfprintf(stderr, format, args); -- fprintf(stderr, "\n"); - } else - vsyslog(priority, format, args); - va_end(args); -@@ -137,10 +136,10 @@ static unsigned long long int cd_media_session_last_offset; - static void info_scsi_cmd_err(const char *cmd, int err) - { - if (err == -1) { -- info("%s failed", cmd); -+ info("%s failed\n", cmd); - return; - } -- info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); -+ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh\n", cmd, SK(err), ASC(err), ASCQ(err)); - } - - struct scsi_cmd { -@@ -199,7 +198,7 @@ static int cd_capability_compat(int fd) - - capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); - if (capabilty < 0) { -- info("CDROM_GET_CAPABILITY failed"); -+ info("CDROM_GET_CAPABILITY failed\n"); - return -1; - } - -@@ -235,11 +234,11 @@ static int cd_inquiry(int fd) { - } - - if ((inq[0] & 0x1F) != 5) { -- info("not an MMC unit"); -+ info("not an MMC unit\n"); - return -1; - } - -- info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); -+ info("INQUIRY: [%.8s][%.16s][%.4s]\n", inq + 8, inq + 16, inq + 32); - return 0; - } - -@@ -264,9 +263,9 @@ static int cd_profiles(int fd) - } - - len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); -- info("GET CONFIGURATION: number of profiles %i", len); -+ info("GET CONFIGURATION: number of profiles %i\n", len); - if (len > sizeof(profiles)) { -- info("invalid number of profiles"); -+ info("invalid number of profiles\n"); - return -1; - } - -@@ -287,7 +286,7 @@ static int cd_profiles(int fd) - unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); - if (profile == 0) - continue; -- info("profile 0x%02x", profile); -+ info("profile 0x%02x\n", profile); - - switch (profile) { - case 0x03: -@@ -343,9 +342,9 @@ static int cd_profiles(int fd) - - /* current media profile */ - cur_profile = header[6] << 8 | header[7]; -- info("current profile 0x%02x", cur_profile); -+ info("current profile 0x%02x\n", cur_profile); - if (cur_profile == 0) { -- info("no current profile, assuming no media"); -+ info("no current profile, assuming no media\n"); - return -1; - } - -@@ -435,7 +434,7 @@ static int cd_media_info(int fd) - return -1; - }; - -- info("disk type %02x", header[8]); -+ info("disk type %02x\n", header[8]); - - if ((header[2] & 3) < 4) - cd_media_state = media_status[header[2] & 3]; -@@ -467,12 +466,12 @@ static int cd_media_toc(int fd) - } - - len = (header[0] << 8 | header[1]) + 2; -- info("READ TOC: len: %d", len); -+ info("READ TOC: len: %d\n", len); - if (len > sizeof(toc)) - return -1; - - /* check if we have a data track */ -- info("ctl %02x (0x04 is data/audio)", header[5]); -+ info("ctl %02x (0x04 is data/audio)\n", header[5]); - cd_media_has_audio = (header[5] & 0x04) == 0; - - scsi_cmd_set(&sc, 0, 0x43); -@@ -490,7 +489,7 @@ static int cd_media_toc(int fd) - unsigned int block; - - block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; -- info("track %u starts at block %u", p[2], block); -+ info("track %u starts at block %u\n", p[2], block); - } - - scsi_cmd_set(&sc, 0, 0x43); -@@ -503,7 +502,7 @@ static int cd_media_toc(int fd) - return -1; - } - len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; -- info("last track %u starts at block %u", header[4+2], len); -+ info("last track %u starts at block %u\n", header[4+2], len); - cd_media_session_last_offset = (unsigned long long int)len * 2048; - return 0; - } -@@ -550,7 +549,7 @@ int main(int argc, char *argv[]) - - node = argv[optind]; - if (!node) { -- err("no device"); -+ err("no device\n"); - fprintf(stderr, "no device\n"); - rc = 1; - goto exit; -@@ -558,11 +557,11 @@ int main(int argc, char *argv[]) - - fd = open(node, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("unable to open '%s'", node); -+ info("unable to open '%s'\n", node); - rc = 1; - goto exit; - } -- info("probing: '%s'", node); -+ info("probing: '%s'\n", node); - - /* same data as original cdrom_id */ - if (cd_capability_compat(fd) < 0) { -diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c -index 4ba89ed..4a17770 100644 ---- a/extras/edd_id/edd_id.c -+++ b/extras/edd_id/edd_id.c -@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) - node = arg; - } - if (node == NULL) { -- err("no node specified"); -+ err("no node specified\n"); - fprintf(stderr, "no node specified\n"); - goto exit; - } -@@ -83,7 +83,7 @@ int main(int argc, char *argv[]) - /* check for kernel support */ - dir = opendir("/sys/firmware/edd"); - if (dir == NULL) { -- info("no kernel EDD support"); -+ info("no kernel EDD support\n"); - fprintf(stderr, "no kernel EDD support\n"); - rc = 2; - goto exit; -@@ -91,7 +91,7 @@ int main(int argc, char *argv[]) - - disk_fd = open(node, O_RDONLY); - if (disk_fd < 0) { -- info("unable to open '%s'", node); -+ info("unable to open '%s'\n", node); - fprintf(stderr, "unable to open '%s'\n", node); - rc = 3; - goto closedir; -@@ -99,38 +99,38 @@ int main(int argc, char *argv[]) - - /* check for valid MBR signature */ - if (lseek(disk_fd, 510, SEEK_SET) < 0) { -- info("seek to MBR validity failed '%s'", node); -+ info("seek to MBR validity failed '%s'\n", node); - rc = 4; - goto close; - } - if (read(disk_fd, &mbr_valid, sizeof(mbr_valid)) != sizeof(mbr_valid)) { -- info("read MBR validity failed '%s'", node); -+ info("read MBR validity failed '%s'\n", node); - rc = 5; - goto close; - } - if (mbr_valid != 0xAA55) { - fprintf(stderr, "no valid MBR signature '%s'\n", node); -- info("no valid MBR signature '%s'", node); -+ info("no valid MBR signature '%s'\n", node); - rc=6; - goto close; - } - - /* read EDD signature */ - if (lseek(disk_fd, 440, SEEK_SET) < 0) { -- info("seek to signature failed '%s'", node); -+ info("seek to signature failed '%s'\n", node); - rc = 7; - goto close; - } - if (read(disk_fd, &disk_id, sizeof(disk_id)) != sizeof(disk_id)) { -- info("read signature failed '%s'", node); -+ info("read signature failed '%s'\n", node); - rc = 8; - goto close; - } - /* all zero is invalid */ -- info("read id 0x%08x from '%s'", disk_id, node); -+ info("read id 0x%08x from '%s'\n", disk_id, node); - if (disk_id == 0) { - fprintf(stderr, "no EDD signature '%s'\n", node); -- info("'%s' signature is zero", node); -+ info("'%s' signature is zero\n", node); - rc = 9; - goto close; - } -@@ -150,18 +150,18 @@ int main(int argc, char *argv[]) - - sysfs_fd = open(file, O_RDONLY); - if (sysfs_fd < 0) { -- info("unable to open sysfs '%s'", file); -+ info("unable to open sysfs '%s'\n", file); - continue; - } - - size = read(sysfs_fd, sysfs_id_buf, sizeof(sysfs_id_buf)-1); - close(sysfs_fd); - if (size <= 0) { -- info("read sysfs '%s' failed", file); -+ info("read sysfs '%s' failed\n", file); - continue; - } - sysfs_id_buf[size] = '\0'; -- info("read '%s' from '%s'", sysfs_id_buf, file); -+ info("read '%s' from '%s'\n", sysfs_id_buf, file); - sysfs_id = strtoul(sysfs_id_buf, NULL, 16); - - /* look for matching value, that appears only once */ -@@ -171,7 +171,7 @@ int main(int argc, char *argv[]) - strlcpy(match, dent->d_name, sizeof(match)); - } else { - /* error, same signature for another device */ -- info("'%s' does not have a unique signature", node); -+ info("'%s' does not have a unique signature\n", node); - fprintf(stderr, "'%s' does not have a unique signature\n", node); - rc = 10; - goto exit; -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index d8b269a..463b377 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -174,25 +174,25 @@ static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) - unsigned int maj, min; - const char *attr; - -- dbg("%s", devpath); -+ dbg("%s\n", devpath); - attr = sysfs_attr_get_value(devpath, "dev"); - if (attr == NULL) { -- dbg("%s: could not get dev attribute: %s", devpath, strerror(errno)); -+ dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); - return -1; - } - -- dbg("dev value %s", attr); -+ dbg("dev value %s\n", attr); - if (sscanf(attr, "%u:%u", &maj, &min) != 2) { -- err("%s: invalid dev major/minor", devpath); -+ err("%s: invalid dev major/minor\n", devpath); - return -1; - } - - snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", - TMP_DIR, TMP_PREFIX, maj, min, getpid()); - -- dbg("tmpdev '%s'", tmpdev); -+ dbg("tmpdev '%s'\n", tmpdev); - if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { -- err("mknod failed: %s", strerror(errno)); -+ err("mknod failed: %s\n", strerror(errno)); - return -1; - } - return 0; -@@ -273,7 +273,7 @@ static int get_file_options(const char *vendor, const char *model, - if (errno == ENOENT) { - return 1; - } else { -- err("can't open %s: %s", config_file, strerror(errno)); -+ err("can't open %s: %s\n", config_file, strerror(errno)); - return -1; - } - } -@@ -285,7 +285,7 @@ static int get_file_options(const char *vendor, const char *model, - */ - buffer = malloc(MAX_BUFFER_LEN); - if (!buffer) { -- err("Can't allocate memory."); -+ err("can't allocate memory\n"); - return -1; - } - -@@ -299,7 +299,7 @@ static int get_file_options(const char *vendor, const char *model, - break; - lineno++; - if (buf[strlen(buffer) - 1] != '\n') { -- info("Config file line %d too long.\n", lineno); -+ info("Config file line %d too long\n", lineno); - break; - } - -@@ -344,14 +344,14 @@ static int get_file_options(const char *vendor, const char *model, - } - options_in = str1; - } -- dbg("config file line %d:" -+ dbg("config file line %d:\n" - " vendor '%s'; model '%s'; options '%s'\n", - lineno, vendor_in, model_in, options_in); - /* - * Only allow: [vendor=foo[,model=bar]]options=stuff - */ - if (!options_in || (!vendor_in && model_in)) { -- info("Error parsing config file line %d '%s'", lineno, buffer); -+ info("Error parsing config file line %d '%s'\n", lineno, buffer); - retval = -1; - break; - } -@@ -389,7 +389,7 @@ static int get_file_options(const char *vendor, const char *model, - c = argc_count(buffer) + 2; - *newargv = calloc(c, sizeof(**newargv)); - if (!*newargv) { -- err("Can't allocate memory."); -+ err("can't allocate memory\n"); - retval = -1; - } else { - *argc = c; -@@ -492,7 +492,7 @@ static int set_options(int argc, char **argv, const char *short_opts, - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - default_page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'", optarg); -+ info("Unknown page code '%s'\n", optarg); - return -1; - } - break; -@@ -571,13 +571,13 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - *page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'", optarg); -+ info("Unknown page code '%s'\n", optarg); - retval = -1; - } - break; - - default: -- info("Unknown or bad option '%c' (0x%x)", option, option); -+ info("Unknown or bad option '%c' (0x%x)\n", option, option); - retval = -1; - break; - } -@@ -596,7 +596,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) - - vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!vendor) { -- info("%s: cannot get vendor attribute", dev_scsi->devpath); -+ info("%s: cannot get vendor attribute\n", dev_scsi->devpath); - return -1; - } - set_str(vendor_str, vendor, sizeof(vendor_str)-1); -@@ -610,7 +610,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) - - type = sysfs_attr_get_value(dev_scsi->devpath, "type"); - if (!type) { -- info("%s: cannot get type attribute", dev_scsi->devpath); -+ info("%s: cannot get type attribute\n", dev_scsi->devpath); - return -1; - } - set_type(type_str, type, sizeof(type_str)); -@@ -690,7 +690,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - - dev = sysfs_device_get(devpath); - if (dev == NULL) { -- err("unable to access '%s'", devpath); -+ err("unable to access '%s'\n", devpath); - return 1; - } - -@@ -709,7 +709,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - /* get scsi parent device */ - dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); - if (dev_scsi == NULL) { -- err("unable to access parent device of '%s'", devpath); -+ err("unable to access parent device of '%s'\n", devpath); - return 1; - } - set_sysfs_values(dev_scsi); -@@ -721,7 +721,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - - /* get per device (vendor + model) options from the config file */ - retval = per_dev_options(dev_scsi, &good_dev, &page_code); -- dbg("per dev options: good %d; page code 0x%x", good_dev, page_code); -+ dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); - - if (!good_dev) { - retval = 1; -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index c84f41e..28e82db 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -179,7 +179,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - - sb_len = io->sb_len_wr; - if (sb_len < 1) { -- info("%s: sense buffer empty", dev_scsi->kernel); -+ info("%s: sense buffer empty\n", dev_scsi->kernel); - return -1; - } - -@@ -193,7 +193,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - */ - s = sense_buffer[7] + 8; - if (sb_len < s) { -- info("%s: sense buffer too small %d bytes, %d bytes too short", -+ info("%s: sense buffer too small %d bytes, %d bytes too short\n", - dev_scsi->kernel, sb_len, s - sb_len); - return -1; - } -@@ -204,7 +204,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - /* - * Possible? - */ -- info("%s: sense result too" " small %d bytes", -+ info("%s: sense result too" " small %d bytes\n", - dev_scsi->kernel, s); - return -1; - } -@@ -216,25 +216,25 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - asc = sense_buffer[2]; - ascq = sense_buffer[3]; - } else { -- info("%s: invalid sense code 0x%x", -+ info("%s: invalid sense code 0x%x\n", - dev_scsi->kernel, code); - return -1; - } -- info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x", -+ info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x\n", - dev_scsi->kernel, sense_key, asc, ascq); - } else { - if (sb_len < 4) { -- info("%s: sense buffer too small %d bytes, %d bytes too short", -+ info("%s: sense buffer too small %d bytes, %d bytes too short\n", - dev_scsi->kernel, sb_len, 4 - sb_len); - return -1; - } - - if (sense_buffer[0] < 15) -- info("%s: old sense key: 0x%x", dev_scsi->kernel, sense_buffer[0] & 0x0f); -+ info("%s: old sense key: 0x%x\n", dev_scsi->kernel, sense_buffer[0] & 0x0f); - else -- info("%s: sense = %2x %2x", -+ info("%s: sense = %2x %2x\n", - dev_scsi->kernel, sense_buffer[0], sense_buffer[2]); -- info("%s: non-extended sense class %d code 0x%0x", -+ info("%s: non-extended sense class %d code 0x%0x\n", - dev_scsi->kernel, sense_class, code); - - } -@@ -247,8 +247,8 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - out_buffer[j++] = ' '; - } - out_buffer[j] = '\0'; -- info("%s: sense dump:", dev_scsi->kernel); -- info("%s: %s", dev_scsi->kernel, out_buffer); -+ info("%s: sense dump:\n", dev_scsi->kernel); -+ info("%s: %s\n", dev_scsi->kernel, out_buffer); - - #endif - return -1; -@@ -261,11 +261,11 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - /* - * Impossible, should not be called. - */ -- info("%s: called with no error", __FUNCTION__); -+ info("%s: called with no error\n", __FUNCTION__); - return -1; - } - -- info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x", -+ info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", - dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); - if (io->status == SCSI_CHECK_CONDITION) - return scsi_dump_sense(dev_scsi, io); -@@ -285,7 +285,7 @@ static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, - int retry = 3; /* rather random */ - - if (buflen > SCSI_INQ_BUFF_LEN) { -- info("buflen %d too long", buflen); -+ info("buflen %d too long\n", buflen); - return -1; - } - -@@ -304,7 +304,7 @@ resend: - io_hdr.timeout = DEF_TIMEOUT; - - if (ioctl(fd, SG_IO, &io_hdr) < 0) { -- info("%s: ioctl failed: %s", dev_scsi->kernel, strerror(errno)); -+ info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); - retval = -1; - goto error; - } -@@ -336,7 +336,7 @@ resend: - - error: - if (retval < 0) -- info("%s: Unable to get INQUIRY vpd %d page 0x%x.", -+ info("%s: Unable to get INQUIRY vpd %d page 0x%x.\n", - dev_scsi->kernel, evpd, page); - - return retval; -@@ -355,11 +355,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - return 1; - - if (buffer[1] != 0) { -- info("%s: page 0 not available.", dev_scsi->kernel); -+ info("%s: page 0 not available.\n", dev_scsi->kernel); - return 1; - } - if (buffer[3] > len) { -- info("%s: page 0 buffer too long %d", dev_scsi->kernel, buffer[3]); -+ info("%s: page 0 buffer too long %d\n", dev_scsi->kernel, buffer[3]); - return 1; - } - -@@ -377,11 +377,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - */ - vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!vendor) { -- info("%s: cannot get model attribute", dev_scsi->kernel); -+ info("%s: cannot get model attribute\n", dev_scsi->kernel); - return 1; - } - if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { -- info("%s: invalid page0 data", dev_scsi->kernel); -+ info("%s: invalid page0 data\n", dev_scsi->kernel); - return 1; - } - } -@@ -399,7 +399,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - - attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!attr) { -- info("%s: cannot get vendor attribute", dev_scsi->kernel); -+ info("%s: cannot get vendor attribute\n", dev_scsi->kernel); - return 1; - } - strncpy(serial, attr, VENDOR_LENGTH); -@@ -407,7 +407,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - - attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); - if (!attr) { -- info("%s: cannot get model attribute", dev_scsi->kernel); -+ info("%s: cannot get model attribute\n", dev_scsi->kernel); - return 1; - } - strncat(serial, attr, MODEL_LENGTH); -@@ -419,7 +419,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - * above, ind will never be too large. - */ - if (ind != (VENDOR_LENGTH + MODEL_LENGTH)) { -- info("%s: expected length %d, got length %d", -+ info("%s: expected length %d, got length %d\n", - dev_scsi->kernel, (VENDOR_LENGTH + MODEL_LENGTH), ind); - return 1; - } -@@ -477,7 +477,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, - len += VENDOR_LENGTH + MODEL_LENGTH; - - if (max_len < len) { -- info("%s: length %d too short - need %d", -+ info("%s: length %d too short - need %d\n", - dev_scsi->kernel, max_len, len); - return 1; - } -@@ -528,7 +528,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, - { - int i, j; - -- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); -+ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); - serial[0] = hex_str[id_search->id_type]; - /* serial has been memset to zero before */ - j = strlen(serial); /* j = 1; */ -@@ -557,7 +557,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, - return 1; - - if (page_83[1] != PAGE_83) { -- info("%s: Invalid page 0x83", dev_scsi->kernel); -+ info("%s: Invalid page 0x83\n", dev_scsi->kernel); - return 1; - } - -@@ -613,13 +613,13 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, - id_search_list[id_ind].naa_type, - id_search_list[id_ind].code_set); - if (!retval) { -- dbg(" used\n"); -+ dbg(" used\n"); - return retval; - } else if (retval < 0) { -- dbg(" failed\n"); -+ dbg(" failed\n"); - return retval; - } else { -- dbg(" not used\n"); -+ dbg(" not used\n"); - } - } - } -@@ -646,7 +646,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, - return 1; - - if (page_83[1] != PAGE_83) { -- info("%s: Invalid page 0x83", dev_scsi->kernel); -+ info("%s: Invalid page 0x83\n", dev_scsi->kernel); - return 1; - } - /* -@@ -690,7 +690,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, - serial[j++] = hex_str[page_83[i] & 0x0f]; - i++; - } -- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); -+ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); - return 0; - } - -@@ -710,13 +710,13 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, - return retval; - - if (buf[1] != PAGE_80) { -- info("%s: Invalid page 0x80", dev_scsi->kernel); -+ info("%s: Invalid page 0x80\n", dev_scsi->kernel); - return 1; - } - - len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3]; - if (max_len < len) { -- info("%s: length %d too short - need %d", -+ info("%s: length %d too short - need %d\n", - dev_scsi->kernel, max_len, len); - return 1; - } -@@ -746,7 +746,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("%s: cannot open %s: %s", -+ info("%s: cannot open %s: %s\n", - dev_scsi->kernel, devname, strerror(errno)); - return 1; - } -@@ -762,7 +762,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, - sprintf(type,"%x", buf[0] & 0x1f); - - if (close(fd) < 0) -- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); -+ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); - - return 0; - } -@@ -779,7 +779,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("%s: cannot open %s: %s", -+ info("%s: cannot open %s: %s\n", - dev_scsi->kernel, devname, strerror(errno)); - return 1; - } -@@ -826,7 +826,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - goto completed; - } - } else if (page_code != 0x00) { -- info("%s: unsupported page code 0x%d", dev_scsi->kernel, page_code); -+ info("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code); - return 1; - } - -@@ -870,6 +870,6 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - retval = 1; - completed: - if (close(fd) < 0) -- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); -+ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); - return retval; - } -diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c -index 5fb030d..fed6631 100644 ---- a/extras/usb_id/usb_id.c -+++ b/extras/usb_id/usb_id.c -@@ -231,20 +231,20 @@ static int usb_id(const char *devpath) - /* get all usb specific information: dev_interface, if_class, dev_usb */ - dev = sysfs_device_get(devpath); - if (dev == NULL) { -- err("unable to access '%s'", devpath); -+ err("unable to access '%s'\n", devpath); - return 1; - } - - /* usb interface directory */ - dev_interface = sysfs_device_get_parent_with_subsystem(dev, "usb"); - if (dev_interface == NULL) { -- info("unable to access usb_interface device of '%s'", devpath); -+ info("unable to access usb_interface device of '%s'\n", devpath); - return 1; - } - - if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass"); - if (!if_class) { -- info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel); -+ info("%s: cannot get bInterfaceClass attribute\n", dev_interface->kernel); - return 1; - } - if_class_num = strtoul(if_class, NULL, 16); -@@ -260,7 +260,7 @@ static int usb_id(const char *devpath) - /* usb device directory */ - dev_usb = sysfs_device_get_parent_with_subsystem(dev_interface, "usb"); - if (!dev_usb) { -- info("unable to find parent 'usb' device of '%s'", devpath); -+ info("unable to find parent 'usb' device of '%s'\n", devpath); - return 1; - } - -@@ -273,39 +273,39 @@ static int usb_id(const char *devpath) - /* get scsi device */ - dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); - if (dev_scsi == NULL) { -- info("unable to find parent 'scsi' device of '%s'", devpath); -+ info("unable to find parent 'scsi' device of '%s'\n", devpath); - goto fallback; - } - if (sscanf(dev_scsi->kernel, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) { -- info("invalid scsi device '%s'", dev_scsi->kernel); -+ info("invalid scsi device '%s'\n", dev_scsi->kernel); - goto fallback; - } - - /* Generic SPC-2 device */ - scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!scsi_vendor) { -- info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI vendor attribute\n", dev_scsi->kernel); - goto fallback; - } - set_str(vendor_str, scsi_vendor, sizeof(vendor_str)-1); - - scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model"); - if (!scsi_model) { -- info("%s: cannot get SCSI model attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI model attribute\n", dev_scsi->kernel); - goto fallback; - } - set_str(model_str, scsi_model, sizeof(model_str)-1); - - scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type"); - if (!scsi_type) { -- info("%s: cannot get SCSI type attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI type attribute\n", dev_scsi->kernel); - goto fallback; - } - set_scsi_type(type_str, scsi_type, sizeof(type_str)-1); - - scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev"); - if (!scsi_rev) { -- info("%s: cannot get SCSI revision attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI revision attribute\n", dev_scsi->kernel); - goto fallback; - } - set_str(revision_str, scsi_rev, sizeof(revision_str)-1); -@@ -329,7 +329,7 @@ fallback: - usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "idVendor"); - - if (!usb_vendor) { -- info("No USB vendor information available"); -+ info("No USB vendor information available\n"); - return 1; - } - set_str(vendor_str, usb_vendor, sizeof(vendor_str)-1); -@@ -345,7 +345,7 @@ fallback: - usb_model = sysfs_attr_get_value(dev_usb->devpath, "idProduct"); - - if (!usb_model) { -- dbg("No USB model information available"); -+ dbg("No USB model information available\n"); - return 1; - } - set_str(model_str, usb_model, sizeof(model_str)-1); -diff --git a/extras/volume_id/lib/adaptec_raid.c b/extras/volume_id/lib/adaptec_raid.c -index 858c3ba..5ab9451 100644 ---- a/extras/volume_id/lib/adaptec_raid.c -+++ b/extras/volume_id/lib/adaptec_raid.c -@@ -86,7 +86,7 @@ int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t si - uint64_t meta_off; - struct adaptec_meta *ad; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/cramfs.c b/extras/volume_id/lib/cramfs.c -index bf32950..9c7eaf6 100644 ---- a/extras/volume_id/lib/cramfs.c -+++ b/extras/volume_id/lib/cramfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct cramfs_super *cs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200); - if (cs == NULL) -diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c -index 560e6bd..60837a4 100644 ---- a/extras/volume_id/lib/ddf_raid.c -+++ b/extras/volume_id/lib/ddf_raid.c -@@ -45,7 +45,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) - uint64_t ddf_off = ((size / 0x200)-1) * 0x200; - const uint8_t *buf; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - if (size < 0x10000) - return -1; -diff --git a/extras/volume_id/lib/ext.c b/extras/volume_id/lib/ext.c -index ac21f12..56edd25 100644 ---- a/extras/volume_id/lib/ext.c -+++ b/extras/volume_id/lib/ext.c -@@ -132,7 +132,7 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) - uint32_t feature_incompat; - uint32_t flags; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200); - if (es == NULL) -@@ -142,9 +142,9 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - - bsize = 0x400 << le32_to_cpu(es->s_log_block_size); -- dbg("ext blocksize 0x%zx", bsize); -+ dbg("ext blocksize 0x%zx\n", bsize); - if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) { -- dbg("invalid ext blocksize"); -+ dbg("invalid ext blocksize\n"); - return -1; - } - -diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c -index 3ddf025..58f8f82 100644 ---- a/extras/volume_id/lib/fat.c -+++ b/extras/volume_id/lib/fat.c -@@ -217,7 +217,7 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, - for (i = 0; i < count; i++) { - /* end marker */ - if (dir[i].name[0] == 0x00) { -- dbg("end of dir"); -+ dbg("end of dir\n"); - break; - } - -@@ -234,11 +234,11 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, - if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0) - continue; - -- dbg("found ATTR_VOLUME_ID id in root dir"); -+ dbg("found ATTR_VOLUME_ID id in root dir\n"); - return fat_read_filename(filename, fnsize, dir, &dir[i]); - } - -- dbg("skip dir entry"); -+ dbg("skip dir entry\n"); - } - - return 0; -@@ -270,7 +270,7 @@ int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size) - int maxloop; - size_t fnlen; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off, 0x400); - if (buf == NULL) -@@ -328,22 +328,22 @@ magic: - if (sector_size == 0 || ((sector_size & (sector_size-1)) != 0)) - return -1; - -- dbg("sector_size 0x%x", sector_size); -- dbg("sectors_per_cluster 0x%x", vs->sectors_per_cluster); -+ dbg("sector_size 0x%x\n", sector_size); -+ dbg("sectors_per_cluster 0x%x\n", vs->sectors_per_cluster); - - dir_entries = le16_to_cpu(vs->dir_entries); - reserved = le16_to_cpu(vs->reserved); -- dbg("reserved 0x%x", reserved); -+ dbg("reserved 0x%x\n", reserved); - - sect_count = le16_to_cpu(vs->sectors); - if (sect_count == 0) - sect_count = le32_to_cpu(vs->total_sect); -- dbg("sect_count 0x%x", sect_count); -+ dbg("sect_count 0x%x\n", sect_count); - - fat_length = le16_to_cpu(vs->fat_length); -- dbg("fat_length 0x%x", fat_length); -+ dbg("fat_length 0x%x\n", fat_length); - fat32_length = le32_to_cpu(vs->type.fat32.fat32_length); -- dbg("fat32_length 0x%x", fat32_length); -+ dbg("fat32_length 0x%x\n", fat32_length); - - if (fat_length) - fat_size = fat_length * vs->fats; -@@ -351,15 +351,15 @@ magic: - fat_size = fat32_length * vs->fats; - else - return -1; -- dbg("fat_size 0x%x", fat_size); -+ dbg("fat_size 0x%x\n", fat_size); - - dir_size = ((dir_entries * sizeof(struct vfat_dir_entry)) + - (sector_size-1)) / sector_size; -- dbg("dir_size 0x%x", dir_size); -+ dbg("dir_size 0x%x\n", dir_size); - - cluster_count = sect_count - (reserved + fat_size + dir_size); - cluster_count /= vs->sectors_per_cluster; -- dbg("cluster_count 0x%x", cluster_count); -+ dbg("cluster_count 0x%x\n", cluster_count); - - /* must be FAT32 */ - if (!fat_length && fat32_length) -@@ -375,9 +375,9 @@ magic: - - /* the label may be an attribute in the root directory */ - root_start = (reserved + fat_size) * sector_size; -- dbg("root dir start 0x%llx", (unsigned long long) root_start); -+ dbg("root dir start 0x%llx\n", (unsigned long long) root_start); - root_dir_entries = le16_to_cpu(vs->dir_entries); -- dbg("expected entries 0x%x", root_dir_entries); -+ dbg("expected entries 0x%x\n", root_dir_entries); - - buf_size = root_dir_entries * sizeof(struct vfat_dir_entry); - buf = volume_id_get_buffer(id, off + root_start, buf_size); -@@ -423,7 +423,7 @@ fat32: - /* FAT32 root dir is a cluster chain like any other directory */ - buf_size = vs->sectors_per_cluster * sector_size; - root_cluster = le32_to_cpu(vs->type.fat32.root_cluster); -- dbg("root dir cluster %u", root_cluster); -+ dbg("root dir cluster %u\n", root_cluster); - start_data_sect = reserved + fat_size; - - next = root_cluster; -@@ -434,10 +434,10 @@ fat32: - uint64_t fat_entry_off; - int count; - -- dbg("next cluster %u", next); -+ dbg("next cluster %u\n", next); - next_sect_off = (next - 2) * vs->sectors_per_cluster; - next_off = (start_data_sect + next_sect_off) * sector_size; -- dbg("cluster offset 0x%llx", (unsigned long long) next_off); -+ dbg("cluster offset 0x%llx\n", (unsigned long long) next_off); - - /* get cluster */ - buf = volume_id_get_buffer(id, off + next_off, buf_size); -@@ -446,7 +446,7 @@ fat32: - - dir = (struct vfat_dir_entry*) buf; - count = buf_size / sizeof(struct vfat_dir_entry); -- dbg("expected entries 0x%x", count); -+ dbg("expected entries 0x%x\n", count); - - fnlen = get_fat_attr_volume_id(filename, sizeof(filename), dir, count); - if (fnlen > 0) -@@ -464,7 +464,7 @@ fat32: - break; - } - if (maxloop == 0) -- dbg("reached maximum follow count of root cluster chain, give up"); -+ dbg("reached maximum follow count of root cluster chain, give up\n"); - - vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200); - if (vs == NULL) -diff --git a/extras/volume_id/lib/gfs.c b/extras/volume_id/lib/gfs.c -index 1d3a4a0..5338222 100644 ---- a/extras/volume_id/lib/gfs.c -+++ b/extras/volume_id/lib/gfs.c -@@ -78,7 +78,7 @@ static int volume_id_probe_gfs_generic(struct volume_id *id, uint64_t off, int v - { - struct gfs2_sb *sbd; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - sbd = (struct gfs2_sb *) - volume_id_get_buffer(id, off + GFS_SUPERBLOCK_OFFSET, sizeof(struct gfs2_sb)); -diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c -index 70a6b4a..b6d7e02 100644 ---- a/extras/volume_id/lib/hfs.c -+++ b/extras/volume_id/lib/hfs.c -@@ -186,7 +186,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz - struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; - const uint8_t *buf; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -@@ -199,17 +199,17 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz - /* it may be just a hfs wrapper for hfs+ */ - if (memcmp(hfs->embed_sig, "H+", 2) == 0) { - alloc_block_size = be32_to_cpu(hfs->al_blk_size); -- dbg("alloc_block_size 0x%x", alloc_block_size); -+ dbg("alloc_block_size 0x%x\n", alloc_block_size); - - alloc_first_block = be16_to_cpu(hfs->al_bl_st); -- dbg("alloc_first_block 0x%x", alloc_first_block); -+ dbg("alloc_first_block 0x%x\n", alloc_first_block); - - embed_first_block = be16_to_cpu(hfs->embed_startblock); -- dbg("embed_first_block 0x%x", embed_first_block); -+ dbg("embed_first_block 0x%x\n", embed_first_block); - - off += (alloc_first_block * 512) + - (embed_first_block * alloc_block_size); -- dbg("hfs wrapped hfs+ found at offset 0x%llx", (unsigned long long) off); -+ dbg("hfs wrapped hfs+ found at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -@@ -241,11 +241,11 @@ hfsplus: - hfsid_set_uuid(id, hfsplus->finder_info.id); - - blocksize = be32_to_cpu(hfsplus->blocksize); -- dbg("blocksize %u", blocksize); -+ dbg("blocksize %u\n", blocksize); - - memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); - cat_block = be32_to_cpu(extents[0].start_block); -- dbg("catalog start block 0x%x", cat_block); -+ dbg("catalog start block 0x%x\n", cat_block); - - buf = volume_id_get_buffer(id, off + (cat_block * blocksize), 0x2000); - if (buf == NULL) -@@ -255,13 +255,13 @@ hfsplus: - &buf[sizeof(struct hfsplus_bnode_descriptor)]; - - leaf_node_head = be32_to_cpu(bnode->leaf_head); -- dbg("catalog leaf node 0x%x", leaf_node_head); -+ dbg("catalog leaf node 0x%x\n", leaf_node_head); - - leaf_node_size = be16_to_cpu(bnode->node_size); -- dbg("leaf node size 0x%x", leaf_node_size); -+ dbg("leaf node size 0x%x\n", leaf_node_size); - - leaf_node_count = be32_to_cpu(bnode->leaf_count); -- dbg("leaf node count 0x%x", leaf_node_count); -+ dbg("leaf node count 0x%x\n", leaf_node_count); - if (leaf_node_count == 0) - goto found; - -@@ -271,7 +271,7 @@ hfsplus: - for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) { - ext_block_start = be32_to_cpu(extents[ext].start_block); - ext_block_count = be32_to_cpu(extents[ext].block_count); -- dbg("extent start block 0x%x, count 0x%x", ext_block_start, ext_block_count); -+ dbg("extent start block 0x%x, count 0x%x\n", ext_block_start, ext_block_count); - - if (ext_block_count == 0) - goto found; -@@ -284,7 +284,7 @@ hfsplus: - } - if (ext == HFSPLUS_EXTENT_COUNT) - goto found; -- dbg("found block in extent %i", ext); -+ dbg("found block in extent %i\n", ext); - - leaf_off = (ext_block_start + leaf_block) * blocksize; - -@@ -293,10 +293,10 @@ hfsplus: - goto found; - - descr = (struct hfsplus_bnode_descriptor *) buf; -- dbg("descriptor type 0x%x", descr->type); -+ dbg("descriptor type 0x%x\n", descr->type); - - record_count = be16_to_cpu(descr->num_recs); -- dbg("number of records %u", record_count); -+ dbg("number of records %u\n", record_count); - if (record_count == 0) - goto found; - -@@ -306,12 +306,12 @@ hfsplus: - key = (struct hfsplus_catalog_key *) - &buf[sizeof(struct hfsplus_bnode_descriptor)]; - -- dbg("parent id 0x%x", be32_to_cpu(key->parent_id)); -+ dbg("parent id 0x%x\n", be32_to_cpu(key->parent_id)); - if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID) - goto found; - - label_len = be16_to_cpu(key->unicode_len) * 2; -- dbg("label unicode16 len %i", label_len); -+ dbg("label unicode16 len %i\n", label_len); - volume_id_set_label_raw(id, key->unicode, label_len); - volume_id_set_label_unicode16(id, key->unicode, BE, label_len); - -diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c -index f2c4069..0629015 100644 ---- a/extras/volume_id/lib/highpoint.c -+++ b/extras/volume_id/lib/highpoint.c -@@ -49,7 +49,7 @@ int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint6 - struct hpt37x_meta *hpt; - uint32_t magic; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200); - if (buf == NULL) -@@ -73,7 +73,7 @@ int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint6 - uint64_t meta_off; - uint32_t magic; - -- dbg("probing at offset 0x%llx, size 0x%llx", -+ dbg("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/hpfs.c b/extras/volume_id/lib/hpfs.c -index edcf066..ac5a354 100644 ---- a/extras/volume_id/lib/hpfs.c -+++ b/extras/volume_id/lib/hpfs.c -@@ -38,7 +38,7 @@ int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct hpfs_super *hs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200); - if (hs == NULL) -diff --git a/extras/volume_id/lib/iso9660.c b/extras/volume_id/lib/iso9660.c -index 1d8bdff..0e2c686 100644 ---- a/extras/volume_id/lib/iso9660.c -+++ b/extras/volume_id/lib/iso9660.c -@@ -59,7 +59,7 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) - struct iso_volume_descriptor *is; - struct high_sierra_volume_descriptor *hs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -@@ -71,11 +71,11 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) - int vd_offset; - int i; - -- dbg("read label from PVD"); -+ dbg("read label from PVD\n"); - volume_id_set_label_raw(id, is->volume_id, 32); - volume_id_set_label_string(id, is->volume_id, 32); - -- dbg("looking for SVDs"); -+ dbg("looking for SVDs\n"); - vd_offset = ISO_VD_OFFSET; - for (i = 0; i < ISO_VD_MAX; i++) { - uint8_t svd_label[64]; -@@ -86,14 +86,14 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) - if (is->type != ISO_VD_SUPPLEMENTARY) - continue; - -- dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset)); -+ dbg("found SVD at offset 0x%llx\n", (unsigned long long) (off + vd_offset)); - if (memcmp(is->escape_sequences, "%/@", 3) == 0|| - memcmp(is->escape_sequences, "%/C", 3) == 0|| - memcmp(is->escape_sequences, "%/E", 3) == 0) { -- dbg("Joliet extension found"); -+ dbg("Joliet extension found\n"); - volume_id_set_unicode16(svd_label, sizeof(svd_label), is->volume_id, BE, 32); - if (memcmp(id->label, svd_label, 16) == 0) { -- dbg("SVD label is identical, use the possibly longer PVD one"); -+ dbg("SVD label is identical, use the possibly longer PVD one\n"); - break; - } - -diff --git a/extras/volume_id/lib/isw_raid.c b/extras/volume_id/lib/isw_raid.c -index f5761e8..337a9ce 100644 ---- a/extras/volume_id/lib/isw_raid.c -+++ b/extras/volume_id/lib/isw_raid.c -@@ -43,7 +43,7 @@ int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint - uint64_t meta_off; - struct isw_meta *isw; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/jfs.c b/extras/volume_id/lib/jfs.c -index 00b66cc..950ba43 100644 ---- a/extras/volume_id/lib/jfs.c -+++ b/extras/volume_id/lib/jfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct jfs_super_block *js; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200); - if (js == NULL) -diff --git a/extras/volume_id/lib/jmicron_raid.c b/extras/volume_id/lib/jmicron_raid.c -index 5182a3e..6cb1f6f 100644 ---- a/extras/volume_id/lib/jmicron_raid.c -+++ b/extras/volume_id/lib/jmicron_raid.c -@@ -39,7 +39,7 @@ int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t si - uint64_t meta_off; - struct jmicron_meta *jm; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 5e0c4a4..96ae7c3 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -66,7 +66,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 - uint8_t bytes[16]; - } uuid; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - if (size < 0x10000) - return -1; -@@ -120,7 +120,7 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6 - { - const uint8_t *buf; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - buf = volume_id_get_buffer(id, off, 0x800); -diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c -index 50d43cc..9ff16e2 100644 ---- a/extras/volume_id/lib/linux_swap.c -+++ b/extras/volume_id/lib/linux_swap.c -@@ -43,7 +43,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size - unsigned int page; - struct swap_header_v1_2 *sw; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - /* eek, the swap signature is at the end of the PAGE_SIZE */ - for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) { -diff --git a/extras/volume_id/lib/lsi_raid.c b/extras/volume_id/lib/lsi_raid.c -index 56fd567..eef8714 100644 ---- a/extras/volume_id/lib/lsi_raid.c -+++ b/extras/volume_id/lib/lsi_raid.c -@@ -38,7 +38,7 @@ int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t s - uint64_t meta_off; - struct lsi_meta *lsi; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/lvm.c b/extras/volume_id/lib/lvm.c -index 7c4f811..d234113 100644 ---- a/extras/volume_id/lib/lvm.c -+++ b/extras/volume_id/lib/lvm.c -@@ -51,7 +51,7 @@ int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size) - const uint8_t *buf; - struct lvm1_super_block *lvm; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800); - if (buf == NULL) -@@ -78,7 +78,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) - struct lvm2_super_block *lvm; - struct lvm2_pv_header *pvhdr; - -- dbg("probing at offset 0x%llx", (unsigned long long) off); -+ dbg("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200); - if (buf == NULL) -@@ -95,7 +95,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - - found: -- dbg("found at offset 0x%x (pv hdr offset 0x%x)", -+ dbg("found at offset 0x%x (pv hdr offset 0x%x)\n", - soff, cpu_to_le32(lvm->offset_xl)); - soff += cpu_to_le32(lvm->offset_xl); - pvhdr = (struct lvm2_pv_header *) &buf[soff]; -diff --git a/extras/volume_id/lib/minix.c b/extras/volume_id/lib/minix.c -index 6494506..88b4c18 100644 ---- a/extras/volume_id/lib/minix.c -+++ b/extras/volume_id/lib/minix.c -@@ -70,7 +70,7 @@ int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size) - struct minix_super_block *ms; - struct minix3_super_block *m3s; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -diff --git a/extras/volume_id/lib/netware.c b/extras/volume_id/lib/netware.c -index 4d157aa..c034557 100644 ---- a/extras/volume_id/lib/netware.c -+++ b/extras/volume_id/lib/netware.c -@@ -82,7 +82,7 @@ int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size) - { - struct netware_super_block *nw; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - nw = (struct netware_super_block *) volume_id_get_buffer(id, off + NW_SUPERBLOCK_OFFSET, 0x200); - if (nw == NULL) -diff --git a/extras/volume_id/lib/ntfs.c b/extras/volume_id/lib/ntfs.c -index f63804d..1e73bc8 100644 ---- a/extras/volume_id/lib/ntfs.c -+++ b/extras/volume_id/lib/ntfs.c -@@ -105,7 +105,7 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - const uint8_t *buf; - const uint8_t *val; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200); - if (ns == NULL) -@@ -130,12 +130,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - else - mft_record_size = ns->cluster_per_mft_record * cluster_size; - -- dbg("sectorsize 0x%x", sector_size); -- dbg("clustersize 0x%x", cluster_size); -- dbg("mftcluster %llu", (unsigned long long) mft_cluster); -- dbg("mftoffset 0x%llx", (unsigned long long) mft_off); -- dbg("cluster per mft_record %i", ns->cluster_per_mft_record); -- dbg("mft record size %i", mft_record_size); -+ dbg("sectorsize 0x%x\n", sector_size); -+ dbg("clustersize 0x%x\n", cluster_size); -+ dbg("mftcluster %llu\n", (unsigned long long) mft_cluster); -+ dbg("mftoffset 0x%llx\n", (unsigned long long) mft_off); -+ dbg("cluster per mft_record %i\n", ns->cluster_per_mft_record); -+ dbg("mft record size %i\n", mft_record_size); - - buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size), - mft_record_size); -@@ -143,12 +143,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - - mftr = (struct master_file_table_record*) buf; -- dbg("mftr->magic '%c%c%c%c'", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); -+ dbg("mftr->magic '%c%c%c%c'\n", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); - if (memcmp(mftr->magic, "FILE", 4) != 0) - return -1; - - attr_off = le16_to_cpu(mftr->attrs_offset); -- dbg("file $Volume's attributes are at offset %i", attr_off); -+ dbg("file $Volume's attributes are at offset %i\n", attr_off); - - while (1) { - attr = (struct file_attribute*) &buf[attr_off]; -@@ -167,18 +167,18 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - if (attr_type == MFT_RECORD_ATTR_END) - break; - -- dbg("found attribute type 0x%x, len %i, at offset %i", -+ dbg("found attribute type 0x%x, len %i, at offset %i\n", - attr_type, attr_len, attr_off); - - if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) { -- dbg("found info, len %i", val_len); -+ dbg("found info, len %i\n", val_len); - info = (struct volume_info*) (((uint8_t *) attr) + val_off); - snprintf(id->type_version, sizeof(id->type_version)-1, - "%u.%u", info->major_ver, info->minor_ver); - } - - if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) { -- dbg("found label, len %i", val_len); -+ dbg("found label, len %i\n", val_len); - if (val_len > VOLUME_ID_LABEL_SIZE) - val_len = VOLUME_ID_LABEL_SIZE; - -diff --git a/extras/volume_id/lib/nvidia_raid.c b/extras/volume_id/lib/nvidia_raid.c -index ca42459..c6b5185 100644 ---- a/extras/volume_id/lib/nvidia_raid.c -+++ b/extras/volume_id/lib/nvidia_raid.c -@@ -41,7 +41,7 @@ int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t siz - uint64_t meta_off; - struct nvidia_meta *nv; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/ocfs.c b/extras/volume_id/lib/ocfs.c -index 9f251f1..ec81f5e 100644 ---- a/extras/volume_id/lib/ocfs.c -+++ b/extras/volume_id/lib/ocfs.c -@@ -132,7 +132,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) - struct ocfs1_super_block_header *osh; - struct ocfs1_super_block_label *osl; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off, 0x200); - if (buf == NULL) -@@ -144,7 +144,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) - snprintf(id->type_version, sizeof(id->type_version)-1, - "%u.%u", osh->major_version, osh->minor_version); - -- dbg("found OracleCFS signature, now reading label"); -+ dbg("found OracleCFS signature, now reading label\n"); - buf = volume_id_get_buffer(id, off + 0x200, 0x200); - if (buf == NULL) - return -1; -@@ -170,7 +170,7 @@ int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size) - struct ocfs2_super_block *os; - size_t blksize; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - for (blksize = 0x200; blksize <= OCFS2_MAX_BLOCKSIZE; blksize <<= 1) { - buf = volume_id_get_buffer(id, off + OCFS2_SUPER_BLOCK_BLKNO * blksize, 0x200); -diff --git a/extras/volume_id/lib/promise_raid.c b/extras/volume_id/lib/promise_raid.c -index 1c4d365..ecaed00 100644 ---- a/extras/volume_id/lib/promise_raid.c -+++ b/extras/volume_id/lib/promise_raid.c -@@ -42,7 +42,7 @@ int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, u - 63, 255, 256, 16, 399, 0 - }; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x40000) -diff --git a/extras/volume_id/lib/reiserfs.c b/extras/volume_id/lib/reiserfs.c -index 18db638..0f30233 100644 ---- a/extras/volume_id/lib/reiserfs.c -+++ b/extras/volume_id/lib/reiserfs.c -@@ -60,7 +60,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size) - struct reiser4_super_block *rs4; - uint8_t *buf; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -diff --git a/extras/volume_id/lib/romfs.c b/extras/volume_id/lib/romfs.c -index 2db36d6..303a1fb 100644 ---- a/extras/volume_id/lib/romfs.c -+++ b/extras/volume_id/lib/romfs.c -@@ -37,7 +37,7 @@ int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct romfs_super *rfs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200); - if (rfs == NULL) -diff --git a/extras/volume_id/lib/silicon_raid.c b/extras/volume_id/lib/silicon_raid.c -index 634e4ab..cfdcbcb 100644 ---- a/extras/volume_id/lib/silicon_raid.c -+++ b/extras/volume_id/lib/silicon_raid.c -@@ -53,7 +53,7 @@ int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint - uint64_t meta_off; - struct silicon_meta *sil; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/squashfs.c b/extras/volume_id/lib/squashfs.c -index 035d6fb..18e44ab 100644 ---- a/extras/volume_id/lib/squashfs.c -+++ b/extras/volume_id/lib/squashfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct squashfs_super *sqs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - sqs = (struct squashfs_super *) volume_id_get_buffer(id, off, 0x200); - if (sqs == NULL) -diff --git a/extras/volume_id/lib/sysv.c b/extras/volume_id/lib/sysv.c -index e48013c..ba37c4d 100644 ---- a/extras/volume_id/lib/sysv.c -+++ b/extras/volume_id/lib/sysv.c -@@ -95,7 +95,7 @@ int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size) - struct xenix_super *xs; - unsigned int boff; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) { - vs = (struct sysv_super *) -diff --git a/extras/volume_id/lib/udf.c b/extras/volume_id/lib/udf.c -index ac2f40a..2a589c5 100644 ---- a/extras/volume_id/lib/udf.c -+++ b/extras/volume_id/lib/udf.c -@@ -72,7 +72,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size) - unsigned int loc; - unsigned int clen; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200); - if (vsd == NULL) -@@ -100,7 +100,7 @@ blocksize: - vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET + bs, 0x800); - if (vsd == NULL) - return -1; -- dbg("test for blocksize: 0x%x", bs); -+ dbg("test for blocksize: 0x%x\n", bs); - if (vsd->id[0] != '\0') - goto nsr; - } -@@ -113,7 +113,7 @@ nsr: - if (vsd == NULL) - return -1; - -- dbg("vsd: %c%c%c%c%c", -+ dbg("vsd: %c%c%c%c%c\n", - vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]); - - if (vsd->id[0] == '\0') -@@ -138,7 +138,7 @@ anchor: - /* get desriptor list address and block count */ - count = le32_to_cpu(vd->type.anchor.length) / bs; - loc = le32_to_cpu(vd->type.anchor.location); -- dbg("0x%x descriptors starting at logical secor 0x%x", count, loc); -+ dbg("0x%x descriptors starting at logical secor 0x%x\n", count, loc); - - /* pick the primary descriptor from the list */ - for (b = 0; b < count; b++) { -@@ -147,7 +147,7 @@ anchor: - return -1; - - type = le16_to_cpu(vd->tag.id); -- dbg("descriptor type %i", type); -+ dbg("descriptor type %i\n", type); - - /* check validity */ - if (type == 0) -@@ -164,7 +164,7 @@ pvd: - volume_id_set_label_raw(id, &(vd->type.primary.ident.clen), 32); - - clen = vd->type.primary.ident.clen; -- dbg("label string charsize=%i bit", clen); -+ dbg("label string charsize=%i bit\n", clen); - if (clen == 8) - volume_id_set_label_string(id, vd->type.primary.ident.c, 31); - else if (clen == 16) -diff --git a/extras/volume_id/lib/ufs.c b/extras/volume_id/lib/ufs.c -index 4ace8c9..bedcfa4 100644 ---- a/extras/volume_id/lib/ufs.c -+++ b/extras/volume_id/lib/ufs.c -@@ -175,20 +175,20 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) - struct ufs_super_block *ufs; - int offsets[] = {0, 8, 64, 256, -1}; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - for (i = 0; offsets[i] >= 0; i++) { - ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800); - if (ufs == NULL) - return -1; - -- dbg("offset 0x%x", offsets[i] * 0x400); -+ dbg("offset 0x%x\n", offsets[i] * 0x400); - magic = be32_to_cpu(ufs->fs_magic); - if ((magic == UFS_MAGIC) || - (magic == UFS2_MAGIC) || - (magic == UFS_MAGIC_FEA) || - (magic == UFS_MAGIC_LFN)) { -- dbg("magic 0x%08x(be)", magic); -+ dbg("magic 0x%08x(be)\n", magic); - goto found; - } - magic = le32_to_cpu(ufs->fs_magic); -@@ -196,7 +196,7 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) - (magic == UFS2_MAGIC) || - (magic == UFS_MAGIC_FEA) || - (magic == UFS_MAGIC_LFN)) { -- dbg("magic 0x%08x(le)", magic); -+ dbg("magic 0x%08x(le)\n", magic); - goto found; - } - } -diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c -index 0a3bd39..2a63efe 100644 ---- a/extras/volume_id/lib/util.c -+++ b/extras/volume_id/lib/util.c -@@ -353,33 +353,33 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) - { - ssize_t buf_len; - -- info("get buffer off 0x%llx(%llu), len 0x%zx", (unsigned long long) off, (unsigned long long) off, len); -+ info("get buffer off 0x%llx(%llu), len 0x%zx\n", (unsigned long long) off, (unsigned long long) off, len); - /* check if requested area fits in superblock buffer */ - if (off + len <= SB_BUFFER_SIZE) { - if (id->sbbuf == NULL) { - id->sbbuf = malloc(SB_BUFFER_SIZE); - if (id->sbbuf == NULL) { -- dbg("error malloc"); -+ dbg("error malloc\n"); - return NULL; - } - } - - /* check if we need to read */ - if ((off + len) > id->sbbuf_len) { -- info("read sbbuf len:0x%llx", (unsigned long long) (off + len)); -+ info("read sbbuf len:0x%llx\n", (unsigned long long) (off + len)); - if (lseek(id->fd, 0, SEEK_SET) < 0) { -- dbg("lseek failed (%s)", strerror(errno)); -+ dbg("lseek failed (%s)\n", strerror(errno)); - return NULL; - } - buf_len = read(id->fd, id->sbbuf, off + len); - if (buf_len < 0) { -- dbg("read failed (%s)", strerror(errno)); -+ dbg("read failed (%s)\n", strerror(errno)); - return NULL; - } -- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); -+ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); - id->sbbuf_len = buf_len; - if ((size_t)buf_len < off + len) { -- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); -+ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); - return NULL; - } - } -@@ -387,7 +387,7 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) - return &(id->sbbuf[off]); - } else { - if (len > SEEK_BUFFER_SIZE) { -- dbg("seek buffer too small %d", SEEK_BUFFER_SIZE); -+ dbg("seek buffer too small %d\n", SEEK_BUFFER_SIZE); - return NULL; - } - -@@ -395,28 +395,28 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) - if (id->seekbuf == NULL) { - id->seekbuf = malloc(SEEK_BUFFER_SIZE); - if (id->seekbuf == NULL) { -- dbg("error malloc"); -+ dbg("error malloc\n"); - return NULL; - } - } - - /* check if we need to read */ - if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) { -- info("read seekbuf off:0x%llx len:0x%zx", (unsigned long long) off, len); -+ info("read seekbuf off:0x%llx len:0x%zx\n", (unsigned long long) off, len); - if (lseek(id->fd, off, SEEK_SET) < 0) { -- dbg("lseek failed (%s)", strerror(errno)); -+ dbg("lseek failed (%s)\n", strerror(errno)); - return NULL; - } - buf_len = read(id->fd, id->seekbuf, len); - if (buf_len < 0) { -- dbg("read failed (%s)", strerror(errno)); -+ dbg("read failed (%s)\n", strerror(errno)); - return NULL; - } -- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); -+ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); - id->seekbuf_off = off; - id->seekbuf_len = buf_len; - if ((size_t)buf_len < len) { -- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); -+ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); - return NULL; - } - } -diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c -index 62c165e..9965e13 100644 ---- a/extras/volume_id/lib/via_raid.c -+++ b/extras/volume_id/lib/via_raid.c -@@ -63,7 +63,7 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size) - uint64_t meta_off; - struct via_meta *via; - -- dbg("probing at offset 0x%llx, size 0x%llx", -+ dbg("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c -index 7c68fb1..bb909c9 100644 ---- a/extras/volume_id/lib/volume_id.c -+++ b/extras/volume_id/lib/volume_id.c -@@ -358,7 +358,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) - if (!device_is_readable(id, off)) - return -1; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - for (i = 0; i < ARRAY_SIZE(prober_raid); i++) -@@ -392,7 +392,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size - if (!device_is_readable(id, off)) - return -1; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - for (i = 0; i < ARRAY_SIZE(prober_filesystem); i++) -@@ -493,7 +493,7 @@ struct volume_id *volume_id_open_node(const char *path) - - fd = open(path, O_RDONLY); - if (fd < 0) { -- dbg("unable to open '%s'", path); -+ dbg("unable to open '%s'\n", path); - return NULL; - } - -diff --git a/extras/volume_id/lib/vxfs.c b/extras/volume_id/lib/vxfs.c -index c9b7628..33d357b 100644 ---- a/extras/volume_id/lib/vxfs.c -+++ b/extras/volume_id/lib/vxfs.c -@@ -37,7 +37,7 @@ int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct vxfs_super *vxs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - vxs = (struct vxfs_super *) volume_id_get_buffer(id, off + 0x200, 0x200); - if (vxs == NULL) -diff --git a/extras/volume_id/lib/xfs.c b/extras/volume_id/lib/xfs.c -index 9eac827..3e10560 100644 ---- a/extras/volume_id/lib/xfs.c -+++ b/extras/volume_id/lib/xfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct xfs_super_block *xs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200); - if (xs == NULL) -diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c -index 04e85ab..5c4e05d 100644 ---- a/extras/volume_id/vol_id.c -+++ b/extras/volume_id/vol_id.c -@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) - - node = argv[optind]; - if (!node) { -- err("no device"); -+ err("no device\n"); - fprintf(stderr, "no device\n"); - rc = 1; - goto exit; -@@ -239,7 +239,7 @@ int main(int argc, char *argv[]) - - if (ioctl(fd, BLKGETSIZE64, &size) != 0) - size = 0; -- dbg("BLKGETSIZE64=%llu", (unsigned long long)size); -+ dbg("BLKGETSIZE64=%llu\n", (unsigned long long)size); - - /* try to drop all privileges before reading disk content */ - if (getuid() == 0) { -@@ -250,7 +250,7 @@ int main(int argc, char *argv[]) - if (setgroups(0, NULL) != 0 || - setgid(pw->pw_gid) != 0 || - setuid(pw->pw_uid) != 0) -- info("unable to drop privileges: %s\n", strerror(errno)); -+ info("unable to drop privileges: %s\n\n", strerror(errno)); - } - } - -diff --git a/test-udev.c b/test-udev.c -index 0c25778..e341b74 100644 ---- a/test-udev.c -+++ b/test-udev.c -@@ -90,10 +90,10 @@ int main(int argc, char *argv[], char *envp[]) - - logging_init("udev"); - if (devnull < 0) -- err("open /dev/null failed: %s", strerror(errno)); -+ err("open /dev/null failed: %s\n", strerror(errno)); - udev_config_init(); - selinux_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - - /* set signal handlers */ - memset(&act, 0x00, sizeof(act)); -@@ -115,7 +115,7 @@ int main(int argc, char *argv[], char *envp[]) - subsystem = argv[1]; - - if (action == NULL || subsystem == NULL || devpath == NULL) { -- err("action, subsystem or devpath missing"); -+ err("action, subsystem or devpath missing\n"); - goto exit; - } - -@@ -132,7 +132,7 @@ int main(int argc, char *argv[], char *envp[]) - - dev = sysfs_device_get(devpath); - if (dev == NULL) { -- info("unable to open '%s'", devpath); -+ info("unable to open '%s'\n", devpath); - goto fail; - } - -diff --git a/udev_config.c b/udev_config.c -index 2f2a69e..4219094 100644 ---- a/udev_config.c -+++ b/udev_config.c -@@ -98,7 +98,7 @@ static int parse_config_file(void) - int retval = 0; - - if (file_map(udev_config_filename, &buf, &bufsize) != 0) { -- err("can't open '%s' as config file: %s", udev_config_filename, strerror(errno)); -+ err("can't open '%s' as config file: %s\n", udev_config_filename, strerror(errno)); - return -ENODEV; - } - -@@ -124,7 +124,7 @@ static int parse_config_file(void) - continue; - - if (count >= sizeof(line)) { -- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -+ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); - continue; - } - -@@ -134,7 +134,7 @@ static int parse_config_file(void) - linepos = line; - retval = get_key(&linepos, &variable, &value); - if (retval != 0) { -- err("error parsing %s, line %d:%d", udev_config_filename, lineno, (int)(linepos-line)); -+ err("error parsing %s, line %d:%d\n", udev_config_filename, lineno, (int)(linepos-line)); - continue; - } - -@@ -193,8 +193,8 @@ void udev_config_init(void) - if (env) - udev_log_priority = log_priority(env); - -- dbg("UDEV_CONFIG_FILE='%s'", udev_config_filename); -- dbg("udev_root='%s'", udev_root); -- dbg("udev_rules='%s'", udev_rules_dir); -- dbg("udev_log=%d", udev_log_priority); -+ dbg("UDEV_CONFIG_FILE='%s'\n", udev_config_filename); -+ dbg("udev_root='%s'\n", udev_root); -+ dbg("udev_rules='%s'\n", udev_rules_dir); -+ dbg("udev_log=%d\n", udev_log_priority); - } -diff --git a/udev_db.c b/udev_db.c -index 1feab7d..ddcf85e 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -65,13 +65,13 @@ static int name_index(const char *devpath, const char *name, int add) - strlcat(filename, device, sizeof(filename)); - - if (add) { -- info("creating index: '%s'", filename); -+ info("creating index: '%s'\n", filename); - create_path(filename); - fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); - if (fd > 0) - close(fd); - } else { -- info("removing index: '%s'", filename); -+ info("removing index: '%s'\n", filename); - unlink(filename); - delete_path(filename); - } -@@ -92,12 +92,12 @@ int udev_db_get_devices_by_name(const char *name, struct list_head *name_list) - - dir = opendir(dirname); - if (dir == NULL) { -- info("no index directory '%s': %s", dirname, strerror(errno)); -+ info("no index directory '%s': %s\n", dirname, strerror(errno)); - rc = -1; - goto out; - } - -- info("found index directory '%s'", dirname); -+ info("found index directory '%s'\n", dirname); - while (1) { - struct dirent *ent; - char device[PATH_SIZE]; -@@ -146,12 +146,12 @@ int udev_db_add_device(struct udevice *udev) - if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && - !udev->partitions && !udev->ignore_remove) { - int ret; -- dbg("nothing interesting to store, create symlink"); -+ dbg("nothing interesting to store, create symlink\n"); - selinux_setfscreatecon(filename, NULL, S_IFLNK); - ret = symlink(udev->name, filename); - selinux_resetfscreatecon(); - if (ret != 0) { -- err("unable to create db link '%s': %s", filename, strerror(errno)); -+ err("unable to create db link '%s': %s\n", filename, strerror(errno)); - return -1; - } - } else { -@@ -160,10 +160,10 @@ int udev_db_add_device(struct udevice *udev) - - f = fopen(filename, "w"); - if (f == NULL) { -- err("unable to create db file '%s': %s", filename, strerror(errno)); -+ err("unable to create db file '%s': %s\n", filename, strerror(errno)); - return -1; - } -- dbg("storing data for device '%s' in '%s'", udev->dev->devpath, filename); -+ dbg("storing data for device '%s' in '%s'\n", udev->dev->devpath, filename); - - fprintf(f, "N:%s\n", udev->name); - list_for_each_entry(name_loop, &udev->symlink_list, node) { -@@ -205,28 +205,28 @@ int udev_db_get_device(struct udevice *udev, const char *devpath) - devpath_to_db_path(devpath, filename, sizeof(filename)); - - if (lstat(filename, &stats) != 0) { -- info("no db file to read %s: %s", filename, strerror(errno)); -+ info("no db file to read %s: %s\n", filename, strerror(errno)); - return -1; - } - if ((stats.st_mode & S_IFMT) == S_IFLNK) { - char target[NAME_SIZE]; - int target_len; - -- info("found a symlink as db file"); -+ info("found a symlink as db file\n"); - target_len = readlink(filename, target, sizeof(target)); - if (target_len > 0) - target[target_len] = '\0'; - else { -- info("error reading db link %s: %s", filename, strerror(errno)); -+ info("error reading db link %s: %s\n", filename, strerror(errno)); - return -1; - } -- dbg("db link points to '%s'", target); -+ dbg("db link points to '%s'\n", target); - strlcpy(udev->name, target, sizeof(udev->name)); - return 0; - } - - if (file_map(filename, &buf, &bufsize) != 0) { -- info("error reading db file %s: %s", filename, strerror(errno)); -+ info("error reading db file %s: %s\n", filename, strerror(errno)); - return -1; - } - -@@ -323,7 +323,7 @@ int udev_db_get_all_entries(struct list_head *name_list) - strlcat(dbpath, "/"DB_DIR, sizeof(dbpath)); - dir = opendir(dbpath); - if (dir == NULL) { -- info("no udev_db available '%s': %s", dbpath, strerror(errno)); -+ info("no udev_db available '%s': %s\n", dbpath, strerror(errno)); - return -1; - } - -@@ -340,7 +340,7 @@ int udev_db_get_all_entries(struct list_head *name_list) - strlcpy(device, ent->d_name, sizeof(device)); - path_decode(device); - name_list_add(name_list, device, 1); -- dbg("added '%s'", device); -+ dbg("added '%s'\n", device); - } - - closedir(dir); -diff --git a/udev_device.c b/udev_device.c -index 62217ff..6546db4 100644 ---- a/udev_device.c -+++ b/udev_device.c -@@ -104,13 +104,13 @@ static int rename_netif(struct udevice *udev) - struct ifreq ifr; - int retval; - -- info("changing net interface name from '%s' to '%s'", udev->dev->kernel, udev->name); -+ info("changing net interface name from '%s' to '%s'\n", udev->dev->kernel, udev->name); - if (udev->test_run) - return 0; - - sk = socket(PF_INET, SOCK_DGRAM, 0); - if (sk < 0) { -- err("error opening socket: %s", strerror(errno)); -+ err("error opening socket: %s\n", strerror(errno)); - return -1; - } - -@@ -125,7 +125,7 @@ static int rename_netif(struct udevice *udev) - - /* see if the destination interface name already exists */ - if (errno != EEXIST) { -- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); -+ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); - goto exit; - } - -@@ -134,7 +134,7 @@ static int rename_netif(struct udevice *udev) - strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ); - retval = ioctl(sk, SIOCSIFNAME, &ifr); - if (retval != 0) { -- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); -+ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); - goto exit; - } - -@@ -150,11 +150,11 @@ static int rename_netif(struct udevice *udev) - } - - if (errno != EEXIST) { -- err("error changing net interface name %s to %s: %s", -+ err("error changing net interface name %s to %s: %s\n", - ifr.ifr_name, ifr.ifr_newname, strerror(errno)); - break; - } -- dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop); -+ dbg("wait for netif '%s' to become free, loop=%i\n", udev->name, (30 * 20) - loop); - usleep(1000 * 1000 / 20); - } - } -@@ -170,22 +170,22 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - - 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); -+ info("moved database from '%s' to '%s'\n", udev->devpath_old, udev->dev->devpath); - - /* add device node */ - if (major(udev->devt) != 0 && - (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) { - struct udevice *udev_old; - -- dbg("device node add '%s'", udev->dev->devpath); -+ dbg("device node add '%s'\n", udev->dev->devpath); - - udev_rules_get_name(rules, udev); - if (udev->ignore_device) { -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - goto exit; - } - if (udev->name[0] == '\0') { -- info("device node creation supressed"); -+ info("device node creation supressed\n"); - goto exit; - } - -@@ -194,7 +194,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - if (udev_old != NULL) { - udev_old->test_run = udev->test_run; - if (udev_db_get_device(udev_old, udev->dev->devpath) == 0) { -- info("device '%s' already in database, cleanup", udev->dev->devpath); -+ info("device '%s' already in database, cleanup\n", udev->dev->devpath); - udev_db_delete_device(udev_old); - } else { - udev_device_cleanup(udev_old); -@@ -220,14 +220,14 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - - /* add netif */ - if (strcmp(udev->dev->subsystem, "net") == 0 && strcmp(udev->action, "add") == 0) { -- dbg("netif add '%s'", udev->dev->devpath); -+ dbg("netif add '%s'\n", udev->dev->devpath); - udev_rules_get_name(rules, udev); - if (udev->ignore_device) { -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - goto exit; - } - if (udev->name[0] == '\0') { -- info("device renaming supressed"); -+ info("device renaming supressed\n"); - goto exit; - } - -@@ -239,7 +239,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - retval = rename_netif(udev); - if (retval != 0) - goto exit; -- info("renamed netif to '%s'", udev->name); -+ info("renamed netif to '%s'\n", udev->name); - - /* export old name */ - setenv("INTERFACE_OLD", udev->dev->kernel, 1); -@@ -253,7 +253,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - sysfs_device_set_values(udev->dev, devpath, NULL, NULL); - setenv("DEVPATH", udev->dev->devpath, 1); - setenv("INTERFACE", udev->name, 1); -- info("changed devpath to '%s'", udev->dev->devpath); -+ info("changed devpath to '%s'\n", udev->dev->devpath); - } - } - goto exit; -@@ -270,19 +270,19 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - list_for_each_entry(name_loop, &udev->env_list, node) - putenv(name_loop->name); - } else { -- dbg("'%s' not found in database, using kernel name '%s'", -+ dbg("'%s' not found in database, using kernel name '%s'\n", - udev->dev->devpath, udev->dev->kernel); - strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); - } - - udev_rules_get_run(rules, udev); - if (udev->ignore_device) { -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - goto exit; - } - - if (udev->ignore_remove) { -- info("ignore_remove for '%s'", udev->name); -+ info("ignore_remove for '%s'\n", udev->name); - goto exit; - } - /* remove the node */ -@@ -296,7 +296,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - /* default devices */ - udev_rules_get_run(rules, udev); - if (udev->ignore_device) -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - - exit: - return retval; -diff --git a/udev_node.c b/udev_node.c -index 6ca0601..0e59e2d 100644 ---- a/udev_node.c -+++ b/udev_node.c -@@ -48,7 +48,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m - - if (lstat(file, &stats) == 0) { - if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) { -- info("preserve file '%s', because it has correct dev_t", file); -+ info("preserve file '%s', because it has correct dev_t\n", file); - selinux_setfilecon(file, udev->dev->kernel, stats.st_mode); - goto perms; - } -@@ -60,7 +60,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m - goto perms; - } - -- info("atomically replace '%s'", file); -+ info("atomically replace '%s'\n", file); - strlcpy(file_tmp, file, sizeof(file_tmp)); - strlcat(file_tmp, TMP_FILE_EXT, sizeof(file_tmp)); - unlink(file_tmp); -@@ -68,29 +68,29 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m - retval = mknod(file_tmp, mode, devt); - selinux_resetfscreatecon(); - if (retval != 0) { -- err("mknod(%s, %#o, %u, %u) failed: %s", -+ err("mknod(%s, %#o, %u, %u) failed: %s\n", - file_tmp, mode, major(devt), minor(devt), strerror(errno)); - goto exit; - } - retval = rename(file_tmp, file); - if (retval != 0) { -- err("rename(%s, %s) failed: %s", -+ err("rename(%s, %s) failed: %s\n", - file_tmp, file, strerror(errno)); - unlink(file_tmp); - goto exit; - } - - perms: -- dbg("chmod(%s, %#o)", file, mode); -+ dbg("chmod(%s, %#o)\n", file, mode); - if (chmod(file, mode) != 0) { -- err("chmod(%s, %#o) failed: %s", file, mode, strerror(errno)); -+ err("chmod(%s, %#o) failed: %s\n", file, mode, strerror(errno)); - goto exit; - } - - if (uid != 0 || gid != 0) { -- dbg("chown(%s, %u, %u)", file, uid, gid); -+ dbg("chown(%s, %u, %u)\n", file, uid, gid); - if (chown(file, uid, gid) != 0) { -- err("chown(%s, %u, %u) failed: %s", -+ err("chown(%s, %u, %u) failed: %s\n", - file, uid, gid, strerror(errno)); - goto exit; - } -@@ -127,32 +127,32 @@ static int node_symlink(const char *node, const char *slink) - if (S_ISBLK(stats.st_mode) || S_ISCHR(stats.st_mode)) { - struct stat stats2; - -- info("found existing node instead of symlink '%s'", slink); -+ info("found existing node instead of symlink '%s'\n", slink); - if (lstat(node, &stats2) == 0) { - if ((stats.st_mode & S_IFMT) == (stats2.st_mode & S_IFMT) && - stats.st_rdev == stats2.st_rdev) { -- info("replace device node '%s' with symlink to our node '%s'", slink, node); -+ info("replace device node '%s' with symlink to our node '%s'\n", slink, node); - } else { -- err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node); -+ err("device node '%s' already exists, link to '%s' will not overwrite it\n", slink, node); - goto exit; - } - } - } else if (S_ISLNK(stats.st_mode)) { - char buf[PATH_SIZE]; - -- info("found existing symlink '%s'", slink); -+ info("found existing symlink '%s'\n", slink); - len = readlink(slink, buf, sizeof(buf)); - if (len > 0) { - buf[len] = '\0'; - if (strcmp(target, buf) == 0) { -- info("preserve already existing symlink '%s' to '%s'", slink, target); -+ info("preserve already existing symlink '%s' to '%s'\n", slink, target); - selinux_setfilecon(slink, NULL, S_IFLNK); - goto exit; - } - } - } - } else { -- info("creating symlink '%s' to '%s'", slink, target); -+ info("creating symlink '%s' to '%s'\n", slink, target); - selinux_setfscreatecon(slink, NULL, S_IFLNK); - retval = symlink(target, slink); - selinux_resetfscreatecon(); -@@ -160,7 +160,7 @@ static int node_symlink(const char *node, const char *slink) - goto exit; - } - -- info("atomically replace '%s'", slink); -+ info("atomically replace '%s'\n", slink); - strlcpy(slink_tmp, slink, sizeof(slink_tmp)); - strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); - unlink(slink_tmp); -@@ -168,12 +168,12 @@ static int node_symlink(const char *node, const char *slink) - retval = symlink(target, slink_tmp); - selinux_resetfscreatecon(); - if (retval != 0) { -- err("symlink(%s, %s) failed: %s", target, slink_tmp, strerror(errno)); -+ err("symlink(%s, %s) failed: %s\n", target, slink_tmp, strerror(errno)); - goto exit; - } - retval = rename(slink_tmp, slink); - if (retval != 0) { -- err("rename(%s, %s) failed: %s", slink_tmp, slink, strerror(errno)); -+ err("rename(%s, %s) failed: %s\n", slink_tmp, slink, strerror(errno)); - unlink(slink_tmp); - goto exit; - } -@@ -198,11 +198,11 @@ static int update_link(struct udevice *udev, const char *name) - strlcat(slink, name, sizeof(slink)); - - count = udev_db_get_devices_by_name(name, &name_list); -- info("found %i devices with name '%s'", count, name); -+ info("found %i devices with name '%s'\n", count, name); - - /* if we don't have a reference, delete it */ - if (count <= 0) { -- info("no reference left, remove '%s'", name); -+ info("no reference left, remove '%s'\n", name); - if (!udev->test_run) { - unlink(slink); - delete_path(slink); -@@ -212,14 +212,14 @@ static int update_link(struct udevice *udev, const char *name) - - /* find the device with the highest priority */ - list_for_each_entry(device, &name_list, node) { -- info("found '%s' for '%s'", device->name, name); -+ info("found '%s' for '%s'\n", device->name, name); - - /* did we find ourself? we win, if we have the same priority */ - if (strcmp(udev->dev->devpath, device->name) == 0) { -- info("compare (our own) priority of '%s' %i >= %i", -+ info("compare (our own) priority of '%s' %i >= %i\n", - udev->dev->devpath, udev->link_priority, priority); - if (strcmp(udev->name, name) == 0) { -- info("'%s' is our device node, database inconsistent, skip link update", udev->name); -+ info("'%s' is our device node, database inconsistent, skip link update\n", udev->name); - } else if (target[0] == '\0' || udev->link_priority >= priority) { - priority = udev->link_priority; - strlcpy(target, udev->name, sizeof(target)); -@@ -233,9 +233,9 @@ static int update_link(struct udevice *udev, const char *name) - continue; - if (udev_db_get_device(udev_db, device->name) == 0) { - if (strcmp(udev_db->name, name) == 0) { -- info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name); -+ info("'%s' is a device node of '%s', skip link update\n", udev_db->name, device->name); - } else { -- info("compare priority of '%s' %i > %i", -+ info("compare priority of '%s' %i > %i\n", - udev_db->dev->devpath, udev_db->link_priority, priority); - if (target[0] == '\0' || udev_db->link_priority > priority) { - priority = udev_db->link_priority; -@@ -248,7 +248,7 @@ static int update_link(struct udevice *udev, const char *name) - name_list_cleanup(&name_list); - - if (target[0] == '\0') { -- info("no current target for '%s' found", name); -+ info("no current target for '%s' found\n", name); - rc = 1; - goto out; - } -@@ -257,7 +257,7 @@ static int update_link(struct udevice *udev, const char *name) - strlcpy(node, udev_root, sizeof(node)); - strlcat(node, "/", sizeof(node)); - strlcat(node, target, sizeof(node)); -- info("'%s' with target '%s' has the highest priority %i, create it", name, target, priority); -+ info("'%s' with target '%s' has the highest priority %i, create it\n", name, target, priority); - if (!udev->test_run) { - create_path(slink); - node_symlink(node, slink); -@@ -272,7 +272,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) - char symlinks[PATH_SIZE] = ""; - - list_for_each_entry(name_loop, &udev->symlink_list, node) { -- info("update symlink '%s' of '%s'", name_loop->name, udev->dev->devpath); -+ info("update symlink '%s' of '%s'\n", name_loop->name, udev->dev->devpath); - update_link(udev, name_loop->name); - strlcat(symlinks, udev_root, sizeof(symlinks)); - strlcat(symlinks, "/", sizeof(symlinks)); -@@ -302,7 +302,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) - } - if (!found) { - /* link does no longer belong to this device */ -- info("update old symlink '%s' no longer belonging to '%s'", -+ info("update old symlink '%s' no longer belonging to '%s'\n", - link_old_loop->name, udev->dev->devpath); - update_link(udev, link_old_loop->name); - } -@@ -356,7 +356,7 @@ int udev_node_add(struct udevice *udev) - gid = lookup_group(udev->group); - } - -- info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d", -+ info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d\n", - filename, major(udev->devt), minor(udev->devt), udev->mode, uid, gid); - - if (!udev->test_run) -@@ -380,7 +380,7 @@ int udev_node_add(struct udevice *udev) - if (range > 1) - udev->partitions = range-1; - } -- info("creating device partition nodes '%s[1-%i]'", filename, udev->partitions); -+ info("creating device partition nodes '%s[1-%i]'\n", filename, udev->partitions); - if (!udev->test_run) { - for (i = 1; i <= udev->partitions; i++) { - dev_t part_devt; -@@ -408,15 +408,15 @@ int udev_node_remove(struct udevice *udev) - strlcat(filename, "/", sizeof(filename)); - strlcat(filename, udev->name, sizeof(filename)); - if (stat(filename, &stats) != 0) { -- info("device node '%s' not found", filename); -+ info("device node '%s' not found\n", filename); - return 0; - } - if (udev->devt && stats.st_rdev != udev->devt) { -- info("device node '%s' points to a different device, skip removal", filename); -+ info("device node '%s' points to a different device, skip removal\n", filename); - return -1; - } - -- info("removing device node '%s'", filename); -+ info("removing device node '%s'\n", filename); - if (!udev->test_run) - retval = unlink_secure(filename); - if (retval) -@@ -427,7 +427,7 @@ int udev_node_remove(struct udevice *udev) - if (num > 0) { - int i; - -- info("removing all_partitions '%s[1-%i]'", filename, num); -+ info("removing all_partitions '%s[1-%i]'\n", filename, num); - if (num > 255) - return -1; - for (i = 1; i <= num; i++) { -diff --git a/udev_rules.c b/udev_rules.c -index 8a793ff..884cb70 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -48,13 +48,13 @@ static char *get_format_attribute(char **str) - if (*str[0] == '{') { - pos = strchr(*str, '}'); - if (pos == NULL) { -- err("missing closing brace for format"); -+ err("missing closing brace for format\n"); - return NULL; - } - pos[0] = '\0'; - attr = *str+1; - *str = pos+1; -- dbg("attribute='%s', str='%s'", attr, *str); -+ dbg("attribute='%s', str='%s'\n", attr, *str); - } - return attr; - } -@@ -69,10 +69,10 @@ static int get_format_len(char **str) - num = (int) strtoul(*str, &tail, 10); - if (num > 0) { - *str = tail; -- dbg("format length=%i", num); -+ dbg("format length=%i\n", num); - return num; - } else { -- err("format parsing error '%s'", *str); -+ err("format parsing error '%s'\n", *str); - } - } - return -1; -@@ -148,7 +148,7 @@ static int run_program(const char *command, const char *subsystem, - } else { - argv[i] = strsep(&pos, " "); - } -- dbg("arg[%i] '%s'", i, argv[i]); -+ dbg("arg[%i] '%s'\n", i, argv[i]); - i++; - } - argv[i] = NULL; -@@ -156,18 +156,18 @@ static int run_program(const char *command, const char *subsystem, - argv[0] = arg; - argv[1] = NULL; - } -- info("'%s'", command); -+ info("'%s'\n", command); - - /* prepare pipes from child to parent */ - if (result != NULL || udev_log_priority >= LOG_INFO) { - if (pipe(outpipe) != 0) { -- err("pipe failed: %s", strerror(errno)); -+ err("pipe failed: %s\n", strerror(errno)); - return -1; - } - } - if (udev_log_priority >= LOG_INFO) { - if (pipe(errpipe) != 0) { -- err("pipe failed: %s", strerror(errno)); -+ err("pipe failed: %s\n", strerror(errno)); - return -1; - } - } -@@ -198,7 +198,7 @@ static int run_program(const char *command, const char *subsystem, - dup2(devnull, STDERR_FILENO); - close(devnull); - } else -- err("open /dev/null failed: %s", strerror(errno)); -+ err("open /dev/null failed: %s\n", strerror(errno)); - if (outpipe[WRITE_END] > 0) { - dup2(outpipe[WRITE_END], STDOUT_FILENO); - close(outpipe[WRITE_END]); -@@ -210,14 +210,14 @@ static int run_program(const char *command, const char *subsystem, - execv(argv[0], argv); - if (errno == ENOENT || errno == ENOTDIR) { - /* may be on a filesytem which is not mounted right now */ -- info("program '%s' not found", argv[0]); -+ info("program '%s' not found\n", argv[0]); - } else { - /* other problems */ -- err("exec of program '%s' failed", argv[0]); -+ err("exec of program '%s' failed\n", argv[0]); - } - _exit(1); - case -1: -- err("fork of '%s' failed: %s", argv[0], strerror(errno)); -+ err("fork of '%s' failed: %s\n", argv[0], strerror(errno)); - return -1; - default: - /* read from child if requested */ -@@ -260,7 +260,7 @@ static int run_program(const char *command, const char *subsystem, - close(outpipe[READ_END]); - outpipe[READ_END] = -1; - if (count < 0) { -- err("stdin read failed: %s", strerror(errno)); -+ err("stdin read failed: %s\n", strerror(errno)); - retval = -1; - } - continue; -@@ -273,14 +273,14 @@ static int run_program(const char *command, const char *subsystem, - memcpy(&result[respos], inbuf, count); - respos += count; - } else { -- err("ressize %ld too short", (long)ressize); -+ err("ressize %ld too short\n", (long)ressize); - retval = -1; - } - } - pos = inbuf; - while ((line = strsep(&pos, "\n"))) - if (pos || line[0] != '\0') -- info("'%s' (stdout) '%s'", argv[0], line); -+ info("'%s' (stdout) '%s'\n", argv[0], line); - } - - /* get stderr */ -@@ -294,14 +294,14 @@ static int run_program(const char *command, const char *subsystem, - close(errpipe[READ_END]); - errpipe[READ_END] = -1; - if (count < 0) -- err("stderr read failed: %s", strerror(errno)); -+ err("stderr read failed: %s\n", strerror(errno)); - continue; - } - errbuf[count] = '\0'; - pos = errbuf; - while ((line = strsep(&pos, "\n"))) - if (pos || line[0] != '\0') -- info("'%s' (stderr) '%s'", argv[0], line); -+ info("'%s' (stderr) '%s'\n", argv[0], line); - } - } - if (outpipe[READ_END] > 0) -@@ -312,18 +312,18 @@ static int run_program(const char *command, const char *subsystem, - /* return the childs stdout string */ - if (result) { - result[respos] = '\0'; -- dbg("result='%s'", result); -+ dbg("result='%s'\n", result); - if (reslen) - *reslen = respos; - } - } - waitpid(pid, &status, 0); - if (WIFEXITED(status)) { -- info("'%s' returned with status %i", argv[0], WEXITSTATUS(status)); -+ info("'%s' returned with status %i\n", argv[0], WEXITSTATUS(status)); - if (WEXITSTATUS(status) != 0) - retval = -1; - } else { -- err("'%s' abnormal exit", argv[0]); -+ err("'%s' abnormal exit\n", argv[0]); - retval = -1; - } - } -@@ -364,7 +364,7 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu - continue; - - if (count >= sizeof(line)) { -- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -+ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); - continue; - } - -@@ -373,11 +373,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu - - linepos = line; - if (get_key(&linepos, &variable, &value) == 0) { -- dbg("import '%s=%s'", variable, value); -+ dbg("import '%s=%s'\n", variable, value); - - /* handle device, renamed by external tool, returning new path */ - if (strcmp(variable, "DEVPATH") == 0) { -- info("updating devpath from '%s' to '%s'", udev->dev->devpath, value); -+ info("updating devpath from '%s' to '%s'\n", udev->dev->devpath, value); - sysfs_device_set_values(udev->dev, value, NULL, NULL); - } else - name_list_key_add(&udev->env_list, variable, value); -@@ -394,7 +394,7 @@ static int import_file_into_env(struct udevice *udev, const char *filename) - size_t bufsize; - - if (file_map(filename, &buf, &bufsize) != 0) { -- err("can't open '%s': %s", filename, strerror(errno)); -+ err("can't open '%s': %s\n", filename, strerror(errno)); - return -1; - } - import_keys_into_env(udev, buf, bufsize); -@@ -423,13 +423,13 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) - struct udevice *udev_parent; - struct name_entry *name_loop; - -- dbg("found parent '%s', get the node name", dev_parent->devpath); -+ dbg("found parent '%s', get the node name\n", dev_parent->devpath); - udev_parent = udev_device_init(NULL); - if (udev_parent == NULL) - return -1; - /* import the udev_db of the parent */ - if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { -- dbg("import stored parent env '%s'", udev_parent->name); -+ dbg("import stored parent env '%s'\n", udev_parent->name); - list_for_each_entry(name_loop, &udev_parent->env_list, node) { - char name[NAME_SIZE]; - char *pos; -@@ -440,16 +440,16 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) - pos[0] = '\0'; - pos++; - if (fnmatch(filter, name, 0) == 0) { -- dbg("import key '%s'", name_loop->name); -+ dbg("import key '%s'\n", name_loop->name); - name_list_add(&udev->env_list, name_loop->name, 0); - setenv(name, pos, 1); - } else -- dbg("skip key '%s'", name_loop->name); -+ dbg("skip key '%s'\n", name_loop->name); - } - } - rc = 0; - } else -- dbg("parent not found in database"); -+ dbg("parent not found in database\n"); - udev_device_cleanup(udev_parent); - } - -@@ -468,7 +468,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c - ssize_t count; - int retval = 0; - -- dbg("pass environment to socket '%s'", sockpath); -+ dbg("pass environment to socket '%s'\n", sockpath); - sock = socket(AF_LOCAL, SOCK_DGRAM, 0); - memset(&saddr, 0x00, sizeof(struct sockaddr_un)); - saddr.sun_family = AF_LOCAL; -@@ -498,7 +498,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c - count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, saddrlen); - if (count < 0) - retval = -1; -- info("passed %zi bytes to socket '%s', ", count, sockpath); -+ info("passed %zi bytes to socket '%s', \n", count, sockpath); - - close(sock); - return retval; -@@ -509,7 +509,7 @@ int udev_rules_run(struct udevice *udev) - struct name_entry *name_loop; - int retval = 0; - -- dbg("executing run list"); -+ dbg("executing run list\n"); - 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, udev->action); -@@ -541,22 +541,22 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout) - strlcat(filepath, "/", sizeof(filepath)); - strlcat(filepath, file, sizeof(filepath)); - -- dbg("will wait %i sec for '%s'", timeout, filepath); -+ dbg("will wait %i sec for '%s'\n", timeout, filepath); - while (--loop) { - /* lookup file */ - if (stat(filepath, &stats) == 0) { -- info("file '%s' appeared after %i loops", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); -+ info("file '%s' appeared after %i loops\n", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); - return 0; - } - /* make sure, the device did not disappear in the meantime */ - if (stat(devicepath, &stats) != 0) { -- info("device disappeared while waiting for '%s'", filepath); -+ info("device disappeared while waiting for '%s'\n", filepath); - return -2; - } -- info("wait for '%s' for %i mseconds", filepath, 1000 / WAIT_LOOP_PER_SECOND); -+ info("wait for '%s' for %i mseconds\n", filepath, 1000 / WAIT_LOOP_PER_SECOND); - usleep(1000 * 1000 / WAIT_LOOP_PER_SECOND); - } -- info("waiting for '%s' failed", filepath); -+ info("waiting for '%s' failed\n", filepath); - return -1; - } - -@@ -707,12 +707,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - if (strncasecmp(&head[1], subst->name, strlen(subst->name)) == 0) { - type = subst->type; - tail = head + strlen(subst->name)+1; -- dbg("will substitute format name '%s'", subst->name); -+ dbg("will substitute format name '%s'\n", subst->name); - goto found; - } - } - head[0] = '$'; -- err("unknown format variable '%s'", head); -+ err("unknown format variable '%s'\n", head); - } else if (head[0] == '%') { - /* substitute format char */ - if (head[1] == '\0') -@@ -730,12 +730,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - if (tail[0] == subst->fmt) { - type = subst->type; - tail++; -- dbg("will substitute format char '%c'", subst->fmt); -+ dbg("will substitute format char '%c'\n", subst->fmt); - goto found; - } - } - head[0] = '%'; -- err("unknown format char '%c'", tail[0]); -+ err("unknown format char '%c'\n", tail[0]); - } - head++; - } -@@ -743,42 +743,42 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - found: - attr = get_format_attribute(&tail); - strlcpy(temp, tail, sizeof(temp)); -- dbg("format=%i, string='%s', tail='%s'", type ,string, tail); -+ dbg("format=%i, string='%s', tail='%s'\n", type ,string, tail); - - switch (type) { - case SUBST_DEVPATH: - strlcat(string, udev->dev->devpath, maxsize); -- dbg("substitute devpath '%s'", udev->dev->devpath); -+ dbg("substitute devpath '%s'\n", udev->dev->devpath); - break; - case SUBST_KERNEL: - strlcat(string, udev->dev->kernel, maxsize); -- dbg("substitute kernel name '%s'", udev->dev->kernel); -+ dbg("substitute kernel name '%s'\n", udev->dev->kernel); - break; - case SUBST_KERNEL_NUMBER: - strlcat(string, udev->dev->kernel_number, maxsize); -- dbg("substitute kernel number '%s'", udev->dev->kernel_number); -+ dbg("substitute kernel number '%s'\n", udev->dev->kernel_number); - break; - case SUBST_ID: - if (udev->dev_parent != NULL) { - strlcat(string, udev->dev_parent->kernel, maxsize); -- dbg("substitute id '%s'", udev->dev_parent->kernel); -+ dbg("substitute id '%s'\n", udev->dev_parent->kernel); - } - break; - case SUBST_DRIVER: - if (udev->dev_parent != NULL) { - strlcat(string, udev->dev_parent->driver, maxsize); -- dbg("substitute driver '%s'", udev->dev_parent->driver); -+ dbg("substitute driver '%s'\n", udev->dev_parent->driver); - } - break; - case SUBST_MAJOR: - sprintf(temp2, "%d", major(udev->devt)); - strlcat(string, temp2, maxsize); -- dbg("substitute major number '%s'", temp2); -+ dbg("substitute major number '%s'\n", temp2); - break; - case SUBST_MINOR: - sprintf(temp2, "%d", minor(udev->devt)); - strlcat(string, temp2, maxsize); -- dbg("substitute minor number '%s'", temp2); -+ dbg("substitute minor number '%s'\n", temp2); - break; - case SUBST_RESULT: - if (udev->program_result[0] == '\0') -@@ -788,7 +788,7 @@ found: - if (attr != NULL) - i = strtoul(attr, &rest, 10); - if (i > 0) { -- dbg("request part #%d of result string", i); -+ dbg("request part #%d of result string\n", i); - cpos = udev->program_result; - while (--i) { - while (cpos[0] != '\0' && !isspace(cpos[0])) -@@ -797,7 +797,7 @@ found: - cpos++; - } - if (i > 0) { -- err("requested part of result string not found"); -+ err("requested part of result string not found\n"); - break; - } - strlcpy(temp2, cpos, sizeof(temp2)); -@@ -808,15 +808,15 @@ found: - cpos[0] = '\0'; - } - strlcat(string, temp2, maxsize); -- dbg("substitute part of result string '%s'", temp2); -+ dbg("substitute part of result string '%s'\n", temp2); - } else { - strlcat(string, udev->program_result, maxsize); -- dbg("substitute result string '%s'", udev->program_result); -+ dbg("substitute result string '%s'\n", udev->program_result); - } - break; - case SUBST_ATTR: - if (attr == NULL) -- err("missing file parameter for attr"); -+ err("missing file parameter for attr\n"); - else { - char devpath[PATH_SIZE]; - char *attrib; -@@ -839,7 +839,7 @@ found: - struct sysfs_device *dev_parent = udev->dev; - - do { -- dbg("looking at '%s'", dev_parent->devpath); -+ dbg("looking at '%s'\n", dev_parent->devpath); - value = sysfs_attr_get_value(dev_parent->devpath, attr); - if (value != NULL) { - strlcpy(temp2, value, sizeof(temp2)); -@@ -860,9 +860,9 @@ found: - temp2[--size] = '\0'; - count = replace_chars(temp2, ALLOWED_CHARS_INPUT); - if (count > 0) -- info("%i character(s) replaced" , count); -+ info("%i character(s) replaced\n" , count); - strlcat(string, temp2, maxsize); -- dbg("substitute sysfs value '%s'", temp2); -+ dbg("substitute sysfs value '%s'\n", temp2); - } - break; - case SUBST_PARENT: -@@ -873,15 +873,15 @@ found: - if (dev_parent != NULL) { - struct udevice *udev_parent; - -- dbg("found parent '%s', get the node name", dev_parent->devpath); -+ dbg("found parent '%s', get the node name\n", dev_parent->devpath); - udev_parent = udev_device_init(NULL); - if (udev_parent != NULL) { - /* lookup the name in the udev_db with the DEVPATH of the parent */ - if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { - strlcat(string, udev_parent->name, maxsize); -- dbg("substitute parent node name'%s'", udev_parent->name); -+ dbg("substitute parent node name'%s'\n", udev_parent->name); - } else -- dbg("parent not found in database"); -+ dbg("parent not found in database\n"); - udev_device_cleanup(udev_parent); - } - } -@@ -889,48 +889,48 @@ found: - break; - case SUBST_TEMP_NODE: - if (udev->tmp_node[0] == '\0' && major(udev->devt) > 0) { -- dbg("create temporary device node for callout"); -+ dbg("create temporary device node for callout\n"); - snprintf(udev->tmp_node, sizeof(udev->tmp_node), "%s/.tmp-%u-%u", - udev_root, major(udev->devt), minor(udev->devt)); - udev->tmp_node[sizeof(udev->tmp_node)-1] = '\0'; - udev_node_mknod(udev, udev->tmp_node, udev->devt, 0600, 0, 0); - } - strlcat(string, udev->tmp_node, maxsize); -- dbg("substitute temporary device node name '%s'", udev->tmp_node); -+ dbg("substitute temporary device node name '%s'\n", udev->tmp_node); - break; - case SUBST_NAME: - strlcat(string, udev->name, maxsize); -- dbg("substitute udev->name '%s'", udev->name); -+ dbg("substitute udev->name '%s'\n", udev->name); - break; - case SUBST_ROOT: - strlcat(string, udev_root, maxsize); -- dbg("substitute udev_root '%s'", udev_root); -+ dbg("substitute udev_root '%s'\n", udev_root); - break; - case SUBST_SYS: - strlcat(string, sysfs_path, maxsize); -- dbg("substitute sysfs_path '%s'", sysfs_path); -+ dbg("substitute sysfs_path '%s'\n", sysfs_path); - break; - case SUBST_ENV: - if (attr == NULL) { -- dbg("missing attribute"); -+ dbg("missing attribute\n"); - break; - } - pos = getenv(attr); - if (pos == NULL) { -- dbg("env '%s' not available", attr); -+ dbg("env '%s' not available\n", attr); - break; - } -- dbg("substitute env '%s=%s'", attr, pos); -+ dbg("substitute env '%s=%s'\n", attr, pos); - strlcat(string, pos, maxsize); - break; - default: -- err("unknown substitution type=%i", type); -+ err("unknown substitution type=%i\n", type); - break; - } - /* possibly truncate to format-char specified length */ - if (len >= 0 && len < (int)strlen(head)) { - head[len] = '\0'; -- dbg("truncate to %i chars, subtitution string becomes '%s'", len, head); -+ dbg("truncate to %i chars, subtitution string becomes '%s'\n", len, head); - } - strlcat(string, temp, maxsize); - } -@@ -960,7 +960,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k - /* look for a matching string, parts are separated by '|' */ - strlcpy(value, rule->buf + key->val_off, sizeof(value)); - key_value = value; -- dbg("key %s value='%s'", key_name, key_value); -+ dbg("key %s value='%s'\n", key_name, key_value); - while (key_value) { - pos = strchr(key_value, '|'); - if (pos) { -@@ -968,7 +968,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k - pos++; - } - -- dbg("match %s '%s' <-> '%s'", key_name, key_value, val); -+ dbg("match %s '%s' <-> '%s'\n", key_name, key_value, val); - match = (fnmatch(key_value, val, 0) == 0); - if (match) - break; -@@ -977,11 +977,11 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k - } - - if (match && (key->operation == KEY_OP_MATCH)) { -- dbg("%s is true (matching value)", key_name); -+ dbg("%s is true (matching value)\n", key_name); - return 0; - } - if (!match && (key->operation == KEY_OP_NOMATCH)) { -- dbg("%s is true (non-matching value)", key_name); -+ dbg("%s is true (non-matching value)\n", key_name); - return 0; - } - return -1; -@@ -1037,7 +1037,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - const char *value = getenv(key_name); - - if (!value) { -- dbg("ENV{'%s'} is not set, treat as empty", key_name); -+ dbg("ENV{'%s'} is not set, treat as empty\n", key_name); - value = ""; - } - if (match_key("ENV", rule, &pair->key, value)) -@@ -1076,10 +1076,10 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - attr_subst_subdir(filename, sizeof(filename)); - - match = (stat(filename, &statbuf) == 0); -- info("'%s' %s", filename, match ? "exists" : "does not exist"); -+ info("'%s' %s", filename, match ? "exists" : "does not exist\n"); - if (match && rule->test_mode_mask > 0) { - match = ((statbuf.st_mode & rule->test_mode_mask) > 0); -- info("'%s' has mode=%#o and %s %#o", filename, statbuf.st_mode, -+ info("'%s' has mode=%#o and %s %#o\n", filename, statbuf.st_mode, - match ? "matches" : "does not match", - rule->test_mode_mask); - } -@@ -1087,7 +1087,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - goto nomatch; - if (!match && rule->test.operation == KEY_OP_MATCH) - goto nomatch; -- dbg("TEST key is true"); -+ dbg("TEST key is true\n"); - } - - if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) { -@@ -1130,7 +1130,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - len = strlen(val); - while (len > 0 && isspace(val[len-1])) - val[--len] = '\0'; -- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); -+ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); - } - - if (match_key("ATTR", rule, &pair->key, val)) -@@ -1178,7 +1178,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - len = strlen(val); - while (len > 0 && isspace(val[len-1])) - val[--len] = '\0'; -- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); -+ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); - } - - if (match_key("ATTRS", rule, &pair->key, val)) -@@ -1190,12 +1190,12 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - break; - try_parent: - /* move to parent device */ -- dbg("try parent sysfs device"); -+ dbg("try parent sysfs device\n"); - udev->dev_parent = sysfs_device_get_parent(udev->dev_parent); - if (udev->dev_parent == NULL) - goto nomatch; -- dbg("looking at dev_parent->devpath='%s'", udev->dev_parent->devpath); -- dbg("looking at dev_parent->kernel='%s'", udev->dev_parent->kernel); -+ dbg("looking at dev_parent->devpath='%s'\n", udev->dev_parent->devpath); -+ dbg("looking at dev_parent->kernel='%s'\n", udev->dev_parent->kernel); - } - - /* execute external program */ -@@ -1206,28 +1206,28 @@ try_parent: - strlcpy(program, key_val(rule, &rule->program), sizeof(program)); - udev_rules_apply_format(udev, program, sizeof(program)); - if (run_program(program, udev->dev->subsystem, result, sizeof(result), NULL) != 0) { -- dbg("PROGRAM is false"); -+ dbg("PROGRAM is false\n"); - udev->program_result[0] = '\0'; - if (rule->program.operation != KEY_OP_NOMATCH) - goto nomatch; - } else { - int count; - -- dbg("PROGRAM matches"); -+ dbg("PROGRAM matches\n"); - remove_trailing_chars(result, '\n'); - if (rule->string_escape == ESCAPE_UNSET || - rule->string_escape == ESCAPE_REPLACE) { - count = replace_chars(result, ALLOWED_CHARS_INPUT); - if (count > 0) -- info("%i character(s) replaced" , count); -+ info("%i character(s) replaced\n" , count); - } -- dbg("result is '%s'", result); -+ dbg("result is '%s'\n", result); - strlcpy(udev->program_result, result, sizeof(udev->program_result)); -- dbg("PROGRAM returned successful"); -+ dbg("PROGRAM returned successful\n"); - if (rule->program.operation == KEY_OP_NOMATCH) - goto nomatch; - } -- dbg("PROGRAM key is true"); -+ dbg("PROGRAM key is true\n"); - } - - /* check for matching result of external program */ -@@ -1241,23 +1241,23 @@ try_parent: - - strlcpy(import, key_val(rule, &rule->import), sizeof(import)); - udev_rules_apply_format(udev, import, sizeof(import)); -- dbg("check for IMPORT import='%s'", import); -+ dbg("check for IMPORT import='%s'\n", import); - if (rule->import_type == IMPORT_PROGRAM) { - rc = import_program_into_env(udev, import); - } else if (rule->import_type == IMPORT_FILE) { -- dbg("import file import='%s'", import); -+ dbg("import file import='%s'\n", import); - rc = import_file_into_env(udev, import); - } else if (rule->import_type == IMPORT_PARENT) { -- dbg("import parent import='%s'", import); -+ dbg("import parent import='%s'\n", import); - rc = import_parent_into_env(udev, import); - } - if (rc != 0) { -- dbg("IMPORT failed"); -+ dbg("IMPORT failed\n"); - if (rule->import.operation != KEY_OP_NOMATCH) - goto nomatch; - } else -- dbg("IMPORT '%s' imported", key_val(rule, &rule->import)); -- dbg("IMPORT key is true"); -+ dbg("IMPORT '%s' imported\n", key_val(rule, &rule->import)); -+ dbg("IMPORT key is true\n"); - } - - /* rule matches, if we have ENV assignments export it */ -@@ -1276,7 +1276,7 @@ try_parent: - if (temp_value[0] == '\0') { - name_list_key_remove(&udev->env_list, key_name); - unsetenv(key_name); -- info("unset ENV '%s'", key_name); -+ info("unset ENV '%s'\n", key_name); - } else { - struct name_entry *entry; - -@@ -1284,7 +1284,7 @@ try_parent: - if (entry == NULL) - break; - putenv(entry->name); -- info("set ENV '%s'", entry->name); -+ info("set ENV '%s'\n", entry->name); - } - } - } -@@ -1321,15 +1321,15 @@ try_parent: - - strlcpy(value, key_val(rule, &pair->key), sizeof(value)); - udev_rules_apply_format(udev, value, sizeof(value)); -- info("writing '%s' to sysfs file '%s'", value, attr); -+ info("writing '%s' to sysfs file '%s'\n", value, attr); - f = fopen(attr, "w"); - if (f != NULL) { - if (!udev->test_run) - if (fprintf(f, "%s", value) <= 0) -- err("error writing ATTR{%s}: %s", attr, strerror(errno)); -+ err("error writing ATTR{%s}: %s\n", attr, strerror(errno)); - fclose(f); - } else -- err("error opening ATTR{%s} for writing: %s", attr, strerror(errno)); -+ err("error opening ATTR{%s} for writing: %s\n", attr, strerror(errno)); - } - } - return 0; -@@ -1343,8 +1343,8 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - struct udev_rule *rule; - int name_set = 0; - -- dbg("udev->dev->devpath='%s'", udev->dev->devpath); -- dbg("udev->dev->kernel='%s'", udev->dev->kernel); -+ dbg("udev->dev->devpath='%s'\n", udev->dev->devpath); -+ dbg("udev->dev->kernel='%s'\n", udev->dev->kernel); - - /* look for a matching rule to apply */ - udev_rules_iter_init(rules); -@@ -1357,31 +1357,31 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - (rule->name.operation == KEY_OP_ASSIGN || - rule->name.operation == KEY_OP_ASSIGN_FINAL || - rule->name.operation == KEY_OP_ADD)) { -- dbg("node name already set, rule ignored"); -+ dbg("node name already set, rule ignored\n"); - continue; - } - -- dbg("process rule"); -+ dbg("process rule\n"); - if (match_rule(udev, rule) == 0) { - /* apply options */ - if (rule->ignore_device) { -- info("rule applied, '%s' is ignored", udev->dev->kernel); -+ info("rule applied, '%s' is ignored\n", udev->dev->kernel); - udev->ignore_device = 1; - return 0; - } - if (rule->ignore_remove) { - udev->ignore_remove = 1; -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - } - if (rule->link_priority != 0) { - udev->link_priority = rule->link_priority; -- info("link_priority=%i", udev->link_priority); -+ info("link_priority=%i\n", udev->link_priority); - } - /* apply all_partitions option only at a main block device */ - if (rule->partitions && - strcmp(udev->dev->subsystem, "block") == 0 && udev->dev->kernel_number[0] == '\0') { - udev->partitions = rule->partitions; -- dbg("creation of partition nodes requested"); -+ dbg("creation of partition nodes requested\n"); - } - - /* apply permissions */ -@@ -1389,21 +1389,21 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) - udev->mode_final = 1; - udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); -- dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); -+ dbg("applied mode=%#o to '%s'\n", udev->mode, udev->dev->kernel); - } - if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { - if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) - udev->owner_final = 1; - strlcpy(udev->owner, key_val(rule, &rule->owner), sizeof(udev->owner)); - udev_rules_apply_format(udev, udev->owner, sizeof(udev->owner)); -- dbg("applied owner='%s' to '%s'", udev->owner, udev->dev->kernel); -+ dbg("applied owner='%s' to '%s'\n", udev->owner, udev->dev->kernel); - } - if (!udev->group_final && rule->group.operation != KEY_OP_UNSET) { - if (rule->group.operation == KEY_OP_ASSIGN_FINAL) - udev->group_final = 1; - strlcpy(udev->group, key_val(rule, &rule->group), sizeof(udev->group)); - udev_rules_apply_format(udev, udev->group, sizeof(udev->group)); -- dbg("applied group='%s' to '%s'", udev->group, udev->dev->kernel); -+ dbg("applied group='%s' to '%s'\n", udev->group, udev->dev->kernel); - } - - /* collect symlinks */ -@@ -1419,7 +1419,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - udev->symlink_final = 1; - if (rule->symlink.operation == KEY_OP_ASSIGN || - rule->symlink.operation == KEY_OP_ASSIGN_FINAL) { -- info("reset symlink list"); -+ info("reset symlink list\n"); - name_list_cleanup(&udev->symlink_list); - } - /* allow multiple symlinks separated by spaces */ -@@ -1429,16 +1429,16 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - rule->string_escape == ESCAPE_REPLACE) { - count = replace_chars(temp, ALLOWED_CHARS_FILE " "); - if (count > 0) -- info("%i character(s) replaced" , count); -+ info("%i character(s) replaced\n" , count); - } -- dbg("rule applied, added symlink(s) '%s'", temp); -+ dbg("rule applied, added symlink(s) '%s'\n", temp); - pos = temp; - while (isspace(pos[0])) - pos++; - next = strchr(pos, ' '); - while (next) { - next[0] = '\0'; -- info("add symlink '%s'", pos); -+ info("add symlink '%s'\n", pos); - name_list_add(&udev->symlink_list, pos, 0); - while (isspace(next[1])) - next++; -@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - next = strchr(pos, ' '); - } - if (pos[0] != '\0') { -- info("add symlink '%s'", pos); -+ info("add symlink '%s'\n", pos); - name_list_add(&udev->symlink_list, pos, 0); - } - } -@@ -1464,12 +1464,12 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - rule->string_escape == ESCAPE_REPLACE) { - count = replace_chars(udev->name, ALLOWED_CHARS_FILE); - if (count > 0) -- info("%i character(s) replaced", count); -+ info("%i character(s) replaced\n", count); - } - -- info("rule applied, '%s' becomes '%s'", udev->dev->kernel, udev->name); -+ info("rule applied, '%s' becomes '%s'\n", udev->dev->kernel, udev->name); - if (strcmp(udev->dev->subsystem, "net") != 0) -- dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i", -+ dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i\n", - udev->name, udev->owner, udev->group, udev->mode, udev->partitions); - } - -@@ -1479,34 +1479,34 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - if (rule->run.operation == KEY_OP_ASSIGN_FINAL) - udev->run_final = 1; - if (rule->run.operation == KEY_OP_ASSIGN || rule->run.operation == KEY_OP_ASSIGN_FINAL) { -- info("reset run list"); -+ info("reset run list\n"); - name_list_cleanup(&udev->run_list); - } -- dbg("add run '%s'", key_val(rule, &rule->run)); -+ dbg("add run '%s'\n", key_val(rule, &rule->run)); - entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); - if (rule->run_ignore_error) - entry->ignore_error = 1; - } - - if (rule->last_rule) { -- dbg("last rule to be applied"); -+ dbg("last rule to be applied\n"); - break; - } - - if (rule->goto_label.operation != KEY_OP_UNSET) { -- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); -+ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); - udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); - } - } - } - - if (!name_set) { -- info("no node name set, will use kernel name '%s'", udev->dev->kernel); -+ info("no node name set, will use kernel name '%s'\n", udev->dev->kernel); - strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); - } - - if (udev->tmp_node[0] != '\0') { -- dbg("removing temporary device node"); -+ dbg("removing temporary device node\n"); - unlink_secure(udev->tmp_node); - udev->tmp_node[0] = '\0'; - } -@@ -1518,7 +1518,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - { - struct udev_rule *rule; - -- dbg("udev->kernel='%s'", udev->dev->kernel); -+ dbg("udev->kernel='%s'\n", udev->dev->kernel); - - /* look for a matching rule to apply */ - udev_rules_iter_init(rules); -@@ -1527,7 +1527,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - if (rule == NULL) - break; - -- dbg("process rule"); -+ dbg("process rule\n"); - if (rule->name.operation == KEY_OP_ASSIGN || - rule->name.operation == KEY_OP_ASSIGN_FINAL || - rule->name.operation == KEY_OP_ADD || -@@ -1536,19 +1536,19 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - 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"); -+ dbg("skip rule that names a device\n"); - continue; - } - - if (match_rule(udev, rule) == 0) { - if (rule->ignore_device) { -- info("rule applied, '%s' is ignored", udev->dev->kernel); -+ info("rule applied, '%s' is ignored\n", udev->dev->kernel); - udev->ignore_device = 1; - return 0; - } - if (rule->ignore_remove) { - udev->ignore_remove = 1; -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - } - - if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { -@@ -1556,10 +1556,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - - if (rule->run.operation == KEY_OP_ASSIGN || - rule->run.operation == KEY_OP_ASSIGN_FINAL) { -- info("reset run list"); -+ info("reset run list\n"); - name_list_cleanup(&udev->run_list); - } -- dbg("add run '%s'", key_val(rule, &rule->run)); -+ dbg("add run '%s'\n", key_val(rule, &rule->run)); - entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); - if (rule->run_ignore_error) - entry->ignore_error = 1; -@@ -1568,12 +1568,12 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - } - - if (rule->last_rule) { -- dbg("last rule to be applied"); -+ dbg("last rule to be applied\n"); - break; - } - - if (rule->goto_label.operation != KEY_OP_UNSET) { -- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); -+ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); - udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); - } - } -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index 6d88354..b586df1 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -33,7 +33,7 @@ - - void udev_rules_iter_init(struct udev_rules *rules) - { -- dbg("bufsize=%zi", rules->bufsize); -+ dbg("bufsize=%zi\n", rules->bufsize); - rules->current = 0; - } - -@@ -44,9 +44,9 @@ struct udev_rule *udev_rules_iter_next(struct udev_rules *rules) - if (!rules) - return NULL; - -- dbg("current=%zi", rules->current); -+ dbg("current=%zi\n", rules->current); - if (rules->current >= rules->bufsize) { -- dbg("no more rules"); -+ dbg("no more rules\n"); - return NULL; - } - -@@ -62,20 +62,20 @@ struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *la - static struct udev_rule *rule; - - next: -- dbg("current=%zi", rules->current); -+ dbg("current=%zi\n", rules->current); - if (rules->current >= rules->bufsize) { -- dbg("no more rules"); -+ dbg("no more rules\n"); - return NULL; - } - rule = (struct udev_rule *) (rules->buf + rules->current); - - if (strcmp(&rule->buf[rule->label.val_off], label) != 0) { -- dbg("moving forward, looking for label '%s'", label); -+ dbg("moving forward, looking for label '%s'\n", label); - rules->current += sizeof(struct udev_rule) + rule->bufsize; - goto next; - } - -- dbg("found label '%s'", label); -+ dbg("found label '%s'\n", label); - return rule; - } - -@@ -123,29 +123,29 @@ static int get_key(char **line, char **key, enum key_operation *operation, char - if (linepos[0] == '=' && linepos[1] == '=') { - *operation = KEY_OP_MATCH; - linepos += 2; -- dbg("operator=match"); -+ dbg("operator=match\n"); - } else if (linepos[0] == '!' && linepos[1] == '=') { - *operation = KEY_OP_NOMATCH; - linepos += 2; -- dbg("operator=nomatch"); -+ dbg("operator=nomatch\n"); - } else if (linepos[0] == '+' && linepos[1] == '=') { - *operation = KEY_OP_ADD; - linepos += 2; -- dbg("operator=add"); -+ dbg("operator=add\n"); - } else if (linepos[0] == '=') { - *operation = KEY_OP_ASSIGN; - linepos++; -- dbg("operator=assign"); -+ dbg("operator=assign\n"); - } else if (linepos[0] == ':' && linepos[1] == '=') { - *operation = KEY_OP_ASSIGN_FINAL; - linepos += 2; -- dbg("operator=assign_final"); -+ dbg("operator=assign_final\n"); - } else - return -1; - - /* terminate key */ - temp[0] = '\0'; -- dbg("key='%s'", *key); -+ dbg("key='%s'\n", *key); - - /* skip whitespace after operator */ - while (isspace(linepos[0])) -@@ -165,7 +165,7 @@ static int get_key(char **line, char **key, enum key_operation *operation, char - return -1; - temp[0] = '\0'; - temp++; -- dbg("value='%s'", *value); -+ dbg("value='%s'\n", *value); - - /* move line to next key */ - *line = temp; -@@ -184,11 +184,11 @@ static char *get_key_attribute(char *str) - attr++; - pos = strchr(attr, '}'); - if (pos == NULL) { -- err("missing closing brace for format"); -+ err("missing closing brace for format\n"); - return NULL; - } - pos[0] = '\0'; -- dbg("attribute='%s'", attr); -+ dbg("attribute='%s'\n", attr); - return attr; - } - -@@ -215,7 +215,7 @@ static int add_rule_key_pair(struct udev_rule *rule, struct key_pairs *pairs, - size_t key_len = strnlen(key, PATH_SIZE); - - if (pairs->count >= PAIRS_MAX) { -- err("skip, too many keys of the same type in a single rule"); -+ err("skip, too many keys of the same type in a single rule\n"); - return -1; - } - -@@ -261,7 +261,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "ACTION") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid ACTION operation"); -+ err("invalid ACTION operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->action, operation, value); -@@ -272,7 +272,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "DEVPATH") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid DEVPATH operation"); -+ err("invalid DEVPATH operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->devpath, operation, value); -@@ -283,7 +283,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "KERNEL") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid KERNEL operation"); -+ err("invalid KERNEL operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->kernel, operation, value); -@@ -294,7 +294,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "SUBSYSTEM") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid SUBSYSTEM operation"); -+ err("invalid SUBSYSTEM operation\n"); - goto invalid; - } - /* bus, class, subsystem events should all be the same */ -@@ -302,7 +302,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strcmp(value, "bus") == 0 || - strcmp(value, "class") == 0) { - if (strcmp(value, "bus") == 0 || strcmp(value, "class") == 0) -- err("'%s' must be specified as 'subsystem' " -+ err("'%s' must be specified as 'subsystem' \n" - "please fix it in %s:%u", value, filename, lineno); - add_rule_key(rule, &rule->subsystem, operation, "subsystem|class|bus"); - } else -@@ -314,7 +314,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "DRIVER") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid DRIVER operation"); -+ err("invalid DRIVER operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->driver, operation, value); -@@ -325,7 +325,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strncasecmp(key, "ATTR{", sizeof("ATTR{")-1) == 0) { - attr = get_key_attribute(key + sizeof("ATTR")-1); - if (attr == NULL) { -- err("error parsing ATTR attribute"); -+ err("error parsing ATTR attribute\n"); - goto invalid; - } - if (add_rule_key_pair(rule, &rule->attr, operation, attr, value) != 0) -@@ -338,7 +338,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strcasecmp(key, "ID") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid KERNELS operation"); -+ err("invalid KERNELS operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->kernels, operation, value); -@@ -350,7 +350,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strcasecmp(key, "BUS") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid SUBSYSTEMS operation"); -+ err("invalid SUBSYSTEMS operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->subsystems, operation, value); -@@ -361,7 +361,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "DRIVERS") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid DRIVERS operation"); -+ err("invalid DRIVERS operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->drivers, operation, value); -@@ -373,19 +373,19 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strncasecmp(key, "SYSFS{", sizeof("SYSFS{")-1) == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid ATTRS operation"); -+ err("invalid ATTRS operation\n"); - goto invalid; - } - attr = get_key_attribute(key + sizeof("ATTRS")-1); - if (attr == NULL) { -- err("error parsing ATTRS attribute"); -+ err("error parsing ATTRS attribute\n"); - goto invalid; - } - if (strncmp(attr, "device/", 7) == 0) -- err("the 'device' link is deprecated and will be removed from a future kernel, " -+ err("the 'device' link is deprecated and will be removed from a future kernel, \n" - "please fix it in %s:%u", filename, lineno); - else if (strstr(attr, "../") != NULL) -- err("do not reference parent sysfs directories directly, that may break with a future kernel, " -+ err("do not reference parent sysfs directories directly, that may break with a future kernel, \n" - "please fix it in %s:%u", filename, lineno); - if (add_rule_key_pair(rule, &rule->attrs, operation, attr, value) != 0) - goto invalid; -@@ -396,7 +396,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strncasecmp(key, "ENV{", sizeof("ENV{")-1) == 0) { - attr = get_key_attribute(key + sizeof("ENV")-1); - if (attr == NULL) { -- err("error parsing ENV attribute"); -+ err("error parsing ENV attribute\n"); - goto invalid; - } - if (strncmp(attr, "PHYSDEV", 7) == 0) -@@ -416,7 +416,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "RESULT") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid RESULT operation"); -+ err("invalid RESULT operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->result, operation, value); -@@ -427,13 +427,13 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strncasecmp(key, "IMPORT", sizeof("IMPORT")-1) == 0) { - attr = get_key_attribute(key + sizeof("IMPORT")-1); - if (attr != NULL && strstr(attr, "program")) { -- dbg("IMPORT will be executed"); -+ dbg("IMPORT will be executed\n"); - rule->import_type = IMPORT_PROGRAM; - } else if (attr != NULL && strstr(attr, "file")) { -- dbg("IMPORT will be included as file"); -+ dbg("IMPORT will be included as file\n"); - rule->import_type = IMPORT_FILE; - } else if (attr != NULL && strstr(attr, "parent")) { -- dbg("IMPORT will include the parent values"); -+ dbg("IMPORT will include the parent values\n"); - rule->import_type = IMPORT_PARENT; - } else { - /* figure it out if it is executable */ -@@ -455,12 +455,12 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - pos[0] = '\0'; - } - -- dbg("IMPORT auto mode for '%s'", file); -+ dbg("IMPORT auto mode for '%s'\n", file); - if (!lstat(file, &statbuf) && (statbuf.st_mode & S_IXUSR)) { -- dbg("IMPORT is executable, will be executed (autotype)"); -+ dbg("IMPORT is executable, will be executed (autotype)\n"); - rule->import_type = IMPORT_PROGRAM; - } else { -- dbg("IMPORT is not executable, will be included as file (autotype)"); -+ dbg("IMPORT is not executable, will be included as file (autotype)\n"); - rule->import_type = IMPORT_FILE; - } - } -@@ -472,7 +472,7 @@ 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"); -+ err("invalid TEST operation\n"); - goto invalid; - } - attr = get_key_attribute(key + sizeof("TEST")-1); -@@ -516,16 +516,16 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - attr = get_key_attribute(key + sizeof("NAME")-1); - if (attr != NULL) { - if (strstr(attr, "all_partitions") != NULL) { -- dbg("creation of partition nodes requested"); -+ dbg("creation of partition nodes requested\n"); - rule->partitions = DEFAULT_PARTITIONS_COUNT; - } - if (strstr(attr, "ignore_remove") != NULL) { -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - rule->ignore_remove = 1; - } - } - if (value[0] == '\0') -- dbg("name empty, node creation supressed"); -+ dbg("name empty, node creation supressed\n"); - add_rule_key(rule, &rule->name, operation, value); - continue; - } -@@ -548,7 +548,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (endptr[0] != '\0') { - char owner[32]; - uid_t uid = lookup_user(value); -- dbg("replacing username='%s' by id=%i", value, uid); -+ dbg("replacing username='%s' by id=%i\n", value, uid); - sprintf(owner, "%u", (unsigned int) uid); - add_rule_key(rule, &rule->owner, operation, owner); - continue; -@@ -567,7 +567,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (endptr[0] != '\0') { - char group[32]; - gid_t gid = lookup_group(value); -- dbg("replacing groupname='%s' by id=%i", value, gid); -+ dbg("replacing groupname='%s' by id=%i\n", value, gid); - sprintf(group, "%u", (unsigned int) gid); - add_rule_key(rule, &rule->group, operation, group); - continue; -@@ -588,21 +588,21 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - const char *pos; - - if (strstr(value, "last_rule") != NULL) { -- dbg("last rule to be applied"); -+ dbg("last rule to be applied\n"); - rule->last_rule = 1; - } - if (strstr(value, "ignore_device") != NULL) { -- dbg("device should be ignored"); -+ dbg("device should be ignored\n"); - rule->ignore_device = 1; - } - if (strstr(value, "ignore_remove") != NULL) { -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - rule->ignore_remove = 1; - } - pos = strstr(value, "link_priority="); - if (pos != NULL) { - rule->link_priority = atoi(&pos[strlen("link_priority=")]); -- dbg("link priority=%i", rule->link_priority); -+ dbg("link priority=%i\n", rule->link_priority); - } - pos = strstr(value, "string_escape="); - if (pos != NULL) { -@@ -613,18 +613,18 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - rule->string_escape = ESCAPE_REPLACE; - } - if (strstr(value, "all_partitions") != NULL) { -- dbg("creation of partition nodes requested"); -+ dbg("creation of partition nodes requested\n"); - rule->partitions = DEFAULT_PARTITIONS_COUNT; - } - valid = 1; - continue; - } - -- err("unknown key '%s' in %s:%u", key, filename, lineno); -+ err("unknown key '%s' in %s:%u\n", key, filename, lineno); - } - - if (physdev && rule->wait_for_sysfs.operation == KEY_OP_UNSET) -- err("PHYSDEV* values are deprecated and will be removed from a future kernel, " -+ err("PHYSDEV* values are deprecated and will be removed from a future kernel, \n" - "please fix it in %s:%u", filename, lineno); - - /* skip line if not any valid key was found */ -@@ -634,23 +634,23 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - /* grow buffer and add rule */ - rule_size = sizeof(struct udev_rule) + rule->bufsize; - padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t); -- dbg("add %zi padding bytes", padding); -+ dbg("add %zi padding bytes\n", padding); - rule_size += padding; - rule->bufsize += padding; - - rules->buf = realloc(rules->buf, rules->bufsize + rule_size); - if (!rules->buf) { -- err("realloc failed"); -+ err("realloc failed\n"); - goto exit; - } -- dbg("adding rule to offset %zi", rules->bufsize); -+ dbg("adding rule to offset %zi\n", rules->bufsize); - memcpy(rules->buf + rules->bufsize, rule, rule_size); - rules->bufsize += rule_size; - exit: - return 0; - - invalid: -- err("invalid rule '%s:%u'", filename, lineno); -+ err("invalid rule '%s:%u'\n", filename, lineno); - return -1; - } - -@@ -666,10 +666,10 @@ static int parse_file(struct udev_rules *rules, const char *filename) - int retval = 0; - - if (file_map(filename, &buf, &bufsize) != 0) { -- err("can't open '%s' as rules file: %s", filename, strerror(errno)); -+ err("can't open '%s' as rules file: %s\n", filename, strerror(errno)); - return -1; - } -- info("reading '%s' as rules file", filename); -+ info("reading '%s' as rules file\n", filename); - - /* loop through the whole file */ - cur = 0; -@@ -695,7 +695,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) - continue; - - if (count >= sizeof(line)) { -- err("line too long, rule skipped '%s:%u'", filename, lineno); -+ err("line too long, rule skipped '%s:%u'\n", filename, lineno); - continue; - } - -@@ -708,7 +708,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) - } - line[j] = '\0'; - -- dbg("read '%s'", line); -+ dbg("read '%s'\n", line); - add_to_rules(rules, line, filename, lineno); - } - -@@ -733,10 +733,10 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) - if (stat(udev_rules_dir, &statbuf) != 0) - return -1; - if ((statbuf.st_mode & S_IFMT) != S_IFDIR) { -- dbg("parse single rules file '%s'", udev_rules_dir); -+ dbg("parse single rules file '%s'\n", udev_rules_dir); - name_list_add(&name_list, udev_rules_dir, 1); - } else { -- dbg("parse rules directory '%s'", udev_rules_dir); -+ dbg("parse rules directory '%s'\n", udev_rules_dir); - retval = add_matching_files(&name_list, udev_rules_dir, RULESFILE_SUFFIX); - } - -@@ -776,9 +776,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) - if (statbuf.st_size) - parse_file(rules, name_loop->name); - else -- dbg("empty rules file '%s'", name_loop->name); -+ dbg("empty rules file '%s'\n", name_loop->name); - } else -- err("could not read '%s': %s", name_loop->name, strerror(errno)); -+ err("could not read '%s': %s\n", name_loop->name, strerror(errno)); - list_del(&name_loop->node); - free(name_loop); - } -diff --git a/udev_selinux.c b/udev_selinux.c -index 3fa84a0..eec9501 100644 ---- a/udev_selinux.c -+++ b/udev_selinux.c -@@ -40,7 +40,7 @@ static int is_selinux_running(void) - if (selinux_enabled == -1) - selinux_enabled = (is_selinux_enabled() > 0); - -- dbg("selinux=%i", selinux_enabled); -+ dbg("selinux=%i\n", selinux_enabled); - return selinux_enabled; - } - -@@ -75,7 +75,7 @@ static char *get_media(const char *devname, int mode) - } - - media = strdup(mediabuf); -- info("selinux_get_media(%s)='%s'", devname, media); -+ info("selinux_get_media(%s)='%s'\n", devname, media); - - close_out: - fclose(fp); -@@ -100,12 +100,12 @@ void selinux_setfilecon(const char *file, const char *devname, unsigned int mode - - if (ret < 0) - if (matchpathcon(file, mode, &scontext) < 0) { -- err("matchpathcon(%s) failed", file); -+ err("matchpathcon(%s) failed\n", file); - return; - } - - if (lsetfilecon(file, scontext) < 0) -- err("setfilecon %s failed: %s", file, strerror(errno)); -+ err("setfilecon %s failed: %s\n", file, strerror(errno)); - - freecon(scontext); - } -@@ -128,12 +128,12 @@ void selinux_setfscreatecon(const char *file, const char *devname, unsigned int - - if (ret < 0) - if (matchpathcon(file, mode, &scontext) < 0) { -- err("matchpathcon(%s) failed", file); -+ err("matchpathcon(%s) failed\n", file); - return; - } - - if (setfscreatecon(scontext) < 0) -- err("setfscreatecon %s failed: %s", file, strerror(errno)); -+ err("setfscreatecon %s failed: %s\n", file, strerror(errno)); - - freecon(scontext); - } -@@ -143,7 +143,7 @@ void selinux_resetfscreatecon(void) - { - if (is_selinux_running()) { - if (setfscreatecon(prev_scontext) < 0) -- err("setfscreatecon failed: %s", strerror(errno)); -+ err("setfscreatecon failed: %s\n", strerror(errno)); - } - } - -@@ -155,10 +155,10 @@ void selinux_init(void) - */ - if (is_selinux_running()) { - if (!udev_root[0]) -- err("selinux_init: udev_root not set"); -+ err("selinux_init: udev_root not set\n"); - matchpathcon_init_prefix(NULL, udev_root); - if (getfscreatecon(&prev_scontext) < 0) { -- err("getfscreatecon failed"); -+ err("getfscreatecon failed\n"); - prev_scontext = NULL; - } - } -diff --git a/udev_sysfs.c b/udev_sysfs.c -index 9293305..c4cd4ab 100644 ---- a/udev_sysfs.c -+++ b/udev_sysfs.c -@@ -52,7 +52,7 @@ int sysfs_init(void) - remove_trailing_chars(sysfs_path, '/'); - } else - strlcpy(sysfs_path, "/sys", sizeof(sysfs_path)); -- dbg("sysfs_path='%s'", sysfs_path); -+ dbg("sysfs_path='%s'\n", sysfs_path); - - INIT_LIST_HEAD(&dev_list); - INIT_LIST_HEAD(&attr_list); -@@ -93,7 +93,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, - if (pos == NULL) - return; - strlcpy(dev->kernel, &pos[1], sizeof(dev->kernel)); -- dbg("kernel='%s'", dev->kernel); -+ dbg("kernel='%s'\n", dev->kernel); - - /* some devices have '!' in their name, change that to '/' */ - pos = dev->kernel; -@@ -108,7 +108,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, - while (isdigit(pos[-1])) - pos--; - strlcpy(dev->kernel_number, pos, sizeof(dev->kernel_number)); -- dbg("kernel_number='%s'", dev->kernel_number); -+ dbg("kernel_number='%s'\n", dev->kernel_number); - } - - int sysfs_resolve_link(char *devpath, size_t size) -@@ -125,11 +125,11 @@ int sysfs_resolve_link(char *devpath, size_t size) - if (len <= 0) - return -1; - link_target[len] = '\0'; -- dbg("path link '%s' points to '%s'", devpath, link_target); -+ dbg("path link '%s' points to '%s'\n", devpath, link_target); - - for (back = 0; strncmp(&link_target[back * 3], "../", 3) == 0; back++) - ; -- dbg("base '%s', tail '%s', back %i", devpath, &link_target[back * 3], back); -+ dbg("base '%s', tail '%s', back %i\n", devpath, &link_target[back * 3], back); - for (i = 0; i <= back; i++) { - char *pos = strrchr(devpath, '/'); - -@@ -137,7 +137,7 @@ int sysfs_resolve_link(char *devpath, size_t size) - return -1; - pos[0] = '\0'; - } -- dbg("after moving back '%s'", devpath); -+ dbg("after moving back '%s'\n", devpath); - strlcat(devpath, "/", size); - strlcat(devpath, &link_target[back * 3], size); - return 0; -@@ -165,7 +165,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - strncmp(devpath, "/block/", 7) != 0) - return NULL; - -- dbg("open '%s'", devpath); -+ dbg("open '%s'\n", devpath); - strlcpy(devpath_real, devpath, sizeof(devpath_real)); - remove_trailing_chars(devpath_real, '/'); - if (devpath[0] == '\0' ) -@@ -174,7 +174,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - /* look for device already in cache (we never put an untranslated path in the cache) */ - list_for_each_entry(dev_loop, &dev_list, node) { - if (strcmp(dev_loop->devpath, devpath_real) == 0) { -- dbg("found in cache '%s'", dev_loop->devpath); -+ dbg("found in cache '%s'\n", dev_loop->devpath); - return dev_loop; - } - } -@@ -183,7 +183,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - strlcpy(path, sysfs_path, sizeof(path)); - strlcat(path, devpath_real, sizeof(path)); - if (lstat(path, &statbuf) != 0) { -- dbg("stat '%s' failed: %s", path, strerror(errno)); -+ dbg("stat '%s' failed: %s\n", path, strerror(errno)); - return NULL; - } - if (S_ISLNK(statbuf.st_mode)) { -@@ -193,14 +193,14 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - /* now look for device in cache after path translation */ - list_for_each_entry(dev_loop, &dev_list, node) { - if (strcmp(dev_loop->devpath, devpath_real) == 0) { -- dbg("found in cache '%s'", dev_loop->devpath); -+ dbg("found in cache '%s'\n", dev_loop->devpath); - return dev_loop; - } - } - } - - /* it is a new device */ -- dbg("new uncached device '%s'", devpath_real); -+ dbg("new uncached device '%s'\n", devpath_real); - dev = malloc(sizeof(struct sysfs_device)); - if (dev == NULL) - return NULL; -@@ -216,7 +216,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - if (len > 0) { - /* get subsystem from "subsystem" link */ - link_target[len] = '\0'; -- dbg("subsystem link '%s' points to '%s'", link_path, link_target); -+ dbg("subsystem link '%s' points to '%s'\n", link_path, link_target); - pos = strrchr(link_target, '/'); - if (pos != NULL) - strlcpy(dev->subsystem, &pos[1], sizeof(dev->subsystem)); -@@ -245,13 +245,13 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - len = readlink(link_path, link_target, sizeof(link_target)); - if (len > 0) { - link_target[len] = '\0'; -- dbg("driver link '%s' points to '%s'", link_path, link_target); -+ dbg("driver link '%s' points to '%s'\n", link_path, link_target); - pos = strrchr(link_target, '/'); - if (pos != NULL) - strlcpy(dev->driver, &pos[1], sizeof(dev->driver)); - } - -- dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'", dev->devpath, dev->subsystem, dev->driver); -+ dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'\n", dev->devpath, dev->subsystem, dev->driver); - list_add(&dev->node, &dev_list); - - return dev; -@@ -262,14 +262,14 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) - char parent_devpath[PATH_SIZE]; - char *pos; - -- dbg("open '%s'", dev->devpath); -+ dbg("open '%s'\n", dev->devpath); - - /* look if we already know the parent */ - if (dev->parent != NULL) - return dev->parent; - - strlcpy(parent_devpath, dev->devpath, sizeof(parent_devpath)); -- dbg("'%s'", parent_devpath); -+ dbg("'%s'\n", parent_devpath); - - /* strip last element */ - pos = strrchr(parent_devpath, '/'); -@@ -280,12 +280,12 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) - if (strncmp(parent_devpath, "/class", 6) == 0) { - pos = strrchr(parent_devpath, '/'); - if (pos == &parent_devpath[6] || pos == parent_devpath) { -- dbg("/class top level, look for device link"); -+ dbg("/class top level, look for device link\n"); - goto device_link; - } - } - if (strcmp(parent_devpath, "/block") == 0) { -- dbg("/block top level, look for device link"); -+ dbg("/block top level, look for device link\n"); - goto device_link; - } - -@@ -334,7 +334,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - ssize_t size; - size_t sysfs_len; - -- dbg("open '%s'/'%s'", devpath, attr_name); -+ dbg("open '%s'/'%s'\n", 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; -@@ -346,23 +346,23 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - /* look for attribute in cache */ - list_for_each_entry(attr_loop, &attr_list, node) { - if (strcmp(attr_loop->path, path) == 0) { -- dbg("found in cache '%s'", attr_loop->path); -+ dbg("found in cache '%s'\n", attr_loop->path); - return attr_loop->value; - } - } - - /* store attribute in cache (also negatives are kept in cache) */ -- dbg("new uncached attribute '%s'", path_full); -+ dbg("new uncached attribute '%s'\n", path_full); - attr = malloc(sizeof(struct sysfs_attr)); - if (attr == NULL) - return NULL; - memset(attr, 0x00, sizeof(struct sysfs_attr)); - strlcpy(attr->path, path, sizeof(attr->path)); -- dbg("add to cache '%s'", path_full); -+ dbg("add to cache '%s'\n", path_full); - list_add(&attr->node, &attr_list); - - if (lstat(path_full, &statbuf) != 0) { -- dbg("stat '%s' failed: %s", path_full, strerror(errno)); -+ dbg("stat '%s' failed: %s\n", path_full, strerror(errno)); - goto out; - } - -@@ -377,7 +377,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - link_target[len] = '\0'; - pos = strrchr(link_target, '/'); - if (pos != NULL) { -- dbg("cache '%s' with link value '%s'", path_full, value); -+ dbg("cache '%s' with link value '%s'\n", path_full, value); - strlcpy(attr->value_local, &pos[1], sizeof(attr->value_local)); - attr->value = attr->value_local; - } -@@ -396,7 +396,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' can not be opened", path_full); -+ dbg("attribute '%s' can not be opened\n", path_full); - goto out; - } - size = read(fd, value, sizeof(value)); -@@ -409,7 +409,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - /* got a valid value, store and return it */ - value[size] = '\0'; - remove_trailing_chars(value, '\n'); -- dbg("cache '%s' with attribute value '%s'", path_full, value); -+ dbg("cache '%s' with attribute value '%s'\n", path_full, value); - strlcpy(attr->value_local, value, sizeof(attr->value_local)); - attr->value = attr->value_local; - -diff --git a/udev_utils.c b/udev_utils.c -index e1630b6..00b67da 100644 ---- a/udev_utils.c -+++ b/udev_utils.c -@@ -62,7 +62,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, - /* avoid duplicate entries */ - list_for_each_entry(name_loop, name_list, node) { - if (strcmp(name_loop->name, name) == 0) { -- dbg("'%s' is already in the list", name); -+ dbg("'%s' is already in the list\n", name); - return name_loop; - } - } -@@ -78,7 +78,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, - return NULL; - - strlcpy(name_new->name, name, sizeof(name_new->name)); -- dbg("adding '%s'", name_new->name); -+ dbg("adding '%s'\n", name_new->name); - list_add_tail(&name_new->node, &name_loop->node); - - return name_new; -@@ -91,7 +91,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke - - list_for_each_entry(name_loop, name_list, node) { - if (strncmp(name_loop->name, key, strlen(key)) == 0) { -- dbg("key already present '%s', replace it", name_loop->name); -+ dbg("key already present '%s', replace it\n", name_loop->name); - snprintf(name_loop->name, sizeof(name_loop->name), "%s=%s", key, value); - name_loop->name[sizeof(name_loop->name)-1] = '\0'; - return name_loop; -@@ -104,7 +104,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke - - snprintf(name_new->name, sizeof(name_new->name), "%s=%s", key, value); - name_new->name[sizeof(name_new->name)-1] = '\0'; -- dbg("adding '%s'", name_new->name); -+ dbg("adding '%s'\n", name_new->name); - list_add_tail(&name_new->node, &name_loop->node); - - return name_new; -@@ -148,10 +148,10 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c - DIR *dir; - char filename[PATH_SIZE]; - -- dbg("open directory '%s'", dirname); -+ dbg("open directory '%s'\n", dirname); - dir = opendir(dirname); - if (dir == NULL) { -- err("unable to open '%s': %s", dirname, strerror(errno)); -+ err("unable to open '%s': %s\n", dirname, strerror(errno)); - return -1; - } - -@@ -173,7 +173,7 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c - if (strcmp(ext, suffix) != 0) - continue; - } -- dbg("put file '%s/%s' into list", dirname, ent->d_name); -+ dbg("put file '%s/%s' into list\n", dirname, ent->d_name); - - snprintf(filename, sizeof(filename), "%s/%s", dirname, ent->d_name); - filename[sizeof(filename)-1] = '\0'; -@@ -193,9 +193,9 @@ uid_t lookup_user(const char *user) - pw = getpwnam(user); - if (pw == NULL) { - if (errno == 0 || errno == ENOENT || errno == ESRCH) -- err("specified user '%s' unknown", user); -+ err("specified user '%s' unknown\n", user); - else -- err("error resolving user '%s': %s", user, strerror(errno)); -+ err("error resolving user '%s': %s\n", user, strerror(errno)); - } else - uid = pw->pw_uid; - -@@ -211,9 +211,9 @@ extern gid_t lookup_group(const char *group) - gr = getgrnam(group); - if (gr == NULL) { - if (errno == 0 || errno == ENOENT || errno == ESRCH) -- err("specified group '%s' unknown", group); -+ err("specified group '%s' unknown\n", group); - else -- err("error resolving group '%s': %s", group, strerror(errno)); -+ err("error resolving group '%s': %s\n", group, strerror(errno)); - } else - gid = gr->gr_gid; - -diff --git a/udev_utils_file.c b/udev_utils_file.c -index 19668b9..a492785 100644 ---- a/udev_utils_file.c -+++ b/udev_utils_file.c -@@ -47,14 +47,14 @@ int create_path(const char *path) - pos--; - pos[0] = '\0'; - -- dbg("stat '%s'", p); -+ dbg("stat '%s'\n", p); - if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) - return 0; - - if (create_path(p) != 0) - return -1; - -- dbg("mkdir '%s'", p); -+ dbg("mkdir '%s'\n", p); - selinux_setfscreatecon(p, NULL, S_IFDIR|0755); - ret = mkdir(p, 0755); - selinux_resetfscreatecon(); -@@ -93,10 +93,10 @@ int delete_path(const char *path) - if (retval) { - if (errno == ENOTEMPTY) - return 0; -- err("rmdir(%s) failed: %s", p, strerror(errno)); -+ err("rmdir(%s) failed: %s\n", p, strerror(errno)); - break; - } -- dbg("removed '%s'", p); -+ dbg("removed '%s'\n", p); - } - return 0; - } -@@ -110,18 +110,18 @@ int unlink_secure(const char *filename) - - retval = chown(filename, 0, 0); - if (retval) -- err("chown(%s, 0, 0) failed: %s", filename, strerror(errno)); -+ err("chown(%s, 0, 0) failed: %s\n", filename, strerror(errno)); - - retval = chmod(filename, 0000); - if (retval) -- err("chmod(%s, 0000) failed: %s", filename, strerror(errno)); -+ err("chmod(%s, 0000) failed: %s\n", filename, strerror(errno)); - - retval = unlink(filename); - if (errno == ENOENT) - retval = 0; - - if (retval) -- err("unlink(%s) failed: %s", filename, strerror(errno)); -+ err("unlink(%s) failed: %s\n", filename, strerror(errno)); - - return retval; - } -diff --git a/udevadm.c b/udevadm.c -index e2b7779..6e7d773 100644 ---- a/udevadm.c -+++ b/udevadm.c -@@ -26,7 +26,7 @@ - - #include "udev.h" - --static int verbose; -+static int debug; - - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) -@@ -37,9 +37,8 @@ void log_message(int priority, const char *format, ...) - return; - - va_start(args, format); -- if (verbose) { -+ if (debug) { - vprintf(format, args); -- printf("\n"); - } else - vsyslog(priority, format, args); - va_end(args); -@@ -50,7 +49,7 @@ struct command { - const char *name; - int (*cmd)(int argc, char *argv[], char *envp[]); - const char *help; -- int verbose; -+ int debug; - }; - - static const struct command cmds[]; -@@ -102,7 +101,7 @@ static const struct command cmds[] = { - .name = "test", - .cmd = udevtest, - .help = "simulation run", -- .verbose = 1, -+ .debug = 1, - }, - { - .name = "version", -@@ -155,7 +154,7 @@ int main(int argc, char *argv[], char *envp[]) - /* find and execute command */ - for (cmd = cmds; cmd->name != NULL; cmd++) { - if (strcmp(cmd->name, command) == 0) { -- verbose = cmd->verbose; -+ debug = cmd->debug; - rc = cmd->cmd(argc, argv, envp); - goto out; - } -diff --git a/udevcontrol.c b/udevcontrol.c -index f6b5dd9..287e8aa 100644 ---- a/udevcontrol.c -+++ b/udevcontrol.c -@@ -50,7 +50,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - udev_log = log_priority(env); - - logging_init("udevcontrol"); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - - if (argc < 2) { - fprintf(stderr, "missing command\n\n"); -@@ -75,7 +75,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - val = &arg[strlen("log_priority=")]; - ctrl_msg.type = UDEVD_CTRL_SET_LOG_LEVEL; - *intval = log_priority(val); -- info("send log_priority=%i", *intval); -+ info("send log_priority=%i\n", *intval); - } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) { - char *endp; - int count; -@@ -89,7 +89,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - goto exit; - } - *intval = count; -- info("send max_childs=%i", *intval); -+ info("send max_childs=%i\n", *intval); - } else if (!strncmp(arg, "max_childs_running=", strlen("max_childs_running="))) { - char *endp; - int count; -@@ -103,7 +103,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - goto exit; - } - *intval = count; -- info("send max_childs_running=%i", *intval); -+ info("send max_childs_running=%i\n", *intval); - } else if (!strncmp(arg, "env", strlen("env"))) { - val = argv[2]; - if (val == NULL) { -@@ -112,7 +112,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - } - ctrl_msg.type = UDEVD_CTRL_ENV; - strlcpy(ctrl_msg.buf, val, sizeof(ctrl_msg.buf)); -- info("send env '%s'", val); -+ info("send env '%s'\n", val); - } else if (strcmp(arg, "help") == 0 || strcmp(arg, "-h") == 0) { - printf("Usage: udevadm control COMMAND\n" - " --log_priority= set the udev log level for the daemon\n" -@@ -136,7 +136,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - - sock = socket(AF_LOCAL, SOCK_DGRAM, 0); - if (sock == -1) { -- err("error getting socket: %s", strerror(errno)); -+ err("error getting socket: %s\n", strerror(errno)); - goto exit; - } - -@@ -148,10 +148,10 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - - retval = sendto(sock, &ctrl_msg, sizeof(ctrl_msg), 0, (struct sockaddr *)&saddr, addrlen); - if (retval == -1) { -- err("error sending message: %s", strerror(errno)); -+ err("error sending message: %s\n", strerror(errno)); - retval = 1; - } else { -- dbg("sent message type=0x%02x, %u bytes sent", ctrl_msg.type, retval); -+ dbg("sent message type=0x%02x, %u bytes sent\n", ctrl_msg.type, retval); - retval = 0; - } - -diff --git a/udevd.8 b/udevd.8 -index 1323313..210ed3f 100644 ---- a/udevd.8 -+++ b/udevd.8 -@@ -14,7 +14,7 @@ - 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] -+\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] - .SH "DESCRIPTION" - .PP - udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the correct event order and takes care, that events for child devices are delayed until the parent event has finished the device handling\. The behavior of the running daemon can be changed with -@@ -31,7 +31,7 @@ Detach and run in the background\. - 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 -+\fB\-\-debug\fR - .RS 4 - Print log messages to stdout\. - .RE -diff --git a/udevd.c b/udevd.c -index 7786ae6..66a410e 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -46,7 +46,7 @@ - #include "udev_selinux.h" - - static int debug_trace; --static int verbose; -+static int debug; - - static struct udev_rules rules; - static int udevd_sock = -1; -@@ -77,10 +77,9 @@ void log_message(int priority, const char *format, ...) - return; - - va_start(args, format); -- if (verbose) { -+ if (debug) { - printf("[%d] ", (int) getpid()); - vprintf(format, args); -- printf("\n"); - } else - vsyslog(priority, format, args); - va_end(args); -@@ -184,7 +183,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - 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'", -+ info("renamed devpath, moved failed state of '%s' to %s'\n", - msg->devpath_old, msg->devpath); - } else { - unlink(filename_failed); -@@ -241,19 +240,19 @@ static void udev_event_run(struct udevd_uevent_msg *msg) - setpriority(PRIO_PROCESS, 0, UDEV_PRIORITY); - - retval = udev_event_process(msg); -- info("seq %llu finished with %i", msg->seqnum, retval); -+ info("seq %llu finished with %i\n", msg->seqnum, retval); - - logging_close(); - if (retval) - exit(1); - exit(0); - case -1: -- err("fork of child failed: %s", strerror(errno)); -+ err("fork of child failed: %s\n", strerror(errno)); - msg_queue_delete(msg); - break; - default: - /* get SIGCHLD in main loop */ -- info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old", -+ info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old\n", - msg->seqnum, pid, msg->action, msg->subsystem, time(NULL) - msg->queue_time); - msg->pid = pid; - } -@@ -279,7 +278,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) - } - - export_event_state(msg, EVENT_QUEUED); -- info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); -+ info("seq %llu queued, '%s' '%s'\n", msg->seqnum, msg->action, msg->subsystem); - - /* run one event after the other in debug mode */ - if (debug_trace) { -@@ -476,7 +475,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - - /* check identical, parent, or child device event */ - if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { -- dbg("%llu, device event still pending %llu (%s)", -+ dbg("%llu, device event still pending %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 3; - } -@@ -484,7 +483,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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, -+ dbg("%llu, device event still pending %llu (%d:%d)\n", msg->seqnum, - loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); - return 4; - } -@@ -492,7 +491,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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)", -+ dbg("%llu, physical device event still pending %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 5; - } -@@ -501,7 +500,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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); -+ dbg("%llu, maximum number (%i) of childs reached\n", msg->seqnum, childs_count); - return 1; - } - -@@ -512,7 +511,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - - /* check identical, parent, or child device event */ - if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { -- dbg("%llu, device event still running %llu (%s)", -+ dbg("%llu, device event still running %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 3; - } -@@ -520,7 +519,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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, -+ dbg("%llu, device event still running %llu (%d:%d)\n", msg->seqnum, - loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); - return 4; - } -@@ -528,7 +527,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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)", -+ dbg("%llu, physical device event still running %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 5; - } -@@ -547,7 +546,7 @@ static void msg_queue_manager(void) - return; - - running = running_processes(); -- dbg("%d processes runnning on system", running); -+ dbg("%d processes runnning on system\n", running); - if (running < 0) - running = max_childs_running; - -@@ -555,16 +554,16 @@ static void msg_queue_manager(void) - /* check running processes in our session and possibly throttle */ - if (running >= max_childs_running) { - running = running_processes_in_session(sid, max_childs_running+10); -- dbg("at least %d processes running in session", running); -+ dbg("at least %d processes running in session\n", running); - if (running >= max_childs_running) { -- dbg("delay seq %llu, too many processes already running", loop_msg->seqnum); -+ dbg("delay seq %llu, too many processes already running\n", loop_msg->seqnum); - return; - } - } - - /* serialize and wait for parent or child events */ - if (devpath_busy(loop_msg, max_childs) != 0) { -- dbg("delay seq %llu (%s)", loop_msg->seqnum, loop_msg->devpath); -+ dbg("delay seq %llu (%s)\n", loop_msg->seqnum, loop_msg->devpath); - continue; - } - -@@ -572,7 +571,7 @@ static void msg_queue_manager(void) - list_move_tail(&loop_msg->node, &running_list); - udev_event_run(loop_msg); - running++; -- dbg("moved seq %llu to running list", loop_msg->seqnum); -+ dbg("moved seq %llu to running list\n", loop_msg->seqnum); - } - } - -@@ -601,7 +600,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz - keylen = strlen(key); - msg->envp[i] = key; - bufpos += keylen + 1; -- dbg("add '%s' to msg.envp[%i]", msg->envp[i], i); -+ dbg("add '%s' to msg.envp[%i]\n", msg->envp[i], i); - - /* remember some keys for further processing */ - if (strncmp(key, "ACTION=", 7) == 0) -@@ -639,7 +638,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz - msg->envp[i] = NULL; - - if (msg->devpath == NULL || msg->action == NULL) { -- info("DEVPATH or ACTION missing, ignore message"); -+ info("DEVPATH or ACTION missing, ignore message\n"); - free(msg); - return NULL; - } -@@ -672,24 +671,24 @@ static void get_ctrl_msg(void) - size = recvmsg(udevd_sock, &smsg, 0); - if (size < 0) { - if (errno != EINTR) -- err("unable to receive user udevd message: %s", strerror(errno)); -+ err("unable to receive user udevd message: %s\n", strerror(errno)); - return; - } - cmsg = CMSG_FIRSTHDR(&smsg); - cred = (struct ucred *) CMSG_DATA(cmsg); - - if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { -- err("no sender credentials received, message ignored"); -+ err("no sender credentials received, message ignored\n"); - return; - } - - if (cred->uid != 0) { -- err("sender uid=%i, message ignored", cred->uid); -+ err("sender uid=%i, message ignored\n", cred->uid); - return; - } - - if (strncmp(ctrl_msg.magic, UDEVD_CTRL_MAGIC, sizeof(UDEVD_CTRL_MAGIC)) != 0 ) { -- err("message magic '%s' doesn't match, ignore it", ctrl_msg.magic); -+ err("message magic '%s' doesn't match, ignore it\n", ctrl_msg.magic); - return; - } - -@@ -697,50 +696,50 @@ static void get_ctrl_msg(void) - case UDEVD_CTRL_ENV: - pos = strchr(ctrl_msg.buf, '='); - if (pos == NULL) { -- err("wrong key format '%s'", ctrl_msg.buf); -+ err("wrong key format '%s'\n", ctrl_msg.buf); - break; - } - pos[0] = '\0'; - if (pos[1] == '\0') { -- info("udevd message (ENV) received, unset '%s'", ctrl_msg.buf); -+ info("udevd message (ENV) received, unset '%s'\n", ctrl_msg.buf); - unsetenv(ctrl_msg.buf); - } else { -- info("udevd message (ENV) received, set '%s=%s'", ctrl_msg.buf, &pos[1]); -+ info("udevd message (ENV) received, set '%s=%s'\n", 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"); -+ info("udevd message (STOP_EXEC_QUEUE) received\n"); - stop_exec_q = 1; - break; - case UDEVD_CTRL_START_EXEC_QUEUE: -- info("udevd message (START_EXEC_QUEUE) received"); -+ info("udevd message (START_EXEC_QUEUE) received\n"); - stop_exec_q = 0; - msg_queue_manager(); - break; - case UDEVD_CTRL_SET_LOG_LEVEL: - intval = (int *) ctrl_msg.buf; -- info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i", *intval); -+ info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i\n", *intval); - udev_log_priority = *intval; - sprintf(udev_log, "UDEV_LOG=%i", udev_log_priority); - putenv(udev_log); - break; - case UDEVD_CTRL_SET_MAX_CHILDS: - intval = (int *) ctrl_msg.buf; -- info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i", *intval); -+ info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i\n", *intval); - max_childs = *intval; - break; - case UDEVD_CTRL_SET_MAX_CHILDS_RUNNING: - intval = (int *) ctrl_msg.buf; -- info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i", *intval); -+ info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i\n", *intval); - max_childs_running = *intval; - break; - case UDEVD_CTRL_RELOAD_RULES: -- info("udevd message (RELOAD_RULES) received"); -+ info("udevd message (RELOAD_RULES) received\n"); - reload_config = 1; - break; - default: -- err("unknown control message type"); -+ err("unknown control message type\n"); - } - } - -@@ -756,14 +755,14 @@ static struct udevd_uevent_msg *get_netlink_msg(void) - size = recv(uevent_netlink_sock, &buffer, sizeof(buffer), 0); - if (size < 0) { - if (errno != EINTR) -- err("unable to receive kernel netlink message: %s", strerror(errno)); -+ err("unable to receive kernel netlink message: %s\n", strerror(errno)); - return NULL; - } - - if ((size_t)size > sizeof(buffer)-1) - size = sizeof(buffer)-1; - buffer[size] = '\0'; -- dbg("uevent_size=%zi", size); -+ dbg("uevent_size=%zi\n", size); - - /* start of event payload */ - bufpos = strlen(buffer)+1; -@@ -774,20 +773,20 @@ static struct udevd_uevent_msg *get_netlink_msg(void) - /* validate message */ - pos = strchr(buffer, '@'); - if (pos == NULL) { -- err("invalid uevent '%s'", buffer); -+ err("invalid uevent '%s'\n", buffer); - free(msg); - return NULL; - } - pos[0] = '\0'; - - if (msg->action == NULL) { -- info("no ACTION in payload found, skip event '%s'", buffer); -+ info("no ACTION in payload found, skip event '%s'\n", buffer); - free(msg); - return NULL; - } - - if (strcmp(msg->action, buffer) != 0) { -- err("ACTION in payload does not match uevent, skip event '%s'", buffer); -+ err("ACTION in payload does not match uevent, skip event '%s'\n", buffer); - free(msg); - return NULL; - } -@@ -822,7 +821,7 @@ static void udev_done(int pid, int exitstatus) - - list_for_each_entry(msg, &running_list, node) { - if (msg->pid == pid) { -- info("seq %llu, pid [%d] exit with %i, %ld seconds old", msg->seqnum, msg->pid, -+ info("seq %llu, pid [%d] exit with %i, %ld seconds old\n", msg->seqnum, msg->pid, - exitstatus, time(NULL) - msg->queue_time); - msg->exitstatus = exitstatus; - msg_queue_delete(msg); -@@ -868,14 +867,14 @@ static int init_udevd_socket(void) - - udevd_sock = socket(AF_LOCAL, SOCK_DGRAM, 0); - if (udevd_sock == -1) { -- err("error getting socket: %s", strerror(errno)); -+ err("error getting socket: %s\n", strerror(errno)); - return -1; - } - - /* the bind takes care of ensuring only one copy running */ - retval = bind(udevd_sock, (struct sockaddr *) &saddr, addrlen); - if (retval < 0) { -- err("bind failed: %s", strerror(errno)); -+ err("bind failed: %s\n", strerror(errno)); - close(udevd_sock); - udevd_sock = -1; - return -1; -@@ -900,7 +899,7 @@ static int init_uevent_netlink_sock(void) - - uevent_netlink_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); - if (uevent_netlink_sock == -1) { -- err("error getting socket: %s", strerror(errno)); -+ err("error getting socket: %s\n", strerror(errno)); - return -1; - } - -@@ -909,7 +908,7 @@ static int init_uevent_netlink_sock(void) - - retval = bind(uevent_netlink_sock, (struct sockaddr *) &snl, sizeof(struct sockaddr_nl)); - if (retval < 0) { -- err("bind failed: %s", strerror(errno)); -+ err("bind failed: %s\n", strerror(errno)); - close(uevent_netlink_sock); - uevent_netlink_sock = -1; - return -1; -@@ -957,7 +956,7 @@ int main(int argc, char *argv[], char *envp[]) - static const struct option options[] = { - { "daemon", 0, NULL, 'd' }, - { "debug-trace", 0, NULL, 't' }, -- { "verbose", 0, NULL, 'v' }, -+ { "debug", 0, NULL, 'D' }, - { "help", 0, NULL, 'h' }, - { "version", 0, NULL, 'V' }, - {} -@@ -968,10 +967,10 @@ int main(int argc, char *argv[], char *envp[]) - logging_init("udevd"); - udev_config_init(); - selinux_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - - while (1) { -- option = getopt_long(argc, argv, "dtvhV", options, NULL); -+ option = getopt_long(argc, argv, "dDthV", options, NULL); - if (option == -1) - break; - -@@ -982,13 +981,13 @@ int main(int argc, char *argv[], char *envp[]) - case 't': - debug_trace = 1; - break; -- case 'v': -- verbose = 1; -+ case 'D': -+ debug = 1; - if (udev_log_priority < LOG_INFO) - udev_log_priority = LOG_INFO; - break; - case 'h': -- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n"); -+ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--version]\n"); - goto exit; - case 'V': - printf("%s\n", UDEV_VERSION); -@@ -1000,7 +999,7 @@ int main(int argc, char *argv[], char *envp[]) - - if (getuid() != 0) { - fprintf(stderr, "root privileges required\n"); -- err("root privileges required"); -+ err("root privileges required\n"); - goto exit; - } - -@@ -1008,7 +1007,7 @@ int main(int argc, char *argv[], char *envp[]) - fd = open("/dev/null", O_RDWR); - if (fd < 0) { - fprintf(stderr, "cannot open /dev/null\n"); -- err("cannot open /dev/null"); -+ err("cannot open /dev/null\n"); - } - if (fd > STDIN_FILENO) - dup2(fd, STDIN_FILENO); -@@ -1021,11 +1020,11 @@ int main(int argc, char *argv[], char *envp[]) - if (init_udevd_socket() < 0) { - if (errno == EADDRINUSE) { - fprintf(stderr, "another udev daemon already running\n"); -- err("another udev daemon already running"); -+ err("another udev daemon already running\n"); - rc = 1; - } else { - fprintf(stderr, "error initializing udevd socket\n"); -- err("error initializing udevd socket"); -+ err("error initializing udevd socket\n"); - rc = 2; - } - goto exit; -@@ -1033,7 +1032,7 @@ int main(int argc, char *argv[], char *envp[]) - - if (init_uevent_netlink_sock() < 0) { - fprintf(stderr, "error initializing netlink socket\n"); -- err("error initializing netlink socket"); -+ err("error initializing netlink socket\n"); - rc = 3; - goto exit; - } -@@ -1041,29 +1040,29 @@ int main(int argc, char *argv[], char *envp[]) - /* setup signal handler pipe */ - retval = pipe(signal_pipe); - if (retval < 0) { -- err("error getting pipes: %s", strerror(errno)); -+ err("error getting pipes: %s\n", strerror(errno)); - goto exit; - } - - retval = fcntl(signal_pipe[READ_END], F_GETFL, 0); - if (retval < 0) { -- err("error fcntl on read pipe: %s", strerror(errno)); -+ err("error fcntl on read pipe: %s\n", strerror(errno)); - goto exit; - } - retval = fcntl(signal_pipe[READ_END], F_SETFL, retval | O_NONBLOCK); - if (retval < 0) { -- err("error fcntl on read pipe: %s", strerror(errno)); -+ err("error fcntl on read pipe: %s\n", strerror(errno)); - goto exit; - } - - retval = fcntl(signal_pipe[WRITE_END], F_GETFL, 0); - if (retval < 0) { -- err("error fcntl on write pipe: %s", strerror(errno)); -+ err("error fcntl on write pipe: %s\n", strerror(errno)); - goto exit; - } - retval = fcntl(signal_pipe[WRITE_END], F_SETFL, retval | O_NONBLOCK); - if (retval < 0) { -- err("error fcntl on write pipe: %s", strerror(errno)); -+ err("error fcntl on write pipe: %s\n", strerror(errno)); - goto exit; - } - -@@ -1079,21 +1078,21 @@ int main(int argc, char *argv[], char *envp[]) - pid = fork(); - switch (pid) { - case 0: -- dbg("daemonized fork running"); -+ dbg("daemonized fork running\n"); - break; - case -1: -- err("fork of daemon failed: %s", strerror(errno)); -+ err("fork of daemon failed: %s\n", strerror(errno)); - rc = 4; - goto exit; - default: -- dbg("child [%u] running, parent exits", pid); -+ dbg("child [%u] running, parent exits\n", pid); - rc = 0; - goto exit; - } - } - - /* redirect std{out,err} fd's */ -- if (!verbose) -+ if (!debug) - dup2(fd, STDOUT_FILENO); - dup2(fd, STDERR_FILENO); - if (fd > STDERR_FILENO) -@@ -1107,12 +1106,12 @@ int main(int argc, char *argv[], char *envp[]) - - /* become session leader */ - sid = setsid(); -- dbg("our session is %d", sid); -+ dbg("our session is %d\n", sid); - - /* OOM_DISABLE == -17 */ - fd = open("/proc/self/oom_adj", O_RDWR); - if (fd < 0) -- err("error disabling OOM: %s", strerror(errno)); -+ err("error disabling OOM: %s\n", strerror(errno)); - else { - write(fd, "-17", 3); - close(fd); -@@ -1148,9 +1147,9 @@ int main(int argc, char *argv[], char *envp[]) - strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); - inotify_add_watch(inotify_fd, filename, IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); - } else if (errno == ENOSYS) -- err("the kernel does not support inotify, udevd can't monitor rules file changes"); -+ err("the kernel does not support inotify, udevd can't monitor rules file changes\n"); - else -- err("inotify_init failed: %s", strerror(errno)); -+ err("inotify_init failed: %s\n", strerror(errno)); - - /* maximum limit of forked childs */ - value = getenv("UDEVD_MAX_CHILDS"); -@@ -1163,7 +1162,7 @@ int main(int argc, char *argv[], char *envp[]) - else - max_childs = UDEVD_MAX_CHILDS; - } -- info("initialize max_childs to %u", max_childs); -+ info("initialize max_childs to %u\n", max_childs); - - /* start to throttle forking if maximum number of _running_ childs is reached */ - value = getenv("UDEVD_MAX_CHILDS_RUNNING"); -@@ -1176,7 +1175,7 @@ int main(int argc, char *argv[], char *envp[]) - else - max_childs_running = UDEVD_MAX_CHILDS_RUNNING; - } -- info("initialize max_childs_running to %u", max_childs_running); -+ info("initialize max_childs_running to %u\n", max_childs_running); - - /* clear environment for forked event processes */ - clearenv(); -@@ -1206,7 +1205,7 @@ int main(int argc, char *argv[], char *envp[]) - fdcount = select(maxfd+1, &readfds, NULL, NULL, NULL); - if (fdcount < 0) { - if (errno != EINTR) -- err("error in select: %s", strerror(errno)); -+ err("error in select: %s\n", strerror(errno)); - continue; - } - -@@ -1239,7 +1238,7 @@ int main(int argc, char *argv[], char *envp[]) - reload_config = 1; - buf = malloc(nbytes); - if (buf == NULL) { -- err("error getting buffer for inotify, disable watching"); -+ err("error getting buffer for inotify, disable watching\n"); - close(inotify_fd); - inotify_fd = -1; - } -diff --git a/udevd.xml b/udevd.xml -index 0b3c017..178af4c 100644 ---- a/udevd.xml -+++ b/udevd.xml -@@ -27,7 +27,7 @@ - udevd - - -- -+ - - - -@@ -59,7 +59,7 @@ - - - -- -+ - - Print log messages to stdout. - -diff --git a/udevinfo.c b/udevinfo.c -index 52d409d..a0d6cac 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -69,7 +69,7 @@ static void print_all_attributes(const char *devpath, const char *key) - 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); -+ dbg("attr '%s'='%s'(%zi)\n", dent->d_name, value, len); - - /* remove trailing newlines */ - while (len && value[len-1] == '\n') -@@ -79,7 +79,7 @@ static void print_all_attributes(const char *devpath, const char *key) - while (len && isprint(value[len-1])) - len--; - if (len) { -- dbg("attribute value of '%s' non-printable, skip", dent->d_name); -+ dbg("attribute value of '%s' non-printable, skip\n", dent->d_name); - continue; - } - -@@ -175,7 +175,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) - if (count <= 0) - goto out; - -- info("found %i devices for '%s'", count, name); -+ info("found %i devices for '%s'\n", count, name); - - /* select the device that seems to match */ - list_for_each_entry(device, &name_list, node) { -@@ -185,7 +185,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) - udev_device_init(udev); - if (udev_db_get_device(udev, device->name) != 0) - continue; -- info("found db entry '%s'", device->name); -+ info("found db entry '%s'\n", device->name); - - /* make sure, we don't get a link of a differnt device */ - strlcpy(filename, udev_root, sizeof(filename)); -@@ -194,7 +194,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) - if (stat(filename, &statbuf) != 0) - continue; - if (major(udev->devt) > 0 && udev->devt != statbuf.st_rdev) { -- info("skip '%s', dev_t doesn't match", udev->name); -+ info("skip '%s', dev_t doesn't match\n", udev->name); - continue; - } - rc = 0; -@@ -272,7 +272,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) - if (option == -1) - break; - -- dbg("option '%c'", option); -+ dbg("option '%c'\n", option); - switch (option) { - case 'n': - /* remove /dev if given */ -@@ -281,7 +281,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) - else - strlcpy(name, optarg, sizeof(name)); - remove_trailing_chars(name, '/'); -- dbg("name: %s", name); -+ dbg("name: %s\n", name); - break; - case 'p': - /* remove /sys if given */ -@@ -310,7 +310,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) - } - } - } -- dbg("path: %s", path); -+ dbg("path: %s\n", path); - break; - case 'q': - action = ACTION_QUERY; -diff --git a/udevsettle.c b/udevsettle.c -index e3982a4..4b66f89 100644 ---- a/udevsettle.c -+++ b/udevsettle.c -@@ -57,7 +57,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) - - logging_init("udevsettle"); - udev_config_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - sysfs_init(); - - while (1) { -@@ -72,7 +72,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) - timeout = seconds; - else - fprintf(stderr, "invalid timeout value\n"); -- dbg("timeout=%i", timeout); -+ dbg("timeout=%i\n", timeout); - break; - case 'h': - printf("Usage: udevadm settle [--help] [--timeout=]\n\n"); -@@ -90,13 +90,13 @@ int udevsettle(int argc, char *argv[], char *envp[]) - struct stat statbuf; - - if (stat(queuename, &statbuf) < 0) { -- info("queue is empty"); -+ info("queue is empty\n"); - break; - } - usleep(1000 * 1000 / LOOP_PER_SECOND); - } - if (loop <= 0) { -- info("timeout waiting for queue"); -+ info("timeout waiting for queue\n"); - goto exit; - } - -@@ -112,7 +112,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) - goto exit; - seqnum[len] = '\0'; - seq_udev = strtoull(seqnum, NULL, 10); -- info("udev seqnum = %llu", seq_udev); -+ info("udev seqnum = %llu\n", seq_udev); - - /* read current kernel seqnum */ - strlcpy(filename, sysfs_path, sizeof(filename)); -@@ -126,16 +126,16 @@ int udevsettle(int argc, char *argv[], char *envp[]) - goto exit; - seqnum[len] = '\0'; - seq_kernel = strtoull(seqnum, NULL, 10); -- info("kernel seqnum = %llu", seq_kernel); -+ info("kernel seqnum = %llu\n", seq_kernel); - - /* make sure all kernel events have arrived in the queue */ - if (seq_udev >= seq_kernel) { -- info("queue is empty and no pending events left"); -+ info("queue is empty and no pending events left\n"); - rc = 0; - goto exit; - } - usleep(1000 * 1000 / LOOP_PER_SECOND); -- info("queue is empty, but events still pending"); -+ info("queue is empty, but events still pending\n"); - } - - exit: -diff --git a/udevtest.c b/udevtest.c -index a36e503..8beba21 100644 ---- a/udevtest.c -+++ b/udevtest.c -@@ -62,7 +62,7 @@ static int import_uevent_var(const char *devpath) - if (next == NULL) - goto out; - next[0] = '\0'; -- info("import into environment: '%s'", key); -+ info("import into environment: '%s'\n", key); - putenv(key); - key = &next[1]; - } -@@ -91,7 +91,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - {} - }; - -- info("version %s", UDEV_VERSION); -+ info("version %s\n", UDEV_VERSION); - udev_config_init(); - if (udev_log_priority < LOG_INFO) { - char priority[32]; -@@ -108,7 +108,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - if (option == -1) - break; - -- dbg("option '%c'", option); -+ dbg("option '%c'\n", option); - switch (option) { - case 'a': - action = optarg; -@@ -181,7 +181,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - setenv("ACTION", udev->action, 1); - import_uevent_var(udev->dev->devpath); - -- info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem); -+ info("looking at device '%s' from subsystem '%s'\n", udev->dev->devpath, udev->dev->subsystem); - retval = udev_device_event(&rules, udev); - if (retval == 0 && !udev->ignore_device && udev_run) { - struct name_entry *name_loop; -@@ -191,7 +191,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - - strlcpy(program, name_loop->name, sizeof(program)); - udev_rules_apply_format(udev, program, sizeof(program)); -- info("run: '%s'", program); -+ info("run: '%s'\n", program); - } - } - udev_device_cleanup(udev); -diff --git a/udevtrigger.c b/udevtrigger.c -index e50fd4e..72464c8 100644 ---- a/udevtrigger.c -+++ b/udevtrigger.c -@@ -70,7 +70,7 @@ static int device_list_insert(const char *path) - char devpath[PATH_SIZE]; - struct stat statbuf; - -- dbg("add '%s'" , path); -+ dbg("add '%s'\n" , path); - - /* we only have a device, if we have an uevent file */ - strlcpy(filename, path, sizeof(filename)); -@@ -110,12 +110,12 @@ static void trigger_uevent(const char *devpath, const char *action) - - fd = open(filename, O_WRONLY); - if (fd < 0) { -- dbg("error on opening %s: %s", filename, strerror(errno)); -+ dbg("error on opening %s: %s\n", filename, strerror(errno)); - return; - } - - if (write(fd, action, strlen(action)) < 0) -- info("error writing '%s' to '%s': %s", action, filename, strerror(errno)); -+ info("error writing '%s' to '%s': %s\n", action, filename, strerror(errno)); - - close(fd); - } -@@ -574,7 +574,7 @@ int udevtrigger(int argc, char *argv[], char *envp[]) - - logging_init("udevtrigger"); - udev_config_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - sysfs_init(); - - while (1) { --- -1.5.4.5 - diff --git a/0012-scsi_id-initialize-serial-strings.patch b/0012-scsi_id-initialize-serial-strings.patch deleted file mode 100644 index 6ce9da1..0000000 --- a/0012-scsi_id-initialize-serial-strings.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 803ac7a6d8d06787305a01a068c2e0ca47e2536d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 20 Apr 2008 21:08:45 +0200 -Subject: [PATCH] scsi_id: initialize serial strings - ---- - extras/scsi_id/scsi_id.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 463b377..5381087 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -682,8 +682,8 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - struct sysfs_device *dev_scsi = NULL; - int good_dev; - int page_code; -- char serial[MAX_SERIAL_LEN]; -- char serial_short[MAX_SERIAL_LEN]; -+ char serial[MAX_SERIAL_LEN] = ""; -+ char serial_short[MAX_SERIAL_LEN] = ""; - const char *bus_str = NULL; - - dbg("devpath %s\n", devpath); --- -1.5.4.5 - diff --git a/0013-persistent-device-naming-also-read-unpartitioned-me.patch b/0013-persistent-device-naming-also-read-unpartitioned-me.patch deleted file mode 100644 index 0fa12fe..0000000 --- a/0013-persistent-device-naming-also-read-unpartitioned-me.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 41677cf51fb2c14aa512ecf9410e43eb35560408 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 20 Apr 2008 21:15:00 +0200 -Subject: [PATCH] persistent device naming: also read unpartitioned media - ---- - etc/udev/rules.d/60-persistent-storage.rules | 12 ++++++++++-- - 1 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index a1e0917..85a9270 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -3,6 +3,9 @@ - # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke - -+# forward scsi device event to corresponding block device -+ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -@@ -47,8 +50,13 @@ 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" - --# by-label/by-uuid (filesystem properties) --ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" -+# skip unpartitioned removable media devices from drivers which do not send "change" events -+ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" -+ -+# import filesystem metadata -+IMPORT{program}="vol_id --export $tempnode" -+ -+# by-label/by-uuid links (filesystem metadata) - 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}" - --- -1.5.4.5 - diff --git a/sources b/sources index 29ee647..7e17e38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71d10400458de14f6e46f52a1a591532 udev-120.tar.bz2 +abd3833ba457cdc0cb5163a8bb7ca5d9 udev-121.tar.bz2 diff --git a/udev-120-rhrules.patch b/udev-120-rhrules.patch new file mode 100644 index 0000000..dab159f --- /dev/null +++ b/udev-120-rhrules.patch @@ -0,0 +1,10 @@ +diff -up udev-121/etc/udev/redhat/40-redhat.rules.rhrules udev-121/etc/udev/redhat/40-redhat.rules +--- udev-121/etc/udev/redhat/40-redhat.rules.rhrules 2008-05-09 09:22:23.000000000 +0200 ++++ udev-121/etc/udev/redhat/40-redhat.rules 2008-05-16 11:58:39.000000000 +0200 +@@ -23,3 +23,6 @@ KERNEL=="vcs[0-9]*", OWNER="vc + KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" + KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" ++ ++KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ diff --git a/udev-121-bsg.patch b/udev-121-bsg.patch new file mode 100644 index 0000000..cdd1578 --- /dev/null +++ b/udev-121-bsg.patch @@ -0,0 +1,82 @@ +diff -up udev-121/extras/scsi_id/bsg.h.bsg udev-121/extras/scsi_id/bsg.h +--- udev-121/extras/scsi_id/bsg.h.bsg 2008-05-16 12:04:38.000000000 +0200 ++++ udev-121/extras/scsi_id/bsg.h 2008-05-16 12:04:28.000000000 +0200 +@@ -0,0 +1,78 @@ ++#ifndef BSG_H ++#define BSG_H ++ ++#define BSG_PROTOCOL_SCSI 0 ++ ++#define BSG_SUB_PROTOCOL_SCSI_CMD 0 ++#define BSG_SUB_PROTOCOL_SCSI_TMF 1 ++#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 ++ ++struct sg_io_v4 { ++ __s32 guard; /* [i] 'Q' to differentiate from v3 */ ++ __u32 protocol; /* [i] 0 -> SCSI , .... */ ++ __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task ++ management function, .... */ ++ ++ __u32 request_len; /* [i] in bytes */ ++ __u64 request; /* [i], [*i] {SCSI: cdb} */ ++ __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ ++ __u32 request_attr; /* [i] {SCSI: task attribute} */ ++ __u32 request_priority; /* [i] {SCSI: task priority} */ ++ __u32 request_extra; /* [i] {spare, for padding} */ ++ __u32 max_response_len; /* [i] in bytes */ ++ __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ ++ ++ /* "dout_": data out (to device); "din_": data in (from device) */ ++ __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else ++ dout_xfer points to array of iovec */ ++ __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ ++ __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */ ++ __u32 din_xfer_len; /* [i] bytes to be transferred from device */ ++ __u64 dout_xferp; /* [i], [*i] */ ++ __u64 din_xferp; /* [i], [*o] */ ++ ++ __u32 timeout; /* [i] units: millisecond */ ++ __u32 flags; /* [i] bit mask */ ++ __u64 usr_ptr; /* [i->o] unused internally */ ++ __u32 spare_in; /* [i] */ ++ ++ __u32 driver_status; /* [o] 0 -> ok */ ++ __u32 transport_status; /* [o] 0 -> ok */ ++ __u32 device_status; /* [o] {SCSI: command completion status} */ ++ __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ ++ __u32 info; /* [o] additional information */ ++ __u32 duration; /* [o] time to complete, in milliseconds */ ++ __u32 response_len; /* [o] bytes of response actually written */ ++ __s32 din_resid; /* [o] din_xfer_len - actual_din_xfer_len */ ++ __s32 dout_resid; /* [o] dout_xfer_len - actual_dout_xfer_len */ ++ __u64 generated_tag; /* [o] {SCSI: transport generated task tag} */ ++ __u32 spare_out; /* [o] */ ++ ++ __u32 padding; ++}; ++ ++#ifdef __KERNEL__ ++ ++#if defined(CONFIG_BLK_DEV_BSG) ++struct bsg_class_device { ++ struct class_device *class_dev; ++ struct device *dev; ++ int minor; ++ struct request_queue *queue; ++}; ++ ++extern int bsg_register_queue(struct request_queue *, struct device *, const char *); ++extern void bsg_unregister_queue(struct request_queue *); ++#else ++static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name) ++{ ++ return 0; ++} ++static inline void bsg_unregister_queue(struct request_queue *rq) ++{ ++} ++#endif ++ ++#endif /* __KERNEL__ */ ++ ++#endif diff --git a/udev.spec b/udev.spec index 2eb1ced..435d8ce 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 120 -Release: 5.20080421git%{?dist} +Version: 121 +Release: 1.20080516git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,26 +19,26 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: 0001-writing-udev-rules-fix-rule-typos.patch -Patch2: 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch -Patch3: 0003-vol_id-add-offset-option.patch -Patch4: 0004-cdrom_id-replace-with-version-which-also-exports-me.patch -Patch5: 0005-udevd-at-startup-write-message-including-version-nu.patch -Patch6: 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch -Patch7: 0007-selinux-more-context-settings.patch -Patch8: 0008-selinux-fix-missing-includes.patch -Patch9: 0009-allow-setting-of-MODE-0000.patch -Patch10: 0010-path_id-remove-subsystem-whitelist.patch -Patch11: 0011-logging-add-trailing-newline-to-all-strings.patch -Patch12: 0012-scsi_id-initialize-serial-strings.patch -Patch13: 0013-persistent-device-naming-also-read-unpartitioned-me.patch - +Patch1: 0001-volume_id-clean-up-linux_raid-code.patch +Patch2: 0002-man-udevd-fix-udev-8-reference.patch +Patch3: 0003-man-scsi_id.patch +Patch4: 0004-scsi_id-remove-all-sysfs-dependencies.patch +Patch5: 0005-scsi_id-add-SGv4-support.patch +Patch6: 0006-scsi_id-update-man-page.patch +Patch7: 0007-scsi_id-remove-bus_id-option.patch +Patch8: 0008-scsi_id-add-sg-version-option.patch +Patch9: 0009-rules-adapt-to-new-scsi_id.patch +Patch10: 0010-rules-adapt-tape-rules-to-new-scsi_id.patch +Patch11: 0011-cdrom_id-fix-segfault.patch +Patch12: udev-121-bsg.patch Patch101: udev-116-nettype.patch Patch102: udev-118-sysconf.patch Patch103: udev-089-nopie.patch Patch104: udev-091-lib64.patch +Patch200: udev-120-rhrules.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -99,8 +99,7 @@ which contains functions to get volume ids. %patch9 -p1 -b .git9 %patch10 -p1 -b .git10 %patch11 -p1 -b .git11 -%patch12 -p1 -b .git12 -%patch13 -p1 -b .git13 +%patch12 -p1 -b .bsg %patch101 -p1 -b .nettype %patch102 -p1 -b .sysconf @@ -108,6 +107,8 @@ which contains functions to get volume ids. %patch103 -p1 -b .nopie %patch104 -p1 -b .lib64 +%patch200 -p1 -b .rhrules + %build %if %{with_static} @@ -422,6 +423,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri May 16 2008 Harald Hoyer 121-1.20080516git +- version 121 + latest git fixes + +* Thu Apr 24 2008 Harald Hoyer 120-6.20080421git +- added input/hp_ilo_mouse symlink + * Mon Apr 21 2008 Harald Hoyer 120-4.20080421git - added patches from git: - persistent device naming: also read unpartitioned media From 87b326031720527cb8fd2118e67dc8bf70f2fb26 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 16 May 2008 10:11:19 +0000 Subject: [PATCH 418/640] - version 121 + latest git fixes --- .cvsignore | 2 +- 0001-volume_id-clean-up-linux_raid-code.patch | 93 + 0001-writing-udev-rules-fix-rule-typos.patch | 51 - 0002-man-udevd-fix-udev-8-reference.patch | 37 + ...not-replace-chars-when-printing-ATTR.patch | 24 - 0003-man-scsi_id.patch | 37 + 0003-vol_id-add-offset-option.patch | 135 - ...e-with-version-which-also-exports-me.patch | 834 --- ...csi_id-remove-all-sysfs-dependencies.patch | 683 +++ 0005-scsi_id-add-SGv4-support.patch | 235 + ...p-write-message-including-version-nu.patch | 31 - ...ator-net-rules-always-add-KERNEL-mat.patch | 49 - 0006-scsi_id-update-man-page.patch | 66 + 0007-scsi_id-remove-bus_id-option.patch | 51 + 0007-selinux-more-context-settings.patch | 88 - 0008-scsi_id-add-sg-version-option.patch | 164 + 0008-selinux-fix-missing-includes.patch | 63 - 0009-allow-setting-of-MODE-0000.patch | 93 - 0009-rules-adapt-to-new-scsi_id.patch | 27 + 0010-path_id-remove-subsystem-whitelist.patch | 54 - ...ules-adapt-tape-rules-to-new-scsi_id.patch | 33 + 0011-cdrom_id-fix-segfault.patch | 25 + ...-add-trailing-newline-to-all-strings.patch | 5323 ----------------- 0012-scsi_id-initialize-serial-strings.patch | 27 - ...ce-naming-also-read-unpartitioned-me.patch | 42 - sources | 2 +- udev-120-rhrules.patch | 10 + udev-121-bsg.patch | 82 + udev.spec | 43 +- 29 files changed, 1570 insertions(+), 6834 deletions(-) create mode 100644 0001-volume_id-clean-up-linux_raid-code.patch delete mode 100644 0001-writing-udev-rules-fix-rule-typos.patch create mode 100644 0002-man-udevd-fix-udev-8-reference.patch delete mode 100644 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch create mode 100644 0003-man-scsi_id.patch delete mode 100644 0003-vol_id-add-offset-option.patch delete mode 100644 0004-cdrom_id-replace-with-version-which-also-exports-me.patch create mode 100644 0004-scsi_id-remove-all-sysfs-dependencies.patch create mode 100644 0005-scsi_id-add-SGv4-support.patch delete mode 100644 0005-udevd-at-startup-write-message-including-version-nu.patch delete mode 100644 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch create mode 100644 0006-scsi_id-update-man-page.patch create mode 100644 0007-scsi_id-remove-bus_id-option.patch delete mode 100644 0007-selinux-more-context-settings.patch create mode 100644 0008-scsi_id-add-sg-version-option.patch delete mode 100644 0008-selinux-fix-missing-includes.patch delete mode 100644 0009-allow-setting-of-MODE-0000.patch create mode 100644 0009-rules-adapt-to-new-scsi_id.patch delete mode 100644 0010-path_id-remove-subsystem-whitelist.patch create mode 100644 0010-rules-adapt-tape-rules-to-new-scsi_id.patch create mode 100644 0011-cdrom_id-fix-segfault.patch delete mode 100644 0011-logging-add-trailing-newline-to-all-strings.patch delete mode 100644 0012-scsi_id-initialize-serial-strings.patch delete mode 100644 0013-persistent-device-naming-also-read-unpartitioned-me.patch create mode 100644 udev-120-rhrules.patch create mode 100644 udev-121-bsg.patch diff --git a/.cvsignore b/.cvsignore index 616156a..1f46546 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-120.tar.bz2 +udev-121.tar.bz2 diff --git a/0001-volume_id-clean-up-linux_raid-code.patch b/0001-volume_id-clean-up-linux_raid-code.patch new file mode 100644 index 0000000..0dc7e78 --- /dev/null +++ b/0001-volume_id-clean-up-linux_raid-code.patch @@ -0,0 +1,93 @@ +From 661a0bea80d129d5df708e36dbaed745c9d8392e Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 13 May 2008 00:55:53 +0200 +Subject: [PATCH] volume_id: clean up linux_raid code + +extra global and/or non-static variables suck in shared libraries +use "else if" rather than many "return" calls + +Signed-off-by: Karel Zak +--- + extras/volume_id/lib/linux_raid.c | 25 ++++++++++++------------- + 1 files changed, 12 insertions(+), 13 deletions(-) + +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 96ae7c3..af49658 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -27,7 +27,7 @@ + #include "libvolume_id.h" + #include "util.h" + +-static struct mdp0_super_block { ++struct mdp0_super_block { + uint32_t md_magic; + uint32_t major_version; + uint32_t minor_version; +@@ -44,7 +44,7 @@ static struct mdp0_super_block { + uint32_t set_uuid1; + uint32_t set_uuid2; + uint32_t set_uuid3; +-} PACKED *mdp0; ++} PACKED; + + struct mdp1_super_block { + uint32_t magic; +@@ -53,7 +53,7 @@ struct mdp1_super_block { + uint32_t pad0; + uint8_t set_uuid[16]; + uint8_t set_name[32]; +-} PACKED *mdp1; ++} PACKED; + + #define MD_RESERVED_BYTES 0x10000 + #define MD_SB_MAGIC 0xa92b4efc +@@ -61,6 +61,7 @@ struct mdp1_super_block { + static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint64_t size) + { + const uint8_t *buf; ++ struct mdp0_super_block *mdp0; + union { + uint32_t ints[4]; + uint8_t bytes[16]; +@@ -119,6 +120,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 + static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint64_t size) + { + const uint8_t *buf; ++ struct mdp1_super_block *mdp1; + + info("probing at offset 0x%llx, size 0x%llx\n", + (unsigned long long) off, (unsigned long long) size); +@@ -153,22 +155,19 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size + + /* 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) { ++ if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0) + strcpy(id->type_version, "1.0"); +- return 0; +- } + + /* version 1.1 at the start of the device */ +- if (volume_id_probe_linux_raid1(id, off, size) == 0) { ++ else if (volume_id_probe_linux_raid1(id, off, size) == 0) + strcpy(id->type_version, "1.1"); +- return 0; +- } + + /* version 1.2 at 4k offset from the start */ +- if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { ++ else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) + strcpy(id->type_version, "1.2"); +- return 0; +- } + +- return -1; ++ else ++ return -1; ++ ++ return 0; + } +-- +1.5.4.5 + diff --git a/0001-writing-udev-rules-fix-rule-typos.patch b/0001-writing-udev-rules-fix-rule-typos.patch deleted file mode 100644 index 7c8a2a1..0000000 --- a/0001-writing-udev-rules-fix-rule-typos.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8c1711dcd03e84bfec4bb2ee767d0467fd32f6a5 Mon Sep 17 00:00:00 2001 -From: Daniel Drake -Date: Sun, 6 Apr 2008 07:12:20 +0200 -Subject: [PATCH] writing udev rules: fix rule typos - ---- - docs/writing_udev_rules/index.html | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/docs/writing_udev_rules/index.html b/docs/writing_udev_rules/index.html -index 9289137..5fedb3f 100644 ---- a/docs/writing_udev_rules/index.html -+++ b/docs/writing_udev_rules/index.html -@@ -17,7 +17,7 @@ - -

        Writing udev rules

        - by Daniel Drake (dsd)
        --Version 0.73

        -+Version 0.74

        - - The most recent version of this document can always be found at:
        - -@@ -114,6 +114,7 @@ This document uses various examples (many of which are entirely fictional) to il -

        History

        - -
          -+
        • April 5th 2008 v0.74: Typo fixes.
        • -
        • December 3rd 2007 v0.73: Update for new udev versions, and some miscellaneous improvements.
        • -
        • October 2nd 2006 v0.72: Fixed a typo in one of the example rules.
        • -
        • June 10th 2006 v0.71: Misc changes based on recent feedback - thanks!
        • -@@ -480,7 +481,7 @@ As you can see, udevinfo simply produces a list of attributes you can use as-is - -
          - SUBSYSTEM=="block", ATTR{size}=="234441648", NAME="my_hard_disk"
          --SUBSYSTEM="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk"
          -+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk" - -

          - You may have noted the use of colour in the above examples. This is to demonstrate that while it is legal to combine the attributes from the device in question and a single parent device, you cannot mix-and-match attributes from multiple parent devices - your rule will not work. For example, the following rule is invalid as it attempts to match attributes from two parent devices: -@@ -735,7 +736,7 @@ A USB hard disk is comparable to the USB camera I described above, however typic - Of course, if you have a 100GB USB hard disk, it is perfectly understandable that you might want to partition it, in which case we can take advantage of udev's string substitutions: -

          - --
          KERNEL=="sd*", SUBSYSTEMS="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
          -+
          KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
          - -

          - This rule creates symlinks such as: --- -1.5.4.5 - diff --git a/0002-man-udevd-fix-udev-8-reference.patch b/0002-man-udevd-fix-udev-8-reference.patch new file mode 100644 index 0000000..be1bf9c --- /dev/null +++ b/0002-man-udevd-fix-udev-8-reference.patch @@ -0,0 +1,37 @@ +From 877bded34a528b6436c12678f2430e2ad466f327 Mon Sep 17 00:00:00 2001 +From: MUNEDA Takahiro +Date: Wed, 14 May 2008 04:33:34 +0200 +Subject: [PATCH] man: udevd- fix udev(8) reference + +--- + udevd.8 | 2 +- + udevd.xml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/udevd.8 b/udevd.8 +index 210ed3f..c6b4811 100644 +--- a/udevd.8 ++++ b/udevd.8 +@@ -57,5 +57,5 @@ Written by Kay Sievers + \. + .SH "SEE ALSO" + .PP +-\fBudev\fR(8), ++\fBudev\fR(7), + \fBudevadm\fR(8) +diff --git a/udevd.xml b/udevd.xml +index 178af4c..8d22a0c 100644 +--- a/udevd.xml ++++ b/udevd.xml +@@ -97,7 +97,7 @@ + + SEE ALSO + +- udev8 ++ udev7 + , + + udevadm8 +-- +1.5.4.5 + diff --git a/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch b/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch deleted file mode 100644 index c6b7893..0000000 --- a/0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 573bdd7e7588b70105c2976859696037899e9d4d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 7 Apr 2008 01:57:31 +0200 -Subject: [PATCH] udevinfo: do not replace chars when printing ATTR== matches - ---- - udevinfo.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/udevinfo.c b/udevinfo.c -index 85899cf..52d409d 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -83,7 +83,6 @@ static void print_all_attributes(const char *devpath, const char *key) - continue; - } - -- replace_chars(value, ALLOWED_CHARS_INPUT); - printf(" %s{%s}==\"%s\"\n", key, dent->d_name, value); - } - } --- -1.5.4.5 - diff --git a/0003-man-scsi_id.patch b/0003-man-scsi_id.patch new file mode 100644 index 0000000..41f7c16 --- /dev/null +++ b/0003-man-scsi_id.patch @@ -0,0 +1,37 @@ +From 838436fa328345ffb0b355e6921b6d75a9b2992f Mon Sep 17 00:00:00 2001 +From: MUNEDA Takahiro +Date: Wed, 14 May 2008 04:47:33 +0200 +Subject: [PATCH] man: scsi_id + +--- + extras/scsi_id/scsi_id.8 | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 +index 927549b..aa429a5 100644 +--- a/extras/scsi_id/scsi_id.8 ++++ b/extras/scsi_id/scsi_id.8 +@@ -45,7 +45,7 @@ identifier starts with the NAA value of 6): + + .sp + .nf +-# /sbin/scsi_id --page=0x83 --devpath=/block/sdg ++# scsi_id --page=0x83 --devpath=/block/sdg + 3600a0b80000b174b000000d63efc5c8c + .fi + .P +@@ -131,7 +131,10 @@ warnings are sent using syslog. + .nf + .ft B + .ft +-/etc/scsi_id.config configuration and black/white list entries ++.TP ++\fI/etc/scsi_id.config\fP ++configuration and black/white list entries ++.RE + .fi + .LP + .SH "SEE ALSO" +-- +1.5.4.5 + diff --git a/0003-vol_id-add-offset-option.patch b/0003-vol_id-add-offset-option.patch deleted file mode 100644 index 45784ad..0000000 --- a/0003-vol_id-add-offset-option.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 8b5238670d2e741bc71ae3e79b499682965dc2fd Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 9 Apr 2008 12:35:03 +0200 -Subject: [PATCH] vol_id: add --offset option - ---- - extras/volume_id/lib/Makefile | 2 +- - extras/volume_id/lib/volume_id.c | 10 +++++----- - extras/volume_id/vol_id.c | 14 ++++++++++---- - 3 files changed, 16 insertions(+), 10 deletions(-) - -diff --git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile -index c0905f4..0e1565f 100644 ---- a/extras/volume_id/lib/Makefile -+++ b/extras/volume_id/lib/Makefile -@@ -13,7 +13,7 @@ INSTALL_DATA = ${INSTALL} -m 644 - INSTALL_LIB = ${INSTALL} -m 755 - - SHLIB_CUR = 0 --SHLIB_REV = 82 -+SHLIB_REV = 83 - SHLIB_AGE = 0 - SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE) - -diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c -index e8f6de3..7c68fb1 100644 ---- a/extras/volume_id/lib/volume_id.c -+++ b/extras/volume_id/lib/volume_id.c -@@ -331,9 +331,9 @@ err: - } - - /* run only once into a timeout for unreadable devices */ --static int device_is_readable(struct volume_id *id) -+static int device_is_readable(struct volume_id *id, uint64_t off) - { -- if (volume_id_get_buffer(id, 0x00, 0x200) != NULL) -+ if (volume_id_get_buffer(id, off, 0x200) != NULL) - return 1; - return 0; - } -@@ -355,7 +355,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) - if (id == NULL) - return -EINVAL; - -- if (!device_is_readable(id)) -+ if (!device_is_readable(id, off)) - return -1; - - info("probing at offset 0x%llx, size 0x%llx", -@@ -389,7 +389,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size - if (id == NULL) - return -EINVAL; - -- if (!device_is_readable(id)) -+ if (!device_is_readable(id, off)) - return -1; - - info("probing at offset 0x%llx, size 0x%llx", -@@ -421,7 +421,7 @@ int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size) - if (id == NULL) - return -EINVAL; - -- if (!device_is_readable(id)) -+ if (!device_is_readable(id, off)) - return -1; - - /* probe for raid first, because fs probes may be successful on raid members */ -diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c -index 38950ee..04e85ab 100644 ---- a/extras/volume_id/vol_id.c -+++ b/extras/volume_id/vol_id.c -@@ -134,6 +134,7 @@ int main(int argc, char *argv[]) - { "export", 0, NULL, 'x' }, - { "skip-raid", 0, NULL, 's' }, - { "probe-all", 0, NULL, 'a' }, -+ { "offset", 1, NULL, 'o' }, - { "help", 0, NULL, 'h' }, - {} - }; -@@ -153,6 +154,7 @@ int main(int argc, char *argv[]) - uint64_t size; - int skip_raid = 0; - int probe_all = 0; -+ uint64_t offset = 0; - const char *node; - int fd; - const char *label, *uuid, *type, *type_version, *usage; -@@ -167,7 +169,7 @@ int main(int argc, char *argv[]) - while (1) { - int option; - -- option = getopt_long(argc, argv, "lLutxsah", options, NULL); -+ option = getopt_long(argc, argv, "lLutxsaoh", options, NULL); - if (option == -1) - break; - -@@ -193,6 +195,9 @@ int main(int argc, char *argv[]) - case 'a': - probe_all = 1; - break; -+ case 'o': -+ offset = strtoull(optarg, NULL, 0); -+ break; - case 'h': - printf("Usage: vol_id [options] \n" - " --export export key/value pairs\n" -@@ -202,6 +207,7 @@ int main(int argc, char *argv[]) - " --uuid filesystem uuid\n" - " --skip-raid don't probe for raid\n" - " --probe-all find possibly conflicting signatures\n" -+ " --offset skip given number of bytes of input\n" - " --help\n\n"); - goto exit; - default: -@@ -249,14 +255,14 @@ int main(int argc, char *argv[]) - } - - if (probe_all) { -- volume_id_all_probers(all_probers, vid, 0, size, NULL); -+ volume_id_all_probers(all_probers, vid, offset, size, NULL); - goto exit; - } - - if (skip_raid) -- retval = volume_id_probe_filesystem(vid, 0, size); -+ retval = volume_id_probe_filesystem(vid, offset, size); - else -- retval = volume_id_probe_all(vid, 0, size); -+ retval = volume_id_probe_all(vid, offset, size); - if (retval != 0) { - fprintf(stderr, "%s: unknown volume type\n", node); - rc = 4; --- -1.5.4.5 - diff --git a/0004-cdrom_id-replace-with-version-which-also-exports-me.patch b/0004-cdrom_id-replace-with-version-which-also-exports-me.patch deleted file mode 100644 index bc71cd5..0000000 --- a/0004-cdrom_id-replace-with-version-which-also-exports-me.patch +++ /dev/null @@ -1,834 +0,0 @@ -From fd7a285e6293fddd3fbc68b519dcd367adeb72c4 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 9 Apr 2008 23:17:39 +0200 -Subject: [PATCH] cdrom_id: replace with version which also exports media properties - -This is a 12 track audio CD with additional data session: - $ extras/cdrom_id/cdrom_id /dev/dvd - ID_CDROM=1 - ID_CDROM_CD_R=1 - ID_CDROM_CD_RW=1 - ID_CDROM_DVD=1 - ID_CDROM_DVD_R=1 - ID_CDROM_DVD_RW=1 - ID_CDROM_DVD_RAM=1 - ID_CDROM_DVD_PLUS_R=1 - ID_CDROM_DVD_PLUS_RW=1 - ID_CDROM_DVD_PLUS_R_DL=1 - ID_CDROM_MEDIA_CD=1 - ID_CDROM_MEDIA_STATE=complete - ID_CDROM_MEDIA_HAS_AUDIO=1 - ID_CDROM_MEDIA_SESSION_COUNT=2 - ID_CDROM_MEDIA_TRACK_COUNT=13 - ID_CDROM_MEDIA_SESSION_LAST_OFFSET=444508160 ---- - extras/cdrom_id/60-cdrom_id.rules | 2 +- - extras/cdrom_id/cdrom_id.8 | 15 +- - extras/cdrom_id/cdrom_id.c | 677 +++++++++++++++++++++++++++++++++---- - 3 files changed, 617 insertions(+), 77 deletions(-) - -diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules -index b06dafd..12fbf63 100644 ---- a/extras/cdrom_id/60-cdrom_id.rules -+++ b/extras/cdrom_id/60-cdrom_id.rules -@@ -1,3 +1,3 @@ - # import optical drive properties - --KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" -+ACTION=="add|change", KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" -diff --git a/extras/cdrom_id/cdrom_id.8 b/extras/cdrom_id/cdrom_id.8 -index 4194ae4..1d4d70d 100644 ---- a/extras/cdrom_id/cdrom_id.8 -+++ b/extras/cdrom_id/cdrom_id.8 -@@ -1,17 +1,16 @@ --.TH CDROM_ID 8 "November 2005" "" "Linux Administrator's Manual" -+.TH CDROM_ID 8 "April 2008" "" "Linux Administrator's Manual" - .SH NAME --cdrom_id \- udev callout to determine the capabilities of cd/dvd drives -+cdrom_id \- udev callout to determine the capabilities of optical drives and media - .SH SYNOPSIS - .BI cdrom_id --[\fI--export\fP] \fIblockdevice\fP -+[\fI--export\fP] \fIdevice\fP - .SH "DESCRIPTION" - .B cdrom_id --is normally called from a udev rule, to provide udev with the capabilities --of a cdrom or dvdrom drive. Udev can use this information to create --symlinks like /dev/cdrom or /dev/dvd to the real device node. -+is normally called from a udev rule, to provide udev with the list of -+capabilities of a optical drive. - .SH USAGE - .B cdrom_id --opens the blockdevice node specified at the commandline and prints the -+opens the device node specified at the commandline and prints the - discovered capabilities. - .SH OPTIONS - The following commandline switches are supported to specify what cdrom_id -@@ -23,5 +22,5 @@ print all values (default) - .SH SEE ALSO - .BR udev (7) - .SH AUTHORS --Developed by Greg Kroah\-Hartman . -+Developed by Kay Sievers . - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0d4a8c1..315d276 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -1,12 +1,21 @@ - /* -- * cdrom_id - determines the capabilities of cdrom drives -+ * cdrom_id - optical drive and media information prober - * -- * Copyright (C) 2005 Greg Kroah-Hartman -+ * Copyright (C) 2008 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 program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * - */ - - #ifndef _GNU_SOURCE -@@ -14,50 +23,27 @@ - #endif - - #include -+#include - #include - #include --#include --#include - #include -+#include -+#include - #include --#include -+#include -+#include - #include - #include --#include -- -+#include -+#include -+#include - #include "../../udev.h" - --/* -- * Taken from the cdrom.h kernel include file. -- * Included here as some distros don't have an updated version -- * with all of the DVD flags. So we just include our own, aren't -- * we so nice... -- */ --#define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ -- --/* capability flags used with the uniform CD-ROM driver */ --#define CDC_CLOSE_TRAY 0x1 /* caddy systems _can't_ close */ --#define CDC_OPEN_TRAY 0x2 /* but _can_ eject. */ --#define CDC_LOCK 0x4 /* disable manual eject */ --#define CDC_SELECT_SPEED 0x8 /* programmable speed */ --#define CDC_SELECT_DISC 0x10 /* select disc from juke-box */ --#define CDC_MULTI_SESSION 0x20 /* read sessions>1 */ --#define CDC_MCN 0x40 /* Medium Catalog Number */ --#define CDC_MEDIA_CHANGED 0x80 /* media changed */ --#define CDC_PLAY_AUDIO 0x100 /* audio functions */ --#define CDC_RESET 0x200 /* hard reset device */ --#define CDC_IOCTLS 0x400 /* driver has non-standard ioctls */ --#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */ --#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */ --#define CDC_CD_R 0x2000 /* drive is a CD-R */ --#define CDC_CD_RW 0x4000 /* drive is a CD-RW */ --#define CDC_DVD 0x8000 /* drive is a DVD */ --#define CDC_DVD_R 0x10000 /* drive can write DVD-R */ --#define CDC_DVD_RAM 0x20000 /* drive can write DVD-RAM */ --#define CDC_MO_DRIVE 0x40000 /* drive is an MO device */ --#define CDC_MRW 0x80000 /* drive can read MRW */ --#define CDC_MRW_W 0x100000 /* drive can write MRW */ --#define CDC_RAM 0x200000 /* ok to open for WRITE */ -+#ifndef ARRAY_SIZE -+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -+#endif -+ -+static int debug; - - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) -@@ -73,80 +59,635 @@ void log_message(int priority, const char *format, ...) - udev_log = log_priority(value); - else - udev_log = LOG_ERR; -+ -+ if (debug && udev_log < LOG_INFO) -+ udev_log = LOG_INFO; - } - - if (priority > udev_log) - return; - - va_start(args, format); -- vsyslog(priority, format, args); -+ if (debug) { -+ fprintf(stderr, "[%d] ", (int) getpid()); -+ vfprintf(stderr, format, args); -+ fprintf(stderr, "\n"); -+ } else -+ vsyslog(priority, format, args); - va_end(args); - } - #endif - -+/* device info */ -+static unsigned int cd_cd_rom; -+static unsigned int cd_cd_r; -+static unsigned int cd_cd_rw; -+static unsigned int cd_dvd_rom; -+static unsigned int cd_dvd_r; -+static unsigned int cd_dvd_rw; -+static unsigned int cd_dvd_ram; -+static unsigned int cd_dvd_plus_r; -+static unsigned int cd_dvd_plus_rw; -+static unsigned int cd_dvd_plus_r_dl; -+static unsigned int cd_dvd_plus_rw_dl; -+static unsigned int cd_bd; -+static unsigned int cd_bd_r; -+static unsigned int cd_bd_re; -+static unsigned int cd_hddvd; -+static unsigned int cd_hddvd_r; -+static unsigned int cd_hddvd_rw; -+static unsigned int cd_mo; -+static unsigned int cd_mrw; -+static unsigned int cd_mrw_w; -+ -+/* media info */ -+static unsigned int cd_media_cd_rom; -+static unsigned int cd_media_cd_r; -+static unsigned int cd_media_cd_rw; -+static unsigned int cd_media_dvd_rom; -+static unsigned int cd_media_dvd_r; -+static unsigned int cd_media_dvd_rw; -+static unsigned int cd_media_dvd_ram; -+static unsigned int cd_media_dvd_plus_r; -+static unsigned int cd_media_dvd_plus_rw; -+static unsigned int cd_media_dvd_plus_r_dl; -+static unsigned int cd_media_dvd_plus_rw_dl; -+static unsigned int cd_media_bd; -+static unsigned int cd_media_bd_r; -+static unsigned int cd_media_bd_re; -+static unsigned int cd_media_hddvd; -+static unsigned int cd_media_hddvd_r; -+static unsigned int cd_media_hddvd_rw; -+static unsigned int cd_media_mo; -+static unsigned int cd_media_mrw; -+static unsigned int cd_media_mrw_w; -+ -+static const char *cd_media_state; -+static unsigned int cd_media_has_audio; -+static unsigned int cd_media_session_next; -+static unsigned int cd_media_session_count; -+static unsigned int cd_media_track_count; -+static unsigned long long int cd_media_session_last_offset; -+ -+#define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) -+#define SK(errcode) (((errcode) >> 16) & 0xF) -+#define ASC(errcode) (((errcode) >> 8) & 0xFF) -+#define ASCQ(errcode) ((errcode) & 0xFF) -+ -+static void info_scsi_cmd_err(const char *cmd, int err) -+{ -+ if (err == -1) { -+ info("%s failed", cmd); -+ return; -+ } -+ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); -+} -+ -+struct scsi_cmd { -+ struct cdrom_generic_command cgc; -+ union { -+ struct request_sense s; -+ unsigned char u[18]; -+ } _sense; -+ struct sg_io_hdr sg_io; -+}; -+ -+static void scsi_cmd_set(struct scsi_cmd *cmd, size_t i, int arg) -+{ -+ if (i == 0) { -+ memset(cmd, 0x00, sizeof(struct scsi_cmd)); -+ cmd->cgc.quiet = 1; -+ cmd->cgc.sense = &cmd->_sense.s; -+ memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); -+ cmd->sg_io.interface_id = 'S'; -+ cmd->sg_io.mx_sb_len = sizeof(cmd->_sense); -+ cmd->sg_io.cmdp = cmd->cgc.cmd; -+ cmd->sg_io.sbp = cmd->_sense.u; -+ cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO; -+ } -+ cmd->sg_io.cmd_len = i + 1; -+ cmd->cgc.cmd[i] = arg; -+} -+ -+#define CHECK_CONDITION 0x01 -+ -+static int scsi_cmd_run(struct scsi_cmd *cmd, int fd, unsigned char *buf, size_t bufsize) -+{ -+ int ret = 0; -+ -+ cmd->sg_io.dxferp = buf; -+ cmd->sg_io.dxfer_len = bufsize; -+ cmd->sg_io.dxfer_direction = SG_DXFER_FROM_DEV; -+ if (ioctl(fd, SG_IO, &cmd->sg_io)) -+ return -1; -+ -+ if ((cmd->sg_io.info & SG_INFO_OK_MASK) != SG_INFO_OK) { -+ errno = EIO; -+ ret = -1; -+ if (cmd->sg_io.masked_status & CHECK_CONDITION) { -+ ret = ERRCODE(cmd->_sense.u); -+ if (ret == 0) -+ ret = -1; -+ } -+ } -+ return ret; -+} -+ -+static int cd_capability_compat(int fd) -+{ -+ int capabilty; -+ -+ capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); -+ if (capabilty < 0) { -+ info("CDROM_GET_CAPABILITY failed"); -+ return -1; -+ } -+ -+ if (capabilty & CDC_CD_R) -+ cd_cd_r = 1; -+ if (capabilty & CDC_CD_RW) -+ cd_cd_rw = 1; -+ if (capabilty & CDC_DVD) -+ cd_dvd_rom = 1; -+ if (capabilty & CDC_DVD_R) -+ cd_dvd_r = 1; -+ if (capabilty & CDC_DVD_RAM) -+ cd_dvd_ram = 1; -+ if (capabilty & CDC_MRW) -+ cd_mrw = 1; -+ if (capabilty & CDC_MRW_W) -+ cd_mrw_w = 1; -+ return 0; -+} -+ -+static int cd_inquiry(int fd) { -+ struct scsi_cmd sc; -+ unsigned char inq[128]; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x12); -+ scsi_cmd_set(&sc, 4, 36); -+ scsi_cmd_set(&sc, 5, 0); -+ err = scsi_cmd_run(&sc, fd, inq, 36); -+ if ((err < 0)) { -+ info_scsi_cmd_err("INQUIRY", err); -+ return -1; -+ } -+ -+ if ((inq[0] & 0x1F) != 5) { -+ info("not an MMC unit"); -+ return -1; -+ } -+ -+ info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); -+ return 0; -+} -+ -+static int cd_profiles(int fd) -+{ -+ struct scsi_cmd sc; -+ unsigned char header[8]; -+ unsigned char profiles[512]; -+ unsigned int cur_profile; -+ unsigned int len; -+ unsigned int i; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x46); -+ scsi_cmd_set(&sc, 1, 0); -+ scsi_cmd_set(&sc, 8, sizeof(header)); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("GET CONFIGURATION", err); -+ return -1; -+ } -+ -+ len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); -+ info("GET CONFIGURATION: number of profiles %i", len); -+ if (len > sizeof(profiles)) { -+ info("invalid number of profiles"); -+ return -1; -+ } -+ -+ scsi_cmd_set(&sc, 0, 0x46); -+ scsi_cmd_set(&sc, 1, 1); -+ scsi_cmd_set(&sc, 6, len >> 16); -+ scsi_cmd_set(&sc, 7, len >> 8); -+ scsi_cmd_set(&sc, 8, len); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, profiles, len); -+ if ((err < 0)) { -+ info_scsi_cmd_err("GET CONFIGURATION", err); -+ return -1; -+ } -+ -+ /* device profiles */ -+ for (i = 12; i < profiles[11]; i += 4) { -+ unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); -+ if (profile == 0) -+ continue; -+ info("profile 0x%02x", profile); -+ -+ switch (profile) { -+ case 0x03: -+ case 0x04: -+ case 0x05: -+ cd_mo = 1; -+ break; -+ case 0x10: -+ cd_dvd_rom = 1; -+ break; -+ case 0x12: -+ cd_dvd_ram = 1; -+ break; -+ case 0x13: -+ case 0x14: -+ cd_dvd_rw = 1; -+ break; -+ case 0x1B: -+ cd_dvd_plus_r = 1; -+ break; -+ case 0x1A: -+ cd_dvd_plus_rw = 1; -+ break; -+ case 0x2A: -+ cd_dvd_plus_rw_dl = 1; -+ break; -+ case 0x2B: -+ cd_dvd_plus_r_dl = 1; -+ break; -+ case 0x40: -+ cd_bd = 1; -+ break; -+ case 0x41: -+ case 0x42: -+ cd_bd_r = 1; -+ break; -+ case 0x43: -+ cd_bd_re = 1; -+ break; -+ case 0x50: -+ cd_hddvd = 1; -+ break; -+ case 0x51: -+ cd_hddvd_r = 1; -+ break; -+ case 0x52: -+ cd_hddvd_rw = 1; -+ break; -+ default: -+ break; -+ } -+ } -+ -+ /* current media profile */ -+ cur_profile = header[6] << 8 | header[7]; -+ info("current profile 0x%02x", cur_profile); -+ if (cur_profile == 0) { -+ info("no current profile, assuming no media"); -+ return -1; -+ } -+ -+ switch (cur_profile) { -+ case 0x03: -+ case 0x04: -+ case 0x05: -+ cd_media_mo = 1; -+ break; -+ case 0x08: -+ cd_media_cd_rom = 1; -+ break; -+ case 0x09: -+ cd_media_cd_r = 1; -+ break; -+ case 0x0a: -+ cd_media_cd_rw = 1; -+ break; -+ case 0x10: -+ cd_media_dvd_rom = 1; -+ break; -+ case 0x11: -+ cd_media_dvd_r = 1; -+ break; -+ case 0x12: -+ cd_media_dvd_ram = 1; -+ break; -+ case 0x13: -+ case 0x14: -+ cd_media_dvd_rw = 1; -+ break; -+ case 0x1B: -+ cd_media_dvd_plus_r = 1; -+ break; -+ case 0x1A: -+ cd_media_dvd_plus_rw = 1; -+ break; -+ case 0x2A: -+ cd_media_dvd_plus_rw_dl = 1; -+ break; -+ case 0x2B: -+ cd_media_dvd_plus_r_dl = 1; -+ break; -+ case 0x40: -+ cd_media_bd = 1; -+ break; -+ case 0x41: -+ case 0x42: -+ cd_media_bd_r = 1; -+ break; -+ case 0x43: -+ cd_media_bd_re = 1; -+ break; -+ case 0x50: -+ cd_media_hddvd = 1; -+ break; -+ case 0x51: -+ cd_media_hddvd_r = 1; -+ break; -+ case 0x52: -+ cd_media_hddvd_rw = 1; -+ break; -+ default: -+ break; -+ } -+ return 0; -+} -+ -+static int cd_media_info(int fd) -+{ -+ struct scsi_cmd sc; -+ unsigned char header[32]; -+ static const char *media_status[] = { -+ "blank", -+ "appendable", -+ "complete", -+ "other" -+ }; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x51); -+ scsi_cmd_set(&sc, 8, sizeof(header)); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ DISC INFORMATION", err); -+ return -1; -+ }; -+ -+ info("disk type %02x", header[8]); -+ -+ if ((header[2] & 3) < 4) -+ cd_media_state = media_status[header[2] & 3]; -+ if ((header[2] & 3) != 2) -+ cd_media_session_next = header[10] << 8 | header[5]; -+ cd_media_session_count = header[9] << 8 | header[4]; -+ cd_media_track_count = header[11] << 8 | header[6]; -+ -+ return 0; -+} -+ -+static int cd_media_toc(int fd) -+{ -+ struct scsi_cmd sc; -+ unsigned char header[12]; -+ unsigned char toc[2048]; -+ unsigned int len, i; -+ unsigned char *p; -+ int err; -+ -+ scsi_cmd_set(&sc, 0, 0x43); -+ scsi_cmd_set(&sc, 6, 1); -+ scsi_cmd_set(&sc, 8, sizeof(header)); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ TOC", err); -+ return -1; -+ } -+ -+ len = (header[0] << 8 | header[1]) + 2; -+ info("READ TOC: len: %d", len); -+ if (len > sizeof(toc)) -+ return -1; -+ -+ /* check if we have a data track */ -+ info("ctl %02x (0x04 is data/audio)", header[5]); -+ cd_media_has_audio = (header[5] & 0x04) == 0; -+ -+ scsi_cmd_set(&sc, 0, 0x43); -+ scsi_cmd_set(&sc, 6, header[2]); /* First Track/Session Number */ -+ scsi_cmd_set(&sc, 7, len >> 8); -+ scsi_cmd_set(&sc, 8, len); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, toc, len); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ TOC (tracks)", err); -+ return -1; -+ } -+ -+ for (p = toc+4, i = 4; i < len-8; i += 8, p += 8) { -+ unsigned int block; -+ -+ block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; -+ info("track %u starts at block %u", p[2], block); -+ } -+ -+ scsi_cmd_set(&sc, 0, 0x43); -+ scsi_cmd_set(&sc, 2, 1); /* Session Info */ -+ scsi_cmd_set(&sc, 8, 12); -+ scsi_cmd_set(&sc, 9, 0); -+ err = scsi_cmd_run(&sc, fd, header, sizeof(header)); -+ if ((err < 0)) { -+ info_scsi_cmd_err("READ TOC (multi session)", err); -+ return -1; -+ } -+ len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; -+ info("last track %u starts at block %u", header[4+2], len); -+ cd_media_session_last_offset = (unsigned long long int)len * 2048; -+ return 0; -+} -+ - int main(int argc, char *argv[]) - { -+ static const struct option options[] = { -+ { "export", 0, NULL, 'x' }, -+ { "debug", 0, NULL, 'd' }, -+ { "help", 0, NULL, 'h' }, -+ {} -+ }; - const char *node = NULL; -- int i; - int export = 0; -- int fd; -+ int fd = -1; - int rc = 0; -- int result; - - logging_init("cdrom_id"); - -- for (i = 1 ; i < argc; i++) { -- char *arg = argv[i]; -+ while (1) { -+ int option; - -- if (strcmp(arg, "--export") == 0) { -+ option = getopt_long(argc, argv, "dxh", options, NULL); -+ if (option == -1) -+ break; -+ -+ switch (option) { -+ case 'd': -+ debug = 1; -+ break; -+ case 'x': - export = 1; -- } else -- node = arg; -+ break; -+ case 'h': -+ printf("Usage: cdrom_id [options] \n" -+ " --export export key/value pairs\n" -+ " --help\n\n"); -+ goto exit; -+ default: -+ rc = 1; -+ goto exit; -+ } - } -+ -+ node = argv[optind]; - if (!node) { -- info("no node specified"); -+ err("no device"); -+ fprintf(stderr, "no device\n"); - rc = 1; - goto exit; - } - -- fd = open(node, O_RDONLY|O_NONBLOCK); -+ fd = open(node, O_RDONLY | O_NONBLOCK); - if (fd < 0) { - info("unable to open '%s'", node); - rc = 1; - goto exit; - } -+ info("probing: '%s'", node); -+ -+ /* same data as original cdrom_id */ -+ if (cd_capability_compat(fd) < 0) { -+ rc = 1; -+ goto exit; -+ } - -- result = ioctl(fd, CDROM_GET_CAPABILITY, NULL); -- if (result < 0) { -- info("CDROM_GET_CAPABILITY failed for '%s'", node); -- rc = 3; -- goto close; -+ /* check drive */ -+ if (cd_inquiry(fd) < 0) { -+ rc = 2; -+ goto exit; - } - -- printf("ID_CDROM=1\n"); -+ /* read drive and possibly current profile */ -+ if (cd_profiles(fd) < 0) -+ goto print; -+ -+ /* get session/track info */ -+ if (cd_media_toc(fd) < 0) -+ goto print; - -- if (result & CDC_CD_R) -+ /* get writable media state */ -+ if (cd_media_info(fd) < 0) -+ goto print; -+ -+print: -+ printf("ID_CDROM=1\n"); -+ if (cd_cd_rom) -+ printf("ID_CDROM_CD=1\n"); -+ if (cd_cd_r) - printf("ID_CDROM_CD_R=1\n"); -- if (result & CDC_CD_RW) -+ if (cd_cd_rw) - printf("ID_CDROM_CD_RW=1\n"); -- -- if (result & CDC_DVD) -+ if (cd_dvd_rom) - printf("ID_CDROM_DVD=1\n"); -- if (result & CDC_DVD_R) -+ if (cd_dvd_r) - printf("ID_CDROM_DVD_R=1\n"); -- if (result & CDC_DVD_RAM) -+ if (cd_dvd_rw) -+ printf("ID_CDROM_DVD_RW=1\n"); -+ if (cd_dvd_ram) - printf("ID_CDROM_DVD_RAM=1\n"); -- -- if (result & CDC_MRW) -+ if (cd_dvd_plus_r) -+ printf("ID_CDROM_DVD_PLUS_R=1\n"); -+ if (cd_dvd_plus_rw) -+ printf("ID_CDROM_DVD_PLUS_RW=1\n"); -+ if (cd_dvd_plus_r_dl) -+ printf("ID_CDROM_DVD_PLUS_R_DL=1\n"); -+ if (cd_dvd_plus_rw_dl) -+ printf("ID_CDROM_DVD_PLUS_RW_DL=1\n"); -+ if (cd_bd) -+ printf("ID_CDROM_BD=1\n"); -+ if (cd_bd_r) -+ printf("ID_CDROM_BD_R=1\n"); -+ if (cd_bd_re) -+ printf("ID_CDROM_BD_RE=1\n"); -+ if (cd_hddvd) -+ printf("ID_CDROM_HDDVD=1\n"); -+ if (cd_hddvd_r) -+ printf("ID_CDROM_HDDVD_R=1\n"); -+ if (cd_hddvd_rw) -+ printf("ID_CDROM_HDDVD_RW=1\n"); -+ if (cd_mo) -+ printf("ID_CDROM_MO=1\n"); -+ if (cd_mrw) - printf("ID_CDROM_MRW=1\n"); -- if (result & CDC_MRW_W) -+ if (cd_mrw_w) - printf("ID_CDROM_MRW_W=1\n"); - -- if (result & CDC_RAM) -- printf("ID_CDROM_RAM=1\n"); --close: -- close(fd); -+ if (cd_media_mo) -+ printf("ID_CDROM_MEDIA_MO=1\n"); -+ if (cd_media_mrw) -+ printf("ID_CDROM_MEDIA_MRW=1\n"); -+ if (cd_media_mrw_w) -+ printf("ID_CDROM_MEDIA_MRW_W=1\n"); -+ if (cd_media_cd_rom) -+ printf("ID_CDROM_MEDIA_CD=1\n"); -+ if (cd_media_cd_r) -+ printf("ID_CDROM_MEDIA_CD_R=1\n"); -+ if (cd_media_cd_rw) -+ printf("ID_CDROM_MEDIA_CD_RW=1\n"); -+ if (cd_media_dvd_rom) -+ printf("ID_CDROM_MEDIA_DVD=1\n"); -+ if (cd_media_dvd_r) -+ printf("ID_CDROM_MEDIA_DVD_R=1\n"); -+ if (cd_media_dvd_ram) -+ printf("ID_CDROM_MEDIA_DVD_RAM=1\n"); -+ if (cd_media_dvd_rw) -+ printf("ID_CDROM_MEDIA_DVD_RW=1\n"); -+ if (cd_media_dvd_plus_r) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_R=1\n"); -+ if (cd_media_dvd_plus_rw) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_RW=1\n"); -+ if (cd_media_dvd_plus_rw_dl) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_RW_DL=1\n"); -+ if (cd_media_dvd_plus_r_dl) -+ printf("ID_CDROM_MEDIA_DVD_PLUS_R_DL=1\n"); -+ if (cd_media_bd) -+ printf("ID_CDROM_MEDIA_BD=1\n"); -+ if (cd_media_bd_r) -+ printf("ID_CDROM_MEDIA_BD_R=1\n"); -+ if (cd_media_bd_re) -+ printf("ID_CDROM_MEDIA_BD_RE=1\n"); -+ if (cd_media_hddvd) -+ printf("ID_CDROM_MEDIA_HDDVD=1\n"); -+ if (cd_media_hddvd_r) -+ printf("ID_CDROM_MEDIA_HDDVD_R=1\n"); -+ if (cd_media_hddvd_rw) -+ printf("ID_CDROM_MEDIA_HDDVD_RW=1\n"); -+ -+ if (cd_media_state != NULL) -+ printf("ID_CDROM_MEDIA_STATE=%s\n", cd_media_state); -+ if (cd_media_has_audio) -+ printf("ID_CDROM_MEDIA_HAS_AUDIO=1\n"); -+ if (cd_media_session_next > 0) -+ printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next); -+ if (cd_media_session_count > 0) -+ printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count); -+ if (cd_media_track_count > 0) -+ printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count); -+ if (cd_media_session_last_offset) -+ printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); - exit: -+ if (fd >= 0) -+ close(fd); - logging_close(); - return rc; - } -+ --- -1.5.4.5 - diff --git a/0004-scsi_id-remove-all-sysfs-dependencies.patch b/0004-scsi_id-remove-all-sysfs-dependencies.patch new file mode 100644 index 0000000..2143dcb --- /dev/null +++ b/0004-scsi_id-remove-all-sysfs-dependencies.patch @@ -0,0 +1,683 @@ +From 753417db2ba6faafa3aa30f6b15678e1557e20b8 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 14 May 2008 13:42:41 +0200 +Subject: [PATCH] scsi_id: remove all sysfs dependencies + +--- + extras/scsi_id/scsi_id.c | 213 ++++++------------------------------------ + extras/scsi_id/scsi_id.h | 19 +++- + extras/scsi_id/scsi_serial.c | 85 ++++++++--------- + 3 files changed, 83 insertions(+), 234 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 5381087..4f0233e 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -31,21 +31,14 @@ + #include "scsi_id.h" + #include "scsi_id_version.h" + +-/* temporary names for mknod */ +-#define TMP_DIR "/dev" +-#define TMP_PREFIX "tmp-scsi" +- + static const struct option options[] = { + { "device", 1, NULL, 'd' }, + { "config", 1, NULL, 'f' }, + { "page", 1, NULL, 'p' }, +- { "devpath", 1, NULL, 's' }, +- { "fallback-to-sysfs", 0, NULL, 'a' }, + { "blacklisted", 0, NULL, 'b' }, + { "whitelisted", 0, NULL, 'g' }, + { "prefix-bus-id", 0, NULL, 'i' }, + { "replace-whitespace", 0, NULL, 'u' }, +- { "ignore-sysfs", 0, NULL, 'n' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + { "export", 0, NULL, 'x' }, +@@ -53,21 +46,17 @@ static const struct option options[] = { + {} + }; + +-static const char short_options[] = "abd:f:ghinp:s:uvVx"; ++static const char short_options[] = "d:f:ghip:uvVx"; + static const char dev_short_options[] = "bgp:"; + + static int all_good; +-static int always_info; + static int dev_specified; +-static int sys_specified; + static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; + static int display_bus_id; + static enum page_code default_page_code; + static int use_stderr; + static int debug; +-static int hotplug_mode; + static int reformat_serial; +-static int ignore_sysfs; + static int export; + static char vendor_str[64]; + static char model_str[64]; +@@ -169,35 +158,6 @@ static void set_type(char *to, const char *from, size_t len) + to[len-1] = '\0'; + } + +-static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) +-{ +- unsigned int maj, min; +- const char *attr; +- +- dbg("%s\n", devpath); +- attr = sysfs_attr_get_value(devpath, "dev"); +- if (attr == NULL) { +- dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); +- return -1; +- } +- +- dbg("dev value %s\n", attr); +- if (sscanf(attr, "%u:%u", &maj, &min) != 2) { +- err("%s: invalid dev major/minor\n", devpath); +- return -1; +- } +- +- snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", +- TMP_DIR, TMP_PREFIX, maj, min, getpid()); +- +- dbg("tmpdev '%s'\n", tmpdev); +- if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { +- err("mknod failed: %s\n", strerror(errno)); +- return -1; +- } +- return 0; +-} +- + /* + * get_value: + * +@@ -415,7 +375,7 @@ static int get_file_options(const char *vendor, const char *model, + } + + static int set_options(int argc, char **argv, const char *short_opts, +- char *target, char *maj_min_dev) ++ char *maj_min_dev) + { + int option; + +@@ -436,9 +396,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + dbg("option '%c'\n", option); + + switch (option) { +- case 'a': +- always_info = 1; +- break; + case 'b': + all_good = 0; + break; +@@ -465,11 +422,8 @@ static int set_options(int argc, char **argv, const char *short_opts, + case 'h': + printf("Usage: scsi_id OPTIONS \n" + " --device device node for SG_IO commands\n" +- " --devpath sysfs devpath\n" + " --config location of config file\n" + " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" +- " --fallback-to-sysfs print sysfs values if inquiry fails\n" +- " --ignore-sysfs ignore sysfs entries\n" + " --blacklisted threat device as blacklisted\n" + " --whitelisted threat device as whitelisted\n" + " --prefix-bus-id prefix SCSI bus id\n" +@@ -497,16 +451,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + } + break; + +- case 'n': +- ignore_sysfs = 1; +- break; +- +- case 's': +- sys_specified = 1; +- strncpy(target, optarg, MAX_PATH_LEN); +- target[MAX_PATH_LEN-1] = '\0'; +- break; +- + case 'u': + reformat_serial = 1; + break; +@@ -528,10 +472,15 @@ static int set_options(int argc, char **argv, const char *short_opts, + exit(1); + } + } ++ if (optind < argc && !dev_specified) { ++ dev_specified = 1; ++ strncpy(maj_min_dev, argv[optind], MAX_PATH_LEN); ++ maj_min_dev[MAX_PATH_LEN-1] = '\0'; ++ } + return 0; + } + +-static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *page_code) ++static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int *page_code) + { + int retval; + int newargc; +@@ -590,54 +539,18 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa + return retval; + } + +-static int set_sysfs_values(struct sysfs_device *dev_scsi) +-{ +- const char *vendor, *model, *type; +- +- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); +- if (!vendor) { +- info("%s: cannot get vendor attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_str(vendor_str, vendor, sizeof(vendor_str)-1); +- +- model = sysfs_attr_get_value(dev_scsi->devpath, "model"); +- if (!model) { +- info("%s: cannot get model attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_str(model_str, model, sizeof(model_str)-1); +- +- type = sysfs_attr_get_value(dev_scsi->devpath, "type"); +- if (!type) { +- info("%s: cannot get type attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_type(type_str, type, sizeof(type_str)); +- +- type = sysfs_attr_get_value(dev_scsi->devpath, "rev"); +- if (!type) { +- info("%s: cannot get type attribute\n", dev_scsi->devpath); +- return -1; +- } +- set_str(revision_str, type, sizeof(revision_str)-1); +- +- return 0; +-} +- +-static int set_inq_values(struct sysfs_device *dev_scsi, const char *path) ++static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) + { + int retval; +- char vendor[8], model[16], type[4], rev[4]; + +- retval = scsi_std_inquiry(dev_scsi, path, vendor, model, rev, type); ++ retval = scsi_std_inquiry(dev_scsi, path); + if (retval) + return retval; + +- set_str(vendor_str, vendor, 8); +- set_str(model_str, model, 16); +- set_type(type_str, type, sizeof(type_str) - 1); +- set_str(revision_str, rev, sizeof(revision_str) -1); ++ set_str(vendor_str, dev_scsi->vendor, 8); ++ set_str(model_str, dev_scsi->model, 16); ++ set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); ++ set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); + + return 0; + } +@@ -674,60 +587,25 @@ static void format_serial(char *serial) + * memory etc. return 2, and return 1 for expected cases (like broken + * device found) that do not print an id. + */ +-static int scsi_id(const char *devpath, char *maj_min_dev) ++static int scsi_id(char *maj_min_dev) + { + int retval; +- int dev_type = 0; +- struct sysfs_device *dev; +- struct sysfs_device *dev_scsi = NULL; ++ struct scsi_id_device dev_scsi; + int good_dev; + int page_code; +- char serial[MAX_SERIAL_LEN] = ""; + char serial_short[MAX_SERIAL_LEN] = ""; +- const char *bus_str = NULL; +- +- dbg("devpath %s\n", devpath); + +- dev = sysfs_device_get(devpath); +- if (dev == NULL) { +- err("unable to access '%s'\n", devpath); +- return 1; +- } +- +- if (strcmp(dev->subsystem, "block") == 0) +- dev_type = S_IFBLK; +- else +- dev_type = S_IFCHR; +- +- /* mknod a temp dev to communicate with the device */ +- if (!dev_specified && create_tmp_dev(dev->devpath, maj_min_dev, dev_type)) { +- dbg("create_tmp_dev failed\n"); +- return 1; +- } +- +- if (!ignore_sysfs) { +- /* get scsi parent device */ +- dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); +- if (dev_scsi == NULL) { +- err("unable to access parent device of '%s'\n", devpath); +- return 1; +- } +- set_sysfs_values(dev_scsi); +- bus_str = "scsi"; +- } else { +- dev_scsi = dev; +- set_inq_values(dev_scsi, maj_min_dev); +- } ++ set_inq_values(&dev_scsi, maj_min_dev); + + /* get per device (vendor + model) options from the config file */ +- retval = per_dev_options(dev_scsi, &good_dev, &page_code); ++ retval = per_dev_options(&dev_scsi, &good_dev, &page_code); + dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); + + if (!good_dev) { + retval = 1; +- } else if (scsi_get_serial(dev_scsi, maj_min_dev, page_code, +- serial, serial_short, MAX_SERIAL_LEN)) { +- retval = always_info?0:1; ++ } else if (scsi_get_serial(&dev_scsi, maj_min_dev, page_code, ++ serial_short, MAX_SERIAL_LEN)) { ++ retval = 1; + } else { + retval = 0; + } +@@ -738,59 +616,33 @@ static int scsi_id(const char *devpath, char *maj_min_dev) + printf("ID_VENDOR=%s\n", vendor_str); + printf("ID_MODEL=%s\n", model_str); + printf("ID_REVISION=%s\n", revision_str); +- set_str(serial_str, serial, sizeof(serial_str)); ++ set_str(serial_str, dev_scsi.serial, sizeof(serial_str)); + printf("ID_SERIAL=%s\n", serial_str); + set_str(serial_str, serial_short, sizeof(serial_str)); + printf("ID_SERIAL_SHORT=%s\n", serial_str); + printf("ID_TYPE=%s\n", type_str); +- if (bus_str != NULL) +- printf("ID_BUS=%s\n", bus_str); + } else { + if (reformat_serial) +- format_serial(serial); +- if (display_bus_id) +- printf("%s: ", dev_scsi->kernel); +- printf("%s\n", serial); ++ format_serial(dev_scsi.serial); ++ printf("%s\n", dev_scsi.serial); + } +- dbg("%s\n", serial); ++ dbg("%s\n", dev_scsi.serial); + retval = 0; + } + +- if (!dev_specified) +- unlink(maj_min_dev); +- + return retval; + } + + int main(int argc, char **argv) + { + int retval = 0; +- char devpath[MAX_PATH_LEN]; + char maj_min_dev[MAX_PATH_LEN]; + int newargc; +- const char *env; + char **newargv; + + logging_init("scsi_id"); +- sysfs_init(); + dbg("argc is %d\n", argc); + +- /* sysfs path can be overridden for testing */ +- env = getenv("SYSFS_PATH"); +- if (env) { +- strncpy(sysfs_path, env, sizeof(sysfs_path)); +- sysfs_path[sizeof(sysfs_path)-1] = '\0'; +- } else +- strcpy(sysfs_path, "/sys"); +- +- env = getenv("DEVPATH"); +- if (env) { +- hotplug_mode = 1; +- sys_specified = 1; +- strncpy(devpath, env, MAX_PATH_LEN); +- devpath[sizeof(devpath)-1] = '\0'; +- } +- + /* + * Get config file options. + */ +@@ -801,8 +653,7 @@ int main(int argc, char **argv) + goto exit; + } + if (newargv && (retval == 0)) { +- if (set_options(newargc, newargv, short_options, devpath, +- maj_min_dev) < 0) { ++ if (set_options(newargc, newargv, short_options, maj_min_dev) < 0) { + retval = 2; + goto exit; + } +@@ -810,22 +661,20 @@ int main(int argc, char **argv) + } + + /* +- * Get command line options (overriding any config file or DEVPATH +- * settings). ++ * Get command line options (overriding any config file settings). + */ +- if (set_options(argc, argv, short_options, devpath, maj_min_dev) < 0) ++ if (set_options(argc, argv, short_options, maj_min_dev) < 0) + exit(1); + +- if (!sys_specified) { +- info("--devpath= must be specified\n"); ++ if (!dev_specified) { ++ info("no device specified\n"); + retval = 1; + goto exit; + } + +- retval = scsi_id(devpath, maj_min_dev); ++ retval = scsi_id(maj_min_dev); + + exit: +- sysfs_cleanup(); + logging_close(); + return retval; + } +diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h +index 0e2b297..3b3a000 100644 +--- a/extras/scsi_id/scsi_id.h ++++ b/extras/scsi_id/scsi_id.h +@@ -30,13 +30,21 @@ + */ + #define MAX_BUFFER_LEN 256 + +-extern int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, +- char *vendor, char *model, char *rev, char *type); +-extern int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, +- int page_code, char *serial, char *serial_short, int len); ++struct scsi_id_device { ++ char vendor[9]; ++ char model[17]; ++ char revision[5]; ++ char type[33]; ++ char kernel[64]; ++ char serial[MAX_SERIAL_LEN]; ++}; ++ ++extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); ++extern int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, ++ int page_code, char *serial_short, int len); + + /* +- * Page code values. ++ * Page code values. + */ + enum page_code { + PAGE_83_PRE_SPC3 = -0x83, +@@ -44,3 +52,4 @@ enum page_code { + PAGE_80 = 0x80, + PAGE_83 = 0x83, + }; ++ +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 28e82db..32bb0f4 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -148,7 +148,7 @@ static int sg_err_category3(struct sg_io_hdr *hp) + hp->sbp, hp->sb_len_wr); + } + +-static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) ++static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) + { + unsigned char *sense_buffer; + int s; +@@ -254,7 +254,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + return -1; + } + +-static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) ++static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) + { + if (!io->status && !io->host_status && !io->msg_status && + !io->driver_status) { +@@ -273,7 +273,7 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) + return -1; + } + +-static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, + unsigned char evpd, unsigned char page, + unsigned char *buf, unsigned int buflen) + { +@@ -343,11 +343,10 @@ error: + } + + /* Get list of supported EVPD pages */ +-static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page0_inquiry(struct scsi_id_device *dev_scsi, int fd, + unsigned char *buffer, unsigned int len) + { + int retval; +- const char *vendor; + + memset(buffer, 0, len); + retval = scsi_inquiry(dev_scsi, fd, 1, 0x0, buffer, len); +@@ -375,12 +374,7 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + * If the vendor id appears in the page assume the page is + * invalid. + */ +- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); +- if (!vendor) { +- info("%s: cannot get model attribute\n", dev_scsi->kernel); +- return 1; +- } +- if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { ++ if (!strncmp((char *)&buffer[VENDOR_LENGTH], dev_scsi->vendor, VENDOR_LENGTH)) { + info("%s: invalid page0 data\n", dev_scsi->kernel); + return 1; + } +@@ -392,25 +386,14 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, + * The caller checks that serial is long enough to include the vendor + + * model. + */ +-static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) ++static int prepend_vendor_model(struct scsi_id_device *dev_scsi, char *serial) + { +- const char *attr; + int ind; + +- attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); +- if (!attr) { +- info("%s: cannot get vendor attribute\n", dev_scsi->kernel); +- return 1; +- } +- strncpy(serial, attr, VENDOR_LENGTH); ++ strncpy(serial, dev_scsi->vendor, VENDOR_LENGTH); + ind = strlen(serial) - 1; + +- attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); +- if (!attr) { +- info("%s: cannot get model attribute\n", dev_scsi->kernel); +- return 1; +- } +- strncat(serial, attr, MODEL_LENGTH); ++ strncat(serial, dev_scsi->model, MODEL_LENGTH); + ind = strlen(serial) - 1; + ind++; + +@@ -430,7 +413,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) + * check_fill_0x83_id - check the page 0x83 id, if OK allocate and fill + * serial number. + **/ +-static int check_fill_0x83_id(struct sysfs_device *dev_scsi, ++static int check_fill_0x83_id(struct scsi_id_device *dev_scsi, + unsigned char *page_83, + const struct scsi_id_search_values + *id_search, char *serial, char *serial_short, int max_len) +@@ -521,7 +504,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, + } + + /* Extract the raw binary from VPD 0x83 pre-SPC devices */ +-static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, ++static int check_fill_0x83_prespc3(struct scsi_id_device *dev_scsi, + unsigned char *page_83, + const struct scsi_id_search_values + *id_search, char *serial, char *serial_short, int max_len) +@@ -543,7 +526,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, + + + /* Get device identification VPD page */ +-static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page83_inquiry(struct scsi_id_device *dev_scsi, int fd, + char *serial, char *serial_short, int len) + { + int retval; +@@ -633,7 +616,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, + * Return the hard coded error code value 2 if the page 83 reply is not + * conformant to the SCSI-2 format. + */ +-static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page83_prespc3_inquiry(struct scsi_id_device *dev_scsi, int fd, + char *serial, char *serial_short, int len) + { + int retval; +@@ -695,7 +678,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, + } + + /* Get unit serial number VPD page */ +-static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, ++static int do_scsi_page80_inquiry(struct scsi_id_device *dev_scsi, int fd, + char *serial, char *serial_short, int max_len) + { + int retval; +@@ -736,30 +719,38 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, + return 0; + } + +-int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, +- char *vendor, char *model, char *rev, char *type) ++int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) + { + int retval; + int fd; + unsigned char buf[SCSI_INQ_BUFF_LEN]; ++ struct stat statbuf; + + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +- info("%s: cannot open %s: %s\n", +- dev_scsi->kernel, devname, strerror(errno)); ++ info("scsi_id: cannot open %s: %s\n", ++ devname, strerror(errno)); + return 1; + } + ++ if (fstat(fd, &statbuf) < 0) { ++ info("scsi_id: cannot stat %s: %s\n", ++ devname, strerror(errno)); ++ return 2; ++ } ++ sprintf(dev_scsi->kernel,"%d:%d", major(statbuf.st_rdev), ++ minor(statbuf.st_rdev)); ++ + memset(buf, 0, SCSI_INQ_BUFF_LEN); + retval = scsi_inquiry(dev_scsi, fd, 0, 0, buf, SCSI_INQ_BUFF_LEN); + if (retval < 0) + return retval; + +- memcpy(vendor, buf + 8, 8); +- memcpy(model, buf + 16, 16); +- memcpy(rev, buf + 32, 4); +- sprintf(type,"%x", buf[0] & 0x1f); ++ memcpy(dev_scsi->vendor, buf + 8, 8); ++ memcpy(dev_scsi->model, buf + 16, 16); ++ memcpy(dev_scsi->revision, buf + 32, 4); ++ sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); + + if (close(fd) < 0) + info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); +@@ -767,15 +758,15 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, + return 0; + } + +-int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, +- int page_code, char *serial, char *serial_short, int len) ++int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, ++ int page_code, char *serial_short, int len) + { + unsigned char page0[SCSI_INQ_BUFF_LEN]; + int fd; + int ind; + int retval; + +- memset(serial, 0, len); ++ memset(dev_scsi->serial, 0, len); + dbg("opening %s\n", devname); + fd = open(devname, O_RDONLY | O_NONBLOCK); + if (fd < 0) { +@@ -785,7 +776,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + } + + if (page_code == PAGE_80) { +- if (do_scsi_page80_inquiry(dev_scsi, fd, serial, serial_short, len)) { ++ if (do_scsi_page80_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { + retval = 1; + goto completed; + } else { +@@ -793,7 +784,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + goto completed; + } + } else if (page_code == PAGE_83) { +- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { ++ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { + retval = 1; + goto completed; + } else { +@@ -801,7 +792,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + goto completed; + } + } else if (page_code == PAGE_83_PRE_SPC3) { +- retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, serial, serial_short, len); ++ retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len); + if (retval) { + /* + * Fallback to servicing a SPC-2/3 compliant page 83 +@@ -809,7 +800,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + * conform to pre-SPC3 expectations. + */ + if (retval == 2) { +- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { ++ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { + retval = 1; + goto completed; + } else { +@@ -849,7 +840,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + for (ind = 4; ind <= page0[3] + 3; ind++) + if (page0[ind] == PAGE_83) + if (!do_scsi_page83_inquiry(dev_scsi, fd, +- serial, serial_short, len)) { ++ dev_scsi->serial, serial_short, len)) { + /* + * Success + */ +@@ -860,7 +851,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, + for (ind = 4; ind <= page0[3] + 3; ind++) + if (page0[ind] == PAGE_80) + if (!do_scsi_page80_inquiry(dev_scsi, fd, +- serial, serial_short, len)) { ++ dev_scsi->serial, serial_short, len)) { + /* + * Success + */ +-- +1.5.4.5 + diff --git a/0005-scsi_id-add-SGv4-support.patch b/0005-scsi_id-add-SGv4-support.patch new file mode 100644 index 0000000..3cd03a4 --- /dev/null +++ b/0005-scsi_id-add-SGv4-support.patch @@ -0,0 +1,235 @@ +From 78d9ecfd4f1e37f7453e55e71f2909a58706ae10 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 14 May 2008 13:55:49 +0200 +Subject: [PATCH] scsi_id: add SGv4 support + +Fall back to SGv3, if SGv3 returns a failure/is not available. +--- + extras/scsi_id/Makefile | 4 +- + extras/scsi_id/scsi_id.c | 2 + + extras/scsi_id/scsi_id.h | 1 + + extras/scsi_id/scsi_serial.c | 103 ++++++++++++++++++++++++++++++++---------- + 4 files changed, 84 insertions(+), 26 deletions(-) + +diff --git a/extras/scsi_id/Makefile b/extras/scsi_id/Makefile +index 870296a..ca067d0 100644 +--- a/extras/scsi_id/Makefile ++++ b/extras/scsi_id/Makefile +@@ -6,11 +6,11 @@ + # Released under the GNU General Public License, version 2. + # + +-SCSI_ID_VERSION = 0.9 ++SCSI_ID_VERSION = 2.0 + + PROG = scsi_id + OBJS= scsi_serial.o +-HEADERS = scsi_id.h scsi.h scsi_id_version.h ++HEADERS = scsi_id.h scsi.h scsi_id_version.h bsg.h + GEN_HEADERS = scsi_id_version.h + MAN_PAGES = scsi_id.8 + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 4f0233e..0f09f29 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -543,6 +543,8 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) + { + int retval; + ++ dev_scsi->use_sg = 4; ++ + retval = scsi_std_inquiry(dev_scsi, path); + if (retval) + return retval; +diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h +index 3b3a000..680c39d 100644 +--- a/extras/scsi_id/scsi_id.h ++++ b/extras/scsi_id/scsi_id.h +@@ -37,6 +37,7 @@ struct scsi_id_device { + char type[33]; + char kernel[64]; + char serial[MAX_SERIAL_LEN]; ++ int use_sg; + }; + + extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 32bb0f4..202ffc0 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -22,7 +22,12 @@ + #include + #include + #include ++#include ++#include + #include ++#include ++/* #include */ ++#include "bsg.h" + + #include "../../udev.h" + #include "scsi.h" +@@ -94,10 +99,7 @@ static int sg_err_category_new(int scsi_status, int msg_status, int + * XXX change to return only two values - failed or OK. + */ + +- /* +- * checks msg_status +- */ +- if (!scsi_status && !msg_status && !host_status && !driver_status) ++ if (!scsi_status && !host_status && !driver_status) + return SG_ERR_CAT_CLEAN; + + if ((scsi_status == SCSI_CHECK_CONDITION) || +@@ -148,11 +150,18 @@ static int sg_err_category3(struct sg_io_hdr *hp) + hp->sbp, hp->sb_len_wr); + } + +-static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) ++static int sg_err_category4(struct sg_io_v4 *hp) ++{ ++ return sg_err_category_new(hp->device_status, 0, ++ hp->transport_status, hp->driver_status, ++ (unsigned char *)hp->response, ++ hp->response_len); ++} ++ ++static int scsi_dump_sense(struct scsi_id_device *dev_scsi, ++ unsigned char *sense_buffer, int sb_len) + { +- unsigned char *sense_buffer; + int s; +- int sb_len; + int code; + int sense_class; + int sense_key; +@@ -177,13 +186,11 @@ static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io + + dbg("got check condition\n"); + +- sb_len = io->sb_len_wr; + if (sb_len < 1) { + info("%s: sense buffer empty\n", dev_scsi->kernel); + return -1; + } + +- sense_buffer = io->sbp; + sense_class = (sense_buffer[0] >> 4) & 0x07; + code = sense_buffer[0] & 0xf; + +@@ -268,7 +275,28 @@ static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) + info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", + dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); + if (io->status == SCSI_CHECK_CONDITION) +- return scsi_dump_sense(dev_scsi, io); ++ return scsi_dump_sense(dev_scsi, io->sbp, io->sb_len_wr); ++ else ++ return -1; ++} ++ ++static int scsi_dump_v4(struct scsi_id_device *dev_scsi, struct sg_io_v4 *io) ++{ ++ if (!io->device_status && !io->transport_status && ++ !io->driver_status) { ++ /* ++ * Impossible, should not be called. ++ */ ++ info("%s: called with no error\n", __FUNCTION__); ++ return -1; ++ } ++ ++ info("%s: sg_io failed status 0x%x 0x%x 0x%x\n", ++ dev_scsi->kernel, io->driver_status, io->transport_status, ++ io->device_status); ++ if (io->device_status == SCSI_CHECK_CONDITION) ++ return scsi_dump_sense(dev_scsi, (unsigned char *)io->response, ++ io->response_len); + else + return -1; + } +@@ -281,6 +309,8 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, + { INQUIRY_CMD, evpd, page, 0, buflen, 0 }; + unsigned char sense[SENSE_BUFF_LEN]; + struct sg_io_hdr io_hdr; ++ struct sg_io_v4 io_v4; ++ void *io_buf; + int retval; + int retry = 3; /* rather random */ + +@@ -292,24 +322,46 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, + resend: + dbg("%s evpd %d, page 0x%x\n", dev_scsi->kernel, evpd, page); + +- memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); +- io_hdr.interface_id = 'S'; +- io_hdr.cmd_len = sizeof(inq_cmd); +- io_hdr.mx_sb_len = sizeof(sense); +- io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; +- io_hdr.dxfer_len = buflen; +- io_hdr.dxferp = buf; +- io_hdr.cmdp = inq_cmd; +- io_hdr.sbp = sense; +- io_hdr.timeout = DEF_TIMEOUT; +- +- if (ioctl(fd, SG_IO, &io_hdr) < 0) { ++ if (dev_scsi->use_sg == 4) { ++ memset(&io_v4, 0, sizeof(struct sg_io_v4)); ++ io_v4.guard = 'Q'; ++ io_v4.protocol = BSG_PROTOCOL_SCSI; ++ io_v4.subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD; ++ io_v4.request_len = sizeof(inq_cmd); ++ io_v4.request = (uintptr_t)inq_cmd; ++ io_v4.max_response_len = sizeof(sense); ++ io_v4.response = (uintptr_t)sense; ++ io_v4.din_xfer_len = buflen; ++ io_v4.din_xferp = (uintptr_t)buf; ++ io_buf = (void *)&io_v4; ++ } else { ++ memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); ++ io_hdr.interface_id = 'S'; ++ io_hdr.cmd_len = sizeof(inq_cmd); ++ io_hdr.mx_sb_len = sizeof(sense); ++ io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; ++ io_hdr.dxfer_len = buflen; ++ io_hdr.dxferp = buf; ++ io_hdr.cmdp = inq_cmd; ++ io_hdr.sbp = sense; ++ io_hdr.timeout = DEF_TIMEOUT; ++ io_buf = (void *)&io_hdr; ++ } ++ ++ if (ioctl(fd, SG_IO, io_buf) < 0) { ++ if (errno == EINVAL && dev_scsi->use_sg == 4) { ++ dev_scsi->use_sg = 3; ++ goto resend; ++ } + info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); + retval = -1; + goto error; + } + +- retval = sg_err_category3(&io_hdr); ++ if (dev_scsi->use_sg == 4) ++ retval = sg_err_category4(io_buf); ++ else ++ retval = sg_err_category3(io_buf); + + switch (retval) { + case SG_ERR_CAT_NOTSUPPORTED: +@@ -321,7 +373,10 @@ resend: + break; + + default: +- retval = scsi_dump(dev_scsi, &io_hdr); ++ if (dev_scsi->use_sg == 4) ++ retval = scsi_dump_v4(dev_scsi, io_buf); ++ else ++ retval = scsi_dump(dev_scsi, io_buf); + } + + if (!retval) { +-- +1.5.4.5 + diff --git a/0005-udevd-at-startup-write-message-including-version-nu.patch b/0005-udevd-at-startup-write-message-including-version-nu.patch deleted file mode 100644 index 4033f2f..0000000 --- a/0005-udevd-at-startup-write-message-including-version-nu.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 798d7ab60c476a2c7bcef6918a40dce1756204d1 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 10 Apr 2008 21:35:40 +0200 -Subject: [PATCH] udevd: at startup write message including version number to kernel log - ---- - udevd.c | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/udevd.c b/udevd.c -index 493bb54..530fc59 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -1116,6 +1116,14 @@ int main(int argc, char *argv[], char *envp[]) - close(fd); - } - -+ fd = open("/dev/kmsg", O_WRONLY); -+ if (fd > 0) { -+ const char *str = "<6>udevd version " UDEV_VERSION " started\n"; -+ -+ write(fd, str, strlen(str)); -+ close(fd); -+ } -+ - /* set signal handlers */ - memset(&act, 0x00, sizeof(struct sigaction)); - act.sa_handler = (void (*)(int)) sig_handler; --- -1.5.4.5 - diff --git a/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch b/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch deleted file mode 100644 index dd4f665..0000000 --- a/0006-rules_generator-net-rules-always-add-KERNEL-mat.patch +++ /dev/null @@ -1,49 +0,0 @@ -From e6d70ed63a03f39de148e6b0afb47cbbc5ec78eb Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 15 Apr 2008 00:21:51 +0200 -Subject: [PATCH] rules_generator: net rules - always add KERNEL== match to generated rules - ---- - .../75-persistent-net-generator.rules | 2 +- - extras/rule_generator/write_net_rules | 5 +++-- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules -index 2aa3076..85a4c5b 100644 ---- a/extras/rule_generator/75-persistent-net-generator.rules -+++ b/extras/rule_generator/75-persistent-net-generator.rules -@@ -18,7 +18,7 @@ SUBSYSTEM!="net", GOTO="persistent_net_generator_end" - 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" -+KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" - - # ignore Xen virtual interfaces - SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" -diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules -index 765e56f..322398b 100644 ---- a/extras/rule_generator/write_net_rules -+++ b/extras/rule_generator/write_net_rules -@@ -92,6 +92,9 @@ if [ -z "$match" ]; then - exit 1 - fi - -+basename=${INTERFACE%%[0-9]*} -+match="$match, KERNEL==\"$basename*\"" -+ - if [ "$INTERFACE_NAME" ]; then - # external tools may request a custom name - COMMENT="$COMMENT (custom name provided by external tool)" -@@ -101,8 +104,6 @@ if [ "$INTERFACE_NAME" ]; then - fi - else - # if a rule using the current name already exists, find a new name -- basename=${INTERFACE%%[0-9]*} -- match="$match, KERNEL==\"$basename*\"" - if interface_name_taken; then - INTERFACE="$basename$(find_next_available "$basename[0-9]*")" - echo "INTERFACE_NEW=$INTERFACE" --- -1.5.4.5 - diff --git a/0006-scsi_id-update-man-page.patch b/0006-scsi_id-update-man-page.patch new file mode 100644 index 0000000..324fa27 --- /dev/null +++ b/0006-scsi_id-update-man-page.patch @@ -0,0 +1,66 @@ +From 138cf75e4eda54ab519c0d77ad3ca4b467dfe7ec Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 13:59:11 +0200 +Subject: [PATCH] scsi_id: update man page + +--- + extras/scsi_id/scsi_id.8 | 24 +----------------------- + 1 files changed, 1 insertions(+), 23 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 +index aa429a5..725b7d5 100644 +--- a/extras/scsi_id/scsi_id.8 ++++ b/extras/scsi_id/scsi_id.8 +@@ -52,25 +52,12 @@ identifier starts with the NAA value of 6): + + .SH OPTIONS + .TP +-.BI \-\-fallback-to-sysfs +-Always print information (model, vendor strings) about the device even +-if it does not support VPD pages. +-.TP +-.BI \-\-ignore-sysfs +-Ignore sysfs entries. Used for devices which are not represented as SCSI +-devices, but understand SG_IO commands. +-.TP + .BI \-\-blacklisted + The default behaviour \- treat the device as black listed, and do nothing + unless a white listed device is found in the scsi_id config\-file. + .TP + .BI \-\-device=\| device\^ +-Instead +-of determining and creating a device node based on a sysfs dev +-entry as done for the \fB\-s\fP, send SG_IO commands to +-\fBdevice\fP, such as \fB/dev/sdc\fP. +-This argument should also be used when invoked via udev to avoid problems +-with creation of temporary files on not-yet writable directories. ++Send SG_IO commands to \fBdevice\fP, such as \fB/dev/sdc\fP. + .TP + .BI \-\-config=\| config\-file + Read configuration and black/white list entries from +@@ -85,10 +72,6 @@ on the command line or in the scsi_id configuration file for + .B scsi_id + to generate any output. + .TP +-.BI \-\-prefix-bus-id +-Prefix the identification string with the driver model (sysfs) bus id of +-the SCSI device. +-.TP + .BI \-\-page=\| 0x80 | 0x83 | pre-spc3-83 + Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83. + .sp +@@ -102,11 +85,6 @@ option is used for older model 4, 5, and 6 EMC Symmetrix devices, its + use with SPC-2 or SPC-3 compliant devices will fallback to the page 83 + format supported by these devices. + .TP +-.BI \-\-devpath=\| sysfs\-devpath +-Generate an id for the +-.B sysfs\-devpath. +-The sysfs mount point must not be included. +-.TP + .BI \-\-replace-whitespace + Reformat the output : replace all whitespaces by underscores. + .TP +-- +1.5.4.5 + diff --git a/0007-scsi_id-remove-bus_id-option.patch b/0007-scsi_id-remove-bus_id-option.patch new file mode 100644 index 0000000..bcb5b82 --- /dev/null +++ b/0007-scsi_id-remove-bus_id-option.patch @@ -0,0 +1,51 @@ +From 2d05764a77078953849a1f84ac269c927904ca23 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 13:59:25 +0200 +Subject: [PATCH] scsi_id: remove bus_id option + +--- + extras/scsi_id/scsi_id.c | 7 ------- + 1 files changed, 0 insertions(+), 7 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 0f09f29..6194b71 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -37,7 +37,6 @@ static const struct option options[] = { + { "page", 1, NULL, 'p' }, + { "blacklisted", 0, NULL, 'b' }, + { "whitelisted", 0, NULL, 'g' }, +- { "prefix-bus-id", 0, NULL, 'i' }, + { "replace-whitespace", 0, NULL, 'u' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, +@@ -52,7 +51,6 @@ static const char dev_short_options[] = "bgp:"; + static int all_good; + static int dev_specified; + static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; +-static int display_bus_id; + static enum page_code default_page_code; + static int use_stderr; + static int debug; +@@ -426,7 +424,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" + " --blacklisted threat device as blacklisted\n" + " --whitelisted threat device as whitelisted\n" +- " --prefix-bus-id prefix SCSI bus id\n" + " --replace-whitespace replace all whitespaces by underscores\n" + " --verbose verbose logging\n" + " --version print version\n" +@@ -434,10 +431,6 @@ static int set_options(int argc, char **argv, const char *short_opts, + " --help print this help text\n\n"); + exit(0); + +- case 'i': +- display_bus_id = 1; +- break; +- + case 'p': + if (strcmp(optarg, "0x80") == 0) { + default_page_code = PAGE_80; +-- +1.5.4.5 + diff --git a/0007-selinux-more-context-settings.patch b/0007-selinux-more-context-settings.patch deleted file mode 100644 index 056a40c..0000000 --- a/0007-selinux-more-context-settings.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 6056d9b3400fe0349d86636cbbf93f069bb5639a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 17 Apr 2008 16:03:03 +0200 -Subject: [PATCH] selinux: more context settings - -Signed-off-by: Harald Hoyer ---- - udev_db.c | 6 +++++- - udev_rules_parse.c | 2 ++ - udev_utils_file.c | 7 ++++++- - udevd.c | 2 ++ - 4 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/udev_db.c b/udev_db.c -index 518ace9..4447253 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -144,8 +144,12 @@ int udev_db_add_device(struct udevice *udev) - */ - if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && - !udev->partitions && !udev->ignore_remove) { -+ int ret; - dbg("nothing interesting to store, create symlink"); -- if (symlink(udev->name, filename) != 0) { -+ selinux_setfscreatecon(filename, NULL, S_IFLNK); -+ ret = symlink(udev->name, filename); -+ selinux_resetfscreatecon(); -+ if (ret != 0) { - err("unable to create db link '%s': %s", filename, strerror(errno)); - return -1; - } -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index 9e43581..d2392c3 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -745,7 +745,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) - strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); - if (stat(filename, &statbuf) != 0) { - create_path(filename); -+ selinux_setfscreatecon(filename, NULL, S_IFDIR|0755); - mkdir(filename, 0755); -+ selinux_resetfscreatecon(); - } - add_matching_files(&dyn_list, filename, RULESFILE_SUFFIX); - -diff --git a/udev_utils_file.c b/udev_utils_file.c -index 0ceefe1..9ab3470 100644 ---- a/udev_utils_file.c -+++ b/udev_utils_file.c -@@ -35,6 +35,7 @@ int create_path(const char *path) - char p[PATH_SIZE]; - char *pos; - struct stat stats; -+ int ret; - - strlcpy(p, path, sizeof(p)); - pos = strrchr(p, '/'); -@@ -53,8 +54,12 @@ int create_path(const char *path) - return -1; - - dbg("mkdir '%s'", p); -- if (mkdir(p, 0755) == 0) -+ selinux_setfscreatecon(p, NULL, S_IFDIR|0755); -+ ret = mkdir(p, 0755); -+ selinux_resetfscreatecon(); -+ if (ret == 0) - return 0; -+ - if (errno == EEXIST) - if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) - return 0; -diff --git a/udevd.c b/udevd.c -index 530fc59..7786ae6 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -168,7 +168,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - delete_path(filename_failed); - - create_path(filename); -+ selinux_setfscreatecon(filename, NULL, S_IFLNK); - symlink(msg->devpath, filename); -+ selinux_resetfscreatecon(); - break; - case EVENT_FINISHED: - if (msg->devpath_old != NULL) { --- -1.5.4.5 - diff --git a/0008-scsi_id-add-sg-version-option.patch b/0008-scsi_id-add-sg-version-option.patch new file mode 100644 index 0000000..9cd1819 --- /dev/null +++ b/0008-scsi_id-add-sg-version-option.patch @@ -0,0 +1,164 @@ +From 025570aa3e054d92d65f8d2de9f91d202f60c798 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 15:02:17 +0200 +Subject: [PATCH] scsi_id: add --sg-version= option + +--- + extras/scsi_id/scsi_id.c | 53 +++++++++++++++++++++++++---------------- + extras/scsi_id/scsi_serial.c | 6 +++- + 2 files changed, 36 insertions(+), 23 deletions(-) + +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index 6194b71..5eb95e8 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -38,6 +38,7 @@ static const struct option options[] = { + { "blacklisted", 0, NULL, 'b' }, + { "whitelisted", 0, NULL, 'g' }, + { "replace-whitespace", 0, NULL, 'u' }, ++ { "sg-version", 1, NULL, 's' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + { "export", 0, NULL, 'x' }, +@@ -52,6 +53,7 @@ static int all_good; + static int dev_specified; + static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; + static enum page_code default_page_code; ++static int sg_version = 4; + static int use_stderr; + static int debug; + static int reformat_serial; +@@ -257,7 +259,7 @@ static int get_file_options(const char *vendor, const char *model, + break; + lineno++; + if (buf[strlen(buffer) - 1] != '\n') { +- info("Config file line %d too long\n", lineno); ++ err("Config file line %d too long\n", lineno); + break; + } + +@@ -309,7 +311,7 @@ static int get_file_options(const char *vendor, const char *model, + * Only allow: [vendor=foo[,model=bar]]options=stuff + */ + if (!options_in || (!vendor_in && model_in)) { +- info("Error parsing config file line %d '%s'\n", lineno, buffer); ++ err("Error parsing config file line %d '%s'\n", lineno, buffer); + retval = -1; + break; + } +@@ -419,16 +421,17 @@ static int set_options(int argc, char **argv, const char *short_opts, + + case 'h': + printf("Usage: scsi_id OPTIONS \n" +- " --device device node for SG_IO commands\n" +- " --config location of config file\n" +- " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" +- " --blacklisted threat device as blacklisted\n" +- " --whitelisted threat device as whitelisted\n" +- " --replace-whitespace replace all whitespaces by underscores\n" +- " --verbose verbose logging\n" +- " --version print version\n" +- " --export print values as environment keys\n" +- " --help print this help text\n\n"); ++ " --device= device node for SG_IO commands\n" ++ " --config= location of config file\n" ++ " --page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n" ++ " --sg-version=3|4 use SGv3 or SGv4\n" ++ " --blacklisted threat device as blacklisted\n" ++ " --whitelisted threat device as whitelisted\n" ++ " --replace-whitespace replace all whitespaces by underscores\n" ++ " --verbose verbose logging\n" ++ " --version print version\n" ++ " --export print values as environment keys\n" ++ " --help print this help text\n\n"); + exit(0); + + case 'p': +@@ -439,7 +442,15 @@ static int set_options(int argc, char **argv, const char *short_opts, + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + default_page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'\n", optarg); ++ err("Unknown page code '%s'\n", optarg); ++ return -1; ++ } ++ break; ++ ++ case 's': ++ sg_version = atoi(optarg); ++ if (sg_version < 3 || sg_version > 4) { ++ err("Unknown SG version '%s'\n", optarg); + return -1; + } + break; +@@ -513,13 +524,13 @@ static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int * + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + *page_code = PAGE_83_PRE_SPC3; + } else { +- info("Unknown page code '%s'\n", optarg); ++ err("Unknown page code '%s'\n", optarg); + retval = -1; + } + break; + + default: +- info("Unknown or bad option '%c' (0x%x)\n", option, option); ++ err("Unknown or bad option '%c' (0x%x)\n", option, option); + retval = -1; + break; + } +@@ -536,16 +547,16 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) + { + int retval; + +- dev_scsi->use_sg = 4; ++ dev_scsi->use_sg = sg_version; + + retval = scsi_std_inquiry(dev_scsi, path); + if (retval) + return retval; + +- set_str(vendor_str, dev_scsi->vendor, 8); +- set_str(model_str, dev_scsi->model, 16); +- set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); +- set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); ++ set_str(vendor_str, dev_scsi->vendor, sizeof(vendor_str)); ++ set_str(model_str, dev_scsi->model, sizeof(model_str)); ++ set_type(type_str, dev_scsi->type, sizeof(type_str)); ++ set_str(revision_str, dev_scsi->revision, sizeof(revision_str)); + + return 0; + } +@@ -662,7 +673,7 @@ int main(int argc, char **argv) + exit(1); + + if (!dev_specified) { +- info("no device specified\n"); ++ err("no device specified\n"); + retval = 1; + goto exit; + } +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 202ffc0..c5cacfa 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -803,12 +803,14 @@ int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) + return retval; + + memcpy(dev_scsi->vendor, buf + 8, 8); ++ dev_scsi->vendor[8] = '\0'; + memcpy(dev_scsi->model, buf + 16, 16); ++ dev_scsi->model[16] = '\0'; + memcpy(dev_scsi->revision, buf + 32, 4); ++ dev_scsi->revision[4] = '\0'; + sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); + +- if (close(fd) < 0) +- info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); ++ close(fd); + + return 0; + } +-- +1.5.4.5 + diff --git a/0008-selinux-fix-missing-includes.patch b/0008-selinux-fix-missing-includes.patch deleted file mode 100644 index f17d119..0000000 --- a/0008-selinux-fix-missing-includes.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 4278ab015d76876f61821b293df07e0c3746bfd5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 17 Apr 2008 23:31:09 +0200 -Subject: [PATCH] selinux: fix missing includes - ---- - udev_db.c | 1 + - udev_rules.c | 1 + - udev_rules_parse.c | 1 + - udev_utils_file.c | 1 + - 4 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/udev_db.c b/udev_db.c -index 4447253..1feab7d 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -31,6 +31,7 @@ - #include - - #include "udev.h" -+#include "udev_selinux.h" - - - static size_t devpath_to_db_path(const char *devpath, char *filename, size_t len) -diff --git a/udev_rules.c b/udev_rules.c -index eccea3b..6565a2e 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -35,6 +35,7 @@ - - #include "udev.h" - #include "udev_rules.h" -+#include "udev_selinux.h" - - extern char **environ; - -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index d2392c3..ce659d7 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -28,6 +28,7 @@ - - #include "udev.h" - #include "udev_rules.h" -+#include "udev_selinux.h" - - - void udev_rules_iter_init(struct udev_rules *rules) -diff --git a/udev_utils_file.c b/udev_utils_file.c -index 9ab3470..19668b9 100644 ---- a/udev_utils_file.c -+++ b/udev_utils_file.c -@@ -29,6 +29,7 @@ - #include - - #include "udev.h" -+#include "udev_selinux.h" - - int create_path(const char *path) - { --- -1.5.4.5 - diff --git a/0009-allow-setting-of-MODE-0000.patch b/0009-allow-setting-of-MODE-0000.patch deleted file mode 100644 index 8f85310..0000000 --- a/0009-allow-setting-of-MODE-0000.patch +++ /dev/null @@ -1,93 +0,0 @@ -From cf100ca71bf365d8898e97d4ec9dd05c3941cae8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 18 Apr 2008 21:07:29 +0200 -Subject: [PATCH] allow setting of MODE="0000" - ---- - test/udev-test.pl | 10 ++++++++++ - udev_rules.c | 10 +++++----- - udev_rules.h | 3 +-- - udev_rules_parse.c | 3 +-- - 4 files changed, 17 insertions(+), 9 deletions(-) - -diff --git a/test/udev-test.pl b/test/udev-test.pl -index 2621e2b..fee62a6 100755 ---- a/test/udev-test.pl -+++ b/test/udev-test.pl -@@ -1607,6 +1607,16 @@ EOF - KERNEL=="sda", TEST=="*/nr_requests", NAME="found-subdir" - EOF - }, -+ { -+ desc => "TEST MODE=0000", -+ subsys => "block", -+ devpath => "/block/sda", -+ exp_name => "sda", -+ exp_perms => "0:0:0000", -+ rules => <mode_final && rule->mode != 0000) { -- if (rule->mode_operation == KEY_OP_ASSIGN_FINAL) -+ if (!udev->mode_final && rule->mode.operation != KEY_OP_UNSET) { -+ if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) - udev->mode_final = 1; -- udev->mode = rule->mode; -- dbg("applied mode=%#o to '%s'", rule->mode, udev->dev->kernel); -+ udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); -+ dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); - } - if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { - if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) -@@ -1534,7 +1534,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - 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->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; -diff --git a/udev_rules.h b/udev_rules.h -index 0ad4ec3..a84b0de 100644 ---- a/udev_rules.h -+++ b/udev_rules.h -@@ -93,8 +93,7 @@ struct udev_rule { - struct key symlink_match; - struct key owner; - struct key group; -- mode_t mode; -- enum key_operation mode_operation; -+ struct key mode; - enum escape_type string_escape; - - unsigned int link_priority; -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index ce659d7..6d88354 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -579,8 +579,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - } - - if (strcasecmp(key, "MODE") == 0) { -- rule->mode = strtol(value, NULL, 8); -- rule->mode_operation = operation; -+ add_rule_key(rule, &rule->mode, operation, value); - valid = 1; - continue; - } --- -1.5.4.5 - diff --git a/0009-rules-adapt-to-new-scsi_id.patch b/0009-rules-adapt-to-new-scsi_id.patch new file mode 100644 index 0000000..5c62fd8 --- /dev/null +++ b/0009-rules-adapt-to-new-scsi_id.patch @@ -0,0 +1,27 @@ +From 3d2aed9e869dc8abadb6f7919dcf9e35837d6181 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 15:14:23 +0200 +Subject: [PATCH] rules: adapt to new scsi_id + +--- + etc/udev/rules.d/60-persistent-storage.rules | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules +index 85a9270..b7c4337 100644 +--- a/etc/udev/rules.d/60-persistent-storage.rules ++++ b/etc/udev/rules.d/60-persistent-storage.rules +@@ -33,8 +33,8 @@ KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL + + 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*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" ++KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -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" + +-- +1.5.4.5 + diff --git a/0010-path_id-remove-subsystem-whitelist.patch b/0010-path_id-remove-subsystem-whitelist.patch deleted file mode 100644 index 3ae1bea..0000000 --- a/0010-path_id-remove-subsystem-whitelist.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1d918b50cddc975abbfd06af134a6d843d9bc7f0 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 18 Apr 2008 21:08:07 +0200 -Subject: [PATCH] path_id: remove subsystem whitelist - ---- - extras/path_id/path_id | 27 +++++++-------------------- - 1 files changed, 7 insertions(+), 20 deletions(-) - -diff --git a/extras/path_id/path_id b/extras/path_id/path_id -index a3a627e..7a37700 100755 ---- a/extras/path_id/path_id -+++ b/extras/path_id/path_id -@@ -549,7 +549,7 @@ handle_device () { - ;; - *) - mode="" -- ;; -+ ;; - esac - if [ "$d" ]; then - d="$d-${rewind}st${mode}" -@@ -557,22 +557,9 @@ handle_device () { - fi - } - --case "$TYPE" in -- block) -- handle_device -- echo "ID_PATH=$d" -- ;; -- scsi_tape) -- handle_device -- echo "ID_PATH=$d" -- ;; -- input) -- handle_device -- echo "ID_PATH=$d" -- ;; -- *) -- RESULT=1 -- ;; --esac -- --exit $RESULT -+handle_device -+if [ -z "$d" ]; then -+ exit 1 -+fi -+echo "ID_PATH=$d" -+exit 0 --- -1.5.4.5 - diff --git a/0010-rules-adapt-tape-rules-to-new-scsi_id.patch b/0010-rules-adapt-tape-rules-to-new-scsi_id.patch new file mode 100644 index 0000000..9c06d15 --- /dev/null +++ b/0010-rules-adapt-tape-rules-to-new-scsi_id.patch @@ -0,0 +1,33 @@ +From 788096cb59a7ad1cdd08ccc59e5e3b1d2f4828c2 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2008 15:17:35 +0200 +Subject: [PATCH] rules: adapt tape rules to new scsi_id + +--- + etc/udev/rules.d/60-persistent-storage-tape.rules | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules +index e56d57a..45cac93 100644 +--- a/etc/udev/rules.d/60-persistent-storage-tape.rules ++++ b/etc/udev/rules.d/60-persistent-storage-tape.rules +@@ -5,14 +5,14 @@ + ACTION!="add|change", GOTO="persistent_storage_tape_end" + + # 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=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" + + SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" + + 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]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" ++KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" + KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" + +-- +1.5.4.5 + diff --git a/0011-cdrom_id-fix-segfault.patch b/0011-cdrom_id-fix-segfault.patch new file mode 100644 index 0000000..0d4aa23 --- /dev/null +++ b/0011-cdrom_id-fix-segfault.patch @@ -0,0 +1,25 @@ +From 4cd71da5603898cff68a31774be570750d7fd659 Mon Sep 17 00:00:00 2001 +From: Matthias Schwarzott +Date: Wed, 14 May 2008 16:03:49 +0200 +Subject: [PATCH] cdrom_id: fix segfault + +--- + extras/cdrom_id/cdrom_id.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 0e0a463..e0cbe9e 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -469,6 +469,8 @@ static int cd_media_toc(int fd) + info("READ TOC: len: %d\n", len); + if (len > sizeof(toc)) + return -1; ++ if (len < 8) ++ return -1; + + /* check if we have a data track */ + info("ctl %02x (0x04 is data/audio)\n", header[5]); +-- +1.5.4.5 + diff --git a/0011-logging-add-trailing-newline-to-all-strings.patch b/0011-logging-add-trailing-newline-to-all-strings.patch deleted file mode 100644 index a4a3bd5..0000000 --- a/0011-logging-add-trailing-newline-to-all-strings.patch +++ /dev/null @@ -1,5323 +0,0 @@ -From c70560feef0eb61a150cd2f956f0beead4313ffe Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 20 Apr 2008 21:07:06 +0200 -Subject: [PATCH] logging: add trailing newline to all strings - ---- - extras/ata_id/ata_id.c | 8 +- - extras/cdrom_id/cdrom_id.c | 37 +++--- - extras/edd_id/edd_id.c | 28 ++-- - extras/scsi_id/scsi_id.c | 40 +++--- - extras/scsi_id/scsi_serial.c | 76 +++++----- - extras/usb_id/usb_id.c | 24 ++-- - extras/volume_id/lib/adaptec_raid.c | 2 +- - extras/volume_id/lib/cramfs.c | 2 +- - extras/volume_id/lib/ddf_raid.c | 2 +- - extras/volume_id/lib/ext.c | 6 +- - extras/volume_id/lib/fat.c | 40 +++--- - extras/volume_id/lib/gfs.c | 2 +- - extras/volume_id/lib/hfs.c | 32 ++-- - extras/volume_id/lib/highpoint.c | 4 +- - extras/volume_id/lib/hpfs.c | 2 +- - extras/volume_id/lib/iso9660.c | 12 +- - extras/volume_id/lib/isw_raid.c | 2 +- - extras/volume_id/lib/jfs.c | 2 +- - extras/volume_id/lib/jmicron_raid.c | 2 +- - extras/volume_id/lib/linux_raid.c | 4 +- - extras/volume_id/lib/linux_swap.c | 2 +- - extras/volume_id/lib/lsi_raid.c | 2 +- - extras/volume_id/lib/lvm.c | 6 +- - extras/volume_id/lib/minix.c | 2 +- - extras/volume_id/lib/netware.c | 2 +- - extras/volume_id/lib/ntfs.c | 24 ++-- - extras/volume_id/lib/nvidia_raid.c | 2 +- - extras/volume_id/lib/ocfs.c | 6 +- - extras/volume_id/lib/promise_raid.c | 2 +- - extras/volume_id/lib/reiserfs.c | 2 +- - extras/volume_id/lib/romfs.c | 2 +- - extras/volume_id/lib/silicon_raid.c | 2 +- - extras/volume_id/lib/squashfs.c | 2 +- - extras/volume_id/lib/sysv.c | 2 +- - extras/volume_id/lib/udf.c | 12 +- - extras/volume_id/lib/ufs.c | 8 +- - extras/volume_id/lib/util.c | 28 ++-- - extras/volume_id/lib/via_raid.c | 2 +- - extras/volume_id/lib/volume_id.c | 6 +- - extras/volume_id/lib/vxfs.c | 2 +- - extras/volume_id/lib/xfs.c | 2 +- - extras/volume_id/vol_id.c | 6 +- - test-udev.c | 8 +- - udev_config.c | 14 +- - udev_db.c | 30 ++-- - udev_device.c | 40 +++--- - udev_node.c | 68 +++++----- - udev_rules.c | 268 +++++++++++++++++----------------- - udev_rules_parse.c | 128 +++++++++--------- - udev_selinux.c | 18 ++-- - udev_sysfs.c | 52 ++++---- - udev_utils.c | 22 ++-- - udev_utils_file.c | 14 +- - udevadm.c | 11 +- - udevcontrol.c | 16 +- - udevd.8 | 4 +- - udevd.c | 147 ++++++++++---------- - udevd.xml | 4 +- - udevinfo.c | 16 +- - udevsettle.c | 16 +- - udevtest.c | 10 +- - udevtrigger.c | 8 +- - 62 files changed, 671 insertions(+), 674 deletions(-) - -diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c -index f94cdc0..6d3c233 100644 ---- a/extras/ata_id/ata_id.c -+++ b/extras/ata_id/ata_id.c -@@ -126,24 +126,24 @@ int main(int argc, char *argv[]) - - node = argv[optind]; - if (node == NULL) { -- err("no node specified"); -+ err("no node specified\n"); - rc = 1; - goto exit; - } - - fd = open(node, O_RDONLY|O_NONBLOCK); - if (fd < 0) { -- err("unable to open '%s'", node); -+ err("unable to open '%s'\n", node); - rc = 1; - goto exit; - } - - if (ioctl(fd, HDIO_GET_IDENTITY, &id)) { - if (errno == ENOTTY) { -- info("HDIO_GET_IDENTITY unsupported for '%s'", node); -+ info("HDIO_GET_IDENTITY unsupported for '%s'\n", node); - rc = 2; - } else { -- err("HDIO_GET_IDENTITY failed for '%s'", node); -+ err("HDIO_GET_IDENTITY failed for '%s'\n", node); - rc = 3; - } - goto close; -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 315d276..b88f5b4 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -71,7 +71,6 @@ void log_message(int priority, const char *format, ...) - if (debug) { - fprintf(stderr, "[%d] ", (int) getpid()); - vfprintf(stderr, format, args); -- fprintf(stderr, "\n"); - } else - vsyslog(priority, format, args); - va_end(args); -@@ -137,10 +136,10 @@ static unsigned long long int cd_media_session_last_offset; - static void info_scsi_cmd_err(const char *cmd, int err) - { - if (err == -1) { -- info("%s failed", cmd); -+ info("%s failed\n", cmd); - return; - } -- info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err)); -+ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh\n", cmd, SK(err), ASC(err), ASCQ(err)); - } - - struct scsi_cmd { -@@ -199,7 +198,7 @@ static int cd_capability_compat(int fd) - - capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); - if (capabilty < 0) { -- info("CDROM_GET_CAPABILITY failed"); -+ info("CDROM_GET_CAPABILITY failed\n"); - return -1; - } - -@@ -235,11 +234,11 @@ static int cd_inquiry(int fd) { - } - - if ((inq[0] & 0x1F) != 5) { -- info("not an MMC unit"); -+ info("not an MMC unit\n"); - return -1; - } - -- info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32); -+ info("INQUIRY: [%.8s][%.16s][%.4s]\n", inq + 8, inq + 16, inq + 32); - return 0; - } - -@@ -264,9 +263,9 @@ static int cd_profiles(int fd) - } - - len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); -- info("GET CONFIGURATION: number of profiles %i", len); -+ info("GET CONFIGURATION: number of profiles %i\n", len); - if (len > sizeof(profiles)) { -- info("invalid number of profiles"); -+ info("invalid number of profiles\n"); - return -1; - } - -@@ -287,7 +286,7 @@ static int cd_profiles(int fd) - unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); - if (profile == 0) - continue; -- info("profile 0x%02x", profile); -+ info("profile 0x%02x\n", profile); - - switch (profile) { - case 0x03: -@@ -343,9 +342,9 @@ static int cd_profiles(int fd) - - /* current media profile */ - cur_profile = header[6] << 8 | header[7]; -- info("current profile 0x%02x", cur_profile); -+ info("current profile 0x%02x\n", cur_profile); - if (cur_profile == 0) { -- info("no current profile, assuming no media"); -+ info("no current profile, assuming no media\n"); - return -1; - } - -@@ -435,7 +434,7 @@ static int cd_media_info(int fd) - return -1; - }; - -- info("disk type %02x", header[8]); -+ info("disk type %02x\n", header[8]); - - if ((header[2] & 3) < 4) - cd_media_state = media_status[header[2] & 3]; -@@ -467,12 +466,12 @@ static int cd_media_toc(int fd) - } - - len = (header[0] << 8 | header[1]) + 2; -- info("READ TOC: len: %d", len); -+ info("READ TOC: len: %d\n", len); - if (len > sizeof(toc)) - return -1; - - /* check if we have a data track */ -- info("ctl %02x (0x04 is data/audio)", header[5]); -+ info("ctl %02x (0x04 is data/audio)\n", header[5]); - cd_media_has_audio = (header[5] & 0x04) == 0; - - scsi_cmd_set(&sc, 0, 0x43); -@@ -490,7 +489,7 @@ static int cd_media_toc(int fd) - unsigned int block; - - block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7]; -- info("track %u starts at block %u", p[2], block); -+ info("track %u starts at block %u\n", p[2], block); - } - - scsi_cmd_set(&sc, 0, 0x43); -@@ -503,7 +502,7 @@ static int cd_media_toc(int fd) - return -1; - } - len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7]; -- info("last track %u starts at block %u", header[4+2], len); -+ info("last track %u starts at block %u\n", header[4+2], len); - cd_media_session_last_offset = (unsigned long long int)len * 2048; - return 0; - } -@@ -550,7 +549,7 @@ int main(int argc, char *argv[]) - - node = argv[optind]; - if (!node) { -- err("no device"); -+ err("no device\n"); - fprintf(stderr, "no device\n"); - rc = 1; - goto exit; -@@ -558,11 +557,11 @@ int main(int argc, char *argv[]) - - fd = open(node, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("unable to open '%s'", node); -+ info("unable to open '%s'\n", node); - rc = 1; - goto exit; - } -- info("probing: '%s'", node); -+ info("probing: '%s'\n", node); - - /* same data as original cdrom_id */ - if (cd_capability_compat(fd) < 0) { -diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c -index 4ba89ed..4a17770 100644 ---- a/extras/edd_id/edd_id.c -+++ b/extras/edd_id/edd_id.c -@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) - node = arg; - } - if (node == NULL) { -- err("no node specified"); -+ err("no node specified\n"); - fprintf(stderr, "no node specified\n"); - goto exit; - } -@@ -83,7 +83,7 @@ int main(int argc, char *argv[]) - /* check for kernel support */ - dir = opendir("/sys/firmware/edd"); - if (dir == NULL) { -- info("no kernel EDD support"); -+ info("no kernel EDD support\n"); - fprintf(stderr, "no kernel EDD support\n"); - rc = 2; - goto exit; -@@ -91,7 +91,7 @@ int main(int argc, char *argv[]) - - disk_fd = open(node, O_RDONLY); - if (disk_fd < 0) { -- info("unable to open '%s'", node); -+ info("unable to open '%s'\n", node); - fprintf(stderr, "unable to open '%s'\n", node); - rc = 3; - goto closedir; -@@ -99,38 +99,38 @@ int main(int argc, char *argv[]) - - /* check for valid MBR signature */ - if (lseek(disk_fd, 510, SEEK_SET) < 0) { -- info("seek to MBR validity failed '%s'", node); -+ info("seek to MBR validity failed '%s'\n", node); - rc = 4; - goto close; - } - if (read(disk_fd, &mbr_valid, sizeof(mbr_valid)) != sizeof(mbr_valid)) { -- info("read MBR validity failed '%s'", node); -+ info("read MBR validity failed '%s'\n", node); - rc = 5; - goto close; - } - if (mbr_valid != 0xAA55) { - fprintf(stderr, "no valid MBR signature '%s'\n", node); -- info("no valid MBR signature '%s'", node); -+ info("no valid MBR signature '%s'\n", node); - rc=6; - goto close; - } - - /* read EDD signature */ - if (lseek(disk_fd, 440, SEEK_SET) < 0) { -- info("seek to signature failed '%s'", node); -+ info("seek to signature failed '%s'\n", node); - rc = 7; - goto close; - } - if (read(disk_fd, &disk_id, sizeof(disk_id)) != sizeof(disk_id)) { -- info("read signature failed '%s'", node); -+ info("read signature failed '%s'\n", node); - rc = 8; - goto close; - } - /* all zero is invalid */ -- info("read id 0x%08x from '%s'", disk_id, node); -+ info("read id 0x%08x from '%s'\n", disk_id, node); - if (disk_id == 0) { - fprintf(stderr, "no EDD signature '%s'\n", node); -- info("'%s' signature is zero", node); -+ info("'%s' signature is zero\n", node); - rc = 9; - goto close; - } -@@ -150,18 +150,18 @@ int main(int argc, char *argv[]) - - sysfs_fd = open(file, O_RDONLY); - if (sysfs_fd < 0) { -- info("unable to open sysfs '%s'", file); -+ info("unable to open sysfs '%s'\n", file); - continue; - } - - size = read(sysfs_fd, sysfs_id_buf, sizeof(sysfs_id_buf)-1); - close(sysfs_fd); - if (size <= 0) { -- info("read sysfs '%s' failed", file); -+ info("read sysfs '%s' failed\n", file); - continue; - } - sysfs_id_buf[size] = '\0'; -- info("read '%s' from '%s'", sysfs_id_buf, file); -+ info("read '%s' from '%s'\n", sysfs_id_buf, file); - sysfs_id = strtoul(sysfs_id_buf, NULL, 16); - - /* look for matching value, that appears only once */ -@@ -171,7 +171,7 @@ int main(int argc, char *argv[]) - strlcpy(match, dent->d_name, sizeof(match)); - } else { - /* error, same signature for another device */ -- info("'%s' does not have a unique signature", node); -+ info("'%s' does not have a unique signature\n", node); - fprintf(stderr, "'%s' does not have a unique signature\n", node); - rc = 10; - goto exit; -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index d8b269a..463b377 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -174,25 +174,25 @@ static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) - unsigned int maj, min; - const char *attr; - -- dbg("%s", devpath); -+ dbg("%s\n", devpath); - attr = sysfs_attr_get_value(devpath, "dev"); - if (attr == NULL) { -- dbg("%s: could not get dev attribute: %s", devpath, strerror(errno)); -+ dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); - return -1; - } - -- dbg("dev value %s", attr); -+ dbg("dev value %s\n", attr); - if (sscanf(attr, "%u:%u", &maj, &min) != 2) { -- err("%s: invalid dev major/minor", devpath); -+ err("%s: invalid dev major/minor\n", devpath); - return -1; - } - - snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", - TMP_DIR, TMP_PREFIX, maj, min, getpid()); - -- dbg("tmpdev '%s'", tmpdev); -+ dbg("tmpdev '%s'\n", tmpdev); - if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { -- err("mknod failed: %s", strerror(errno)); -+ err("mknod failed: %s\n", strerror(errno)); - return -1; - } - return 0; -@@ -273,7 +273,7 @@ static int get_file_options(const char *vendor, const char *model, - if (errno == ENOENT) { - return 1; - } else { -- err("can't open %s: %s", config_file, strerror(errno)); -+ err("can't open %s: %s\n", config_file, strerror(errno)); - return -1; - } - } -@@ -285,7 +285,7 @@ static int get_file_options(const char *vendor, const char *model, - */ - buffer = malloc(MAX_BUFFER_LEN); - if (!buffer) { -- err("Can't allocate memory."); -+ err("can't allocate memory\n"); - return -1; - } - -@@ -299,7 +299,7 @@ static int get_file_options(const char *vendor, const char *model, - break; - lineno++; - if (buf[strlen(buffer) - 1] != '\n') { -- info("Config file line %d too long.\n", lineno); -+ info("Config file line %d too long\n", lineno); - break; - } - -@@ -344,14 +344,14 @@ static int get_file_options(const char *vendor, const char *model, - } - options_in = str1; - } -- dbg("config file line %d:" -+ dbg("config file line %d:\n" - " vendor '%s'; model '%s'; options '%s'\n", - lineno, vendor_in, model_in, options_in); - /* - * Only allow: [vendor=foo[,model=bar]]options=stuff - */ - if (!options_in || (!vendor_in && model_in)) { -- info("Error parsing config file line %d '%s'", lineno, buffer); -+ info("Error parsing config file line %d '%s'\n", lineno, buffer); - retval = -1; - break; - } -@@ -389,7 +389,7 @@ static int get_file_options(const char *vendor, const char *model, - c = argc_count(buffer) + 2; - *newargv = calloc(c, sizeof(**newargv)); - if (!*newargv) { -- err("Can't allocate memory."); -+ err("can't allocate memory\n"); - retval = -1; - } else { - *argc = c; -@@ -492,7 +492,7 @@ static int set_options(int argc, char **argv, const char *short_opts, - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - default_page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'", optarg); -+ info("Unknown page code '%s'\n", optarg); - return -1; - } - break; -@@ -571,13 +571,13 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - *page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'", optarg); -+ info("Unknown page code '%s'\n", optarg); - retval = -1; - } - break; - - default: -- info("Unknown or bad option '%c' (0x%x)", option, option); -+ info("Unknown or bad option '%c' (0x%x)\n", option, option); - retval = -1; - break; - } -@@ -596,7 +596,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) - - vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!vendor) { -- info("%s: cannot get vendor attribute", dev_scsi->devpath); -+ info("%s: cannot get vendor attribute\n", dev_scsi->devpath); - return -1; - } - set_str(vendor_str, vendor, sizeof(vendor_str)-1); -@@ -610,7 +610,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi) - - type = sysfs_attr_get_value(dev_scsi->devpath, "type"); - if (!type) { -- info("%s: cannot get type attribute", dev_scsi->devpath); -+ info("%s: cannot get type attribute\n", dev_scsi->devpath); - return -1; - } - set_type(type_str, type, sizeof(type_str)); -@@ -690,7 +690,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - - dev = sysfs_device_get(devpath); - if (dev == NULL) { -- err("unable to access '%s'", devpath); -+ err("unable to access '%s'\n", devpath); - return 1; - } - -@@ -709,7 +709,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - /* get scsi parent device */ - dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); - if (dev_scsi == NULL) { -- err("unable to access parent device of '%s'", devpath); -+ err("unable to access parent device of '%s'\n", devpath); - return 1; - } - set_sysfs_values(dev_scsi); -@@ -721,7 +721,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - - /* get per device (vendor + model) options from the config file */ - retval = per_dev_options(dev_scsi, &good_dev, &page_code); -- dbg("per dev options: good %d; page code 0x%x", good_dev, page_code); -+ dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); - - if (!good_dev) { - retval = 1; -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index c84f41e..28e82db 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -179,7 +179,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - - sb_len = io->sb_len_wr; - if (sb_len < 1) { -- info("%s: sense buffer empty", dev_scsi->kernel); -+ info("%s: sense buffer empty\n", dev_scsi->kernel); - return -1; - } - -@@ -193,7 +193,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - */ - s = sense_buffer[7] + 8; - if (sb_len < s) { -- info("%s: sense buffer too small %d bytes, %d bytes too short", -+ info("%s: sense buffer too small %d bytes, %d bytes too short\n", - dev_scsi->kernel, sb_len, s - sb_len); - return -1; - } -@@ -204,7 +204,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - /* - * Possible? - */ -- info("%s: sense result too" " small %d bytes", -+ info("%s: sense result too" " small %d bytes\n", - dev_scsi->kernel, s); - return -1; - } -@@ -216,25 +216,25 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - asc = sense_buffer[2]; - ascq = sense_buffer[3]; - } else { -- info("%s: invalid sense code 0x%x", -+ info("%s: invalid sense code 0x%x\n", - dev_scsi->kernel, code); - return -1; - } -- info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x", -+ info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x\n", - dev_scsi->kernel, sense_key, asc, ascq); - } else { - if (sb_len < 4) { -- info("%s: sense buffer too small %d bytes, %d bytes too short", -+ info("%s: sense buffer too small %d bytes, %d bytes too short\n", - dev_scsi->kernel, sb_len, 4 - sb_len); - return -1; - } - - if (sense_buffer[0] < 15) -- info("%s: old sense key: 0x%x", dev_scsi->kernel, sense_buffer[0] & 0x0f); -+ info("%s: old sense key: 0x%x\n", dev_scsi->kernel, sense_buffer[0] & 0x0f); - else -- info("%s: sense = %2x %2x", -+ info("%s: sense = %2x %2x\n", - dev_scsi->kernel, sense_buffer[0], sense_buffer[2]); -- info("%s: non-extended sense class %d code 0x%0x", -+ info("%s: non-extended sense class %d code 0x%0x\n", - dev_scsi->kernel, sense_class, code); - - } -@@ -247,8 +247,8 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - out_buffer[j++] = ' '; - } - out_buffer[j] = '\0'; -- info("%s: sense dump:", dev_scsi->kernel); -- info("%s: %s", dev_scsi->kernel, out_buffer); -+ info("%s: sense dump:\n", dev_scsi->kernel); -+ info("%s: %s\n", dev_scsi->kernel, out_buffer); - - #endif - return -1; -@@ -261,11 +261,11 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - /* - * Impossible, should not be called. - */ -- info("%s: called with no error", __FUNCTION__); -+ info("%s: called with no error\n", __FUNCTION__); - return -1; - } - -- info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x", -+ info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", - dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); - if (io->status == SCSI_CHECK_CONDITION) - return scsi_dump_sense(dev_scsi, io); -@@ -285,7 +285,7 @@ static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, - int retry = 3; /* rather random */ - - if (buflen > SCSI_INQ_BUFF_LEN) { -- info("buflen %d too long", buflen); -+ info("buflen %d too long\n", buflen); - return -1; - } - -@@ -304,7 +304,7 @@ resend: - io_hdr.timeout = DEF_TIMEOUT; - - if (ioctl(fd, SG_IO, &io_hdr) < 0) { -- info("%s: ioctl failed: %s", dev_scsi->kernel, strerror(errno)); -+ info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); - retval = -1; - goto error; - } -@@ -336,7 +336,7 @@ resend: - - error: - if (retval < 0) -- info("%s: Unable to get INQUIRY vpd %d page 0x%x.", -+ info("%s: Unable to get INQUIRY vpd %d page 0x%x.\n", - dev_scsi->kernel, evpd, page); - - return retval; -@@ -355,11 +355,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - return 1; - - if (buffer[1] != 0) { -- info("%s: page 0 not available.", dev_scsi->kernel); -+ info("%s: page 0 not available.\n", dev_scsi->kernel); - return 1; - } - if (buffer[3] > len) { -- info("%s: page 0 buffer too long %d", dev_scsi->kernel, buffer[3]); -+ info("%s: page 0 buffer too long %d\n", dev_scsi->kernel, buffer[3]); - return 1; - } - -@@ -377,11 +377,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - */ - vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!vendor) { -- info("%s: cannot get model attribute", dev_scsi->kernel); -+ info("%s: cannot get model attribute\n", dev_scsi->kernel); - return 1; - } - if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { -- info("%s: invalid page0 data", dev_scsi->kernel); -+ info("%s: invalid page0 data\n", dev_scsi->kernel); - return 1; - } - } -@@ -399,7 +399,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - - attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!attr) { -- info("%s: cannot get vendor attribute", dev_scsi->kernel); -+ info("%s: cannot get vendor attribute\n", dev_scsi->kernel); - return 1; - } - strncpy(serial, attr, VENDOR_LENGTH); -@@ -407,7 +407,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - - attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); - if (!attr) { -- info("%s: cannot get model attribute", dev_scsi->kernel); -+ info("%s: cannot get model attribute\n", dev_scsi->kernel); - return 1; - } - strncat(serial, attr, MODEL_LENGTH); -@@ -419,7 +419,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - * above, ind will never be too large. - */ - if (ind != (VENDOR_LENGTH + MODEL_LENGTH)) { -- info("%s: expected length %d, got length %d", -+ info("%s: expected length %d, got length %d\n", - dev_scsi->kernel, (VENDOR_LENGTH + MODEL_LENGTH), ind); - return 1; - } -@@ -477,7 +477,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, - len += VENDOR_LENGTH + MODEL_LENGTH; - - if (max_len < len) { -- info("%s: length %d too short - need %d", -+ info("%s: length %d too short - need %d\n", - dev_scsi->kernel, max_len, len); - return 1; - } -@@ -528,7 +528,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, - { - int i, j; - -- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); -+ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); - serial[0] = hex_str[id_search->id_type]; - /* serial has been memset to zero before */ - j = strlen(serial); /* j = 1; */ -@@ -557,7 +557,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, - return 1; - - if (page_83[1] != PAGE_83) { -- info("%s: Invalid page 0x83", dev_scsi->kernel); -+ info("%s: Invalid page 0x83\n", dev_scsi->kernel); - return 1; - } - -@@ -613,13 +613,13 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, - id_search_list[id_ind].naa_type, - id_search_list[id_ind].code_set); - if (!retval) { -- dbg(" used\n"); -+ dbg(" used\n"); - return retval; - } else if (retval < 0) { -- dbg(" failed\n"); -+ dbg(" failed\n"); - return retval; - } else { -- dbg(" not used\n"); -+ dbg(" not used\n"); - } - } - } -@@ -646,7 +646,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, - return 1; - - if (page_83[1] != PAGE_83) { -- info("%s: Invalid page 0x83", dev_scsi->kernel); -+ info("%s: Invalid page 0x83\n", dev_scsi->kernel); - return 1; - } - /* -@@ -690,7 +690,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, - serial[j++] = hex_str[page_83[i] & 0x0f]; - i++; - } -- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel); -+ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel); - return 0; - } - -@@ -710,13 +710,13 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, - return retval; - - if (buf[1] != PAGE_80) { -- info("%s: Invalid page 0x80", dev_scsi->kernel); -+ info("%s: Invalid page 0x80\n", dev_scsi->kernel); - return 1; - } - - len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3]; - if (max_len < len) { -- info("%s: length %d too short - need %d", -+ info("%s: length %d too short - need %d\n", - dev_scsi->kernel, max_len, len); - return 1; - } -@@ -746,7 +746,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("%s: cannot open %s: %s", -+ info("%s: cannot open %s: %s\n", - dev_scsi->kernel, devname, strerror(errno)); - return 1; - } -@@ -762,7 +762,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, - sprintf(type,"%x", buf[0] & 0x1f); - - if (close(fd) < 0) -- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); -+ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); - - return 0; - } -@@ -779,7 +779,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("%s: cannot open %s: %s", -+ info("%s: cannot open %s: %s\n", - dev_scsi->kernel, devname, strerror(errno)); - return 1; - } -@@ -826,7 +826,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - goto completed; - } - } else if (page_code != 0x00) { -- info("%s: unsupported page code 0x%d", dev_scsi->kernel, page_code); -+ info("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code); - return 1; - } - -@@ -870,6 +870,6 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - retval = 1; - completed: - if (close(fd) < 0) -- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno)); -+ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); - return retval; - } -diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c -index 5fb030d..fed6631 100644 ---- a/extras/usb_id/usb_id.c -+++ b/extras/usb_id/usb_id.c -@@ -231,20 +231,20 @@ static int usb_id(const char *devpath) - /* get all usb specific information: dev_interface, if_class, dev_usb */ - dev = sysfs_device_get(devpath); - if (dev == NULL) { -- err("unable to access '%s'", devpath); -+ err("unable to access '%s'\n", devpath); - return 1; - } - - /* usb interface directory */ - dev_interface = sysfs_device_get_parent_with_subsystem(dev, "usb"); - if (dev_interface == NULL) { -- info("unable to access usb_interface device of '%s'", devpath); -+ info("unable to access usb_interface device of '%s'\n", devpath); - return 1; - } - - if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass"); - if (!if_class) { -- info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel); -+ info("%s: cannot get bInterfaceClass attribute\n", dev_interface->kernel); - return 1; - } - if_class_num = strtoul(if_class, NULL, 16); -@@ -260,7 +260,7 @@ static int usb_id(const char *devpath) - /* usb device directory */ - dev_usb = sysfs_device_get_parent_with_subsystem(dev_interface, "usb"); - if (!dev_usb) { -- info("unable to find parent 'usb' device of '%s'", devpath); -+ info("unable to find parent 'usb' device of '%s'\n", devpath); - return 1; - } - -@@ -273,39 +273,39 @@ static int usb_id(const char *devpath) - /* get scsi device */ - dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); - if (dev_scsi == NULL) { -- info("unable to find parent 'scsi' device of '%s'", devpath); -+ info("unable to find parent 'scsi' device of '%s'\n", devpath); - goto fallback; - } - if (sscanf(dev_scsi->kernel, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) { -- info("invalid scsi device '%s'", dev_scsi->kernel); -+ info("invalid scsi device '%s'\n", dev_scsi->kernel); - goto fallback; - } - - /* Generic SPC-2 device */ - scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); - if (!scsi_vendor) { -- info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI vendor attribute\n", dev_scsi->kernel); - goto fallback; - } - set_str(vendor_str, scsi_vendor, sizeof(vendor_str)-1); - - scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model"); - if (!scsi_model) { -- info("%s: cannot get SCSI model attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI model attribute\n", dev_scsi->kernel); - goto fallback; - } - set_str(model_str, scsi_model, sizeof(model_str)-1); - - scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type"); - if (!scsi_type) { -- info("%s: cannot get SCSI type attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI type attribute\n", dev_scsi->kernel); - goto fallback; - } - set_scsi_type(type_str, scsi_type, sizeof(type_str)-1); - - scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev"); - if (!scsi_rev) { -- info("%s: cannot get SCSI revision attribute", dev_scsi->kernel); -+ info("%s: cannot get SCSI revision attribute\n", dev_scsi->kernel); - goto fallback; - } - set_str(revision_str, scsi_rev, sizeof(revision_str)-1); -@@ -329,7 +329,7 @@ fallback: - usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "idVendor"); - - if (!usb_vendor) { -- info("No USB vendor information available"); -+ info("No USB vendor information available\n"); - return 1; - } - set_str(vendor_str, usb_vendor, sizeof(vendor_str)-1); -@@ -345,7 +345,7 @@ fallback: - usb_model = sysfs_attr_get_value(dev_usb->devpath, "idProduct"); - - if (!usb_model) { -- dbg("No USB model information available"); -+ dbg("No USB model information available\n"); - return 1; - } - set_str(model_str, usb_model, sizeof(model_str)-1); -diff --git a/extras/volume_id/lib/adaptec_raid.c b/extras/volume_id/lib/adaptec_raid.c -index 858c3ba..5ab9451 100644 ---- a/extras/volume_id/lib/adaptec_raid.c -+++ b/extras/volume_id/lib/adaptec_raid.c -@@ -86,7 +86,7 @@ int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t si - uint64_t meta_off; - struct adaptec_meta *ad; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/cramfs.c b/extras/volume_id/lib/cramfs.c -index bf32950..9c7eaf6 100644 ---- a/extras/volume_id/lib/cramfs.c -+++ b/extras/volume_id/lib/cramfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct cramfs_super *cs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200); - if (cs == NULL) -diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c -index 560e6bd..60837a4 100644 ---- a/extras/volume_id/lib/ddf_raid.c -+++ b/extras/volume_id/lib/ddf_raid.c -@@ -45,7 +45,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) - uint64_t ddf_off = ((size / 0x200)-1) * 0x200; - const uint8_t *buf; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - if (size < 0x10000) - return -1; -diff --git a/extras/volume_id/lib/ext.c b/extras/volume_id/lib/ext.c -index ac21f12..56edd25 100644 ---- a/extras/volume_id/lib/ext.c -+++ b/extras/volume_id/lib/ext.c -@@ -132,7 +132,7 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) - uint32_t feature_incompat; - uint32_t flags; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200); - if (es == NULL) -@@ -142,9 +142,9 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - - bsize = 0x400 << le32_to_cpu(es->s_log_block_size); -- dbg("ext blocksize 0x%zx", bsize); -+ dbg("ext blocksize 0x%zx\n", bsize); - if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) { -- dbg("invalid ext blocksize"); -+ dbg("invalid ext blocksize\n"); - return -1; - } - -diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c -index 3ddf025..58f8f82 100644 ---- a/extras/volume_id/lib/fat.c -+++ b/extras/volume_id/lib/fat.c -@@ -217,7 +217,7 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, - for (i = 0; i < count; i++) { - /* end marker */ - if (dir[i].name[0] == 0x00) { -- dbg("end of dir"); -+ dbg("end of dir\n"); - break; - } - -@@ -234,11 +234,11 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize, - if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0) - continue; - -- dbg("found ATTR_VOLUME_ID id in root dir"); -+ dbg("found ATTR_VOLUME_ID id in root dir\n"); - return fat_read_filename(filename, fnsize, dir, &dir[i]); - } - -- dbg("skip dir entry"); -+ dbg("skip dir entry\n"); - } - - return 0; -@@ -270,7 +270,7 @@ int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size) - int maxloop; - size_t fnlen; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off, 0x400); - if (buf == NULL) -@@ -328,22 +328,22 @@ magic: - if (sector_size == 0 || ((sector_size & (sector_size-1)) != 0)) - return -1; - -- dbg("sector_size 0x%x", sector_size); -- dbg("sectors_per_cluster 0x%x", vs->sectors_per_cluster); -+ dbg("sector_size 0x%x\n", sector_size); -+ dbg("sectors_per_cluster 0x%x\n", vs->sectors_per_cluster); - - dir_entries = le16_to_cpu(vs->dir_entries); - reserved = le16_to_cpu(vs->reserved); -- dbg("reserved 0x%x", reserved); -+ dbg("reserved 0x%x\n", reserved); - - sect_count = le16_to_cpu(vs->sectors); - if (sect_count == 0) - sect_count = le32_to_cpu(vs->total_sect); -- dbg("sect_count 0x%x", sect_count); -+ dbg("sect_count 0x%x\n", sect_count); - - fat_length = le16_to_cpu(vs->fat_length); -- dbg("fat_length 0x%x", fat_length); -+ dbg("fat_length 0x%x\n", fat_length); - fat32_length = le32_to_cpu(vs->type.fat32.fat32_length); -- dbg("fat32_length 0x%x", fat32_length); -+ dbg("fat32_length 0x%x\n", fat32_length); - - if (fat_length) - fat_size = fat_length * vs->fats; -@@ -351,15 +351,15 @@ magic: - fat_size = fat32_length * vs->fats; - else - return -1; -- dbg("fat_size 0x%x", fat_size); -+ dbg("fat_size 0x%x\n", fat_size); - - dir_size = ((dir_entries * sizeof(struct vfat_dir_entry)) + - (sector_size-1)) / sector_size; -- dbg("dir_size 0x%x", dir_size); -+ dbg("dir_size 0x%x\n", dir_size); - - cluster_count = sect_count - (reserved + fat_size + dir_size); - cluster_count /= vs->sectors_per_cluster; -- dbg("cluster_count 0x%x", cluster_count); -+ dbg("cluster_count 0x%x\n", cluster_count); - - /* must be FAT32 */ - if (!fat_length && fat32_length) -@@ -375,9 +375,9 @@ magic: - - /* the label may be an attribute in the root directory */ - root_start = (reserved + fat_size) * sector_size; -- dbg("root dir start 0x%llx", (unsigned long long) root_start); -+ dbg("root dir start 0x%llx\n", (unsigned long long) root_start); - root_dir_entries = le16_to_cpu(vs->dir_entries); -- dbg("expected entries 0x%x", root_dir_entries); -+ dbg("expected entries 0x%x\n", root_dir_entries); - - buf_size = root_dir_entries * sizeof(struct vfat_dir_entry); - buf = volume_id_get_buffer(id, off + root_start, buf_size); -@@ -423,7 +423,7 @@ fat32: - /* FAT32 root dir is a cluster chain like any other directory */ - buf_size = vs->sectors_per_cluster * sector_size; - root_cluster = le32_to_cpu(vs->type.fat32.root_cluster); -- dbg("root dir cluster %u", root_cluster); -+ dbg("root dir cluster %u\n", root_cluster); - start_data_sect = reserved + fat_size; - - next = root_cluster; -@@ -434,10 +434,10 @@ fat32: - uint64_t fat_entry_off; - int count; - -- dbg("next cluster %u", next); -+ dbg("next cluster %u\n", next); - next_sect_off = (next - 2) * vs->sectors_per_cluster; - next_off = (start_data_sect + next_sect_off) * sector_size; -- dbg("cluster offset 0x%llx", (unsigned long long) next_off); -+ dbg("cluster offset 0x%llx\n", (unsigned long long) next_off); - - /* get cluster */ - buf = volume_id_get_buffer(id, off + next_off, buf_size); -@@ -446,7 +446,7 @@ fat32: - - dir = (struct vfat_dir_entry*) buf; - count = buf_size / sizeof(struct vfat_dir_entry); -- dbg("expected entries 0x%x", count); -+ dbg("expected entries 0x%x\n", count); - - fnlen = get_fat_attr_volume_id(filename, sizeof(filename), dir, count); - if (fnlen > 0) -@@ -464,7 +464,7 @@ fat32: - break; - } - if (maxloop == 0) -- dbg("reached maximum follow count of root cluster chain, give up"); -+ dbg("reached maximum follow count of root cluster chain, give up\n"); - - vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200); - if (vs == NULL) -diff --git a/extras/volume_id/lib/gfs.c b/extras/volume_id/lib/gfs.c -index 1d3a4a0..5338222 100644 ---- a/extras/volume_id/lib/gfs.c -+++ b/extras/volume_id/lib/gfs.c -@@ -78,7 +78,7 @@ static int volume_id_probe_gfs_generic(struct volume_id *id, uint64_t off, int v - { - struct gfs2_sb *sbd; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - sbd = (struct gfs2_sb *) - volume_id_get_buffer(id, off + GFS_SUPERBLOCK_OFFSET, sizeof(struct gfs2_sb)); -diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c -index 70a6b4a..b6d7e02 100644 ---- a/extras/volume_id/lib/hfs.c -+++ b/extras/volume_id/lib/hfs.c -@@ -186,7 +186,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz - struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; - const uint8_t *buf; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -@@ -199,17 +199,17 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz - /* it may be just a hfs wrapper for hfs+ */ - if (memcmp(hfs->embed_sig, "H+", 2) == 0) { - alloc_block_size = be32_to_cpu(hfs->al_blk_size); -- dbg("alloc_block_size 0x%x", alloc_block_size); -+ dbg("alloc_block_size 0x%x\n", alloc_block_size); - - alloc_first_block = be16_to_cpu(hfs->al_bl_st); -- dbg("alloc_first_block 0x%x", alloc_first_block); -+ dbg("alloc_first_block 0x%x\n", alloc_first_block); - - embed_first_block = be16_to_cpu(hfs->embed_startblock); -- dbg("embed_first_block 0x%x", embed_first_block); -+ dbg("embed_first_block 0x%x\n", embed_first_block); - - off += (alloc_first_block * 512) + - (embed_first_block * alloc_block_size); -- dbg("hfs wrapped hfs+ found at offset 0x%llx", (unsigned long long) off); -+ dbg("hfs wrapped hfs+ found at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -@@ -241,11 +241,11 @@ hfsplus: - hfsid_set_uuid(id, hfsplus->finder_info.id); - - blocksize = be32_to_cpu(hfsplus->blocksize); -- dbg("blocksize %u", blocksize); -+ dbg("blocksize %u\n", blocksize); - - memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); - cat_block = be32_to_cpu(extents[0].start_block); -- dbg("catalog start block 0x%x", cat_block); -+ dbg("catalog start block 0x%x\n", cat_block); - - buf = volume_id_get_buffer(id, off + (cat_block * blocksize), 0x2000); - if (buf == NULL) -@@ -255,13 +255,13 @@ hfsplus: - &buf[sizeof(struct hfsplus_bnode_descriptor)]; - - leaf_node_head = be32_to_cpu(bnode->leaf_head); -- dbg("catalog leaf node 0x%x", leaf_node_head); -+ dbg("catalog leaf node 0x%x\n", leaf_node_head); - - leaf_node_size = be16_to_cpu(bnode->node_size); -- dbg("leaf node size 0x%x", leaf_node_size); -+ dbg("leaf node size 0x%x\n", leaf_node_size); - - leaf_node_count = be32_to_cpu(bnode->leaf_count); -- dbg("leaf node count 0x%x", leaf_node_count); -+ dbg("leaf node count 0x%x\n", leaf_node_count); - if (leaf_node_count == 0) - goto found; - -@@ -271,7 +271,7 @@ hfsplus: - for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) { - ext_block_start = be32_to_cpu(extents[ext].start_block); - ext_block_count = be32_to_cpu(extents[ext].block_count); -- dbg("extent start block 0x%x, count 0x%x", ext_block_start, ext_block_count); -+ dbg("extent start block 0x%x, count 0x%x\n", ext_block_start, ext_block_count); - - if (ext_block_count == 0) - goto found; -@@ -284,7 +284,7 @@ hfsplus: - } - if (ext == HFSPLUS_EXTENT_COUNT) - goto found; -- dbg("found block in extent %i", ext); -+ dbg("found block in extent %i\n", ext); - - leaf_off = (ext_block_start + leaf_block) * blocksize; - -@@ -293,10 +293,10 @@ hfsplus: - goto found; - - descr = (struct hfsplus_bnode_descriptor *) buf; -- dbg("descriptor type 0x%x", descr->type); -+ dbg("descriptor type 0x%x\n", descr->type); - - record_count = be16_to_cpu(descr->num_recs); -- dbg("number of records %u", record_count); -+ dbg("number of records %u\n", record_count); - if (record_count == 0) - goto found; - -@@ -306,12 +306,12 @@ hfsplus: - key = (struct hfsplus_catalog_key *) - &buf[sizeof(struct hfsplus_bnode_descriptor)]; - -- dbg("parent id 0x%x", be32_to_cpu(key->parent_id)); -+ dbg("parent id 0x%x\n", be32_to_cpu(key->parent_id)); - if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID) - goto found; - - label_len = be16_to_cpu(key->unicode_len) * 2; -- dbg("label unicode16 len %i", label_len); -+ dbg("label unicode16 len %i\n", label_len); - volume_id_set_label_raw(id, key->unicode, label_len); - volume_id_set_label_unicode16(id, key->unicode, BE, label_len); - -diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c -index f2c4069..0629015 100644 ---- a/extras/volume_id/lib/highpoint.c -+++ b/extras/volume_id/lib/highpoint.c -@@ -49,7 +49,7 @@ int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint6 - struct hpt37x_meta *hpt; - uint32_t magic; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200); - if (buf == NULL) -@@ -73,7 +73,7 @@ int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint6 - uint64_t meta_off; - uint32_t magic; - -- dbg("probing at offset 0x%llx, size 0x%llx", -+ dbg("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/hpfs.c b/extras/volume_id/lib/hpfs.c -index edcf066..ac5a354 100644 ---- a/extras/volume_id/lib/hpfs.c -+++ b/extras/volume_id/lib/hpfs.c -@@ -38,7 +38,7 @@ int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct hpfs_super *hs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200); - if (hs == NULL) -diff --git a/extras/volume_id/lib/iso9660.c b/extras/volume_id/lib/iso9660.c -index 1d8bdff..0e2c686 100644 ---- a/extras/volume_id/lib/iso9660.c -+++ b/extras/volume_id/lib/iso9660.c -@@ -59,7 +59,7 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) - struct iso_volume_descriptor *is; - struct high_sierra_volume_descriptor *hs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -@@ -71,11 +71,11 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) - int vd_offset; - int i; - -- dbg("read label from PVD"); -+ dbg("read label from PVD\n"); - volume_id_set_label_raw(id, is->volume_id, 32); - volume_id_set_label_string(id, is->volume_id, 32); - -- dbg("looking for SVDs"); -+ dbg("looking for SVDs\n"); - vd_offset = ISO_VD_OFFSET; - for (i = 0; i < ISO_VD_MAX; i++) { - uint8_t svd_label[64]; -@@ -86,14 +86,14 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size) - if (is->type != ISO_VD_SUPPLEMENTARY) - continue; - -- dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset)); -+ dbg("found SVD at offset 0x%llx\n", (unsigned long long) (off + vd_offset)); - if (memcmp(is->escape_sequences, "%/@", 3) == 0|| - memcmp(is->escape_sequences, "%/C", 3) == 0|| - memcmp(is->escape_sequences, "%/E", 3) == 0) { -- dbg("Joliet extension found"); -+ dbg("Joliet extension found\n"); - volume_id_set_unicode16(svd_label, sizeof(svd_label), is->volume_id, BE, 32); - if (memcmp(id->label, svd_label, 16) == 0) { -- dbg("SVD label is identical, use the possibly longer PVD one"); -+ dbg("SVD label is identical, use the possibly longer PVD one\n"); - break; - } - -diff --git a/extras/volume_id/lib/isw_raid.c b/extras/volume_id/lib/isw_raid.c -index f5761e8..337a9ce 100644 ---- a/extras/volume_id/lib/isw_raid.c -+++ b/extras/volume_id/lib/isw_raid.c -@@ -43,7 +43,7 @@ int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint - uint64_t meta_off; - struct isw_meta *isw; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/jfs.c b/extras/volume_id/lib/jfs.c -index 00b66cc..950ba43 100644 ---- a/extras/volume_id/lib/jfs.c -+++ b/extras/volume_id/lib/jfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct jfs_super_block *js; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200); - if (js == NULL) -diff --git a/extras/volume_id/lib/jmicron_raid.c b/extras/volume_id/lib/jmicron_raid.c -index 5182a3e..6cb1f6f 100644 ---- a/extras/volume_id/lib/jmicron_raid.c -+++ b/extras/volume_id/lib/jmicron_raid.c -@@ -39,7 +39,7 @@ int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t si - uint64_t meta_off; - struct jmicron_meta *jm; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 5e0c4a4..96ae7c3 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -66,7 +66,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 - uint8_t bytes[16]; - } uuid; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - if (size < 0x10000) - return -1; -@@ -120,7 +120,7 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6 - { - const uint8_t *buf; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - buf = volume_id_get_buffer(id, off, 0x800); -diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c -index 50d43cc..9ff16e2 100644 ---- a/extras/volume_id/lib/linux_swap.c -+++ b/extras/volume_id/lib/linux_swap.c -@@ -43,7 +43,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size - unsigned int page; - struct swap_header_v1_2 *sw; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - /* eek, the swap signature is at the end of the PAGE_SIZE */ - for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) { -diff --git a/extras/volume_id/lib/lsi_raid.c b/extras/volume_id/lib/lsi_raid.c -index 56fd567..eef8714 100644 ---- a/extras/volume_id/lib/lsi_raid.c -+++ b/extras/volume_id/lib/lsi_raid.c -@@ -38,7 +38,7 @@ int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t s - uint64_t meta_off; - struct lsi_meta *lsi; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/lvm.c b/extras/volume_id/lib/lvm.c -index 7c4f811..d234113 100644 ---- a/extras/volume_id/lib/lvm.c -+++ b/extras/volume_id/lib/lvm.c -@@ -51,7 +51,7 @@ int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size) - const uint8_t *buf; - struct lvm1_super_block *lvm; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800); - if (buf == NULL) -@@ -78,7 +78,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) - struct lvm2_super_block *lvm; - struct lvm2_pv_header *pvhdr; - -- dbg("probing at offset 0x%llx", (unsigned long long) off); -+ dbg("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200); - if (buf == NULL) -@@ -95,7 +95,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - - found: -- dbg("found at offset 0x%x (pv hdr offset 0x%x)", -+ dbg("found at offset 0x%x (pv hdr offset 0x%x)\n", - soff, cpu_to_le32(lvm->offset_xl)); - soff += cpu_to_le32(lvm->offset_xl); - pvhdr = (struct lvm2_pv_header *) &buf[soff]; -diff --git a/extras/volume_id/lib/minix.c b/extras/volume_id/lib/minix.c -index 6494506..88b4c18 100644 ---- a/extras/volume_id/lib/minix.c -+++ b/extras/volume_id/lib/minix.c -@@ -70,7 +70,7 @@ int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size) - struct minix_super_block *ms; - struct minix3_super_block *m3s; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -diff --git a/extras/volume_id/lib/netware.c b/extras/volume_id/lib/netware.c -index 4d157aa..c034557 100644 ---- a/extras/volume_id/lib/netware.c -+++ b/extras/volume_id/lib/netware.c -@@ -82,7 +82,7 @@ int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size) - { - struct netware_super_block *nw; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - nw = (struct netware_super_block *) volume_id_get_buffer(id, off + NW_SUPERBLOCK_OFFSET, 0x200); - if (nw == NULL) -diff --git a/extras/volume_id/lib/ntfs.c b/extras/volume_id/lib/ntfs.c -index f63804d..1e73bc8 100644 ---- a/extras/volume_id/lib/ntfs.c -+++ b/extras/volume_id/lib/ntfs.c -@@ -105,7 +105,7 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - const uint8_t *buf; - const uint8_t *val; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200); - if (ns == NULL) -@@ -130,12 +130,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - else - mft_record_size = ns->cluster_per_mft_record * cluster_size; - -- dbg("sectorsize 0x%x", sector_size); -- dbg("clustersize 0x%x", cluster_size); -- dbg("mftcluster %llu", (unsigned long long) mft_cluster); -- dbg("mftoffset 0x%llx", (unsigned long long) mft_off); -- dbg("cluster per mft_record %i", ns->cluster_per_mft_record); -- dbg("mft record size %i", mft_record_size); -+ dbg("sectorsize 0x%x\n", sector_size); -+ dbg("clustersize 0x%x\n", cluster_size); -+ dbg("mftcluster %llu\n", (unsigned long long) mft_cluster); -+ dbg("mftoffset 0x%llx\n", (unsigned long long) mft_off); -+ dbg("cluster per mft_record %i\n", ns->cluster_per_mft_record); -+ dbg("mft record size %i\n", mft_record_size); - - buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size), - mft_record_size); -@@ -143,12 +143,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - - mftr = (struct master_file_table_record*) buf; -- dbg("mftr->magic '%c%c%c%c'", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); -+ dbg("mftr->magic '%c%c%c%c'\n", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); - if (memcmp(mftr->magic, "FILE", 4) != 0) - return -1; - - attr_off = le16_to_cpu(mftr->attrs_offset); -- dbg("file $Volume's attributes are at offset %i", attr_off); -+ dbg("file $Volume's attributes are at offset %i\n", attr_off); - - while (1) { - attr = (struct file_attribute*) &buf[attr_off]; -@@ -167,18 +167,18 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) - if (attr_type == MFT_RECORD_ATTR_END) - break; - -- dbg("found attribute type 0x%x, len %i, at offset %i", -+ dbg("found attribute type 0x%x, len %i, at offset %i\n", - attr_type, attr_len, attr_off); - - if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) { -- dbg("found info, len %i", val_len); -+ dbg("found info, len %i\n", val_len); - info = (struct volume_info*) (((uint8_t *) attr) + val_off); - snprintf(id->type_version, sizeof(id->type_version)-1, - "%u.%u", info->major_ver, info->minor_ver); - } - - if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) { -- dbg("found label, len %i", val_len); -+ dbg("found label, len %i\n", val_len); - if (val_len > VOLUME_ID_LABEL_SIZE) - val_len = VOLUME_ID_LABEL_SIZE; - -diff --git a/extras/volume_id/lib/nvidia_raid.c b/extras/volume_id/lib/nvidia_raid.c -index ca42459..c6b5185 100644 ---- a/extras/volume_id/lib/nvidia_raid.c -+++ b/extras/volume_id/lib/nvidia_raid.c -@@ -41,7 +41,7 @@ int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t siz - uint64_t meta_off; - struct nvidia_meta *nv; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/ocfs.c b/extras/volume_id/lib/ocfs.c -index 9f251f1..ec81f5e 100644 ---- a/extras/volume_id/lib/ocfs.c -+++ b/extras/volume_id/lib/ocfs.c -@@ -132,7 +132,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) - struct ocfs1_super_block_header *osh; - struct ocfs1_super_block_label *osl; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off, 0x200); - if (buf == NULL) -@@ -144,7 +144,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size) - snprintf(id->type_version, sizeof(id->type_version)-1, - "%u.%u", osh->major_version, osh->minor_version); - -- dbg("found OracleCFS signature, now reading label"); -+ dbg("found OracleCFS signature, now reading label\n"); - buf = volume_id_get_buffer(id, off + 0x200, 0x200); - if (buf == NULL) - return -1; -@@ -170,7 +170,7 @@ int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size) - struct ocfs2_super_block *os; - size_t blksize; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - for (blksize = 0x200; blksize <= OCFS2_MAX_BLOCKSIZE; blksize <<= 1) { - buf = volume_id_get_buffer(id, off + OCFS2_SUPER_BLOCK_BLKNO * blksize, 0x200); -diff --git a/extras/volume_id/lib/promise_raid.c b/extras/volume_id/lib/promise_raid.c -index 1c4d365..ecaed00 100644 ---- a/extras/volume_id/lib/promise_raid.c -+++ b/extras/volume_id/lib/promise_raid.c -@@ -42,7 +42,7 @@ int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, u - 63, 255, 256, 16, 399, 0 - }; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x40000) -diff --git a/extras/volume_id/lib/reiserfs.c b/extras/volume_id/lib/reiserfs.c -index 18db638..0f30233 100644 ---- a/extras/volume_id/lib/reiserfs.c -+++ b/extras/volume_id/lib/reiserfs.c -@@ -60,7 +60,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size) - struct reiser4_super_block *rs4; - uint8_t *buf; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200); - if (buf == NULL) -diff --git a/extras/volume_id/lib/romfs.c b/extras/volume_id/lib/romfs.c -index 2db36d6..303a1fb 100644 ---- a/extras/volume_id/lib/romfs.c -+++ b/extras/volume_id/lib/romfs.c -@@ -37,7 +37,7 @@ int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct romfs_super *rfs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200); - if (rfs == NULL) -diff --git a/extras/volume_id/lib/silicon_raid.c b/extras/volume_id/lib/silicon_raid.c -index 634e4ab..cfdcbcb 100644 ---- a/extras/volume_id/lib/silicon_raid.c -+++ b/extras/volume_id/lib/silicon_raid.c -@@ -53,7 +53,7 @@ int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint - uint64_t meta_off; - struct silicon_meta *sil; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/squashfs.c b/extras/volume_id/lib/squashfs.c -index 035d6fb..18e44ab 100644 ---- a/extras/volume_id/lib/squashfs.c -+++ b/extras/volume_id/lib/squashfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct squashfs_super *sqs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - sqs = (struct squashfs_super *) volume_id_get_buffer(id, off, 0x200); - if (sqs == NULL) -diff --git a/extras/volume_id/lib/sysv.c b/extras/volume_id/lib/sysv.c -index e48013c..ba37c4d 100644 ---- a/extras/volume_id/lib/sysv.c -+++ b/extras/volume_id/lib/sysv.c -@@ -95,7 +95,7 @@ int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size) - struct xenix_super *xs; - unsigned int boff; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) { - vs = (struct sysv_super *) -diff --git a/extras/volume_id/lib/udf.c b/extras/volume_id/lib/udf.c -index ac2f40a..2a589c5 100644 ---- a/extras/volume_id/lib/udf.c -+++ b/extras/volume_id/lib/udf.c -@@ -72,7 +72,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size) - unsigned int loc; - unsigned int clen; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200); - if (vsd == NULL) -@@ -100,7 +100,7 @@ blocksize: - vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET + bs, 0x800); - if (vsd == NULL) - return -1; -- dbg("test for blocksize: 0x%x", bs); -+ dbg("test for blocksize: 0x%x\n", bs); - if (vsd->id[0] != '\0') - goto nsr; - } -@@ -113,7 +113,7 @@ nsr: - if (vsd == NULL) - return -1; - -- dbg("vsd: %c%c%c%c%c", -+ dbg("vsd: %c%c%c%c%c\n", - vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]); - - if (vsd->id[0] == '\0') -@@ -138,7 +138,7 @@ anchor: - /* get desriptor list address and block count */ - count = le32_to_cpu(vd->type.anchor.length) / bs; - loc = le32_to_cpu(vd->type.anchor.location); -- dbg("0x%x descriptors starting at logical secor 0x%x", count, loc); -+ dbg("0x%x descriptors starting at logical secor 0x%x\n", count, loc); - - /* pick the primary descriptor from the list */ - for (b = 0; b < count; b++) { -@@ -147,7 +147,7 @@ anchor: - return -1; - - type = le16_to_cpu(vd->tag.id); -- dbg("descriptor type %i", type); -+ dbg("descriptor type %i\n", type); - - /* check validity */ - if (type == 0) -@@ -164,7 +164,7 @@ pvd: - volume_id_set_label_raw(id, &(vd->type.primary.ident.clen), 32); - - clen = vd->type.primary.ident.clen; -- dbg("label string charsize=%i bit", clen); -+ dbg("label string charsize=%i bit\n", clen); - if (clen == 8) - volume_id_set_label_string(id, vd->type.primary.ident.c, 31); - else if (clen == 16) -diff --git a/extras/volume_id/lib/ufs.c b/extras/volume_id/lib/ufs.c -index 4ace8c9..bedcfa4 100644 ---- a/extras/volume_id/lib/ufs.c -+++ b/extras/volume_id/lib/ufs.c -@@ -175,20 +175,20 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) - struct ufs_super_block *ufs; - int offsets[] = {0, 8, 64, 256, -1}; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - for (i = 0; offsets[i] >= 0; i++) { - ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800); - if (ufs == NULL) - return -1; - -- dbg("offset 0x%x", offsets[i] * 0x400); -+ dbg("offset 0x%x\n", offsets[i] * 0x400); - magic = be32_to_cpu(ufs->fs_magic); - if ((magic == UFS_MAGIC) || - (magic == UFS2_MAGIC) || - (magic == UFS_MAGIC_FEA) || - (magic == UFS_MAGIC_LFN)) { -- dbg("magic 0x%08x(be)", magic); -+ dbg("magic 0x%08x(be)\n", magic); - goto found; - } - magic = le32_to_cpu(ufs->fs_magic); -@@ -196,7 +196,7 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size) - (magic == UFS2_MAGIC) || - (magic == UFS_MAGIC_FEA) || - (magic == UFS_MAGIC_LFN)) { -- dbg("magic 0x%08x(le)", magic); -+ dbg("magic 0x%08x(le)\n", magic); - goto found; - } - } -diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c -index 0a3bd39..2a63efe 100644 ---- a/extras/volume_id/lib/util.c -+++ b/extras/volume_id/lib/util.c -@@ -353,33 +353,33 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) - { - ssize_t buf_len; - -- info("get buffer off 0x%llx(%llu), len 0x%zx", (unsigned long long) off, (unsigned long long) off, len); -+ info("get buffer off 0x%llx(%llu), len 0x%zx\n", (unsigned long long) off, (unsigned long long) off, len); - /* check if requested area fits in superblock buffer */ - if (off + len <= SB_BUFFER_SIZE) { - if (id->sbbuf == NULL) { - id->sbbuf = malloc(SB_BUFFER_SIZE); - if (id->sbbuf == NULL) { -- dbg("error malloc"); -+ dbg("error malloc\n"); - return NULL; - } - } - - /* check if we need to read */ - if ((off + len) > id->sbbuf_len) { -- info("read sbbuf len:0x%llx", (unsigned long long) (off + len)); -+ info("read sbbuf len:0x%llx\n", (unsigned long long) (off + len)); - if (lseek(id->fd, 0, SEEK_SET) < 0) { -- dbg("lseek failed (%s)", strerror(errno)); -+ dbg("lseek failed (%s)\n", strerror(errno)); - return NULL; - } - buf_len = read(id->fd, id->sbbuf, off + len); - if (buf_len < 0) { -- dbg("read failed (%s)", strerror(errno)); -+ dbg("read failed (%s)\n", strerror(errno)); - return NULL; - } -- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); -+ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); - id->sbbuf_len = buf_len; - if ((size_t)buf_len < off + len) { -- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); -+ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); - return NULL; - } - } -@@ -387,7 +387,7 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) - return &(id->sbbuf[off]); - } else { - if (len > SEEK_BUFFER_SIZE) { -- dbg("seek buffer too small %d", SEEK_BUFFER_SIZE); -+ dbg("seek buffer too small %d\n", SEEK_BUFFER_SIZE); - return NULL; - } - -@@ -395,28 +395,28 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) - if (id->seekbuf == NULL) { - id->seekbuf = malloc(SEEK_BUFFER_SIZE); - if (id->seekbuf == NULL) { -- dbg("error malloc"); -+ dbg("error malloc\n"); - return NULL; - } - } - - /* check if we need to read */ - if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) { -- info("read seekbuf off:0x%llx len:0x%zx", (unsigned long long) off, len); -+ info("read seekbuf off:0x%llx len:0x%zx\n", (unsigned long long) off, len); - if (lseek(id->fd, off, SEEK_SET) < 0) { -- dbg("lseek failed (%s)", strerror(errno)); -+ dbg("lseek failed (%s)\n", strerror(errno)); - return NULL; - } - buf_len = read(id->fd, id->seekbuf, len); - if (buf_len < 0) { -- dbg("read failed (%s)", strerror(errno)); -+ dbg("read failed (%s)\n", strerror(errno)); - return NULL; - } -- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len); -+ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len); - id->seekbuf_off = off; - id->seekbuf_len = buf_len; - if ((size_t)buf_len < len) { -- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len); -+ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len); - return NULL; - } - } -diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c -index 62c165e..9965e13 100644 ---- a/extras/volume_id/lib/via_raid.c -+++ b/extras/volume_id/lib/via_raid.c -@@ -63,7 +63,7 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size) - uint64_t meta_off; - struct via_meta *via; - -- dbg("probing at offset 0x%llx, size 0x%llx", -+ dbg("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - if (size < 0x10000) -diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c -index 7c68fb1..bb909c9 100644 ---- a/extras/volume_id/lib/volume_id.c -+++ b/extras/volume_id/lib/volume_id.c -@@ -358,7 +358,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) - if (!device_is_readable(id, off)) - return -1; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - for (i = 0; i < ARRAY_SIZE(prober_raid); i++) -@@ -392,7 +392,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size - if (!device_is_readable(id, off)) - return -1; - -- info("probing at offset 0x%llx, size 0x%llx", -+ info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); - - for (i = 0; i < ARRAY_SIZE(prober_filesystem); i++) -@@ -493,7 +493,7 @@ struct volume_id *volume_id_open_node(const char *path) - - fd = open(path, O_RDONLY); - if (fd < 0) { -- dbg("unable to open '%s'", path); -+ dbg("unable to open '%s'\n", path); - return NULL; - } - -diff --git a/extras/volume_id/lib/vxfs.c b/extras/volume_id/lib/vxfs.c -index c9b7628..33d357b 100644 ---- a/extras/volume_id/lib/vxfs.c -+++ b/extras/volume_id/lib/vxfs.c -@@ -37,7 +37,7 @@ int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct vxfs_super *vxs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - vxs = (struct vxfs_super *) volume_id_get_buffer(id, off + 0x200, 0x200); - if (vxs == NULL) -diff --git a/extras/volume_id/lib/xfs.c b/extras/volume_id/lib/xfs.c -index 9eac827..3e10560 100644 ---- a/extras/volume_id/lib/xfs.c -+++ b/extras/volume_id/lib/xfs.c -@@ -45,7 +45,7 @@ int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size) - { - struct xfs_super_block *xs; - -- info("probing at offset 0x%llx", (unsigned long long) off); -+ info("probing at offset 0x%llx\n", (unsigned long long) off); - - xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200); - if (xs == NULL) -diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c -index 04e85ab..5c4e05d 100644 ---- a/extras/volume_id/vol_id.c -+++ b/extras/volume_id/vol_id.c -@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) - - node = argv[optind]; - if (!node) { -- err("no device"); -+ err("no device\n"); - fprintf(stderr, "no device\n"); - rc = 1; - goto exit; -@@ -239,7 +239,7 @@ int main(int argc, char *argv[]) - - if (ioctl(fd, BLKGETSIZE64, &size) != 0) - size = 0; -- dbg("BLKGETSIZE64=%llu", (unsigned long long)size); -+ dbg("BLKGETSIZE64=%llu\n", (unsigned long long)size); - - /* try to drop all privileges before reading disk content */ - if (getuid() == 0) { -@@ -250,7 +250,7 @@ int main(int argc, char *argv[]) - if (setgroups(0, NULL) != 0 || - setgid(pw->pw_gid) != 0 || - setuid(pw->pw_uid) != 0) -- info("unable to drop privileges: %s\n", strerror(errno)); -+ info("unable to drop privileges: %s\n\n", strerror(errno)); - } - } - -diff --git a/test-udev.c b/test-udev.c -index 0c25778..e341b74 100644 ---- a/test-udev.c -+++ b/test-udev.c -@@ -90,10 +90,10 @@ int main(int argc, char *argv[], char *envp[]) - - logging_init("udev"); - if (devnull < 0) -- err("open /dev/null failed: %s", strerror(errno)); -+ err("open /dev/null failed: %s\n", strerror(errno)); - udev_config_init(); - selinux_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - - /* set signal handlers */ - memset(&act, 0x00, sizeof(act)); -@@ -115,7 +115,7 @@ int main(int argc, char *argv[], char *envp[]) - subsystem = argv[1]; - - if (action == NULL || subsystem == NULL || devpath == NULL) { -- err("action, subsystem or devpath missing"); -+ err("action, subsystem or devpath missing\n"); - goto exit; - } - -@@ -132,7 +132,7 @@ int main(int argc, char *argv[], char *envp[]) - - dev = sysfs_device_get(devpath); - if (dev == NULL) { -- info("unable to open '%s'", devpath); -+ info("unable to open '%s'\n", devpath); - goto fail; - } - -diff --git a/udev_config.c b/udev_config.c -index 2f2a69e..4219094 100644 ---- a/udev_config.c -+++ b/udev_config.c -@@ -98,7 +98,7 @@ static int parse_config_file(void) - int retval = 0; - - if (file_map(udev_config_filename, &buf, &bufsize) != 0) { -- err("can't open '%s' as config file: %s", udev_config_filename, strerror(errno)); -+ err("can't open '%s' as config file: %s\n", udev_config_filename, strerror(errno)); - return -ENODEV; - } - -@@ -124,7 +124,7 @@ static int parse_config_file(void) - continue; - - if (count >= sizeof(line)) { -- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -+ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); - continue; - } - -@@ -134,7 +134,7 @@ static int parse_config_file(void) - linepos = line; - retval = get_key(&linepos, &variable, &value); - if (retval != 0) { -- err("error parsing %s, line %d:%d", udev_config_filename, lineno, (int)(linepos-line)); -+ err("error parsing %s, line %d:%d\n", udev_config_filename, lineno, (int)(linepos-line)); - continue; - } - -@@ -193,8 +193,8 @@ void udev_config_init(void) - if (env) - udev_log_priority = log_priority(env); - -- dbg("UDEV_CONFIG_FILE='%s'", udev_config_filename); -- dbg("udev_root='%s'", udev_root); -- dbg("udev_rules='%s'", udev_rules_dir); -- dbg("udev_log=%d", udev_log_priority); -+ dbg("UDEV_CONFIG_FILE='%s'\n", udev_config_filename); -+ dbg("udev_root='%s'\n", udev_root); -+ dbg("udev_rules='%s'\n", udev_rules_dir); -+ dbg("udev_log=%d\n", udev_log_priority); - } -diff --git a/udev_db.c b/udev_db.c -index 1feab7d..ddcf85e 100644 ---- a/udev_db.c -+++ b/udev_db.c -@@ -65,13 +65,13 @@ static int name_index(const char *devpath, const char *name, int add) - strlcat(filename, device, sizeof(filename)); - - if (add) { -- info("creating index: '%s'", filename); -+ info("creating index: '%s'\n", filename); - create_path(filename); - fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); - if (fd > 0) - close(fd); - } else { -- info("removing index: '%s'", filename); -+ info("removing index: '%s'\n", filename); - unlink(filename); - delete_path(filename); - } -@@ -92,12 +92,12 @@ int udev_db_get_devices_by_name(const char *name, struct list_head *name_list) - - dir = opendir(dirname); - if (dir == NULL) { -- info("no index directory '%s': %s", dirname, strerror(errno)); -+ info("no index directory '%s': %s\n", dirname, strerror(errno)); - rc = -1; - goto out; - } - -- info("found index directory '%s'", dirname); -+ info("found index directory '%s'\n", dirname); - while (1) { - struct dirent *ent; - char device[PATH_SIZE]; -@@ -146,12 +146,12 @@ int udev_db_add_device(struct udevice *udev) - if (list_empty(&udev->symlink_list) && list_empty(&udev->env_list) && - !udev->partitions && !udev->ignore_remove) { - int ret; -- dbg("nothing interesting to store, create symlink"); -+ dbg("nothing interesting to store, create symlink\n"); - selinux_setfscreatecon(filename, NULL, S_IFLNK); - ret = symlink(udev->name, filename); - selinux_resetfscreatecon(); - if (ret != 0) { -- err("unable to create db link '%s': %s", filename, strerror(errno)); -+ err("unable to create db link '%s': %s\n", filename, strerror(errno)); - return -1; - } - } else { -@@ -160,10 +160,10 @@ int udev_db_add_device(struct udevice *udev) - - f = fopen(filename, "w"); - if (f == NULL) { -- err("unable to create db file '%s': %s", filename, strerror(errno)); -+ err("unable to create db file '%s': %s\n", filename, strerror(errno)); - return -1; - } -- dbg("storing data for device '%s' in '%s'", udev->dev->devpath, filename); -+ dbg("storing data for device '%s' in '%s'\n", udev->dev->devpath, filename); - - fprintf(f, "N:%s\n", udev->name); - list_for_each_entry(name_loop, &udev->symlink_list, node) { -@@ -205,28 +205,28 @@ int udev_db_get_device(struct udevice *udev, const char *devpath) - devpath_to_db_path(devpath, filename, sizeof(filename)); - - if (lstat(filename, &stats) != 0) { -- info("no db file to read %s: %s", filename, strerror(errno)); -+ info("no db file to read %s: %s\n", filename, strerror(errno)); - return -1; - } - if ((stats.st_mode & S_IFMT) == S_IFLNK) { - char target[NAME_SIZE]; - int target_len; - -- info("found a symlink as db file"); -+ info("found a symlink as db file\n"); - target_len = readlink(filename, target, sizeof(target)); - if (target_len > 0) - target[target_len] = '\0'; - else { -- info("error reading db link %s: %s", filename, strerror(errno)); -+ info("error reading db link %s: %s\n", filename, strerror(errno)); - return -1; - } -- dbg("db link points to '%s'", target); -+ dbg("db link points to '%s'\n", target); - strlcpy(udev->name, target, sizeof(udev->name)); - return 0; - } - - if (file_map(filename, &buf, &bufsize) != 0) { -- info("error reading db file %s: %s", filename, strerror(errno)); -+ info("error reading db file %s: %s\n", filename, strerror(errno)); - return -1; - } - -@@ -323,7 +323,7 @@ int udev_db_get_all_entries(struct list_head *name_list) - strlcat(dbpath, "/"DB_DIR, sizeof(dbpath)); - dir = opendir(dbpath); - if (dir == NULL) { -- info("no udev_db available '%s': %s", dbpath, strerror(errno)); -+ info("no udev_db available '%s': %s\n", dbpath, strerror(errno)); - return -1; - } - -@@ -340,7 +340,7 @@ int udev_db_get_all_entries(struct list_head *name_list) - strlcpy(device, ent->d_name, sizeof(device)); - path_decode(device); - name_list_add(name_list, device, 1); -- dbg("added '%s'", device); -+ dbg("added '%s'\n", device); - } - - closedir(dir); -diff --git a/udev_device.c b/udev_device.c -index 62217ff..6546db4 100644 ---- a/udev_device.c -+++ b/udev_device.c -@@ -104,13 +104,13 @@ static int rename_netif(struct udevice *udev) - struct ifreq ifr; - int retval; - -- info("changing net interface name from '%s' to '%s'", udev->dev->kernel, udev->name); -+ info("changing net interface name from '%s' to '%s'\n", udev->dev->kernel, udev->name); - if (udev->test_run) - return 0; - - sk = socket(PF_INET, SOCK_DGRAM, 0); - if (sk < 0) { -- err("error opening socket: %s", strerror(errno)); -+ err("error opening socket: %s\n", strerror(errno)); - return -1; - } - -@@ -125,7 +125,7 @@ static int rename_netif(struct udevice *udev) - - /* see if the destination interface name already exists */ - if (errno != EEXIST) { -- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); -+ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); - goto exit; - } - -@@ -134,7 +134,7 @@ static int rename_netif(struct udevice *udev) - strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ); - retval = ioctl(sk, SIOCSIFNAME, &ifr); - if (retval != 0) { -- err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); -+ err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno)); - goto exit; - } - -@@ -150,11 +150,11 @@ static int rename_netif(struct udevice *udev) - } - - if (errno != EEXIST) { -- err("error changing net interface name %s to %s: %s", -+ err("error changing net interface name %s to %s: %s\n", - ifr.ifr_name, ifr.ifr_newname, strerror(errno)); - break; - } -- dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop); -+ dbg("wait for netif '%s' to become free, loop=%i\n", udev->name, (30 * 20) - loop); - usleep(1000 * 1000 / 20); - } - } -@@ -170,22 +170,22 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - - 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); -+ info("moved database from '%s' to '%s'\n", udev->devpath_old, udev->dev->devpath); - - /* add device node */ - if (major(udev->devt) != 0 && - (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) { - struct udevice *udev_old; - -- dbg("device node add '%s'", udev->dev->devpath); -+ dbg("device node add '%s'\n", udev->dev->devpath); - - udev_rules_get_name(rules, udev); - if (udev->ignore_device) { -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - goto exit; - } - if (udev->name[0] == '\0') { -- info("device node creation supressed"); -+ info("device node creation supressed\n"); - goto exit; - } - -@@ -194,7 +194,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - if (udev_old != NULL) { - udev_old->test_run = udev->test_run; - if (udev_db_get_device(udev_old, udev->dev->devpath) == 0) { -- info("device '%s' already in database, cleanup", udev->dev->devpath); -+ info("device '%s' already in database, cleanup\n", udev->dev->devpath); - udev_db_delete_device(udev_old); - } else { - udev_device_cleanup(udev_old); -@@ -220,14 +220,14 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - - /* add netif */ - if (strcmp(udev->dev->subsystem, "net") == 0 && strcmp(udev->action, "add") == 0) { -- dbg("netif add '%s'", udev->dev->devpath); -+ dbg("netif add '%s'\n", udev->dev->devpath); - udev_rules_get_name(rules, udev); - if (udev->ignore_device) { -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - goto exit; - } - if (udev->name[0] == '\0') { -- info("device renaming supressed"); -+ info("device renaming supressed\n"); - goto exit; - } - -@@ -239,7 +239,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - retval = rename_netif(udev); - if (retval != 0) - goto exit; -- info("renamed netif to '%s'", udev->name); -+ info("renamed netif to '%s'\n", udev->name); - - /* export old name */ - setenv("INTERFACE_OLD", udev->dev->kernel, 1); -@@ -253,7 +253,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - sysfs_device_set_values(udev->dev, devpath, NULL, NULL); - setenv("DEVPATH", udev->dev->devpath, 1); - setenv("INTERFACE", udev->name, 1); -- info("changed devpath to '%s'", udev->dev->devpath); -+ info("changed devpath to '%s'\n", udev->dev->devpath); - } - } - goto exit; -@@ -270,19 +270,19 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - list_for_each_entry(name_loop, &udev->env_list, node) - putenv(name_loop->name); - } else { -- dbg("'%s' not found in database, using kernel name '%s'", -+ dbg("'%s' not found in database, using kernel name '%s'\n", - udev->dev->devpath, udev->dev->kernel); - strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); - } - - udev_rules_get_run(rules, udev); - if (udev->ignore_device) { -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - goto exit; - } - - if (udev->ignore_remove) { -- info("ignore_remove for '%s'", udev->name); -+ info("ignore_remove for '%s'\n", udev->name); - goto exit; - } - /* remove the node */ -@@ -296,7 +296,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) - /* default devices */ - udev_rules_get_run(rules, udev); - if (udev->ignore_device) -- info("device event will be ignored"); -+ info("device event will be ignored\n"); - - exit: - return retval; -diff --git a/udev_node.c b/udev_node.c -index 6ca0601..0e59e2d 100644 ---- a/udev_node.c -+++ b/udev_node.c -@@ -48,7 +48,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m - - if (lstat(file, &stats) == 0) { - if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) { -- info("preserve file '%s', because it has correct dev_t", file); -+ info("preserve file '%s', because it has correct dev_t\n", file); - selinux_setfilecon(file, udev->dev->kernel, stats.st_mode); - goto perms; - } -@@ -60,7 +60,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m - goto perms; - } - -- info("atomically replace '%s'", file); -+ info("atomically replace '%s'\n", file); - strlcpy(file_tmp, file, sizeof(file_tmp)); - strlcat(file_tmp, TMP_FILE_EXT, sizeof(file_tmp)); - unlink(file_tmp); -@@ -68,29 +68,29 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m - retval = mknod(file_tmp, mode, devt); - selinux_resetfscreatecon(); - if (retval != 0) { -- err("mknod(%s, %#o, %u, %u) failed: %s", -+ err("mknod(%s, %#o, %u, %u) failed: %s\n", - file_tmp, mode, major(devt), minor(devt), strerror(errno)); - goto exit; - } - retval = rename(file_tmp, file); - if (retval != 0) { -- err("rename(%s, %s) failed: %s", -+ err("rename(%s, %s) failed: %s\n", - file_tmp, file, strerror(errno)); - unlink(file_tmp); - goto exit; - } - - perms: -- dbg("chmod(%s, %#o)", file, mode); -+ dbg("chmod(%s, %#o)\n", file, mode); - if (chmod(file, mode) != 0) { -- err("chmod(%s, %#o) failed: %s", file, mode, strerror(errno)); -+ err("chmod(%s, %#o) failed: %s\n", file, mode, strerror(errno)); - goto exit; - } - - if (uid != 0 || gid != 0) { -- dbg("chown(%s, %u, %u)", file, uid, gid); -+ dbg("chown(%s, %u, %u)\n", file, uid, gid); - if (chown(file, uid, gid) != 0) { -- err("chown(%s, %u, %u) failed: %s", -+ err("chown(%s, %u, %u) failed: %s\n", - file, uid, gid, strerror(errno)); - goto exit; - } -@@ -127,32 +127,32 @@ static int node_symlink(const char *node, const char *slink) - if (S_ISBLK(stats.st_mode) || S_ISCHR(stats.st_mode)) { - struct stat stats2; - -- info("found existing node instead of symlink '%s'", slink); -+ info("found existing node instead of symlink '%s'\n", slink); - if (lstat(node, &stats2) == 0) { - if ((stats.st_mode & S_IFMT) == (stats2.st_mode & S_IFMT) && - stats.st_rdev == stats2.st_rdev) { -- info("replace device node '%s' with symlink to our node '%s'", slink, node); -+ info("replace device node '%s' with symlink to our node '%s'\n", slink, node); - } else { -- err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node); -+ err("device node '%s' already exists, link to '%s' will not overwrite it\n", slink, node); - goto exit; - } - } - } else if (S_ISLNK(stats.st_mode)) { - char buf[PATH_SIZE]; - -- info("found existing symlink '%s'", slink); -+ info("found existing symlink '%s'\n", slink); - len = readlink(slink, buf, sizeof(buf)); - if (len > 0) { - buf[len] = '\0'; - if (strcmp(target, buf) == 0) { -- info("preserve already existing symlink '%s' to '%s'", slink, target); -+ info("preserve already existing symlink '%s' to '%s'\n", slink, target); - selinux_setfilecon(slink, NULL, S_IFLNK); - goto exit; - } - } - } - } else { -- info("creating symlink '%s' to '%s'", slink, target); -+ info("creating symlink '%s' to '%s'\n", slink, target); - selinux_setfscreatecon(slink, NULL, S_IFLNK); - retval = symlink(target, slink); - selinux_resetfscreatecon(); -@@ -160,7 +160,7 @@ static int node_symlink(const char *node, const char *slink) - goto exit; - } - -- info("atomically replace '%s'", slink); -+ info("atomically replace '%s'\n", slink); - strlcpy(slink_tmp, slink, sizeof(slink_tmp)); - strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); - unlink(slink_tmp); -@@ -168,12 +168,12 @@ static int node_symlink(const char *node, const char *slink) - retval = symlink(target, slink_tmp); - selinux_resetfscreatecon(); - if (retval != 0) { -- err("symlink(%s, %s) failed: %s", target, slink_tmp, strerror(errno)); -+ err("symlink(%s, %s) failed: %s\n", target, slink_tmp, strerror(errno)); - goto exit; - } - retval = rename(slink_tmp, slink); - if (retval != 0) { -- err("rename(%s, %s) failed: %s", slink_tmp, slink, strerror(errno)); -+ err("rename(%s, %s) failed: %s\n", slink_tmp, slink, strerror(errno)); - unlink(slink_tmp); - goto exit; - } -@@ -198,11 +198,11 @@ static int update_link(struct udevice *udev, const char *name) - strlcat(slink, name, sizeof(slink)); - - count = udev_db_get_devices_by_name(name, &name_list); -- info("found %i devices with name '%s'", count, name); -+ info("found %i devices with name '%s'\n", count, name); - - /* if we don't have a reference, delete it */ - if (count <= 0) { -- info("no reference left, remove '%s'", name); -+ info("no reference left, remove '%s'\n", name); - if (!udev->test_run) { - unlink(slink); - delete_path(slink); -@@ -212,14 +212,14 @@ static int update_link(struct udevice *udev, const char *name) - - /* find the device with the highest priority */ - list_for_each_entry(device, &name_list, node) { -- info("found '%s' for '%s'", device->name, name); -+ info("found '%s' for '%s'\n", device->name, name); - - /* did we find ourself? we win, if we have the same priority */ - if (strcmp(udev->dev->devpath, device->name) == 0) { -- info("compare (our own) priority of '%s' %i >= %i", -+ info("compare (our own) priority of '%s' %i >= %i\n", - udev->dev->devpath, udev->link_priority, priority); - if (strcmp(udev->name, name) == 0) { -- info("'%s' is our device node, database inconsistent, skip link update", udev->name); -+ info("'%s' is our device node, database inconsistent, skip link update\n", udev->name); - } else if (target[0] == '\0' || udev->link_priority >= priority) { - priority = udev->link_priority; - strlcpy(target, udev->name, sizeof(target)); -@@ -233,9 +233,9 @@ static int update_link(struct udevice *udev, const char *name) - continue; - if (udev_db_get_device(udev_db, device->name) == 0) { - if (strcmp(udev_db->name, name) == 0) { -- info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name); -+ info("'%s' is a device node of '%s', skip link update\n", udev_db->name, device->name); - } else { -- info("compare priority of '%s' %i > %i", -+ info("compare priority of '%s' %i > %i\n", - udev_db->dev->devpath, udev_db->link_priority, priority); - if (target[0] == '\0' || udev_db->link_priority > priority) { - priority = udev_db->link_priority; -@@ -248,7 +248,7 @@ static int update_link(struct udevice *udev, const char *name) - name_list_cleanup(&name_list); - - if (target[0] == '\0') { -- info("no current target for '%s' found", name); -+ info("no current target for '%s' found\n", name); - rc = 1; - goto out; - } -@@ -257,7 +257,7 @@ static int update_link(struct udevice *udev, const char *name) - strlcpy(node, udev_root, sizeof(node)); - strlcat(node, "/", sizeof(node)); - strlcat(node, target, sizeof(node)); -- info("'%s' with target '%s' has the highest priority %i, create it", name, target, priority); -+ info("'%s' with target '%s' has the highest priority %i, create it\n", name, target, priority); - if (!udev->test_run) { - create_path(slink); - node_symlink(node, slink); -@@ -272,7 +272,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) - char symlinks[PATH_SIZE] = ""; - - list_for_each_entry(name_loop, &udev->symlink_list, node) { -- info("update symlink '%s' of '%s'", name_loop->name, udev->dev->devpath); -+ info("update symlink '%s' of '%s'\n", name_loop->name, udev->dev->devpath); - update_link(udev, name_loop->name); - strlcat(symlinks, udev_root, sizeof(symlinks)); - strlcat(symlinks, "/", sizeof(symlinks)); -@@ -302,7 +302,7 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old) - } - if (!found) { - /* link does no longer belong to this device */ -- info("update old symlink '%s' no longer belonging to '%s'", -+ info("update old symlink '%s' no longer belonging to '%s'\n", - link_old_loop->name, udev->dev->devpath); - update_link(udev, link_old_loop->name); - } -@@ -356,7 +356,7 @@ int udev_node_add(struct udevice *udev) - gid = lookup_group(udev->group); - } - -- info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d", -+ info("creating device node '%s', major=%d, minor=%d, mode=%#o, uid=%d, gid=%d\n", - filename, major(udev->devt), minor(udev->devt), udev->mode, uid, gid); - - if (!udev->test_run) -@@ -380,7 +380,7 @@ int udev_node_add(struct udevice *udev) - if (range > 1) - udev->partitions = range-1; - } -- info("creating device partition nodes '%s[1-%i]'", filename, udev->partitions); -+ info("creating device partition nodes '%s[1-%i]'\n", filename, udev->partitions); - if (!udev->test_run) { - for (i = 1; i <= udev->partitions; i++) { - dev_t part_devt; -@@ -408,15 +408,15 @@ int udev_node_remove(struct udevice *udev) - strlcat(filename, "/", sizeof(filename)); - strlcat(filename, udev->name, sizeof(filename)); - if (stat(filename, &stats) != 0) { -- info("device node '%s' not found", filename); -+ info("device node '%s' not found\n", filename); - return 0; - } - if (udev->devt && stats.st_rdev != udev->devt) { -- info("device node '%s' points to a different device, skip removal", filename); -+ info("device node '%s' points to a different device, skip removal\n", filename); - return -1; - } - -- info("removing device node '%s'", filename); -+ info("removing device node '%s'\n", filename); - if (!udev->test_run) - retval = unlink_secure(filename); - if (retval) -@@ -427,7 +427,7 @@ int udev_node_remove(struct udevice *udev) - if (num > 0) { - int i; - -- info("removing all_partitions '%s[1-%i]'", filename, num); -+ info("removing all_partitions '%s[1-%i]'\n", filename, num); - if (num > 255) - return -1; - for (i = 1; i <= num; i++) { -diff --git a/udev_rules.c b/udev_rules.c -index 8a793ff..884cb70 100644 ---- a/udev_rules.c -+++ b/udev_rules.c -@@ -48,13 +48,13 @@ static char *get_format_attribute(char **str) - if (*str[0] == '{') { - pos = strchr(*str, '}'); - if (pos == NULL) { -- err("missing closing brace for format"); -+ err("missing closing brace for format\n"); - return NULL; - } - pos[0] = '\0'; - attr = *str+1; - *str = pos+1; -- dbg("attribute='%s', str='%s'", attr, *str); -+ dbg("attribute='%s', str='%s'\n", attr, *str); - } - return attr; - } -@@ -69,10 +69,10 @@ static int get_format_len(char **str) - num = (int) strtoul(*str, &tail, 10); - if (num > 0) { - *str = tail; -- dbg("format length=%i", num); -+ dbg("format length=%i\n", num); - return num; - } else { -- err("format parsing error '%s'", *str); -+ err("format parsing error '%s'\n", *str); - } - } - return -1; -@@ -148,7 +148,7 @@ static int run_program(const char *command, const char *subsystem, - } else { - argv[i] = strsep(&pos, " "); - } -- dbg("arg[%i] '%s'", i, argv[i]); -+ dbg("arg[%i] '%s'\n", i, argv[i]); - i++; - } - argv[i] = NULL; -@@ -156,18 +156,18 @@ static int run_program(const char *command, const char *subsystem, - argv[0] = arg; - argv[1] = NULL; - } -- info("'%s'", command); -+ info("'%s'\n", command); - - /* prepare pipes from child to parent */ - if (result != NULL || udev_log_priority >= LOG_INFO) { - if (pipe(outpipe) != 0) { -- err("pipe failed: %s", strerror(errno)); -+ err("pipe failed: %s\n", strerror(errno)); - return -1; - } - } - if (udev_log_priority >= LOG_INFO) { - if (pipe(errpipe) != 0) { -- err("pipe failed: %s", strerror(errno)); -+ err("pipe failed: %s\n", strerror(errno)); - return -1; - } - } -@@ -198,7 +198,7 @@ static int run_program(const char *command, const char *subsystem, - dup2(devnull, STDERR_FILENO); - close(devnull); - } else -- err("open /dev/null failed: %s", strerror(errno)); -+ err("open /dev/null failed: %s\n", strerror(errno)); - if (outpipe[WRITE_END] > 0) { - dup2(outpipe[WRITE_END], STDOUT_FILENO); - close(outpipe[WRITE_END]); -@@ -210,14 +210,14 @@ static int run_program(const char *command, const char *subsystem, - execv(argv[0], argv); - if (errno == ENOENT || errno == ENOTDIR) { - /* may be on a filesytem which is not mounted right now */ -- info("program '%s' not found", argv[0]); -+ info("program '%s' not found\n", argv[0]); - } else { - /* other problems */ -- err("exec of program '%s' failed", argv[0]); -+ err("exec of program '%s' failed\n", argv[0]); - } - _exit(1); - case -1: -- err("fork of '%s' failed: %s", argv[0], strerror(errno)); -+ err("fork of '%s' failed: %s\n", argv[0], strerror(errno)); - return -1; - default: - /* read from child if requested */ -@@ -260,7 +260,7 @@ static int run_program(const char *command, const char *subsystem, - close(outpipe[READ_END]); - outpipe[READ_END] = -1; - if (count < 0) { -- err("stdin read failed: %s", strerror(errno)); -+ err("stdin read failed: %s\n", strerror(errno)); - retval = -1; - } - continue; -@@ -273,14 +273,14 @@ static int run_program(const char *command, const char *subsystem, - memcpy(&result[respos], inbuf, count); - respos += count; - } else { -- err("ressize %ld too short", (long)ressize); -+ err("ressize %ld too short\n", (long)ressize); - retval = -1; - } - } - pos = inbuf; - while ((line = strsep(&pos, "\n"))) - if (pos || line[0] != '\0') -- info("'%s' (stdout) '%s'", argv[0], line); -+ info("'%s' (stdout) '%s'\n", argv[0], line); - } - - /* get stderr */ -@@ -294,14 +294,14 @@ static int run_program(const char *command, const char *subsystem, - close(errpipe[READ_END]); - errpipe[READ_END] = -1; - if (count < 0) -- err("stderr read failed: %s", strerror(errno)); -+ err("stderr read failed: %s\n", strerror(errno)); - continue; - } - errbuf[count] = '\0'; - pos = errbuf; - while ((line = strsep(&pos, "\n"))) - if (pos || line[0] != '\0') -- info("'%s' (stderr) '%s'", argv[0], line); -+ info("'%s' (stderr) '%s'\n", argv[0], line); - } - } - if (outpipe[READ_END] > 0) -@@ -312,18 +312,18 @@ static int run_program(const char *command, const char *subsystem, - /* return the childs stdout string */ - if (result) { - result[respos] = '\0'; -- dbg("result='%s'", result); -+ dbg("result='%s'\n", result); - if (reslen) - *reslen = respos; - } - } - waitpid(pid, &status, 0); - if (WIFEXITED(status)) { -- info("'%s' returned with status %i", argv[0], WEXITSTATUS(status)); -+ info("'%s' returned with status %i\n", argv[0], WEXITSTATUS(status)); - if (WEXITSTATUS(status) != 0) - retval = -1; - } else { -- err("'%s' abnormal exit", argv[0]); -+ err("'%s' abnormal exit\n", argv[0]); - retval = -1; - } - } -@@ -364,7 +364,7 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu - continue; - - if (count >= sizeof(line)) { -- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno); -+ err("line too long, conf line skipped %s, line %d\n", udev_config_filename, lineno); - continue; - } - -@@ -373,11 +373,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu - - linepos = line; - if (get_key(&linepos, &variable, &value) == 0) { -- dbg("import '%s=%s'", variable, value); -+ dbg("import '%s=%s'\n", variable, value); - - /* handle device, renamed by external tool, returning new path */ - if (strcmp(variable, "DEVPATH") == 0) { -- info("updating devpath from '%s' to '%s'", udev->dev->devpath, value); -+ info("updating devpath from '%s' to '%s'\n", udev->dev->devpath, value); - sysfs_device_set_values(udev->dev, value, NULL, NULL); - } else - name_list_key_add(&udev->env_list, variable, value); -@@ -394,7 +394,7 @@ static int import_file_into_env(struct udevice *udev, const char *filename) - size_t bufsize; - - if (file_map(filename, &buf, &bufsize) != 0) { -- err("can't open '%s': %s", filename, strerror(errno)); -+ err("can't open '%s': %s\n", filename, strerror(errno)); - return -1; - } - import_keys_into_env(udev, buf, bufsize); -@@ -423,13 +423,13 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) - struct udevice *udev_parent; - struct name_entry *name_loop; - -- dbg("found parent '%s', get the node name", dev_parent->devpath); -+ dbg("found parent '%s', get the node name\n", dev_parent->devpath); - udev_parent = udev_device_init(NULL); - if (udev_parent == NULL) - return -1; - /* import the udev_db of the parent */ - if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { -- dbg("import stored parent env '%s'", udev_parent->name); -+ dbg("import stored parent env '%s'\n", udev_parent->name); - list_for_each_entry(name_loop, &udev_parent->env_list, node) { - char name[NAME_SIZE]; - char *pos; -@@ -440,16 +440,16 @@ static int import_parent_into_env(struct udevice *udev, const char *filter) - pos[0] = '\0'; - pos++; - if (fnmatch(filter, name, 0) == 0) { -- dbg("import key '%s'", name_loop->name); -+ dbg("import key '%s'\n", name_loop->name); - name_list_add(&udev->env_list, name_loop->name, 0); - setenv(name, pos, 1); - } else -- dbg("skip key '%s'", name_loop->name); -+ dbg("skip key '%s'\n", name_loop->name); - } - } - rc = 0; - } else -- dbg("parent not found in database"); -+ dbg("parent not found in database\n"); - udev_device_cleanup(udev_parent); - } - -@@ -468,7 +468,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c - ssize_t count; - int retval = 0; - -- dbg("pass environment to socket '%s'", sockpath); -+ dbg("pass environment to socket '%s'\n", sockpath); - sock = socket(AF_LOCAL, SOCK_DGRAM, 0); - memset(&saddr, 0x00, sizeof(struct sockaddr_un)); - saddr.sun_family = AF_LOCAL; -@@ -498,7 +498,7 @@ static int pass_env_to_socket(const char *sockpath, const char *devpath, const c - count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, saddrlen); - if (count < 0) - retval = -1; -- info("passed %zi bytes to socket '%s', ", count, sockpath); -+ info("passed %zi bytes to socket '%s', \n", count, sockpath); - - close(sock); - return retval; -@@ -509,7 +509,7 @@ int udev_rules_run(struct udevice *udev) - struct name_entry *name_loop; - int retval = 0; - -- dbg("executing run list"); -+ dbg("executing run list\n"); - 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, udev->action); -@@ -541,22 +541,22 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout) - strlcat(filepath, "/", sizeof(filepath)); - strlcat(filepath, file, sizeof(filepath)); - -- dbg("will wait %i sec for '%s'", timeout, filepath); -+ dbg("will wait %i sec for '%s'\n", timeout, filepath); - while (--loop) { - /* lookup file */ - if (stat(filepath, &stats) == 0) { -- info("file '%s' appeared after %i loops", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); -+ info("file '%s' appeared after %i loops\n", filepath, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); - return 0; - } - /* make sure, the device did not disappear in the meantime */ - if (stat(devicepath, &stats) != 0) { -- info("device disappeared while waiting for '%s'", filepath); -+ info("device disappeared while waiting for '%s'\n", filepath); - return -2; - } -- info("wait for '%s' for %i mseconds", filepath, 1000 / WAIT_LOOP_PER_SECOND); -+ info("wait for '%s' for %i mseconds\n", filepath, 1000 / WAIT_LOOP_PER_SECOND); - usleep(1000 * 1000 / WAIT_LOOP_PER_SECOND); - } -- info("waiting for '%s' failed", filepath); -+ info("waiting for '%s' failed\n", filepath); - return -1; - } - -@@ -707,12 +707,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - if (strncasecmp(&head[1], subst->name, strlen(subst->name)) == 0) { - type = subst->type; - tail = head + strlen(subst->name)+1; -- dbg("will substitute format name '%s'", subst->name); -+ dbg("will substitute format name '%s'\n", subst->name); - goto found; - } - } - head[0] = '$'; -- err("unknown format variable '%s'", head); -+ err("unknown format variable '%s'\n", head); - } else if (head[0] == '%') { - /* substitute format char */ - if (head[1] == '\0') -@@ -730,12 +730,12 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - if (tail[0] == subst->fmt) { - type = subst->type; - tail++; -- dbg("will substitute format char '%c'", subst->fmt); -+ dbg("will substitute format char '%c'\n", subst->fmt); - goto found; - } - } - head[0] = '%'; -- err("unknown format char '%c'", tail[0]); -+ err("unknown format char '%c'\n", tail[0]); - } - head++; - } -@@ -743,42 +743,42 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) - found: - attr = get_format_attribute(&tail); - strlcpy(temp, tail, sizeof(temp)); -- dbg("format=%i, string='%s', tail='%s'", type ,string, tail); -+ dbg("format=%i, string='%s', tail='%s'\n", type ,string, tail); - - switch (type) { - case SUBST_DEVPATH: - strlcat(string, udev->dev->devpath, maxsize); -- dbg("substitute devpath '%s'", udev->dev->devpath); -+ dbg("substitute devpath '%s'\n", udev->dev->devpath); - break; - case SUBST_KERNEL: - strlcat(string, udev->dev->kernel, maxsize); -- dbg("substitute kernel name '%s'", udev->dev->kernel); -+ dbg("substitute kernel name '%s'\n", udev->dev->kernel); - break; - case SUBST_KERNEL_NUMBER: - strlcat(string, udev->dev->kernel_number, maxsize); -- dbg("substitute kernel number '%s'", udev->dev->kernel_number); -+ dbg("substitute kernel number '%s'\n", udev->dev->kernel_number); - break; - case SUBST_ID: - if (udev->dev_parent != NULL) { - strlcat(string, udev->dev_parent->kernel, maxsize); -- dbg("substitute id '%s'", udev->dev_parent->kernel); -+ dbg("substitute id '%s'\n", udev->dev_parent->kernel); - } - break; - case SUBST_DRIVER: - if (udev->dev_parent != NULL) { - strlcat(string, udev->dev_parent->driver, maxsize); -- dbg("substitute driver '%s'", udev->dev_parent->driver); -+ dbg("substitute driver '%s'\n", udev->dev_parent->driver); - } - break; - case SUBST_MAJOR: - sprintf(temp2, "%d", major(udev->devt)); - strlcat(string, temp2, maxsize); -- dbg("substitute major number '%s'", temp2); -+ dbg("substitute major number '%s'\n", temp2); - break; - case SUBST_MINOR: - sprintf(temp2, "%d", minor(udev->devt)); - strlcat(string, temp2, maxsize); -- dbg("substitute minor number '%s'", temp2); -+ dbg("substitute minor number '%s'\n", temp2); - break; - case SUBST_RESULT: - if (udev->program_result[0] == '\0') -@@ -788,7 +788,7 @@ found: - if (attr != NULL) - i = strtoul(attr, &rest, 10); - if (i > 0) { -- dbg("request part #%d of result string", i); -+ dbg("request part #%d of result string\n", i); - cpos = udev->program_result; - while (--i) { - while (cpos[0] != '\0' && !isspace(cpos[0])) -@@ -797,7 +797,7 @@ found: - cpos++; - } - if (i > 0) { -- err("requested part of result string not found"); -+ err("requested part of result string not found\n"); - break; - } - strlcpy(temp2, cpos, sizeof(temp2)); -@@ -808,15 +808,15 @@ found: - cpos[0] = '\0'; - } - strlcat(string, temp2, maxsize); -- dbg("substitute part of result string '%s'", temp2); -+ dbg("substitute part of result string '%s'\n", temp2); - } else { - strlcat(string, udev->program_result, maxsize); -- dbg("substitute result string '%s'", udev->program_result); -+ dbg("substitute result string '%s'\n", udev->program_result); - } - break; - case SUBST_ATTR: - if (attr == NULL) -- err("missing file parameter for attr"); -+ err("missing file parameter for attr\n"); - else { - char devpath[PATH_SIZE]; - char *attrib; -@@ -839,7 +839,7 @@ found: - struct sysfs_device *dev_parent = udev->dev; - - do { -- dbg("looking at '%s'", dev_parent->devpath); -+ dbg("looking at '%s'\n", dev_parent->devpath); - value = sysfs_attr_get_value(dev_parent->devpath, attr); - if (value != NULL) { - strlcpy(temp2, value, sizeof(temp2)); -@@ -860,9 +860,9 @@ found: - temp2[--size] = '\0'; - count = replace_chars(temp2, ALLOWED_CHARS_INPUT); - if (count > 0) -- info("%i character(s) replaced" , count); -+ info("%i character(s) replaced\n" , count); - strlcat(string, temp2, maxsize); -- dbg("substitute sysfs value '%s'", temp2); -+ dbg("substitute sysfs value '%s'\n", temp2); - } - break; - case SUBST_PARENT: -@@ -873,15 +873,15 @@ found: - if (dev_parent != NULL) { - struct udevice *udev_parent; - -- dbg("found parent '%s', get the node name", dev_parent->devpath); -+ dbg("found parent '%s', get the node name\n", dev_parent->devpath); - udev_parent = udev_device_init(NULL); - if (udev_parent != NULL) { - /* lookup the name in the udev_db with the DEVPATH of the parent */ - if (udev_db_get_device(udev_parent, dev_parent->devpath) == 0) { - strlcat(string, udev_parent->name, maxsize); -- dbg("substitute parent node name'%s'", udev_parent->name); -+ dbg("substitute parent node name'%s'\n", udev_parent->name); - } else -- dbg("parent not found in database"); -+ dbg("parent not found in database\n"); - udev_device_cleanup(udev_parent); - } - } -@@ -889,48 +889,48 @@ found: - break; - case SUBST_TEMP_NODE: - if (udev->tmp_node[0] == '\0' && major(udev->devt) > 0) { -- dbg("create temporary device node for callout"); -+ dbg("create temporary device node for callout\n"); - snprintf(udev->tmp_node, sizeof(udev->tmp_node), "%s/.tmp-%u-%u", - udev_root, major(udev->devt), minor(udev->devt)); - udev->tmp_node[sizeof(udev->tmp_node)-1] = '\0'; - udev_node_mknod(udev, udev->tmp_node, udev->devt, 0600, 0, 0); - } - strlcat(string, udev->tmp_node, maxsize); -- dbg("substitute temporary device node name '%s'", udev->tmp_node); -+ dbg("substitute temporary device node name '%s'\n", udev->tmp_node); - break; - case SUBST_NAME: - strlcat(string, udev->name, maxsize); -- dbg("substitute udev->name '%s'", udev->name); -+ dbg("substitute udev->name '%s'\n", udev->name); - break; - case SUBST_ROOT: - strlcat(string, udev_root, maxsize); -- dbg("substitute udev_root '%s'", udev_root); -+ dbg("substitute udev_root '%s'\n", udev_root); - break; - case SUBST_SYS: - strlcat(string, sysfs_path, maxsize); -- dbg("substitute sysfs_path '%s'", sysfs_path); -+ dbg("substitute sysfs_path '%s'\n", sysfs_path); - break; - case SUBST_ENV: - if (attr == NULL) { -- dbg("missing attribute"); -+ dbg("missing attribute\n"); - break; - } - pos = getenv(attr); - if (pos == NULL) { -- dbg("env '%s' not available", attr); -+ dbg("env '%s' not available\n", attr); - break; - } -- dbg("substitute env '%s=%s'", attr, pos); -+ dbg("substitute env '%s=%s'\n", attr, pos); - strlcat(string, pos, maxsize); - break; - default: -- err("unknown substitution type=%i", type); -+ err("unknown substitution type=%i\n", type); - break; - } - /* possibly truncate to format-char specified length */ - if (len >= 0 && len < (int)strlen(head)) { - head[len] = '\0'; -- dbg("truncate to %i chars, subtitution string becomes '%s'", len, head); -+ dbg("truncate to %i chars, subtitution string becomes '%s'\n", len, head); - } - strlcat(string, temp, maxsize); - } -@@ -960,7 +960,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k - /* look for a matching string, parts are separated by '|' */ - strlcpy(value, rule->buf + key->val_off, sizeof(value)); - key_value = value; -- dbg("key %s value='%s'", key_name, key_value); -+ dbg("key %s value='%s'\n", key_name, key_value); - while (key_value) { - pos = strchr(key_value, '|'); - if (pos) { -@@ -968,7 +968,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k - pos++; - } - -- dbg("match %s '%s' <-> '%s'", key_name, key_value, val); -+ dbg("match %s '%s' <-> '%s'\n", key_name, key_value, val); - match = (fnmatch(key_value, val, 0) == 0); - if (match) - break; -@@ -977,11 +977,11 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k - } - - if (match && (key->operation == KEY_OP_MATCH)) { -- dbg("%s is true (matching value)", key_name); -+ dbg("%s is true (matching value)\n", key_name); - return 0; - } - if (!match && (key->operation == KEY_OP_NOMATCH)) { -- dbg("%s is true (non-matching value)", key_name); -+ dbg("%s is true (non-matching value)\n", key_name); - return 0; - } - return -1; -@@ -1037,7 +1037,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - const char *value = getenv(key_name); - - if (!value) { -- dbg("ENV{'%s'} is not set, treat as empty", key_name); -+ dbg("ENV{'%s'} is not set, treat as empty\n", key_name); - value = ""; - } - if (match_key("ENV", rule, &pair->key, value)) -@@ -1076,10 +1076,10 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - attr_subst_subdir(filename, sizeof(filename)); - - match = (stat(filename, &statbuf) == 0); -- info("'%s' %s", filename, match ? "exists" : "does not exist"); -+ info("'%s' %s", filename, match ? "exists" : "does not exist\n"); - if (match && rule->test_mode_mask > 0) { - match = ((statbuf.st_mode & rule->test_mode_mask) > 0); -- info("'%s' has mode=%#o and %s %#o", filename, statbuf.st_mode, -+ info("'%s' has mode=%#o and %s %#o\n", filename, statbuf.st_mode, - match ? "matches" : "does not match", - rule->test_mode_mask); - } -@@ -1087,7 +1087,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - goto nomatch; - if (!match && rule->test.operation == KEY_OP_MATCH) - goto nomatch; -- dbg("TEST key is true"); -+ dbg("TEST key is true\n"); - } - - if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) { -@@ -1130,7 +1130,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - len = strlen(val); - while (len > 0 && isspace(val[len-1])) - val[--len] = '\0'; -- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); -+ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); - } - - if (match_key("ATTR", rule, &pair->key, val)) -@@ -1178,7 +1178,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - len = strlen(val); - while (len > 0 && isspace(val[len-1])) - val[--len] = '\0'; -- dbg("removed %zi trailing whitespace chars from '%s'", strlen(val)-len, val); -+ dbg("removed %zi trailing whitespace chars from '%s'\n", strlen(val)-len, val); - } - - if (match_key("ATTRS", rule, &pair->key, val)) -@@ -1190,12 +1190,12 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) - break; - try_parent: - /* move to parent device */ -- dbg("try parent sysfs device"); -+ dbg("try parent sysfs device\n"); - udev->dev_parent = sysfs_device_get_parent(udev->dev_parent); - if (udev->dev_parent == NULL) - goto nomatch; -- dbg("looking at dev_parent->devpath='%s'", udev->dev_parent->devpath); -- dbg("looking at dev_parent->kernel='%s'", udev->dev_parent->kernel); -+ dbg("looking at dev_parent->devpath='%s'\n", udev->dev_parent->devpath); -+ dbg("looking at dev_parent->kernel='%s'\n", udev->dev_parent->kernel); - } - - /* execute external program */ -@@ -1206,28 +1206,28 @@ try_parent: - strlcpy(program, key_val(rule, &rule->program), sizeof(program)); - udev_rules_apply_format(udev, program, sizeof(program)); - if (run_program(program, udev->dev->subsystem, result, sizeof(result), NULL) != 0) { -- dbg("PROGRAM is false"); -+ dbg("PROGRAM is false\n"); - udev->program_result[0] = '\0'; - if (rule->program.operation != KEY_OP_NOMATCH) - goto nomatch; - } else { - int count; - -- dbg("PROGRAM matches"); -+ dbg("PROGRAM matches\n"); - remove_trailing_chars(result, '\n'); - if (rule->string_escape == ESCAPE_UNSET || - rule->string_escape == ESCAPE_REPLACE) { - count = replace_chars(result, ALLOWED_CHARS_INPUT); - if (count > 0) -- info("%i character(s) replaced" , count); -+ info("%i character(s) replaced\n" , count); - } -- dbg("result is '%s'", result); -+ dbg("result is '%s'\n", result); - strlcpy(udev->program_result, result, sizeof(udev->program_result)); -- dbg("PROGRAM returned successful"); -+ dbg("PROGRAM returned successful\n"); - if (rule->program.operation == KEY_OP_NOMATCH) - goto nomatch; - } -- dbg("PROGRAM key is true"); -+ dbg("PROGRAM key is true\n"); - } - - /* check for matching result of external program */ -@@ -1241,23 +1241,23 @@ try_parent: - - strlcpy(import, key_val(rule, &rule->import), sizeof(import)); - udev_rules_apply_format(udev, import, sizeof(import)); -- dbg("check for IMPORT import='%s'", import); -+ dbg("check for IMPORT import='%s'\n", import); - if (rule->import_type == IMPORT_PROGRAM) { - rc = import_program_into_env(udev, import); - } else if (rule->import_type == IMPORT_FILE) { -- dbg("import file import='%s'", import); -+ dbg("import file import='%s'\n", import); - rc = import_file_into_env(udev, import); - } else if (rule->import_type == IMPORT_PARENT) { -- dbg("import parent import='%s'", import); -+ dbg("import parent import='%s'\n", import); - rc = import_parent_into_env(udev, import); - } - if (rc != 0) { -- dbg("IMPORT failed"); -+ dbg("IMPORT failed\n"); - if (rule->import.operation != KEY_OP_NOMATCH) - goto nomatch; - } else -- dbg("IMPORT '%s' imported", key_val(rule, &rule->import)); -- dbg("IMPORT key is true"); -+ dbg("IMPORT '%s' imported\n", key_val(rule, &rule->import)); -+ dbg("IMPORT key is true\n"); - } - - /* rule matches, if we have ENV assignments export it */ -@@ -1276,7 +1276,7 @@ try_parent: - if (temp_value[0] == '\0') { - name_list_key_remove(&udev->env_list, key_name); - unsetenv(key_name); -- info("unset ENV '%s'", key_name); -+ info("unset ENV '%s'\n", key_name); - } else { - struct name_entry *entry; - -@@ -1284,7 +1284,7 @@ try_parent: - if (entry == NULL) - break; - putenv(entry->name); -- info("set ENV '%s'", entry->name); -+ info("set ENV '%s'\n", entry->name); - } - } - } -@@ -1321,15 +1321,15 @@ try_parent: - - strlcpy(value, key_val(rule, &pair->key), sizeof(value)); - udev_rules_apply_format(udev, value, sizeof(value)); -- info("writing '%s' to sysfs file '%s'", value, attr); -+ info("writing '%s' to sysfs file '%s'\n", value, attr); - f = fopen(attr, "w"); - if (f != NULL) { - if (!udev->test_run) - if (fprintf(f, "%s", value) <= 0) -- err("error writing ATTR{%s}: %s", attr, strerror(errno)); -+ err("error writing ATTR{%s}: %s\n", attr, strerror(errno)); - fclose(f); - } else -- err("error opening ATTR{%s} for writing: %s", attr, strerror(errno)); -+ err("error opening ATTR{%s} for writing: %s\n", attr, strerror(errno)); - } - } - return 0; -@@ -1343,8 +1343,8 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - struct udev_rule *rule; - int name_set = 0; - -- dbg("udev->dev->devpath='%s'", udev->dev->devpath); -- dbg("udev->dev->kernel='%s'", udev->dev->kernel); -+ dbg("udev->dev->devpath='%s'\n", udev->dev->devpath); -+ dbg("udev->dev->kernel='%s'\n", udev->dev->kernel); - - /* look for a matching rule to apply */ - udev_rules_iter_init(rules); -@@ -1357,31 +1357,31 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - (rule->name.operation == KEY_OP_ASSIGN || - rule->name.operation == KEY_OP_ASSIGN_FINAL || - rule->name.operation == KEY_OP_ADD)) { -- dbg("node name already set, rule ignored"); -+ dbg("node name already set, rule ignored\n"); - continue; - } - -- dbg("process rule"); -+ dbg("process rule\n"); - if (match_rule(udev, rule) == 0) { - /* apply options */ - if (rule->ignore_device) { -- info("rule applied, '%s' is ignored", udev->dev->kernel); -+ info("rule applied, '%s' is ignored\n", udev->dev->kernel); - udev->ignore_device = 1; - return 0; - } - if (rule->ignore_remove) { - udev->ignore_remove = 1; -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - } - if (rule->link_priority != 0) { - udev->link_priority = rule->link_priority; -- info("link_priority=%i", udev->link_priority); -+ info("link_priority=%i\n", udev->link_priority); - } - /* apply all_partitions option only at a main block device */ - if (rule->partitions && - strcmp(udev->dev->subsystem, "block") == 0 && udev->dev->kernel_number[0] == '\0') { - udev->partitions = rule->partitions; -- dbg("creation of partition nodes requested"); -+ dbg("creation of partition nodes requested\n"); - } - - /* apply permissions */ -@@ -1389,21 +1389,21 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - if (rule->mode.operation == KEY_OP_ASSIGN_FINAL) - udev->mode_final = 1; - udev->mode = strtol(key_val(rule, &rule->mode), NULL, 8); -- dbg("applied mode=%#o to '%s'", udev->mode, udev->dev->kernel); -+ dbg("applied mode=%#o to '%s'\n", udev->mode, udev->dev->kernel); - } - if (!udev->owner_final && rule->owner.operation != KEY_OP_UNSET) { - if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) - udev->owner_final = 1; - strlcpy(udev->owner, key_val(rule, &rule->owner), sizeof(udev->owner)); - udev_rules_apply_format(udev, udev->owner, sizeof(udev->owner)); -- dbg("applied owner='%s' to '%s'", udev->owner, udev->dev->kernel); -+ dbg("applied owner='%s' to '%s'\n", udev->owner, udev->dev->kernel); - } - if (!udev->group_final && rule->group.operation != KEY_OP_UNSET) { - if (rule->group.operation == KEY_OP_ASSIGN_FINAL) - udev->group_final = 1; - strlcpy(udev->group, key_val(rule, &rule->group), sizeof(udev->group)); - udev_rules_apply_format(udev, udev->group, sizeof(udev->group)); -- dbg("applied group='%s' to '%s'", udev->group, udev->dev->kernel); -+ dbg("applied group='%s' to '%s'\n", udev->group, udev->dev->kernel); - } - - /* collect symlinks */ -@@ -1419,7 +1419,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - udev->symlink_final = 1; - if (rule->symlink.operation == KEY_OP_ASSIGN || - rule->symlink.operation == KEY_OP_ASSIGN_FINAL) { -- info("reset symlink list"); -+ info("reset symlink list\n"); - name_list_cleanup(&udev->symlink_list); - } - /* allow multiple symlinks separated by spaces */ -@@ -1429,16 +1429,16 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - rule->string_escape == ESCAPE_REPLACE) { - count = replace_chars(temp, ALLOWED_CHARS_FILE " "); - if (count > 0) -- info("%i character(s) replaced" , count); -+ info("%i character(s) replaced\n" , count); - } -- dbg("rule applied, added symlink(s) '%s'", temp); -+ dbg("rule applied, added symlink(s) '%s'\n", temp); - pos = temp; - while (isspace(pos[0])) - pos++; - next = strchr(pos, ' '); - while (next) { - next[0] = '\0'; -- info("add symlink '%s'", pos); -+ info("add symlink '%s'\n", pos); - name_list_add(&udev->symlink_list, pos, 0); - while (isspace(next[1])) - next++; -@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - next = strchr(pos, ' '); - } - if (pos[0] != '\0') { -- info("add symlink '%s'", pos); -+ info("add symlink '%s'\n", pos); - name_list_add(&udev->symlink_list, pos, 0); - } - } -@@ -1464,12 +1464,12 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - rule->string_escape == ESCAPE_REPLACE) { - count = replace_chars(udev->name, ALLOWED_CHARS_FILE); - if (count > 0) -- info("%i character(s) replaced", count); -+ info("%i character(s) replaced\n", count); - } - -- info("rule applied, '%s' becomes '%s'", udev->dev->kernel, udev->name); -+ info("rule applied, '%s' becomes '%s'\n", udev->dev->kernel, udev->name); - if (strcmp(udev->dev->subsystem, "net") != 0) -- dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i", -+ dbg("name, '%s' is going to have owner='%s', group='%s', mode=%#o partitions=%i\n", - udev->name, udev->owner, udev->group, udev->mode, udev->partitions); - } - -@@ -1479,34 +1479,34 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) - if (rule->run.operation == KEY_OP_ASSIGN_FINAL) - udev->run_final = 1; - if (rule->run.operation == KEY_OP_ASSIGN || rule->run.operation == KEY_OP_ASSIGN_FINAL) { -- info("reset run list"); -+ info("reset run list\n"); - name_list_cleanup(&udev->run_list); - } -- dbg("add run '%s'", key_val(rule, &rule->run)); -+ dbg("add run '%s'\n", key_val(rule, &rule->run)); - entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); - if (rule->run_ignore_error) - entry->ignore_error = 1; - } - - if (rule->last_rule) { -- dbg("last rule to be applied"); -+ dbg("last rule to be applied\n"); - break; - } - - if (rule->goto_label.operation != KEY_OP_UNSET) { -- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); -+ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); - udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); - } - } - } - - if (!name_set) { -- info("no node name set, will use kernel name '%s'", udev->dev->kernel); -+ info("no node name set, will use kernel name '%s'\n", udev->dev->kernel); - strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name)); - } - - if (udev->tmp_node[0] != '\0') { -- dbg("removing temporary device node"); -+ dbg("removing temporary device node\n"); - unlink_secure(udev->tmp_node); - udev->tmp_node[0] = '\0'; - } -@@ -1518,7 +1518,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - { - struct udev_rule *rule; - -- dbg("udev->kernel='%s'", udev->dev->kernel); -+ dbg("udev->kernel='%s'\n", udev->dev->kernel); - - /* look for a matching rule to apply */ - udev_rules_iter_init(rules); -@@ -1527,7 +1527,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - if (rule == NULL) - break; - -- dbg("process rule"); -+ dbg("process rule\n"); - if (rule->name.operation == KEY_OP_ASSIGN || - rule->name.operation == KEY_OP_ASSIGN_FINAL || - rule->name.operation == KEY_OP_ADD || -@@ -1536,19 +1536,19 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - 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"); -+ dbg("skip rule that names a device\n"); - continue; - } - - if (match_rule(udev, rule) == 0) { - if (rule->ignore_device) { -- info("rule applied, '%s' is ignored", udev->dev->kernel); -+ info("rule applied, '%s' is ignored\n", udev->dev->kernel); - udev->ignore_device = 1; - return 0; - } - if (rule->ignore_remove) { - udev->ignore_remove = 1; -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - } - - if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) { -@@ -1556,10 +1556,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - - if (rule->run.operation == KEY_OP_ASSIGN || - rule->run.operation == KEY_OP_ASSIGN_FINAL) { -- info("reset run list"); -+ info("reset run list\n"); - name_list_cleanup(&udev->run_list); - } -- dbg("add run '%s'", key_val(rule, &rule->run)); -+ dbg("add run '%s'\n", key_val(rule, &rule->run)); - entry = name_list_add(&udev->run_list, key_val(rule, &rule->run), 0); - if (rule->run_ignore_error) - entry->ignore_error = 1; -@@ -1568,12 +1568,12 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) - } - - if (rule->last_rule) { -- dbg("last rule to be applied"); -+ dbg("last rule to be applied\n"); - break; - } - - if (rule->goto_label.operation != KEY_OP_UNSET) { -- dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); -+ dbg("moving forward to label '%s'\n", key_val(rule, &rule->goto_label)); - udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); - } - } -diff --git a/udev_rules_parse.c b/udev_rules_parse.c -index 6d88354..b586df1 100644 ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -33,7 +33,7 @@ - - void udev_rules_iter_init(struct udev_rules *rules) - { -- dbg("bufsize=%zi", rules->bufsize); -+ dbg("bufsize=%zi\n", rules->bufsize); - rules->current = 0; - } - -@@ -44,9 +44,9 @@ struct udev_rule *udev_rules_iter_next(struct udev_rules *rules) - if (!rules) - return NULL; - -- dbg("current=%zi", rules->current); -+ dbg("current=%zi\n", rules->current); - if (rules->current >= rules->bufsize) { -- dbg("no more rules"); -+ dbg("no more rules\n"); - return NULL; - } - -@@ -62,20 +62,20 @@ struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *la - static struct udev_rule *rule; - - next: -- dbg("current=%zi", rules->current); -+ dbg("current=%zi\n", rules->current); - if (rules->current >= rules->bufsize) { -- dbg("no more rules"); -+ dbg("no more rules\n"); - return NULL; - } - rule = (struct udev_rule *) (rules->buf + rules->current); - - if (strcmp(&rule->buf[rule->label.val_off], label) != 0) { -- dbg("moving forward, looking for label '%s'", label); -+ dbg("moving forward, looking for label '%s'\n", label); - rules->current += sizeof(struct udev_rule) + rule->bufsize; - goto next; - } - -- dbg("found label '%s'", label); -+ dbg("found label '%s'\n", label); - return rule; - } - -@@ -123,29 +123,29 @@ static int get_key(char **line, char **key, enum key_operation *operation, char - if (linepos[0] == '=' && linepos[1] == '=') { - *operation = KEY_OP_MATCH; - linepos += 2; -- dbg("operator=match"); -+ dbg("operator=match\n"); - } else if (linepos[0] == '!' && linepos[1] == '=') { - *operation = KEY_OP_NOMATCH; - linepos += 2; -- dbg("operator=nomatch"); -+ dbg("operator=nomatch\n"); - } else if (linepos[0] == '+' && linepos[1] == '=') { - *operation = KEY_OP_ADD; - linepos += 2; -- dbg("operator=add"); -+ dbg("operator=add\n"); - } else if (linepos[0] == '=') { - *operation = KEY_OP_ASSIGN; - linepos++; -- dbg("operator=assign"); -+ dbg("operator=assign\n"); - } else if (linepos[0] == ':' && linepos[1] == '=') { - *operation = KEY_OP_ASSIGN_FINAL; - linepos += 2; -- dbg("operator=assign_final"); -+ dbg("operator=assign_final\n"); - } else - return -1; - - /* terminate key */ - temp[0] = '\0'; -- dbg("key='%s'", *key); -+ dbg("key='%s'\n", *key); - - /* skip whitespace after operator */ - while (isspace(linepos[0])) -@@ -165,7 +165,7 @@ static int get_key(char **line, char **key, enum key_operation *operation, char - return -1; - temp[0] = '\0'; - temp++; -- dbg("value='%s'", *value); -+ dbg("value='%s'\n", *value); - - /* move line to next key */ - *line = temp; -@@ -184,11 +184,11 @@ static char *get_key_attribute(char *str) - attr++; - pos = strchr(attr, '}'); - if (pos == NULL) { -- err("missing closing brace for format"); -+ err("missing closing brace for format\n"); - return NULL; - } - pos[0] = '\0'; -- dbg("attribute='%s'", attr); -+ dbg("attribute='%s'\n", attr); - return attr; - } - -@@ -215,7 +215,7 @@ static int add_rule_key_pair(struct udev_rule *rule, struct key_pairs *pairs, - size_t key_len = strnlen(key, PATH_SIZE); - - if (pairs->count >= PAIRS_MAX) { -- err("skip, too many keys of the same type in a single rule"); -+ err("skip, too many keys of the same type in a single rule\n"); - return -1; - } - -@@ -261,7 +261,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "ACTION") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid ACTION operation"); -+ err("invalid ACTION operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->action, operation, value); -@@ -272,7 +272,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "DEVPATH") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid DEVPATH operation"); -+ err("invalid DEVPATH operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->devpath, operation, value); -@@ -283,7 +283,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "KERNEL") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid KERNEL operation"); -+ err("invalid KERNEL operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->kernel, operation, value); -@@ -294,7 +294,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "SUBSYSTEM") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid SUBSYSTEM operation"); -+ err("invalid SUBSYSTEM operation\n"); - goto invalid; - } - /* bus, class, subsystem events should all be the same */ -@@ -302,7 +302,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strcmp(value, "bus") == 0 || - strcmp(value, "class") == 0) { - if (strcmp(value, "bus") == 0 || strcmp(value, "class") == 0) -- err("'%s' must be specified as 'subsystem' " -+ err("'%s' must be specified as 'subsystem' \n" - "please fix it in %s:%u", value, filename, lineno); - add_rule_key(rule, &rule->subsystem, operation, "subsystem|class|bus"); - } else -@@ -314,7 +314,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "DRIVER") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid DRIVER operation"); -+ err("invalid DRIVER operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->driver, operation, value); -@@ -325,7 +325,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strncasecmp(key, "ATTR{", sizeof("ATTR{")-1) == 0) { - attr = get_key_attribute(key + sizeof("ATTR")-1); - if (attr == NULL) { -- err("error parsing ATTR attribute"); -+ err("error parsing ATTR attribute\n"); - goto invalid; - } - if (add_rule_key_pair(rule, &rule->attr, operation, attr, value) != 0) -@@ -338,7 +338,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strcasecmp(key, "ID") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid KERNELS operation"); -+ err("invalid KERNELS operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->kernels, operation, value); -@@ -350,7 +350,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strcasecmp(key, "BUS") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid SUBSYSTEMS operation"); -+ err("invalid SUBSYSTEMS operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->subsystems, operation, value); -@@ -361,7 +361,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "DRIVERS") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid DRIVERS operation"); -+ err("invalid DRIVERS operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->drivers, operation, value); -@@ -373,19 +373,19 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - strncasecmp(key, "SYSFS{", sizeof("SYSFS{")-1) == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid ATTRS operation"); -+ err("invalid ATTRS operation\n"); - goto invalid; - } - attr = get_key_attribute(key + sizeof("ATTRS")-1); - if (attr == NULL) { -- err("error parsing ATTRS attribute"); -+ err("error parsing ATTRS attribute\n"); - goto invalid; - } - if (strncmp(attr, "device/", 7) == 0) -- err("the 'device' link is deprecated and will be removed from a future kernel, " -+ err("the 'device' link is deprecated and will be removed from a future kernel, \n" - "please fix it in %s:%u", filename, lineno); - else if (strstr(attr, "../") != NULL) -- err("do not reference parent sysfs directories directly, that may break with a future kernel, " -+ err("do not reference parent sysfs directories directly, that may break with a future kernel, \n" - "please fix it in %s:%u", filename, lineno); - if (add_rule_key_pair(rule, &rule->attrs, operation, attr, value) != 0) - goto invalid; -@@ -396,7 +396,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strncasecmp(key, "ENV{", sizeof("ENV{")-1) == 0) { - attr = get_key_attribute(key + sizeof("ENV")-1); - if (attr == NULL) { -- err("error parsing ENV attribute"); -+ err("error parsing ENV attribute\n"); - goto invalid; - } - if (strncmp(attr, "PHYSDEV", 7) == 0) -@@ -416,7 +416,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strcasecmp(key, "RESULT") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { -- err("invalid RESULT operation"); -+ err("invalid RESULT operation\n"); - goto invalid; - } - add_rule_key(rule, &rule->result, operation, value); -@@ -427,13 +427,13 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (strncasecmp(key, "IMPORT", sizeof("IMPORT")-1) == 0) { - attr = get_key_attribute(key + sizeof("IMPORT")-1); - if (attr != NULL && strstr(attr, "program")) { -- dbg("IMPORT will be executed"); -+ dbg("IMPORT will be executed\n"); - rule->import_type = IMPORT_PROGRAM; - } else if (attr != NULL && strstr(attr, "file")) { -- dbg("IMPORT will be included as file"); -+ dbg("IMPORT will be included as file\n"); - rule->import_type = IMPORT_FILE; - } else if (attr != NULL && strstr(attr, "parent")) { -- dbg("IMPORT will include the parent values"); -+ dbg("IMPORT will include the parent values\n"); - rule->import_type = IMPORT_PARENT; - } else { - /* figure it out if it is executable */ -@@ -455,12 +455,12 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - pos[0] = '\0'; - } - -- dbg("IMPORT auto mode for '%s'", file); -+ dbg("IMPORT auto mode for '%s'\n", file); - if (!lstat(file, &statbuf) && (statbuf.st_mode & S_IXUSR)) { -- dbg("IMPORT is executable, will be executed (autotype)"); -+ dbg("IMPORT is executable, will be executed (autotype)\n"); - rule->import_type = IMPORT_PROGRAM; - } else { -- dbg("IMPORT is not executable, will be included as file (autotype)"); -+ dbg("IMPORT is not executable, will be included as file (autotype)\n"); - rule->import_type = IMPORT_FILE; - } - } -@@ -472,7 +472,7 @@ 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"); -+ err("invalid TEST operation\n"); - goto invalid; - } - attr = get_key_attribute(key + sizeof("TEST")-1); -@@ -516,16 +516,16 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - attr = get_key_attribute(key + sizeof("NAME")-1); - if (attr != NULL) { - if (strstr(attr, "all_partitions") != NULL) { -- dbg("creation of partition nodes requested"); -+ dbg("creation of partition nodes requested\n"); - rule->partitions = DEFAULT_PARTITIONS_COUNT; - } - if (strstr(attr, "ignore_remove") != NULL) { -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - rule->ignore_remove = 1; - } - } - if (value[0] == '\0') -- dbg("name empty, node creation supressed"); -+ dbg("name empty, node creation supressed\n"); - add_rule_key(rule, &rule->name, operation, value); - continue; - } -@@ -548,7 +548,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (endptr[0] != '\0') { - char owner[32]; - uid_t uid = lookup_user(value); -- dbg("replacing username='%s' by id=%i", value, uid); -+ dbg("replacing username='%s' by id=%i\n", value, uid); - sprintf(owner, "%u", (unsigned int) uid); - add_rule_key(rule, &rule->owner, operation, owner); - continue; -@@ -567,7 +567,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - if (endptr[0] != '\0') { - char group[32]; - gid_t gid = lookup_group(value); -- dbg("replacing groupname='%s' by id=%i", value, gid); -+ dbg("replacing groupname='%s' by id=%i\n", value, gid); - sprintf(group, "%u", (unsigned int) gid); - add_rule_key(rule, &rule->group, operation, group); - continue; -@@ -588,21 +588,21 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - const char *pos; - - if (strstr(value, "last_rule") != NULL) { -- dbg("last rule to be applied"); -+ dbg("last rule to be applied\n"); - rule->last_rule = 1; - } - if (strstr(value, "ignore_device") != NULL) { -- dbg("device should be ignored"); -+ dbg("device should be ignored\n"); - rule->ignore_device = 1; - } - if (strstr(value, "ignore_remove") != NULL) { -- dbg("remove event should be ignored"); -+ dbg("remove event should be ignored\n"); - rule->ignore_remove = 1; - } - pos = strstr(value, "link_priority="); - if (pos != NULL) { - rule->link_priority = atoi(&pos[strlen("link_priority=")]); -- dbg("link priority=%i", rule->link_priority); -+ dbg("link priority=%i\n", rule->link_priority); - } - pos = strstr(value, "string_escape="); - if (pos != NULL) { -@@ -613,18 +613,18 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - rule->string_escape = ESCAPE_REPLACE; - } - if (strstr(value, "all_partitions") != NULL) { -- dbg("creation of partition nodes requested"); -+ dbg("creation of partition nodes requested\n"); - rule->partitions = DEFAULT_PARTITIONS_COUNT; - } - valid = 1; - continue; - } - -- err("unknown key '%s' in %s:%u", key, filename, lineno); -+ err("unknown key '%s' in %s:%u\n", key, filename, lineno); - } - - if (physdev && rule->wait_for_sysfs.operation == KEY_OP_UNSET) -- err("PHYSDEV* values are deprecated and will be removed from a future kernel, " -+ err("PHYSDEV* values are deprecated and will be removed from a future kernel, \n" - "please fix it in %s:%u", filename, lineno); - - /* skip line if not any valid key was found */ -@@ -634,23 +634,23 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena - /* grow buffer and add rule */ - rule_size = sizeof(struct udev_rule) + rule->bufsize; - padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t); -- dbg("add %zi padding bytes", padding); -+ dbg("add %zi padding bytes\n", padding); - rule_size += padding; - rule->bufsize += padding; - - rules->buf = realloc(rules->buf, rules->bufsize + rule_size); - if (!rules->buf) { -- err("realloc failed"); -+ err("realloc failed\n"); - goto exit; - } -- dbg("adding rule to offset %zi", rules->bufsize); -+ dbg("adding rule to offset %zi\n", rules->bufsize); - memcpy(rules->buf + rules->bufsize, rule, rule_size); - rules->bufsize += rule_size; - exit: - return 0; - - invalid: -- err("invalid rule '%s:%u'", filename, lineno); -+ err("invalid rule '%s:%u'\n", filename, lineno); - return -1; - } - -@@ -666,10 +666,10 @@ static int parse_file(struct udev_rules *rules, const char *filename) - int retval = 0; - - if (file_map(filename, &buf, &bufsize) != 0) { -- err("can't open '%s' as rules file: %s", filename, strerror(errno)); -+ err("can't open '%s' as rules file: %s\n", filename, strerror(errno)); - return -1; - } -- info("reading '%s' as rules file", filename); -+ info("reading '%s' as rules file\n", filename); - - /* loop through the whole file */ - cur = 0; -@@ -695,7 +695,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) - continue; - - if (count >= sizeof(line)) { -- err("line too long, rule skipped '%s:%u'", filename, lineno); -+ err("line too long, rule skipped '%s:%u'\n", filename, lineno); - continue; - } - -@@ -708,7 +708,7 @@ static int parse_file(struct udev_rules *rules, const char *filename) - } - line[j] = '\0'; - -- dbg("read '%s'", line); -+ dbg("read '%s'\n", line); - add_to_rules(rules, line, filename, lineno); - } - -@@ -733,10 +733,10 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) - if (stat(udev_rules_dir, &statbuf) != 0) - return -1; - if ((statbuf.st_mode & S_IFMT) != S_IFDIR) { -- dbg("parse single rules file '%s'", udev_rules_dir); -+ dbg("parse single rules file '%s'\n", udev_rules_dir); - name_list_add(&name_list, udev_rules_dir, 1); - } else { -- dbg("parse rules directory '%s'", udev_rules_dir); -+ dbg("parse rules directory '%s'\n", udev_rules_dir); - retval = add_matching_files(&name_list, udev_rules_dir, RULESFILE_SUFFIX); - } - -@@ -776,9 +776,9 @@ int udev_rules_init(struct udev_rules *rules, int resolve_names) - if (statbuf.st_size) - parse_file(rules, name_loop->name); - else -- dbg("empty rules file '%s'", name_loop->name); -+ dbg("empty rules file '%s'\n", name_loop->name); - } else -- err("could not read '%s': %s", name_loop->name, strerror(errno)); -+ err("could not read '%s': %s\n", name_loop->name, strerror(errno)); - list_del(&name_loop->node); - free(name_loop); - } -diff --git a/udev_selinux.c b/udev_selinux.c -index 3fa84a0..eec9501 100644 ---- a/udev_selinux.c -+++ b/udev_selinux.c -@@ -40,7 +40,7 @@ static int is_selinux_running(void) - if (selinux_enabled == -1) - selinux_enabled = (is_selinux_enabled() > 0); - -- dbg("selinux=%i", selinux_enabled); -+ dbg("selinux=%i\n", selinux_enabled); - return selinux_enabled; - } - -@@ -75,7 +75,7 @@ static char *get_media(const char *devname, int mode) - } - - media = strdup(mediabuf); -- info("selinux_get_media(%s)='%s'", devname, media); -+ info("selinux_get_media(%s)='%s'\n", devname, media); - - close_out: - fclose(fp); -@@ -100,12 +100,12 @@ void selinux_setfilecon(const char *file, const char *devname, unsigned int mode - - if (ret < 0) - if (matchpathcon(file, mode, &scontext) < 0) { -- err("matchpathcon(%s) failed", file); -+ err("matchpathcon(%s) failed\n", file); - return; - } - - if (lsetfilecon(file, scontext) < 0) -- err("setfilecon %s failed: %s", file, strerror(errno)); -+ err("setfilecon %s failed: %s\n", file, strerror(errno)); - - freecon(scontext); - } -@@ -128,12 +128,12 @@ void selinux_setfscreatecon(const char *file, const char *devname, unsigned int - - if (ret < 0) - if (matchpathcon(file, mode, &scontext) < 0) { -- err("matchpathcon(%s) failed", file); -+ err("matchpathcon(%s) failed\n", file); - return; - } - - if (setfscreatecon(scontext) < 0) -- err("setfscreatecon %s failed: %s", file, strerror(errno)); -+ err("setfscreatecon %s failed: %s\n", file, strerror(errno)); - - freecon(scontext); - } -@@ -143,7 +143,7 @@ void selinux_resetfscreatecon(void) - { - if (is_selinux_running()) { - if (setfscreatecon(prev_scontext) < 0) -- err("setfscreatecon failed: %s", strerror(errno)); -+ err("setfscreatecon failed: %s\n", strerror(errno)); - } - } - -@@ -155,10 +155,10 @@ void selinux_init(void) - */ - if (is_selinux_running()) { - if (!udev_root[0]) -- err("selinux_init: udev_root not set"); -+ err("selinux_init: udev_root not set\n"); - matchpathcon_init_prefix(NULL, udev_root); - if (getfscreatecon(&prev_scontext) < 0) { -- err("getfscreatecon failed"); -+ err("getfscreatecon failed\n"); - prev_scontext = NULL; - } - } -diff --git a/udev_sysfs.c b/udev_sysfs.c -index 9293305..c4cd4ab 100644 ---- a/udev_sysfs.c -+++ b/udev_sysfs.c -@@ -52,7 +52,7 @@ int sysfs_init(void) - remove_trailing_chars(sysfs_path, '/'); - } else - strlcpy(sysfs_path, "/sys", sizeof(sysfs_path)); -- dbg("sysfs_path='%s'", sysfs_path); -+ dbg("sysfs_path='%s'\n", sysfs_path); - - INIT_LIST_HEAD(&dev_list); - INIT_LIST_HEAD(&attr_list); -@@ -93,7 +93,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, - if (pos == NULL) - return; - strlcpy(dev->kernel, &pos[1], sizeof(dev->kernel)); -- dbg("kernel='%s'", dev->kernel); -+ dbg("kernel='%s'\n", dev->kernel); - - /* some devices have '!' in their name, change that to '/' */ - pos = dev->kernel; -@@ -108,7 +108,7 @@ void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, - while (isdigit(pos[-1])) - pos--; - strlcpy(dev->kernel_number, pos, sizeof(dev->kernel_number)); -- dbg("kernel_number='%s'", dev->kernel_number); -+ dbg("kernel_number='%s'\n", dev->kernel_number); - } - - int sysfs_resolve_link(char *devpath, size_t size) -@@ -125,11 +125,11 @@ int sysfs_resolve_link(char *devpath, size_t size) - if (len <= 0) - return -1; - link_target[len] = '\0'; -- dbg("path link '%s' points to '%s'", devpath, link_target); -+ dbg("path link '%s' points to '%s'\n", devpath, link_target); - - for (back = 0; strncmp(&link_target[back * 3], "../", 3) == 0; back++) - ; -- dbg("base '%s', tail '%s', back %i", devpath, &link_target[back * 3], back); -+ dbg("base '%s', tail '%s', back %i\n", devpath, &link_target[back * 3], back); - for (i = 0; i <= back; i++) { - char *pos = strrchr(devpath, '/'); - -@@ -137,7 +137,7 @@ int sysfs_resolve_link(char *devpath, size_t size) - return -1; - pos[0] = '\0'; - } -- dbg("after moving back '%s'", devpath); -+ dbg("after moving back '%s'\n", devpath); - strlcat(devpath, "/", size); - strlcat(devpath, &link_target[back * 3], size); - return 0; -@@ -165,7 +165,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - strncmp(devpath, "/block/", 7) != 0) - return NULL; - -- dbg("open '%s'", devpath); -+ dbg("open '%s'\n", devpath); - strlcpy(devpath_real, devpath, sizeof(devpath_real)); - remove_trailing_chars(devpath_real, '/'); - if (devpath[0] == '\0' ) -@@ -174,7 +174,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - /* look for device already in cache (we never put an untranslated path in the cache) */ - list_for_each_entry(dev_loop, &dev_list, node) { - if (strcmp(dev_loop->devpath, devpath_real) == 0) { -- dbg("found in cache '%s'", dev_loop->devpath); -+ dbg("found in cache '%s'\n", dev_loop->devpath); - return dev_loop; - } - } -@@ -183,7 +183,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - strlcpy(path, sysfs_path, sizeof(path)); - strlcat(path, devpath_real, sizeof(path)); - if (lstat(path, &statbuf) != 0) { -- dbg("stat '%s' failed: %s", path, strerror(errno)); -+ dbg("stat '%s' failed: %s\n", path, strerror(errno)); - return NULL; - } - if (S_ISLNK(statbuf.st_mode)) { -@@ -193,14 +193,14 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - /* now look for device in cache after path translation */ - list_for_each_entry(dev_loop, &dev_list, node) { - if (strcmp(dev_loop->devpath, devpath_real) == 0) { -- dbg("found in cache '%s'", dev_loop->devpath); -+ dbg("found in cache '%s'\n", dev_loop->devpath); - return dev_loop; - } - } - } - - /* it is a new device */ -- dbg("new uncached device '%s'", devpath_real); -+ dbg("new uncached device '%s'\n", devpath_real); - dev = malloc(sizeof(struct sysfs_device)); - if (dev == NULL) - return NULL; -@@ -216,7 +216,7 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - if (len > 0) { - /* get subsystem from "subsystem" link */ - link_target[len] = '\0'; -- dbg("subsystem link '%s' points to '%s'", link_path, link_target); -+ dbg("subsystem link '%s' points to '%s'\n", link_path, link_target); - pos = strrchr(link_target, '/'); - if (pos != NULL) - strlcpy(dev->subsystem, &pos[1], sizeof(dev->subsystem)); -@@ -245,13 +245,13 @@ struct sysfs_device *sysfs_device_get(const char *devpath) - len = readlink(link_path, link_target, sizeof(link_target)); - if (len > 0) { - link_target[len] = '\0'; -- dbg("driver link '%s' points to '%s'", link_path, link_target); -+ dbg("driver link '%s' points to '%s'\n", link_path, link_target); - pos = strrchr(link_target, '/'); - if (pos != NULL) - strlcpy(dev->driver, &pos[1], sizeof(dev->driver)); - } - -- dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'", dev->devpath, dev->subsystem, dev->driver); -+ dbg("add to cache 'devpath=%s', subsystem='%s', driver='%s'\n", dev->devpath, dev->subsystem, dev->driver); - list_add(&dev->node, &dev_list); - - return dev; -@@ -262,14 +262,14 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) - char parent_devpath[PATH_SIZE]; - char *pos; - -- dbg("open '%s'", dev->devpath); -+ dbg("open '%s'\n", dev->devpath); - - /* look if we already know the parent */ - if (dev->parent != NULL) - return dev->parent; - - strlcpy(parent_devpath, dev->devpath, sizeof(parent_devpath)); -- dbg("'%s'", parent_devpath); -+ dbg("'%s'\n", parent_devpath); - - /* strip last element */ - pos = strrchr(parent_devpath, '/'); -@@ -280,12 +280,12 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev) - if (strncmp(parent_devpath, "/class", 6) == 0) { - pos = strrchr(parent_devpath, '/'); - if (pos == &parent_devpath[6] || pos == parent_devpath) { -- dbg("/class top level, look for device link"); -+ dbg("/class top level, look for device link\n"); - goto device_link; - } - } - if (strcmp(parent_devpath, "/block") == 0) { -- dbg("/block top level, look for device link"); -+ dbg("/block top level, look for device link\n"); - goto device_link; - } - -@@ -334,7 +334,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - ssize_t size; - size_t sysfs_len; - -- dbg("open '%s'/'%s'", devpath, attr_name); -+ dbg("open '%s'/'%s'\n", 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; -@@ -346,23 +346,23 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - /* look for attribute in cache */ - list_for_each_entry(attr_loop, &attr_list, node) { - if (strcmp(attr_loop->path, path) == 0) { -- dbg("found in cache '%s'", attr_loop->path); -+ dbg("found in cache '%s'\n", attr_loop->path); - return attr_loop->value; - } - } - - /* store attribute in cache (also negatives are kept in cache) */ -- dbg("new uncached attribute '%s'", path_full); -+ dbg("new uncached attribute '%s'\n", path_full); - attr = malloc(sizeof(struct sysfs_attr)); - if (attr == NULL) - return NULL; - memset(attr, 0x00, sizeof(struct sysfs_attr)); - strlcpy(attr->path, path, sizeof(attr->path)); -- dbg("add to cache '%s'", path_full); -+ dbg("add to cache '%s'\n", path_full); - list_add(&attr->node, &attr_list); - - if (lstat(path_full, &statbuf) != 0) { -- dbg("stat '%s' failed: %s", path_full, strerror(errno)); -+ dbg("stat '%s' failed: %s\n", path_full, strerror(errno)); - goto out; - } - -@@ -377,7 +377,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - link_target[len] = '\0'; - pos = strrchr(link_target, '/'); - if (pos != NULL) { -- dbg("cache '%s' with link value '%s'", path_full, value); -+ dbg("cache '%s' with link value '%s'\n", path_full, value); - strlcpy(attr->value_local, &pos[1], sizeof(attr->value_local)); - attr->value = attr->value_local; - } -@@ -396,7 +396,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' can not be opened", path_full); -+ dbg("attribute '%s' can not be opened\n", path_full); - goto out; - } - size = read(fd, value, sizeof(value)); -@@ -409,7 +409,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name) - /* got a valid value, store and return it */ - value[size] = '\0'; - remove_trailing_chars(value, '\n'); -- dbg("cache '%s' with attribute value '%s'", path_full, value); -+ dbg("cache '%s' with attribute value '%s'\n", path_full, value); - strlcpy(attr->value_local, value, sizeof(attr->value_local)); - attr->value = attr->value_local; - -diff --git a/udev_utils.c b/udev_utils.c -index e1630b6..00b67da 100644 ---- a/udev_utils.c -+++ b/udev_utils.c -@@ -62,7 +62,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, - /* avoid duplicate entries */ - list_for_each_entry(name_loop, name_list, node) { - if (strcmp(name_loop->name, name) == 0) { -- dbg("'%s' is already in the list", name); -+ dbg("'%s' is already in the list\n", name); - return name_loop; - } - } -@@ -78,7 +78,7 @@ struct name_entry *name_list_add(struct list_head *name_list, const char *name, - return NULL; - - strlcpy(name_new->name, name, sizeof(name_new->name)); -- dbg("adding '%s'", name_new->name); -+ dbg("adding '%s'\n", name_new->name); - list_add_tail(&name_new->node, &name_loop->node); - - return name_new; -@@ -91,7 +91,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke - - list_for_each_entry(name_loop, name_list, node) { - if (strncmp(name_loop->name, key, strlen(key)) == 0) { -- dbg("key already present '%s', replace it", name_loop->name); -+ dbg("key already present '%s', replace it\n", name_loop->name); - snprintf(name_loop->name, sizeof(name_loop->name), "%s=%s", key, value); - name_loop->name[sizeof(name_loop->name)-1] = '\0'; - return name_loop; -@@ -104,7 +104,7 @@ struct name_entry *name_list_key_add(struct list_head *name_list, const char *ke - - snprintf(name_new->name, sizeof(name_new->name), "%s=%s", key, value); - name_new->name[sizeof(name_new->name)-1] = '\0'; -- dbg("adding '%s'", name_new->name); -+ dbg("adding '%s'\n", name_new->name); - list_add_tail(&name_new->node, &name_loop->node); - - return name_new; -@@ -148,10 +148,10 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c - DIR *dir; - char filename[PATH_SIZE]; - -- dbg("open directory '%s'", dirname); -+ dbg("open directory '%s'\n", dirname); - dir = opendir(dirname); - if (dir == NULL) { -- err("unable to open '%s': %s", dirname, strerror(errno)); -+ err("unable to open '%s': %s\n", dirname, strerror(errno)); - return -1; - } - -@@ -173,7 +173,7 @@ int add_matching_files(struct list_head *name_list, const char *dirname, const c - if (strcmp(ext, suffix) != 0) - continue; - } -- dbg("put file '%s/%s' into list", dirname, ent->d_name); -+ dbg("put file '%s/%s' into list\n", dirname, ent->d_name); - - snprintf(filename, sizeof(filename), "%s/%s", dirname, ent->d_name); - filename[sizeof(filename)-1] = '\0'; -@@ -193,9 +193,9 @@ uid_t lookup_user(const char *user) - pw = getpwnam(user); - if (pw == NULL) { - if (errno == 0 || errno == ENOENT || errno == ESRCH) -- err("specified user '%s' unknown", user); -+ err("specified user '%s' unknown\n", user); - else -- err("error resolving user '%s': %s", user, strerror(errno)); -+ err("error resolving user '%s': %s\n", user, strerror(errno)); - } else - uid = pw->pw_uid; - -@@ -211,9 +211,9 @@ extern gid_t lookup_group(const char *group) - gr = getgrnam(group); - if (gr == NULL) { - if (errno == 0 || errno == ENOENT || errno == ESRCH) -- err("specified group '%s' unknown", group); -+ err("specified group '%s' unknown\n", group); - else -- err("error resolving group '%s': %s", group, strerror(errno)); -+ err("error resolving group '%s': %s\n", group, strerror(errno)); - } else - gid = gr->gr_gid; - -diff --git a/udev_utils_file.c b/udev_utils_file.c -index 19668b9..a492785 100644 ---- a/udev_utils_file.c -+++ b/udev_utils_file.c -@@ -47,14 +47,14 @@ int create_path(const char *path) - pos--; - pos[0] = '\0'; - -- dbg("stat '%s'", p); -+ dbg("stat '%s'\n", p); - if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) - return 0; - - if (create_path(p) != 0) - return -1; - -- dbg("mkdir '%s'", p); -+ dbg("mkdir '%s'\n", p); - selinux_setfscreatecon(p, NULL, S_IFDIR|0755); - ret = mkdir(p, 0755); - selinux_resetfscreatecon(); -@@ -93,10 +93,10 @@ int delete_path(const char *path) - if (retval) { - if (errno == ENOTEMPTY) - return 0; -- err("rmdir(%s) failed: %s", p, strerror(errno)); -+ err("rmdir(%s) failed: %s\n", p, strerror(errno)); - break; - } -- dbg("removed '%s'", p); -+ dbg("removed '%s'\n", p); - } - return 0; - } -@@ -110,18 +110,18 @@ int unlink_secure(const char *filename) - - retval = chown(filename, 0, 0); - if (retval) -- err("chown(%s, 0, 0) failed: %s", filename, strerror(errno)); -+ err("chown(%s, 0, 0) failed: %s\n", filename, strerror(errno)); - - retval = chmod(filename, 0000); - if (retval) -- err("chmod(%s, 0000) failed: %s", filename, strerror(errno)); -+ err("chmod(%s, 0000) failed: %s\n", filename, strerror(errno)); - - retval = unlink(filename); - if (errno == ENOENT) - retval = 0; - - if (retval) -- err("unlink(%s) failed: %s", filename, strerror(errno)); -+ err("unlink(%s) failed: %s\n", filename, strerror(errno)); - - return retval; - } -diff --git a/udevadm.c b/udevadm.c -index e2b7779..6e7d773 100644 ---- a/udevadm.c -+++ b/udevadm.c -@@ -26,7 +26,7 @@ - - #include "udev.h" - --static int verbose; -+static int debug; - - #ifdef USE_LOG - void log_message(int priority, const char *format, ...) -@@ -37,9 +37,8 @@ void log_message(int priority, const char *format, ...) - return; - - va_start(args, format); -- if (verbose) { -+ if (debug) { - vprintf(format, args); -- printf("\n"); - } else - vsyslog(priority, format, args); - va_end(args); -@@ -50,7 +49,7 @@ struct command { - const char *name; - int (*cmd)(int argc, char *argv[], char *envp[]); - const char *help; -- int verbose; -+ int debug; - }; - - static const struct command cmds[]; -@@ -102,7 +101,7 @@ static const struct command cmds[] = { - .name = "test", - .cmd = udevtest, - .help = "simulation run", -- .verbose = 1, -+ .debug = 1, - }, - { - .name = "version", -@@ -155,7 +154,7 @@ int main(int argc, char *argv[], char *envp[]) - /* find and execute command */ - for (cmd = cmds; cmd->name != NULL; cmd++) { - if (strcmp(cmd->name, command) == 0) { -- verbose = cmd->verbose; -+ debug = cmd->debug; - rc = cmd->cmd(argc, argv, envp); - goto out; - } -diff --git a/udevcontrol.c b/udevcontrol.c -index f6b5dd9..287e8aa 100644 ---- a/udevcontrol.c -+++ b/udevcontrol.c -@@ -50,7 +50,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - udev_log = log_priority(env); - - logging_init("udevcontrol"); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - - if (argc < 2) { - fprintf(stderr, "missing command\n\n"); -@@ -75,7 +75,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - val = &arg[strlen("log_priority=")]; - ctrl_msg.type = UDEVD_CTRL_SET_LOG_LEVEL; - *intval = log_priority(val); -- info("send log_priority=%i", *intval); -+ info("send log_priority=%i\n", *intval); - } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) { - char *endp; - int count; -@@ -89,7 +89,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - goto exit; - } - *intval = count; -- info("send max_childs=%i", *intval); -+ info("send max_childs=%i\n", *intval); - } else if (!strncmp(arg, "max_childs_running=", strlen("max_childs_running="))) { - char *endp; - int count; -@@ -103,7 +103,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - goto exit; - } - *intval = count; -- info("send max_childs_running=%i", *intval); -+ info("send max_childs_running=%i\n", *intval); - } else if (!strncmp(arg, "env", strlen("env"))) { - val = argv[2]; - if (val == NULL) { -@@ -112,7 +112,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - } - ctrl_msg.type = UDEVD_CTRL_ENV; - strlcpy(ctrl_msg.buf, val, sizeof(ctrl_msg.buf)); -- info("send env '%s'", val); -+ info("send env '%s'\n", val); - } else if (strcmp(arg, "help") == 0 || strcmp(arg, "-h") == 0) { - printf("Usage: udevadm control COMMAND\n" - " --log_priority= set the udev log level for the daemon\n" -@@ -136,7 +136,7 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - - sock = socket(AF_LOCAL, SOCK_DGRAM, 0); - if (sock == -1) { -- err("error getting socket: %s", strerror(errno)); -+ err("error getting socket: %s\n", strerror(errno)); - goto exit; - } - -@@ -148,10 +148,10 @@ int udevcontrol(int argc, char *argv[], char *envp[]) - - retval = sendto(sock, &ctrl_msg, sizeof(ctrl_msg), 0, (struct sockaddr *)&saddr, addrlen); - if (retval == -1) { -- err("error sending message: %s", strerror(errno)); -+ err("error sending message: %s\n", strerror(errno)); - retval = 1; - } else { -- dbg("sent message type=0x%02x, %u bytes sent", ctrl_msg.type, retval); -+ dbg("sent message type=0x%02x, %u bytes sent\n", ctrl_msg.type, retval); - retval = 0; - } - -diff --git a/udevd.8 b/udevd.8 -index 1323313..210ed3f 100644 ---- a/udevd.8 -+++ b/udevd.8 -@@ -14,7 +14,7 @@ - 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] -+\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] - .SH "DESCRIPTION" - .PP - udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the correct event order and takes care, that events for child devices are delayed until the parent event has finished the device handling\. The behavior of the running daemon can be changed with -@@ -31,7 +31,7 @@ Detach and run in the background\. - 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 -+\fB\-\-debug\fR - .RS 4 - Print log messages to stdout\. - .RE -diff --git a/udevd.c b/udevd.c -index 7786ae6..66a410e 100644 ---- a/udevd.c -+++ b/udevd.c -@@ -46,7 +46,7 @@ - #include "udev_selinux.h" - - static int debug_trace; --static int verbose; -+static int debug; - - static struct udev_rules rules; - static int udevd_sock = -1; -@@ -77,10 +77,9 @@ void log_message(int priority, const char *format, ...) - return; - - va_start(args, format); -- if (verbose) { -+ if (debug) { - printf("[%d] ", (int) getpid()); - vprintf(format, args); -- printf("\n"); - } else - vsyslog(priority, format, args); - va_end(args); -@@ -184,7 +183,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st - 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'", -+ info("renamed devpath, moved failed state of '%s' to %s'\n", - msg->devpath_old, msg->devpath); - } else { - unlink(filename_failed); -@@ -241,19 +240,19 @@ static void udev_event_run(struct udevd_uevent_msg *msg) - setpriority(PRIO_PROCESS, 0, UDEV_PRIORITY); - - retval = udev_event_process(msg); -- info("seq %llu finished with %i", msg->seqnum, retval); -+ info("seq %llu finished with %i\n", msg->seqnum, retval); - - logging_close(); - if (retval) - exit(1); - exit(0); - case -1: -- err("fork of child failed: %s", strerror(errno)); -+ err("fork of child failed: %s\n", strerror(errno)); - msg_queue_delete(msg); - break; - default: - /* get SIGCHLD in main loop */ -- info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old", -+ info("seq %llu forked, pid [%d], '%s' '%s', %ld seconds old\n", - msg->seqnum, pid, msg->action, msg->subsystem, time(NULL) - msg->queue_time); - msg->pid = pid; - } -@@ -279,7 +278,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg) - } - - export_event_state(msg, EVENT_QUEUED); -- info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem); -+ info("seq %llu queued, '%s' '%s'\n", msg->seqnum, msg->action, msg->subsystem); - - /* run one event after the other in debug mode */ - if (debug_trace) { -@@ -476,7 +475,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - - /* check identical, parent, or child device event */ - if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { -- dbg("%llu, device event still pending %llu (%s)", -+ dbg("%llu, device event still pending %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 3; - } -@@ -484,7 +483,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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, -+ dbg("%llu, device event still pending %llu (%d:%d)\n", msg->seqnum, - loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); - return 4; - } -@@ -492,7 +491,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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)", -+ dbg("%llu, physical device event still pending %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 5; - } -@@ -501,7 +500,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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); -+ dbg("%llu, maximum number (%i) of childs reached\n", msg->seqnum, childs_count); - return 1; - } - -@@ -512,7 +511,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - - /* check identical, parent, or child device event */ - if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) { -- dbg("%llu, device event still running %llu (%s)", -+ dbg("%llu, device event still running %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 3; - } -@@ -520,7 +519,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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, -+ dbg("%llu, device event still running %llu (%d:%d)\n", msg->seqnum, - loop_msg->seqnum, major(loop_msg->devt), minor(loop_msg->devt)); - return 4; - } -@@ -528,7 +527,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit) - /* 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)", -+ dbg("%llu, physical device event still running %llu (%s)\n", - msg->seqnum, loop_msg->seqnum, loop_msg->devpath); - return 5; - } -@@ -547,7 +546,7 @@ static void msg_queue_manager(void) - return; - - running = running_processes(); -- dbg("%d processes runnning on system", running); -+ dbg("%d processes runnning on system\n", running); - if (running < 0) - running = max_childs_running; - -@@ -555,16 +554,16 @@ static void msg_queue_manager(void) - /* check running processes in our session and possibly throttle */ - if (running >= max_childs_running) { - running = running_processes_in_session(sid, max_childs_running+10); -- dbg("at least %d processes running in session", running); -+ dbg("at least %d processes running in session\n", running); - if (running >= max_childs_running) { -- dbg("delay seq %llu, too many processes already running", loop_msg->seqnum); -+ dbg("delay seq %llu, too many processes already running\n", loop_msg->seqnum); - return; - } - } - - /* serialize and wait for parent or child events */ - if (devpath_busy(loop_msg, max_childs) != 0) { -- dbg("delay seq %llu (%s)", loop_msg->seqnum, loop_msg->devpath); -+ dbg("delay seq %llu (%s)\n", loop_msg->seqnum, loop_msg->devpath); - continue; - } - -@@ -572,7 +571,7 @@ static void msg_queue_manager(void) - list_move_tail(&loop_msg->node, &running_list); - udev_event_run(loop_msg); - running++; -- dbg("moved seq %llu to running list", loop_msg->seqnum); -+ dbg("moved seq %llu to running list\n", loop_msg->seqnum); - } - } - -@@ -601,7 +600,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz - keylen = strlen(key); - msg->envp[i] = key; - bufpos += keylen + 1; -- dbg("add '%s' to msg.envp[%i]", msg->envp[i], i); -+ dbg("add '%s' to msg.envp[%i]\n", msg->envp[i], i); - - /* remember some keys for further processing */ - if (strncmp(key, "ACTION=", 7) == 0) -@@ -639,7 +638,7 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz - msg->envp[i] = NULL; - - if (msg->devpath == NULL || msg->action == NULL) { -- info("DEVPATH or ACTION missing, ignore message"); -+ info("DEVPATH or ACTION missing, ignore message\n"); - free(msg); - return NULL; - } -@@ -672,24 +671,24 @@ static void get_ctrl_msg(void) - size = recvmsg(udevd_sock, &smsg, 0); - if (size < 0) { - if (errno != EINTR) -- err("unable to receive user udevd message: %s", strerror(errno)); -+ err("unable to receive user udevd message: %s\n", strerror(errno)); - return; - } - cmsg = CMSG_FIRSTHDR(&smsg); - cred = (struct ucred *) CMSG_DATA(cmsg); - - if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { -- err("no sender credentials received, message ignored"); -+ err("no sender credentials received, message ignored\n"); - return; - } - - if (cred->uid != 0) { -- err("sender uid=%i, message ignored", cred->uid); -+ err("sender uid=%i, message ignored\n", cred->uid); - return; - } - - if (strncmp(ctrl_msg.magic, UDEVD_CTRL_MAGIC, sizeof(UDEVD_CTRL_MAGIC)) != 0 ) { -- err("message magic '%s' doesn't match, ignore it", ctrl_msg.magic); -+ err("message magic '%s' doesn't match, ignore it\n", ctrl_msg.magic); - return; - } - -@@ -697,50 +696,50 @@ static void get_ctrl_msg(void) - case UDEVD_CTRL_ENV: - pos = strchr(ctrl_msg.buf, '='); - if (pos == NULL) { -- err("wrong key format '%s'", ctrl_msg.buf); -+ err("wrong key format '%s'\n", ctrl_msg.buf); - break; - } - pos[0] = '\0'; - if (pos[1] == '\0') { -- info("udevd message (ENV) received, unset '%s'", ctrl_msg.buf); -+ info("udevd message (ENV) received, unset '%s'\n", ctrl_msg.buf); - unsetenv(ctrl_msg.buf); - } else { -- info("udevd message (ENV) received, set '%s=%s'", ctrl_msg.buf, &pos[1]); -+ info("udevd message (ENV) received, set '%s=%s'\n", 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"); -+ info("udevd message (STOP_EXEC_QUEUE) received\n"); - stop_exec_q = 1; - break; - case UDEVD_CTRL_START_EXEC_QUEUE: -- info("udevd message (START_EXEC_QUEUE) received"); -+ info("udevd message (START_EXEC_QUEUE) received\n"); - stop_exec_q = 0; - msg_queue_manager(); - break; - case UDEVD_CTRL_SET_LOG_LEVEL: - intval = (int *) ctrl_msg.buf; -- info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i", *intval); -+ info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i\n", *intval); - udev_log_priority = *intval; - sprintf(udev_log, "UDEV_LOG=%i", udev_log_priority); - putenv(udev_log); - break; - case UDEVD_CTRL_SET_MAX_CHILDS: - intval = (int *) ctrl_msg.buf; -- info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i", *intval); -+ info("udevd message (UDEVD_SET_MAX_CHILDS) received, max_childs=%i\n", *intval); - max_childs = *intval; - break; - case UDEVD_CTRL_SET_MAX_CHILDS_RUNNING: - intval = (int *) ctrl_msg.buf; -- info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i", *intval); -+ info("udevd message (UDEVD_SET_MAX_CHILDS_RUNNING) received, max_childs=%i\n", *intval); - max_childs_running = *intval; - break; - case UDEVD_CTRL_RELOAD_RULES: -- info("udevd message (RELOAD_RULES) received"); -+ info("udevd message (RELOAD_RULES) received\n"); - reload_config = 1; - break; - default: -- err("unknown control message type"); -+ err("unknown control message type\n"); - } - } - -@@ -756,14 +755,14 @@ static struct udevd_uevent_msg *get_netlink_msg(void) - size = recv(uevent_netlink_sock, &buffer, sizeof(buffer), 0); - if (size < 0) { - if (errno != EINTR) -- err("unable to receive kernel netlink message: %s", strerror(errno)); -+ err("unable to receive kernel netlink message: %s\n", strerror(errno)); - return NULL; - } - - if ((size_t)size > sizeof(buffer)-1) - size = sizeof(buffer)-1; - buffer[size] = '\0'; -- dbg("uevent_size=%zi", size); -+ dbg("uevent_size=%zi\n", size); - - /* start of event payload */ - bufpos = strlen(buffer)+1; -@@ -774,20 +773,20 @@ static struct udevd_uevent_msg *get_netlink_msg(void) - /* validate message */ - pos = strchr(buffer, '@'); - if (pos == NULL) { -- err("invalid uevent '%s'", buffer); -+ err("invalid uevent '%s'\n", buffer); - free(msg); - return NULL; - } - pos[0] = '\0'; - - if (msg->action == NULL) { -- info("no ACTION in payload found, skip event '%s'", buffer); -+ info("no ACTION in payload found, skip event '%s'\n", buffer); - free(msg); - return NULL; - } - - if (strcmp(msg->action, buffer) != 0) { -- err("ACTION in payload does not match uevent, skip event '%s'", buffer); -+ err("ACTION in payload does not match uevent, skip event '%s'\n", buffer); - free(msg); - return NULL; - } -@@ -822,7 +821,7 @@ static void udev_done(int pid, int exitstatus) - - list_for_each_entry(msg, &running_list, node) { - if (msg->pid == pid) { -- info("seq %llu, pid [%d] exit with %i, %ld seconds old", msg->seqnum, msg->pid, -+ info("seq %llu, pid [%d] exit with %i, %ld seconds old\n", msg->seqnum, msg->pid, - exitstatus, time(NULL) - msg->queue_time); - msg->exitstatus = exitstatus; - msg_queue_delete(msg); -@@ -868,14 +867,14 @@ static int init_udevd_socket(void) - - udevd_sock = socket(AF_LOCAL, SOCK_DGRAM, 0); - if (udevd_sock == -1) { -- err("error getting socket: %s", strerror(errno)); -+ err("error getting socket: %s\n", strerror(errno)); - return -1; - } - - /* the bind takes care of ensuring only one copy running */ - retval = bind(udevd_sock, (struct sockaddr *) &saddr, addrlen); - if (retval < 0) { -- err("bind failed: %s", strerror(errno)); -+ err("bind failed: %s\n", strerror(errno)); - close(udevd_sock); - udevd_sock = -1; - return -1; -@@ -900,7 +899,7 @@ static int init_uevent_netlink_sock(void) - - uevent_netlink_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); - if (uevent_netlink_sock == -1) { -- err("error getting socket: %s", strerror(errno)); -+ err("error getting socket: %s\n", strerror(errno)); - return -1; - } - -@@ -909,7 +908,7 @@ static int init_uevent_netlink_sock(void) - - retval = bind(uevent_netlink_sock, (struct sockaddr *) &snl, sizeof(struct sockaddr_nl)); - if (retval < 0) { -- err("bind failed: %s", strerror(errno)); -+ err("bind failed: %s\n", strerror(errno)); - close(uevent_netlink_sock); - uevent_netlink_sock = -1; - return -1; -@@ -957,7 +956,7 @@ int main(int argc, char *argv[], char *envp[]) - static const struct option options[] = { - { "daemon", 0, NULL, 'd' }, - { "debug-trace", 0, NULL, 't' }, -- { "verbose", 0, NULL, 'v' }, -+ { "debug", 0, NULL, 'D' }, - { "help", 0, NULL, 'h' }, - { "version", 0, NULL, 'V' }, - {} -@@ -968,10 +967,10 @@ int main(int argc, char *argv[], char *envp[]) - logging_init("udevd"); - udev_config_init(); - selinux_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - - while (1) { -- option = getopt_long(argc, argv, "dtvhV", options, NULL); -+ option = getopt_long(argc, argv, "dDthV", options, NULL); - if (option == -1) - break; - -@@ -982,13 +981,13 @@ int main(int argc, char *argv[], char *envp[]) - case 't': - debug_trace = 1; - break; -- case 'v': -- verbose = 1; -+ case 'D': -+ debug = 1; - if (udev_log_priority < LOG_INFO) - udev_log_priority = LOG_INFO; - break; - case 'h': -- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n"); -+ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--version]\n"); - goto exit; - case 'V': - printf("%s\n", UDEV_VERSION); -@@ -1000,7 +999,7 @@ int main(int argc, char *argv[], char *envp[]) - - if (getuid() != 0) { - fprintf(stderr, "root privileges required\n"); -- err("root privileges required"); -+ err("root privileges required\n"); - goto exit; - } - -@@ -1008,7 +1007,7 @@ int main(int argc, char *argv[], char *envp[]) - fd = open("/dev/null", O_RDWR); - if (fd < 0) { - fprintf(stderr, "cannot open /dev/null\n"); -- err("cannot open /dev/null"); -+ err("cannot open /dev/null\n"); - } - if (fd > STDIN_FILENO) - dup2(fd, STDIN_FILENO); -@@ -1021,11 +1020,11 @@ int main(int argc, char *argv[], char *envp[]) - if (init_udevd_socket() < 0) { - if (errno == EADDRINUSE) { - fprintf(stderr, "another udev daemon already running\n"); -- err("another udev daemon already running"); -+ err("another udev daemon already running\n"); - rc = 1; - } else { - fprintf(stderr, "error initializing udevd socket\n"); -- err("error initializing udevd socket"); -+ err("error initializing udevd socket\n"); - rc = 2; - } - goto exit; -@@ -1033,7 +1032,7 @@ int main(int argc, char *argv[], char *envp[]) - - if (init_uevent_netlink_sock() < 0) { - fprintf(stderr, "error initializing netlink socket\n"); -- err("error initializing netlink socket"); -+ err("error initializing netlink socket\n"); - rc = 3; - goto exit; - } -@@ -1041,29 +1040,29 @@ int main(int argc, char *argv[], char *envp[]) - /* setup signal handler pipe */ - retval = pipe(signal_pipe); - if (retval < 0) { -- err("error getting pipes: %s", strerror(errno)); -+ err("error getting pipes: %s\n", strerror(errno)); - goto exit; - } - - retval = fcntl(signal_pipe[READ_END], F_GETFL, 0); - if (retval < 0) { -- err("error fcntl on read pipe: %s", strerror(errno)); -+ err("error fcntl on read pipe: %s\n", strerror(errno)); - goto exit; - } - retval = fcntl(signal_pipe[READ_END], F_SETFL, retval | O_NONBLOCK); - if (retval < 0) { -- err("error fcntl on read pipe: %s", strerror(errno)); -+ err("error fcntl on read pipe: %s\n", strerror(errno)); - goto exit; - } - - retval = fcntl(signal_pipe[WRITE_END], F_GETFL, 0); - if (retval < 0) { -- err("error fcntl on write pipe: %s", strerror(errno)); -+ err("error fcntl on write pipe: %s\n", strerror(errno)); - goto exit; - } - retval = fcntl(signal_pipe[WRITE_END], F_SETFL, retval | O_NONBLOCK); - if (retval < 0) { -- err("error fcntl on write pipe: %s", strerror(errno)); -+ err("error fcntl on write pipe: %s\n", strerror(errno)); - goto exit; - } - -@@ -1079,21 +1078,21 @@ int main(int argc, char *argv[], char *envp[]) - pid = fork(); - switch (pid) { - case 0: -- dbg("daemonized fork running"); -+ dbg("daemonized fork running\n"); - break; - case -1: -- err("fork of daemon failed: %s", strerror(errno)); -+ err("fork of daemon failed: %s\n", strerror(errno)); - rc = 4; - goto exit; - default: -- dbg("child [%u] running, parent exits", pid); -+ dbg("child [%u] running, parent exits\n", pid); - rc = 0; - goto exit; - } - } - - /* redirect std{out,err} fd's */ -- if (!verbose) -+ if (!debug) - dup2(fd, STDOUT_FILENO); - dup2(fd, STDERR_FILENO); - if (fd > STDERR_FILENO) -@@ -1107,12 +1106,12 @@ int main(int argc, char *argv[], char *envp[]) - - /* become session leader */ - sid = setsid(); -- dbg("our session is %d", sid); -+ dbg("our session is %d\n", sid); - - /* OOM_DISABLE == -17 */ - fd = open("/proc/self/oom_adj", O_RDWR); - if (fd < 0) -- err("error disabling OOM: %s", strerror(errno)); -+ err("error disabling OOM: %s\n", strerror(errno)); - else { - write(fd, "-17", 3); - close(fd); -@@ -1148,9 +1147,9 @@ int main(int argc, char *argv[], char *envp[]) - strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename)); - inotify_add_watch(inotify_fd, filename, IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); - } else if (errno == ENOSYS) -- err("the kernel does not support inotify, udevd can't monitor rules file changes"); -+ err("the kernel does not support inotify, udevd can't monitor rules file changes\n"); - else -- err("inotify_init failed: %s", strerror(errno)); -+ err("inotify_init failed: %s\n", strerror(errno)); - - /* maximum limit of forked childs */ - value = getenv("UDEVD_MAX_CHILDS"); -@@ -1163,7 +1162,7 @@ int main(int argc, char *argv[], char *envp[]) - else - max_childs = UDEVD_MAX_CHILDS; - } -- info("initialize max_childs to %u", max_childs); -+ info("initialize max_childs to %u\n", max_childs); - - /* start to throttle forking if maximum number of _running_ childs is reached */ - value = getenv("UDEVD_MAX_CHILDS_RUNNING"); -@@ -1176,7 +1175,7 @@ int main(int argc, char *argv[], char *envp[]) - else - max_childs_running = UDEVD_MAX_CHILDS_RUNNING; - } -- info("initialize max_childs_running to %u", max_childs_running); -+ info("initialize max_childs_running to %u\n", max_childs_running); - - /* clear environment for forked event processes */ - clearenv(); -@@ -1206,7 +1205,7 @@ int main(int argc, char *argv[], char *envp[]) - fdcount = select(maxfd+1, &readfds, NULL, NULL, NULL); - if (fdcount < 0) { - if (errno != EINTR) -- err("error in select: %s", strerror(errno)); -+ err("error in select: %s\n", strerror(errno)); - continue; - } - -@@ -1239,7 +1238,7 @@ int main(int argc, char *argv[], char *envp[]) - reload_config = 1; - buf = malloc(nbytes); - if (buf == NULL) { -- err("error getting buffer for inotify, disable watching"); -+ err("error getting buffer for inotify, disable watching\n"); - close(inotify_fd); - inotify_fd = -1; - } -diff --git a/udevd.xml b/udevd.xml -index 0b3c017..178af4c 100644 ---- a/udevd.xml -+++ b/udevd.xml -@@ -27,7 +27,7 @@ - udevd - - -- -+ - - - -@@ -59,7 +59,7 @@ - - - -- -+ - - Print log messages to stdout. - -diff --git a/udevinfo.c b/udevinfo.c -index 52d409d..a0d6cac 100644 ---- a/udevinfo.c -+++ b/udevinfo.c -@@ -69,7 +69,7 @@ static void print_all_attributes(const char *devpath, const char *key) - 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); -+ dbg("attr '%s'='%s'(%zi)\n", dent->d_name, value, len); - - /* remove trailing newlines */ - while (len && value[len-1] == '\n') -@@ -79,7 +79,7 @@ static void print_all_attributes(const char *devpath, const char *key) - while (len && isprint(value[len-1])) - len--; - if (len) { -- dbg("attribute value of '%s' non-printable, skip", dent->d_name); -+ dbg("attribute value of '%s' non-printable, skip\n", dent->d_name); - continue; - } - -@@ -175,7 +175,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) - if (count <= 0) - goto out; - -- info("found %i devices for '%s'", count, name); -+ info("found %i devices for '%s'\n", count, name); - - /* select the device that seems to match */ - list_for_each_entry(device, &name_list, node) { -@@ -185,7 +185,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) - udev_device_init(udev); - if (udev_db_get_device(udev, device->name) != 0) - continue; -- info("found db entry '%s'", device->name); -+ info("found db entry '%s'\n", device->name); - - /* make sure, we don't get a link of a differnt device */ - strlcpy(filename, udev_root, sizeof(filename)); -@@ -194,7 +194,7 @@ static int lookup_device_by_name(struct udevice *udev, const char *name) - if (stat(filename, &statbuf) != 0) - continue; - if (major(udev->devt) > 0 && udev->devt != statbuf.st_rdev) { -- info("skip '%s', dev_t doesn't match", udev->name); -+ info("skip '%s', dev_t doesn't match\n", udev->name); - continue; - } - rc = 0; -@@ -272,7 +272,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) - if (option == -1) - break; - -- dbg("option '%c'", option); -+ dbg("option '%c'\n", option); - switch (option) { - case 'n': - /* remove /dev if given */ -@@ -281,7 +281,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) - else - strlcpy(name, optarg, sizeof(name)); - remove_trailing_chars(name, '/'); -- dbg("name: %s", name); -+ dbg("name: %s\n", name); - break; - case 'p': - /* remove /sys if given */ -@@ -310,7 +310,7 @@ int udevinfo(int argc, char *argv[], char *envp[]) - } - } - } -- dbg("path: %s", path); -+ dbg("path: %s\n", path); - break; - case 'q': - action = ACTION_QUERY; -diff --git a/udevsettle.c b/udevsettle.c -index e3982a4..4b66f89 100644 ---- a/udevsettle.c -+++ b/udevsettle.c -@@ -57,7 +57,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) - - logging_init("udevsettle"); - udev_config_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - sysfs_init(); - - while (1) { -@@ -72,7 +72,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) - timeout = seconds; - else - fprintf(stderr, "invalid timeout value\n"); -- dbg("timeout=%i", timeout); -+ dbg("timeout=%i\n", timeout); - break; - case 'h': - printf("Usage: udevadm settle [--help] [--timeout=]\n\n"); -@@ -90,13 +90,13 @@ int udevsettle(int argc, char *argv[], char *envp[]) - struct stat statbuf; - - if (stat(queuename, &statbuf) < 0) { -- info("queue is empty"); -+ info("queue is empty\n"); - break; - } - usleep(1000 * 1000 / LOOP_PER_SECOND); - } - if (loop <= 0) { -- info("timeout waiting for queue"); -+ info("timeout waiting for queue\n"); - goto exit; - } - -@@ -112,7 +112,7 @@ int udevsettle(int argc, char *argv[], char *envp[]) - goto exit; - seqnum[len] = '\0'; - seq_udev = strtoull(seqnum, NULL, 10); -- info("udev seqnum = %llu", seq_udev); -+ info("udev seqnum = %llu\n", seq_udev); - - /* read current kernel seqnum */ - strlcpy(filename, sysfs_path, sizeof(filename)); -@@ -126,16 +126,16 @@ int udevsettle(int argc, char *argv[], char *envp[]) - goto exit; - seqnum[len] = '\0'; - seq_kernel = strtoull(seqnum, NULL, 10); -- info("kernel seqnum = %llu", seq_kernel); -+ info("kernel seqnum = %llu\n", seq_kernel); - - /* make sure all kernel events have arrived in the queue */ - if (seq_udev >= seq_kernel) { -- info("queue is empty and no pending events left"); -+ info("queue is empty and no pending events left\n"); - rc = 0; - goto exit; - } - usleep(1000 * 1000 / LOOP_PER_SECOND); -- info("queue is empty, but events still pending"); -+ info("queue is empty, but events still pending\n"); - } - - exit: -diff --git a/udevtest.c b/udevtest.c -index a36e503..8beba21 100644 ---- a/udevtest.c -+++ b/udevtest.c -@@ -62,7 +62,7 @@ static int import_uevent_var(const char *devpath) - if (next == NULL) - goto out; - next[0] = '\0'; -- info("import into environment: '%s'", key); -+ info("import into environment: '%s'\n", key); - putenv(key); - key = &next[1]; - } -@@ -91,7 +91,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - {} - }; - -- info("version %s", UDEV_VERSION); -+ info("version %s\n", UDEV_VERSION); - udev_config_init(); - if (udev_log_priority < LOG_INFO) { - char priority[32]; -@@ -108,7 +108,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - if (option == -1) - break; - -- dbg("option '%c'", option); -+ dbg("option '%c'\n", option); - switch (option) { - case 'a': - action = optarg; -@@ -181,7 +181,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - setenv("ACTION", udev->action, 1); - import_uevent_var(udev->dev->devpath); - -- info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem); -+ info("looking at device '%s' from subsystem '%s'\n", udev->dev->devpath, udev->dev->subsystem); - retval = udev_device_event(&rules, udev); - if (retval == 0 && !udev->ignore_device && udev_run) { - struct name_entry *name_loop; -@@ -191,7 +191,7 @@ int udevtest(int argc, char *argv[], char *envp[]) - - strlcpy(program, name_loop->name, sizeof(program)); - udev_rules_apply_format(udev, program, sizeof(program)); -- info("run: '%s'", program); -+ info("run: '%s'\n", program); - } - } - udev_device_cleanup(udev); -diff --git a/udevtrigger.c b/udevtrigger.c -index e50fd4e..72464c8 100644 ---- a/udevtrigger.c -+++ b/udevtrigger.c -@@ -70,7 +70,7 @@ static int device_list_insert(const char *path) - char devpath[PATH_SIZE]; - struct stat statbuf; - -- dbg("add '%s'" , path); -+ dbg("add '%s'\n" , path); - - /* we only have a device, if we have an uevent file */ - strlcpy(filename, path, sizeof(filename)); -@@ -110,12 +110,12 @@ static void trigger_uevent(const char *devpath, const char *action) - - fd = open(filename, O_WRONLY); - if (fd < 0) { -- dbg("error on opening %s: %s", filename, strerror(errno)); -+ dbg("error on opening %s: %s\n", filename, strerror(errno)); - return; - } - - if (write(fd, action, strlen(action)) < 0) -- info("error writing '%s' to '%s': %s", action, filename, strerror(errno)); -+ info("error writing '%s' to '%s': %s\n", action, filename, strerror(errno)); - - close(fd); - } -@@ -574,7 +574,7 @@ int udevtrigger(int argc, char *argv[], char *envp[]) - - logging_init("udevtrigger"); - udev_config_init(); -- dbg("version %s", UDEV_VERSION); -+ dbg("version %s\n", UDEV_VERSION); - sysfs_init(); - - while (1) { --- -1.5.4.5 - diff --git a/0012-scsi_id-initialize-serial-strings.patch b/0012-scsi_id-initialize-serial-strings.patch deleted file mode 100644 index 6ce9da1..0000000 --- a/0012-scsi_id-initialize-serial-strings.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 803ac7a6d8d06787305a01a068c2e0ca47e2536d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 20 Apr 2008 21:08:45 +0200 -Subject: [PATCH] scsi_id: initialize serial strings - ---- - extras/scsi_id/scsi_id.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 463b377..5381087 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -682,8 +682,8 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - struct sysfs_device *dev_scsi = NULL; - int good_dev; - int page_code; -- char serial[MAX_SERIAL_LEN]; -- char serial_short[MAX_SERIAL_LEN]; -+ char serial[MAX_SERIAL_LEN] = ""; -+ char serial_short[MAX_SERIAL_LEN] = ""; - const char *bus_str = NULL; - - dbg("devpath %s\n", devpath); --- -1.5.4.5 - diff --git a/0013-persistent-device-naming-also-read-unpartitioned-me.patch b/0013-persistent-device-naming-also-read-unpartitioned-me.patch deleted file mode 100644 index 0fa12fe..0000000 --- a/0013-persistent-device-naming-also-read-unpartitioned-me.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 41677cf51fb2c14aa512ecf9410e43eb35560408 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 20 Apr 2008 21:15:00 +0200 -Subject: [PATCH] persistent device naming: also read unpartitioned media - ---- - etc/udev/rules.d/60-persistent-storage.rules | 12 ++++++++++-- - 1 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index a1e0917..85a9270 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -3,6 +3,9 @@ - # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke - -+# forward scsi device event to corresponding block device -+ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -@@ -47,8 +50,13 @@ 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" - --# by-label/by-uuid (filesystem properties) --ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" -+# skip unpartitioned removable media devices from drivers which do not send "change" events -+ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" -+ -+# import filesystem metadata -+IMPORT{program}="vol_id --export $tempnode" -+ -+# by-label/by-uuid links (filesystem metadata) - 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}" - --- -1.5.4.5 - diff --git a/sources b/sources index 29ee647..7e17e38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71d10400458de14f6e46f52a1a591532 udev-120.tar.bz2 +abd3833ba457cdc0cb5163a8bb7ca5d9 udev-121.tar.bz2 diff --git a/udev-120-rhrules.patch b/udev-120-rhrules.patch new file mode 100644 index 0000000..dab159f --- /dev/null +++ b/udev-120-rhrules.patch @@ -0,0 +1,10 @@ +diff -up udev-121/etc/udev/redhat/40-redhat.rules.rhrules udev-121/etc/udev/redhat/40-redhat.rules +--- udev-121/etc/udev/redhat/40-redhat.rules.rhrules 2008-05-09 09:22:23.000000000 +0200 ++++ udev-121/etc/udev/redhat/40-redhat.rules 2008-05-16 11:58:39.000000000 +0200 +@@ -23,3 +23,6 @@ KERNEL=="vcs[0-9]*", OWNER="vc + KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" + KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" ++ ++KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ diff --git a/udev-121-bsg.patch b/udev-121-bsg.patch new file mode 100644 index 0000000..cdd1578 --- /dev/null +++ b/udev-121-bsg.patch @@ -0,0 +1,82 @@ +diff -up udev-121/extras/scsi_id/bsg.h.bsg udev-121/extras/scsi_id/bsg.h +--- udev-121/extras/scsi_id/bsg.h.bsg 2008-05-16 12:04:38.000000000 +0200 ++++ udev-121/extras/scsi_id/bsg.h 2008-05-16 12:04:28.000000000 +0200 +@@ -0,0 +1,78 @@ ++#ifndef BSG_H ++#define BSG_H ++ ++#define BSG_PROTOCOL_SCSI 0 ++ ++#define BSG_SUB_PROTOCOL_SCSI_CMD 0 ++#define BSG_SUB_PROTOCOL_SCSI_TMF 1 ++#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 ++ ++struct sg_io_v4 { ++ __s32 guard; /* [i] 'Q' to differentiate from v3 */ ++ __u32 protocol; /* [i] 0 -> SCSI , .... */ ++ __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task ++ management function, .... */ ++ ++ __u32 request_len; /* [i] in bytes */ ++ __u64 request; /* [i], [*i] {SCSI: cdb} */ ++ __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ ++ __u32 request_attr; /* [i] {SCSI: task attribute} */ ++ __u32 request_priority; /* [i] {SCSI: task priority} */ ++ __u32 request_extra; /* [i] {spare, for padding} */ ++ __u32 max_response_len; /* [i] in bytes */ ++ __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ ++ ++ /* "dout_": data out (to device); "din_": data in (from device) */ ++ __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else ++ dout_xfer points to array of iovec */ ++ __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ ++ __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */ ++ __u32 din_xfer_len; /* [i] bytes to be transferred from device */ ++ __u64 dout_xferp; /* [i], [*i] */ ++ __u64 din_xferp; /* [i], [*o] */ ++ ++ __u32 timeout; /* [i] units: millisecond */ ++ __u32 flags; /* [i] bit mask */ ++ __u64 usr_ptr; /* [i->o] unused internally */ ++ __u32 spare_in; /* [i] */ ++ ++ __u32 driver_status; /* [o] 0 -> ok */ ++ __u32 transport_status; /* [o] 0 -> ok */ ++ __u32 device_status; /* [o] {SCSI: command completion status} */ ++ __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ ++ __u32 info; /* [o] additional information */ ++ __u32 duration; /* [o] time to complete, in milliseconds */ ++ __u32 response_len; /* [o] bytes of response actually written */ ++ __s32 din_resid; /* [o] din_xfer_len - actual_din_xfer_len */ ++ __s32 dout_resid; /* [o] dout_xfer_len - actual_dout_xfer_len */ ++ __u64 generated_tag; /* [o] {SCSI: transport generated task tag} */ ++ __u32 spare_out; /* [o] */ ++ ++ __u32 padding; ++}; ++ ++#ifdef __KERNEL__ ++ ++#if defined(CONFIG_BLK_DEV_BSG) ++struct bsg_class_device { ++ struct class_device *class_dev; ++ struct device *dev; ++ int minor; ++ struct request_queue *queue; ++}; ++ ++extern int bsg_register_queue(struct request_queue *, struct device *, const char *); ++extern void bsg_unregister_queue(struct request_queue *); ++#else ++static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name) ++{ ++ return 0; ++} ++static inline void bsg_unregister_queue(struct request_queue *rq) ++{ ++} ++#endif ++ ++#endif /* __KERNEL__ */ ++ ++#endif diff --git a/udev.spec b/udev.spec index 2eb1ced..435d8ce 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 120 -Release: 5.20080421git%{?dist} +Version: 121 +Release: 1.20080516git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,26 +19,26 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: 0001-writing-udev-rules-fix-rule-typos.patch -Patch2: 0002-udevinfo-do-not-replace-chars-when-printing-ATTR.patch -Patch3: 0003-vol_id-add-offset-option.patch -Patch4: 0004-cdrom_id-replace-with-version-which-also-exports-me.patch -Patch5: 0005-udevd-at-startup-write-message-including-version-nu.patch -Patch6: 0006-rules_generator-net-rules-always-add-KERNEL-mat.patch -Patch7: 0007-selinux-more-context-settings.patch -Patch8: 0008-selinux-fix-missing-includes.patch -Patch9: 0009-allow-setting-of-MODE-0000.patch -Patch10: 0010-path_id-remove-subsystem-whitelist.patch -Patch11: 0011-logging-add-trailing-newline-to-all-strings.patch -Patch12: 0012-scsi_id-initialize-serial-strings.patch -Patch13: 0013-persistent-device-naming-also-read-unpartitioned-me.patch - +Patch1: 0001-volume_id-clean-up-linux_raid-code.patch +Patch2: 0002-man-udevd-fix-udev-8-reference.patch +Patch3: 0003-man-scsi_id.patch +Patch4: 0004-scsi_id-remove-all-sysfs-dependencies.patch +Patch5: 0005-scsi_id-add-SGv4-support.patch +Patch6: 0006-scsi_id-update-man-page.patch +Patch7: 0007-scsi_id-remove-bus_id-option.patch +Patch8: 0008-scsi_id-add-sg-version-option.patch +Patch9: 0009-rules-adapt-to-new-scsi_id.patch +Patch10: 0010-rules-adapt-tape-rules-to-new-scsi_id.patch +Patch11: 0011-cdrom_id-fix-segfault.patch +Patch12: udev-121-bsg.patch Patch101: udev-116-nettype.patch Patch102: udev-118-sysconf.patch Patch103: udev-089-nopie.patch Patch104: udev-091-lib64.patch +Patch200: udev-120-rhrules.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -99,8 +99,7 @@ which contains functions to get volume ids. %patch9 -p1 -b .git9 %patch10 -p1 -b .git10 %patch11 -p1 -b .git11 -%patch12 -p1 -b .git12 -%patch13 -p1 -b .git13 +%patch12 -p1 -b .bsg %patch101 -p1 -b .nettype %patch102 -p1 -b .sysconf @@ -108,6 +107,8 @@ which contains functions to get volume ids. %patch103 -p1 -b .nopie %patch104 -p1 -b .lib64 +%patch200 -p1 -b .rhrules + %build %if %{with_static} @@ -422,6 +423,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri May 16 2008 Harald Hoyer 121-1.20080516git +- version 121 + latest git fixes + +* Thu Apr 24 2008 Harald Hoyer 120-6.20080421git +- added input/hp_ilo_mouse symlink + * Mon Apr 21 2008 Harald Hoyer 120-4.20080421git - added patches from git: - persistent device naming: also read unpartitioned media From 78ca30d6e7869d18bb65aa1ff3df89efd96b1aa6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 3 Jun 2008 16:56:25 +0000 Subject: [PATCH 419/640] - Add lost F9 change to remove /dev/.udev in start_udev (#442827) --- start_udev | 1 + udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index d77cb4f..2d6f957 100755 --- a/start_udev +++ b/start_udev @@ -231,6 +231,7 @@ getval() { make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 +rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events diff --git a/udev.spec b/udev.spec index 435d8ce..f6aa0aa 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 121 -Release: 1.20080516git%{?dist} +Release: 2.20080516git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -423,6 +423,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 3 2008 Jeremy Katz - 121-2.20080516git +- Add lost F9 change to remove /dev/.udev in start_udev (#442827) + * Fri May 16 2008 Harald Hoyer 121-1.20080516git - version 121 + latest git fixes From b4f99d61c8a8638cee4ffd8fc139a304298af901 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 3 Jun 2008 16:56:25 +0000 Subject: [PATCH 420/640] - Add lost F9 change to remove /dev/.udev in start_udev (#442827) --- start_udev | 1 + udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index d77cb4f..2d6f957 100755 --- a/start_udev +++ b/start_udev @@ -231,6 +231,7 @@ getval() { make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 +rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events diff --git a/udev.spec b/udev.spec index 435d8ce..f6aa0aa 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 121 -Release: 1.20080516git%{?dist} +Release: 2.20080516git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -423,6 +423,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 3 2008 Jeremy Katz - 121-2.20080516git +- Add lost F9 change to remove /dev/.udev in start_udev (#442827) + * Fri May 16 2008 Harald Hoyer 121-1.20080516git - version 121 + latest git fixes From b7eb78ef708fe73eb8dcbe9cd1b2e8ad08ee5766 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 Jun 2008 09:37:40 +0000 Subject: [PATCH 421/640] - version 124 - removed udevcontrol, udevtrigger symlinks (use udevadm now) --- .cvsignore | 2 +- 0001-volume_id-clean-up-linux_raid-code.patch | 93 --- 0002-man-udevd-fix-udev-8-reference.patch | 37 - 0003-man-scsi_id.patch | 37 - ...csi_id-remove-all-sysfs-dependencies.patch | 683 ------------------ 0005-scsi_id-add-SGv4-support.patch | 235 ------ 0006-scsi_id-update-man-page.patch | 66 -- 0007-scsi_id-remove-bus_id-option.patch | 51 -- 0008-scsi_id-add-sg-version-option.patch | 164 ----- 0009-rules-adapt-to-new-scsi_id.patch | 27 - ...ules-adapt-tape-rules-to-new-scsi_id.patch | 33 - 0011-cdrom_id-fix-segfault.patch | 25 - sources | 2 +- start_udev | 21 +- udev-089.tar.bz2.sign | 8 - udev-116-rhrules.patch | 17 - udev-118-slink-selinux.patch | 12 - udev-118-varlib.patch | 25 - udev-121-bsg.patch | 82 --- udev-124.tar.bz2.sign | 8 + udev.spec | 41 +- 21 files changed, 30 insertions(+), 1639 deletions(-) delete mode 100644 0001-volume_id-clean-up-linux_raid-code.patch delete mode 100644 0002-man-udevd-fix-udev-8-reference.patch delete mode 100644 0003-man-scsi_id.patch delete mode 100644 0004-scsi_id-remove-all-sysfs-dependencies.patch delete mode 100644 0005-scsi_id-add-SGv4-support.patch delete mode 100644 0006-scsi_id-update-man-page.patch delete mode 100644 0007-scsi_id-remove-bus_id-option.patch delete mode 100644 0008-scsi_id-add-sg-version-option.patch delete mode 100644 0009-rules-adapt-to-new-scsi_id.patch delete mode 100644 0010-rules-adapt-tape-rules-to-new-scsi_id.patch delete mode 100644 0011-cdrom_id-fix-segfault.patch delete mode 100644 udev-089.tar.bz2.sign delete mode 100644 udev-116-rhrules.patch delete mode 100644 udev-118-slink-selinux.patch delete mode 100644 udev-118-varlib.patch delete mode 100644 udev-121-bsg.patch create mode 100644 udev-124.tar.bz2.sign diff --git a/.cvsignore b/.cvsignore index 1f46546..2a71af6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-121.tar.bz2 +udev-124.tar.bz2 diff --git a/0001-volume_id-clean-up-linux_raid-code.patch b/0001-volume_id-clean-up-linux_raid-code.patch deleted file mode 100644 index 0dc7e78..0000000 --- a/0001-volume_id-clean-up-linux_raid-code.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 661a0bea80d129d5df708e36dbaed745c9d8392e Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 13 May 2008 00:55:53 +0200 -Subject: [PATCH] volume_id: clean up linux_raid code - -extra global and/or non-static variables suck in shared libraries -use "else if" rather than many "return" calls - -Signed-off-by: Karel Zak ---- - extras/volume_id/lib/linux_raid.c | 25 ++++++++++++------------- - 1 files changed, 12 insertions(+), 13 deletions(-) - -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 96ae7c3..af49658 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -27,7 +27,7 @@ - #include "libvolume_id.h" - #include "util.h" - --static struct mdp0_super_block { -+struct mdp0_super_block { - uint32_t md_magic; - uint32_t major_version; - uint32_t minor_version; -@@ -44,7 +44,7 @@ static struct mdp0_super_block { - uint32_t set_uuid1; - uint32_t set_uuid2; - uint32_t set_uuid3; --} PACKED *mdp0; -+} PACKED; - - struct mdp1_super_block { - uint32_t magic; -@@ -53,7 +53,7 @@ struct mdp1_super_block { - uint32_t pad0; - uint8_t set_uuid[16]; - uint8_t set_name[32]; --} PACKED *mdp1; -+} PACKED; - - #define MD_RESERVED_BYTES 0x10000 - #define MD_SB_MAGIC 0xa92b4efc -@@ -61,6 +61,7 @@ struct mdp1_super_block { - static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint64_t size) - { - const uint8_t *buf; -+ struct mdp0_super_block *mdp0; - union { - uint32_t ints[4]; - uint8_t bytes[16]; -@@ -119,6 +120,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 - static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint64_t size) - { - const uint8_t *buf; -+ struct mdp1_super_block *mdp1; - - info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); -@@ -153,22 +155,19 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size - - /* 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) { -+ if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0) - strcpy(id->type_version, "1.0"); -- return 0; -- } - - /* version 1.1 at the start of the device */ -- if (volume_id_probe_linux_raid1(id, off, size) == 0) { -+ else if (volume_id_probe_linux_raid1(id, off, size) == 0) - strcpy(id->type_version, "1.1"); -- return 0; -- } - - /* version 1.2 at 4k offset from the start */ -- if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { -+ else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) - strcpy(id->type_version, "1.2"); -- return 0; -- } - -- return -1; -+ else -+ return -1; -+ -+ return 0; - } --- -1.5.4.5 - diff --git a/0002-man-udevd-fix-udev-8-reference.patch b/0002-man-udevd-fix-udev-8-reference.patch deleted file mode 100644 index be1bf9c..0000000 --- a/0002-man-udevd-fix-udev-8-reference.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 877bded34a528b6436c12678f2430e2ad466f327 Mon Sep 17 00:00:00 2001 -From: MUNEDA Takahiro -Date: Wed, 14 May 2008 04:33:34 +0200 -Subject: [PATCH] man: udevd- fix udev(8) reference - ---- - udevd.8 | 2 +- - udevd.xml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/udevd.8 b/udevd.8 -index 210ed3f..c6b4811 100644 ---- a/udevd.8 -+++ b/udevd.8 -@@ -57,5 +57,5 @@ Written by Kay Sievers - \. - .SH "SEE ALSO" - .PP --\fBudev\fR(8), -+\fBudev\fR(7), - \fBudevadm\fR(8) -diff --git a/udevd.xml b/udevd.xml -index 178af4c..8d22a0c 100644 ---- a/udevd.xml -+++ b/udevd.xml -@@ -97,7 +97,7 @@ - - SEE ALSO - -- udev8 -+ udev7 - , - - udevadm8 --- -1.5.4.5 - diff --git a/0003-man-scsi_id.patch b/0003-man-scsi_id.patch deleted file mode 100644 index 41f7c16..0000000 --- a/0003-man-scsi_id.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 838436fa328345ffb0b355e6921b6d75a9b2992f Mon Sep 17 00:00:00 2001 -From: MUNEDA Takahiro -Date: Wed, 14 May 2008 04:47:33 +0200 -Subject: [PATCH] man: scsi_id - ---- - extras/scsi_id/scsi_id.8 | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 -index 927549b..aa429a5 100644 ---- a/extras/scsi_id/scsi_id.8 -+++ b/extras/scsi_id/scsi_id.8 -@@ -45,7 +45,7 @@ identifier starts with the NAA value of 6): - - .sp - .nf --# /sbin/scsi_id --page=0x83 --devpath=/block/sdg -+# scsi_id --page=0x83 --devpath=/block/sdg - 3600a0b80000b174b000000d63efc5c8c - .fi - .P -@@ -131,7 +131,10 @@ warnings are sent using syslog. - .nf - .ft B - .ft --/etc/scsi_id.config configuration and black/white list entries -+.TP -+\fI/etc/scsi_id.config\fP -+configuration and black/white list entries -+.RE - .fi - .LP - .SH "SEE ALSO" --- -1.5.4.5 - diff --git a/0004-scsi_id-remove-all-sysfs-dependencies.patch b/0004-scsi_id-remove-all-sysfs-dependencies.patch deleted file mode 100644 index 2143dcb..0000000 --- a/0004-scsi_id-remove-all-sysfs-dependencies.patch +++ /dev/null @@ -1,683 +0,0 @@ -From 753417db2ba6faafa3aa30f6b15678e1557e20b8 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 14 May 2008 13:42:41 +0200 -Subject: [PATCH] scsi_id: remove all sysfs dependencies - ---- - extras/scsi_id/scsi_id.c | 213 ++++++------------------------------------ - extras/scsi_id/scsi_id.h | 19 +++- - extras/scsi_id/scsi_serial.c | 85 ++++++++--------- - 3 files changed, 83 insertions(+), 234 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 5381087..4f0233e 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -31,21 +31,14 @@ - #include "scsi_id.h" - #include "scsi_id_version.h" - --/* temporary names for mknod */ --#define TMP_DIR "/dev" --#define TMP_PREFIX "tmp-scsi" -- - static const struct option options[] = { - { "device", 1, NULL, 'd' }, - { "config", 1, NULL, 'f' }, - { "page", 1, NULL, 'p' }, -- { "devpath", 1, NULL, 's' }, -- { "fallback-to-sysfs", 0, NULL, 'a' }, - { "blacklisted", 0, NULL, 'b' }, - { "whitelisted", 0, NULL, 'g' }, - { "prefix-bus-id", 0, NULL, 'i' }, - { "replace-whitespace", 0, NULL, 'u' }, -- { "ignore-sysfs", 0, NULL, 'n' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, - { "export", 0, NULL, 'x' }, -@@ -53,21 +46,17 @@ static const struct option options[] = { - {} - }; - --static const char short_options[] = "abd:f:ghinp:s:uvVx"; -+static const char short_options[] = "d:f:ghip:uvVx"; - static const char dev_short_options[] = "bgp:"; - - static int all_good; --static int always_info; - static int dev_specified; --static int sys_specified; - static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; - static int display_bus_id; - static enum page_code default_page_code; - static int use_stderr; - static int debug; --static int hotplug_mode; - static int reformat_serial; --static int ignore_sysfs; - static int export; - static char vendor_str[64]; - static char model_str[64]; -@@ -169,35 +158,6 @@ static void set_type(char *to, const char *from, size_t len) - to[len-1] = '\0'; - } - --static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) --{ -- unsigned int maj, min; -- const char *attr; -- -- dbg("%s\n", devpath); -- attr = sysfs_attr_get_value(devpath, "dev"); -- if (attr == NULL) { -- dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); -- return -1; -- } -- -- dbg("dev value %s\n", attr); -- if (sscanf(attr, "%u:%u", &maj, &min) != 2) { -- err("%s: invalid dev major/minor\n", devpath); -- return -1; -- } -- -- snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", -- TMP_DIR, TMP_PREFIX, maj, min, getpid()); -- -- dbg("tmpdev '%s'\n", tmpdev); -- if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { -- err("mknod failed: %s\n", strerror(errno)); -- return -1; -- } -- return 0; --} -- - /* - * get_value: - * -@@ -415,7 +375,7 @@ static int get_file_options(const char *vendor, const char *model, - } - - static int set_options(int argc, char **argv, const char *short_opts, -- char *target, char *maj_min_dev) -+ char *maj_min_dev) - { - int option; - -@@ -436,9 +396,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - dbg("option '%c'\n", option); - - switch (option) { -- case 'a': -- always_info = 1; -- break; - case 'b': - all_good = 0; - break; -@@ -465,11 +422,8 @@ static int set_options(int argc, char **argv, const char *short_opts, - case 'h': - printf("Usage: scsi_id OPTIONS \n" - " --device device node for SG_IO commands\n" -- " --devpath sysfs devpath\n" - " --config location of config file\n" - " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" -- " --fallback-to-sysfs print sysfs values if inquiry fails\n" -- " --ignore-sysfs ignore sysfs entries\n" - " --blacklisted threat device as blacklisted\n" - " --whitelisted threat device as whitelisted\n" - " --prefix-bus-id prefix SCSI bus id\n" -@@ -497,16 +451,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - } - break; - -- case 'n': -- ignore_sysfs = 1; -- break; -- -- case 's': -- sys_specified = 1; -- strncpy(target, optarg, MAX_PATH_LEN); -- target[MAX_PATH_LEN-1] = '\0'; -- break; -- - case 'u': - reformat_serial = 1; - break; -@@ -528,10 +472,15 @@ static int set_options(int argc, char **argv, const char *short_opts, - exit(1); - } - } -+ if (optind < argc && !dev_specified) { -+ dev_specified = 1; -+ strncpy(maj_min_dev, argv[optind], MAX_PATH_LEN); -+ maj_min_dev[MAX_PATH_LEN-1] = '\0'; -+ } - return 0; - } - --static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *page_code) -+static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int *page_code) - { - int retval; - int newargc; -@@ -590,54 +539,18 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa - return retval; - } - --static int set_sysfs_values(struct sysfs_device *dev_scsi) --{ -- const char *vendor, *model, *type; -- -- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); -- if (!vendor) { -- info("%s: cannot get vendor attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_str(vendor_str, vendor, sizeof(vendor_str)-1); -- -- model = sysfs_attr_get_value(dev_scsi->devpath, "model"); -- if (!model) { -- info("%s: cannot get model attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_str(model_str, model, sizeof(model_str)-1); -- -- type = sysfs_attr_get_value(dev_scsi->devpath, "type"); -- if (!type) { -- info("%s: cannot get type attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_type(type_str, type, sizeof(type_str)); -- -- type = sysfs_attr_get_value(dev_scsi->devpath, "rev"); -- if (!type) { -- info("%s: cannot get type attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_str(revision_str, type, sizeof(revision_str)-1); -- -- return 0; --} -- --static int set_inq_values(struct sysfs_device *dev_scsi, const char *path) -+static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) - { - int retval; -- char vendor[8], model[16], type[4], rev[4]; - -- retval = scsi_std_inquiry(dev_scsi, path, vendor, model, rev, type); -+ retval = scsi_std_inquiry(dev_scsi, path); - if (retval) - return retval; - -- set_str(vendor_str, vendor, 8); -- set_str(model_str, model, 16); -- set_type(type_str, type, sizeof(type_str) - 1); -- set_str(revision_str, rev, sizeof(revision_str) -1); -+ set_str(vendor_str, dev_scsi->vendor, 8); -+ set_str(model_str, dev_scsi->model, 16); -+ set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); -+ set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); - - return 0; - } -@@ -674,60 +587,25 @@ static void format_serial(char *serial) - * memory etc. return 2, and return 1 for expected cases (like broken - * device found) that do not print an id. - */ --static int scsi_id(const char *devpath, char *maj_min_dev) -+static int scsi_id(char *maj_min_dev) - { - int retval; -- int dev_type = 0; -- struct sysfs_device *dev; -- struct sysfs_device *dev_scsi = NULL; -+ struct scsi_id_device dev_scsi; - int good_dev; - int page_code; -- char serial[MAX_SERIAL_LEN] = ""; - char serial_short[MAX_SERIAL_LEN] = ""; -- const char *bus_str = NULL; -- -- dbg("devpath %s\n", devpath); - -- dev = sysfs_device_get(devpath); -- if (dev == NULL) { -- err("unable to access '%s'\n", devpath); -- return 1; -- } -- -- if (strcmp(dev->subsystem, "block") == 0) -- dev_type = S_IFBLK; -- else -- dev_type = S_IFCHR; -- -- /* mknod a temp dev to communicate with the device */ -- if (!dev_specified && create_tmp_dev(dev->devpath, maj_min_dev, dev_type)) { -- dbg("create_tmp_dev failed\n"); -- return 1; -- } -- -- if (!ignore_sysfs) { -- /* get scsi parent device */ -- dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); -- if (dev_scsi == NULL) { -- err("unable to access parent device of '%s'\n", devpath); -- return 1; -- } -- set_sysfs_values(dev_scsi); -- bus_str = "scsi"; -- } else { -- dev_scsi = dev; -- set_inq_values(dev_scsi, maj_min_dev); -- } -+ set_inq_values(&dev_scsi, maj_min_dev); - - /* get per device (vendor + model) options from the config file */ -- retval = per_dev_options(dev_scsi, &good_dev, &page_code); -+ retval = per_dev_options(&dev_scsi, &good_dev, &page_code); - dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); - - if (!good_dev) { - retval = 1; -- } else if (scsi_get_serial(dev_scsi, maj_min_dev, page_code, -- serial, serial_short, MAX_SERIAL_LEN)) { -- retval = always_info?0:1; -+ } else if (scsi_get_serial(&dev_scsi, maj_min_dev, page_code, -+ serial_short, MAX_SERIAL_LEN)) { -+ retval = 1; - } else { - retval = 0; - } -@@ -738,59 +616,33 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - printf("ID_VENDOR=%s\n", vendor_str); - printf("ID_MODEL=%s\n", model_str); - printf("ID_REVISION=%s\n", revision_str); -- set_str(serial_str, serial, sizeof(serial_str)); -+ set_str(serial_str, dev_scsi.serial, sizeof(serial_str)); - printf("ID_SERIAL=%s\n", serial_str); - set_str(serial_str, serial_short, sizeof(serial_str)); - printf("ID_SERIAL_SHORT=%s\n", serial_str); - printf("ID_TYPE=%s\n", type_str); -- if (bus_str != NULL) -- printf("ID_BUS=%s\n", bus_str); - } else { - if (reformat_serial) -- format_serial(serial); -- if (display_bus_id) -- printf("%s: ", dev_scsi->kernel); -- printf("%s\n", serial); -+ format_serial(dev_scsi.serial); -+ printf("%s\n", dev_scsi.serial); - } -- dbg("%s\n", serial); -+ dbg("%s\n", dev_scsi.serial); - retval = 0; - } - -- if (!dev_specified) -- unlink(maj_min_dev); -- - return retval; - } - - int main(int argc, char **argv) - { - int retval = 0; -- char devpath[MAX_PATH_LEN]; - char maj_min_dev[MAX_PATH_LEN]; - int newargc; -- const char *env; - char **newargv; - - logging_init("scsi_id"); -- sysfs_init(); - dbg("argc is %d\n", argc); - -- /* sysfs path can be overridden for testing */ -- env = getenv("SYSFS_PATH"); -- if (env) { -- strncpy(sysfs_path, env, sizeof(sysfs_path)); -- sysfs_path[sizeof(sysfs_path)-1] = '\0'; -- } else -- strcpy(sysfs_path, "/sys"); -- -- env = getenv("DEVPATH"); -- if (env) { -- hotplug_mode = 1; -- sys_specified = 1; -- strncpy(devpath, env, MAX_PATH_LEN); -- devpath[sizeof(devpath)-1] = '\0'; -- } -- - /* - * Get config file options. - */ -@@ -801,8 +653,7 @@ int main(int argc, char **argv) - goto exit; - } - if (newargv && (retval == 0)) { -- if (set_options(newargc, newargv, short_options, devpath, -- maj_min_dev) < 0) { -+ if (set_options(newargc, newargv, short_options, maj_min_dev) < 0) { - retval = 2; - goto exit; - } -@@ -810,22 +661,20 @@ int main(int argc, char **argv) - } - - /* -- * Get command line options (overriding any config file or DEVPATH -- * settings). -+ * Get command line options (overriding any config file settings). - */ -- if (set_options(argc, argv, short_options, devpath, maj_min_dev) < 0) -+ if (set_options(argc, argv, short_options, maj_min_dev) < 0) - exit(1); - -- if (!sys_specified) { -- info("--devpath= must be specified\n"); -+ if (!dev_specified) { -+ info("no device specified\n"); - retval = 1; - goto exit; - } - -- retval = scsi_id(devpath, maj_min_dev); -+ retval = scsi_id(maj_min_dev); - - exit: -- sysfs_cleanup(); - logging_close(); - return retval; - } -diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h -index 0e2b297..3b3a000 100644 ---- a/extras/scsi_id/scsi_id.h -+++ b/extras/scsi_id/scsi_id.h -@@ -30,13 +30,21 @@ - */ - #define MAX_BUFFER_LEN 256 - --extern int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, -- char *vendor, char *model, char *rev, char *type); --extern int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, -- int page_code, char *serial, char *serial_short, int len); -+struct scsi_id_device { -+ char vendor[9]; -+ char model[17]; -+ char revision[5]; -+ char type[33]; -+ char kernel[64]; -+ char serial[MAX_SERIAL_LEN]; -+}; -+ -+extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); -+extern int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, -+ int page_code, char *serial_short, int len); - - /* -- * Page code values. -+ * Page code values. - */ - enum page_code { - PAGE_83_PRE_SPC3 = -0x83, -@@ -44,3 +52,4 @@ enum page_code { - PAGE_80 = 0x80, - PAGE_83 = 0x83, - }; -+ -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 28e82db..32bb0f4 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -148,7 +148,7 @@ static int sg_err_category3(struct sg_io_hdr *hp) - hp->sbp, hp->sb_len_wr); - } - --static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) -+static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) - { - unsigned char *sense_buffer; - int s; -@@ -254,7 +254,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - return -1; - } - --static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) -+static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) - { - if (!io->status && !io->host_status && !io->msg_status && - !io->driver_status) { -@@ -273,7 +273,7 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - return -1; - } - --static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, - unsigned char evpd, unsigned char page, - unsigned char *buf, unsigned int buflen) - { -@@ -343,11 +343,10 @@ error: - } - - /* Get list of supported EVPD pages */ --static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page0_inquiry(struct scsi_id_device *dev_scsi, int fd, - unsigned char *buffer, unsigned int len) - { - int retval; -- const char *vendor; - - memset(buffer, 0, len); - retval = scsi_inquiry(dev_scsi, fd, 1, 0x0, buffer, len); -@@ -375,12 +374,7 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - * If the vendor id appears in the page assume the page is - * invalid. - */ -- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); -- if (!vendor) { -- info("%s: cannot get model attribute\n", dev_scsi->kernel); -- return 1; -- } -- if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { -+ if (!strncmp((char *)&buffer[VENDOR_LENGTH], dev_scsi->vendor, VENDOR_LENGTH)) { - info("%s: invalid page0 data\n", dev_scsi->kernel); - return 1; - } -@@ -392,25 +386,14 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - * The caller checks that serial is long enough to include the vendor + - * model. - */ --static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) -+static int prepend_vendor_model(struct scsi_id_device *dev_scsi, char *serial) - { -- const char *attr; - int ind; - -- attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); -- if (!attr) { -- info("%s: cannot get vendor attribute\n", dev_scsi->kernel); -- return 1; -- } -- strncpy(serial, attr, VENDOR_LENGTH); -+ strncpy(serial, dev_scsi->vendor, VENDOR_LENGTH); - ind = strlen(serial) - 1; - -- attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); -- if (!attr) { -- info("%s: cannot get model attribute\n", dev_scsi->kernel); -- return 1; -- } -- strncat(serial, attr, MODEL_LENGTH); -+ strncat(serial, dev_scsi->model, MODEL_LENGTH); - ind = strlen(serial) - 1; - ind++; - -@@ -430,7 +413,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - * check_fill_0x83_id - check the page 0x83 id, if OK allocate and fill - * serial number. - **/ --static int check_fill_0x83_id(struct sysfs_device *dev_scsi, -+static int check_fill_0x83_id(struct scsi_id_device *dev_scsi, - unsigned char *page_83, - const struct scsi_id_search_values - *id_search, char *serial, char *serial_short, int max_len) -@@ -521,7 +504,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, - } - - /* Extract the raw binary from VPD 0x83 pre-SPC devices */ --static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, -+static int check_fill_0x83_prespc3(struct scsi_id_device *dev_scsi, - unsigned char *page_83, - const struct scsi_id_search_values - *id_search, char *serial, char *serial_short, int max_len) -@@ -543,7 +526,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, - - - /* Get device identification VPD page */ --static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page83_inquiry(struct scsi_id_device *dev_scsi, int fd, - char *serial, char *serial_short, int len) - { - int retval; -@@ -633,7 +616,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, - * Return the hard coded error code value 2 if the page 83 reply is not - * conformant to the SCSI-2 format. - */ --static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page83_prespc3_inquiry(struct scsi_id_device *dev_scsi, int fd, - char *serial, char *serial_short, int len) - { - int retval; -@@ -695,7 +678,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, - } - - /* Get unit serial number VPD page */ --static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page80_inquiry(struct scsi_id_device *dev_scsi, int fd, - char *serial, char *serial_short, int max_len) - { - int retval; -@@ -736,30 +719,38 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, - return 0; - } - --int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, -- char *vendor, char *model, char *rev, char *type) -+int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) - { - int retval; - int fd; - unsigned char buf[SCSI_INQ_BUFF_LEN]; -+ struct stat statbuf; - - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("%s: cannot open %s: %s\n", -- dev_scsi->kernel, devname, strerror(errno)); -+ info("scsi_id: cannot open %s: %s\n", -+ devname, strerror(errno)); - return 1; - } - -+ if (fstat(fd, &statbuf) < 0) { -+ info("scsi_id: cannot stat %s: %s\n", -+ devname, strerror(errno)); -+ return 2; -+ } -+ sprintf(dev_scsi->kernel,"%d:%d", major(statbuf.st_rdev), -+ minor(statbuf.st_rdev)); -+ - memset(buf, 0, SCSI_INQ_BUFF_LEN); - retval = scsi_inquiry(dev_scsi, fd, 0, 0, buf, SCSI_INQ_BUFF_LEN); - if (retval < 0) - return retval; - -- memcpy(vendor, buf + 8, 8); -- memcpy(model, buf + 16, 16); -- memcpy(rev, buf + 32, 4); -- sprintf(type,"%x", buf[0] & 0x1f); -+ memcpy(dev_scsi->vendor, buf + 8, 8); -+ memcpy(dev_scsi->model, buf + 16, 16); -+ memcpy(dev_scsi->revision, buf + 32, 4); -+ sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); - - if (close(fd) < 0) - info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); -@@ -767,15 +758,15 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, - return 0; - } - --int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, -- int page_code, char *serial, char *serial_short, int len) -+int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, -+ int page_code, char *serial_short, int len) - { - unsigned char page0[SCSI_INQ_BUFF_LEN]; - int fd; - int ind; - int retval; - -- memset(serial, 0, len); -+ memset(dev_scsi->serial, 0, len); - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -@@ -785,7 +776,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - } - - if (page_code == PAGE_80) { -- if (do_scsi_page80_inquiry(dev_scsi, fd, serial, serial_short, len)) { -+ if (do_scsi_page80_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { - retval = 1; - goto completed; - } else { -@@ -793,7 +784,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - goto completed; - } - } else if (page_code == PAGE_83) { -- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { -+ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { - retval = 1; - goto completed; - } else { -@@ -801,7 +792,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - goto completed; - } - } else if (page_code == PAGE_83_PRE_SPC3) { -- retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, serial, serial_short, len); -+ retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len); - if (retval) { - /* - * Fallback to servicing a SPC-2/3 compliant page 83 -@@ -809,7 +800,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - * conform to pre-SPC3 expectations. - */ - if (retval == 2) { -- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { -+ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { - retval = 1; - goto completed; - } else { -@@ -849,7 +840,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - for (ind = 4; ind <= page0[3] + 3; ind++) - if (page0[ind] == PAGE_83) - if (!do_scsi_page83_inquiry(dev_scsi, fd, -- serial, serial_short, len)) { -+ dev_scsi->serial, serial_short, len)) { - /* - * Success - */ -@@ -860,7 +851,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - for (ind = 4; ind <= page0[3] + 3; ind++) - if (page0[ind] == PAGE_80) - if (!do_scsi_page80_inquiry(dev_scsi, fd, -- serial, serial_short, len)) { -+ dev_scsi->serial, serial_short, len)) { - /* - * Success - */ --- -1.5.4.5 - diff --git a/0005-scsi_id-add-SGv4-support.patch b/0005-scsi_id-add-SGv4-support.patch deleted file mode 100644 index 3cd03a4..0000000 --- a/0005-scsi_id-add-SGv4-support.patch +++ /dev/null @@ -1,235 +0,0 @@ -From 78d9ecfd4f1e37f7453e55e71f2909a58706ae10 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 14 May 2008 13:55:49 +0200 -Subject: [PATCH] scsi_id: add SGv4 support - -Fall back to SGv3, if SGv3 returns a failure/is not available. ---- - extras/scsi_id/Makefile | 4 +- - extras/scsi_id/scsi_id.c | 2 + - extras/scsi_id/scsi_id.h | 1 + - extras/scsi_id/scsi_serial.c | 103 ++++++++++++++++++++++++++++++++---------- - 4 files changed, 84 insertions(+), 26 deletions(-) - -diff --git a/extras/scsi_id/Makefile b/extras/scsi_id/Makefile -index 870296a..ca067d0 100644 ---- a/extras/scsi_id/Makefile -+++ b/extras/scsi_id/Makefile -@@ -6,11 +6,11 @@ - # Released under the GNU General Public License, version 2. - # - --SCSI_ID_VERSION = 0.9 -+SCSI_ID_VERSION = 2.0 - - PROG = scsi_id - OBJS= scsi_serial.o --HEADERS = scsi_id.h scsi.h scsi_id_version.h -+HEADERS = scsi_id.h scsi.h scsi_id_version.h bsg.h - GEN_HEADERS = scsi_id_version.h - MAN_PAGES = scsi_id.8 - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 4f0233e..0f09f29 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -543,6 +543,8 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) - { - int retval; - -+ dev_scsi->use_sg = 4; -+ - retval = scsi_std_inquiry(dev_scsi, path); - if (retval) - return retval; -diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h -index 3b3a000..680c39d 100644 ---- a/extras/scsi_id/scsi_id.h -+++ b/extras/scsi_id/scsi_id.h -@@ -37,6 +37,7 @@ struct scsi_id_device { - char type[33]; - char kernel[64]; - char serial[MAX_SERIAL_LEN]; -+ int use_sg; - }; - - extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 32bb0f4..202ffc0 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -22,7 +22,12 @@ - #include - #include - #include -+#include -+#include - #include -+#include -+/* #include */ -+#include "bsg.h" - - #include "../../udev.h" - #include "scsi.h" -@@ -94,10 +99,7 @@ static int sg_err_category_new(int scsi_status, int msg_status, int - * XXX change to return only two values - failed or OK. - */ - -- /* -- * checks msg_status -- */ -- if (!scsi_status && !msg_status && !host_status && !driver_status) -+ if (!scsi_status && !host_status && !driver_status) - return SG_ERR_CAT_CLEAN; - - if ((scsi_status == SCSI_CHECK_CONDITION) || -@@ -148,11 +150,18 @@ static int sg_err_category3(struct sg_io_hdr *hp) - hp->sbp, hp->sb_len_wr); - } - --static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) -+static int sg_err_category4(struct sg_io_v4 *hp) -+{ -+ return sg_err_category_new(hp->device_status, 0, -+ hp->transport_status, hp->driver_status, -+ (unsigned char *)hp->response, -+ hp->response_len); -+} -+ -+static int scsi_dump_sense(struct scsi_id_device *dev_scsi, -+ unsigned char *sense_buffer, int sb_len) - { -- unsigned char *sense_buffer; - int s; -- int sb_len; - int code; - int sense_class; - int sense_key; -@@ -177,13 +186,11 @@ static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io - - dbg("got check condition\n"); - -- sb_len = io->sb_len_wr; - if (sb_len < 1) { - info("%s: sense buffer empty\n", dev_scsi->kernel); - return -1; - } - -- sense_buffer = io->sbp; - sense_class = (sense_buffer[0] >> 4) & 0x07; - code = sense_buffer[0] & 0xf; - -@@ -268,7 +275,28 @@ static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) - info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", - dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); - if (io->status == SCSI_CHECK_CONDITION) -- return scsi_dump_sense(dev_scsi, io); -+ return scsi_dump_sense(dev_scsi, io->sbp, io->sb_len_wr); -+ else -+ return -1; -+} -+ -+static int scsi_dump_v4(struct scsi_id_device *dev_scsi, struct sg_io_v4 *io) -+{ -+ if (!io->device_status && !io->transport_status && -+ !io->driver_status) { -+ /* -+ * Impossible, should not be called. -+ */ -+ info("%s: called with no error\n", __FUNCTION__); -+ return -1; -+ } -+ -+ info("%s: sg_io failed status 0x%x 0x%x 0x%x\n", -+ dev_scsi->kernel, io->driver_status, io->transport_status, -+ io->device_status); -+ if (io->device_status == SCSI_CHECK_CONDITION) -+ return scsi_dump_sense(dev_scsi, (unsigned char *)io->response, -+ io->response_len); - else - return -1; - } -@@ -281,6 +309,8 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, - { INQUIRY_CMD, evpd, page, 0, buflen, 0 }; - unsigned char sense[SENSE_BUFF_LEN]; - struct sg_io_hdr io_hdr; -+ struct sg_io_v4 io_v4; -+ void *io_buf; - int retval; - int retry = 3; /* rather random */ - -@@ -292,24 +322,46 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, - resend: - dbg("%s evpd %d, page 0x%x\n", dev_scsi->kernel, evpd, page); - -- memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); -- io_hdr.interface_id = 'S'; -- io_hdr.cmd_len = sizeof(inq_cmd); -- io_hdr.mx_sb_len = sizeof(sense); -- io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; -- io_hdr.dxfer_len = buflen; -- io_hdr.dxferp = buf; -- io_hdr.cmdp = inq_cmd; -- io_hdr.sbp = sense; -- io_hdr.timeout = DEF_TIMEOUT; -- -- if (ioctl(fd, SG_IO, &io_hdr) < 0) { -+ if (dev_scsi->use_sg == 4) { -+ memset(&io_v4, 0, sizeof(struct sg_io_v4)); -+ io_v4.guard = 'Q'; -+ io_v4.protocol = BSG_PROTOCOL_SCSI; -+ io_v4.subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD; -+ io_v4.request_len = sizeof(inq_cmd); -+ io_v4.request = (uintptr_t)inq_cmd; -+ io_v4.max_response_len = sizeof(sense); -+ io_v4.response = (uintptr_t)sense; -+ io_v4.din_xfer_len = buflen; -+ io_v4.din_xferp = (uintptr_t)buf; -+ io_buf = (void *)&io_v4; -+ } else { -+ memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); -+ io_hdr.interface_id = 'S'; -+ io_hdr.cmd_len = sizeof(inq_cmd); -+ io_hdr.mx_sb_len = sizeof(sense); -+ io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; -+ io_hdr.dxfer_len = buflen; -+ io_hdr.dxferp = buf; -+ io_hdr.cmdp = inq_cmd; -+ io_hdr.sbp = sense; -+ io_hdr.timeout = DEF_TIMEOUT; -+ io_buf = (void *)&io_hdr; -+ } -+ -+ if (ioctl(fd, SG_IO, io_buf) < 0) { -+ if (errno == EINVAL && dev_scsi->use_sg == 4) { -+ dev_scsi->use_sg = 3; -+ goto resend; -+ } - info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); - retval = -1; - goto error; - } - -- retval = sg_err_category3(&io_hdr); -+ if (dev_scsi->use_sg == 4) -+ retval = sg_err_category4(io_buf); -+ else -+ retval = sg_err_category3(io_buf); - - switch (retval) { - case SG_ERR_CAT_NOTSUPPORTED: -@@ -321,7 +373,10 @@ resend: - break; - - default: -- retval = scsi_dump(dev_scsi, &io_hdr); -+ if (dev_scsi->use_sg == 4) -+ retval = scsi_dump_v4(dev_scsi, io_buf); -+ else -+ retval = scsi_dump(dev_scsi, io_buf); - } - - if (!retval) { --- -1.5.4.5 - diff --git a/0006-scsi_id-update-man-page.patch b/0006-scsi_id-update-man-page.patch deleted file mode 100644 index 324fa27..0000000 --- a/0006-scsi_id-update-man-page.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 138cf75e4eda54ab519c0d77ad3ca4b467dfe7ec Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 13:59:11 +0200 -Subject: [PATCH] scsi_id: update man page - ---- - extras/scsi_id/scsi_id.8 | 24 +----------------------- - 1 files changed, 1 insertions(+), 23 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 -index aa429a5..725b7d5 100644 ---- a/extras/scsi_id/scsi_id.8 -+++ b/extras/scsi_id/scsi_id.8 -@@ -52,25 +52,12 @@ identifier starts with the NAA value of 6): - - .SH OPTIONS - .TP --.BI \-\-fallback-to-sysfs --Always print information (model, vendor strings) about the device even --if it does not support VPD pages. --.TP --.BI \-\-ignore-sysfs --Ignore sysfs entries. Used for devices which are not represented as SCSI --devices, but understand SG_IO commands. --.TP - .BI \-\-blacklisted - The default behaviour \- treat the device as black listed, and do nothing - unless a white listed device is found in the scsi_id config\-file. - .TP - .BI \-\-device=\| device\^ --Instead --of determining and creating a device node based on a sysfs dev --entry as done for the \fB\-s\fP, send SG_IO commands to --\fBdevice\fP, such as \fB/dev/sdc\fP. --This argument should also be used when invoked via udev to avoid problems --with creation of temporary files on not-yet writable directories. -+Send SG_IO commands to \fBdevice\fP, such as \fB/dev/sdc\fP. - .TP - .BI \-\-config=\| config\-file - Read configuration and black/white list entries from -@@ -85,10 +72,6 @@ on the command line or in the scsi_id configuration file for - .B scsi_id - to generate any output. - .TP --.BI \-\-prefix-bus-id --Prefix the identification string with the driver model (sysfs) bus id of --the SCSI device. --.TP - .BI \-\-page=\| 0x80 | 0x83 | pre-spc3-83 - Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83. - .sp -@@ -102,11 +85,6 @@ option is used for older model 4, 5, and 6 EMC Symmetrix devices, its - use with SPC-2 or SPC-3 compliant devices will fallback to the page 83 - format supported by these devices. - .TP --.BI \-\-devpath=\| sysfs\-devpath --Generate an id for the --.B sysfs\-devpath. --The sysfs mount point must not be included. --.TP - .BI \-\-replace-whitespace - Reformat the output : replace all whitespaces by underscores. - .TP --- -1.5.4.5 - diff --git a/0007-scsi_id-remove-bus_id-option.patch b/0007-scsi_id-remove-bus_id-option.patch deleted file mode 100644 index bcb5b82..0000000 --- a/0007-scsi_id-remove-bus_id-option.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 2d05764a77078953849a1f84ac269c927904ca23 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 13:59:25 +0200 -Subject: [PATCH] scsi_id: remove bus_id option - ---- - extras/scsi_id/scsi_id.c | 7 ------- - 1 files changed, 0 insertions(+), 7 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 0f09f29..6194b71 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -37,7 +37,6 @@ static const struct option options[] = { - { "page", 1, NULL, 'p' }, - { "blacklisted", 0, NULL, 'b' }, - { "whitelisted", 0, NULL, 'g' }, -- { "prefix-bus-id", 0, NULL, 'i' }, - { "replace-whitespace", 0, NULL, 'u' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, -@@ -52,7 +51,6 @@ static const char dev_short_options[] = "bgp:"; - static int all_good; - static int dev_specified; - static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; --static int display_bus_id; - static enum page_code default_page_code; - static int use_stderr; - static int debug; -@@ -426,7 +424,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" - " --blacklisted threat device as blacklisted\n" - " --whitelisted threat device as whitelisted\n" -- " --prefix-bus-id prefix SCSI bus id\n" - " --replace-whitespace replace all whitespaces by underscores\n" - " --verbose verbose logging\n" - " --version print version\n" -@@ -434,10 +431,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - " --help print this help text\n\n"); - exit(0); - -- case 'i': -- display_bus_id = 1; -- break; -- - case 'p': - if (strcmp(optarg, "0x80") == 0) { - default_page_code = PAGE_80; --- -1.5.4.5 - diff --git a/0008-scsi_id-add-sg-version-option.patch b/0008-scsi_id-add-sg-version-option.patch deleted file mode 100644 index 9cd1819..0000000 --- a/0008-scsi_id-add-sg-version-option.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 025570aa3e054d92d65f8d2de9f91d202f60c798 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 15:02:17 +0200 -Subject: [PATCH] scsi_id: add --sg-version= option - ---- - extras/scsi_id/scsi_id.c | 53 +++++++++++++++++++++++++---------------- - extras/scsi_id/scsi_serial.c | 6 +++- - 2 files changed, 36 insertions(+), 23 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 6194b71..5eb95e8 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -38,6 +38,7 @@ static const struct option options[] = { - { "blacklisted", 0, NULL, 'b' }, - { "whitelisted", 0, NULL, 'g' }, - { "replace-whitespace", 0, NULL, 'u' }, -+ { "sg-version", 1, NULL, 's' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, - { "export", 0, NULL, 'x' }, -@@ -52,6 +53,7 @@ static int all_good; - static int dev_specified; - static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; - static enum page_code default_page_code; -+static int sg_version = 4; - static int use_stderr; - static int debug; - static int reformat_serial; -@@ -257,7 +259,7 @@ static int get_file_options(const char *vendor, const char *model, - break; - lineno++; - if (buf[strlen(buffer) - 1] != '\n') { -- info("Config file line %d too long\n", lineno); -+ err("Config file line %d too long\n", lineno); - break; - } - -@@ -309,7 +311,7 @@ static int get_file_options(const char *vendor, const char *model, - * Only allow: [vendor=foo[,model=bar]]options=stuff - */ - if (!options_in || (!vendor_in && model_in)) { -- info("Error parsing config file line %d '%s'\n", lineno, buffer); -+ err("Error parsing config file line %d '%s'\n", lineno, buffer); - retval = -1; - break; - } -@@ -419,16 +421,17 @@ static int set_options(int argc, char **argv, const char *short_opts, - - case 'h': - printf("Usage: scsi_id OPTIONS \n" -- " --device device node for SG_IO commands\n" -- " --config location of config file\n" -- " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" -- " --blacklisted threat device as blacklisted\n" -- " --whitelisted threat device as whitelisted\n" -- " --replace-whitespace replace all whitespaces by underscores\n" -- " --verbose verbose logging\n" -- " --version print version\n" -- " --export print values as environment keys\n" -- " --help print this help text\n\n"); -+ " --device= device node for SG_IO commands\n" -+ " --config= location of config file\n" -+ " --page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n" -+ " --sg-version=3|4 use SGv3 or SGv4\n" -+ " --blacklisted threat device as blacklisted\n" -+ " --whitelisted threat device as whitelisted\n" -+ " --replace-whitespace replace all whitespaces by underscores\n" -+ " --verbose verbose logging\n" -+ " --version print version\n" -+ " --export print values as environment keys\n" -+ " --help print this help text\n\n"); - exit(0); - - case 'p': -@@ -439,7 +442,15 @@ static int set_options(int argc, char **argv, const char *short_opts, - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - default_page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'\n", optarg); -+ err("Unknown page code '%s'\n", optarg); -+ return -1; -+ } -+ break; -+ -+ case 's': -+ sg_version = atoi(optarg); -+ if (sg_version < 3 || sg_version > 4) { -+ err("Unknown SG version '%s'\n", optarg); - return -1; - } - break; -@@ -513,13 +524,13 @@ static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int * - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - *page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'\n", optarg); -+ err("Unknown page code '%s'\n", optarg); - retval = -1; - } - break; - - default: -- info("Unknown or bad option '%c' (0x%x)\n", option, option); -+ err("Unknown or bad option '%c' (0x%x)\n", option, option); - retval = -1; - break; - } -@@ -536,16 +547,16 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) - { - int retval; - -- dev_scsi->use_sg = 4; -+ dev_scsi->use_sg = sg_version; - - retval = scsi_std_inquiry(dev_scsi, path); - if (retval) - return retval; - -- set_str(vendor_str, dev_scsi->vendor, 8); -- set_str(model_str, dev_scsi->model, 16); -- set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); -- set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); -+ set_str(vendor_str, dev_scsi->vendor, sizeof(vendor_str)); -+ set_str(model_str, dev_scsi->model, sizeof(model_str)); -+ set_type(type_str, dev_scsi->type, sizeof(type_str)); -+ set_str(revision_str, dev_scsi->revision, sizeof(revision_str)); - - return 0; - } -@@ -662,7 +673,7 @@ int main(int argc, char **argv) - exit(1); - - if (!dev_specified) { -- info("no device specified\n"); -+ err("no device specified\n"); - retval = 1; - goto exit; - } -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 202ffc0..c5cacfa 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -803,12 +803,14 @@ int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) - return retval; - - memcpy(dev_scsi->vendor, buf + 8, 8); -+ dev_scsi->vendor[8] = '\0'; - memcpy(dev_scsi->model, buf + 16, 16); -+ dev_scsi->model[16] = '\0'; - memcpy(dev_scsi->revision, buf + 32, 4); -+ dev_scsi->revision[4] = '\0'; - sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); - -- if (close(fd) < 0) -- info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); -+ close(fd); - - return 0; - } --- -1.5.4.5 - diff --git a/0009-rules-adapt-to-new-scsi_id.patch b/0009-rules-adapt-to-new-scsi_id.patch deleted file mode 100644 index 5c62fd8..0000000 --- a/0009-rules-adapt-to-new-scsi_id.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3d2aed9e869dc8abadb6f7919dcf9e35837d6181 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 15:14:23 +0200 -Subject: [PATCH] rules: adapt to new scsi_id - ---- - etc/udev/rules.d/60-persistent-storage.rules | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index 85a9270..b7c4337 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -33,8 +33,8 @@ KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL - - 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*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" -+KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -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" - --- -1.5.4.5 - diff --git a/0010-rules-adapt-tape-rules-to-new-scsi_id.patch b/0010-rules-adapt-tape-rules-to-new-scsi_id.patch deleted file mode 100644 index 9c06d15..0000000 --- a/0010-rules-adapt-tape-rules-to-new-scsi_id.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 788096cb59a7ad1cdd08ccc59e5e3b1d2f4828c2 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 15:17:35 +0200 -Subject: [PATCH] rules: adapt tape rules to new scsi_id - ---- - etc/udev/rules.d/60-persistent-storage-tape.rules | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules -index e56d57a..45cac93 100644 ---- a/etc/udev/rules.d/60-persistent-storage-tape.rules -+++ b/etc/udev/rules.d/60-persistent-storage-tape.rules -@@ -5,14 +5,14 @@ - ACTION!="add|change", GOTO="persistent_storage_tape_end" - - # 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=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" - - SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" - - 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]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" -+KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" - KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" - --- -1.5.4.5 - diff --git a/0011-cdrom_id-fix-segfault.patch b/0011-cdrom_id-fix-segfault.patch deleted file mode 100644 index 0d4aa23..0000000 --- a/0011-cdrom_id-fix-segfault.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 4cd71da5603898cff68a31774be570750d7fd659 Mon Sep 17 00:00:00 2001 -From: Matthias Schwarzott -Date: Wed, 14 May 2008 16:03:49 +0200 -Subject: [PATCH] cdrom_id: fix segfault - ---- - extras/cdrom_id/cdrom_id.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0e0a463..e0cbe9e 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -469,6 +469,8 @@ static int cd_media_toc(int fd) - info("READ TOC: len: %d\n", len); - if (len > sizeof(toc)) - return -1; -+ if (len < 8) -+ return -1; - - /* check if we have a data track */ - info("ctl %02x (0x04 is data/audio)\n", header[5]); --- -1.5.4.5 - diff --git a/sources b/sources index 7e17e38..8492b2a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -abd3833ba457cdc0cb5163a8bb7ca5d9 udev-121.tar.bz2 +4da0471c0ca3a2a2a77692f67120c03d udev-124.tar.bz2 diff --git a/start_udev b/start_udev index 2d6f957..5e35856 100755 --- a/start_udev +++ b/start_udev @@ -102,8 +102,6 @@ make_extra_nodes () { if [ -x "$MAKEDEV" ]; then - $MAKEDEV -x /dev/null - /sbin/restorecon -R /dev for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things @@ -194,7 +192,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" - /sbin/restorecon /dev mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then @@ -243,30 +240,30 @@ if [ -f "/sys/class/tty/console/uevent" ]; then udevtimeout=$(getval udevtimeout $cmdline) if strstr "$cmdline" udevdebug; then - /sbin/udevcontrol log_priority=debug + /sbin/udevadm control log_priority=debug fi if strstr "$cmdline" udevinfo; then - /sbin/udevcontrol log_priority=info + /sbin/udevadm control log_priority=info fi if strstr "$cmdline" udevtrace; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi if strstr "$cmdline" udevchilds; then - /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) + /sbin/udevadm control max_childs_running=$(getval udevchilds $cmdline) fi if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then - /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 fi if strstr "$cmdline" udevnopersist; then - /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 fi - /sbin/udevcontrol env STARTUP=1 + /sbin/udevadm control env STARTUP=1 if strstr "$cmdline" modprobedebug; then - /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" + /sbin/udevadm control env MODPROBE_OPTIONS="-s -v -q" echo findalias /sys | while read modules ; do if [ -n "$modules" ]; then @@ -277,12 +274,12 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo "Triggering Rest" fi - /sbin/udevtrigger + /sbin/udevadm trigger ret=$[$ret + $?] wait_for_queue $udevtimeout ret=$[$ret + $?] wait - /sbin/udevcontrol env STARTUP= + /sbin/udevadm control env STARTUP= else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev-089.tar.bz2.sign b/udev-089.tar.bz2.sign deleted file mode 100644 index 5bd8278..0000000 --- a/udev-089.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2.2 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBEMVclyGugalF9Dw4RAkuzAJ9u9BKZ86Pv/KLYSK5bJyhXACMCEACdFEjl -e0bVNMtNCImQEiK8abUsIQw= -=Gyt7 ------END PGP SIGNATURE----- diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch deleted file mode 100644 index 0de3545..0000000 --- a/udev-116-rhrules.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up udev-118/etc/udev/redhat/40-redhat.rules.rhrules udev-118/etc/udev/redhat/40-redhat.rules ---- udev-118/etc/udev/redhat/40-redhat.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 -+++ udev-118/etc/udev/redhat/40-redhat.rules 2008-02-20 12:19:07.000000000 +0100 -@@ -5,12 +5,10 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="flopp - - KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" - --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" - - ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" - --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" -- - BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" - - KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" diff --git a/udev-118-slink-selinux.patch b/udev-118-slink-selinux.patch deleted file mode 100644 index f70d027..0000000 --- a/udev-118-slink-selinux.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up udev-120/udev_node.c.slink udev-120/udev_node.c ---- udev-120/udev_node.c.slink 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/udev_node.c 2008-04-04 14:15:33.000000000 +0200 -@@ -146,7 +146,7 @@ static int node_symlink(const char *node - buf[len] = '\0'; - if (strcmp(target, buf) == 0) { - info("preserve already existing symlink '%s' to '%s'", slink, target); -- selinux_setfilecon(slink, NULL, S_IFLNK); -+ /*selinux_setfilecon(slink, NULL, S_IFLNK);*/ - goto exit; - } - } diff --git a/udev-118-varlib.patch b/udev-118-varlib.patch deleted file mode 100644 index a7a0baa..0000000 --- a/udev-118-varlib.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up udev-118/extras/rule_generator/write_net_rules.varlib udev-118/extras/rule_generator/write_net_rules ---- udev-118/extras/rule_generator/write_net_rules.varlib 2008-03-13 14:28:23.000000000 +0100 -+++ udev-118/extras/rule_generator/write_net_rules 2008-03-13 14:32:10.000000000 +0100 -@@ -21,7 +21,7 @@ - # 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' -+RULES_FILE='/dev/.udev/rules.d/70-persistent-net.rules' - - if [ "$MATCHIFTYPE" ]; then - [ $[MATCHIFTYPE] -gt 256 ] && return 0 -diff -up udev-118/extras/rule_generator/write_cd_rules.varlib udev-118/extras/rule_generator/write_cd_rules ---- udev-118/extras/rule_generator/write_cd_rules.varlib 2008-03-13 14:28:16.000000000 +0100 -+++ udev-118/extras/rule_generator/write_cd_rules 2008-03-13 14:32:23.000000000 +0100 -@@ -11,7 +11,7 @@ - # under the terms of the GNU General Public License as published by the - # Free Software Foundation version 2 of the License. - --RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" -+RULES_FILE="/dev/.udev/rules.d/70-persistent-cd.rules" - - . /lib/udev/rule_generator.functions - -diff -up udev-118/extras/rule_generator/rule_generator.functions.varlib udev-118/extras/rule_generator/rule_generator.functions diff --git a/udev-121-bsg.patch b/udev-121-bsg.patch deleted file mode 100644 index cdd1578..0000000 --- a/udev-121-bsg.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up udev-121/extras/scsi_id/bsg.h.bsg udev-121/extras/scsi_id/bsg.h ---- udev-121/extras/scsi_id/bsg.h.bsg 2008-05-16 12:04:38.000000000 +0200 -+++ udev-121/extras/scsi_id/bsg.h 2008-05-16 12:04:28.000000000 +0200 -@@ -0,0 +1,78 @@ -+#ifndef BSG_H -+#define BSG_H -+ -+#define BSG_PROTOCOL_SCSI 0 -+ -+#define BSG_SUB_PROTOCOL_SCSI_CMD 0 -+#define BSG_SUB_PROTOCOL_SCSI_TMF 1 -+#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 -+ -+struct sg_io_v4 { -+ __s32 guard; /* [i] 'Q' to differentiate from v3 */ -+ __u32 protocol; /* [i] 0 -> SCSI , .... */ -+ __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task -+ management function, .... */ -+ -+ __u32 request_len; /* [i] in bytes */ -+ __u64 request; /* [i], [*i] {SCSI: cdb} */ -+ __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ -+ __u32 request_attr; /* [i] {SCSI: task attribute} */ -+ __u32 request_priority; /* [i] {SCSI: task priority} */ -+ __u32 request_extra; /* [i] {spare, for padding} */ -+ __u32 max_response_len; /* [i] in bytes */ -+ __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ -+ -+ /* "dout_": data out (to device); "din_": data in (from device) */ -+ __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else -+ dout_xfer points to array of iovec */ -+ __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ -+ __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */ -+ __u32 din_xfer_len; /* [i] bytes to be transferred from device */ -+ __u64 dout_xferp; /* [i], [*i] */ -+ __u64 din_xferp; /* [i], [*o] */ -+ -+ __u32 timeout; /* [i] units: millisecond */ -+ __u32 flags; /* [i] bit mask */ -+ __u64 usr_ptr; /* [i->o] unused internally */ -+ __u32 spare_in; /* [i] */ -+ -+ __u32 driver_status; /* [o] 0 -> ok */ -+ __u32 transport_status; /* [o] 0 -> ok */ -+ __u32 device_status; /* [o] {SCSI: command completion status} */ -+ __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ -+ __u32 info; /* [o] additional information */ -+ __u32 duration; /* [o] time to complete, in milliseconds */ -+ __u32 response_len; /* [o] bytes of response actually written */ -+ __s32 din_resid; /* [o] din_xfer_len - actual_din_xfer_len */ -+ __s32 dout_resid; /* [o] dout_xfer_len - actual_dout_xfer_len */ -+ __u64 generated_tag; /* [o] {SCSI: transport generated task tag} */ -+ __u32 spare_out; /* [o] */ -+ -+ __u32 padding; -+}; -+ -+#ifdef __KERNEL__ -+ -+#if defined(CONFIG_BLK_DEV_BSG) -+struct bsg_class_device { -+ struct class_device *class_dev; -+ struct device *dev; -+ int minor; -+ struct request_queue *queue; -+}; -+ -+extern int bsg_register_queue(struct request_queue *, struct device *, const char *); -+extern void bsg_unregister_queue(struct request_queue *); -+#else -+static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name) -+{ -+ return 0; -+} -+static inline void bsg_unregister_queue(struct request_queue *rq) -+{ -+} -+#endif -+ -+#endif /* __KERNEL__ */ -+ -+#endif diff --git a/udev-124.tar.bz2.sign b/udev-124.tar.bz2.sign new file mode 100644 index 0000000..d78a969 --- /dev/null +++ b/udev-124.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.7 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBIULWHyGugalF9Dw4RAioFAJ0fg9gLQjpgv4Y9cxjAHaKkaF7trQCfRGyd +lJrHWGmX0sbDgB8MZs/B6B0= +=Ci89 +-----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index f6aa0aa..c33be7a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 121 -Release: 2.20080516git%{?dist} +Version: 124 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,19 +19,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: 0001-volume_id-clean-up-linux_raid-code.patch -Patch2: 0002-man-udevd-fix-udev-8-reference.patch -Patch3: 0003-man-scsi_id.patch -Patch4: 0004-scsi_id-remove-all-sysfs-dependencies.patch -Patch5: 0005-scsi_id-add-SGv4-support.patch -Patch6: 0006-scsi_id-update-man-page.patch -Patch7: 0007-scsi_id-remove-bus_id-option.patch -Patch8: 0008-scsi_id-add-sg-version-option.patch -Patch9: 0009-rules-adapt-to-new-scsi_id.patch -Patch10: 0010-rules-adapt-tape-rules-to-new-scsi_id.patch -Patch11: 0011-cdrom_id-fix-segfault.patch -Patch12: udev-121-bsg.patch - Patch101: udev-116-nettype.patch Patch102: udev-118-sysconf.patch Patch103: udev-089-nopie.patch @@ -88,18 +75,6 @@ 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 .bsg %patch101 -p1 -b .nettype %patch102 -p1 -b .sysconf @@ -337,9 +312,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* -%attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevadm -%attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev @@ -423,15 +396,22 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Jun 12 2008 Harald Hoyer 124-1 +- version 124 +- removed udevcontrol, udevtrigger symlinks (use udevadm now) + * Tue Jun 3 2008 Jeremy Katz - 121-2.20080516git - Add lost F9 change to remove /dev/.udev in start_udev (#442827) * Fri May 16 2008 Harald Hoyer 121-1.20080516git - version 121 + latest git fixes -* Thu Apr 24 2008 Harald Hoyer 120-6.20080421git +* Thu May 07 2008 Harald Hoyer 120-6.20080421git - added input/hp_ilo_mouse symlink +* Tue May 06 2008 Harald Hoyer 120-5.20080421git +- remove /dev/.udev in start_udev (bug #442827) + * Mon Apr 21 2008 Harald Hoyer 120-4.20080421git - added patches from git: - persistent device naming: also read unpartitioned media @@ -444,6 +424,7 @@ rm -rf $RPM_BUILD_ROOT - cdrom_id: replace with version which also exports media properties - vol_id: add --offset option - udevinfo: do not replace chars when printing ATTR== matches +- Resolves: rhbz#440568 * Fri Apr 11 2008 Harald Hoyer 120-3 - fixed pre/preun scriptlets (bug #441941) From 15769f5bb42e6c60fbd3c1a5efd6dc92d9820000 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 Jun 2008 09:37:40 +0000 Subject: [PATCH 422/640] - version 124 - removed udevcontrol, udevtrigger symlinks (use udevadm now) --- .cvsignore | 2 +- 0001-volume_id-clean-up-linux_raid-code.patch | 93 --- 0002-man-udevd-fix-udev-8-reference.patch | 37 - 0003-man-scsi_id.patch | 37 - ...csi_id-remove-all-sysfs-dependencies.patch | 683 ------------------ 0005-scsi_id-add-SGv4-support.patch | 235 ------ 0006-scsi_id-update-man-page.patch | 66 -- 0007-scsi_id-remove-bus_id-option.patch | 51 -- 0008-scsi_id-add-sg-version-option.patch | 164 ----- 0009-rules-adapt-to-new-scsi_id.patch | 27 - ...ules-adapt-tape-rules-to-new-scsi_id.patch | 33 - 0011-cdrom_id-fix-segfault.patch | 25 - sources | 2 +- start_udev | 21 +- udev-089.tar.bz2.sign | 8 - udev-116-rhrules.patch | 17 - udev-118-slink-selinux.patch | 12 - udev-118-varlib.patch | 25 - udev-121-bsg.patch | 82 --- udev-124.tar.bz2.sign | 8 + udev.spec | 41 +- 21 files changed, 30 insertions(+), 1639 deletions(-) delete mode 100644 0001-volume_id-clean-up-linux_raid-code.patch delete mode 100644 0002-man-udevd-fix-udev-8-reference.patch delete mode 100644 0003-man-scsi_id.patch delete mode 100644 0004-scsi_id-remove-all-sysfs-dependencies.patch delete mode 100644 0005-scsi_id-add-SGv4-support.patch delete mode 100644 0006-scsi_id-update-man-page.patch delete mode 100644 0007-scsi_id-remove-bus_id-option.patch delete mode 100644 0008-scsi_id-add-sg-version-option.patch delete mode 100644 0009-rules-adapt-to-new-scsi_id.patch delete mode 100644 0010-rules-adapt-tape-rules-to-new-scsi_id.patch delete mode 100644 0011-cdrom_id-fix-segfault.patch delete mode 100644 udev-089.tar.bz2.sign delete mode 100644 udev-116-rhrules.patch delete mode 100644 udev-118-slink-selinux.patch delete mode 100644 udev-118-varlib.patch delete mode 100644 udev-121-bsg.patch create mode 100644 udev-124.tar.bz2.sign diff --git a/.cvsignore b/.cvsignore index 1f46546..2a71af6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-121.tar.bz2 +udev-124.tar.bz2 diff --git a/0001-volume_id-clean-up-linux_raid-code.patch b/0001-volume_id-clean-up-linux_raid-code.patch deleted file mode 100644 index 0dc7e78..0000000 --- a/0001-volume_id-clean-up-linux_raid-code.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 661a0bea80d129d5df708e36dbaed745c9d8392e Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 13 May 2008 00:55:53 +0200 -Subject: [PATCH] volume_id: clean up linux_raid code - -extra global and/or non-static variables suck in shared libraries -use "else if" rather than many "return" calls - -Signed-off-by: Karel Zak ---- - extras/volume_id/lib/linux_raid.c | 25 ++++++++++++------------- - 1 files changed, 12 insertions(+), 13 deletions(-) - -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 96ae7c3..af49658 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -27,7 +27,7 @@ - #include "libvolume_id.h" - #include "util.h" - --static struct mdp0_super_block { -+struct mdp0_super_block { - uint32_t md_magic; - uint32_t major_version; - uint32_t minor_version; -@@ -44,7 +44,7 @@ static struct mdp0_super_block { - uint32_t set_uuid1; - uint32_t set_uuid2; - uint32_t set_uuid3; --} PACKED *mdp0; -+} PACKED; - - struct mdp1_super_block { - uint32_t magic; -@@ -53,7 +53,7 @@ struct mdp1_super_block { - uint32_t pad0; - uint8_t set_uuid[16]; - uint8_t set_name[32]; --} PACKED *mdp1; -+} PACKED; - - #define MD_RESERVED_BYTES 0x10000 - #define MD_SB_MAGIC 0xa92b4efc -@@ -61,6 +61,7 @@ struct mdp1_super_block { - static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint64_t size) - { - const uint8_t *buf; -+ struct mdp0_super_block *mdp0; - union { - uint32_t ints[4]; - uint8_t bytes[16]; -@@ -119,6 +120,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6 - static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint64_t size) - { - const uint8_t *buf; -+ struct mdp1_super_block *mdp1; - - info("probing at offset 0x%llx, size 0x%llx\n", - (unsigned long long) off, (unsigned long long) size); -@@ -153,22 +155,19 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size - - /* 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) { -+ if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0) - strcpy(id->type_version, "1.0"); -- return 0; -- } - - /* version 1.1 at the start of the device */ -- if (volume_id_probe_linux_raid1(id, off, size) == 0) { -+ else if (volume_id_probe_linux_raid1(id, off, size) == 0) - strcpy(id->type_version, "1.1"); -- return 0; -- } - - /* version 1.2 at 4k offset from the start */ -- if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { -+ else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) - strcpy(id->type_version, "1.2"); -- return 0; -- } - -- return -1; -+ else -+ return -1; -+ -+ return 0; - } --- -1.5.4.5 - diff --git a/0002-man-udevd-fix-udev-8-reference.patch b/0002-man-udevd-fix-udev-8-reference.patch deleted file mode 100644 index be1bf9c..0000000 --- a/0002-man-udevd-fix-udev-8-reference.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 877bded34a528b6436c12678f2430e2ad466f327 Mon Sep 17 00:00:00 2001 -From: MUNEDA Takahiro -Date: Wed, 14 May 2008 04:33:34 +0200 -Subject: [PATCH] man: udevd- fix udev(8) reference - ---- - udevd.8 | 2 +- - udevd.xml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/udevd.8 b/udevd.8 -index 210ed3f..c6b4811 100644 ---- a/udevd.8 -+++ b/udevd.8 -@@ -57,5 +57,5 @@ Written by Kay Sievers - \. - .SH "SEE ALSO" - .PP --\fBudev\fR(8), -+\fBudev\fR(7), - \fBudevadm\fR(8) -diff --git a/udevd.xml b/udevd.xml -index 178af4c..8d22a0c 100644 ---- a/udevd.xml -+++ b/udevd.xml -@@ -97,7 +97,7 @@ - - SEE ALSO - -- udev8 -+ udev7 - , - - udevadm8 --- -1.5.4.5 - diff --git a/0003-man-scsi_id.patch b/0003-man-scsi_id.patch deleted file mode 100644 index 41f7c16..0000000 --- a/0003-man-scsi_id.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 838436fa328345ffb0b355e6921b6d75a9b2992f Mon Sep 17 00:00:00 2001 -From: MUNEDA Takahiro -Date: Wed, 14 May 2008 04:47:33 +0200 -Subject: [PATCH] man: scsi_id - ---- - extras/scsi_id/scsi_id.8 | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 -index 927549b..aa429a5 100644 ---- a/extras/scsi_id/scsi_id.8 -+++ b/extras/scsi_id/scsi_id.8 -@@ -45,7 +45,7 @@ identifier starts with the NAA value of 6): - - .sp - .nf --# /sbin/scsi_id --page=0x83 --devpath=/block/sdg -+# scsi_id --page=0x83 --devpath=/block/sdg - 3600a0b80000b174b000000d63efc5c8c - .fi - .P -@@ -131,7 +131,10 @@ warnings are sent using syslog. - .nf - .ft B - .ft --/etc/scsi_id.config configuration and black/white list entries -+.TP -+\fI/etc/scsi_id.config\fP -+configuration and black/white list entries -+.RE - .fi - .LP - .SH "SEE ALSO" --- -1.5.4.5 - diff --git a/0004-scsi_id-remove-all-sysfs-dependencies.patch b/0004-scsi_id-remove-all-sysfs-dependencies.patch deleted file mode 100644 index 2143dcb..0000000 --- a/0004-scsi_id-remove-all-sysfs-dependencies.patch +++ /dev/null @@ -1,683 +0,0 @@ -From 753417db2ba6faafa3aa30f6b15678e1557e20b8 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 14 May 2008 13:42:41 +0200 -Subject: [PATCH] scsi_id: remove all sysfs dependencies - ---- - extras/scsi_id/scsi_id.c | 213 ++++++------------------------------------ - extras/scsi_id/scsi_id.h | 19 +++- - extras/scsi_id/scsi_serial.c | 85 ++++++++--------- - 3 files changed, 83 insertions(+), 234 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 5381087..4f0233e 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -31,21 +31,14 @@ - #include "scsi_id.h" - #include "scsi_id_version.h" - --/* temporary names for mknod */ --#define TMP_DIR "/dev" --#define TMP_PREFIX "tmp-scsi" -- - static const struct option options[] = { - { "device", 1, NULL, 'd' }, - { "config", 1, NULL, 'f' }, - { "page", 1, NULL, 'p' }, -- { "devpath", 1, NULL, 's' }, -- { "fallback-to-sysfs", 0, NULL, 'a' }, - { "blacklisted", 0, NULL, 'b' }, - { "whitelisted", 0, NULL, 'g' }, - { "prefix-bus-id", 0, NULL, 'i' }, - { "replace-whitespace", 0, NULL, 'u' }, -- { "ignore-sysfs", 0, NULL, 'n' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, - { "export", 0, NULL, 'x' }, -@@ -53,21 +46,17 @@ static const struct option options[] = { - {} - }; - --static const char short_options[] = "abd:f:ghinp:s:uvVx"; -+static const char short_options[] = "d:f:ghip:uvVx"; - static const char dev_short_options[] = "bgp:"; - - static int all_good; --static int always_info; - static int dev_specified; --static int sys_specified; - static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; - static int display_bus_id; - static enum page_code default_page_code; - static int use_stderr; - static int debug; --static int hotplug_mode; - static int reformat_serial; --static int ignore_sysfs; - static int export; - static char vendor_str[64]; - static char model_str[64]; -@@ -169,35 +158,6 @@ static void set_type(char *to, const char *from, size_t len) - to[len-1] = '\0'; - } - --static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type) --{ -- unsigned int maj, min; -- const char *attr; -- -- dbg("%s\n", devpath); -- attr = sysfs_attr_get_value(devpath, "dev"); -- if (attr == NULL) { -- dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno)); -- return -1; -- } -- -- dbg("dev value %s\n", attr); -- if (sscanf(attr, "%u:%u", &maj, &min) != 2) { -- err("%s: invalid dev major/minor\n", devpath); -- return -1; -- } -- -- snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u", -- TMP_DIR, TMP_PREFIX, maj, min, getpid()); -- -- dbg("tmpdev '%s'\n", tmpdev); -- if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) { -- err("mknod failed: %s\n", strerror(errno)); -- return -1; -- } -- return 0; --} -- - /* - * get_value: - * -@@ -415,7 +375,7 @@ static int get_file_options(const char *vendor, const char *model, - } - - static int set_options(int argc, char **argv, const char *short_opts, -- char *target, char *maj_min_dev) -+ char *maj_min_dev) - { - int option; - -@@ -436,9 +396,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - dbg("option '%c'\n", option); - - switch (option) { -- case 'a': -- always_info = 1; -- break; - case 'b': - all_good = 0; - break; -@@ -465,11 +422,8 @@ static int set_options(int argc, char **argv, const char *short_opts, - case 'h': - printf("Usage: scsi_id OPTIONS \n" - " --device device node for SG_IO commands\n" -- " --devpath sysfs devpath\n" - " --config location of config file\n" - " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" -- " --fallback-to-sysfs print sysfs values if inquiry fails\n" -- " --ignore-sysfs ignore sysfs entries\n" - " --blacklisted threat device as blacklisted\n" - " --whitelisted threat device as whitelisted\n" - " --prefix-bus-id prefix SCSI bus id\n" -@@ -497,16 +451,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - } - break; - -- case 'n': -- ignore_sysfs = 1; -- break; -- -- case 's': -- sys_specified = 1; -- strncpy(target, optarg, MAX_PATH_LEN); -- target[MAX_PATH_LEN-1] = '\0'; -- break; -- - case 'u': - reformat_serial = 1; - break; -@@ -528,10 +472,15 @@ static int set_options(int argc, char **argv, const char *short_opts, - exit(1); - } - } -+ if (optind < argc && !dev_specified) { -+ dev_specified = 1; -+ strncpy(maj_min_dev, argv[optind], MAX_PATH_LEN); -+ maj_min_dev[MAX_PATH_LEN-1] = '\0'; -+ } - return 0; - } - --static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *page_code) -+static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int *page_code) - { - int retval; - int newargc; -@@ -590,54 +539,18 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa - return retval; - } - --static int set_sysfs_values(struct sysfs_device *dev_scsi) --{ -- const char *vendor, *model, *type; -- -- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); -- if (!vendor) { -- info("%s: cannot get vendor attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_str(vendor_str, vendor, sizeof(vendor_str)-1); -- -- model = sysfs_attr_get_value(dev_scsi->devpath, "model"); -- if (!model) { -- info("%s: cannot get model attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_str(model_str, model, sizeof(model_str)-1); -- -- type = sysfs_attr_get_value(dev_scsi->devpath, "type"); -- if (!type) { -- info("%s: cannot get type attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_type(type_str, type, sizeof(type_str)); -- -- type = sysfs_attr_get_value(dev_scsi->devpath, "rev"); -- if (!type) { -- info("%s: cannot get type attribute\n", dev_scsi->devpath); -- return -1; -- } -- set_str(revision_str, type, sizeof(revision_str)-1); -- -- return 0; --} -- --static int set_inq_values(struct sysfs_device *dev_scsi, const char *path) -+static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) - { - int retval; -- char vendor[8], model[16], type[4], rev[4]; - -- retval = scsi_std_inquiry(dev_scsi, path, vendor, model, rev, type); -+ retval = scsi_std_inquiry(dev_scsi, path); - if (retval) - return retval; - -- set_str(vendor_str, vendor, 8); -- set_str(model_str, model, 16); -- set_type(type_str, type, sizeof(type_str) - 1); -- set_str(revision_str, rev, sizeof(revision_str) -1); -+ set_str(vendor_str, dev_scsi->vendor, 8); -+ set_str(model_str, dev_scsi->model, 16); -+ set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); -+ set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); - - return 0; - } -@@ -674,60 +587,25 @@ static void format_serial(char *serial) - * memory etc. return 2, and return 1 for expected cases (like broken - * device found) that do not print an id. - */ --static int scsi_id(const char *devpath, char *maj_min_dev) -+static int scsi_id(char *maj_min_dev) - { - int retval; -- int dev_type = 0; -- struct sysfs_device *dev; -- struct sysfs_device *dev_scsi = NULL; -+ struct scsi_id_device dev_scsi; - int good_dev; - int page_code; -- char serial[MAX_SERIAL_LEN] = ""; - char serial_short[MAX_SERIAL_LEN] = ""; -- const char *bus_str = NULL; -- -- dbg("devpath %s\n", devpath); - -- dev = sysfs_device_get(devpath); -- if (dev == NULL) { -- err("unable to access '%s'\n", devpath); -- return 1; -- } -- -- if (strcmp(dev->subsystem, "block") == 0) -- dev_type = S_IFBLK; -- else -- dev_type = S_IFCHR; -- -- /* mknod a temp dev to communicate with the device */ -- if (!dev_specified && create_tmp_dev(dev->devpath, maj_min_dev, dev_type)) { -- dbg("create_tmp_dev failed\n"); -- return 1; -- } -- -- if (!ignore_sysfs) { -- /* get scsi parent device */ -- dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi"); -- if (dev_scsi == NULL) { -- err("unable to access parent device of '%s'\n", devpath); -- return 1; -- } -- set_sysfs_values(dev_scsi); -- bus_str = "scsi"; -- } else { -- dev_scsi = dev; -- set_inq_values(dev_scsi, maj_min_dev); -- } -+ set_inq_values(&dev_scsi, maj_min_dev); - - /* get per device (vendor + model) options from the config file */ -- retval = per_dev_options(dev_scsi, &good_dev, &page_code); -+ retval = per_dev_options(&dev_scsi, &good_dev, &page_code); - dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code); - - if (!good_dev) { - retval = 1; -- } else if (scsi_get_serial(dev_scsi, maj_min_dev, page_code, -- serial, serial_short, MAX_SERIAL_LEN)) { -- retval = always_info?0:1; -+ } else if (scsi_get_serial(&dev_scsi, maj_min_dev, page_code, -+ serial_short, MAX_SERIAL_LEN)) { -+ retval = 1; - } else { - retval = 0; - } -@@ -738,59 +616,33 @@ static int scsi_id(const char *devpath, char *maj_min_dev) - printf("ID_VENDOR=%s\n", vendor_str); - printf("ID_MODEL=%s\n", model_str); - printf("ID_REVISION=%s\n", revision_str); -- set_str(serial_str, serial, sizeof(serial_str)); -+ set_str(serial_str, dev_scsi.serial, sizeof(serial_str)); - printf("ID_SERIAL=%s\n", serial_str); - set_str(serial_str, serial_short, sizeof(serial_str)); - printf("ID_SERIAL_SHORT=%s\n", serial_str); - printf("ID_TYPE=%s\n", type_str); -- if (bus_str != NULL) -- printf("ID_BUS=%s\n", bus_str); - } else { - if (reformat_serial) -- format_serial(serial); -- if (display_bus_id) -- printf("%s: ", dev_scsi->kernel); -- printf("%s\n", serial); -+ format_serial(dev_scsi.serial); -+ printf("%s\n", dev_scsi.serial); - } -- dbg("%s\n", serial); -+ dbg("%s\n", dev_scsi.serial); - retval = 0; - } - -- if (!dev_specified) -- unlink(maj_min_dev); -- - return retval; - } - - int main(int argc, char **argv) - { - int retval = 0; -- char devpath[MAX_PATH_LEN]; - char maj_min_dev[MAX_PATH_LEN]; - int newargc; -- const char *env; - char **newargv; - - logging_init("scsi_id"); -- sysfs_init(); - dbg("argc is %d\n", argc); - -- /* sysfs path can be overridden for testing */ -- env = getenv("SYSFS_PATH"); -- if (env) { -- strncpy(sysfs_path, env, sizeof(sysfs_path)); -- sysfs_path[sizeof(sysfs_path)-1] = '\0'; -- } else -- strcpy(sysfs_path, "/sys"); -- -- env = getenv("DEVPATH"); -- if (env) { -- hotplug_mode = 1; -- sys_specified = 1; -- strncpy(devpath, env, MAX_PATH_LEN); -- devpath[sizeof(devpath)-1] = '\0'; -- } -- - /* - * Get config file options. - */ -@@ -801,8 +653,7 @@ int main(int argc, char **argv) - goto exit; - } - if (newargv && (retval == 0)) { -- if (set_options(newargc, newargv, short_options, devpath, -- maj_min_dev) < 0) { -+ if (set_options(newargc, newargv, short_options, maj_min_dev) < 0) { - retval = 2; - goto exit; - } -@@ -810,22 +661,20 @@ int main(int argc, char **argv) - } - - /* -- * Get command line options (overriding any config file or DEVPATH -- * settings). -+ * Get command line options (overriding any config file settings). - */ -- if (set_options(argc, argv, short_options, devpath, maj_min_dev) < 0) -+ if (set_options(argc, argv, short_options, maj_min_dev) < 0) - exit(1); - -- if (!sys_specified) { -- info("--devpath= must be specified\n"); -+ if (!dev_specified) { -+ info("no device specified\n"); - retval = 1; - goto exit; - } - -- retval = scsi_id(devpath, maj_min_dev); -+ retval = scsi_id(maj_min_dev); - - exit: -- sysfs_cleanup(); - logging_close(); - return retval; - } -diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h -index 0e2b297..3b3a000 100644 ---- a/extras/scsi_id/scsi_id.h -+++ b/extras/scsi_id/scsi_id.h -@@ -30,13 +30,21 @@ - */ - #define MAX_BUFFER_LEN 256 - --extern int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, -- char *vendor, char *model, char *rev, char *type); --extern int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, -- int page_code, char *serial, char *serial_short, int len); -+struct scsi_id_device { -+ char vendor[9]; -+ char model[17]; -+ char revision[5]; -+ char type[33]; -+ char kernel[64]; -+ char serial[MAX_SERIAL_LEN]; -+}; -+ -+extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); -+extern int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, -+ int page_code, char *serial_short, int len); - - /* -- * Page code values. -+ * Page code values. - */ - enum page_code { - PAGE_83_PRE_SPC3 = -0x83, -@@ -44,3 +52,4 @@ enum page_code { - PAGE_80 = 0x80, - PAGE_83 = 0x83, - }; -+ -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 28e82db..32bb0f4 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -148,7 +148,7 @@ static int sg_err_category3(struct sg_io_hdr *hp) - hp->sbp, hp->sb_len_wr); - } - --static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) -+static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) - { - unsigned char *sense_buffer; - int s; -@@ -254,7 +254,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - return -1; - } - --static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) -+static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) - { - if (!io->status && !io->host_status && !io->msg_status && - !io->driver_status) { -@@ -273,7 +273,7 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io) - return -1; - } - --static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, - unsigned char evpd, unsigned char page, - unsigned char *buf, unsigned int buflen) - { -@@ -343,11 +343,10 @@ error: - } - - /* Get list of supported EVPD pages */ --static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page0_inquiry(struct scsi_id_device *dev_scsi, int fd, - unsigned char *buffer, unsigned int len) - { - int retval; -- const char *vendor; - - memset(buffer, 0, len); - retval = scsi_inquiry(dev_scsi, fd, 1, 0x0, buffer, len); -@@ -375,12 +374,7 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - * If the vendor id appears in the page assume the page is - * invalid. - */ -- vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); -- if (!vendor) { -- info("%s: cannot get model attribute\n", dev_scsi->kernel); -- return 1; -- } -- if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) { -+ if (!strncmp((char *)&buffer[VENDOR_LENGTH], dev_scsi->vendor, VENDOR_LENGTH)) { - info("%s: invalid page0 data\n", dev_scsi->kernel); - return 1; - } -@@ -392,25 +386,14 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd, - * The caller checks that serial is long enough to include the vendor + - * model. - */ --static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) -+static int prepend_vendor_model(struct scsi_id_device *dev_scsi, char *serial) - { -- const char *attr; - int ind; - -- attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor"); -- if (!attr) { -- info("%s: cannot get vendor attribute\n", dev_scsi->kernel); -- return 1; -- } -- strncpy(serial, attr, VENDOR_LENGTH); -+ strncpy(serial, dev_scsi->vendor, VENDOR_LENGTH); - ind = strlen(serial) - 1; - -- attr = sysfs_attr_get_value(dev_scsi->devpath, "model"); -- if (!attr) { -- info("%s: cannot get model attribute\n", dev_scsi->kernel); -- return 1; -- } -- strncat(serial, attr, MODEL_LENGTH); -+ strncat(serial, dev_scsi->model, MODEL_LENGTH); - ind = strlen(serial) - 1; - ind++; - -@@ -430,7 +413,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial) - * check_fill_0x83_id - check the page 0x83 id, if OK allocate and fill - * serial number. - **/ --static int check_fill_0x83_id(struct sysfs_device *dev_scsi, -+static int check_fill_0x83_id(struct scsi_id_device *dev_scsi, - unsigned char *page_83, - const struct scsi_id_search_values - *id_search, char *serial, char *serial_short, int max_len) -@@ -521,7 +504,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi, - } - - /* Extract the raw binary from VPD 0x83 pre-SPC devices */ --static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, -+static int check_fill_0x83_prespc3(struct scsi_id_device *dev_scsi, - unsigned char *page_83, - const struct scsi_id_search_values - *id_search, char *serial, char *serial_short, int max_len) -@@ -543,7 +526,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi, - - - /* Get device identification VPD page */ --static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page83_inquiry(struct scsi_id_device *dev_scsi, int fd, - char *serial, char *serial_short, int len) - { - int retval; -@@ -633,7 +616,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd, - * Return the hard coded error code value 2 if the page 83 reply is not - * conformant to the SCSI-2 format. - */ --static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page83_prespc3_inquiry(struct scsi_id_device *dev_scsi, int fd, - char *serial, char *serial_short, int len) - { - int retval; -@@ -695,7 +678,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd, - } - - /* Get unit serial number VPD page */ --static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, -+static int do_scsi_page80_inquiry(struct scsi_id_device *dev_scsi, int fd, - char *serial, char *serial_short, int max_len) - { - int retval; -@@ -736,30 +719,38 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd, - return 0; - } - --int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, -- char *vendor, char *model, char *rev, char *type) -+int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) - { - int retval; - int fd; - unsigned char buf[SCSI_INQ_BUFF_LEN]; -+ struct stat statbuf; - - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -- info("%s: cannot open %s: %s\n", -- dev_scsi->kernel, devname, strerror(errno)); -+ info("scsi_id: cannot open %s: %s\n", -+ devname, strerror(errno)); - return 1; - } - -+ if (fstat(fd, &statbuf) < 0) { -+ info("scsi_id: cannot stat %s: %s\n", -+ devname, strerror(errno)); -+ return 2; -+ } -+ sprintf(dev_scsi->kernel,"%d:%d", major(statbuf.st_rdev), -+ minor(statbuf.st_rdev)); -+ - memset(buf, 0, SCSI_INQ_BUFF_LEN); - retval = scsi_inquiry(dev_scsi, fd, 0, 0, buf, SCSI_INQ_BUFF_LEN); - if (retval < 0) - return retval; - -- memcpy(vendor, buf + 8, 8); -- memcpy(model, buf + 16, 16); -- memcpy(rev, buf + 32, 4); -- sprintf(type,"%x", buf[0] & 0x1f); -+ memcpy(dev_scsi->vendor, buf + 8, 8); -+ memcpy(dev_scsi->model, buf + 16, 16); -+ memcpy(dev_scsi->revision, buf + 32, 4); -+ sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); - - if (close(fd) < 0) - info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); -@@ -767,15 +758,15 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname, - return 0; - } - --int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, -- int page_code, char *serial, char *serial_short, int len) -+int scsi_get_serial (struct scsi_id_device *dev_scsi, const char *devname, -+ int page_code, char *serial_short, int len) - { - unsigned char page0[SCSI_INQ_BUFF_LEN]; - int fd; - int ind; - int retval; - -- memset(serial, 0, len); -+ memset(dev_scsi->serial, 0, len); - dbg("opening %s\n", devname); - fd = open(devname, O_RDONLY | O_NONBLOCK); - if (fd < 0) { -@@ -785,7 +776,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - } - - if (page_code == PAGE_80) { -- if (do_scsi_page80_inquiry(dev_scsi, fd, serial, serial_short, len)) { -+ if (do_scsi_page80_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { - retval = 1; - goto completed; - } else { -@@ -793,7 +784,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - goto completed; - } - } else if (page_code == PAGE_83) { -- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { -+ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { - retval = 1; - goto completed; - } else { -@@ -801,7 +792,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - goto completed; - } - } else if (page_code == PAGE_83_PRE_SPC3) { -- retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, serial, serial_short, len); -+ retval = do_scsi_page83_prespc3_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len); - if (retval) { - /* - * Fallback to servicing a SPC-2/3 compliant page 83 -@@ -809,7 +800,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - * conform to pre-SPC3 expectations. - */ - if (retval == 2) { -- if (do_scsi_page83_inquiry(dev_scsi, fd, serial, serial_short, len)) { -+ if (do_scsi_page83_inquiry(dev_scsi, fd, dev_scsi->serial, serial_short, len)) { - retval = 1; - goto completed; - } else { -@@ -849,7 +840,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - for (ind = 4; ind <= page0[3] + 3; ind++) - if (page0[ind] == PAGE_83) - if (!do_scsi_page83_inquiry(dev_scsi, fd, -- serial, serial_short, len)) { -+ dev_scsi->serial, serial_short, len)) { - /* - * Success - */ -@@ -860,7 +851,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname, - for (ind = 4; ind <= page0[3] + 3; ind++) - if (page0[ind] == PAGE_80) - if (!do_scsi_page80_inquiry(dev_scsi, fd, -- serial, serial_short, len)) { -+ dev_scsi->serial, serial_short, len)) { - /* - * Success - */ --- -1.5.4.5 - diff --git a/0005-scsi_id-add-SGv4-support.patch b/0005-scsi_id-add-SGv4-support.patch deleted file mode 100644 index 3cd03a4..0000000 --- a/0005-scsi_id-add-SGv4-support.patch +++ /dev/null @@ -1,235 +0,0 @@ -From 78d9ecfd4f1e37f7453e55e71f2909a58706ae10 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 14 May 2008 13:55:49 +0200 -Subject: [PATCH] scsi_id: add SGv4 support - -Fall back to SGv3, if SGv3 returns a failure/is not available. ---- - extras/scsi_id/Makefile | 4 +- - extras/scsi_id/scsi_id.c | 2 + - extras/scsi_id/scsi_id.h | 1 + - extras/scsi_id/scsi_serial.c | 103 ++++++++++++++++++++++++++++++++---------- - 4 files changed, 84 insertions(+), 26 deletions(-) - -diff --git a/extras/scsi_id/Makefile b/extras/scsi_id/Makefile -index 870296a..ca067d0 100644 ---- a/extras/scsi_id/Makefile -+++ b/extras/scsi_id/Makefile -@@ -6,11 +6,11 @@ - # Released under the GNU General Public License, version 2. - # - --SCSI_ID_VERSION = 0.9 -+SCSI_ID_VERSION = 2.0 - - PROG = scsi_id - OBJS= scsi_serial.o --HEADERS = scsi_id.h scsi.h scsi_id_version.h -+HEADERS = scsi_id.h scsi.h scsi_id_version.h bsg.h - GEN_HEADERS = scsi_id_version.h - MAN_PAGES = scsi_id.8 - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 4f0233e..0f09f29 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -543,6 +543,8 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) - { - int retval; - -+ dev_scsi->use_sg = 4; -+ - retval = scsi_std_inquiry(dev_scsi, path); - if (retval) - return retval; -diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h -index 3b3a000..680c39d 100644 ---- a/extras/scsi_id/scsi_id.h -+++ b/extras/scsi_id/scsi_id.h -@@ -37,6 +37,7 @@ struct scsi_id_device { - char type[33]; - char kernel[64]; - char serial[MAX_SERIAL_LEN]; -+ int use_sg; - }; - - extern int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname); -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 32bb0f4..202ffc0 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -22,7 +22,12 @@ - #include - #include - #include -+#include -+#include - #include -+#include -+/* #include */ -+#include "bsg.h" - - #include "../../udev.h" - #include "scsi.h" -@@ -94,10 +99,7 @@ static int sg_err_category_new(int scsi_status, int msg_status, int - * XXX change to return only two values - failed or OK. - */ - -- /* -- * checks msg_status -- */ -- if (!scsi_status && !msg_status && !host_status && !driver_status) -+ if (!scsi_status && !host_status && !driver_status) - return SG_ERR_CAT_CLEAN; - - if ((scsi_status == SCSI_CHECK_CONDITION) || -@@ -148,11 +150,18 @@ static int sg_err_category3(struct sg_io_hdr *hp) - hp->sbp, hp->sb_len_wr); - } - --static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) -+static int sg_err_category4(struct sg_io_v4 *hp) -+{ -+ return sg_err_category_new(hp->device_status, 0, -+ hp->transport_status, hp->driver_status, -+ (unsigned char *)hp->response, -+ hp->response_len); -+} -+ -+static int scsi_dump_sense(struct scsi_id_device *dev_scsi, -+ unsigned char *sense_buffer, int sb_len) - { -- unsigned char *sense_buffer; - int s; -- int sb_len; - int code; - int sense_class; - int sense_key; -@@ -177,13 +186,11 @@ static int scsi_dump_sense(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io - - dbg("got check condition\n"); - -- sb_len = io->sb_len_wr; - if (sb_len < 1) { - info("%s: sense buffer empty\n", dev_scsi->kernel); - return -1; - } - -- sense_buffer = io->sbp; - sense_class = (sense_buffer[0] >> 4) & 0x07; - code = sense_buffer[0] & 0xf; - -@@ -268,7 +275,28 @@ static int scsi_dump(struct scsi_id_device *dev_scsi, struct sg_io_hdr *io) - info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n", - dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status); - if (io->status == SCSI_CHECK_CONDITION) -- return scsi_dump_sense(dev_scsi, io); -+ return scsi_dump_sense(dev_scsi, io->sbp, io->sb_len_wr); -+ else -+ return -1; -+} -+ -+static int scsi_dump_v4(struct scsi_id_device *dev_scsi, struct sg_io_v4 *io) -+{ -+ if (!io->device_status && !io->transport_status && -+ !io->driver_status) { -+ /* -+ * Impossible, should not be called. -+ */ -+ info("%s: called with no error\n", __FUNCTION__); -+ return -1; -+ } -+ -+ info("%s: sg_io failed status 0x%x 0x%x 0x%x\n", -+ dev_scsi->kernel, io->driver_status, io->transport_status, -+ io->device_status); -+ if (io->device_status == SCSI_CHECK_CONDITION) -+ return scsi_dump_sense(dev_scsi, (unsigned char *)io->response, -+ io->response_len); - else - return -1; - } -@@ -281,6 +309,8 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, - { INQUIRY_CMD, evpd, page, 0, buflen, 0 }; - unsigned char sense[SENSE_BUFF_LEN]; - struct sg_io_hdr io_hdr; -+ struct sg_io_v4 io_v4; -+ void *io_buf; - int retval; - int retry = 3; /* rather random */ - -@@ -292,24 +322,46 @@ static int scsi_inquiry(struct scsi_id_device *dev_scsi, int fd, - resend: - dbg("%s evpd %d, page 0x%x\n", dev_scsi->kernel, evpd, page); - -- memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); -- io_hdr.interface_id = 'S'; -- io_hdr.cmd_len = sizeof(inq_cmd); -- io_hdr.mx_sb_len = sizeof(sense); -- io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; -- io_hdr.dxfer_len = buflen; -- io_hdr.dxferp = buf; -- io_hdr.cmdp = inq_cmd; -- io_hdr.sbp = sense; -- io_hdr.timeout = DEF_TIMEOUT; -- -- if (ioctl(fd, SG_IO, &io_hdr) < 0) { -+ if (dev_scsi->use_sg == 4) { -+ memset(&io_v4, 0, sizeof(struct sg_io_v4)); -+ io_v4.guard = 'Q'; -+ io_v4.protocol = BSG_PROTOCOL_SCSI; -+ io_v4.subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD; -+ io_v4.request_len = sizeof(inq_cmd); -+ io_v4.request = (uintptr_t)inq_cmd; -+ io_v4.max_response_len = sizeof(sense); -+ io_v4.response = (uintptr_t)sense; -+ io_v4.din_xfer_len = buflen; -+ io_v4.din_xferp = (uintptr_t)buf; -+ io_buf = (void *)&io_v4; -+ } else { -+ memset(&io_hdr, 0, sizeof(struct sg_io_hdr)); -+ io_hdr.interface_id = 'S'; -+ io_hdr.cmd_len = sizeof(inq_cmd); -+ io_hdr.mx_sb_len = sizeof(sense); -+ io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; -+ io_hdr.dxfer_len = buflen; -+ io_hdr.dxferp = buf; -+ io_hdr.cmdp = inq_cmd; -+ io_hdr.sbp = sense; -+ io_hdr.timeout = DEF_TIMEOUT; -+ io_buf = (void *)&io_hdr; -+ } -+ -+ if (ioctl(fd, SG_IO, io_buf) < 0) { -+ if (errno == EINVAL && dev_scsi->use_sg == 4) { -+ dev_scsi->use_sg = 3; -+ goto resend; -+ } - info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno)); - retval = -1; - goto error; - } - -- retval = sg_err_category3(&io_hdr); -+ if (dev_scsi->use_sg == 4) -+ retval = sg_err_category4(io_buf); -+ else -+ retval = sg_err_category3(io_buf); - - switch (retval) { - case SG_ERR_CAT_NOTSUPPORTED: -@@ -321,7 +373,10 @@ resend: - break; - - default: -- retval = scsi_dump(dev_scsi, &io_hdr); -+ if (dev_scsi->use_sg == 4) -+ retval = scsi_dump_v4(dev_scsi, io_buf); -+ else -+ retval = scsi_dump(dev_scsi, io_buf); - } - - if (!retval) { --- -1.5.4.5 - diff --git a/0006-scsi_id-update-man-page.patch b/0006-scsi_id-update-man-page.patch deleted file mode 100644 index 324fa27..0000000 --- a/0006-scsi_id-update-man-page.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 138cf75e4eda54ab519c0d77ad3ca4b467dfe7ec Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 13:59:11 +0200 -Subject: [PATCH] scsi_id: update man page - ---- - extras/scsi_id/scsi_id.8 | 24 +----------------------- - 1 files changed, 1 insertions(+), 23 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.8 b/extras/scsi_id/scsi_id.8 -index aa429a5..725b7d5 100644 ---- a/extras/scsi_id/scsi_id.8 -+++ b/extras/scsi_id/scsi_id.8 -@@ -52,25 +52,12 @@ identifier starts with the NAA value of 6): - - .SH OPTIONS - .TP --.BI \-\-fallback-to-sysfs --Always print information (model, vendor strings) about the device even --if it does not support VPD pages. --.TP --.BI \-\-ignore-sysfs --Ignore sysfs entries. Used for devices which are not represented as SCSI --devices, but understand SG_IO commands. --.TP - .BI \-\-blacklisted - The default behaviour \- treat the device as black listed, and do nothing - unless a white listed device is found in the scsi_id config\-file. - .TP - .BI \-\-device=\| device\^ --Instead --of determining and creating a device node based on a sysfs dev --entry as done for the \fB\-s\fP, send SG_IO commands to --\fBdevice\fP, such as \fB/dev/sdc\fP. --This argument should also be used when invoked via udev to avoid problems --with creation of temporary files on not-yet writable directories. -+Send SG_IO commands to \fBdevice\fP, such as \fB/dev/sdc\fP. - .TP - .BI \-\-config=\| config\-file - Read configuration and black/white list entries from -@@ -85,10 +72,6 @@ on the command line or in the scsi_id configuration file for - .B scsi_id - to generate any output. - .TP --.BI \-\-prefix-bus-id --Prefix the identification string with the driver model (sysfs) bus id of --the SCSI device. --.TP - .BI \-\-page=\| 0x80 | 0x83 | pre-spc3-83 - Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83. - .sp -@@ -102,11 +85,6 @@ option is used for older model 4, 5, and 6 EMC Symmetrix devices, its - use with SPC-2 or SPC-3 compliant devices will fallback to the page 83 - format supported by these devices. - .TP --.BI \-\-devpath=\| sysfs\-devpath --Generate an id for the --.B sysfs\-devpath. --The sysfs mount point must not be included. --.TP - .BI \-\-replace-whitespace - Reformat the output : replace all whitespaces by underscores. - .TP --- -1.5.4.5 - diff --git a/0007-scsi_id-remove-bus_id-option.patch b/0007-scsi_id-remove-bus_id-option.patch deleted file mode 100644 index bcb5b82..0000000 --- a/0007-scsi_id-remove-bus_id-option.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 2d05764a77078953849a1f84ac269c927904ca23 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 13:59:25 +0200 -Subject: [PATCH] scsi_id: remove bus_id option - ---- - extras/scsi_id/scsi_id.c | 7 ------- - 1 files changed, 0 insertions(+), 7 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 0f09f29..6194b71 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -37,7 +37,6 @@ static const struct option options[] = { - { "page", 1, NULL, 'p' }, - { "blacklisted", 0, NULL, 'b' }, - { "whitelisted", 0, NULL, 'g' }, -- { "prefix-bus-id", 0, NULL, 'i' }, - { "replace-whitespace", 0, NULL, 'u' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, -@@ -52,7 +51,6 @@ static const char dev_short_options[] = "bgp:"; - static int all_good; - static int dev_specified; - static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; --static int display_bus_id; - static enum page_code default_page_code; - static int use_stderr; - static int debug; -@@ -426,7 +424,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" - " --blacklisted threat device as blacklisted\n" - " --whitelisted threat device as whitelisted\n" -- " --prefix-bus-id prefix SCSI bus id\n" - " --replace-whitespace replace all whitespaces by underscores\n" - " --verbose verbose logging\n" - " --version print version\n" -@@ -434,10 +431,6 @@ static int set_options(int argc, char **argv, const char *short_opts, - " --help print this help text\n\n"); - exit(0); - -- case 'i': -- display_bus_id = 1; -- break; -- - case 'p': - if (strcmp(optarg, "0x80") == 0) { - default_page_code = PAGE_80; --- -1.5.4.5 - diff --git a/0008-scsi_id-add-sg-version-option.patch b/0008-scsi_id-add-sg-version-option.patch deleted file mode 100644 index 9cd1819..0000000 --- a/0008-scsi_id-add-sg-version-option.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 025570aa3e054d92d65f8d2de9f91d202f60c798 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 15:02:17 +0200 -Subject: [PATCH] scsi_id: add --sg-version= option - ---- - extras/scsi_id/scsi_id.c | 53 +++++++++++++++++++++++++---------------- - extras/scsi_id/scsi_serial.c | 6 +++- - 2 files changed, 36 insertions(+), 23 deletions(-) - -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index 6194b71..5eb95e8 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -38,6 +38,7 @@ static const struct option options[] = { - { "blacklisted", 0, NULL, 'b' }, - { "whitelisted", 0, NULL, 'g' }, - { "replace-whitespace", 0, NULL, 'u' }, -+ { "sg-version", 1, NULL, 's' }, - { "verbose", 0, NULL, 'v' }, - { "version", 0, NULL, 'V' }, - { "export", 0, NULL, 'x' }, -@@ -52,6 +53,7 @@ static int all_good; - static int dev_specified; - static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE; - static enum page_code default_page_code; -+static int sg_version = 4; - static int use_stderr; - static int debug; - static int reformat_serial; -@@ -257,7 +259,7 @@ static int get_file_options(const char *vendor, const char *model, - break; - lineno++; - if (buf[strlen(buffer) - 1] != '\n') { -- info("Config file line %d too long\n", lineno); -+ err("Config file line %d too long\n", lineno); - break; - } - -@@ -309,7 +311,7 @@ static int get_file_options(const char *vendor, const char *model, - * Only allow: [vendor=foo[,model=bar]]options=stuff - */ - if (!options_in || (!vendor_in && model_in)) { -- info("Error parsing config file line %d '%s'\n", lineno, buffer); -+ err("Error parsing config file line %d '%s'\n", lineno, buffer); - retval = -1; - break; - } -@@ -419,16 +421,17 @@ static int set_options(int argc, char **argv, const char *short_opts, - - case 'h': - printf("Usage: scsi_id OPTIONS \n" -- " --device device node for SG_IO commands\n" -- " --config location of config file\n" -- " --page SCSI page (0x80, 0x83, pre-spc3-83)\n" -- " --blacklisted threat device as blacklisted\n" -- " --whitelisted threat device as whitelisted\n" -- " --replace-whitespace replace all whitespaces by underscores\n" -- " --verbose verbose logging\n" -- " --version print version\n" -- " --export print values as environment keys\n" -- " --help print this help text\n\n"); -+ " --device= device node for SG_IO commands\n" -+ " --config= location of config file\n" -+ " --page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n" -+ " --sg-version=3|4 use SGv3 or SGv4\n" -+ " --blacklisted threat device as blacklisted\n" -+ " --whitelisted threat device as whitelisted\n" -+ " --replace-whitespace replace all whitespaces by underscores\n" -+ " --verbose verbose logging\n" -+ " --version print version\n" -+ " --export print values as environment keys\n" -+ " --help print this help text\n\n"); - exit(0); - - case 'p': -@@ -439,7 +442,15 @@ static int set_options(int argc, char **argv, const char *short_opts, - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - default_page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'\n", optarg); -+ err("Unknown page code '%s'\n", optarg); -+ return -1; -+ } -+ break; -+ -+ case 's': -+ sg_version = atoi(optarg); -+ if (sg_version < 3 || sg_version > 4) { -+ err("Unknown SG version '%s'\n", optarg); - return -1; - } - break; -@@ -513,13 +524,13 @@ static int per_dev_options(struct scsi_id_device *dev_scsi, int *good_bad, int * - } else if (strcmp(optarg, "pre-spc3-83") == 0) { - *page_code = PAGE_83_PRE_SPC3; - } else { -- info("Unknown page code '%s'\n", optarg); -+ err("Unknown page code '%s'\n", optarg); - retval = -1; - } - break; - - default: -- info("Unknown or bad option '%c' (0x%x)\n", option, option); -+ err("Unknown or bad option '%c' (0x%x)\n", option, option); - retval = -1; - break; - } -@@ -536,16 +547,16 @@ static int set_inq_values(struct scsi_id_device *dev_scsi, const char *path) - { - int retval; - -- dev_scsi->use_sg = 4; -+ dev_scsi->use_sg = sg_version; - - retval = scsi_std_inquiry(dev_scsi, path); - if (retval) - return retval; - -- set_str(vendor_str, dev_scsi->vendor, 8); -- set_str(model_str, dev_scsi->model, 16); -- set_type(type_str, dev_scsi->type, sizeof(type_str) - 1); -- set_str(revision_str, dev_scsi->revision, sizeof(revision_str) -1); -+ set_str(vendor_str, dev_scsi->vendor, sizeof(vendor_str)); -+ set_str(model_str, dev_scsi->model, sizeof(model_str)); -+ set_type(type_str, dev_scsi->type, sizeof(type_str)); -+ set_str(revision_str, dev_scsi->revision, sizeof(revision_str)); - - return 0; - } -@@ -662,7 +673,7 @@ int main(int argc, char **argv) - exit(1); - - if (!dev_specified) { -- info("no device specified\n"); -+ err("no device specified\n"); - retval = 1; - goto exit; - } -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 202ffc0..c5cacfa 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -803,12 +803,14 @@ int scsi_std_inquiry(struct scsi_id_device *dev_scsi, const char *devname) - return retval; - - memcpy(dev_scsi->vendor, buf + 8, 8); -+ dev_scsi->vendor[8] = '\0'; - memcpy(dev_scsi->model, buf + 16, 16); -+ dev_scsi->model[16] = '\0'; - memcpy(dev_scsi->revision, buf + 32, 4); -+ dev_scsi->revision[4] = '\0'; - sprintf(dev_scsi->type,"%x", buf[0] & 0x1f); - -- if (close(fd) < 0) -- info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno)); -+ close(fd); - - return 0; - } --- -1.5.4.5 - diff --git a/0009-rules-adapt-to-new-scsi_id.patch b/0009-rules-adapt-to-new-scsi_id.patch deleted file mode 100644 index 5c62fd8..0000000 --- a/0009-rules-adapt-to-new-scsi_id.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3d2aed9e869dc8abadb6f7919dcf9e35837d6181 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 15:14:23 +0200 -Subject: [PATCH] rules: adapt to new scsi_id - ---- - etc/udev/rules.d/60-persistent-storage.rules | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules -index 85a9270..b7c4337 100644 ---- a/etc/udev/rules.d/60-persistent-storage.rules -+++ b/etc/udev/rules.d/60-persistent-storage.rules -@@ -33,8 +33,8 @@ KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL - - 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*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" -+KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -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" - --- -1.5.4.5 - diff --git a/0010-rules-adapt-tape-rules-to-new-scsi_id.patch b/0010-rules-adapt-tape-rules-to-new-scsi_id.patch deleted file mode 100644 index 9c06d15..0000000 --- a/0010-rules-adapt-tape-rules-to-new-scsi_id.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 788096cb59a7ad1cdd08ccc59e5e3b1d2f4828c2 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 14 May 2008 15:17:35 +0200 -Subject: [PATCH] rules: adapt tape rules to new scsi_id - ---- - etc/udev/rules.d/60-persistent-storage-tape.rules | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/udev/rules.d/60-persistent-storage-tape.rules b/etc/udev/rules.d/60-persistent-storage-tape.rules -index e56d57a..45cac93 100644 ---- a/etc/udev/rules.d/60-persistent-storage-tape.rules -+++ b/etc/udev/rules.d/60-persistent-storage-tape.rules -@@ -5,14 +5,14 @@ - ACTION!="add|change", GOTO="persistent_storage_tape_end" - - # 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=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" - - SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" - - 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]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" -+KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" - KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" - --- -1.5.4.5 - diff --git a/0011-cdrom_id-fix-segfault.patch b/0011-cdrom_id-fix-segfault.patch deleted file mode 100644 index 0d4aa23..0000000 --- a/0011-cdrom_id-fix-segfault.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 4cd71da5603898cff68a31774be570750d7fd659 Mon Sep 17 00:00:00 2001 -From: Matthias Schwarzott -Date: Wed, 14 May 2008 16:03:49 +0200 -Subject: [PATCH] cdrom_id: fix segfault - ---- - extras/cdrom_id/cdrom_id.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0e0a463..e0cbe9e 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -469,6 +469,8 @@ static int cd_media_toc(int fd) - info("READ TOC: len: %d\n", len); - if (len > sizeof(toc)) - return -1; -+ if (len < 8) -+ return -1; - - /* check if we have a data track */ - info("ctl %02x (0x04 is data/audio)\n", header[5]); --- -1.5.4.5 - diff --git a/sources b/sources index 7e17e38..8492b2a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -abd3833ba457cdc0cb5163a8bb7ca5d9 udev-121.tar.bz2 +4da0471c0ca3a2a2a77692f67120c03d udev-124.tar.bz2 diff --git a/start_udev b/start_udev index 2d6f957..5e35856 100755 --- a/start_udev +++ b/start_udev @@ -102,8 +102,6 @@ make_extra_nodes () { if [ -x "$MAKEDEV" ]; then - $MAKEDEV -x /dev/null - /sbin/restorecon -R /dev for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things @@ -194,7 +192,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun mount --move $udev_root/shm "$SHMDIR" fi mount -n -o mode=0755 -t tmpfs none "$udev_root" - /sbin/restorecon /dev mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then @@ -243,30 +240,30 @@ if [ -f "/sys/class/tty/console/uevent" ]; then udevtimeout=$(getval udevtimeout $cmdline) if strstr "$cmdline" udevdebug; then - /sbin/udevcontrol log_priority=debug + /sbin/udevadm control log_priority=debug fi if strstr "$cmdline" udevinfo; then - /sbin/udevcontrol log_priority=info + /sbin/udevadm control log_priority=info fi if strstr "$cmdline" udevtrace; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi if strstr "$cmdline" udevchilds; then - /sbin/udevcontrol max_childs_running=$(getval udevchilds $cmdline) + /sbin/udevadm control max_childs_running=$(getval udevchilds $cmdline) fi if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then - /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 fi if strstr "$cmdline" udevnopersist; then - /sbin/udevcontrol env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 fi - /sbin/udevcontrol env STARTUP=1 + /sbin/udevadm control env STARTUP=1 if strstr "$cmdline" modprobedebug; then - /sbin/udevcontrol env MODPROBE_OPTIONS="-s -v -q" + /sbin/udevadm control env MODPROBE_OPTIONS="-s -v -q" echo findalias /sys | while read modules ; do if [ -n "$modules" ]; then @@ -277,12 +274,12 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo "Triggering Rest" fi - /sbin/udevtrigger + /sbin/udevadm trigger ret=$[$ret + $?] wait_for_queue $udevtimeout ret=$[$ret + $?] wait - /sbin/udevcontrol env STARTUP= + /sbin/udevadm control env STARTUP= else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev-089.tar.bz2.sign b/udev-089.tar.bz2.sign deleted file mode 100644 index 5bd8278..0000000 --- a/udev-089.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2.2 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBEMVclyGugalF9Dw4RAkuzAJ9u9BKZ86Pv/KLYSK5bJyhXACMCEACdFEjl -e0bVNMtNCImQEiK8abUsIQw= -=Gyt7 ------END PGP SIGNATURE----- diff --git a/udev-116-rhrules.patch b/udev-116-rhrules.patch deleted file mode 100644 index 0de3545..0000000 --- a/udev-116-rhrules.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up udev-118/etc/udev/redhat/40-redhat.rules.rhrules udev-118/etc/udev/redhat/40-redhat.rules ---- udev-118/etc/udev/redhat/40-redhat.rules.rhrules 2007-12-19 00:50:56.000000000 +0100 -+++ udev-118/etc/udev/redhat/40-redhat.rules 2008-02-20 12:19:07.000000000 +0100 -@@ -5,12 +5,10 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="flopp - - KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" - --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", SYMLINK+="scanner scanner-%k", MODE="0660" -+ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" - - ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" - --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" -- - BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" - - KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" diff --git a/udev-118-slink-selinux.patch b/udev-118-slink-selinux.patch deleted file mode 100644 index f70d027..0000000 --- a/udev-118-slink-selinux.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up udev-120/udev_node.c.slink udev-120/udev_node.c ---- udev-120/udev_node.c.slink 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/udev_node.c 2008-04-04 14:15:33.000000000 +0200 -@@ -146,7 +146,7 @@ static int node_symlink(const char *node - buf[len] = '\0'; - if (strcmp(target, buf) == 0) { - info("preserve already existing symlink '%s' to '%s'", slink, target); -- selinux_setfilecon(slink, NULL, S_IFLNK); -+ /*selinux_setfilecon(slink, NULL, S_IFLNK);*/ - goto exit; - } - } diff --git a/udev-118-varlib.patch b/udev-118-varlib.patch deleted file mode 100644 index a7a0baa..0000000 --- a/udev-118-varlib.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up udev-118/extras/rule_generator/write_net_rules.varlib udev-118/extras/rule_generator/write_net_rules ---- udev-118/extras/rule_generator/write_net_rules.varlib 2008-03-13 14:28:23.000000000 +0100 -+++ udev-118/extras/rule_generator/write_net_rules 2008-03-13 14:32:10.000000000 +0100 -@@ -21,7 +21,7 @@ - # 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' -+RULES_FILE='/dev/.udev/rules.d/70-persistent-net.rules' - - if [ "$MATCHIFTYPE" ]; then - [ $[MATCHIFTYPE] -gt 256 ] && return 0 -diff -up udev-118/extras/rule_generator/write_cd_rules.varlib udev-118/extras/rule_generator/write_cd_rules ---- udev-118/extras/rule_generator/write_cd_rules.varlib 2008-03-13 14:28:16.000000000 +0100 -+++ udev-118/extras/rule_generator/write_cd_rules 2008-03-13 14:32:23.000000000 +0100 -@@ -11,7 +11,7 @@ - # under the terms of the GNU General Public License as published by the - # Free Software Foundation version 2 of the License. - --RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules" -+RULES_FILE="/dev/.udev/rules.d/70-persistent-cd.rules" - - . /lib/udev/rule_generator.functions - -diff -up udev-118/extras/rule_generator/rule_generator.functions.varlib udev-118/extras/rule_generator/rule_generator.functions diff --git a/udev-121-bsg.patch b/udev-121-bsg.patch deleted file mode 100644 index cdd1578..0000000 --- a/udev-121-bsg.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up udev-121/extras/scsi_id/bsg.h.bsg udev-121/extras/scsi_id/bsg.h ---- udev-121/extras/scsi_id/bsg.h.bsg 2008-05-16 12:04:38.000000000 +0200 -+++ udev-121/extras/scsi_id/bsg.h 2008-05-16 12:04:28.000000000 +0200 -@@ -0,0 +1,78 @@ -+#ifndef BSG_H -+#define BSG_H -+ -+#define BSG_PROTOCOL_SCSI 0 -+ -+#define BSG_SUB_PROTOCOL_SCSI_CMD 0 -+#define BSG_SUB_PROTOCOL_SCSI_TMF 1 -+#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 -+ -+struct sg_io_v4 { -+ __s32 guard; /* [i] 'Q' to differentiate from v3 */ -+ __u32 protocol; /* [i] 0 -> SCSI , .... */ -+ __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task -+ management function, .... */ -+ -+ __u32 request_len; /* [i] in bytes */ -+ __u64 request; /* [i], [*i] {SCSI: cdb} */ -+ __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ -+ __u32 request_attr; /* [i] {SCSI: task attribute} */ -+ __u32 request_priority; /* [i] {SCSI: task priority} */ -+ __u32 request_extra; /* [i] {spare, for padding} */ -+ __u32 max_response_len; /* [i] in bytes */ -+ __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ -+ -+ /* "dout_": data out (to device); "din_": data in (from device) */ -+ __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else -+ dout_xfer points to array of iovec */ -+ __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ -+ __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */ -+ __u32 din_xfer_len; /* [i] bytes to be transferred from device */ -+ __u64 dout_xferp; /* [i], [*i] */ -+ __u64 din_xferp; /* [i], [*o] */ -+ -+ __u32 timeout; /* [i] units: millisecond */ -+ __u32 flags; /* [i] bit mask */ -+ __u64 usr_ptr; /* [i->o] unused internally */ -+ __u32 spare_in; /* [i] */ -+ -+ __u32 driver_status; /* [o] 0 -> ok */ -+ __u32 transport_status; /* [o] 0 -> ok */ -+ __u32 device_status; /* [o] {SCSI: command completion status} */ -+ __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ -+ __u32 info; /* [o] additional information */ -+ __u32 duration; /* [o] time to complete, in milliseconds */ -+ __u32 response_len; /* [o] bytes of response actually written */ -+ __s32 din_resid; /* [o] din_xfer_len - actual_din_xfer_len */ -+ __s32 dout_resid; /* [o] dout_xfer_len - actual_dout_xfer_len */ -+ __u64 generated_tag; /* [o] {SCSI: transport generated task tag} */ -+ __u32 spare_out; /* [o] */ -+ -+ __u32 padding; -+}; -+ -+#ifdef __KERNEL__ -+ -+#if defined(CONFIG_BLK_DEV_BSG) -+struct bsg_class_device { -+ struct class_device *class_dev; -+ struct device *dev; -+ int minor; -+ struct request_queue *queue; -+}; -+ -+extern int bsg_register_queue(struct request_queue *, struct device *, const char *); -+extern void bsg_unregister_queue(struct request_queue *); -+#else -+static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name) -+{ -+ return 0; -+} -+static inline void bsg_unregister_queue(struct request_queue *rq) -+{ -+} -+#endif -+ -+#endif /* __KERNEL__ */ -+ -+#endif diff --git a/udev-124.tar.bz2.sign b/udev-124.tar.bz2.sign new file mode 100644 index 0000000..d78a969 --- /dev/null +++ b/udev-124.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.7 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBIULWHyGugalF9Dw4RAioFAJ0fg9gLQjpgv4Y9cxjAHaKkaF7trQCfRGyd +lJrHWGmX0sbDgB8MZs/B6B0= +=Ci89 +-----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index f6aa0aa..c33be7a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 121 -Release: 2.20080516git%{?dist} +Version: 124 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,19 +19,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: 0001-volume_id-clean-up-linux_raid-code.patch -Patch2: 0002-man-udevd-fix-udev-8-reference.patch -Patch3: 0003-man-scsi_id.patch -Patch4: 0004-scsi_id-remove-all-sysfs-dependencies.patch -Patch5: 0005-scsi_id-add-SGv4-support.patch -Patch6: 0006-scsi_id-update-man-page.patch -Patch7: 0007-scsi_id-remove-bus_id-option.patch -Patch8: 0008-scsi_id-add-sg-version-option.patch -Patch9: 0009-rules-adapt-to-new-scsi_id.patch -Patch10: 0010-rules-adapt-tape-rules-to-new-scsi_id.patch -Patch11: 0011-cdrom_id-fix-segfault.patch -Patch12: udev-121-bsg.patch - Patch101: udev-116-nettype.patch Patch102: udev-118-sysconf.patch Patch103: udev-089-nopie.patch @@ -88,18 +75,6 @@ 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 .bsg %patch101 -p1 -b .nettype %patch102 -p1 -b .sysconf @@ -337,9 +312,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* -%attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevadm -%attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev @@ -423,15 +396,22 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Thu Jun 12 2008 Harald Hoyer 124-1 +- version 124 +- removed udevcontrol, udevtrigger symlinks (use udevadm now) + * Tue Jun 3 2008 Jeremy Katz - 121-2.20080516git - Add lost F9 change to remove /dev/.udev in start_udev (#442827) * Fri May 16 2008 Harald Hoyer 121-1.20080516git - version 121 + latest git fixes -* Thu Apr 24 2008 Harald Hoyer 120-6.20080421git +* Thu May 07 2008 Harald Hoyer 120-6.20080421git - added input/hp_ilo_mouse symlink +* Tue May 06 2008 Harald Hoyer 120-5.20080421git +- remove /dev/.udev in start_udev (bug #442827) + * Mon Apr 21 2008 Harald Hoyer 120-4.20080421git - added patches from git: - persistent device naming: also read unpartitioned media @@ -444,6 +424,7 @@ rm -rf $RPM_BUILD_ROOT - cdrom_id: replace with version which also exports media properties - vol_id: add --offset option - udevinfo: do not replace chars when printing ATTR== matches +- Resolves: rhbz#440568 * Fri Apr 11 2008 Harald Hoyer 120-3 - fixed pre/preun scriptlets (bug #441941) From 96f20ade11f572fb07b992a9c4ea596f9a5a8b0f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 Jun 2008 09:48:41 +0000 Subject: [PATCH 423/640] - readded udevcontrol, udevtrigger symlinks for Fedora 9, which are needed by live-cd-tools --- udev.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index c33be7a..8a10414 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 124 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -195,6 +195,11 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor +%if 0%{?fedora} <= 9 +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol +%endif + %if %{with_static} for i in extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ @@ -314,6 +319,10 @@ rm -rf $RPM_BUILD_ROOT %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle +%if 0%{?fedora} <= 9 +%attr(0755,root,root) /sbin/udevtrigger +%attr(0755,root,root) /sbin/udevcontrol +%endif %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id @@ -396,6 +405,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 17 2008 Harald Hoyer 124-1.1 +- readded udevcontrol, udevtrigger symlinks for Fedora 9, + which are needed by live-cd-tools + * Thu Jun 12 2008 Harald Hoyer 124-1 - version 124 - removed udevcontrol, udevtrigger symlinks (use udevadm now) From 9625547be1061c283a4c2b3876f21a37d88c159c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 Jun 2008 09:48:41 +0000 Subject: [PATCH 424/640] - readded udevcontrol, udevtrigger symlinks for Fedora 9, which are needed by live-cd-tools --- udev.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index c33be7a..8a10414 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 124 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -195,6 +195,11 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor +%if 0%{?fedora} <= 9 +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol +%endif + %if %{with_static} for i in extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ @@ -314,6 +319,10 @@ rm -rf $RPM_BUILD_ROOT %doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle +%if 0%{?fedora} <= 9 +%attr(0755,root,root) /sbin/udevtrigger +%attr(0755,root,root) /sbin/udevcontrol +%endif %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id @@ -396,6 +405,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Tue Jun 17 2008 Harald Hoyer 124-1.1 +- readded udevcontrol, udevtrigger symlinks for Fedora 9, + which are needed by live-cd-tools + * Thu Jun 12 2008 Harald Hoyer 124-1 - version 124 - removed udevcontrol, udevtrigger symlinks (use udevadm now) From acceb8edac2f1a78f7cf8b2f87b94ee6b864814b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Aug 2008 13:12:38 +0000 Subject: [PATCH 425/640] - version 126 - fixed udevadm syntax in start_udev (credits B.J.W. Polman) - removed some manually created devices from makedev (bug #457125) --- .cvsignore | 2 +- sources | 2 +- start_udev | 24 +++---- udev-089-nopie.patch | 21 ------ udev-091-lib64.patch | 71 ------------------- udev-116-nettype.patch | 14 ---- udev-118-sysconf.patch | 24 ------- udev-120-rhrules.patch | 10 --- udev.nodes | 13 ---- udev.spec | 155 +++++++++++------------------------------ 10 files changed, 55 insertions(+), 281 deletions(-) delete mode 100644 udev-089-nopie.patch delete mode 100644 udev-091-lib64.patch delete mode 100644 udev-116-nettype.patch delete mode 100644 udev-118-sysconf.patch delete mode 100644 udev-120-rhrules.patch diff --git a/.cvsignore b/.cvsignore index 2a71af6..a530be2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-124.tar.bz2 +udev-126.tar.bz2 diff --git a/sources b/sources index 8492b2a..b85ea0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4da0471c0ca3a2a2a77692f67120c03d udev-124.tar.bz2 +502964d8623b81b6565c727dd28024de udev-126.tar.bz2 diff --git a/start_udev b/start_udev index 5e35856..ef72536 100755 --- a/start_udev +++ b/start_udev @@ -234,36 +234,36 @@ 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 + if strstr "$cmdline" udevtrace; then + UDEV_OPTS="$UDEV_OPTS --debug-trace" + fi + /sbin/udevd -d $UDEV_OPTS ret=$[$ret + $?] udevtimeout=$(getval udevtimeout $cmdline) if strstr "$cmdline" udevdebug; then - /sbin/udevadm control log_priority=debug + /sbin/udevadm control --log_priority=debug fi if strstr "$cmdline" udevinfo; then - /sbin/udevadm control log_priority=info - fi - if strstr "$cmdline" udevtrace; then - UDEV_OPTS="$UDEV_OPTS --debug-trace" + /sbin/udevadm control --log_priority=info fi if strstr "$cmdline" udevchilds; then - /sbin/udevadm control max_childs_running=$(getval udevchilds $cmdline) + /sbin/udevadm control --max_childs_running=$(getval udevchilds $cmdline) fi if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then - /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 fi if strstr "$cmdline" udevnopersist; then - /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 fi - /sbin/udevadm control env STARTUP=1 + /sbin/udevadm control --env=STARTUP=1 if strstr "$cmdline" modprobedebug; then - /sbin/udevadm control env MODPROBE_OPTIONS="-s -v -q" + /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" echo findalias /sys | while read modules ; do if [ -n "$modules" ]; then @@ -279,7 +279,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then wait_for_queue $udevtimeout ret=$[$ret + $?] wait - /sbin/udevadm control env STARTUP= + /sbin/udevadm control --env=STARTUP= else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch deleted file mode 100644 index c2babda..0000000 --- a/udev-089-nopie.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up udev-120/extras/volume_id/lib/Makefile.nopie udev-120/extras/volume_id/lib/Makefile ---- udev-120/extras/volume_id/lib/Makefile.nopie 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:49:10.000000000 +0200 -@@ -72,7 +72,7 @@ all: libvolume_id.a $(SHLIB) libvolume_i - .shlib/%.o: %.c - $(E) " CC " $@ - $(Q) mkdir -p $(dir $@) -- $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ -+ $(Q) $(CC) $(subst -fpie,,$(subst -pie,,$(CFLAGS) )) -fPIC -c $< -o $@ - - libvolume_id.a: $(HEADERS) $(OBJS) - $(Q) rm -f $@ -@@ -83,7 +83,7 @@ libvolume_id.a: $(HEADERS) $(OBJS) - - $(SHLIB): $(HEADERS) exported_symbols $(addprefix .shlib/,$(OBJS)) - $(E) " CC " $@ -- $(Q) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ -+ $(Q) $(CC) -shared $(subst -static,,$(subst -pie,,$(LDFLAGS))) $(subst -fpie,,$(subst -pie,,$(CFLAGS))) -o $@ \ - -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ - $(addprefix .shlib/,$(OBJS)) - $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch deleted file mode 100644 index dcb8210..0000000 --- a/udev-091-lib64.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -up udev-120/extras/volume_id/lib/Makefile.lib64 udev-120/extras/volume_id/lib/Makefile ---- udev-120/extras/volume_id/lib/Makefile.lib64 2008-04-04 14:13:33.000000000 +0200 -+++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:15:05.000000000 +0200 -@@ -4,9 +4,9 @@ - # - # Released under the GNU General Public License, version 2. - # --includedir = ${prefix}/usr/include --libdir = ${prefix}/lib --usrlibdir = ${prefix}/usr/lib -+includedir ?= ${prefix}/usr/include -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib - - INSTALL = install -c - INSTALL_DATA = ${INSTALL} -m 644 -@@ -115,6 +115,7 @@ ifeq ($(libdir),$(usrlibdir)) - else - ln -sf $(libdir)/$(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so - endif -+ $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a - $(INSTALL) -d $(DESTDIR)$(usrlibdir)/pkgconfig - $(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc - .PHONY: install -diff -up udev-120/extras/volume_id/Makefile.lib64 udev-120/extras/volume_id/Makefile ---- udev-120/extras/volume_id/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/extras/volume_id/Makefile 2008-04-04 14:13:33.000000000 +0200 -@@ -17,6 +17,9 @@ usrsbindir = ${prefix}/usr/sbin - libudevdir = ${prefix}/lib/udev - mandir = ${prefix}/usr/share/man - configdir = ${etcdir}/udev/ -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib -+ - - INSTALL = install -c - INSTALL_PROGRAM = ${INSTALL} -@@ -34,7 +37,11 @@ all: lib $(PROG) $(MAN_PAGES) - $(Q) $(CC) -c $(CFLAGS) $< -o $@ - - lib: -- $(Q) $(MAKE) -C $@ -+ $(Q) $(MAKE) \ -+ libdir=$(libdir) \ -+ usrlibdir=$(usrlibdir) \ -+ -C lib -+# $(Q) $(MAKE) -C $@ - .PHONY: lib - - lib/libvolume_id.a: lib -diff -up udev-120/Makefile.lib64 udev-120/Makefile ---- udev-120/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/Makefile 2008-04-04 14:13:33.000000000 +0200 -@@ -91,6 +91,8 @@ usrbindir = ${prefix}/usr/bin - libudevdir = ${prefix}/lib/udev - mandir = ${prefix}/usr/share/man - configdir = ${etcdir}/udev -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib - udevdir = /dev - DESTDIR = - -@@ -161,6 +163,8 @@ all: $(PROGRAMS) $(MAN_PAGES) - RANLIB="$(RANLIB)" \ - LIB_OBJS="$(LIB_OBJS)" \ - LIBUDEV="$(PWD)/$(LIBUDEV)" \ -+ libdir=$(libdir) \ -+ usrlibdir=$(usrlibdir) \ - -C $$target $@ || exit 1; \ - done; - .PHONY: all diff --git a/udev-116-nettype.patch b/udev-116-nettype.patch deleted file mode 100644 index b68f236..0000000 --- a/udev-116-nettype.patch +++ /dev/null @@ -1,14 +0,0 @@ -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() { diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch deleted file mode 100644 index 272ca72..0000000 --- a/udev-118-sysconf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage.rules ---- udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/etc/udev/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 -@@ -3,6 +3,8 @@ - # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -diff -up udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules ---- udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 -@@ -2,6 +2,8 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" -+ - ACTION!="add|change", 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" diff --git a/udev-120-rhrules.patch b/udev-120-rhrules.patch deleted file mode 100644 index dab159f..0000000 --- a/udev-120-rhrules.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up udev-121/etc/udev/redhat/40-redhat.rules.rhrules udev-121/etc/udev/redhat/40-redhat.rules ---- udev-121/etc/udev/redhat/40-redhat.rules.rhrules 2008-05-09 09:22:23.000000000 +0200 -+++ udev-121/etc/udev/redhat/40-redhat.rules 2008-05-16 11:58:39.000000000 +0200 -@@ -23,3 +23,6 @@ KERNEL=="vcs[0-9]*", OWNER="vc - KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" - KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" - KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" -+ -+KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" -+ diff --git a/udev.nodes b/udev.nodes index f113f63..ec38d8b 100644 --- a/udev.nodes +++ b/udev.nodes @@ -1,10 +1,4 @@ # These device have to be created manually -tty1 -tty2 -tty3 -tty4 -tty5 -tty6 loop0 loop1 loop2 @@ -13,15 +7,8 @@ loop4 loop5 loop6 loop7 -parport0 -parport1 -parport2 -parport3 net/tun ppp -console -null -zero lp0 lp1 lp2 diff --git a/udev.spec b/udev.spec index 8a10414..3635aaf 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 124 -Release: 1%{?dist}.1 +Version: 126 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,12 +19,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch101: udev-116-nettype.patch Patch102: udev-118-sysconf.patch -Patch103: udev-089-nopie.patch -Patch104: udev-091-lib64.patch - -Patch200: udev-120-rhrules.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -75,108 +70,36 @@ which contains functions to get volume ids. %prep %setup -q - -%patch101 -p1 -b .nettype %patch102 -p1 -b .sysconf -%patch103 -p1 -b .nopie -%patch104 -p1 -b .lib64 - -%patch200 -p1 -b .rhrules %build - +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static %if %{with_static} -# Do not USE_LOG in udev.static, -# because it causes segfaults on openlog (bug 136005) -make OPTFLAGS="$RPM_OPT_FLAGS" \ - libdir="/%{_lib}" \ - usrlibdir="%{_libdir}" \ - USE_KLIBC=false \ - USE_SELINUX=true \ - USE_STATIC=true \ - V=true \ - STRIP="/bin/true" \ - udevdir="/dev" \ - USE_LOG=false DEBUG=%{debug} \ - VOLUME_ID_STATIC=true \ - EXTRAS=" \ - extras/scsi_id \ - extras/volume_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/cdrom_id \ - extras/floppy \ - " all - -for i in udevd \ - udevadm \ - extras/scsi_id/scsi_id \ - 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 - mv $i $i.static - touch $i +make LDFLAGS=-static %{?_smp_mflags} +for i in udev/udevd \ + udev/udevadm \ + extras/scsi_id/scsi_id \ + 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 + mv $i $i.static done - make clean -make E='@echo' Q='@' -C extras/volume_id/lib clean %endif +make %{?_smp_mflags} -%ifarch sparc64 -make OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ -%else -make OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ -%endif - USE_KLIBC=false \ - USE_SELINUX=true \ - udevdir="/dev" \ - USE_LOG=true \ - DEBUG=%{debug} \ - STRIP="/bin/true" \ - V=true \ - EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/path_id \ - extras/volume_id \ - extras/cdrom_id \ - extras/floppy \ - extras/rule_generator \ - extras/firmware \ - " all %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} -%ifarch sparc64 -make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie"\ -%else -make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ -%endif - libdir="/%{_lib}" \ - usrlibdir="%{_libdir}" \ - EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/path_id \ - extras/volume_id \ - extras/cdrom_id \ - extras/floppy \ - extras/rule_generator \ - extras/firmware \ - " install +make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev @@ -185,6 +108,7 @@ 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 +mkdir -p $RPM_BUILD_ROOT%{_bindir} # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id @@ -195,10 +119,9 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor -%if 0%{?fedora} <= 9 ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol -%endif %if %{with_static} for i in extras/scsi_id/scsi_id \ @@ -211,31 +134,29 @@ for i in extras/scsi_id/scsi_id \ install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static done -for i in udevd udevadm; do - install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$i.static +for i in udev/udevd udev/udevadm; do + install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$(basename $i).static done %endif for i in \ - etc/udev/redhat/*.rules \ + rules/redhat/*.rules \ %ifarch ia64 - etc/udev/packages/40-ia64.rules \ + rules/packages/40-ia64.rules \ %endif %ifarch ppc ppc64 - etc/udev/packages/40-ppc.rules \ + rules/packages/40-ppc.rules \ %endif %ifarch s390 s390x - etc/udev/packages/40-s390.rules \ + rules/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 \ + rules/packages/40-alsa.rules \ + rules/packages/64-md-raid.rules \ + rules/packages/64-device-mapper.rules \ ; do - install -m 0644 "$i" "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}" + install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/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} install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -243,7 +164,6 @@ 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 udevtrigger $RPM_BUILD_ROOT/sbin mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} @@ -316,13 +236,11 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* +%doc COPYING README TODO ChangeLog docs/* %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle -%if 0%{?fedora} <= 9 %attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevcontrol -%endif %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id @@ -339,6 +257,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,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) %{udev_scriptdir}/collect +%attr(0755,root,root) %{udev_scriptdir}/fstab_import + +%attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -352,7 +274,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules +%config %attr(0644,root,root) %{udev_scriptdir}/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 @@ -400,11 +322,16 @@ rm -rf $RPM_BUILD_ROOT %doc COPYING %defattr(0644, root, root, 0755) %{_includedir}/libvolume_id.h -%{_libdir}/libvolume_id.a %{_libdir}/libvolume_id.so +%{_libdir}/libvolume_id.a %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Aug 08 2008 Harald Hoyer 126-1 +- version 126 +- fixed udevadm syntax in start_udev (credits B.J.W. Polman) +- removed some manually created devices from makedev (bug #457125) + * Tue Jun 17 2008 Harald Hoyer 124-1.1 - readded udevcontrol, udevtrigger symlinks for Fedora 9, which are needed by live-cd-tools From 7177394ffd0a3ec606428a97f5b2d33bab8c81df Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Aug 2008 13:12:38 +0000 Subject: [PATCH 426/640] - version 126 - fixed udevadm syntax in start_udev (credits B.J.W. Polman) - removed some manually created devices from makedev (bug #457125) --- .cvsignore | 2 +- sources | 2 +- start_udev | 24 +++---- udev-089-nopie.patch | 21 ------ udev-091-lib64.patch | 71 ------------------- udev-116-nettype.patch | 14 ---- udev-118-sysconf.patch | 24 ------- udev-120-rhrules.patch | 10 --- udev.nodes | 13 ---- udev.spec | 155 +++++++++++------------------------------ 10 files changed, 55 insertions(+), 281 deletions(-) delete mode 100644 udev-089-nopie.patch delete mode 100644 udev-091-lib64.patch delete mode 100644 udev-116-nettype.patch delete mode 100644 udev-118-sysconf.patch delete mode 100644 udev-120-rhrules.patch diff --git a/.cvsignore b/.cvsignore index 2a71af6..a530be2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-124.tar.bz2 +udev-126.tar.bz2 diff --git a/sources b/sources index 8492b2a..b85ea0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4da0471c0ca3a2a2a77692f67120c03d udev-124.tar.bz2 +502964d8623b81b6565c727dd28024de udev-126.tar.bz2 diff --git a/start_udev b/start_udev index 5e35856..ef72536 100755 --- a/start_udev +++ b/start_udev @@ -234,36 +234,36 @@ 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 + if strstr "$cmdline" udevtrace; then + UDEV_OPTS="$UDEV_OPTS --debug-trace" + fi + /sbin/udevd -d $UDEV_OPTS ret=$[$ret + $?] udevtimeout=$(getval udevtimeout $cmdline) if strstr "$cmdline" udevdebug; then - /sbin/udevadm control log_priority=debug + /sbin/udevadm control --log_priority=debug fi if strstr "$cmdline" udevinfo; then - /sbin/udevadm control log_priority=info - fi - if strstr "$cmdline" udevtrace; then - UDEV_OPTS="$UDEV_OPTS --debug-trace" + /sbin/udevadm control --log_priority=info fi if strstr "$cmdline" udevchilds; then - /sbin/udevadm control max_childs_running=$(getval udevchilds $cmdline) + /sbin/udevadm control --max_childs_running=$(getval udevchilds $cmdline) fi if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then - /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 fi if strstr "$cmdline" udevnopersist; then - /sbin/udevadm control env UDEV_NO_PERSISTENT_STORAGE=1 + /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 fi - /sbin/udevadm control env STARTUP=1 + /sbin/udevadm control --env=STARTUP=1 if strstr "$cmdline" modprobedebug; then - /sbin/udevadm control env MODPROBE_OPTIONS="-s -v -q" + /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" echo findalias /sys | while read modules ; do if [ -n "$modules" ]; then @@ -279,7 +279,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then wait_for_queue $udevtimeout ret=$[$ret + $?] wait - /sbin/udevadm control env STARTUP= + /sbin/udevadm control --env=STARTUP= else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev-089-nopie.patch b/udev-089-nopie.patch deleted file mode 100644 index c2babda..0000000 --- a/udev-089-nopie.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up udev-120/extras/volume_id/lib/Makefile.nopie udev-120/extras/volume_id/lib/Makefile ---- udev-120/extras/volume_id/lib/Makefile.nopie 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:49:10.000000000 +0200 -@@ -72,7 +72,7 @@ all: libvolume_id.a $(SHLIB) libvolume_i - .shlib/%.o: %.c - $(E) " CC " $@ - $(Q) mkdir -p $(dir $@) -- $(Q) $(CC) -c $(CFLAGS) -fPIC $< -o $@ -+ $(Q) $(CC) $(subst -fpie,,$(subst -pie,,$(CFLAGS) )) -fPIC -c $< -o $@ - - libvolume_id.a: $(HEADERS) $(OBJS) - $(Q) rm -f $@ -@@ -83,7 +83,7 @@ libvolume_id.a: $(HEADERS) $(OBJS) - - $(SHLIB): $(HEADERS) exported_symbols $(addprefix .shlib/,$(OBJS)) - $(E) " CC " $@ -- $(Q) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ -+ $(Q) $(CC) -shared $(subst -static,,$(subst -pie,,$(LDFLAGS))) $(subst -fpie,,$(subst -pie,,$(CFLAGS))) -o $@ \ - -Wl,-soname,libvolume_id.so.$(SHLIB_CUR),--version-script,exported_symbols \ - $(addprefix .shlib/,$(OBJS)) - $(Q) ln -sf $@ libvolume_id.so.$(SHLIB_CUR) diff --git a/udev-091-lib64.patch b/udev-091-lib64.patch deleted file mode 100644 index dcb8210..0000000 --- a/udev-091-lib64.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -up udev-120/extras/volume_id/lib/Makefile.lib64 udev-120/extras/volume_id/lib/Makefile ---- udev-120/extras/volume_id/lib/Makefile.lib64 2008-04-04 14:13:33.000000000 +0200 -+++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:15:05.000000000 +0200 -@@ -4,9 +4,9 @@ - # - # Released under the GNU General Public License, version 2. - # --includedir = ${prefix}/usr/include --libdir = ${prefix}/lib --usrlibdir = ${prefix}/usr/lib -+includedir ?= ${prefix}/usr/include -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib - - INSTALL = install -c - INSTALL_DATA = ${INSTALL} -m 644 -@@ -115,6 +115,7 @@ ifeq ($(libdir),$(usrlibdir)) - else - ln -sf $(libdir)/$(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so - endif -+ $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a - $(INSTALL) -d $(DESTDIR)$(usrlibdir)/pkgconfig - $(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc - .PHONY: install -diff -up udev-120/extras/volume_id/Makefile.lib64 udev-120/extras/volume_id/Makefile ---- udev-120/extras/volume_id/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/extras/volume_id/Makefile 2008-04-04 14:13:33.000000000 +0200 -@@ -17,6 +17,9 @@ usrsbindir = ${prefix}/usr/sbin - libudevdir = ${prefix}/lib/udev - mandir = ${prefix}/usr/share/man - configdir = ${etcdir}/udev/ -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib -+ - - INSTALL = install -c - INSTALL_PROGRAM = ${INSTALL} -@@ -34,7 +37,11 @@ all: lib $(PROG) $(MAN_PAGES) - $(Q) $(CC) -c $(CFLAGS) $< -o $@ - - lib: -- $(Q) $(MAKE) -C $@ -+ $(Q) $(MAKE) \ -+ libdir=$(libdir) \ -+ usrlibdir=$(usrlibdir) \ -+ -C lib -+# $(Q) $(MAKE) -C $@ - .PHONY: lib - - lib/libvolume_id.a: lib -diff -up udev-120/Makefile.lib64 udev-120/Makefile ---- udev-120/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/Makefile 2008-04-04 14:13:33.000000000 +0200 -@@ -91,6 +91,8 @@ usrbindir = ${prefix}/usr/bin - libudevdir = ${prefix}/lib/udev - mandir = ${prefix}/usr/share/man - configdir = ${etcdir}/udev -+libdir ?= ${prefix}/lib -+usrlibdir ?= ${prefix}/usr/lib - udevdir = /dev - DESTDIR = - -@@ -161,6 +163,8 @@ all: $(PROGRAMS) $(MAN_PAGES) - RANLIB="$(RANLIB)" \ - LIB_OBJS="$(LIB_OBJS)" \ - LIBUDEV="$(PWD)/$(LIBUDEV)" \ -+ libdir=$(libdir) \ -+ usrlibdir=$(usrlibdir) \ - -C $$target $@ || exit 1; \ - done; - .PHONY: all diff --git a/udev-116-nettype.patch b/udev-116-nettype.patch deleted file mode 100644 index b68f236..0000000 --- a/udev-116-nettype.patch +++ /dev/null @@ -1,14 +0,0 @@ -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() { diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch deleted file mode 100644 index 272ca72..0000000 --- a/udev-118-sysconf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage.rules ---- udev-120/etc/udev/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/etc/udev/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 -@@ -3,6 +3,8 @@ - # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -diff -up udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules ---- udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-120/etc/udev/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 -@@ -2,6 +2,8 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" -+ - ACTION!="add|change", 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" diff --git a/udev-120-rhrules.patch b/udev-120-rhrules.patch deleted file mode 100644 index dab159f..0000000 --- a/udev-120-rhrules.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up udev-121/etc/udev/redhat/40-redhat.rules.rhrules udev-121/etc/udev/redhat/40-redhat.rules ---- udev-121/etc/udev/redhat/40-redhat.rules.rhrules 2008-05-09 09:22:23.000000000 +0200 -+++ udev-121/etc/udev/redhat/40-redhat.rules 2008-05-16 11:58:39.000000000 +0200 -@@ -23,3 +23,6 @@ KERNEL=="vcs[0-9]*", OWNER="vc - KERNEL=="vcsa", OWNER="vcsa", GROUP="tty" - KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" - KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" -+ -+KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" -+ diff --git a/udev.nodes b/udev.nodes index f113f63..ec38d8b 100644 --- a/udev.nodes +++ b/udev.nodes @@ -1,10 +1,4 @@ # These device have to be created manually -tty1 -tty2 -tty3 -tty4 -tty5 -tty6 loop0 loop1 loop2 @@ -13,15 +7,8 @@ loop4 loop5 loop6 loop7 -parport0 -parport1 -parport2 -parport3 net/tun ppp -console -null -zero lp0 lp1 lp2 diff --git a/udev.spec b/udev.spec index 8a10414..3635aaf 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 124 -Release: 1%{?dist}.1 +Version: 126 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,12 +19,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch101: udev-116-nettype.patch Patch102: udev-118-sysconf.patch -Patch103: udev-089-nopie.patch -Patch104: udev-091-lib64.patch - -Patch200: udev-120-rhrules.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -75,108 +70,36 @@ which contains functions to get volume ids. %prep %setup -q - -%patch101 -p1 -b .nettype %patch102 -p1 -b .sysconf -%patch103 -p1 -b .nopie -%patch104 -p1 -b .lib64 - -%patch200 -p1 -b .rhrules %build - +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static %if %{with_static} -# Do not USE_LOG in udev.static, -# because it causes segfaults on openlog (bug 136005) -make OPTFLAGS="$RPM_OPT_FLAGS" \ - libdir="/%{_lib}" \ - usrlibdir="%{_libdir}" \ - USE_KLIBC=false \ - USE_SELINUX=true \ - USE_STATIC=true \ - V=true \ - STRIP="/bin/true" \ - udevdir="/dev" \ - USE_LOG=false DEBUG=%{debug} \ - VOLUME_ID_STATIC=true \ - EXTRAS=" \ - extras/scsi_id \ - extras/volume_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/cdrom_id \ - extras/floppy \ - " all - -for i in udevd \ - udevadm \ - extras/scsi_id/scsi_id \ - 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 - mv $i $i.static - touch $i +make LDFLAGS=-static %{?_smp_mflags} +for i in udev/udevd \ + udev/udevadm \ + extras/scsi_id/scsi_id \ + 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 + mv $i $i.static done - make clean -make E='@echo' Q='@' -C extras/volume_id/lib clean %endif +make %{?_smp_mflags} -%ifarch sparc64 -make OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie" \ -%else -make OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie" \ -%endif - USE_KLIBC=false \ - USE_SELINUX=true \ - udevdir="/dev" \ - USE_LOG=true \ - DEBUG=%{debug} \ - STRIP="/bin/true" \ - V=true \ - EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/path_id \ - extras/volume_id \ - extras/cdrom_id \ - extras/floppy \ - extras/rule_generator \ - extras/firmware \ - " all %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} -%ifarch sparc64 -make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fPIE -pie" LDFLAGS="-pie"\ -%else -make DESTDIR=$RPM_BUILD_ROOT OPTFLAGS="$RPM_OPT_FLAGS -fpie -pie" LDFLAGS="-pie"\ -%endif - libdir="/%{_lib}" \ - usrlibdir="%{_libdir}" \ - EXTRAS=" \ - extras/scsi_id \ - extras/ata_id \ - extras/usb_id \ - extras/edd_id \ - extras/path_id \ - extras/volume_id \ - extras/cdrom_id \ - extras/floppy \ - extras/rule_generator \ - extras/firmware \ - " install +make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev @@ -185,6 +108,7 @@ 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 +mkdir -p $RPM_BUILD_ROOT%{_bindir} # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id @@ -195,10 +119,9 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor -%if 0%{?fedora} <= 9 ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol -%endif %if %{with_static} for i in extras/scsi_id/scsi_id \ @@ -211,31 +134,29 @@ for i in extras/scsi_id/scsi_id \ install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static done -for i in udevd udevadm; do - install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$i.static +for i in udev/udevd udev/udevadm; do + install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$(basename $i).static done %endif for i in \ - etc/udev/redhat/*.rules \ + rules/redhat/*.rules \ %ifarch ia64 - etc/udev/packages/40-ia64.rules \ + rules/packages/40-ia64.rules \ %endif %ifarch ppc ppc64 - etc/udev/packages/40-ppc.rules \ + rules/packages/40-ppc.rules \ %endif %ifarch s390 s390x - etc/udev/packages/40-s390.rules \ + rules/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 \ + rules/packages/40-alsa.rules \ + rules/packages/64-md-raid.rules \ + rules/packages/64-device-mapper.rules \ ; do - install -m 0644 "$i" "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}" + install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/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} install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes @@ -243,7 +164,6 @@ 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 udevtrigger $RPM_BUILD_ROOT/sbin mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} @@ -316,13 +236,11 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc COPYING README TODO ChangeLog RELEASE-NOTES docs/* +%doc COPYING README TODO ChangeLog docs/* %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle -%if 0%{?fedora} <= 9 %attr(0755,root,root) /sbin/udevtrigger %attr(0755,root,root) /sbin/udevcontrol -%endif %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id @@ -339,6 +257,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,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) %{udev_scriptdir}/collect +%attr(0755,root,root) %{udev_scriptdir}/fstab_import + +%attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post %attr(0755,root,root) %{_bindir}/udevtest %attr(0755,root,root) %{_bindir}/udevinfo @@ -352,7 +274,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config %attr(0644,root,root) %{_sysconfdir}/udev/rules.d/*.rules +%config %attr(0644,root,root) %{udev_scriptdir}/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 @@ -400,11 +322,16 @@ rm -rf $RPM_BUILD_ROOT %doc COPYING %defattr(0644, root, root, 0755) %{_includedir}/libvolume_id.h -%{_libdir}/libvolume_id.a %{_libdir}/libvolume_id.so +%{_libdir}/libvolume_id.a %{_libdir}/pkgconfig/libvolume_id.pc %changelog +* Fri Aug 08 2008 Harald Hoyer 126-1 +- version 126 +- fixed udevadm syntax in start_udev (credits B.J.W. Polman) +- removed some manually created devices from makedev (bug #457125) + * Tue Jun 17 2008 Harald Hoyer 124-1.1 - readded udevcontrol, udevtrigger symlinks for Fedora 9, which are needed by live-cd-tools From 01f6ec751bcd0488792dfc27128624b7978d2cb7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Aug 2008 13:29:32 +0000 Subject: [PATCH 427/640] readded accidently removed udev-118-sysconf.patch --- udev-118-sysconf.patch | 22 ++++++++++++++++++++++ udev.spec | 1 - 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 udev-118-sysconf.patch diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch new file mode 100644 index 0000000..2881a5f --- /dev/null +++ b/udev-118-sysconf.patch @@ -0,0 +1,22 @@ +--- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 +@@ -3,6 +3,8 @@ + # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" ++ + ACTION!="add|change", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + +--- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 +@@ -2,6 +2,8 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" ++ + ACTION!="add|change", 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" diff --git a/udev.spec b/udev.spec index 3635aaf..a11d62b 100644 --- a/udev.spec +++ b/udev.spec @@ -72,7 +72,6 @@ which contains functions to get volume ids. %setup -q %patch102 -p1 -b .sysconf - %build %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static %if %{with_static} From bfbe3859db26b8a95bf0db5ce71dc1e54c74e431 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Aug 2008 13:29:32 +0000 Subject: [PATCH 428/640] readded accidently removed udev-118-sysconf.patch --- udev-118-sysconf.patch | 22 ++++++++++++++++++++++ udev.spec | 1 - 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 udev-118-sysconf.patch diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch new file mode 100644 index 0000000..2881a5f --- /dev/null +++ b/udev-118-sysconf.patch @@ -0,0 +1,22 @@ +--- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 +@@ -3,6 +3,8 @@ + # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} + # scheme based on "Linux persistent device names", 2004, Hannes Reinecke + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" ++ + ACTION!="add|change", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + +--- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 +@@ -2,6 +2,8 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" ++ + ACTION!="add|change", 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" diff --git a/udev.spec b/udev.spec index 3635aaf..a11d62b 100644 --- a/udev.spec +++ b/udev.spec @@ -72,7 +72,6 @@ which contains functions to get volume ids. %setup -q %patch102 -p1 -b .sysconf - %build %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static %if %{with_static} From 10373cfe68ec3d75df4181a6840a6d65c4b739a9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Aug 2008 13:36:37 +0000 Subject: [PATCH 429/640] corrected fuzz --- udev-118-sysconf.patch | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch index 2881a5f..30de6ab 100644 --- a/udev-118-sysconf.patch +++ b/udev-118-sysconf.patch @@ -1,16 +1,18 @@ ---- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 -@@ -3,6 +3,8 @@ - # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke +diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules +--- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 +@@ -6,6 +6,8 @@ + # forward scsi device event to corresponding block device + ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" +ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" + ACTION!="add|change", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end" ---- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 +diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules +--- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 @@ -2,6 +2,8 @@ # persistent storage links: /dev/tape/{by-id,by-path} @@ -19,4 +21,4 @@ + ACTION!="add|change", 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" From 4ba917fed637f319c93bd17393b4799cb316be11 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Aug 2008 13:36:37 +0000 Subject: [PATCH 430/640] corrected fuzz --- udev-118-sysconf.patch | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch index 2881a5f..30de6ab 100644 --- a/udev-118-sysconf.patch +++ b/udev-118-sysconf.patch @@ -1,16 +1,18 @@ ---- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-04-04 14:11:35.000000000 +0200 -@@ -3,6 +3,8 @@ - # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} - # scheme based on "Linux persistent device names", 2004, Hannes Reinecke +diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules +--- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 +@@ -6,6 +6,8 @@ + # forward scsi device event to corresponding block device + ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" +ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" + ACTION!="add|change", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end" ---- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-04-03 21:12:53.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-04-04 14:10:46.000000000 +0200 +diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules +--- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 @@ -2,6 +2,8 @@ # persistent storage links: /dev/tape/{by-id,by-path} @@ -19,4 +21,4 @@ + ACTION!="add|change", 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" From 514c411277bcd9635648a7c28806469a08b4a221 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Sep 2008 13:29:10 +0000 Subject: [PATCH 431/640] - version 127 --- .cvsignore | 2 +- sources | 2 +- udev-124.tar.bz2.sign | 8 -------- udev-127.tar.bz2.sign | 8 ++++++++ udev.spec | 42 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 51 insertions(+), 11 deletions(-) delete mode 100644 udev-124.tar.bz2.sign create mode 100644 udev-127.tar.bz2.sign diff --git a/.cvsignore b/.cvsignore index a530be2..10a06ff 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-126.tar.bz2 +udev-127.tar.bz2 diff --git a/sources b/sources index b85ea0f..94e634e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -502964d8623b81b6565c727dd28024de udev-126.tar.bz2 +59ebde702f1ab557be15ae76d645665b udev-127.tar.bz2 diff --git a/udev-124.tar.bz2.sign b/udev-124.tar.bz2.sign deleted file mode 100644 index d78a969..0000000 --- a/udev-124.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.7 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBIULWHyGugalF9Dw4RAioFAJ0fg9gLQjpgv4Y9cxjAHaKkaF7trQCfRGyd -lJrHWGmX0sbDgB8MZs/B6B0= -=Ci89 ------END PGP SIGNATURE----- diff --git a/udev-127.tar.bz2.sign b/udev-127.tar.bz2.sign new file mode 100644 index 0000000..473f50d --- /dev/null +++ b/udev-127.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBIuFtayGugalF9Dw4RApeuAJ9+7UghTzMsbLjLshA6+YxwGgM2FgCfbnj8 +ylD6q64gmtAMRzK4pebQbKg= +=41ir +-----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index a11d62b..72f0ccf 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 126 +Version: 127 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -68,6 +68,27 @@ Group: System Environment/Libraries This package contains the libvolume_id.so dynamic library, which contains functions to get volume ids. + +%package -n libudev0 +Summary: Dynamic library to access udev device information +Group: System Environment/Libraries + +%description -n libudev0 +This package contains the dynamic library libudev, which provides access +to udev device information, and an interface to search devices in sysfs. + + +%package -n libudev-devel +Summary: Development files for libudev +Group: Development/Libraries +Requires: udev = %{version}-%{release} +Requires: libudev0 = %{version}-%{release} + +%description -n libudev-devel +This package contains the development files for the library libudev, a +dynamic library, which provides access to udev device information. + + %prep %setup -q %patch102 -p1 -b .sysconf @@ -229,6 +250,8 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %post -n libvolume_id -p /sbin/ldconfig %postun -n libvolume_id -p /sbin/ldconfig +%post -n libudev0 -p /sbin/ldconfig +%postun -n libudev0 -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT @@ -325,7 +348,24 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libvolume_id.a %{_libdir}/pkgconfig/libvolume_id.pc +%files -n libudev0 +%defattr(-,root,root) +/%{_lib}/libudev.so.* + +%files -n libudev-devel +%defattr(-,root,root) +%{_includedir}/libudev.h +%{_libdir}/libudev.so +%{_libdir}/pkgconfig/libudev.pc +%if %{with_static} +%{_libdir}/libudev.a +%endif + + %changelog +* Mon Sep 01 2008 Harald Hoyer 127-1 +- version 127 + * Fri Aug 08 2008 Harald Hoyer 126-1 - version 126 - fixed udevadm syntax in start_udev (credits B.J.W. Polman) From 3eb03420e3bb0b3a3890bb90ae9d10b58a77bd8f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Sep 2008 13:29:10 +0000 Subject: [PATCH 432/640] - version 127 --- .cvsignore | 2 +- sources | 2 +- udev-124.tar.bz2.sign | 8 -------- udev-127.tar.bz2.sign | 8 ++++++++ udev.spec | 42 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 51 insertions(+), 11 deletions(-) delete mode 100644 udev-124.tar.bz2.sign create mode 100644 udev-127.tar.bz2.sign diff --git a/.cvsignore b/.cvsignore index a530be2..10a06ff 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-126.tar.bz2 +udev-127.tar.bz2 diff --git a/sources b/sources index b85ea0f..94e634e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -502964d8623b81b6565c727dd28024de udev-126.tar.bz2 +59ebde702f1ab557be15ae76d645665b udev-127.tar.bz2 diff --git a/udev-124.tar.bz2.sign b/udev-124.tar.bz2.sign deleted file mode 100644 index d78a969..0000000 --- a/udev-124.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.7 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBIULWHyGugalF9Dw4RAioFAJ0fg9gLQjpgv4Y9cxjAHaKkaF7trQCfRGyd -lJrHWGmX0sbDgB8MZs/B6B0= -=Ci89 ------END PGP SIGNATURE----- diff --git a/udev-127.tar.bz2.sign b/udev-127.tar.bz2.sign new file mode 100644 index 0000000..473f50d --- /dev/null +++ b/udev-127.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBIuFtayGugalF9Dw4RApeuAJ9+7UghTzMsbLjLshA6+YxwGgM2FgCfbnj8 +ylD6q64gmtAMRzK4pebQbKg= +=41ir +-----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index a11d62b..72f0ccf 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 126 +Version: 127 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -68,6 +68,27 @@ Group: System Environment/Libraries This package contains the libvolume_id.so dynamic library, which contains functions to get volume ids. + +%package -n libudev0 +Summary: Dynamic library to access udev device information +Group: System Environment/Libraries + +%description -n libudev0 +This package contains the dynamic library libudev, which provides access +to udev device information, and an interface to search devices in sysfs. + + +%package -n libudev-devel +Summary: Development files for libudev +Group: Development/Libraries +Requires: udev = %{version}-%{release} +Requires: libudev0 = %{version}-%{release} + +%description -n libudev-devel +This package contains the development files for the library libudev, a +dynamic library, which provides access to udev device information. + + %prep %setup -q %patch102 -p1 -b .sysconf @@ -229,6 +250,8 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %post -n libvolume_id -p /sbin/ldconfig %postun -n libvolume_id -p /sbin/ldconfig +%post -n libudev0 -p /sbin/ldconfig +%postun -n libudev0 -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT @@ -325,7 +348,24 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libvolume_id.a %{_libdir}/pkgconfig/libvolume_id.pc +%files -n libudev0 +%defattr(-,root,root) +/%{_lib}/libudev.so.* + +%files -n libudev-devel +%defattr(-,root,root) +%{_includedir}/libudev.h +%{_libdir}/libudev.so +%{_libdir}/pkgconfig/libudev.pc +%if %{with_static} +%{_libdir}/libudev.a +%endif + + %changelog +* Mon Sep 01 2008 Harald Hoyer 127-1 +- version 127 + * Fri Aug 08 2008 Harald Hoyer 126-1 - version 126 - fixed udevadm syntax in start_udev (credits B.J.W. Polman) From e162135c1872c7f097ec27ccee6d2dc76495d570 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Oct 2008 12:13:41 +0000 Subject: [PATCH 433/640] - added 2 patches for md raid vol_id --- udev-127-volid-raid.patch | 57 +++++++++++++++++++++++ udev-127-volume_id-include-config.h.patch | 13 ++++++ udev.spec | 10 +++- 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 udev-127-volid-raid.patch create mode 100644 udev-127-volume_id-include-config.h.patch diff --git a/udev-127-volid-raid.patch b/udev-127-volid-raid.patch new file mode 100644 index 0000000..a7593aa --- /dev/null +++ b/udev-127-volid-raid.patch @@ -0,0 +1,57 @@ +commit 7643819062985d9fc6c7664072576e71d3822b10 +Author: Kay Sievers +Date: Sat Sep 6 16:23:21 2008 +0200 + + volume_id: linux_raid - fix logic for volumes with size == 0 + +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 5d95b50..c40f3e3 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size + { + 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) +- strcpy(id->type_version, "1.0"); ++ if (size > MD_RESERVED_BYTES) { ++ /* 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) { ++ strcpy(id->type_version, "1.0"); ++ return 0; ++ } ++ } + + /* version 1.1 at the start of the device */ +- else if (volume_id_probe_linux_raid1(id, off, size) == 0) ++ if (volume_id_probe_linux_raid1(id, off, size) == 0) { + strcpy(id->type_version, "1.1"); ++ return 0; ++ } + + /* version 1.2 at 4k offset from the start */ +- else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) ++ if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { + strcpy(id->type_version, "1.2"); ++ return 0; ++ } + +- else +- return -1; +- +- return 0; ++ return -1; + } diff --git a/udev-127-volume_id-include-config.h.patch b/udev-127-volume_id-include-config.h.patch new file mode 100644 index 0000000..b1d1bd5 --- /dev/null +++ b/udev-127-volume_id-include-config.h.patch @@ -0,0 +1,13 @@ +diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c +index 0fb8937..4d118a4 100644 +--- a/extras/volume_id/lib/util.c ++++ b/extras/volume_id/lib/util.c +@@ -21,6 +21,8 @@ + #define _GNU_SOURCE 1 + #endif + ++#include ++ + #include + #include + #include diff --git a/udev.spec b/udev.spec index 72f0ccf..88cae41 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 127 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,9 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev-127-volid-raid.patch +Patch2: udev-127-volume_id-include-config.h.patch + Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -91,6 +94,8 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%patch1 -p1 +%patch2 -p1 %patch102 -p1 -b .sysconf %build @@ -363,6 +368,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 16 2008 Harald Hoyer 127-2 +- added 2 patches for md raid vol_id + * Mon Sep 01 2008 Harald Hoyer 127-1 - version 127 From 6bbb3cd9b1a1a0a078e1e8aabe844ac2afb46463 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Oct 2008 12:13:41 +0000 Subject: [PATCH 434/640] - added 2 patches for md raid vol_id --- udev-127-volid-raid.patch | 57 +++++++++++++++++++++++ udev-127-volume_id-include-config.h.patch | 13 ++++++ udev.spec | 10 +++- 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 udev-127-volid-raid.patch create mode 100644 udev-127-volume_id-include-config.h.patch diff --git a/udev-127-volid-raid.patch b/udev-127-volid-raid.patch new file mode 100644 index 0000000..a7593aa --- /dev/null +++ b/udev-127-volid-raid.patch @@ -0,0 +1,57 @@ +commit 7643819062985d9fc6c7664072576e71d3822b10 +Author: Kay Sievers +Date: Sat Sep 6 16:23:21 2008 +0200 + + volume_id: linux_raid - fix logic for volumes with size == 0 + +diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c +index 5d95b50..c40f3e3 100644 +--- a/extras/volume_id/lib/linux_raid.c ++++ b/extras/volume_id/lib/linux_raid.c +@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size + { + 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) +- strcpy(id->type_version, "1.0"); ++ if (size > MD_RESERVED_BYTES) { ++ /* 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) { ++ strcpy(id->type_version, "1.0"); ++ return 0; ++ } ++ } + + /* version 1.1 at the start of the device */ +- else if (volume_id_probe_linux_raid1(id, off, size) == 0) ++ if (volume_id_probe_linux_raid1(id, off, size) == 0) { + strcpy(id->type_version, "1.1"); ++ return 0; ++ } + + /* version 1.2 at 4k offset from the start */ +- else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) ++ if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { + strcpy(id->type_version, "1.2"); ++ return 0; ++ } + +- else +- return -1; +- +- return 0; ++ return -1; + } diff --git a/udev-127-volume_id-include-config.h.patch b/udev-127-volume_id-include-config.h.patch new file mode 100644 index 0000000..b1d1bd5 --- /dev/null +++ b/udev-127-volume_id-include-config.h.patch @@ -0,0 +1,13 @@ +diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c +index 0fb8937..4d118a4 100644 +--- a/extras/volume_id/lib/util.c ++++ b/extras/volume_id/lib/util.c +@@ -21,6 +21,8 @@ + #define _GNU_SOURCE 1 + #endif + ++#include ++ + #include + #include + #include diff --git a/udev.spec b/udev.spec index 72f0ccf..88cae41 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 127 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,9 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev-127-volid-raid.patch +Patch2: udev-127-volume_id-include-config.h.patch + Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -91,6 +94,8 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%patch1 -p1 +%patch2 -p1 %patch102 -p1 -b .sysconf %build @@ -363,6 +368,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 16 2008 Harald Hoyer 127-2 +- added 2 patches for md raid vol_id + * Mon Sep 01 2008 Harald Hoyer 127-1 - version 127 From c54320c2aaf634d78776f379a2cba8ddb3bfd9a8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Oct 2008 12:25:25 +0000 Subject: [PATCH 435/640] fixed patch fuzz --- udev-127-volid-raid.patch | 15 ++++----------- udev-127-volume_id-include-config.h.patch | 11 +++++------ udev.spec | 4 ++-- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/udev-127-volid-raid.patch b/udev-127-volid-raid.patch index a7593aa..e63e667 100644 --- a/udev-127-volid-raid.patch +++ b/udev-127-volid-raid.patch @@ -1,14 +1,7 @@ -commit 7643819062985d9fc6c7664072576e71d3822b10 -Author: Kay Sievers -Date: Sat Sep 6 16:23:21 2008 +0200 - - volume_id: linux_raid - fix logic for volumes with size == 0 - -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 5d95b50..c40f3e3 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size +diff -up udev-127/extras/volume_id/lib/linux_raid.c.p1 udev-127/extras/volume_id/lib/linux_raid.c +--- udev-127/extras/volume_id/lib/linux_raid.c.p1 2008-08-28 23:20:07.000000000 +0200 ++++ udev-127/extras/volume_id/lib/linux_raid.c 2008-10-16 14:23:54.000000000 +0200 +@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct vo { uint64_t sboff; diff --git a/udev-127-volume_id-include-config.h.patch b/udev-127-volume_id-include-config.h.patch index b1d1bd5..405b446 100644 --- a/udev-127-volume_id-include-config.h.patch +++ b/udev-127-volume_id-include-config.h.patch @@ -1,9 +1,8 @@ -diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c -index 0fb8937..4d118a4 100644 ---- a/extras/volume_id/lib/util.c -+++ b/extras/volume_id/lib/util.c -@@ -21,6 +21,8 @@ - #define _GNU_SOURCE 1 +diff -up udev-127/extras/volume_id/lib/util.c.p2 udev-127/extras/volume_id/lib/util.c +--- udev-127/extras/volume_id/lib/util.c.p2 2008-08-28 23:22:03.000000000 +0200 ++++ udev-127/extras/volume_id/lib/util.c 2008-10-16 14:24:17.000000000 +0200 +@@ -16,6 +16,8 @@ + # include #endif +#include diff --git a/udev.spec b/udev.spec index 88cae41..432b37d 100644 --- a/udev.spec +++ b/udev.spec @@ -94,8 +94,8 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -%patch2 -p1 +%patch1 -p1 -b .p1 +%patch2 -p1 -b .p2 %patch102 -p1 -b .sysconf %build From d301daacbda1419741eed5e01d8b055f2fe54605 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Oct 2008 12:25:25 +0000 Subject: [PATCH 436/640] fixed patch fuzz --- udev-127-volid-raid.patch | 15 ++++----------- udev-127-volume_id-include-config.h.patch | 11 +++++------ udev.spec | 4 ++-- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/udev-127-volid-raid.patch b/udev-127-volid-raid.patch index a7593aa..e63e667 100644 --- a/udev-127-volid-raid.patch +++ b/udev-127-volid-raid.patch @@ -1,14 +1,7 @@ -commit 7643819062985d9fc6c7664072576e71d3822b10 -Author: Kay Sievers -Date: Sat Sep 6 16:23:21 2008 +0200 - - volume_id: linux_raid - fix logic for volumes with size == 0 - -diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c -index 5d95b50..c40f3e3 100644 ---- a/extras/volume_id/lib/linux_raid.c -+++ b/extras/volume_id/lib/linux_raid.c -@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size +diff -up udev-127/extras/volume_id/lib/linux_raid.c.p1 udev-127/extras/volume_id/lib/linux_raid.c +--- udev-127/extras/volume_id/lib/linux_raid.c.p1 2008-08-28 23:20:07.000000000 +0200 ++++ udev-127/extras/volume_id/lib/linux_raid.c 2008-10-16 14:23:54.000000000 +0200 +@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct vo { uint64_t sboff; diff --git a/udev-127-volume_id-include-config.h.patch b/udev-127-volume_id-include-config.h.patch index b1d1bd5..405b446 100644 --- a/udev-127-volume_id-include-config.h.patch +++ b/udev-127-volume_id-include-config.h.patch @@ -1,9 +1,8 @@ -diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c -index 0fb8937..4d118a4 100644 ---- a/extras/volume_id/lib/util.c -+++ b/extras/volume_id/lib/util.c -@@ -21,6 +21,8 @@ - #define _GNU_SOURCE 1 +diff -up udev-127/extras/volume_id/lib/util.c.p2 udev-127/extras/volume_id/lib/util.c +--- udev-127/extras/volume_id/lib/util.c.p2 2008-08-28 23:22:03.000000000 +0200 ++++ udev-127/extras/volume_id/lib/util.c 2008-10-16 14:24:17.000000000 +0200 +@@ -16,6 +16,8 @@ + # include #endif +#include diff --git a/udev.spec b/udev.spec index 88cae41..432b37d 100644 --- a/udev.spec +++ b/udev.spec @@ -94,8 +94,8 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -%patch2 -p1 +%patch1 -p1 -b .p1 +%patch2 -p1 -b .p2 %patch102 -p1 -b .sysconf %build From a2c425142372ca1302aabad165af15701ea33592 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Nov 2008 10:45:26 +0000 Subject: [PATCH 437/640] - version 132 - added memory stick rules (bug #470096) --- .cvsignore | 2 +- sources | 2 +- start_udev | 33 +++++++++++++++++++++++++++++++-- udev-132-memstickrules.patch | 11 +++++++++++ udev.spec | 23 +++++++++++------------ 5 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 udev-132-memstickrules.patch diff --git a/.cvsignore b/.cvsignore index 10a06ff..c3bc10a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-127.tar.bz2 +udev-132.tar.bz2 diff --git a/sources b/sources index 94e634e..6e55d3c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59ebde702f1ab557be15ae76d645665b udev-127.tar.bz2 +0f51bffb4f5b86cb726b24a16c60a0aa udev-132.tar.bz2 diff --git a/start_udev b/start_udev index ef72536..5af4599 100755 --- a/start_udev +++ b/start_udev @@ -96,10 +96,39 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d USE_MD5="false" [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + [ -d /dev/net ] || mkdir -p /dev/net + /bin/mknod -m 0640 /dev/loop0 b 7 0 + /bin/chown root:disk /dev/loop0 + /bin/mknod -m 0640 /dev/loop1 b 7 1 + /bin/chown root:disk /dev/loop1 + /bin/mknod -m 0640 /dev/loop2 b 7 2 + /bin/chown root:disk /dev/loop2 + /bin/mknod -m 0640 /dev/loop3 b 7 3 + /bin/chown root:disk /dev/loop3 + /bin/mknod -m 0640 /dev/loop4 b 7 4 + /bin/chown root:disk /dev/loop4 + /bin/mknod -m 0640 /dev/loop5 b 7 5 + /bin/chown root:disk /dev/loop5 + /bin/mknod -m 0640 /dev/loop6 b 7 6 + /bin/chown root:disk /dev/loop6 + /bin/mknod -m 0640 /dev/loop7 b 7 7 + /bin/chown root:disk /dev/loop7 + /bin/mknod -m 0600 /dev/net/tun c 10 200 + /bin/chown root:root /dev/net/tun + /bin/mknod -m 0600 /dev/ppp c 108 0 + /bin/chown root:root /dev/ppp + /bin/mknod -m 0660 /dev/lp0 c 6 0 + /bin/chown root:lp /dev/lp0 + /bin/mknod -m 0660 /dev/lp1 c 6 1 + /bin/chown root:lp /dev/lp1 + /bin/mknod -m 0660 /dev/lp2 c 6 2 + /bin/chown root:lp /dev/lp2 + /bin/mknod -m 0660 /dev/lp3 c 6 3 + /bin/chown root:lp /dev/lp3 + /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do @@ -107,7 +136,7 @@ make_extra_nodes () { # use a little caching to speedup things if [ "$USE_MD5" == "true" ]; then # fix for MAKEDEV shell scripts - [ -d /dev/net ] || mkdir -p /dev/net + [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a))-se$SELINUX_STATE if [ -f "/var/lib/udev/makedev.d/${md5}.sh" ];then md5file="/var/lib/udev/makedev.d/${md5}.sh" diff --git a/udev-132-memstickrules.patch b/udev-132-memstickrules.patch new file mode 100644 index 0000000..8c618b5 --- /dev/null +++ b/udev-132-memstickrules.patch @@ -0,0 +1,11 @@ +diff -up udev-132/rules/redhat/40-redhat.rules.memstickrules udev-132/rules/redhat/40-redhat.rules +--- udev-132/rules/redhat/40-redhat.rules.memstickrules 2008-10-16 18:03:43.000000000 +0200 ++++ udev-132/rules/redhat/40-redhat.rules 2008-11-10 11:42:31.000000000 +0100 +@@ -25,3 +25,7 @@ KERNEL=="vcsa[0-9]*", OWNER="vc + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" + + KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ ++KERNEL=="mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" ++KERNEL=="mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" ++ diff --git a/udev.spec b/udev.spec index 432b37d..7784480 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 127 -Release: 2%{?dist} +Version: 132 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,14 +14,11 @@ Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-127-volid-raid.patch -Patch2: udev-127-volume_id-include-config.h.patch - +Patch1: udev-132-memstickrules.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -30,11 +27,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 +BuildRequires: glib2-devel bison findutils MAKEDEV %if %{with_static} BuildRequires: libselinux-static libsepol-static %endif -Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam +Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 @@ -94,9 +91,9 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -b .p1 -%patch2 -p1 -b .p2 +%patch1 -p1 -b .memstickrules %patch102 -p1 -b .sysconf +rm rules/redhat/95-pam-console.rules %build %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static @@ -184,7 +181,6 @@ done mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -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 @@ -302,7 +298,6 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{udev_scriptdir}/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 @@ -368,6 +363,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 10 2008 Harald Hoyer 132-1 +- version 132 +- added memory stick rules (bug #470096) + * Thu Oct 16 2008 Harald Hoyer 127-2 - added 2 patches for md raid vol_id From 6bccb7062a3a4ec83e84519a34adf898bcc8158c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 10 Nov 2008 10:45:26 +0000 Subject: [PATCH 438/640] - version 132 - added memory stick rules (bug #470096) --- .cvsignore | 2 +- sources | 2 +- start_udev | 33 +++++++++++++++++++++++++++++++-- udev-132-memstickrules.patch | 11 +++++++++++ udev.spec | 23 +++++++++++------------ 5 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 udev-132-memstickrules.patch diff --git a/.cvsignore b/.cvsignore index 10a06ff..c3bc10a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-127.tar.bz2 +udev-132.tar.bz2 diff --git a/sources b/sources index 94e634e..6e55d3c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59ebde702f1ab557be15ae76d645665b udev-127.tar.bz2 +0f51bffb4f5b86cb726b24a16c60a0aa udev-132.tar.bz2 diff --git a/start_udev b/start_udev index ef72536..5af4599 100755 --- a/start_udev +++ b/start_udev @@ -96,10 +96,39 @@ make_extra_nodes () { [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; - [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d USE_MD5="false" [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + [ -d /dev/net ] || mkdir -p /dev/net + /bin/mknod -m 0640 /dev/loop0 b 7 0 + /bin/chown root:disk /dev/loop0 + /bin/mknod -m 0640 /dev/loop1 b 7 1 + /bin/chown root:disk /dev/loop1 + /bin/mknod -m 0640 /dev/loop2 b 7 2 + /bin/chown root:disk /dev/loop2 + /bin/mknod -m 0640 /dev/loop3 b 7 3 + /bin/chown root:disk /dev/loop3 + /bin/mknod -m 0640 /dev/loop4 b 7 4 + /bin/chown root:disk /dev/loop4 + /bin/mknod -m 0640 /dev/loop5 b 7 5 + /bin/chown root:disk /dev/loop5 + /bin/mknod -m 0640 /dev/loop6 b 7 6 + /bin/chown root:disk /dev/loop6 + /bin/mknod -m 0640 /dev/loop7 b 7 7 + /bin/chown root:disk /dev/loop7 + /bin/mknod -m 0600 /dev/net/tun c 10 200 + /bin/chown root:root /dev/net/tun + /bin/mknod -m 0600 /dev/ppp c 108 0 + /bin/chown root:root /dev/ppp + /bin/mknod -m 0660 /dev/lp0 c 6 0 + /bin/chown root:lp /dev/lp0 + /bin/mknod -m 0660 /dev/lp1 c 6 1 + /bin/chown root:lp /dev/lp1 + /bin/mknod -m 0660 /dev/lp2 c 6 2 + /bin/chown root:lp /dev/lp2 + /bin/mknod -m 0660 /dev/lp3 c 6 3 + /bin/chown root:lp /dev/lp3 + /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do @@ -107,7 +136,7 @@ make_extra_nodes () { # use a little caching to speedup things if [ "$USE_MD5" == "true" ]; then # fix for MAKEDEV shell scripts - [ -d /dev/net ] || mkdir -p /dev/net + [ -d /dev/.udev/makedev.d ] || mkdir -p /dev/.udev/makedev.d md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a))-se$SELINUX_STATE if [ -f "/var/lib/udev/makedev.d/${md5}.sh" ];then md5file="/var/lib/udev/makedev.d/${md5}.sh" diff --git a/udev-132-memstickrules.patch b/udev-132-memstickrules.patch new file mode 100644 index 0000000..8c618b5 --- /dev/null +++ b/udev-132-memstickrules.patch @@ -0,0 +1,11 @@ +diff -up udev-132/rules/redhat/40-redhat.rules.memstickrules udev-132/rules/redhat/40-redhat.rules +--- udev-132/rules/redhat/40-redhat.rules.memstickrules 2008-10-16 18:03:43.000000000 +0200 ++++ udev-132/rules/redhat/40-redhat.rules 2008-11-10 11:42:31.000000000 +0100 +@@ -25,3 +25,7 @@ KERNEL=="vcsa[0-9]*", OWNER="vc + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" + + KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ ++KERNEL=="mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" ++KERNEL=="mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" ++ diff --git a/udev.spec b/udev.spec index 432b37d..7784480 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 127 -Release: 2%{?dist} +Version: 132 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,14 +14,11 @@ Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source2: udev.nodes Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-127-volid-raid.patch -Patch2: udev-127-volume_id-include-config.h.patch - +Patch1: udev-132-memstickrules.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -30,11 +27,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 +BuildRequires: glib2-devel bison findutils MAKEDEV %if %{with_static} BuildRequires: libselinux-static libsepol-static %endif -Requires: libselinux >= 0:1.17.9-2 MAKEDEV sed pam +Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 @@ -94,9 +91,9 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -b .p1 -%patch2 -p1 -b .p2 +%patch1 -p1 -b .memstickrules %patch102 -p1 -b .sysconf +rm rules/redhat/95-pam-console.rules %build %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static @@ -184,7 +181,6 @@ done mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} -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 @@ -302,7 +298,6 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %config %attr(0644,root,root) %{udev_scriptdir}/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 @@ -368,6 +363,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 10 2008 Harald Hoyer 132-1 +- version 132 +- added memory stick rules (bug #470096) + * Thu Oct 16 2008 Harald Hoyer 127-2 - added 2 patches for md raid vol_id From aad9b436ba56c18f8b478abdd16d41c54209d32c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 19 Nov 2008 10:35:08 +0000 Subject: [PATCH 439/640] - version 133 --- .cvsignore | 2 +- sources | 2 +- udev.nodes | 15 --------------- udev.spec | 8 ++++++-- 4 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 udev.nodes diff --git a/.cvsignore b/.cvsignore index c3bc10a..66dcd7e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-132.tar.bz2 +udev-133.tar.bz2 diff --git a/sources b/sources index 6e55d3c..52a0bda 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0f51bffb4f5b86cb726b24a16c60a0aa udev-132.tar.bz2 +1fe77c4d76162f4b09bdc01becbc4295 udev-133.tar.bz2 diff --git a/udev.nodes b/udev.nodes deleted file mode 100644 index ec38d8b..0000000 --- a/udev.nodes +++ /dev/null @@ -1,15 +0,0 @@ -# These device have to be created manually -loop0 -loop1 -loop2 -loop3 -loop4 -loop5 -loop6 -loop7 -net/tun -ppp -lp0 -lp1 -lp2 -lp3 diff --git a/udev.spec b/udev.spec index 7784480..20aa86d 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 132 +Version: 133 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -162,7 +162,8 @@ done %endif for i in \ - rules/redhat/*.rules \ + rules/redhat/40-redhat.rules \ + rules/suse/40-suse.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -363,6 +364,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Nov 19 2008 Harald Hoyer 133-1 +- version 133 + * Mon Nov 10 2008 Harald Hoyer 132-1 - version 132 - added memory stick rules (bug #470096) From 5a26722c4c197923df47cfaf8d305280bec7fc3b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 19 Nov 2008 10:35:08 +0000 Subject: [PATCH 440/640] - version 133 --- .cvsignore | 2 +- sources | 2 +- udev.nodes | 15 --------------- udev.spec | 8 ++++++-- 4 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 udev.nodes diff --git a/.cvsignore b/.cvsignore index c3bc10a..66dcd7e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-132.tar.bz2 +udev-133.tar.bz2 diff --git a/sources b/sources index 6e55d3c..52a0bda 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0f51bffb4f5b86cb726b24a16c60a0aa udev-132.tar.bz2 +1fe77c4d76162f4b09bdc01becbc4295 udev-133.tar.bz2 diff --git a/udev.nodes b/udev.nodes deleted file mode 100644 index ec38d8b..0000000 --- a/udev.nodes +++ /dev/null @@ -1,15 +0,0 @@ -# These device have to be created manually -loop0 -loop1 -loop2 -loop3 -loop4 -loop5 -loop6 -loop7 -net/tun -ppp -lp0 -lp1 -lp2 -lp3 diff --git a/udev.spec b/udev.spec index 7784480..20aa86d 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 132 +Version: 133 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -162,7 +162,8 @@ done %endif for i in \ - rules/redhat/*.rules \ + rules/redhat/40-redhat.rules \ + rules/suse/40-suse.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -363,6 +364,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Nov 19 2008 Harald Hoyer 133-1 +- version 133 + * Mon Nov 10 2008 Harald Hoyer 132-1 - version 132 - added memory stick rules (bug #470096) From 70982ca94457a9402f2e7f0e25c8e4fb14518fe6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Dec 2008 10:22:49 +0000 Subject: [PATCH 441/640] - version 135 --- udev-118-sysconf.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 udev-118-sysconf.patch diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch deleted file mode 100644 index 30de6ab..0000000 --- a/udev-118-sysconf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules ---- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -6,6 +6,8 @@ - # forward scsi device event to corresponding block device - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules ---- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -2,6 +2,8 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" -+ - ACTION!="add|change", GOTO="persistent_storage_tape_end" - - # type 8 devices are "Medium Changers" From 5b6b2232ee9cb766021fd1e078283537dd94b83f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Dec 2008 10:22:49 +0000 Subject: [PATCH 442/640] - version 135 --- udev-118-sysconf.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 udev-118-sysconf.patch diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch deleted file mode 100644 index 30de6ab..0000000 --- a/udev-118-sysconf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules ---- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -6,6 +6,8 @@ - # forward scsi device event to corresponding block device - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules ---- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -2,6 +2,8 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" -+ - ACTION!="add|change", GOTO="persistent_storage_tape_end" - - # type 8 devices are "Medium Changers" From 7128d2cebc4114c9a23feef01b209f95fb980874 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Dec 2008 10:23:48 +0000 Subject: [PATCH 443/640] - version 135 --- .cvsignore | 2 +- sources | 2 +- udev-118-sysconf.patch | 24 +++++++++ udev-127-volid-raid.patch | 50 ------------------- udev-127-volume_id-include-config.h.patch | 12 ----- udev-132-memstickrules.patch | 11 ---- ...-127.tar.bz2.sign => udev-135.tar.bz2.sign | 6 +-- udev.spec | 8 +-- upstream | 2 +- 9 files changed, 34 insertions(+), 83 deletions(-) create mode 100644 udev-118-sysconf.patch delete mode 100644 udev-127-volid-raid.patch delete mode 100644 udev-127-volume_id-include-config.h.patch delete mode 100644 udev-132-memstickrules.patch rename udev-127.tar.bz2.sign => udev-135.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index 66dcd7e..565f528 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-133.tar.bz2 +udev-135.tar.bz2 diff --git a/sources b/sources index 52a0bda..b3ce601 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1fe77c4d76162f4b09bdc01becbc4295 udev-133.tar.bz2 +661b9df34e1304dad10f595d95b472bb udev-135.tar.bz2 diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch new file mode 100644 index 0000000..30de6ab --- /dev/null +++ b/udev-118-sysconf.patch @@ -0,0 +1,24 @@ +diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules +--- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 +@@ -6,6 +6,8 @@ + # forward scsi device event to corresponding block device + ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" ++ + ACTION!="add|change", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + +diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules +--- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 +@@ -2,6 +2,8 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" ++ + ACTION!="add|change", GOTO="persistent_storage_tape_end" + + # type 8 devices are "Medium Changers" diff --git a/udev-127-volid-raid.patch b/udev-127-volid-raid.patch deleted file mode 100644 index e63e667..0000000 --- a/udev-127-volid-raid.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up udev-127/extras/volume_id/lib/linux_raid.c.p1 udev-127/extras/volume_id/lib/linux_raid.c ---- udev-127/extras/volume_id/lib/linux_raid.c.p1 2008-08-28 23:20:07.000000000 +0200 -+++ udev-127/extras/volume_id/lib/linux_raid.c 2008-10-16 14:23:54.000000000 +0200 -@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct vo - { - 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) -- strcpy(id->type_version, "1.0"); -+ if (size > MD_RESERVED_BYTES) { -+ /* 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) { -+ strcpy(id->type_version, "1.0"); -+ return 0; -+ } -+ } - - /* version 1.1 at the start of the device */ -- else if (volume_id_probe_linux_raid1(id, off, size) == 0) -+ if (volume_id_probe_linux_raid1(id, off, size) == 0) { - strcpy(id->type_version, "1.1"); -+ return 0; -+ } - - /* version 1.2 at 4k offset from the start */ -- else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) -+ if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { - strcpy(id->type_version, "1.2"); -+ return 0; -+ } - -- else -- return -1; -- -- return 0; -+ return -1; - } diff --git a/udev-127-volume_id-include-config.h.patch b/udev-127-volume_id-include-config.h.patch deleted file mode 100644 index 405b446..0000000 --- a/udev-127-volume_id-include-config.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up udev-127/extras/volume_id/lib/util.c.p2 udev-127/extras/volume_id/lib/util.c ---- udev-127/extras/volume_id/lib/util.c.p2 2008-08-28 23:22:03.000000000 +0200 -+++ udev-127/extras/volume_id/lib/util.c 2008-10-16 14:24:17.000000000 +0200 -@@ -16,6 +16,8 @@ - # include - #endif - -+#include -+ - #include - #include - #include diff --git a/udev-132-memstickrules.patch b/udev-132-memstickrules.patch deleted file mode 100644 index 8c618b5..0000000 --- a/udev-132-memstickrules.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up udev-132/rules/redhat/40-redhat.rules.memstickrules udev-132/rules/redhat/40-redhat.rules ---- udev-132/rules/redhat/40-redhat.rules.memstickrules 2008-10-16 18:03:43.000000000 +0200 -+++ udev-132/rules/redhat/40-redhat.rules 2008-11-10 11:42:31.000000000 +0100 -@@ -25,3 +25,7 @@ KERNEL=="vcsa[0-9]*", OWNER="vc - KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" - - KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" -+ -+KERNEL=="mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" -+KERNEL=="mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" -+ diff --git a/udev-127.tar.bz2.sign b/udev-135.tar.bz2.sign similarity index 61% rename from udev-127.tar.bz2.sign rename to udev-135.tar.bz2.sign index 473f50d..7c3d5ca 100644 --- a/udev-127.tar.bz2.sign +++ b/udev-135.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBIuFtayGugalF9Dw4RApeuAJ9+7UghTzMsbLjLshA6+YxwGgM2FgCfbnj8 -ylD6q64gmtAMRzK4pebQbKg= -=41ir +iD8DBQBJNJNdyGugalF9Dw4RAg4uAJ9fpmhP/VtQJc1uP1w4268P8nBGAgCdHxQU +5nRE8nro4r16+VDfJ+CfqlA= +=+RMU -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 20aa86d..faf2422 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 133 +Version: 135 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -18,7 +18,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-132-memstickrules.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -91,7 +90,6 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -b .memstickrules %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -163,7 +161,6 @@ done for i in \ rules/redhat/40-redhat.rules \ - rules/suse/40-suse.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -364,6 +361,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 02 2008 Harald Hoyer 135-1 +- version 135 + * Wed Nov 19 2008 Harald Hoyer 133-1 - version 133 diff --git a/upstream b/upstream index 0a3c741..565f528 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-114.tar.bz2 +udev-135.tar.bz2 From 05f658140848cc2697ebe0b444ab60f6481844b6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 2 Dec 2008 10:23:48 +0000 Subject: [PATCH 444/640] - version 135 --- .cvsignore | 2 +- sources | 2 +- udev-118-sysconf.patch | 24 +++++++++ udev-127-volid-raid.patch | 50 ------------------- udev-127-volume_id-include-config.h.patch | 12 ----- udev-132-memstickrules.patch | 11 ---- ...-127.tar.bz2.sign => udev-135.tar.bz2.sign | 6 +-- udev.spec | 8 +-- upstream | 2 +- 9 files changed, 34 insertions(+), 83 deletions(-) create mode 100644 udev-118-sysconf.patch delete mode 100644 udev-127-volid-raid.patch delete mode 100644 udev-127-volume_id-include-config.h.patch delete mode 100644 udev-132-memstickrules.patch rename udev-127.tar.bz2.sign => udev-135.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index 66dcd7e..565f528 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-133.tar.bz2 +udev-135.tar.bz2 diff --git a/sources b/sources index 52a0bda..b3ce601 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1fe77c4d76162f4b09bdc01becbc4295 udev-133.tar.bz2 +661b9df34e1304dad10f595d95b472bb udev-135.tar.bz2 diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch new file mode 100644 index 0000000..30de6ab --- /dev/null +++ b/udev-118-sysconf.patch @@ -0,0 +1,24 @@ +diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules +--- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 +@@ -6,6 +6,8 @@ + # forward scsi device event to corresponding block device + ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" ++ + ACTION!="add|change", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + +diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules +--- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 ++++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 +@@ -2,6 +2,8 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + ++ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" ++ + ACTION!="add|change", GOTO="persistent_storage_tape_end" + + # type 8 devices are "Medium Changers" diff --git a/udev-127-volid-raid.patch b/udev-127-volid-raid.patch deleted file mode 100644 index e63e667..0000000 --- a/udev-127-volid-raid.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up udev-127/extras/volume_id/lib/linux_raid.c.p1 udev-127/extras/volume_id/lib/linux_raid.c ---- udev-127/extras/volume_id/lib/linux_raid.c.p1 2008-08-28 23:20:07.000000000 +0200 -+++ udev-127/extras/volume_id/lib/linux_raid.c 2008-10-16 14:23:54.000000000 +0200 -@@ -149,26 +149,31 @@ int volume_id_probe_linux_raid(struct vo - { - 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) -- strcpy(id->type_version, "1.0"); -+ if (size > MD_RESERVED_BYTES) { -+ /* 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) { -+ strcpy(id->type_version, "1.0"); -+ return 0; -+ } -+ } - - /* version 1.1 at the start of the device */ -- else if (volume_id_probe_linux_raid1(id, off, size) == 0) -+ if (volume_id_probe_linux_raid1(id, off, size) == 0) { - strcpy(id->type_version, "1.1"); -+ return 0; -+ } - - /* version 1.2 at 4k offset from the start */ -- else if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) -+ if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0) { - strcpy(id->type_version, "1.2"); -+ return 0; -+ } - -- else -- return -1; -- -- return 0; -+ return -1; - } diff --git a/udev-127-volume_id-include-config.h.patch b/udev-127-volume_id-include-config.h.patch deleted file mode 100644 index 405b446..0000000 --- a/udev-127-volume_id-include-config.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up udev-127/extras/volume_id/lib/util.c.p2 udev-127/extras/volume_id/lib/util.c ---- udev-127/extras/volume_id/lib/util.c.p2 2008-08-28 23:22:03.000000000 +0200 -+++ udev-127/extras/volume_id/lib/util.c 2008-10-16 14:24:17.000000000 +0200 -@@ -16,6 +16,8 @@ - # include - #endif - -+#include -+ - #include - #include - #include diff --git a/udev-132-memstickrules.patch b/udev-132-memstickrules.patch deleted file mode 100644 index 8c618b5..0000000 --- a/udev-132-memstickrules.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up udev-132/rules/redhat/40-redhat.rules.memstickrules udev-132/rules/redhat/40-redhat.rules ---- udev-132/rules/redhat/40-redhat.rules.memstickrules 2008-10-16 18:03:43.000000000 +0200 -+++ udev-132/rules/redhat/40-redhat.rules 2008-11-10 11:42:31.000000000 +0100 -@@ -25,3 +25,7 @@ KERNEL=="vcsa[0-9]*", OWNER="vc - KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" - - KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" -+ -+KERNEL=="mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" -+KERNEL=="mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" -+ diff --git a/udev-127.tar.bz2.sign b/udev-135.tar.bz2.sign similarity index 61% rename from udev-127.tar.bz2.sign rename to udev-135.tar.bz2.sign index 473f50d..7c3d5ca 100644 --- a/udev-127.tar.bz2.sign +++ b/udev-135.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBIuFtayGugalF9Dw4RApeuAJ9+7UghTzMsbLjLshA6+YxwGgM2FgCfbnj8 -ylD6q64gmtAMRzK4pebQbKg= -=41ir +iD8DBQBJNJNdyGugalF9Dw4RAg4uAJ9fpmhP/VtQJc1uP1w4268P8nBGAgCdHxQU +5nRE8nro4r16+VDfJ+CfqlA= +=+RMU -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 20aa86d..faf2422 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 133 +Version: 135 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -18,7 +18,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-132-memstickrules.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -91,7 +90,6 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -b .memstickrules %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -163,7 +161,6 @@ done for i in \ rules/redhat/40-redhat.rules \ - rules/suse/40-suse.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -364,6 +361,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 02 2008 Harald Hoyer 135-1 +- version 135 + * Wed Nov 19 2008 Harald Hoyer 133-1 - version 133 diff --git a/upstream b/upstream index 0a3c741..565f528 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-114.tar.bz2 +udev-135.tar.bz2 From 54b85c77f59e4bed21b09c4174100f5dcee563aa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 16 Dec 2008 09:31:55 +0000 Subject: [PATCH 445/640] /sbin/udevsettle -> /sbin/udevadm settle --- start_udev | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index 5af4599..8785c10 100755 --- a/start_udev +++ b/start_udev @@ -192,9 +192,9 @@ wait_for_queue() { local timeout=${1:-0} local ret=0 if [ $timeout -gt 0 ]; then - /sbin/udevsettle --timeout=$timeout + /sbin/udevadm settle --timeout=$timeout else - /sbin/udevsettle + /sbin/udevadm settle fi ret=$? if [ $ret -ne 0 ]; then From 00844ad8716d00397f2ae11a22a44d5f0c5113db Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 16 Dec 2008 09:31:55 +0000 Subject: [PATCH 446/640] /sbin/udevsettle -> /sbin/udevadm settle --- start_udev | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start_udev b/start_udev index 5af4599..8785c10 100755 --- a/start_udev +++ b/start_udev @@ -192,9 +192,9 @@ wait_for_queue() { local timeout=${1:-0} local ret=0 if [ $timeout -gt 0 ]; then - /sbin/udevsettle --timeout=$timeout + /sbin/udevadm settle --timeout=$timeout else - /sbin/udevsettle + /sbin/udevadm settle fi ret=$? if [ $ret -ne 0 ]; then From 0305ca6ecf0ebbea0f9b43ac401e54c0b526fe4c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 16 Dec 2008 09:42:56 +0000 Subject: [PATCH 447/640] - changed udevsettle -> udevadm settle - added doc to libudev-devel - added more attr and defattr - various rpmlint fixes --- udev.spec | 65 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/udev.spec b/udev.spec index faf2422..168d2be 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 135 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev-135-sepol.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -29,6 +30,7 @@ BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV %if %{with_static} BuildRequires: libselinux-static libsepol-static +BuildRequires: autoconf libtool %endif Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 @@ -90,24 +92,29 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%if %{with_static} +%patch1 -p1 -b .sepol +%endif %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules %build -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static %if %{with_static} -make LDFLAGS=-static %{?_smp_mflags} +libtoolize -f +autoreconf +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static +make LDFLAGS="-all-static" %{?_smp_mflags} for i in udev/udevd \ - udev/udevadm \ - extras/scsi_id/scsi_id \ - 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 - mv $i $i.static + udev/udevadm \ + extras/scsi_id/scsi_id \ + 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 + mv $i $i.static done make clean %endif @@ -157,6 +164,7 @@ done for i in udev/udevd udev/udevadm; do install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$(basename $i).static done + %endif for i in \ @@ -256,7 +264,7 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root) +%defattr(0644, root, root, 0755) %doc COPYING README TODO ChangeLog docs/* %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle @@ -295,7 +303,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules +%attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config @@ -323,22 +331,25 @@ rm -rf $RPM_BUILD_ROOT %if %{with_static} %files static +%defattr(0644, root, root, 0755) %doc COPYING %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevadm.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 -%attr(755,root,root) %{udev_scriptdir}/usb_id.static -%attr(755,root,root) %{udev_scriptdir}/vol_id.static +%attr(0755,root,root) %{udev_scriptdir}/scsi_id.static +%attr(0755,root,root) %{udev_scriptdir}/ata_id.static +%attr(0755,root,root) %{udev_scriptdir}/edd_id.static +%attr(0755,root,root) %{udev_scriptdir}/usb_id.static +%attr(0755,root,root) %{udev_scriptdir}/vol_id.static %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static %endif %files -n libvolume_id +%defattr(0644, root, root, 0755) %doc COPYING %attr(0755,root,root) /%{_lib}/libvolume_id.so.* %files -n libvolume_id-devel +%defattr(0644, root, root, 0755) %doc COPYING %defattr(0644, root, root, 0755) %{_includedir}/libvolume_id.h @@ -347,11 +358,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %files -n libudev0 -%defattr(-,root,root) -/%{_lib}/libudev.so.* +%defattr(0644, root, root, 0755) +%doc COPYING +%attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel -%defattr(-,root,root) +%defattr(0644, root, root, 0755) +%doc COPYING %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc @@ -361,6 +374,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 16 2008 Harald Hoyer 135-2 +- changed udevsettle -> udevadm settle +- added doc to libudev-devel +- added more attr and defattr +- various rpmlint fixes + * Tue Dec 02 2008 Harald Hoyer 135-1 - version 135 From 6e30c7cb5958717d471126c60a471f965fcd92d3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 16 Dec 2008 09:42:56 +0000 Subject: [PATCH 448/640] - changed udevsettle -> udevadm settle - added doc to libudev-devel - added more attr and defattr - various rpmlint fixes --- udev.spec | 65 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/udev.spec b/udev.spec index faf2422..168d2be 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 135 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,7 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev-135-sepol.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -29,6 +30,7 @@ BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV %if %{with_static} BuildRequires: libselinux-static libsepol-static +BuildRequires: autoconf libtool %endif Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 @@ -90,24 +92,29 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%if %{with_static} +%patch1 -p1 -b .sepol +%endif %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules %build -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static %if %{with_static} -make LDFLAGS=-static %{?_smp_mflags} +libtoolize -f +autoreconf +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static +make LDFLAGS="-all-static" %{?_smp_mflags} for i in udev/udevd \ - udev/udevadm \ - extras/scsi_id/scsi_id \ - 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 - mv $i $i.static + udev/udevadm \ + extras/scsi_id/scsi_id \ + 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 + mv $i $i.static done make clean %endif @@ -157,6 +164,7 @@ done for i in udev/udevd udev/udevadm; do install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$(basename $i).static done + %endif for i in \ @@ -256,7 +264,7 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root) +%defattr(0644, root, root, 0755) %doc COPYING README TODO ChangeLog docs/* %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle @@ -295,7 +303,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%config %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules +%attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules #%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config @@ -323,22 +331,25 @@ rm -rf $RPM_BUILD_ROOT %if %{with_static} %files static +%defattr(0644, root, root, 0755) %doc COPYING %attr(0755,root,root) /sbin/udevd.static %attr(0755,root,root) /sbin/udevadm.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 -%attr(755,root,root) %{udev_scriptdir}/usb_id.static -%attr(755,root,root) %{udev_scriptdir}/vol_id.static +%attr(0755,root,root) %{udev_scriptdir}/scsi_id.static +%attr(0755,root,root) %{udev_scriptdir}/ata_id.static +%attr(0755,root,root) %{udev_scriptdir}/edd_id.static +%attr(0755,root,root) %{udev_scriptdir}/usb_id.static +%attr(0755,root,root) %{udev_scriptdir}/vol_id.static %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static %endif %files -n libvolume_id +%defattr(0644, root, root, 0755) %doc COPYING %attr(0755,root,root) /%{_lib}/libvolume_id.so.* %files -n libvolume_id-devel +%defattr(0644, root, root, 0755) %doc COPYING %defattr(0644, root, root, 0755) %{_includedir}/libvolume_id.h @@ -347,11 +358,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libvolume_id.pc %files -n libudev0 -%defattr(-,root,root) -/%{_lib}/libudev.so.* +%defattr(0644, root, root, 0755) +%doc COPYING +%attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel -%defattr(-,root,root) +%defattr(0644, root, root, 0755) +%doc COPYING %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc @@ -361,6 +374,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 16 2008 Harald Hoyer 135-2 +- changed udevsettle -> udevadm settle +- added doc to libudev-devel +- added more attr and defattr +- various rpmlint fixes + * Tue Dec 02 2008 Harald Hoyer 135-1 - version 135 From 186679e9be6c125bd12e69972f0c4f1db45149f6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 16 Dec 2008 16:04:52 +0000 Subject: [PATCH 449/640] - added sepol patch --- udev-135-sepol.patch | 17 +++++++++++++++++ udev.spec | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 udev-135-sepol.patch diff --git a/udev-135-sepol.patch b/udev-135-sepol.patch new file mode 100644 index 0000000..32c9afb --- /dev/null +++ b/udev-135-sepol.patch @@ -0,0 +1,17 @@ +diff -up udev-135/configure.ac.sepol udev-135/configure.ac +--- udev-135/configure.ac.sepol 2008-12-02 01:05:43.000000000 +0100 ++++ udev-135/configure.ac 2008-12-16 10:45:24.000000000 +0100 +@@ -55,6 +55,13 @@ if test "x$with_selinux" = xyes; then + AC_DEFINE(USE_SELINUX, [1] ,[compile with SELinux support]) + SELINUX_LIBS="-lselinux" + fi ++if test "x$with_selinux" = xyes; then ++ LIBS_save=$LIBS ++ AC_CHECK_LIB(sepol, sepol_genbools, ++ [SELINUX_LIBS="$SELINUX_LIBS -lsepol"], ++ []) ++ LIBS=$LIBS_save ++fi + AC_SUBST([SELINUX_LIBS]) + AM_CONDITIONAL(USE_SELINUX, [test "x$with_selinux" = xyes], [compile with SELinux support]) + diff --git a/udev.spec b/udev.spec index 168d2be..f76b926 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 135 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -374,6 +374,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 16 2008 Harald Hoyer 135-3 +- added sepol patch + * Tue Dec 16 2008 Harald Hoyer 135-2 - changed udevsettle -> udevadm settle - added doc to libudev-devel From b5dbf93f17ae1631d0e9653990f258e4ca116c17 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 16 Dec 2008 16:04:52 +0000 Subject: [PATCH 450/640] - added sepol patch --- udev-135-sepol.patch | 17 +++++++++++++++++ udev.spec | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 udev-135-sepol.patch diff --git a/udev-135-sepol.patch b/udev-135-sepol.patch new file mode 100644 index 0000000..32c9afb --- /dev/null +++ b/udev-135-sepol.patch @@ -0,0 +1,17 @@ +diff -up udev-135/configure.ac.sepol udev-135/configure.ac +--- udev-135/configure.ac.sepol 2008-12-02 01:05:43.000000000 +0100 ++++ udev-135/configure.ac 2008-12-16 10:45:24.000000000 +0100 +@@ -55,6 +55,13 @@ if test "x$with_selinux" = xyes; then + AC_DEFINE(USE_SELINUX, [1] ,[compile with SELinux support]) + SELINUX_LIBS="-lselinux" + fi ++if test "x$with_selinux" = xyes; then ++ LIBS_save=$LIBS ++ AC_CHECK_LIB(sepol, sepol_genbools, ++ [SELINUX_LIBS="$SELINUX_LIBS -lsepol"], ++ []) ++ LIBS=$LIBS_save ++fi + AC_SUBST([SELINUX_LIBS]) + AM_CONDITIONAL(USE_SELINUX, [test "x$with_selinux" = xyes], [compile with SELinux support]) + diff --git a/udev.spec b/udev.spec index 168d2be..f76b926 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 135 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -374,6 +374,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 16 2008 Harald Hoyer 135-3 +- added sepol patch + * Tue Dec 16 2008 Harald Hoyer 135-2 - changed udevsettle -> udevadm settle - added doc to libudev-devel From 1e8bee80172f16c820b8c672117fd902a92c25f3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jan 2009 11:16:28 +0000 Subject: [PATCH 451/640] test for restorecon before using it --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 8785c10..530c3c1 100755 --- a/start_udev +++ b/start_udev @@ -128,7 +128,7 @@ make_extra_nodes () { /bin/chown root:lp /dev/lp2 /bin/mknod -m 0660 /dev/lp3 c 6 3 /bin/chown root:lp /dev/lp3 - /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 + [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do From 975b6aaa58b34eaba97fc16ad0e37b1f2cc4c238 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jan 2009 11:16:28 +0000 Subject: [PATCH 452/640] test for restorecon before using it --- start_udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 8785c10..530c3c1 100755 --- a/start_udev +++ b/start_udev @@ -128,7 +128,7 @@ make_extra_nodes () { /bin/chown root:lp /dev/lp2 /bin/mknod -m 0660 /dev/lp3 c 6 3 /bin/chown root:lp /dev/lp3 - /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 + [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do From a97f8f1ef5f9fda6d95b51ae6e9f1692c9ad2caa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jan 2009 11:58:53 +0000 Subject: [PATCH 453/640] - test for restorecon in start_udev before it is used (bug #480608) - added groups video audio cdrom tape dialout in post (might be moved to MAKEDEV) - version 136 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 30 ++++++++++++++++++++---------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.cvsignore b/.cvsignore index 565f528..634ab85 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-135.tar.bz2 +udev-136.tar.bz2 diff --git a/sources b/sources index b3ce601..75739d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -661b9df34e1304dad10f595d95b472bb udev-135.tar.bz2 +9a27ccd96cf8d529c4e424520547b72a udev-136.tar.bz2 diff --git a/udev.spec b/udev.spec index f76b926..05a2b0f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 135 -Release: 3%{?dist} +Version: 136 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,14 +18,13 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-135-sepol.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service -Requires(pre): MAKEDEV >= 0:3.11 +Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV %if %{with_static} @@ -89,19 +88,13 @@ Requires: libudev0 = %{version}-%{release} This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. - %prep %setup -q -%if %{with_static} -%patch1 -p1 -b .sepol -%endif %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules %build %if %{with_static} -libtoolize -f -autoreconf %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static make LDFLAGS="-all-static" %{?_smp_mflags} for i in udev/udevd \ @@ -117,6 +110,8 @@ for i in udev/udevd \ mv $i $i.static done make clean +%else +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" %endif make %{?_smp_mflags} @@ -232,6 +227,15 @@ if [ "$1" -gt 1 -a -x /sbin/pidof ]; then fi /sbin/chkconfig --add udev-post + +# to be removed after F10 EOL (and for RHEL-6) +getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : +getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : +# to be kept +getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : +getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : +getent group dialout >/dev/null || /usr/sbin/groupadd -g 87 dialout || : + exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -374,6 +378,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 20 2009 Harald Hoyer 136-1 +- test for restorecon in start_udev before it is used (bug #480608) +- added groups video audio cdrom tape dialout in post + (might be moved to MAKEDEV) +- version 136 + * Tue Dec 16 2008 Harald Hoyer 135-3 - added sepol patch From 80a542a733590891928bf5aa302cef3fe942ed9c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jan 2009 11:58:53 +0000 Subject: [PATCH 454/640] - test for restorecon in start_udev before it is used (bug #480608) - added groups video audio cdrom tape dialout in post (might be moved to MAKEDEV) - version 136 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 30 ++++++++++++++++++++---------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.cvsignore b/.cvsignore index 565f528..634ab85 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-135.tar.bz2 +udev-136.tar.bz2 diff --git a/sources b/sources index b3ce601..75739d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -661b9df34e1304dad10f595d95b472bb udev-135.tar.bz2 +9a27ccd96cf8d529c4e424520547b72a udev-136.tar.bz2 diff --git a/udev.spec b/udev.spec index f76b926..05a2b0f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 135 -Release: 3%{?dist} +Version: 136 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,14 +18,13 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-135-sepol.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service -Requires(pre): MAKEDEV >= 0:3.11 +Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV %if %{with_static} @@ -89,19 +88,13 @@ Requires: libudev0 = %{version}-%{release} This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. - %prep %setup -q -%if %{with_static} -%patch1 -p1 -b .sepol -%endif %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules %build %if %{with_static} -libtoolize -f -autoreconf %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static make LDFLAGS="-all-static" %{?_smp_mflags} for i in udev/udevd \ @@ -117,6 +110,8 @@ for i in udev/udevd \ mv $i $i.static done make clean +%else +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" %endif make %{?_smp_mflags} @@ -232,6 +227,15 @@ if [ "$1" -gt 1 -a -x /sbin/pidof ]; then fi /sbin/chkconfig --add udev-post + +# to be removed after F10 EOL (and for RHEL-6) +getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : +getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : +# to be kept +getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : +getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : +getent group dialout >/dev/null || /usr/sbin/groupadd -g 87 dialout || : + exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -374,6 +378,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 20 2009 Harald Hoyer 136-1 +- test for restorecon in start_udev before it is used (bug #480608) +- added groups video audio cdrom tape dialout in post + (might be moved to MAKEDEV) +- version 136 + * Tue Dec 16 2008 Harald Hoyer 135-3 - added sepol patch From b88dfa1ae4e603a127037113da2bf52ecf6bd27f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jan 2009 12:17:14 +0000 Subject: [PATCH 455/640] - added some rule fixes, which will be in udev-137 --- udev-136-cdrom.patch | 21 +++++++++++++++++++++ udev-136-tape.patch | 23 +++++++++++++++++++++++ udev-136-video.patch | 20 ++++++++++++++++++++ udev.spec | 13 ++++++++++++- 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 udev-136-cdrom.patch create mode 100644 udev-136-tape.patch create mode 100644 udev-136-video.patch diff --git a/udev-136-cdrom.patch b/udev-136-cdrom.patch new file mode 100644 index 0000000..1ceaa44 --- /dev/null +++ b/udev-136-cdrom.patch @@ -0,0 +1,21 @@ +commit 18cff5c3b2e3591fa46107288ea2d7026a15ccf3 +Author: Kay Sievers +Date: Sat Jan 10 17:44:09 2009 +0100 + + rules: fix typo in ide cd rule + + Thanks to Scott, who found that. + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index 119941b..7730f0d 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -68,7 +68,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitio + + # cdrom + SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" +-SUBSYSTEM=="block", KERNEL=="hd[0-9]*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" ++SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" + SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" + KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom" + KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom" diff --git a/udev-136-tape.patch b/udev-136-tape.patch new file mode 100644 index 0000000..93bcbd1 --- /dev/null +++ b/udev-136-tape.patch @@ -0,0 +1,23 @@ +commit 8b739dec53f8bca23e46e2d2a9732abee9b8d591 +Author: Lennart Poettering +Date: Sat Jan 10 01:37:03 2009 +0100 + + fix naming for tape nst devices in /dev/tape/by-path/ + + $env{ID_PATH} includes the "-nst" suffix anyway, so we shouldn't append + it a second time as part of the rule creating the device file symlink. + + Signed-off-by: Lennart Poettering + +diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules +index d3226f1..8d53888 100644 +--- a/rules/rules.d/60-persistent-storage-tape.rules ++++ b/rules/rules.d/60-persistent-storage-tape.rules +@@ -19,6 +19,6 @@ KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$en + # by-path (parent device path) + KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p" + KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" +-KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" ++KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" + + LABEL="persistent_storage_tape_end" diff --git a/udev-136-video.patch b/udev-136-video.patch new file mode 100644 index 0000000..dd9d31a --- /dev/null +++ b/udev-136-video.patch @@ -0,0 +1,20 @@ +commit 66d9b44f8302efe383ada6a52d8431655614bf76 +Author: Kay Sievers +Date: Thu Jan 15 17:06:14 2009 +0100 + + rules: add drm devices to group "video" + + https://bugs.launchpad.net/bugs/317430 + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index 7730f0d..95d82d7 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -38,6 +38,7 @@ KERNEL=="card[0-9]*", NAME="dri/%k" + KERNEL=="pmu", GROUP="video" + KERNEL=="nvidia*|nvidiactl*", GROUP="video" + SUBSYSTEM=="graphics", GROUP="video" ++SUBSYSTEM=="drm", GROUP="video" + + # DVB (video) + SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video" diff --git a/udev.spec b/udev.spec index 05a2b0f..cb2de4e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 136 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,10 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev-136-tape.patch +Patch2: udev-136-cdrom.patch +Patch3: udev-136-video.patch + Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -90,6 +94,10 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -378,6 +386,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 20 2009 Harald Hoyer 136-2 +- added some rule fixes, which will be in udev-137 + * Tue Jan 20 2009 Harald Hoyer 136-1 - test for restorecon in start_udev before it is used (bug #480608) - added groups video audio cdrom tape dialout in post From e4cfa15239f00f165548d3eb67e5f3a81329cd86 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jan 2009 12:17:14 +0000 Subject: [PATCH 456/640] - added some rule fixes, which will be in udev-137 --- udev-136-cdrom.patch | 21 +++++++++++++++++++++ udev-136-tape.patch | 23 +++++++++++++++++++++++ udev-136-video.patch | 20 ++++++++++++++++++++ udev.spec | 13 ++++++++++++- 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 udev-136-cdrom.patch create mode 100644 udev-136-tape.patch create mode 100644 udev-136-video.patch diff --git a/udev-136-cdrom.patch b/udev-136-cdrom.patch new file mode 100644 index 0000000..1ceaa44 --- /dev/null +++ b/udev-136-cdrom.patch @@ -0,0 +1,21 @@ +commit 18cff5c3b2e3591fa46107288ea2d7026a15ccf3 +Author: Kay Sievers +Date: Sat Jan 10 17:44:09 2009 +0100 + + rules: fix typo in ide cd rule + + Thanks to Scott, who found that. + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index 119941b..7730f0d 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -68,7 +68,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitio + + # cdrom + SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" +-SUBSYSTEM=="block", KERNEL=="hd[0-9]*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" ++SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" + SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" + KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom" + KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom" diff --git a/udev-136-tape.patch b/udev-136-tape.patch new file mode 100644 index 0000000..93bcbd1 --- /dev/null +++ b/udev-136-tape.patch @@ -0,0 +1,23 @@ +commit 8b739dec53f8bca23e46e2d2a9732abee9b8d591 +Author: Lennart Poettering +Date: Sat Jan 10 01:37:03 2009 +0100 + + fix naming for tape nst devices in /dev/tape/by-path/ + + $env{ID_PATH} includes the "-nst" suffix anyway, so we shouldn't append + it a second time as part of the rule creating the device file symlink. + + Signed-off-by: Lennart Poettering + +diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules +index d3226f1..8d53888 100644 +--- a/rules/rules.d/60-persistent-storage-tape.rules ++++ b/rules/rules.d/60-persistent-storage-tape.rules +@@ -19,6 +19,6 @@ KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$en + # by-path (parent device path) + KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p" + KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" +-KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" ++KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" + + LABEL="persistent_storage_tape_end" diff --git a/udev-136-video.patch b/udev-136-video.patch new file mode 100644 index 0000000..dd9d31a --- /dev/null +++ b/udev-136-video.patch @@ -0,0 +1,20 @@ +commit 66d9b44f8302efe383ada6a52d8431655614bf76 +Author: Kay Sievers +Date: Thu Jan 15 17:06:14 2009 +0100 + + rules: add drm devices to group "video" + + https://bugs.launchpad.net/bugs/317430 + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index 7730f0d..95d82d7 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -38,6 +38,7 @@ KERNEL=="card[0-9]*", NAME="dri/%k" + KERNEL=="pmu", GROUP="video" + KERNEL=="nvidia*|nvidiactl*", GROUP="video" + SUBSYSTEM=="graphics", GROUP="video" ++SUBSYSTEM=="drm", GROUP="video" + + # DVB (video) + SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video" diff --git a/udev.spec b/udev.spec index 05a2b0f..cb2de4e 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 136 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,10 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev-136-tape.patch +Patch2: udev-136-cdrom.patch +Patch3: udev-136-video.patch + Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -90,6 +94,10 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -378,6 +386,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 20 2009 Harald Hoyer 136-2 +- added some rule fixes, which will be in udev-137 + * Tue Jan 20 2009 Harald Hoyer 136-1 - test for restorecon in start_udev before it is used (bug #480608) - added groups video audio cdrom tape dialout in post From 16c3d8a2e9817d4363a5ef4530eb3507dbce85b0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 29 Jan 2009 11:49:39 +0000 Subject: [PATCH 457/640] - version 137 - add vol_id patches from kzak - dialout group has gid 18 now --- .cvsignore | 2 +- sources | 2 +- udev-137-vol_id1.patch | 20 +++++++++++++ udev-137-vol_id2.patch | 30 +++++++++++++++++++ ...-135.tar.bz2.sign => udev-137.tar.bz2.sign | 6 ++-- udev.spec | 22 +++++++------- upstream | 2 +- 7 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 udev-137-vol_id1.patch create mode 100644 udev-137-vol_id2.patch rename udev-135.tar.bz2.sign => udev-137.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index 634ab85..260ace6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-136.tar.bz2 +udev-137.tar.bz2 diff --git a/sources b/sources index 75739d3..0abe86b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9a27ccd96cf8d529c4e424520547b72a udev-136.tar.bz2 +9d5960024da9c80b54c8273ee05b31e1 udev-137.tar.bz2 diff --git a/udev-137-vol_id1.patch b/udev-137-vol_id1.patch new file mode 100644 index 0000000..41f7403 --- /dev/null +++ b/udev-137-vol_id1.patch @@ -0,0 +1,20 @@ +commit 7e5861ff70994fdc2e383e227ff24225ac5f7ce5 +Author: Karel Zak +Date: Sat Jan 24 00:37:23 2009 +0100 + + vol_id: add missing id->type to swap0 + + Signed-off-by: Karel Zak + +diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c +index 1698e9d..53649bd 100644 +--- a/extras/volume_id/lib/linux_swap.c ++++ b/extras/volume_id/lib/linux_swap.c +@@ -57,6 +57,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size + return -1; + + if (memcmp(buf, "SWAP-SPACE", 10) == 0) { ++ id->type = "swap"; + strcpy(id->type_version, "1"); + goto found; + } diff --git a/udev-137-vol_id2.patch b/udev-137-vol_id2.patch new file mode 100644 index 0000000..34815ca --- /dev/null +++ b/udev-137-vol_id2.patch @@ -0,0 +1,30 @@ +commit 3e2084614b4d8308d5c0ceb34ec3634eb3353c00 +Author: Karel Zak +Date: Sat Jan 24 00:37:22 2009 +0100 + + vol_id: fix ddf version string + + The version string in DDF suberblock does not include the null terminator + and the snprintf() function writes at most "size" bytes *including* the + null byte. + + old version: + ID_FS_VERSION=02.00.0 + new version: + ID_FS_VERSION=02.00.00 + + Signed-off-by: Karel Zak + +diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c +index 58bdae9..32f20ce 100644 +--- a/extras/volume_id/lib/ddf_raid.c ++++ b/extras/volume_id/lib/ddf_raid.c +@@ -87,7 +87,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + found: + volume_id_set_uuid(id, ddf->guid, DDF_GUID_LENGTH, UUID_STRING); +- snprintf(id->type_version, DDF_REV_LENGTH, "%s", ddf->ddf_rev); ++ snprintf(id->type_version, DDF_REV_LENGTH + 1, "%s", ddf->ddf_rev); + volume_id_set_usage(id, VOLUME_ID_RAID); + id->type = "ddf_raid_member"; + return 0; diff --git a/udev-135.tar.bz2.sign b/udev-137.tar.bz2.sign similarity index 61% rename from udev-135.tar.bz2.sign rename to udev-137.tar.bz2.sign index 7c3d5ca..bde1723 100644 --- a/udev-135.tar.bz2.sign +++ b/udev-137.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBJNJNdyGugalF9Dw4RAg4uAJ9fpmhP/VtQJc1uP1w4268P8nBGAgCdHxQU -5nRE8nro4r16+VDfJ+CfqlA= -=+RMU +iD8DBQBJeTdlyGugalF9Dw4RAolBAJ9sKq3V9mpanhvpOMkYXky7DwF7sACgg0N4 +SsPqKyBV4nkSMxxLQwxJEdw= +=PEri -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index cb2de4e..74540c7 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 136 -Release: 2%{?dist} +Version: 137 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,10 +18,8 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-136-tape.patch -Patch2: udev-136-cdrom.patch -Patch3: udev-136-video.patch - +Patch1: udev-137-vol_id1.patch +Patch2: udev-137-vol_id2.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -94,10 +92,9 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch1 -p1 +%patch2 -p1 %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -242,7 +239,7 @@ getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : # to be kept getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : -getent group dialout >/dev/null || /usr/sbin/groupadd -g 87 dialout || : +getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : exit 0 @@ -386,6 +383,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 29 2009 Harald Hoyer 137-1 +- version 137 +- add vol_id patches from kzak +- dialout group has gid 18 now + * Tue Jan 20 2009 Harald Hoyer 136-2 - added some rule fixes, which will be in udev-137 diff --git a/upstream b/upstream index 565f528..260ace6 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-135.tar.bz2 +udev-137.tar.bz2 From 4db620ffcdb84402aa6ba7c3e1574dc048d8c60c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 29 Jan 2009 11:49:39 +0000 Subject: [PATCH 458/640] - version 137 - add vol_id patches from kzak - dialout group has gid 18 now --- .cvsignore | 2 +- sources | 2 +- udev-137-vol_id1.patch | 20 +++++++++++++ udev-137-vol_id2.patch | 30 +++++++++++++++++++ ...-135.tar.bz2.sign => udev-137.tar.bz2.sign | 6 ++-- udev.spec | 22 +++++++------- upstream | 2 +- 7 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 udev-137-vol_id1.patch create mode 100644 udev-137-vol_id2.patch rename udev-135.tar.bz2.sign => udev-137.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index 634ab85..260ace6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-136.tar.bz2 +udev-137.tar.bz2 diff --git a/sources b/sources index 75739d3..0abe86b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9a27ccd96cf8d529c4e424520547b72a udev-136.tar.bz2 +9d5960024da9c80b54c8273ee05b31e1 udev-137.tar.bz2 diff --git a/udev-137-vol_id1.patch b/udev-137-vol_id1.patch new file mode 100644 index 0000000..41f7403 --- /dev/null +++ b/udev-137-vol_id1.patch @@ -0,0 +1,20 @@ +commit 7e5861ff70994fdc2e383e227ff24225ac5f7ce5 +Author: Karel Zak +Date: Sat Jan 24 00:37:23 2009 +0100 + + vol_id: add missing id->type to swap0 + + Signed-off-by: Karel Zak + +diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c +index 1698e9d..53649bd 100644 +--- a/extras/volume_id/lib/linux_swap.c ++++ b/extras/volume_id/lib/linux_swap.c +@@ -57,6 +57,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size + return -1; + + if (memcmp(buf, "SWAP-SPACE", 10) == 0) { ++ id->type = "swap"; + strcpy(id->type_version, "1"); + goto found; + } diff --git a/udev-137-vol_id2.patch b/udev-137-vol_id2.patch new file mode 100644 index 0000000..34815ca --- /dev/null +++ b/udev-137-vol_id2.patch @@ -0,0 +1,30 @@ +commit 3e2084614b4d8308d5c0ceb34ec3634eb3353c00 +Author: Karel Zak +Date: Sat Jan 24 00:37:22 2009 +0100 + + vol_id: fix ddf version string + + The version string in DDF suberblock does not include the null terminator + and the snprintf() function writes at most "size" bytes *including* the + null byte. + + old version: + ID_FS_VERSION=02.00.0 + new version: + ID_FS_VERSION=02.00.00 + + Signed-off-by: Karel Zak + +diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c +index 58bdae9..32f20ce 100644 +--- a/extras/volume_id/lib/ddf_raid.c ++++ b/extras/volume_id/lib/ddf_raid.c +@@ -87,7 +87,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) + return -1; + found: + volume_id_set_uuid(id, ddf->guid, DDF_GUID_LENGTH, UUID_STRING); +- snprintf(id->type_version, DDF_REV_LENGTH, "%s", ddf->ddf_rev); ++ snprintf(id->type_version, DDF_REV_LENGTH + 1, "%s", ddf->ddf_rev); + volume_id_set_usage(id, VOLUME_ID_RAID); + id->type = "ddf_raid_member"; + return 0; diff --git a/udev-135.tar.bz2.sign b/udev-137.tar.bz2.sign similarity index 61% rename from udev-135.tar.bz2.sign rename to udev-137.tar.bz2.sign index 7c3d5ca..bde1723 100644 --- a/udev-135.tar.bz2.sign +++ b/udev-137.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBJNJNdyGugalF9Dw4RAg4uAJ9fpmhP/VtQJc1uP1w4268P8nBGAgCdHxQU -5nRE8nro4r16+VDfJ+CfqlA= -=+RMU +iD8DBQBJeTdlyGugalF9Dw4RAolBAJ9sKq3V9mpanhvpOMkYXky7DwF7sACgg0N4 +SsPqKyBV4nkSMxxLQwxJEdw= +=PEri -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index cb2de4e..74540c7 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 136 -Release: 2%{?dist} +Version: 137 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,10 +18,8 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-136-tape.patch -Patch2: udev-136-cdrom.patch -Patch3: udev-136-video.patch - +Patch1: udev-137-vol_id1.patch +Patch2: udev-137-vol_id2.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -94,10 +92,9 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch1 -p1 +%patch2 -p1 %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -242,7 +239,7 @@ getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : # to be kept getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : -getent group dialout >/dev/null || /usr/sbin/groupadd -g 87 dialout || : +getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : exit 0 @@ -386,6 +383,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 29 2009 Harald Hoyer 137-1 +- version 137 +- add vol_id patches from kzak +- dialout group has gid 18 now + * Tue Jan 20 2009 Harald Hoyer 136-2 - added some rule fixes, which will be in udev-137 diff --git a/upstream b/upstream index 565f528..260ace6 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-135.tar.bz2 +udev-137.tar.bz2 From 67d1ec9319b5279fbebc0bf5bb2ea1dde023865c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 30 Jan 2009 09:26:48 +0000 Subject: [PATCH 459/640] - moved groupadd to pre section (bug #483089) --- udev.spec | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/udev.spec b/udev.spec index 74540c7..d231ccc 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -222,6 +222,15 @@ if [ "$1" -eq 0 ]; then fi exit 0 +%pre +# to be removed after F10 EOL (and for RHEL-6) +getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : +getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : +# to be kept +getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : +getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : +getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : + %post if [ "$1" -gt 1 -a -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) @@ -232,15 +241,6 @@ if [ "$1" -gt 1 -a -x /sbin/pidof ]; then fi /sbin/chkconfig --add udev-post - -# to be removed after F10 EOL (and for RHEL-6) -getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : -getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : -# to be kept -getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : -getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : -getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : - exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -383,6 +383,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 30 2009 Harald Hoyer 137-2 +- moved groupadd to pre section (bug #483089) + * Thu Jan 29 2009 Harald Hoyer 137-1 - version 137 - add vol_id patches from kzak From 021d639f1a6d7befaff1e93662cd253c6a1e829f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 30 Jan 2009 09:26:48 +0000 Subject: [PATCH 460/640] - moved groupadd to pre section (bug #483089) --- udev.spec | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/udev.spec b/udev.spec index 74540c7..d231ccc 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -222,6 +222,15 @@ if [ "$1" -eq 0 ]; then fi exit 0 +%pre +# to be removed after F10 EOL (and for RHEL-6) +getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : +getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : +# to be kept +getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : +getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : +getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : + %post if [ "$1" -gt 1 -a -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) @@ -232,15 +241,6 @@ if [ "$1" -gt 1 -a -x /sbin/pidof ]; then fi /sbin/chkconfig --add udev-post - -# to be removed after F10 EOL (and for RHEL-6) -getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : -getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : -# to be kept -getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : -getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : -getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : - exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -383,6 +383,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 30 2009 Harald Hoyer 137-2 +- moved groupadd to pre section (bug #483089) + * Thu Jan 29 2009 Harald Hoyer 137-1 - version 137 - add vol_id patches from kzak From 18ab8dfd4e180afac0b7d2a162fc288948c01023 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Feb 2009 07:35:24 +0000 Subject: [PATCH 461/640] - added 5 second sleep for "modprobedebug" to catch bad modules --- start_udev | 2 ++ udev.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 530c3c1..8e9228f 100755 --- a/start_udev +++ b/start_udev @@ -296,6 +296,8 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo findalias /sys | while read modules ; do if [ -n "$modules" ]; then + echo "Loading modules for $modules in 5 seconds" + sleep 5 /sbin/modprobe -a -v -q $modules wait_for_queue $udevtimeout fi diff --git a/udev.spec b/udev.spec index d231ccc..31213f4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -383,6 +383,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 05 2009 Harald Hoyer 137-3 +- added 5 second sleep for "modprobedebug" to catch bad modules + * Fri Jan 30 2009 Harald Hoyer 137-2 - moved groupadd to pre section (bug #483089) From fe7fc4b385d7a921c25314e5a0efc1ba544675c2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Feb 2009 07:35:24 +0000 Subject: [PATCH 462/640] - added 5 second sleep for "modprobedebug" to catch bad modules --- start_udev | 2 ++ udev.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index 530c3c1..8e9228f 100755 --- a/start_udev +++ b/start_udev @@ -296,6 +296,8 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo findalias /sys | while read modules ; do if [ -n "$modules" ]; then + echo "Loading modules for $modules in 5 seconds" + sleep 5 /sbin/modprobe -a -v -q $modules wait_for_queue $udevtimeout fi diff --git a/udev.spec b/udev.spec index d231ccc..31213f4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -383,6 +383,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 05 2009 Harald Hoyer 137-3 +- added 5 second sleep for "modprobedebug" to catch bad modules + * Fri Jan 30 2009 Harald Hoyer 137-2 - moved groupadd to pre section (bug #483089) From 6f3c896370ce8ebac497eb85e93e5d07f970269d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Feb 2009 07:49:49 +0000 Subject: [PATCH 463/640] - fixed md change/remove event handling --- udev-137-mdremove.patch | 13 +++++++++++++ udev.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 udev-137-mdremove.patch diff --git a/udev-137-mdremove.patch b/udev-137-mdremove.patch new file mode 100644 index 0000000..d144bd6 --- /dev/null +++ b/udev-137-mdremove.patch @@ -0,0 +1,13 @@ +diff -up udev-137/rules/packages/64-md-raid.rules.mdremove udev-137/rules/packages/64-md-raid.rules +--- udev-137/rules/packages/64-md-raid.rules.mdremove 2009-02-05 08:47:35.000000000 +0100 ++++ udev-137/rules/packages/64-md-raid.rules 2009-02-05 08:47:58.000000000 +0100 +@@ -11,7 +11,8 @@ KERNEL!="md*", GOTO="md_end" + # container devices have a metadata version of e.g. 'external:ddf' and + # never leave state 'inactive' + ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" +-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" ++ATTR{md/array_state}=="clear|inactive", GOTO="md_end" ++ATTR{md/array_state}!="?*", GOTO="md_end" + LABEL="md_ignore_state" + + IMPORT{program}="/sbin/mdadm --detail --export $tempnode" diff --git a/udev.spec b/udev.spec index 31213f4..5676485 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,7 @@ Source5: udev.sysconfig Patch1: udev-137-vol_id1.patch Patch2: udev-137-vol_id2.patch +Patch3: udev-137-mdremove.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -95,6 +96,7 @@ dynamic library, which provides access to udev device information. %patch1 -p1 %patch2 -p1 +%patch3 -p1 .remove %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -383,6 +385,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 05 2009 Harald Hoyer 137-4 +- fixed md change/remove event handling + * Thu Feb 05 2009 Harald Hoyer 137-3 - added 5 second sleep for "modprobedebug" to catch bad modules From b0b79fa1f4c0ffea76e2be7cdfe058617f2345ee Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Feb 2009 07:49:49 +0000 Subject: [PATCH 464/640] - fixed md change/remove event handling --- udev-137-mdremove.patch | 13 +++++++++++++ udev.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 udev-137-mdremove.patch diff --git a/udev-137-mdremove.patch b/udev-137-mdremove.patch new file mode 100644 index 0000000..d144bd6 --- /dev/null +++ b/udev-137-mdremove.patch @@ -0,0 +1,13 @@ +diff -up udev-137/rules/packages/64-md-raid.rules.mdremove udev-137/rules/packages/64-md-raid.rules +--- udev-137/rules/packages/64-md-raid.rules.mdremove 2009-02-05 08:47:35.000000000 +0100 ++++ udev-137/rules/packages/64-md-raid.rules 2009-02-05 08:47:58.000000000 +0100 +@@ -11,7 +11,8 @@ KERNEL!="md*", GOTO="md_end" + # container devices have a metadata version of e.g. 'external:ddf' and + # never leave state 'inactive' + ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" +-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" ++ATTR{md/array_state}=="clear|inactive", GOTO="md_end" ++ATTR{md/array_state}!="?*", GOTO="md_end" + LABEL="md_ignore_state" + + IMPORT{program}="/sbin/mdadm --detail --export $tempnode" diff --git a/udev.spec b/udev.spec index 31213f4..5676485 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,7 @@ Source5: udev.sysconfig Patch1: udev-137-vol_id1.patch Patch2: udev-137-vol_id2.patch +Patch3: udev-137-mdremove.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -95,6 +96,7 @@ dynamic library, which provides access to udev device information. %patch1 -p1 %patch2 -p1 +%patch3 -p1 .remove %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -383,6 +385,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 05 2009 Harald Hoyer 137-4 +- fixed md change/remove event handling + * Thu Feb 05 2009 Harald Hoyer 137-3 - added 5 second sleep for "modprobedebug" to catch bad modules From 08f8626fe5343b69f1da7fc8d8b3af180ca2ea73 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Feb 2009 07:52:35 +0000 Subject: [PATCH 465/640] fixed typo --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 5676485..a97ac46 100644 --- a/udev.spec +++ b/udev.spec @@ -96,7 +96,7 @@ dynamic library, which provides access to udev device information. %patch1 -p1 %patch2 -p1 -%patch3 -p1 .remove +%patch3 -p1 -b .remove %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules From 75cb6aeb761e33481145665d423b8d68914206c4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Feb 2009 07:52:35 +0000 Subject: [PATCH 466/640] fixed typo --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 5676485..a97ac46 100644 --- a/udev.spec +++ b/udev.spec @@ -96,7 +96,7 @@ dynamic library, which provides access to udev device information. %patch1 -p1 %patch2 -p1 -%patch3 -p1 .remove +%patch3 -p1 -b .remove %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules From e7834dea1778bced16c6e06dd1f1e133e56bdbff Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 22:30:47 +0000 Subject: [PATCH 467/640] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index a97ac46..08d36b4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -385,6 +385,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 137-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Thu Feb 05 2009 Harald Hoyer 137-4 - fixed md change/remove event handling From 0b109e9f9ee60a1cc836256d4532b9aaba639161 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 22:30:47 +0000 Subject: [PATCH 468/640] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index a97ac46..08d36b4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 137 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -385,6 +385,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 137-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Thu Feb 05 2009 Harald Hoyer 137-4 - fixed md change/remove event handling From aa693300db3589dc802dc1973e3b912a02c9ffb3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Feb 2009 07:49:44 +0000 Subject: [PATCH 469/640] - version 139 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.cvsignore b/.cvsignore index 260ace6..8379465 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-137.tar.bz2 +udev-139.tar.bz2 diff --git a/sources b/sources index 0abe86b..8a9b035 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d5960024da9c80b54c8273ee05b31e1 udev-137.tar.bz2 +7e705e237d29734c77bc26f6ccbc4594 udev-139.tar.bz2 diff --git a/udev.spec b/udev.spec index 08d36b4..cd0b5bb 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 137 -Release: 5%{?dist} +Version: 139 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,9 +18,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-137-vol_id1.patch -Patch2: udev-137-vol_id2.patch -Patch3: udev-137-mdremove.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -94,9 +91,6 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -b .remove %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -385,6 +379,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 27 2009 Harald Hoyer 139-1 +- version 139 + * Wed Feb 25 2009 Fedora Release Engineering - 137-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From ab646bebe42a651244643ec25f74b54013a26e22 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Feb 2009 07:49:44 +0000 Subject: [PATCH 470/640] - version 139 --- .cvsignore | 2 +- sources | 2 +- udev.spec | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.cvsignore b/.cvsignore index 260ace6..8379465 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-137.tar.bz2 +udev-139.tar.bz2 diff --git a/sources b/sources index 0abe86b..8a9b035 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d5960024da9c80b54c8273ee05b31e1 udev-137.tar.bz2 +7e705e237d29734c77bc26f6ccbc4594 udev-139.tar.bz2 diff --git a/udev.spec b/udev.spec index 08d36b4..cd0b5bb 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 137 -Release: 5%{?dist} +Version: 139 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,9 +18,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev-137-vol_id1.patch -Patch2: udev-137-vol_id2.patch -Patch3: udev-137-mdremove.patch Patch102: udev-118-sysconf.patch ExclusiveOS: Linux @@ -94,9 +91,6 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -b .remove %patch102 -p1 -b .sysconf rm rules/redhat/95-pam-console.rules @@ -385,6 +379,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 27 2009 Harald Hoyer 139-1 +- version 139 + * Wed Feb 25 2009 Fedora Release Engineering - 137-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 508e6c586ff030936a31c0d11af880f4f845cd0d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Mar 2009 13:11:08 +0000 Subject: [PATCH 471/640] - speedup of start_udev by doing make_extra_nodes in parallel to the daemon start --- start_udev | 41 +++++++++++++++++++++-------------------- udev.spec | 6 +++++- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/start_udev b/start_udev index 8e9228f..f67958e 100755 --- a/start_udev +++ b/start_udev @@ -188,6 +188,25 @@ findalias () { done } +# returns OK if $1 contains $2 +strstr() { + [ "${1#*$2*}" = "$1" ] && return 1 + return 0 +} + +getval() { + what=$1 + shift + for arg; do + if strstr "$arg" "$what="; then + val=${arg#${what}=*} + echo $val + return 0 + fi + done + return 1 +} + wait_for_queue() { local timeout=${1:-0} local ret=0 @@ -235,26 +254,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } -# returns OK if $1 contains $2 -strstr() { - [ "${1#*$2*}" = "$1" ] && return 1 - return 0 -} - -getval() { - what=$1 - shift - for arg; do - if strstr "$arg" "$what="; then - val=${arg#${what}=*} - echo $val - return 0 - fi - done - return 1 -} - -make_extra_nodes +make_extra_nodes & cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 @@ -267,6 +267,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi /sbin/udevd -d $UDEV_OPTS + wait ret=$[$ret + $?] udevtimeout=$(getval udevtimeout $cmdline) diff --git a/udev.spec b/udev.spec index cd0b5bb..828f709 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 139 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -379,6 +379,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Mar 03 2009 Harald Hoyer 139-2 +- speedup of start_udev by doing make_extra_nodes in parallel to + the daemon start + * Fri Feb 27 2009 Harald Hoyer 139-1 - version 139 From 9f98e34d403d9d7826fe7dc51a81b7f04f752166 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 3 Mar 2009 13:11:08 +0000 Subject: [PATCH 472/640] - speedup of start_udev by doing make_extra_nodes in parallel to the daemon start --- start_udev | 41 +++++++++++++++++++++-------------------- udev.spec | 6 +++++- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/start_udev b/start_udev index 8e9228f..f67958e 100755 --- a/start_udev +++ b/start_udev @@ -188,6 +188,25 @@ findalias () { done } +# returns OK if $1 contains $2 +strstr() { + [ "${1#*$2*}" = "$1" ] && return 1 + return 0 +} + +getval() { + what=$1 + shift + for arg; do + if strstr "$arg" "$what="; then + val=${arg#${what}=*} + echo $val + return 0 + fi + done + return 1 +} + wait_for_queue() { local timeout=${1:-0} local ret=0 @@ -235,26 +254,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } -# returns OK if $1 contains $2 -strstr() { - [ "${1#*$2*}" = "$1" ] && return 1 - return 0 -} - -getval() { - what=$1 - shift - for arg; do - if strstr "$arg" "$what="; then - val=${arg#${what}=*} - echo $val - return 0 - fi - done - return 1 -} - -make_extra_nodes +make_extra_nodes & cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 @@ -267,6 +267,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi /sbin/udevd -d $UDEV_OPTS + wait ret=$[$ret + $?] udevtimeout=$(getval udevtimeout $cmdline) diff --git a/udev.spec b/udev.spec index cd0b5bb..828f709 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 139 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -379,6 +379,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Mar 03 2009 Harald Hoyer 139-2 +- speedup of start_udev by doing make_extra_nodes in parallel to + the daemon start + * Fri Feb 27 2009 Harald Hoyer 139-1 - version 139 From a8a4eac9ed5f165354c332ba39836fef3203a4a7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Apr 2009 13:29:30 +0000 Subject: [PATCH 473/640] - renamed modprobe /etc/modprobe.d/floppy-pnp to /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) - Resolves: rhbz#492732 --- udev.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 828f709..61b7e1c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 139 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -191,7 +191,7 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d -cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp < $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf < 139-3 +- renamed modprobe /etc/modprobe.d/floppy-pnp to + /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) +- Resolves: rhbz#492732 + * Tue Mar 03 2009 Harald Hoyer 139-2 - speedup of start_udev by doing make_extra_nodes in parallel to the daemon start From 2a1f66d75f51e160e69f9ac0a5101207743b3729 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Apr 2009 13:29:30 +0000 Subject: [PATCH 474/640] - renamed modprobe /etc/modprobe.d/floppy-pnp to /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) - Resolves: rhbz#492732 --- udev.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 828f709..61b7e1c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 139 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -191,7 +191,7 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d -cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp < $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf < 139-3 +- renamed modprobe /etc/modprobe.d/floppy-pnp to + /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) +- Resolves: rhbz#492732 + * Tue Mar 03 2009 Harald Hoyer 139-2 - speedup of start_udev by doing make_extra_nodes in parallel to the daemon start From 0d974e50049f27a9334234bcb19bb6b61dbc9f2c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Apr 2009 13:40:26 +0000 Subject: [PATCH 475/640] - double the IMPORT buffer (bug #488554) - Resolves: rhbz#488554 --- udev-import-buffer.patch | 21 +++++++++++++++++++++ udev.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 udev-import-buffer.patch diff --git a/udev-import-buffer.patch b/udev-import-buffer.patch new file mode 100644 index 0000000..5b74593 --- /dev/null +++ b/udev-import-buffer.patch @@ -0,0 +1,21 @@ +From: Kay Sievers +Date: Mon, 30 Mar 2009 18:09:08 +0000 (+0200) +Subject: IMPORT: 2048 -> 4096 bytes buffer +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=52761bb0a99cb80ccb19c9edf23963fdad67060d;hp=f2b937440c682bca3837263a1bafd78e30b17e4d + +IMPORT: 2048 -> 4096 bytes buffer +--- + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 663a6d4..e4594c3 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -737,7 +737,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p + { + struct udev *udev = udev_device_get_udev(dev); + char **envp; +- char result[2048]; ++ char result[4096]; + size_t reslen; + char *line; + diff --git a/udev.spec b/udev.spec index 61b7e1c..199e3c4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 139 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,7 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch +Patch103: udev-import-buffer.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -92,6 +93,7 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf +%patch103 -p1 -b .import rm rules/redhat/95-pam-console.rules %build @@ -379,6 +381,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 01 2009 Harald Hoyer 139-4 +- double the IMPORT buffer (bug #488554) +- Resolves: rhbz#488554 + * Wed Apr 01 2009 Harald Hoyer 139-3 - renamed modprobe /etc/modprobe.d/floppy-pnp to /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) From ffe7cacec802300f4c44f2e3ee2fffef779da9ab Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Apr 2009 13:40:26 +0000 Subject: [PATCH 476/640] - double the IMPORT buffer (bug #488554) - Resolves: rhbz#488554 --- udev-import-buffer.patch | 21 +++++++++++++++++++++ udev.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 udev-import-buffer.patch diff --git a/udev-import-buffer.patch b/udev-import-buffer.patch new file mode 100644 index 0000000..5b74593 --- /dev/null +++ b/udev-import-buffer.patch @@ -0,0 +1,21 @@ +From: Kay Sievers +Date: Mon, 30 Mar 2009 18:09:08 +0000 (+0200) +Subject: IMPORT: 2048 -> 4096 bytes buffer +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=52761bb0a99cb80ccb19c9edf23963fdad67060d;hp=f2b937440c682bca3837263a1bafd78e30b17e4d + +IMPORT: 2048 -> 4096 bytes buffer +--- + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 663a6d4..e4594c3 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -737,7 +737,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p + { + struct udev *udev = udev_device_get_udev(dev); + char **envp; +- char result[2048]; ++ char result[4096]; + size_t reslen; + char *line; + diff --git a/udev.spec b/udev.spec index 61b7e1c..199e3c4 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 139 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,7 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch +Patch103: udev-import-buffer.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -92,6 +93,7 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf +%patch103 -p1 -b .import rm rules/redhat/95-pam-console.rules %build @@ -379,6 +381,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 01 2009 Harald Hoyer 139-4 +- double the IMPORT buffer (bug #488554) +- Resolves: rhbz#488554 + * Wed Apr 01 2009 Harald Hoyer 139-3 - renamed modprobe /etc/modprobe.d/floppy-pnp to /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) From 0345074c5ffb7a49ca9c52be6c1fa34bfd7f6265 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Apr 2009 13:47:31 +0000 Subject: [PATCH 477/640] - version 141 --- .cvsignore | 2 +- sources | 2 +- udev-import-buffer.patch | 21 --------------------- udev.spec | 11 ++++++----- 4 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 udev-import-buffer.patch diff --git a/.cvsignore b/.cvsignore index 8379465..16e8f8d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-139.tar.bz2 +udev-141.tar.bz2 diff --git a/sources b/sources index 8a9b035..8c0586a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7e705e237d29734c77bc26f6ccbc4594 udev-139.tar.bz2 +1670fe81cabf5161319c52084cf81134 udev-141.tar.bz2 diff --git a/udev-import-buffer.patch b/udev-import-buffer.patch deleted file mode 100644 index 5b74593..0000000 --- a/udev-import-buffer.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers -Date: Mon, 30 Mar 2009 18:09:08 +0000 (+0200) -Subject: IMPORT: 2048 -> 4096 bytes buffer -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=52761bb0a99cb80ccb19c9edf23963fdad67060d;hp=f2b937440c682bca3837263a1bafd78e30b17e4d - -IMPORT: 2048 -> 4096 bytes buffer ---- - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 663a6d4..e4594c3 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -737,7 +737,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p - { - struct udev *udev = udev_device_get_udev(dev); - char **envp; -- char result[2048]; -+ char result[4096]; - size_t reslen; - char *line; - diff --git a/udev.spec b/udev.spec index 199e3c4..e3e6e9f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 139 -Release: 4%{?dist} +Version: 141 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,7 +19,6 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch -Patch103: udev-import-buffer.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -93,8 +92,6 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf -%patch103 -p1 -b .import -rm rules/redhat/95-pam-console.rules %build %if %{with_static} @@ -326,6 +323,7 @@ rm -rf $RPM_BUILD_ROOT %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/usb_id*.8* %attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* %dir %attr(0755,root,root) /var/lib/udev @@ -381,6 +379,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Apr 14 2009 Harald Hoyer 141-1 +- version 141 + * Wed Apr 01 2009 Harald Hoyer 139-4 - double the IMPORT buffer (bug #488554) - Resolves: rhbz#488554 From e07ce5575e93541eb1a64264d4292f6e6104a557 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Apr 2009 13:47:31 +0000 Subject: [PATCH 478/640] - version 141 --- .cvsignore | 2 +- sources | 2 +- udev-import-buffer.patch | 21 --------------------- udev.spec | 11 ++++++----- 4 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 udev-import-buffer.patch diff --git a/.cvsignore b/.cvsignore index 8379465..16e8f8d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-139.tar.bz2 +udev-141.tar.bz2 diff --git a/sources b/sources index 8a9b035..8c0586a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7e705e237d29734c77bc26f6ccbc4594 udev-139.tar.bz2 +1670fe81cabf5161319c52084cf81134 udev-141.tar.bz2 diff --git a/udev-import-buffer.patch b/udev-import-buffer.patch deleted file mode 100644 index 5b74593..0000000 --- a/udev-import-buffer.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers -Date: Mon, 30 Mar 2009 18:09:08 +0000 (+0200) -Subject: IMPORT: 2048 -> 4096 bytes buffer -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=52761bb0a99cb80ccb19c9edf23963fdad67060d;hp=f2b937440c682bca3837263a1bafd78e30b17e4d - -IMPORT: 2048 -> 4096 bytes buffer ---- - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 663a6d4..e4594c3 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -737,7 +737,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p - { - struct udev *udev = udev_device_get_udev(dev); - char **envp; -- char result[2048]; -+ char result[4096]; - size_t reslen; - char *line; - diff --git a/udev.spec b/udev.spec index 199e3c4..e3e6e9f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 139 -Release: 4%{?dist} +Version: 141 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,7 +19,6 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch -Patch103: udev-import-buffer.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -93,8 +92,6 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf -%patch103 -p1 -b .import -rm rules/redhat/95-pam-console.rules %build %if %{with_static} @@ -326,6 +323,7 @@ rm -rf $RPM_BUILD_ROOT %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/usb_id*.8* %attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* %dir %attr(0755,root,root) /var/lib/udev @@ -381,6 +379,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Apr 14 2009 Harald Hoyer 141-1 +- version 141 + * Wed Apr 01 2009 Harald Hoyer 139-4 - double the IMPORT buffer (bug #488554) - Resolves: rhbz#488554 From 786772626195dc779fb3e0d62f698b5f360a13c9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 15 Apr 2009 17:42:26 +0000 Subject: [PATCH 479/640] - fix for CVE-2009-1186 (bug #495052) - Resolves: rhbz#495052 --- udev-CVE-2009-1186.patch | 20 ++++++++++++++++++++ udev.spec | 32 ++++++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 udev-CVE-2009-1186.patch diff --git a/udev-CVE-2009-1186.patch b/udev-CVE-2009-1186.patch new file mode 100644 index 0000000..56332ca --- /dev/null +++ b/udev-CVE-2009-1186.patch @@ -0,0 +1,20 @@ +--- udev-141/udev/lib/libudev-util.c.CVE-2009-1186 2009-04-08 09:04:26.000000000 -0400 ++++ udev-141/udev/lib/libudev-util.c 2009-04-15 13:25:10.000000000 -0400 +@@ -9,6 +9,7 @@ + * version 2.1 of the License, or (at your option) any later version. + */ + ++#include + #include + #include + #include +@@ -103,6 +104,9 @@ int util_log_priority(const char *priori + + size_t util_path_encode(char *s, size_t len) + { ++ if (len == 0 || len > (SIZE_MAX - 1) / 4) ++ return 0; ++ + char t[(len * 4)+1]; + size_t i, j; + diff --git a/udev.spec b/udev.spec index e3e6e9f..c09e24c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 141 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,11 +19,13 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch +Patch103: udev-CVE-2009-1186.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service +Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV @@ -92,6 +94,7 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf +%patch103 -p1 -b .CVE-2009-1186 %build %if %{with_static} @@ -226,16 +229,29 @@ getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : +# kill daemon if we are not in a chroot +if test -f /proc/1/exe -a -d /proc/1/root; then + if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if test -x /sbin/udevd -a -x /sbin/pidof ; then + pid=$(/sbin/pidof -c udevd) + if [ -n "$pid" ]; then + kill $pid + fi + fi + fi +fi +exit 0 + %post -if [ "$1" -gt 1 -a -x /sbin/pidof ]; then - pid=$(/sbin/pidof -c udevd) - if [ -n "$pid" ]; then - kill $pid +# start daemon if we are not in a chroot +if test -f /proc/1/exe -a -d /proc/1/root; then + if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if test -x /sbin/udevd; then /sbin/udevd -d + fi fi fi -/sbin/chkconfig --add udev-post exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -379,6 +395,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 15 2009 Harald Hoyer 141-2 +- fix for CVE-2009-1186 (bug #495052) +- Resolves: rhbz#495052 + * Tue Apr 14 2009 Harald Hoyer 141-1 - version 141 From fdc9d097a5b010512198440b9265622b623ea157 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 15 Apr 2009 17:42:26 +0000 Subject: [PATCH 480/640] - fix for CVE-2009-1186 (bug #495052) - Resolves: rhbz#495052 --- udev-CVE-2009-1186.patch | 20 ++++++++++++++++++++ udev.spec | 32 ++++++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 udev-CVE-2009-1186.patch diff --git a/udev-CVE-2009-1186.patch b/udev-CVE-2009-1186.patch new file mode 100644 index 0000000..56332ca --- /dev/null +++ b/udev-CVE-2009-1186.patch @@ -0,0 +1,20 @@ +--- udev-141/udev/lib/libudev-util.c.CVE-2009-1186 2009-04-08 09:04:26.000000000 -0400 ++++ udev-141/udev/lib/libudev-util.c 2009-04-15 13:25:10.000000000 -0400 +@@ -9,6 +9,7 @@ + * version 2.1 of the License, or (at your option) any later version. + */ + ++#include + #include + #include + #include +@@ -103,6 +104,9 @@ int util_log_priority(const char *priori + + size_t util_path_encode(char *s, size_t len) + { ++ if (len == 0 || len > (SIZE_MAX - 1) / 4) ++ return 0; ++ + char t[(len * 4)+1]; + size_t i, j; + diff --git a/udev.spec b/udev.spec index e3e6e9f..c09e24c 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 141 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,11 +19,13 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch +Patch103: udev-CVE-2009-1186.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service +Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV @@ -92,6 +94,7 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf +%patch103 -p1 -b .CVE-2009-1186 %build %if %{with_static} @@ -226,16 +229,29 @@ getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : +# kill daemon if we are not in a chroot +if test -f /proc/1/exe -a -d /proc/1/root; then + if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if test -x /sbin/udevd -a -x /sbin/pidof ; then + pid=$(/sbin/pidof -c udevd) + if [ -n "$pid" ]; then + kill $pid + fi + fi + fi +fi +exit 0 + %post -if [ "$1" -gt 1 -a -x /sbin/pidof ]; then - pid=$(/sbin/pidof -c udevd) - if [ -n "$pid" ]; then - kill $pid +# start daemon if we are not in a chroot +if test -f /proc/1/exe -a -d /proc/1/root; then + if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if test -x /sbin/udevd; then /sbin/udevd -d + fi fi fi -/sbin/chkconfig --add udev-post exit 0 %triggerpostun -- dev <= 0:3.12-1 @@ -379,6 +395,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 15 2009 Harald Hoyer 141-2 +- fix for CVE-2009-1186 (bug #495052) +- Resolves: rhbz#495052 + * Tue Apr 14 2009 Harald Hoyer 141-1 - version 141 From 98f3cc06dc5d522570bbfe776816a7eb50413ee2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Apr 2009 06:49:39 +0000 Subject: [PATCH 481/640] - fixed post and pre --- udev.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index c09e24c..89dbc01 100644 --- a/udev.spec +++ b/udev.spec @@ -19,7 +19,6 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch -Patch103: udev-CVE-2009-1186.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -94,7 +93,6 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf -%patch103 -p1 -b .CVE-2009-1186 %build %if %{with_static} @@ -395,9 +393,8 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Wed Apr 15 2009 Harald Hoyer 141-2 -- fix for CVE-2009-1186 (bug #495052) -- Resolves: rhbz#495052 +* Thu Apr 16 2009 Harald Hoyer 141-2 +- fixed post and pre * Tue Apr 14 2009 Harald Hoyer 141-1 - version 141 From c47b803b68de627a934d65bd479576fcf25e0fdf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Apr 2009 06:49:39 +0000 Subject: [PATCH 482/640] - fixed post and pre --- udev.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index c09e24c..89dbc01 100644 --- a/udev.spec +++ b/udev.spec @@ -19,7 +19,6 @@ Source4: fw_unit_symlinks.sh Source5: udev.sysconfig Patch102: udev-118-sysconf.patch -Patch103: udev-CVE-2009-1186.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -94,7 +93,6 @@ dynamic library, which provides access to udev device information. %setup -q %patch102 -p1 -b .sysconf -%patch103 -p1 -b .CVE-2009-1186 %build %if %{with_static} @@ -395,9 +393,8 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Wed Apr 15 2009 Harald Hoyer 141-2 -- fix for CVE-2009-1186 (bug #495052) -- Resolves: rhbz#495052 +* Thu Apr 16 2009 Harald Hoyer 141-2 +- fixed post and pre * Tue Apr 14 2009 Harald Hoyer 141-1 - version 141 From 4b8c514c5ec505bb4a958b4f2fbe8a79c7265d70 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 15 May 2009 14:41:18 +0000 Subject: [PATCH 483/640] - version 142 - no more libvolume_id and vol_id --- .cvsignore | 2 +- sources | 2 +- start_udev | 13 ++-- udev-118-sysconf.patch | 24 -------- ...-137.tar.bz2.sign => udev-142.tar.bz2.sign | 6 +- udev.spec | 60 ++++--------------- udev.sysconfig | 4 -- 7 files changed, 20 insertions(+), 91 deletions(-) delete mode 100644 udev-118-sysconf.patch rename udev-137.tar.bz2.sign => udev-142.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index 16e8f8d..de680dd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-141.tar.bz2 +udev-142.tar.bz2 diff --git a/sources b/sources index 8c0586a..ed8a92a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1670fe81cabf5161319c52084cf81134 udev-141.tar.bz2 +3edc4cf383dccb06d866c5156d59ddd5 udev-142.tar.bz2 diff --git a/start_udev b/start_udev index f67958e..99a67fa 100755 --- a/start_udev +++ b/start_udev @@ -128,7 +128,10 @@ make_extra_nodes () { /bin/chown root:lp /dev/lp2 /bin/mknod -m 0660 /dev/lp3 c 6 3 /bin/chown root:lp /dev/lp3 - [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 + /bin/mknod -m 0666 /dev/fuse c 10 229 + /bin/chown root:root /dev/fuse + + [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 /dev/fuse if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do @@ -282,14 +285,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevadm control --max_childs_running=$(getval udevchilds $cmdline) fi - if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then - /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 - fi - - if strstr "$cmdline" udevnopersist; then - /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 - fi - /sbin/udevadm control --env=STARTUP=1 if strstr "$cmdline" modprobedebug; then diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch deleted file mode 100644 index 30de6ab..0000000 --- a/udev-118-sysconf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules ---- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -6,6 +6,8 @@ - # forward scsi device event to corresponding block device - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules ---- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -2,6 +2,8 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" -+ - ACTION!="add|change", GOTO="persistent_storage_tape_end" - - # type 8 devices are "Medium Changers" diff --git a/udev-137.tar.bz2.sign b/udev-142.tar.bz2.sign similarity index 61% rename from udev-137.tar.bz2.sign rename to udev-142.tar.bz2.sign index bde1723..32394f1 100644 --- a/udev-137.tar.bz2.sign +++ b/udev-142.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBJeTdlyGugalF9Dw4RAolBAJ9sKq3V9mpanhvpOMkYXky7DwF7sACgg0N4 -SsPqKyBV4nkSMxxLQwxJEdw= -=PEri +iD8DBQBKCkrhyGugalF9Dw4RAq/BAJ9jlPzsGL1AY6oGAe9k/w40yh8PAACdFb4X +uCq/RlDaoybxMChpTXmrdSY= +=KJLi -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 89dbc01..bfab5a2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 141 -Release: 2%{?dist} +Version: 142 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,8 +18,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch102: udev-118-sysconf.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -34,6 +32,8 @@ BuildRequires: autoconf libtool %endif Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 +Requires: util-linux-ng >= 2.15 +Conflicts: device-mapper <= 1.02.31-4 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 @@ -52,24 +52,6 @@ This package contains static versions of the udev binaries, to build e.g. an initramfs. %endif -%package -n libvolume_id-devel -Summary: Static libraries and headers for libvolume_id -Group: Development/Libraries -Requires: libvolume_id = %{version}-%{release} - -%description -n libvolume_id-devel -This package contains libraries and include files, -which needed to link against libvolume_id. - -%package -n libvolume_id -Summary: Dynamic libraries to get volume ids -Group: System Environment/Libraries - -%description -n libvolume_id -This package contains the libvolume_id.so dynamic library, -which contains functions to get volume ids. - - %package -n libudev0 Summary: Dynamic library to access udev device information Group: System Environment/Libraries @@ -92,8 +74,6 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch102 -p1 -b .sysconf - %build %if %{with_static} %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static @@ -105,7 +85,6 @@ for i in udev/udevd \ 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 mv $i $i.static @@ -135,8 +114,6 @@ mkdir -p $RPM_BUILD_ROOT%{_bindir} # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id -ln -sf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libvolume_id.so.*.*) \ - $RPM_BUILD_ROOT%{_libdir}/libvolume_id.so ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest @@ -151,7 +128,6 @@ for i in extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ extras/edd_id/edd_id \ extras/usb_id/usb_id \ - extras/volume_id/vol_id \ extras/floppy/create_floppy_devices \ ; do install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static @@ -176,7 +152,6 @@ for i in \ %endif rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ - rules/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done @@ -272,9 +247,6 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %triggerin -- MAKEDEV rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : -%post -n libvolume_id -p /sbin/ldconfig -%postun -n libvolume_id -p /sbin/ldconfig - %post -n libudev0 -p /sbin/ldconfig %postun -n libudev0 -p /sbin/ldconfig @@ -295,7 +267,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/ata_id %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 @@ -334,7 +305,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* %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/cdrom_id*.8* %attr(0644,root,root) %{_mandir}/man8/usb_id*.8* @@ -358,24 +328,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/ata_id.static %attr(0755,root,root) %{udev_scriptdir}/edd_id.static %attr(0755,root,root) %{udev_scriptdir}/usb_id.static -%attr(0755,root,root) %{udev_scriptdir}/vol_id.static %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static %endif -%files -n libvolume_id -%defattr(0644, root, root, 0755) -%doc COPYING -%attr(0755,root,root) /%{_lib}/libvolume_id.so.* - -%files -n libvolume_id-devel -%defattr(0644, root, root, 0755) -%doc COPYING -%defattr(0644, root, root, 0755) -%{_includedir}/libvolume_id.h -%{_libdir}/libvolume_id.so -%{_libdir}/libvolume_id.a -%{_libdir}/pkgconfig/libvolume_id.pc - %files -n libudev0 %defattr(0644, root, root, 0755) %doc COPYING @@ -393,6 +348,13 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri May 15 2009 Harald Hoyer 142-1 +- version 142 +- no more libvolume_id and vol_id + +* Fri Apr 17 2009 Harald Hoyer 141-3 +- added /dev/fuse creation to start_udev + * Thu Apr 16 2009 Harald Hoyer 141-2 - fixed post and pre diff --git a/udev.sysconfig b/udev.sysconfig index e7c13cf..9a58d98 100644 --- a/udev.sysconfig +++ b/udev.sysconfig @@ -2,7 +2,3 @@ # May speedup some systems with slow disks. # EXPERIMENTAL - use at your own risk UDEV_USE_MAKEDEV_CACHE="no" - -# Generates /dev/disk/by* symlinks. -# Set to "no", if you *really* don't need them and want a speedup at boot time. -UDEV_PERSISTENT_STORAGE="yes" From 825b6c98020646f06456b0bcd6b16d7942bd67d3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 15 May 2009 14:41:18 +0000 Subject: [PATCH 484/640] - version 142 - no more libvolume_id and vol_id --- .cvsignore | 2 +- sources | 2 +- start_udev | 13 ++-- udev-118-sysconf.patch | 24 -------- ...-137.tar.bz2.sign => udev-142.tar.bz2.sign | 6 +- udev.spec | 60 ++++--------------- udev.sysconfig | 4 -- 7 files changed, 20 insertions(+), 91 deletions(-) delete mode 100644 udev-118-sysconf.patch rename udev-137.tar.bz2.sign => udev-142.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index 16e8f8d..de680dd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-141.tar.bz2 +udev-142.tar.bz2 diff --git a/sources b/sources index 8c0586a..ed8a92a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1670fe81cabf5161319c52084cf81134 udev-141.tar.bz2 +3edc4cf383dccb06d866c5156d59ddd5 udev-142.tar.bz2 diff --git a/start_udev b/start_udev index f67958e..99a67fa 100755 --- a/start_udev +++ b/start_udev @@ -128,7 +128,10 @@ make_extra_nodes () { /bin/chown root:lp /dev/lp2 /bin/mknod -m 0660 /dev/lp3 c 6 3 /bin/chown root:lp /dev/lp3 - [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 + /bin/mknod -m 0666 /dev/fuse c 10 229 + /bin/chown root:root /dev/fuse + + [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 /dev/fuse if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do @@ -282,14 +285,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevadm control --max_childs_running=$(getval udevchilds $cmdline) fi - if [ "$UDEV_PERSISTENT_STORAGE" == "no" ]; then - /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 - fi - - if strstr "$cmdline" udevnopersist; then - /sbin/udevadm control --env=UDEV_NO_PERSISTENT_STORAGE=1 - fi - /sbin/udevadm control --env=STARTUP=1 if strstr "$cmdline" modprobedebug; then diff --git a/udev-118-sysconf.patch b/udev-118-sysconf.patch deleted file mode 100644 index 30de6ab..0000000 --- a/udev-118-sysconf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up udev-126/rules/rules.d/60-persistent-storage.rules.sysconf udev-126/rules/rules.d/60-persistent-storage.rules ---- udev-126/rules/rules.d/60-persistent-storage.rules.sysconf 2008-07-31 09:40:37.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -6,6 +6,8 @@ - # forward scsi device event to corresponding block device - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_end" -+ - ACTION!="add|change", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - -diff -up udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf udev-126/rules/rules.d/60-persistent-storage-tape.rules ---- udev-126/rules/rules.d/60-persistent-storage-tape.rules.sysconf 2008-07-24 16:55:12.000000000 +0200 -+++ udev-126/rules/rules.d/60-persistent-storage-tape.rules 2008-08-08 15:35:57.000000000 +0200 -@@ -2,6 +2,8 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - -+ENV{UDEV_NO_PERSISTENT_STORAGE}=="1", GOTO="persistent_storage_tape_end" -+ - ACTION!="add|change", GOTO="persistent_storage_tape_end" - - # type 8 devices are "Medium Changers" diff --git a/udev-137.tar.bz2.sign b/udev-142.tar.bz2.sign similarity index 61% rename from udev-137.tar.bz2.sign rename to udev-142.tar.bz2.sign index bde1723..32394f1 100644 --- a/udev-137.tar.bz2.sign +++ b/udev-142.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBJeTdlyGugalF9Dw4RAolBAJ9sKq3V9mpanhvpOMkYXky7DwF7sACgg0N4 -SsPqKyBV4nkSMxxLQwxJEdw= -=PEri +iD8DBQBKCkrhyGugalF9Dw4RAq/BAJ9jlPzsGL1AY6oGAe9k/w40yh8PAACdFb4X +uCq/RlDaoybxMChpTXmrdSY= +=KJLi -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 89dbc01..bfab5a2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,8 +5,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 141 -Release: 2%{?dist} +Version: 142 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,8 +18,6 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch102: udev-118-sysconf.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -34,6 +32,8 @@ BuildRequires: autoconf libtool %endif Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 +Requires: util-linux-ng >= 2.15 +Conflicts: device-mapper <= 1.02.31-4 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 @@ -52,24 +52,6 @@ This package contains static versions of the udev binaries, to build e.g. an initramfs. %endif -%package -n libvolume_id-devel -Summary: Static libraries and headers for libvolume_id -Group: Development/Libraries -Requires: libvolume_id = %{version}-%{release} - -%description -n libvolume_id-devel -This package contains libraries and include files, -which needed to link against libvolume_id. - -%package -n libvolume_id -Summary: Dynamic libraries to get volume ids -Group: System Environment/Libraries - -%description -n libvolume_id -This package contains the libvolume_id.so dynamic library, -which contains functions to get volume ids. - - %package -n libudev0 Summary: Dynamic library to access udev device information Group: System Environment/Libraries @@ -92,8 +74,6 @@ dynamic library, which provides access to udev device information. %prep %setup -q -%patch102 -p1 -b .sysconf - %build %if %{with_static} %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static @@ -105,7 +85,6 @@ for i in udev/udevd \ 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 mv $i $i.static @@ -135,8 +114,6 @@ mkdir -p $RPM_BUILD_ROOT%{_bindir} # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id -ln -sf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libvolume_id.so.*.*) \ - $RPM_BUILD_ROOT%{_libdir}/libvolume_id.so ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest @@ -151,7 +128,6 @@ for i in extras/scsi_id/scsi_id \ extras/ata_id/ata_id \ extras/edd_id/edd_id \ extras/usb_id/usb_id \ - extras/volume_id/vol_id \ extras/floppy/create_floppy_devices \ ; do install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static @@ -176,7 +152,6 @@ for i in \ %endif rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ - rules/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done @@ -272,9 +247,6 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %triggerin -- MAKEDEV rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : -%post -n libvolume_id -p /sbin/ldconfig -%postun -n libvolume_id -p /sbin/ldconfig - %post -n libudev0 -p /sbin/ldconfig %postun -n libudev0 -p /sbin/ldconfig @@ -295,7 +267,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/ata_id %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 @@ -334,7 +305,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* %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/cdrom_id*.8* %attr(0644,root,root) %{_mandir}/man8/usb_id*.8* @@ -358,24 +328,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/ata_id.static %attr(0755,root,root) %{udev_scriptdir}/edd_id.static %attr(0755,root,root) %{udev_scriptdir}/usb_id.static -%attr(0755,root,root) %{udev_scriptdir}/vol_id.static %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static %endif -%files -n libvolume_id -%defattr(0644, root, root, 0755) -%doc COPYING -%attr(0755,root,root) /%{_lib}/libvolume_id.so.* - -%files -n libvolume_id-devel -%defattr(0644, root, root, 0755) -%doc COPYING -%defattr(0644, root, root, 0755) -%{_includedir}/libvolume_id.h -%{_libdir}/libvolume_id.so -%{_libdir}/libvolume_id.a -%{_libdir}/pkgconfig/libvolume_id.pc - %files -n libudev0 %defattr(0644, root, root, 0755) %doc COPYING @@ -393,6 +348,13 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri May 15 2009 Harald Hoyer 142-1 +- version 142 +- no more libvolume_id and vol_id + +* Fri Apr 17 2009 Harald Hoyer 141-3 +- added /dev/fuse creation to start_udev + * Thu Apr 16 2009 Harald Hoyer 141-2 - fixed post and pre diff --git a/udev.sysconfig b/udev.sysconfig index e7c13cf..9a58d98 100644 --- a/udev.sysconfig +++ b/udev.sysconfig @@ -2,7 +2,3 @@ # May speedup some systems with slow disks. # EXPERIMENTAL - use at your own risk UDEV_USE_MAKEDEV_CACHE="no" - -# Generates /dev/disk/by* symlinks. -# Set to "no", if you *really* don't need them and want a speedup at boot time. -UDEV_PERSISTENT_STORAGE="yes" From 11d20dd280708c90944f704c6983dd6e1d15c696 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 5 Jun 2009 15:08:49 +0000 Subject: [PATCH 485/640] - Rebuild in dist-f12 --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bfab5a2..26443f1 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 142 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -348,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 05 2009 Bastien Nocera 142-2 +- Rebuild in dist-f12 + * Fri May 15 2009 Harald Hoyer 142-1 - version 142 - no more libvolume_id and vol_id From 518b087e2a7b1346fcf32a12c713d169dc600480 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 5 Jun 2009 15:08:49 +0000 Subject: [PATCH 486/640] - Rebuild in dist-f12 --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bfab5a2..26443f1 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 142 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -348,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 05 2009 Bastien Nocera 142-2 +- Rebuild in dist-f12 + * Fri May 15 2009 Harald Hoyer 142-1 - version 142 - no more libvolume_id and vol_id From c7f7d694987bcb5db798687e20b53fbe072d8d8a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 8 Jun 2009 08:56:38 +0000 Subject: [PATCH 487/640] - delay device-mapper changes --- udev.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 26443f1..7aea0d7 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 142 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -32,8 +32,7 @@ BuildRequires: autoconf libtool %endif Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 -Requires: util-linux-ng >= 2.15 -Conflicts: device-mapper <= 1.02.31-4 +Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 @@ -152,6 +151,7 @@ for i in \ %endif rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ + rules/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done @@ -348,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 04 2009 Harald Hoyer 142-3 +- delay device-mapper changes + * Fri Jun 05 2009 Bastien Nocera 142-2 - Rebuild in dist-f12 From c0058968a2f66dd822b2273859e839e2d02316a7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 8 Jun 2009 08:56:38 +0000 Subject: [PATCH 488/640] - delay device-mapper changes --- udev.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 26443f1..7aea0d7 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 142 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -32,8 +32,7 @@ BuildRequires: autoconf libtool %endif Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 -Requires: util-linux-ng >= 2.15 -Conflicts: device-mapper <= 1.02.31-4 +Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-1 @@ -152,6 +151,7 @@ for i in \ %endif rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ + rules/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done @@ -348,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 04 2009 Harald Hoyer 142-3 +- delay device-mapper changes + * Fri Jun 05 2009 Bastien Nocera 142-2 - Rebuild in dist-f12 From 38424c331601bce29c171ecb7324b682dee4354a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 8 Jun 2009 09:10:26 +0000 Subject: [PATCH 489/640] - git fix: udevadm: settle - fix timeout - git fix: OWNER/GROUP: fix if logic - git fix: rule-generator: cd - skip by-path links if we create by-id links - git fix: fix possible endless loop for GOTO to non-existent LABEL - git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media --- ...40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch | 35 +++++++++++ ...798916bc87d72f5f1399d9e050307901db84.patch | 31 ++++++++++ ...1b67f86c9555cbb41c57774761730f6b8939.patch | 45 ++++++++++++++ ...231e738dd286591c1becc2f327ed55ed89d1.patch | 62 +++++++++++++++++++ ...9099bb2b18f3f683615324a4382b95446305.patch | 28 +++++++++ udev.spec | 24 ++++++- 6 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch create mode 100644 udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch create mode 100644 udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch create mode 100644 udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch create mode 100644 udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch diff --git a/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch b/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch new file mode 100644 index 0000000..5915df3 --- /dev/null +++ b/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch @@ -0,0 +1,35 @@ +From: Scott James Remnant +Date: Thu, 14 May 2009 11:42:44 +0000 (+0100) +Subject: OWNER/GROUP: fix if logic +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c + +OWNER/GROUP: fix if logic + +The introduction of the --resolve-names=early/never code introduced a +bug to the OWNER/GROUP lookup. Previously if the name had contained $, +lookup would have been performed later; after the patch, the key ended +up being ignored! +--- + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index b8b7e52..39fe55a 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1431,7 +1431,7 @@ static int add_rule(struct udev_rules *rules, char *line, + } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { + uid = add_uid(rules, value); + rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid); +- } else if (rules->resolve_names == 0) { ++ } else if (rules->resolve_names >= 0) { + rule_add_key(&rule_tmp, TK_A_OWNER, op, value, NULL); + } + rule_tmp.rule.rule.flags = 1; +@@ -1448,7 +1448,7 @@ static int add_rule(struct udev_rules *rules, char *line, + } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { + gid = add_gid(rules, value); + rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid); +- } else if (rules->resolve_names == 0) { ++ } else if (rules->resolve_names >= 0) { + rule_add_key(&rule_tmp, TK_A_GROUP, op, value, NULL); + } + rule_tmp.rule.rule.flags = 1; diff --git a/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch b/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch new file mode 100644 index 0000000..fc6fcd6 --- /dev/null +++ b/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch @@ -0,0 +1,31 @@ +From: Kay Sievers +Date: Wed, 13 May 2009 16:01:32 +0000 (+0200) +Subject: fix possible endless loop for GOTO to non-existent LABEL +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=0c37798916bc87d72f5f1399d9e050307901db84 + +fix possible endless loop for GOTO to non-existent LABEL + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526365 +--- + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index fac418e..b8b7e52 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1610,6 +1610,7 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s + if (strcmp(label, &rules->buf[rules->tokens[j].rule.label_off]) != 0) + continue; + rules->tokens[i].key.rule_goto = j; ++ break; + } + if (rules->tokens[i].key.rule_goto == 0) + err(rules->udev, "GOTO '%s' has no matching label in: '%s'\n", label, filename); +@@ -2504,6 +2505,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + break; + } + case TK_A_GOTO: ++ if (cur->key.rule_goto == 0) ++ break; + cur = &rules->tokens[cur->key.rule_goto]; + continue; + case TK_A_LAST_RULE: diff --git a/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch b/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch new file mode 100644 index 0000000..697af69 --- /dev/null +++ b/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch @@ -0,0 +1,45 @@ +From: Kay Sievers +Date: Thu, 14 May 2009 10:57:19 +0000 (+0200) +Subject: rule-generator: cd - skip by-path links if we create by-id links +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=b4fa1b67f86c9555cbb41c57774761730f6b8939 + +rule-generator: cd - skip by-path links if we create by-id links +--- + +diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules +index e357a6a..e6da010 100644 +--- a/extras/rule_generator/75-cd-aliases-generator.rules ++++ b/extras/rule_generator/75-cd-aliases-generator.rules +@@ -1,6 +1,9 @@ + # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks + +-# the path of removable devices changes frequently +-ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" ++# the "path" of usb/ieee1394 devices changes frequently, use "id" ++ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \ ++ PROGRAM="write_cd_rules by-id", SYMLINK+="%c", GOTO="persistent_cd_end" + + ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" ++ ++LABEL="persistent_cd_end" +diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules +index 398cd27..0d16fe6 100644 +--- a/extras/rule_generator/write_cd_rules ++++ b/extras/rule_generator/write_cd_rules +@@ -97,7 +97,7 @@ choose_rules_file + + link_num=$(find_next_available 'cdrom[0-9]*') + +-match="ENV{ID_CDROM}==\"?*\", $RULE" ++match="SUBSYSTEM==\"block\", ENV{ID_CDROM}==\"?*\", $RULE" + + comment="$ID_MODEL ($ID_PATH)" + +@@ -108,6 +108,7 @@ comment="$ID_MODEL ($ID_PATH)" + write_rule "$match" "dvd$link_num" + [ "$ID_CDROM_DVD_R" -o "$ID_CDROM_DVD_RW" -o "$ID_CDROM_DVD_RAM" ] && \ + write_rule "$match" "dvdrw$link_num" ++echo >> $RULES_FILE + + unlock_rules_file + diff --git a/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch b/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch new file mode 100644 index 0000000..3ba1820 --- /dev/null +++ b/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch @@ -0,0 +1,62 @@ +From: Kay Sievers +Date: Mon, 25 May 2009 22:50:45 +0000 (+0200) +Subject: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=d3c8231e738dd286591c1becc2f327ed55ed89d1 + +cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media + +Some broken fake cdrom drives return ID_CDROM_MEDIA_STATE=blank. + + $ /lib/udev/cdrom_id -d /dev/sr1 + main: probing: '/dev/sr1' + cd_inquiry: INQUIRY: [Nokia ][S60 ][1.0 ] + cd_profiles: GET CONFIGURATION: number of profiles 76 + cd_profiles: current profile 0x08 + cd_media_toc: READ TOC: len: 12 + cd_media_toc: last track 1 starts at block 0 + cd_media_info: disk type 00 + ID_CDROM=1 + ID_CDROM_MRW=1 + ID_CDROM_MRW_W=1 + ID_CDROM_MEDIA=1 + ID_CDROM_MEDIA_CD=1 + ID_CDROM_MEDIA_STATE=blank + +Others work fine, but ID_CDROM_MEDIA_STATE is not needed for non-writable CDROM media: + + $ /lib/udev/cdrom_id -d /dev/sr1 + main: probing: '/dev/sr1' + cd_inquiry: INQUIRY: [SanDisk ][U3 Cruzer Micro ][8.02] + cd_profiles: GET CONFIGURATION: number of profiles 72 + cd_profiles: current profile 0x08 + cd_media_toc: READ TOC: len: 20 + cd_media_toc: track=1 info=0x4(data) start_block=0 + cd_media_toc: last track 1 starts at block 0 + cd_media_info: disk type 00 + ID_CDROM=1 + ID_CDROM_MRW=1 + ID_CDROM_MRW_W=1 + ID_CDROM_MEDIA=1 + ID_CDROM_MEDIA_CD=1 + ID_CDROM_MEDIA_STATE=complete + ID_CDROM_MEDIA_SESSION_COUNT=1 + ID_CDROM_MEDIA_TRACK_COUNT=1 + ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 +--- + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 0d873ae..921e534 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -426,8 +426,10 @@ static int cd_media_info(struct udev *udev, int fd) + + info(udev, "disk type %02x\n", header[8]); + +- if ((header[2] & 3) < 4) ++ /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ ++ if (!cd_media_cd_rom && (header[2] & 3) < 4) + cd_media_state = media_status[header[2] & 3]; ++ + if ((header[2] & 3) != 2) + cd_media_session_next = header[10] << 8 | header[5]; + cd_media_session_count = header[9] << 8 | header[4]; diff --git a/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch b/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch new file mode 100644 index 0000000..aac97b5 --- /dev/null +++ b/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch @@ -0,0 +1,28 @@ +From: Alan Jenkins +Date: Wed, 20 May 2009 14:12:22 +0000 (+0200) +Subject: udevadm: settle - fix timeout +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f58a9099bb2b18f3f683615324a4382b95446305 + +udevadm: settle - fix timeout + +The timeout wasn't working when settle was run as root: + # udevadm control --stop-exec-queue + # udevadm trigger + # udevadm settle --timeout=1 + ... (hangs) + +Signed-off-by: Alan Jenkins +--- + +diff --git a/udev/udevadm-settle.c b/udev/udevadm-settle.c +index 3b26f10..52d9c0b 100644 +--- a/udev/udevadm-settle.c ++++ b/udev/udevadm-settle.c +@@ -167,6 +167,7 @@ int udevadm_settle(struct udev *udev, int argc, char *argv[]) + sigprocmask(SIG_BLOCK, &mask, &oldmask); + if (udev_ctrl_send_settle(uctrl) > 0) + sigsuspend(&oldmask); ++ sigprocmask(SIG_SETMASK, &oldmask, NULL); + udev_ctrl_unref(uctrl); + } + } diff --git a/udev.spec b/udev.spec index 7aea0d7..a8bce69 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 142 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,12 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch +Patch2: udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch +Patch3: udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch +Patch4: udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch +Patch5: udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -73,6 +79,12 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + %build %if %{with_static} %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static @@ -348,7 +360,15 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu Jun 04 2009 Harald Hoyer 142-3 +* Thu Jun 08 2009 Harald Hoyer 142-4 +- git fix: udevadm: settle - fix timeout +- git fix: OWNER/GROUP: fix if logic +- git fix: rule-generator: cd - skip by-path links if we create by-id links +- git fix: fix possible endless loop for GOTO to non-existent LABEL +- git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable + CDROM media + +* Thu Jun 08 2009 Harald Hoyer 142-3 - delay device-mapper changes * Fri Jun 05 2009 Bastien Nocera 142-2 From d6ea95d064e6222ba9d4d41b5c35a4b0b2f617a5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 8 Jun 2009 09:10:26 +0000 Subject: [PATCH 490/640] - git fix: udevadm: settle - fix timeout - git fix: OWNER/GROUP: fix if logic - git fix: rule-generator: cd - skip by-path links if we create by-id links - git fix: fix possible endless loop for GOTO to non-existent LABEL - git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media --- ...40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch | 35 +++++++++++ ...798916bc87d72f5f1399d9e050307901db84.patch | 31 ++++++++++ ...1b67f86c9555cbb41c57774761730f6b8939.patch | 45 ++++++++++++++ ...231e738dd286591c1becc2f327ed55ed89d1.patch | 62 +++++++++++++++++++ ...9099bb2b18f3f683615324a4382b95446305.patch | 28 +++++++++ udev.spec | 24 ++++++- 6 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch create mode 100644 udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch create mode 100644 udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch create mode 100644 udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch create mode 100644 udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch diff --git a/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch b/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch new file mode 100644 index 0000000..5915df3 --- /dev/null +++ b/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch @@ -0,0 +1,35 @@ +From: Scott James Remnant +Date: Thu, 14 May 2009 11:42:44 +0000 (+0100) +Subject: OWNER/GROUP: fix if logic +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c + +OWNER/GROUP: fix if logic + +The introduction of the --resolve-names=early/never code introduced a +bug to the OWNER/GROUP lookup. Previously if the name had contained $, +lookup would have been performed later; after the patch, the key ended +up being ignored! +--- + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index b8b7e52..39fe55a 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1431,7 +1431,7 @@ static int add_rule(struct udev_rules *rules, char *line, + } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { + uid = add_uid(rules, value); + rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid); +- } else if (rules->resolve_names == 0) { ++ } else if (rules->resolve_names >= 0) { + rule_add_key(&rule_tmp, TK_A_OWNER, op, value, NULL); + } + rule_tmp.rule.rule.flags = 1; +@@ -1448,7 +1448,7 @@ static int add_rule(struct udev_rules *rules, char *line, + } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { + gid = add_gid(rules, value); + rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid); +- } else if (rules->resolve_names == 0) { ++ } else if (rules->resolve_names >= 0) { + rule_add_key(&rule_tmp, TK_A_GROUP, op, value, NULL); + } + rule_tmp.rule.rule.flags = 1; diff --git a/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch b/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch new file mode 100644 index 0000000..fc6fcd6 --- /dev/null +++ b/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch @@ -0,0 +1,31 @@ +From: Kay Sievers +Date: Wed, 13 May 2009 16:01:32 +0000 (+0200) +Subject: fix possible endless loop for GOTO to non-existent LABEL +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=0c37798916bc87d72f5f1399d9e050307901db84 + +fix possible endless loop for GOTO to non-existent LABEL + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526365 +--- + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index fac418e..b8b7e52 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1610,6 +1610,7 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s + if (strcmp(label, &rules->buf[rules->tokens[j].rule.label_off]) != 0) + continue; + rules->tokens[i].key.rule_goto = j; ++ break; + } + if (rules->tokens[i].key.rule_goto == 0) + err(rules->udev, "GOTO '%s' has no matching label in: '%s'\n", label, filename); +@@ -2504,6 +2505,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + break; + } + case TK_A_GOTO: ++ if (cur->key.rule_goto == 0) ++ break; + cur = &rules->tokens[cur->key.rule_goto]; + continue; + case TK_A_LAST_RULE: diff --git a/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch b/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch new file mode 100644 index 0000000..697af69 --- /dev/null +++ b/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch @@ -0,0 +1,45 @@ +From: Kay Sievers +Date: Thu, 14 May 2009 10:57:19 +0000 (+0200) +Subject: rule-generator: cd - skip by-path links if we create by-id links +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=b4fa1b67f86c9555cbb41c57774761730f6b8939 + +rule-generator: cd - skip by-path links if we create by-id links +--- + +diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules +index e357a6a..e6da010 100644 +--- a/extras/rule_generator/75-cd-aliases-generator.rules ++++ b/extras/rule_generator/75-cd-aliases-generator.rules +@@ -1,6 +1,9 @@ + # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks + +-# the path of removable devices changes frequently +-ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" ++# the "path" of usb/ieee1394 devices changes frequently, use "id" ++ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \ ++ PROGRAM="write_cd_rules by-id", SYMLINK+="%c", GOTO="persistent_cd_end" + + ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" ++ ++LABEL="persistent_cd_end" +diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules +index 398cd27..0d16fe6 100644 +--- a/extras/rule_generator/write_cd_rules ++++ b/extras/rule_generator/write_cd_rules +@@ -97,7 +97,7 @@ choose_rules_file + + link_num=$(find_next_available 'cdrom[0-9]*') + +-match="ENV{ID_CDROM}==\"?*\", $RULE" ++match="SUBSYSTEM==\"block\", ENV{ID_CDROM}==\"?*\", $RULE" + + comment="$ID_MODEL ($ID_PATH)" + +@@ -108,6 +108,7 @@ comment="$ID_MODEL ($ID_PATH)" + write_rule "$match" "dvd$link_num" + [ "$ID_CDROM_DVD_R" -o "$ID_CDROM_DVD_RW" -o "$ID_CDROM_DVD_RAM" ] && \ + write_rule "$match" "dvdrw$link_num" ++echo >> $RULES_FILE + + unlock_rules_file + diff --git a/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch b/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch new file mode 100644 index 0000000..3ba1820 --- /dev/null +++ b/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch @@ -0,0 +1,62 @@ +From: Kay Sievers +Date: Mon, 25 May 2009 22:50:45 +0000 (+0200) +Subject: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=d3c8231e738dd286591c1becc2f327ed55ed89d1 + +cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media + +Some broken fake cdrom drives return ID_CDROM_MEDIA_STATE=blank. + + $ /lib/udev/cdrom_id -d /dev/sr1 + main: probing: '/dev/sr1' + cd_inquiry: INQUIRY: [Nokia ][S60 ][1.0 ] + cd_profiles: GET CONFIGURATION: number of profiles 76 + cd_profiles: current profile 0x08 + cd_media_toc: READ TOC: len: 12 + cd_media_toc: last track 1 starts at block 0 + cd_media_info: disk type 00 + ID_CDROM=1 + ID_CDROM_MRW=1 + ID_CDROM_MRW_W=1 + ID_CDROM_MEDIA=1 + ID_CDROM_MEDIA_CD=1 + ID_CDROM_MEDIA_STATE=blank + +Others work fine, but ID_CDROM_MEDIA_STATE is not needed for non-writable CDROM media: + + $ /lib/udev/cdrom_id -d /dev/sr1 + main: probing: '/dev/sr1' + cd_inquiry: INQUIRY: [SanDisk ][U3 Cruzer Micro ][8.02] + cd_profiles: GET CONFIGURATION: number of profiles 72 + cd_profiles: current profile 0x08 + cd_media_toc: READ TOC: len: 20 + cd_media_toc: track=1 info=0x4(data) start_block=0 + cd_media_toc: last track 1 starts at block 0 + cd_media_info: disk type 00 + ID_CDROM=1 + ID_CDROM_MRW=1 + ID_CDROM_MRW_W=1 + ID_CDROM_MEDIA=1 + ID_CDROM_MEDIA_CD=1 + ID_CDROM_MEDIA_STATE=complete + ID_CDROM_MEDIA_SESSION_COUNT=1 + ID_CDROM_MEDIA_TRACK_COUNT=1 + ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 +--- + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 0d873ae..921e534 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -426,8 +426,10 @@ static int cd_media_info(struct udev *udev, int fd) + + info(udev, "disk type %02x\n", header[8]); + +- if ((header[2] & 3) < 4) ++ /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ ++ if (!cd_media_cd_rom && (header[2] & 3) < 4) + cd_media_state = media_status[header[2] & 3]; ++ + if ((header[2] & 3) != 2) + cd_media_session_next = header[10] << 8 | header[5]; + cd_media_session_count = header[9] << 8 | header[4]; diff --git a/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch b/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch new file mode 100644 index 0000000..aac97b5 --- /dev/null +++ b/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch @@ -0,0 +1,28 @@ +From: Alan Jenkins +Date: Wed, 20 May 2009 14:12:22 +0000 (+0200) +Subject: udevadm: settle - fix timeout +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f58a9099bb2b18f3f683615324a4382b95446305 + +udevadm: settle - fix timeout + +The timeout wasn't working when settle was run as root: + # udevadm control --stop-exec-queue + # udevadm trigger + # udevadm settle --timeout=1 + ... (hangs) + +Signed-off-by: Alan Jenkins +--- + +diff --git a/udev/udevadm-settle.c b/udev/udevadm-settle.c +index 3b26f10..52d9c0b 100644 +--- a/udev/udevadm-settle.c ++++ b/udev/udevadm-settle.c +@@ -167,6 +167,7 @@ int udevadm_settle(struct udev *udev, int argc, char *argv[]) + sigprocmask(SIG_BLOCK, &mask, &oldmask); + if (udev_ctrl_send_settle(uctrl) > 0) + sigsuspend(&oldmask); ++ sigprocmask(SIG_SETMASK, &oldmask, NULL); + udev_ctrl_unref(uctrl); + } + } diff --git a/udev.spec b/udev.spec index 7aea0d7..a8bce69 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 142 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,12 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig +Patch1: udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch +Patch2: udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch +Patch3: udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch +Patch4: udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch +Patch5: udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -73,6 +79,12 @@ dynamic library, which provides access to udev device information. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + %build %if %{with_static} %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static @@ -348,7 +360,15 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu Jun 04 2009 Harald Hoyer 142-3 +* Thu Jun 08 2009 Harald Hoyer 142-4 +- git fix: udevadm: settle - fix timeout +- git fix: OWNER/GROUP: fix if logic +- git fix: rule-generator: cd - skip by-path links if we create by-id links +- git fix: fix possible endless loop for GOTO to non-existent LABEL +- git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable + CDROM media + +* Thu Jun 08 2009 Harald Hoyer 142-3 - delay device-mapper changes * Fri Jun 05 2009 Bastien Nocera 142-2 From 644b709215a4a3392f8f837c91b033a6f893411c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Jun 2009 14:36:59 +0000 Subject: [PATCH 491/640] - version 143 --- udev.spec | 166 ++++++++++++++++++++++++------------------------------ 1 file changed, 75 insertions(+), 91 deletions(-) diff --git a/udev.spec b/udev.spec index a8bce69..4225337 100644 --- a/udev.spec +++ b/udev.spec @@ -1,16 +1,17 @@ %define debug true -%define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware Summary: A userspace implementation of devfs Name: udev -Version: 142 -Release: 4%{?dist} +Version: 143 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 +Obsoletes: udev-extras < 20090618 +Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev @@ -18,24 +19,24 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch -Patch2: udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch -Patch3: udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch -Patch4: udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch -Patch5: udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd +Requires: hwdata + BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -%if %{with_static} -BuildRequires: libselinux-static libsepol-static -BuildRequires: autoconf libtool -%endif +BuildRequires: glib2-devel +BuildRequires: libusb-devel +BuildRequires: libxslt +BuildRequires: hwdata +BuildRequires: gobject-introspection-devel >= 0.6.2 +BuildRequires: gtk-doc +BuildRequires: usbutils + Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 @@ -46,20 +47,10 @@ Provides: dev = 0:3.12-1 The udev package contains an implementation of devfs in userspace using sysfs and netlink. -%if %{with_static} -%package static -Summary: Static udev binaries for init environments -Group: System Environment/Base -Requires: udev = %{version}-%{release} - -%description static -This package contains static versions of the udev binaries, -to build e.g. an initramfs. -%endif - %package -n libudev0 Summary: Dynamic library to access udev device information Group: System Environment/Libraries +Obsoletes: libudev0 < 143 %description -n libudev0 This package contains the dynamic library libudev, which provides access @@ -76,37 +67,35 @@ Requires: libudev0 = %{version}-%{release} This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. +%package -n libgudev-1.0-0 +Summary: Libraries for adding libudev support to applications that use glib. +Group: Development/Libraries +Requires: libudev >= 142 + +%description -n libgudev-1.0-0 +This package contains the libraries that make it easier to use libudev +functionality from applications that use glib. + +%package -n libgudev-devel +Summary: Header files for adding libudev support to applications that use glib. +Group: Development/Libraries +Requires: libudev-devel >= 142 +Requires: libgudev-1.0-0 = %{version}-%{release} + +%description -n libgudev-devel +This package contains the header and pkg-config files for developing +glib-based applications using libudev functionality. + %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - %build -%if %{with_static} -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static -make LDFLAGS="-all-static" %{?_smp_mflags} -for i in udev/udevd \ - udev/udevadm \ - extras/scsi_id/scsi_id \ - extras/ata_id/ata_id \ - extras/edd_id/edd_id \ - extras/usb_id/usb_id \ - extras/cdrom_id/cdrom_id \ - extras/floppy/create_floppy_devices \ - ; do - mv $i $i.static -done -make clean -%else -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" -%endif +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ + --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ + --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ + --with-rootlibdir=/%{_lib} --enable-introspection make %{?_smp_mflags} - %install rm -rf $RPM_BUILD_ROOT @@ -114,9 +103,11 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT -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 +#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 +rm -f $RPM_BUILD_ROOT%{_docdir}/udev/README.keymap.txt +rmdir $RPM_BUILD_ROOT%{_docdir}/udev # Deprecated, but keep the ownership mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} @@ -134,24 +125,8 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol -%if %{with_static} -for i in extras/scsi_id/scsi_id \ - extras/ata_id/ata_id \ - extras/edd_id/edd_id \ - extras/usb_id/usb_id \ - extras/floppy/create_floppy_devices \ - ; do - install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static -done - -for i in udev/udevd udev/udevadm; do - install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$(basename $i).static -done - -%endif - for i in \ - rules/redhat/40-redhat.rules \ + rules/redhat/40-redhat.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -262,12 +237,15 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %post -n libudev0 -p /sbin/ldconfig %postun -n libudev0 -p /sbin/ldconfig +%post -n libgudev-1.0-0 -p /sbin/ldconfig +%postun -n libgudev-1.0-0 -p /sbin/ldconfig + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(0644, root, root, 0755) -%doc COPYING README TODO ChangeLog docs/* +%doc COPYING README TODO ChangeLog docs/* extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/udevtrigger @@ -281,6 +259,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/usb_id %attr(0755,root,root) %{udev_scriptdir}/cdrom_id %attr(0755,root,root) %{udev_scriptdir}/path_id +%attr(0755,root,root) %{udev_scriptdir}/hid2hci %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh %attr(0755,root,root) %{udev_scriptdir}/firmware.sh @@ -315,12 +294,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%attr(0644,root,root) %{_mandir}/man8/ata_id*.8* -%attr(0644,root,root) %{_mandir}/man8/edd_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/usb_id*.8* -%attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* %dir %attr(0755,root,root) /var/lib/udev %dir %attr(0755,root,root) /var/lib/udev/makedev.d @@ -330,18 +303,16 @@ rm -rf $RPM_BUILD_ROOT %ghost %dir %{_sysconfdir}/udev/devices/ %ghost %dir %{_sysconfdir}/dev.d/ -%if %{with_static} -%files static -%defattr(0644, root, root, 0755) -%doc COPYING -%attr(0755,root,root) /sbin/udevd.static -%attr(0755,root,root) /sbin/udevadm.static -%attr(0755,root,root) %{udev_scriptdir}/scsi_id.static -%attr(0755,root,root) %{udev_scriptdir}/ata_id.static -%attr(0755,root,root) %{udev_scriptdir}/edd_id.static -%attr(0755,root,root) %{udev_scriptdir}/usb_id.static -%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static -%endif +%attr(0755,root,root) %{udev_scriptdir}/modem-modeswitch +%attr(0755,root,root) %{udev_scriptdir}/pci-db +%attr(0755,root,root) %{udev_scriptdir}/usb-db +%attr(0755,root,root) %{udev_scriptdir}/keymap +%attr(0755,root,root) %{udev_scriptdir}/udev-acl +%attr(0755,root,root) %{udev_scriptdir}/v4l_id +%attr(0755,root,root) %{_datadir}/udev/findkeyboards +%attr(0755,root,root) %{udev_scriptdir}/keymaps/* +%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck + %files -n libudev0 %defattr(0644, root, root, 0755) @@ -354,12 +325,25 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc -%if %{with_static} -%{_libdir}/libudev.a -%endif +%{_datadir}/gtk-doc/html/libudev/* +%files -n libgudev-1.0-0 +%defattr(0644, root, root, 0755) +%attr(0755,root,root) %{_libdir}/libgudev-1.0* +%attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib + +%files -n libgudev-devel +%defattr(0644, root, root, 0755) +%attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h +%attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir +%dir %{_datadir}/gtk-doc/html/gudev +%attr(0644,root,root) %{_datadir}/gtk-doc/html/gudev/* +%attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jun 19 2009 Harald Hoyer 143-1 +- version 143 + * Thu Jun 08 2009 Harald Hoyer 142-4 - git fix: udevadm: settle - fix timeout - git fix: OWNER/GROUP: fix if logic From d2639a068dfd628f922bfaed20185a61df42da16 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Jun 2009 14:36:59 +0000 Subject: [PATCH 492/640] - version 143 --- udev.spec | 166 ++++++++++++++++++++++++------------------------------ 1 file changed, 75 insertions(+), 91 deletions(-) diff --git a/udev.spec b/udev.spec index a8bce69..4225337 100644 --- a/udev.spec +++ b/udev.spec @@ -1,16 +1,17 @@ %define debug true -%define with_static 1 %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware Summary: A userspace implementation of devfs Name: udev -Version: 142 -Release: 4%{?dist} +Version: 143 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 +Obsoletes: udev-extras < 20090618 +Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev @@ -18,24 +19,24 @@ Source3: udev-post.init Source4: fw_unit_symlinks.sh Source5: udev.sysconfig -Patch1: udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch -Patch2: udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch -Patch3: udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch -Patch4: udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch -Patch5: udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd +Requires: hwdata + BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -%if %{with_static} -BuildRequires: libselinux-static libsepol-static -BuildRequires: autoconf libtool -%endif +BuildRequires: glib2-devel +BuildRequires: libusb-devel +BuildRequires: libxslt +BuildRequires: hwdata +BuildRequires: gobject-introspection-devel >= 0.6.2 +BuildRequires: gtk-doc +BuildRequires: usbutils + Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 @@ -46,20 +47,10 @@ Provides: dev = 0:3.12-1 The udev package contains an implementation of devfs in userspace using sysfs and netlink. -%if %{with_static} -%package static -Summary: Static udev binaries for init environments -Group: System Environment/Base -Requires: udev = %{version}-%{release} - -%description static -This package contains static versions of the udev binaries, -to build e.g. an initramfs. -%endif - %package -n libudev0 Summary: Dynamic library to access udev device information Group: System Environment/Libraries +Obsoletes: libudev0 < 143 %description -n libudev0 This package contains the dynamic library libudev, which provides access @@ -76,37 +67,35 @@ Requires: libudev0 = %{version}-%{release} This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. +%package -n libgudev-1.0-0 +Summary: Libraries for adding libudev support to applications that use glib. +Group: Development/Libraries +Requires: libudev >= 142 + +%description -n libgudev-1.0-0 +This package contains the libraries that make it easier to use libudev +functionality from applications that use glib. + +%package -n libgudev-devel +Summary: Header files for adding libudev support to applications that use glib. +Group: Development/Libraries +Requires: libudev-devel >= 142 +Requires: libgudev-1.0-0 = %{version}-%{release} + +%description -n libgudev-devel +This package contains the header and pkg-config files for developing +glib-based applications using libudev functionality. + %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - %build -%if %{with_static} -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" --enable-static -make LDFLAGS="-all-static" %{?_smp_mflags} -for i in udev/udevd \ - udev/udevadm \ - extras/scsi_id/scsi_id \ - extras/ata_id/ata_id \ - extras/edd_id/edd_id \ - extras/usb_id/usb_id \ - extras/cdrom_id/cdrom_id \ - extras/floppy/create_floppy_devices \ - ; do - mv $i $i.static -done -make clean -%else -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} --sbindir="/sbin" -%endif +%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ + --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ + --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ + --with-rootlibdir=/%{_lib} --enable-introspection make %{?_smp_mflags} - %install rm -rf $RPM_BUILD_ROOT @@ -114,9 +103,11 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT -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 +#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 +rm -f $RPM_BUILD_ROOT%{_docdir}/udev/README.keymap.txt +rmdir $RPM_BUILD_ROOT%{_docdir}/udev # Deprecated, but keep the ownership mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} @@ -134,24 +125,8 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol -%if %{with_static} -for i in extras/scsi_id/scsi_id \ - extras/ata_id/ata_id \ - extras/edd_id/edd_id \ - extras/usb_id/usb_id \ - extras/floppy/create_floppy_devices \ - ; do - install -m 0755 $i.static $RPM_BUILD_ROOT%{udev_scriptdir}/$(basename $i).static -done - -for i in udev/udevd udev/udevadm; do - install -m 0755 $i.static $RPM_BUILD_ROOT/sbin/$(basename $i).static -done - -%endif - for i in \ - rules/redhat/40-redhat.rules \ + rules/redhat/40-redhat.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -262,12 +237,15 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %post -n libudev0 -p /sbin/ldconfig %postun -n libudev0 -p /sbin/ldconfig +%post -n libgudev-1.0-0 -p /sbin/ldconfig +%postun -n libgudev-1.0-0 -p /sbin/ldconfig + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(0644, root, root, 0755) -%doc COPYING README TODO ChangeLog docs/* +%doc COPYING README TODO ChangeLog docs/* extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/udevtrigger @@ -281,6 +259,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/usb_id %attr(0755,root,root) %{udev_scriptdir}/cdrom_id %attr(0755,root,root) %{udev_scriptdir}/path_id +%attr(0755,root,root) %{udev_scriptdir}/hid2hci %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh %attr(0755,root,root) %{udev_scriptdir}/firmware.sh @@ -315,12 +294,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%attr(0644,root,root) %{_mandir}/man8/ata_id*.8* -%attr(0644,root,root) %{_mandir}/man8/edd_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/usb_id*.8* -%attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8* %dir %attr(0755,root,root) /var/lib/udev %dir %attr(0755,root,root) /var/lib/udev/makedev.d @@ -330,18 +303,16 @@ rm -rf $RPM_BUILD_ROOT %ghost %dir %{_sysconfdir}/udev/devices/ %ghost %dir %{_sysconfdir}/dev.d/ -%if %{with_static} -%files static -%defattr(0644, root, root, 0755) -%doc COPYING -%attr(0755,root,root) /sbin/udevd.static -%attr(0755,root,root) /sbin/udevadm.static -%attr(0755,root,root) %{udev_scriptdir}/scsi_id.static -%attr(0755,root,root) %{udev_scriptdir}/ata_id.static -%attr(0755,root,root) %{udev_scriptdir}/edd_id.static -%attr(0755,root,root) %{udev_scriptdir}/usb_id.static -%attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices.static -%endif +%attr(0755,root,root) %{udev_scriptdir}/modem-modeswitch +%attr(0755,root,root) %{udev_scriptdir}/pci-db +%attr(0755,root,root) %{udev_scriptdir}/usb-db +%attr(0755,root,root) %{udev_scriptdir}/keymap +%attr(0755,root,root) %{udev_scriptdir}/udev-acl +%attr(0755,root,root) %{udev_scriptdir}/v4l_id +%attr(0755,root,root) %{_datadir}/udev/findkeyboards +%attr(0755,root,root) %{udev_scriptdir}/keymaps/* +%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck + %files -n libudev0 %defattr(0644, root, root, 0755) @@ -354,12 +325,25 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc -%if %{with_static} -%{_libdir}/libudev.a -%endif +%{_datadir}/gtk-doc/html/libudev/* +%files -n libgudev-1.0-0 +%defattr(0644, root, root, 0755) +%attr(0755,root,root) %{_libdir}/libgudev-1.0* +%attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib + +%files -n libgudev-devel +%defattr(0644, root, root, 0755) +%attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h +%attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir +%dir %{_datadir}/gtk-doc/html/gudev +%attr(0644,root,root) %{_datadir}/gtk-doc/html/gudev/* +%attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jun 19 2009 Harald Hoyer 143-1 +- version 143 + * Thu Jun 08 2009 Harald Hoyer 142-4 - git fix: udevadm: settle - fix timeout - git fix: OWNER/GROUP: fix if logic From fa01ff8e9d9da6f2421cdc20eca3e8217bbc8437 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Jun 2009 14:41:31 +0000 Subject: [PATCH 493/640] obsolete libgudev --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index 4225337..24072f5 100644 --- a/udev.spec +++ b/udev.spec @@ -71,6 +71,8 @@ dynamic library, which provides access to udev device information. Summary: Libraries for adding libudev support to applications that use glib. Group: Development/Libraries Requires: libudev >= 142 +Provides: libgudev = 20090517 +Obsoletes: libgudev <= 20090516 %description -n libgudev-1.0-0 This package contains the libraries that make it easier to use libudev From 6e123c68b91fefcff2211ee66be5a38a39818f4e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Jun 2009 14:41:31 +0000 Subject: [PATCH 494/640] obsolete libgudev --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index 4225337..24072f5 100644 --- a/udev.spec +++ b/udev.spec @@ -71,6 +71,8 @@ dynamic library, which provides access to udev device information. Summary: Libraries for adding libudev support to applications that use glib. Group: Development/Libraries Requires: libudev >= 142 +Provides: libgudev = 20090517 +Obsoletes: libgudev <= 20090516 %description -n libgudev-1.0-0 This package contains the libraries that make it easier to use libudev From 6d20cb6d0893a39a91462910f9aa9d56df08f0c2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 09:59:16 +0000 Subject: [PATCH 495/640] - version 143 --- .cvsignore | 2 +- sources | 2 +- udev-135-sepol.patch | 17 ----- udev-136-cdrom.patch | 21 ------- udev-136-tape.patch | 23 ------- udev-136-video.patch | 20 ------ udev-137-mdremove.patch | 13 ---- udev-137-vol_id1.patch | 20 ------ udev-137-vol_id2.patch | 30 --------- ...-142.tar.bz2.sign => udev-143.tar.bz2.sign | 6 +- udev-CVE-2009-1186.patch | 20 ------ ...40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch | 35 ----------- ...798916bc87d72f5f1399d9e050307901db84.patch | 31 ---------- ...1b67f86c9555cbb41c57774761730f6b8939.patch | 45 -------------- ...231e738dd286591c1becc2f327ed55ed89d1.patch | 62 ------------------- ...9099bb2b18f3f683615324a4382b95446305.patch | 28 --------- udev.spec | 48 +++++++------- upstream | 2 +- 18 files changed, 31 insertions(+), 394 deletions(-) delete mode 100644 udev-135-sepol.patch delete mode 100644 udev-136-cdrom.patch delete mode 100644 udev-136-tape.patch delete mode 100644 udev-136-video.patch delete mode 100644 udev-137-mdremove.patch delete mode 100644 udev-137-vol_id1.patch delete mode 100644 udev-137-vol_id2.patch rename udev-142.tar.bz2.sign => udev-143.tar.bz2.sign (61%) delete mode 100644 udev-CVE-2009-1186.patch delete mode 100644 udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch delete mode 100644 udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch delete mode 100644 udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch delete mode 100644 udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch delete mode 100644 udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch diff --git a/.cvsignore b/.cvsignore index de680dd..e126628 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-142.tar.bz2 +udev-143.tar.bz2 diff --git a/sources b/sources index ed8a92a..31b43f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3edc4cf383dccb06d866c5156d59ddd5 udev-142.tar.bz2 +d15d1886c0bfa756969f25ddaecf34da udev-143.tar.bz2 diff --git a/udev-135-sepol.patch b/udev-135-sepol.patch deleted file mode 100644 index 32c9afb..0000000 --- a/udev-135-sepol.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up udev-135/configure.ac.sepol udev-135/configure.ac ---- udev-135/configure.ac.sepol 2008-12-02 01:05:43.000000000 +0100 -+++ udev-135/configure.ac 2008-12-16 10:45:24.000000000 +0100 -@@ -55,6 +55,13 @@ if test "x$with_selinux" = xyes; then - AC_DEFINE(USE_SELINUX, [1] ,[compile with SELinux support]) - SELINUX_LIBS="-lselinux" - fi -+if test "x$with_selinux" = xyes; then -+ LIBS_save=$LIBS -+ AC_CHECK_LIB(sepol, sepol_genbools, -+ [SELINUX_LIBS="$SELINUX_LIBS -lsepol"], -+ []) -+ LIBS=$LIBS_save -+fi - AC_SUBST([SELINUX_LIBS]) - AM_CONDITIONAL(USE_SELINUX, [test "x$with_selinux" = xyes], [compile with SELinux support]) - diff --git a/udev-136-cdrom.patch b/udev-136-cdrom.patch deleted file mode 100644 index 1ceaa44..0000000 --- a/udev-136-cdrom.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit 18cff5c3b2e3591fa46107288ea2d7026a15ccf3 -Author: Kay Sievers -Date: Sat Jan 10 17:44:09 2009 +0100 - - rules: fix typo in ide cd rule - - Thanks to Scott, who found that. - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index 119941b..7730f0d 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -68,7 +68,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitio - - # cdrom - SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" --SUBSYSTEM=="block", KERNEL=="hd[0-9]*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" -+SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" - SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" - KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom" - KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom" diff --git a/udev-136-tape.patch b/udev-136-tape.patch deleted file mode 100644 index 93bcbd1..0000000 --- a/udev-136-tape.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 8b739dec53f8bca23e46e2d2a9732abee9b8d591 -Author: Lennart Poettering -Date: Sat Jan 10 01:37:03 2009 +0100 - - fix naming for tape nst devices in /dev/tape/by-path/ - - $env{ID_PATH} includes the "-nst" suffix anyway, so we shouldn't append - it a second time as part of the rule creating the device file symlink. - - Signed-off-by: Lennart Poettering - -diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules -index d3226f1..8d53888 100644 ---- a/rules/rules.d/60-persistent-storage-tape.rules -+++ b/rules/rules.d/60-persistent-storage-tape.rules -@@ -19,6 +19,6 @@ KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$en - # by-path (parent device path) - KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p" - KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" --KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" -+KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" - - LABEL="persistent_storage_tape_end" diff --git a/udev-136-video.patch b/udev-136-video.patch deleted file mode 100644 index dd9d31a..0000000 --- a/udev-136-video.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 66d9b44f8302efe383ada6a52d8431655614bf76 -Author: Kay Sievers -Date: Thu Jan 15 17:06:14 2009 +0100 - - rules: add drm devices to group "video" - - https://bugs.launchpad.net/bugs/317430 - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index 7730f0d..95d82d7 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -38,6 +38,7 @@ KERNEL=="card[0-9]*", NAME="dri/%k" - KERNEL=="pmu", GROUP="video" - KERNEL=="nvidia*|nvidiactl*", GROUP="video" - SUBSYSTEM=="graphics", GROUP="video" -+SUBSYSTEM=="drm", GROUP="video" - - # DVB (video) - SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video" diff --git a/udev-137-mdremove.patch b/udev-137-mdremove.patch deleted file mode 100644 index d144bd6..0000000 --- a/udev-137-mdremove.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up udev-137/rules/packages/64-md-raid.rules.mdremove udev-137/rules/packages/64-md-raid.rules ---- udev-137/rules/packages/64-md-raid.rules.mdremove 2009-02-05 08:47:35.000000000 +0100 -+++ udev-137/rules/packages/64-md-raid.rules 2009-02-05 08:47:58.000000000 +0100 -@@ -11,7 +11,8 @@ KERNEL!="md*", GOTO="md_end" - # container devices have a metadata version of e.g. 'external:ddf' and - # never leave state 'inactive' - ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" --ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -+ATTR{md/array_state}=="clear|inactive", GOTO="md_end" -+ATTR{md/array_state}!="?*", GOTO="md_end" - LABEL="md_ignore_state" - - IMPORT{program}="/sbin/mdadm --detail --export $tempnode" diff --git a/udev-137-vol_id1.patch b/udev-137-vol_id1.patch deleted file mode 100644 index 41f7403..0000000 --- a/udev-137-vol_id1.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 7e5861ff70994fdc2e383e227ff24225ac5f7ce5 -Author: Karel Zak -Date: Sat Jan 24 00:37:23 2009 +0100 - - vol_id: add missing id->type to swap0 - - Signed-off-by: Karel Zak - -diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c -index 1698e9d..53649bd 100644 ---- a/extras/volume_id/lib/linux_swap.c -+++ b/extras/volume_id/lib/linux_swap.c -@@ -57,6 +57,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size - return -1; - - if (memcmp(buf, "SWAP-SPACE", 10) == 0) { -+ id->type = "swap"; - strcpy(id->type_version, "1"); - goto found; - } diff --git a/udev-137-vol_id2.patch b/udev-137-vol_id2.patch deleted file mode 100644 index 34815ca..0000000 --- a/udev-137-vol_id2.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 3e2084614b4d8308d5c0ceb34ec3634eb3353c00 -Author: Karel Zak -Date: Sat Jan 24 00:37:22 2009 +0100 - - vol_id: fix ddf version string - - The version string in DDF suberblock does not include the null terminator - and the snprintf() function writes at most "size" bytes *including* the - null byte. - - old version: - ID_FS_VERSION=02.00.0 - new version: - ID_FS_VERSION=02.00.00 - - Signed-off-by: Karel Zak - -diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c -index 58bdae9..32f20ce 100644 ---- a/extras/volume_id/lib/ddf_raid.c -+++ b/extras/volume_id/lib/ddf_raid.c -@@ -87,7 +87,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - found: - volume_id_set_uuid(id, ddf->guid, DDF_GUID_LENGTH, UUID_STRING); -- snprintf(id->type_version, DDF_REV_LENGTH, "%s", ddf->ddf_rev); -+ snprintf(id->type_version, DDF_REV_LENGTH + 1, "%s", ddf->ddf_rev); - volume_id_set_usage(id, VOLUME_ID_RAID); - id->type = "ddf_raid_member"; - return 0; diff --git a/udev-142.tar.bz2.sign b/udev-143.tar.bz2.sign similarity index 61% rename from udev-142.tar.bz2.sign rename to udev-143.tar.bz2.sign index 32394f1..a080c1e 100644 --- a/udev-142.tar.bz2.sign +++ b/udev-143.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBKCkrhyGugalF9Dw4RAq/BAJ9jlPzsGL1AY6oGAe9k/w40yh8PAACdFb4X -uCq/RlDaoybxMChpTXmrdSY= -=KJLi +iD8DBQBKO9c+yGugalF9Dw4RAm+eAJ92SgVdT1dgfJRsblhgec8982aNvACfdJPn +vGonPNcM/qytpkbb6v8/7Jg= +=WRP9 -----END PGP SIGNATURE----- diff --git a/udev-CVE-2009-1186.patch b/udev-CVE-2009-1186.patch deleted file mode 100644 index 56332ca..0000000 --- a/udev-CVE-2009-1186.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- udev-141/udev/lib/libudev-util.c.CVE-2009-1186 2009-04-08 09:04:26.000000000 -0400 -+++ udev-141/udev/lib/libudev-util.c 2009-04-15 13:25:10.000000000 -0400 -@@ -9,6 +9,7 @@ - * version 2.1 of the License, or (at your option) any later version. - */ - -+#include - #include - #include - #include -@@ -103,6 +104,9 @@ int util_log_priority(const char *priori - - size_t util_path_encode(char *s, size_t len) - { -+ if (len == 0 || len > (SIZE_MAX - 1) / 4) -+ return 0; -+ - char t[(len * 4)+1]; - size_t i, j; - diff --git a/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch b/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch deleted file mode 100644 index 5915df3..0000000 --- a/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Scott James Remnant -Date: Thu, 14 May 2009 11:42:44 +0000 (+0100) -Subject: OWNER/GROUP: fix if logic -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c - -OWNER/GROUP: fix if logic - -The introduction of the --resolve-names=early/never code introduced a -bug to the OWNER/GROUP lookup. Previously if the name had contained $, -lookup would have been performed later; after the patch, the key ended -up being ignored! ---- - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index b8b7e52..39fe55a 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1431,7 +1431,7 @@ static int add_rule(struct udev_rules *rules, char *line, - } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { - uid = add_uid(rules, value); - rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid); -- } else if (rules->resolve_names == 0) { -+ } else if (rules->resolve_names >= 0) { - rule_add_key(&rule_tmp, TK_A_OWNER, op, value, NULL); - } - rule_tmp.rule.rule.flags = 1; -@@ -1448,7 +1448,7 @@ static int add_rule(struct udev_rules *rules, char *line, - } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { - gid = add_gid(rules, value); - rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid); -- } else if (rules->resolve_names == 0) { -+ } else if (rules->resolve_names >= 0) { - rule_add_key(&rule_tmp, TK_A_GROUP, op, value, NULL); - } - rule_tmp.rule.rule.flags = 1; diff --git a/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch b/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch deleted file mode 100644 index fc6fcd6..0000000 --- a/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Kay Sievers -Date: Wed, 13 May 2009 16:01:32 +0000 (+0200) -Subject: fix possible endless loop for GOTO to non-existent LABEL -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=0c37798916bc87d72f5f1399d9e050307901db84 - -fix possible endless loop for GOTO to non-existent LABEL - -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526365 ---- - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index fac418e..b8b7e52 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1610,6 +1610,7 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s - if (strcmp(label, &rules->buf[rules->tokens[j].rule.label_off]) != 0) - continue; - rules->tokens[i].key.rule_goto = j; -+ break; - } - if (rules->tokens[i].key.rule_goto == 0) - err(rules->udev, "GOTO '%s' has no matching label in: '%s'\n", label, filename); -@@ -2504,6 +2505,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - break; - } - case TK_A_GOTO: -+ if (cur->key.rule_goto == 0) -+ break; - cur = &rules->tokens[cur->key.rule_goto]; - continue; - case TK_A_LAST_RULE: diff --git a/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch b/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch deleted file mode 100644 index 697af69..0000000 --- a/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Kay Sievers -Date: Thu, 14 May 2009 10:57:19 +0000 (+0200) -Subject: rule-generator: cd - skip by-path links if we create by-id links -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=b4fa1b67f86c9555cbb41c57774761730f6b8939 - -rule-generator: cd - skip by-path links if we create by-id links ---- - -diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules -index e357a6a..e6da010 100644 ---- a/extras/rule_generator/75-cd-aliases-generator.rules -+++ b/extras/rule_generator/75-cd-aliases-generator.rules -@@ -1,6 +1,9 @@ - # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks - --# the path of removable devices changes frequently --ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" -+# the "path" of usb/ieee1394 devices changes frequently, use "id" -+ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \ -+ PROGRAM="write_cd_rules by-id", SYMLINK+="%c", GOTO="persistent_cd_end" - - ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" -+ -+LABEL="persistent_cd_end" -diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules -index 398cd27..0d16fe6 100644 ---- a/extras/rule_generator/write_cd_rules -+++ b/extras/rule_generator/write_cd_rules -@@ -97,7 +97,7 @@ choose_rules_file - - link_num=$(find_next_available 'cdrom[0-9]*') - --match="ENV{ID_CDROM}==\"?*\", $RULE" -+match="SUBSYSTEM==\"block\", ENV{ID_CDROM}==\"?*\", $RULE" - - comment="$ID_MODEL ($ID_PATH)" - -@@ -108,6 +108,7 @@ comment="$ID_MODEL ($ID_PATH)" - write_rule "$match" "dvd$link_num" - [ "$ID_CDROM_DVD_R" -o "$ID_CDROM_DVD_RW" -o "$ID_CDROM_DVD_RAM" ] && \ - write_rule "$match" "dvdrw$link_num" -+echo >> $RULES_FILE - - unlock_rules_file - diff --git a/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch b/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch deleted file mode 100644 index 3ba1820..0000000 --- a/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Kay Sievers -Date: Mon, 25 May 2009 22:50:45 +0000 (+0200) -Subject: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=d3c8231e738dd286591c1becc2f327ed55ed89d1 - -cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media - -Some broken fake cdrom drives return ID_CDROM_MEDIA_STATE=blank. - - $ /lib/udev/cdrom_id -d /dev/sr1 - main: probing: '/dev/sr1' - cd_inquiry: INQUIRY: [Nokia ][S60 ][1.0 ] - cd_profiles: GET CONFIGURATION: number of profiles 76 - cd_profiles: current profile 0x08 - cd_media_toc: READ TOC: len: 12 - cd_media_toc: last track 1 starts at block 0 - cd_media_info: disk type 00 - ID_CDROM=1 - ID_CDROM_MRW=1 - ID_CDROM_MRW_W=1 - ID_CDROM_MEDIA=1 - ID_CDROM_MEDIA_CD=1 - ID_CDROM_MEDIA_STATE=blank - -Others work fine, but ID_CDROM_MEDIA_STATE is not needed for non-writable CDROM media: - - $ /lib/udev/cdrom_id -d /dev/sr1 - main: probing: '/dev/sr1' - cd_inquiry: INQUIRY: [SanDisk ][U3 Cruzer Micro ][8.02] - cd_profiles: GET CONFIGURATION: number of profiles 72 - cd_profiles: current profile 0x08 - cd_media_toc: READ TOC: len: 20 - cd_media_toc: track=1 info=0x4(data) start_block=0 - cd_media_toc: last track 1 starts at block 0 - cd_media_info: disk type 00 - ID_CDROM=1 - ID_CDROM_MRW=1 - ID_CDROM_MRW_W=1 - ID_CDROM_MEDIA=1 - ID_CDROM_MEDIA_CD=1 - ID_CDROM_MEDIA_STATE=complete - ID_CDROM_MEDIA_SESSION_COUNT=1 - ID_CDROM_MEDIA_TRACK_COUNT=1 - ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 ---- - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0d873ae..921e534 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -426,8 +426,10 @@ static int cd_media_info(struct udev *udev, int fd) - - info(udev, "disk type %02x\n", header[8]); - -- if ((header[2] & 3) < 4) -+ /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ -+ if (!cd_media_cd_rom && (header[2] & 3) < 4) - cd_media_state = media_status[header[2] & 3]; -+ - if ((header[2] & 3) != 2) - cd_media_session_next = header[10] << 8 | header[5]; - cd_media_session_count = header[9] << 8 | header[4]; diff --git a/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch b/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch deleted file mode 100644 index aac97b5..0000000 --- a/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Alan Jenkins -Date: Wed, 20 May 2009 14:12:22 +0000 (+0200) -Subject: udevadm: settle - fix timeout -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f58a9099bb2b18f3f683615324a4382b95446305 - -udevadm: settle - fix timeout - -The timeout wasn't working when settle was run as root: - # udevadm control --stop-exec-queue - # udevadm trigger - # udevadm settle --timeout=1 - ... (hangs) - -Signed-off-by: Alan Jenkins ---- - -diff --git a/udev/udevadm-settle.c b/udev/udevadm-settle.c -index 3b26f10..52d9c0b 100644 ---- a/udev/udevadm-settle.c -+++ b/udev/udevadm-settle.c -@@ -167,6 +167,7 @@ int udevadm_settle(struct udev *udev, int argc, char *argv[]) - sigprocmask(SIG_BLOCK, &mask, &oldmask); - if (udev_ctrl_send_settle(uctrl) > 0) - sigsuspend(&oldmask); -+ sigprocmask(SIG_SETMASK, &oldmask, NULL); - udev_ctrl_unref(uctrl); - } - } diff --git a/udev.spec b/udev.spec index 24072f5..bc3446f 100644 --- a/udev.spec +++ b/udev.spec @@ -47,44 +47,48 @@ Provides: dev = 0:3.12-1 The udev package contains an implementation of devfs in userspace using sysfs and netlink. -%package -n libudev0 +%package -n libudev Summary: Dynamic library to access udev device information Group: System Environment/Libraries -Obsoletes: libudev0 < 143 +Obsoletes: libudev0 <= 142 +Provides: libudev0 = 143 -%description -n libudev0 +%description -n libudev This package contains the dynamic library libudev, which provides access to udev device information, and an interface to search devices in sysfs. - %package -n libudev-devel Summary: Development files for libudev Group: Development/Libraries Requires: udev = %{version}-%{release} -Requires: libudev0 = %{version}-%{release} +Requires: libudev = %{version}-%{release} %description -n libudev-devel This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. -%package -n libgudev-1.0-0 +%package -n libgudev1 Summary: Libraries for adding libudev support to applications that use glib. Group: Development/Libraries Requires: libudev >= 142 +# remove the following lines for libgudev so major 1 Provides: libgudev = 20090517 Obsoletes: libgudev <= 20090516 -%description -n libgudev-1.0-0 +%description -n libgudev1 This package contains the libraries that make it easier to use libudev functionality from applications that use glib. -%package -n libgudev-devel +%package -n libgudev1-devel Summary: Header files for adding libudev support to applications that use glib. Group: Development/Libraries Requires: libudev-devel >= 142 -Requires: libgudev-1.0-0 = %{version}-%{release} +Provides: libgudev-devel = 20090517 +Obsoletes: libgudev-devel <= 20090516 -%description -n libgudev-devel +Requires: libgudev1 = %{version}-%{release} + +%description -n libgudev1-devel This package contains the header and pkg-config files for developing glib-based applications using libudev functionality. @@ -105,11 +109,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT -#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 -rm -f $RPM_BUILD_ROOT%{_docdir}/udev/README.keymap.txt -rmdir $RPM_BUILD_ROOT%{_docdir}/udev +rm -fr $RPM_BUILD_ROOT%{_docdir}/udev # Deprecated, but keep the ownership mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} @@ -138,6 +138,7 @@ for i in \ %ifarch s390 s390x rules/packages/40-s390.rules \ %endif + rules/packages/40-isdn.rules \ rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ rules/packages/64-device-mapper.rules \ @@ -236,11 +237,11 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %triggerin -- MAKEDEV rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : -%post -n libudev0 -p /sbin/ldconfig -%postun -n libudev0 -p /sbin/ldconfig +%post -n libudev -p /sbin/ldconfig +%postun -n libudev -p /sbin/ldconfig -%post -n libgudev-1.0-0 -p /sbin/ldconfig -%postun -n libgudev-1.0-0 -p /sbin/ldconfig +%post -n libgudev1 -p /sbin/ldconfig +%postun -n libgudev1 -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT @@ -311,12 +312,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/keymap %attr(0755,root,root) %{udev_scriptdir}/udev-acl %attr(0755,root,root) %{udev_scriptdir}/v4l_id -%attr(0755,root,root) %{_datadir}/udev/findkeyboards +%attr(0755,root,root) %{udev_scriptdir}/findkeyboards %attr(0755,root,root) %{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck -%files -n libudev0 +%files -n libudev %defattr(0644, root, root, 0755) %doc COPYING %attr(0755,root,root) /%{_lib}/libudev.so.* @@ -327,14 +328,15 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc +%{_datadir}/pkgconfig/udev.pc %{_datadir}/gtk-doc/html/libudev/* -%files -n libgudev-1.0-0 +%files -n libgudev1 %defattr(0644, root, root, 0755) %attr(0755,root,root) %{_libdir}/libgudev-1.0* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib -%files -n libgudev-devel +%files -n libgudev1-devel %defattr(0644, root, root, 0755) %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir diff --git a/upstream b/upstream index 260ace6..e126628 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-137.tar.bz2 +udev-143.tar.bz2 From b4fc0641396120d4e9329c3577809dc528484147 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 09:59:16 +0000 Subject: [PATCH 496/640] - version 143 --- .cvsignore | 2 +- sources | 2 +- udev-135-sepol.patch | 17 ----- udev-136-cdrom.patch | 21 ------- udev-136-tape.patch | 23 ------- udev-136-video.patch | 20 ------ udev-137-mdremove.patch | 13 ---- udev-137-vol_id1.patch | 20 ------ udev-137-vol_id2.patch | 30 --------- ...-142.tar.bz2.sign => udev-143.tar.bz2.sign | 6 +- udev-CVE-2009-1186.patch | 20 ------ ...40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch | 35 ----------- ...798916bc87d72f5f1399d9e050307901db84.patch | 31 ---------- ...1b67f86c9555cbb41c57774761730f6b8939.patch | 45 -------------- ...231e738dd286591c1becc2f327ed55ed89d1.patch | 62 ------------------- ...9099bb2b18f3f683615324a4382b95446305.patch | 28 --------- udev.spec | 48 +++++++------- upstream | 2 +- 18 files changed, 31 insertions(+), 394 deletions(-) delete mode 100644 udev-135-sepol.patch delete mode 100644 udev-136-cdrom.patch delete mode 100644 udev-136-tape.patch delete mode 100644 udev-136-video.patch delete mode 100644 udev-137-mdremove.patch delete mode 100644 udev-137-vol_id1.patch delete mode 100644 udev-137-vol_id2.patch rename udev-142.tar.bz2.sign => udev-143.tar.bz2.sign (61%) delete mode 100644 udev-CVE-2009-1186.patch delete mode 100644 udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch delete mode 100644 udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch delete mode 100644 udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch delete mode 100644 udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch delete mode 100644 udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch diff --git a/.cvsignore b/.cvsignore index de680dd..e126628 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-142.tar.bz2 +udev-143.tar.bz2 diff --git a/sources b/sources index ed8a92a..31b43f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3edc4cf383dccb06d866c5156d59ddd5 udev-142.tar.bz2 +d15d1886c0bfa756969f25ddaecf34da udev-143.tar.bz2 diff --git a/udev-135-sepol.patch b/udev-135-sepol.patch deleted file mode 100644 index 32c9afb..0000000 --- a/udev-135-sepol.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up udev-135/configure.ac.sepol udev-135/configure.ac ---- udev-135/configure.ac.sepol 2008-12-02 01:05:43.000000000 +0100 -+++ udev-135/configure.ac 2008-12-16 10:45:24.000000000 +0100 -@@ -55,6 +55,13 @@ if test "x$with_selinux" = xyes; then - AC_DEFINE(USE_SELINUX, [1] ,[compile with SELinux support]) - SELINUX_LIBS="-lselinux" - fi -+if test "x$with_selinux" = xyes; then -+ LIBS_save=$LIBS -+ AC_CHECK_LIB(sepol, sepol_genbools, -+ [SELINUX_LIBS="$SELINUX_LIBS -lsepol"], -+ []) -+ LIBS=$LIBS_save -+fi - AC_SUBST([SELINUX_LIBS]) - AM_CONDITIONAL(USE_SELINUX, [test "x$with_selinux" = xyes], [compile with SELinux support]) - diff --git a/udev-136-cdrom.patch b/udev-136-cdrom.patch deleted file mode 100644 index 1ceaa44..0000000 --- a/udev-136-cdrom.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit 18cff5c3b2e3591fa46107288ea2d7026a15ccf3 -Author: Kay Sievers -Date: Sat Jan 10 17:44:09 2009 +0100 - - rules: fix typo in ide cd rule - - Thanks to Scott, who found that. - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index 119941b..7730f0d 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -68,7 +68,7 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitio - - # cdrom - SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" --SUBSYSTEM=="block", KERNEL=="hd[0-9]*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" -+SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" - SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" - KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom" - KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom" diff --git a/udev-136-tape.patch b/udev-136-tape.patch deleted file mode 100644 index 93bcbd1..0000000 --- a/udev-136-tape.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 8b739dec53f8bca23e46e2d2a9732abee9b8d591 -Author: Lennart Poettering -Date: Sat Jan 10 01:37:03 2009 +0100 - - fix naming for tape nst devices in /dev/tape/by-path/ - - $env{ID_PATH} includes the "-nst" suffix anyway, so we shouldn't append - it a second time as part of the rule creating the device file symlink. - - Signed-off-by: Lennart Poettering - -diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules -index d3226f1..8d53888 100644 ---- a/rules/rules.d/60-persistent-storage-tape.rules -+++ b/rules/rules.d/60-persistent-storage-tape.rules -@@ -19,6 +19,6 @@ KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$en - # by-path (parent device path) - KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p" - KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" --KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" -+KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" - - LABEL="persistent_storage_tape_end" diff --git a/udev-136-video.patch b/udev-136-video.patch deleted file mode 100644 index dd9d31a..0000000 --- a/udev-136-video.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 66d9b44f8302efe383ada6a52d8431655614bf76 -Author: Kay Sievers -Date: Thu Jan 15 17:06:14 2009 +0100 - - rules: add drm devices to group "video" - - https://bugs.launchpad.net/bugs/317430 - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index 7730f0d..95d82d7 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -38,6 +38,7 @@ KERNEL=="card[0-9]*", NAME="dri/%k" - KERNEL=="pmu", GROUP="video" - KERNEL=="nvidia*|nvidiactl*", GROUP="video" - SUBSYSTEM=="graphics", GROUP="video" -+SUBSYSTEM=="drm", GROUP="video" - - # DVB (video) - SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video" diff --git a/udev-137-mdremove.patch b/udev-137-mdremove.patch deleted file mode 100644 index d144bd6..0000000 --- a/udev-137-mdremove.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up udev-137/rules/packages/64-md-raid.rules.mdremove udev-137/rules/packages/64-md-raid.rules ---- udev-137/rules/packages/64-md-raid.rules.mdremove 2009-02-05 08:47:35.000000000 +0100 -+++ udev-137/rules/packages/64-md-raid.rules 2009-02-05 08:47:58.000000000 +0100 -@@ -11,7 +11,8 @@ KERNEL!="md*", GOTO="md_end" - # container devices have a metadata version of e.g. 'external:ddf' and - # never leave state 'inactive' - ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" --ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -+ATTR{md/array_state}=="clear|inactive", GOTO="md_end" -+ATTR{md/array_state}!="?*", GOTO="md_end" - LABEL="md_ignore_state" - - IMPORT{program}="/sbin/mdadm --detail --export $tempnode" diff --git a/udev-137-vol_id1.patch b/udev-137-vol_id1.patch deleted file mode 100644 index 41f7403..0000000 --- a/udev-137-vol_id1.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 7e5861ff70994fdc2e383e227ff24225ac5f7ce5 -Author: Karel Zak -Date: Sat Jan 24 00:37:23 2009 +0100 - - vol_id: add missing id->type to swap0 - - Signed-off-by: Karel Zak - -diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c -index 1698e9d..53649bd 100644 ---- a/extras/volume_id/lib/linux_swap.c -+++ b/extras/volume_id/lib/linux_swap.c -@@ -57,6 +57,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size - return -1; - - if (memcmp(buf, "SWAP-SPACE", 10) == 0) { -+ id->type = "swap"; - strcpy(id->type_version, "1"); - goto found; - } diff --git a/udev-137-vol_id2.patch b/udev-137-vol_id2.patch deleted file mode 100644 index 34815ca..0000000 --- a/udev-137-vol_id2.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 3e2084614b4d8308d5c0ceb34ec3634eb3353c00 -Author: Karel Zak -Date: Sat Jan 24 00:37:22 2009 +0100 - - vol_id: fix ddf version string - - The version string in DDF suberblock does not include the null terminator - and the snprintf() function writes at most "size" bytes *including* the - null byte. - - old version: - ID_FS_VERSION=02.00.0 - new version: - ID_FS_VERSION=02.00.00 - - Signed-off-by: Karel Zak - -diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c -index 58bdae9..32f20ce 100644 ---- a/extras/volume_id/lib/ddf_raid.c -+++ b/extras/volume_id/lib/ddf_raid.c -@@ -87,7 +87,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size) - return -1; - found: - volume_id_set_uuid(id, ddf->guid, DDF_GUID_LENGTH, UUID_STRING); -- snprintf(id->type_version, DDF_REV_LENGTH, "%s", ddf->ddf_rev); -+ snprintf(id->type_version, DDF_REV_LENGTH + 1, "%s", ddf->ddf_rev); - volume_id_set_usage(id, VOLUME_ID_RAID); - id->type = "ddf_raid_member"; - return 0; diff --git a/udev-142.tar.bz2.sign b/udev-143.tar.bz2.sign similarity index 61% rename from udev-142.tar.bz2.sign rename to udev-143.tar.bz2.sign index 32394f1..a080c1e 100644 --- a/udev-142.tar.bz2.sign +++ b/udev-143.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBKCkrhyGugalF9Dw4RAq/BAJ9jlPzsGL1AY6oGAe9k/w40yh8PAACdFb4X -uCq/RlDaoybxMChpTXmrdSY= -=KJLi +iD8DBQBKO9c+yGugalF9Dw4RAm+eAJ92SgVdT1dgfJRsblhgec8982aNvACfdJPn +vGonPNcM/qytpkbb6v8/7Jg= +=WRP9 -----END PGP SIGNATURE----- diff --git a/udev-CVE-2009-1186.patch b/udev-CVE-2009-1186.patch deleted file mode 100644 index 56332ca..0000000 --- a/udev-CVE-2009-1186.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- udev-141/udev/lib/libudev-util.c.CVE-2009-1186 2009-04-08 09:04:26.000000000 -0400 -+++ udev-141/udev/lib/libudev-util.c 2009-04-15 13:25:10.000000000 -0400 -@@ -9,6 +9,7 @@ - * version 2.1 of the License, or (at your option) any later version. - */ - -+#include - #include - #include - #include -@@ -103,6 +104,9 @@ int util_log_priority(const char *priori - - size_t util_path_encode(char *s, size_t len) - { -+ if (len == 0 || len > (SIZE_MAX - 1) / 4) -+ return 0; -+ - char t[(len * 4)+1]; - size_t i, j; - diff --git a/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch b/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch deleted file mode 100644 index 5915df3..0000000 --- a/udev.git-055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Scott James Remnant -Date: Thu, 14 May 2009 11:42:44 +0000 (+0100) -Subject: OWNER/GROUP: fix if logic -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=055e40edc647d8ccfc27c9cd3163ab5dbf63ed6c - -OWNER/GROUP: fix if logic - -The introduction of the --resolve-names=early/never code introduced a -bug to the OWNER/GROUP lookup. Previously if the name had contained $, -lookup would have been performed later; after the patch, the key ended -up being ignored! ---- - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index b8b7e52..39fe55a 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1431,7 +1431,7 @@ static int add_rule(struct udev_rules *rules, char *line, - } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { - uid = add_uid(rules, value); - rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid); -- } else if (rules->resolve_names == 0) { -+ } else if (rules->resolve_names >= 0) { - rule_add_key(&rule_tmp, TK_A_OWNER, op, value, NULL); - } - rule_tmp.rule.rule.flags = 1; -@@ -1448,7 +1448,7 @@ static int add_rule(struct udev_rules *rules, char *line, - } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { - gid = add_gid(rules, value); - rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid); -- } else if (rules->resolve_names == 0) { -+ } else if (rules->resolve_names >= 0) { - rule_add_key(&rule_tmp, TK_A_GROUP, op, value, NULL); - } - rule_tmp.rule.rule.flags = 1; diff --git a/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch b/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch deleted file mode 100644 index fc6fcd6..0000000 --- a/udev.git-0c37798916bc87d72f5f1399d9e050307901db84.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Kay Sievers -Date: Wed, 13 May 2009 16:01:32 +0000 (+0200) -Subject: fix possible endless loop for GOTO to non-existent LABEL -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=0c37798916bc87d72f5f1399d9e050307901db84 - -fix possible endless loop for GOTO to non-existent LABEL - -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526365 ---- - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index fac418e..b8b7e52 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1610,6 +1610,7 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s - if (strcmp(label, &rules->buf[rules->tokens[j].rule.label_off]) != 0) - continue; - rules->tokens[i].key.rule_goto = j; -+ break; - } - if (rules->tokens[i].key.rule_goto == 0) - err(rules->udev, "GOTO '%s' has no matching label in: '%s'\n", label, filename); -@@ -2504,6 +2505,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - break; - } - case TK_A_GOTO: -+ if (cur->key.rule_goto == 0) -+ break; - cur = &rules->tokens[cur->key.rule_goto]; - continue; - case TK_A_LAST_RULE: diff --git a/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch b/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch deleted file mode 100644 index 697af69..0000000 --- a/udev.git-b4fa1b67f86c9555cbb41c57774761730f6b8939.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Kay Sievers -Date: Thu, 14 May 2009 10:57:19 +0000 (+0200) -Subject: rule-generator: cd - skip by-path links if we create by-id links -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=b4fa1b67f86c9555cbb41c57774761730f6b8939 - -rule-generator: cd - skip by-path links if we create by-id links ---- - -diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules -index e357a6a..e6da010 100644 ---- a/extras/rule_generator/75-cd-aliases-generator.rules -+++ b/extras/rule_generator/75-cd-aliases-generator.rules -@@ -1,6 +1,9 @@ - # these rules generate rules for the /dev/{cdrom,dvd,...} symlinks - --# the path of removable devices changes frequently --ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c" -+# the "path" of usb/ieee1394 devices changes frequently, use "id" -+ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \ -+ PROGRAM="write_cd_rules by-id", SYMLINK+="%c", GOTO="persistent_cd_end" - - ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" -+ -+LABEL="persistent_cd_end" -diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules -index 398cd27..0d16fe6 100644 ---- a/extras/rule_generator/write_cd_rules -+++ b/extras/rule_generator/write_cd_rules -@@ -97,7 +97,7 @@ choose_rules_file - - link_num=$(find_next_available 'cdrom[0-9]*') - --match="ENV{ID_CDROM}==\"?*\", $RULE" -+match="SUBSYSTEM==\"block\", ENV{ID_CDROM}==\"?*\", $RULE" - - comment="$ID_MODEL ($ID_PATH)" - -@@ -108,6 +108,7 @@ comment="$ID_MODEL ($ID_PATH)" - write_rule "$match" "dvd$link_num" - [ "$ID_CDROM_DVD_R" -o "$ID_CDROM_DVD_RW" -o "$ID_CDROM_DVD_RAM" ] && \ - write_rule "$match" "dvdrw$link_num" -+echo >> $RULES_FILE - - unlock_rules_file - diff --git a/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch b/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch deleted file mode 100644 index 3ba1820..0000000 --- a/udev.git-d3c8231e738dd286591c1becc2f327ed55ed89d1.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Kay Sievers -Date: Mon, 25 May 2009 22:50:45 +0000 (+0200) -Subject: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=d3c8231e738dd286591c1becc2f327ed55ed89d1 - -cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media - -Some broken fake cdrom drives return ID_CDROM_MEDIA_STATE=blank. - - $ /lib/udev/cdrom_id -d /dev/sr1 - main: probing: '/dev/sr1' - cd_inquiry: INQUIRY: [Nokia ][S60 ][1.0 ] - cd_profiles: GET CONFIGURATION: number of profiles 76 - cd_profiles: current profile 0x08 - cd_media_toc: READ TOC: len: 12 - cd_media_toc: last track 1 starts at block 0 - cd_media_info: disk type 00 - ID_CDROM=1 - ID_CDROM_MRW=1 - ID_CDROM_MRW_W=1 - ID_CDROM_MEDIA=1 - ID_CDROM_MEDIA_CD=1 - ID_CDROM_MEDIA_STATE=blank - -Others work fine, but ID_CDROM_MEDIA_STATE is not needed for non-writable CDROM media: - - $ /lib/udev/cdrom_id -d /dev/sr1 - main: probing: '/dev/sr1' - cd_inquiry: INQUIRY: [SanDisk ][U3 Cruzer Micro ][8.02] - cd_profiles: GET CONFIGURATION: number of profiles 72 - cd_profiles: current profile 0x08 - cd_media_toc: READ TOC: len: 20 - cd_media_toc: track=1 info=0x4(data) start_block=0 - cd_media_toc: last track 1 starts at block 0 - cd_media_info: disk type 00 - ID_CDROM=1 - ID_CDROM_MRW=1 - ID_CDROM_MRW_W=1 - ID_CDROM_MEDIA=1 - ID_CDROM_MEDIA_CD=1 - ID_CDROM_MEDIA_STATE=complete - ID_CDROM_MEDIA_SESSION_COUNT=1 - ID_CDROM_MEDIA_TRACK_COUNT=1 - ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 ---- - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 0d873ae..921e534 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -426,8 +426,10 @@ static int cd_media_info(struct udev *udev, int fd) - - info(udev, "disk type %02x\n", header[8]); - -- if ((header[2] & 3) < 4) -+ /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ -+ if (!cd_media_cd_rom && (header[2] & 3) < 4) - cd_media_state = media_status[header[2] & 3]; -+ - if ((header[2] & 3) != 2) - cd_media_session_next = header[10] << 8 | header[5]; - cd_media_session_count = header[9] << 8 | header[4]; diff --git a/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch b/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch deleted file mode 100644 index aac97b5..0000000 --- a/udev.git-f58a9099bb2b18f3f683615324a4382b95446305.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Alan Jenkins -Date: Wed, 20 May 2009 14:12:22 +0000 (+0200) -Subject: udevadm: settle - fix timeout -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f58a9099bb2b18f3f683615324a4382b95446305 - -udevadm: settle - fix timeout - -The timeout wasn't working when settle was run as root: - # udevadm control --stop-exec-queue - # udevadm trigger - # udevadm settle --timeout=1 - ... (hangs) - -Signed-off-by: Alan Jenkins ---- - -diff --git a/udev/udevadm-settle.c b/udev/udevadm-settle.c -index 3b26f10..52d9c0b 100644 ---- a/udev/udevadm-settle.c -+++ b/udev/udevadm-settle.c -@@ -167,6 +167,7 @@ int udevadm_settle(struct udev *udev, int argc, char *argv[]) - sigprocmask(SIG_BLOCK, &mask, &oldmask); - if (udev_ctrl_send_settle(uctrl) > 0) - sigsuspend(&oldmask); -+ sigprocmask(SIG_SETMASK, &oldmask, NULL); - udev_ctrl_unref(uctrl); - } - } diff --git a/udev.spec b/udev.spec index 24072f5..bc3446f 100644 --- a/udev.spec +++ b/udev.spec @@ -47,44 +47,48 @@ Provides: dev = 0:3.12-1 The udev package contains an implementation of devfs in userspace using sysfs and netlink. -%package -n libudev0 +%package -n libudev Summary: Dynamic library to access udev device information Group: System Environment/Libraries -Obsoletes: libudev0 < 143 +Obsoletes: libudev0 <= 142 +Provides: libudev0 = 143 -%description -n libudev0 +%description -n libudev This package contains the dynamic library libudev, which provides access to udev device information, and an interface to search devices in sysfs. - %package -n libudev-devel Summary: Development files for libudev Group: Development/Libraries Requires: udev = %{version}-%{release} -Requires: libudev0 = %{version}-%{release} +Requires: libudev = %{version}-%{release} %description -n libudev-devel This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. -%package -n libgudev-1.0-0 +%package -n libgudev1 Summary: Libraries for adding libudev support to applications that use glib. Group: Development/Libraries Requires: libudev >= 142 +# remove the following lines for libgudev so major 1 Provides: libgudev = 20090517 Obsoletes: libgudev <= 20090516 -%description -n libgudev-1.0-0 +%description -n libgudev1 This package contains the libraries that make it easier to use libudev functionality from applications that use glib. -%package -n libgudev-devel +%package -n libgudev1-devel Summary: Header files for adding libudev support to applications that use glib. Group: Development/Libraries Requires: libudev-devel >= 142 -Requires: libgudev-1.0-0 = %{version}-%{release} +Provides: libgudev-devel = 20090517 +Obsoletes: libgudev-devel <= 20090516 -%description -n libgudev-devel +Requires: libgudev1 = %{version}-%{release} + +%description -n libgudev1-devel This package contains the header and pkg-config files for developing glib-based applications using libudev functionality. @@ -105,11 +109,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT -#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 -rm -f $RPM_BUILD_ROOT%{_docdir}/udev/README.keymap.txt -rmdir $RPM_BUILD_ROOT%{_docdir}/udev +rm -fr $RPM_BUILD_ROOT%{_docdir}/udev # Deprecated, but keep the ownership mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} @@ -138,6 +138,7 @@ for i in \ %ifarch s390 s390x rules/packages/40-s390.rules \ %endif + rules/packages/40-isdn.rules \ rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ rules/packages/64-device-mapper.rules \ @@ -236,11 +237,11 @@ rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : %triggerin -- MAKEDEV rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : -%post -n libudev0 -p /sbin/ldconfig -%postun -n libudev0 -p /sbin/ldconfig +%post -n libudev -p /sbin/ldconfig +%postun -n libudev -p /sbin/ldconfig -%post -n libgudev-1.0-0 -p /sbin/ldconfig -%postun -n libgudev-1.0-0 -p /sbin/ldconfig +%post -n libgudev1 -p /sbin/ldconfig +%postun -n libgudev1 -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT @@ -311,12 +312,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/keymap %attr(0755,root,root) %{udev_scriptdir}/udev-acl %attr(0755,root,root) %{udev_scriptdir}/v4l_id -%attr(0755,root,root) %{_datadir}/udev/findkeyboards +%attr(0755,root,root) %{udev_scriptdir}/findkeyboards %attr(0755,root,root) %{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck -%files -n libudev0 +%files -n libudev %defattr(0644, root, root, 0755) %doc COPYING %attr(0755,root,root) /%{_lib}/libudev.so.* @@ -327,14 +328,15 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc +%{_datadir}/pkgconfig/udev.pc %{_datadir}/gtk-doc/html/libudev/* -%files -n libgudev-1.0-0 +%files -n libgudev1 %defattr(0644, root, root, 0755) %attr(0755,root,root) %{_libdir}/libgudev-1.0* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib -%files -n libgudev-devel +%files -n libgudev1-devel %defattr(0644, root, root, 0755) %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir diff --git a/upstream b/upstream index 260ace6..e126628 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-137.tar.bz2 +udev-143.tar.bz2 From bd74de9f3756ebb56a01817a46d0911ab0cba368 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 10:04:58 +0000 Subject: [PATCH 497/640] add gperf to BuildRequires --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bc3446f..de558ef 100644 --- a/udev.spec +++ b/udev.spec @@ -29,7 +29,7 @@ Requires: hwdata BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -BuildRequires: glib2-devel +BuildRequires: gperf BuildRequires: libusb-devel BuildRequires: libxslt BuildRequires: hwdata From 367c089c3ead9600dd3a06206cba0d0d6f9d5c52 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 10:04:58 +0000 Subject: [PATCH 498/640] add gperf to BuildRequires --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bc3446f..de558ef 100644 --- a/udev.spec +++ b/udev.spec @@ -29,7 +29,7 @@ Requires: hwdata BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -BuildRequires: glib2-devel +BuildRequires: gperf BuildRequires: libusb-devel BuildRequires: libxslt BuildRequires: hwdata From f788b2db50adbcd1391abca5f0fae8a369a15961 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 10:27:37 +0000 Subject: [PATCH 499/640] add libacl-devel to BuildRequires --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index de558ef..87c1134 100644 --- a/udev.spec +++ b/udev.spec @@ -30,7 +30,7 @@ Requires: hwdata BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV BuildRequires: gperf -BuildRequires: libusb-devel +BuildRequires: libusb-devel libacl-devel BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 From ab3b43336245acfa8e54054aff543b8ff9f43ad8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 10:27:37 +0000 Subject: [PATCH 500/640] add libacl-devel to BuildRequires --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index de558ef..87c1134 100644 --- a/udev.spec +++ b/udev.spec @@ -30,7 +30,7 @@ Requires: hwdata BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV BuildRequires: gperf -BuildRequires: libusb-devel +BuildRequires: libusb-devel libacl-devel BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 From d833d3f1d53ff6c4e7214c61743b5996eac1ac1b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 10:47:52 +0000 Subject: [PATCH 501/640] add libtool to BuildRequires --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 87c1134..d4982dc 100644 --- a/udev.spec +++ b/udev.spec @@ -29,7 +29,7 @@ Requires: hwdata BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -BuildRequires: gperf +BuildRequires: gperf libtool BuildRequires: libusb-devel libacl-devel BuildRequires: libxslt BuildRequires: hwdata From 5b53a68b94d1aa17e4b4f70d3df7bb562a4e1f5d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Jun 2009 10:47:52 +0000 Subject: [PATCH 502/640] add libtool to BuildRequires --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 87c1134..d4982dc 100644 --- a/udev.spec +++ b/udev.spec @@ -29,7 +29,7 @@ Requires: hwdata BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -BuildRequires: gperf +BuildRequires: gperf libtool BuildRequires: libusb-devel libacl-devel BuildRequires: libxslt BuildRequires: hwdata From 12ae6f794f83eda7993f2300f03286a8f52ce211 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 3 Jul 2009 13:48:12 +0000 Subject: [PATCH 503/640] - add acpi floppy modalias - add retrigger of failed events in udev-post.init - killall pids of udev in %pre --- udev-post.init | 6 ++++++ udev.spec | 40 ++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/udev-post.init b/udev-post.init index cfffd3c..2c9943a 100644 --- a/udev-post.init +++ b/udev-post.init @@ -22,6 +22,12 @@ # See how we were called. case "$1" in start|reload) + STRING=$"Retrigger failed udev events" + echo -n $STRING + /sbin/udevadm trigger --retry-failed + success "$STRING" + echo + STRING=$"Adding udev persistent rules" # copy the rules generated before / was mounted read-write diff --git a/udev.spec b/udev.spec index d4982dc..e11b34e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 143 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -128,7 +128,7 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol for i in \ - rules/redhat/40-redhat.rules \ + rules/redhat/40-redhat.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -158,6 +158,7 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf </dev/null || /usr/sbin/groupadd -g 18 dialout || : if test -f /proc/1/exe -a -d /proc/1/root; then if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then if test -x /sbin/udevd -a -x /sbin/pidof ; then + /sbin/udevadm control --stop-exec-queue pid=$(/sbin/pidof -c udevd) - if [ -n "$pid" ]; then - kill $pid - fi + while [ -n "$pid" ]; do + for p in $pid; do + kill $hard $p; + done + pid=$(/sbin/pidof -c udevd) + hard="-9" + done fi fi fi @@ -209,28 +215,13 @@ exit 0 # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - if test -x /sbin/udevd; then /sbin/udevd -d - fi + /sbin/udevadm control --start-exec-queue fi fi exit 0 -%triggerpostun -- dev <= 0:3.12-1 -if [ $2 = 0 ]; then - if [ -x /sbin/MAKEDEV ]; then - /sbin/MAKEDEV null - else - /bin/mknod /dev/null c 1 3 - fi - /sbin/start_udev >/dev/null 2>&1 - if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then - /sbin/lvm vgmknodes >/dev/null 2>&1 - fi -fi -exit 0 - %triggerin -- selinux-policy rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : @@ -345,6 +336,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jul 03 2009 Harald Hoyer 143-2 +- add acpi floppy modalias +- add retrigger of failed events in udev-post.init +- killall pids of udev in %%pre + * Fri Jun 19 2009 Harald Hoyer 143-1 - version 143 @@ -354,7 +350,7 @@ rm -rf $RPM_BUILD_ROOT - git fix: rule-generator: cd - skip by-path links if we create by-id links - git fix: fix possible endless loop for GOTO to non-existent LABEL - git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable - CDROM media + CDROM media * Thu Jun 08 2009 Harald Hoyer 142-3 - delay device-mapper changes From 6a426a60726142b4e3d0a8f3e7676c6aab1c0131 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 3 Jul 2009 13:48:12 +0000 Subject: [PATCH 504/640] - add acpi floppy modalias - add retrigger of failed events in udev-post.init - killall pids of udev in %pre --- udev-post.init | 6 ++++++ udev.spec | 40 ++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/udev-post.init b/udev-post.init index cfffd3c..2c9943a 100644 --- a/udev-post.init +++ b/udev-post.init @@ -22,6 +22,12 @@ # See how we were called. case "$1" in start|reload) + STRING=$"Retrigger failed udev events" + echo -n $STRING + /sbin/udevadm trigger --retry-failed + success "$STRING" + echo + STRING=$"Adding udev persistent rules" # copy the rules generated before / was mounted read-write diff --git a/udev.spec b/udev.spec index d4982dc..e11b34e 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 143 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -128,7 +128,7 @@ ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol for i in \ - rules/redhat/40-redhat.rules \ + rules/redhat/40-redhat.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -158,6 +158,7 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf </dev/null || /usr/sbin/groupadd -g 18 dialout || : if test -f /proc/1/exe -a -d /proc/1/root; then if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then if test -x /sbin/udevd -a -x /sbin/pidof ; then + /sbin/udevadm control --stop-exec-queue pid=$(/sbin/pidof -c udevd) - if [ -n "$pid" ]; then - kill $pid - fi + while [ -n "$pid" ]; do + for p in $pid; do + kill $hard $p; + done + pid=$(/sbin/pidof -c udevd) + hard="-9" + done fi fi fi @@ -209,28 +215,13 @@ exit 0 # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - if test -x /sbin/udevd; then /sbin/udevd -d - fi + /sbin/udevadm control --start-exec-queue fi fi exit 0 -%triggerpostun -- dev <= 0:3.12-1 -if [ $2 = 0 ]; then - if [ -x /sbin/MAKEDEV ]; then - /sbin/MAKEDEV null - else - /bin/mknod /dev/null c 1 3 - fi - /sbin/start_udev >/dev/null 2>&1 - if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then - /sbin/lvm vgmknodes >/dev/null 2>&1 - fi -fi -exit 0 - %triggerin -- selinux-policy rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : @@ -345,6 +336,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jul 03 2009 Harald Hoyer 143-2 +- add acpi floppy modalias +- add retrigger of failed events in udev-post.init +- killall pids of udev in %%pre + * Fri Jun 19 2009 Harald Hoyer 143-1 - version 143 @@ -354,7 +350,7 @@ rm -rf $RPM_BUILD_ROOT - git fix: rule-generator: cd - skip by-path links if we create by-id links - git fix: fix possible endless loop for GOTO to non-existent LABEL - git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable - CDROM media + CDROM media * Thu Jun 08 2009 Harald Hoyer 142-3 - delay device-mapper changes From fd89784a9510172c0dd48a2e988b601c4acab00e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Jul 2009 10:32:55 +0000 Subject: [PATCH 505/640] - version 145 - add "udevlog" kernel command line option to redirect the output of udevd to /dev/.udev/udev.log --- start_udev | 58 +++++++++---------- ...-143.tar.bz2.sign => udev-145.tar.bz2.sign | 6 +- udev.spec | 9 ++- upstream | 2 +- 4 files changed, 38 insertions(+), 37 deletions(-) rename udev-143.tar.bz2.sign => udev-145.tar.bz2.sign (61%) diff --git a/start_udev b/start_udev index 99a67fa..9a11d65 100755 --- a/start_udev +++ b/start_udev @@ -99,37 +99,25 @@ make_extra_nodes () { USE_MD5="false" [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + for i in 0 1 2 3 4 5 6 7; do + [ -b /dev/loop$i ] || /bin/mknod -m 0640 /dev/loop$i b 7 $i + /bin/chown root:disk /dev/loop$i + done + + for i in 0 1 2 3; do + [ -c /dev/lp$i ] || /bin/mknod -m 0660 /dev/lp$i c 6 $i + /bin/chown root:lp /dev/lp$i + done + [ -d /dev/net ] || mkdir -p /dev/net - /bin/mknod -m 0640 /dev/loop0 b 7 0 - /bin/chown root:disk /dev/loop0 - /bin/mknod -m 0640 /dev/loop1 b 7 1 - /bin/chown root:disk /dev/loop1 - /bin/mknod -m 0640 /dev/loop2 b 7 2 - /bin/chown root:disk /dev/loop2 - /bin/mknod -m 0640 /dev/loop3 b 7 3 - /bin/chown root:disk /dev/loop3 - /bin/mknod -m 0640 /dev/loop4 b 7 4 - /bin/chown root:disk /dev/loop4 - /bin/mknod -m 0640 /dev/loop5 b 7 5 - /bin/chown root:disk /dev/loop5 - /bin/mknod -m 0640 /dev/loop6 b 7 6 - /bin/chown root:disk /dev/loop6 - /bin/mknod -m 0640 /dev/loop7 b 7 7 - /bin/chown root:disk /dev/loop7 - /bin/mknod -m 0600 /dev/net/tun c 10 200 - /bin/chown root:root /dev/net/tun - /bin/mknod -m 0600 /dev/ppp c 108 0 - /bin/chown root:root /dev/ppp - /bin/mknod -m 0660 /dev/lp0 c 6 0 - /bin/chown root:lp /dev/lp0 - /bin/mknod -m 0660 /dev/lp1 c 6 1 - /bin/chown root:lp /dev/lp1 - /bin/mknod -m 0660 /dev/lp2 c 6 2 - /bin/chown root:lp /dev/lp2 - /bin/mknod -m 0660 /dev/lp3 c 6 3 - /bin/chown root:lp /dev/lp3 - /bin/mknod -m 0666 /dev/fuse c 10 229 - /bin/chown root:root /dev/fuse + [ -c /dev/net/tun ] || /bin/mknod -m 0600 /dev/net/tun c 10 200 + #/bin/chown root:root /dev/net/tun + + [ -c /dev/ppp ] || /bin/mknod -m 0600 /dev/ppp c 108 0 + #/bin/chown root:root /dev/ppp + + [ -c /dev/fuse ] || /bin/mknod -m 0666 /dev/fuse c 10 229 + #/bin/chown root:root /dev/fuse [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 /dev/fuse @@ -261,6 +249,7 @@ make_extra_nodes & cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 +mkdir -p $udev_root/.udev > "$udev_root/null" 2>&1 UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events @@ -269,7 +258,14 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" udevtrace; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi - /sbin/udevd -d $UDEV_OPTS + + if strstr "$cmdline" udevlog; then + UDEV_OPTS="$UDEV_OPTS --debug" + /sbin/udevd -d $UDEV_OPTS 2>$udev_root/.udev/udev.log + else + /sbin/udevd -d $UDEV_OPTS + fi + wait ret=$[$ret + $?] diff --git a/udev-143.tar.bz2.sign b/udev-145.tar.bz2.sign similarity index 61% rename from udev-143.tar.bz2.sign rename to udev-145.tar.bz2.sign index a080c1e..23c18c4 100644 --- a/udev-143.tar.bz2.sign +++ b/udev-145.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBKO9c+yGugalF9Dw4RAm+eAJ92SgVdT1dgfJRsblhgec8982aNvACfdJPn -vGonPNcM/qytpkbb6v8/7Jg= -=WRP9 +iD8DBQBKWxhnyGugalF9Dw4RAvvjAJ9ed+RMRi8gXcFyTPxXsHZpbLSROgCfdpCc +lr5nSwsGGO9e0+wBbD7WDoc= +=5/z0 -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index e11b34e..7922d8a 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 143 -Release: 2%{?dist} +Version: 145 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -336,6 +336,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 14 2009 Harald Hoyer 145-1 +- version 145 +- add "udevlog" kernel command line option to redirect the + output of udevd to /dev/.udev/udev.log + * Fri Jul 03 2009 Harald Hoyer 143-2 - add acpi floppy modalias - add retrigger of failed events in udev-post.init diff --git a/upstream b/upstream index e126628..287b708 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-143.tar.bz2 +udev-145.tar.bz2 From b13ebc6c3079a5d7d5ba72985859c6d52e62ee11 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Jul 2009 10:32:55 +0000 Subject: [PATCH 506/640] - version 145 - add "udevlog" kernel command line option to redirect the output of udevd to /dev/.udev/udev.log --- start_udev | 58 +++++++++---------- ...-143.tar.bz2.sign => udev-145.tar.bz2.sign | 6 +- udev.spec | 9 ++- upstream | 2 +- 4 files changed, 38 insertions(+), 37 deletions(-) rename udev-143.tar.bz2.sign => udev-145.tar.bz2.sign (61%) diff --git a/start_udev b/start_udev index 99a67fa..9a11d65 100755 --- a/start_udev +++ b/start_udev @@ -99,37 +99,25 @@ make_extra_nodes () { USE_MD5="false" [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + for i in 0 1 2 3 4 5 6 7; do + [ -b /dev/loop$i ] || /bin/mknod -m 0640 /dev/loop$i b 7 $i + /bin/chown root:disk /dev/loop$i + done + + for i in 0 1 2 3; do + [ -c /dev/lp$i ] || /bin/mknod -m 0660 /dev/lp$i c 6 $i + /bin/chown root:lp /dev/lp$i + done + [ -d /dev/net ] || mkdir -p /dev/net - /bin/mknod -m 0640 /dev/loop0 b 7 0 - /bin/chown root:disk /dev/loop0 - /bin/mknod -m 0640 /dev/loop1 b 7 1 - /bin/chown root:disk /dev/loop1 - /bin/mknod -m 0640 /dev/loop2 b 7 2 - /bin/chown root:disk /dev/loop2 - /bin/mknod -m 0640 /dev/loop3 b 7 3 - /bin/chown root:disk /dev/loop3 - /bin/mknod -m 0640 /dev/loop4 b 7 4 - /bin/chown root:disk /dev/loop4 - /bin/mknod -m 0640 /dev/loop5 b 7 5 - /bin/chown root:disk /dev/loop5 - /bin/mknod -m 0640 /dev/loop6 b 7 6 - /bin/chown root:disk /dev/loop6 - /bin/mknod -m 0640 /dev/loop7 b 7 7 - /bin/chown root:disk /dev/loop7 - /bin/mknod -m 0600 /dev/net/tun c 10 200 - /bin/chown root:root /dev/net/tun - /bin/mknod -m 0600 /dev/ppp c 108 0 - /bin/chown root:root /dev/ppp - /bin/mknod -m 0660 /dev/lp0 c 6 0 - /bin/chown root:lp /dev/lp0 - /bin/mknod -m 0660 /dev/lp1 c 6 1 - /bin/chown root:lp /dev/lp1 - /bin/mknod -m 0660 /dev/lp2 c 6 2 - /bin/chown root:lp /dev/lp2 - /bin/mknod -m 0660 /dev/lp3 c 6 3 - /bin/chown root:lp /dev/lp3 - /bin/mknod -m 0666 /dev/fuse c 10 229 - /bin/chown root:root /dev/fuse + [ -c /dev/net/tun ] || /bin/mknod -m 0600 /dev/net/tun c 10 200 + #/bin/chown root:root /dev/net/tun + + [ -c /dev/ppp ] || /bin/mknod -m 0600 /dev/ppp c 108 0 + #/bin/chown root:root /dev/ppp + + [ -c /dev/fuse ] || /bin/mknod -m 0666 /dev/fuse c 10 229 + #/bin/chown root:root /dev/fuse [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 /dev/fuse @@ -261,6 +249,7 @@ make_extra_nodes & cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 +mkdir -p $udev_root/.udev > "$udev_root/null" 2>&1 UDEV_OPTS="" if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events @@ -269,7 +258,14 @@ if [ -f "/sys/class/tty/console/uevent" ]; then if strstr "$cmdline" udevtrace; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi - /sbin/udevd -d $UDEV_OPTS + + if strstr "$cmdline" udevlog; then + UDEV_OPTS="$UDEV_OPTS --debug" + /sbin/udevd -d $UDEV_OPTS 2>$udev_root/.udev/udev.log + else + /sbin/udevd -d $UDEV_OPTS + fi + wait ret=$[$ret + $?] diff --git a/udev-143.tar.bz2.sign b/udev-145.tar.bz2.sign similarity index 61% rename from udev-143.tar.bz2.sign rename to udev-145.tar.bz2.sign index a080c1e..23c18c4 100644 --- a/udev-143.tar.bz2.sign +++ b/udev-145.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBKO9c+yGugalF9Dw4RAm+eAJ92SgVdT1dgfJRsblhgec8982aNvACfdJPn -vGonPNcM/qytpkbb6v8/7Jg= -=WRP9 +iD8DBQBKWxhnyGugalF9Dw4RAvvjAJ9ed+RMRi8gXcFyTPxXsHZpbLSROgCfdpCc +lr5nSwsGGO9e0+wBbD7WDoc= +=5/z0 -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index e11b34e..7922d8a 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 143 -Release: 2%{?dist} +Version: 145 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -336,6 +336,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 14 2009 Harald Hoyer 145-1 +- version 145 +- add "udevlog" kernel command line option to redirect the + output of udevd to /dev/.udev/udev.log + * Fri Jul 03 2009 Harald Hoyer 143-2 - add acpi floppy modalias - add retrigger of failed events in udev-post.init diff --git a/upstream b/upstream index e126628..287b708 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -udev-143.tar.bz2 +udev-145.tar.bz2 From b1ca17ab069e6708a4aa071c59284819c042c692 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Jul 2009 12:09:01 +0000 Subject: [PATCH 507/640] - version 145 - add "udevlog" kernel command line option to redirect the output of udevd to /dev/.udev/udev.log --- .cvsignore | 2 +- sources | 2 +- udev.spec | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index e126628..287b708 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-143.tar.bz2 +udev-145.tar.bz2 diff --git a/sources b/sources index 31b43f7..433028f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d15d1886c0bfa756969f25ddaecf34da udev-143.tar.bz2 +b3d3b5f88c7b81e7615700a04db685e1 udev-145.tar.bz2 diff --git a/udev.spec b/udev.spec index 7922d8a..36b56d6 100644 --- a/udev.spec +++ b/udev.spec @@ -110,11 +110,13 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT%{_docdir}/udev +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la # 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 mkdir -p $RPM_BUILD_ROOT%{_bindir} +touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id @@ -279,8 +281,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules -#%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%ghost %config(noreplace,missingok) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf @@ -324,11 +325,12 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) -%attr(0755,root,root) %{_libdir}/libgudev-1.0* +%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel %defattr(0644, root, root, 0755) +%attr(0755,root,root) %{_libdir}/libgudev-1.0.so %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir %dir %{_datadir}/gtk-doc/html/gudev From c6a10bffc716fc29a132d88d6183c4203182184c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Jul 2009 12:09:01 +0000 Subject: [PATCH 508/640] - version 145 - add "udevlog" kernel command line option to redirect the output of udevd to /dev/.udev/udev.log --- .cvsignore | 2 +- sources | 2 +- udev.spec | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index e126628..287b708 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-143.tar.bz2 +udev-145.tar.bz2 diff --git a/sources b/sources index 31b43f7..433028f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d15d1886c0bfa756969f25ddaecf34da udev-143.tar.bz2 +b3d3b5f88c7b81e7615700a04db685e1 udev-145.tar.bz2 diff --git a/udev.spec b/udev.spec index 7922d8a..36b56d6 100644 --- a/udev.spec +++ b/udev.spec @@ -110,11 +110,13 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT%{_docdir}/udev +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la # 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 mkdir -p $RPM_BUILD_ROOT%{_bindir} +touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id @@ -279,8 +281,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules -#%config(missingok) %{_sysconfdir}/hotplug.d/default/10-udev.hotplug -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config +%ghost %config(noreplace,missingok) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config %config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf @@ -324,11 +325,12 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) -%attr(0755,root,root) %{_libdir}/libgudev-1.0* +%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel %defattr(0644, root, root, 0755) +%attr(0755,root,root) %{_libdir}/libgudev-1.0.so %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir %dir %{_datadir}/gtk-doc/html/gudev From e32392db41da7922961e0ef01ee728c2d3758941 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Jul 2009 08:17:35 +0000 Subject: [PATCH 509/640] - fix file permissions - remove rpath - chkconfig --add for udev-post - fix summaries - add "Required-Stop" to udev-post --- udev-post.init | 1 + udev.spec | 31 +++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/udev-post.init b/udev-post.init index 2c9943a..51bc184 100644 --- a/udev-post.init +++ b/udev-post.init @@ -11,6 +11,7 @@ # Default-Start: 12345 # Default-Stop: 0 6 # Required-Start: $local_fs +# Required-Stop: # Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Provides: udev-post diff --git a/udev.spec b/udev.spec index 36b56d6..adab3ba 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -36,12 +36,13 @@ BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc BuildRequires: usbutils +BuildRequires: libtool >= 2.2.6 Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 -Provides: dev = 0:3.12-1 +Provides: dev = 0:3.12-2 %description The udev package contains an implementation of devfs in @@ -68,7 +69,7 @@ This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. %package -n libgudev1 -Summary: Libraries for adding libudev support to applications that use glib. +Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev >= 142 # remove the following lines for libgudev so major 1 @@ -80,7 +81,7 @@ This package contains the libraries that make it easier to use libudev functionality from applications that use glib. %package -n libgudev1-devel -Summary: Header files for adding libudev support to applications that use glib. +Summary: Header files for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev-devel >= 142 Provides: libgudev-devel = 20090517 @@ -96,10 +97,14 @@ glib-based applications using libudev functionality. %setup -q %build +# get rid of rpath +libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ - --with-rootlibdir=/%{_lib} --enable-introspection + --with-rootlibdir=/%{_lib} --enable-introspection \ + --disable-rpath + make %{?_smp_mflags} %install @@ -221,6 +226,7 @@ if test -f /proc/1/exe -a -d /proc/1/root; then /sbin/udevadm control --start-exec-queue fi fi +/sbin/chkconfig --add udev-post exit 0 @@ -283,7 +289,7 @@ rm -rf $RPM_BUILD_ROOT %ghost %config(noreplace,missingok) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config -%config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf %dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* @@ -305,7 +311,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/udev-acl %attr(0755,root,root) %{udev_scriptdir}/v4l_id %attr(0755,root,root) %{udev_scriptdir}/findkeyboards -%attr(0755,root,root) %{udev_scriptdir}/keymaps/* +%attr(0644,root,root) %{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck @@ -325,19 +331,28 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) +%doc COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel %defattr(0644, root, root, 0755) +%doc COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir %dir %{_datadir}/gtk-doc/html/gudev %attr(0644,root,root) %{_datadir}/gtk-doc/html/gudev/* -%attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* +%attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jul 24 2009 Harald Hoyer 145-2 +- fix file permissions +- remove rpath +- chkconfig --add for udev-post +- fix summaries +- add "Required-Stop" to udev-post + * Tue Jul 14 2009 Harald Hoyer 145-1 - version 145 - add "udevlog" kernel command line option to redirect the From 11f08c47bd65d4f965b39ac775d838275306dc51 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 24 Jul 2009 08:17:35 +0000 Subject: [PATCH 510/640] - fix file permissions - remove rpath - chkconfig --add for udev-post - fix summaries - add "Required-Stop" to udev-post --- udev-post.init | 1 + udev.spec | 31 +++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/udev-post.init b/udev-post.init index 2c9943a..51bc184 100644 --- a/udev-post.init +++ b/udev-post.init @@ -11,6 +11,7 @@ # Default-Start: 12345 # Default-Stop: 0 6 # Required-Start: $local_fs +# Required-Stop: # Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Provides: udev-post diff --git a/udev.spec b/udev.spec index 36b56d6..adab3ba 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -36,12 +36,13 @@ BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc BuildRequires: usbutils +BuildRequires: libtool >= 2.2.6 Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 -Provides: dev = 0:3.12-1 +Provides: dev = 0:3.12-2 %description The udev package contains an implementation of devfs in @@ -68,7 +69,7 @@ This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. %package -n libgudev1 -Summary: Libraries for adding libudev support to applications that use glib. +Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev >= 142 # remove the following lines for libgudev so major 1 @@ -80,7 +81,7 @@ This package contains the libraries that make it easier to use libudev functionality from applications that use glib. %package -n libgudev1-devel -Summary: Header files for adding libudev support to applications that use glib. +Summary: Header files for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev-devel >= 142 Provides: libgudev-devel = 20090517 @@ -96,10 +97,14 @@ glib-based applications using libudev functionality. %setup -q %build +# get rid of rpath +libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ - --with-rootlibdir=/%{_lib} --enable-introspection + --with-rootlibdir=/%{_lib} --enable-introspection \ + --disable-rpath + make %{?_smp_mflags} %install @@ -221,6 +226,7 @@ if test -f /proc/1/exe -a -d /proc/1/root; then /sbin/udevadm control --start-exec-queue fi fi +/sbin/chkconfig --add udev-post exit 0 @@ -283,7 +289,7 @@ rm -rf $RPM_BUILD_ROOT %ghost %config(noreplace,missingok) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config -%config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf %dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* @@ -305,7 +311,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/udev-acl %attr(0755,root,root) %{udev_scriptdir}/v4l_id %attr(0755,root,root) %{udev_scriptdir}/findkeyboards -%attr(0755,root,root) %{udev_scriptdir}/keymaps/* +%attr(0644,root,root) %{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck @@ -325,19 +331,28 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) +%doc COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel %defattr(0644, root, root, 0755) +%doc COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir %dir %{_datadir}/gtk-doc/html/gudev %attr(0644,root,root) %{_datadir}/gtk-doc/html/gudev/* -%attr(0755,root,root) %{_libdir}/pkgconfig/gudev-1.0* +%attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jul 24 2009 Harald Hoyer 145-2 +- fix file permissions +- remove rpath +- chkconfig --add for udev-post +- fix summaries +- add "Required-Stop" to udev-post + * Tue Jul 14 2009 Harald Hoyer 145-1 - version 145 - add "udevlog" kernel command line option to redirect the From 563c14d0dd8dc4cc92b2270b841783b276b27f8f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 29 Jul 2009 12:07:18 +0000 Subject: [PATCH 511/640] - add patch from upstream git to fix bug #514086 - add version to usbutils build requirement --- ...68245b98479a14190e1e1d32ef5fae3ddf8a.patch | 114 ++++++++++++++++++ udev.spec | 11 +- 2 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch diff --git a/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch b/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch new file mode 100644 index 0000000..fbc9cef --- /dev/null +++ b/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch @@ -0,0 +1,114 @@ +From: Lennart Poettering +Date: Mon, 27 Jul 2009 21:24:27 +0000 (+0200) +Subject: enumeration: move ALSA control devices to the end of the enumerated devices of each ... +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=3bf768245b98479a14190e1e1d32ef5fae3ddf8a + +enumeration: move ALSA control devices to the end of the enumerated devices of each card + +Generally ALSA control devices should be the last ones to be processed +for ACL changes and similar operations because they can then be used as +indicators that ACL management finished for all device nodes of a +specific card. + +This patch simple moves each controlC device behind all the pcmC devices +(and similar). +--- + +diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c +index 96cf060..986c1fc 100644 +--- a/libudev/libudev-enumerate.c ++++ b/libudev/libudev-enumerate.c +@@ -190,7 +190,8 @@ static int syspath_cmp(const void *p1, const void *p2) + return ret; + } + +-static int devices_delay(struct udev *udev, const char *syspath) ++/* For devices that should be moved to the absolute end of the list */ ++static int devices_delay_end(struct udev *udev, const char *syspath) + { + static const char *delay_device_list[] = { + "/block/md", +@@ -210,6 +211,32 @@ static int devices_delay(struct udev *udev, const char *syspath) + return 0; + } + ++/* For devices that should just be moved a little bit later, just ++ * before the point where some common path prefix changes. Returns the ++ * number of characters that make up that common prefix */ ++static size_t devices_delay_later(struct udev *udev, const char *syspath) ++{ ++ const char *c; ++ ++ /* For sound cards the control device must be enumerated last ++ * to make sure it's the final device node that gets ACLs ++ * applied. Applications rely on this fact and use ACL changes ++ * on the control node as an indicator that the ACL change of ++ * the entire sound card completed. The kernel makes this ++ * guarantee when creating those devices, and hence we should ++ * too when enumerating them. */ ++ ++ if ((c = strstr(syspath, "/sound/card"))) { ++ c += 11; ++ c += strcspn(c, "/"); ++ ++ if (strncmp(c, "/controlC", 9) == 0) ++ return c - syspath + 1; ++ } ++ ++ return 0; ++} ++ + /** + * udev_enumerate_get_list_entry: + * @udev_enumerate: context +@@ -223,7 +250,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude + if (!udev_enumerate->devices_uptodate) { + unsigned int i; + unsigned int max; +- struct syspath *prev = NULL; ++ struct syspath *prev = NULL, *move_later = NULL; ++ size_t move_later_prefix; + + udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); + qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp); +@@ -240,14 +268,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude + prev = entry; + + /* skip to be delayed devices, and add them to the end of the list */ +- if (devices_delay(udev_enumerate->udev, entry->syspath)) { ++ if (devices_delay_end(udev_enumerate->udev, entry->syspath)) { + syspath_add(udev_enumerate, entry->syspath); + continue; + } + ++ /* skip to be delayed devices, and move the to ++ * the point where the prefix changes. We can ++ * only move one item at a time. */ ++ if (!move_later) { ++ move_later_prefix = devices_delay_later(udev_enumerate->udev, entry->syspath); ++ ++ if (move_later_prefix > 0) { ++ move_later = entry; ++ continue; ++ } ++ } ++ ++ if (move_later && ++ strncmp(entry->syspath, move_later->syspath, move_later_prefix) != 0) { ++ ++ udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, ++ move_later->syspath, NULL, 0, 0); ++ move_later = NULL; ++ } ++ + udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, + entry->syspath, NULL, 0, 0); + } ++ ++ if (move_later) ++ udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, ++ move_later->syspath, NULL, 0, 0); ++ + /* add and cleanup delayed devices from end of list */ + for (i = max; i < udev_enumerate->devices_cur; i++) { + struct syspath *entry = &udev_enumerate->devices[i]; diff --git a/udev.spec b/udev.spec index adab3ba..72aac31 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,6 +14,8 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch + Source1: start_udev Source3: udev-post.init Source4: fw_unit_symlinks.sh @@ -35,7 +37,7 @@ BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc -BuildRequires: usbutils +BuildRequires: usbutils >= 0.82 BuildRequires: libtool >= 2.2.6 Requires: libselinux >= 0:1.17.9-2 sed @@ -95,6 +97,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch1 -p1 %build # get rid of rpath @@ -346,6 +349,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jul 29 2009 Harald Hoyer 145-3 +- add patch from upstream git to fix bug #514086 +- add version to usbutils build requirement + * Fri Jul 24 2009 Harald Hoyer 145-2 - fix file permissions - remove rpath From f90281fa86d8be614c0180b5a870733b3c2905a9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 29 Jul 2009 12:07:18 +0000 Subject: [PATCH 512/640] - add patch from upstream git to fix bug #514086 - add version to usbutils build requirement --- ...68245b98479a14190e1e1d32ef5fae3ddf8a.patch | 114 ++++++++++++++++++ udev.spec | 11 +- 2 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch diff --git a/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch b/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch new file mode 100644 index 0000000..fbc9cef --- /dev/null +++ b/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch @@ -0,0 +1,114 @@ +From: Lennart Poettering +Date: Mon, 27 Jul 2009 21:24:27 +0000 (+0200) +Subject: enumeration: move ALSA control devices to the end of the enumerated devices of each ... +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=3bf768245b98479a14190e1e1d32ef5fae3ddf8a + +enumeration: move ALSA control devices to the end of the enumerated devices of each card + +Generally ALSA control devices should be the last ones to be processed +for ACL changes and similar operations because they can then be used as +indicators that ACL management finished for all device nodes of a +specific card. + +This patch simple moves each controlC device behind all the pcmC devices +(and similar). +--- + +diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c +index 96cf060..986c1fc 100644 +--- a/libudev/libudev-enumerate.c ++++ b/libudev/libudev-enumerate.c +@@ -190,7 +190,8 @@ static int syspath_cmp(const void *p1, const void *p2) + return ret; + } + +-static int devices_delay(struct udev *udev, const char *syspath) ++/* For devices that should be moved to the absolute end of the list */ ++static int devices_delay_end(struct udev *udev, const char *syspath) + { + static const char *delay_device_list[] = { + "/block/md", +@@ -210,6 +211,32 @@ static int devices_delay(struct udev *udev, const char *syspath) + return 0; + } + ++/* For devices that should just be moved a little bit later, just ++ * before the point where some common path prefix changes. Returns the ++ * number of characters that make up that common prefix */ ++static size_t devices_delay_later(struct udev *udev, const char *syspath) ++{ ++ const char *c; ++ ++ /* For sound cards the control device must be enumerated last ++ * to make sure it's the final device node that gets ACLs ++ * applied. Applications rely on this fact and use ACL changes ++ * on the control node as an indicator that the ACL change of ++ * the entire sound card completed. The kernel makes this ++ * guarantee when creating those devices, and hence we should ++ * too when enumerating them. */ ++ ++ if ((c = strstr(syspath, "/sound/card"))) { ++ c += 11; ++ c += strcspn(c, "/"); ++ ++ if (strncmp(c, "/controlC", 9) == 0) ++ return c - syspath + 1; ++ } ++ ++ return 0; ++} ++ + /** + * udev_enumerate_get_list_entry: + * @udev_enumerate: context +@@ -223,7 +250,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude + if (!udev_enumerate->devices_uptodate) { + unsigned int i; + unsigned int max; +- struct syspath *prev = NULL; ++ struct syspath *prev = NULL, *move_later = NULL; ++ size_t move_later_prefix; + + udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); + qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp); +@@ -240,14 +268,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude + prev = entry; + + /* skip to be delayed devices, and add them to the end of the list */ +- if (devices_delay(udev_enumerate->udev, entry->syspath)) { ++ if (devices_delay_end(udev_enumerate->udev, entry->syspath)) { + syspath_add(udev_enumerate, entry->syspath); + continue; + } + ++ /* skip to be delayed devices, and move the to ++ * the point where the prefix changes. We can ++ * only move one item at a time. */ ++ if (!move_later) { ++ move_later_prefix = devices_delay_later(udev_enumerate->udev, entry->syspath); ++ ++ if (move_later_prefix > 0) { ++ move_later = entry; ++ continue; ++ } ++ } ++ ++ if (move_later && ++ strncmp(entry->syspath, move_later->syspath, move_later_prefix) != 0) { ++ ++ udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, ++ move_later->syspath, NULL, 0, 0); ++ move_later = NULL; ++ } ++ + udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, + entry->syspath, NULL, 0, 0); + } ++ ++ if (move_later) ++ udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, ++ move_later->syspath, NULL, 0, 0); ++ + /* add and cleanup delayed devices from end of list */ + for (i = max; i < udev_enumerate->devices_cur; i++) { + struct syspath *entry = &udev_enumerate->devices[i]; diff --git a/udev.spec b/udev.spec index adab3ba..72aac31 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,6 +14,8 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch + Source1: start_udev Source3: udev-post.init Source4: fw_unit_symlinks.sh @@ -35,7 +37,7 @@ BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc -BuildRequires: usbutils +BuildRequires: usbutils >= 0.82 BuildRequires: libtool >= 2.2.6 Requires: libselinux >= 0:1.17.9-2 sed @@ -95,6 +97,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch1 -p1 %build # get rid of rpath @@ -346,6 +349,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jul 29 2009 Harald Hoyer 145-3 +- add patch from upstream git to fix bug #514086 +- add version to usbutils build requirement + * Fri Jul 24 2009 Harald Hoyer 145-2 - fix file permissions - remove rpath From ff1bbcac613b6b62630ae3b5daa9669abd1f36db Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 4 Aug 2009 09:16:53 +0000 Subject: [PATCH 513/640] - --enable-debug - add patch for timestamps in debugging output --- ...c48f249012c673eb38f63dd8b5ee039627d0.patch | 67 +++++++++++++++++++ udev.spec | 10 ++- 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch diff --git a/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch b/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch new file mode 100644 index 0000000..7887df4 --- /dev/null +++ b/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch @@ -0,0 +1,67 @@ +From: Kay Sievers +Date: Fri, 17 Jul 2009 11:24:37 +0000 (+0200) +Subject: udevd: add timestamp to --debug output +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=820fc48f249012c673eb38f63dd8b5ee039627d0 + +udevd: add timestamp to --debug output +--- + +diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c +index 5f5f4c1..f7daa94 100644 +--- a/libudev/libudev-util-private.c ++++ b/libudev/libudev-util-private.c +@@ -249,6 +249,8 @@ int util_run_program(struct udev *udev, const char *command, char **envp, + int i; + int err = 0; + ++ info(udev, "'%s' started\n", command); ++ + /* build argv from command */ + util_strscpy(arg, sizeof(arg), command); + i = 0; +@@ -273,7 +275,6 @@ int util_run_program(struct udev *udev, const char *command, char **envp, + argv[0] = arg; + argv[1] = NULL; + } +- info(udev, "'%s'\n", command); + + /* prepare pipes from child to parent */ + if (result != NULL || udev_get_log_priority(udev) >= LOG_INFO) { +diff --git a/udev/udevd.c b/udev/udevd.c +index 2cdc18b..69d509c 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -53,8 +54,15 @@ static void log_fn(struct udev *udev, int priority, + const char *format, va_list args) + { + if (debug) { +- fprintf(stderr, "[%d] %s: ", (int) getpid(), fn); +- vfprintf(stderr, format, args); ++ char buf[1024]; ++ struct timeval tv; ++ struct timezone tz; ++ ++ vsnprintf(buf, sizeof(buf), format, args); ++ gettimeofday(&tv, &tz); ++ fprintf(stderr, "%llu.%06u [%u] %s: %s", ++ (unsigned long long) tv.tv_sec, (unsigned int) tv.tv_usec, ++ (int) getpid(), fn, buf); + } else { + vsyslog(priority, format, args); + } +@@ -266,6 +274,7 @@ static void worker_new(struct event *event) + struct worker_message msg; + int err; + ++ info(event->udev, "seq %llu running\n", udev_device_get_seqnum(dev)); + udev_event = udev_event_new(dev); + if (udev_event == NULL) + _exit(3); diff --git a/udev.spec b/udev.spec index 72aac31..ef10922 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,6 +15,7 @@ Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch +Patch2: udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch Source1: start_udev Source3: udev-post.init @@ -98,6 +99,7 @@ glib-based applications using libudev functionality. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build # get rid of rpath @@ -106,7 +108,7 @@ libtoolize -f -c --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} --enable-introspection \ - --disable-rpath + --disable-rpath --enable-debug make %{?_smp_mflags} @@ -349,6 +351,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Aug 04 2009 Harald Hoyer 145-4 +- --enable-debug +- add patch for timestamps in debugging output + * Wed Jul 29 2009 Harald Hoyer 145-3 - add patch from upstream git to fix bug #514086 - add version to usbutils build requirement From e87fdf7d4638e8551c74354275c1e29055a8215e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 4 Aug 2009 09:16:53 +0000 Subject: [PATCH 514/640] - --enable-debug - add patch for timestamps in debugging output --- ...c48f249012c673eb38f63dd8b5ee039627d0.patch | 67 +++++++++++++++++++ udev.spec | 10 ++- 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch diff --git a/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch b/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch new file mode 100644 index 0000000..7887df4 --- /dev/null +++ b/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch @@ -0,0 +1,67 @@ +From: Kay Sievers +Date: Fri, 17 Jul 2009 11:24:37 +0000 (+0200) +Subject: udevd: add timestamp to --debug output +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=820fc48f249012c673eb38f63dd8b5ee039627d0 + +udevd: add timestamp to --debug output +--- + +diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c +index 5f5f4c1..f7daa94 100644 +--- a/libudev/libudev-util-private.c ++++ b/libudev/libudev-util-private.c +@@ -249,6 +249,8 @@ int util_run_program(struct udev *udev, const char *command, char **envp, + int i; + int err = 0; + ++ info(udev, "'%s' started\n", command); ++ + /* build argv from command */ + util_strscpy(arg, sizeof(arg), command); + i = 0; +@@ -273,7 +275,6 @@ int util_run_program(struct udev *udev, const char *command, char **envp, + argv[0] = arg; + argv[1] = NULL; + } +- info(udev, "'%s'\n", command); + + /* prepare pipes from child to parent */ + if (result != NULL || udev_get_log_priority(udev) >= LOG_INFO) { +diff --git a/udev/udevd.c b/udev/udevd.c +index 2cdc18b..69d509c 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -53,8 +54,15 @@ static void log_fn(struct udev *udev, int priority, + const char *format, va_list args) + { + if (debug) { +- fprintf(stderr, "[%d] %s: ", (int) getpid(), fn); +- vfprintf(stderr, format, args); ++ char buf[1024]; ++ struct timeval tv; ++ struct timezone tz; ++ ++ vsnprintf(buf, sizeof(buf), format, args); ++ gettimeofday(&tv, &tz); ++ fprintf(stderr, "%llu.%06u [%u] %s: %s", ++ (unsigned long long) tv.tv_sec, (unsigned int) tv.tv_usec, ++ (int) getpid(), fn, buf); + } else { + vsyslog(priority, format, args); + } +@@ -266,6 +274,7 @@ static void worker_new(struct event *event) + struct worker_message msg; + int err; + ++ info(event->udev, "seq %llu running\n", udev_device_get_seqnum(dev)); + udev_event = udev_event_new(dev); + if (udev_event == NULL) + _exit(3); diff --git a/udev.spec b/udev.spec index 72aac31..ef10922 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,6 +15,7 @@ Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch +Patch2: udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch Source1: start_udev Source3: udev-post.init @@ -98,6 +99,7 @@ glib-based applications using libudev functionality. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build # get rid of rpath @@ -106,7 +108,7 @@ libtoolize -f -c --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} --enable-introspection \ - --disable-rpath + --disable-rpath --enable-debug make %{?_smp_mflags} @@ -349,6 +351,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Aug 04 2009 Harald Hoyer 145-4 +- --enable-debug +- add patch for timestamps in debugging output + * Wed Jul 29 2009 Harald Hoyer 145-3 - add patch from upstream git to fix bug #514086 - add version to usbutils build requirement From ed8467d2d0883ec9a7024e05c824c924ff0272bb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 24 Aug 2009 13:03:47 +0000 Subject: [PATCH 515/640] - ifnarch s390 for usbutils Tue Aug 04 2009 Harald Hoyer 145-5 - do not make extra nodes in parallel - restorecon on /dev --- start_udev | 14 ++++++++------ udev.spec | 12 ++++++++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/start_udev b/start_udev index 9a11d65..dfa36a8 100755 --- a/start_udev +++ b/start_udev @@ -119,7 +119,9 @@ make_extra_nodes () { [ -c /dev/fuse ] || /bin/mknod -m 0666 /dev/fuse c 10 229 #/bin/chown root:root /dev/fuse - [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 /dev/fuse + if [ -x /sbin/restorecon ]; then + /sbin/restorecon -R /dev + fi if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do @@ -139,7 +141,7 @@ make_extra_nodes () { xargs_simple -n 100 $MAKEDEV -x -a -S ) \ > "$md5file" fi - . "$md5file" >/dev/null 2>&1 + . "$md5file" >$udev_root/null 2>&1 else ( sed -e 's,#.*,,g' "$i" | \ xargs_simple -n 100 $MAKEDEV -x ) @@ -245,7 +247,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } -make_extra_nodes & +make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 @@ -272,13 +274,13 @@ if [ -f "/sys/class/tty/console/uevent" ]; then udevtimeout=$(getval udevtimeout $cmdline) if strstr "$cmdline" udevdebug; then - /sbin/udevadm control --log_priority=debug + /sbin/udevadm control --log-priority=debug fi if strstr "$cmdline" udevinfo; then - /sbin/udevadm control --log_priority=info + /sbin/udevadm control --log-priority=info fi if strstr "$cmdline" udevchilds; then - /sbin/udevadm control --max_childs_running=$(getval udevchilds $cmdline) + /sbin/udevadm control --max-childs=$(getval udevchilds $cmdline) fi /sbin/udevadm control --env=STARTUP=1 diff --git a/udev.spec b/udev.spec index ef10922..6600c20 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -38,9 +38,10 @@ BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc +%ifnarch s390 s390x BuildRequires: usbutils >= 0.82 +%endif BuildRequires: libtool >= 2.2.6 - Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 @@ -351,6 +352,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Aug 24 2009 Harald Hoyer 145-6 +- ifnarch s390 for usbutils + +* Tue Aug 04 2009 Harald Hoyer 145-5 +- do not make extra nodes in parallel +- restorecon on /dev + * Tue Aug 04 2009 Harald Hoyer 145-4 - --enable-debug - add patch for timestamps in debugging output From 468c4865b8b738567b694f1c53e55125fb6d8e64 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 24 Aug 2009 13:03:47 +0000 Subject: [PATCH 516/640] - ifnarch s390 for usbutils Tue Aug 04 2009 Harald Hoyer 145-5 - do not make extra nodes in parallel - restorecon on /dev --- start_udev | 14 ++++++++------ udev.spec | 12 ++++++++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/start_udev b/start_udev index 9a11d65..dfa36a8 100755 --- a/start_udev +++ b/start_udev @@ -119,7 +119,9 @@ make_extra_nodes () { [ -c /dev/fuse ] || /bin/mknod -m 0666 /dev/fuse c 10 229 #/bin/chown root:root /dev/fuse - [ -x /sbin/restorecon ] && /sbin/restorecon /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 /dev/net/tun /dev/ppp /dev/lp0 /dev/lp1 /dev/lp2 /dev/lp3 /dev/fuse + if [ -x /sbin/restorecon ]; then + /sbin/restorecon -R /dev + fi if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do @@ -139,7 +141,7 @@ make_extra_nodes () { xargs_simple -n 100 $MAKEDEV -x -a -S ) \ > "$md5file" fi - . "$md5file" >/dev/null 2>&1 + . "$md5file" >$udev_root/null 2>&1 else ( sed -e 's,#.*,,g' "$i" | \ xargs_simple -n 100 $MAKEDEV -x ) @@ -245,7 +247,7 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun ret=$[$ret + $?] } -make_extra_nodes & +make_extra_nodes cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 @@ -272,13 +274,13 @@ if [ -f "/sys/class/tty/console/uevent" ]; then udevtimeout=$(getval udevtimeout $cmdline) if strstr "$cmdline" udevdebug; then - /sbin/udevadm control --log_priority=debug + /sbin/udevadm control --log-priority=debug fi if strstr "$cmdline" udevinfo; then - /sbin/udevadm control --log_priority=info + /sbin/udevadm control --log-priority=info fi if strstr "$cmdline" udevchilds; then - /sbin/udevadm control --max_childs_running=$(getval udevchilds $cmdline) + /sbin/udevadm control --max-childs=$(getval udevchilds $cmdline) fi /sbin/udevadm control --env=STARTUP=1 diff --git a/udev.spec b/udev.spec index ef10922..6600c20 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -38,9 +38,10 @@ BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc +%ifnarch s390 s390x BuildRequires: usbutils >= 0.82 +%endif BuildRequires: libtool >= 2.2.6 - Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 @@ -351,6 +352,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Aug 24 2009 Harald Hoyer 145-6 +- ifnarch s390 for usbutils + +* Tue Aug 04 2009 Harald Hoyer 145-5 +- do not make extra nodes in parallel +- restorecon on /dev + * Tue Aug 04 2009 Harald Hoyer 145-4 - --enable-debug - add patch for timestamps in debugging output From 844c25b2ef4f6779dd2b5dda46365aa92c99673a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Aug 2009 15:19:15 +0000 Subject: [PATCH 517/640] - drop ifnarch s390x for usbutils, as we now have usbutils for s390x --- udev.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 6600c20..cbb7cba 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -38,9 +38,7 @@ BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc -%ifnarch s390 s390x BuildRequires: usbutils >= 0.82 -%endif BuildRequires: libtool >= 2.2.6 Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 @@ -352,6 +350,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Aug 24 2009 Karsten Hopp 145-7 +- drop ifnarch s390x for usbutils, as we now have usbutils for s390x + * Mon Aug 24 2009 Harald Hoyer 145-6 - ifnarch s390 for usbutils From ad3d6b626003319909d6180437bd3af2e5998607 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Aug 2009 15:19:15 +0000 Subject: [PATCH 518/640] - drop ifnarch s390x for usbutils, as we now have usbutils for s390x --- udev.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 6600c20..cbb7cba 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -38,9 +38,7 @@ BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc -%ifnarch s390 s390x BuildRequires: usbutils >= 0.82 -%endif BuildRequires: libtool >= 2.2.6 Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 @@ -352,6 +350,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Aug 24 2009 Karsten Hopp 145-7 +- drop ifnarch s390x for usbutils, as we now have usbutils for s390x + * Mon Aug 24 2009 Harald Hoyer 145-6 - ifnarch s390 for usbutils From 38bb0a1d1c1e98d07bfed6a726e25ee772f1402e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Sep 2009 17:27:00 +0000 Subject: [PATCH 519/640] - obsolete libgudev and libgudev-devel (bug #523569) --- udev.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index cbb7cba..edafeb8 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -75,8 +75,8 @@ Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev >= 142 # remove the following lines for libgudev so major 1 -Provides: libgudev = 20090517 -Obsoletes: libgudev <= 20090516 +Provides: libgudev = 20090518 +Obsoletes: libgudev <= 20090517 %description -n libgudev1 This package contains the libraries that make it easier to use libudev @@ -86,8 +86,8 @@ functionality from applications that use glib. Summary: Header files for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev-devel >= 142 -Provides: libgudev-devel = 20090517 -Obsoletes: libgudev-devel <= 20090516 +Provides: libgudev-devel = 20090518 +Obsoletes: libgudev-devel <= 20090517 Requires: libgudev1 = %{version}-%{release} @@ -350,6 +350,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Sep 23 2009 harald@redhat.com 145-8 +- obsolete libgudev and libgudev-devel (bug #523569) + * Mon Aug 24 2009 Karsten Hopp 145-7 - drop ifnarch s390x for usbutils, as we now have usbutils for s390x From da9416e2a2614f0474c16f9ab468c5e101c116c1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Sep 2009 17:27:00 +0000 Subject: [PATCH 520/640] - obsolete libgudev and libgudev-devel (bug #523569) --- udev.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index cbb7cba..edafeb8 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -75,8 +75,8 @@ Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev >= 142 # remove the following lines for libgudev so major 1 -Provides: libgudev = 20090517 -Obsoletes: libgudev <= 20090516 +Provides: libgudev = 20090518 +Obsoletes: libgudev <= 20090517 %description -n libgudev1 This package contains the libraries that make it easier to use libudev @@ -86,8 +86,8 @@ functionality from applications that use glib. Summary: Header files for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev-devel >= 142 -Provides: libgudev-devel = 20090517 -Obsoletes: libgudev-devel <= 20090516 +Provides: libgudev-devel = 20090518 +Obsoletes: libgudev-devel <= 20090517 Requires: libgudev1 = %{version}-%{release} @@ -350,6 +350,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Sep 23 2009 harald@redhat.com 145-8 +- obsolete libgudev and libgudev-devel (bug #523569) + * Mon Aug 24 2009 Karsten Hopp 145-7 - drop ifnarch s390x for usbutils, as we now have usbutils for s390x From 84034b7edce6f54899191f1e785cbd161e3fdbdd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 25 Sep 2009 17:05:23 +0000 Subject: [PATCH 521/640] - add patches to fix cdrom_id - add patch to fix the inotify bug (bug #524752) --- ...-ALSA-control-devices-to-the-end-of-.patch | 23 +++++---- ...-udevd-add-timestamp-to-debug-output.patch | 13 +++-- ...ong-parameter-size-on-ioctl-FIONREAD.patch | 49 +++++++++++++++++++ 0004-fix-single-session-CD-detection.patch | 38 ++++++++++++++ ...fix-previous-commit-for-CD-detection.patch | 26 ++++++++++ udev.spec | 17 +++++-- 6 files changed, 149 insertions(+), 17 deletions(-) rename udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch => 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch (84%) rename udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch => 0002-udevd-add-timestamp-to-debug-output.patch (84%) create mode 100644 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch create mode 100644 0004-fix-single-session-CD-detection.patch create mode 100644 0005-fix-previous-commit-for-CD-detection.patch diff --git a/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch b/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch similarity index 84% rename from udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch rename to 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch index fbc9cef..b5261ff 100644 --- a/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch +++ b/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch @@ -1,9 +1,7 @@ +From 1dc0ee343df6b6e2ce0591ff08a0aeae2aa2196f Mon Sep 17 00:00:00 2001 From: Lennart Poettering -Date: Mon, 27 Jul 2009 21:24:27 +0000 (+0200) -Subject: enumeration: move ALSA control devices to the end of the enumerated devices of each ... -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=3bf768245b98479a14190e1e1d32ef5fae3ddf8a - -enumeration: move ALSA control devices to the end of the enumerated devices of each card +Date: Mon, 27 Jul 2009 23:24:27 +0200 +Subject: [PATCH 1/5] enumeration: move ALSA control devices to the end of the enumerated devices of each card Generally ALSA control devices should be the last ones to be processed for ACL changes and similar operations because they can then be used as @@ -13,12 +11,14 @@ specific card. This patch simple moves each controlC device behind all the pcmC devices (and similar). --- + libudev/libudev-enumerate.c | 59 ++++++++++++++++++++++++++++++++++++++++-- + 1 files changed, 56 insertions(+), 3 deletions(-) diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c -index 96cf060..986c1fc 100644 +index db8c514..e372079 100644 --- a/libudev/libudev-enumerate.c +++ b/libudev/libudev-enumerate.c -@@ -190,7 +190,8 @@ static int syspath_cmp(const void *p1, const void *p2) +@@ -187,7 +187,8 @@ static int syspath_cmp(const void *p1, const void *p2) return ret; } @@ -28,7 +28,7 @@ index 96cf060..986c1fc 100644 { static const char *delay_device_list[] = { "/block/md", -@@ -210,6 +211,32 @@ static int devices_delay(struct udev *udev, const char *syspath) +@@ -207,6 +208,32 @@ static int devices_delay(struct udev *udev, const char *syspath) return 0; } @@ -61,7 +61,7 @@ index 96cf060..986c1fc 100644 /** * udev_enumerate_get_list_entry: * @udev_enumerate: context -@@ -223,7 +250,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude +@@ -220,7 +247,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude if (!udev_enumerate->devices_uptodate) { unsigned int i; unsigned int max; @@ -71,7 +71,7 @@ index 96cf060..986c1fc 100644 udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp); -@@ -240,14 +268,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude +@@ -237,14 +265,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude prev = entry; /* skip to be delayed devices, and add them to the end of the list */ @@ -112,3 +112,6 @@ index 96cf060..986c1fc 100644 /* add and cleanup delayed devices from end of list */ for (i = max; i < udev_enumerate->devices_cur; i++) { struct syspath *entry = &udev_enumerate->devices[i]; +-- +1.6.4.4 + diff --git a/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch b/0002-udevd-add-timestamp-to-debug-output.patch similarity index 84% rename from udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch rename to 0002-udevd-add-timestamp-to-debug-output.patch index 7887df4..4deaff6 100644 --- a/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch +++ b/0002-udevd-add-timestamp-to-debug-output.patch @@ -1,10 +1,12 @@ +From 4db7e84ad817944c624256b310d44bd888121c8e Mon Sep 17 00:00:00 2001 From: Kay Sievers -Date: Fri, 17 Jul 2009 11:24:37 +0000 (+0200) -Subject: udevd: add timestamp to --debug output -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=820fc48f249012c673eb38f63dd8b5ee039627d0 +Date: Fri, 17 Jul 2009 13:24:37 +0200 +Subject: [PATCH 2/5] udevd: add timestamp to --debug output -udevd: add timestamp to --debug output --- + libudev/libudev-util-private.c | 3 ++- + udev/udevd.c | 13 +++++++++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index 5f5f4c1..f7daa94 100644 @@ -65,3 +67,6 @@ index 2cdc18b..69d509c 100644 udev_event = udev_event_new(dev); if (udev_event == NULL) _exit(3); +-- +1.6.4.4 + diff --git a/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch b/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch new file mode 100644 index 0000000..c7bbca8 --- /dev/null +++ b/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch @@ -0,0 +1,49 @@ +From 7766066b221302d75002cd5d5a021281388ee56c Mon Sep 17 00:00:00 2001 +From: Andrew Church +Date: Thu, 24 Sep 2009 10:51:12 -0700 +Subject: [PATCH 3/5] fix wrong parameter size on ioctl FIONREAD + +On Wed, Sep 23, 2009 at 23:11, Matthias Schwarzott wrote: +> It is about ioctl failures on amd64: +> http://bugs.gentoo.org/show_bug.cgi?id=286041 +> +> A bad parameter type to an ioctl() call causes udev-146 to generate "error +> getting buffer for inotify" messages in syslog. The offending code is +> roughly: +> +> ssize_t nbytes, pos; +> // ... +> ioctl(fd, FIONREAD, &nbytes); +> +> where ssize_t is 64 bits on amd64, but the kernel code for FIONREAD (at least +> through gentoo-sources-2.6.31) uses type int: +> +> p = (void __user *) arg; +> switch (cmd) { +> case FIONREAD: +> // ... +> ret = put_user(send_len, (int __user *) p); +> +> so the upper 32 bits of "nbytes" are left uninitialized, and the subsequent +> malloc(nbytes) fails unless those 32 bits happen to be zero (or the system has +> a LOT of memory). +--- + udev/udevd.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index 69d509c..511cb4b 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -656,7 +656,7 @@ static void handle_ctrl_msg(struct udev_ctrl *uctrl) + /* read inotify messages */ + static int handle_inotify(struct udev *udev) + { +- ssize_t nbytes, pos; ++ int nbytes, pos; + char *buf; + struct inotify_event *ev; + +-- +1.6.4.4 + diff --git a/0004-fix-single-session-CD-detection.patch b/0004-fix-single-session-CD-detection.patch new file mode 100644 index 0000000..6c933a6 --- /dev/null +++ b/0004-fix-single-session-CD-detection.patch @@ -0,0 +1,38 @@ +From 36b35c884fc06bc2babf0ec840cb423b94a45f93 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Sun, 20 Sep 2009 19:07:51 +0200 +Subject: [PATCH 4/5] fix single-session CD detection + +ID_CDROM_MEDIA_SESSION_LAST_OFFSET is not set for CDs with only a single +session (i. e. for the vast majority of CDs out there). The previous rules ran +blkid with invalid arguments for these, causing CD detection to fail in +DK-disks and gvfs. + +Now check whether we actually have ID_CDROM_MEDIA_SESSION_LAST_OFFSET, and if +not, call blkid without -O for specifying the offset. + +Many thanks to Maxim Levitsky for tracking this down! + +https://launchpad.net/bugs/431055 +--- + rules/rules.d/60-persistent-storage.rules | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 64e9578..1b85156 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -61,7 +61,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA + ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # probe filesystem metadata of optical drives which have a media inserted +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks + KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" +-- +1.6.4.4 + diff --git a/0005-fix-previous-commit-for-CD-detection.patch b/0005-fix-previous-commit-for-CD-detection.patch new file mode 100644 index 0000000..4b4eee4 --- /dev/null +++ b/0005-fix-previous-commit-for-CD-detection.patch @@ -0,0 +1,26 @@ +From a09ac6a6ae39512fafe9df331a311113d2a1d9f6 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Sun, 20 Sep 2009 19:21:04 +0200 +Subject: [PATCH 5/5] fix previous commit for CD detection + +Do not run blkid twice. *brown paperbag* +--- + rules/rules.d/60-persistent-storage.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 1b85156..0950847 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -63,7 +63,7 @@ ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_ + # probe filesystem metadata of optical drives which have a media inserted + KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" + # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks + KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" +-- +1.6.4.4 + diff --git a/udev.spec b/udev.spec index edafeb8..f3ea6ff 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,8 +14,12 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch -Patch2: udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch +Patch1: 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch +Patch2: 0002-udevd-add-timestamp-to-debug-output.patch +Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch +Patch4: 0004-fix-single-session-CD-detection.patch +Patch5: 0005-fix-previous-commit-for-CD-detection.patch + Source1: start_udev Source3: udev-post.init @@ -99,6 +103,9 @@ glib-based applications using libudev functionality. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build # get rid of rpath @@ -350,6 +357,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Sep 25 2009 harald@redhat.com 145-9 +- add patches to fix cdrom_id +- add patch to fix the inotify bug (bug #524752) + * Wed Sep 23 2009 harald@redhat.com 145-8 - obsolete libgudev and libgudev-devel (bug #523569) From 38fd08cab960744760dc78b225c059e136f7b232 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 25 Sep 2009 17:05:23 +0000 Subject: [PATCH 522/640] - add patches to fix cdrom_id - add patch to fix the inotify bug (bug #524752) --- ...-ALSA-control-devices-to-the-end-of-.patch | 23 +++++---- ...-udevd-add-timestamp-to-debug-output.patch | 13 +++-- ...ong-parameter-size-on-ioctl-FIONREAD.patch | 49 +++++++++++++++++++ 0004-fix-single-session-CD-detection.patch | 38 ++++++++++++++ ...fix-previous-commit-for-CD-detection.patch | 26 ++++++++++ udev.spec | 17 +++++-- 6 files changed, 149 insertions(+), 17 deletions(-) rename udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch => 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch (84%) rename udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch => 0002-udevd-add-timestamp-to-debug-output.patch (84%) create mode 100644 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch create mode 100644 0004-fix-single-session-CD-detection.patch create mode 100644 0005-fix-previous-commit-for-CD-detection.patch diff --git a/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch b/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch similarity index 84% rename from udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch rename to 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch index fbc9cef..b5261ff 100644 --- a/udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch +++ b/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch @@ -1,9 +1,7 @@ +From 1dc0ee343df6b6e2ce0591ff08a0aeae2aa2196f Mon Sep 17 00:00:00 2001 From: Lennart Poettering -Date: Mon, 27 Jul 2009 21:24:27 +0000 (+0200) -Subject: enumeration: move ALSA control devices to the end of the enumerated devices of each ... -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=3bf768245b98479a14190e1e1d32ef5fae3ddf8a - -enumeration: move ALSA control devices to the end of the enumerated devices of each card +Date: Mon, 27 Jul 2009 23:24:27 +0200 +Subject: [PATCH 1/5] enumeration: move ALSA control devices to the end of the enumerated devices of each card Generally ALSA control devices should be the last ones to be processed for ACL changes and similar operations because they can then be used as @@ -13,12 +11,14 @@ specific card. This patch simple moves each controlC device behind all the pcmC devices (and similar). --- + libudev/libudev-enumerate.c | 59 ++++++++++++++++++++++++++++++++++++++++-- + 1 files changed, 56 insertions(+), 3 deletions(-) diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c -index 96cf060..986c1fc 100644 +index db8c514..e372079 100644 --- a/libudev/libudev-enumerate.c +++ b/libudev/libudev-enumerate.c -@@ -190,7 +190,8 @@ static int syspath_cmp(const void *p1, const void *p2) +@@ -187,7 +187,8 @@ static int syspath_cmp(const void *p1, const void *p2) return ret; } @@ -28,7 +28,7 @@ index 96cf060..986c1fc 100644 { static const char *delay_device_list[] = { "/block/md", -@@ -210,6 +211,32 @@ static int devices_delay(struct udev *udev, const char *syspath) +@@ -207,6 +208,32 @@ static int devices_delay(struct udev *udev, const char *syspath) return 0; } @@ -61,7 +61,7 @@ index 96cf060..986c1fc 100644 /** * udev_enumerate_get_list_entry: * @udev_enumerate: context -@@ -223,7 +250,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude +@@ -220,7 +247,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude if (!udev_enumerate->devices_uptodate) { unsigned int i; unsigned int max; @@ -71,7 +71,7 @@ index 96cf060..986c1fc 100644 udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp); -@@ -240,14 +268,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude +@@ -237,14 +265,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude prev = entry; /* skip to be delayed devices, and add them to the end of the list */ @@ -112,3 +112,6 @@ index 96cf060..986c1fc 100644 /* add and cleanup delayed devices from end of list */ for (i = max; i < udev_enumerate->devices_cur; i++) { struct syspath *entry = &udev_enumerate->devices[i]; +-- +1.6.4.4 + diff --git a/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch b/0002-udevd-add-timestamp-to-debug-output.patch similarity index 84% rename from udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch rename to 0002-udevd-add-timestamp-to-debug-output.patch index 7887df4..4deaff6 100644 --- a/udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch +++ b/0002-udevd-add-timestamp-to-debug-output.patch @@ -1,10 +1,12 @@ +From 4db7e84ad817944c624256b310d44bd888121c8e Mon Sep 17 00:00:00 2001 From: Kay Sievers -Date: Fri, 17 Jul 2009 11:24:37 +0000 (+0200) -Subject: udevd: add timestamp to --debug output -X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=820fc48f249012c673eb38f63dd8b5ee039627d0 +Date: Fri, 17 Jul 2009 13:24:37 +0200 +Subject: [PATCH 2/5] udevd: add timestamp to --debug output -udevd: add timestamp to --debug output --- + libudev/libudev-util-private.c | 3 ++- + udev/udevd.c | 13 +++++++++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index 5f5f4c1..f7daa94 100644 @@ -65,3 +67,6 @@ index 2cdc18b..69d509c 100644 udev_event = udev_event_new(dev); if (udev_event == NULL) _exit(3); +-- +1.6.4.4 + diff --git a/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch b/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch new file mode 100644 index 0000000..c7bbca8 --- /dev/null +++ b/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch @@ -0,0 +1,49 @@ +From 7766066b221302d75002cd5d5a021281388ee56c Mon Sep 17 00:00:00 2001 +From: Andrew Church +Date: Thu, 24 Sep 2009 10:51:12 -0700 +Subject: [PATCH 3/5] fix wrong parameter size on ioctl FIONREAD + +On Wed, Sep 23, 2009 at 23:11, Matthias Schwarzott wrote: +> It is about ioctl failures on amd64: +> http://bugs.gentoo.org/show_bug.cgi?id=286041 +> +> A bad parameter type to an ioctl() call causes udev-146 to generate "error +> getting buffer for inotify" messages in syslog. The offending code is +> roughly: +> +> ssize_t nbytes, pos; +> // ... +> ioctl(fd, FIONREAD, &nbytes); +> +> where ssize_t is 64 bits on amd64, but the kernel code for FIONREAD (at least +> through gentoo-sources-2.6.31) uses type int: +> +> p = (void __user *) arg; +> switch (cmd) { +> case FIONREAD: +> // ... +> ret = put_user(send_len, (int __user *) p); +> +> so the upper 32 bits of "nbytes" are left uninitialized, and the subsequent +> malloc(nbytes) fails unless those 32 bits happen to be zero (or the system has +> a LOT of memory). +--- + udev/udevd.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index 69d509c..511cb4b 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -656,7 +656,7 @@ static void handle_ctrl_msg(struct udev_ctrl *uctrl) + /* read inotify messages */ + static int handle_inotify(struct udev *udev) + { +- ssize_t nbytes, pos; ++ int nbytes, pos; + char *buf; + struct inotify_event *ev; + +-- +1.6.4.4 + diff --git a/0004-fix-single-session-CD-detection.patch b/0004-fix-single-session-CD-detection.patch new file mode 100644 index 0000000..6c933a6 --- /dev/null +++ b/0004-fix-single-session-CD-detection.patch @@ -0,0 +1,38 @@ +From 36b35c884fc06bc2babf0ec840cb423b94a45f93 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Sun, 20 Sep 2009 19:07:51 +0200 +Subject: [PATCH 4/5] fix single-session CD detection + +ID_CDROM_MEDIA_SESSION_LAST_OFFSET is not set for CDs with only a single +session (i. e. for the vast majority of CDs out there). The previous rules ran +blkid with invalid arguments for these, causing CD detection to fail in +DK-disks and gvfs. + +Now check whether we actually have ID_CDROM_MEDIA_SESSION_LAST_OFFSET, and if +not, call blkid without -O for specifying the offset. + +Many thanks to Maxim Levitsky for tracking this down! + +https://launchpad.net/bugs/431055 +--- + rules/rules.d/60-persistent-storage.rules | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 64e9578..1b85156 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -61,7 +61,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA + ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # probe filesystem metadata of optical drives which have a media inserted +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks + KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" +-- +1.6.4.4 + diff --git a/0005-fix-previous-commit-for-CD-detection.patch b/0005-fix-previous-commit-for-CD-detection.patch new file mode 100644 index 0000000..4b4eee4 --- /dev/null +++ b/0005-fix-previous-commit-for-CD-detection.patch @@ -0,0 +1,26 @@ +From a09ac6a6ae39512fafe9df331a311113d2a1d9f6 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Sun, 20 Sep 2009 19:21:04 +0200 +Subject: [PATCH 5/5] fix previous commit for CD detection + +Do not run blkid twice. *brown paperbag* +--- + rules/rules.d/60-persistent-storage.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 1b85156..0950847 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -63,7 +63,7 @@ ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_ + # probe filesystem metadata of optical drives which have a media inserted + KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" + # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks + KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" +-- +1.6.4.4 + diff --git a/udev.spec b/udev.spec index edafeb8..f3ea6ff 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,8 +14,12 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch -Patch2: udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch +Patch1: 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch +Patch2: 0002-udevd-add-timestamp-to-debug-output.patch +Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch +Patch4: 0004-fix-single-session-CD-detection.patch +Patch5: 0005-fix-previous-commit-for-CD-detection.patch + Source1: start_udev Source3: udev-post.init @@ -99,6 +103,9 @@ glib-based applications using libudev functionality. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build # get rid of rpath @@ -350,6 +357,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Sep 25 2009 harald@redhat.com 145-9 +- add patches to fix cdrom_id +- add patch to fix the inotify bug (bug #524752) + * Wed Sep 23 2009 harald@redhat.com 145-8 - obsolete libgudev and libgudev-devel (bug #523569) From 9544e4100e95a066ecb64094a1652f5f5c2bde09 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 07:10:25 +0000 Subject: [PATCH 523/640] Initialize branch F-12 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..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From 401942f50d323fcad9ed8fc880802193b9e8c8ed Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 29 Sep 2009 13:09:11 +0000 Subject: [PATCH 524/640] - add ConsoleKit patch for ConsoleKit 0.4.1 --- ck-runseat.patch | 295 +++++++++++++++++++++++++++++++++++++++++++++++ udev.spec | 10 +- 2 files changed, 302 insertions(+), 3 deletions(-) create mode 100644 ck-runseat.patch diff --git a/ck-runseat.patch b/ck-runseat.patch new file mode 100644 index 0000000..8804bc7 --- /dev/null +++ b/ck-runseat.patch @@ -0,0 +1,295 @@ +--- udev-145/extras/udev-acl/Makefile.am.runseat 2009-06-16 19:47:37.000000000 -0400 ++++ udev-145/extras/udev-acl/Makefile.am 2009-09-25 20:21:41.959583372 -0400 +@@ -15,5 +15,5 @@ udev_acl_LDADD = \ + dist_udevrules_DATA = 70-acl.rules + + install-exec-hook: +- mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d +- ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck ++ mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d ++ ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck +--- udev-145/extras/udev-acl/udev-acl.c.runseat 2009-06-16 12:10:58.000000000 -0400 ++++ udev-145/extras/udev-acl/udev-acl.c 2009-09-25 20:57:32.502573825 -0400 +@@ -1,4 +1,5 @@ +-/* ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ++ * + * Copyright (C) 2009 Kay Sievers + * + * This program is free software; you can redistribute it and/or +@@ -29,6 +30,13 @@ + + static int debug; + ++enum{ ++ ACTION_NONE = 0, ++ ACTION_REMOVE, ++ ACTION_ADD, ++ ACTION_CHANGE ++}; ++ + static int set_facl(const char* filename, uid_t uid, int add) + { + int get; +@@ -152,44 +160,123 @@ static GSList *uids_with_local_active_se + } + + /* ConsoleKit calls us with special variables */ +-static int consolekit_called(const char *action, uid_t *uid, const char **own_session, int *add) ++static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, const char **remove_session_id, int *action) + { +- int a; +- uid_t u; ++ int a = ACTION_NONE; ++ uid_t u = 0; ++ uid_t u2 = 0; + const char *s; +- const char *session; +- +- if (action == NULL || strcmp(action, "session_active_changed") != 0) +- return -1; ++ const char *s2; ++ const char *old_session = NULL; + +- s = getenv("CK_SESSION_IS_LOCAL"); +- if (s == NULL) ++ if (ck_action == NULL || strcmp(ck_action, "seat_active_session_changed") != 0) + return -1; +- if (strcmp(s, "true") != 0) +- return 0; + +- s = getenv("CK_SESSION_IS_ACTIVE"); +- if (s == NULL) ++ /* We can have one of: remove, add, change, no-change */ ++ s = getenv("CK_SEAT_OLD_SESSION_ID"); ++ s2 = getenv("CK_SEAT_SESSION_ID"); ++ if (s == NULL && s2 == NULL) { + return -1; +- if (strcmp(s, "true") == 0) +- a = 1; +- else +- a = 0; ++ } else if (s2 == NULL) { ++ a = ACTION_REMOVE; ++ } else if (s == NULL) { ++ a = ACTION_ADD; ++ } else { ++ a = ACTION_CHANGE; ++ } + +- session = getenv("CK_SESSION_ID"); +- if (session == NULL) +- return -1; ++ switch (a) { ++ case ACTION_ADD: ++ s = getenv("CK_SEAT_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u = strtoul(s, NULL, 10); ++ if (u == 0) ++ return 0; ++ ++ s = getenv("CK_SEAT_SESSION_IS_LOCAL"); ++ if (s == NULL) ++ return -1; ++ if (strcmp(s, "true") != 0) ++ return 0; ++ ++ break; ++ case ACTION_REMOVE: ++ s = getenv("CK_SEAT_OLD_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u = strtoul(s, NULL, 10); ++ if (u == 0) ++ return 0; ++ ++ s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL"); ++ if (s == NULL) ++ return -1; ++ if (strcmp(s, "true") != 0) ++ return 0; ++ ++ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); ++ if (old_session == NULL) ++ return -1; ++ ++ break; ++ case ACTION_CHANGE: ++ s = getenv("CK_SEAT_OLD_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u = strtoul(s, NULL, 10); ++ if (u == 0) ++ return 0; ++ s = getenv("CK_SEAT_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u2 = strtoul(s, NULL, 10); ++ if (u2 == 0) ++ return 0; ++ ++ s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL"); ++ s2 = getenv("CK_SEAT_SESSION_IS_LOCAL"); ++ if (s == NULL || s2 == NULL) ++ return -1; ++ /* don't process non-local session changes */ ++ if (strcmp(s, "true") != 0 && strcmp(s2, "true") != 0) ++ return 0; ++ ++ if (strcmp(s, "true") == 0 && strcmp(s, "true") == 0) { ++ /* process the change */ ++ if (u == u2) { ++ /* special case: we noop if we are ++ * changing between local sessions for ++ * the same uid */ ++ a = ACTION_NONE; ++ } ++ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); ++ if (old_session == NULL) ++ return -1; ++ } else if (strcmp(s, "true") == 0) { ++ /* only process the removal */ ++ a = ACTION_REMOVE; ++ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); ++ if (old_session == NULL) ++ return -1; ++ } else if (strcmp(s2, "true") == 0) { ++ /* only process the addition */ ++ a = ACTION_ADD; ++ u = u2; ++ } + +- s = getenv("CK_SESSION_USER_UID"); +- if (s == NULL) +- return -1; +- u = strtoul(s, NULL, 10); +- if (u == 0) +- return 0; ++ break; ++ case ACTION_NONE: ++ break; ++ default: ++ g_assert_not_reached (); ++ break; ++ } + +- *own_session = session; ++ *remove_session_id = old_session; + *uid = u; +- *add = a; ++ *uid2 = u2; ++ *action = a; + return 0; + } + +@@ -223,6 +310,21 @@ static void apply_acl_to_devices(uid_t u + udev_unref(udev); + } + ++static void ++remove_uid (uid_t uid, const char *remove_session_id) ++{ ++ /* ++ * Remove ACL for given uid from all matching devices ++ * when there is currently no local active session. ++ */ ++ GSList *list; ++ ++ list = uids_with_local_active_session(remove_session_id); ++ if (!uid_in_list(list, uid)) ++ apply_acl_to_devices(uid, 0); ++ g_slist_free(list); ++} ++ + int main (int argc, char* argv[]) + { + static const struct option options[] = { +@@ -233,10 +335,11 @@ int main (int argc, char* argv[]) + { "help", no_argument, NULL, 'h' }, + {} + }; +- int add = -1; ++ int action = -1; + const char *device = NULL; + uid_t uid = 0; +- const char* own_session = NULL; ++ uid_t uid2 = 0; ++ const char* remove_session_id = NULL; + int rc = 0; + + /* valgrind is more important to us than a slice allocator */ +@@ -252,9 +355,9 @@ int main (int argc, char* argv[]) + switch (option) { + case 'a': + if (strcmp(optarg, "add") == 0 || strcmp(optarg, "change") == 0) +- add = 1; ++ action = ACTION_ADD; + else if (strcmp(optarg, "remove") == 0) +- add = 0; ++ action = ACTION_REMOVE; + else + goto out; + break; +@@ -274,10 +377,10 @@ int main (int argc, char* argv[]) + } + } + +- if (add < 0 && device == NULL && uid == 0) +- consolekit_called(argv[optind], &uid, &own_session, &add); ++ if (action < 0 && device == NULL && uid == 0) ++ consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action); + +- if (add < 0) { ++ if (action < 0) { + fprintf(stderr, "missing action\n\n"); + rc = 2; + goto out; +@@ -290,20 +393,24 @@ int main (int argc, char* argv[]) + } + + if (uid != 0) { +- if (add) { ++ switch (action) { ++ case ACTION_ADD: + /* Add ACL for given uid to all matching devices. */ + apply_acl_to_devices(uid, 1); +- } else { +- /* +- * Remove ACL for given uid from all matching devices +- * when there is currently no local active session. +- */ +- GSList *list; +- +- list = uids_with_local_active_session(own_session); +- if (!uid_in_list(list, uid)) +- apply_acl_to_devices(uid, 0); +- g_slist_free(list); ++ break; ++ case ACTION_REMOVE: ++ remove_uid(uid, remove_session_id); ++ break; ++ case ACTION_CHANGE: ++ remove_uid(uid, remove_session_id); ++ apply_acl_to_devices(uid2, 1); ++ break; ++ case ACTION_NONE: ++ goto out; ++ break; ++ default: ++ g_assert_not_reached(); ++ break; + } + } else if (device != NULL) { + /* +@@ -321,8 +428,8 @@ int main (int argc, char* argv[]) + uid_t u; + + u = GPOINTER_TO_UINT(l->data); +- if (add || !uid_in_list(list, u)) +- set_facl(device, u, add); ++ if (action == ACTION_ADD || !uid_in_list(list, u)) ++ set_facl(device, u, action == ACTION_ADD); + } + g_slist_free(list); + } else { diff --git a/udev.spec b/udev.spec index f3ea6ff..210eaf0 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,7 +19,7 @@ Patch2: 0002-udevd-add-timestamp-to-debug-output.patch Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch Patch4: 0004-fix-single-session-CD-detection.patch Patch5: 0005-fix-previous-commit-for-CD-detection.patch - +Patch6: ck-runseat.patch Source1: start_udev Source3: udev-post.init @@ -106,6 +106,7 @@ glib-based applications using libudev functionality. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 -b .ck041 %build # get rid of rpath @@ -323,7 +324,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/v4l_id %attr(0755,root,root) %{udev_scriptdir}/findkeyboards %attr(0644,root,root) %{udev_scriptdir}/keymaps/* -%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck +%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %files -n libudev @@ -357,6 +358,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Sep 29 2009 Harald Hoyer 145-10 +- add ConsoleKit patch for ConsoleKit 0.4.1 + * Fri Sep 25 2009 harald@redhat.com 145-9 - add patches to fix cdrom_id - add patch to fix the inotify bug (bug #524752) From 4152795a09838c44a944d267c7041e2e7aec6eea Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 9 Oct 2009 10:48:57 +0000 Subject: [PATCH 525/640] - pre 147 - database format changed - lots of potential buffer overflow fixes --- .cvsignore | 2 +- ...-ALSA-control-devices-to-the-end-of-.patch | 117 ------- ...-udevd-add-timestamp-to-debug-output.patch | 72 ----- ...ong-parameter-size-on-ioctl-FIONREAD.patch | 49 --- 0004-fix-single-session-CD-detection.patch | 38 --- ...fix-previous-commit-for-CD-detection.patch | 26 -- ck-runseat.patch | 295 ------------------ sources | 2 +- udev.spec | 28 +- 9 files changed, 12 insertions(+), 617 deletions(-) delete mode 100644 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch delete mode 100644 0002-udevd-add-timestamp-to-debug-output.patch delete mode 100644 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch delete mode 100644 0004-fix-single-session-CD-detection.patch delete mode 100644 0005-fix-previous-commit-for-CD-detection.patch delete mode 100644 ck-runseat.patch diff --git a/.cvsignore b/.cvsignore index 287b708..513dfdb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-145.tar.bz2 +udev-147-0.gitdf3e07d.tar.bz2 diff --git a/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch b/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch deleted file mode 100644 index b5261ff..0000000 --- a/0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 1dc0ee343df6b6e2ce0591ff08a0aeae2aa2196f Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 27 Jul 2009 23:24:27 +0200 -Subject: [PATCH 1/5] enumeration: move ALSA control devices to the end of the enumerated devices of each card - -Generally ALSA control devices should be the last ones to be processed -for ACL changes and similar operations because they can then be used as -indicators that ACL management finished for all device nodes of a -specific card. - -This patch simple moves each controlC device behind all the pcmC devices -(and similar). ---- - libudev/libudev-enumerate.c | 59 ++++++++++++++++++++++++++++++++++++++++-- - 1 files changed, 56 insertions(+), 3 deletions(-) - -diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c -index db8c514..e372079 100644 ---- a/libudev/libudev-enumerate.c -+++ b/libudev/libudev-enumerate.c -@@ -187,7 +187,8 @@ static int syspath_cmp(const void *p1, const void *p2) - return ret; - } - --static int devices_delay(struct udev *udev, const char *syspath) -+/* For devices that should be moved to the absolute end of the list */ -+static int devices_delay_end(struct udev *udev, const char *syspath) - { - static const char *delay_device_list[] = { - "/block/md", -@@ -207,6 +208,32 @@ static int devices_delay(struct udev *udev, const char *syspath) - return 0; - } - -+/* For devices that should just be moved a little bit later, just -+ * before the point where some common path prefix changes. Returns the -+ * number of characters that make up that common prefix */ -+static size_t devices_delay_later(struct udev *udev, const char *syspath) -+{ -+ const char *c; -+ -+ /* For sound cards the control device must be enumerated last -+ * to make sure it's the final device node that gets ACLs -+ * applied. Applications rely on this fact and use ACL changes -+ * on the control node as an indicator that the ACL change of -+ * the entire sound card completed. The kernel makes this -+ * guarantee when creating those devices, and hence we should -+ * too when enumerating them. */ -+ -+ if ((c = strstr(syspath, "/sound/card"))) { -+ c += 11; -+ c += strcspn(c, "/"); -+ -+ if (strncmp(c, "/controlC", 9) == 0) -+ return c - syspath + 1; -+ } -+ -+ return 0; -+} -+ - /** - * udev_enumerate_get_list_entry: - * @udev_enumerate: context -@@ -220,7 +247,8 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude - if (!udev_enumerate->devices_uptodate) { - unsigned int i; - unsigned int max; -- struct syspath *prev = NULL; -+ struct syspath *prev = NULL, *move_later = NULL; -+ size_t move_later_prefix; - - udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); - qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp); -@@ -237,14 +265,39 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude - prev = entry; - - /* skip to be delayed devices, and add them to the end of the list */ -- if (devices_delay(udev_enumerate->udev, entry->syspath)) { -+ if (devices_delay_end(udev_enumerate->udev, entry->syspath)) { - syspath_add(udev_enumerate, entry->syspath); - continue; - } - -+ /* skip to be delayed devices, and move the to -+ * the point where the prefix changes. We can -+ * only move one item at a time. */ -+ if (!move_later) { -+ move_later_prefix = devices_delay_later(udev_enumerate->udev, entry->syspath); -+ -+ if (move_later_prefix > 0) { -+ move_later = entry; -+ continue; -+ } -+ } -+ -+ if (move_later && -+ strncmp(entry->syspath, move_later->syspath, move_later_prefix) != 0) { -+ -+ udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, -+ move_later->syspath, NULL, 0, 0); -+ move_later = NULL; -+ } -+ - udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, - entry->syspath, NULL, 0, 0); - } -+ -+ if (move_later) -+ udev_list_entry_add(udev_enumerate->udev, &udev_enumerate->devices_list, -+ move_later->syspath, NULL, 0, 0); -+ - /* add and cleanup delayed devices from end of list */ - for (i = max; i < udev_enumerate->devices_cur; i++) { - struct syspath *entry = &udev_enumerate->devices[i]; --- -1.6.4.4 - diff --git a/0002-udevd-add-timestamp-to-debug-output.patch b/0002-udevd-add-timestamp-to-debug-output.patch deleted file mode 100644 index 4deaff6..0000000 --- a/0002-udevd-add-timestamp-to-debug-output.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 4db7e84ad817944c624256b310d44bd888121c8e Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 17 Jul 2009 13:24:37 +0200 -Subject: [PATCH 2/5] udevd: add timestamp to --debug output - ---- - libudev/libudev-util-private.c | 3 ++- - udev/udevd.c | 13 +++++++++++-- - 2 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c -index 5f5f4c1..f7daa94 100644 ---- a/libudev/libudev-util-private.c -+++ b/libudev/libudev-util-private.c -@@ -249,6 +249,8 @@ int util_run_program(struct udev *udev, const char *command, char **envp, - int i; - int err = 0; - -+ info(udev, "'%s' started\n", command); -+ - /* build argv from command */ - util_strscpy(arg, sizeof(arg), command); - i = 0; -@@ -273,7 +275,6 @@ int util_run_program(struct udev *udev, const char *command, char **envp, - argv[0] = arg; - argv[1] = NULL; - } -- info(udev, "'%s'\n", command); - - /* prepare pipes from child to parent */ - if (result != NULL || udev_get_log_priority(udev) >= LOG_INFO) { -diff --git a/udev/udevd.c b/udev/udevd.c -index 2cdc18b..69d509c 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -53,8 +54,15 @@ static void log_fn(struct udev *udev, int priority, - const char *format, va_list args) - { - if (debug) { -- fprintf(stderr, "[%d] %s: ", (int) getpid(), fn); -- vfprintf(stderr, format, args); -+ char buf[1024]; -+ struct timeval tv; -+ struct timezone tz; -+ -+ vsnprintf(buf, sizeof(buf), format, args); -+ gettimeofday(&tv, &tz); -+ fprintf(stderr, "%llu.%06u [%u] %s: %s", -+ (unsigned long long) tv.tv_sec, (unsigned int) tv.tv_usec, -+ (int) getpid(), fn, buf); - } else { - vsyslog(priority, format, args); - } -@@ -266,6 +274,7 @@ static void worker_new(struct event *event) - struct worker_message msg; - int err; - -+ info(event->udev, "seq %llu running\n", udev_device_get_seqnum(dev)); - udev_event = udev_event_new(dev); - if (udev_event == NULL) - _exit(3); --- -1.6.4.4 - diff --git a/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch b/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch deleted file mode 100644 index c7bbca8..0000000 --- a/0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7766066b221302d75002cd5d5a021281388ee56c Mon Sep 17 00:00:00 2001 -From: Andrew Church -Date: Thu, 24 Sep 2009 10:51:12 -0700 -Subject: [PATCH 3/5] fix wrong parameter size on ioctl FIONREAD - -On Wed, Sep 23, 2009 at 23:11, Matthias Schwarzott wrote: -> It is about ioctl failures on amd64: -> http://bugs.gentoo.org/show_bug.cgi?id=286041 -> -> A bad parameter type to an ioctl() call causes udev-146 to generate "error -> getting buffer for inotify" messages in syslog. The offending code is -> roughly: -> -> ssize_t nbytes, pos; -> // ... -> ioctl(fd, FIONREAD, &nbytes); -> -> where ssize_t is 64 bits on amd64, but the kernel code for FIONREAD (at least -> through gentoo-sources-2.6.31) uses type int: -> -> p = (void __user *) arg; -> switch (cmd) { -> case FIONREAD: -> // ... -> ret = put_user(send_len, (int __user *) p); -> -> so the upper 32 bits of "nbytes" are left uninitialized, and the subsequent -> malloc(nbytes) fails unless those 32 bits happen to be zero (or the system has -> a LOT of memory). ---- - udev/udevd.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev/udevd.c b/udev/udevd.c -index 69d509c..511cb4b 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -656,7 +656,7 @@ static void handle_ctrl_msg(struct udev_ctrl *uctrl) - /* read inotify messages */ - static int handle_inotify(struct udev *udev) - { -- ssize_t nbytes, pos; -+ int nbytes, pos; - char *buf; - struct inotify_event *ev; - --- -1.6.4.4 - diff --git a/0004-fix-single-session-CD-detection.patch b/0004-fix-single-session-CD-detection.patch deleted file mode 100644 index 6c933a6..0000000 --- a/0004-fix-single-session-CD-detection.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 36b35c884fc06bc2babf0ec840cb423b94a45f93 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Sun, 20 Sep 2009 19:07:51 +0200 -Subject: [PATCH 4/5] fix single-session CD detection - -ID_CDROM_MEDIA_SESSION_LAST_OFFSET is not set for CDs with only a single -session (i. e. for the vast majority of CDs out there). The previous rules ran -blkid with invalid arguments for these, causing CD detection to fail in -DK-disks and gvfs. - -Now check whether we actually have ID_CDROM_MEDIA_SESSION_LAST_OFFSET, and if -not, call blkid without -O for specifying the offset. - -Many thanks to Maxim Levitsky for tracking this down! - -https://launchpad.net/bugs/431055 ---- - rules/rules.d/60-persistent-storage.rules | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules -index 64e9578..1b85156 100644 ---- a/rules/rules.d/60-persistent-storage.rules -+++ b/rules/rules.d/60-persistent-storage.rules -@@ -61,7 +61,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA - ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" - - # probe filesystem metadata of optical drives which have a media inserted --KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" -+KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" -+# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET -+KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" - - # probe filesystem metadata of disks - KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" --- -1.6.4.4 - diff --git a/0005-fix-previous-commit-for-CD-detection.patch b/0005-fix-previous-commit-for-CD-detection.patch deleted file mode 100644 index 4b4eee4..0000000 --- a/0005-fix-previous-commit-for-CD-detection.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a09ac6a6ae39512fafe9df331a311113d2a1d9f6 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Sun, 20 Sep 2009 19:21:04 +0200 -Subject: [PATCH 5/5] fix previous commit for CD detection - -Do not run blkid twice. *brown paperbag* ---- - rules/rules.d/60-persistent-storage.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules -index 1b85156..0950847 100644 ---- a/rules/rules.d/60-persistent-storage.rules -+++ b/rules/rules.d/60-persistent-storage.rules -@@ -63,7 +63,7 @@ ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_ - # probe filesystem metadata of optical drives which have a media inserted - KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" - # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET --KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" -+KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" - - # probe filesystem metadata of disks - KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" --- -1.6.4.4 - diff --git a/ck-runseat.patch b/ck-runseat.patch deleted file mode 100644 index 8804bc7..0000000 --- a/ck-runseat.patch +++ /dev/null @@ -1,295 +0,0 @@ ---- udev-145/extras/udev-acl/Makefile.am.runseat 2009-06-16 19:47:37.000000000 -0400 -+++ udev-145/extras/udev-acl/Makefile.am 2009-09-25 20:21:41.959583372 -0400 -@@ -15,5 +15,5 @@ udev_acl_LDADD = \ - dist_udevrules_DATA = 70-acl.rules - - install-exec-hook: -- mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d -- ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck -+ mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d -+ ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck ---- udev-145/extras/udev-acl/udev-acl.c.runseat 2009-06-16 12:10:58.000000000 -0400 -+++ udev-145/extras/udev-acl/udev-acl.c 2009-09-25 20:57:32.502573825 -0400 -@@ -1,4 +1,5 @@ --/* -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- -+ * - * Copyright (C) 2009 Kay Sievers - * - * This program is free software; you can redistribute it and/or -@@ -29,6 +30,13 @@ - - static int debug; - -+enum{ -+ ACTION_NONE = 0, -+ ACTION_REMOVE, -+ ACTION_ADD, -+ ACTION_CHANGE -+}; -+ - static int set_facl(const char* filename, uid_t uid, int add) - { - int get; -@@ -152,44 +160,123 @@ static GSList *uids_with_local_active_se - } - - /* ConsoleKit calls us with special variables */ --static int consolekit_called(const char *action, uid_t *uid, const char **own_session, int *add) -+static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, const char **remove_session_id, int *action) - { -- int a; -- uid_t u; -+ int a = ACTION_NONE; -+ uid_t u = 0; -+ uid_t u2 = 0; - const char *s; -- const char *session; -- -- if (action == NULL || strcmp(action, "session_active_changed") != 0) -- return -1; -+ const char *s2; -+ const char *old_session = NULL; - -- s = getenv("CK_SESSION_IS_LOCAL"); -- if (s == NULL) -+ if (ck_action == NULL || strcmp(ck_action, "seat_active_session_changed") != 0) - return -1; -- if (strcmp(s, "true") != 0) -- return 0; - -- s = getenv("CK_SESSION_IS_ACTIVE"); -- if (s == NULL) -+ /* We can have one of: remove, add, change, no-change */ -+ s = getenv("CK_SEAT_OLD_SESSION_ID"); -+ s2 = getenv("CK_SEAT_SESSION_ID"); -+ if (s == NULL && s2 == NULL) { - return -1; -- if (strcmp(s, "true") == 0) -- a = 1; -- else -- a = 0; -+ } else if (s2 == NULL) { -+ a = ACTION_REMOVE; -+ } else if (s == NULL) { -+ a = ACTION_ADD; -+ } else { -+ a = ACTION_CHANGE; -+ } - -- session = getenv("CK_SESSION_ID"); -- if (session == NULL) -- return -1; -+ switch (a) { -+ case ACTION_ADD: -+ s = getenv("CK_SEAT_SESSION_USER_UID"); -+ if (s == NULL) -+ return -1; -+ u = strtoul(s, NULL, 10); -+ if (u == 0) -+ return 0; -+ -+ s = getenv("CK_SEAT_SESSION_IS_LOCAL"); -+ if (s == NULL) -+ return -1; -+ if (strcmp(s, "true") != 0) -+ return 0; -+ -+ break; -+ case ACTION_REMOVE: -+ s = getenv("CK_SEAT_OLD_SESSION_USER_UID"); -+ if (s == NULL) -+ return -1; -+ u = strtoul(s, NULL, 10); -+ if (u == 0) -+ return 0; -+ -+ s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL"); -+ if (s == NULL) -+ return -1; -+ if (strcmp(s, "true") != 0) -+ return 0; -+ -+ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); -+ if (old_session == NULL) -+ return -1; -+ -+ break; -+ case ACTION_CHANGE: -+ s = getenv("CK_SEAT_OLD_SESSION_USER_UID"); -+ if (s == NULL) -+ return -1; -+ u = strtoul(s, NULL, 10); -+ if (u == 0) -+ return 0; -+ s = getenv("CK_SEAT_SESSION_USER_UID"); -+ if (s == NULL) -+ return -1; -+ u2 = strtoul(s, NULL, 10); -+ if (u2 == 0) -+ return 0; -+ -+ s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL"); -+ s2 = getenv("CK_SEAT_SESSION_IS_LOCAL"); -+ if (s == NULL || s2 == NULL) -+ return -1; -+ /* don't process non-local session changes */ -+ if (strcmp(s, "true") != 0 && strcmp(s2, "true") != 0) -+ return 0; -+ -+ if (strcmp(s, "true") == 0 && strcmp(s, "true") == 0) { -+ /* process the change */ -+ if (u == u2) { -+ /* special case: we noop if we are -+ * changing between local sessions for -+ * the same uid */ -+ a = ACTION_NONE; -+ } -+ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); -+ if (old_session == NULL) -+ return -1; -+ } else if (strcmp(s, "true") == 0) { -+ /* only process the removal */ -+ a = ACTION_REMOVE; -+ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); -+ if (old_session == NULL) -+ return -1; -+ } else if (strcmp(s2, "true") == 0) { -+ /* only process the addition */ -+ a = ACTION_ADD; -+ u = u2; -+ } - -- s = getenv("CK_SESSION_USER_UID"); -- if (s == NULL) -- return -1; -- u = strtoul(s, NULL, 10); -- if (u == 0) -- return 0; -+ break; -+ case ACTION_NONE: -+ break; -+ default: -+ g_assert_not_reached (); -+ break; -+ } - -- *own_session = session; -+ *remove_session_id = old_session; - *uid = u; -- *add = a; -+ *uid2 = u2; -+ *action = a; - return 0; - } - -@@ -223,6 +310,21 @@ static void apply_acl_to_devices(uid_t u - udev_unref(udev); - } - -+static void -+remove_uid (uid_t uid, const char *remove_session_id) -+{ -+ /* -+ * Remove ACL for given uid from all matching devices -+ * when there is currently no local active session. -+ */ -+ GSList *list; -+ -+ list = uids_with_local_active_session(remove_session_id); -+ if (!uid_in_list(list, uid)) -+ apply_acl_to_devices(uid, 0); -+ g_slist_free(list); -+} -+ - int main (int argc, char* argv[]) - { - static const struct option options[] = { -@@ -233,10 +335,11 @@ int main (int argc, char* argv[]) - { "help", no_argument, NULL, 'h' }, - {} - }; -- int add = -1; -+ int action = -1; - const char *device = NULL; - uid_t uid = 0; -- const char* own_session = NULL; -+ uid_t uid2 = 0; -+ const char* remove_session_id = NULL; - int rc = 0; - - /* valgrind is more important to us than a slice allocator */ -@@ -252,9 +355,9 @@ int main (int argc, char* argv[]) - switch (option) { - case 'a': - if (strcmp(optarg, "add") == 0 || strcmp(optarg, "change") == 0) -- add = 1; -+ action = ACTION_ADD; - else if (strcmp(optarg, "remove") == 0) -- add = 0; -+ action = ACTION_REMOVE; - else - goto out; - break; -@@ -274,10 +377,10 @@ int main (int argc, char* argv[]) - } - } - -- if (add < 0 && device == NULL && uid == 0) -- consolekit_called(argv[optind], &uid, &own_session, &add); -+ if (action < 0 && device == NULL && uid == 0) -+ consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action); - -- if (add < 0) { -+ if (action < 0) { - fprintf(stderr, "missing action\n\n"); - rc = 2; - goto out; -@@ -290,20 +393,24 @@ int main (int argc, char* argv[]) - } - - if (uid != 0) { -- if (add) { -+ switch (action) { -+ case ACTION_ADD: - /* Add ACL for given uid to all matching devices. */ - apply_acl_to_devices(uid, 1); -- } else { -- /* -- * Remove ACL for given uid from all matching devices -- * when there is currently no local active session. -- */ -- GSList *list; -- -- list = uids_with_local_active_session(own_session); -- if (!uid_in_list(list, uid)) -- apply_acl_to_devices(uid, 0); -- g_slist_free(list); -+ break; -+ case ACTION_REMOVE: -+ remove_uid(uid, remove_session_id); -+ break; -+ case ACTION_CHANGE: -+ remove_uid(uid, remove_session_id); -+ apply_acl_to_devices(uid2, 1); -+ break; -+ case ACTION_NONE: -+ goto out; -+ break; -+ default: -+ g_assert_not_reached(); -+ break; - } - } else if (device != NULL) { - /* -@@ -321,8 +428,8 @@ int main (int argc, char* argv[]) - uid_t u; - - u = GPOINTER_TO_UINT(l->data); -- if (add || !uid_in_list(list, u)) -- set_facl(device, u, add); -+ if (action == ACTION_ADD || !uid_in_list(list, u)) -+ set_facl(device, u, action == ACTION_ADD); - } - g_slist_free(list); - } else { diff --git a/sources b/sources index 433028f..8b59f95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b3d3b5f88c7b81e7615700a04db685e1 udev-145.tar.bz2 +9cbae4cf95e5c510d7974ea195dfb2a4 udev-147-0.gitdf3e07d.tar.bz2 diff --git a/udev.spec b/udev.spec index 210eaf0..bdc3100 100644 --- a/udev.spec +++ b/udev.spec @@ -4,22 +4,16 @@ Summary: A userspace implementation of devfs Name: udev -Version: 145 -Release: 10%{?dist} +Version: 147 +Release: 0.1.gitdf3e07d%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 - -Patch1: 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch -Patch2: 0002-udevd-add-timestamp-to-debug-output.patch -Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch -Patch4: 0004-fix-single-session-CD-detection.patch -Patch5: 0005-fix-previous-commit-for-CD-detection.patch -Patch6: ck-runseat.patch +Source: udev-147-0.gitdf3e07d.tar.bz2 +#Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev Source3: udev-post.init @@ -99,14 +93,8 @@ Requires: libgudev1 = %{version}-%{release} This package contains the header and pkg-config files for developing glib-based applications using libudev functionality. -%prep +%prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -b .ck041 %build # get rid of rpath @@ -158,7 +146,6 @@ for i in \ rules/packages/40-s390.rules \ %endif rules/packages/40-isdn.rules \ - rules/packages/40-alsa.rules \ rules/packages/64-md-raid.rules \ rules/packages/64-device-mapper.rules \ ; do @@ -358,6 +345,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Oct 09 2009 Harald Hoyer 147-0.1.gitdf3e07d +- pre 147 +- database format changed +- lots of potential buffer overflow fixes + * Tue Sep 29 2009 Harald Hoyer 145-10 - add ConsoleKit patch for ConsoleKit 0.4.1 From 350f832b8b43dbeb4a329447087db40491e40e40 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Oct 2009 10:35:52 +0000 Subject: [PATCH 526/640] - recognize a devtmpfs on /dev --- start_udev | 6 ++++-- udev.spec | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/start_udev b/start_udev index dfa36a8..6487666 100755 --- a/start_udev +++ b/start_udev @@ -223,7 +223,7 @@ STRING=$"Starting $prog: " echo -n "$STRING" # mount the tmpfs on ${udev_root%/}, if not already done -LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { +LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs\" ) { exit 1 }" /proc/mounts && { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) mount --move $udev_root/pts "$PTSDIR" @@ -232,7 +232,9 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun SHMDIR=$(mktemp -d) mount --move $udev_root/shm "$SHMDIR" fi - mount -n -o mode=0755 -t tmpfs none "$udev_root" + # First try to mount a devtmpfs on $udev_root + mount -n -o mode=0755 -t devtmpfs none "$udev_root" 2>/dev/null \ + || mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then diff --git a/udev.spec b/udev.spec index f3ea6ff..0dec2db 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -357,6 +357,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Oct 13 2009 Harald Hoyer 145-10 +- recognize a devtmpfs on /dev + * Fri Sep 25 2009 harald@redhat.com 145-9 - add patches to fix cdrom_id - add patch to fix the inotify bug (bug #524752) From 98e286f417ff3fc460835e007bd3e87956b0a6d5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Oct 2009 10:37:13 +0000 Subject: [PATCH 527/640] add bugzilla number to changelog --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0dec2db..598b81d 100644 --- a/udev.spec +++ b/udev.spec @@ -358,7 +358,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Oct 13 2009 Harald Hoyer 145-10 -- recognize a devtmpfs on /dev +- recognize a devtmpfs on /dev (bug #528488) * Fri Sep 25 2009 harald@redhat.com 145-9 - add patches to fix cdrom_id From f066808f9f43441669e939158fd3769153234d36 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Oct 2009 10:43:22 +0000 Subject: [PATCH 528/640] This patch got lost in the devel -> F12 F13 -> devel transition phase - add ConsoleKit patch for ConsoleKit 0.4.1 --- ck-runseat.patch | 295 +++++++++++++++++++++++++++++++++++++++++++++++ udev.spec | 12 +- 2 files changed, 303 insertions(+), 4 deletions(-) create mode 100644 ck-runseat.patch diff --git a/ck-runseat.patch b/ck-runseat.patch new file mode 100644 index 0000000..8804bc7 --- /dev/null +++ b/ck-runseat.patch @@ -0,0 +1,295 @@ +--- udev-145/extras/udev-acl/Makefile.am.runseat 2009-06-16 19:47:37.000000000 -0400 ++++ udev-145/extras/udev-acl/Makefile.am 2009-09-25 20:21:41.959583372 -0400 +@@ -15,5 +15,5 @@ udev_acl_LDADD = \ + dist_udevrules_DATA = 70-acl.rules + + install-exec-hook: +- mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d +- ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck ++ mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d ++ ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck +--- udev-145/extras/udev-acl/udev-acl.c.runseat 2009-06-16 12:10:58.000000000 -0400 ++++ udev-145/extras/udev-acl/udev-acl.c 2009-09-25 20:57:32.502573825 -0400 +@@ -1,4 +1,5 @@ +-/* ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ++ * + * Copyright (C) 2009 Kay Sievers + * + * This program is free software; you can redistribute it and/or +@@ -29,6 +30,13 @@ + + static int debug; + ++enum{ ++ ACTION_NONE = 0, ++ ACTION_REMOVE, ++ ACTION_ADD, ++ ACTION_CHANGE ++}; ++ + static int set_facl(const char* filename, uid_t uid, int add) + { + int get; +@@ -152,44 +160,123 @@ static GSList *uids_with_local_active_se + } + + /* ConsoleKit calls us with special variables */ +-static int consolekit_called(const char *action, uid_t *uid, const char **own_session, int *add) ++static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, const char **remove_session_id, int *action) + { +- int a; +- uid_t u; ++ int a = ACTION_NONE; ++ uid_t u = 0; ++ uid_t u2 = 0; + const char *s; +- const char *session; +- +- if (action == NULL || strcmp(action, "session_active_changed") != 0) +- return -1; ++ const char *s2; ++ const char *old_session = NULL; + +- s = getenv("CK_SESSION_IS_LOCAL"); +- if (s == NULL) ++ if (ck_action == NULL || strcmp(ck_action, "seat_active_session_changed") != 0) + return -1; +- if (strcmp(s, "true") != 0) +- return 0; + +- s = getenv("CK_SESSION_IS_ACTIVE"); +- if (s == NULL) ++ /* We can have one of: remove, add, change, no-change */ ++ s = getenv("CK_SEAT_OLD_SESSION_ID"); ++ s2 = getenv("CK_SEAT_SESSION_ID"); ++ if (s == NULL && s2 == NULL) { + return -1; +- if (strcmp(s, "true") == 0) +- a = 1; +- else +- a = 0; ++ } else if (s2 == NULL) { ++ a = ACTION_REMOVE; ++ } else if (s == NULL) { ++ a = ACTION_ADD; ++ } else { ++ a = ACTION_CHANGE; ++ } + +- session = getenv("CK_SESSION_ID"); +- if (session == NULL) +- return -1; ++ switch (a) { ++ case ACTION_ADD: ++ s = getenv("CK_SEAT_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u = strtoul(s, NULL, 10); ++ if (u == 0) ++ return 0; ++ ++ s = getenv("CK_SEAT_SESSION_IS_LOCAL"); ++ if (s == NULL) ++ return -1; ++ if (strcmp(s, "true") != 0) ++ return 0; ++ ++ break; ++ case ACTION_REMOVE: ++ s = getenv("CK_SEAT_OLD_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u = strtoul(s, NULL, 10); ++ if (u == 0) ++ return 0; ++ ++ s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL"); ++ if (s == NULL) ++ return -1; ++ if (strcmp(s, "true") != 0) ++ return 0; ++ ++ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); ++ if (old_session == NULL) ++ return -1; ++ ++ break; ++ case ACTION_CHANGE: ++ s = getenv("CK_SEAT_OLD_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u = strtoul(s, NULL, 10); ++ if (u == 0) ++ return 0; ++ s = getenv("CK_SEAT_SESSION_USER_UID"); ++ if (s == NULL) ++ return -1; ++ u2 = strtoul(s, NULL, 10); ++ if (u2 == 0) ++ return 0; ++ ++ s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL"); ++ s2 = getenv("CK_SEAT_SESSION_IS_LOCAL"); ++ if (s == NULL || s2 == NULL) ++ return -1; ++ /* don't process non-local session changes */ ++ if (strcmp(s, "true") != 0 && strcmp(s2, "true") != 0) ++ return 0; ++ ++ if (strcmp(s, "true") == 0 && strcmp(s, "true") == 0) { ++ /* process the change */ ++ if (u == u2) { ++ /* special case: we noop if we are ++ * changing between local sessions for ++ * the same uid */ ++ a = ACTION_NONE; ++ } ++ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); ++ if (old_session == NULL) ++ return -1; ++ } else if (strcmp(s, "true") == 0) { ++ /* only process the removal */ ++ a = ACTION_REMOVE; ++ old_session = getenv("CK_SEAT_OLD_SESSION_ID"); ++ if (old_session == NULL) ++ return -1; ++ } else if (strcmp(s2, "true") == 0) { ++ /* only process the addition */ ++ a = ACTION_ADD; ++ u = u2; ++ } + +- s = getenv("CK_SESSION_USER_UID"); +- if (s == NULL) +- return -1; +- u = strtoul(s, NULL, 10); +- if (u == 0) +- return 0; ++ break; ++ case ACTION_NONE: ++ break; ++ default: ++ g_assert_not_reached (); ++ break; ++ } + +- *own_session = session; ++ *remove_session_id = old_session; + *uid = u; +- *add = a; ++ *uid2 = u2; ++ *action = a; + return 0; + } + +@@ -223,6 +310,21 @@ static void apply_acl_to_devices(uid_t u + udev_unref(udev); + } + ++static void ++remove_uid (uid_t uid, const char *remove_session_id) ++{ ++ /* ++ * Remove ACL for given uid from all matching devices ++ * when there is currently no local active session. ++ */ ++ GSList *list; ++ ++ list = uids_with_local_active_session(remove_session_id); ++ if (!uid_in_list(list, uid)) ++ apply_acl_to_devices(uid, 0); ++ g_slist_free(list); ++} ++ + int main (int argc, char* argv[]) + { + static const struct option options[] = { +@@ -233,10 +335,11 @@ int main (int argc, char* argv[]) + { "help", no_argument, NULL, 'h' }, + {} + }; +- int add = -1; ++ int action = -1; + const char *device = NULL; + uid_t uid = 0; +- const char* own_session = NULL; ++ uid_t uid2 = 0; ++ const char* remove_session_id = NULL; + int rc = 0; + + /* valgrind is more important to us than a slice allocator */ +@@ -252,9 +355,9 @@ int main (int argc, char* argv[]) + switch (option) { + case 'a': + if (strcmp(optarg, "add") == 0 || strcmp(optarg, "change") == 0) +- add = 1; ++ action = ACTION_ADD; + else if (strcmp(optarg, "remove") == 0) +- add = 0; ++ action = ACTION_REMOVE; + else + goto out; + break; +@@ -274,10 +377,10 @@ int main (int argc, char* argv[]) + } + } + +- if (add < 0 && device == NULL && uid == 0) +- consolekit_called(argv[optind], &uid, &own_session, &add); ++ if (action < 0 && device == NULL && uid == 0) ++ consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action); + +- if (add < 0) { ++ if (action < 0) { + fprintf(stderr, "missing action\n\n"); + rc = 2; + goto out; +@@ -290,20 +393,24 @@ int main (int argc, char* argv[]) + } + + if (uid != 0) { +- if (add) { ++ switch (action) { ++ case ACTION_ADD: + /* Add ACL for given uid to all matching devices. */ + apply_acl_to_devices(uid, 1); +- } else { +- /* +- * Remove ACL for given uid from all matching devices +- * when there is currently no local active session. +- */ +- GSList *list; +- +- list = uids_with_local_active_session(own_session); +- if (!uid_in_list(list, uid)) +- apply_acl_to_devices(uid, 0); +- g_slist_free(list); ++ break; ++ case ACTION_REMOVE: ++ remove_uid(uid, remove_session_id); ++ break; ++ case ACTION_CHANGE: ++ remove_uid(uid, remove_session_id); ++ apply_acl_to_devices(uid2, 1); ++ break; ++ case ACTION_NONE: ++ goto out; ++ break; ++ default: ++ g_assert_not_reached(); ++ break; + } + } else if (device != NULL) { + /* +@@ -321,8 +428,8 @@ int main (int argc, char* argv[]) + uid_t u; + + u = GPOINTER_TO_UINT(l->data); +- if (add || !uid_in_list(list, u)) +- set_facl(device, u, add); ++ if (action == ACTION_ADD || !uid_in_list(list, u)) ++ set_facl(device, u, action == ACTION_ADD); + } + g_slist_free(list); + } else { diff --git a/udev.spec b/udev.spec index 598b81d..69e000c 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,7 +19,7 @@ Patch2: 0002-udevd-add-timestamp-to-debug-output.patch Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch Patch4: 0004-fix-single-session-CD-detection.patch Patch5: 0005-fix-previous-commit-for-CD-detection.patch - +Patch6: ck-runseat.patch Source1: start_udev Source3: udev-post.init @@ -106,6 +106,7 @@ glib-based applications using libudev functionality. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 -b .ck041 %build # get rid of rpath @@ -323,7 +324,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/v4l_id %attr(0755,root,root) %{udev_scriptdir}/findkeyboards %attr(0644,root,root) %{udev_scriptdir}/keymaps/* -%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-session.d/udev-acl.ck +%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %files -n libudev @@ -357,9 +358,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog -* Tue Oct 13 2009 Harald Hoyer 145-10 +* Tue Oct 13 2009 Harald Hoyer 145-11 - recognize a devtmpfs on /dev (bug #528488) +* Tue Sep 29 2009 Harald Hoyer 145-10 +- add ConsoleKit patch for ConsoleKit 0.4.1 + * Fri Sep 25 2009 harald@redhat.com 145-9 - add patches to fix cdrom_id - add patch to fix the inotify bug (bug #524752) From f8770c42afbdc034292e3f8bfc188651c4429190 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 5 Nov 2009 00:19:42 +0000 Subject: [PATCH 529/640] - Update hid2hci from udev master, fixes problems with Dell Bluetooth dongles not working (#532628) --- udev-145-hid2hci-backport.patch | 638 ++++++++++++++++++++++++++++++++ udev.spec | 12 +- 2 files changed, 649 insertions(+), 1 deletion(-) create mode 100644 udev-145-hid2hci-backport.patch diff --git a/udev-145-hid2hci-backport.patch b/udev-145-hid2hci-backport.patch new file mode 100644 index 0000000..c24df50 --- /dev/null +++ b/udev-145-hid2hci-backport.patch @@ -0,0 +1,638 @@ +diff -upr udev-145.old/extras/hid2hci/70-hid2hci.rules udev-145/extras/hid2hci/70-hid2hci.rules +--- udev-145.old/extras/hid2hci/70-hid2hci.rules 2009-06-28 01:07:53.000000000 +0100 ++++ udev-145/extras/hid2hci/70-hid2hci.rules 2009-11-05 00:00:29.000000000 +0000 +@@ -1,25 +1,28 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add", GOTO="hid2hci_end" ++ACTION!="add|change", GOTO="hid2hci_end" + SUBSYSTEM!="usb", GOTO="hid2hci_end" + +-# Variety of Dell Bluetooth devices - it looks like a bit of an odd rule, +-# because it is matching on a mouse device that is self powered, but that +-# is where a HID report needs to be sent to switch modes. +-# ++# Variety of Dell Bluetooth devices - match on a mouse device that is ++# self powered and where a HID report needs to be sent to switch modes + # Known supported devices: 413c:8154, 413c:8158, 413c:8162 +-ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ +- RUN+="hid2hci --method dell -v $attr{idVendor} -p $attr{idProduct} --mode hci" ++ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", \ ++ ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ ++ RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" ++ ++# Logitech devices (hidraw) ++KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ ++ RUN+="hid2hci --method=logitech-hid --devpath=%p" + + ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" + +-# Logitech devices +-ATTR{idVendor}=="046d", ATTR{idProduct}=="c70[345abce]", RUN+="hid2hci --method logitech -v $attr{idVendor} -p $attr{idProduct} --mode hci" +-ATTR{idVendor}=="046d", ATTR{idProduct}=="c71[34bc]", RUN+="hid2hci --method logitech -v $attr{idVendor} -p $attr{idProduct} --mode hci" +- +-# CSR devices (in HID mode) +-ATTR{idVendor}=="0a12", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" +-ATTR{idVendor}=="0458", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" +-ATTR{idVendor}=="05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" ++# When a Dell device recovers from S3, the mouse child needs to be repoked ++# Unfortunately the only event seen is the BT device disappearing, so the mouse ++# device needs to be chased down on the USB bus. ++ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \ ++ ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" ++ ++# CSR devices ++ATTR{idVendor}=="0a12|0458|05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method=csr --devpath=%p" + + LABEL="hid2hci_end" +diff -upr udev-145.old/extras/hid2hci/hid2hci.c udev-145/extras/hid2hci/hid2hci.c +--- udev-145.old/extras/hid2hci/hid2hci.c 2009-06-13 01:55:10.000000000 +0100 ++++ udev-145/extras/hid2hci/hid2hci.c 2009-11-05 00:00:24.000000000 +0000 +@@ -1,31 +1,26 @@ + /* ++ * hid2hci : switch the radio on devices that support ++ * it from HID to HCI and back + * +- * hid2hci : a tool for switching the radio on devices that support +- * it from HID to HCI and back ++ * Copyright (C) 2003-2009 Marcel Holtmann ++ * Copyright (C) 2008-2009 Mario Limonciello ++ * Copyright (C) 2009 Kay Sievers + * +- * Copyright (C) 2003-2009 Marcel Holtmann +- * Copyright (C) 2008-2009 Mario Limonciello ++ * 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; either version 2 of the License, or ++ * (at your option) any later version. + * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. + * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +-#ifdef HAVE_CONFIG_H +-#include +-#endif +- + #include + #include + #include +@@ -33,79 +28,24 @@ + #include + #include + #include +- ++#include + #include + +-#ifdef NEED_USB_GET_BUSSES +-static inline struct usb_bus *usb_get_busses(void) +-{ +- return usb_busses; +-} +-#endif +- +-#ifndef USB_DIR_OUT +-#define USB_DIR_OUT 0x00 +-#endif +- +-static char devpath[PATH_MAX + 1] = "/dev"; +- +-struct hiddev_devinfo { +- unsigned int bustype; +- unsigned int busnum; +- unsigned int devnum; +- unsigned int ifnum; +- short vendor; +- short product; +- short version; +- unsigned num_applications; +-}; +- +-struct hiddev_report_info { +- unsigned report_type; +- unsigned report_id; +- unsigned num_fields; +-}; +- +-typedef __signed__ int __s32; ++#include "libudev.h" ++#include "libudev-private.h" + +-struct hiddev_usage_ref { +- unsigned report_type; +- unsigned report_id; +- unsigned field_index; +- unsigned usage_index; +- unsigned usage_code; +- __s32 value; ++enum mode { ++ HCI = 0, ++ HID = 1, + }; + +-#define HIDIOCGDEVINFO _IOR('H', 0x03, struct hiddev_devinfo) +-#define HIDIOCINITREPORT _IO('H', 0x05) +-#define HIDIOCSREPORT _IOW('H', 0x08, struct hiddev_report_info) +-#define HIDIOCSUSAGE _IOW('H', 0x0C, struct hiddev_usage_ref) +- +-#define HID_REPORT_TYPE_OUTPUT 2 +- +-#define HCI 0 +-#define HID 1 +- +-struct device_info { +- struct usb_device *dev; +- int mode; +- uint16_t vendor; +- uint16_t product; +-}; +- +-static int switch_csr(struct device_info *devinfo) ++static int usb_switch_csr(struct usb_dev_handle *dev, enum mode mode) + { +- struct usb_dev_handle *udev; + int err; + +- udev = usb_open(devinfo->dev); +- if (!udev) +- return -errno; +- +- err = usb_control_msg(udev, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, +- 0, devinfo->mode, 0, NULL, 0, 10000); +- ++ err = usb_control_msg(dev, ++ USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, ++ 0, mode, 0, NULL, 0, 10000); + if (err == 0) { + err = -1; + errno = EALREADY; +@@ -113,13 +53,10 @@ static int switch_csr(struct device_info + if (errno == ETIMEDOUT) + err = 0; + } +- +- usb_close(udev); +- + return err; + } + +-static int send_report(int fd, const char *buf, size_t size) ++static int hid_logitech_send_report(int fd, const char *buf, size_t size) + { + struct hiddev_report_info rinfo; + struct hiddev_usage_ref uref; +@@ -148,72 +85,42 @@ static int send_report(int fd, const cha + return err; + } + +-static int switch_logitech(struct device_info *devinfo) ++static int hid_switch_logitech(const char *filename) + { +- char devname[PATH_MAX + 1]; +- int i, fd, err = -1; +- +- for (i = 0; i < 16; i++) { +- struct hiddev_devinfo dinfo; +- char rep1[] = { 0xff, 0x80, 0x80, 0x01, 0x00, 0x00 }; +- char rep2[] = { 0xff, 0x80, 0x00, 0x00, 0x30, 0x00 }; +- char rep3[] = { 0xff, 0x81, 0x80, 0x00, 0x00, 0x00 }; +- +- sprintf(devname, "%s/hiddev%d", devpath, i); +- fd = open(devname, O_RDWR); +- if (fd < 0) { +- sprintf(devname, "%s/usb/hiddev%d", devpath, i); +- fd = open(devname, O_RDWR); +- if (fd < 0) { +- sprintf(devname, "%s/usb/hid/hiddev%d", devpath, i); +- fd = open(devname, O_RDWR); +- if (fd < 0) +- continue; +- } +- } +- +- memset(&dinfo, 0, sizeof(dinfo)); +- err = ioctl(fd, HIDIOCGDEVINFO, &dinfo); +- if (err < 0 || (int) dinfo.busnum != atoi(devinfo->dev->bus->dirname) || +- (int) dinfo.devnum != atoi(devinfo->dev->filename)) { +- close(fd); +- continue; +- } +- +- err = ioctl(fd, HIDIOCINITREPORT, 0); +- if (err < 0) { +- close(fd); +- break; +- } +- +- err = send_report(fd, rep1, sizeof(rep1)); +- if (err < 0) { +- close(fd); +- break; +- } +- +- err = send_report(fd, rep2, sizeof(rep2)); +- if (err < 0) { +- close(fd); +- break; +- } +- +- err = send_report(fd, rep3, sizeof(rep3)); +- close(fd); +- break; +- } +- ++ char rep1[] = { 0xff, 0x80, 0x80, 0x01, 0x00, 0x00 }; ++ char rep2[] = { 0xff, 0x80, 0x00, 0x00, 0x30, 0x00 }; ++ char rep3[] = { 0xff, 0x81, 0x80, 0x00, 0x00, 0x00 }; ++ int fd; ++ int err = -1; ++ ++ fd = open(filename, O_RDWR); ++ if (fd < 0) ++ return err; ++ ++ err = ioctl(fd, HIDIOCINITREPORT, 0); ++ if (err < 0) ++ goto out; ++ ++ err = hid_logitech_send_report(fd, rep1, sizeof(rep1)); ++ if (err < 0) ++ goto out; ++ ++ err = hid_logitech_send_report(fd, rep2, sizeof(rep2)); ++ if (err < 0) ++ goto out; ++ ++ err = hid_logitech_send_report(fd, rep3, sizeof(rep3)); ++out: ++ close(fd); + return err; + } + +-static int switch_dell(struct device_info *devinfo) ++static int usb_switch_dell(struct usb_dev_handle *dev, enum mode mode) + { + char report[] = { 0x7f, 0x00, 0x00, 0x00 }; +- +- struct usb_dev_handle *handle; + int err; + +- switch (devinfo->mode) { ++ switch (mode) { + case HCI: + report[1] = 0x13; + break; +@@ -222,22 +129,16 @@ static int switch_dell(struct device_inf + break; + } + +- handle = usb_open(devinfo->dev); +- if (!handle) +- return -EIO; +- + /* Don't need to check return, as might not be in use */ +- usb_detach_kernel_driver_np(handle, 0); ++ usb_detach_kernel_driver_np(dev, 0); + +- if (usb_claim_interface(handle, 0) < 0) { +- usb_close(handle); ++ if (usb_claim_interface(dev, 0) < 0) + return -EIO; +- } + +- err = usb_control_msg(handle, +- USB_ENDPOINT_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, ++ err = usb_control_msg(dev, ++ USB_ENDPOINT_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, + USB_REQ_SET_CONFIGURATION, 0x7f | (0x03 << 8), 0, +- report, sizeof(report), 5000); ++ report, sizeof(report), 5000); + + if (err == 0) { + err = -1; +@@ -246,131 +147,203 @@ static int switch_dell(struct device_inf + if (errno == ETIMEDOUT) + err = 0; + } +- +- usb_close(handle); +- + return err; + } + +-static int find_device(struct device_info* devinfo) ++/* ++ * The braindead libusb needs to scan and open all devices, just to ++ * to find the device we already have. This needs to be fixed in libusb ++ * or it will be ripped out and we carry our own code. ++ */ ++static struct usb_device *usb_device_open_from_udev(struct udev_device *usb_dev) + { + struct usb_bus *bus; +- struct usb_device *dev; ++ const char *str; ++ int busnum; ++ int devnum; ++ ++ str = udev_device_get_sysattr_value(usb_dev, "busnum"); ++ if (str == NULL) ++ return NULL; ++ busnum = strtol(str, NULL, 0); ++ ++ str = udev_device_get_sysattr_value(usb_dev, "devnum"); ++ if (str == NULL) ++ return NULL; ++ devnum = strtol(str, NULL, 0); + ++ usb_init(); + usb_find_busses(); + usb_find_devices(); + +- for (bus = usb_get_busses(); bus; bus = bus->next) ++ for (bus = usb_get_busses(); bus; bus = bus->next) { ++ struct usb_device *dev; ++ ++ if (strtol(bus->dirname, NULL, 10) != busnum) ++ continue; ++ + for (dev = bus->devices; dev; dev = dev->next) { +- if (dev->descriptor.idVendor == devinfo->vendor && +- dev->descriptor.idProduct == devinfo->product) { +- devinfo->dev=dev; +- return 1; +- } ++ if (dev->devnum == devnum) ++ return dev; + } +- return 0; ++ } ++ ++ return NULL; ++} ++ ++static struct usb_dev_handle *find_device(struct udev_device *udev_dev) ++{ ++ struct usb_device *dev; ++ ++ dev = usb_device_open_from_udev(udev_dev); ++ if (dev == NULL) ++ return NULL; ++ return usb_open(dev); + } + +-static void usage(char* error) ++static void usage(const char *error) + { + if (error) + fprintf(stderr,"\n%s\n", error); + else + printf("hid2hci - Bluetooth HID to HCI mode switching utility\n\n"); + +- printf("Usage:\n" +- "\thid2hci [options]\n" +- "\n"); +- +- printf("Options:\n" +- "\t-h, --help Display help\n" +- "\t-q, --quiet Don't display any messages\n" +- "\t-r, --mode= Mode to switch to [hid, hci]\n" +- "\t-v, --vendor= Vendor ID to act upon\n" +- "\t-p, --product= Product ID to act upon\n" +- "\t-m, --method= Method to use to switch [csr, logitech, dell]\n" +- "\n"); +- if (error) +- exit(1); ++ printf("Usage: hid2hci [options]\n" ++ " --mode= mode to switch to [hid|hci] (default hci)\n" ++ " --devpath= sys device path\n" ++ " --method= method to use to switch [csr|logitech-hid|dell]\n" ++ " --help\n\n"); + } + +-static const struct option main_options[] = { +- { "help", no_argument, 0, 'h' }, +- { "quiet", no_argument, 0, 'q' }, +- { "mode", required_argument, 0, 'r' }, +- { "vendor", required_argument, 0, 'v' }, +- { "product", required_argument, 0, 'p' }, +- { "method", required_argument, 0, 'm' }, +- { 0, 0, 0, 0 } +-}; +- + int main(int argc, char *argv[]) + { +- struct device_info dev = { NULL, HCI, 0, 0 }; +- int opt, quiet = 0; +- int (*method)(struct device_info *dev) = NULL; +- +- while ((opt = getopt_long(argc, argv, "+r:v:p:m:qh", main_options, NULL)) != -1) { +- switch (opt) { +- case 'r': +- if (optarg && !strcmp(optarg, "hid")) +- dev.mode = HID; +- else if (optarg && !strcmp(optarg, "hci")) +- dev.mode = HCI; +- else +- usage("ERROR: Undefined radio mode\n"); ++ static const struct option options[] = { ++ { "help", no_argument, NULL, 'h' }, ++ { "mode", required_argument, NULL, 'm' }, ++ { "devpath", required_argument, NULL, 'p' }, ++ { "method", required_argument, NULL, 'M' }, ++ { } ++ }; ++ enum method { ++ METHOD_UNDEF, ++ METHOD_CSR, ++ METHOD_LOGITECH_HID, ++ METHOD_DELL, ++ } method = METHOD_UNDEF; ++ struct udev *udev; ++ struct udev_device *udev_dev = NULL; ++ char syspath[UTIL_PATH_SIZE]; ++ int (*usb_switch)(struct usb_dev_handle *dev, enum mode mode) = NULL; ++ enum mode mode = HCI; ++ const char *devpath = NULL; ++ int err = -1; ++ int rc = 1; ++ ++ for (;;) { ++ int option; ++ ++ option = getopt_long(argc, argv, "m:p:M:qh", options, NULL); ++ if (option == -1) + break; +- case 'v': +- sscanf(optarg, "%4hx", &dev.vendor); ++ ++ switch (option) { ++ case 'm': ++ if (!strcmp(optarg, "hid")) { ++ mode = HID; ++ } else if (!strcmp(optarg, "hci")) { ++ mode = HCI; ++ } else { ++ usage("error: undefined radio mode\n"); ++ exit(1); ++ } + break; + case 'p': +- sscanf(optarg, "%4hx", &dev.product); +- break; +- case 'm': +- if (optarg && !strcmp(optarg, "csr")) +- method = switch_csr; +- else if (optarg && !strcmp(optarg, "logitech")) +- method = switch_logitech; +- else if (optarg && !strcmp(optarg, "dell")) +- method = switch_dell; +- else +- usage("ERROR: Undefined switching method\n"); ++ devpath = optarg; + break; +- case 'q': +- quiet = 1; ++ case 'M': ++ if (!strcmp(optarg, "csr")) { ++ method = METHOD_CSR; ++ usb_switch = usb_switch_csr; ++ } else if (!strcmp(optarg, "logitech-hid")) { ++ method = METHOD_LOGITECH_HID; ++ } else if (!strcmp(optarg, "dell")) { ++ method = METHOD_DELL; ++ usb_switch = usb_switch_dell; ++ } else { ++ usage("error: undefined switching method\n"); ++ exit(1); ++ } + break; + case 'h': + usage(NULL); + default: +- exit(0); ++ exit(1); + } + } + +- if (!quiet && (!dev.vendor || !dev.product || !method)) +- usage("ERROR: Vendor ID, Product ID, and Switching Method must all be defined.\n"); ++ if (!devpath || method == METHOD_UNDEF) { ++ usage("error: --devpath= and --method= must be defined\n"); ++ exit(1); ++ } + +- argc -= optind; +- argv += optind; +- optind = 0; ++ udev = udev_new(); ++ if (udev == NULL) ++ goto exit; ++ ++ util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); ++ udev_dev = udev_device_new_from_syspath(udev, syspath); ++ if (udev_dev == NULL) { ++ fprintf(stderr, "error: could not find '%s'\n", devpath); ++ goto exit; ++ } + +- usb_init(); ++ switch (method) { ++ case METHOD_CSR: ++ case METHOD_DELL: { ++ struct udev_device *dev; ++ struct usb_dev_handle *handle; ++ const char *type; ++ ++ /* get the parent usb_device if needed */ ++ dev = udev_dev; ++ type = udev_device_get_devtype(dev); ++ if (type == NULL || strcmp(type, "usb_device") != 0) { ++ dev = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_device"); ++ if (dev == NULL) { ++ fprintf(stderr, "error: could not find usb_device for '%s'\n", devpath); ++ goto exit; ++ } ++ } + +- if (!find_device(&dev)) { +- if (!quiet) +- fprintf(stderr, "Device %04x:%04x not found on USB bus.\n", +- dev.vendor, dev.product); +- exit(1); ++ handle = find_device(dev); ++ if (handle == NULL) { ++ fprintf(stderr, "error: unable to handle '%s'\n", ++ udev_device_get_syspath(dev)); ++ goto exit; ++ } ++ err = usb_switch(handle, mode); ++ break; + } ++ case METHOD_LOGITECH_HID: { ++ const char *device; + +- if (!quiet) +- printf("Attempting to switch device %04x:%04x to %s mode ", +- dev.vendor, dev.product, dev.mode ? "HID" : "HCI"); +- fflush(stdout); +- +- if (method(&dev) < 0 && !quiet) +- printf("failed (%s)\n", strerror(errno)); +- else if (!quiet) +- printf("was successful\n"); ++ device = udev_device_get_devnode(udev_dev); ++ if (device == NULL) { ++ fprintf(stderr, "error: could not find hiddev device node\n"); ++ goto exit; ++ } ++ err = hid_switch_logitech(device); ++ break; ++ } ++ default: ++ break; ++ } + +- return errno; ++ if (err < 0) ++ fprintf(stderr, "error: switching device '%s' failed.\n", ++ udev_device_get_syspath(udev_dev)); ++exit: ++ udev_device_unref(udev_dev); ++ udev_unref(udev); ++ return rc; + } +--- udev-145.old/extras/hid2hci/Makefile.am 2009-06-16 23:49:02.000000000 +0100 ++++ udev-145/extras/hid2hci/Makefile.am 2009-11-05 00:10:10.000000000 +0000 +@@ -10,4 +10,4 @@ hid2hci_SOURCES = \ + hid2hci.c + + hid2hci_LDADD = \ +- @LIBUSB_LIBS@ ++ @LIBUSB_LIBS@ $(top_builddir)/libudev/libudev.la +--- udev-145.old/libudev/exported_symbols 2009-05-21 21:16:39.000000000 +0100 ++++ udev-145/libudev/exported_symbols 2009-11-05 00:15:08.000000000 +0000 +@@ -71,3 +71,4 @@ udev_queue_get_seqnum_is_finished + udev_queue_get_seqnum_sequence_is_finished + udev_queue_get_queued_list_entry + udev_queue_get_failed_list_entry ++util_strscpyl diff --git a/udev.spec b/udev.spec index 69e000c..02504c6 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,6 +20,9 @@ Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch Patch4: 0004-fix-single-session-CD-detection.patch Patch5: 0005-fix-previous-commit-for-CD-detection.patch Patch6: ck-runseat.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=532628 +Patch7: udev-145-hid2hci-backport.patch +BuildRequires: libtool automake autoconf Source1: start_udev Source3: udev-post.init @@ -107,6 +110,9 @@ glib-based applications using libudev functionality. %patch4 -p1 %patch5 -p1 %patch6 -p1 -b .ck041 +%patch7 -p1 -b .hid2hci +autoreconf -i +automake %build # get rid of rpath @@ -358,6 +364,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Nov 05 2009 Bastien Nocera 145-12 +- Update hid2hci from udev master, fixes problems with Dell + Bluetooth dongles not working (#532628) + * Tue Oct 13 2009 Harald Hoyer 145-11 - recognize a devtmpfs on /dev (bug #528488) From a25fcafdacb38b4c4e93a3da53a533b741145af7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Nov 2009 13:09:07 +0000 Subject: [PATCH 530/640] - obsolete DeviceKit and DeviceKit-devel (#532961) - add NEWS file to the doc section - automatically turn on hotplugged CPUs (#523127) - fixed udev-post exit codes (#523976) - own directory /lib/udev/keymaps (#521801) - no more floppy modaliases (#514329) - added two more modems to modem-modeswitch.rules (#515349) --- udev-141-cpu-online.patch | 8 ++++++++ udev-145-modem-modeswitch.patch | 11 +++++++++++ udev-post.init | 6 ++++-- udev.spec | 32 ++++++++++++++++++++------------ 4 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 udev-141-cpu-online.patch create mode 100644 udev-145-modem-modeswitch.patch diff --git a/udev-141-cpu-online.patch b/udev-141-cpu-online.patch new file mode 100644 index 0000000..909e6e5 --- /dev/null +++ b/udev-141-cpu-online.patch @@ -0,0 +1,8 @@ +--- udev-141/rules/redhat/40-redhat.rules 2008-10-16 11:03:43.000000000 -0500 ++++ udev-141.cpu/rules/redhat/40-redhat.rules 2009-05-20 11:23:12.000000000 -0500 +@@ -25,3 +25,5 @@ + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" + + KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ ++ACTION=="add", KERNEL=="cpu[0-9]*", RUN+="/bin/bash -c 'echo 1 > /sys/devices/system/cpu/%k/online'" diff --git a/udev-145-modem-modeswitch.patch b/udev-145-modem-modeswitch.patch new file mode 100644 index 0000000..d6b8238 --- /dev/null +++ b/udev-145-modem-modeswitch.patch @@ -0,0 +1,11 @@ +diff -up udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.old udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules +--- udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.old 2009-11-05 14:06:01.000000000 +0100 ++++ udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules 2009-11-05 14:06:23.000000000 +0100 +@@ -34,5 +34,7 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7501", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ++ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ++ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + + LABEL="option_zerocd_end" diff --git a/udev-post.init b/udev-post.init index 51bc184..1676e78 100644 --- a/udev-post.init +++ b/udev-post.init @@ -23,6 +23,7 @@ # See how we were called. case "$1" in start|reload) + [ -w /var/lock/subsys/udev-post ] || exit 4 STRING=$"Retrigger failed udev events" echo -n $STRING /sbin/udevadm trigger --retry-failed @@ -53,6 +54,7 @@ case "$1" in exit 0 ;; stop) + [ -w /var/lock/subsys/udev-post ] || exit 4 STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" @@ -85,10 +87,10 @@ case "$1" in exit 0 ;; status) - exit 0 + exit 3 ;; *) echo $"Usage: $0 {start|stop|reload}" - exit 1 + exit 3 esac exit 0 diff --git a/udev.spec b/udev.spec index 02504c6..56d89a6 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -20,8 +20,10 @@ Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch Patch4: 0004-fix-single-session-CD-detection.patch Patch5: 0005-fix-previous-commit-for-CD-detection.patch Patch6: ck-runseat.patch +Patch7: udev-141-cpu-online.patch # https://bugzilla.redhat.com/show_bug.cgi?id=532628 -Patch7: udev-145-hid2hci-backport.patch +Patch8: udev-145-hid2hci-backport.patch +Patch9: udev-145-modem-modeswitch.patch BuildRequires: libtool automake autoconf Source1: start_udev @@ -52,6 +54,8 @@ Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 +Obsoletes: DeviceKit < 004 +Obsoletes: DeviceKit-devel < 004 %description The udev package contains an implementation of devfs in @@ -110,7 +114,9 @@ glib-based applications using libudev functionality. %patch4 -p1 %patch5 -p1 %patch6 -p1 -b .ck041 -%patch7 -p1 -b .hid2hci +%patch7 -p1 +%patch8 -p1 -b .hid2hci +%patch9 -p1 autoreconf -i automake @@ -180,12 +186,6 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d -cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf < 145-13 +- obsolete DeviceKit and DeviceKit-devel (#532961) +- add NEWS file to the doc section +- automatically turn on hotplugged CPUs (#523127) +- fixed udev-post exit codes (#523976) +- own directory /lib/udev/keymaps (#521801) +- no more floppy modaliases (#514329) +- added two more modems to modem-modeswitch.rules (#515349) + * Thu Nov 05 2009 Bastien Nocera 145-12 - Update hid2hci from udev master, fixes problems with Dell Bluetooth dongles not working (#532628) From 78de653bd982d3f5b86d5621b56064d2c6db8036 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 11 Nov 2009 13:10:12 +0000 Subject: [PATCH 531/640] - Fix blu-ray and hd-dvd drives not getting detected properly when a medium is absent - Fix upgrade from Fedora 11 with bluez installed (#533925) --- udev.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 56d89a6..1e28cd8 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -23,9 +23,11 @@ Patch6: ck-runseat.patch Patch7: udev-141-cpu-online.patch # https://bugzilla.redhat.com/show_bug.cgi?id=532628 Patch8: udev-145-hid2hci-backport.patch -Patch9: udev-145-modem-modeswitch.patch BuildRequires: libtool automake autoconf +Patch9: udev-145-modem-modeswitch.patch +Patch10; 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch + Source1: start_udev Source3: udev-post.init Source4: fw_unit_symlinks.sh @@ -56,6 +58,8 @@ Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 Obsoletes: DeviceKit < 004 Obsoletes: DeviceKit-devel < 004 +# hid2hci moved to udev +Conflicts: bluez < 4.47 %description The udev package contains an implementation of devfs in @@ -117,6 +121,7 @@ glib-based applications using libudev functionality. %patch7 -p1 %patch8 -p1 -b .hid2hci %patch9 -p1 +%patch10 -p1 autoreconf -i automake @@ -363,6 +368,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Nov 11 2009 Bastien Nocera 145-14 +- Fix blu-ray and hd-dvd drives not getting detected properly + when a medium is absent +- Fix upgrade from Fedora 11 with bluez installed (#533925) + * Thu Nov 05 2009 Harald Hoyer 145-13 - obsolete DeviceKit and DeviceKit-devel (#532961) - add NEWS file to the doc section From 14f60d8eeec54ace061c8d06116daee10c686037 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 11 Nov 2009 13:11:19 +0000 Subject: [PATCH 532/640] - Fix blu-ray and hd-dvd drives not getting detected properly when a medium is absent - Fix upgrade from Fedora 11 with bluez installed (#533925) --- ...heck-profiles-even-if-there-is-no-me.patch | 38 +++++++++++++++++++ udev.spec | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch diff --git a/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch b/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch new file mode 100644 index 0000000..dad08af --- /dev/null +++ b/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch @@ -0,0 +1,38 @@ +From 7505831b7ee7b04d84424d2ed306a76abd32871c Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Tue, 10 Nov 2009 12:32:38 -0500 +Subject: [PATCH] cdrom_id: Still check profiles even if there is no media + +Even when there is no medium in the drive, we should still check the +profiles supported by the drive. Otherwise we fail to detect things +like Blu-ray drives. See + + https://bugzilla.gnome.org/show_bug.cgi?id=600273 + +for more information. + +Signed-off-by: David Zeuthen +--- + extras/cdrom_id/cdrom_id.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 6ea763b..2380b15 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -583,9 +583,9 @@ int main(int argc, char *argv[]) + goto exit; + } + +- /* check for media */ +- if (cd_media_compat(udev, fd) < 0) +- goto print; ++ /* check for media - don't bail if there's no media as we still need to ++ * to read profiles */ ++ cd_media_compat(udev, fd); + + /* check if drive talks MMC */ + if (cd_inquiry(udev, fd) < 0) +-- +1.6.5.2 + diff --git a/udev.spec b/udev.spec index 1e28cd8..88c5e09 100644 --- a/udev.spec +++ b/udev.spec @@ -26,7 +26,7 @@ Patch8: udev-145-hid2hci-backport.patch BuildRequires: libtool automake autoconf Patch9: udev-145-modem-modeswitch.patch -Patch10; 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch +Patch10: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch Source1: start_udev Source3: udev-post.init From 93b6fcbee77e9a930f0ea44c72261d97b142f884 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 Nov 2009 09:58:24 +0000 Subject: [PATCH 533/640] - version 147 - Fix upgrade from Fedora 11 with bluez installed (#533925) - obsolete DeviceKit and DeviceKit-devel (#532961) - fixed udev-post exit codes (#523976) - own directory /lib/udev/keymaps (#521801) - no more floppy modaliases (#514329) - added one more modems to modem-modeswitch.rules (#515349) - add NEWS file to the doc section - automatically turn on hotplugged CPUs (rhbz#523127) - recognize a devtmpfs on /dev (bug #528488) --- udev.spec | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/udev.spec b/udev.spec index bdc3100..ea3adc4 100644 --- a/udev.spec +++ b/udev.spec @@ -5,15 +5,20 @@ Summary: A userspace implementation of devfs Name: udev Version: 147 -Release: 0.1.gitdf3e07d%{?dist} +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 -Source: udev-147-0.gitdf3e07d.tar.bz2 +Source: udev-147-0.git495d408.tar.bz2 #Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +#Snapshot of +#http://git.kernel.org/?p=linux/hotplug/udev.git;a=snapshot;h=495d408;sf=tgz +Patch1: udev-141-cpu-online.patch +Patch2: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch +Patch3: udev-147-modem-modeswitch.patch Source1: start_udev Source3: udev-post.init @@ -43,6 +48,10 @@ Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 +Obsoletes: DeviceKit < 004 +Obsoletes: DeviceKit-devel < 004 +# hid2hci moved to udev +Conflicts: bluez < 4.47 %description The udev package contains an implementation of devfs in @@ -53,6 +62,7 @@ Summary: Dynamic library to access udev device information Group: System Environment/Libraries Obsoletes: libudev0 <= 142 Provides: libudev0 = 143 +License: LGPLv2+ %description -n libudev This package contains the dynamic library libudev, which provides access @@ -63,6 +73,7 @@ Summary: Development files for libudev Group: Development/Libraries Requires: udev = %{version}-%{release} Requires: libudev = %{version}-%{release} +License: LGPLv2+ %description -n libudev-devel This package contains the development files for the library libudev, a @@ -75,6 +86,7 @@ Requires: libudev >= 142 # remove the following lines for libgudev so major 1 Provides: libgudev = 20090518 Obsoletes: libgudev <= 20090517 +License: LGPLv2+ %description -n libgudev1 This package contains the libraries that make it easier to use libudev @@ -86,6 +98,7 @@ Group: Development/Libraries Requires: libudev-devel >= 142 Provides: libgudev-devel = 20090518 Obsoletes: libgudev-devel <= 20090517 +License: LGPLv2+ Requires: libgudev1 = %{version}-%{release} @@ -95,6 +108,9 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build # get rid of rpath @@ -161,12 +177,6 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d -cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf < 147-1 +- version 147 +- Fix upgrade from Fedora 11 with bluez installed (#533925) +- obsolete DeviceKit and DeviceKit-devel (#532961) +- fixed udev-post exit codes (#523976) +- own directory /lib/udev/keymaps (#521801) +- no more floppy modaliases (#514329) +- added one more modems to modem-modeswitch.rules (#515349) +- add NEWS file to the doc section +- automatically turn on hotplugged CPUs (rhbz#523127) +- recognize a devtmpfs on /dev (bug #528488) + * Fri Oct 09 2009 Harald Hoyer 147-0.1.gitdf3e07d - pre 147 - database format changed From c82df992b80b3439e10b165f782746a7ed6ccef4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 Nov 2009 10:11:06 +0000 Subject: [PATCH 534/640] - version 147 - Fix upgrade from Fedora 11 with bluez installed (#533925) - obsolete DeviceKit and DeviceKit-devel (#532961) - fixed udev-post exit codes (#523976) - own directory /lib/udev/keymaps (#521801) - no more floppy modaliases (#514329) - added one more modems to modem-modeswitch.rules (#515349) - add NEWS file to the doc section - automatically turn on hotplugged CPUs (rhbz#523127) - recognize a devtmpfs on /dev (bug #528488) --- .cvsignore | 2 +- ...heck-profiles-even-if-there-is-no-me.patch | 38 +++++++++++++++++++ sources | 2 +- start_udev | 6 ++- udev-141-cpu-online.patch | 8 ++++ udev-147-modem-modeswitch.patch | 10 +++++ udev-post.init | 6 ++- udev.spec | 6 +-- 8 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch create mode 100644 udev-141-cpu-online.patch create mode 100644 udev-147-modem-modeswitch.patch diff --git a/.cvsignore b/.cvsignore index 513dfdb..a2a13aa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-147-0.gitdf3e07d.tar.bz2 +udev-147.tar.bz2 diff --git a/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch b/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch new file mode 100644 index 0000000..dad08af --- /dev/null +++ b/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch @@ -0,0 +1,38 @@ +From 7505831b7ee7b04d84424d2ed306a76abd32871c Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Tue, 10 Nov 2009 12:32:38 -0500 +Subject: [PATCH] cdrom_id: Still check profiles even if there is no media + +Even when there is no medium in the drive, we should still check the +profiles supported by the drive. Otherwise we fail to detect things +like Blu-ray drives. See + + https://bugzilla.gnome.org/show_bug.cgi?id=600273 + +for more information. + +Signed-off-by: David Zeuthen +--- + extras/cdrom_id/cdrom_id.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 6ea763b..2380b15 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -583,9 +583,9 @@ int main(int argc, char *argv[]) + goto exit; + } + +- /* check for media */ +- if (cd_media_compat(udev, fd) < 0) +- goto print; ++ /* check for media - don't bail if there's no media as we still need to ++ * to read profiles */ ++ cd_media_compat(udev, fd); + + /* check if drive talks MMC */ + if (cd_inquiry(udev, fd) < 0) +-- +1.6.5.2 + diff --git a/sources b/sources index 8b59f95..eccbdfc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9cbae4cf95e5c510d7974ea195dfb2a4 udev-147-0.gitdf3e07d.tar.bz2 +aed0129c5a00e01d1be75ffda7d2e0f1 udev-147.tar.bz2 diff --git a/start_udev b/start_udev index dfa36a8..6487666 100755 --- a/start_udev +++ b/start_udev @@ -223,7 +223,7 @@ STRING=$"Starting $prog: " echo -n "$STRING" # mount the tmpfs on ${udev_root%/}, if not already done -LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && { +LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs\" ) { exit 1 }" /proc/mounts && { if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) mount --move $udev_root/pts "$PTSDIR" @@ -232,7 +232,9 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun SHMDIR=$(mktemp -d) mount --move $udev_root/shm "$SHMDIR" fi - mount -n -o mode=0755 -t tmpfs none "$udev_root" + # First try to mount a devtmpfs on $udev_root + mount -n -o mode=0755 -t devtmpfs none "$udev_root" 2>/dev/null \ + || mount -n -o mode=0755 -t tmpfs none "$udev_root" mkdir -m 0755 $udev_root/pts mkdir -m 0755 $udev_root/shm if [ -n "$PTSDIR" ]; then diff --git a/udev-141-cpu-online.patch b/udev-141-cpu-online.patch new file mode 100644 index 0000000..909e6e5 --- /dev/null +++ b/udev-141-cpu-online.patch @@ -0,0 +1,8 @@ +--- udev-141/rules/redhat/40-redhat.rules 2008-10-16 11:03:43.000000000 -0500 ++++ udev-141.cpu/rules/redhat/40-redhat.rules 2009-05-20 11:23:12.000000000 -0500 +@@ -25,3 +25,5 @@ + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" + + KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ ++ACTION=="add", KERNEL=="cpu[0-9]*", RUN+="/bin/bash -c 'echo 1 > /sys/devices/system/cpu/%k/online'" diff --git a/udev-147-modem-modeswitch.patch b/udev-147-modem-modeswitch.patch new file mode 100644 index 0000000..b25e245 --- /dev/null +++ b/udev-147-modem-modeswitch.patch @@ -0,0 +1,10 @@ +diff -up udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules.orig udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules +--- udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules.orig 2009-07-31 12:48:49.000000000 +0200 ++++ udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules 2009-11-12 10:47:49.000000000 +0100 +@@ -35,5 +35,6 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ++ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + + LABEL="option_zerocd_end" diff --git a/udev-post.init b/udev-post.init index 51bc184..1676e78 100644 --- a/udev-post.init +++ b/udev-post.init @@ -23,6 +23,7 @@ # See how we were called. case "$1" in start|reload) + [ -w /var/lock/subsys/udev-post ] || exit 4 STRING=$"Retrigger failed udev events" echo -n $STRING /sbin/udevadm trigger --retry-failed @@ -53,6 +54,7 @@ case "$1" in exit 0 ;; stop) + [ -w /var/lock/subsys/udev-post ] || exit 4 STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" @@ -85,10 +87,10 @@ case "$1" in exit 0 ;; status) - exit 0 + exit 3 ;; *) echo $"Usage: $0 {start|stop|reload}" - exit 1 + exit 3 esac exit 0 diff --git a/udev.spec b/udev.spec index ea3adc4..0603367 100644 --- a/udev.spec +++ b/udev.spec @@ -12,10 +12,7 @@ Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 -Source: udev-147-0.git495d408.tar.bz2 -#Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -#Snapshot of -#http://git.kernel.org/?p=linux/hotplug/udev.git;a=snapshot;h=495d408;sf=tgz +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Patch1: udev-141-cpu-online.patch Patch2: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch Patch3: udev-147-modem-modeswitch.patch @@ -50,6 +47,7 @@ Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 Obsoletes: DeviceKit < 004 Obsoletes: DeviceKit-devel < 004 +Provides: DeviceKit = 004 DeviceKit-devel = 004 # hid2hci moved to udev Conflicts: bluez < 4.47 From f4ef922fde9c7da047dcf8a86be063dbac2a57a5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 24 Nov 2009 11:26:19 +0000 Subject: [PATCH 535/640] - require s390utils, because it's essential on s390 --- udev.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 0603367..68c6c65 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 147 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -30,6 +30,11 @@ Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd Requires: hwdata +%ifarch s390 s390x +# Require s390utils, because it's essential on s390 +Requires: s390utils +%endif + BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV BuildRequires: gperf libtool @@ -352,6 +357,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Nov 24 2009 Harald Hoyer 147-2 +- require s390utils, because it's essential on s390 + * Thu Nov 12 2009 Harald Hoyer 147-1 - version 147 - Fix upgrade from Fedora 11 with bluez installed (#533925) From 7ff3775e4dbaad9362eb4b7cba5acf3abe61c5c4 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:46 +0000 Subject: [PATCH 536/640] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 79bd188..c72f44b 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ # Makefile for source rpm: udev -# $Id: Makefile,v 1.2 2004/11/04 16:16:37 harald Exp $ +# $Id: Makefile,v 1.3 2007/10/15 19:29:11 notting Exp $ NAME := udev SPECFILE = $(firstword $(wildcard *.spec)) UPSTREAM_CHECKS = sign define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From d5e28cedbd115ba989c653f86b739473e48324f7 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:13:35 +0000 Subject: [PATCH 537/640] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0fd5003..43f056c 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SPECFILE = $(firstword $(wildcard *.spec)) UPSTREAM_CHECKS = sign define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 403d10d45be925927c5150c61f6bea6e66e2248a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 26 Jan 2010 11:37:27 +0000 Subject: [PATCH 538/640] - removed one modem-modeswitch line (#541686) - added one modem-modeswitch line (#547759) - fixed dangling symlinks (#558235) - fixed initscript (#557771, #523976, - obsolete DeviceKit (#532961) - fixed copyright (#536843) --- udev-145-modem-modeswitch.patch | 2 +- udev-post.init | 6 +++--- udev.spec | 33 +++++++++++++++++++++++---------- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/udev-145-modem-modeswitch.patch b/udev-145-modem-modeswitch.patch index d6b8238..a556037 100644 --- a/udev-145-modem-modeswitch.patch +++ b/udev-145-modem-modeswitch.patch @@ -5,7 +5,7 @@ diff -up udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.old u ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7501", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" -+ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ++ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="d055", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" LABEL="option_zerocd_end" diff --git a/udev-post.init b/udev-post.init index 1676e78..409f552 100644 --- a/udev-post.init +++ b/udev-post.init @@ -23,7 +23,7 @@ # See how we were called. case "$1" in start|reload) - [ -w /var/lock/subsys/udev-post ] || exit 4 + [ -w /var/lock/subsys ] || exit 4 STRING=$"Retrigger failed udev events" echo -n $STRING /sbin/udevadm trigger --retry-failed @@ -54,7 +54,7 @@ case "$1" in exit 0 ;; stop) - [ -w /var/lock/subsys/udev-post ] || exit 4 + [ -w /var/lock/subsys ] || exit 4 STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" @@ -91,6 +91,6 @@ case "$1" in ;; *) echo $"Usage: $0 {start|stop|reload}" - exit 3 + exit 2 esac exit 0 diff --git a/udev.spec b/udev.spec index 88c5e09..583ca17 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,6 +14,8 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +BuildRequires: libtool automake autoconf + Patch1: 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch Patch2: 0002-udevd-add-timestamp-to-debug-output.patch Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch @@ -23,8 +25,6 @@ Patch6: ck-runseat.patch Patch7: udev-141-cpu-online.patch # https://bugzilla.redhat.com/show_bug.cgi?id=532628 Patch8: udev-145-hid2hci-backport.patch -BuildRequires: libtool automake autoconf - Patch9: udev-145-modem-modeswitch.patch Patch10: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch @@ -58,6 +58,7 @@ Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 Obsoletes: DeviceKit < 004 Obsoletes: DeviceKit-devel < 004 +Provides: DeviceKit = 004 DeviceKit-devel = 004 # hid2hci moved to udev Conflicts: bluez < 4.47 @@ -70,6 +71,7 @@ Summary: Dynamic library to access udev device information Group: System Environment/Libraries Obsoletes: libudev0 <= 142 Provides: libudev0 = 143 +License: LGPLv2+ %description -n libudev This package contains the dynamic library libudev, which provides access @@ -80,6 +82,7 @@ Summary: Development files for libudev Group: Development/Libraries Requires: udev = %{version}-%{release} Requires: libudev = %{version}-%{release} +License: LGPLv2+ %description -n libudev-devel This package contains the development files for the library libudev, a @@ -92,6 +95,7 @@ Requires: libudev >= 142 # remove the following lines for libgudev so major 1 Provides: libgudev = 20090518 Obsoletes: libgudev <= 20090517 +License: LGPLv2+ %description -n libgudev1 This package contains the libraries that make it easier to use libudev @@ -103,6 +107,7 @@ Group: Development/Libraries Requires: libudev-devel >= 142 Provides: libgudev-devel = 20090518 Obsoletes: libgudev-devel <= 20090517 +License: LGPLv2+ Requires: libgudev1 = %{version}-%{release} @@ -120,7 +125,7 @@ glib-based applications using libudev functionality. %patch6 -p1 -b .ck041 %patch7 -p1 %patch8 -p1 -b .hid2hci -%patch9 -p1 +%patch9 -p1 %patch10 -p1 autoreconf -i automake @@ -155,13 +160,13 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor +ln -sf ../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo +ln -sf ../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest +ln -sf ../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol +ln -sf ../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger +ln -sf ../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle +ln -sf ../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol for i in \ rules/redhat/40-redhat.rules \ @@ -368,6 +373,14 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jan 26 2010 Harald Hoyer 145-15 +- removed one modem-modeswitch line (#541686) +- added one modem-modeswitch line (#547759) +- fixed dangling symlinks (#558235) +- fixed initscript (#557771, #523976, +- obsolete DeviceKit (#532961) +- fixed copyright (#536843) + * Wed Nov 11 2009 Bastien Nocera 145-14 - Fix blu-ray and hd-dvd drives not getting detected properly when a medium is absent From bcb2d05c810fa9df5dc061eb6c3affd210420716 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 27 Jan 2010 15:44:40 +0000 Subject: [PATCH 539/640] - version 151 - fixed udev-post initscript - only require s390utils-base, rather than s390utils (#553156) --- .cvsignore | 2 +- ...heck-profiles-even-if-there-is-no-me.patch | 38 ------------------- sources | 2 +- udev-147-modem-modeswitch.patch | 10 ----- udev-post.init | 6 +-- udev.spec | 30 ++++++++------- 6 files changed, 22 insertions(+), 66 deletions(-) delete mode 100644 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch delete mode 100644 udev-147-modem-modeswitch.patch diff --git a/.cvsignore b/.cvsignore index a2a13aa..d05c54f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-147.tar.bz2 +udev-151.tar.bz2 diff --git a/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch b/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch deleted file mode 100644 index dad08af..0000000 --- a/0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7505831b7ee7b04d84424d2ed306a76abd32871c Mon Sep 17 00:00:00 2001 -From: David Zeuthen -Date: Tue, 10 Nov 2009 12:32:38 -0500 -Subject: [PATCH] cdrom_id: Still check profiles even if there is no media - -Even when there is no medium in the drive, we should still check the -profiles supported by the drive. Otherwise we fail to detect things -like Blu-ray drives. See - - https://bugzilla.gnome.org/show_bug.cgi?id=600273 - -for more information. - -Signed-off-by: David Zeuthen ---- - extras/cdrom_id/cdrom_id.c | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 6ea763b..2380b15 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -583,9 +583,9 @@ int main(int argc, char *argv[]) - goto exit; - } - -- /* check for media */ -- if (cd_media_compat(udev, fd) < 0) -- goto print; -+ /* check for media - don't bail if there's no media as we still need to -+ * to read profiles */ -+ cd_media_compat(udev, fd); - - /* check if drive talks MMC */ - if (cd_inquiry(udev, fd) < 0) --- -1.6.5.2 - diff --git a/sources b/sources index eccbdfc..3161bc7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -aed0129c5a00e01d1be75ffda7d2e0f1 udev-147.tar.bz2 +aeae0e6273dcbec246c3c1b9868ebed1 udev-151.tar.bz2 diff --git a/udev-147-modem-modeswitch.patch b/udev-147-modem-modeswitch.patch deleted file mode 100644 index b25e245..0000000 --- a/udev-147-modem-modeswitch.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules.orig udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules ---- udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules.orig 2009-07-31 12:48:49.000000000 +0200 -+++ udev-147/extras/modem-modeswitch/61-option-modem-modeswitch.rules 2009-11-12 10:47:49.000000000 +0100 -@@ -35,5 +35,6 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct - ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" - ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" - ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" -+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" - - LABEL="option_zerocd_end" diff --git a/udev-post.init b/udev-post.init index 1676e78..409f552 100644 --- a/udev-post.init +++ b/udev-post.init @@ -23,7 +23,7 @@ # See how we were called. case "$1" in start|reload) - [ -w /var/lock/subsys/udev-post ] || exit 4 + [ -w /var/lock/subsys ] || exit 4 STRING=$"Retrigger failed udev events" echo -n $STRING /sbin/udevadm trigger --retry-failed @@ -54,7 +54,7 @@ case "$1" in exit 0 ;; stop) - [ -w /var/lock/subsys/udev-post ] || exit 4 + [ -w /var/lock/subsys ] || exit 4 STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" @@ -91,6 +91,6 @@ case "$1" in ;; *) echo $"Usage: $0 {start|stop|reload}" - exit 3 + exit 2 esac exit 0 diff --git a/udev.spec b/udev.spec index 68c6c65..a1d2966 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 147 -Release: 2%{?dist} +Version: 151 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,8 +14,6 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Patch1: udev-141-cpu-online.patch -Patch2: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch -Patch3: udev-147-modem-modeswitch.patch Source1: start_udev Source3: udev-post.init @@ -31,8 +29,8 @@ Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd Requires: hwdata %ifarch s390 s390x -# Require s390utils, because it's essential on s390 -Requires: s390utils +# Require s390utils-base, because it's essential on s390 +Requires: s390utils-base %endif BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel @@ -112,8 +110,6 @@ glib-based applications using libudev functionality. %prep %setup -q %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build # get rid of rpath @@ -259,7 +255,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(0644, root, root, 0755) -%doc NEWS COPYING README TODO ChangeLog docs/* extras/keymap/README.keymap.txt +%doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevsettle %attr(0755,root,root) /sbin/udevtrigger @@ -276,12 +272,15 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/hid2hci %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh -%attr(0755,root,root) %{udev_scriptdir}/firmware.sh +%attr(0755,root,root) %{udev_scriptdir}/firmware %attr(0644,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) %{udev_scriptdir}/collect %attr(0755,root,root) %{udev_scriptdir}/fstab_import +%attr(0755,root,root) %{udev_scriptdir}/input_id +%attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh + %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post @@ -328,12 +327,12 @@ rm -rf $RPM_BUILD_ROOT %files -n libudev %defattr(0644, root, root, 0755) -%doc COPYING +%doc COPYING %attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel %defattr(0644, root, root, 0755) -%doc COPYING +%doc COPYING libudev/docs/html/* %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc @@ -348,7 +347,7 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1-devel %defattr(0644, root, root, 0755) -%doc COPYING +%doc COPYING extras/gudev/docs/html/* %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir @@ -357,6 +356,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jan 27 2010 Harald Hoyer 151-1 +- version 151 +- fixed udev-post initscript +- only require s390utils-base, rather than s390utils (#553156) + * Tue Nov 24 2009 Harald Hoyer 147-2 - require s390utils, because it's essential on s390 From e0288040af85adf674d062fb89e883a4b913605b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 29 Jan 2010 09:57:03 +0000 Subject: [PATCH 540/640] - version 151 - fixed udev-post initscript - only require s390utils-base, rather than s390utils (#553156) --- udev-141-cpu-online.patch | 8 -------- udev-151-rules.patch | 25 +++++++++++++++++++++++++ udev-post.init | 2 +- udev.spec | 7 +++++-- 4 files changed, 31 insertions(+), 11 deletions(-) delete mode 100644 udev-141-cpu-online.patch create mode 100644 udev-151-rules.patch diff --git a/udev-141-cpu-online.patch b/udev-141-cpu-online.patch deleted file mode 100644 index 909e6e5..0000000 --- a/udev-141-cpu-online.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- udev-141/rules/redhat/40-redhat.rules 2008-10-16 11:03:43.000000000 -0500 -+++ udev-141.cpu/rules/redhat/40-redhat.rules 2009-05-20 11:23:12.000000000 -0500 -@@ -25,3 +25,5 @@ - KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" - - KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" -+ -+ACTION=="add", KERNEL=="cpu[0-9]*", RUN+="/bin/bash -c 'echo 1 > /sys/devices/system/cpu/%k/online'" diff --git a/udev-151-rules.patch b/udev-151-rules.patch new file mode 100644 index 0000000..0fc647a --- /dev/null +++ b/udev-151-rules.patch @@ -0,0 +1,25 @@ +diff --git a/rules/redhat/40-redhat.rules b/rules/redhat/40-redhat.rules +index 47ce9e5..aaba82b 100644 +--- a/rules/redhat/40-redhat.rules ++++ b/rules/redhat/40-redhat.rules +@@ -5,11 +5,11 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="flo + + KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" ++ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_device", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" + +-ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" ++ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_device", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" + +-BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" ++SUBSYSTEM=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" + + KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" + +@@ -25,3 +25,5 @@ KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" + KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" + + KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" ++ ++ACTION=="add", KERNEL=="cpu[0-9]*", RUN+="/bin/bash -c 'echo 1 > /sys/devices/system/cpu/%k/online'" diff --git a/udev-post.init b/udev-post.init index 409f552..f040950 100644 --- a/udev-post.init +++ b/udev-post.init @@ -26,7 +26,7 @@ case "$1" in [ -w /var/lock/subsys ] || exit 4 STRING=$"Retrigger failed udev events" echo -n $STRING - /sbin/udevadm trigger --retry-failed + /sbin/udevadm trigger --type=failed success "$STRING" echo diff --git a/udev.spec b/udev.spec index a1d2966..2b55c1f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -13,7 +13,7 @@ Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch1: udev-141-cpu-online.patch +Patch1: udev-151-rules.patch Source1: start_udev Source3: udev-post.init @@ -356,6 +356,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jan 29 2010 Harald Hoyer 151-2 +- fixed rules and startup script (#559844) + * Wed Jan 27 2010 Harald Hoyer 151-1 - version 151 - fixed udev-post initscript From 52b32c5a0df50a1b45b61f8f99099e8e29a109ae Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 9 Feb 2010 09:59:25 +0000 Subject: [PATCH 541/640] - udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading microcode (since microcode_intel tries to probe firmware which does not exist. *sigh*) --- start_udev | 2 +- udev-151-rules.patch | 2 +- udev-86a7a2f-fix-missing-firmware.patch | 43 +++++++++++++++++++++++++ udev.spec | 9 +++++- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 udev-86a7a2f-fix-missing-firmware.patch diff --git a/start_udev b/start_udev index 6487666..57801aa 100755 --- a/start_udev +++ b/start_udev @@ -110,7 +110,7 @@ make_extra_nodes () { done [ -d /dev/net ] || mkdir -p /dev/net - [ -c /dev/net/tun ] || /bin/mknod -m 0600 /dev/net/tun c 10 200 + [ -c /dev/net/tun ] || /bin/mknod -m 0666 /dev/net/tun c 10 200 #/bin/chown root:root /dev/net/tun [ -c /dev/ppp ] || /bin/mknod -m 0600 /dev/ppp c 108 0 diff --git a/udev-151-rules.patch b/udev-151-rules.patch index 0fc647a..b713f03 100644 --- a/udev-151-rules.patch +++ b/udev-151-rules.patch @@ -22,4 +22,4 @@ index 47ce9e5..aaba82b 100644 KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" + -+ACTION=="add", KERNEL=="cpu[0-9]*", RUN+="/bin/bash -c 'echo 1 > /sys/devices/system/cpu/%k/online'" ++ACTION=="add", SUBSYSTEM=="cpu", KERNEL=="cpu[0-9]*", ATTR{online}="1" diff --git a/udev-86a7a2f-fix-missing-firmware.patch b/udev-86a7a2f-fix-missing-firmware.patch new file mode 100644 index 0000000..0213bdf --- /dev/null +++ b/udev-86a7a2f-fix-missing-firmware.patch @@ -0,0 +1,43 @@ +From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Sun, 31 Jan 2010 13:49:02 +0100 +Subject: firmware: fix error reporting on missing firmware files + +The new firmware loader does not report an error to the kernel if a firmware file +is missing. This results in modprobe stalling for 60 seconds for each firmware +a module tries to load. +--- + extras/firmware/firmware.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c +index 8f70be4..16455de 100644 +--- a/extras/firmware/firmware.c ++++ b/extras/firmware/firmware.c +@@ -149,6 +149,7 @@ int main(int argc, char **argv) + + util_path_encode(firmware, fwencpath, sizeof(fwencpath)); + util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL); ++ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); + + if (fwfile == NULL) { + int err; +@@ -166,6 +167,7 @@ int main(int argc, char **argv) + udev_selinux_resetfscreatecon(udev); + } while (err == -ENOENT); + rc = 2; ++ set_loading(udev, loadpath, "-1"); + goto exit; + } + +@@ -176,7 +178,6 @@ int main(int argc, char **argv) + if (unlink(misspath) == 0) + util_delete_path(udev, misspath); + +- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); + set_loading(udev, loadpath, "1"); + + util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); +-- +1.6.6 + diff --git a/udev.spec b/udev.spec index 2b55c1f..edce2f8 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,6 +14,7 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Patch1: udev-151-rules.patch +Patch2: udev-86a7a2f-fix-missing-firmware.patch Source1: start_udev Source3: udev-post.init @@ -110,6 +111,7 @@ glib-based applications using libudev functionality. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build # get rid of rpath @@ -356,6 +358,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Sun Feb 07 2010 Kyle McMartin 151-3 +- udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading + microcode (since microcode_intel tries to probe firmware which does + not exist. *sigh*) + * Fri Jan 29 2010 Harald Hoyer 151-2 - fixed rules and startup script (#559844) From 1b5f4efe188a638a93b465763ebd3fa2e5823a0f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Mar 2010 10:51:37 +0000 Subject: [PATCH 542/640] - let cdrom_id use O_EXCL (#566535) - fix interface rename bug (#531074 #544357) - remove GPL COPYING file from LGPL subpackages (#536843) - create /dev/hugepages subdir in start_udev (#541998) - fix brightness keys on MSI Wind U-100 (#563453) - fix dangling symlinks (#566680) - remove erroneous 19d2:2000 modeswitch rule (#569296) - add firewire video devices (#559581) - touch all device nodes after udev settled for the timezone timestamp (#569335) - removed one modem-modeswitch line (#574949) - add virtio symlinks --- hid2hci.patch | 624 ++++++++++++++++++ start_udev | 15 +- udev-145-cdrom.patch | 117 ++++ udev-145-modem-modeswitch.patch | 17 +- udev-145-rename.patch | 20 + udev-147-virtio.patch | 34 + ...cde11bc77af49a96245b8a8a0f2b583a344c.patch | 55 ++ ...d38c1f0ead2239808dd117577a99a3ad3cde.patch | 34 + ...12104ad30d4228aa7782308a77e21b7f6fb5.patch | 29 + udev.spec | 44 +- 10 files changed, 970 insertions(+), 19 deletions(-) create mode 100644 hid2hci.patch create mode 100644 udev-145-cdrom.patch create mode 100644 udev-145-rename.patch create mode 100644 udev-147-virtio.patch create mode 100644 udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch create mode 100644 udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch create mode 100644 udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch diff --git a/hid2hci.patch b/hid2hci.patch new file mode 100644 index 0000000..d932677 --- /dev/null +++ b/hid2hci.patch @@ -0,0 +1,624 @@ +diff -u udev-145/extras/hid2hci/70-hid2hci.rules /home/harald/git/udev/extras/hid2hci/70-hid2hci.rules +--- udev-145/extras/hid2hci/70-hid2hci.rules 2009-06-28 02:07:53.000000000 +0200 ++++ udev/extras/hid2hci/70-hid2hci.rules 2009-09-16 16:48:40.000000000 +0200 +@@ -1,25 +1,28 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add", GOTO="hid2hci_end" ++ACTION!="add|change", GOTO="hid2hci_end" + SUBSYSTEM!="usb", GOTO="hid2hci_end" + +-# Variety of Dell Bluetooth devices - it looks like a bit of an odd rule, +-# because it is matching on a mouse device that is self powered, but that +-# is where a HID report needs to be sent to switch modes. +-# ++# Variety of Dell Bluetooth devices - match on a mouse device that is ++# self powered and where a HID report needs to be sent to switch modes + # Known supported devices: 413c:8154, 413c:8158, 413c:8162 +-ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ +- RUN+="hid2hci --method dell -v $attr{idVendor} -p $attr{idProduct} --mode hci" ++ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", \ ++ ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ ++ RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" ++ ++# Logitech devices (hidraw) ++KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ ++ RUN+="hid2hci --method=logitech-hid --devpath=%p" + + ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" + +-# Logitech devices +-ATTR{idVendor}=="046d", ATTR{idProduct}=="c70[345abce]", RUN+="hid2hci --method logitech -v $attr{idVendor} -p $attr{idProduct} --mode hci" +-ATTR{idVendor}=="046d", ATTR{idProduct}=="c71[34bc]", RUN+="hid2hci --method logitech -v $attr{idVendor} -p $attr{idProduct} --mode hci" +- +-# CSR devices (in HID mode) +-ATTR{idVendor}=="0a12", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" +-ATTR{idVendor}=="0458", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" +-ATTR{idVendor}=="05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method csr -v $attr{idVendor} -p $attr{idProduct} --mode hci" ++# When a Dell device recovers from S3, the mouse child needs to be repoked ++# Unfortunately the only event seen is the BT device disappearing, so the mouse ++# device needs to be chased down on the USB bus. ++ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \ ++ ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" ++ ++# CSR devices ++ATTR{idVendor}=="0a12|0458|05ac", ATTR{idProduct}=="1000", RUN+="hid2hci --method=csr --devpath=%p" + + LABEL="hid2hci_end" +diff -u udev-145/extras/hid2hci/hid2hci.c /home/harald/git/udev/extras/hid2hci/hid2hci.c +--- udev-145/extras/hid2hci/hid2hci.c 2009-06-13 02:55:10.000000000 +0200 ++++ udev/extras/hid2hci/hid2hci.c 2009-08-13 11:23:30.000000000 +0200 +@@ -1,31 +1,26 @@ + /* ++ * hid2hci : switch the radio on devices that support ++ * it from HID to HCI and back + * +- * hid2hci : a tool for switching the radio on devices that support +- * it from HID to HCI and back ++ * Copyright (C) 2003-2009 Marcel Holtmann ++ * Copyright (C) 2008-2009 Mario Limonciello ++ * Copyright (C) 2009 Kay Sievers + * +- * Copyright (C) 2003-2009 Marcel Holtmann +- * Copyright (C) 2008-2009 Mario Limonciello ++ * 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; either version 2 of the License, or ++ * (at your option) any later version. + * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. + * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +-#ifdef HAVE_CONFIG_H +-#include +-#endif +- + #include + #include + #include +@@ -33,79 +28,24 @@ + #include + #include + #include +- ++#include + #include + +-#ifdef NEED_USB_GET_BUSSES +-static inline struct usb_bus *usb_get_busses(void) +-{ +- return usb_busses; +-} +-#endif +- +-#ifndef USB_DIR_OUT +-#define USB_DIR_OUT 0x00 +-#endif +- +-static char devpath[PATH_MAX + 1] = "/dev"; +- +-struct hiddev_devinfo { +- unsigned int bustype; +- unsigned int busnum; +- unsigned int devnum; +- unsigned int ifnum; +- short vendor; +- short product; +- short version; +- unsigned num_applications; +-}; +- +-struct hiddev_report_info { +- unsigned report_type; +- unsigned report_id; +- unsigned num_fields; +-}; +- +-typedef __signed__ int __s32; ++#include "libudev.h" ++#include "libudev-private.h" + +-struct hiddev_usage_ref { +- unsigned report_type; +- unsigned report_id; +- unsigned field_index; +- unsigned usage_index; +- unsigned usage_code; +- __s32 value; ++enum mode { ++ HCI = 0, ++ HID = 1, + }; + +-#define HIDIOCGDEVINFO _IOR('H', 0x03, struct hiddev_devinfo) +-#define HIDIOCINITREPORT _IO('H', 0x05) +-#define HIDIOCSREPORT _IOW('H', 0x08, struct hiddev_report_info) +-#define HIDIOCSUSAGE _IOW('H', 0x0C, struct hiddev_usage_ref) +- +-#define HID_REPORT_TYPE_OUTPUT 2 +- +-#define HCI 0 +-#define HID 1 +- +-struct device_info { +- struct usb_device *dev; +- int mode; +- uint16_t vendor; +- uint16_t product; +-}; +- +-static int switch_csr(struct device_info *devinfo) ++static int usb_switch_csr(struct usb_dev_handle *dev, enum mode mode) + { +- struct usb_dev_handle *udev; + int err; + +- udev = usb_open(devinfo->dev); +- if (!udev) +- return -errno; +- +- err = usb_control_msg(udev, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, +- 0, devinfo->mode, 0, NULL, 0, 10000); +- ++ err = usb_control_msg(dev, ++ USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, ++ 0, mode, 0, NULL, 0, 10000); + if (err == 0) { + err = -1; + errno = EALREADY; +@@ -113,13 +53,10 @@ + if (errno == ETIMEDOUT) + err = 0; + } +- +- usb_close(udev); +- + return err; + } + +-static int send_report(int fd, const char *buf, size_t size) ++static int hid_logitech_send_report(int fd, const char *buf, size_t size) + { + struct hiddev_report_info rinfo; + struct hiddev_usage_ref uref; +@@ -148,72 +85,42 @@ + return err; + } + +-static int switch_logitech(struct device_info *devinfo) ++static int hid_switch_logitech(const char *filename) + { +- char devname[PATH_MAX + 1]; +- int i, fd, err = -1; +- +- for (i = 0; i < 16; i++) { +- struct hiddev_devinfo dinfo; +- char rep1[] = { 0xff, 0x80, 0x80, 0x01, 0x00, 0x00 }; +- char rep2[] = { 0xff, 0x80, 0x00, 0x00, 0x30, 0x00 }; +- char rep3[] = { 0xff, 0x81, 0x80, 0x00, 0x00, 0x00 }; +- +- sprintf(devname, "%s/hiddev%d", devpath, i); +- fd = open(devname, O_RDWR); +- if (fd < 0) { +- sprintf(devname, "%s/usb/hiddev%d", devpath, i); +- fd = open(devname, O_RDWR); +- if (fd < 0) { +- sprintf(devname, "%s/usb/hid/hiddev%d", devpath, i); +- fd = open(devname, O_RDWR); +- if (fd < 0) +- continue; +- } +- } +- +- memset(&dinfo, 0, sizeof(dinfo)); +- err = ioctl(fd, HIDIOCGDEVINFO, &dinfo); +- if (err < 0 || (int) dinfo.busnum != atoi(devinfo->dev->bus->dirname) || +- (int) dinfo.devnum != atoi(devinfo->dev->filename)) { +- close(fd); +- continue; +- } +- +- err = ioctl(fd, HIDIOCINITREPORT, 0); +- if (err < 0) { +- close(fd); +- break; +- } +- +- err = send_report(fd, rep1, sizeof(rep1)); +- if (err < 0) { +- close(fd); +- break; +- } +- +- err = send_report(fd, rep2, sizeof(rep2)); +- if (err < 0) { +- close(fd); +- break; +- } +- +- err = send_report(fd, rep3, sizeof(rep3)); +- close(fd); +- break; +- } +- ++ char rep1[] = { 0xff, 0x80, 0x80, 0x01, 0x00, 0x00 }; ++ char rep2[] = { 0xff, 0x80, 0x00, 0x00, 0x30, 0x00 }; ++ char rep3[] = { 0xff, 0x81, 0x80, 0x00, 0x00, 0x00 }; ++ int fd; ++ int err = -1; ++ ++ fd = open(filename, O_RDWR); ++ if (fd < 0) ++ return err; ++ ++ err = ioctl(fd, HIDIOCINITREPORT, 0); ++ if (err < 0) ++ goto out; ++ ++ err = hid_logitech_send_report(fd, rep1, sizeof(rep1)); ++ if (err < 0) ++ goto out; ++ ++ err = hid_logitech_send_report(fd, rep2, sizeof(rep2)); ++ if (err < 0) ++ goto out; ++ ++ err = hid_logitech_send_report(fd, rep3, sizeof(rep3)); ++out: ++ close(fd); + return err; + } + +-static int switch_dell(struct device_info *devinfo) ++static int usb_switch_dell(struct usb_dev_handle *dev, enum mode mode) + { + char report[] = { 0x7f, 0x00, 0x00, 0x00 }; +- +- struct usb_dev_handle *handle; + int err; + +- switch (devinfo->mode) { ++ switch (mode) { + case HCI: + report[1] = 0x13; + break; +@@ -222,22 +129,16 @@ + break; + } + +- handle = usb_open(devinfo->dev); +- if (!handle) +- return -EIO; +- + /* Don't need to check return, as might not be in use */ +- usb_detach_kernel_driver_np(handle, 0); ++ usb_detach_kernel_driver_np(dev, 0); + +- if (usb_claim_interface(handle, 0) < 0) { +- usb_close(handle); ++ if (usb_claim_interface(dev, 0) < 0) + return -EIO; +- } + +- err = usb_control_msg(handle, +- USB_ENDPOINT_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, ++ err = usb_control_msg(dev, ++ USB_ENDPOINT_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, + USB_REQ_SET_CONFIGURATION, 0x7f | (0x03 << 8), 0, +- report, sizeof(report), 5000); ++ report, sizeof(report), 5000); + + if (err == 0) { + err = -1; +@@ -246,131 +147,203 @@ + if (errno == ETIMEDOUT) + err = 0; + } +- +- usb_close(handle); +- + return err; + } + +-static int find_device(struct device_info* devinfo) ++/* ++ * The braindead libusb needs to scan and open all devices, just to ++ * to find the device we already have. This needs to be fixed in libusb ++ * or it will be ripped out and we carry our own code. ++ */ ++static struct usb_device *usb_device_open_from_udev(struct udev_device *usb_dev) + { + struct usb_bus *bus; +- struct usb_device *dev; ++ const char *str; ++ int busnum; ++ int devnum; ++ ++ str = udev_device_get_sysattr_value(usb_dev, "busnum"); ++ if (str == NULL) ++ return NULL; ++ busnum = strtol(str, NULL, 0); ++ ++ str = udev_device_get_sysattr_value(usb_dev, "devnum"); ++ if (str == NULL) ++ return NULL; ++ devnum = strtol(str, NULL, 0); + ++ usb_init(); + usb_find_busses(); + usb_find_devices(); + +- for (bus = usb_get_busses(); bus; bus = bus->next) ++ for (bus = usb_get_busses(); bus; bus = bus->next) { ++ struct usb_device *dev; ++ ++ if (strtol(bus->dirname, NULL, 10) != busnum) ++ continue; ++ + for (dev = bus->devices; dev; dev = dev->next) { +- if (dev->descriptor.idVendor == devinfo->vendor && +- dev->descriptor.idProduct == devinfo->product) { +- devinfo->dev=dev; +- return 1; +- } ++ if (dev->devnum == devnum) ++ return dev; + } +- return 0; ++ } ++ ++ return NULL; ++} ++ ++static struct usb_dev_handle *find_device(struct udev_device *udev_dev) ++{ ++ struct usb_device *dev; ++ ++ dev = usb_device_open_from_udev(udev_dev); ++ if (dev == NULL) ++ return NULL; ++ return usb_open(dev); + } + +-static void usage(char* error) ++static void usage(const char *error) + { + if (error) + fprintf(stderr,"\n%s\n", error); + else + printf("hid2hci - Bluetooth HID to HCI mode switching utility\n\n"); + +- printf("Usage:\n" +- "\thid2hci [options]\n" +- "\n"); +- +- printf("Options:\n" +- "\t-h, --help Display help\n" +- "\t-q, --quiet Don't display any messages\n" +- "\t-r, --mode= Mode to switch to [hid, hci]\n" +- "\t-v, --vendor= Vendor ID to act upon\n" +- "\t-p, --product= Product ID to act upon\n" +- "\t-m, --method= Method to use to switch [csr, logitech, dell]\n" +- "\n"); +- if (error) +- exit(1); ++ printf("Usage: hid2hci [options]\n" ++ " --mode= mode to switch to [hid|hci] (default hci)\n" ++ " --devpath= sys device path\n" ++ " --method= method to use to switch [csr|logitech-hid|dell]\n" ++ " --help\n\n"); + } + +-static const struct option main_options[] = { +- { "help", no_argument, 0, 'h' }, +- { "quiet", no_argument, 0, 'q' }, +- { "mode", required_argument, 0, 'r' }, +- { "vendor", required_argument, 0, 'v' }, +- { "product", required_argument, 0, 'p' }, +- { "method", required_argument, 0, 'm' }, +- { 0, 0, 0, 0 } +-}; +- + int main(int argc, char *argv[]) + { +- struct device_info dev = { NULL, HCI, 0, 0 }; +- int opt, quiet = 0; +- int (*method)(struct device_info *dev) = NULL; +- +- while ((opt = getopt_long(argc, argv, "+r:v:p:m:qh", main_options, NULL)) != -1) { +- switch (opt) { +- case 'r': +- if (optarg && !strcmp(optarg, "hid")) +- dev.mode = HID; +- else if (optarg && !strcmp(optarg, "hci")) +- dev.mode = HCI; +- else +- usage("ERROR: Undefined radio mode\n"); ++ static const struct option options[] = { ++ { "help", no_argument, NULL, 'h' }, ++ { "mode", required_argument, NULL, 'm' }, ++ { "devpath", required_argument, NULL, 'p' }, ++ { "method", required_argument, NULL, 'M' }, ++ { } ++ }; ++ enum method { ++ METHOD_UNDEF, ++ METHOD_CSR, ++ METHOD_LOGITECH_HID, ++ METHOD_DELL, ++ } method = METHOD_UNDEF; ++ struct udev *udev; ++ struct udev_device *udev_dev = NULL; ++ char syspath[UTIL_PATH_SIZE]; ++ int (*usb_switch)(struct usb_dev_handle *dev, enum mode mode) = NULL; ++ enum mode mode = HCI; ++ const char *devpath = NULL; ++ int err = -1; ++ int rc = 1; ++ ++ for (;;) { ++ int option; ++ ++ option = getopt_long(argc, argv, "m:p:M:qh", options, NULL); ++ if (option == -1) + break; +- case 'v': +- sscanf(optarg, "%4hx", &dev.vendor); ++ ++ switch (option) { ++ case 'm': ++ if (!strcmp(optarg, "hid")) { ++ mode = HID; ++ } else if (!strcmp(optarg, "hci")) { ++ mode = HCI; ++ } else { ++ usage("error: undefined radio mode\n"); ++ exit(1); ++ } + break; + case 'p': +- sscanf(optarg, "%4hx", &dev.product); +- break; +- case 'm': +- if (optarg && !strcmp(optarg, "csr")) +- method = switch_csr; +- else if (optarg && !strcmp(optarg, "logitech")) +- method = switch_logitech; +- else if (optarg && !strcmp(optarg, "dell")) +- method = switch_dell; +- else +- usage("ERROR: Undefined switching method\n"); ++ devpath = optarg; + break; +- case 'q': +- quiet = 1; ++ case 'M': ++ if (!strcmp(optarg, "csr")) { ++ method = METHOD_CSR; ++ usb_switch = usb_switch_csr; ++ } else if (!strcmp(optarg, "logitech-hid")) { ++ method = METHOD_LOGITECH_HID; ++ } else if (!strcmp(optarg, "dell")) { ++ method = METHOD_DELL; ++ usb_switch = usb_switch_dell; ++ } else { ++ usage("error: undefined switching method\n"); ++ exit(1); ++ } + break; + case 'h': + usage(NULL); + default: +- exit(0); ++ exit(1); + } + } + +- if (!quiet && (!dev.vendor || !dev.product || !method)) +- usage("ERROR: Vendor ID, Product ID, and Switching Method must all be defined.\n"); ++ if (!devpath || method == METHOD_UNDEF) { ++ usage("error: --devpath= and --method= must be defined\n"); ++ exit(1); ++ } + +- argc -= optind; +- argv += optind; +- optind = 0; ++ udev = udev_new(); ++ if (udev == NULL) ++ goto exit; ++ ++ util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); ++ udev_dev = udev_device_new_from_syspath(udev, syspath); ++ if (udev_dev == NULL) { ++ fprintf(stderr, "error: could not find '%s'\n", devpath); ++ goto exit; ++ } + +- usb_init(); ++ switch (method) { ++ case METHOD_CSR: ++ case METHOD_DELL: { ++ struct udev_device *dev; ++ struct usb_dev_handle *handle; ++ const char *type; ++ ++ /* get the parent usb_device if needed */ ++ dev = udev_dev; ++ type = udev_device_get_devtype(dev); ++ if (type == NULL || strcmp(type, "usb_device") != 0) { ++ dev = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_device"); ++ if (dev == NULL) { ++ fprintf(stderr, "error: could not find usb_device for '%s'\n", devpath); ++ goto exit; ++ } ++ } + +- if (!find_device(&dev)) { +- if (!quiet) +- fprintf(stderr, "Device %04x:%04x not found on USB bus.\n", +- dev.vendor, dev.product); +- exit(1); ++ handle = find_device(dev); ++ if (handle == NULL) { ++ fprintf(stderr, "error: unable to handle '%s'\n", ++ udev_device_get_syspath(dev)); ++ goto exit; ++ } ++ err = usb_switch(handle, mode); ++ break; + } ++ case METHOD_LOGITECH_HID: { ++ const char *device; + +- if (!quiet) +- printf("Attempting to switch device %04x:%04x to %s mode ", +- dev.vendor, dev.product, dev.mode ? "HID" : "HCI"); +- fflush(stdout); +- +- if (method(&dev) < 0 && !quiet) +- printf("failed (%s)\n", strerror(errno)); +- else if (!quiet) +- printf("was successful\n"); ++ device = udev_device_get_devnode(udev_dev); ++ if (device == NULL) { ++ fprintf(stderr, "error: could not find hiddev device node\n"); ++ goto exit; ++ } ++ err = hid_switch_logitech(device); ++ break; ++ } ++ default: ++ break; ++ } + +- return errno; ++ if (err < 0) ++ fprintf(stderr, "error: switching device '%s' failed.\n", ++ udev_device_get_syspath(udev_dev)); ++exit: ++ udev_device_unref(udev_dev); ++ udev_unref(udev); ++ return rc; + } + diff --git a/start_udev b/start_udev index 6487666..d9969d0 100755 --- a/start_udev +++ b/start_udev @@ -56,7 +56,13 @@ if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then fi fi - +touch_recursive() { + ( cd $1; + for i in *; do + [[ -c "$i" || -b "$i" ]] && touch "$i" + [ -d "$i" ] && touch_recursive "$i" + done ) +} xargs_simple () { if [ "$1" = "-n" ]; then @@ -94,6 +100,7 @@ make_extra_nodes () { [ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm + [ -d $udev_root/hugepages ] || mkdir -m 0755 $udev_root/hugepages [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; USE_MD5="false" @@ -110,7 +117,7 @@ make_extra_nodes () { done [ -d /dev/net ] || mkdir -p /dev/net - [ -c /dev/net/tun ] || /bin/mknod -m 0600 /dev/net/tun c 10 200 + [ -c /dev/net/tun ] || /bin/mknod -m 0666 /dev/net/tun c 10 200 #/bin/chown root:root /dev/net/tun [ -c /dev/ppp ] || /bin/mknod -m 0600 /dev/ppp c 108 0 @@ -307,6 +314,10 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] wait /sbin/udevadm control --env=STARTUP= + # touch all device files for timezone glitches + # "find" is in /usr/bin and might not be available + touch_recursive /dev > "$udev_root/null" 2>&1 + else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev-145-cdrom.patch b/udev-145-cdrom.patch new file mode 100644 index 0000000..636b9b0 --- /dev/null +++ b/udev-145-cdrom.patch @@ -0,0 +1,117 @@ +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 6ea763b..3ffd023 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -511,6 +511,92 @@ static int cd_media_toc(struct udev *udev, int fd) + return 0; + } + ++ ++ ++/* ++ * Linux mangles spaces in mount points by changing them to an octal string ++ * of '\040'. So lets scan the mount point and fix it up by replacing all ++ * occurrences off '\0##' with the ASCII value of 0##. Requires a writable ++ * string as input as we mangle in place. Some of this was taken from the ++ * util-linux package. ++ */ ++#define octalify(a) ((a) & 7) ++#define tooctal(s) (64*octalify(s[1]) + 8*octalify(s[2]) + octalify(s[3])) ++#define isoctal(a) (((a) & ~7) == '0') ++static char *DeMangleMount(char *s) ++{ ++ char *tmp = s; ++ while ((tmp = strchr(tmp, '\\')) != NULL) { ++ if (isoctal(tmp[1]) && isoctal(tmp[2]) && isoctal(tmp[3])) { ++ tmp[0] = tooctal(tmp); ++ memmove(tmp+1, tmp+4, strlen(tmp)-3); ++ } ++ ++tmp; ++ } ++ return s; ++} ++ ++/* ++ * Get major and minor device numbers for a device file name, so we ++ * can check for duplicate devices. ++ */ ++static int GetMajorMinor(const char *name, int *maj, int *min) ++{ ++ struct stat sstat; ++ if (maj) *maj = -1; ++ if (min) *min = -1; ++ if (stat(name, &sstat) == -1) ++ return -1; ++ if (! S_ISBLK(sstat.st_mode) && ! S_ISCHR(sstat.st_mode)) ++ return -1; ++ if (maj) *maj = major(sstat.st_rdev); ++ if (min) *min = minor(sstat.st_rdev); ++ return 0; ++} ++ ++ ++/* ++ * See if device has been mounted by looking in mount table. If so, set ++ * device name and mount point name, and return 1, otherwise return 0. ++ */ ++static int MountedDevice(const char *name) ++{ ++ FILE *fp; ++ char line[1024]; ++ char s1[1024]; ++ char s2[1024]; ++ int rc; ++ ++ int maj; ++ int min; ++ ++ GetMajorMinor(name, &maj, &min); ++ ++ fp = fopen("/proc/mounts", "r"); ++ if (fp == NULL) ++ { ++ return 0; ++ } ++ ++ while (fgets(line, sizeof(line), fp) != 0) { ++ rc = sscanf(line, "%1023s %1023s", s1, s2); ++ if (rc >= 2) { ++ int mtabmaj, mtabmin; ++ DeMangleMount(s1); ++ DeMangleMount(s2); ++ GetMajorMinor(s1, &mtabmaj, &mtabmin); ++ if (((strcmp(s1, name) == 0) || (strcmp(s2, name) == 0)) || ++ ((maj != -1) && (maj == mtabmaj) && (min == mtabmin))) { ++ fclose(fp); ++ return 1; ++ } ++ } ++ } ++ fclose(fp); ++ return 0; ++} ++ ++ + int main(int argc, char *argv[]) + { + struct udev *udev; +@@ -568,7 +654,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- fd = open(node, O_RDONLY | O_NONBLOCK); ++ fd = open(node, O_RDONLY | O_NONBLOCK | (MountedDevice(node) ? 0 : O_EXCL)); + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); +@@ -577,6 +663,10 @@ int main(int argc, char *argv[]) + } + info(udev, "probing: '%s'\n", node); + ++ /* do not autoclose */ ++ ioctl(fd, CDROM_CLEAR_OPTIONS, CDO_AUTO_CLOSE); ++ ioctl(fd, CDROM_SET_OPTIONS, CDO_USE_FFLAGS); ++ + /* same data as original cdrom_id */ + if (cd_capability_compat(udev, fd) < 0) { + rc = 1; diff --git a/udev-145-modem-modeswitch.patch b/udev-145-modem-modeswitch.patch index a556037..a27409e 100644 --- a/udev-145-modem-modeswitch.patch +++ b/udev-145-modem-modeswitch.patch @@ -1,11 +1,18 @@ -diff -up udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.old udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules ---- udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.old 2009-11-05 14:06:01.000000000 +0100 -+++ udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules 2009-11-05 14:06:23.000000000 +0100 -@@ -34,5 +34,7 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct +diff -up udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.modesw udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules +--- udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules.modesw 2009-06-10 20:31:14.000000000 +0200 ++++ udev-145/extras/modem-modeswitch/61-option-modem-modeswitch.rules 2010-03-19 10:39:13.000000000 +0100 +@@ -5,7 +5,6 @@ SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_d + GOTO="option_zerocd_end" + + LABEL="option_zerocd_disable" +-ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6711", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6711", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" + ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6731", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +@@ -34,5 +33,6 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7501", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="d055", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" -+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" LABEL="option_zerocd_end" diff --git a/udev-145-rename.patch b/udev-145-rename.patch new file mode 100644 index 0000000..4c5ff83 --- /dev/null +++ b/udev-145-rename.patch @@ -0,0 +1,20 @@ +commit 6068553195f43a2fd7987c48178de23b63a09f15 +Author: Harald Hoyer +Date: Fri Sep 18 13:14:30 2009 +0200 + + rename interfaces to _rename if rename fails + +diff --git a/udev/udev-event.c b/udev/udev-event.c +index 701c061..d5b4d09 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -492,8 +492,7 @@ static int rename_netif(struct udev_event *event) + } + + /* free our own name, another process may wait for us */ +- util_strscpy(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev)); +- util_strscpy(ifr.ifr_newname, IFNAMSIZ, "_rename"); ++ util_strscpyl(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev), "_rename", NULL); + err = ioctl(sk, SIOCSIFNAME, &ifr); + if (err != 0) { + err(event->udev, "error changing netif name %s to %s: %m\n", diff --git a/udev-147-virtio.patch b/udev-147-virtio.patch new file mode 100644 index 0000000..b10a282 --- /dev/null +++ b/udev-147-virtio.patch @@ -0,0 +1,34 @@ +commit 25728ea1ad0c128ae504801abf1f6bfaab608d93 +Author: Amit Shah +Date: Thu Jan 21 18:45:04 2010 +0530 + + rules: Add symlink rule for virtio ports + + virtio ports spawned by the virtio_console.c driver can have 'names' + assigned to them by hosts. The ports are distinguishable using these + names. Make a rule to create a symlink to the chardev associated for a + port with a name. + + The symlink created is: + /dev/virtio-ports/org.libvirt.console0 -> /dev/vport0p0 + + if the first port for the first device was given a name of + 'org.libvirt.console0'. + + Signed-off-by: Amit Shah + +Changed by Harald Hoyer + +diff -up udev-145/rules/rules.d/50-udev-default.rules.virtio udev-145/rules/rules.d/50-udev-default.rules +--- udev-145/rules/rules.d/50-udev-default.rules.virtio 2010-03-19 11:47:36.000000000 +0100 ++++ udev-145/rules/rules.d/50-udev-default.rules 2010-03-19 11:47:52.000000000 +0100 +@@ -17,6 +17,9 @@ KERNEL=="ppp", MODE="0600" + KERNEL=="mwave", NAME="modems/mwave", GROUP="dialout" + KERNEL=="hvc*|hvsi*", GROUP="dialout" + ++# virtio serial / console ports ++KERNEL=="vport*", ATTRS{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" ++ + # mem + KERNEL=="null|zero|full|random|urandom", MODE="0666" + KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640" diff --git a/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch b/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch new file mode 100644 index 0000000..525098e --- /dev/null +++ b/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch @@ -0,0 +1,55 @@ +From: Kay Sievers +Date: Thu, 18 Mar 2010 10:14:32 +0000 (+0100) +Subject: cdrom_id: open non-mounted optical media with O_EXCL +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=38a3cde11bc77af49a96245b8a8a0f2b583a344c + +cdrom_id: open non-mounted optical media with O_EXCL + +This should prevent confusing drives during CD burning sessions. Based +on a patch from Harald Hoyer. +--- + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 2380b15..e485768 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -112,6 +112,30 @@ static unsigned long long int cd_media_session_last_offset; + #define ASC(errcode) (((errcode) >> 8) & 0xFF) + #define ASCQ(errcode) ((errcode) & 0xFF) + ++static int is_mounted(const char *device) ++{ ++ struct stat statbuf; ++ FILE *fp; ++ int maj, min; ++ int mounted = 0; ++ ++ if (stat(device, &statbuf) < 0) ++ return -ENODEV; ++ ++ fp = fopen("/proc/self/mountinfo", "r"); ++ if (fp == NULL) ++ return -ENOSYS; ++ while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { ++ printf("got %u %u\n", maj, min); ++ if (makedev(maj, min) == statbuf.st_rdev) { ++ mounted = 1; ++ break; ++ } ++ } ++ fclose(fp); ++ return mounted; ++} ++ + static void info_scsi_cmd_err(struct udev *udev, char *cmd, int err) + { + if (err == -1) { +@@ -568,7 +592,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- fd = open(node, O_RDONLY | O_NONBLOCK); ++ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); diff --git a/udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch b/udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch new file mode 100644 index 0000000..3fdf20a --- /dev/null +++ b/udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch @@ -0,0 +1,34 @@ +From: Martin Pitt +Date: Tue, 9 Feb 2010 14:47:47 +0000 (+0100) +Subject: Fix brightness keys on MSI Wind U-100 +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=d7e2d38c1f0ead2239808dd117577a99a3ad3cde + +Fix brightness keys on MSI Wind U-100 + +The MSI Wind 100 generates ACPI/input events on the LNXVIDEO input device. On +top of that, the video module/BIOS synthesize some extra event on atkbd as an +echo of actually changing the brightness. + +Ignore the wrong and useless atkbd ones, to avoid event loops. + +Many thanks to Hans de Goede for tracking this down! + +https://launchpad.net/bugs/415023 +--- + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 51c8c3b..684619b 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -98,6 +98,11 @@ ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $ + + ENV{DMI_VENDOR}=="MICRO-STAR*", RUN+="keymap $name micro-star" + ++# some MSI models generate ACPI/input events on the LNXVIDEO input devices, ++# plus some extra synthesized ones on atkbd as an echo of actually changing the ++# brightness; so ignore those atkbd ones, to avoid loops ++ENV{DMI_VENDOR}=="MICRO-STAR*", ATTR{[dmi/id]product_name}=="*U-100*|*U100*|*N033", RUN+="keymap $name 0xF7 reserved 0xF8 reserved" ++ + ENV{DMI_VENDOR}=="INVENTEC", ATTR{[dmi/id]product_name}=="SYMPHONY 6.0/7.0", RUN+="keymap $name inventec-symphony_6.0_7.0" + + ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000" diff --git a/udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch b/udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch new file mode 100644 index 0000000..b871e7e --- /dev/null +++ b/udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch @@ -0,0 +1,29 @@ +From: Marco d'Itri +Date: Thu, 7 Jan 2010 15:17:22 +0000 (+0100) +Subject: rules: udev-acl - add firewire video devices +X-Git-Tag: 150~4 +X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=fa0612104ad30d4228aa7782308a77e21b7f6fb5 + +rules: udev-acl - add firewire video devices +--- + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index f135bff..ab2984c 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -33,6 +33,15 @@ SUBSYSTEM=="input", SUBSYSTEMS=="sound", ENV{ACL_MANAGE}="1" + SUBSYSTEM=="video4linux", ENV{ACL_MANAGE}="1" + SUBSYSTEM=="dvb", ENV{ACL_MANAGE}="1" + ++# IIDC devices: industrial cameras and some webcams ++SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", ENV{ACL_MANAGE}="1" ++# AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more ++SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", ENV{ACL_MANAGE}="1" ++ ++# old style firewire devices ++KERNEL=="dv1394-[0-9]*", ENV{ACL_MANAGE}="1" ++KERNEL=="video1394-[0-9]*", ENV{ACL_MANAGE}="1" ++ + # fingerprint readers + SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", ENV{ACL_MANAGE}="1" + diff --git a/udev.spec b/udev.spec index 583ca17..021cf34 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -27,6 +27,11 @@ Patch7: udev-141-cpu-online.patch Patch8: udev-145-hid2hci-backport.patch Patch9: udev-145-modem-modeswitch.patch Patch10: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch +Patch11: udev-145-rename.patch +Patch12: udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch +Patch13: udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch +Patch14: udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch +Patch15: udev-147-virtio.patch Source1: start_udev Source3: udev-post.init @@ -125,8 +130,13 @@ glib-based applications using libudev functionality. %patch6 -p1 -b .ck041 %patch7 -p1 %patch8 -p1 -b .hid2hci -%patch9 -p1 +%patch9 -p1 -b .modesw %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 autoreconf -i automake @@ -160,13 +170,13 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id -ln -sf ../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo -ln -sf ../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest -ln -sf ../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest +ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor -ln -sf ../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger -ln -sf ../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle -ln -sf ../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol +ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevtrigger +ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevsettle +ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevcontrol for i in \ rules/redhat/40-redhat.rules \ @@ -344,12 +354,10 @@ rm -rf $RPM_BUILD_ROOT %files -n libudev %defattr(0644, root, root, 0755) -%doc COPYING %attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel %defattr(0644, root, root, 0755) -%doc COPYING %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc @@ -358,13 +366,11 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) -%doc COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel %defattr(0644, root, root, 0755) -%doc COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir @@ -373,6 +379,20 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Mar 17 2010 Harald Hoyer 145-16 +- let cdrom_id use O_EXCL (#566535) +- fix interface rename bug (#531074 #544357) +- remove GPL COPYING file from LGPL subpackages (#536843) +- create /dev/hugepages subdir in start_udev (#541998) +- fix brightness keys on MSI Wind U-100 (#563453) +- fix dangling symlinks (#566680) +- remove erroneous 19d2:2000 modeswitch rule (#569296) +- add firewire video devices (#559581) +- touch all device nodes after udev settled for the timezone + timestamp (#569335) +- removed one modem-modeswitch line (#574949) +- add virtio symlinks + * Tue Jan 26 2010 Harald Hoyer 145-15 - removed one modem-modeswitch line (#541686) - added one modem-modeswitch line (#547759) From 977de72a58f265f8bc8d6376bb3b64d44ac5ace7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Mar 2010 12:48:14 +0000 Subject: [PATCH 543/640] - add patch for virtio-ports (#569700) - own libgudev dirs (#561319) - minor udev startup script improvements (#549518) - create /dev/hugepages subdir in start_udev (#541998) - remove GPL COPYING file from LGPL subpackages (#536843) - removed symlinks to udevadm - touch all device nodes after udev settled for the timezone timestamp (#569335) - add some upstream bugfixes --- ...or-reporting-on-missing-firmware-fil.patch | 43 + ...eymap-Add-Dell-Inspiron-1011-Mini-10.patch | 26 + ...ix-brightness-keys-on-MSI-Wind-U-100.patch | 37 + ...ort-for-Gateway-AOA110-AOA150-clones.patch | 29 + 0005-keymap-Fix-LG-X110.patch | 64 + ...e-for-volume-keys-on-Dell-Studio-155.patch | 55 + 0007-keymap-Add-Toshiba-Satellite-M30X.patch | 55 + ...amsung-Q210-P210-force-release-quirk.patch | 30 + ...tsu-Amilo-1848-u-force-release-quirk.patch | 53 + ...er-size-when-advancing-past-NUL-byte.patch | 29 + ...ZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch | 26 + ...se-UTIL_LINE_SIZE-from-2048-to-16384.patch | 37 + ...rts-rule-to-use-attr-instead-of-ATTR.patch | 29 + ...cl-Correctly-handle-ENV-ACL_MANAGE-0.patch | 47 + 0021-input_id-Fix-linking.patch | 27 + 0022-replace-utimes-with-utimensat.patch | 34 + ...sible-segfault-when-firmware-device-.patch | 40 + ...create-by-path-links-for-pci-devices.patch | 25 + ...gitech-bluetooth-adapters-into-hci-m.patch | 29 + ...inux-context-when-the-node-was-not-t.patch | 88 + ...dd-LGPL-COPYING-to-libudev-and-GUdev.patch | 1035 ++++++++ ...on-mounted-optical-media-with-O_EXCL.patch | 58 + ...-into-tool-that-only-switches-Mobile.patch | 2142 +++++++++++++++++ start_udev | 30 +- udev-151-3.patch | 89 + udev-151-virtio.patch | 30 + udev-post.init | 4 +- udev.spec | 180 +- 28 files changed, 4295 insertions(+), 76 deletions(-) create mode 100644 0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch create mode 100644 0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch create mode 100644 0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch create mode 100644 0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch create mode 100644 0005-keymap-Fix-LG-X110.patch create mode 100644 0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch create mode 100644 0007-keymap-Add-Toshiba-Satellite-M30X.patch create mode 100644 0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch create mode 100644 0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch create mode 100644 0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch create mode 100644 0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch create mode 100644 0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch create mode 100644 0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch create mode 100644 0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch create mode 100644 0021-input_id-Fix-linking.patch create mode 100644 0022-replace-utimes-with-utimensat.patch create mode 100644 0029-firmware-fix-possible-segfault-when-firmware-device-.patch create mode 100644 0030-rules-input-create-by-path-links-for-pci-devices.patch create mode 100644 0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch create mode 100644 0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch create mode 100644 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch create mode 100644 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch create mode 100644 0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch create mode 100644 udev-151-3.patch create mode 100644 udev-151-virtio.patch diff --git a/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch b/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch new file mode 100644 index 0000000..933407f --- /dev/null +++ b/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch @@ -0,0 +1,43 @@ +From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Sun, 31 Jan 2010 13:49:02 +0100 +Subject: [PATCH 01/36] firmware: fix error reporting on missing firmware files + +The new firmware loader does not report an error to the kernel if a firmware file +is missing. This results in modprobe stalling for 60 seconds for each firmware +a module tries to load. +--- + extras/firmware/firmware.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c +index 8f70be4..16455de 100644 +--- a/extras/firmware/firmware.c ++++ b/extras/firmware/firmware.c +@@ -149,6 +149,7 @@ int main(int argc, char **argv) + + util_path_encode(firmware, fwencpath, sizeof(fwencpath)); + util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL); ++ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); + + if (fwfile == NULL) { + int err; +@@ -166,6 +167,7 @@ int main(int argc, char **argv) + udev_selinux_resetfscreatecon(udev); + } while (err == -ENOENT); + rc = 2; ++ set_loading(udev, loadpath, "-1"); + goto exit; + } + +@@ -176,7 +178,6 @@ int main(int argc, char **argv) + if (unlink(misspath) == 0) + util_delete_path(udev, misspath); + +- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); + set_loading(udev, loadpath, "1"); + + util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); +-- +1.6.6 + diff --git a/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch b/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch new file mode 100644 index 0000000..47cc9fa --- /dev/null +++ b/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch @@ -0,0 +1,26 @@ +From fc47e0b56779ceeaaa40d2dc3248fa002af63aaa Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Mon, 1 Feb 2010 15:27:46 -0800 +Subject: [PATCH 02/36] keymap: Add Dell Inspiron 1011 (Mini 10) + +This fixes the broken WLAN key. +--- + extras/keymap/95-keymap.rules | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 2b1c4bd..51c8c3b 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -53,6 +53,8 @@ GOTO="keyboard_end" + LABEL="keyboard_vendorcheck" + + ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" ++ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan" ++ + ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" + + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000" +-- +1.6.6 + diff --git a/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch b/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch new file mode 100644 index 0000000..c00f51e --- /dev/null +++ b/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch @@ -0,0 +1,37 @@ +From d7e2d38c1f0ead2239808dd117577a99a3ad3cde Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 9 Feb 2010 15:47:47 +0100 +Subject: [PATCH 03/36] Fix brightness keys on MSI Wind U-100 + +The MSI Wind 100 generates ACPI/input events on the LNXVIDEO input device. On +top of that, the video module/BIOS synthesize some extra event on atkbd as an +echo of actually changing the brightness. + +Ignore the wrong and useless atkbd ones, to avoid event loops. + +Many thanks to Hans de Goede for tracking this down! + +https://launchpad.net/bugs/415023 +--- + extras/keymap/95-keymap.rules | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 51c8c3b..684619b 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -98,6 +98,11 @@ ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $ + + ENV{DMI_VENDOR}=="MICRO-STAR*", RUN+="keymap $name micro-star" + ++# some MSI models generate ACPI/input events on the LNXVIDEO input devices, ++# plus some extra synthesized ones on atkbd as an echo of actually changing the ++# brightness; so ignore those atkbd ones, to avoid loops ++ENV{DMI_VENDOR}=="MICRO-STAR*", ATTR{[dmi/id]product_name}=="*U-100*|*U100*|*N033", RUN+="keymap $name 0xF7 reserved 0xF8 reserved" ++ + ENV{DMI_VENDOR}=="INVENTEC", ATTR{[dmi/id]product_name}=="SYMPHONY 6.0/7.0", RUN+="keymap $name inventec-symphony_6.0_7.0" + + ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000" +-- +1.6.6 + diff --git a/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch b/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch new file mode 100644 index 0000000..a7167c4 --- /dev/null +++ b/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch @@ -0,0 +1,29 @@ +From 063985ef7dd6050f33920700777831426b221697 Mon Sep 17 00:00:00 2001 +From: Robert Hooker +Date: Sun, 7 Feb 2010 13:56:27 -0500 +Subject: [PATCH 04/36] keymap: Add support for Gateway AOA110/AOA150 clones. + +https://launchpad.net/bugs/518496 + +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keymap.rules | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 684619b..d3690bb 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -71,6 +71,9 @@ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*" + # HP Pavillion dv6315ea has empty DMI_VENDOR + ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play + ++# Gateway clone of Acer Aspire One AOA110/AOA150 ++ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer" ++ + ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" +-- +1.6.6 + diff --git a/0005-keymap-Fix-LG-X110.patch b/0005-keymap-Fix-LG-X110.patch new file mode 100644 index 0000000..380ecf0 --- /dev/null +++ b/0005-keymap-Fix-LG-X110.patch @@ -0,0 +1,64 @@ +From 4c514e31734a704ca58e543fa4330616ba584b39 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Fri, 12 Feb 2010 19:25:47 +0100 +Subject: [PATCH 05/36] keymap: Fix LG X110 + +The LG X110 is not a perfect clone of the MSI Wind after all, and needs its own +keymap. Thanks to Konstantin Lavrov! + +https://launchpad.net/bugs/520650 +--- + Makefile.am | 1 + + extras/keymap/95-keymap.rules | 3 +-- + extras/keymap/keymaps/lg-x110 | 12 ++++++++++++ + 3 files changed, 14 insertions(+), 2 deletions(-) + create mode 100644 extras/keymap/keymaps/lg-x110 + +diff --git a/Makefile.am b/Makefile.am +index 728076a..069bf7f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -518,6 +518,7 @@ dist_udevkeymap_DATA = \ + extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \ + extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \ + extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \ ++ extras/keymap/keymaps/lg-x110 \ + extras/keymap/keymaps/logitech-wave \ + extras/keymap/keymaps/logitech-wave-cordless \ + extras/keymap/keymaps/maxdata-pro_7000 \ +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index d3690bb..fcd42aa 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -93,8 +93,7 @@ ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*Amilo Si 1520*", RUN+ + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="AMILO*M*", RUN+="keymap $name 0x97 prog2 0x9F prog1" + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="Amilo Li 1718", RUN+="keymap $name 0xD6 wlan" + +-# MSI Wind clone +-ENV{DMI_VENDOR}=="LG*", ATTR{[dmi/id]product_name}=="*X110*", RUN+="keymap $name micro-star" ++ENV{DMI_VENDOR}=="LG*", ATTR{[dmi/id]product_name}=="*X110*", RUN+="keymap $name lg-x110" + + ENV{DMI_VENDOR}=="MEDION*", ATTR{[dmi/id]product_name}=="*FID2060*", RUN+="keymap $name medion-fid2060" + ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $name medionnb-a555" +diff --git a/extras/keymap/keymaps/lg-x110 b/extras/keymap/keymaps/lg-x110 +new file mode 100644 +index 0000000..a61cf3d +--- /dev/null ++++ b/extras/keymap/keymaps/lg-x110 +@@ -0,0 +1,12 @@ ++0xA0 mute # Fn-F9 ++0xAE volumedown # Fn-Left ++0xAF search # Fn-F3 ++0xB0 volumeup # Fn-Right ++0xB1 battery # Fn-F10 Info ++0xB3 suspend # Fn-F12 ++0xDF sleep # Fn-F4 ++# 0xE2 bluetooth # satellite dish2 ++0xE4 f22 # Fn-F5 Touchpad disable ++0xF6 wlan # Fn-F6 ++0xF7 reserved # brightnessdown # Fn-Down ++0xF8 reserved # brightnessup # Fn-Up +\ No newline at end of file +-- +1.6.6 + diff --git a/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch b/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch new file mode 100644 index 0000000..2f147fc --- /dev/null +++ b/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch @@ -0,0 +1,55 @@ +From b15bb8019094797aee65f35e3e654354b61bfd7b Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Fri, 12 Feb 2010 18:08:08 -0600 +Subject: [PATCH 06/36] Force key release for volume keys on Dell Studio 1557 + +Dell Studio 1557 does not generate a release code when the volume keys +are pressed, causing them to generate infinite key presses. This forces +key release of these keys. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + Makefile.am | 3 ++- + extras/keymap/95-keyboard-force-release.rules | 2 ++ + extras/keymap/force-release-maps/dell-studio-1557 | 3 +++ + 3 files changed, 7 insertions(+), 1 deletions(-) + create mode 100755 extras/keymap/force-release-maps/dell-studio-1557 + +diff --git a/Makefile.am b/Makefile.am +index 069bf7f..1b4e2ea 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -541,7 +541,8 @@ dist_udevkeymap_DATA = \ + + udevkeymapforcereldir = $(libexecdir)/keymaps/force-release + dist_udevkeymapforcerel_DATA = \ +- extras/keymap/force-release-maps/samsung-other ++ extras/keymap/force-release-maps/samsung-other \ ++ extras/keymap/force-release-maps/dell-studio-1557 + + extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h + mkdir -p extras/keymap +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index 689afe9..659ee95 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -21,4 +21,6 @@ ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" + + ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*", RUN+="keyboard-force-release.sh $devpath samsung-other" + ++ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" ++ + LABEL="force_release_end" +diff --git a/extras/keymap/force-release-maps/dell-studio-1557 b/extras/keymap/force-release-maps/dell-studio-1557 +new file mode 100755 +index 0000000..1718673 +--- /dev/null ++++ b/extras/keymap/force-release-maps/dell-studio-1557 +@@ -0,0 +1,3 @@ ++0xa0 #mute ++0xae #volume up ++0xb0 #volume down +-- +1.6.6 + diff --git a/0007-keymap-Add-Toshiba-Satellite-M30X.patch b/0007-keymap-Add-Toshiba-Satellite-M30X.patch new file mode 100644 index 0000000..4d17c00 --- /dev/null +++ b/0007-keymap-Add-Toshiba-Satellite-M30X.patch @@ -0,0 +1,55 @@ +From 4ca91a04e8b727a079a973fdd9bc2b093e8315a5 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Mon, 15 Feb 2010 13:15:25 +0100 +Subject: [PATCH 07/36] keymap: Add Toshiba Satellite M30X + +Thanks to Alessio Gaeta! + +https://launchpad.net/bugs/510019 +--- + Makefile.am | 1 + + extras/keymap/95-keymap.rules | 1 + + extras/keymap/keymaps/toshiba-satellite_m30x | 7 +++++++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 extras/keymap/keymaps/toshiba-satellite_m30x + +diff --git a/Makefile.am b/Makefile.am +index 1b4e2ea..db23f16 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -537,6 +537,7 @@ dist_udevkeymap_DATA = \ + extras/keymap/keymaps/samsung-sx20s \ + extras/keymap/keymaps/toshiba-satellite_a100 \ + extras/keymap/keymaps/toshiba-satellite_a110 \ ++ extras/keymap/keymaps/toshiba-satellite_m30x \ + extras/keymap/keymaps/zepto-znote + + udevkeymapforcereldir = $(libexecdir)/keymaps/force-release +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index fcd42aa..65b0d6e 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -115,6 +115,7 @@ ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="S + + ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="SATELLITE A100", RUN+="keymap $name toshiba-satellite_a100" + ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite A110", RUN+="keymap $name toshiba-satellite_a110" ++ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+="keymap $name toshiba-satellite_m30x" + + ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2" + +diff --git a/extras/keymap/keymaps/toshiba-satellite_m30x b/extras/keymap/keymaps/toshiba-satellite_m30x +new file mode 100644 +index 0000000..cf6d912 +--- /dev/null ++++ b/extras/keymap/keymaps/toshiba-satellite_m30x +@@ -0,0 +1,7 @@ ++0xef brightnessdown ++0xd9 brightnessup ++0xee screenlock ++0x93 media ++0x9e prog1 #touchpad_enable ++0x9f prog2 #touchpad_disable ++ +-- +1.6.6 + diff --git a/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch b/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch new file mode 100644 index 0000000..328a2b4 --- /dev/null +++ b/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch @@ -0,0 +1,30 @@ +From 20b48c3727eef1f266cbfd6bf5854b5c1419beb9 Mon Sep 17 00:00:00 2001 +From: Andy Whitcroft +Date: Tue, 2 Mar 2010 13:55:03 +0100 +Subject: [PATCH 13/36] keymap: Add Samsung Q210/P210 force-release quirk + +The Samsung Q210/P210 laptop also needs all of its function keys quirked. + +https://launchpad.net/bugs/530093 + +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keyboard-force-release.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index 659ee95..48b896d 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -19,7 +19,7 @@ DRIVER!="atkbd", GOTO="force_release_end" + ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" + + +-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*", RUN+="keyboard-force-release.sh $devpath samsung-other" ++ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other" + + ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" + +-- +1.6.6 + diff --git a/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch b/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch new file mode 100644 index 0000000..9bedd1e --- /dev/null +++ b/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch @@ -0,0 +1,53 @@ +From da96a11b9c9164447bef206db47c405342ab8daa Mon Sep 17 00:00:00 2001 +From: Andy Whitcroft +Date: Tue, 2 Mar 2010 14:00:32 +0100 +Subject: [PATCH 14/36] keymap: Add Fujitsu Amilo 1848+u force-release quirk + +The Fujitsu Amilo Si 1848+u laptop requires the volume and mute keys +quirking. + +https://launchpad.net/bugs/530089 + +Signed-off-by: Martin Pitt +--- + Makefile.am | 1 + + extras/keymap/95-keyboard-force-release.rules | 2 ++ + .../keymap/force-release-maps/fujitsu-amilo-si1848 | 3 +++ + 3 files changed, 6 insertions(+), 0 deletions(-) + create mode 100644 extras/keymap/force-release-maps/fujitsu-amilo-si1848 + +diff --git a/Makefile.am b/Makefile.am +index 3780f50..471c5dd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -543,6 +543,7 @@ dist_udevkeymap_DATA = \ + udevkeymapforcereldir = $(libexecdir)/keymaps/force-release + dist_udevkeymapforcerel_DATA = \ + extras/keymap/force-release-maps/samsung-other \ ++ extras/keymap/force-release-maps/fujitsu-amilo-si1848 \ + extras/keymap/force-release-maps/dell-studio-1557 + + extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index 48b896d..28639a5 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -23,4 +23,6 @@ ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="* + + ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" + ++ENV{DMI_VENDOR}=="FUJITSU SIEMENS", ATTR{[dmi/id]product_name}=="AMILO Si 1848+u", RUN+="keyboard-force-release.sh $devpath fujitsu-amilo-si1848" ++ + LABEL="force_release_end" +diff --git a/extras/keymap/force-release-maps/fujitsu-amilo-si1848 b/extras/keymap/force-release-maps/fujitsu-amilo-si1848 +new file mode 100644 +index 0000000..1718673 +--- /dev/null ++++ b/extras/keymap/force-release-maps/fujitsu-amilo-si1848 +@@ -0,0 +1,3 @@ ++0xa0 #mute ++0xae #volume up ++0xb0 #volume down +-- +1.6.6 + diff --git a/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch b/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch new file mode 100644 index 0000000..4ad5dce --- /dev/null +++ b/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch @@ -0,0 +1,29 @@ +From ecd42de2c56b4fcf0069b8b4a4d6607710e5de61 Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Tue, 2 Mar 2010 17:06:33 -0500 +Subject: [PATCH 15/36] Decrease buffer size when advancing past NUL byte + +Otherwise we'll overflow the buffer if space is tight. Also add a comment explaining this. + +Signed-off-by: David Zeuthen +--- + libudev/libudev-device.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 71fc775..4f42aa2 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -1166,7 +1166,9 @@ static int update_envp_monitor_buf(struct udev_device *udev_device) + l = util_strpcpyl(&s, l, key, "=", udev_list_entry_get_value(list_entry), NULL); + if (l == 0) + return -EINVAL; ++ /* advance past the trailing '\0' that util_strpcpyl() guarantees */ + s++; ++ l--; + } + udev_device->envp[i] = NULL; + udev_device->monitor_buf_len = s - udev_device->monitor_buf; +-- +1.6.6 + diff --git a/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch b/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch new file mode 100644 index 0000000..174767d --- /dev/null +++ b/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch @@ -0,0 +1,26 @@ +From 3a19299202b5d34b89d5910fde25e8a4cfa2b31a Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Tue, 2 Mar 2010 17:07:14 -0500 +Subject: [PATCH 16/36] Use UTIL_LINE_SIZE, not UTIL_PATH_SIZE to truncate properties + +Signed-off-by: David Zeuthen +--- + libudev/libudev-device.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 4f42aa2..b841745 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -1089,7 +1089,7 @@ struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device + + struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property) + { +- char name[UTIL_PATH_SIZE]; ++ char name[UTIL_LINE_SIZE]; + char *val; + + util_strscpy(name, sizeof(name), property); +-- +1.6.6 + diff --git a/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch b/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch new file mode 100644 index 0000000..802351e --- /dev/null +++ b/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch @@ -0,0 +1,37 @@ +From e32d5237ea045045c621edba7341631abd602d74 Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Tue, 2 Mar 2010 17:10:02 -0500 +Subject: [PATCH 17/36] Increase UTIL_LINE_SIZE from 2048 to 16384 + +Recent udisks versions, for LVM2 integration, ships with probers that +produce very long lines such as + +UDISKS_LVM2_PV_VG_PV_LIST= + uuid=98lyZl-Ya7U-p26Z-Ia7b-xf8u-xZqP-jc4njb;size=2000397795328;allocated_size=2000397795328 + uuid=iFs0cM-sxCF-ceQK-hZl1-kbwo-ZTjq-gSewQR;size=2000397795328;allocated_size=2000397795328 + [...] + +e.g. roughly 100 bytes per LVM2 physical volume for each LVM2 +PV encountered. + +Signed-off-by: David Zeuthen +--- + libudev/libudev-private.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 0d28b80..e0c51dc 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -187,7 +187,7 @@ int udev_queue_export_device_failed(struct udev_queue_export *udev_queue_export, + /* libudev-util.c */ + #define UTIL_PATH_SIZE 1024 + #define UTIL_NAME_SIZE 512 +-#define UTIL_LINE_SIZE 2048 ++#define UTIL_LINE_SIZE 16384 + #define UDEV_ALLOWED_CHARS_INPUT "/ $%?," + ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath, char *subsystem, size_t size); + ssize_t util_get_sys_driver(struct udev *udev, const char *syspath, char *driver, size_t size); +-- +1.6.6 + diff --git a/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch b/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch new file mode 100644 index 0000000..f02f3f0 --- /dev/null +++ b/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch @@ -0,0 +1,29 @@ +From 3c4b1738a9d591d7ddce361ea184b76b253c4e87 Mon Sep 17 00:00:00 2001 +From: Amit Shah +Date: Fri, 26 Feb 2010 14:05:41 +0530 +Subject: [PATCH 18/36] Fix virtio-ports rule to use $attr instead of $ATTR + +Newer udev versions don't understand $ATTR. + +Signed-off-by: Amit Shah +Signed-off-by: Martin Pitt +--- + rules/rules.d/50-udev-default.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index f8556d1..da1535f 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout" + KERNEL=="hvc*|hvsi*", GROUP="dialout" + + # virtio serial / console ports +-KERNEL=="vport*", SYMLINK+="virtio-ports/$ATTR{name}" ++KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" + + # mem + KERNEL=="null|zero|full|random|urandom", MODE="0666" +-- +1.6.6 + diff --git a/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch b/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch new file mode 100644 index 0000000..29f81f1 --- /dev/null +++ b/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch @@ -0,0 +1,47 @@ +From 5c3ebbf35a2c101e0212c7066f0d65e457fcf40c Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 4 Mar 2010 00:48:59 +0100 +Subject: [PATCH 19/36] udev-acl: Correctly handle ENV{ACL_MANAGE}==0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When a custom rule sets ACL_MANAGE to 0 to disable ACL management for a +particular device, handle this as "disabled", by explicitly checking against +"1" instead of "nonempty". + +Thanks to Rafał Rzepecki for pointing this out. +--- + extras/udev-acl/70-acl.rules | 2 +- + extras/udev-acl/udev-acl.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index 8380f53..874667c 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -69,7 +69,7 @@ SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", ENV{ACL_MANAG + ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1" + + # apply ACL for all locally logged in users +-LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \ ++LABEL="acl_apply", ENV{ACL_MANAGE}=="1", TEST=="/var/run/ConsoleKit/database", \ + RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}" + + LABEL="acl_end" +diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c +index e670ce7..c070fcc 100644 +--- a/extras/udev-acl/udev-acl.c ++++ b/extras/udev-acl/udev-acl.c +@@ -289,7 +289,7 @@ static void apply_acl_to_devices(uid_t uid, int add) + /* iterate over all devices tagged with ACL_SET */ + udev = udev_new(); + enumerate = udev_enumerate_new(udev); +- udev_enumerate_add_match_property(enumerate, "ACL_MANAGE", "*"); ++ udev_enumerate_add_match_property(enumerate, "ACL_MANAGE", "1"); + udev_enumerate_scan_devices(enumerate); + udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) { + struct udev_device *device; +-- +1.6.6 + diff --git a/0021-input_id-Fix-linking.patch b/0021-input_id-Fix-linking.patch new file mode 100644 index 0000000..2e822bc --- /dev/null +++ b/0021-input_id-Fix-linking.patch @@ -0,0 +1,27 @@ +From a245a97b4e805c65ce22659742371550ccf002c1 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Wed, 10 Mar 2010 12:17:03 +0100 +Subject: [PATCH 21/36] input_id: Fix linking + +Link against libudev-private.a instead of libudev.a, to avoid runtime +dependency to libudev. +--- + Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 471c5dd..99a0133 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -239,7 +239,7 @@ dist_udevrules_DATA += extras/floppy/60-floppy.rules + # input_id - import input device class + # ------------------------------------------------------------------------------ + extras_input_id_input_id_SOURCES = extras/input_id/input_id.c +-extras_input_id_input_id_LDADD = libudev/libudev.la ++extras_input_id_input_id_LDADD = libudev/libudev-private.la + libexec_PROGRAMS += extras/input_id/input_id + + # ------------------------------------------------------------------------------ +-- +1.6.6 + diff --git a/0022-replace-utimes-with-utimensat.patch b/0022-replace-utimes-with-utimensat.patch new file mode 100644 index 0000000..7a42304 --- /dev/null +++ b/0022-replace-utimes-with-utimensat.patch @@ -0,0 +1,34 @@ +From 455f792e4791e037eb0406005b92c345cf0baf56 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 10 Mar 2010 14:43:07 +0100 +Subject: [PATCH 22/36] replace utimes() with utimensat() + +--- + udev/udev-node.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/udev/udev-node.c b/udev/udev-node.c +index a70c147..307a76b 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -57,7 +57,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod + preserve = 1; + udev_selinux_lsetfilecon(udev, file, mode); + /* update time stamp when we re-use the node, like on media change events */ +- utimes(file, NULL); ++ utimensat(AT_FDCWD, file, NULL, 0); + } else { + char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)]; + +@@ -178,7 +178,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + info(udev, "preserve already existing symlink '%s' to '%s'\n", + slink, target); + udev_selinux_lsetfilecon(udev, slink, S_IFLNK); +- lutimes(slink, NULL); ++ utimensat(AT_FDCWD, slink, NULL, AT_SYMLINK_NOFOLLOW); + goto exit; + } + } +-- +1.6.6 + diff --git a/0029-firmware-fix-possible-segfault-when-firmware-device-.patch b/0029-firmware-fix-possible-segfault-when-firmware-device-.patch new file mode 100644 index 0000000..05c1939 --- /dev/null +++ b/0029-firmware-fix-possible-segfault-when-firmware-device-.patch @@ -0,0 +1,40 @@ +From d44c27c5ab71dbbcfcf4745977027502309dd795 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 16 Mar 2010 10:57:44 +0100 +Subject: [PATCH 29/36] firmware: fix possible segfault when firmware device goes away while loading + +Thanks to Ruediger Oertel. +--- + extras/firmware/firmware.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c +index 16455de..92f0918 100644 +--- a/extras/firmware/firmware.c ++++ b/extras/firmware/firmware.c +@@ -63,8 +63,10 @@ static bool copy_firmware(struct udev *udev, const char *source, const char *tar + if (fwrite(buf, size, 1, ftarget) == 1) + ret = true; + exit: +- fclose(ftarget); +- fclose(fsource); ++ if (ftarget != NULL) ++ fclose(ftarget); ++ if (fsource != NULL) ++ fclose(fsource); + free(buf); + return ret; + } +@@ -178,7 +180,8 @@ int main(int argc, char **argv) + if (unlink(misspath) == 0) + util_delete_path(udev, misspath); + +- set_loading(udev, loadpath, "1"); ++ if (!set_loading(udev, loadpath, "1")) ++ goto exit; + + util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); + if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) { +-- +1.6.6 + diff --git a/0030-rules-input-create-by-path-links-for-pci-devices.patch b/0030-rules-input-create-by-path-links-for-pci-devices.patch new file mode 100644 index 0000000..c35bd60 --- /dev/null +++ b/0030-rules-input-create-by-path-links-for-pci-devices.patch @@ -0,0 +1,25 @@ +From 6b32e8192934619f787c3b5b6f0fe40c32d7d94a Mon Sep 17 00:00:00 2001 +From: Marco d'Itri +Date: Tue, 16 Mar 2010 12:44:43 +0100 +Subject: [PATCH 30/36] rules: input - create by-path/ links for pci devices + +--- + rules/rules.d/60-persistent-input.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules +index e4675ae..1ea4431 100644 +--- a/rules/rules.d/60-persistent-input.rules ++++ b/rules/rules.d/60-persistent-input.rules +@@ -27,7 +27,7 @@ SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", A + SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}" + + # by-path +-SUBSYSTEMS=="usb|platform", IMPORT{program}="path_id %p" ++SUBSYSTEMS=="pci|usb|platform", IMPORT{program}="path_id %p" + ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{.INPUT_CLASS}" + ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{.INPUT_CLASS}" + # allow empty class for platform and usb devices; platform supports only a single interface that way +-- +1.6.6 + diff --git a/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch b/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch new file mode 100644 index 0000000..a773b94 --- /dev/null +++ b/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch @@ -0,0 +1,29 @@ +From 2b463cb050cbf77d9c6b51e0f5a9d89bf7eb1bc3 Mon Sep 17 00:00:00 2001 +From: Marco d'Itri +Date: Tue, 16 Mar 2010 12:47:42 +0100 +Subject: [PATCH 31/36] Fix switching Logitech bluetooth adapters into hci mode. + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567237 +https://bugs.launchpad.net/ubuntu/+source/udev/+bug/444420 +--- + extras/hid2hci/70-hid2hci.rules | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules +index e133afd..01ff30d 100644 +--- a/extras/hid2hci/70-hid2hci.rules ++++ b/extras/hid2hci/70-hid2hci.rules +@@ -10,8 +10,8 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt + ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ + RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" + +-# Logitech devices (hidraw) +-KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ ++# Logitech devices ++KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ + RUN+="hid2hci --method=logitech-hid --devpath=%p" + + ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" +-- +1.6.6 + diff --git a/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch b/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch new file mode 100644 index 0000000..ca136bd --- /dev/null +++ b/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch @@ -0,0 +1,88 @@ +From 578cc8a8085a47c963b5940459e475ac5f07219c Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 17 Mar 2010 09:15:18 +0100 +Subject: [PATCH 32/36] do not reset SELinux context when the node was not touched + +--- + udev/udev-node.c | 42 +++++++++++++++++------------------------- + 1 files changed, 17 insertions(+), 25 deletions(-) + +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 4314cce..3aee15b 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -37,7 +37,6 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod + { + struct udev *udev = udev_device_get_udev(dev); + struct stat stats; +- int preserve = 0; + int err = 0; + + if (major(devnum) == 0) +@@ -54,9 +53,15 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod + if (lstat(file, &stats) == 0) { + if (((stats.st_mode & S_IFMT) == (mode & S_IFMT)) && (stats.st_rdev == devnum)) { + info(udev, "preserve file '%s', because it has correct dev_t\n", file); +- preserve = 1; +- udev_selinux_lsetfilecon(udev, file, mode); +- /* update time stamp when we re-use the node, like on media change events */ ++ if (stats.st_mode != mode || stats.st_uid != uid || stats.st_gid != gid) { ++ info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); ++ chmod(file, mode); ++ chown(file, uid, gid); ++ udev_selinux_lsetfilecon(udev, file, mode); ++ } else { ++ info(udev, "preserve permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); ++ } ++ /* always update timestamp when we re-use the node, like on media change events */ + utimensat(AT_FDCWD, file, NULL, 0); + } else { + char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)]; +@@ -76,7 +81,11 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod + if (err != 0) { + err(udev, "rename(%s, %s) failed: %m\n", file_tmp, file); + unlink(file_tmp); ++ goto exit; + } ++ info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); ++ chmod(file, mode); ++ chown(file, uid, gid); + } + } else { + info(udev, "mknod(%s, %#o, (%u,%u))\n", file, mode, major(devnum), minor(devnum)); +@@ -90,28 +99,11 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod + err = -errno; + udev_selinux_resetfscreatecon(udev); + } while (err == -ENOENT); +- if (err != 0) { ++ if (err != 0) + err(udev, "mknod(%s, %#o, (%u,%u) failed: %m\n", file, mode, major(devnum), minor(devnum)); +- goto exit; +- } +- } +- +- if (!preserve || stats.st_mode != mode) { +- info(udev, "chmod(%s, %#o)\n", file, mode); +- err = chmod(file, mode); +- if (err != 0) { +- err(udev, "chmod(%s, %#o) failed: %m\n", file, mode); +- goto exit; +- } +- } +- +- if (!preserve || stats.st_uid != uid || stats.st_gid != gid) { +- info(udev, "chown(%s, %u, %u)\n", file, uid, gid); +- err = chown(file, uid, gid); +- if (err != 0) { +- err(udev, "chown(%s, %u, %u) failed: %m\n", file, uid, gid); +- goto exit; +- } ++ info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); ++ chmod(file, mode); ++ chown(file, uid, gid); + } + exit: + return err; +-- +1.6.6 + diff --git a/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch b/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch new file mode 100644 index 0000000..8440ea9 --- /dev/null +++ b/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch @@ -0,0 +1,1035 @@ +From 23325a66ccf3a2f90a4f5d1702f60408187de28a Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 18 Mar 2010 09:57:44 +0100 +Subject: [PATCH 34/36] add LGPL COPYING to libudev and GUdev + +--- + extras/gudev/COPYING | 504 ++++++++++++++++++++++++++++++++++++++++++++++++++ + libudev/COPYING | 504 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 1008 insertions(+), 0 deletions(-) + create mode 100644 extras/gudev/COPYING + create mode 100644 libudev/COPYING + +diff --git a/extras/gudev/COPYING b/extras/gudev/COPYING +new file mode 100644 +index 0000000..8add30a +--- /dev/null ++++ b/extras/gudev/COPYING +@@ -0,0 +1,504 @@ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ Version 2.1, February 1999 ++ ++ Copyright (C) 1991, 1999 Free Software Foundation, Inc. ++ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++[This is the first released version of the Lesser GPL. It also counts ++ as the successor of the GNU Library Public License, version 2, hence ++ the version number 2.1.] ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++Licenses are intended to guarantee your freedom to share and change ++free software--to make sure the software is free for all its users. ++ ++ This license, the Lesser General Public License, applies to some ++specially designated software packages--typically libraries--of the ++Free Software Foundation and other authors who decide to use it. You ++can use it too, but we suggest you first think carefully about whether ++this license or the ordinary General Public License is the better ++strategy to use in any particular case, based on the explanations below. ++ ++ When we speak of free software, we are referring to freedom of use, ++not price. Our General Public Licenses are designed to make sure that ++you have the freedom to distribute copies of free software (and charge ++for this service if you wish); that you receive source code or can get ++it if you want it; that you can change the software and use pieces of ++it in new free programs; and that you are informed that you can do ++these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++distributors to deny you these rights or to ask you to surrender these ++rights. These restrictions translate to certain responsibilities for ++you if you distribute copies of the library or if you modify it. ++ ++ For example, if you distribute copies of the library, whether gratis ++or for a fee, you must give the recipients all the rights that we gave ++you. You must make sure that they, too, receive or can get the source ++code. If you link other code with the library, you must provide ++complete object files to the recipients, so that they can relink them ++with the library after making changes to the library and recompiling ++it. And you must show them these terms so they know their rights. ++ ++ We protect your rights with a two-step method: (1) we copyright the ++library, and (2) we offer you this license, which gives you legal ++permission to copy, distribute and/or modify the library. ++ ++ To protect each distributor, we want to make it very clear that ++there is no warranty for the free library. Also, if the library is ++modified by someone else and passed on, the recipients should know ++that what they have is not the original version, so that the original ++author's reputation will not be affected by problems that might be ++introduced by others. ++ ++ Finally, software patents pose a constant threat to the existence of ++any free program. We wish to make sure that a company cannot ++effectively restrict the users of a free program by obtaining a ++restrictive license from a patent holder. Therefore, we insist that ++any patent license obtained for a version of the library must be ++consistent with the full freedom of use specified in this license. ++ ++ Most GNU software, including some libraries, is covered by the ++ordinary GNU General Public License. This license, the GNU Lesser ++General Public License, applies to certain designated libraries, and ++is quite different from the ordinary General Public License. We use ++this license for certain libraries in order to permit linking those ++libraries into non-free programs. ++ ++ When a program is linked with a library, whether statically or using ++a shared library, the combination of the two is legally speaking a ++combined work, a derivative of the original library. The ordinary ++General Public License therefore permits such linking only if the ++entire combination fits its criteria of freedom. The Lesser General ++Public License permits more lax criteria for linking other code with ++the library. ++ ++ We call this license the "Lesser" General Public License because it ++does Less to protect the user's freedom than the ordinary General ++Public License. It also provides other free software developers Less ++of an advantage over competing non-free programs. These disadvantages ++are the reason we use the ordinary General Public License for many ++libraries. However, the Lesser license provides advantages in certain ++special circumstances. ++ ++ For example, on rare occasions, there may be a special need to ++encourage the widest possible use of a certain library, so that it becomes ++a de-facto standard. To achieve this, non-free programs must be ++allowed to use the library. A more frequent case is that a free ++library does the same job as widely used non-free libraries. In this ++case, there is little to gain by limiting the free library to free ++software only, so we use the Lesser General Public License. ++ ++ In other cases, permission to use a particular library in non-free ++programs enables a greater number of people to use a large body of ++free software. For example, permission to use the GNU C Library in ++non-free programs enables many more people to use the whole GNU ++operating system, as well as its variant, the GNU/Linux operating ++system. ++ ++ Although the Lesser General Public License is Less protective of the ++users' freedom, it does ensure that the user of a program that is ++linked with the Library has the freedom and the wherewithal to run ++that program using a modified version of the Library. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. Pay close attention to the difference between a ++"work based on the library" and a "work that uses the library". The ++former contains code derived from the library, whereas the latter must ++be combined with the library in order to run. ++ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License Agreement applies to any software library or other ++program which contains a notice placed by the copyright holder or ++other authorized party saying it may be distributed under the terms of ++this Lesser General Public License (also called "this License"). ++Each licensee is addressed as "you". ++ ++ A "library" means a collection of software functions and/or data ++prepared so as to be conveniently linked with application programs ++(which use some of those functions and data) to form executables. ++ ++ The "Library", below, refers to any such software library or work ++which has been distributed under these terms. A "work based on the ++Library" means either the Library or any derivative work under ++copyright law: that is to say, a work containing the Library or a ++portion of it, either verbatim or with modifications and/or translated ++straightforwardly into another language. (Hereinafter, translation is ++included without limitation in the term "modification".) ++ ++ "Source code" for a work means the preferred form of the work for ++making modifications to it. For a library, complete source code means ++all the source code for all modules it contains, plus any associated ++interface definition files, plus the scripts used to control compilation ++and installation of the library. ++ ++ Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running a program using the Library is not restricted, and output from ++such a program is covered only if its contents constitute a work based ++on the Library (independent of the use of the Library in a tool for ++writing it). Whether that is true depends on what the Library does ++and what the program that uses the Library does. ++ ++ 1. You may copy and distribute verbatim copies of the Library's ++complete source code as you receive it, in any medium, provided that ++you conspicuously and appropriately publish on each copy an ++appropriate copyright notice and disclaimer of warranty; keep intact ++all the notices that refer to this License and to the absence of any ++warranty; and distribute a copy of this License along with the ++Library. ++ ++ You may charge a fee for the physical act of transferring a copy, ++and you may at your option offer warranty protection in exchange for a ++fee. ++ ++ 2. You may modify your copy or copies of the Library or any portion ++of it, thus forming a work based on the Library, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) The modified work must itself be a software library. ++ ++ b) You must cause the files modified to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ c) You must cause the whole of the work to be licensed at no ++ charge to all third parties under the terms of this License. ++ ++ d) If a facility in the modified Library refers to a function or a ++ table of data to be supplied by an application program that uses ++ the facility, other than as an argument passed when the facility ++ is invoked, then you must make a good faith effort to ensure that, ++ in the event an application does not supply such function or ++ table, the facility still operates, and performs whatever part of ++ its purpose remains meaningful. ++ ++ (For example, a function in a library to compute square roots has ++ a purpose that is entirely well-defined independent of the ++ application. Therefore, Subsection 2d requires that any ++ application-supplied function or table used by this function must ++ be optional: if the application does not supply it, the square ++ root function must still compute square roots.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Library, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Library, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote ++it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Library. ++ ++In addition, mere aggregation of another work not based on the Library ++with the Library (or with a work based on the Library) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may opt to apply the terms of the ordinary GNU General Public ++License instead of this License to a given copy of the Library. To do ++this, you must alter all the notices that refer to this License, so ++that they refer to the ordinary GNU General Public License, version 2, ++instead of to this License. (If a newer version than version 2 of the ++ordinary GNU General Public License has appeared, then you can specify ++that version instead if you wish.) Do not make any other change in ++these notices. ++ ++ Once this change is made in a given copy, it is irreversible for ++that copy, so the ordinary GNU General Public License applies to all ++subsequent copies and derivative works made from that copy. ++ ++ This option is useful when you wish to copy part of the code of ++the Library into a program that is not a library. ++ ++ 4. You may copy and distribute the Library (or a portion or ++derivative of it, under Section 2) in object code or executable form ++under the terms of Sections 1 and 2 above provided that you accompany ++it with the complete corresponding machine-readable source code, which ++must be distributed under the terms of Sections 1 and 2 above on a ++medium customarily used for software interchange. ++ ++ If distribution of object code is made by offering access to copy ++from a designated place, then offering equivalent access to copy the ++source code from the same place satisfies the requirement to ++distribute the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 5. A program that contains no derivative of any portion of the ++Library, but is designed to work with the Library by being compiled or ++linked with it, is called a "work that uses the Library". Such a ++work, in isolation, is not a derivative work of the Library, and ++therefore falls outside the scope of this License. ++ ++ However, linking a "work that uses the Library" with the Library ++creates an executable that is a derivative of the Library (because it ++contains portions of the Library), rather than a "work that uses the ++library". The executable is therefore covered by this License. ++Section 6 states terms for distribution of such executables. ++ ++ When a "work that uses the Library" uses material from a header file ++that is part of the Library, the object code for the work may be a ++derivative work of the Library even though the source code is not. ++Whether this is true is especially significant if the work can be ++linked without the Library, or if the work is itself a library. The ++threshold for this to be true is not precisely defined by law. ++ ++ If such an object file uses only numerical parameters, data ++structure layouts and accessors, and small macros and small inline ++functions (ten lines or less in length), then the use of the object ++file is unrestricted, regardless of whether it is legally a derivative ++work. (Executables containing this object code plus portions of the ++Library will still fall under Section 6.) ++ ++ Otherwise, if the work is a derivative of the Library, you may ++distribute the object code for the work under the terms of Section 6. ++Any executables containing that work also fall under Section 6, ++whether or not they are linked directly with the Library itself. ++ ++ 6. As an exception to the Sections above, you may also combine or ++link a "work that uses the Library" with the Library to produce a ++work containing portions of the Library, and distribute that work ++under terms of your choice, provided that the terms permit ++modification of the work for the customer's own use and reverse ++engineering for debugging such modifications. ++ ++ You must give prominent notice with each copy of the work that the ++Library is used in it and that the Library and its use are covered by ++this License. You must supply a copy of this License. If the work ++during execution displays copyright notices, you must include the ++copyright notice for the Library among them, as well as a reference ++directing the user to the copy of this License. Also, you must do one ++of these things: ++ ++ a) Accompany the work with the complete corresponding ++ machine-readable source code for the Library including whatever ++ changes were used in the work (which must be distributed under ++ Sections 1 and 2 above); and, if the work is an executable linked ++ with the Library, with the complete machine-readable "work that ++ uses the Library", as object code and/or source code, so that the ++ user can modify the Library and then relink to produce a modified ++ executable containing the modified Library. (It is understood ++ that the user who changes the contents of definitions files in the ++ Library will not necessarily be able to recompile the application ++ to use the modified definitions.) ++ ++ b) Use a suitable shared library mechanism for linking with the ++ Library. A suitable mechanism is one that (1) uses at run time a ++ copy of the library already present on the user's computer system, ++ rather than copying library functions into the executable, and (2) ++ will operate properly with a modified version of the library, if ++ the user installs one, as long as the modified version is ++ interface-compatible with the version that the work was made with. ++ ++ c) Accompany the work with a written offer, valid for at ++ least three years, to give the same user the materials ++ specified in Subsection 6a, above, for a charge no more ++ than the cost of performing this distribution. ++ ++ d) If distribution of the work is made by offering access to copy ++ from a designated place, offer equivalent access to copy the above ++ specified materials from the same place. ++ ++ e) Verify that the user has already received a copy of these ++ materials or that you have already sent this user a copy. ++ ++ For an executable, the required form of the "work that uses the ++Library" must include any data and utility programs needed for ++reproducing the executable from it. However, as a special exception, ++the materials to be distributed need not include anything that is ++normally distributed (in either source or binary form) with the major ++components (compiler, kernel, and so on) of the operating system on ++which the executable runs, unless that component itself accompanies ++the executable. ++ ++ It may happen that this requirement contradicts the license ++restrictions of other proprietary libraries that do not normally ++accompany the operating system. Such a contradiction means you cannot ++use both them and the Library together in an executable that you ++distribute. ++ ++ 7. You may place library facilities that are a work based on the ++Library side-by-side in a single library together with other library ++facilities not covered by this License, and distribute such a combined ++library, provided that the separate distribution of the work based on ++the Library and of the other library facilities is otherwise ++permitted, and provided that you do these two things: ++ ++ a) Accompany the combined library with a copy of the same work ++ based on the Library, uncombined with any other library ++ facilities. This must be distributed under the terms of the ++ Sections above. ++ ++ b) Give prominent notice with the combined library of the fact ++ that part of it is a work based on the Library, and explaining ++ where to find the accompanying uncombined form of the same work. ++ ++ 8. You may not copy, modify, sublicense, link with, or distribute ++the Library except as expressly provided under this License. Any ++attempt otherwise to copy, modify, sublicense, link with, or ++distribute the Library is void, and will automatically terminate your ++rights under this License. However, parties who have received copies, ++or rights, from you under this License will not have their licenses ++terminated so long as such parties remain in full compliance. ++ ++ 9. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Library or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Library (or any work based on the ++Library), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Library or works based on it. ++ ++ 10. Each time you redistribute the Library (or any work based on the ++Library), the recipient automatically receives a license from the ++original licensor to copy, distribute, link with or modify the Library ++subject to these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties with ++this License. ++ ++ 11. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Library at all. For example, if a patent ++license would not permit royalty-free redistribution of the Library by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Library. ++ ++If any portion of this section is held invalid or unenforceable under any ++particular circumstance, the balance of the section is intended to apply, ++and the section as a whole is intended to apply in other circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 12. If the distribution and/or use of the Library is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Library under this License may add ++an explicit geographical distribution limitation excluding those countries, ++so that distribution is permitted only in or among countries not thus ++excluded. In such case, this License incorporates the limitation as if ++written in the body of this License. ++ ++ 13. The Free Software Foundation may publish revised and/or new ++versions of the Lesser General Public License from time to time. ++Such new versions will be similar in spirit to the present version, ++but may differ in detail to address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Library ++specifies a version number of this License which applies to it and ++"any later version", you have the option of following the terms and ++conditions either of that version or of any later version published by ++the Free Software Foundation. If the Library does not specify a ++license version number, you may choose any version ever published by ++the Free Software Foundation. ++ ++ 14. If you wish to incorporate parts of the Library into other free ++programs whose distribution conditions are incompatible with these, ++write to the author to ask for permission. For software which is ++copyrighted by the Free Software Foundation, write to the Free ++Software Foundation; we sometimes make exceptions for this. Our ++decision will be guided by the two goals of preserving the free status ++of all derivatives of our free software and of promoting the sharing ++and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ++WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ++EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ++OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ++KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ++LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ++THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ++ ++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ++WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ++AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ++FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ++CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ++LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ++RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ++FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ++SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ++DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Libraries ++ ++ If you develop a new library, and you want it to be of the greatest ++possible use to the public, we recommend making it free software that ++everyone can redistribute and change. You can do so by permitting ++redistribution under these terms (or, alternatively, under the terms of the ++ordinary General Public License). ++ ++ To apply these terms, attach the following notices to the library. It is ++safest to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least the ++"copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the library, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the ++ library `Frob' (a library for tweaking knobs) written by James Random Hacker. ++ ++ , 1 April 1990 ++ Ty Coon, President of Vice ++ ++That's all there is to it! ++ ++ +diff --git a/libudev/COPYING b/libudev/COPYING +new file mode 100644 +index 0000000..8add30a +--- /dev/null ++++ b/libudev/COPYING +@@ -0,0 +1,504 @@ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ Version 2.1, February 1999 ++ ++ Copyright (C) 1991, 1999 Free Software Foundation, Inc. ++ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++[This is the first released version of the Lesser GPL. It also counts ++ as the successor of the GNU Library Public License, version 2, hence ++ the version number 2.1.] ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++Licenses are intended to guarantee your freedom to share and change ++free software--to make sure the software is free for all its users. ++ ++ This license, the Lesser General Public License, applies to some ++specially designated software packages--typically libraries--of the ++Free Software Foundation and other authors who decide to use it. You ++can use it too, but we suggest you first think carefully about whether ++this license or the ordinary General Public License is the better ++strategy to use in any particular case, based on the explanations below. ++ ++ When we speak of free software, we are referring to freedom of use, ++not price. Our General Public Licenses are designed to make sure that ++you have the freedom to distribute copies of free software (and charge ++for this service if you wish); that you receive source code or can get ++it if you want it; that you can change the software and use pieces of ++it in new free programs; and that you are informed that you can do ++these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++distributors to deny you these rights or to ask you to surrender these ++rights. These restrictions translate to certain responsibilities for ++you if you distribute copies of the library or if you modify it. ++ ++ For example, if you distribute copies of the library, whether gratis ++or for a fee, you must give the recipients all the rights that we gave ++you. You must make sure that they, too, receive or can get the source ++code. If you link other code with the library, you must provide ++complete object files to the recipients, so that they can relink them ++with the library after making changes to the library and recompiling ++it. And you must show them these terms so they know their rights. ++ ++ We protect your rights with a two-step method: (1) we copyright the ++library, and (2) we offer you this license, which gives you legal ++permission to copy, distribute and/or modify the library. ++ ++ To protect each distributor, we want to make it very clear that ++there is no warranty for the free library. Also, if the library is ++modified by someone else and passed on, the recipients should know ++that what they have is not the original version, so that the original ++author's reputation will not be affected by problems that might be ++introduced by others. ++ ++ Finally, software patents pose a constant threat to the existence of ++any free program. We wish to make sure that a company cannot ++effectively restrict the users of a free program by obtaining a ++restrictive license from a patent holder. Therefore, we insist that ++any patent license obtained for a version of the library must be ++consistent with the full freedom of use specified in this license. ++ ++ Most GNU software, including some libraries, is covered by the ++ordinary GNU General Public License. This license, the GNU Lesser ++General Public License, applies to certain designated libraries, and ++is quite different from the ordinary General Public License. We use ++this license for certain libraries in order to permit linking those ++libraries into non-free programs. ++ ++ When a program is linked with a library, whether statically or using ++a shared library, the combination of the two is legally speaking a ++combined work, a derivative of the original library. The ordinary ++General Public License therefore permits such linking only if the ++entire combination fits its criteria of freedom. The Lesser General ++Public License permits more lax criteria for linking other code with ++the library. ++ ++ We call this license the "Lesser" General Public License because it ++does Less to protect the user's freedom than the ordinary General ++Public License. It also provides other free software developers Less ++of an advantage over competing non-free programs. These disadvantages ++are the reason we use the ordinary General Public License for many ++libraries. However, the Lesser license provides advantages in certain ++special circumstances. ++ ++ For example, on rare occasions, there may be a special need to ++encourage the widest possible use of a certain library, so that it becomes ++a de-facto standard. To achieve this, non-free programs must be ++allowed to use the library. A more frequent case is that a free ++library does the same job as widely used non-free libraries. In this ++case, there is little to gain by limiting the free library to free ++software only, so we use the Lesser General Public License. ++ ++ In other cases, permission to use a particular library in non-free ++programs enables a greater number of people to use a large body of ++free software. For example, permission to use the GNU C Library in ++non-free programs enables many more people to use the whole GNU ++operating system, as well as its variant, the GNU/Linux operating ++system. ++ ++ Although the Lesser General Public License is Less protective of the ++users' freedom, it does ensure that the user of a program that is ++linked with the Library has the freedom and the wherewithal to run ++that program using a modified version of the Library. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. Pay close attention to the difference between a ++"work based on the library" and a "work that uses the library". The ++former contains code derived from the library, whereas the latter must ++be combined with the library in order to run. ++ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License Agreement applies to any software library or other ++program which contains a notice placed by the copyright holder or ++other authorized party saying it may be distributed under the terms of ++this Lesser General Public License (also called "this License"). ++Each licensee is addressed as "you". ++ ++ A "library" means a collection of software functions and/or data ++prepared so as to be conveniently linked with application programs ++(which use some of those functions and data) to form executables. ++ ++ The "Library", below, refers to any such software library or work ++which has been distributed under these terms. A "work based on the ++Library" means either the Library or any derivative work under ++copyright law: that is to say, a work containing the Library or a ++portion of it, either verbatim or with modifications and/or translated ++straightforwardly into another language. (Hereinafter, translation is ++included without limitation in the term "modification".) ++ ++ "Source code" for a work means the preferred form of the work for ++making modifications to it. For a library, complete source code means ++all the source code for all modules it contains, plus any associated ++interface definition files, plus the scripts used to control compilation ++and installation of the library. ++ ++ Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running a program using the Library is not restricted, and output from ++such a program is covered only if its contents constitute a work based ++on the Library (independent of the use of the Library in a tool for ++writing it). Whether that is true depends on what the Library does ++and what the program that uses the Library does. ++ ++ 1. You may copy and distribute verbatim copies of the Library's ++complete source code as you receive it, in any medium, provided that ++you conspicuously and appropriately publish on each copy an ++appropriate copyright notice and disclaimer of warranty; keep intact ++all the notices that refer to this License and to the absence of any ++warranty; and distribute a copy of this License along with the ++Library. ++ ++ You may charge a fee for the physical act of transferring a copy, ++and you may at your option offer warranty protection in exchange for a ++fee. ++ ++ 2. You may modify your copy or copies of the Library or any portion ++of it, thus forming a work based on the Library, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) The modified work must itself be a software library. ++ ++ b) You must cause the files modified to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ c) You must cause the whole of the work to be licensed at no ++ charge to all third parties under the terms of this License. ++ ++ d) If a facility in the modified Library refers to a function or a ++ table of data to be supplied by an application program that uses ++ the facility, other than as an argument passed when the facility ++ is invoked, then you must make a good faith effort to ensure that, ++ in the event an application does not supply such function or ++ table, the facility still operates, and performs whatever part of ++ its purpose remains meaningful. ++ ++ (For example, a function in a library to compute square roots has ++ a purpose that is entirely well-defined independent of the ++ application. Therefore, Subsection 2d requires that any ++ application-supplied function or table used by this function must ++ be optional: if the application does not supply it, the square ++ root function must still compute square roots.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Library, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Library, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote ++it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Library. ++ ++In addition, mere aggregation of another work not based on the Library ++with the Library (or with a work based on the Library) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may opt to apply the terms of the ordinary GNU General Public ++License instead of this License to a given copy of the Library. To do ++this, you must alter all the notices that refer to this License, so ++that they refer to the ordinary GNU General Public License, version 2, ++instead of to this License. (If a newer version than version 2 of the ++ordinary GNU General Public License has appeared, then you can specify ++that version instead if you wish.) Do not make any other change in ++these notices. ++ ++ Once this change is made in a given copy, it is irreversible for ++that copy, so the ordinary GNU General Public License applies to all ++subsequent copies and derivative works made from that copy. ++ ++ This option is useful when you wish to copy part of the code of ++the Library into a program that is not a library. ++ ++ 4. You may copy and distribute the Library (or a portion or ++derivative of it, under Section 2) in object code or executable form ++under the terms of Sections 1 and 2 above provided that you accompany ++it with the complete corresponding machine-readable source code, which ++must be distributed under the terms of Sections 1 and 2 above on a ++medium customarily used for software interchange. ++ ++ If distribution of object code is made by offering access to copy ++from a designated place, then offering equivalent access to copy the ++source code from the same place satisfies the requirement to ++distribute the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 5. A program that contains no derivative of any portion of the ++Library, but is designed to work with the Library by being compiled or ++linked with it, is called a "work that uses the Library". Such a ++work, in isolation, is not a derivative work of the Library, and ++therefore falls outside the scope of this License. ++ ++ However, linking a "work that uses the Library" with the Library ++creates an executable that is a derivative of the Library (because it ++contains portions of the Library), rather than a "work that uses the ++library". The executable is therefore covered by this License. ++Section 6 states terms for distribution of such executables. ++ ++ When a "work that uses the Library" uses material from a header file ++that is part of the Library, the object code for the work may be a ++derivative work of the Library even though the source code is not. ++Whether this is true is especially significant if the work can be ++linked without the Library, or if the work is itself a library. The ++threshold for this to be true is not precisely defined by law. ++ ++ If such an object file uses only numerical parameters, data ++structure layouts and accessors, and small macros and small inline ++functions (ten lines or less in length), then the use of the object ++file is unrestricted, regardless of whether it is legally a derivative ++work. (Executables containing this object code plus portions of the ++Library will still fall under Section 6.) ++ ++ Otherwise, if the work is a derivative of the Library, you may ++distribute the object code for the work under the terms of Section 6. ++Any executables containing that work also fall under Section 6, ++whether or not they are linked directly with the Library itself. ++ ++ 6. As an exception to the Sections above, you may also combine or ++link a "work that uses the Library" with the Library to produce a ++work containing portions of the Library, and distribute that work ++under terms of your choice, provided that the terms permit ++modification of the work for the customer's own use and reverse ++engineering for debugging such modifications. ++ ++ You must give prominent notice with each copy of the work that the ++Library is used in it and that the Library and its use are covered by ++this License. You must supply a copy of this License. If the work ++during execution displays copyright notices, you must include the ++copyright notice for the Library among them, as well as a reference ++directing the user to the copy of this License. Also, you must do one ++of these things: ++ ++ a) Accompany the work with the complete corresponding ++ machine-readable source code for the Library including whatever ++ changes were used in the work (which must be distributed under ++ Sections 1 and 2 above); and, if the work is an executable linked ++ with the Library, with the complete machine-readable "work that ++ uses the Library", as object code and/or source code, so that the ++ user can modify the Library and then relink to produce a modified ++ executable containing the modified Library. (It is understood ++ that the user who changes the contents of definitions files in the ++ Library will not necessarily be able to recompile the application ++ to use the modified definitions.) ++ ++ b) Use a suitable shared library mechanism for linking with the ++ Library. A suitable mechanism is one that (1) uses at run time a ++ copy of the library already present on the user's computer system, ++ rather than copying library functions into the executable, and (2) ++ will operate properly with a modified version of the library, if ++ the user installs one, as long as the modified version is ++ interface-compatible with the version that the work was made with. ++ ++ c) Accompany the work with a written offer, valid for at ++ least three years, to give the same user the materials ++ specified in Subsection 6a, above, for a charge no more ++ than the cost of performing this distribution. ++ ++ d) If distribution of the work is made by offering access to copy ++ from a designated place, offer equivalent access to copy the above ++ specified materials from the same place. ++ ++ e) Verify that the user has already received a copy of these ++ materials or that you have already sent this user a copy. ++ ++ For an executable, the required form of the "work that uses the ++Library" must include any data and utility programs needed for ++reproducing the executable from it. However, as a special exception, ++the materials to be distributed need not include anything that is ++normally distributed (in either source or binary form) with the major ++components (compiler, kernel, and so on) of the operating system on ++which the executable runs, unless that component itself accompanies ++the executable. ++ ++ It may happen that this requirement contradicts the license ++restrictions of other proprietary libraries that do not normally ++accompany the operating system. Such a contradiction means you cannot ++use both them and the Library together in an executable that you ++distribute. ++ ++ 7. You may place library facilities that are a work based on the ++Library side-by-side in a single library together with other library ++facilities not covered by this License, and distribute such a combined ++library, provided that the separate distribution of the work based on ++the Library and of the other library facilities is otherwise ++permitted, and provided that you do these two things: ++ ++ a) Accompany the combined library with a copy of the same work ++ based on the Library, uncombined with any other library ++ facilities. This must be distributed under the terms of the ++ Sections above. ++ ++ b) Give prominent notice with the combined library of the fact ++ that part of it is a work based on the Library, and explaining ++ where to find the accompanying uncombined form of the same work. ++ ++ 8. You may not copy, modify, sublicense, link with, or distribute ++the Library except as expressly provided under this License. Any ++attempt otherwise to copy, modify, sublicense, link with, or ++distribute the Library is void, and will automatically terminate your ++rights under this License. However, parties who have received copies, ++or rights, from you under this License will not have their licenses ++terminated so long as such parties remain in full compliance. ++ ++ 9. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Library or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Library (or any work based on the ++Library), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Library or works based on it. ++ ++ 10. Each time you redistribute the Library (or any work based on the ++Library), the recipient automatically receives a license from the ++original licensor to copy, distribute, link with or modify the Library ++subject to these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties with ++this License. ++ ++ 11. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Library at all. For example, if a patent ++license would not permit royalty-free redistribution of the Library by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Library. ++ ++If any portion of this section is held invalid or unenforceable under any ++particular circumstance, the balance of the section is intended to apply, ++and the section as a whole is intended to apply in other circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 12. If the distribution and/or use of the Library is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Library under this License may add ++an explicit geographical distribution limitation excluding those countries, ++so that distribution is permitted only in or among countries not thus ++excluded. In such case, this License incorporates the limitation as if ++written in the body of this License. ++ ++ 13. The Free Software Foundation may publish revised and/or new ++versions of the Lesser General Public License from time to time. ++Such new versions will be similar in spirit to the present version, ++but may differ in detail to address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Library ++specifies a version number of this License which applies to it and ++"any later version", you have the option of following the terms and ++conditions either of that version or of any later version published by ++the Free Software Foundation. If the Library does not specify a ++license version number, you may choose any version ever published by ++the Free Software Foundation. ++ ++ 14. If you wish to incorporate parts of the Library into other free ++programs whose distribution conditions are incompatible with these, ++write to the author to ask for permission. For software which is ++copyrighted by the Free Software Foundation, write to the Free ++Software Foundation; we sometimes make exceptions for this. Our ++decision will be guided by the two goals of preserving the free status ++of all derivatives of our free software and of promoting the sharing ++and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ++WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ++EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ++OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ++KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ++LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ++THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ++ ++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ++WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ++AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ++FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ++CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ++LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ++RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ++FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ++SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ++DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Libraries ++ ++ If you develop a new library, and you want it to be of the greatest ++possible use to the public, we recommend making it free software that ++everyone can redistribute and change. You can do so by permitting ++redistribution under these terms (or, alternatively, under the terms of the ++ordinary General Public License). ++ ++ To apply these terms, attach the following notices to the library. It is ++safest to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least the ++"copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the library, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the ++ library `Frob' (a library for tweaking knobs) written by James Random Hacker. ++ ++ , 1 April 1990 ++ Ty Coon, President of Vice ++ ++That's all there is to it! ++ ++ +-- +1.6.6 + diff --git a/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch new file mode 100644 index 0000000..870a344 --- /dev/null +++ b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch @@ -0,0 +1,58 @@ +From 38a3cde11bc77af49a96245b8a8a0f2b583a344c Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 18 Mar 2010 11:14:32 +0100 +Subject: [PATCH 35/36] cdrom_id: open non-mounted optical media with O_EXCL + +This should prevent confusing drives during CD burning sessions. Based +on a patch from Harald Hoyer. +--- + extras/cdrom_id/cdrom_id.c | 26 +++++++++++++++++++++++++- + 1 files changed, 25 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 2380b15..e485768 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -112,6 +112,30 @@ static unsigned long long int cd_media_session_last_offset; + #define ASC(errcode) (((errcode) >> 8) & 0xFF) + #define ASCQ(errcode) ((errcode) & 0xFF) + ++static int is_mounted(const char *device) ++{ ++ struct stat statbuf; ++ FILE *fp; ++ int maj, min; ++ int mounted = 0; ++ ++ if (stat(device, &statbuf) < 0) ++ return -ENODEV; ++ ++ fp = fopen("/proc/self/mountinfo", "r"); ++ if (fp == NULL) ++ return -ENOSYS; ++ while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { ++ printf("got %u %u\n", maj, min); ++ if (makedev(maj, min) == statbuf.st_rdev) { ++ mounted = 1; ++ break; ++ } ++ } ++ fclose(fp); ++ return mounted; ++} ++ + static void info_scsi_cmd_err(struct udev *udev, char *cmd, int err) + { + if (err == -1) { +@@ -568,7 +592,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- fd = open(node, O_RDONLY | O_NONBLOCK); ++ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); +-- +1.6.6 + diff --git a/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch b/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch new file mode 100644 index 0000000..45f1397 --- /dev/null +++ b/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch @@ -0,0 +1,2142 @@ +From 4dd9b291354e76f34b0d6d7b5c3b28d03a624418 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Thu, 18 Mar 2010 17:13:59 -0700 +Subject: [PATCH 36/36] modeswitch: morph into tool that only switches Mobile Action cables + +Remove option modeswitching code; use usb_modeswitch already, people. +--- + Makefile.am | 27 +- + extras/mobile-action-modeswitch/.gitignore | 1 + + .../61-mobile-action.rules | 15 + + extras/mobile-action-modeswitch/ma8280p_us.c | 462 ++++++++++++++++++++ + extras/mobile-action-modeswitch/ma8280p_us.h | 24 + + .../mobile-action-modeswitch.c | 262 +++++++++++ + extras/mobile-action-modeswitch/utils.c | 83 ++++ + extras/mobile-action-modeswitch/utils.h | 32 ++ + extras/modem-modeswitch/.gitignore | 1 - + extras/modem-modeswitch/61-mobile-action.rules | 15 - + .../61-option-modem-modeswitch.rules | 44 -- + extras/modem-modeswitch/ma8280p_us.c | 462 -------------------- + extras/modem-modeswitch/ma8280p_us.h | 24 - + extras/modem-modeswitch/modem-modeswitch.c | 266 ----------- + extras/modem-modeswitch/option.c | 131 ------ + extras/modem-modeswitch/option.h | 29 -- + extras/modem-modeswitch/utils.c | 83 ---- + extras/modem-modeswitch/utils.h | 32 -- + 18 files changed, 891 insertions(+), 1102 deletions(-) + create mode 100644 extras/mobile-action-modeswitch/.gitignore + create mode 100644 extras/mobile-action-modeswitch/61-mobile-action.rules + create mode 100644 extras/mobile-action-modeswitch/ma8280p_us.c + create mode 100644 extras/mobile-action-modeswitch/ma8280p_us.h + create mode 100644 extras/mobile-action-modeswitch/mobile-action-modeswitch.c + create mode 100644 extras/mobile-action-modeswitch/utils.c + create mode 100644 extras/mobile-action-modeswitch/utils.h + delete mode 100644 extras/modem-modeswitch/.gitignore + delete mode 100644 extras/modem-modeswitch/61-mobile-action.rules + delete mode 100644 extras/modem-modeswitch/61-option-modem-modeswitch.rules + delete mode 100644 extras/modem-modeswitch/ma8280p_us.c + delete mode 100644 extras/modem-modeswitch/ma8280p_us.h + delete mode 100644 extras/modem-modeswitch/modem-modeswitch.c + delete mode 100644 extras/modem-modeswitch/option.c + delete mode 100644 extras/modem-modeswitch/option.h + delete mode 100644 extras/modem-modeswitch/utils.c + delete mode 100644 extras/modem-modeswitch/utils.h + +diff --git a/Makefile.am b/Makefile.am +index 99a0133..68a68d9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -448,24 +448,21 @@ extras_usb_db_pci_db_LDADD = libudev/libudev-private.la + libexec_PROGRAMS += extras/usb-db/pci-db + + # ------------------------------------------------------------------------------ +-# modem-modeswitch - magic config switch for 3G modems +-# ------------------------------------------------------------------------------ +-extras_modem_modeswitch_modem_modeswitch_SOURCES =\ +- extras/modem-modeswitch/modem-modeswitch.c \ +- extras/modem-modeswitch/utils.c \ +- extras/modem-modeswitch/utils.h \ +- extras/modem-modeswitch/ma8280p_us.c \ +- extras/modem-modeswitch/ma8280p_us.h \ +- extras/modem-modeswitch/option.c \ +- extras/modem-modeswitch/option.h +-extras_modem_modeswitch_modem_modeswitch_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) +-extras_modem_modeswitch_modem_modeswitch_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS) ++# mobile-action-modeswitch - switch Mobile Action cables into serial mode ++# ------------------------------------------------------------------------------ ++extras_mobile_action_modeswitch_mobile_action_modeswitch_SOURCES =\ ++ extras/mobile-action-modeswitch/mobile-action-modeswitch.c \ ++ extras/mobile-action-modeswitch/utils.c \ ++ extras/mobile-action-modeswitch/utils.h \ ++ extras/mobile-action-modeswitch/ma8280p_us.c \ ++ extras/mobile-action-modeswitch/ma8280p_us.h ++extras_mobile_action_modeswitch_mobile_action_modeswitch_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) ++extras_mobile_action_modeswitch_mobile_action_modeswitch_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS) + + dist_udevrules_DATA += \ +- extras/modem-modeswitch/61-option-modem-modeswitch.rules \ +- extras/modem-modeswitch/61-mobile-action.rules ++ extras/mobile-action-modeswitch/61-mobile-action.rules + +-libexec_PROGRAMS += extras/modem-modeswitch/modem-modeswitch ++libexec_PROGRAMS += extras/mobile-action-modeswitch/mobile-action-modeswitch + + # ------------------------------------------------------------------------------ + # keymap - map custom hardware's multimedia keys +diff --git a/extras/mobile-action-modeswitch/61-mobile-action.rules b/extras/mobile-action-modeswitch/61-mobile-action.rules +new file mode 100644 +index 0000000..0af27a5 +--- /dev/null ++++ b/extras/mobile-action-modeswitch/61-mobile-action.rules +@@ -0,0 +1,15 @@ ++ACTION!="add", GOTO="mobile_action_end" ++ ++# ATTENTION: DO NOT USE THIS FILE FOR ANYTHING EXCEPT ++# MOBILE ACTION CABLES. DO NOT USE IT FOR 3G DEVICES! ++ ++SUBSYSTEM=="usb", ATTR{bDeviceClass}=="00|ff", ATTR{bDeviceSubClass}=="00|ff", ENV{DEVTYPE}=="usb_device", GOTO="mobile_action_switch" ++GOTO="mobile_action_end" ++ ++LABEL="mobile_action_switch" ++ ++# Mobile Action cables like the 8280p and 8230p ++ATTRS{idVendor}=="0df7", ATTRS{idProduct}=="0800", RUN+="mobile-action-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t mobile-action-8280p" ++ ++LABEL="mobile_action_end" ++ +diff --git a/extras/mobile-action-modeswitch/ma8280p_us.c b/extras/mobile-action-modeswitch/ma8280p_us.c +new file mode 100644 +index 0000000..d7cf4f4 +--- /dev/null ++++ b/extras/mobile-action-modeswitch/ma8280p_us.c +@@ -0,0 +1,462 @@ ++/* http://www.natox.be/ma8280p/ ++ * http://www.leopold.dk/~martin/ma-8230p.html ++ * http://figvam.blogspot.com/2007/01/mobile-action-8730p-usb-cable-and-linux.html ++ */ ++ ++/* ++ * ++ * Code by davy hollevoet. This is simply an adaptation of code ++ * generated by usbsnoop2libusb. (http://iki.fi/lindi/usb/usbsnoop2libusb.pl) ++ * ++ * This code is released under both the GPL version 2 and BSD licenses. ++ * Either license may be used. ++ * ++ * GPLv2 ++ * ******** ++ * 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; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * In addition: ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote ++ * products derived from this software without specific prior written ++ * permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, ++ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ * ++ * BSD ++ * ****** ++ * Copyright (c) 1998, Regents of the University of California ++ * All rights reserved. ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the University of California, Berkeley nor the ++ * names of its contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY ++ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY ++ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ */ ++ ++/* This file is (mostly) generated with usbsnoop2libusb.pl from a usbsnoop log file. */ ++/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "utils.h" ++#include "ma8280p_us.h" ++ ++static void msleep(long msec) ++{ ++ struct timespec duration = { 0, msec * 1000 * 1000 }; ++ ++ nanosleep(&duration, NULL); ++} ++ ++int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev) ++{ ++ int ret = 1; ++ char *buf = NULL; ++ ++ buf = malloc (65535); ++ if (!buf) { ++ error ("%s: not enough memory", dev->filename, ret); ++ return -1; ++ } ++ ++ usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); ++ msleep(6); ++ usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); ++ msleep(6); ++ usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000400); ++ msleep(10); ++ ret = usb_release_interface(devh, 0); ++ if (ret != 0) ++ debug ("%s: failed to release interface before set_configuration: %d", dev->filename, ret); ++ usb_set_configuration(devh, 0x0000001); ++ ret = usb_claim_interface(devh, 0); ++ if (ret != 0) ++ debug ("%s: claim after set_configuration failed with error %d", dev->filename, ret); ++ //usb_set_altinterface(devh, 0); ++ //msleep(33); ++ usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE + USB_ENDPOINT_IN, 0x0000001, 0x0000300, 0x0000000, buf, 0x0000008, 1000); ++ msleep(5); ++ memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); ++ usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); ++ msleep(4); ++ memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); ++ usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); ++ msleep(4); ++ ++ msleep(4); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(6); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped ++ msleep(4); ++ memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(3); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(7); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(7); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(2); ++ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped ++ msleep(4); ++ memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(2); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(7); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(7); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(8); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped ++ msleep(4); ++ memcpy(buf, "\x33\x04\xfe\x00\xf4\x6c\x1f\xf0", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(3); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ msleep(1); ++ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped ++ msleep(4); ++ memcpy(buf, "\x32\x07\xfe\xf0\x29\xb9\x3a\xf0", 0x0000008); ++ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); ++ msleep(3); ++ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); ++ ++ if (buf) ++ free (buf); ++ return 0; ++} +diff --git a/extras/mobile-action-modeswitch/ma8280p_us.h b/extras/mobile-action-modeswitch/ma8280p_us.h +new file mode 100644 +index 0000000..bf0e304 +--- /dev/null ++++ b/extras/mobile-action-modeswitch/ma8280p_us.h +@@ -0,0 +1,24 @@ ++/* ++ * Modem mode switcher ++ * ++ * Copyright (C) 2009 Dan Williams ++ * ++ * 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; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details: ++ */ ++ ++#ifndef __MA8280P_H__ ++#define __MA8280P_H__ ++ ++#include ++ ++int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev); ++ ++#endif /* __MA8280P_H__ */ +diff --git a/extras/mobile-action-modeswitch/mobile-action-modeswitch.c b/extras/mobile-action-modeswitch/mobile-action-modeswitch.c +new file mode 100644 +index 0000000..36d7d81 +--- /dev/null ++++ b/extras/mobile-action-modeswitch/mobile-action-modeswitch.c +@@ -0,0 +1,262 @@ ++/* ++ * Mobile action cable mode switcher ++ * ++ * Copyright (C) 2008 - 2010 Dan Williams ++ * Copyright (C) 2008 Peter Henn ++ * ++ * Heavily based on the 'ozerocdoff' tool by Peter Henn. ++ * ++ * 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; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details: ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "utils.h" ++ ++#include "ma8280p_us.h" ++ ++struct usb_dev_handle *handle = NULL; ++ ++typedef struct usb_device * (*FindFunc) (int vid, int pid); ++typedef int (*SwitchFunc) (struct usb_dev_handle *dh, struct usb_device *dev); ++ ++typedef enum { ++ ST_UNKNOWN = 0, ++ ST_MA8280P ++} SwitchType; ++ ++typedef struct SwitchEntry { ++ SwitchType st; ++ const char *clopt; ++ FindFunc find_func; ++ SwitchFunc switch_func; ++} SwitchEntry; ++ ++static SwitchEntry switch_types[] = { ++ { ST_MA8280P, "mobile-action-8280p", NULL, ma8280p_switch }, ++ { ST_UNKNOWN, NULL, NULL } ++}; ++ ++static struct usb_device * ++generic_find (int vid, int pid) ++{ ++ struct usb_bus *bus; ++ struct usb_device *dev; ++ ++ for (bus = usb_get_busses(); bus; bus = bus->next) { ++ for (dev = bus->devices; dev; dev = dev->next) { ++ if (dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { ++ debug ("Found device '%s'", dev->filename); ++ return dev; ++ } ++ } ++ } ++ return NULL; ++} ++ ++static void ++release_usb_device (int param) ++{ ++ usb_release_interface (handle, 0); ++ usb_close (handle); ++} ++ ++static void ++print_usage (void) ++{ ++ printf ("Usage: mobile-action-modeswitch [-hdq] [-l ] -v -p -t \n" ++ " -h, --help show this help message\n" ++ " -v, --vendor target USB vendor ID\n" ++ " -p, --product target USB product ID\n" ++ " -t, --type type of switch to attempt, varies by device:\n" ++ " mobile-action-8280p - For Mobile Action 8xxxP USB cables\n" ++ " -l, --log log output to a file\n" ++ " -q, --quiet don't print anything to stdout\n" ++ " -d, --debug display debugging messages\n\n" ++ "Examples:\n" ++ " mobile-action-modeswitch -v 0x0df7 -p 0x8000 -t mobile-action-8280p\n"); ++} ++ ++static SwitchEntry * ++parse_type (const char *s) ++{ ++ SwitchEntry *entry = &switch_types[0]; ++ ++ while (entry->clopt) { ++ if (!strcmp (entry->clopt, s)) ++ return entry; ++ entry++; ++ } ++ ++ return NULL; ++} ++ ++static void ++do_exit (int val) ++{ ++ log_shutdown (); ++ exit (val); ++} ++ ++int main(int argc, char **argv) ++{ ++ static struct option options[] = { ++ { "help", no_argument, NULL, 'h' }, ++ { "vendor", required_argument, NULL, 'v' }, ++ { "product", required_argument, NULL, 'p' }, ++ { "type", required_argument, NULL, 't' }, ++ { "log", required_argument, NULL, 'l' }, ++ { "debug", no_argument, NULL, 'd' }, ++ { "quiet", no_argument, NULL, 'q' }, ++ { NULL, 0, NULL, 0} ++ }; ++ ++ struct usb_device *dev; ++ int vid = 0, pid = 0; ++ const char *logpath = NULL; ++ char buffer[256]; ++ int ret, quiet = 0, debug = 0; ++ SwitchEntry *sentry = NULL; ++ ++ while (1) { ++ int option; ++ ++ option = getopt_long(argc, argv, "hv:p:l:t:dq", options, NULL); ++ if (option == -1) ++ break; ++ ++ switch (option) { ++ case 'v': ++ vid = strtol (optarg, NULL, 0); ++ break; ++ case 'p': ++ pid = strtol (optarg, NULL, 0); ++ break; ++ case 't': ++ sentry = parse_type (optarg); ++ if (!sentry) { ++ error ("unknown switch type '%s'", optarg); ++ print_usage (); ++ exit (1); ++ } ++ break; ++ case 'l': ++ logpath = optarg; ++ break; ++ case 'q': ++ quiet = 1; ++ break; ++ case 'd': ++ debug = 1; ++ break; ++ case 'h': ++ default: ++ print_usage (); ++ exit (1); ++ } ++ } ++ ++ if (log_startup (logpath, debug, quiet)) { ++ fprintf (stderr, "Couldn't open/create logfile %s", logpath); ++ exit (2); ++ } ++ ++ if (!sentry) { ++ if (!quiet) ++ print_usage (); ++ else ++ error ("missing device switch type."); ++ do_exit (3); ++ } ++ ++ if (!vid || !pid) { ++ if (!quiet) ++ print_usage (); ++ else ++ error ("missing vendor and device IDs."); ++ do_exit (3); ++ } ++ ++ usb_init(); ++ ++ if (usb_find_busses() < 0) { ++ error ("no USB busses found."); ++ do_exit (4); ++ } ++ ++ if (usb_find_devices() < 0) { ++ error ("no USB devices found."); ++ do_exit (4); ++ } ++ ++ if (sentry->find_func) ++ dev = (*sentry->find_func) (vid, pid); ++ else ++ dev = generic_find (vid, pid); ++ if (dev == NULL) { ++ error ("no device found."); ++ do_exit (5); ++ } ++ ++ handle = usb_open (dev); ++ if (handle == NULL) { ++ error ("%s: could not access the device.", ++ dev->filename); ++ do_exit (6); ++ } ++ ++ /* detach running default driver */ ++ signal (SIGTERM, release_usb_device); ++ ret = usb_get_driver_np (handle, 0, buffer, sizeof (buffer)); ++ if (ret == 0) { ++ debug ("%s: found already attached driver '%s'", dev->filename, buffer); ++ ++ ret = usb_detach_kernel_driver_np (handle, 0); ++ if (ret != 0) { ++ debug ("%s: error: unable to detach current driver.", dev->filename); ++ usb_close (handle); ++ do_exit (7); ++ } ++ } ++ ++ ret = usb_claim_interface (handle, 0); ++ if (ret != 0) { ++ debug ("%s: couldn't claim device's USB interface: %d.", ++ dev->filename, ret); ++ usb_close (handle); ++ do_exit (8); ++ } ++ ++ ret = (*sentry->switch_func) (handle, dev); ++ if (ret < 0) { ++ debug ("%s: failed to switch device to serial mode.", dev->filename); ++ usb_release_interface (handle, 0); ++ usb_close (handle); ++ do_exit(9); ++ } ++ ++ usb_release_interface (handle, 0); ++ ++ ret = usb_close (handle); ++ if (ret < 0) ++ debug ("%s: failed to close the device.", dev->filename); ++ ++ do_exit (0); ++ return 0; ++} +diff --git a/extras/mobile-action-modeswitch/utils.c b/extras/mobile-action-modeswitch/utils.c +new file mode 100644 +index 0000000..37d0df4 +--- /dev/null ++++ b/extras/mobile-action-modeswitch/utils.c +@@ -0,0 +1,83 @@ ++/* ++ * Modem mode switcher ++ * ++ * Copyright (C) 2009 Dan Williams ++ * ++ * 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; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details: ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "utils.h" ++ ++static int debug_on = 0; ++static int quiet = 0; ++FILE *logfile = NULL; ++ ++void ++do_log (int level, const char *fmt, ...) ++{ ++ va_list args; ++ char buffer[1024]; ++ char tag = 'L'; ++ ++ if (level >= LOG_DBG && !debug_on) ++ return; ++ ++ va_start (args, fmt); ++ vsnprintf (buffer, sizeof (buffer), fmt, args); ++ va_end (args); ++ ++ if (level == LOG_ERR) ++ tag = 'E'; ++ else if (level == LOG_MSG) ++ tag = 'L'; ++ else if (level == LOG_DBG) ++ tag = 'D'; ++ ++ if (logfile) ++ fprintf (logfile, "%c: %s\n", tag, buffer); ++ if (!quiet) ++ fprintf ((level == LOG_ERR) ? stderr : stdout, "%c: %s\n", tag, buffer); ++} ++ ++int ++log_startup (const char *path, int do_debug, int be_quiet) ++{ ++ time_t t; ++ ++ quiet = be_quiet; ++ debug_on = do_debug; ++ ++ if (!path) ++ return 0; ++ ++ logfile = fopen (path, "a+"); ++ if (!logfile) ++ return 1; ++ ++ t = time (NULL); ++ message ("\n**** Started: %s\n", ctime (&t)); ++ return 0; ++} ++ ++void ++log_shutdown (void) ++{ ++ if (logfile) ++ fclose (logfile); ++} ++ +diff --git a/extras/mobile-action-modeswitch/utils.h b/extras/mobile-action-modeswitch/utils.h +new file mode 100644 +index 0000000..1ef557a +--- /dev/null ++++ b/extras/mobile-action-modeswitch/utils.h +@@ -0,0 +1,32 @@ ++/* ++ * Modem mode switcher ++ * ++ * Copyright (C) 2009 Dan Williams ++ * ++ * 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; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details: ++ */ ++ ++#ifndef __UTILS_H__ ++#define __UTILS_H__ ++ ++#define LOG_ERR 0 ++#define LOG_MSG 1 ++#define LOG_DBG 2 ++ ++#define message(fmt, args...) do_log (LOG_MSG, fmt, ##args); ++#define error(fmt, args...) do_log (LOG_ERR, fmt, ##args); ++#define debug(fmt, args...) do_log (LOG_DBG, fmt, ##args); ++ ++void do_log (int level, const char *fmt, ...); ++int log_startup (const char *path, int do_debug, int be_quiet); ++void log_shutdown (void); ++ ++#endif /* __UTILS_H__ */ +diff --git a/extras/modem-modeswitch/61-mobile-action.rules b/extras/modem-modeswitch/61-mobile-action.rules +deleted file mode 100644 +index 29d460d..0000000 +--- a/extras/modem-modeswitch/61-mobile-action.rules ++++ /dev/null +@@ -1,15 +0,0 @@ +-ACTION!="add", GOTO="mobile_action_end" +- +-SUBSYSTEM=="usb", ATTR{bDeviceClass}=="00|ff", ATTR{bDeviceSubClass}=="00|ff", ENV{DEVTYPE}=="usb_device", GOTO="mobile_action_switch" +-GOTO="mobile_action_end" +- +-LABEL="mobile_action_switch" +-ATTRS{idVendor}=="0df7", ATTRS{idProduct}=="0800", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t mobile-action-8280p" +- +-LABEL="mobile_action_end" +- +-# modem-modeswitch does not work with these devices, the fake CD-ROM needs to be ejected +- +-# ZTE MF6xx +-ACTION=="add", ENV{ID_CDROM}=="1", ENV{ID_VENDOR_ID}=="19d2", ENV{ID_MODEL_ID}=="2000", RUN+="/usr/bin/eject %k" +- +diff --git a/extras/modem-modeswitch/61-option-modem-modeswitch.rules b/extras/modem-modeswitch/61-option-modem-modeswitch.rules +deleted file mode 100644 +index 053733e..0000000 +--- a/extras/modem-modeswitch/61-option-modem-modeswitch.rules ++++ /dev/null +@@ -1,44 +0,0 @@ +-# NOTE: only for devices manufactured by Option NV +-# DO NOT add devices that are not manufactured by Option NV +- +-ACTION!="add", GOTO="option_zerocd_end" +- +-SUBSYSTEM=="usb", ATTR{bDeviceClass}!="ff", ENV{DEVTYPE}=="usb_device", GOTO="option_zerocd_disable" +-SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", GOTO="option_zerocd_disable" +-GOTO="option_zerocd_end" +- +-LABEL="option_zerocd_disable" +-ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6711", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6711", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6731", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6751", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6771", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6791", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6811", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6911", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6951", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6971", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7011", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7031", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7051", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7071", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7111", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7211", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7251", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7271", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7311", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="c031", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="d031", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="d033", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7301", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7361", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7401", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7501", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +-ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" +- +-# NOTE: only for devices manufactured by Option NV +-# DO NOT add devices that are not manufactured by Option NV +- +-LABEL="option_zerocd_end" +diff --git a/extras/modem-modeswitch/ma8280p_us.c b/extras/modem-modeswitch/ma8280p_us.c +deleted file mode 100644 +index d7cf4f4..0000000 +--- a/extras/modem-modeswitch/ma8280p_us.c ++++ /dev/null +@@ -1,462 +0,0 @@ +-/* http://www.natox.be/ma8280p/ +- * http://www.leopold.dk/~martin/ma-8230p.html +- * http://figvam.blogspot.com/2007/01/mobile-action-8730p-usb-cable-and-linux.html +- */ +- +-/* +- * +- * Code by davy hollevoet. This is simply an adaptation of code +- * generated by usbsnoop2libusb. (http://iki.fi/lindi/usb/usbsnoop2libusb.pl) +- * +- * This code is released under both the GPL version 2 and BSD licenses. +- * Either license may be used. +- * +- * GPLv2 +- * ******** +- * 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; either version 2 +- * of the License, or (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * In addition: +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * 3. The name of the author may not be used to endorse or promote +- * products derived from this software without specific prior written +- * permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- * +- * BSD +- * ****** +- * Copyright (c) 1998, Regents of the University of California +- * All rights reserved. +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are met: +- * +- * * Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * * Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * * Neither the name of the University of California, Berkeley nor the +- * names of its contributors may be used to endorse or promote products +- * derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY +- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY +- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- * +- */ +- +-/* This file is (mostly) generated with usbsnoop2libusb.pl from a usbsnoop log file. */ +-/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "utils.h" +-#include "ma8280p_us.h" +- +-static void msleep(long msec) +-{ +- struct timespec duration = { 0, msec * 1000 * 1000 }; +- +- nanosleep(&duration, NULL); +-} +- +-int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev) +-{ +- int ret = 1; +- char *buf = NULL; +- +- buf = malloc (65535); +- if (!buf) { +- error ("%s: not enough memory", dev->filename, ret); +- return -1; +- } +- +- usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); +- msleep(6); +- usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); +- msleep(6); +- usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000400); +- msleep(10); +- ret = usb_release_interface(devh, 0); +- if (ret != 0) +- debug ("%s: failed to release interface before set_configuration: %d", dev->filename, ret); +- usb_set_configuration(devh, 0x0000001); +- ret = usb_claim_interface(devh, 0); +- if (ret != 0) +- debug ("%s: claim after set_configuration failed with error %d", dev->filename, ret); +- //usb_set_altinterface(devh, 0); +- //msleep(33); +- usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE + USB_ENDPOINT_IN, 0x0000001, 0x0000300, 0x0000000, buf, 0x0000008, 1000); +- msleep(5); +- memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); +- usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); +- msleep(4); +- memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); +- usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); +- msleep(4); +- +- msleep(4); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(6); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped +- msleep(4); +- memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(3); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(7); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(7); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(2); +- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped +- msleep(4); +- memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(2); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(7); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(7); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(8); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped +- msleep(4); +- memcpy(buf, "\x33\x04\xfe\x00\xf4\x6c\x1f\xf0", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(3); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- msleep(1); +- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped +- msleep(4); +- memcpy(buf, "\x32\x07\xfe\xf0\x29\xb9\x3a\xf0", 0x0000008); +- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); +- msleep(3); +- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); +- +- if (buf) +- free (buf); +- return 0; +-} +diff --git a/extras/modem-modeswitch/ma8280p_us.h b/extras/modem-modeswitch/ma8280p_us.h +deleted file mode 100644 +index bf0e304..0000000 +--- a/extras/modem-modeswitch/ma8280p_us.h ++++ /dev/null +@@ -1,24 +0,0 @@ +-/* +- * Modem mode switcher +- * +- * Copyright (C) 2009 Dan Williams +- * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details: +- */ +- +-#ifndef __MA8280P_H__ +-#define __MA8280P_H__ +- +-#include +- +-int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev); +- +-#endif /* __MA8280P_H__ */ +diff --git a/extras/modem-modeswitch/modem-modeswitch.c b/extras/modem-modeswitch/modem-modeswitch.c +deleted file mode 100644 +index a60ce7a..0000000 +--- a/extras/modem-modeswitch/modem-modeswitch.c ++++ /dev/null +@@ -1,266 +0,0 @@ +-/* +- * Modem mode switcher +- * +- * Copyright (C) 2008 Dan Williams +- * Copyright (C) 2008 Peter Henn +- * +- * Heavily based on the 'ozerocdoff' tool by Peter Henn. +- * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details: +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +- +-#include "utils.h" +- +-#include "ma8280p_us.h" +-#include "option.h" +- +-struct usb_dev_handle *handle = NULL; +- +-typedef struct usb_device * (*FindFunc) (int vid, int pid); +-typedef int (*SwitchFunc) (struct usb_dev_handle *dh, struct usb_device *dev); +- +-typedef enum { +- ST_UNKNOWN = 0, +- ST_OPTION_ZEROCD, +- ST_MA8280P +-} SwitchType; +- +-typedef struct SwitchEntry { +- SwitchType st; +- const char *clopt; +- FindFunc find_func; +- SwitchFunc switch_func; +-} SwitchEntry; +- +-static SwitchEntry switch_types[] = { +- { ST_OPTION_ZEROCD, "option-zerocd", option_zerocd_find, option_zerocd_switch }, +- { ST_MA8280P, "mobile-action-8280p", NULL, ma8280p_switch }, +- { ST_UNKNOWN, NULL, NULL } +-}; +- +-static struct usb_device * +-generic_find (int vid, int pid) +-{ +- struct usb_bus *bus; +- struct usb_device *dev; +- +- for (bus = usb_get_busses(); bus; bus = bus->next) { +- for (dev = bus->devices; dev; dev = dev->next) { +- if (dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { +- debug ("Found device '%s'", dev->filename); +- return dev; +- } +- } +- } +- return NULL; +-} +- +-static void +-release_usb_device (int param) +-{ +- usb_release_interface (handle, 0); +- usb_close (handle); +-} +- +-static void +-print_usage (void) +-{ +- printf ("Usage: modem-modeswitch [-hdq] [-l ] -v -p -t \n" +- " -h, --help show this help message\n" +- " -v, --vendor target USB vendor ID\n" +- " -p, --product target USB product ID\n" +- " -t, --type type of switch to attempt, varies by device:\n" +- " option-zerocd - For many newer Option N.V. devices\n" +- " mobile-action-8280p - For Mobile Action 8xxxP USB cables\n" +- " -l, --log log output to a file\n" +- " -q, --quiet don't print anything to stdout\n" +- " -d, --debug display debugging messages\n\n" +- "Examples:\n" +- " modem-modeswitch -v 0x0af0 -p 0xc031 -t option-zerocd\n"); +-} +- +-static SwitchEntry * +-parse_type (const char *s) +-{ +- SwitchEntry *entry = &switch_types[0]; +- +- while (entry->clopt) { +- if (!strcmp (entry->clopt, s)) +- return entry; +- entry++; +- } +- +- return NULL; +-} +- +-static void +-do_exit (int val) +-{ +- log_shutdown (); +- exit (val); +-} +- +-int main(int argc, char **argv) +-{ +- static struct option options[] = { +- { "help", no_argument, NULL, 'h' }, +- { "vendor", required_argument, NULL, 'v' }, +- { "product", required_argument, NULL, 'p' }, +- { "type", required_argument, NULL, 't' }, +- { "log", required_argument, NULL, 'l' }, +- { "debug", no_argument, NULL, 'd' }, +- { "quiet", no_argument, NULL, 'q' }, +- { NULL, 0, NULL, 0} +- }; +- +- struct usb_device *dev; +- int vid = 0, pid = 0; +- const char *logpath = NULL; +- char buffer[256]; +- int ret, quiet = 0, debug = 0; +- SwitchEntry *sentry = NULL; +- +- while (1) { +- int option; +- +- option = getopt_long(argc, argv, "hv:p:l:t:dq", options, NULL); +- if (option == -1) +- break; +- +- switch (option) { +- case 'v': +- vid = strtol (optarg, NULL, 0); +- break; +- case 'p': +- pid = strtol (optarg, NULL, 0); +- break; +- case 't': +- sentry = parse_type (optarg); +- if (!sentry) { +- error ("unknown switch type '%s'", optarg); +- print_usage (); +- exit (1); +- } +- break; +- case 'l': +- logpath = optarg; +- break; +- case 'q': +- quiet = 1; +- break; +- case 'd': +- debug = 1; +- break; +- case 'h': +- default: +- print_usage (); +- exit (1); +- } +- } +- +- if (log_startup (logpath, debug, quiet)) { +- fprintf (stderr, "Couldn't open/create logfile %s", logpath); +- exit (2); +- } +- +- if (!sentry) { +- if (!quiet) +- print_usage (); +- else +- error ("missing device switch type."); +- do_exit (3); +- } +- +- if (!vid || !pid) { +- if (!quiet) +- print_usage (); +- else +- error ("missing vendor and device IDs."); +- do_exit (3); +- } +- +- usb_init(); +- +- if (usb_find_busses() < 0) { +- error ("no USB busses found."); +- do_exit (4); +- } +- +- if (usb_find_devices() < 0) { +- error ("no USB devices found."); +- do_exit (4); +- } +- +- if (sentry->find_func) +- dev = (*sentry->find_func) (vid, pid); +- else +- dev = generic_find (vid, pid); +- if (dev == NULL) { +- error ("no device found."); +- do_exit (5); +- } +- +- handle = usb_open (dev); +- if (handle == NULL) { +- error ("%s: could not access the device.", +- dev->filename); +- do_exit (6); +- } +- +- /* detach running default driver */ +- signal (SIGTERM, release_usb_device); +- ret = usb_get_driver_np (handle, 0, buffer, sizeof (buffer)); +- if (ret == 0) { +- debug ("%s: found already attached driver '%s'", dev->filename, buffer); +- +- ret = usb_detach_kernel_driver_np (handle, 0); +- if (ret != 0) { +- debug ("%s: error: unable to detach current driver.", dev->filename); +- usb_close (handle); +- do_exit (7); +- } +- } +- +- ret = usb_claim_interface (handle, 0); +- if (ret != 0) { +- debug ("%s: couldn't claim device's USB interface: %d.", +- dev->filename, ret); +- usb_close (handle); +- do_exit (8); +- } +- +- ret = (*sentry->switch_func) (handle, dev); +- if (ret < 0) { +- debug ("%s: failed to switch device to modem mode.", dev->filename); +- usb_release_interface (handle, 0); +- usb_close (handle); +- do_exit(9); +- } +- +- usb_release_interface (handle, 0); +- +- ret = usb_close (handle); +- if (ret < 0) +- debug ("%s: failed to close the device.", dev->filename); +- +- do_exit (0); +- return 0; +-} +diff --git a/extras/modem-modeswitch/option.c b/extras/modem-modeswitch/option.c +deleted file mode 100644 +index 5b299fd..0000000 +--- a/extras/modem-modeswitch/option.c ++++ /dev/null +@@ -1,131 +0,0 @@ +-/* +- * Modem mode switcher +- * +- * Copyright (C) 2008 Dan Williams +- * Copyright (C) 2008 Peter Henn +- * +- * Heavily based on the 'ozerocdoff' tool by Peter Henn. +- * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details: +- */ +- +-#include +- +-#include "utils.h" +-#include "option.h" +- +-/* Borrowed from /usr/include/linux/usb/ch9.h */ +-#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ +-#define USB_ENDPOINT_XFER_BULK 2 +-#define USB_ENDPOINT_DIR_MASK 0x80 +-#define USB_DIR_OUT 0 /* to device */ +-#define USB_DIR_IN 0x80 /* to host */ +- +-struct usb_device * +-option_zerocd_find (int vid, int pid) +-{ +- struct usb_bus *bus; +- struct usb_device *dev; +- +- for (bus = usb_get_busses(); bus; bus = bus->next) { +- for (dev = bus->devices; dev; dev = dev->next) { +- if (dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { +- debug ("Found mass storage device:"); +- debug (" Endpoints: %d", dev->config[0].interface[0].altsetting[0].bNumEndpoints); +- debug (" Class: 0x%X", dev->config[0].interface[0].altsetting[0].bInterfaceClass); +- debug (" SubClass: 0x%X", dev->config[0].interface[0].altsetting[0].bInterfaceSubClass); +- debug (" Protocol: 0x%X", dev->config[0].interface[0].altsetting[0].bInterfaceProtocol); +- +- if ( (dev->config[0].interface[0].altsetting[0].bNumEndpoints == 2) +- && (dev->config[0].interface[0].altsetting[0].bInterfaceClass == 0x08) +- && (dev->config[0].interface[0].altsetting[0].bInterfaceSubClass == 0x06) +- && (dev->config[0].interface[0].altsetting[0].bInterfaceProtocol == 0x50) ) { +- debug ("Found modem mass storage device '%s'", dev->filename); +- return dev; +- } +- } +- } +- } +- return NULL; +-} +- +-static int +-find_endpoints (struct usb_device *dev, int *in_ep, int *out_ep) +-{ +- int i; +- +- for (i = 0; i < dev->config[0].interface[0].altsetting[0].bNumEndpoints; i++) { +- struct usb_endpoint_descriptor *ep = &(dev->config[0].interface[0].altsetting[0].endpoint[i]); +- +- if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) { +- unsigned int direction = ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK; +- +- if (!*out_ep && (direction == USB_DIR_OUT)) +- *out_ep = ep->bEndpointAddress; +- else if (!*in_ep && (direction == USB_DIR_IN)) +- *in_ep = ep->bEndpointAddress; +- } +- +- if (*in_ep && *out_ep) +- return 0; +- } +- +- return -1; +-} +- +-int +-option_zerocd_switch (struct usb_dev_handle *dh, struct usb_device *dev) +-{ +- const char const rezero_cbw[] = { +- 0x55, 0x53, 0x42, 0x43, /* bulk command signature (LE) */ +- 0x78, 0x56, 0x34, 0x12, /* bulk command host tag */ +- 0x01, 0x00, 0x00, 0x00, /* bulk command data transfer length (LE) */ +- 0x80, /* flags: direction data-in */ +- 0x00, /* LUN */ +- 0x06, /* SCSI command length */ +- 0x01, /* SCSI command: REZERO */ +- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* filler */ +- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +- }; +- +- int ret = -1, ep_in = 0, ep_out = 0; +- char buffer[256]; +- +- /* Find the device's bulk in and out endpoints */ +- if (find_endpoints (dev, &ep_in, &ep_out) < 0) { +- debug ("%s: couldn't find correct USB endpoints.", dev->filename); +- goto out; +- } +- +- usb_clear_halt (dh, ep_out); +- ret = usb_set_altinterface (dh, 0); +- if (ret != 0) { +- debug ("%s: couldn't set device alternate interface.", dev->filename); +- goto out; +- } +- +- /* Let the mass storage device settle */ +- sleep (1); +- +- /* Send the modeswitch command */ +- ret = usb_bulk_write (dh, ep_out, (char *) rezero_cbw, sizeof (rezero_cbw), 1000); +- if (ret < 0) +- return ret; +- +- debug ("%s: REZERO command sent.", dev->filename); +- +- /* Some devices need to be read from */ +- ret = usb_bulk_read (dh, ep_in, buffer, sizeof (buffer), 1000); +- +-out: +- return ret; +-} +- +diff --git a/extras/modem-modeswitch/option.h b/extras/modem-modeswitch/option.h +deleted file mode 100644 +index e00dabf..0000000 +--- a/extras/modem-modeswitch/option.h ++++ /dev/null +@@ -1,29 +0,0 @@ +-/* +- * Modem mode switcher +- * +- * Copyright (C) 2008 Dan Williams +- * Copyright (C) 2008 Peter Henn +- * +- * Heavily based on the 'ozerocdoff' tool by Peter Henn. +- * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details: +- */ +- +-#ifndef __OPTION_H__ +-#define __OPTION_H__ +- +-#include +- +-struct usb_device *option_zerocd_find (int vid, int pid); +- +-int option_zerocd_switch (struct usb_dev_handle *dh, struct usb_device *dev); +- +-#endif /* __OPTION_H__ */ +diff --git a/extras/modem-modeswitch/utils.c b/extras/modem-modeswitch/utils.c +deleted file mode 100644 +index 37d0df4..0000000 +--- a/extras/modem-modeswitch/utils.c ++++ /dev/null +@@ -1,83 +0,0 @@ +-/* +- * Modem mode switcher +- * +- * Copyright (C) 2009 Dan Williams +- * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details: +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "utils.h" +- +-static int debug_on = 0; +-static int quiet = 0; +-FILE *logfile = NULL; +- +-void +-do_log (int level, const char *fmt, ...) +-{ +- va_list args; +- char buffer[1024]; +- char tag = 'L'; +- +- if (level >= LOG_DBG && !debug_on) +- return; +- +- va_start (args, fmt); +- vsnprintf (buffer, sizeof (buffer), fmt, args); +- va_end (args); +- +- if (level == LOG_ERR) +- tag = 'E'; +- else if (level == LOG_MSG) +- tag = 'L'; +- else if (level == LOG_DBG) +- tag = 'D'; +- +- if (logfile) +- fprintf (logfile, "%c: %s\n", tag, buffer); +- if (!quiet) +- fprintf ((level == LOG_ERR) ? stderr : stdout, "%c: %s\n", tag, buffer); +-} +- +-int +-log_startup (const char *path, int do_debug, int be_quiet) +-{ +- time_t t; +- +- quiet = be_quiet; +- debug_on = do_debug; +- +- if (!path) +- return 0; +- +- logfile = fopen (path, "a+"); +- if (!logfile) +- return 1; +- +- t = time (NULL); +- message ("\n**** Started: %s\n", ctime (&t)); +- return 0; +-} +- +-void +-log_shutdown (void) +-{ +- if (logfile) +- fclose (logfile); +-} +- +diff --git a/extras/modem-modeswitch/utils.h b/extras/modem-modeswitch/utils.h +deleted file mode 100644 +index 1ef557a..0000000 +--- a/extras/modem-modeswitch/utils.h ++++ /dev/null +@@ -1,32 +0,0 @@ +-/* +- * Modem mode switcher +- * +- * Copyright (C) 2009 Dan Williams +- * +- * 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; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details: +- */ +- +-#ifndef __UTILS_H__ +-#define __UTILS_H__ +- +-#define LOG_ERR 0 +-#define LOG_MSG 1 +-#define LOG_DBG 2 +- +-#define message(fmt, args...) do_log (LOG_MSG, fmt, ##args); +-#define error(fmt, args...) do_log (LOG_ERR, fmt, ##args); +-#define debug(fmt, args...) do_log (LOG_DBG, fmt, ##args); +- +-void do_log (int level, const char *fmt, ...); +-int log_startup (const char *path, int do_debug, int be_quiet); +-void log_shutdown (void); +- +-#endif /* __UTILS_H__ */ +-- +1.6.6 + diff --git a/start_udev b/start_udev index 57801aa..0da55f4 100755 --- a/start_udev +++ b/start_udev @@ -56,7 +56,13 @@ if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then fi fi - +touch_recursive() { + ( cd $1; + for i in *; do + [[ -c "$i" || -b "$i" ]] && touch "$i" + [ -d "$i" ] && touch_recursive "$i" + done ) +} xargs_simple () { if [ "$1" = "-n" ]; then @@ -94,10 +100,11 @@ make_extra_nodes () { [ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts [ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm + [ -d $udev_root/hugepages ] || mkdir -m 0755 $udev_root/hugepages [ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV; USE_MD5="false" - [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" + [[ "$UDEV_USE_MAKEDEV_CACHE" == "yes" && -x /usr/bin/md5sum ]] && USE_MD5="true" for i in 0 1 2 3 4 5 6 7; do [ -b /dev/loop$i ] || /bin/mknod -m 0640 /dev/loop$i b 7 $i @@ -157,9 +164,11 @@ make_extra_nodes () { if [ "$1" != "*" ]; then #echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." cp -ar "$@" $udev_root/ - pushd "$udev_root" &> "$udev_root/null" - [ -x /sbin/restorecon ] && /sbin/restorecon "$@" - popd &> "$udev_root/null" + if [ -x /sbin/restorecon ]; then + pushd "$udev_root" &> "$udev_root/null" + /sbin/restorecon "$@" + popd &> "$udev_root/null" + fi fi popd &> "$udev_root/null" done @@ -224,11 +233,11 @@ echo -n "$STRING" # mount the tmpfs on ${udev_root%/}, if not already done LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs\" ) { exit 1 }" /proc/mounts && { - if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then + if LANG=C grep -Fq "none ${udev_root%/}/pts " /proc/mounts; then PTSDIR=$(mktemp -d) mount --move $udev_root/pts "$PTSDIR" fi - if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then + if LANG=C grep -Fq "none ${udev_root%/}/shm " /proc/mounts; then SHMDIR=$(mktemp -d) mount --move $udev_root/shm "$SHMDIR" fi @@ -250,7 +259,6 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs } make_extra_nodes -cmdline=$(cat /proc/cmdline) kill_udevd > "$udev_root/null" 2>&1 rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 mkdir -p $udev_root/.udev > "$udev_root/null" 2>&1 @@ -259,6 +267,8 @@ if [ -f "/sys/class/tty/console/uevent" ]; then # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + cmdline=$(cat /proc/cmdline) + if strstr "$cmdline" udevtrace; then UDEV_OPTS="$UDEV_OPTS --debug-trace" fi @@ -307,6 +317,10 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] wait /sbin/udevadm control --env=STARTUP= + # touch all device files for timezone glitches + # "find" is in /usr/bin and might not be available + touch_recursive /dev > "$udev_root/null" 2>&1 + else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev-151-3.patch b/udev-151-3.patch new file mode 100644 index 0000000..3dfcab0 --- /dev/null +++ b/udev-151-3.patch @@ -0,0 +1,89 @@ +? udev-147 +? udev-147.tar.bz2 +? udev-151 +? udev-151-2.fc13.src.rpm +Index: udev-86a7a2f-fix-missing-firmware.patch +=================================================================== +RCS file: udev-86a7a2f-fix-missing-firmware.patch +diff -N udev-86a7a2f-fix-missing-firmware.patch +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ udev-86a7a2f-fix-missing-firmware.patch 7 Feb 2010 04:22:50 -0000 +@@ -0,0 +1,43 @@ ++From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 ++From: =?UTF-8?q?Thomas=20B=C3=A4chler?= ++Date: Sun, 31 Jan 2010 13:49:02 +0100 ++Subject: firmware: fix error reporting on missing firmware files ++ ++The new firmware loader does not report an error to the kernel if a firmware file ++is missing. This results in modprobe stalling for 60 seconds for each firmware ++a module tries to load. ++--- ++ extras/firmware/firmware.c | 3 ++- ++ 1 files changed, 2 insertions(+), 1 deletions(-) ++ ++diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c ++index 8f70be4..16455de 100644 ++--- a/extras/firmware/firmware.c +++++ b/extras/firmware/firmware.c ++@@ -149,6 +149,7 @@ int main(int argc, char **argv) ++ ++ util_path_encode(firmware, fwencpath, sizeof(fwencpath)); ++ util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL); +++ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); ++ ++ if (fwfile == NULL) { ++ int err; ++@@ -166,6 +167,7 @@ int main(int argc, char **argv) ++ udev_selinux_resetfscreatecon(udev); ++ } while (err == -ENOENT); ++ rc = 2; +++ set_loading(udev, loadpath, "-1"); ++ goto exit; ++ } ++ ++@@ -176,7 +178,6 @@ int main(int argc, char **argv) ++ if (unlink(misspath) == 0) ++ util_delete_path(udev, misspath); ++ ++- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); ++ set_loading(udev, loadpath, "1"); ++ ++ util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); ++-- ++1.6.6 ++ +Index: udev.spec +=================================================================== +RCS file: /cvs/pkgs/rpms/udev/devel/udev.spec,v +retrieving revision 1.300 +diff -u -p -r1.300 udev.spec +--- udev.spec 29 Jan 2010 09:57:03 -0000 1.300 ++++ udev.spec 7 Feb 2010 04:22:50 -0000 +@@ -14,6 +14,7 @@ Obsoletes: udev-extras < 20090618 + Provides: udev-extras = 20090618-1 + Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 + Patch1: udev-151-rules.patch ++Patch2: udev-86a7a2f-fix-missing-firmware.patch + + Source1: start_udev + Source3: udev-post.init +@@ -110,6 +111,7 @@ glib-based applications using libudev fu + %prep + %setup -q + %patch1 -p1 ++%patch2 -p1 + + %build + # get rid of rpath +@@ -356,6 +358,11 @@ rm -rf $RPM_BUILD_ROOT + %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* + + %changelog ++* Sun Feb 07 2010 Kyle McMartin 151-3 ++- udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading ++ microcode (since microcode_intel tries to probe firmware which does ++ not exist. *sigh*) ++ + * Fri Jan 29 2010 Harald Hoyer 151-2 + - fixed rules and startup script (#559844) + diff --git a/udev-151-virtio.patch b/udev-151-virtio.patch new file mode 100644 index 0000000..d1a7644 --- /dev/null +++ b/udev-151-virtio.patch @@ -0,0 +1,30 @@ +From 764304885705e51ef3eb1d078eed3cf6604c4684 Mon Sep 17 00:00:00 2001 +From: Amit Shah +Date: Fri, 26 Feb 2010 14:02:51 +0530 +Subject: [PATCH] Fix virtio-ports rule to use $attr instead of $ATTR + +Newer udev versions don't understand $ATTR. + +Signed-off-by: Amit Shah +--- + rules/rules.d/50-udev-default.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Changed by Harald Hoyer + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index f8556d1..da1535f 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout" + KERNEL=="hvc*|hvsi*", GROUP="dialout" + + # virtio serial / console ports +-KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" ++KERNEL=="vport*", ATTRS{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" + + # mem + KERNEL=="null|zero|full|random|urandom", MODE="0666" +-- +1.6.2.5 + diff --git a/udev-post.init b/udev-post.init index f040950..67ed0c9 100644 --- a/udev-post.init +++ b/udev-post.init @@ -58,8 +58,8 @@ case "$1" in STRING=$"Generating udev makedev cache file" MAKEDEV="/sbin/MAKEDEV" USE_MD5="false" - [ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true" - if [ "$USE_MD5" == "true" -a -x "$MAKEDEV" ]; then + [[ "$UDEV_USE_MAKEDEV_CACHE" == "yes" && -x /usr/bin/md5sum ]] && USE_MD5="true" + if [[ "$USE_MD5" == "true" && -x "$MAKEDEV" ]]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then # use a little caching to speedup things diff --git a/udev.spec b/udev.spec index edce2f8..2684220 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -13,8 +13,32 @@ Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch1: udev-151-rules.patch -Patch2: udev-86a7a2f-fix-missing-firmware.patch +Patch1: 0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch +Patch2: 0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch +Patch3: 0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch +Patch4: 0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch +Patch5: 0005-keymap-Fix-LG-X110.patch +Patch6: 0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch +Patch7: 0007-keymap-Add-Toshiba-Satellite-M30X.patch +Patch13: 0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch +Patch14: 0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch +Patch15: 0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch +Patch16: 0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch +Patch17: 0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch +Patch18: 0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch +Patch19: 0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch +Patch21: 0021-input_id-Fix-linking.patch +Patch22: 0022-replace-utimes-with-utimensat.patch +Patch29: 0029-firmware-fix-possible-segfault-when-firmware-device-.patch +Patch30: 0030-rules-input-create-by-path-links-for-pci-devices.patch +Patch31: 0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch +Patch32: 0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch +Patch34: 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch +Patch35: 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch +Patch36: 0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch + +Patch101: udev-151-rules.patch +Patch102: udev-151-virtio.patch Source1: start_udev Source3: udev-post.init @@ -110,17 +134,42 @@ glib-based applications using libudev functionality. %prep %setup -q -%patch1 -p1 -%patch2 -p1 + +%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 +%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 +%patch21 -p1 -b .git21 +%patch22 -p1 -b .git22 +%patch29 -p1 -b .git29 +%patch30 -p1 -b .git30 +%patch31 -p1 -b .git31 +%patch32 -p1 -b .git32 +%patch34 -p1 -b .git34 +%patch35 -p1 -b .git35 +%patch36 -p1 -b .git36 + +%patch101 -p1 +%patch102 -p1 %build # get rid of rpath libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ - --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ - --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ - --with-rootlibdir=/%{_lib} --enable-introspection \ - --disable-rpath --enable-debug + --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ + --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ + --with-rootlibdir=/%{_lib} --enable-introspection \ + --disable-rpath --enable-debug make %{?_smp_mflags} @@ -143,32 +192,24 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor - -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle -ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol - for i in \ - rules/redhat/40-redhat.rules \ + rules/redhat/40-redhat.rules \ %ifarch ia64 - rules/packages/40-ia64.rules \ + rules/packages/40-ia64.rules \ %endif %ifarch ppc ppc64 - rules/packages/40-ppc.rules \ + rules/packages/40-ppc.rules \ %endif %ifarch s390 s390x - rules/packages/40-s390.rules \ + rules/packages/40-s390.rules \ %endif - rules/packages/40-isdn.rules \ - rules/packages/64-md-raid.rules \ - rules/packages/64-device-mapper.rules \ - ; do - install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" + rules/packages/40-isdn.rules \ + rules/packages/64-md-raid.rules \ + rules/packages/64-device-mapper.rules \ + ; do + install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done - + mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh @@ -188,16 +229,16 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then - if [ -x /sbin/pidof ]; then - pid=$(/sbin/pidof -c udevd) - if [ -n "$pid" ]; then - kill $pid - fi - fi - /sbin/chkconfig --del udev + if [ -x /sbin/pidof ]; then + pid=$(/sbin/pidof -c udevd) + if [ -n "$pid" ]; then + kill $pid + fi + fi + /sbin/chkconfig --del udev fi if [ "$1" -eq 0 ]; then - /sbin/chkconfig --del udev-post + /sbin/chkconfig --del udev-post fi exit 0 @@ -212,29 +253,29 @@ getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then - if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - if test -x /sbin/udevd -a -x /sbin/pidof ; then - /sbin/udevadm control --stop-exec-queue - pid=$(/sbin/pidof -c udevd) - while [ -n "$pid" ]; do - for p in $pid; do - kill $hard $p; - done - pid=$(/sbin/pidof -c udevd) - hard="-9" - done - fi - fi + if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if test -x /sbin/udevd -a -x /sbin/pidof ; then + /sbin/udevadm control --stop-exec-queue + pid=$(/sbin/pidof -c udevd) + while [ -n "$pid" ]; do + for p in $pid; do + kill $hard $p; + done + pid=$(/sbin/pidof -c udevd) + hard="-9" + done + fi + fi fi exit 0 %post # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then - if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /sbin/udevd -d - /sbin/udevadm control --start-exec-queue - fi + if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + /sbin/udevd -d + /sbin/udevadm control --start-exec-queue + fi fi /sbin/chkconfig --add udev-post @@ -259,9 +300,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(0644, root, root, 0755) %doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm -%attr(0755,root,root) /sbin/udevsettle -%attr(0755,root,root) /sbin/udevtrigger -%attr(0755,root,root) /sbin/udevcontrol %attr(0755,root,root) /sbin/udevd %attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id @@ -286,9 +324,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %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 %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -315,26 +350,26 @@ rm -rf $RPM_BUILD_ROOT %ghost %dir %{_sysconfdir}/udev/devices/ %ghost %dir %{_sysconfdir}/dev.d/ -%attr(0755,root,root) %{udev_scriptdir}/modem-modeswitch +%attr(0755,root,root) %{udev_scriptdir}/mobile-action-modeswitch %attr(0755,root,root) %{udev_scriptdir}/pci-db %attr(0755,root,root) %{udev_scriptdir}/usb-db %attr(0755,root,root) %{udev_scriptdir}/keymap %attr(0755,root,root) %{udev_scriptdir}/udev-acl %attr(0755,root,root) %{udev_scriptdir}/v4l_id %attr(0755,root,root) %{udev_scriptdir}/findkeyboards -%dir %attr(0755,root,root) %{udev_scriptdir}/keymaps -%attr(0644,root,root) %{udev_scriptdir}/keymaps/* +%dir %{udev_scriptdir}/keymaps +%{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %files -n libudev %defattr(0644, root, root, 0755) -%doc COPYING +%doc libudev/COPYING %attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel %defattr(0644, root, root, 0755) -%doc COPYING libudev/docs/html/* +%doc libudev/COPYING libudev/docs/html/* %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc @@ -343,14 +378,16 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) -%doc COPYING +%doc extras/gudev/COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel %defattr(0644, root, root, 0755) -%doc COPYING extras/gudev/docs/html/* +%doc extras/gudev/COPYING extras/gudev/docs/html/* %attr(0755,root,root) %{_libdir}/libgudev-1.0.so +%dir %attr(0755,root,root) %{_includedir}/gudev-1.0 +%dir %attr(0755,root,root) %{_includedir}/gudev-1.0/gudev %attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h %attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir %dir %{_datadir}/gtk-doc/html/gudev @@ -358,6 +395,17 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Mar 19 2010 Harald Hoyer 151-4 +- add patch for virtio-ports (#569700) +- own libgudev dirs (#561319) +- minor udev startup script improvements (#549518) +- create /dev/hugepages subdir in start_udev (#541998) +- remove GPL COPYING file from LGPL subpackages (#536843) +- removed symlinks to udevadm +- touch all device nodes after udev settled for the timezone + timestamp (#569335) +- add some upstream bugfixes + * Sun Feb 07 2010 Kyle McMartin 151-3 - udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading microcode (since microcode_intel tries to probe firmware which does @@ -445,7 +493,7 @@ rm -rf $RPM_BUILD_ROOT - git fix: rule-generator: cd - skip by-path links if we create by-id links - git fix: fix possible endless loop for GOTO to non-existent LABEL - git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable - CDROM media + CDROM media * Thu Jun 08 2009 Harald Hoyer 142-3 - delay device-mapper changes From ad37a7c9650cb9daee47b809a89791aed12852f6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Mar 2010 13:20:44 +0000 Subject: [PATCH 544/640] add "-D" to gperf call --- udev-151-gperf.patch | 13 +++++++++++++ udev.spec | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 udev-151-gperf.patch diff --git a/udev-151-gperf.patch b/udev-151-gperf.patch new file mode 100644 index 0000000..db93ba7 --- /dev/null +++ b/udev-151-gperf.patch @@ -0,0 +1,13 @@ +diff -up udev-151/extras/keymap/keys-from-name.gperf udev-151/extras/keymap/keys-from-name +diff -up udev-151/Makefile.am.gperf udev-151/Makefile.am +--- udev-151/Makefile.am.gperf 2010-03-19 14:04:36.000000000 +0100 ++++ udev-151/Makefile.am 2010-03-19 14:04:52.000000000 +0100 +@@ -550,7 +550,7 @@ extras/keymap/keys-from-name.gperf: extr + $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@ + + extras/keymap/keys-from-name.h: extras/keymap/keys-from-name.gperf Makefile +- $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@ ++ $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C -D < $< > $@ + + extras/keymap/keys-to-name.h: extras/keymap/keys.txt Makefile + $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@ diff --git a/udev.spec b/udev.spec index 2684220..e4ffd5b 100644 --- a/udev.spec +++ b/udev.spec @@ -39,6 +39,7 @@ Patch36: 0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch Patch101: udev-151-rules.patch Patch102: udev-151-virtio.patch +Patch103: udev-151-gperf.patch Source1: start_udev Source3: udev-post.init @@ -161,8 +162,11 @@ glib-based applications using libudev functionality. %patch101 -p1 %patch102 -p1 +%patch103 -p1 %build +autoreconf -i +automake # get rid of rpath libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ @@ -405,6 +409,7 @@ rm -rf $RPM_BUILD_ROOT - touch all device nodes after udev settled for the timezone timestamp (#569335) - add some upstream bugfixes +- add "-D" to gperf call * Sun Feb 07 2010 Kyle McMartin 151-3 - udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading From 1bb5602ec725eb90b658b8d05dbdcda59e5636ef Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 19 Mar 2010 13:24:17 +0000 Subject: [PATCH 545/640] - add "-D" to gperf call --- udev.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index e4ffd5b..195817f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -399,6 +399,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Mar 19 2010 Harald Hoyer 151-5 +- add "-D" to gperf call + * Fri Mar 19 2010 Harald Hoyer 151-4 - add patch for virtio-ports (#569700) - own libgudev dirs (#561319) @@ -409,7 +412,6 @@ rm -rf $RPM_BUILD_ROOT - touch all device nodes after udev settled for the timezone timestamp (#569335) - add some upstream bugfixes -- add "-D" to gperf call * Sun Feb 07 2010 Kyle McMartin 151-3 - udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading From a444fba28072314ed74037c6f2165fd1e2e1eab2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Mar 2010 10:08:46 +0000 Subject: [PATCH 546/640] - fixed return code of touching the device nodes [FAIL] -> [OK] --- start_udev | 5 +++-- udev.spec | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/start_udev b/start_udev index 0da55f4..ac06e3c 100755 --- a/start_udev +++ b/start_udev @@ -62,6 +62,7 @@ touch_recursive() { [[ -c "$i" || -b "$i" ]] && touch "$i" [ -d "$i" ] && touch_recursive "$i" done ) + return 0 } xargs_simple () { @@ -316,11 +317,11 @@ if [ -f "/sys/class/tty/console/uevent" ]; then wait_for_queue $udevtimeout ret=$[$ret + $?] wait + ret=$[$ret + $?] /sbin/udevadm control --env=STARTUP= # touch all device files for timezone glitches # "find" is in /usr/bin and might not be available - touch_recursive /dev > "$udev_root/null" 2>&1 - + touch_recursive /dev > "$udev_root/null" 2>&1 else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS diff --git a/udev.spec b/udev.spec index 195817f..d64ff0d 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -399,6 +399,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Mar 22 2010 Harald Hoyer 151-6 +- fixed return code of touching the device nodes [FAIL] -> [OK] + * Fri Mar 19 2010 Harald Hoyer 151-5 - add "-D" to gperf call From ec584eb00a8ea594971ee546f5be2857d00878c9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Mar 2010 10:09:32 +0000 Subject: [PATCH 547/640] - fixed return code of touching the device nodes [FAIL] -> [OK] --- start_udev | 1 + udev.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index d9969d0..edae2a3 100755 --- a/start_udev +++ b/start_udev @@ -62,6 +62,7 @@ touch_recursive() { [[ -c "$i" || -b "$i" ]] && touch "$i" [ -d "$i" ] && touch_recursive "$i" done ) + return 0 } xargs_simple () { diff --git a/udev.spec b/udev.spec index 021cf34..c061c7f 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -379,6 +379,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Mar 22 2010 Harald Hoyer 145-17 +- fixed return code of touching the device nodes [FAIL] -> [OK] + * Wed Mar 17 2010 Harald Hoyer 145-16 - let cdrom_id use O_EXCL (#566535) - fix interface rename bug (#531074 #544357) From db587cb8c229354ae10f4fed02d3e5127ca84365 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Mar 2010 13:34:41 +0000 Subject: [PATCH 548/640] - touch with "--no-create", will not use open() and trigger devs/watchdogs (bug #575417) --- start_udev | 2 +- udev-151-virtio.patch | 2 +- udev.spec | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/start_udev b/start_udev index ac06e3c..f6ca868 100755 --- a/start_udev +++ b/start_udev @@ -59,7 +59,7 @@ fi touch_recursive() { ( cd $1; for i in *; do - [[ -c "$i" || -b "$i" ]] && touch "$i" + [[ -c "$i" || -b "$i" ]] && touch --no-create "$i" [ -d "$i" ] && touch_recursive "$i" done ) return 0 diff --git a/udev-151-virtio.patch b/udev-151-virtio.patch index d1a7644..53bbef6 100644 --- a/udev-151-virtio.patch +++ b/udev-151-virtio.patch @@ -21,7 +21,7 @@ index f8556d1..da1535f 100644 # virtio serial / console ports -KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" -+KERNEL=="vport*", ATTRS{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" ++KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" # mem KERNEL=="null|zero|full|random|urandom", MODE="0666" diff --git a/udev.spec b/udev.spec index d64ff0d..061713c 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -399,6 +399,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Mar 22 2010 Harald Hoyer 151-7 +- touch with "--no-create", will not use open() + and trigger devs/watchdogs (bug #575417) + * Mon Mar 22 2010 Harald Hoyer 151-6 - fixed return code of touching the device nodes [FAIL] -> [OK] From c7c784416acfa28b7b9aeb0e2f2581fd6a2eef35 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Mar 2010 13:36:31 +0000 Subject: [PATCH 549/640] - touch with "--no-create", will not use open() and trigger devs/watchdogs (bug #575417) --- start_udev | 2 +- udev-147-virtio.patch | 2 +- udev.spec | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/start_udev b/start_udev index edae2a3..9da2819 100755 --- a/start_udev +++ b/start_udev @@ -59,7 +59,7 @@ fi touch_recursive() { ( cd $1; for i in *; do - [[ -c "$i" || -b "$i" ]] && touch "$i" + [[ -c "$i" || -b "$i" ]] && touch --no-create "$i" [ -d "$i" ] && touch_recursive "$i" done ) return 0 diff --git a/udev-147-virtio.patch b/udev-147-virtio.patch index b10a282..5a55e6f 100644 --- a/udev-147-virtio.patch +++ b/udev-147-virtio.patch @@ -27,7 +27,7 @@ diff -up udev-145/rules/rules.d/50-udev-default.rules.virtio udev-145/rules/rule KERNEL=="hvc*|hvsi*", GROUP="dialout" +# virtio serial / console ports -+KERNEL=="vport*", ATTRS{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" ++KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" + # mem KERNEL=="null|zero|full|random|urandom", MODE="0666" diff --git a/udev.spec b/udev.spec index c061c7f..d5f41da 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -379,6 +379,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Mar 22 2010 Harald Hoyer 145-18 +- touch with "--no-create", will not use open() + and trigger devs/watchdogs (bug #575417) + * Mon Mar 22 2010 Harald Hoyer 145-17 - fixed return code of touching the device nodes [FAIL] -> [OK] From 89b0f29d8bedc9c6bba19d010b4f4025f6c02d4d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Mar 2010 14:25:24 +0000 Subject: [PATCH 550/640] - only correct the timestamp, if UTC=="no" --- start_udev | 8 +++++--- udev.spec | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/start_udev b/start_udev index f6ca868..df6c41b 100755 --- a/start_udev +++ b/start_udev @@ -321,15 +321,17 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevadm control --env=STARTUP= # touch all device files for timezone glitches # "find" is in /usr/bin and might not be available - touch_recursive /dev > "$udev_root/null" 2>&1 + if [ -f /etc/sysconfig/clock ]; then + . /etc/sysconfig/clock + [[ "$UTC" == "false" || "$UTC" == "no" ]] \ + && touch_recursive /dev > "$udev_root/null" 2>&1 + fi else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS ret=10 - fi -ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo exit 0 diff --git a/udev.spec b/udev.spec index 061713c..d4bca7d 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 151 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -399,6 +399,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Mar 22 2010 Harald Hoyer 151-8 +- only correct the timestamp, if UTC=="no" + * Mon Mar 22 2010 Harald Hoyer 151-7 - touch with "--no-create", will not use open() and trigger devs/watchdogs (bug #575417) From c03ca5cb95b9e7297f8720d8b0d3ba0ddb42ad89 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 22 Mar 2010 14:26:49 +0000 Subject: [PATCH 551/640] - only correct the timestamp, if UTC=="no" --- start_udev | 10 ++++++---- udev.spec | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/start_udev b/start_udev index 9da2819..d90d6d0 100755 --- a/start_udev +++ b/start_udev @@ -314,19 +314,21 @@ if [ -f "/sys/class/tty/console/uevent" ]; then wait_for_queue $udevtimeout ret=$[$ret + $?] wait + ret=$[$ret + $?] /sbin/udevadm control --env=STARTUP= # touch all device files for timezone glitches # "find" is in /usr/bin and might not be available - touch_recursive /dev > "$udev_root/null" 2>&1 - + if [ -f /etc/sysconfig/clock ]; then + . /etc/sysconfig/clock + [[ "$UTC" == "false" || "$UTC" == "no" ]] \ + && touch_recursive /dev > "$udev_root/null" 2>&1 + fi else echo -n " kernel too old for this udev version " /sbin/udevd -d $UDEV_OPTS ret=10 - fi -ret=$[$ret + $?] [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" echo exit 0 diff --git a/udev.spec b/udev.spec index d5f41da..f61bcfe 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -379,6 +379,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Mar 22 2010 Harald Hoyer 145-19 +- only correct the timestamp, if UTC=="no" + * Mon Mar 22 2010 Harald Hoyer 145-18 - touch with "--no-create", will not use open() and trigger devs/watchdogs (bug #575417) From 0d812c700ea84b6fbf1429db5eb497e183f376b1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Apr 2010 15:09:40 +0000 Subject: [PATCH 552/640] - pre release of version 152 --- udev.spec | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 7 deletions(-) diff --git a/udev.spec b/udev.spec index d4bca7d..8a5922e 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 151 -Release: 8%{?dist} +Version: 152 +Release: 0.1.20100413git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -13,6 +13,7 @@ Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 + Patch1: 0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch Patch2: 0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch Patch3: 0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch @@ -20,6 +21,11 @@ Patch4: 0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch Patch5: 0005-keymap-Fix-LG-X110.patch Patch6: 0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch Patch7: 0007-keymap-Add-Toshiba-Satellite-M30X.patch +Patch8: 0008-libudev-export-udev_monitor_set_receive_buffer_size.patch +Patch9: 0009-udevadm-monitor-increase-netlink-buffer-size.patch +Patch10: 0010-libudev-bump-minor-version.patch +Patch11: 0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch +Patch12: 0012-configure.ac-version-bump.patch Patch13: 0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch Patch14: 0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch Patch15: 0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch @@ -27,18 +33,54 @@ Patch16: 0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch Patch17: 0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch Patch18: 0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch Patch19: 0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch +Patch20: 0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch Patch21: 0021-input_id-Fix-linking.patch Patch22: 0022-replace-utimes-with-utimensat.patch +Patch23: 0023-libbudev-private-rename-udev_list_entry_get_flag.patch +Patch24: 0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch +Patch25: 0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch +Patch26: 0026-use-major-minor-as-entries-in-watch-directory.patch +#Patch27: 0027-libudev-docs-.gitignore-backup-files.patch +Patch28: 0028-udev-needs-automake-1.10.patch Patch29: 0029-firmware-fix-possible-segfault-when-firmware-device-.patch Patch30: 0030-rules-input-create-by-path-links-for-pci-devices.patch Patch31: 0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch Patch32: 0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch +Patch33: 0033-libudev-add-udev_device_new_from_environment.patch Patch34: 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch Patch35: 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch Patch36: 0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch +Patch37: 0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch +Patch38: 0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch +Patch39: 0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch +Patch40: 0040-libudev-update-documentation.patch +Patch41: 0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch +Patch42: 0042-Add-new-Dell-touchpad-keycode.patch +Patch43: 0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch +Patch44: 0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch +Patch45: 0045-Add-support-for-another-Dell-touchpad-toggle-key.patch +#Patch46: 0046-extras-mobile-action-modeswitch-update-gitignore.patch +Patch47: 0047-scsi_id-add-rand-in-retry-loop.patch +Patch48: 0048-cdrom_id-remove-debugging-code.patch +Patch49: 0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch +Patch50: 0050-cdrom_id-check-mount-state-in-retry-loop.patch +Patch51: 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch +Patch52: 0052-rules-delete-outdated-packagees-rules.patch +Patch53: 0053-rules-we-do-not-have-static-devices-which-are-rename.patch +Patch54: 0054-unify-cleanup-event-handling.patch +Patch55: 0055-allow-IMPORT-db-KEY.patch +Patch56: 0056-usb-db-remove-double.patch +Patch57: 0057-replace-add-change-with-remove.patch +Patch58: 0058-update-NEWS.patch +Patch59: 0059-log-info-only-if-we-actually-delete-the-node.patch +Patch60: 0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch +Patch61: 0061-remove-all_partitions-option.patch +Patch62: 0062-cdrom_id-Fix-uninitialized-variables.patch +Patch63: 0063-rules-call-modprobe-on-all-events-but-remove.patch +Patch64: 0064-remove-ignore_remove-option.patch +Patch65: 0065-cdrom_id-Fix-uninitialized-buffers.patch Patch101: udev-151-rules.patch -Patch102: udev-151-virtio.patch Patch103: udev-151-gperf.patch Source1: start_udev @@ -143,6 +185,11 @@ glib-based applications using libudev functionality. %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 @@ -150,18 +197,55 @@ glib-based applications using libudev functionality. %patch17 -p1 -b .git17 %patch18 -p1 -b .git18 %patch19 -p1 -b .git19 +%patch20 -p1 -b .git20 %patch21 -p1 -b .git21 %patch22 -p1 -b .git22 +%patch23 -p1 -b .git23 +%patch24 -p1 -b .git24 +%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 +%patch38 -p1 -b .git38 +%patch39 -p1 -b .git39 +%patch40 -p1 -b .git40 +%patch41 -p1 -b .git41 +%patch42 -p1 -b .git42 +%patch43 -p1 -b .git43 +%patch44 -p1 -b .git44 +%patch45 -p1 -b .git45 +#%patch46 -p1 -b .git46 +%patch47 -p1 -b .git47 +%patch48 -p1 -b .git48 +%patch49 -p1 -b .git49 +%patch50 -p1 -b .git50 +%patch51 -p1 -b .git51 +%patch52 -p1 -b .git52 +%patch53 -p1 -b .git53 +%patch54 -p1 -b .git54 +%patch55 -p1 -b .git55 +%patch56 -p1 -b .git56 +%patch57 -p1 -b .git57 +%patch58 -p1 -b .git58 +%patch59 -p1 -b .git59 +%patch60 -p1 -b .git60 +%patch61 -p1 -b .git61 +%patch62 -p1 -b .git62 +%patch63 -p1 -b .git63 +%patch64 -p1 -b .git64 +%patch65 -p1 -b .git65 + %patch101 -p1 -%patch102 -p1 %patch103 -p1 %build @@ -207,9 +291,6 @@ for i in \ %ifarch s390 s390x rules/packages/40-s390.rules \ %endif - rules/packages/40-isdn.rules \ - rules/packages/64-md-raid.rules \ - rules/packages/64-device-mapper.rules \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done @@ -399,6 +480,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Apr 13 2010 Harald Hoyer 152-0.1.20100413git +- pre release of version 152 + * Mon Mar 22 2010 Harald Hoyer 151-8 - only correct the timestamp, if UTC=="no" From 9e1428cd3efbdc0cb3774b8085aae4a45cda617d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Apr 2010 15:17:30 +0000 Subject: [PATCH 553/640] - pre release of version 152 --- ...or-reporting-on-missing-firmware-fil.patch | 2 +- ...eymap-Add-Dell-Inspiron-1011-Mini-10.patch | 2 +- ...ix-brightness-keys-on-MSI-Wind-U-100.patch | 2 +- ...ort-for-Gateway-AOA110-AOA150-clones.patch | 2 +- 0005-keymap-Fix-LG-X110.patch | 2 +- ...e-for-volume-keys-on-Dell-Studio-155.patch | 2 +- 0007-keymap-Add-Toshiba-Satellite-M30X.patch | 2 +- ...udev_monitor_set_receive_buffer_size.patch | 58 +++ ...monitor-increase-netlink-buffer-size.patch | 37 ++ 0010-libudev-bump-minor-version.patch | 29 ++ ...sted-and-broken-commit-to-set-buffer.patch | 25 + 0012-configure.ac-version-bump.patch | 37 ++ ...amsung-Q210-P210-force-release-quirk.patch | 2 +- ...tsu-Amilo-1848-u-force-release-quirk.patch | 2 +- ...er-size-when-advancing-past-NUL-byte.patch | 2 +- ...ZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch | 2 +- ...se-UTIL_LINE_SIZE-from-2048-to-16384.patch | 2 +- ...rts-rule-to-use-attr-instead-of-ATTR.patch | 2 +- ...cl-Correctly-handle-ENV-ACL_MANAGE-0.patch | 2 +- ...encourage-use-of-ACL_MANAGE-outside-.patch | 27 + 0021-input_id-Fix-linking.patch | 2 +- 0022-replace-utimes-with-utimensat.patch | 2 +- ...vate-rename-udev_list_entry_get_flag.patch | 212 ++++++++ ...use-as-separator-in-subsystem-match-.patch | 65 +++ ...as-entries-in-symlink-stack-instead-.patch | 81 +++ ...-minor-as-entries-in-watch-directory.patch | 120 +++++ 0028-udev-needs-automake-1.10.patch | 28 + ...sible-segfault-when-firmware-device-.patch | 2 +- ...create-by-path-links-for-pci-devices.patch | 2 +- ...gitech-bluetooth-adapters-into-hci-m.patch | 2 +- ...inux-context-when-the-node-was-not-t.patch | 2 +- ...add-udev_device_new_from_environment.patch | 480 ++++++++++++++++++ ...dd-LGPL-COPYING-to-libudev-and-GUdev.patch | 2 +- ...on-mounted-optical-media-with-O_EXCL.patch | 2 +- ...-into-tool-that-only-switches-Mobile.patch | 2 +- ...-is-to-check-if-the-name-attribute-i.patch | 28 + ...TravelMate-6593G-and-Acer-Aspire-164.patch | 25 + ...another-key-for-Acer-TravelMate-6593.patch | 26 + 0040-libudev-update-documentation.patch | 108 ++++ ...Keymapping-for-upcoming-Dell-Laptops.patch | 50 ++ 0042-Add-new-Dell-touchpad-keycode.patch | 32 ++ ...cial-casing-0xD8-to-latitude-XT-only.patch | 42 ++ ...tudio-1558-volume-keys-not-releasing.patch | 30 ++ ...for-another-Dell-touchpad-toggle-key.patch | 29 ++ 0047-scsi_id-add-rand-in-retry-loop.patch | 45 ++ 0048-cdrom_id-remove-debugging-code.patch | 24 + ...id-retry-to-open-the-device-if-EBUSY.patch | 53 ++ ...m_id-check-mount-state-in-retry-loop.patch | 55 ++ ...set-ID_CDROM-regardless-if-we-can-ru.patch | 31 ++ ...ules-delete-outdated-packagees-rules.patch | 124 +++++ ...have-static-devices-which-are-rename.patch | 21 + 0054-unify-cleanup-event-handling.patch | 362 +++++++++++++ 0055-allow-IMPORT-db-KEY.patch | 109 ++++ 0056-usb-db-remove-double.patch | 31 ++ 0057-replace-add-change-with-remove.patch | 276 ++++++++++ 0058-update-NEWS.patch | 30 ++ ...-only-if-we-actually-delete-the-node.patch | 27 + ...switch-default-action-from-add-to-ch.patch | 49 ++ 0061-remove-all_partitions-option.patch | 363 +++++++++++++ ...cdrom_id-Fix-uninitialized-variables.patch | 131 +++++ ...ll-modprobe-on-all-events-but-remove.patch | 36 ++ 0064-remove-ignore_remove-option.patch | 273 ++++++++++ 0065-cdrom_id-Fix-uninitialized-buffers.patch | 82 +++ udev.spec | 5 +- 64 files changed, 3717 insertions(+), 25 deletions(-) create mode 100644 0008-libudev-export-udev_monitor_set_receive_buffer_size.patch create mode 100644 0009-udevadm-monitor-increase-netlink-buffer-size.patch create mode 100644 0010-libudev-bump-minor-version.patch create mode 100644 0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch create mode 100644 0012-configure.ac-version-bump.patch create mode 100644 0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch create mode 100644 0023-libbudev-private-rename-udev_list_entry_get_flag.patch create mode 100644 0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch create mode 100644 0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch create mode 100644 0026-use-major-minor-as-entries-in-watch-directory.patch create mode 100644 0028-udev-needs-automake-1.10.patch create mode 100644 0033-libudev-add-udev_device_new_from_environment.patch create mode 100644 0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch create mode 100644 0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch create mode 100644 0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch create mode 100644 0040-libudev-update-documentation.patch create mode 100644 0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch create mode 100644 0042-Add-new-Dell-touchpad-keycode.patch create mode 100644 0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch create mode 100644 0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch create mode 100644 0045-Add-support-for-another-Dell-touchpad-toggle-key.patch create mode 100644 0047-scsi_id-add-rand-in-retry-loop.patch create mode 100644 0048-cdrom_id-remove-debugging-code.patch create mode 100644 0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch create mode 100644 0050-cdrom_id-check-mount-state-in-retry-loop.patch create mode 100644 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch create mode 100644 0052-rules-delete-outdated-packagees-rules.patch create mode 100644 0053-rules-we-do-not-have-static-devices-which-are-rename.patch create mode 100644 0054-unify-cleanup-event-handling.patch create mode 100644 0055-allow-IMPORT-db-KEY.patch create mode 100644 0056-usb-db-remove-double.patch create mode 100644 0057-replace-add-change-with-remove.patch create mode 100644 0058-update-NEWS.patch create mode 100644 0059-log-info-only-if-we-actually-delete-the-node.patch create mode 100644 0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch create mode 100644 0061-remove-all_partitions-option.patch create mode 100644 0062-cdrom_id-Fix-uninitialized-variables.patch create mode 100644 0063-rules-call-modprobe-on-all-events-but-remove.patch create mode 100644 0064-remove-ignore_remove-option.patch create mode 100644 0065-cdrom_id-Fix-uninitialized-buffers.patch diff --git a/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch b/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch index 933407f..41727ad 100644 --- a/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch +++ b/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch @@ -1,7 +1,7 @@ From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Sun, 31 Jan 2010 13:49:02 +0100 -Subject: [PATCH 01/36] firmware: fix error reporting on missing firmware files +Subject: [PATCH 01/65] firmware: fix error reporting on missing firmware files The new firmware loader does not report an error to the kernel if a firmware file is missing. This results in modprobe stalling for 60 seconds for each firmware diff --git a/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch b/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch index 47cc9fa..a2b2e5e 100644 --- a/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch +++ b/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch @@ -1,7 +1,7 @@ From fc47e0b56779ceeaaa40d2dc3248fa002af63aaa Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 1 Feb 2010 15:27:46 -0800 -Subject: [PATCH 02/36] keymap: Add Dell Inspiron 1011 (Mini 10) +Subject: [PATCH 02/65] keymap: Add Dell Inspiron 1011 (Mini 10) This fixes the broken WLAN key. --- diff --git a/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch b/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch index c00f51e..e1a366c 100644 --- a/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch +++ b/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch @@ -1,7 +1,7 @@ From d7e2d38c1f0ead2239808dd117577a99a3ad3cde Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 9 Feb 2010 15:47:47 +0100 -Subject: [PATCH 03/36] Fix brightness keys on MSI Wind U-100 +Subject: [PATCH 03/65] Fix brightness keys on MSI Wind U-100 The MSI Wind 100 generates ACPI/input events on the LNXVIDEO input device. On top of that, the video module/BIOS synthesize some extra event on atkbd as an diff --git a/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch b/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch index a7167c4..3d927d2 100644 --- a/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch +++ b/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch @@ -1,7 +1,7 @@ From 063985ef7dd6050f33920700777831426b221697 Mon Sep 17 00:00:00 2001 From: Robert Hooker Date: Sun, 7 Feb 2010 13:56:27 -0500 -Subject: [PATCH 04/36] keymap: Add support for Gateway AOA110/AOA150 clones. +Subject: [PATCH 04/65] keymap: Add support for Gateway AOA110/AOA150 clones. https://launchpad.net/bugs/518496 diff --git a/0005-keymap-Fix-LG-X110.patch b/0005-keymap-Fix-LG-X110.patch index 380ecf0..d36d5c0 100644 --- a/0005-keymap-Fix-LG-X110.patch +++ b/0005-keymap-Fix-LG-X110.patch @@ -1,7 +1,7 @@ From 4c514e31734a704ca58e543fa4330616ba584b39 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 12 Feb 2010 19:25:47 +0100 -Subject: [PATCH 05/36] keymap: Fix LG X110 +Subject: [PATCH 05/65] keymap: Fix LG X110 The LG X110 is not a perfect clone of the MSI Wind after all, and needs its own keymap. Thanks to Konstantin Lavrov! diff --git a/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch b/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch index 2f147fc..d274d6c 100644 --- a/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch +++ b/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch @@ -1,7 +1,7 @@ From b15bb8019094797aee65f35e3e654354b61bfd7b Mon Sep 17 00:00:00 2001 From: Jerone Young Date: Fri, 12 Feb 2010 18:08:08 -0600 -Subject: [PATCH 06/36] Force key release for volume keys on Dell Studio 1557 +Subject: [PATCH 06/65] Force key release for volume keys on Dell Studio 1557 Dell Studio 1557 does not generate a release code when the volume keys are pressed, causing them to generate infinite key presses. This forces diff --git a/0007-keymap-Add-Toshiba-Satellite-M30X.patch b/0007-keymap-Add-Toshiba-Satellite-M30X.patch index 4d17c00..98a893b 100644 --- a/0007-keymap-Add-Toshiba-Satellite-M30X.patch +++ b/0007-keymap-Add-Toshiba-Satellite-M30X.patch @@ -1,7 +1,7 @@ From 4ca91a04e8b727a079a973fdd9bc2b093e8315a5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 15 Feb 2010 13:15:25 +0100 -Subject: [PATCH 07/36] keymap: Add Toshiba Satellite M30X +Subject: [PATCH 07/65] keymap: Add Toshiba Satellite M30X Thanks to Alessio Gaeta! diff --git a/0008-libudev-export-udev_monitor_set_receive_buffer_size.patch b/0008-libudev-export-udev_monitor_set_receive_buffer_size.patch new file mode 100644 index 0000000..34a10cf --- /dev/null +++ b/0008-libudev-export-udev_monitor_set_receive_buffer_size.patch @@ -0,0 +1,58 @@ +From a571c23e954cb88cdd5faa28593b19bd7c340130 Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Wed, 17 Feb 2010 15:26:00 +0000 +Subject: [PATCH 08/65] libudev: export udev_monitor_set_receive_buffer_size() + +This function is useful for anything that's likely to be running +alongside udevd during cold-plugging, and is using libudev to +receive the events. + +It makes little sense for it to be private, or to require other +software to relearn how to adjust the buffer size. + +Signed-off-by: Scott James Remnant +--- + libudev/exported_symbols | 1 + + libudev/libudev-private.h | 1 - + libudev/libudev.h | 1 + + 3 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/libudev/exported_symbols b/libudev/exported_symbols +index 018463d..f48025a 100644 +--- a/libudev/exported_symbols ++++ b/libudev/exported_symbols +@@ -51,6 +51,7 @@ udev_enumerate_scan_subsystems + udev_enumerate_add_syspath + udev_monitor_new_from_socket + udev_monitor_new_from_netlink ++udev_monitor_set_receive_buffer_size + udev_monitor_enable_receiving + udev_monitor_ref + udev_monitor_unref +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index c2fff00..0d28b80 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -109,7 +109,6 @@ int udev_monitor_disconnect(struct udev_monitor *udev_monitor); + int udev_monitor_allow_unicast_sender(struct udev_monitor *udev_monitor, struct udev_monitor *sender); + int udev_monitor_send_device(struct udev_monitor *udev_monitor, + struct udev_monitor *destination, struct udev_device *udev_device); +-int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size); + + /* libudev-ctrl.c - daemon runtime setup */ + struct udev_ctrl; +diff --git a/libudev/libudev.h b/libudev/libudev.h +index ad11059..9576ad4 100644 +--- a/libudev/libudev.h ++++ b/libudev/libudev.h +@@ -111,6 +111,7 @@ struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char + struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path); + /* bind socket */ + int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor); ++int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size); + int udev_monitor_get_fd(struct udev_monitor *udev_monitor); + struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor); + /* in-kernel socket filters to select messages that get delivered to a listener */ +-- +1.6.6 + diff --git a/0009-udevadm-monitor-increase-netlink-buffer-size.patch b/0009-udevadm-monitor-increase-netlink-buffer-size.patch new file mode 100644 index 0000000..db69f85 --- /dev/null +++ b/0009-udevadm-monitor-increase-netlink-buffer-size.patch @@ -0,0 +1,37 @@ +From 0fe3c26eab97c4ee381918e6925a6cd798be5f39 Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Wed, 17 Feb 2010 15:27:36 +0000 +Subject: [PATCH 09/65] udevadm monitor: increase netlink buffer size + +A common use (e.g. in Ubuntu) for udevadm monitor is to log the events +received by udev during boot; events can be lost of the buffer size isn't +increased as udevd does. + +Signed-off-by: Scott James Remnant +--- + udev/udevadm-monitor.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c +index 00b130d..ea4b7dc 100644 +--- a/udev/udevadm-monitor.c ++++ b/udev/udevadm-monitor.c +@@ -158,6 +158,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + rc = 1; + goto out; + } ++ udev_monitor_set_receive_buffer_size(udev_monitor, 128*1024*1024); + + udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) { + const char *subsys = udev_list_entry_get_name(entry); +@@ -183,6 +184,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + rc = 3; + goto out; + } ++ udev_monitor_set_receive_buffer_size(udev, 128*1024*1024); + + udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) { + const char *subsys = udev_list_entry_get_name(entry); +-- +1.6.6 + diff --git a/0010-libudev-bump-minor-version.patch b/0010-libudev-bump-minor-version.patch new file mode 100644 index 0000000..6e79298 --- /dev/null +++ b/0010-libudev-bump-minor-version.patch @@ -0,0 +1,29 @@ +From e0fcf21c030027101338c7673c5cb814b82261d1 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 18 Feb 2010 11:03:09 +0100 +Subject: [PATCH 10/65] libudev: bump minor version + +--- + Makefile.am | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index db23f16..3780f50 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -28,9 +28,9 @@ CLEANFILES = + # ------------------------------------------------------------------------------ + # libudev + # ------------------------------------------------------------------------------ +-LIBUDEV_CURRENT=6 +-LIBUDEV_REVISION=1 +-LIBUDEV_AGE=6 ++LIBUDEV_CURRENT=7 ++LIBUDEV_REVISION=0 ++LIBUDEV_AGE=7 + + SUBDIRS += libudev/docs + +-- +1.6.6 + diff --git a/0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch b/0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch new file mode 100644 index 0000000..382e057 --- /dev/null +++ b/0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch @@ -0,0 +1,25 @@ +From 044bd2bcc7a160c97f7dd052d6de50d35186df13 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 18 Feb 2010 11:03:28 +0100 +Subject: [PATCH 11/65] udevadm: fix untested and broken commit to set buffer size + +--- + udev/udevadm-monitor.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c +index ea4b7dc..4063c48 100644 +--- a/udev/udevadm-monitor.c ++++ b/udev/udevadm-monitor.c +@@ -184,7 +184,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + rc = 3; + goto out; + } +- udev_monitor_set_receive_buffer_size(udev, 128*1024*1024); ++ udev_monitor_set_receive_buffer_size(kernel_monitor, 128*1024*1024); + + udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) { + const char *subsys = udev_list_entry_get_name(entry); +-- +1.6.6 + diff --git a/0012-configure.ac-version-bump.patch b/0012-configure.ac-version-bump.patch new file mode 100644 index 0000000..8193aea --- /dev/null +++ b/0012-configure.ac-version-bump.patch @@ -0,0 +1,37 @@ +From fff82e9d77415111193d9547bbe3618892147b39 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 18 Feb 2010 11:09:25 +0100 +Subject: [PATCH 12/65] configure.ac: version bump + +--- + NEWS | 6 ++++++ + configure.ac | 2 +- + 2 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/NEWS b/NEWS +index 5b23a8b..a4d46d7 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,9 @@ ++udev 152 ++======== ++Bugfixes. ++ ++New and fixed keymaps. ++ + udev 151 + ======== + Bugfixes. +diff --git a/configure.ac b/configure.ac +index 4cecb86..88824b6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,4 +1,4 @@ +-AC_INIT([udev], [151], [linux-hotplug@vger.kernel.org]) ++AC_INIT([udev], [152], [linux-hotplug@vger.kernel.org]) + AC_PREREQ(2.60) + AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2 subdir-objects]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +-- +1.6.6 + diff --git a/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch b/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch index 328a2b4..488a6e0 100644 --- a/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch +++ b/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch @@ -1,7 +1,7 @@ From 20b48c3727eef1f266cbfd6bf5854b5c1419beb9 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 2 Mar 2010 13:55:03 +0100 -Subject: [PATCH 13/36] keymap: Add Samsung Q210/P210 force-release quirk +Subject: [PATCH 13/65] keymap: Add Samsung Q210/P210 force-release quirk The Samsung Q210/P210 laptop also needs all of its function keys quirked. diff --git a/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch b/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch index 9bedd1e..8ce3972 100644 --- a/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch +++ b/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch @@ -1,7 +1,7 @@ From da96a11b9c9164447bef206db47c405342ab8daa Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 2 Mar 2010 14:00:32 +0100 -Subject: [PATCH 14/36] keymap: Add Fujitsu Amilo 1848+u force-release quirk +Subject: [PATCH 14/65] keymap: Add Fujitsu Amilo 1848+u force-release quirk The Fujitsu Amilo Si 1848+u laptop requires the volume and mute keys quirking. diff --git a/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch b/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch index 4ad5dce..98541ed 100644 --- a/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch +++ b/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch @@ -1,7 +1,7 @@ From ecd42de2c56b4fcf0069b8b4a4d6607710e5de61 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 2 Mar 2010 17:06:33 -0500 -Subject: [PATCH 15/36] Decrease buffer size when advancing past NUL byte +Subject: [PATCH 15/65] Decrease buffer size when advancing past NUL byte Otherwise we'll overflow the buffer if space is tight. Also add a comment explaining this. diff --git a/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch b/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch index 174767d..024ee15 100644 --- a/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch +++ b/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch @@ -1,7 +1,7 @@ From 3a19299202b5d34b89d5910fde25e8a4cfa2b31a Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 2 Mar 2010 17:07:14 -0500 -Subject: [PATCH 16/36] Use UTIL_LINE_SIZE, not UTIL_PATH_SIZE to truncate properties +Subject: [PATCH 16/65] Use UTIL_LINE_SIZE, not UTIL_PATH_SIZE to truncate properties Signed-off-by: David Zeuthen --- diff --git a/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch b/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch index 802351e..d7419a1 100644 --- a/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch +++ b/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch @@ -1,7 +1,7 @@ From e32d5237ea045045c621edba7341631abd602d74 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 2 Mar 2010 17:10:02 -0500 -Subject: [PATCH 17/36] Increase UTIL_LINE_SIZE from 2048 to 16384 +Subject: [PATCH 17/65] Increase UTIL_LINE_SIZE from 2048 to 16384 Recent udisks versions, for LVM2 integration, ships with probers that produce very long lines such as diff --git a/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch b/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch index f02f3f0..a536914 100644 --- a/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch +++ b/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch @@ -1,7 +1,7 @@ From 3c4b1738a9d591d7ddce361ea184b76b253c4e87 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Fri, 26 Feb 2010 14:05:41 +0530 -Subject: [PATCH 18/36] Fix virtio-ports rule to use $attr instead of $ATTR +Subject: [PATCH 18/65] Fix virtio-ports rule to use $attr instead of $ATTR Newer udev versions don't understand $ATTR. diff --git a/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch b/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch index 29f81f1..d9aed68 100644 --- a/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch +++ b/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch @@ -1,7 +1,7 @@ From 5c3ebbf35a2c101e0212c7066f0d65e457fcf40c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 4 Mar 2010 00:48:59 +0100 -Subject: [PATCH 19/36] udev-acl: Correctly handle ENV{ACL_MANAGE}==0 +Subject: [PATCH 19/65] udev-acl: Correctly handle ENV{ACL_MANAGE}==0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch b/0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch new file mode 100644 index 0000000..b65e4e4 --- /dev/null +++ b/0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch @@ -0,0 +1,27 @@ +From 9a87132677191e49c3d464c91aac7fc218e1eb18 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 7 Mar 2010 13:47:34 +0100 +Subject: [PATCH 20/65] udev-acl: no not encourage use of ACL_MANAGE outside of rules file + +--- + extras/udev-acl/70-acl.rules | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index 874667c..fde2656 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -1,7 +1,9 @@ + # do not edit this file, it will be overwritten on update + ++# Do not use ACL_MANAGE outside of this file. This variable is private to ++# udev-acl of this udev release and may be replaced at any time. ++ + ENV{MAJOR}=="", GOTO="acl_end" +-ENV{ACL_MANAGE}=="0", GOTO="acl_end" + ACTION!="add|change", GOTO="acl_apply" + + # PTP/MTP protocol devices, cameras, portable media players +-- +1.6.6 + diff --git a/0021-input_id-Fix-linking.patch b/0021-input_id-Fix-linking.patch index 2e822bc..1e3734b 100644 --- a/0021-input_id-Fix-linking.patch +++ b/0021-input_id-Fix-linking.patch @@ -1,7 +1,7 @@ From a245a97b4e805c65ce22659742371550ccf002c1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 10 Mar 2010 12:17:03 +0100 -Subject: [PATCH 21/36] input_id: Fix linking +Subject: [PATCH 21/65] input_id: Fix linking Link against libudev-private.a instead of libudev.a, to avoid runtime dependency to libudev. diff --git a/0022-replace-utimes-with-utimensat.patch b/0022-replace-utimes-with-utimensat.patch index 7a42304..57599d5 100644 --- a/0022-replace-utimes-with-utimensat.patch +++ b/0022-replace-utimes-with-utimensat.patch @@ -1,7 +1,7 @@ From 455f792e4791e037eb0406005b92c345cf0baf56 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 10 Mar 2010 14:43:07 +0100 -Subject: [PATCH 22/36] replace utimes() with utimensat() +Subject: [PATCH 22/65] replace utimes() with utimensat() --- udev/udev-node.c | 4 ++-- diff --git a/0023-libbudev-private-rename-udev_list_entry_get_flag.patch b/0023-libbudev-private-rename-udev_list_entry_get_flag.patch new file mode 100644 index 0000000..bb2ceb1 --- /dev/null +++ b/0023-libbudev-private-rename-udev_list_entry_get_flag.patch @@ -0,0 +1,212 @@ +From fbb31cd6e10fe66d2da781db0ba9a8d671a4c6aa Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 10 Mar 2010 14:52:42 +0100 +Subject: [PATCH 23/65] libbudev-private: rename udev_list_entry_get_flag() + +--- + libudev/libudev-device-private.c | 4 ++-- + libudev/libudev-device.c | 4 ++-- + libudev/libudev-list.c | 10 +++++----- + libudev/libudev-private.h | 9 ++++++--- + udev/udev-event.c | 2 +- + udev/udev-node.c | 2 +- + udev/udev-rules.c | 12 ++++++------ + 7 files changed, 23 insertions(+), 20 deletions(-) + +diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c +index 07249c3..1bcf441 100644 +--- a/libudev/libudev-device-private.c ++++ b/libudev/libudev-device-private.c +@@ -39,7 +39,7 @@ int udev_device_update_db(struct udev_device *udev_device) + util_strscpyl(filename_tmp, sizeof(filename_tmp), filename, ".tmp", NULL); + + udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) +- if (udev_list_entry_get_flag(list_entry)) ++ if (udev_list_entry_get_flags(list_entry)) + goto file; + if (udev_device_get_num_fake_partitions(udev_device) != 0) + goto file; +@@ -102,7 +102,7 @@ file: + if (udev_device_get_watch_handle(udev_device) >= 0) + fprintf(f, "W:%i\n", udev_device_get_watch_handle(udev_device)); + udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) { +- if (!udev_list_entry_get_flag(list_entry)) ++ if (!udev_list_entry_get_flags(list_entry)) + continue; + fprintf(f, "E:%s=%s\n", + udev_list_entry_get_name(list_entry), +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index b841745..aec5fb5 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008-2009 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -1068,7 +1068,7 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink + if (list_entry == NULL) + return -ENOMEM; + if (unique) +- udev_list_entry_set_flag(list_entry, 1); ++ udev_list_entry_set_flags(list_entry, 1); + return 0; + } + +diff --git a/libudev/libudev-list.c b/libudev/libudev-list.c +index f6637fc..b5e9645 100644 +--- a/libudev/libudev-list.c ++++ b/libudev/libudev-list.c +@@ -38,7 +38,7 @@ struct udev_list_entry { + struct udev_list_node *list; + char *name; + char *value; +- int flag; ++ unsigned int flags; + }; + + /* list head point to itself if empty */ +@@ -258,16 +258,16 @@ const char *udev_list_entry_get_value(struct udev_list_entry *list_entry) + return list_entry->value; + } + +-int udev_list_entry_get_flag(struct udev_list_entry *list_entry) ++unsigned int udev_list_entry_get_flags(struct udev_list_entry *list_entry) + { + if (list_entry == NULL) + return -EINVAL; +- return list_entry->flag; ++ return list_entry->flags; + } + +-void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag) ++void udev_list_entry_set_flags(struct udev_list_entry *list_entry, unsigned int flags) + { + if (list_entry == NULL) + return; +- list_entry->flag = flag; ++ list_entry->flags = flags; + } +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index e0c51dc..5ee0c58 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008-2009 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -82,6 +82,9 @@ const char *udev_device_get_devpath_old(struct udev_device *udev_device); + const char *udev_device_get_sysname_old(struct udev_device *udev_device); + int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old); + const char *udev_device_get_knodename(struct udev_device *udev_device); ++int udev_device_add_tag(struct udev_device *udev_device, const char *tag); ++struct udev_list_entry *udev_device_get_tag_list_entry(struct udev_device *udev_device); ++int udev_device_has_tag(struct udev_device *udev_device, const char *tag); + int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename); + int udev_device_get_timeout(struct udev_device *udev_device); + int udev_device_set_timeout(struct udev_device *udev_device, int timeout); +@@ -163,8 +166,8 @@ void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list + void udev_list_entry_append(struct udev_list_entry *new, struct udev_list_node *list); + void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *name_list); + struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list); +-int udev_list_entry_get_flag(struct udev_list_entry *list_entry); +-void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag); ++unsigned int udev_list_entry_get_flags(struct udev_list_entry *list_entry); ++void udev_list_entry_set_flags(struct udev_list_entry *list_entry, unsigned int flags); + #define udev_list_entry_foreach_safe(entry, tmp, first) \ + for (entry = first, tmp = udev_list_entry_get_next(entry); \ + entry != NULL; \ +diff --git a/udev/udev-event.c b/udev/udev-event.c +index 4e1773f..986c119 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -729,7 +729,7 @@ int udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask) + udev_event_apply_format(event, cmd, program, sizeof(program)); + envp = udev_device_get_properties_envp(event->dev); + if (util_run_program(event->udev, program, envp, NULL, 0, NULL, sigmask) != 0) { +- if (udev_list_entry_get_flag(list_entry)) ++ if (udev_list_entry_get_flags(list_entry)) + err = -1; + } + } +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 307a76b..23bfade 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -405,7 +405,7 @@ int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) + + /* create/update symlinks, add symlinks to name index */ + udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) { +- if (udev_list_entry_get_flag(list_entry)) ++ if (udev_list_entry_get_flags(list_entry)) + /* simple unmanaged link name */ + node_symlink(udev, udev_device_get_devnode(dev), udev_list_entry_get_name(list_entry)); + else +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 3da2033..60daad5 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -717,7 +717,7 @@ static int import_property_from_string(struct udev_device *dev, char *line) + entry = udev_device_add_property(dev, key, val); + /* store in db, skip private keys */ + if (key[0] != '.') +- udev_list_entry_set_flag(entry, 1); ++ udev_list_entry_set_flags(entry, 1); + } + return 0; + } +@@ -785,7 +785,7 @@ static int import_parent_into_properties(struct udev_device *dev, const char *fi + entry = udev_device_add_property(dev, key, val); + /* store in db, skip private keys */ + if (key[0] != '.') +- udev_list_entry_set_flag(entry, 1); ++ udev_list_entry_set_flags(entry, 1); + } + } + return 0; +@@ -1831,13 +1831,13 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) + filename_off = add_string(rules, filename); + /* the offset in the rule is limited to unsigned short */ + if (filename_off < USHRT_MAX) +- udev_list_entry_set_flag(file_loop, filename_off); ++ udev_list_entry_set_flags(file_loop, filename_off); + } + + /* parse list of files */ + udev_list_entry_foreach_safe(file_loop, file_tmp, udev_list_get_entry(&file_list)) { + const char *filename = udev_list_entry_get_name(file_loop); +- unsigned int filename_off = udev_list_entry_get_flag(file_loop); ++ unsigned int filename_off = udev_list_entry_get_flags(file_loop); + + if (stat(filename, &statbuf) == 0 && statbuf.st_size > 0) + parse_file(rules, filename, filename_off); +@@ -2420,7 +2420,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + entry = udev_device_add_property(event->dev, name, temp_value); + /* store in db, skip private keys */ + if (name[0] != '.') +- udev_list_entry_set_flag(entry, 1); ++ udev_list_entry_set_flags(entry, 1); + } else { + udev_device_add_property(event->dev, name, NULL); + } +@@ -2542,7 +2542,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + list_entry = udev_list_entry_add(event->udev, &event->run_list, + &rules->buf[cur->key.value_off], NULL, 1, 0); + if (cur->key.fail_on_error) +- udev_list_entry_set_flag(list_entry, 1); ++ udev_list_entry_set_flags(list_entry, 1); + break; + } + case TK_A_GOTO: +-- +1.6.6 + diff --git a/0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch b/0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch new file mode 100644 index 0000000..6a6a349 --- /dev/null +++ b/0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch @@ -0,0 +1,65 @@ +From a00ff5db021b50864ba50cce15865bca2d52f91f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 10 Mar 2010 15:00:00 +0100 +Subject: [PATCH 24/65] udevadm: monitor - use / as separator in --subsystem-match=subsystem[/devtype] + +--- + udev/udevadm-monitor.c | 12 ++++++------ + udev/udevadm.xml | 6 ++++++ + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c +index 4063c48..d136c60 100644 +--- a/udev/udevadm-monitor.c ++++ b/udev/udevadm-monitor.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2004-2009 Kay Sievers ++ * Copyright (C) 2004-2010 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 +@@ -111,7 +111,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + char *devtype; + + util_strscpy(subsys, sizeof(subsys), optarg); +- devtype = strchr(subsys, ':'); ++ devtype = strchr(subsys, '/'); + if (devtype != NULL) { + devtype[0] = '\0'; + devtype++; +@@ -121,10 +121,10 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + } + case 'h': + printf("Usage: udevadm monitor [--property] [--kernel] [--udev] [--help]\n" +- " --property print the event properties\n" +- " --kernel print kernel uevents\n" +- " --udev print udev events\n" +- " --subsystem-match= filter events\n" ++ " --property print the event properties\n" ++ " --kernel print kernel uevents\n" ++ " --udev print udev events\n" ++ " --subsystem-match= filter events by subsystem\n" + " --help\n\n"); + default: + goto out; +diff --git a/udev/udevadm.xml b/udev/udevadm.xml +index ad49249..fa1742b 100644 +--- a/udev/udevadm.xml ++++ b/udev/udevadm.xml +@@ -350,6 +350,12 @@ + + + ++ ++ ++ Filter events by subsystem[/devtype]. Only udev events with a matching subsystem value will pass. ++ ++ ++ + + + Print help text. +-- +1.6.6 + diff --git a/0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch b/0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch new file mode 100644 index 0000000..be5f864 --- /dev/null +++ b/0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch @@ -0,0 +1,81 @@ +From af24bb178eec6adcf4f04d3b183cd50a831c8b7e Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 10 Mar 2010 17:29:27 +0100 +Subject: [PATCH 25/65] use major:minor as entries in symlink stack instead of devpath + +--- + udev/udev-node.c | 30 ++++++++++++++++-------------- + 1 files changed, 16 insertions(+), 14 deletions(-) + +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 23bfade..4314cce 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -245,28 +245,26 @@ static const char *link_find_prioritized(struct udev_device *dev, bool add, cons + for (;;) { + struct udev_device *dev_db; + struct dirent *dent; +- char devpath[UTIL_PATH_SIZE]; +- char syspath[UTIL_PATH_SIZE]; +- ssize_t len; ++ int maj, min; ++ char type, type2; ++ dev_t devnum; + + dent = readdir(dir); + if (dent == NULL || dent->d_name[0] == '\0') + break; + if (dent->d_name[0] == '.') + continue; +- dbg(udev, "found '%s/%s'\n", stackdir, dent->d_name); +- len = readlinkat(dirfd(dir), dent->d_name, devpath, sizeof(devpath)); +- if (len <= 0 || len == (ssize_t)sizeof(devpath)) ++ if (sscanf(dent->d_name, "%c%i:%i", &type, &maj, &min) != 3) + continue; +- devpath[len] = '\0'; +- util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); +- info(udev, "found '%s' claiming '%s'\n", syspath, stackdir); ++ info(udev, "found '%c%i:%i' claiming '%s'\n", type, maj, min, stackdir); ++ devnum = makedev(maj, min); + + /* did we find ourself? */ +- if (strcmp(udev_device_get_syspath(dev), syspath) == 0) ++ type2 = strcmp(udev_device_get_subsystem(dev), "block") == 0 ? 'b' : 'c'; ++ if (udev_device_get_devnum(dev) == devnum && type == type2) + continue; + +- dev_db = udev_device_new_from_syspath(udev, syspath); ++ dev_db = udev_device_new_from_devnum(udev, type, devnum); + if (dev_db != NULL) { + const char *devnode; + +@@ -276,7 +274,7 @@ static const char *link_find_prioritized(struct udev_device *dev, bool add, cons + udev_device_get_devnode(dev_db), udev_device_get_devlink_priority(dev_db)); + if (target == NULL || udev_device_get_devlink_priority(dev_db) > priority) { + info(udev, "'%s' claims priority %i for '%s'\n", +- syspath, udev_device_get_devlink_priority(dev_db), stackdir); ++ udev_device_get_syspath(dev_db), udev_device_get_devlink_priority(dev_db), stackdir); + priority = udev_device_get_devlink_priority(dev_db); + util_strscpy(buf, bufsize, devnode); + target = buf; +@@ -328,11 +326,15 @@ static void link_update(struct udev_device *dev, const char *slink, bool add) + + dbg(udev, "creating index: '%s'\n", filename); + do { ++ int fd; ++ + err = util_create_path(udev, filename); + if (err != 0 && err != -ENOENT) + break; +- err = symlink(udev_device_get_devpath(dev), filename); +- if (err != 0) ++ fd = open(filename, O_WRONLY|O_CREAT, 0444); ++ if (fd >= 0) ++ close(fd); ++ else + err = -errno; + } while (err == -ENOENT); + } +-- +1.6.6 + diff --git a/0026-use-major-minor-as-entries-in-watch-directory.patch b/0026-use-major-minor-as-entries-in-watch-directory.patch new file mode 100644 index 0000000..ceb2939 --- /dev/null +++ b/0026-use-major-minor-as-entries-in-watch-directory.patch @@ -0,0 +1,120 @@ +From 777239cb211ade308abb0a2b57d055614061f417 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 10 Mar 2010 18:54:35 +0100 +Subject: [PATCH 26/65] use major:minor as entries in watch directory + +--- + udev/udev-watch.c | 47 +++++++++++++++++++++++++++++------------------ + 1 files changed, 29 insertions(+), 18 deletions(-) + +diff --git a/udev/udev-watch.c b/udev/udev-watch.c +index d67083b..7135d9f 100644 +--- a/udev/udev-watch.c ++++ b/udev/udev-watch.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2004-2008 Kay Sievers ++ * Copyright (C) 2004-2010 Kay Sievers + * Copyright (C) 2009 Canonical Ltd. + * Copyright (C) 2009 Scott James Remnant + * +@@ -72,29 +72,29 @@ void udev_watch_restore(struct udev *udev) + size_t l; + ssize_t len; + struct udev_device *dev; ++ int maj, min; ++ char type; + +- if (ent->d_name[0] < '0' || ent->d_name[0] > '9') ++ if (ent->d_name[0] == '.') + continue; + + s = device; + l = util_strpcpy(&s, sizeof(device), udev_get_sys_path(udev)); + len = readlinkat(dirfd(dir), ent->d_name, s, l); +- if (len <= 0 || len >= (ssize_t)l) { +- unlinkat(dirfd(dir), ent->d_name, 0); +- continue; +- } ++ if (len <= 0 || len >= (ssize_t)l) ++ goto unlink; + s[len] = '\0'; +- dbg(udev, "old watch to '%s' found\n", device); +- dev = udev_device_new_from_syspath(udev, device); +- if (dev == NULL) { +- unlinkat(dirfd(dir), ent->d_name, 0); +- continue; +- } ++ ++ if (sscanf(s, "%c%i:%i", &type, &maj, &min) != 3) ++ goto unlink; ++ dev = udev_device_new_from_devnum(udev, type, makedev(maj, min)); ++ if (dev == NULL) ++ goto unlink; + + info(udev, "restoring old watch on '%s'\n", udev_device_get_devnode(dev)); + udev_watch_begin(udev, dev); +- + udev_device_unref(dev); ++unlink: + unlinkat(dirfd(dir), ent->d_name, 0); + } + +@@ -109,6 +109,7 @@ void udev_watch_restore(struct udev *udev) + void udev_watch_begin(struct udev *udev, struct udev_device *dev) + { + char filename[UTIL_PATH_SIZE]; ++ char majmin[UTIL_PATH_SIZE]; + int wd; + + if (inotify_fd < 0) +@@ -122,10 +123,13 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev) + return; + } + ++ snprintf(majmin, sizeof(majmin), "%c%i:%i", ++ strcmp(udev_device_get_subsystem(dev), "block") == 0 ? 'b' : 'c', ++ major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev))); + snprintf(filename, sizeof(filename), "%s/.udev/watch/%d", udev_get_dev_path(udev), wd); + util_create_path(udev, filename); + unlink(filename); +- symlink(udev_device_get_devpath(dev), filename); ++ symlink(majmin, filename); + + udev_device_set_watch_handle(dev, wd); + } +@@ -154,20 +158,27 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev) + struct udev_device *udev_watch_lookup(struct udev *udev, int wd) + { + char filename[UTIL_PATH_SIZE]; +- char syspath[UTIL_PATH_SIZE]; ++ char majmin[UTIL_PATH_SIZE]; + char *s; + size_t l; + ssize_t len; ++ int maj, min; ++ char type; ++ dev_t devnum; + + if (inotify_fd < 0 || wd < 0) + return NULL; + + snprintf(filename, sizeof(filename), "%s/.udev/watch/%d", udev_get_dev_path(udev), wd); +- s = syspath; +- l = util_strpcpy(&s, sizeof(syspath), udev_get_sys_path(udev)); ++ s = majmin; ++ l = util_strpcpy(&s, sizeof(majmin), udev_get_sys_path(udev)); + len = readlink(filename, s, l); + if (len < 0 || (size_t)len >= l) + return NULL; + s[len] = '\0'; +- return udev_device_new_from_syspath(udev, syspath); ++ ++ if (sscanf(s, "%c%i:%i", &type, &maj, &min) != 3) ++ return NULL; ++ devnum = makedev(maj, min); ++ return udev_device_new_from_devnum(udev, type, devnum); + } +-- +1.6.6 + diff --git a/0028-udev-needs-automake-1.10.patch b/0028-udev-needs-automake-1.10.patch new file mode 100644 index 0000000..9cd9024 --- /dev/null +++ b/0028-udev-needs-automake-1.10.patch @@ -0,0 +1,28 @@ +From b41102757d9d1f71aa04f3d264d57d573360d957 Mon Sep 17 00:00:00 2001 +From: Adrian Bunk +Date: Thu, 11 Mar 2010 15:05:42 +0200 +Subject: [PATCH 28/65] udev needs automake 1.10 + +extras/gudev/docs/Makefile.am:4: require Automake 1.10, but have 1.9.6 +libudev/docs/Makefile.am:4: require Automake 1.10, but have 1.9.6 + +Signed-off-by: Martin Pitt +--- + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 88824b6..d53dd12 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + AC_INIT([udev], [152], [linux-hotplug@vger.kernel.org]) + AC_PREREQ(2.60) +-AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2 subdir-objects]) ++AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + AC_DISABLE_STATIC + AC_USE_SYSTEM_EXTENSIONS +-- +1.6.6 + diff --git a/0029-firmware-fix-possible-segfault-when-firmware-device-.patch b/0029-firmware-fix-possible-segfault-when-firmware-device-.patch index 05c1939..e48406f 100644 --- a/0029-firmware-fix-possible-segfault-when-firmware-device-.patch +++ b/0029-firmware-fix-possible-segfault-when-firmware-device-.patch @@ -1,7 +1,7 @@ From d44c27c5ab71dbbcfcf4745977027502309dd795 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 16 Mar 2010 10:57:44 +0100 -Subject: [PATCH 29/36] firmware: fix possible segfault when firmware device goes away while loading +Subject: [PATCH 29/65] firmware: fix possible segfault when firmware device goes away while loading Thanks to Ruediger Oertel. --- diff --git a/0030-rules-input-create-by-path-links-for-pci-devices.patch b/0030-rules-input-create-by-path-links-for-pci-devices.patch index c35bd60..836fad5 100644 --- a/0030-rules-input-create-by-path-links-for-pci-devices.patch +++ b/0030-rules-input-create-by-path-links-for-pci-devices.patch @@ -1,7 +1,7 @@ From 6b32e8192934619f787c3b5b6f0fe40c32d7d94a Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Tue, 16 Mar 2010 12:44:43 +0100 -Subject: [PATCH 30/36] rules: input - create by-path/ links for pci devices +Subject: [PATCH 30/65] rules: input - create by-path/ links for pci devices --- rules/rules.d/60-persistent-input.rules | 2 +- diff --git a/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch b/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch index a773b94..cf17eed 100644 --- a/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch +++ b/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch @@ -1,7 +1,7 @@ From 2b463cb050cbf77d9c6b51e0f5a9d89bf7eb1bc3 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Tue, 16 Mar 2010 12:47:42 +0100 -Subject: [PATCH 31/36] Fix switching Logitech bluetooth adapters into hci mode. +Subject: [PATCH 31/65] Fix switching Logitech bluetooth adapters into hci mode. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567237 https://bugs.launchpad.net/ubuntu/+source/udev/+bug/444420 diff --git a/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch b/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch index ca136bd..864f039 100644 --- a/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch +++ b/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch @@ -1,7 +1,7 @@ From 578cc8a8085a47c963b5940459e475ac5f07219c Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 17 Mar 2010 09:15:18 +0100 -Subject: [PATCH 32/36] do not reset SELinux context when the node was not touched +Subject: [PATCH 32/65] do not reset SELinux context when the node was not touched --- udev/udev-node.c | 42 +++++++++++++++++------------------------- diff --git a/0033-libudev-add-udev_device_new_from_environment.patch b/0033-libudev-add-udev_device_new_from_environment.patch new file mode 100644 index 0000000..f84c44e --- /dev/null +++ b/0033-libudev-add-udev_device_new_from_environment.patch @@ -0,0 +1,480 @@ +From fc8d61c53d6c181dc1e9f5a23c0f805c32a392af Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 17 Mar 2010 17:42:35 +0100 +Subject: [PATCH 33/65] libudev: add udev_device_new_from_environment() + +--- + extras/usb_id/usb_id.c | 34 ++++--- + libudev/docs/libudev-sections.txt | 1 + + libudev/exported_symbols | 1 + + libudev/libudev-device.c | 214 ++++++++++++++++++++++++++++--------- + libudev/libudev-monitor.c | 66 +----------- + libudev/libudev-private.h | 3 +- + libudev/libudev.h | 1 + + 7 files changed, 192 insertions(+), 128 deletions(-) + +diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c +index b412598..42ccddf 100644 +--- a/extras/usb_id/usb_id.c ++++ b/extras/usb_id/usb_id.c +@@ -456,8 +456,6 @@ int main(int argc, char **argv) + }; + struct udev *udev; + struct udev_device *dev = NULL; +- char syspath[UTIL_PATH_SIZE]; +- const char *devpath; + static int export; + int retval = 0; + +@@ -492,7 +490,7 @@ int main(int argc, char **argv) + export = 1; + break; + case 'h': +- printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help] \n" ++ printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help] []\n" + " --usb-info use usb strings instead\n" + " --num-info use numerical values\n" + " --export print values as environment keys\n" +@@ -503,18 +501,26 @@ int main(int argc, char **argv) + } + } + +- devpath = argv[optind]; +- if (devpath == NULL) { +- fprintf(stderr, "No device specified\n"); +- retval = 1; +- goto exit; +- } +- +- util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); +- dev = udev_device_new_from_syspath(udev, syspath); ++ dev = udev_device_new_from_environment(udev); + if (dev == NULL) { +- err(udev, "unable to access '%s'\n", devpath); +- return 1; ++ char syspath[UTIL_PATH_SIZE]; ++ const char *devpath; ++ ++ devpath = argv[optind]; ++ if (devpath == NULL) { ++ fprintf(stderr, "missing device\n"); ++ retval = 1; ++ goto exit; ++ } ++ ++ util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); ++ dev = udev_device_new_from_syspath(udev, syspath); ++ if (dev == NULL) { ++ err(udev, "unable to access '%s'\n", devpath); ++ retval = 1; ++ goto exit; ++ return 1; ++ } + } + + retval = usb_id(dev); +diff --git a/libudev/docs/libudev-sections.txt b/libudev/docs/libudev-sections.txt +index c11a273..ca781ff 100644 +--- a/libudev/docs/libudev-sections.txt ++++ b/libudev/docs/libudev-sections.txt +@@ -35,6 +35,7 @@ udev_device_get_udev + udev_device_new_from_syspath + udev_device_new_from_devnum + udev_device_new_from_subsystem_sysname ++udev_device_new_from_environment + udev_device_get_parent + udev_device_get_parent_with_subsystem_devtype + udev_device_get_devpath +diff --git a/libudev/exported_symbols b/libudev/exported_symbols +index f48025a..61486c6 100644 +--- a/libudev/exported_symbols ++++ b/libudev/exported_symbols +@@ -15,6 +15,7 @@ udev_list_entry_get_value + udev_device_new_from_syspath + udev_device_new_from_devnum + udev_device_new_from_subsystem_sysname ++udev_device_new_from_environment + udev_device_get_parent + udev_device_get_parent_with_subsystem_devtype + udev_device_ref +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index aec5fb5..fe45880 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -67,6 +68,7 @@ struct udev_device { + int refcount; + dev_t devnum; + int watch_handle; ++ int maj, min; + unsigned int parent_set:1; + unsigned int subsystem_set:1; + unsigned int devtype_set:1; +@@ -77,6 +79,130 @@ struct udev_device { + unsigned int ignore_remove:1; + }; + ++struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) ++{ ++ udev_device->envp_uptodate = 0; ++ if (value == NULL) { ++ struct udev_list_entry *list_entry; ++ ++ list_entry = udev_device_get_properties_list_entry(udev_device); ++ list_entry = udev_list_entry_get_by_name(list_entry, key); ++ if (list_entry != NULL) ++ udev_list_entry_delete(list_entry); ++ return NULL; ++ } ++ return udev_list_entry_add(udev_device->udev, &udev_device->properties_list, key, value, 1, 0); ++} ++ ++static struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property) ++{ ++ char name[UTIL_LINE_SIZE]; ++ char *val; ++ ++ util_strscpy(name, sizeof(name), property); ++ val = strchr(name, '='); ++ if (val == NULL) ++ return NULL; ++ val[0] = '\0'; ++ val = &val[1]; ++ if (val[0] == '\0') ++ val = NULL; ++ return udev_device_add_property(udev_device, name, val); ++} ++ ++/* ++ * parse property string, and if needed, update internal values accordingly ++ * ++ * udev_device_add_property_from_string_parse_finish() needs to be ++ * called after adding properties, and its return value checked ++ * ++ * udev_device_set_info_loaded() needs to be set, to avoid trying ++ * to use a device without a DEVPATH set ++ */ ++void udev_device_add_property_from_string_parse(struct udev_device *udev_device, const char *property) ++{ ++ if (strncmp(property, "DEVPATH=", 8) == 0) { ++ char path[UTIL_PATH_SIZE]; ++ ++ util_strscpyl(path, sizeof(path), udev_get_sys_path(udev_device->udev), &property[8], NULL); ++ udev_device_set_syspath(udev_device, path); ++ } else if (strncmp(property, "SUBSYSTEM=", 10) == 0) { ++ udev_device_set_subsystem(udev_device, &property[10]); ++ } else if (strncmp(property, "DEVTYPE=", 8) == 0) { ++ udev_device_set_devtype(udev_device, &property[8]); ++ } else if (strncmp(property, "DEVNAME=", 8) == 0) { ++ if (property[8] == '/') ++ udev_device_set_devnode(udev_device, &property[8]); ++ else ++ udev_device_set_knodename(udev_device, &property[8]); ++ } else if (strncmp(property, "DEVLINKS=", 9) == 0) { ++ char devlinks[UTIL_PATH_SIZE]; ++ char *slink; ++ char *next; ++ ++ util_strscpy(devlinks, sizeof(devlinks), &property[9]); ++ slink = devlinks; ++ next = strchr(slink, ' '); ++ while (next != NULL) { ++ next[0] = '\0'; ++ udev_device_add_devlink(udev_device, slink, 0); ++ slink = &next[1]; ++ next = strchr(slink, ' '); ++ } ++ if (slink[0] != '\0') ++ udev_device_add_devlink(udev_device, slink, 0); ++ } else if (strncmp(property, "DRIVER=", 7) == 0) { ++ udev_device_set_driver(udev_device, &property[7]); ++ } else if (strncmp(property, "ACTION=", 7) == 0) { ++ udev_device_set_action(udev_device, &property[7]); ++ } else if (strncmp(property, "MAJOR=", 6) == 0) { ++ udev_device->maj = strtoull(&property[6], NULL, 10); ++ } else if (strncmp(property, "MINOR=", 6) == 0) { ++ udev_device->min = strtoull(&property[6], NULL, 10); ++ } else if (strncmp(property, "DEVPATH_OLD=", 12) == 0) { ++ udev_device_set_devpath_old(udev_device, &property[12]); ++ } else if (strncmp(property, "SEQNUM=", 7) == 0) { ++ udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10)); ++ } else if (strncmp(property, "TIMEOUT=", 8) == 0) { ++ udev_device_set_timeout(udev_device, strtoull(&property[8], NULL, 10)); ++ } else { ++ udev_device_add_property_from_string(udev_device, property); ++ } ++} ++ ++int udev_device_add_property_from_string_parse_finish(struct udev_device *udev_device) ++{ ++ if (udev_device->maj > 0) ++ udev_device_set_devnum(udev_device, makedev(udev_device->maj, udev_device->min)); ++ udev_device->maj = 0; ++ udev_device->min = 0; ++ ++ if (udev_device->devpath == NULL || udev_device->subsystem == NULL) ++ return -EINVAL; ++ return 0; ++} ++ ++/** ++ * udev_device_get_property_value: ++ * @udev_device: udev device ++ * @key: property name ++ * ++ * Returns: the value of a device property, or #NULL if there is no such property. ++ **/ ++const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key) ++{ ++ struct udev_list_entry *list_entry; ++ ++ if (udev_device == NULL) ++ return NULL; ++ if (key == NULL) ++ return NULL; ++ ++ list_entry = udev_device_get_properties_list_entry(udev_device); ++ list_entry = udev_list_entry_get_by_name(list_entry, key); ++ return udev_list_entry_get_value(list_entry); ++} ++ + int udev_device_read_db(struct udev_device *udev_device) + { + struct stat stats; +@@ -451,6 +577,42 @@ found: + return udev_device_new_from_syspath(udev, path_full); + } + ++/** ++ * udev_device_new_from_environment ++ * @udev: udev library context ++ * ++ * Create new udev device, and fill in information from the ++ * current process environment. This only works reliable if ++ * the process is called from a udev rule. It is usually used ++ * for tools executed from IMPORT= rules. ++ * ++ * The initial refcount is 1, and needs to be decremented to ++ * release the resources of the udev device. ++ * ++ * Returns: a new udev device, or #NULL, if it does not exist ++ **/ ++struct udev_device *udev_device_new_from_environment(struct udev *udev) ++{ ++ int i; ++ struct udev_device *udev_device; ++ ++ udev_device = udev_device_new(udev); ++ if (udev_device == NULL) ++ return NULL; ++ udev_device_set_info_loaded(udev_device); ++ ++ for (i = 0; environ[i] != NULL; i++) ++ udev_device_add_property_from_string_parse(udev_device, environ[i]); ++ ++ if (udev_device_add_property_from_string_parse_finish(udev_device) < 0) { ++ info(udev, "missing values, invalid device\n"); ++ udev_device_unref(udev_device); ++ udev_device = NULL; ++ } ++ ++ return udev_device; ++} ++ + static struct udev_device *device_new_from_parent(struct udev_device *udev_device) + { + struct udev_device *udev_device_parent = NULL; +@@ -1072,58 +1234,6 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink + return 0; + } + +-struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) +-{ +- udev_device->envp_uptodate = 0; +- if (value == NULL) { +- struct udev_list_entry *list_entry; +- +- list_entry = udev_device_get_properties_list_entry(udev_device); +- list_entry = udev_list_entry_get_by_name(list_entry, key); +- if (list_entry != NULL) +- udev_list_entry_delete(list_entry); +- return NULL; +- } +- return udev_list_entry_add(udev_device->udev, &udev_device->properties_list, key, value, 1, 0); +-} +- +-struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property) +-{ +- char name[UTIL_LINE_SIZE]; +- char *val; +- +- util_strscpy(name, sizeof(name), property); +- val = strchr(name, '='); +- if (val == NULL) +- return NULL; +- val[0] = '\0'; +- val = &val[1]; +- if (val[0] == '\0') +- val = NULL; +- return udev_device_add_property(udev_device, name, val); +-} +- +-/** +- * udev_device_get_property_value: +- * @udev_device: udev device +- * @key: property name +- * +- * Returns: the value of a device property, or #NULL if there is no such property. +- **/ +-const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key) +-{ +- struct udev_list_entry *list_entry; +- +- if (udev_device == NULL) +- return NULL; +- if (key == NULL) +- return NULL; +- +- list_entry = udev_device_get_properties_list_entry(udev_device); +- list_entry = udev_list_entry_get_by_name(list_entry, key); +- return udev_list_entry_get_value(list_entry); +-} +- + #define ENVP_SIZE 128 + #define MONITOR_BUF_SIZE 4096 + static int update_envp_monitor_buf(struct udev_device *udev_device) +diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c +index 96c153f..97e52c4 100644 +--- a/libudev/libudev-monitor.c ++++ b/libudev/libudev-monitor.c +@@ -497,11 +497,6 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito + ssize_t buflen; + ssize_t bufpos; + struct udev_monitor_netlink_header *nlh; +- int devpath_set = 0; +- int subsystem_set = 0; +- int action_set = 0; +- int maj = 0; +- int min = 0; + + retry: + if (udev_monitor == NULL) +@@ -589,6 +584,7 @@ retry: + udev_device = udev_device_new(udev_monitor->udev); + if (udev_device == NULL) + return NULL; ++ udev_device_set_info_loaded(udev_device); + + while (bufpos < buflen) { + char *key; +@@ -599,60 +595,11 @@ retry: + if (keylen == 0) + break; + bufpos += keylen + 1; +- +- if (strncmp(key, "DEVPATH=", 8) == 0) { +- char path[UTIL_PATH_SIZE]; +- +- util_strscpyl(path, sizeof(path), udev_get_sys_path(udev_monitor->udev), &key[8], NULL); +- udev_device_set_syspath(udev_device, path); +- devpath_set = 1; +- } else if (strncmp(key, "SUBSYSTEM=", 10) == 0) { +- udev_device_set_subsystem(udev_device, &key[10]); +- subsystem_set = 1; +- } else if (strncmp(key, "DEVTYPE=", 8) == 0) { +- udev_device_set_devtype(udev_device, &key[8]); +- } else if (strncmp(key, "DEVNAME=", 8) == 0) { +- if (key[8] == '/') +- udev_device_set_devnode(udev_device, &key[8]); +- else +- udev_device_set_knodename(udev_device, &key[8]); +- } else if (strncmp(key, "DEVLINKS=", 9) == 0) { +- char devlinks[UTIL_PATH_SIZE]; +- char *slink; +- char *next; +- +- util_strscpy(devlinks, sizeof(devlinks), &key[9]); +- slink = devlinks; +- next = strchr(slink, ' '); +- while (next != NULL) { +- next[0] = '\0'; +- udev_device_add_devlink(udev_device, slink, 0); +- slink = &next[1]; +- next = strchr(slink, ' '); +- } +- if (slink[0] != '\0') +- udev_device_add_devlink(udev_device, slink, 0); +- } else if (strncmp(key, "DRIVER=", 7) == 0) { +- udev_device_set_driver(udev_device, &key[7]); +- } else if (strncmp(key, "ACTION=", 7) == 0) { +- udev_device_set_action(udev_device, &key[7]); +- action_set = 1; +- } else if (strncmp(key, "MAJOR=", 6) == 0) { +- maj = strtoull(&key[6], NULL, 10); +- } else if (strncmp(key, "MINOR=", 6) == 0) { +- min = strtoull(&key[6], NULL, 10); +- } else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) { +- udev_device_set_devpath_old(udev_device, &key[12]); +- } else if (strncmp(key, "SEQNUM=", 7) == 0) { +- udev_device_set_seqnum(udev_device, strtoull(&key[7], NULL, 10)); +- } else if (strncmp(key, "TIMEOUT=", 8) == 0) { +- udev_device_set_timeout(udev_device, strtoull(&key[8], NULL, 10)); +- } else { +- udev_device_add_property_from_string(udev_device, key); +- } ++ udev_device_add_property_from_string_parse(udev_device, key); + } +- if (!devpath_set || !subsystem_set || !action_set) { +- info(udev_monitor->udev, "missing values, skip\n"); ++ ++ if (udev_device_add_property_from_string_parse_finish(udev_device) < 0) { ++ info(udev_monitor->udev, "missing values, invalid device\n"); + udev_device_unref(udev_device); + return NULL; + } +@@ -673,9 +620,6 @@ retry: + return NULL; + } + +- if (maj > 0) +- udev_device_set_devnum(udev_device, makedev(maj, min)); +- udev_device_set_info_loaded(udev_device); + return udev_device; + } + +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 5ee0c58..3f2861f 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -71,7 +71,8 @@ int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode + int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink, int unique); + void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); + struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value); +-struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property); ++void udev_device_add_property_from_string_parse(struct udev_device *udev_device, const char *property); ++int udev_device_add_property_from_string_parse_finish(struct udev_device *udev_device); + char **udev_device_get_properties_envp(struct udev_device *udev_device); + ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_device, const char **buf); + int udev_device_read_db(struct udev_device *udev_device); +diff --git a/libudev/libudev.h b/libudev/libudev.h +index 9576ad4..750664f 100644 +--- a/libudev/libudev.h ++++ b/libudev/libudev.h +@@ -75,6 +75,7 @@ struct udev *udev_device_get_udev(struct udev_device *udev_device); + struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath); + struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum); + struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname); ++struct udev_device *udev_device_new_from_environment(struct udev *udev); + /* udev_device_get_parent_*() does not take a reference on the returned device, it is automatically unref'd with the parent */ + struct udev_device *udev_device_get_parent(struct udev_device *udev_device); + struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, +-- +1.6.6 + diff --git a/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch b/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch index 8440ea9..4b8ca14 100644 --- a/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch +++ b/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch @@ -1,7 +1,7 @@ From 23325a66ccf3a2f90a4f5d1702f60408187de28a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 18 Mar 2010 09:57:44 +0100 -Subject: [PATCH 34/36] add LGPL COPYING to libudev and GUdev +Subject: [PATCH 34/65] add LGPL COPYING to libudev and GUdev --- extras/gudev/COPYING | 504 ++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch index 870a344..0d34327 100644 --- a/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch +++ b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch @@ -1,7 +1,7 @@ From 38a3cde11bc77af49a96245b8a8a0f2b583a344c Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 18 Mar 2010 11:14:32 +0100 -Subject: [PATCH 35/36] cdrom_id: open non-mounted optical media with O_EXCL +Subject: [PATCH 35/65] cdrom_id: open non-mounted optical media with O_EXCL This should prevent confusing drives during CD burning sessions. Based on a patch from Harald Hoyer. diff --git a/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch b/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch index 45f1397..d3cf673 100644 --- a/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch +++ b/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch @@ -1,7 +1,7 @@ From 4dd9b291354e76f34b0d6d7b5c3b28d03a624418 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 18 Mar 2010 17:13:59 -0700 -Subject: [PATCH 36/36] modeswitch: morph into tool that only switches Mobile Action cables +Subject: [PATCH 36/65] modeswitch: morph into tool that only switches Mobile Action cables Remove option modeswitching code; use usb_modeswitch already, people. --- diff --git a/0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch b/0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch new file mode 100644 index 0000000..bc8aa52 --- /dev/null +++ b/0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch @@ -0,0 +1,28 @@ +From 00e43e357ea709d8c1def0aed13192abbf9ac193 Mon Sep 17 00:00:00 2001 +From: Amit Shah +Date: Mon, 22 Mar 2010 10:59:46 +0100 +Subject: [PATCH 37/65] rules: virtio - fix is to check if the 'name' attribute is present + +Fix provided by Harald Hoyer. + +Signed-off-by: Amit Shah +--- + rules/rules.d/50-udev-default.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index da1535f..e8116a3 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout" + KERNEL=="hvc*|hvsi*", GROUP="dialout" + + # virtio serial / console ports +-KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" ++KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" + + # mem + KERNEL=="null|zero|full|random|urandom", MODE="0666" +-- +1.6.6 + diff --git a/0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch b/0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch new file mode 100644 index 0000000..56aaa23 --- /dev/null +++ b/0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch @@ -0,0 +1,25 @@ +From 5b6172b1d9b5d582d05ea89985efd0ea7a0c8ad7 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Wed, 24 Mar 2010 17:44:39 +0100 +Subject: [PATCH 38/65] keymap: Add Acer TravelMate 6593G and Acer Aspire 1640 + +https://launchpad.net/bugs/536914 +--- + extras/keymap/95-keymap.rules | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 65b0d6e..b3b08ae 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -78,6 +78,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" +-- +1.6.6 + diff --git a/0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch b/0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch new file mode 100644 index 0000000..41641dd --- /dev/null +++ b/0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch @@ -0,0 +1,26 @@ +From 43d08246dbb3a01e88062d5315194ee889e52dd4 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Wed, 24 Mar 2010 18:56:20 +0100 +Subject: [PATCH 39/65] keymap: Fix another key for Acer TravelMate 6593 + +https://launchpad.net/bugs/536914 +--- + extras/keymap/95-keymap.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index b3b08ae..dd58453 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -78,7 +78,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" +-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" +-- +1.6.6 + diff --git a/0040-libudev-update-documentation.patch b/0040-libudev-update-documentation.patch new file mode 100644 index 0000000..3b404c8 --- /dev/null +++ b/0040-libudev-update-documentation.patch @@ -0,0 +1,108 @@ +From dbba7e4029e2eb8157232e6b5ddd9ee0f68b51b5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 25 Mar 2010 16:45:15 +0100 +Subject: [PATCH 40/65] libudev: update documentation + +--- + libudev/docs/libudev-docs.xml | 2 +- + libudev/libudev-device.c | 14 ++++++-------- + libudev/libudev.c | 14 +++++++------- + 3 files changed, 14 insertions(+), 16 deletions(-) + +diff --git a/libudev/docs/libudev-docs.xml b/libudev/docs/libudev-docs.xml +index b037281..f470916 100644 +--- a/libudev/docs/libudev-docs.xml ++++ b/libudev/docs/libudev-docs.xml +@@ -9,7 +9,7 @@ + libudev Reference Manual + for libudev version &version; + +- 2009 ++ 2009-2010 + Kay Sievers <kay.sievers@vrfy.org> + + +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index fe45880..410f75b 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -463,10 +463,9 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char * + * @devnum: device major/minor number + * + * Create new udev device, and fill in information from the sys +- * device and the udev database entry. The device is looked up +- * by its major/minor number. Character and block device numbers +- * are not unique across the two types, they do not share the same +- * range of numbers. ++ * device and the udev database entry. The device is looked-up ++ * by its major/minor number and type. Character and block device ++ * numbers are not unique across the two types. + * + * The initial refcount is 1, and needs to be decremented to + * release the resources of the udev device. +@@ -497,10 +496,9 @@ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, de + * @subsystem: the subsystem of the device + * @sysname: the name of the device + * +- * Create new udev device, and fill in information from the sys +- * device and the udev database entry. The device is looked up +- * by the subsystem and name string of the device, like "mem", +- * "zero", or "block", "sda". ++ * Create new udev device, and fill in information from the sys device ++ * and the udev database entry. The device is looked up by the subsystem ++ * and name string of the device, like "mem" / "zero", or "block" / "sda". + * + * The initial refcount is 1, and needs to be decremented to + * release the resources of the udev device. +diff --git a/libudev/libudev.c b/libudev/libudev.c +index 411e9ae..0ae5a91 100644 +--- a/libudev/libudev.c ++++ b/libudev/libudev.c +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008-2009 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -71,7 +71,7 @@ static void log_stderr(struct udev *udev, + * @udev: udev library context + * + * Retrieve stored data pointer from library context. This might be useful +- * to access from callbacks. ++ * to access from callbacks like a custom logging function. + * + * Returns: stored userdata + **/ +@@ -321,10 +321,10 @@ void udev_set_log_fn(struct udev *udev, + * udev_get_log_priority: + * @udev: udev library context + * +- * The initial syslog priority is read from the udev config file ++ * The initial logging priority is read from the udev config file + * at startup. + * +- * Returns: the current syslog priority ++ * Returns: the current logging priority + **/ + int udev_get_log_priority(struct udev *udev) + { +@@ -334,10 +334,10 @@ int udev_get_log_priority(struct udev *udev) + /** + * udev_set_log_priority: + * @udev: udev library context +- * @priority: the new syslog priority ++ * @priority: the new logging priority + * +- * Set the current syslog priority. The value controls which messages +- * are send to syslog. ++ * Set the current logging priority. The value controls which messages ++ * are logged. + **/ + void udev_set_log_priority(struct udev *udev, int priority) + { +-- +1.6.6 + diff --git a/0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch b/0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch new file mode 100644 index 0000000..c7a2394 --- /dev/null +++ b/0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch @@ -0,0 +1,50 @@ +From 233a922112408c7ed49bd72e73be228e231d46ba Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Wed, 24 Mar 2010 20:14:23 -0500 +Subject: [PATCH 41/65] Fix Keymapping for upcoming Dell Laptops + +This patch fixes it so that new upcoming Dell machines will work +correctly if users presses the touchpad toggle key. + +Currently 0xD8 is being mapped to sleep. Though this is only done by the +Latitude XT* laptops. Many upcoming Laptops from Dell are mapping this +key to "toogle touchpad off" .. giving the OS notification that it has +just turned off the touchpad. + +Though their is an issue in that if this key is mapped the hardware +first toogles .. then the software tries to do the samething after, if +they fall out of sync ... no more touchpad. So leave out mapping these +keys for now. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keymap.rules | 1 + + extras/keymap/keymaps/dell | 1 - + 2 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index dd58453..af39c21 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -54,6 +54,7 @@ LABEL="keyboard_vendorcheck" + + ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" + ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan" ++ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT*", RUN+="keymap $name 0xD8 screenlock" + + ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" + +diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell +index 5ff44d6..84e5b4e 100644 +--- a/extras/keymap/keymaps/dell ++++ b/extras/keymap/keymaps/dell +@@ -23,5 +23,4 @@ + 0x9B switchvideomode # Display Toggle button + 0xA2 playpause # Front panel play/pause + 0xA4 stopcd # Front panel stop +-0xD8 screenlock # FIXME: Tablet lock button + 0xED media # MediaDirect button +-- +1.6.6 + diff --git a/0042-Add-new-Dell-touchpad-keycode.patch b/0042-Add-new-Dell-touchpad-keycode.patch new file mode 100644 index 0000000..c63b194 --- /dev/null +++ b/0042-Add-new-Dell-touchpad-keycode.patch @@ -0,0 +1,32 @@ +From e22aa83ba0b09796d02ebe831a4a66ab7d9f5c1e Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Mon, 5 Apr 2010 18:45:34 -0500 +Subject: [PATCH 42/65] Add new Dell touchpad keycode + +After working very closely with Dell. They have now completely changed +the way they have implemented there touchpad hotkey for upcoming +machines. + +It now only generates a single keycode (0xD9). It nolonger does anything +in hardware, nor does it generate more then this keycode. + +This patch properly maps this keycode. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + extras/keymap/keymaps/dell | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell +index 84e5b4e..f90a4fd 100644 +--- a/extras/keymap/keymaps/dell ++++ b/extras/keymap/keymaps/dell +@@ -24,3 +24,4 @@ + 0xA2 playpause # Front panel play/pause + 0xA4 stopcd # Front panel stop + 0xED media # MediaDirect button ++0xD9 f22 # touchpad toggle +-- +1.6.6 + diff --git a/0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch b/0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch new file mode 100644 index 0000000..e2b6474 --- /dev/null +++ b/0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch @@ -0,0 +1,42 @@ +From 5fa8992c9c2e756aefe84a41f00c7a2555e8d975 Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Mon, 5 Apr 2010 18:45:35 -0500 +Subject: [PATCH 43/65] Revert special casing 0xD8 to latitude XT only + +Now that Dell has changed the functionality of upcoming machines with +touchpad toggle to only use keycode 0xD9 .. and not 0xD8 & 0xD9. It +seems best to add this back to the general map of Dell buttons. Just +incase a machine in the future uses this later. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keymap.rules | 1 - + extras/keymap/keymaps/dell | 1 + + 2 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index af39c21..dd58453 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -54,7 +54,6 @@ LABEL="keyboard_vendorcheck" + + ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" + ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan" +-ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT*", RUN+="keymap $name 0xD8 screenlock" + + ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" + +diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell +index f90a4fd..6443b4b 100644 +--- a/extras/keymap/keymaps/dell ++++ b/extras/keymap/keymaps/dell +@@ -24,4 +24,5 @@ + 0xA2 playpause # Front panel play/pause + 0xA4 stopcd # Front panel stop + 0xED media # MediaDirect button ++0xD8 screenlock # FIXME: Tablet lock button + 0xD9 f22 # touchpad toggle +-- +1.6.6 + diff --git a/0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch b/0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch new file mode 100644 index 0000000..3d7c051 --- /dev/null +++ b/0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch @@ -0,0 +1,30 @@ +From f8ede05d7ad5286039319bcb188e86b9117551e2 Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Tue, 6 Apr 2010 12:59:12 -0500 +Subject: [PATCH 44/65] Fix Dell Studio 1558 volume keys not releasing + +This patch fixes the Dell Studio 1558 to give a key release when a +volume key is pressed. This is the same as the 1557. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keyboard-force-release.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index 28639a5..f0e1ab8 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -21,7 +21,7 @@ ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" + + ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other" + +-ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" ++ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" + + ENV{DMI_VENDOR}=="FUJITSU SIEMENS", ATTR{[dmi/id]product_name}=="AMILO Si 1848+u", RUN+="keyboard-force-release.sh $devpath fujitsu-amilo-si1848" + +-- +1.6.6 + diff --git a/0045-Add-support-for-another-Dell-touchpad-toggle-key.patch b/0045-Add-support-for-another-Dell-touchpad-toggle-key.patch new file mode 100644 index 0000000..fae1ca8 --- /dev/null +++ b/0045-Add-support-for-another-Dell-touchpad-toggle-key.patch @@ -0,0 +1,29 @@ +From 6de84dee053a74c95f2200d6d94cfeb61516bc40 Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Tue, 6 Apr 2010 16:08:21 -0500 +Subject: [PATCH 45/65] Add support for another Dell touchpad toggle key + +There is another keycode that some Dell machines that are about to ship, +or shipping are using for touchpad toggle. That code is 0x9E. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + extras/keymap/keymaps/dell | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell +index 6443b4b..1a2e433 100644 +--- a/extras/keymap/keymaps/dell ++++ b/extras/keymap/keymaps/dell +@@ -21,6 +21,7 @@ + 0x99 nextsong # Front panel next song + 0x9A setup # Tablet tools button + 0x9B switchvideomode # Display Toggle button ++0x9E f22 #touchpad toggle + 0xA2 playpause # Front panel play/pause + 0xA4 stopcd # Front panel stop + 0xED media # MediaDirect button +-- +1.6.6 + diff --git a/0047-scsi_id-add-rand-in-retry-loop.patch b/0047-scsi_id-add-rand-in-retry-loop.patch new file mode 100644 index 0000000..c58beb4 --- /dev/null +++ b/0047-scsi_id-add-rand-in-retry-loop.patch @@ -0,0 +1,45 @@ +From 1c8dc990dc20efbd6cd8e56a57c0fa567c2d6fc8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 7 Apr 2010 09:22:30 +0200 +Subject: [PATCH 47/65] scsi_id: add rand() in retry loop + +--- + extras/scsi_id/scsi_serial.c | 14 +++++++------- + 1 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 0c9d9c3..8752e14 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -863,21 +863,21 @@ int scsi_get_serial(struct udev *udev, + { + unsigned char page0[SCSI_INQ_BUFF_LEN]; + int fd = -1; +- int cnt = 10; ++ int cnt; + int ind; + int retval; + + memset(dev_scsi->serial, 0, len); + dbg(udev, "opening %s\n", devname); +- while (--cnt) { +- const struct timespec duration = { 0, 500 * 1000 * 1000 }; ++ srand((unsigned int)getpid()); ++ for (cnt = 20; cnt > 0; cnt--) { ++ struct timespec duration; + + fd = open(devname, O_RDONLY | O_NONBLOCK); +- if (fd >= 0) +- break; +- info(udev, "%s: cannot open %s: %s\n", dev_scsi->kernel, devname, strerror(errno)); +- if (errno != EBUSY) ++ if (fd >= 0 || errno != EBUSY) + break; ++ duration.tv_sec = 0; ++ duration.tv_nsec = (200 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); + nanosleep(&duration, NULL); + } + if (fd < 0) +-- +1.6.6 + diff --git a/0048-cdrom_id-remove-debugging-code.patch b/0048-cdrom_id-remove-debugging-code.patch new file mode 100644 index 0000000..57a4e07 --- /dev/null +++ b/0048-cdrom_id-remove-debugging-code.patch @@ -0,0 +1,24 @@ +From 36a07a8c34a4cff5ad2bbb6e0fdfed49e8191661 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 7 Apr 2010 09:23:46 +0200 +Subject: [PATCH 48/65] cdrom_id: remove debugging code + +--- + extras/cdrom_id/cdrom_id.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index e485768..036ef28 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -126,7 +126,6 @@ static int is_mounted(const char *device) + if (fp == NULL) + return -ENOSYS; + while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { +- printf("got %u %u\n", maj, min); + if (makedev(maj, min) == statbuf.st_rdev) { + mounted = 1; + break; +-- +1.6.6 + diff --git a/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch b/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch new file mode 100644 index 0000000..f7e6b27 --- /dev/null +++ b/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch @@ -0,0 +1,53 @@ +From cccfffbe04c01be12fb42cb12f3f7aa5e2a22dd4 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 7 Apr 2010 09:24:25 +0200 +Subject: [PATCH 49/65] cdrom_id: retry to open the device, if EBUSY + +We might fight about the device with polling processes, or other +users who probe the device. Retry a few times if the other one goes +away in the meantime. + +Based on a patch from Harald Hoyer. +--- + extras/cdrom_id/cdrom_id.c | 18 +++++++++++++++++- + 1 files changed, 17 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 036ef28..7c9f8cc 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -591,7 +592,22 @@ int main(int argc, char *argv[]) + goto exit; + } + +- fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); ++ if (is_mounted(node)) { ++ fd = open(node, O_RDONLY|O_NONBLOCK); ++ } else { ++ int cnt; ++ struct timespec duration; ++ ++ srand((unsigned int)getpid()); ++ for (cnt = 40; cnt > 0; cnt--) { ++ fd = open(node, O_RDONLY|O_NONBLOCK|O_EXCL); ++ if (fd >= 0 || errno != EBUSY) ++ break; ++ duration.tv_sec = 0; ++ duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); ++ nanosleep(&duration, NULL); ++ } ++ } + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); +-- +1.6.6 + diff --git a/0050-cdrom_id-check-mount-state-in-retry-loop.patch b/0050-cdrom_id-check-mount-state-in-retry-loop.patch new file mode 100644 index 0000000..b4fb62b --- /dev/null +++ b/0050-cdrom_id-check-mount-state-in-retry-loop.patch @@ -0,0 +1,55 @@ +From d45c8c8b01c99180f15e24b22f7cf81eaf3cdd1b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 7 Apr 2010 11:32:22 +0200 +Subject: [PATCH 50/65] cdrom_id: check mount state in retry loop + +Based on a patch from Harald Hoyer. +--- + extras/cdrom_id/cdrom_id.c | 22 +++++++++------------- + 1 files changed, 9 insertions(+), 13 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 7c9f8cc..894a890 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -547,6 +547,7 @@ int main(int argc, char *argv[]) + const char *node = NULL; + int export = 0; + int fd = -1; ++ int cnt; + int rc = 0; + + udev = udev_new(); +@@ -592,21 +593,16 @@ int main(int argc, char *argv[]) + goto exit; + } + +- if (is_mounted(node)) { +- fd = open(node, O_RDONLY|O_NONBLOCK); +- } else { +- int cnt; ++ srand((unsigned int)getpid()); ++ for (cnt = 20; cnt > 0; cnt--) { + struct timespec duration; + +- srand((unsigned int)getpid()); +- for (cnt = 40; cnt > 0; cnt--) { +- fd = open(node, O_RDONLY|O_NONBLOCK|O_EXCL); +- if (fd >= 0 || errno != EBUSY) +- break; +- duration.tv_sec = 0; +- duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); +- nanosleep(&duration, NULL); +- } ++ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); ++ if (fd >= 0 || errno != EBUSY) ++ break; ++ duration.tv_sec = 0; ++ duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); ++ nanosleep(&duration, NULL); + } + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); +-- +1.6.6 + diff --git a/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch b/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch new file mode 100644 index 0000000..1d3be0e --- /dev/null +++ b/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch @@ -0,0 +1,31 @@ +From 5c5ebde711c4560ae0560e87c33fe477b5add354 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 01:12:23 +0200 +Subject: [PATCH 51/65] cdrom_id: always set ID_CDROM regardless if we can run cdrom_id + +--- + extras/cdrom_id/60-cdrom_id.rules | 12 +++++++++--- + 1 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules +index 132a680..811c4aa 100644 +--- a/extras/cdrom_id/60-cdrom_id.rules ++++ b/extras/cdrom_id/60-cdrom_id.rules +@@ -1,5 +1,11 @@ + # do not edit this file, it will be overwritten on update + +-# import optical drive properties +-ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \ +- KERNEL=="sr[0-9]*|xvd*", IMPORT{program}="cdrom_id --export $tempnode" ++ACTION!="add|change", GOTO="cdrom_end" ++SUBSYSTEM!="block", GOTO="cdrom_end" ++KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" ++ENV{DEVTYPE}!="disk", GOTO="cdrom_end" ++ ++ENV{ID_CDROM}="1" ++IMPORT{program}="cdrom_id --export $tempnode" ++ ++LABEL="cdrom_end" +-- +1.6.6 + diff --git a/0052-rules-delete-outdated-packagees-rules.patch b/0052-rules-delete-outdated-packagees-rules.patch new file mode 100644 index 0000000..eb65f78 --- /dev/null +++ b/0052-rules-delete-outdated-packagees-rules.patch @@ -0,0 +1,124 @@ +From a971fb4d58aee946e151b315453fdd1b18331402 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 10:45:27 +0200 +Subject: [PATCH 52/65] rules: delete outdated packagees rules + +--- + rules/packages/40-infiniband.rules | 9 -------- + rules/packages/40-isdn.rules | 4 --- + rules/packages/40-zaptel.rules | 7 ------ + rules/packages/64-device-mapper.rules | 4 --- + rules/packages/64-md-raid.rules | 36 --------------------------------- + rules/suse/64-device-mapper.rules | 2 - + 6 files changed, 0 insertions(+), 62 deletions(-) + delete mode 100644 rules/packages/40-infiniband.rules + delete mode 100644 rules/packages/40-isdn.rules + delete mode 100644 rules/packages/40-zaptel.rules + delete mode 100644 rules/packages/64-device-mapper.rules + delete mode 100644 rules/packages/64-md-raid.rules + +diff --git a/rules/packages/40-infiniband.rules b/rules/packages/40-infiniband.rules +deleted file mode 100644 +index e2e4748..0000000 +--- a/rules/packages/40-infiniband.rules ++++ /dev/null +@@ -1,9 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-KERNEL=="umad[0-9]*", NAME="infiniband/%k" +-KERNEL=="issm[0-9]*", NAME="infiniband/%k" +-KERNEL=="ucm[0-9]*", NAME="infiniband/%k", MODE="0666" +-KERNEL=="uverbs[0-9]*", NAME="infiniband/%k", MODE="0666" +-KERNEL=="uat", NAME="infiniband/%k", MODE="0666" +-KERNEL=="ucma", NAME="infiniband/%k", MODE="0666" +-KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0666" +diff --git a/rules/packages/40-isdn.rules b/rules/packages/40-isdn.rules +deleted file mode 100644 +index 1a31cb6..0000000 +--- a/rules/packages/40-isdn.rules ++++ /dev/null +@@ -1,4 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", GROUP="dialout" +-SUBSYSTEM=="tty", KERNEL=="capi[0-9]*", NAME="capi/%n" +diff --git a/rules/packages/40-zaptel.rules b/rules/packages/40-zaptel.rules +deleted file mode 100644 +index cbd8b8a..0000000 +--- a/rules/packages/40-zaptel.rules ++++ /dev/null +@@ -1,7 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-KERNEL=="zap[0-9]*", NAME="zap/%n", GROUP="dialout" +-KERNEL=="zapchannel", NAME="zap/channel", GROUP="dialout" +-KERNEL=="zapctl", NAME="zap/ctl", GROUP="dialout" +-KERNEL=="zappseudo", NAME="zap/pseudo", GROUP="dialout" +-KERNEL=="zaptimer", NAME="zap/timer", GROUP="dialout" +diff --git a/rules/packages/64-device-mapper.rules b/rules/packages/64-device-mapper.rules +deleted file mode 100644 +index 8154ef3..0000000 +--- a/rules/packages/64-device-mapper.rules ++++ /dev/null +@@ -1,4 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-KERNEL=="device-mapper", NAME="mapper/control" +- +diff --git a/rules/packages/64-md-raid.rules b/rules/packages/64-md-raid.rules +deleted file mode 100644 +index 6ba93b6..0000000 +--- a/rules/packages/64-md-raid.rules ++++ /dev/null +@@ -1,36 +0,0 @@ +-# do not edit this file, it will be overwritten on update +- +-SUBSYSTEM!="block", GOTO="md_end" +-ACTION!="add|change", GOTO="md_end" +- +-# import data from a raid member and activate it +-#ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}" +-# import data from a raid set +-KERNEL!="md*", GOTO="md_end" +- +-# partitions have no md/{array_state,metadata_version} +-ENV{DEVTYPE}=="partition", GOTO="md_ignore_state" +- +-# container devices have a metadata version of e.g. 'external:ddf' and +-# never leave state 'inactive' +-ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" +-TEST!="md/array_state", GOTO="md_end" +-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" +-LABEL="md_ignore_state" +- +-IMPORT{program}="/sbin/mdadm --detail --export $tempnode" +-ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace" +-ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" +-ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}" +-ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace" +-ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n" +-ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n" +-ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n" +- +-IMPORT{program}="/sbin/blkid -o udev -p $tempnode" +-OPTIONS+="link_priority=100" +-OPTIONS+="watch" +-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}" +- +-LABEL="md_end" +diff --git a/rules/suse/64-device-mapper.rules b/rules/suse/64-device-mapper.rules +index 36ac756..34e3307 100644 +--- a/rules/suse/64-device-mapper.rules ++++ b/rules/suse/64-device-mapper.rules +@@ -1,7 +1,5 @@ + # do not edit this file, it will be overwritten on update + +-KERNEL=="device-mapper", NAME="mapper/control" +- + KERNEL!="dm-*", GOTO="device_mapper_end" + ACTION!="add|change", GOTO="device_mapper_end" + +-- +1.6.6 + diff --git a/0053-rules-we-do-not-have-static-devices-which-are-rename.patch b/0053-rules-we-do-not-have-static-devices-which-are-rename.patch new file mode 100644 index 0000000..54294f0 --- /dev/null +++ b/0053-rules-we-do-not-have-static-devices-which-are-rename.patch @@ -0,0 +1,21 @@ +From 421fbc71c7e951dac900eabd445dfe577158b9c3 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 10:50:59 +0200 +Subject: [PATCH 53/65] rules: we do not have static devices which are renamed + +--- + rules/rules.d/50-udev-default.rules | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index e8116a3..a5f0823 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -115,4 +115,3 @@ KERNEL=="rrom[0-9]*", MODE="0400" + + # do not delete static device nodes + ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove" +-ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" +-- +1.6.6 + diff --git a/0054-unify-cleanup-event-handling.patch b/0054-unify-cleanup-event-handling.patch new file mode 100644 index 0000000..8ab3525 --- /dev/null +++ b/0054-unify-cleanup-event-handling.patch @@ -0,0 +1,362 @@ +From 0ec5b5e1429307fa7573aaa9b8f25fbd9b1d71d5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 15:51:16 +0200 +Subject: [PATCH 54/65] unify/cleanup event handling + +--- + udev/udev-event.c | 231 ++++++++++++++++++++++------------------------------- + udev/udev-node.c | 24 ++++-- + udev/udev.h | 3 +- + 3 files changed, 111 insertions(+), 147 deletions(-) + +diff --git a/udev/udev-event.c b/udev/udev-event.c +index 986c119..c3a8281 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2003-2009 Kay Sievers ++ * Copyright (C) 2003-2010 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 +@@ -541,167 +541,124 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + udev_device_get_subsystem(dev), udev_device_get_sysname(dev)); + } + +- /* add device node */ +- if (major(udev_device_get_devnum(dev)) != 0 && +- (strcmp(udev_device_get_action(dev), "add") == 0 || strcmp(udev_device_get_action(dev), "change") == 0)) { +- char filename[UTIL_PATH_SIZE]; +- struct udev_device *dev_old; +- int delete_kdevnode = 0; +- +- dbg(event->udev, "device node add '%s'\n", udev_device_get_devpath(dev)); +- +- /* read old database entry */ +- dev_old = udev_device_new_from_syspath(event->udev, udev_device_get_syspath(dev)); +- if (dev_old != NULL) { +- udev_device_read_db(dev_old); +- udev_device_set_info_loaded(dev_old); ++ if (strcmp(udev_device_get_action(dev), "remove") == 0) { ++ udev_device_read_db(dev); ++ udev_device_set_info_loaded(dev); ++ udev_device_delete_db(dev); + +- /* disable watch during event processing */ +- udev_watch_end(event->udev, dev_old); +- } ++ if (major(udev_device_get_devnum(dev)) != 0) ++ udev_watch_end(event->udev, dev); + + udev_rules_apply_to_event(rules, event); +- if (event->tmp_node != NULL) { +- dbg(event->udev, "cleanup temporary device node\n"); +- util_unlink_secure(event->udev, event->tmp_node); +- free(event->tmp_node); +- event->tmp_node = NULL; +- } +- +- if (event->name != NULL && event->name[0] == '\0') { +- info(event->udev, "device node creation suppressed\n"); +- delete_kdevnode = 1; +- goto exit_add; +- } +- +- /* if rule given name disagrees with kernel node name, delete kernel node */ +- if (event->name != NULL && udev_device_get_knodename(dev) != NULL) { +- if (strcmp(event->name, udev_device_get_knodename(dev)) != 0) +- delete_kdevnode = 1; +- } +- +- /* no rule, use kernel provided name */ +- if (event->name == NULL) { +- if (udev_device_get_knodename(dev) != NULL) { +- event->name = strdup(udev_device_get_knodename(dev)); +- info(event->udev, "no node name set, will use kernel supplied name '%s'\n", event->name); +- } else { +- event->name = strdup(udev_device_get_sysname(event->dev)); +- info(event->udev, "no node name set, will use device name '%s'\n", event->name); +- } +- } + +- /* something went wrong */ +- if (event->name == NULL) { +- err(event->udev, "no node name for '%s'\n", udev_device_get_sysname(event->dev)); +- goto exit_add; +- } +- +- /* set device node name */ +- util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", event->name, NULL); +- udev_device_set_devnode(dev, filename); +- +- /* write current database entry */ +- udev_device_update_db(dev); ++ if (major(udev_device_get_devnum(dev)) != 0) ++ err = udev_node_remove(dev); ++ } else { ++ event->dev_db = udev_device_new_from_syspath(event->udev, udev_device_get_syspath(dev)); ++ if (event->dev_db != NULL) { ++ udev_device_read_db(event->dev_db); ++ udev_device_set_info_loaded(event->dev_db); + +- /* remove/update possible left-over symlinks from old database entry */ +- if (dev_old != NULL) +- udev_node_update_old_links(dev, dev_old); +- +- /* create new node and symlinks */ +- err = udev_node_add(dev, event->mode, event->uid, event->gid); +-exit_add: +- if (delete_kdevnode && udev_device_get_knodename(dev) != NULL) { +- struct stat stats; +- +- util_strscpyl(filename, sizeof(filename), +- udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); +- if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) { +- unlink(filename); +- util_delete_path(event->udev, filename); +- info(event->udev, "removed kernel created node '%s'\n", filename); +- } ++ /* disable watch during event processing */ ++ if (major(udev_device_get_devnum(dev)) != 0) ++ udev_watch_end(event->udev, event->dev_db); + } +- udev_device_unref(dev_old); +- goto exit; +- } +- +- /* add netif */ +- if (strcmp(udev_device_get_subsystem(dev), "net") == 0 && strcmp(udev_device_get_action(dev), "add") == 0) { +- dbg(event->udev, "netif add '%s'\n", udev_device_get_devpath(dev)); +- udev_device_delete_db(dev); + + udev_rules_apply_to_event(rules, event); +- if (event->name == NULL) +- goto exit; + +- /* look if we want to change the name of the netif */ +- if (strcmp(event->name, udev_device_get_sysname(dev)) != 0) { ++ /* rename a new network interface, if needed */ ++ if (strcmp(udev_device_get_subsystem(dev), "net") == 0 && strcmp(udev_device_get_action(dev), "add") == 0 && ++ event->name != NULL && strcmp(event->name, udev_device_get_sysname(dev)) != 0) { + char syspath[UTIL_PATH_SIZE]; + char *pos; + + err = rename_netif(event); +- if (err != 0) +- goto exit; +- info(event->udev, "renamed netif to '%s'\n", event->name); +- +- /* remember old name */ +- udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); +- +- /* now change the devpath, because the kernel device name has changed */ +- util_strscpy(syspath, sizeof(syspath), udev_device_get_syspath(dev)); +- pos = strrchr(syspath, '/'); +- if (pos != NULL) { +- pos++; +- util_strscpy(pos, sizeof(syspath) - (pos - syspath), event->name); +- udev_device_set_syspath(event->dev, syspath); +- udev_device_add_property(dev, "INTERFACE", udev_device_get_sysname(dev)); +- info(event->udev, "changed devpath to '%s'\n", udev_device_get_devpath(dev)); ++ if (err == 0) { ++ info(event->udev, "renamed netif to '%s'\n", event->name); ++ ++ /* delete stale db file */ ++ udev_device_delete_db(dev); ++ ++ /* remember old name */ ++ udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); ++ ++ /* now change the devpath, because the kernel device name has changed */ ++ util_strscpy(syspath, sizeof(syspath), udev_device_get_syspath(dev)); ++ pos = strrchr(syspath, '/'); ++ if (pos != NULL) { ++ pos++; ++ util_strscpy(pos, sizeof(syspath) - (pos - syspath), event->name); ++ udev_device_set_syspath(event->dev, syspath); ++ udev_device_add_property(dev, "INTERFACE", udev_device_get_sysname(dev)); ++ info(event->udev, "changed devpath to '%s'\n", udev_device_get_devpath(dev)); ++ } + } + } +- udev_device_update_db(dev); +- goto exit; +- } + +- /* remove device node */ +- if (major(udev_device_get_devnum(dev)) != 0 && strcmp(udev_device_get_action(dev), "remove") == 0) { +- /* import database entry and delete it */ +- udev_device_read_db(dev); +- udev_device_set_info_loaded(dev); +- udev_device_delete_db(dev); ++ if (major(udev_device_get_devnum(dev)) != 0) { ++ char filename[UTIL_PATH_SIZE]; + +- /* remove watch */ +- udev_watch_end(event->udev, dev); ++ if (event->tmp_node != NULL) { ++ info(event->udev, "cleanup temporary device node\n"); ++ util_unlink_secure(event->udev, event->tmp_node); ++ free(event->tmp_node); ++ event->tmp_node = NULL; ++ } + +- if (udev_device_get_devnode(dev) == NULL) { +- char devnode[UTIL_PATH_SIZE]; ++ /* no rule, use kernel provided name */ ++ if (event->name == NULL) { ++ if (udev_device_get_knodename(dev) != NULL) { ++ event->name = strdup(udev_device_get_knodename(dev)); ++ info(event->udev, "no node name set, will use kernel supplied name '%s'\n", event->name); ++ } else { ++ event->name = strdup(udev_device_get_sysname(event->dev)); ++ info(event->udev, "no node name set, will use device name '%s'\n", event->name); ++ } ++ } ++ ++ if (event->name == NULL) { ++ /* things went wrong */ ++ udev_device_delete_db(dev); ++ udev_device_unref(event->dev_db); ++ err = -ENOMEM; ++ goto out; ++ } + +- info(event->udev, "'%s' not found in database, using kernel name '%s'\n", +- udev_device_get_syspath(dev), udev_device_get_knodename(dev)); +- util_strscpyl(devnode, sizeof(devnode), +- udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); +- udev_device_set_devnode(dev, devnode); ++ /* set device node name */ ++ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", event->name, NULL); ++ udev_device_set_devnode(dev, filename); + } + +- udev_rules_apply_to_event(rules, event); ++ udev_device_update_db(dev); + +- if (udev_device_get_ignore_remove(dev)) { +- info(event->udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev)); +- goto exit; ++ if (major(udev_device_get_devnum(dev)) != 0) { ++ /* remove/update possible left-over symlinks from old database entry */ ++ if (event->dev_db != NULL) ++ udev_node_update_old_links(dev, event->dev_db); ++ ++ if (event->name[0] != '\0') ++ err = udev_node_add(dev, event->mode, event->uid, event->gid); ++ else ++ info(event->udev, "device node creation suppressed\n"); ++ ++ /* remove kernel-created node, if needed */ ++ if (udev_device_get_knodename(dev) != NULL && strcmp(event->name, udev_device_get_knodename(dev)) != 0) { ++ struct stat stats; ++ char filename[UTIL_PATH_SIZE]; ++ ++ info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev)); ++ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); ++ if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) { ++ util_unlink_secure(event->udev, filename); ++ util_delete_path(event->udev, filename); ++ } ++ } + } + +- err = udev_node_remove(dev); +- goto exit; ++ udev_device_unref(event->dev_db); ++ event->dev_db = NULL; + } +- +- /* default devices */ +- udev_rules_apply_to_event(rules, event); +- +- if (strcmp(udev_device_get_action(dev), "remove") != 0) +- udev_device_update_db(dev); +- else +- udev_device_delete_db(dev); +-exit: ++out: + return err; + } + +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 3aee15b..3b4eb5f 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2003-2009 Kay Sievers ++ * Copyright (C) 2003-2010 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 +@@ -416,7 +416,6 @@ int udev_node_remove(struct udev_device *dev) + const char *devnode; + char partitionname[UTIL_PATH_SIZE]; + struct stat stats; +- struct udev_device *dev_check; + int err = 0; + int num; + +@@ -436,15 +435,21 @@ int udev_node_remove(struct udev_device *dev) + return -1; + } + +- dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); +- if (dev_check != NULL && stats.st_rdev == udev_device_get_devnum(dev_check)) { +- /* do not remove device node if the same sys-device is re-created in the meantime */ +- info(udev, "keeping device node of existing device'%s'\n", devnode); ++ if (udev_device_get_ignore_remove(dev)) { ++ info(udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev)); + } else { +- info(udev, "removing device node '%s'\n", devnode); +- err = util_unlink_secure(udev, devnode); ++ struct udev_device *dev_check; ++ ++ dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); ++ if (dev_check != NULL && stats.st_rdev == udev_device_get_devnum(dev_check)) { ++ /* do not remove device node if the same sys-device is re-created in the meantime */ ++ info(udev, "keeping device node of existing device'%s'\n", devnode); ++ } else { ++ info(udev, "removing device node '%s'\n", devnode); ++ err = util_unlink_secure(udev, devnode); ++ } ++ udev_device_unref(dev_check); + } +- udev_device_unref(dev_check); + + num = udev_device_get_num_fake_partitions(dev); + if (num > 0) { +@@ -459,6 +464,7 @@ int udev_node_remove(struct udev_device *dev) + util_unlink_secure(udev, partitionname); + } + } ++ + util_delete_path(udev, devnode); + return err; + } +diff --git a/udev/udev.h b/udev/udev.h +index 555eae6..2b9bbec 100644 +--- a/udev/udev.h ++++ b/udev/udev.h +@@ -1,6 +1,6 @@ + /* + * Copyright (C) 2003 Greg Kroah-Hartman +- * Copyright (C) 2003-2008 Kay Sievers ++ * Copyright (C) 2003-2010 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 +@@ -35,6 +35,7 @@ struct udev_event { + struct udev *udev; + struct udev_device *dev; + struct udev_device *dev_parent; ++ struct udev_device *dev_db; + char *name; + char *tmp_node; + char *program_result; +-- +1.6.6 + diff --git a/0055-allow-IMPORT-db-KEY.patch b/0055-allow-IMPORT-db-KEY.patch new file mode 100644 index 0000000..4a81bfa --- /dev/null +++ b/0055-allow-IMPORT-db-KEY.patch @@ -0,0 +1,109 @@ +From 5539f624e18e948e4e3a1f0d9f5d25de9c8fd8b8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 15:58:05 +0200 +Subject: [PATCH 55/65] allow IMPORT{db}="KEY" + +--- + udev/udev-rules.c | 26 +++++++++++++++++++++++++- + udev/udev.xml | 8 ++++++++ + 2 files changed, 33 insertions(+), 1 deletions(-) + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 60daad5..c4a2724 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2003-2009 Kay Sievers ++ * Copyright (C) 2003-2010 Kay Sievers + * Copyright (C) 2008 Alan Jenkins + * + * This program is free software: you can redistribute it and/or modify +@@ -141,6 +141,7 @@ enum token_type { + TK_M_PROGRAM, /* val */ + TK_M_IMPORT_FILE, /* val */ + TK_M_IMPORT_PROG, /* val */ ++ TK_M_IMPORT_DB, /* val */ + TK_M_IMPORT_PARENT, /* val */ + TK_M_RESULT, /* val */ + TK_M_MAX, +@@ -271,6 +272,7 @@ static const char *token_str(enum token_type type) + [TK_M_PROGRAM] = "M PROGRAM", + [TK_M_IMPORT_FILE] = "M IMPORT_FILE", + [TK_M_IMPORT_PROG] = "M IMPORT_PROG", ++ [TK_M_IMPORT_DB] = "M IMPORT_DB", + [TK_M_IMPORT_PARENT] = "M IMPORT_PARENT", + [TK_M_RESULT] = "M RESULT", + [TK_M_MAX] = "M MAX", +@@ -337,6 +339,7 @@ static void dump_token(struct udev_rules *rules, struct token *token) + case TK_M_PROGRAM: + case TK_M_IMPORT_FILE: + case TK_M_IMPORT_PROG: ++ case TK_M_IMPORT_DB: + case TK_M_IMPORT_PARENT: + case TK_M_RESULT: + case TK_A_NAME: +@@ -1001,6 +1004,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, + case TK_M_PROGRAM: + case TK_M_IMPORT_FILE: + case TK_M_IMPORT_PROG: ++ case TK_M_IMPORT_DB: + case TK_M_IMPORT_PARENT: + case TK_M_RESULT: + case TK_A_OWNER: +@@ -1379,6 +1383,9 @@ static int add_rule(struct udev_rules *rules, char *line, + } else if (attr != NULL && strstr(attr, "file")) { + dbg(rules->udev, "IMPORT will be included as file\n"); + rule_add_key(&rule_tmp, TK_M_IMPORT_FILE, op, value, NULL); ++ } else if (attr != NULL && strstr(attr, "db")) { ++ dbg(rules->udev, "IMPORT will include db values\n"); ++ rule_add_key(&rule_tmp, TK_M_IMPORT_DB, op, value, NULL); + } else if (attr != NULL && strstr(attr, "parent")) { + dbg(rules->udev, "IMPORT will include the parent values\n"); + rule_add_key(&rule_tmp, TK_M_IMPORT_PARENT, op, value, NULL); +@@ -2288,6 +2295,23 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + goto nomatch; + break; + } ++ case TK_M_IMPORT_DB: ++ { ++ const char *key = &rules->buf[cur->key.value_off]; ++ const char *value; ++ ++ value = udev_device_get_property_value(event->dev_db, key); ++ if (value != NULL) { ++ struct udev_list_entry *entry; ++ ++ entry = udev_device_add_property(event->dev, key, value); ++ udev_list_entry_set_flags(entry, 1); ++ } else { ++ if (cur->key.op != OP_NOMATCH) ++ goto nomatch; ++ } ++ break; ++ } + case TK_M_IMPORT_PARENT: + { + char import[UTIL_PATH_SIZE]; +diff --git a/udev/udev.xml b/udev/udev.xml +index b6c5933..175cdbe 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -399,6 +399,14 @@ + + + ++ ++ ++ Import a single property specified as the assigned value from the ++ current device database. This works only if the database is already populated ++ by an earlier event. ++ ++ ++ + + + Import the stored keys from the parent device by reading +-- +1.6.6 + diff --git a/0056-usb-db-remove-double.patch b/0056-usb-db-remove-double.patch new file mode 100644 index 0000000..0f0d612 --- /dev/null +++ b/0056-usb-db-remove-double.patch @@ -0,0 +1,31 @@ +From 86dc9133f88e8690aa89ccb5a240ff915b1fb69f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 16:10:05 +0200 +Subject: [PATCH 56/65] usb-db: remove double '/' + +--- + extras/usb-db/usb-db.c | 4 +--- + 1 files changed, 1 insertions(+), 3 deletions(-) + +diff --git a/extras/usb-db/usb-db.c b/extras/usb-db/usb-db.c +index db1f843..fe563c2 100644 +--- a/extras/usb-db/usb-db.c ++++ b/extras/usb-db/usb-db.c +@@ -1,5 +1,3 @@ +-/*-*- linux-c -*-*/ +- + /* + * Copyright (C) 2009 Lennart Poettering + * +@@ -223,7 +221,7 @@ int main(int argc, char*argv[]) { + if (!(udev = udev_new())) + goto finish; + +- if (asprintf(&sp, "%s/%s", udev_get_sys_path(udev), argv[1]) < 0) { ++ if (asprintf(&sp, "%s%s", udev_get_sys_path(udev), argv[1]) < 0) { + fprintf(stderr, "Failed to allocate sysfs path.\n"); + goto finish; + } +-- +1.6.6 + diff --git a/0057-replace-add-change-with-remove.patch b/0057-replace-add-change-with-remove.patch new file mode 100644 index 0000000..6ea9548 --- /dev/null +++ b/0057-replace-add-change-with-remove.patch @@ -0,0 +1,276 @@ +From 4b06c409350d26af5e6ace0f368d01b80d75438e Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 16:52:41 +0200 +Subject: [PATCH 57/65] replace "add|change" with "!remove" + +--- + extras/cdrom_id/60-cdrom_id.rules | 2 +- + extras/edd_id/61-persistent-storage-edd.rules | 2 +- + extras/fstab_import/79-fstab_import.rules | 2 +- + extras/hid2hci/70-hid2hci.rules | 2 +- + extras/keymap/95-keyboard-force-release.rules | 2 +- + extras/keymap/95-keymap.rules | 2 +- + extras/udev-acl/70-acl.rules | 2 +- + extras/udev-acl/udev-acl.c | 6 ++---- + extras/v4l_id/60-persistent-v4l.rules | 2 +- + rules/rules.d/60-persistent-alsa.rules | 2 +- + rules/rules.d/60-persistent-input.rules | 2 +- + rules/rules.d/60-persistent-serial.rules | 2 +- + rules/rules.d/60-persistent-storage-tape.rules | 2 +- + rules/rules.d/60-persistent-storage.rules | 2 +- + rules/rules.d/75-net-description.rules | 2 +- + rules/rules.d/75-tty-description.rules | 2 +- + rules/suse/64-device-mapper.rules | 2 +- + udev/udev-rules.c | 5 ++--- + udev/udevd.c | 2 +- + 19 files changed, 21 insertions(+), 24 deletions(-) + +diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules +index 811c4aa..16b3af9 100644 +--- a/extras/cdrom_id/60-cdrom_id.rules ++++ b/extras/cdrom_id/60-cdrom_id.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="cdrom_end" ++ACTION=="remove", GOTO="cdrom_end" + SUBSYSTEM!="block", GOTO="cdrom_end" + KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" + ENV{DEVTYPE}!="disk", GOTO="cdrom_end" +diff --git a/extras/edd_id/61-persistent-storage-edd.rules b/extras/edd_id/61-persistent-storage-edd.rules +index 54ae086..1ab1be3 100644 +--- a/extras/edd_id/61-persistent-storage-edd.rules ++++ b/extras/edd_id/61-persistent-storage-edd.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="persistent_storage_edd_end" ++ACTION=="remove", GOTO="persistent_storage_edd_end" + SUBSYSTEM!="block", GOTO="persistent_storage_edd_end" + KERNEL!="sd*|hd*|cciss*", GOTO="persistent_storage_edd_end" + +diff --git a/extras/fstab_import/79-fstab_import.rules b/extras/fstab_import/79-fstab_import.rules +index 2adfe04..2ded7d3 100644 +--- a/extras/fstab_import/79-fstab_import.rules ++++ b/extras/fstab_import/79-fstab_import.rules +@@ -1,2 +1,2 @@ +-ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem|other", IMPORT="fstab_import $name $links mapper/$env{DM_NAME}" ++ACTION!="remove", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem|other", IMPORT="fstab_import $name $links mapper/$env{DM_NAME}" + +diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules +index 01ff30d..0687c8a 100644 +--- a/extras/hid2hci/70-hid2hci.rules ++++ b/extras/hid2hci/70-hid2hci.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="hid2hci_end" ++ACTION=="remove", GOTO="hid2hci_end" + SUBSYSTEM!="usb", GOTO="hid2hci_end" + + # Variety of Dell Bluetooth devices - match on a mouse device that is +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index f0e1ab8..b973614 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -11,7 +11,7 @@ + # /lib/udev/keymap -i /dev/input/eventX + # on a Linux vt to find out. + +-ACTION!="add|change", GOTO="force_release_end" ++ACTION=="remove", GOTO="force_release_end" + SUBSYSTEM!="serio", GOTO="force_release_end" + KERNEL!="serio*", GOTO="force_release_end" + DRIVER!="atkbd", GOTO="force_release_end" +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index dd58453..2f41cb4 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -5,7 +5,7 @@ + # a file name (in /lib/udev/keymaps), which has to contain scancode/keyname + # pairs. + +-ACTION!="add|change", GOTO="keyboard_end" ++ACTION=="remove", GOTO="keyboard_end" + SUBSYSTEM!="input", GOTO="keyboard_end" + KERNEL!="event*", GOTO="keyboard_end" + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index fde2656..5b00bf8 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -4,7 +4,7 @@ + # udev-acl of this udev release and may be replaced at any time. + + ENV{MAJOR}=="", GOTO="acl_end" +-ACTION!="add|change", GOTO="acl_apply" ++ACTION=="remove", GOTO="acl_apply" + + # PTP/MTP protocol devices, cameras, portable media players + SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" +diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c +index c070fcc..ce51590 100644 +--- a/extras/udev-acl/udev-acl.c ++++ b/extras/udev-acl/udev-acl.c +@@ -353,12 +353,10 @@ int main (int argc, char* argv[]) + + switch (option) { + case 'a': +- if (strcmp(optarg, "add") == 0 || strcmp(optarg, "change") == 0) +- action = ACTION_ADD; +- else if (strcmp(optarg, "remove") == 0) ++ if (strcmp(optarg, "remove") == 0) + action = ACTION_REMOVE; + else +- goto out; ++ action = ACTION_ADD; + break; + case 'D': + device = optarg; +diff --git a/extras/v4l_id/60-persistent-v4l.rules b/extras/v4l_id/60-persistent-v4l.rules +index a342a71..b6e1313 100644 +--- a/extras/v4l_id/60-persistent-v4l.rules ++++ b/extras/v4l_id/60-persistent-v4l.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="persistent_v4l_end" ++ACTION=="remove", GOTO="persistent_v4l_end" + SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" + ENV{MAJOR}=="", GOTO="persistent_v4l_end" + +diff --git a/rules/rules.d/60-persistent-alsa.rules b/rules/rules.d/60-persistent-alsa.rules +index a5206fd..39a3652 100644 +--- a/rules/rules.d/60-persistent-alsa.rules ++++ b/rules/rules.d/60-persistent-alsa.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="persistent_alsa_end" ++ACTION=="remove", GOTO="persistent_alsa_end" + SUBSYSTEM!="sound", GOTO="persistent_alsa_end" + KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end" + +diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules +index 1ea4431..634c4db 100644 +--- a/rules/rules.d/60-persistent-input.rules ++++ b/rules/rules.d/60-persistent-input.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="persistent_input_end" ++ACTION=="remove", GOTO="persistent_input_end" + SUBSYSTEM!="input", GOTO="persistent_input_end" + KERNEL=="input[0-9]*", GOTO="persistent_input_end" + +diff --git a/rules/rules.d/60-persistent-serial.rules b/rules/rules.d/60-persistent-serial.rules +index 351b385..3e1a565 100644 +--- a/rules/rules.d/60-persistent-serial.rules ++++ b/rules/rules.d/60-persistent-serial.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="persistent_serial_end" ++ACTION=="remove", GOTO="persistent_serial_end" + SUBSYSTEM!="tty", GOTO="persistent_serial_end" + KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end" + +diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules +index 968528d..833ef94 100644 +--- a/rules/rules.d/60-persistent-storage-tape.rules ++++ b/rules/rules.d/60-persistent-storage-tape.rules +@@ -2,7 +2,7 @@ + + # persistent storage links: /dev/tape/{by-id,by-path} + +-ACTION!="add|change", GOTO="persistent_storage_tape_end" ++ACTION=="remove", GOTO="persistent_storage_tape_end" + + # type 8 devices are "Medium Changers" + SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 89041a9..d9f8003 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -6,7 +6,7 @@ + # forward scsi device event to corresponding block device + ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" + +-ACTION!="add|change", GOTO="persistent_storage_end" ++ACTION=="remove", GOTO="persistent_storage_end" + SUBSYSTEM!="block", GOTO="persistent_storage_end" + + # skip rules for inappropriate block devices +diff --git a/rules/rules.d/75-net-description.rules b/rules/rules.d/75-net-description.rules +index 1c4c401..490fcce 100644 +--- a/rules/rules.d/75-net-description.rules ++++ b/rules/rules.d/75-net-description.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="net_end" ++ACTION=="remove", GOTO="net_end" + SUBSYSTEM!="net", GOTO="net_end" + + SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p" +diff --git a/rules/rules.d/75-tty-description.rules b/rules/rules.d/75-tty-description.rules +index ac868ad..c2980cf 100644 +--- a/rules/rules.d/75-tty-description.rules ++++ b/rules/rules.d/75-tty-description.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add|change", GOTO="tty_end" ++ACTION=="remove", GOTO="tty_end" + SUBSYSTEM!="tty", GOTO="tty_end" + + SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p" +diff --git a/rules/suse/64-device-mapper.rules b/rules/suse/64-device-mapper.rules +index 34e3307..12cae35 100644 +--- a/rules/suse/64-device-mapper.rules ++++ b/rules/suse/64-device-mapper.rules +@@ -1,7 +1,7 @@ + # do not edit this file, it will be overwritten on update + + KERNEL!="dm-*", GOTO="device_mapper_end" +-ACTION!="add|change", GOTO="device_mapper_end" ++ACTION=="remove", GOTO="device_mapper_end" + + IMPORT{program}="/sbin/dmsetup export -j%M -m%m" + ENV{DM_NAME}!="?*", GOTO="device_mapper_end" +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index c4a2724..0361f68 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -2055,13 +2055,12 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + struct token *cur; + struct token *rule; + enum escape_type esc = ESCAPE_UNSET; +- int can_set_name; ++ bool can_set_name; + + if (rules->tokens == NULL) + return -1; + +- can_set_name = ((strcmp(udev_device_get_action(event->dev), "add") == 0 || +- strcmp(udev_device_get_action(event->dev), "change") == 0) && ++ can_set_name = ((strcmp(udev_device_get_action(event->dev), "remove") != 0) && + (major(udev_device_get_devnum(event->dev)) > 0 || + strcmp(udev_device_get_subsystem(event->dev), "net") == 0)); + +diff --git a/udev/udevd.c b/udev/udevd.c +index fe3352c..c27b4cd 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -168,7 +168,7 @@ static void event_queue_delete(struct event *event) + udev_list_node_remove(&event->node); + + /* mark as failed, if "add" event returns non-zero */ +- if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "add") == 0) ++ if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "remove") != 0) + udev_queue_export_device_failed(udev_queue_export, event->dev); + else + udev_queue_export_device_finished(udev_queue_export, event->dev); +-- +1.6.6 + diff --git a/0058-update-NEWS.patch b/0058-update-NEWS.patch new file mode 100644 index 0000000..3f1774b --- /dev/null +++ b/0058-update-NEWS.patch @@ -0,0 +1,30 @@ +From 5c4c389bba6cf986a8dd743b43017c2f60604cca Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 17:00:16 +0200 +Subject: [PATCH 58/65] update NEWS + +--- + NEWS | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/NEWS b/NEWS +index a4d46d7..687bcdf 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,6 +2,13 @@ udev 152 + ======== + Bugfixes. + ++All "add|change" matches are replaced by "!remove" in the rules and ++in the udev logic. All types of events will update possible symlinks ++and permissions, only "remove" is handled special now. ++ ++The modem mode switch extra was removed and the external usb_modeswitch ++program should be used instead. ++ + New and fixed keymaps. + + udev 151 +-- +1.6.6 + diff --git a/0059-log-info-only-if-we-actually-delete-the-node.patch b/0059-log-info-only-if-we-actually-delete-the-node.patch new file mode 100644 index 0000000..eb54add --- /dev/null +++ b/0059-log-info-only-if-we-actually-delete-the-node.patch @@ -0,0 +1,27 @@ +From 3ba7e651ad36e4f37d9bfffadb638bc2ef784217 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 17:13:37 +0200 +Subject: [PATCH 59/65] log info only if we actually delete the node + +--- + udev/udev-event.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev/udev-event.c b/udev/udev-event.c +index c3a8281..26939e7 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -646,9 +646,9 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + struct stat stats; + char filename[UTIL_PATH_SIZE]; + +- info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev)); + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); + if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) { ++ info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev)); + util_unlink_secure(event->udev, filename); + util_delete_path(event->udev, filename); + } +-- +1.6.6 + diff --git a/0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch b/0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch new file mode 100644 index 0000000..17c2b1f --- /dev/null +++ b/0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch @@ -0,0 +1,49 @@ +From 236fae6cf1a619a92174efdf84cd7d91e7d4348d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 12 Apr 2010 17:56:32 +0200 +Subject: [PATCH 60/65] udevadm: trigger - switch default action from "add" to "change" + +--- + NEWS | 3 +++ + udev/udevadm-trigger.c | 4 ++-- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/NEWS b/NEWS +index 687bcdf..c5fbbe1 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,6 +2,9 @@ udev 152 + ======== + Bugfixes. + ++"udevadm trigger" default to "change" events now, instead of "add" ++events. ++ + All "add|change" matches are replaced by "!remove" in the rules and + in the udev logic. All types of events will update possible symlinks + and permissions, only "remove" is handled special now. +diff --git a/udev/udevadm-trigger.c b/udev/udevadm-trigger.c +index dbcaee3..03aa534 100644 +--- a/udev/udevadm-trigger.c ++++ b/udev/udevadm-trigger.c +@@ -110,7 +110,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) + TYPE_SUBSYSTEMS, + TYPE_FAILED, + } device_type = TYPE_DEVICES; +- const char *action = "add"; ++ const char *action = "change"; + struct udev_enumerate *udev_enumerate; + int rc = 0; + +@@ -184,7 +184,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) + " subsystems sys subsystems and drivers\n" + " failed trigger only the events which have been\n" + " marked as failed during a previous run\n" +- " --action= event action value, default is \"add\"\n" ++ " --action= event action value, default is \"change\"\n" + " --subsystem-match= trigger devices from a matching subsystem\n" + " --subsystem-nomatch= exclude devices from a matching subsystem\n" + " --attr-match=]> trigger devices with a matching attribute\n" +-- +1.6.6 + diff --git a/0061-remove-all_partitions-option.patch b/0061-remove-all_partitions-option.patch new file mode 100644 index 0000000..cd1d372 --- /dev/null +++ b/0061-remove-all_partitions-option.patch @@ -0,0 +1,363 @@ +From 1f084fe5811ce251d516a8022f8c7c27d0ef1f53 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 13 Apr 2010 08:52:48 +0200 +Subject: [PATCH 61/65] remove "all_partitions" option + +We can not predict the major/minor of non-existing devices: + $ grep . /sys/class/block/sd*/dev + /sys/class/block/sda1/dev:259:524288 + /sys/class/block/sda2/dev:259:262144 + /sys/class/block/sda3/dev:259:786432 + /sys/class/block/sda4/dev:259:131072 + /sys/class/block/sda/dev:259:0 + /sys/class/block/sdb/dev:259:655360 + /sys/class/block/sdc/dev:259:393216 + +If this functionality is still needed for some broken hardware, it needs to be +solved with a tool not part of the udev package. Because such option is unreliable +and unsafe to use. +--- + NEWS | 7 +++++- + libudev/libudev-device-private.c | 4 --- + libudev/libudev-device.c | 17 --------------- + libudev/libudev-private.h | 2 - + test/udev-test.pl | 43 -------------------------------------- + udev/udev-node.c | 35 ------------------------------ + udev/udev-rules.c | 23 -------------------- + udev/udev.xml | 8 ------- + udev/udevadm-info.c | 4 --- + 9 files changed, 6 insertions(+), 137 deletions(-) + +diff --git a/NEWS b/NEWS +index c5fbbe1..c422eaa 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,9 +2,14 @@ udev 152 + ======== + Bugfixes. + +-"udevadm trigger" default to "change" events now, instead of "add" ++"udevadm trigger" defaults to "change" events now, instead of "add" + events. + ++The option "all_partitons" was removed from udev. This should not be ++needed for usual hardware. Udev can not safely make assumptions ++about non-exixting partition major/minor numbers, and therefore no ++longer provide such an unreliable and unsafe option. ++ + All "add|change" matches are replaced by "!remove" in the rules and + in the udev logic. All types of events will update possible symlinks + and permissions, only "remove" is handled special now. +diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c +index 1bcf441..19c20b2 100644 +--- a/libudev/libudev-device-private.c ++++ b/libudev/libudev-device-private.c +@@ -41,8 +41,6 @@ int udev_device_update_db(struct udev_device *udev_device) + udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) + if (udev_list_entry_get_flags(list_entry)) + goto file; +- if (udev_device_get_num_fake_partitions(udev_device) != 0) +- goto file; + if (udev_device_get_ignore_remove(udev_device)) + goto file; + if (udev_device_get_devlink_priority(udev_device) != 0) +@@ -95,8 +93,6 @@ file: + fprintf(f, "L:%i\n", udev_device_get_devlink_priority(udev_device)); + if (udev_device_get_event_timeout(udev_device) >= 0) + fprintf(f, "T:%i\n", udev_device_get_event_timeout(udev_device)); +- if (udev_device_get_num_fake_partitions(udev_device) != 0) +- fprintf(f, "A:%i\n", udev_device_get_num_fake_partitions(udev_device)); + if (udev_device_get_ignore_remove(udev_device)) + fprintf(f, "R:%i\n", udev_device_get_ignore_remove(udev_device)); + if (udev_device_get_watch_handle(udev_device) >= 0) +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 410f75b..75cc61c 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -63,7 +63,6 @@ struct udev_device { + unsigned long long int seqnum; + int event_timeout; + int timeout; +- int num_fake_partitions; + int devlink_priority; + int refcount; + dev_t devnum; +@@ -284,9 +283,6 @@ int udev_device_read_db(struct udev_device *udev_device) + case 'T': + udev_device_set_event_timeout(udev_device, atoi(val)); + break; +- case 'A': +- udev_device_set_num_fake_partitions(udev_device, atoi(val)); +- break; + case 'R': + udev_device_set_ignore_remove(udev_device, atoi(val)); + break; +@@ -1425,19 +1421,6 @@ int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) + return 0; + } + +-int udev_device_get_num_fake_partitions(struct udev_device *udev_device) +-{ +- if (!udev_device->info_loaded) +- device_load_info(udev_device); +- return udev_device->num_fake_partitions; +-} +- +-int udev_device_set_num_fake_partitions(struct udev_device *udev_device, int num) +-{ +- udev_device->num_fake_partitions = num; +- return 0; +-} +- + int udev_device_get_devlink_priority(struct udev_device *udev_device) + { + if (!udev_device->info_loaded) +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 3f2861f..bf9e923 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -93,8 +93,6 @@ int udev_device_get_event_timeout(struct udev_device *udev_device); + int udev_device_set_event_timeout(struct udev_device *udev_device, int event_timeout); + int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum); + int udev_device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum); +-int udev_device_get_num_fake_partitions(struct udev_device *udev_device); +-int udev_device_set_num_fake_partitions(struct udev_device *udev_device, int num); + int udev_device_get_devlink_priority(struct udev_device *udev_device); + int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio); + int udev_device_get_ignore_remove(struct udev_device *udev_device); +diff --git a/test/udev-test.pl b/test/udev-test.pl +index aeca948..4633d6b 100755 +--- a/test/udev-test.pl ++++ b/test/udev-test.pl +@@ -493,16 +493,6 @@ SUBSYSTEMS=="foo", PROGRAM=="/bin/echo -n foo-%b", SYMLINK+="%c" + EOF + }, + { +- desc => "create all possible partitions", +- subsys => "block", +- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +- exp_name => "sda15" , +- exp_majorminor => "8:15", +- rules => < "sysfs parent hierarchy", + subsys => "tty", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", +@@ -988,28 +978,6 @@ SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n node link1 link2 link3 link4", RESULT + EOF + }, + { +- desc => "all_partitions, option-only rule", +- subsys => "block", +- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +- exp_name => "node6", +- exp_rem_error => "yes", +- rules => < "all_partitions, option-only rule (fail on partition)", +- subsys => "block", +- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", +- exp_name => "node6", +- exp_add_error => "yes", +- rules => < "ignore remove event test", + subsys => "block", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +@@ -1020,17 +988,6 @@ SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OPTIONS="ignore_remove" + EOF + }, + { +- desc => "ignore remove event test (with all partitions)", +- subsys => "block", +- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +- exp_name => "sda14", +- exp_rem_error => "yes", +- option => "clean", +- rules => < "SUBSYSTEM match test", + subsys => "block", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 3b4eb5f..4492c2e 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -365,8 +365,6 @@ void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev + int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) + { + struct udev *udev = udev_device_get_udev(dev); +- int i; +- int num; + struct udev_list_entry *list_entry; + int err = 0; + +@@ -380,23 +378,6 @@ int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) + goto exit; + } + +- /* create all_partitions if requested */ +- num = udev_device_get_num_fake_partitions(dev); +- if (num > 0) { +- info(udev, "creating device partition nodes '%s[1-%i]'\n", udev_device_get_devnode(dev), num); +- for (i = 1; i <= num; i++) { +- char partitionname[UTIL_PATH_SIZE]; +- dev_t part_devnum; +- +- snprintf(partitionname, sizeof(partitionname), "%s%d", +- udev_device_get_devnode(dev), i); +- partitionname[sizeof(partitionname)-1] = '\0'; +- part_devnum = makedev(major(udev_device_get_devnum(dev)), +- minor(udev_device_get_devnum(dev)) + i); +- udev_node_mknod(dev, partitionname, part_devnum, mode, uid, gid); +- } +- } +- + /* create/update symlinks, add symlinks to name index */ + udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) { + if (udev_list_entry_get_flags(list_entry)) +@@ -414,10 +395,8 @@ int udev_node_remove(struct udev_device *dev) + struct udev *udev = udev_device_get_udev(dev); + struct udev_list_entry *list_entry; + const char *devnode; +- char partitionname[UTIL_PATH_SIZE]; + struct stat stats; + int err = 0; +- int num; + + /* remove/update symlinks, remove symlinks from name index */ + udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) +@@ -451,20 +430,6 @@ int udev_node_remove(struct udev_device *dev) + udev_device_unref(dev_check); + } + +- num = udev_device_get_num_fake_partitions(dev); +- if (num > 0) { +- int i; +- +- info(udev, "removing all_partitions '%s[1-%i]'\n", devnode, num); +- if (num > 255) +- return -1; +- for (i = 1; i <= num; i++) { +- snprintf(partitionname, sizeof(partitionname), "%s%d", devnode, i); +- partitionname[sizeof(partitionname)-1] = '\0'; +- util_unlink_secure(udev, partitionname); +- } +- } +- + util_delete_path(udev, devnode); + return err; + } +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 0361f68..a4a86b6 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -196,7 +196,6 @@ struct token { + mode_t mode; + uid_t uid; + gid_t gid; +- int num_fake_part; + int devlink_prio; + int event_timeout; + int watch; +@@ -371,9 +370,6 @@ static void dump_token(struct udev_rules *rules, struct token *token) + case TK_A_INOTIFY_WATCH: + dbg(rules->udev, "%s %u\n", token_str(type), token->key.watch); + break; +- case TK_A_NUM_FAKE_PART: +- dbg(rules->udev, "%s %u\n", token_str(type), token->key.num_fake_part); +- break; + case TK_A_DEVLINK_PRIO: + dbg(rules->udev, "%s %s %u\n", token_str(type), operation_str(op), token->key.devlink_prio); + break; +@@ -1469,12 +1465,6 @@ static int add_rule(struct udev_rules *rules, char *line, + rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL); + attr = get_key_attribute(rules->udev, key + sizeof("NAME")-1); + if (attr != NULL) { +- if (strstr(attr, "all_partitions") != NULL) { +- int num = DEFAULT_FAKE_PARTITIONS_COUNT; +- +- dbg(rules->udev, "creation of partition nodes requested\n"); +- rule_add_key(&rule_tmp, TK_A_NUM_FAKE_PART, 0, NULL, &num); +- } + if (strstr(attr, "ignore_remove") != NULL) { + dbg(rules->udev, "remove event should be ignored\n"); + rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL); +@@ -1576,12 +1566,6 @@ static int add_rule(struct udev_rules *rules, char *line, + else if (strncmp(pos, "replace", strlen("replace")) == 0) + rule_add_key(&rule_tmp, TK_A_STRING_ESCAPE_REPLACE, 0, NULL, NULL); + } +- if (strstr(value, "all_partitions") != NULL) { +- int num = DEFAULT_FAKE_PARTITIONS_COUNT; +- +- rule_add_key(&rule_tmp, TK_A_NUM_FAKE_PART, 0, NULL, &num); +- dbg(rules->udev, "creation of partition nodes requested\n"); +- } + pos = strstr(value, "nowatch"); + if (pos != NULL) { + const int off = 0; +@@ -2331,13 +2315,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + case TK_A_STRING_ESCAPE_REPLACE: + esc = ESCAPE_REPLACE; + break; +- case TK_A_NUM_FAKE_PART: +- if (strcmp(udev_device_get_subsystem(event->dev), "block") != 0) +- break; +- if (udev_device_get_sysnum(event->dev) != NULL) +- break; +- udev_device_set_num_fake_partitions(event->dev, cur->key.num_fake_part); +- break; + case TK_A_INOTIFY_WATCH: + event->inotify_watch = cur->key.watch; + break; +diff --git a/udev/udev.xml b/udev/udev.xml +index 175cdbe..9275e0f 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -450,14 +450,6 @@ + + + +- +- +- 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. +- +- +- + + + Number of seconds an event will wait for operations to finish, before it +diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c +index 4711409..c57620f 100644 +--- a/udev/udevadm-info.c ++++ b/udev/udevadm-info.c +@@ -142,10 +142,6 @@ static void print_record(struct udev_device *device) + if (i != 0) + printf("L: %i\n", i); + +- i = udev_device_get_num_fake_partitions(device); +- if (i != 0) +- printf("A: %u\n", i); +- + i = udev_device_get_ignore_remove(device); + if (i != 0) + printf("R: %u\n", i); +-- +1.6.6 + diff --git a/0062-cdrom_id-Fix-uninitialized-variables.patch b/0062-cdrom_id-Fix-uninitialized-variables.patch new file mode 100644 index 0000000..1caba57 --- /dev/null +++ b/0062-cdrom_id-Fix-uninitialized-variables.patch @@ -0,0 +1,131 @@ +From 816e6bf0fb0849d03696a4b4ec2334e35e819425 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 13 Apr 2010 10:49:24 +0200 +Subject: [PATCH 62/65] cdrom_id: Fix uninitialized variables + +In cases where cdrom_id does not go through the entire code path and one of the +probing functions returns -1 or exits early, the remaining variables were never +initialized. This caused effects like "phantom" audio CDs on empty drives, or +bogus data like ID_CDROM_MEDIA_TRACK_COUNT=22528. + +Initialize the variables right away to avoid that. + +Bug-Ubuntu: https://launchpad.net/bugs/559723 +--- + extras/cdrom_id/cdrom_id.c | 96 ++++++++++++++++++++++---------------------- + 1 files changed, 48 insertions(+), 48 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 894a890..db3867c 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -56,57 +56,57 @@ static void log_fn(struct udev *udev, int priority, + } + + /* device info */ +-static unsigned int cd_cd_rom; +-static unsigned int cd_cd_r; +-static unsigned int cd_cd_rw; +-static unsigned int cd_dvd_rom; +-static unsigned int cd_dvd_r; +-static unsigned int cd_dvd_rw; +-static unsigned int cd_dvd_ram; +-static unsigned int cd_dvd_plus_r; +-static unsigned int cd_dvd_plus_rw; +-static unsigned int cd_dvd_plus_r_dl; +-static unsigned int cd_dvd_plus_rw_dl; +-static unsigned int cd_bd; +-static unsigned int cd_bd_r; +-static unsigned int cd_bd_re; +-static unsigned int cd_hddvd; +-static unsigned int cd_hddvd_r; +-static unsigned int cd_hddvd_rw; +-static unsigned int cd_mo; +-static unsigned int cd_mrw; +-static unsigned int cd_mrw_w; ++static unsigned int cd_cd_rom = 0; ++static unsigned int cd_cd_r = 0; ++static unsigned int cd_cd_rw = 0; ++static unsigned int cd_dvd_rom = 0; ++static unsigned int cd_dvd_r = 0; ++static unsigned int cd_dvd_rw = 0; ++static unsigned int cd_dvd_ram = 0; ++static unsigned int cd_dvd_plus_r = 0; ++static unsigned int cd_dvd_plus_rw = 0; ++static unsigned int cd_dvd_plus_r_dl = 0; ++static unsigned int cd_dvd_plus_rw_dl = 0; ++static unsigned int cd_bd = 0; ++static unsigned int cd_bd_r = 0; ++static unsigned int cd_bd_re = 0; ++static unsigned int cd_hddvd = 0; ++static unsigned int cd_hddvd_r = 0; ++static unsigned int cd_hddvd_rw = 0; ++static unsigned int cd_mo = 0; ++static unsigned int cd_mrw = 0; ++static unsigned int cd_mrw_w = 0; + + /* media info */ +-static unsigned int cd_media; +-static unsigned int cd_media_cd_rom; +-static unsigned int cd_media_cd_r; +-static unsigned int cd_media_cd_rw; +-static unsigned int cd_media_dvd_rom; +-static unsigned int cd_media_dvd_r; +-static unsigned int cd_media_dvd_rw; +-static unsigned int cd_media_dvd_ram; +-static unsigned int cd_media_dvd_plus_r; +-static unsigned int cd_media_dvd_plus_rw; +-static unsigned int cd_media_dvd_plus_r_dl; +-static unsigned int cd_media_dvd_plus_rw_dl; +-static unsigned int cd_media_bd; +-static unsigned int cd_media_bd_r; +-static unsigned int cd_media_bd_re; +-static unsigned int cd_media_hddvd; +-static unsigned int cd_media_hddvd_r; +-static unsigned int cd_media_hddvd_rw; +-static unsigned int cd_media_mo; +-static unsigned int cd_media_mrw; +-static unsigned int cd_media_mrw_w; +- +-static const char *cd_media_state; +-static unsigned int cd_media_session_next; +-static unsigned int cd_media_session_count; +-static unsigned int cd_media_track_count; +-static unsigned int cd_media_track_count_data; +-static unsigned int cd_media_track_count_audio; +-static unsigned long long int cd_media_session_last_offset; ++static unsigned int cd_media = 0; ++static unsigned int cd_media_cd_rom = 0; ++static unsigned int cd_media_cd_r = 0; ++static unsigned int cd_media_cd_rw = 0; ++static unsigned int cd_media_dvd_rom = 0; ++static unsigned int cd_media_dvd_r = 0; ++static unsigned int cd_media_dvd_rw = 0; ++static unsigned int cd_media_dvd_ram = 0; ++static unsigned int cd_media_dvd_plus_r = 0; ++static unsigned int cd_media_dvd_plus_rw = 0; ++static unsigned int cd_media_dvd_plus_r_dl = 0; ++static unsigned int cd_media_dvd_plus_rw_dl = 0; ++static unsigned int cd_media_bd = 0; ++static unsigned int cd_media_bd_r = 0; ++static unsigned int cd_media_bd_re = 0; ++static unsigned int cd_media_hddvd = 0; ++static unsigned int cd_media_hddvd_r = 0; ++static unsigned int cd_media_hddvd_rw = 0; ++static unsigned int cd_media_mo = 0; ++static unsigned int cd_media_mrw = 0; ++static unsigned int cd_media_mrw_w = 0; ++ ++static const char *cd_media_state = NULL; ++static unsigned int cd_media_session_next = 0; ++static unsigned int cd_media_session_count = 0; ++static unsigned int cd_media_track_count = 0; ++static unsigned int cd_media_track_count_data = 0; ++static unsigned int cd_media_track_count_audio = 0; ++static unsigned long long int cd_media_session_last_offset = 0; + + #define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) + #define SK(errcode) (((errcode) >> 16) & 0xF) +-- +1.6.6 + diff --git a/0063-rules-call-modprobe-on-all-events-but-remove.patch b/0063-rules-call-modprobe-on-all-events-but-remove.patch new file mode 100644 index 0000000..97ce921 --- /dev/null +++ b/0063-rules-call-modprobe-on-all-events-but-remove.patch @@ -0,0 +1,36 @@ +From 06ba47d8336c6d017a67d11f480341db07b9bc4b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 13 Apr 2010 12:12:08 +0200 +Subject: [PATCH 63/65] rules: call modprobe on all events but "remove" + +--- + rules/rules.d/50-udev-default.rules | 3 --- + rules/rules.d/80-drivers.rules | 2 +- + 2 files changed, 1 insertions(+), 4 deletions(-) + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index a5f0823..7e09ea1 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -112,6 +112,3 @@ SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc" + KERNEL=="mmtimer", MODE="0644" + KERNEL=="rflash[0-9]*", MODE="0400" + KERNEL=="rrom[0-9]*", MODE="0400" +- +-# do not delete static device nodes +-ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove" +diff --git a/rules/rules.d/80-drivers.rules b/rules/rules.d/80-drivers.rules +index d0485e1..86eb918 100644 +--- a/rules/rules.d/80-drivers.rules ++++ b/rules/rules.d/80-drivers.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-ACTION!="add", GOTO="drivers_end" ++ACTION=="remove", GOTO="drivers_end" + + DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -b $env{MODALIAS}" + SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -b tifm_sd" +-- +1.6.6 + diff --git a/0064-remove-ignore_remove-option.patch b/0064-remove-ignore_remove-option.patch new file mode 100644 index 0000000..a1e8046 --- /dev/null +++ b/0064-remove-ignore_remove-option.patch @@ -0,0 +1,273 @@ +From a89d342dfb45b54e29381af9dbc495bbb2b057af Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 13 Apr 2010 12:45:38 +0200 +Subject: [PATCH 64/65] remove "ignore_remove" option + +--- + NEWS | 6 ++++++ + libudev/libudev-device-private.c | 4 ---- + libudev/libudev-device.c | 17 ----------------- + libudev/libudev-private.h | 2 -- + test/udev-test.pl | 10 ---------- + udev/udev-node.c | 38 ++++++++++++++++++++++---------------- + udev/udev-rules.c | 14 -------------- + udev/udev.xml | 7 ------- + udev/udevadm-info.c | 4 ---- + 9 files changed, 28 insertions(+), 74 deletions(-) + +diff --git a/NEWS b/NEWS +index c422eaa..ea5c19d 100644 +--- a/NEWS ++++ b/NEWS +@@ -10,6 +10,12 @@ needed for usual hardware. Udev can not safely make assumptions + about non-exixting partition major/minor numbers, and therefore no + longer provide such an unreliable and unsafe option. + ++The option "ignore_remove" was removed from udev. With devtmpfs ++udev passed control over device nodes to the kernel. This option ++should no longer be needed, or can not work as advertised. Neither ++udev nor the kernel will remove device nodes which are copied from ++the /lib/udev/devices/ directory. ++ + All "add|change" matches are replaced by "!remove" in the rules and + in the udev logic. All types of events will update possible symlinks + and permissions, only "remove" is handled special now. +diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c +index 19c20b2..5e4381e 100644 +--- a/libudev/libudev-device-private.c ++++ b/libudev/libudev-device-private.c +@@ -41,8 +41,6 @@ int udev_device_update_db(struct udev_device *udev_device) + udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) + if (udev_list_entry_get_flags(list_entry)) + goto file; +- if (udev_device_get_ignore_remove(udev_device)) +- goto file; + if (udev_device_get_devlink_priority(udev_device) != 0) + goto file; + if (udev_device_get_event_timeout(udev_device) >= 0) +@@ -93,8 +91,6 @@ file: + fprintf(f, "L:%i\n", udev_device_get_devlink_priority(udev_device)); + if (udev_device_get_event_timeout(udev_device) >= 0) + fprintf(f, "T:%i\n", udev_device_get_event_timeout(udev_device)); +- if (udev_device_get_ignore_remove(udev_device)) +- fprintf(f, "R:%i\n", udev_device_get_ignore_remove(udev_device)); + if (udev_device_get_watch_handle(udev_device) >= 0) + fprintf(f, "W:%i\n", udev_device_get_watch_handle(udev_device)); + udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) { +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 75cc61c..b3b6a63 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -75,7 +75,6 @@ struct udev_device { + unsigned int envp_uptodate:1; + unsigned int driver_set:1; + unsigned int info_loaded:1; +- unsigned int ignore_remove:1; + }; + + struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) +@@ -283,9 +282,6 @@ int udev_device_read_db(struct udev_device *udev_device) + case 'T': + udev_device_set_event_timeout(udev_device, atoi(val)); + break; +- case 'R': +- udev_device_set_ignore_remove(udev_device, atoi(val)); +- break; + case 'E': + udev_device_add_property_from_string(udev_device, val); + break; +@@ -1434,19 +1430,6 @@ int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio) + return 0; + } + +-int udev_device_get_ignore_remove(struct udev_device *udev_device) +-{ +- if (!udev_device->info_loaded) +- device_load_info(udev_device); +- return udev_device->ignore_remove; +-} +- +-int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore) +-{ +- udev_device->ignore_remove = ignore; +- return 0; +-} +- + int udev_device_get_watch_handle(struct udev_device *udev_device) + { + if (!udev_device->info_loaded) +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index bf9e923..8dc469e 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -95,8 +95,6 @@ int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum); + int udev_device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum); + int udev_device_get_devlink_priority(struct udev_device *udev_device); + int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio); +-int udev_device_get_ignore_remove(struct udev_device *udev_device); +-int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore); + int udev_device_get_watch_handle(struct udev_device *udev_device); + int udev_device_set_watch_handle(struct udev_device *udev_device, int handle); + void udev_device_set_info_loaded(struct udev_device *device); +diff --git a/test/udev-test.pl b/test/udev-test.pl +index 4633d6b..a4d3a72 100755 +--- a/test/udev-test.pl ++++ b/test/udev-test.pl +@@ -978,16 +978,6 @@ SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n node link1 link2 link3 link4", RESULT + EOF + }, + { +- desc => "ignore remove event test", +- subsys => "block", +- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +- exp_name => "node", +- exp_rem_error => "yes", +- rules => < "SUBSYSTEM match test", + subsys => "block", + devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 4492c2e..34de268 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -396,6 +396,8 @@ int udev_node_remove(struct udev_device *dev) + struct udev_list_entry *list_entry; + const char *devnode; + struct stat stats; ++ struct udev_device *dev_check; ++ char filename[UTIL_PATH_SIZE]; + int err = 0; + + /* remove/update symlinks, remove symlinks from name index */ +@@ -404,32 +406,36 @@ int udev_node_remove(struct udev_device *dev) + + devnode = udev_device_get_devnode(dev); + if (devnode == NULL) +- return 0; ++ goto out; ++ + if (stat(devnode, &stats) != 0) { + info(udev, "device node '%s' not found\n", devnode); +- return 0; ++ goto out; + } ++ + if (stats.st_rdev != udev_device_get_devnum(dev)) { + info(udev, "device node '%s' points to a different device, skip removal\n", devnode); +- return -1; ++ err = -1; ++ goto out; + } + +- if (udev_device_get_ignore_remove(dev)) { +- info(udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev)); +- } else { +- struct udev_device *dev_check; +- +- dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); +- if (dev_check != NULL && stats.st_rdev == udev_device_get_devnum(dev_check)) { +- /* do not remove device node if the same sys-device is re-created in the meantime */ +- info(udev, "keeping device node of existing device'%s'\n", devnode); +- } else { +- info(udev, "removing device node '%s'\n", devnode); +- err = util_unlink_secure(udev, devnode); +- } ++ dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); ++ if (dev_check != NULL) { ++ /* do not remove device node if the same sys-device is re-created in the meantime */ ++ info(udev, "keeping device node of existing device'%s'\n", devnode); + udev_device_unref(dev_check); ++ goto out; ++ } ++ ++ util_strscpyl(filename, sizeof(filename), LIBEXECDIR "/devices", &devnode[strlen(udev_get_dev_path(udev))], NULL); ++ if (stat(filename, &stats) == 0 || stats.st_rdev == udev_device_get_devnum(dev)) { ++ info(udev, "static device entry found '%s', skip removal\n", devnode); ++ goto out; + } + ++ info(udev, "removing device node '%s'\n", devnode); ++ err = util_unlink_secure(udev, devnode); + util_delete_path(udev, devnode); ++out: + return err; + } +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index a4a86b6..4f18aca 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1463,13 +1463,6 @@ static int add_rule(struct udev_rules *rules, char *line, + err(rules->udev, "NAME=\"%%k\" is superfluous and breaks " + "kernel supplied names, please remove it from %s:%u\n", filename, lineno); + rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL); +- attr = get_key_attribute(rules->udev, key + sizeof("NAME")-1); +- if (attr != NULL) { +- if (strstr(attr, "ignore_remove") != NULL) { +- dbg(rules->udev, "remove event should be ignored\n"); +- rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL); +- } +- } + } + rule_tmp.rule.rule.flags = 1; + continue; +@@ -1540,10 +1533,6 @@ static int add_rule(struct udev_rules *rules, char *line, + if (strcmp(key, "OPTIONS") == 0) { + const char *pos; + +- if (strstr(value, "ignore_remove") != NULL) { +- dbg(rules->udev, "remove event should be ignored\n"); +- rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL); +- } + pos = strstr(value, "link_priority="); + if (pos != NULL) { + int prio = atoi(&pos[strlen("link_priority=")]); +@@ -2501,9 +2490,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + case TK_A_EVENT_TIMEOUT: + udev_device_set_event_timeout(event->dev, cur->key.event_timeout); + break; +- case TK_A_IGNORE_REMOVE: +- udev_device_set_ignore_remove(event->dev, 1); +- break; + case TK_A_ATTR: + { + const char *key_name = &rules->buf[cur->key.attr_off]; +diff --git a/udev/udev.xml b/udev/udev.xml +index 9275e0f..dce953d 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -436,13 +436,6 @@ + Rule and device options: + + +- +- +- Do not remove the device node when the device goes away. This may be +- useful as a workaround for broken device drivers. +- +- +- + + + Specify the priority of the created symlinks. Devices with higher +diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c +index c57620f..5f6209a 100644 +--- a/udev/udevadm-info.c ++++ b/udev/udevadm-info.c +@@ -142,10 +142,6 @@ static void print_record(struct udev_device *device) + if (i != 0) + printf("L: %i\n", i); + +- i = udev_device_get_ignore_remove(device); +- if (i != 0) +- printf("R: %u\n", i); +- + i = udev_device_get_watch_handle(device); + if (i >= 0) + printf("W: %u\n", i); +-- +1.6.6 + diff --git a/0065-cdrom_id-Fix-uninitialized-buffers.patch b/0065-cdrom_id-Fix-uninitialized-buffers.patch new file mode 100644 index 0000000..310e3c6 --- /dev/null +++ b/0065-cdrom_id-Fix-uninitialized-buffers.patch @@ -0,0 +1,82 @@ +From 2b861dc92757b9a3214c2b8e9d8b1c3f3c162391 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 13 Apr 2010 15:25:48 +0200 +Subject: [PATCH 65/65] cdrom_id: Fix uninitialized buffers + +Commit 5c6954f is actually a no-op, since static variables are already zero'ed +by default anyway (but we keep it for clarity). The real difference was that a +build with -O0 wor while a build with -O2 didn't. + +Turns out that some ioctls do not actually touch the result buffer in some +cases, so we need to zero the result buffers to avoid interpreting random da as +CD properties. + +https://launchpad.net/bugs/559723 +https://launchpad.net/bugs/561585 +--- + extras/cdrom_id/cdrom_id.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index db3867c..b6797cd 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -237,6 +237,7 @@ static int cd_inquiry(struct udev *udev, int fd) { + unsigned char inq[128]; + int err; + ++ memset (inq, 0, sizeof (inq)); + scsi_cmd_set(udev, &sc, 0, 0x12); + scsi_cmd_set(udev, &sc, 4, 36); + scsi_cmd_set(udev, &sc, 5, 0); +@@ -265,6 +266,7 @@ static int cd_profiles(struct udev *udev, int fd) + unsigned int i; + int err; + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x46); + scsi_cmd_set(udev, &sc, 1, 0); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -282,6 +284,7 @@ static int cd_profiles(struct udev *udev, int fd) + return -1; + } + ++ memset (profiles, 0, sizeof (profiles)); + scsi_cmd_set(udev, &sc, 0, 0x46); + scsi_cmd_set(udev, &sc, 1, 1); + scsi_cmd_set(udev, &sc, 6, len >> 16); +@@ -440,6 +443,7 @@ static int cd_media_info(struct udev *udev, int fd) + }; + int err; + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x51); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); +@@ -472,6 +476,7 @@ static int cd_media_toc(struct udev *udev, int fd) + unsigned char *p; + int err; + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, 1); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -493,6 +498,7 @@ static int cd_media_toc(struct udev *udev, int fd) + if (len < 8) + return 0; + ++ memset (toc, 0, sizeof (toc)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, header[2]); /* First Track/Session Number */ + scsi_cmd_set(udev, &sc, 7, len >> 8); +@@ -520,6 +526,7 @@ static int cd_media_toc(struct udev *udev, int fd) + cd_media_track_count_audio++; + } + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ + scsi_cmd_set(udev, &sc, 8, 12); +-- +1.6.6 + diff --git a/udev.spec b/udev.spec index 8a5922e..60d3651 100644 --- a/udev.spec +++ b/udev.spec @@ -12,7 +12,8 @@ Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +#Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-151.tar.bz2 Patch1: 0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch Patch2: 0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch @@ -176,7 +177,7 @@ This package contains the header and pkg-config files for developing glib-based applications using libudev functionality. %prep -%setup -q +%setup -q -n udev-151 %patch1 -p1 -b .git1 %patch2 -p1 -b .git2 From 196847799595575e07149f9273709af7cdd769f7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Apr 2010 16:27:29 +0000 Subject: [PATCH 554/640] - more cdrom_id bugfixes for buggy cdroms and CD burning (bug #577659, bug#566535, bug#561003, bug#481346, bug#580812) --- ...on-mounted-optical-media-with-O_EXCL.patch | 58 ++++++++ 0048-cdrom_id-remove-debugging-code.patch | 24 ++++ ...id-retry-to-open-the-device-if-EBUSY.patch | 53 +++++++ ...m_id-check-mount-state-in-retry-loop.patch | 55 ++++++++ ...set-ID_CDROM-regardless-if-we-can-ru.patch | 18 +++ ...cdrom_id-Fix-uninitialized-variables.patch | 131 ++++++++++++++++++ 0065-cdrom_id-Fix-uninitialized-buffers.patch | 82 +++++++++++ udev-145-cdrom.patch | 117 ---------------- ...cde11bc77af49a96245b8a8a0f2b583a344c.patch | 2 +- udev.spec | 31 ++++- 10 files changed, 448 insertions(+), 123 deletions(-) create mode 100644 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch create mode 100644 0048-cdrom_id-remove-debugging-code.patch create mode 100644 0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch create mode 100644 0050-cdrom_id-check-mount-state-in-retry-loop.patch create mode 100644 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch create mode 100644 0062-cdrom_id-Fix-uninitialized-variables.patch create mode 100644 0065-cdrom_id-Fix-uninitialized-buffers.patch delete mode 100644 udev-145-cdrom.patch diff --git a/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch new file mode 100644 index 0000000..0d34327 --- /dev/null +++ b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch @@ -0,0 +1,58 @@ +From 38a3cde11bc77af49a96245b8a8a0f2b583a344c Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 18 Mar 2010 11:14:32 +0100 +Subject: [PATCH 35/65] cdrom_id: open non-mounted optical media with O_EXCL + +This should prevent confusing drives during CD burning sessions. Based +on a patch from Harald Hoyer. +--- + extras/cdrom_id/cdrom_id.c | 26 +++++++++++++++++++++++++- + 1 files changed, 25 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 2380b15..e485768 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -112,6 +112,30 @@ static unsigned long long int cd_media_session_last_offset; + #define ASC(errcode) (((errcode) >> 8) & 0xFF) + #define ASCQ(errcode) ((errcode) & 0xFF) + ++static int is_mounted(const char *device) ++{ ++ struct stat statbuf; ++ FILE *fp; ++ int maj, min; ++ int mounted = 0; ++ ++ if (stat(device, &statbuf) < 0) ++ return -ENODEV; ++ ++ fp = fopen("/proc/self/mountinfo", "r"); ++ if (fp == NULL) ++ return -ENOSYS; ++ while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { ++ printf("got %u %u\n", maj, min); ++ if (makedev(maj, min) == statbuf.st_rdev) { ++ mounted = 1; ++ break; ++ } ++ } ++ fclose(fp); ++ return mounted; ++} ++ + static void info_scsi_cmd_err(struct udev *udev, char *cmd, int err) + { + if (err == -1) { +@@ -568,7 +592,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- fd = open(node, O_RDONLY | O_NONBLOCK); ++ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); +-- +1.6.6 + diff --git a/0048-cdrom_id-remove-debugging-code.patch b/0048-cdrom_id-remove-debugging-code.patch new file mode 100644 index 0000000..57a4e07 --- /dev/null +++ b/0048-cdrom_id-remove-debugging-code.patch @@ -0,0 +1,24 @@ +From 36a07a8c34a4cff5ad2bbb6e0fdfed49e8191661 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 7 Apr 2010 09:23:46 +0200 +Subject: [PATCH 48/65] cdrom_id: remove debugging code + +--- + extras/cdrom_id/cdrom_id.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index e485768..036ef28 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -126,7 +126,6 @@ static int is_mounted(const char *device) + if (fp == NULL) + return -ENOSYS; + while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { +- printf("got %u %u\n", maj, min); + if (makedev(maj, min) == statbuf.st_rdev) { + mounted = 1; + break; +-- +1.6.6 + diff --git a/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch b/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch new file mode 100644 index 0000000..f7e6b27 --- /dev/null +++ b/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch @@ -0,0 +1,53 @@ +From cccfffbe04c01be12fb42cb12f3f7aa5e2a22dd4 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 7 Apr 2010 09:24:25 +0200 +Subject: [PATCH 49/65] cdrom_id: retry to open the device, if EBUSY + +We might fight about the device with polling processes, or other +users who probe the device. Retry a few times if the other one goes +away in the meantime. + +Based on a patch from Harald Hoyer. +--- + extras/cdrom_id/cdrom_id.c | 18 +++++++++++++++++- + 1 files changed, 17 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 036ef28..7c9f8cc 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -591,7 +592,22 @@ int main(int argc, char *argv[]) + goto exit; + } + +- fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); ++ if (is_mounted(node)) { ++ fd = open(node, O_RDONLY|O_NONBLOCK); ++ } else { ++ int cnt; ++ struct timespec duration; ++ ++ srand((unsigned int)getpid()); ++ for (cnt = 40; cnt > 0; cnt--) { ++ fd = open(node, O_RDONLY|O_NONBLOCK|O_EXCL); ++ if (fd >= 0 || errno != EBUSY) ++ break; ++ duration.tv_sec = 0; ++ duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); ++ nanosleep(&duration, NULL); ++ } ++ } + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); + fprintf(stderr, "unable to open '%s'\n", node); +-- +1.6.6 + diff --git a/0050-cdrom_id-check-mount-state-in-retry-loop.patch b/0050-cdrom_id-check-mount-state-in-retry-loop.patch new file mode 100644 index 0000000..b4fb62b --- /dev/null +++ b/0050-cdrom_id-check-mount-state-in-retry-loop.patch @@ -0,0 +1,55 @@ +From d45c8c8b01c99180f15e24b22f7cf81eaf3cdd1b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 7 Apr 2010 11:32:22 +0200 +Subject: [PATCH 50/65] cdrom_id: check mount state in retry loop + +Based on a patch from Harald Hoyer. +--- + extras/cdrom_id/cdrom_id.c | 22 +++++++++------------- + 1 files changed, 9 insertions(+), 13 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 7c9f8cc..894a890 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -547,6 +547,7 @@ int main(int argc, char *argv[]) + const char *node = NULL; + int export = 0; + int fd = -1; ++ int cnt; + int rc = 0; + + udev = udev_new(); +@@ -592,21 +593,16 @@ int main(int argc, char *argv[]) + goto exit; + } + +- if (is_mounted(node)) { +- fd = open(node, O_RDONLY|O_NONBLOCK); +- } else { +- int cnt; ++ srand((unsigned int)getpid()); ++ for (cnt = 20; cnt > 0; cnt--) { + struct timespec duration; + +- srand((unsigned int)getpid()); +- for (cnt = 40; cnt > 0; cnt--) { +- fd = open(node, O_RDONLY|O_NONBLOCK|O_EXCL); +- if (fd >= 0 || errno != EBUSY) +- break; +- duration.tv_sec = 0; +- duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); +- nanosleep(&duration, NULL); +- } ++ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); ++ if (fd >= 0 || errno != EBUSY) ++ break; ++ duration.tv_sec = 0; ++ duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); ++ nanosleep(&duration, NULL); + } + if (fd < 0) { + info(udev, "unable to open '%s'\n", node); +-- +1.6.6 + diff --git a/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch b/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch new file mode 100644 index 0000000..4b8520a --- /dev/null +++ b/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch @@ -0,0 +1,18 @@ +diff -up udev-145/extras/cdrom_id/60-cdrom_id.rules.git51 udev-145/extras/cdrom_id/60-cdrom_id.rules +--- udev-145/extras/cdrom_id/60-cdrom_id.rules.git51 2009-04-17 00:27:40.000000000 +0200 ++++ udev-145/extras/cdrom_id/60-cdrom_id.rules 2010-04-13 18:25:47.000000000 +0200 +@@ -1,5 +1,12 @@ + # do not edit this file, it will be overwritten on update + + # import optical drive properties +-ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \ +- KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]|xvd*", IMPORT{program}="cdrom_id --export $tempnode" ++ACTION!="add|change", GOTO="cdrom_end" ++SUBSYSTEM!="block", GOTO="cdrom_end" ++KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" ++ENV{DEVTYPE}!="disk", GOTO="cdrom_end" ++ ++ENV{ID_CDROM}="1" ++IMPORT{program}="cdrom_id --export $tempnode" ++ ++LABEL="cdrom_end" diff --git a/0062-cdrom_id-Fix-uninitialized-variables.patch b/0062-cdrom_id-Fix-uninitialized-variables.patch new file mode 100644 index 0000000..1caba57 --- /dev/null +++ b/0062-cdrom_id-Fix-uninitialized-variables.patch @@ -0,0 +1,131 @@ +From 816e6bf0fb0849d03696a4b4ec2334e35e819425 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 13 Apr 2010 10:49:24 +0200 +Subject: [PATCH 62/65] cdrom_id: Fix uninitialized variables + +In cases where cdrom_id does not go through the entire code path and one of the +probing functions returns -1 or exits early, the remaining variables were never +initialized. This caused effects like "phantom" audio CDs on empty drives, or +bogus data like ID_CDROM_MEDIA_TRACK_COUNT=22528. + +Initialize the variables right away to avoid that. + +Bug-Ubuntu: https://launchpad.net/bugs/559723 +--- + extras/cdrom_id/cdrom_id.c | 96 ++++++++++++++++++++++---------------------- + 1 files changed, 48 insertions(+), 48 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 894a890..db3867c 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -56,57 +56,57 @@ static void log_fn(struct udev *udev, int priority, + } + + /* device info */ +-static unsigned int cd_cd_rom; +-static unsigned int cd_cd_r; +-static unsigned int cd_cd_rw; +-static unsigned int cd_dvd_rom; +-static unsigned int cd_dvd_r; +-static unsigned int cd_dvd_rw; +-static unsigned int cd_dvd_ram; +-static unsigned int cd_dvd_plus_r; +-static unsigned int cd_dvd_plus_rw; +-static unsigned int cd_dvd_plus_r_dl; +-static unsigned int cd_dvd_plus_rw_dl; +-static unsigned int cd_bd; +-static unsigned int cd_bd_r; +-static unsigned int cd_bd_re; +-static unsigned int cd_hddvd; +-static unsigned int cd_hddvd_r; +-static unsigned int cd_hddvd_rw; +-static unsigned int cd_mo; +-static unsigned int cd_mrw; +-static unsigned int cd_mrw_w; ++static unsigned int cd_cd_rom = 0; ++static unsigned int cd_cd_r = 0; ++static unsigned int cd_cd_rw = 0; ++static unsigned int cd_dvd_rom = 0; ++static unsigned int cd_dvd_r = 0; ++static unsigned int cd_dvd_rw = 0; ++static unsigned int cd_dvd_ram = 0; ++static unsigned int cd_dvd_plus_r = 0; ++static unsigned int cd_dvd_plus_rw = 0; ++static unsigned int cd_dvd_plus_r_dl = 0; ++static unsigned int cd_dvd_plus_rw_dl = 0; ++static unsigned int cd_bd = 0; ++static unsigned int cd_bd_r = 0; ++static unsigned int cd_bd_re = 0; ++static unsigned int cd_hddvd = 0; ++static unsigned int cd_hddvd_r = 0; ++static unsigned int cd_hddvd_rw = 0; ++static unsigned int cd_mo = 0; ++static unsigned int cd_mrw = 0; ++static unsigned int cd_mrw_w = 0; + + /* media info */ +-static unsigned int cd_media; +-static unsigned int cd_media_cd_rom; +-static unsigned int cd_media_cd_r; +-static unsigned int cd_media_cd_rw; +-static unsigned int cd_media_dvd_rom; +-static unsigned int cd_media_dvd_r; +-static unsigned int cd_media_dvd_rw; +-static unsigned int cd_media_dvd_ram; +-static unsigned int cd_media_dvd_plus_r; +-static unsigned int cd_media_dvd_plus_rw; +-static unsigned int cd_media_dvd_plus_r_dl; +-static unsigned int cd_media_dvd_plus_rw_dl; +-static unsigned int cd_media_bd; +-static unsigned int cd_media_bd_r; +-static unsigned int cd_media_bd_re; +-static unsigned int cd_media_hddvd; +-static unsigned int cd_media_hddvd_r; +-static unsigned int cd_media_hddvd_rw; +-static unsigned int cd_media_mo; +-static unsigned int cd_media_mrw; +-static unsigned int cd_media_mrw_w; +- +-static const char *cd_media_state; +-static unsigned int cd_media_session_next; +-static unsigned int cd_media_session_count; +-static unsigned int cd_media_track_count; +-static unsigned int cd_media_track_count_data; +-static unsigned int cd_media_track_count_audio; +-static unsigned long long int cd_media_session_last_offset; ++static unsigned int cd_media = 0; ++static unsigned int cd_media_cd_rom = 0; ++static unsigned int cd_media_cd_r = 0; ++static unsigned int cd_media_cd_rw = 0; ++static unsigned int cd_media_dvd_rom = 0; ++static unsigned int cd_media_dvd_r = 0; ++static unsigned int cd_media_dvd_rw = 0; ++static unsigned int cd_media_dvd_ram = 0; ++static unsigned int cd_media_dvd_plus_r = 0; ++static unsigned int cd_media_dvd_plus_rw = 0; ++static unsigned int cd_media_dvd_plus_r_dl = 0; ++static unsigned int cd_media_dvd_plus_rw_dl = 0; ++static unsigned int cd_media_bd = 0; ++static unsigned int cd_media_bd_r = 0; ++static unsigned int cd_media_bd_re = 0; ++static unsigned int cd_media_hddvd = 0; ++static unsigned int cd_media_hddvd_r = 0; ++static unsigned int cd_media_hddvd_rw = 0; ++static unsigned int cd_media_mo = 0; ++static unsigned int cd_media_mrw = 0; ++static unsigned int cd_media_mrw_w = 0; ++ ++static const char *cd_media_state = NULL; ++static unsigned int cd_media_session_next = 0; ++static unsigned int cd_media_session_count = 0; ++static unsigned int cd_media_track_count = 0; ++static unsigned int cd_media_track_count_data = 0; ++static unsigned int cd_media_track_count_audio = 0; ++static unsigned long long int cd_media_session_last_offset = 0; + + #define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) + #define SK(errcode) (((errcode) >> 16) & 0xF) +-- +1.6.6 + diff --git a/0065-cdrom_id-Fix-uninitialized-buffers.patch b/0065-cdrom_id-Fix-uninitialized-buffers.patch new file mode 100644 index 0000000..310e3c6 --- /dev/null +++ b/0065-cdrom_id-Fix-uninitialized-buffers.patch @@ -0,0 +1,82 @@ +From 2b861dc92757b9a3214c2b8e9d8b1c3f3c162391 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 13 Apr 2010 15:25:48 +0200 +Subject: [PATCH 65/65] cdrom_id: Fix uninitialized buffers + +Commit 5c6954f is actually a no-op, since static variables are already zero'ed +by default anyway (but we keep it for clarity). The real difference was that a +build with -O0 wor while a build with -O2 didn't. + +Turns out that some ioctls do not actually touch the result buffer in some +cases, so we need to zero the result buffers to avoid interpreting random da as +CD properties. + +https://launchpad.net/bugs/559723 +https://launchpad.net/bugs/561585 +--- + extras/cdrom_id/cdrom_id.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index db3867c..b6797cd 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -237,6 +237,7 @@ static int cd_inquiry(struct udev *udev, int fd) { + unsigned char inq[128]; + int err; + ++ memset (inq, 0, sizeof (inq)); + scsi_cmd_set(udev, &sc, 0, 0x12); + scsi_cmd_set(udev, &sc, 4, 36); + scsi_cmd_set(udev, &sc, 5, 0); +@@ -265,6 +266,7 @@ static int cd_profiles(struct udev *udev, int fd) + unsigned int i; + int err; + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x46); + scsi_cmd_set(udev, &sc, 1, 0); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -282,6 +284,7 @@ static int cd_profiles(struct udev *udev, int fd) + return -1; + } + ++ memset (profiles, 0, sizeof (profiles)); + scsi_cmd_set(udev, &sc, 0, 0x46); + scsi_cmd_set(udev, &sc, 1, 1); + scsi_cmd_set(udev, &sc, 6, len >> 16); +@@ -440,6 +443,7 @@ static int cd_media_info(struct udev *udev, int fd) + }; + int err; + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x51); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); +@@ -472,6 +476,7 @@ static int cd_media_toc(struct udev *udev, int fd) + unsigned char *p; + int err; + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, 1); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -493,6 +498,7 @@ static int cd_media_toc(struct udev *udev, int fd) + if (len < 8) + return 0; + ++ memset (toc, 0, sizeof (toc)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, header[2]); /* First Track/Session Number */ + scsi_cmd_set(udev, &sc, 7, len >> 8); +@@ -520,6 +526,7 @@ static int cd_media_toc(struct udev *udev, int fd) + cd_media_track_count_audio++; + } + ++ memset (header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ + scsi_cmd_set(udev, &sc, 8, 12); +-- +1.6.6 + diff --git a/udev-145-cdrom.patch b/udev-145-cdrom.patch deleted file mode 100644 index 636b9b0..0000000 --- a/udev-145-cdrom.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 6ea763b..3ffd023 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -511,6 +511,92 @@ static int cd_media_toc(struct udev *udev, int fd) - return 0; - } - -+ -+ -+/* -+ * Linux mangles spaces in mount points by changing them to an octal string -+ * of '\040'. So lets scan the mount point and fix it up by replacing all -+ * occurrences off '\0##' with the ASCII value of 0##. Requires a writable -+ * string as input as we mangle in place. Some of this was taken from the -+ * util-linux package. -+ */ -+#define octalify(a) ((a) & 7) -+#define tooctal(s) (64*octalify(s[1]) + 8*octalify(s[2]) + octalify(s[3])) -+#define isoctal(a) (((a) & ~7) == '0') -+static char *DeMangleMount(char *s) -+{ -+ char *tmp = s; -+ while ((tmp = strchr(tmp, '\\')) != NULL) { -+ if (isoctal(tmp[1]) && isoctal(tmp[2]) && isoctal(tmp[3])) { -+ tmp[0] = tooctal(tmp); -+ memmove(tmp+1, tmp+4, strlen(tmp)-3); -+ } -+ ++tmp; -+ } -+ return s; -+} -+ -+/* -+ * Get major and minor device numbers for a device file name, so we -+ * can check for duplicate devices. -+ */ -+static int GetMajorMinor(const char *name, int *maj, int *min) -+{ -+ struct stat sstat; -+ if (maj) *maj = -1; -+ if (min) *min = -1; -+ if (stat(name, &sstat) == -1) -+ return -1; -+ if (! S_ISBLK(sstat.st_mode) && ! S_ISCHR(sstat.st_mode)) -+ return -1; -+ if (maj) *maj = major(sstat.st_rdev); -+ if (min) *min = minor(sstat.st_rdev); -+ return 0; -+} -+ -+ -+/* -+ * See if device has been mounted by looking in mount table. If so, set -+ * device name and mount point name, and return 1, otherwise return 0. -+ */ -+static int MountedDevice(const char *name) -+{ -+ FILE *fp; -+ char line[1024]; -+ char s1[1024]; -+ char s2[1024]; -+ int rc; -+ -+ int maj; -+ int min; -+ -+ GetMajorMinor(name, &maj, &min); -+ -+ fp = fopen("/proc/mounts", "r"); -+ if (fp == NULL) -+ { -+ return 0; -+ } -+ -+ while (fgets(line, sizeof(line), fp) != 0) { -+ rc = sscanf(line, "%1023s %1023s", s1, s2); -+ if (rc >= 2) { -+ int mtabmaj, mtabmin; -+ DeMangleMount(s1); -+ DeMangleMount(s2); -+ GetMajorMinor(s1, &mtabmaj, &mtabmin); -+ if (((strcmp(s1, name) == 0) || (strcmp(s2, name) == 0)) || -+ ((maj != -1) && (maj == mtabmaj) && (min == mtabmin))) { -+ fclose(fp); -+ return 1; -+ } -+ } -+ } -+ fclose(fp); -+ return 0; -+} -+ -+ - int main(int argc, char *argv[]) - { - struct udev *udev; -@@ -568,7 +654,7 @@ int main(int argc, char *argv[]) - goto exit; - } - -- fd = open(node, O_RDONLY | O_NONBLOCK); -+ fd = open(node, O_RDONLY | O_NONBLOCK | (MountedDevice(node) ? 0 : O_EXCL)); - if (fd < 0) { - info(udev, "unable to open '%s'\n", node); - fprintf(stderr, "unable to open '%s'\n", node); -@@ -577,6 +663,10 @@ int main(int argc, char *argv[]) - } - info(udev, "probing: '%s'\n", node); - -+ /* do not autoclose */ -+ ioctl(fd, CDROM_CLEAR_OPTIONS, CDO_AUTO_CLOSE); -+ ioctl(fd, CDROM_SET_OPTIONS, CDO_USE_FFLAGS); -+ - /* same data as original cdrom_id */ - if (cd_capability_compat(udev, fd) < 0) { - rc = 1; diff --git a/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch b/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch index 525098e..94e3c53 100644 --- a/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch +++ b/udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch @@ -31,7 +31,7 @@ index 2380b15..e485768 100644 + if (fp == NULL) + return -ENOSYS; + while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { -+ printf("got %u %u\n", maj, min); ++ /* printf("got %u %u\n", maj, min); */ + if (makedev(maj, min) == statbuf.st_rdev) { + mounted = 1; + break; diff --git a/udev.spec b/udev.spec index f61bcfe..37e0e9b 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -28,10 +28,18 @@ Patch8: udev-145-hid2hci-backport.patch Patch9: udev-145-modem-modeswitch.patch Patch10: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch Patch11: udev-145-rename.patch -Patch12: udev.git-38a3cde11bc77af49a96245b8a8a0f2b583a344c.patch Patch13: udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch Patch14: udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch -Patch15: udev-147-virtio.patch + +Patch35: 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch +Patch48: 0048-cdrom_id-remove-debugging-code.patch +Patch49: 0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch +Patch50: 0050-cdrom_id-check-mount-state-in-retry-loop.patch +Patch51: 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch +Patch62: 0062-cdrom_id-Fix-uninitialized-variables.patch +Patch65: 0065-cdrom_id-Fix-uninitialized-buffers.patch + +Patch101: udev-147-virtio.patch Source1: start_udev Source3: udev-post.init @@ -133,10 +141,19 @@ glib-based applications using libudev functionality. %patch9 -p1 -b .modesw %patch10 -p1 %patch11 -p1 -%patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 + +%patch35 -p1 -b .git35 +%patch48 -p1 -b .git48 +%patch49 -p1 -b .git49 +%patch50 -p1 -b .git50 +%patch51 -p1 -b .git51 +%patch62 -p1 -b .git62 +%patch65 -p1 -b .git65 + +%patch101 -p1 + autoreconf -i automake @@ -379,6 +396,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Apr 13 2010 Harald Hoyer 145-20 +- more cdrom_id bugfixes for buggy cdroms and CD burning + (bug #577659, bug#566535, bug#561003, bug#481346, bug#580812) + * Mon Mar 22 2010 Harald Hoyer 145-19 - only correct the timestamp, if UTC=="no" From 31132ed7f529b2baa23b80286c9665fe3e993f53 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 27 Apr 2010 10:29:33 +0000 Subject: [PATCH 555/640] - version 153 --- .cvsignore | 2 +- 0001-configure.ac-version-bump.patch | 34 + ...or-reporting-on-missing-firmware-fil.patch | 43 - ...eymap-Add-Dell-Inspiron-1011-Mini-10.patch | 26 - ...buffer-overrun-risk-in-readlink-call.patch | 32 + ...ix-brightness-keys-on-MSI-Wind-U-100.patch | 37 - 0003-more-readlink-buffer-size-handling.patch | 113 + ...ort-for-Gateway-AOA110-AOA150-clones.patch | 29 - ...-from-ignore_remove-and-all_partitio.patch | 73 + 0005-fix-previous-commit.patch | 33 + 0005-keymap-Fix-LG-X110.patch | 64 - ...-not-releasing-for-Pegatron-platform.patch | 29 + ...e-for-volume-keys-on-Dell-Studio-155.patch | 55 - 0007-keymap-Add-Toshiba-Satellite-M30X.patch | 55 - ...export-db-remove-watch-handle-export.patch | 27 + ...ve-event-filtering-and-device-enumer.patch | 1706 +++++++++++++ ...udev_monitor_set_receive_buffer_size.patch | 58 - 0009-all-to-match-against-a-given-TAG.patch | 101 + ...monitor-increase-netlink-buffer-size.patch | 37 - 0010-libudev-bump-minor-version.patch | 29 - ...ag-instead-of-a-property-to-mark-dev.patch | 125 + ...mand-loading-logic-for-db-and-uevent.patch | 49 + ...sted-and-broken-commit-to-set-buffer.patch | 25 - 0012-configure.ac-version-bump.patch | 37 - 0012-use-the-usual-TAG-TAG-logic.patch | 129 + ...-old-tags-when-configuration-changes.patch | 168 ++ ...amsung-Q210-P210-force-release-quirk.patch | 30 - ...tsu-Amilo-1848-u-force-release-quirk.patch | 53 - ...ULL-in-udev_device_get_tags_list_ent.patch | 39 + ...er-size-when-advancing-past-NUL-byte.patch | 29 - 0015-export-tag-functions.patch | 24 + ...ZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch | 26 - ...port-udev_device_get_tags_list_entry.patch | 50 + ...se-UTIL_LINE_SIZE-from-2048-to-16384.patch | 37 - ...e-firmware-path-setting-out-of-extra.patch | 68 + ...rts-rule-to-use-attr-instead-of-ATTR.patch | 29 - ...luetooth-key-on-Acer-TravelMate-4720.patch | 22 +- ...cl-Correctly-handle-ENV-ACL_MANAGE-0.patch | 47 - ...-to-find-an-idle-worker-instead-of-f.patch | 58 + ...encourage-use-of-ACL_MANAGE-outside-.patch | 27 - 0021-input_id-Fix-linking.patch | 27 - 0022-replace-utimes-with-utimensat.patch | 34 - ...vate-rename-udev_list_entry_get_flag.patch | 212 -- ...use-as-separator-in-subsystem-match-.patch | 65 - ...as-entries-in-symlink-stack-instead-.patch | 81 - ...-minor-as-entries-in-watch-directory.patch | 120 - 0028-udev-needs-automake-1.10.patch | 28 - ...sible-segfault-when-firmware-device-.patch | 40 - ...create-by-path-links-for-pci-devices.patch | 25 - ...gitech-bluetooth-adapters-into-hci-m.patch | 29 - ...inux-context-when-the-node-was-not-t.patch | 88 - ...add-udev_device_new_from_environment.patch | 480 ---- ...on-mounted-optical-media-with-O_EXCL.patch | 58 - ...-into-tool-that-only-switches-Mobile.patch | 2142 ----------------- ...-is-to-check-if-the-name-attribute-i.patch | 28 - ...TravelMate-6593G-and-Acer-Aspire-164.patch | 25 - 0040-libudev-update-documentation.patch | 108 - ...Keymapping-for-upcoming-Dell-Laptops.patch | 50 - 0042-Add-new-Dell-touchpad-keycode.patch | 32 - ...cial-casing-0xD8-to-latitude-XT-only.patch | 42 - ...tudio-1558-volume-keys-not-releasing.patch | 30 - ...for-another-Dell-touchpad-toggle-key.patch | 29 - 0047-scsi_id-add-rand-in-retry-loop.patch | 45 - 0048-cdrom_id-remove-debugging-code.patch | 24 - ...id-retry-to-open-the-device-if-EBUSY.patch | 53 - ...m_id-check-mount-state-in-retry-loop.patch | 55 - ...set-ID_CDROM-regardless-if-we-can-ru.patch | 31 - ...ules-delete-outdated-packagees-rules.patch | 124 - ...have-static-devices-which-are-rename.patch | 21 - 0054-unify-cleanup-event-handling.patch | 362 --- 0055-allow-IMPORT-db-KEY.patch | 109 - 0056-usb-db-remove-double.patch | 31 - 0057-replace-add-change-with-remove.patch | 276 --- 0058-update-NEWS.patch | 30 - ...-only-if-we-actually-delete-the-node.patch | 27 - ...switch-default-action-from-add-to-ch.patch | 49 - 0061-remove-all_partitions-option.patch | 363 --- ...cdrom_id-Fix-uninitialized-variables.patch | 131 - ...ll-modprobe-on-all-events-but-remove.patch | 36 - 0064-remove-ignore_remove-option.patch | 273 --- 0065-cdrom_id-Fix-uninitialized-buffers.patch | 82 - sources | 2 +- start_udev | 2 +- ...dev-and-GUdev.patch => udev-153-LGPL.patch | 17 +- ...-145.tar.bz2.sign => udev-153.tar.bz2.sign | 6 +- udev.spec | 146 +- 86 files changed, 2908 insertions(+), 6815 deletions(-) create mode 100644 0001-configure.ac-version-bump.patch delete mode 100644 0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch delete mode 100644 0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch create mode 100644 0002-remove-buffer-overrun-risk-in-readlink-call.patch delete mode 100644 0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch create mode 100644 0003-more-readlink-buffer-size-handling.patch delete mode 100644 0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch create mode 100644 0004-remove-left-over-from-ignore_remove-and-all_partitio.patch create mode 100644 0005-fix-previous-commit.patch delete mode 100644 0005-keymap-Fix-LG-X110.patch create mode 100644 0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch delete mode 100644 0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch delete mode 100644 0007-keymap-Add-Toshiba-Satellite-M30X.patch create mode 100644 0007-udevadm-info-export-db-remove-watch-handle-export.patch create mode 100644 0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch delete mode 100644 0008-libudev-export-udev_monitor_set_receive_buffer_size.patch create mode 100644 0009-all-to-match-against-a-given-TAG.patch delete mode 100644 0009-udevadm-monitor-increase-netlink-buffer-size.patch delete mode 100644 0010-libudev-bump-minor-version.patch create mode 100644 0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch create mode 100644 0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch delete mode 100644 0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch delete mode 100644 0012-configure.ac-version-bump.patch create mode 100644 0012-use-the-usual-TAG-TAG-logic.patch create mode 100644 0013-delete-old-tags-when-configuration-changes.patch delete mode 100644 0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch delete mode 100644 0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch create mode 100644 0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch delete mode 100644 0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch create mode 100644 0015-export-tag-functions.patch delete mode 100644 0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch create mode 100644 0016-export-udev_device_get_tags_list_entry.patch delete mode 100644 0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch create mode 100644 0017-configure.ac-move-firmware-path-setting-out-of-extra.patch delete mode 100644 0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch rename 0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch => 0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch (69%) delete mode 100644 0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch create mode 100644 0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch delete mode 100644 0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch delete mode 100644 0021-input_id-Fix-linking.patch delete mode 100644 0022-replace-utimes-with-utimensat.patch delete mode 100644 0023-libbudev-private-rename-udev_list_entry_get_flag.patch delete mode 100644 0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch delete mode 100644 0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch delete mode 100644 0026-use-major-minor-as-entries-in-watch-directory.patch delete mode 100644 0028-udev-needs-automake-1.10.patch delete mode 100644 0029-firmware-fix-possible-segfault-when-firmware-device-.patch delete mode 100644 0030-rules-input-create-by-path-links-for-pci-devices.patch delete mode 100644 0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch delete mode 100644 0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch delete mode 100644 0033-libudev-add-udev_device_new_from_environment.patch delete mode 100644 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch delete mode 100644 0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch delete mode 100644 0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch delete mode 100644 0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch delete mode 100644 0040-libudev-update-documentation.patch delete mode 100644 0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch delete mode 100644 0042-Add-new-Dell-touchpad-keycode.patch delete mode 100644 0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch delete mode 100644 0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch delete mode 100644 0045-Add-support-for-another-Dell-touchpad-toggle-key.patch delete mode 100644 0047-scsi_id-add-rand-in-retry-loop.patch delete mode 100644 0048-cdrom_id-remove-debugging-code.patch delete mode 100644 0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch delete mode 100644 0050-cdrom_id-check-mount-state-in-retry-loop.patch delete mode 100644 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch delete mode 100644 0052-rules-delete-outdated-packagees-rules.patch delete mode 100644 0053-rules-we-do-not-have-static-devices-which-are-rename.patch delete mode 100644 0054-unify-cleanup-event-handling.patch delete mode 100644 0055-allow-IMPORT-db-KEY.patch delete mode 100644 0056-usb-db-remove-double.patch delete mode 100644 0057-replace-add-change-with-remove.patch delete mode 100644 0058-update-NEWS.patch delete mode 100644 0059-log-info-only-if-we-actually-delete-the-node.patch delete mode 100644 0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch delete mode 100644 0061-remove-all_partitions-option.patch delete mode 100644 0062-cdrom_id-Fix-uninitialized-variables.patch delete mode 100644 0063-rules-call-modprobe-on-all-events-but-remove.patch delete mode 100644 0064-remove-ignore_remove-option.patch delete mode 100644 0065-cdrom_id-Fix-uninitialized-buffers.patch rename 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch => udev-153-LGPL.patch (99%) rename udev-145.tar.bz2.sign => udev-153.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index d05c54f..e15c73e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-151.tar.bz2 +udev-153.tar.bz2 diff --git a/0001-configure.ac-version-bump.patch b/0001-configure.ac-version-bump.patch new file mode 100644 index 0000000..b54be08 --- /dev/null +++ b/0001-configure.ac-version-bump.patch @@ -0,0 +1,34 @@ +From c51d2f2746a54c8418965f22d1882b1ac3a18ed8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 21 Apr 2010 08:50:59 +0200 +Subject: [PATCH 01/19] configure.ac: version bump + +--- + NEWS | 3 +++ + configure.ac | 2 +- + 2 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/NEWS b/NEWS +index 87d5343..f3163ec 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,6 @@ ++udev 154 ++======== ++ + udev 153 + ======== + Fix broken firmware loader search path. +diff --git a/configure.ac b/configure.ac +index 4fcdbcd..d4d29c4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,4 +1,4 @@ +-AC_INIT([udev], [153], [linux-hotplug@vger.kernel.org]) ++AC_INIT([udev], [154], [linux-hotplug@vger.kernel.org]) + AC_PREREQ(2.60) + AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +-- +1.7.0.1 + diff --git a/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch b/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch deleted file mode 100644 index 41727ad..0000000 --- a/0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20B=C3=A4chler?= -Date: Sun, 31 Jan 2010 13:49:02 +0100 -Subject: [PATCH 01/65] firmware: fix error reporting on missing firmware files - -The new firmware loader does not report an error to the kernel if a firmware file -is missing. This results in modprobe stalling for 60 seconds for each firmware -a module tries to load. ---- - extras/firmware/firmware.c | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c -index 8f70be4..16455de 100644 ---- a/extras/firmware/firmware.c -+++ b/extras/firmware/firmware.c -@@ -149,6 +149,7 @@ int main(int argc, char **argv) - - util_path_encode(firmware, fwencpath, sizeof(fwencpath)); - util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL); -+ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); - - if (fwfile == NULL) { - int err; -@@ -166,6 +167,7 @@ int main(int argc, char **argv) - udev_selinux_resetfscreatecon(udev); - } while (err == -ENOENT); - rc = 2; -+ set_loading(udev, loadpath, "-1"); - goto exit; - } - -@@ -176,7 +178,6 @@ int main(int argc, char **argv) - if (unlink(misspath) == 0) - util_delete_path(udev, misspath); - -- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); - set_loading(udev, loadpath, "1"); - - util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); --- -1.6.6 - diff --git a/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch b/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch deleted file mode 100644 index a2b2e5e..0000000 --- a/0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch +++ /dev/null @@ -1,26 +0,0 @@ -From fc47e0b56779ceeaaa40d2dc3248fa002af63aaa Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 1 Feb 2010 15:27:46 -0800 -Subject: [PATCH 02/65] keymap: Add Dell Inspiron 1011 (Mini 10) - -This fixes the broken WLAN key. ---- - extras/keymap/95-keymap.rules | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 2b1c4bd..51c8c3b 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -53,6 +53,8 @@ GOTO="keyboard_end" - LABEL="keyboard_vendorcheck" - - ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" -+ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan" -+ - ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" - - ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000" --- -1.6.6 - diff --git a/0002-remove-buffer-overrun-risk-in-readlink-call.patch b/0002-remove-buffer-overrun-risk-in-readlink-call.patch new file mode 100644 index 0000000..4e64f31 --- /dev/null +++ b/0002-remove-buffer-overrun-risk-in-readlink-call.patch @@ -0,0 +1,32 @@ +From e925018786d85fb3aed3b62a0a89309f9a7d5e4f Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Wed, 21 Apr 2010 13:52:52 +0300 +Subject: [PATCH 02/19] remove buffer-overrun risk in readlink call + +readlink does not write a nul character to the end of the +string it returns. Therefore ask for one fewer character +than the buffer size so there's always room for an extra \0. + +Signed-off-by: Mathias Nyman +Signed-off-by: Phil Carmody +Signed-off-by: Martin Pitt +--- + udev/udev-node.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 2a2c2cf..ceb1d52 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -163,7 +163,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + int len; + + dbg(udev, "found existing symlink '%s'\n", slink); +- len = readlink(slink, buf, sizeof(buf)); ++ len = readlink(slink, buf, sizeof(buf) - 1); + if (len > 0) { + buf[len] = '\0'; + if (strcmp(target, buf) == 0) { +-- +1.7.0.1 + diff --git a/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch b/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch deleted file mode 100644 index e1a366c..0000000 --- a/0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d7e2d38c1f0ead2239808dd117577a99a3ad3cde Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Tue, 9 Feb 2010 15:47:47 +0100 -Subject: [PATCH 03/65] Fix brightness keys on MSI Wind U-100 - -The MSI Wind 100 generates ACPI/input events on the LNXVIDEO input device. On -top of that, the video module/BIOS synthesize some extra event on atkbd as an -echo of actually changing the brightness. - -Ignore the wrong and useless atkbd ones, to avoid event loops. - -Many thanks to Hans de Goede for tracking this down! - -https://launchpad.net/bugs/415023 ---- - extras/keymap/95-keymap.rules | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 51c8c3b..684619b 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -98,6 +98,11 @@ ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $ - - ENV{DMI_VENDOR}=="MICRO-STAR*", RUN+="keymap $name micro-star" - -+# some MSI models generate ACPI/input events on the LNXVIDEO input devices, -+# plus some extra synthesized ones on atkbd as an echo of actually changing the -+# brightness; so ignore those atkbd ones, to avoid loops -+ENV{DMI_VENDOR}=="MICRO-STAR*", ATTR{[dmi/id]product_name}=="*U-100*|*U100*|*N033", RUN+="keymap $name 0xF7 reserved 0xF8 reserved" -+ - ENV{DMI_VENDOR}=="INVENTEC", ATTR{[dmi/id]product_name}=="SYMPHONY 6.0/7.0", RUN+="keymap $name inventec-symphony_6.0_7.0" - - ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000" --- -1.6.6 - diff --git a/0003-more-readlink-buffer-size-handling.patch b/0003-more-readlink-buffer-size-handling.patch new file mode 100644 index 0000000..870fb72 --- /dev/null +++ b/0003-more-readlink-buffer-size-handling.patch @@ -0,0 +1,113 @@ +From 60067cc75ac7dd583beea584f87f2f6d3358f3c1 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 21 Apr 2010 14:44:33 +0200 +Subject: [PATCH 03/19] more readlink buffer size handling + +--- + libudev/libudev-device.c | 27 ++++++++++++++------------- + libudev/libudev-queue.c | 2 +- + udev/udev-node.c | 4 ++-- + udev/udev-watch.c | 4 ++-- + 4 files changed, 19 insertions(+), 18 deletions(-) + +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index b3b6a63..4003545 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -222,12 +222,11 @@ int udev_device_read_db(struct udev_device *udev_device) + char *next; + + target_len = readlink(filename, target, sizeof(target)); +- if (target_len > 0) +- target[target_len] = '\0'; +- else { +- dbg(udev_device->udev, "error reading db link %s: %m\n", filename); ++ if (target_len <= 0 || target_len == sizeof(target)) { ++ info(udev_device->udev, "error reading db link %s: %m\n", filename); + return -1; + } ++ target[target_len] = '\0'; + + next = strchr(target, ' '); + if (next != NULL) { +@@ -1095,16 +1094,18 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const + goto out; + + len = readlink(path, target, sizeof(target)); +- if (len > 0) { +- target[len] = '\0'; +- pos = strrchr(target, '/'); +- if (pos != NULL) { +- pos = &pos[1]; +- dbg(udev_device->udev, "cache '%s' with link value '%s'\n", sysattr, pos); +- list_entry = udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, pos, 0, 0); +- val = udev_list_entry_get_value(list_entry); +- } ++ if (len <= 0 || len == sizeof(target)) ++ goto out; ++ target[len] = '\0'; ++ ++ pos = strrchr(target, '/'); ++ if (pos != NULL) { ++ pos = &pos[1]; ++ dbg(udev_device->udev, "cache '%s' with link value '%s'\n", sysattr, pos); ++ list_entry = udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, pos, 0, 0); ++ val = udev_list_entry_get_value(list_entry); + } ++ + goto out; + } + +diff --git a/libudev/libudev-queue.c b/libudev/libudev-queue.c +index f06c9e8..5a4a3dc 100644 +--- a/libudev/libudev-queue.c ++++ b/libudev/libudev-queue.c +@@ -488,7 +488,7 @@ struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev + s = syspath; + l = util_strpcpyl(&s, sizeof(syspath), udev_get_sys_path(udev_queue->udev), NULL); + len = readlinkat(dirfd(dir), dent->d_name, s, l); +- if (len < 0 || (size_t)len >= l) ++ if (len <= 0 || (size_t)len == l) + continue; + s[len] = '\0'; + dbg(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name); +diff --git a/udev/udev-node.c b/udev/udev-node.c +index ceb1d52..5c1b04b 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -163,8 +163,8 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + int len; + + dbg(udev, "found existing symlink '%s'\n", slink); +- len = readlink(slink, buf, sizeof(buf) - 1); +- if (len > 0) { ++ len = readlink(slink, buf, sizeof(buf)); ++ if (len > 0 && len < (int)sizeof(buf)) { + buf[len] = '\0'; + if (strcmp(target, buf) == 0) { + info(udev, "preserve already existing symlink '%s' to '%s'\n", +diff --git a/udev/udev-watch.c b/udev/udev-watch.c +index 7135d9f..5fa6010 100644 +--- a/udev/udev-watch.c ++++ b/udev/udev-watch.c +@@ -81,7 +81,7 @@ void udev_watch_restore(struct udev *udev) + s = device; + l = util_strpcpy(&s, sizeof(device), udev_get_sys_path(udev)); + len = readlinkat(dirfd(dir), ent->d_name, s, l); +- if (len <= 0 || len >= (ssize_t)l) ++ if (len <= 0 || len == (ssize_t)l) + goto unlink; + s[len] = '\0'; + +@@ -173,7 +173,7 @@ struct udev_device *udev_watch_lookup(struct udev *udev, int wd) + s = majmin; + l = util_strpcpy(&s, sizeof(majmin), udev_get_sys_path(udev)); + len = readlink(filename, s, l); +- if (len < 0 || (size_t)len >= l) ++ if (len <= 0 || (size_t)len == l) + return NULL; + s[len] = '\0'; + +-- +1.7.0.1 + diff --git a/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch b/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch deleted file mode 100644 index 3d927d2..0000000 --- a/0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 063985ef7dd6050f33920700777831426b221697 Mon Sep 17 00:00:00 2001 -From: Robert Hooker -Date: Sun, 7 Feb 2010 13:56:27 -0500 -Subject: [PATCH 04/65] keymap: Add support for Gateway AOA110/AOA150 clones. - -https://launchpad.net/bugs/518496 - -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keymap.rules | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 684619b..d3690bb 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -71,6 +71,9 @@ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*" - # HP Pavillion dv6315ea has empty DMI_VENDOR - ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play - -+# Gateway clone of Acer Aspire One AOA110/AOA150 -+ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer" -+ - ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" --- -1.6.6 - diff --git a/0004-remove-left-over-from-ignore_remove-and-all_partitio.patch b/0004-remove-left-over-from-ignore_remove-and-all_partitio.patch new file mode 100644 index 0000000..b14f0a0 --- /dev/null +++ b/0004-remove-left-over-from-ignore_remove-and-all_partitio.patch @@ -0,0 +1,73 @@ +From e9906fec711192761f27468244d3012041bcb0ee Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 21 Apr 2010 15:11:57 +0200 +Subject: [PATCH 04/19] remove left-over from ignore_remove and all_partitions + +--- + udev/udev-rules.c | 10 ---------- + 1 files changed, 0 insertions(+), 10 deletions(-) + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 4f18aca..f5d23b4 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -149,7 +149,6 @@ enum token_type { + TK_A_STRING_ESCAPE_NONE, + TK_A_STRING_ESCAPE_REPLACE, + TK_A_INOTIFY_WATCH, /* int */ +- TK_A_NUM_FAKE_PART, /* int */ + TK_A_DEVLINK_PRIO, /* int */ + TK_A_OWNER, /* val */ + TK_A_GROUP, /* val */ +@@ -161,7 +160,6 @@ enum token_type { + TK_A_NAME, /* val */ + TK_A_DEVLINK, /* val */ + TK_A_EVENT_TIMEOUT, /* int */ +- TK_A_IGNORE_REMOVE, + TK_A_ATTR, /* val, attr */ + TK_A_RUN, /* val, bool */ + TK_A_GOTO, /* size_t */ +@@ -279,7 +277,6 @@ static const char *token_str(enum token_type type) + [TK_A_STRING_ESCAPE_NONE] = "A STRING_ESCAPE_NONE", + [TK_A_STRING_ESCAPE_REPLACE] = "A STRING_ESCAPE_REPLACE", + [TK_A_INOTIFY_WATCH] = "A INOTIFY_WATCH", +- [TK_A_NUM_FAKE_PART] = "A NUM_FAKE_PART", + [TK_A_DEVLINK_PRIO] = "A DEVLINK_PRIO", + [TK_A_OWNER] = "A OWNER", + [TK_A_GROUP] = "A GROUP", +@@ -291,7 +288,6 @@ static const char *token_str(enum token_type type) + [TK_A_NAME] = "A NAME", + [TK_A_DEVLINK] = "A DEVLINK", + [TK_A_EVENT_TIMEOUT] = "A EVENT_TIMEOUT", +- [TK_A_IGNORE_REMOVE] = "A IGNORE_REMOVE", + [TK_A_ATTR] = "A ATTR", + [TK_A_RUN] = "A RUN", + [TK_A_GOTO] = "A GOTO", +@@ -360,9 +356,6 @@ static void dump_token(struct udev_rules *rules, struct token *token) + break; + case TK_A_STRING_ESCAPE_NONE: + case TK_A_STRING_ESCAPE_REPLACE: +- case TK_A_IGNORE_REMOVE: +- dbg(rules->udev, "%s\n", token_str(type)); +- break; + case TK_M_TEST: + dbg(rules->udev, "%s %s '%s'(%s) %#o\n", + token_str(type), operation_str(op), value, string_glob_str(glob), token->key.mode); +@@ -1030,14 +1023,11 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, + break; + case TK_A_STRING_ESCAPE_NONE: + case TK_A_STRING_ESCAPE_REPLACE: +- case TK_A_IGNORE_REMOVE: +- break; + case TK_A_RUN: + token->key.value_off = add_string(rule_tmp->rules, value); + token->key.fail_on_error = *(int *)data; + break; + case TK_A_INOTIFY_WATCH: +- case TK_A_NUM_FAKE_PART: + case TK_A_DEVLINK_PRIO: + token->key.devlink_prio = *(int *)data; + break; +-- +1.7.0.1 + diff --git a/0005-fix-previous-commit.patch b/0005-fix-previous-commit.patch new file mode 100644 index 0000000..9ade8ad --- /dev/null +++ b/0005-fix-previous-commit.patch @@ -0,0 +1,33 @@ +From 5d69a34caffd595d918dd859a5b079f95d250064 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 21 Apr 2010 15:43:05 +0200 +Subject: [PATCH 05/19] fix previous commit + +--- + udev/udev-rules.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index f5d23b4..6eb8350 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -356,6 +356,8 @@ static void dump_token(struct udev_rules *rules, struct token *token) + break; + case TK_A_STRING_ESCAPE_NONE: + case TK_A_STRING_ESCAPE_REPLACE: ++ dbg(rules->udev, "%s\n", token_str(type)); ++ break; + case TK_M_TEST: + dbg(rules->udev, "%s %s '%s'(%s) %#o\n", + token_str(type), operation_str(op), value, string_glob_str(glob), token->key.mode); +@@ -1023,6 +1025,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, + break; + case TK_A_STRING_ESCAPE_NONE: + case TK_A_STRING_ESCAPE_REPLACE: ++ break; + case TK_A_RUN: + token->key.value_off = add_string(rule_tmp->rules, value); + token->key.fail_on_error = *(int *)data; +-- +1.7.0.1 + diff --git a/0005-keymap-Fix-LG-X110.patch b/0005-keymap-Fix-LG-X110.patch deleted file mode 100644 index d36d5c0..0000000 --- a/0005-keymap-Fix-LG-X110.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 4c514e31734a704ca58e543fa4330616ba584b39 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 12 Feb 2010 19:25:47 +0100 -Subject: [PATCH 05/65] keymap: Fix LG X110 - -The LG X110 is not a perfect clone of the MSI Wind after all, and needs its own -keymap. Thanks to Konstantin Lavrov! - -https://launchpad.net/bugs/520650 ---- - Makefile.am | 1 + - extras/keymap/95-keymap.rules | 3 +-- - extras/keymap/keymaps/lg-x110 | 12 ++++++++++++ - 3 files changed, 14 insertions(+), 2 deletions(-) - create mode 100644 extras/keymap/keymaps/lg-x110 - -diff --git a/Makefile.am b/Makefile.am -index 728076a..069bf7f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -518,6 +518,7 @@ dist_udevkeymap_DATA = \ - extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \ - extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \ - extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \ -+ extras/keymap/keymaps/lg-x110 \ - extras/keymap/keymaps/logitech-wave \ - extras/keymap/keymaps/logitech-wave-cordless \ - extras/keymap/keymaps/maxdata-pro_7000 \ -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index d3690bb..fcd42aa 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -93,8 +93,7 @@ ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*Amilo Si 1520*", RUN+ - ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="AMILO*M*", RUN+="keymap $name 0x97 prog2 0x9F prog1" - ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="Amilo Li 1718", RUN+="keymap $name 0xD6 wlan" - --# MSI Wind clone --ENV{DMI_VENDOR}=="LG*", ATTR{[dmi/id]product_name}=="*X110*", RUN+="keymap $name micro-star" -+ENV{DMI_VENDOR}=="LG*", ATTR{[dmi/id]product_name}=="*X110*", RUN+="keymap $name lg-x110" - - ENV{DMI_VENDOR}=="MEDION*", ATTR{[dmi/id]product_name}=="*FID2060*", RUN+="keymap $name medion-fid2060" - ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $name medionnb-a555" -diff --git a/extras/keymap/keymaps/lg-x110 b/extras/keymap/keymaps/lg-x110 -new file mode 100644 -index 0000000..a61cf3d ---- /dev/null -+++ b/extras/keymap/keymaps/lg-x110 -@@ -0,0 +1,12 @@ -+0xA0 mute # Fn-F9 -+0xAE volumedown # Fn-Left -+0xAF search # Fn-F3 -+0xB0 volumeup # Fn-Right -+0xB1 battery # Fn-F10 Info -+0xB3 suspend # Fn-F12 -+0xDF sleep # Fn-F4 -+# 0xE2 bluetooth # satellite dish2 -+0xE4 f22 # Fn-F5 Touchpad disable -+0xF6 wlan # Fn-F6 -+0xF7 reserved # brightnessdown # Fn-Down -+0xF8 reserved # brightnessup # Fn-Up -\ No newline at end of file --- -1.6.6 - diff --git a/0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch b/0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch new file mode 100644 index 0000000..3c27d50 --- /dev/null +++ b/0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch @@ -0,0 +1,29 @@ +From d05137cca5f92a102a0bdd55e42de9852a739913 Mon Sep 17 00:00:00 2001 +From: Jerone Young +Date: Wed, 21 Apr 2010 12:19:37 -0500 +Subject: [PATCH 06/19] Fix volume keys not releasing for Pegatron platform + +Pegatron has a new platform coming out being sold by many small +manufacturers. This platform has volume keys that are not sending a key +release. This patch ensures those keys send release. + +Signed-off-by: Jerone Young +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keyboard-force-release.rules | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index c9edacf..011b2e3 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -29,4 +29,6 @@ ENV{DMI_VENDOR}=="FOXCONN", ATTR{[dmi/id]product_name}=="QBOOK", RUN+="keyboard- + + ENV{DMI_VENDOR}=="MTC", ATTR{[dmi/id]product_version}=="A0", RUN+="keyboard-force-release.sh $devpath common-volume-keys" + ++ENV{DMI_VENDOR}=="PEGATRON CORP.", ATTR{[dmi/id]product_name}=="Spring Peak", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ + LABEL="force_release_end" +-- +1.7.0.1 + diff --git a/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch b/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch deleted file mode 100644 index d274d6c..0000000 --- a/0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch +++ /dev/null @@ -1,55 +0,0 @@ -From b15bb8019094797aee65f35e3e654354b61bfd7b Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Fri, 12 Feb 2010 18:08:08 -0600 -Subject: [PATCH 06/65] Force key release for volume keys on Dell Studio 1557 - -Dell Studio 1557 does not generate a release code when the volume keys -are pressed, causing them to generate infinite key presses. This forces -key release of these keys. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - Makefile.am | 3 ++- - extras/keymap/95-keyboard-force-release.rules | 2 ++ - extras/keymap/force-release-maps/dell-studio-1557 | 3 +++ - 3 files changed, 7 insertions(+), 1 deletions(-) - create mode 100755 extras/keymap/force-release-maps/dell-studio-1557 - -diff --git a/Makefile.am b/Makefile.am -index 069bf7f..1b4e2ea 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -541,7 +541,8 @@ dist_udevkeymap_DATA = \ - - udevkeymapforcereldir = $(libexecdir)/keymaps/force-release - dist_udevkeymapforcerel_DATA = \ -- extras/keymap/force-release-maps/samsung-other -+ extras/keymap/force-release-maps/samsung-other \ -+ extras/keymap/force-release-maps/dell-studio-1557 - - extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h - mkdir -p extras/keymap -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index 689afe9..659ee95 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -21,4 +21,6 @@ ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" - - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*", RUN+="keyboard-force-release.sh $devpath samsung-other" - -+ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" -+ - LABEL="force_release_end" -diff --git a/extras/keymap/force-release-maps/dell-studio-1557 b/extras/keymap/force-release-maps/dell-studio-1557 -new file mode 100755 -index 0000000..1718673 ---- /dev/null -+++ b/extras/keymap/force-release-maps/dell-studio-1557 -@@ -0,0 +1,3 @@ -+0xa0 #mute -+0xae #volume up -+0xb0 #volume down --- -1.6.6 - diff --git a/0007-keymap-Add-Toshiba-Satellite-M30X.patch b/0007-keymap-Add-Toshiba-Satellite-M30X.patch deleted file mode 100644 index 98a893b..0000000 --- a/0007-keymap-Add-Toshiba-Satellite-M30X.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 4ca91a04e8b727a079a973fdd9bc2b093e8315a5 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 15 Feb 2010 13:15:25 +0100 -Subject: [PATCH 07/65] keymap: Add Toshiba Satellite M30X - -Thanks to Alessio Gaeta! - -https://launchpad.net/bugs/510019 ---- - Makefile.am | 1 + - extras/keymap/95-keymap.rules | 1 + - extras/keymap/keymaps/toshiba-satellite_m30x | 7 +++++++ - 3 files changed, 9 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/keymaps/toshiba-satellite_m30x - -diff --git a/Makefile.am b/Makefile.am -index 1b4e2ea..db23f16 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -537,6 +537,7 @@ dist_udevkeymap_DATA = \ - extras/keymap/keymaps/samsung-sx20s \ - extras/keymap/keymaps/toshiba-satellite_a100 \ - extras/keymap/keymaps/toshiba-satellite_a110 \ -+ extras/keymap/keymaps/toshiba-satellite_m30x \ - extras/keymap/keymaps/zepto-znote - - udevkeymapforcereldir = $(libexecdir)/keymaps/force-release -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index fcd42aa..65b0d6e 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -115,6 +115,7 @@ ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="S - - ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="SATELLITE A100", RUN+="keymap $name toshiba-satellite_a100" - ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite A110", RUN+="keymap $name toshiba-satellite_a110" -+ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+="keymap $name toshiba-satellite_m30x" - - ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2" - -diff --git a/extras/keymap/keymaps/toshiba-satellite_m30x b/extras/keymap/keymaps/toshiba-satellite_m30x -new file mode 100644 -index 0000000..cf6d912 ---- /dev/null -+++ b/extras/keymap/keymaps/toshiba-satellite_m30x -@@ -0,0 +1,7 @@ -+0xef brightnessdown -+0xd9 brightnessup -+0xee screenlock -+0x93 media -+0x9e prog1 #touchpad_enable -+0x9f prog2 #touchpad_disable -+ --- -1.6.6 - diff --git a/0007-udevadm-info-export-db-remove-watch-handle-export.patch b/0007-udevadm-info-export-db-remove-watch-handle-export.patch new file mode 100644 index 0000000..8fa424e --- /dev/null +++ b/0007-udevadm-info-export-db-remove-watch-handle-export.patch @@ -0,0 +1,27 @@ +From e7964b93e826274d0e92d58e458decb49e502bf5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 22 Apr 2010 06:23:16 +0200 +Subject: [PATCH 07/19] udevadm: info --export-db -- remove watch handle export + +--- + udev/udevadm-info.c | 4 ---- + 1 files changed, 0 insertions(+), 4 deletions(-) + +diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c +index 5f6209a..b395ad9 100644 +--- a/udev/udevadm-info.c ++++ b/udev/udevadm-info.c +@@ -142,10 +142,6 @@ static void print_record(struct udev_device *device) + if (i != 0) + printf("L: %i\n", i); + +- i = udev_device_get_watch_handle(device); +- if (i >= 0) +- printf("W: %u\n", i); +- + udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) { + len = strlen(udev_get_dev_path(udev_device_get_udev(device))); + printf("S: %s\n", &udev_list_entry_get_name(list_entry)[len+1]); +-- +1.7.0.1 + diff --git a/0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch b/0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch new file mode 100644 index 0000000..d40b240 --- /dev/null +++ b/0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch @@ -0,0 +1,1706 @@ +From 28460195c2ae90892bf556aff2b80705a8f37795 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 22 Apr 2010 18:12:36 +0200 +Subject: [PATCH 08/19] add TAG= to improve event filtering and device enumeration + +--- + Makefile.am | 4 +- + libudev/docs/libudev-sections.txt | 2 + + libudev/exported_symbols | 1 + + libudev/libudev-device-private.c | 46 ++++++++- + libudev/libudev-device.c | 159 ++++++++++++++++++++------- + libudev/libudev-enumerate.c | 197 ++++++++++++++++++++++----------- + libudev/libudev-monitor.c | 218 +++++++++++++++++++++++++++---------- + libudev/libudev-private.h | 8 +- + libudev/libudev-util.c | 75 +++++++++++-- + libudev/libudev.h | 4 +- + udev/udev-event.c | 1 - + udev/udev-rules.c | 14 +++ + udev/udev.xml | 13 ++ + udev/udevadm-monitor.c | 17 +++- + udev/udevadm-trigger.c | 7 +- + udev/udevadm.xml | 13 ++ + 16 files changed, 595 insertions(+), 184 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 7403949..9d3fefd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -28,9 +28,9 @@ CLEANFILES = + # ------------------------------------------------------------------------------ + # libudev + # ------------------------------------------------------------------------------ +-LIBUDEV_CURRENT=7 ++LIBUDEV_CURRENT=8 + LIBUDEV_REVISION=0 +-LIBUDEV_AGE=7 ++LIBUDEV_AGE=8 + + SUBDIRS += libudev/docs + +diff --git a/libudev/docs/libudev-sections.txt b/libudev/docs/libudev-sections.txt +index ca781ff..3f8c107 100644 +--- a/libudev/docs/libudev-sections.txt ++++ b/libudev/docs/libudev-sections.txt +@@ -68,6 +68,7 @@ udev_monitor_enable_receiving + udev_monitor_get_fd + udev_monitor_receive_device + udev_monitor_filter_add_match_subsystem_devtype ++udev_monitor_filter_add_match_tag + udev_monitor_filter_update + udev_monitor_filter_remove + +@@ -85,6 +86,7 @@ udev_enumerate_add_nomatch_subsystem + udev_enumerate_add_match_sysattr + udev_enumerate_add_nomatch_sysattr + udev_enumerate_add_match_property ++udev_enumerate_add_match_tag + udev_enumerate_add_match_sysname + udev_enumerate_add_syspath + udev_enumerate_scan_devices +diff --git a/libudev/exported_symbols b/libudev/exported_symbols +index 61486c6..c0ca4b9 100644 +--- a/libudev/exported_symbols ++++ b/libudev/exported_symbols +@@ -60,6 +60,7 @@ udev_monitor_get_udev + udev_monitor_get_fd + udev_monitor_receive_device + udev_monitor_filter_add_match_subsystem_devtype ++udev_monitor_filter_add_match_tag + udev_monitor_filter_update + udev_monitor_filter_remove + udev_queue_new +diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c +index 5e4381e..13f1ebf 100644 +--- a/libudev/libudev-device-private.c ++++ b/libudev/libudev-device-private.c +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -21,6 +22,37 @@ + #include "libudev.h" + #include "libudev-private.h" + ++static int udev_device_tag_index(struct udev_device *udev_device, bool add) ++{ ++ struct udev *udev = udev_device_get_udev(udev_device); ++ struct udev_list_entry *list_entry; ++ ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) { ++ char filename[UTIL_PATH_SIZE]; ++ ++ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", ++ udev_list_entry_get_name(list_entry), "/", ++ udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); ++ ++ if (add) { ++ util_create_path(udev, filename); ++ symlink(udev_device_get_devpath(udev_device), filename); ++ if (udev_device_get_sysname_old(udev_device) != NULL) { ++ char filename_old[UTIL_PATH_SIZE]; ++ ++ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", ++ udev_list_entry_get_name(list_entry), ++ udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); ++ unlink(filename_old); ++ } ++ } else { ++ unlink(filename); ++ util_delete_path(udev, filename); ++ } ++ } ++ return 0; ++} ++ + int udev_device_update_db(struct udev_device *udev_device) + { + struct udev *udev = udev_device_get_udev(udev_device); +@@ -41,6 +73,8 @@ int udev_device_update_db(struct udev_device *udev_device) + udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) + if (udev_list_entry_get_flags(list_entry)) + goto file; ++ if (udev_device_get_tags_list_entry(udev_device) != NULL) ++ goto file; + if (udev_device_get_devlink_priority(udev_device) != 0) + goto file; + if (udev_device_get_event_timeout(udev_device) >= 0) +@@ -80,7 +114,7 @@ file: + if (f == NULL) { + err(udev, "unable to create temporary db file '%s': %m\n", filename_tmp); + return -1; +- } ++ } + + if (udev_device_get_devnode(udev_device) != NULL) { + fprintf(f, "N:%s\n", &udev_device_get_devnode(udev_device)[devlen]); +@@ -100,10 +134,13 @@ file: + udev_list_entry_get_name(list_entry), + udev_list_entry_get_value(list_entry)); + } ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) ++ fprintf(f, "G:%s\n", udev_list_entry_get_name(list_entry)); + fclose(f); + rename(filename_tmp, filename); + info(udev, "created db file for '%s' in '%s'\n", udev_device_get_devpath(udev_device), filename); + out: ++ udev_device_tag_index(udev_device, true); + return 0; + } + +@@ -112,6 +149,7 @@ int udev_device_delete_db(struct udev_device *udev_device) + struct udev *udev = udev_device_get_udev(udev_device); + char filename[UTIL_PATH_SIZE]; + ++ udev_device_tag_index(udev_device, false); + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); + unlink(filename); +@@ -124,9 +162,13 @@ int udev_device_rename_db(struct udev_device *udev_device) + char filename_old[UTIL_PATH_SIZE]; + char filename[UTIL_PATH_SIZE]; + ++ if (strcmp(udev_device_get_sysname(udev_device), udev_device_get_sysname_old(udev_device)) == 0) ++ return 0; ++ + util_strscpyl(filename_old, sizeof(filename_old), udev_get_dev_path(udev), "/.udev/db/", + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); ++ udev_device_tag_index(udev_device, true); + return rename(filename_old, filename); + } +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 4003545..478fdcb 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -60,6 +60,7 @@ struct udev_device { + struct udev_list_node devlinks_list; + struct udev_list_node properties_list; + struct udev_list_node sysattr_list; ++ struct udev_list_node tags_list; + unsigned long long int seqnum; + int event_timeout; + int timeout; +@@ -68,18 +69,21 @@ struct udev_device { + dev_t devnum; + int watch_handle; + int maj, min; +- unsigned int parent_set:1; +- unsigned int subsystem_set:1; +- unsigned int devtype_set:1; +- unsigned int devlinks_uptodate:1; +- unsigned int envp_uptodate:1; +- unsigned int driver_set:1; +- unsigned int info_loaded:1; ++ bool parent_set; ++ bool subsystem_set; ++ bool devtype_set; ++ bool devlinks_uptodate; ++ bool envp_uptodate; ++ bool tags_uptodate; ++ bool driver_set; ++ bool info_loaded; ++ bool db_loaded; ++ bool uevent_loaded; + }; + + struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) + { +- udev_device->envp_uptodate = 0; ++ udev_device->envp_uptodate = false; + if (value == NULL) { + struct udev_list_entry *list_entry; + +@@ -149,6 +153,26 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device, + } + if (slink[0] != '\0') + udev_device_add_devlink(udev_device, slink, 0); ++ } else if (strncmp(property, "TAGS=", 5) == 0) { ++ char tags[UTIL_PATH_SIZE]; ++ char *next; ++ ++ util_strscpy(tags, sizeof(tags), &property[5]); ++ next = strchr(tags, ':'); ++ if (next != NULL) { ++ next++; ++ while (next[0] != '\0') { ++ char *tag; ++ ++ tag = next; ++ next = strchr(tag, ':'); ++ if (next == NULL) ++ break; ++ next[0] = '\0'; ++ next++; ++ udev_device_add_tag(udev_device, tag); ++ } ++ } + } else if (strncmp(property, "DRIVER=", 7) == 0) { + udev_device_set_driver(udev_device, &property[7]); + } else if (strncmp(property, "ACTION=", 7) == 0) { +@@ -208,6 +232,9 @@ int udev_device_read_db(struct udev_device *udev_device) + char line[UTIL_LINE_SIZE]; + FILE *f; + ++ if (udev_device->db_loaded) ++ return 0; ++ + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev_device->udev), "/.udev/db/", + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); + +@@ -284,6 +311,9 @@ int udev_device_read_db(struct udev_device *udev_device) + case 'E': + udev_device_add_property_from_string(udev_device, val); + break; ++ case 'G': ++ udev_device_add_tag(udev_device, val); ++ break; + case 'W': + udev_device_set_watch_handle(udev_device, atoi(val)); + break; +@@ -292,6 +322,7 @@ int udev_device_read_db(struct udev_device *udev_device) + fclose(f); + + info(udev_device->udev, "device %p filled with db file data\n", udev_device); ++ udev_device->db_loaded = true; + return 0; + } + +@@ -303,6 +334,9 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) + int maj = 0; + int min = 0; + ++ if (udev_device->uevent_loaded) ++ return 0; ++ + util_strscpyl(filename, sizeof(filename), udev_device->syspath, "/uevent", NULL); + f = fopen(filename, "r"); + if (f == NULL) +@@ -329,21 +363,14 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) + } + + udev_device->devnum = makedev(maj, min); +- + fclose(f); ++ udev_device->uevent_loaded = true; + return 0; + } + +-static void device_load_info(struct udev_device *device) +-{ +- device->info_loaded = 1; +- udev_device_read_uevent_file(device); +- udev_device_read_db(device); +-} +- + void udev_device_set_info_loaded(struct udev_device *device) + { +- device->info_loaded = 1; ++ device->info_loaded = true; + } + + struct udev_device *udev_device_new(struct udev *udev) +@@ -362,6 +389,7 @@ struct udev_device *udev_device_new(struct udev *udev) + udev_list_init(&udev_device->devlinks_list); + udev_list_init(&udev_device->properties_list); + udev_list_init(&udev_device->sysattr_list); ++ udev_list_init(&udev_device->tags_list); + udev_device->event_timeout = -1; + udev_device->watch_handle = -1; + /* copy global properties */ +@@ -420,7 +448,7 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char * + util_strscpy(path, sizeof(path), syspath); + util_resolve_sys_link(udev, path, sizeof(path)); + +- if (strncmp(&syspath[len], "/devices/", 9) == 0) { ++ if (strncmp(&path[len], "/devices/", 9) == 0) { + char file[UTIL_PATH_SIZE]; + + /* all "devices" require a "uevent" file */ +@@ -648,7 +676,7 @@ struct udev_device *udev_device_get_parent(struct udev_device *udev_device) + if (udev_device == NULL) + return NULL; + if (!udev_device->parent_set) { +- udev_device->parent_set = 1; ++ udev_device->parent_set = true; + udev_device->parent_device = device_new_from_parent(udev_device); + } + if (udev_device->parent_device != NULL) +@@ -758,12 +786,13 @@ void udev_device_unref(struct udev_device *udev_device) + free(udev_device->devtype); + udev_list_cleanup_entries(udev_device->udev, &udev_device->devlinks_list); + udev_list_cleanup_entries(udev_device->udev, &udev_device->properties_list); ++ udev_list_cleanup_entries(udev_device->udev, &udev_device->sysattr_list); ++ udev_list_cleanup_entries(udev_device->udev, &udev_device->tags_list); + free(udev_device->action); + free(udev_device->driver); + free(udev_device->devpath_old); + free(udev_device->sysname_old); + free(udev_device->knodename); +- udev_list_cleanup_entries(udev_device->udev, &udev_device->sysattr_list); + free(udev_device->envp); + free(udev_device->monitor_buf); + dbg(udev_device->udev, "udev_device: %p released\n", udev_device); +@@ -842,7 +871,7 @@ const char *udev_device_get_devnode(struct udev_device *udev_device) + if (udev_device == NULL) + return NULL; + if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ udev_device_read_db(udev_device); + return udev_device->devnode; + } + +@@ -862,7 +891,7 @@ const char *udev_device_get_subsystem(struct udev_device *udev_device) + if (udev_device == NULL) + return NULL; + if (!udev_device->subsystem_set) { +- udev_device->subsystem_set = 1; ++ udev_device->subsystem_set = true; + /* read "subsystem" link */ + if (util_get_sys_subsystem(udev_device->udev, udev_device->syspath, subsystem, sizeof(subsystem)) > 0) { + udev_device_set_subsystem(udev_device, subsystem); +@@ -900,9 +929,8 @@ const char *udev_device_get_devtype(struct udev_device *udev_device) + if (udev_device == NULL) + return NULL; + if (!udev_device->devtype_set) { +- udev_device->devtype_set = 1; +- if (!udev_device->info_loaded) +- udev_device_read_uevent_file(udev_device); ++ udev_device->devtype_set = true; ++ udev_device_read_uevent_file(udev_device); + } + return udev_device->devtype; + } +@@ -925,13 +953,13 @@ struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device * + if (udev_device == NULL) + return NULL; + if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ udev_device_read_db(udev_device); + return udev_list_get_entry(&udev_device->devlinks_list); + } + + void udev_device_cleanup_devlinks_list(struct udev_device *udev_device) + { +- udev_device->devlinks_uptodate = 0; ++ udev_device->devlinks_uptodate = false; + udev_list_cleanup_entries(udev_device->udev, &udev_device->devlinks_list); + } + +@@ -951,13 +979,15 @@ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device + { + if (udev_device == NULL) + return NULL; +- if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ if (!udev_device->info_loaded) { ++ udev_device_read_uevent_file(udev_device); ++ udev_device_read_db(udev_device); ++ } + if (!udev_device->devlinks_uptodate) { + char symlinks[UTIL_PATH_SIZE]; + struct udev_list_entry *list_entry; + +- udev_device->devlinks_uptodate = 1; ++ udev_device->devlinks_uptodate = true; + list_entry = udev_device_get_devlinks_list_entry(udev_device); + if (list_entry != NULL) { + char *s; +@@ -970,6 +1000,21 @@ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device + udev_device_add_property(udev_device, "DEVLINKS", symlinks); + } + } ++ if (!udev_device->tags_uptodate) { ++ udev_device->tags_uptodate = true; ++ if (udev_device_get_tags_list_entry(udev_device) != NULL) { ++ char tags[UTIL_PATH_SIZE]; ++ struct udev_list_entry *list_entry; ++ char *s; ++ size_t l; ++ ++ s = tags; ++ l = util_strpcpyl(&s, sizeof(tags), ":", NULL); ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) ++ l = util_strpcpyl(&s, l, udev_list_entry_get_name(list_entry), ":", NULL); ++ udev_device_add_property(udev_device, "TAGS", tags); ++ } ++ } + return udev_list_get_entry(&udev_device->properties_list); + } + +@@ -986,7 +1031,7 @@ const char *udev_device_get_driver(struct udev_device *udev_device) + if (udev_device == NULL) + return NULL; + if (!udev_device->driver_set) { +- udev_device->driver_set = 1; ++ udev_device->driver_set = true; + if (util_get_sys_driver(udev_device->udev, udev_device->syspath, driver, sizeof(driver)) > 0) + udev_device->driver = strdup(driver); + } +@@ -1004,7 +1049,7 @@ dev_t udev_device_get_devnum(struct udev_device *udev_device) + if (udev_device == NULL) + return makedev(0, 0); + if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ udev_device_read_uevent_file(udev_device); + return udev_device->devnum; + } + +@@ -1184,7 +1229,7 @@ int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsy + udev_device->subsystem = strdup(subsystem); + if (udev_device->subsystem == NULL) + return -ENOMEM; +- udev_device->subsystem_set = 1; ++ udev_device->subsystem_set = true; + udev_device_add_property(udev_device, "SUBSYSTEM", udev_device->subsystem); + return 0; + } +@@ -1195,7 +1240,7 @@ int udev_device_set_devtype(struct udev_device *udev_device, const char *devtype + udev_device->devtype = strdup(devtype); + if (udev_device->devtype == NULL) + return -ENOMEM; +- udev_device->devtype_set = 1; ++ udev_device->devtype_set = true; + udev_device_add_property(udev_device, "DEVTYPE", udev_device->devtype); + return 0; + } +@@ -1216,7 +1261,7 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink + { + struct udev_list_entry *list_entry; + +- udev_device->devlinks_uptodate = 0; ++ udev_device->devlinks_uptodate = false; + list_entry = udev_list_entry_add(udev_device->udev, &udev_device->devlinks_list, devlink, NULL, 1, 0); + if (list_entry == NULL) + return -ENOMEM; +@@ -1225,6 +1270,40 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink + return 0; + } + ++int udev_device_add_tag(struct udev_device *udev_device, const char *tag) ++{ ++ if (strchr(tag, ':') != NULL || strchr(tag, ' ') != NULL) ++ return -EINVAL; ++ udev_device->tags_uptodate = false; ++ if (udev_list_entry_add(udev_device->udev, &udev_device->tags_list, tag, NULL, 1, 0) != NULL) ++ return 0; ++ return -ENOMEM; ++} ++ ++void udev_device_cleanup_tags_list(struct udev_device *udev_device) ++{ ++ udev_device->tags_uptodate = false; ++ udev_list_cleanup_entries(udev_device->udev, &udev_device->tags_list); ++} ++ ++struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device) ++{ ++ return udev_list_get_entry(&udev_device->tags_list); ++} ++ ++int udev_device_has_tag(struct udev_device *udev_device, const char *tag) ++{ ++ struct udev_list_entry *list_entry; ++ ++ if (!udev_device->info_loaded) ++ udev_device_read_db(udev_device); ++ list_entry = udev_device_get_tags_list_entry(udev_device); ++ list_entry = udev_list_entry_get_by_name(list_entry, tag); ++ if (list_entry != NULL) ++ return 1; ++ return 0; ++} ++ + #define ENVP_SIZE 128 + #define MONITOR_BUF_SIZE 4096 + static int update_envp_monitor_buf(struct udev_device *udev_device) +@@ -1273,7 +1352,7 @@ static int update_envp_monitor_buf(struct udev_device *udev_device) + } + udev_device->envp[i] = NULL; + udev_device->monitor_buf_len = s - udev_device->monitor_buf; +- udev_device->envp_uptodate = 1; ++ udev_device->envp_uptodate = true; + dbg(udev_device->udev, "filled envp/monitor buffer, %u properties, %zu bytes\n", + i, udev_device->monitor_buf_len); + return 0; +@@ -1312,7 +1391,7 @@ int udev_device_set_driver(struct udev_device *udev_device, const char *driver) + udev_device->driver = strdup(driver); + if (udev_device->driver == NULL) + return -ENOMEM; +- udev_device->driver_set = 1; ++ udev_device->driver_set = true; + udev_device_add_property(udev_device, "DRIVER", udev_device->driver); + return 0; + } +@@ -1385,7 +1464,7 @@ int udev_device_set_timeout(struct udev_device *udev_device, int timeout) + int udev_device_get_event_timeout(struct udev_device *udev_device) + { + if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ udev_device_read_db(udev_device); + return udev_device->event_timeout; + } + +@@ -1421,7 +1500,7 @@ int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) + int udev_device_get_devlink_priority(struct udev_device *udev_device) + { + if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ udev_device_read_db(udev_device); + return udev_device->devlink_priority; + } + +@@ -1434,7 +1513,7 @@ int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio) + int udev_device_get_watch_handle(struct udev_device *udev_device) + { + if (!udev_device->info_loaded) +- device_load_info(udev_device); ++ udev_device_read_db(udev_device); + return udev_device->watch_handle; + } + +diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c +index 9a61a61..da83144 100644 +--- a/libudev/libudev-enumerate.c ++++ b/libudev/libudev-enumerate.c +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -51,6 +51,7 @@ struct udev_enumerate { + struct udev_list_node subsystem_nomatch_list; + struct udev_list_node sysname_match_list; + struct udev_list_node properties_match_list; ++ struct udev_list_node tags_match_list; + struct udev_list_node devices_list; + struct syspath *devices; + unsigned int devices_cur; +@@ -79,6 +80,7 @@ struct udev_enumerate *udev_enumerate_new(struct udev *udev) + udev_list_init(&udev_enumerate->subsystem_nomatch_list); + udev_list_init(&udev_enumerate->sysname_match_list); + udev_list_init(&udev_enumerate->properties_match_list); ++ udev_list_init(&udev_enumerate->tags_match_list); + udev_list_init(&udev_enumerate->devices_list); + return udev_enumerate; + } +@@ -121,6 +123,7 @@ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate) + udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->subsystem_nomatch_list); + udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->sysname_match_list); + udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->properties_match_list); ++ udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->tags_match_list); + udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); + for (i = 0; i < udev_enumerate->devices_cur; i++) + free(udev_enumerate->devices[i].syspath); +@@ -191,7 +194,7 @@ static int syspath_cmp(const void *p1, const void *p2) + } + + /* For devices that should be moved to the absolute end of the list */ +-static int devices_delay_end(struct udev *udev, const char *syspath) ++static bool devices_delay_end(struct udev *udev, const char *syspath) + { + static const char *delay_device_list[] = { + "/block/md", +@@ -205,10 +208,10 @@ static int devices_delay_end(struct udev *udev, const char *syspath) + for (i = 0; delay_device_list[i] != NULL; i++) { + if (strstr(&syspath[len], delay_device_list[i]) != NULL) { + dbg(udev, "delaying: %s\n", syspath); +- return 1; ++ return true; + } + } +- return 0; ++ return false; + } + + /* For devices that should just be moved a little bit later, just +@@ -394,16 +397,12 @@ int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, co + return 0; + } + +-static int match_sysattr_value(struct udev *udev, const char *syspath, const char *sysattr, const char *match_val) ++static int match_sysattr_value(struct udev_device *dev, const char *sysattr, const char *match_val) + { +- struct udev_device *device; + const char *val = NULL; + bool match = false; + +- device = udev_device_new_from_syspath(udev, syspath); +- if (device == NULL) +- return -EINVAL; +- val = udev_device_get_sysattr_value(device, sysattr); ++ val = udev_device_get_sysattr_value(dev, sysattr); + if (val == NULL) + goto exit; + if (match_val == NULL) { +@@ -415,7 +414,6 @@ static int match_sysattr_value(struct udev *udev, const char *syspath, const cha + goto exit; + } + exit: +- udev_device_unref(device); + return match; + } + +@@ -440,6 +438,25 @@ int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, con + } + + /** ++ * udev_enumerate_add_match_tag: ++ * @udev_enumerate: context ++ * @tag: filter for a tag of the device to include in the list ++ * ++ * Returns: 0 on success, otherwise a negative error value. ++ */ ++int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag) ++{ ++ if (udev_enumerate == NULL) ++ return -EINVAL; ++ if (tag == NULL) ++ return 0; ++ if (udev_list_entry_add(udev_enumerate_get_udev(udev_enumerate), ++ &udev_enumerate->tags_match_list, tag, NULL, 1, 0) == NULL) ++ return -ENOMEM; ++ return 0; ++} ++ ++/** + * udev_enumerate_add_match_sysname: + * @udev_enumerate: context + * @sysname: filter for the name of the device to include in the list +@@ -458,46 +475,37 @@ int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, cons + return 0; + } + +-static int match_sysattr(struct udev_enumerate *udev_enumerate, const char *syspath) ++static bool match_sysattr(struct udev_enumerate *udev_enumerate, struct udev_device *dev) + { +- struct udev *udev = udev_enumerate_get_udev(udev_enumerate); + struct udev_list_entry *list_entry; + + /* skip list */ + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->sysattr_nomatch_list)) { +- if (match_sysattr_value(udev, syspath, +- udev_list_entry_get_name(list_entry), +- udev_list_entry_get_value(list_entry))) +- return 0; ++ if (match_sysattr_value(dev, udev_list_entry_get_name(list_entry), ++ udev_list_entry_get_value(list_entry))) ++ return false; + } + /* include list */ + if (udev_list_get_entry(&udev_enumerate->sysattr_match_list) != NULL) { + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->sysattr_match_list)) { + /* anything that does not match, will make it FALSE */ +- if (!match_sysattr_value(udev, syspath, +- udev_list_entry_get_name(list_entry), +- udev_list_entry_get_value(list_entry))) +- return 0; ++ if (!match_sysattr_value(dev, udev_list_entry_get_name(list_entry), ++ udev_list_entry_get_value(list_entry))) ++ return false; + } +- return 1; ++ return true; + } +- return 1; ++ return true; + } + +-static int match_property(struct udev_enumerate *udev_enumerate, const char *syspath) ++static bool match_property(struct udev_enumerate *udev_enumerate, struct udev_device *dev) + { +- struct udev_device *dev; + struct udev_list_entry *list_entry; +- int match = false; ++ bool match = false; + + /* no match always matches */ + if (udev_list_get_entry(&udev_enumerate->properties_match_list) == NULL) +- return 1; +- +- /* no device does not match */ +- dev = udev_device_new_from_syspath(udev_enumerate->udev, syspath); +- if (dev == NULL) +- return 0; ++ return true; + + /* loop over matches */ + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->properties_match_list)) { +@@ -525,23 +533,38 @@ static int match_property(struct udev_enumerate *udev_enumerate, const char *sys + } + } + out: +- udev_device_unref(dev); + return match; + } + +-static int match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname) ++static bool match_tag(struct udev_enumerate *udev_enumerate, struct udev_device *dev) ++{ ++ struct udev_list_entry *list_entry; ++ ++ /* no match always matches */ ++ if (udev_list_get_entry(&udev_enumerate->tags_match_list) == NULL) ++ return true; ++ ++ /* loop over matches */ ++ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->tags_match_list)) ++ if (!udev_device_has_tag(dev, udev_list_entry_get_name(list_entry))) ++ return false; ++ ++ return true; ++} ++ ++static bool match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname) + { + struct udev_list_entry *list_entry; + + if (udev_list_get_entry(&udev_enumerate->sysname_match_list) == NULL) +- return 1; ++ return true; + + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->sysname_match_list)) { + if (fnmatch(udev_list_entry_get_name(list_entry), sysname, 0) != 0) + continue; +- return 1; ++ return true; + } +- return 0; ++ return false; + } + + static int scan_dir_and_add_devices(struct udev_enumerate *udev_enumerate, +@@ -562,54 +585,53 @@ static int scan_dir_and_add_devices(struct udev_enumerate *udev_enumerate, + util_strpcpyl(&s, l, "/", subdir2, NULL); + dir = opendir(path); + if (dir == NULL) +- return -1; ++ return -ENOENT; + for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { + char syspath[UTIL_PATH_SIZE]; +- char filename[UTIL_PATH_SIZE]; +- struct stat statbuf; ++ struct udev_device *dev; + + if (dent->d_name[0] == '.') + continue; ++ + if (!match_sysname(udev_enumerate, dent->d_name)) + continue; + + util_strscpyl(syspath, sizeof(syspath), path, "/", dent->d_name, NULL); +- if (!match_property(udev_enumerate, syspath)) +- continue; +- if (lstat(syspath, &statbuf) != 0) +- continue; +- if (S_ISREG(statbuf.st_mode)) ++ dev = udev_device_new_from_syspath(udev_enumerate->udev, syspath); ++ if (dev == NULL) + continue; +- if (S_ISLNK(statbuf.st_mode)) +- util_resolve_sys_link(udev, syspath, sizeof(syspath)); + +- util_strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); +- if (stat(filename, &statbuf) != 0) +- continue; +- if (!match_sysattr(udev_enumerate, syspath)) +- continue; +- syspath_add(udev_enumerate, syspath); ++ if (!match_tag(udev_enumerate, dev)) ++ goto nomatch; ++ if (!match_property(udev_enumerate, dev)) ++ goto nomatch; ++ if (!match_sysattr(udev_enumerate, dev)) ++ goto nomatch; ++ ++ syspath_add(udev_enumerate, udev_device_get_syspath(dev)); ++nomatch: ++ udev_device_unref(dev); + } + closedir(dir); + return 0; + } + +-static int match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem) ++static bool match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem) + { + struct udev_list_entry *list_entry; + + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->subsystem_nomatch_list)) { + if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0) +- return 0; ++ return false; + } + if (udev_list_get_entry(&udev_enumerate->subsystem_match_list) != NULL) { + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->subsystem_match_list)) { + if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0) +- return 1; ++ return true; + } +- return 0; ++ return false; + } +- return 1; ++ return true; + } + + static int scan_dir(struct udev_enumerate *udev_enumerate, const char *basedir, const char *subdir, const char *subsystem) +@@ -675,17 +697,59 @@ int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate) + + if (udev_enumerate == NULL) + return -EINVAL; +- util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); +- if (stat(base, &statbuf) == 0) { +- /* we have /subsystem/, forget all the old stuff */ +- dbg(udev, "searching '/subsystem/*/devices/*' dir\n"); +- scan_dir(udev_enumerate, "subsystem", "devices", NULL); ++ ++ if (udev_list_get_entry(&udev_enumerate->tags_match_list) != NULL) { ++ struct udev_list_entry *list_entry; ++ ++ /* scan only tagged devices, use tags reverse-index, instead of searching all devices in /sys */ ++ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->tags_match_list)) { ++ DIR *dir; ++ struct dirent *dent; ++ char path[UTIL_PATH_SIZE]; ++ ++ util_strscpyl(path, sizeof(path), udev_get_dev_path(udev), "/.udev/tags/", ++ udev_list_entry_get_name(list_entry), NULL); ++ dir = opendir(path); ++ if (dir == NULL) ++ continue; ++ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { ++ struct udev_device *dev; ++ char syspath[UTIL_PATH_SIZE]; ++ char *s; ++ size_t l; ++ ssize_t len; ++ ++ if (dent->d_name[0] == '.') ++ continue; ++ ++ s = syspath; ++ l = util_strpcpyl(&s, sizeof(syspath), udev_get_sys_path(udev), NULL); ++ len = readlinkat(dirfd(dir), dent->d_name, s, l); ++ if (len <= 0 || (size_t)len == l) ++ continue; ++ s[len] = '\0'; ++ ++ dev = udev_device_new_from_syspath(udev_enumerate->udev, syspath); ++ if (dev == NULL) ++ continue; ++ syspath_add(udev_enumerate, udev_device_get_syspath(dev)); ++ udev_device_unref(dev); ++ } ++ } + } else { ++ util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); ++ if (stat(base, &statbuf) == 0) { ++ /* we have /subsystem/, forget all the old stuff */ ++ dbg(udev, "searching '/subsystem/*/devices/*' dir\n"); ++ scan_dir(udev_enumerate, "subsystem", "devices", NULL); ++ } else { + dbg(udev, "searching '/bus/*/devices/*' dir\n"); +- scan_dir(udev_enumerate, "bus", "devices", NULL); +- dbg(udev, "searching '/class/*' dir\n"); +- scan_dir(udev_enumerate, "class", NULL, NULL); ++ scan_dir(udev_enumerate, "bus", "devices", NULL); ++ dbg(udev, "searching '/class/*' dir\n"); ++ scan_dir(udev_enumerate, "class", NULL, NULL); ++ } + } ++ + return 0; + } + +@@ -704,6 +768,7 @@ int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate) + + if (udev_enumerate == NULL) + return -EINVAL; ++ + util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); + if (stat(base, &statbuf) == 0) + subsysdir = "subsystem"; +diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c +index 97e52c4..24e8aea 100644 +--- a/libudev/libudev-monitor.c ++++ b/libudev/libudev-monitor.c +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008-2009 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -49,6 +49,7 @@ struct udev_monitor { + struct sockaddr_un sun; + socklen_t addrlen; + struct udev_list_node filter_subsystem_list; ++ struct udev_list_node filter_tag_list; + }; + + enum udev_monitor_netlink_group { +@@ -57,25 +58,28 @@ enum udev_monitor_netlink_group { + UDEV_MONITOR_UDEV, + }; + +-#define UDEV_MONITOR_MAGIC 0xcafe1dea ++#define UDEV_MONITOR_MAGIC 0xfeedcafe + struct udev_monitor_netlink_header { +- /* udev version text */ +- char version[16]; ++ /* "libudev" prefix to distinguish libudev and kernel messages */ ++ char prefix[8]; + /* + * magic to protect against daemon <-> library message format mismatch + * used in the kernel from socket filter rules; needs to be stored in network order + */ + unsigned int magic; +- /* properties buffer */ +- unsigned short properties_off; +- unsigned short properties_len; ++ /* total length of header structure known to the sender */ ++ unsigned int header_size; ++ /* properties string buffer */ ++ unsigned int properties_off; ++ unsigned int properties_len; + /* +- * hashes of some common device properties strings to filter with socket filters in +- * the client used in the kernel from socket filter rules; needs to be stored in +- * network order ++ * hashes of primary device properties strings, to let libudev subscribers ++ * use in-kernel socket filters; values need to be stored in network order + */ +- unsigned int filter_subsystem; +- unsigned int filter_devtype; ++ unsigned int filter_subsystem_hash; ++ unsigned int filter_devtype_hash; ++ unsigned int filter_tag_bloom_hi; ++ unsigned int filter_tag_bloom_lo; + }; + + static struct udev_monitor *udev_monitor_new(struct udev *udev) +@@ -88,6 +92,7 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev) + udev_monitor->refcount = 1; + udev_monitor->udev = udev; + udev_list_init(&udev_monitor->filter_subsystem_list); ++ udev_list_init(&udev_monitor->filter_tag_list); + return udev_monitor; + } + +@@ -247,13 +252,14 @@ static inline void bpf_jmp(struct sock_filter *inss, unsigned int *i, + */ + int udev_monitor_filter_update(struct udev_monitor *udev_monitor) + { +- static struct sock_filter ins[256]; +- static struct sock_fprog filter; ++ struct sock_filter ins[512]; ++ struct sock_fprog filter; + unsigned int i; + struct udev_list_entry *list_entry; + int err; + +- if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL) ++ if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL && ++ udev_list_get_entry(&udev_monitor->filter_tag_list) == NULL) + return 0; + + memset(ins, 0x00, sizeof(ins)); +@@ -266,35 +272,74 @@ int udev_monitor_filter_update(struct udev_monitor *udev_monitor) + /* wrong magic, pass packet */ + bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); + +- /* add all subsystem match values */ +- udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { +- unsigned int hash; +- +- /* load filter_subsystem value in A */ +- bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_subsystem)); +- hash = util_string_hash32(udev_list_entry_get_name(list_entry)); +- if (udev_list_entry_get_value(list_entry) == NULL) { +- /* jump if subsystem does not match */ +- bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); +- } else { +- /* jump if subsystem does not match */ +- bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 3); +- +- /* load filter_devtype value in A */ +- bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_devtype)); +- /* jump if value does not match */ +- hash = util_string_hash32(udev_list_entry_get_value(list_entry)); +- bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); ++ if (udev_list_get_entry(&udev_monitor->filter_tag_list) != NULL) { ++ int tag_matches; ++ ++ /* count tag matches, to calculate end of tag match block */ ++ tag_matches = 0; ++ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_tag_list)) ++ tag_matches++; ++ ++ /* add all tags matches */ ++ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_tag_list)) { ++ uint64_t tag_bloom_bits = util_string_bloom64(udev_list_entry_get_name(list_entry)); ++ uint32_t tag_bloom_hi = tag_bloom_bits >> 32; ++ uint32_t tag_bloom_lo = tag_bloom_bits & 0xffffffff; ++ ++ /* load device bloom bits in A */ ++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_tag_bloom_hi)); ++ /* clear bits (tag bits & bloom bits) */ ++ bpf_stmt(ins, &i, BPF_ALU|BPF_AND|BPF_K, tag_bloom_hi); ++ /* jump to next tag if it does not match */ ++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, tag_bloom_hi, 0, 3); ++ ++ /* load device bloom bits in A */ ++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_tag_bloom_lo)); ++ /* clear bits (tag bits & bloom bits) */ ++ bpf_stmt(ins, &i, BPF_ALU|BPF_AND|BPF_K, tag_bloom_lo); ++ /* jump behind end of tag match block if tag matches */ ++ tag_matches--; ++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, tag_bloom_lo, 1 + (tag_matches * 6), 0); + } + +- /* matched, pass packet */ +- bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); ++ /* nothing matched, drop packet */ ++ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); ++ } + +- if (i+1 >= ARRAY_SIZE(ins)) +- return -1; ++ /* add all subsystem matches */ ++ if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) != NULL) { ++ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { ++ unsigned int hash = util_string_hash32(udev_list_entry_get_name(list_entry)); ++ ++ /* load device subsystem value in A */ ++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_subsystem_hash)); ++ if (udev_list_entry_get_value(list_entry) == NULL) { ++ /* jump if subsystem does not match */ ++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); ++ } else { ++ /* jump if subsystem does not match */ ++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 3); ++ ++ /* load device devtype value in A */ ++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_devtype_hash)); ++ /* jump if value does not match */ ++ hash = util_string_hash32(udev_list_entry_get_value(list_entry)); ++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); ++ } ++ ++ /* matched, pass packet */ ++ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); ++ ++ if (i+1 >= ARRAY_SIZE(ins)) ++ return -1; ++ } ++ ++ /* nothing matched, drop packet */ ++ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); + } +- /* nothing matched, drop packet */ +- bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); ++ ++ /* matched, pass packet */ ++ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); + + /* install filter */ + filter.len = i; +@@ -406,6 +451,7 @@ void udev_monitor_unref(struct udev_monitor *udev_monitor) + if (udev_monitor->sock >= 0) + close(udev_monitor->sock); + udev_list_cleanup_entries(udev_monitor->udev, &udev_monitor->filter_subsystem_list); ++ udev_list_cleanup_entries(udev_monitor->udev, &udev_monitor->filter_tag_list); + dbg(udev_monitor->udev, "monitor %p released\n", udev_monitor); + free(udev_monitor); + } +@@ -445,8 +491,7 @@ static int passes_filter(struct udev_monitor *udev_monitor, struct udev_device * + struct udev_list_entry *list_entry; + + if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL) +- return 1; +- ++ goto tag; + udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { + const char *subsys = udev_list_entry_get_name(list_entry); + const char *dsubsys = udev_device_get_subsystem(udev_device); +@@ -458,11 +503,22 @@ static int passes_filter(struct udev_monitor *udev_monitor, struct udev_device * + + devtype = udev_list_entry_get_value(list_entry); + if (devtype == NULL) +- return 1; ++ goto tag; + ddevtype = udev_device_get_devtype(udev_device); + if (ddevtype == NULL) + continue; + if (strcmp(ddevtype, devtype) == 0) ++ goto tag; ++ } ++ return 0; ++ ++tag: ++ if (udev_list_get_entry(&udev_monitor->filter_tag_list) == NULL) ++ return 1; ++ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_tag_list)) { ++ const char *tag = udev_list_entry_get_name(list_entry); ++ ++ if (udev_device_has_tag(udev_device, tag)) + return 1; + } + return 0; +@@ -556,13 +612,11 @@ retry: + return NULL; + } + +- if (strncmp(buf, "udev-", 5) == 0) { ++ if (memcmp(buf, "libudev", 8) == 0) { + /* udev message needs proper version magic */ + nlh = (struct udev_monitor_netlink_header *) buf; + if (nlh->magic != htonl(UDEV_MONITOR_MAGIC)) + return NULL; +- if (nlh->properties_off < sizeof(struct udev_monitor_netlink_header)) +- return NULL; + if (nlh->properties_off+32 > buflen) + return NULL; + bufpos = nlh->properties_off; +@@ -626,17 +680,17 @@ retry: + int udev_monitor_send_device(struct udev_monitor *udev_monitor, + struct udev_monitor *destination, struct udev_device *udev_device) + { +- struct msghdr smsg; +- struct iovec iov[2]; + const char *buf; + ssize_t blen; + ssize_t count; + + blen = udev_device_get_properties_monitor_buf(udev_device, &buf); + if (blen < 32) +- return -1; ++ return -EINVAL; + + if (udev_monitor->sun.sun_family != 0) { ++ struct msghdr smsg; ++ struct iovec iov[2]; + const char *action; + char header[2048]; + char *s; +@@ -660,23 +714,41 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, + smsg.msg_iovlen = 2; + smsg.msg_name = &udev_monitor->sun; + smsg.msg_namelen = udev_monitor->addrlen; +- } else if (udev_monitor->snl.nl_family != 0) { ++ count = sendmsg(udev_monitor->sock, &smsg, 0); ++ info(udev_monitor->udev, "passed %zi bytes to socket monitor %p\n", count, udev_monitor); ++ return count; ++ } ++ ++ if (udev_monitor->snl.nl_family != 0) { ++ struct msghdr smsg; ++ struct iovec iov[2]; + const char *val; + struct udev_monitor_netlink_header nlh; +- ++ struct udev_list_entry *list_entry; ++ uint64_t tag_bloom_bits; + + /* add versioned header */ + memset(&nlh, 0x00, sizeof(struct udev_monitor_netlink_header)); +- util_strscpy(nlh.version, sizeof(nlh.version), "udev-" VERSION); ++ memcpy(nlh.prefix, "libudev", 8); + nlh.magic = htonl(UDEV_MONITOR_MAGIC); ++ nlh.header_size = sizeof(struct udev_monitor_netlink_header); + val = udev_device_get_subsystem(udev_device); +- nlh.filter_subsystem = htonl(util_string_hash32(val)); ++ nlh.filter_subsystem_hash = htonl(util_string_hash32(val)); + val = udev_device_get_devtype(udev_device); + if (val != NULL) +- nlh.filter_devtype = htonl(util_string_hash32(val)); ++ nlh.filter_devtype_hash = htonl(util_string_hash32(val)); + iov[0].iov_base = &nlh; + iov[0].iov_len = sizeof(struct udev_monitor_netlink_header); + ++ /* add tag bloom filter */ ++ tag_bloom_bits = 0; ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) ++ tag_bloom_bits |= util_string_bloom64(udev_list_entry_get_name(list_entry)); ++ if (tag_bloom_bits > 0) { ++ nlh.filter_tag_bloom_hi = htonl(tag_bloom_bits >> 32); ++ nlh.filter_tag_bloom_lo = htonl(tag_bloom_bits & 0xffffffff); ++ } ++ + /* add properties list */ + nlh.properties_off = iov[0].iov_len; + nlh.properties_len = blen; +@@ -697,13 +769,12 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, + else + smsg.msg_name = &udev_monitor->snl_destination; + smsg.msg_namelen = sizeof(struct sockaddr_nl); +- } else { +- return -1; ++ count = sendmsg(udev_monitor->sock, &smsg, 0); ++ info(udev_monitor->udev, "passed %zi bytes to netlink monitor %p\n", count, udev_monitor); ++ return count; + } + +- count = sendmsg(udev_monitor->sock, &smsg, 0); +- info(udev_monitor->udev, "passed %zi bytes to monitor %p\n", count, udev_monitor); +- return count; ++ return -EINVAL; + } + + /** +@@ -712,6 +783,9 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, + * @subsystem: the subsystem value to match the incoming devices against + * @devtype: the devtype value to match the incoming devices against + * ++ * This filer is efficiently executed inside the kernel, and libudev subscribers ++ * will usually not be woken up for devices which do not match. ++ * + * The filter must be installed before the monitor is switched to listening mode. + * + * Returns: 0 on success, otherwise a negative error value. +@@ -721,7 +795,7 @@ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_mo + if (udev_monitor == NULL) + return -EINVAL; + if (subsystem == NULL) +- return 0; ++ return -EINVAL; + if (udev_list_entry_add(udev_monitor->udev, + &udev_monitor->filter_subsystem_list, subsystem, devtype, 0, 0) == NULL) + return -ENOMEM; +@@ -729,6 +803,30 @@ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_mo + } + + /** ++ * udev_monitor_filter_add_match_tag: ++ * @udev_monitor: the monitor ++ * @tag: the name of a tag ++ * ++ * This filer is efficiently executed inside the kernel, and libudev subscribers ++ * will usually not be woken up for devices which do not match. ++ * ++ * The filter must be installed before the monitor is switched to listening mode. ++ * ++ * Returns: 0 on success, otherwise a negative error value. ++ */ ++int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag) ++{ ++ if (udev_monitor == NULL) ++ return -EINVAL; ++ if (tag == NULL) ++ return -EINVAL; ++ if (udev_list_entry_add(udev_monitor->udev, ++ &udev_monitor->filter_tag_list, tag, NULL, 0, 0) == NULL) ++ return -ENOMEM; ++ return 0; ++} ++ ++/** + * udev_monitor_filter_remove: + * @udev_monitor: monitor + * +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 8dc469e..548f4ad 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -14,6 +14,8 @@ + + #include + #include ++#include ++#include + #include "libudev.h" + + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +@@ -84,7 +86,8 @@ const char *udev_device_get_sysname_old(struct udev_device *udev_device); + int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old); + const char *udev_device_get_knodename(struct udev_device *udev_device); + int udev_device_add_tag(struct udev_device *udev_device, const char *tag); +-struct udev_list_entry *udev_device_get_tag_list_entry(struct udev_device *udev_device); ++void udev_device_cleanup_tags_list(struct udev_device *udev_device); ++struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); + int udev_device_has_tag(struct udev_device *udev_device, const char *tag); + int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename); + int udev_device_get_timeout(struct udev_device *udev_device); +@@ -203,7 +206,8 @@ size_t util_strscpyl(char *dest, size_t size, const char *src, ...) __attribute_ + int udev_util_replace_whitespace(const char *str, char *to, size_t len); + int udev_util_replace_chars(char *str, const char *white); + int udev_util_encode_string(const char *str, char *str_enc, size_t len); +-unsigned int util_string_hash32(const char *str); ++unsigned int util_string_hash32(const char *key); ++uint64_t util_string_bloom64(const char *str); + + /* libudev-util-private.c */ + int util_create_path(struct udev *udev, const char *path); +diff --git a/libudev/libudev-util.c b/libudev/libudev-util.c +index c0209f9..3a67b0c 100644 +--- a/libudev/libudev-util.c ++++ b/libudev/libudev-util.c +@@ -481,15 +481,74 @@ err: + return -1; + } + ++/* ++ * http://sites.google.com/site/murmurhash/ ++ * ++ * All code is released to the public domain. For business purposes, ++ * Murmurhash is under the MIT license. ++ * ++ */ ++static unsigned int murmur_hash2(const char *key, int len, unsigned int seed) ++{ ++ /* ++ * 'm' and 'r' are mixing constants generated offline. ++ * They're not really 'magic', they just happen to work well. ++ */ ++ const unsigned int m = 0x5bd1e995; ++ const int r = 24; ++ ++ /* initialize the hash to a 'random' value */ ++ unsigned int h = seed ^ len; ++ ++ /* mix 4 bytes at a time into the hash */ ++ const unsigned char * data = (const unsigned char *)key; ++ ++ while(len >= 4) { ++ unsigned int k = *(unsigned int *)data; ++ ++ k *= m; ++ k ^= k >> r; ++ k *= m; ++ h *= m; ++ h ^= k; ++ ++ data += 4; ++ len -= 4; ++ } ++ ++ /* handle the last few bytes of the input array */ ++ switch(len) { ++ case 3: ++ h ^= data[2] << 16; ++ case 2: ++ h ^= data[1] << 8; ++ case 1: ++ h ^= data[0]; ++ h *= m; ++ }; ++ ++ /* do a few final mixes of the hash to ensure the last few bytes are well-incorporated */ ++ h ^= h >> 13; ++ h *= m; ++ h ^= h >> 15; ++ ++ return h; ++} ++ + unsigned int util_string_hash32(const char *str) + { +- unsigned int hash = 0; ++ return murmur_hash2(str, strlen(str), 0); ++} + +- while (str[0] != '\0') { +- hash += str[0] << 4; +- hash += str[0] >> 4; +- hash *= 11; +- str++; +- } +- return hash; ++/* get a bunch of bit numbers out of the hash, and set the bits in our bit field */ ++uint64_t util_string_bloom64(const char *str) ++{ ++ uint64_t bits = 0; ++ unsigned int hash = util_string_hash32(str); ++ ++ bits |= 1LLU << (hash & 63); ++ bits |= 1LLU << ((hash >> 6) & 63); ++ bits |= 1LLU << ((hash >> 12) & 63); ++ bits |= 1LLU << ((hash >> 18) & 63); ++ return bits; + } +diff --git a/libudev/libudev.h b/libudev/libudev.h +index 750664f..3b73fbd 100644 +--- a/libudev/libudev.h ++++ b/libudev/libudev.h +@@ -1,7 +1,7 @@ + /* + * libudev - interface to udev device information + * +- * Copyright (C) 2008-2009 Kay Sievers ++ * Copyright (C) 2008-2010 Kay Sievers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -118,6 +118,7 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito + /* in-kernel socket filters to select messages that get delivered to a listener */ + int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, + const char *subsystem, const char *devtype); ++int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag); + int udev_monitor_filter_update(struct udev_monitor *udev_monitor); + int udev_monitor_filter_remove(struct udev_monitor *udev_monitor); + +@@ -138,6 +139,7 @@ int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, cons + int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value); + int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value); + int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname); ++int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag); + int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath); + /* run enumeration with active filters */ + int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate); +diff --git a/udev/udev-event.c b/udev/udev-event.c +index b2e1bae..212ccc7 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -543,7 +543,6 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + + if (strcmp(udev_device_get_action(dev), "remove") == 0) { + udev_device_read_db(dev); +- udev_device_set_info_loaded(dev); + udev_device_delete_db(dev); + + if (major(udev_device_get_devnum(dev)) != 0) +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 6eb8350..b5016d0 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -157,6 +157,7 @@ enum token_type { + TK_A_GROUP_ID, /* gid_t */ + TK_A_MODE_ID, /* mode_t */ + TK_A_ENV, /* val, attr */ ++ TK_A_TAG, /* val */ + TK_A_NAME, /* val */ + TK_A_DEVLINK, /* val */ + TK_A_EVENT_TIMEOUT, /* int */ +@@ -285,6 +286,7 @@ static const char *token_str(enum token_type type) + [TK_A_GROUP_ID] = "A GROUP_ID", + [TK_A_MODE_ID] = "A MODE_ID", + [TK_A_ENV] = "A ENV", ++ [TK_A_TAG] = "A ENV", + [TK_A_NAME] = "A NAME", + [TK_A_DEVLINK] = "A DEVLINK", + [TK_A_EVENT_TIMEOUT] = "A EVENT_TIMEOUT", +@@ -354,6 +356,9 @@ static void dump_token(struct udev_rules *rules, struct token *token) + dbg(rules->udev, "%s %s '%s' '%s'(%s)\n", + token_str(type), operation_str(op), attr, value, string_glob_str(glob)); + break; ++ case TK_A_TAG: ++ dbg(rules->udev, "%s %s '%s'\n", token_str(type), operation_str(op), value); ++ break; + case TK_A_STRING_ESCAPE_NONE: + case TK_A_STRING_ESCAPE_REPLACE: + dbg(rules->udev, "%s\n", token_str(type)); +@@ -1003,6 +1008,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, + case TK_A_MODE: + case TK_A_NAME: + case TK_A_GOTO: ++ case TK_A_TAG: + token->key.value_off = add_string(rule_tmp->rules, value); + break; + case TK_M_ENV: +@@ -1350,6 +1356,11 @@ static int add_rule(struct udev_rules *rules, char *line, + continue; + } + ++ if (strcmp(key, "TAG") == 0) { ++ rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL); ++ continue; ++ } ++ + if (strcmp(key, "PROGRAM") == 0) { + rule_add_key(&rule_tmp, TK_M_PROGRAM, op, value, NULL); + continue; +@@ -2408,6 +2419,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + } + break; + } ++ case TK_A_TAG: ++ udev_device_add_tag(event->dev, &rules->buf[cur->key.value_off]); ++ break; + case TK_A_NAME: + { + const char *name = &rules->buf[cur->key.value_off]; +diff --git a/udev/udev.xml b/udev/udev.xml +index 192a6f1..842fd5d 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -349,6 +349,19 @@ + + + ++ ++ ++ Attach a tag to a device. This is used to filter events for users ++ of libudev's monitor functionality, or to enumerate a group of tagged ++ devices. The implementation can only work efficiently if only a few ++ tags are attached to a device. It is only meant to be used in ++ contexts with specific device filter requirements, and not as a ++ general-purpose flag. Excessive use might result in inefficient event ++ handling. ++ ++ ++ ++ + + + Add a program to the list of programs to be executed for a specific +diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c +index d136c60..fb65084 100644 +--- a/udev/udevadm-monitor.c ++++ b/udev/udevadm-monitor.c +@@ -73,6 +73,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + int print_kernel = 0; + int print_udev = 0; + struct udev_list_node subsystem_match_list; ++ struct udev_list_node tag_match_list; + struct udev_monitor *udev_monitor = NULL; + struct udev_monitor *kernel_monitor = NULL; + fd_set readfds; +@@ -84,13 +85,15 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + { "kernel", no_argument, NULL, 'k' }, + { "udev", no_argument, NULL, 'u' }, + { "subsystem-match", required_argument, NULL, 's' }, ++ { "tag-match", required_argument, NULL, 't' }, + { "help", no_argument, NULL, 'h' }, + {} + }; + + udev_list_init(&subsystem_match_list); ++ udev_list_init(&tag_match_list); + while (1) { +- option = getopt_long(argc, argv, "epkus:h", options, NULL); ++ option = getopt_long(argc, argv, "pekus:t:h", options, NULL); + if (option == -1) + break; + +@@ -119,12 +122,16 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + udev_list_entry_add(udev, &subsystem_match_list, subsys, devtype, 0, 0); + break; + } ++ case 't': ++ udev_list_entry_add(udev, &tag_match_list, optarg, NULL, 0, 0); ++ break; + case 'h': + printf("Usage: udevadm monitor [--property] [--kernel] [--udev] [--help]\n" + " --property print the event properties\n" + " --kernel print kernel uevents\n" + " --udev print udev events\n" + " --subsystem-match= filter events by subsystem\n" ++ " --tag-match= filter events by tag\n" + " --help\n\n"); + default: + goto out; +@@ -168,6 +175,13 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) + fprintf(stderr, "error: unable to apply subsystem filter '%s'\n", subsys); + } + ++ udev_list_entry_foreach(entry, udev_list_get_entry(&tag_match_list)) { ++ const char *tag = udev_list_entry_get_name(entry); ++ ++ if (udev_monitor_filter_add_match_tag(udev_monitor, tag) < 0) ++ fprintf(stderr, "error: unable to apply tag filter '%s'\n", tag); ++ } ++ + if (udev_monitor_enable_receiving(udev_monitor) < 0) { + fprintf(stderr, "error: unable to subscribe to udev events\n"); + rc = 2; +@@ -244,5 +258,6 @@ out: + udev_monitor_unref(udev_monitor); + udev_monitor_unref(kernel_monitor); + udev_list_cleanup_entries(udev, &subsystem_match_list); ++ udev_list_cleanup_entries(udev, &tag_match_list); + return rc; + } +diff --git a/udev/udevadm-trigger.c b/udev/udevadm-trigger.c +index 03aa534..3cb07dd 100644 +--- a/udev/udevadm-trigger.c ++++ b/udev/udevadm-trigger.c +@@ -101,6 +101,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) + { "attr-match", required_argument, NULL, 'a' }, + { "attr-nomatch", required_argument, NULL, 'A' }, + { "property-match", required_argument, NULL, 'p' }, ++ { "tag-match", required_argument, NULL, 'g' }, + { "sysname-match", required_argument, NULL, 'y' }, + { "help", no_argument, NULL, 'h' }, + {} +@@ -127,7 +128,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) + const char *val; + char buf[UTIL_PATH_SIZE]; + +- option = getopt_long(argc, argv, "vnFo:t:hcp:s:S:a:A:y:", options, NULL); ++ option = getopt_long(argc, argv, "vng:o:t:hcp:s:S:a:A:y:", options, NULL); + if (option == -1) + break; + +@@ -172,6 +173,9 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) + key = keyval(optarg, &val, buf, sizeof(buf)); + udev_enumerate_add_match_property(udev_enumerate, key, val); + break; ++ case 'g': ++ udev_enumerate_add_match_tag(udev_enumerate, optarg); ++ break; + case 'y': + udev_enumerate_add_match_sysname(udev_enumerate, optarg); + break; +@@ -190,6 +194,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) + " --attr-match=]> trigger devices with a matching attribute\n" + " --attr-nomatch=]> exclude devices with a matching attribute\n" + " --property-match== trigger devices with a matching property\n" ++ " --tag-match== trigger devices with a matching property\n" + " --sysname-match= trigger devices with a matching name\n" + " --help\n\n"); + goto exit; +diff --git a/udev/udevadm.xml b/udev/udevadm.xml +index fa1742b..73e6f11 100644 +--- a/udev/udevadm.xml ++++ b/udev/udevadm.xml +@@ -217,6 +217,13 @@ + + + ++ ++ ++ Trigger events for devices with a matching tag. This option can be ++ specified multiple times. ++ ++ ++ + + + Trigger events for devices with a matching sys device name. This option can be +@@ -356,6 +363,12 @@ + + + ++ ++ ++ Filter events by property. Only udev events with a given tag attached will pass. ++ ++ ++ + + + Print help text. +-- +1.7.0.1 + diff --git a/0008-libudev-export-udev_monitor_set_receive_buffer_size.patch b/0008-libudev-export-udev_monitor_set_receive_buffer_size.patch deleted file mode 100644 index 34a10cf..0000000 --- a/0008-libudev-export-udev_monitor_set_receive_buffer_size.patch +++ /dev/null @@ -1,58 +0,0 @@ -From a571c23e954cb88cdd5faa28593b19bd7c340130 Mon Sep 17 00:00:00 2001 -From: Scott James Remnant -Date: Wed, 17 Feb 2010 15:26:00 +0000 -Subject: [PATCH 08/65] libudev: export udev_monitor_set_receive_buffer_size() - -This function is useful for anything that's likely to be running -alongside udevd during cold-plugging, and is using libudev to -receive the events. - -It makes little sense for it to be private, or to require other -software to relearn how to adjust the buffer size. - -Signed-off-by: Scott James Remnant ---- - libudev/exported_symbols | 1 + - libudev/libudev-private.h | 1 - - libudev/libudev.h | 1 + - 3 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/libudev/exported_symbols b/libudev/exported_symbols -index 018463d..f48025a 100644 ---- a/libudev/exported_symbols -+++ b/libudev/exported_symbols -@@ -51,6 +51,7 @@ udev_enumerate_scan_subsystems - udev_enumerate_add_syspath - udev_monitor_new_from_socket - udev_monitor_new_from_netlink -+udev_monitor_set_receive_buffer_size - udev_monitor_enable_receiving - udev_monitor_ref - udev_monitor_unref -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index c2fff00..0d28b80 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -109,7 +109,6 @@ int udev_monitor_disconnect(struct udev_monitor *udev_monitor); - int udev_monitor_allow_unicast_sender(struct udev_monitor *udev_monitor, struct udev_monitor *sender); - int udev_monitor_send_device(struct udev_monitor *udev_monitor, - struct udev_monitor *destination, struct udev_device *udev_device); --int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size); - - /* libudev-ctrl.c - daemon runtime setup */ - struct udev_ctrl; -diff --git a/libudev/libudev.h b/libudev/libudev.h -index ad11059..9576ad4 100644 ---- a/libudev/libudev.h -+++ b/libudev/libudev.h -@@ -111,6 +111,7 @@ struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char - struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path); - /* bind socket */ - int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor); -+int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size); - int udev_monitor_get_fd(struct udev_monitor *udev_monitor); - struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor); - /* in-kernel socket filters to select messages that get delivered to a listener */ --- -1.6.6 - diff --git a/0009-all-to-match-against-a-given-TAG.patch b/0009-all-to-match-against-a-given-TAG.patch new file mode 100644 index 0000000..7366d27 --- /dev/null +++ b/0009-all-to-match-against-a-given-TAG.patch @@ -0,0 +1,101 @@ +From 3f896a2abd76972eafe636cac4110608b6d3ff2f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 22 Apr 2010 18:33:24 +0200 +Subject: [PATCH 09/19] all to match against a given TAG== + +--- + udev/udev-rules.c | 24 +++++++++++++++++++++++- + udev/udev.xml | 7 +++++++ + 2 files changed, 30 insertions(+), 1 deletions(-) + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index b5016d0..5965723 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -125,6 +125,7 @@ enum token_type { + TK_M_DEVLINK, /* val */ + TK_M_NAME, /* val */ + TK_M_ENV, /* val, attr */ ++ TK_M_TAG, /* val */ + TK_M_SUBSYSTEM, /* val */ + TK_M_DRIVER, /* val */ + TK_M_WAITFOR, /* val */ +@@ -254,6 +255,7 @@ static const char *token_str(enum token_type type) + [TK_M_DEVLINK] = "M DEVLINK", + [TK_M_NAME] = "M NAME", + [TK_M_ENV] = "M ENV", ++ [TK_M_TAG] = "M TAG", + [TK_M_SUBSYSTEM] = "M SUBSYSTEM", + [TK_M_DRIVER] = "M DRIVER", + [TK_M_WAITFOR] = "M WAITFOR", +@@ -356,6 +358,7 @@ static void dump_token(struct udev_rules *rules, struct token *token) + dbg(rules->udev, "%s %s '%s' '%s'(%s)\n", + token_str(type), operation_str(op), attr, value, string_glob_str(glob)); + break; ++ case TK_M_TAG: + case TK_A_TAG: + dbg(rules->udev, "%s %s '%s'\n", token_str(type), operation_str(op), value); + break; +@@ -1008,6 +1011,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, + case TK_A_MODE: + case TK_A_NAME: + case TK_A_GOTO: ++ case TK_M_TAG: + case TK_A_TAG: + token->key.value_off = add_string(rule_tmp->rules, value); + break; +@@ -1357,7 +1361,10 @@ static int add_rule(struct udev_rules *rules, char *line, + } + + if (strcmp(key, "TAG") == 0) { +- rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL); ++ if (op < OP_MATCH_MAX) ++ rule_add_key(&rule_tmp, TK_M_TAG, op, value, NULL); ++ else ++ rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL); + continue; + } + +@@ -2104,6 +2111,21 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + goto nomatch; + break; + } ++ case TK_M_TAG: ++ { ++ struct udev_list_entry *list_entry; ++ bool match = false; ++ ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(event->dev)) { ++ if (strcmp(&rules->buf[cur->key.value_off], udev_list_entry_get_name(list_entry)) == 0) { ++ match = true; ++ break; ++ } ++ } ++ if (!match && (cur->key.op != OP_NOMATCH)) ++ goto nomatch; ++ break; ++ } + case TK_M_SUBSYSTEM: + if (match_key(rules, cur, udev_device_get_subsystem(event->dev)) != 0) + goto nomatch; +diff --git a/udev/udev.xml b/udev/udev.xml +index 842fd5d..d2277c9 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -238,6 +238,13 @@ + + + ++ ++ ++ Match against a device tag. ++ ++ ++ ++ + + + Test the existence of a file. An octal mode mask can be specified +-- +1.7.0.1 + diff --git a/0009-udevadm-monitor-increase-netlink-buffer-size.patch b/0009-udevadm-monitor-increase-netlink-buffer-size.patch deleted file mode 100644 index db69f85..0000000 --- a/0009-udevadm-monitor-increase-netlink-buffer-size.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0fe3c26eab97c4ee381918e6925a6cd798be5f39 Mon Sep 17 00:00:00 2001 -From: Scott James Remnant -Date: Wed, 17 Feb 2010 15:27:36 +0000 -Subject: [PATCH 09/65] udevadm monitor: increase netlink buffer size - -A common use (e.g. in Ubuntu) for udevadm monitor is to log the events -received by udev during boot; events can be lost of the buffer size isn't -increased as udevd does. - -Signed-off-by: Scott James Remnant ---- - udev/udevadm-monitor.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c -index 00b130d..ea4b7dc 100644 ---- a/udev/udevadm-monitor.c -+++ b/udev/udevadm-monitor.c -@@ -158,6 +158,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - rc = 1; - goto out; - } -+ udev_monitor_set_receive_buffer_size(udev_monitor, 128*1024*1024); - - udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) { - const char *subsys = udev_list_entry_get_name(entry); -@@ -183,6 +184,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - rc = 3; - goto out; - } -+ udev_monitor_set_receive_buffer_size(udev, 128*1024*1024); - - udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) { - const char *subsys = udev_list_entry_get_name(entry); --- -1.6.6 - diff --git a/0010-libudev-bump-minor-version.patch b/0010-libudev-bump-minor-version.patch deleted file mode 100644 index 6e79298..0000000 --- a/0010-libudev-bump-minor-version.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e0fcf21c030027101338c7673c5cb814b82261d1 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 18 Feb 2010 11:03:09 +0100 -Subject: [PATCH 10/65] libudev: bump minor version - ---- - Makefile.am | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index db23f16..3780f50 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -28,9 +28,9 @@ CLEANFILES = - # ------------------------------------------------------------------------------ - # libudev - # ------------------------------------------------------------------------------ --LIBUDEV_CURRENT=6 --LIBUDEV_REVISION=1 --LIBUDEV_AGE=6 -+LIBUDEV_CURRENT=7 -+LIBUDEV_REVISION=0 -+LIBUDEV_AGE=7 - - SUBDIRS += libudev/docs - --- -1.6.6 - diff --git a/0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch b/0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch new file mode 100644 index 0000000..cff2caa --- /dev/null +++ b/0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch @@ -0,0 +1,125 @@ +From f24362441f6165544888d8d97d63ff881e78f13f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 22 Apr 2010 18:33:49 +0200 +Subject: [PATCH 10/19] udev-acl: use a tag instead of a property to mark devices + +--- + extras/udev-acl/70-acl.rules | 48 +++++++++++++++++++++--------------------- + extras/udev-acl/udev-acl.c | 2 +- + 2 files changed, 25 insertions(+), 25 deletions(-) + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index 5b00bf8..cf6b0ea 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -8,70 +8,70 @@ ACTION=="remove", GOTO="acl_apply" + + # PTP/MTP protocol devices, cameras, portable media players + SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" +-SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG="udev-acl" + + # digicams with proprietary protocol +-ENV{ID_GPHOTO2}=="*?", ENV{ACL_MANAGE}="1" ++ENV{ID_GPHOTO2}=="*?", TAG="udev-acl" + + # SCSI scanners +-KERNEL=="sg[0-9]*", ATTRS{type}=="6", ENV{ACL_MANAGE}="1" +-KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", ENV{ACL_MANAGE}="1" ++KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG="udev-acl" ++KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG="udev-acl" + + # USB scanners +-ENV{libsane_matched}=="yes", ENV{ACL_MANAGE}="1" ++ENV{libsane_matched}=="yes", TAG="udev-acl" + + # HPLIP devices (necessary for ink level check and HP tool maintenance) +-ENV{ID_HPLIP}=="1", ENV{ACL_MANAGE}="1" ++ENV{ID_HPLIP}=="1", TAG="udev-acl" + + # optical drives +-SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG="udev-acl" + + # sound devices +-SUBSYSTEM=="sound", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="sound", TAG="udev-acl" + # sound jack-sense +-SUBSYSTEM=="input", SUBSYSTEMS=="sound", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG="udev-acl" + + # webcams, frame grabber, TV cards +-SUBSYSTEM=="video4linux", ENV{ACL_MANAGE}="1" +-SUBSYSTEM=="dvb", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="video4linux", TAG="udev-acl" ++SUBSYSTEM=="dvb", TAG="udev-acl" + + # IIDC devices: industrial cameras and some webcams +-SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG="udev-acl" + # AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more +-SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG="udev-acl" + + # old style firewire devices +-KERNEL=="dv1394-[0-9]*", ENV{ACL_MANAGE}="1" +-KERNEL=="video1394-[0-9]*", ENV{ACL_MANAGE}="1" ++KERNEL=="dv1394-[0-9]*", TAG="udev-acl" ++KERNEL=="video1394-[0-9]*", TAG="udev-acl" + + # fingerprint readers +-SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", TAG="udev-acl" + + # GPS devices + # Garmin GPSMap 60 +-SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", TAG="udev-acl" + + + # DRI video devices +-SUBSYSTEM=="drm", KERNEL=="card*", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="drm", KERNEL=="card*", TAG="udev-acl" + + # KVM +-SUBSYSTEM=="misc", KERNEL=="kvm", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="misc", KERNEL=="kvm", TAG="udev-acl" + + # smart-card readers +-ENV{ID_SMARTCARD_READER}=="*?", ENV{ACL_MANAGE}="1" ++ENV{ID_SMARTCARD_READER}=="*?", TAG="udev-acl" + + # joysticks +-SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG="udev-acl" + + # smart phones +-SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", ENV{ACL_MANAGE}="1" ++SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", TAG="udev-acl" + + # color measurement devices +-ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1" ++ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG="udev-acl" + + # apply ACL for all locally logged in users +-LABEL="acl_apply", ENV{ACL_MANAGE}=="1", TEST=="/var/run/ConsoleKit/database", \ ++LABEL="acl_apply", TAG=="udev-acl", TEST=="/var/run/ConsoleKit/database", \ + RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}" + + LABEL="acl_end" +diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c +index ce51590..ff04ec6 100644 +--- a/extras/udev-acl/udev-acl.c ++++ b/extras/udev-acl/udev-acl.c +@@ -289,7 +289,7 @@ static void apply_acl_to_devices(uid_t uid, int add) + /* iterate over all devices tagged with ACL_SET */ + udev = udev_new(); + enumerate = udev_enumerate_new(udev); +- udev_enumerate_add_match_property(enumerate, "ACL_MANAGE", "1"); ++ udev_enumerate_add_match_tag(enumerate, "udev-acl"); + udev_enumerate_scan_devices(enumerate); + udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) { + struct udev_device *device; +-- +1.7.0.1 + diff --git a/0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch b/0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch new file mode 100644 index 0000000..5224fc8 --- /dev/null +++ b/0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch @@ -0,0 +1,49 @@ +From bfd88b1d7b689ce86a2b04f62ac5a2b23b0aef84 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 22 Apr 2010 18:50:43 +0200 +Subject: [PATCH 11/19] fix logic on-demand loading logic for db and uevent + +--- + libudev/libudev-device.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 478fdcb..3f441d0 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -284,6 +284,8 @@ int udev_device_read_db(struct udev_device *udev_device) + dbg(udev_device->udev, "error reading db file %s: %m\n", filename); + return -1; + } ++ udev_device->db_loaded = true; ++ + while (fgets(line, sizeof(line), f)) { + ssize_t len; + const char *val; +@@ -322,7 +324,6 @@ int udev_device_read_db(struct udev_device *udev_device) + fclose(f); + + info(udev_device->udev, "device %p filled with db file data\n", udev_device); +- udev_device->db_loaded = true; + return 0; + } + +@@ -341,6 +342,7 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) + f = fopen(filename, "r"); + if (f == NULL) + return -1; ++ udev_device->uevent_loaded = true; + + while (fgets(line, sizeof(line), f)) { + char *pos; +@@ -364,7 +366,6 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) + + udev_device->devnum = makedev(maj, min); + fclose(f); +- udev_device->uevent_loaded = true; + return 0; + } + +-- +1.7.0.1 + diff --git a/0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch b/0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch deleted file mode 100644 index 382e057..0000000 --- a/0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 044bd2bcc7a160c97f7dd052d6de50d35186df13 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 18 Feb 2010 11:03:28 +0100 -Subject: [PATCH 11/65] udevadm: fix untested and broken commit to set buffer size - ---- - udev/udevadm-monitor.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c -index ea4b7dc..4063c48 100644 ---- a/udev/udevadm-monitor.c -+++ b/udev/udevadm-monitor.c -@@ -184,7 +184,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - rc = 3; - goto out; - } -- udev_monitor_set_receive_buffer_size(udev, 128*1024*1024); -+ udev_monitor_set_receive_buffer_size(kernel_monitor, 128*1024*1024); - - udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) { - const char *subsys = udev_list_entry_get_name(entry); --- -1.6.6 - diff --git a/0012-configure.ac-version-bump.patch b/0012-configure.ac-version-bump.patch deleted file mode 100644 index 8193aea..0000000 --- a/0012-configure.ac-version-bump.patch +++ /dev/null @@ -1,37 +0,0 @@ -From fff82e9d77415111193d9547bbe3618892147b39 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 18 Feb 2010 11:09:25 +0100 -Subject: [PATCH 12/65] configure.ac: version bump - ---- - NEWS | 6 ++++++ - configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) - -diff --git a/NEWS b/NEWS -index 5b23a8b..a4d46d7 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,9 @@ -+udev 152 -+======== -+Bugfixes. -+ -+New and fixed keymaps. -+ - udev 151 - ======== - Bugfixes. -diff --git a/configure.ac b/configure.ac -index 4cecb86..88824b6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,4 +1,4 @@ --AC_INIT([udev], [151], [linux-hotplug@vger.kernel.org]) -+AC_INIT([udev], [152], [linux-hotplug@vger.kernel.org]) - AC_PREREQ(2.60) - AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2 subdir-objects]) - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) --- -1.6.6 - diff --git a/0012-use-the-usual-TAG-TAG-logic.patch b/0012-use-the-usual-TAG-TAG-logic.patch new file mode 100644 index 0000000..c898ed7 --- /dev/null +++ b/0012-use-the-usual-TAG-TAG-logic.patch @@ -0,0 +1,129 @@ +From 1dbfbfbea6d80971fba6bb57469b5c437a8980d6 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 22 Apr 2010 19:03:11 +0200 +Subject: [PATCH 12/19] use the usual TAG+=, TAG= logic + +--- + extras/udev-acl/70-acl.rules | 48 +++++++++++++++++++++--------------------- + udev/udev-rules.c | 2 + + 2 files changed, 26 insertions(+), 24 deletions(-) + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index cf6b0ea..8300ec2 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -1,6 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-# Do not use ACL_MANAGE outside of this file. This variable is private to ++# Do not use TAG+="udev-acl" outside of this file. This variable is private to + # udev-acl of this udev release and may be replaced at any time. + + ENV{MAJOR}=="", GOTO="acl_end" +@@ -8,67 +8,67 @@ ACTION=="remove", GOTO="acl_apply" + + # PTP/MTP protocol devices, cameras, portable media players + SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" +-SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG="udev-acl" ++SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl" + + # digicams with proprietary protocol +-ENV{ID_GPHOTO2}=="*?", TAG="udev-acl" ++ENV{ID_GPHOTO2}=="*?", TAG+="udev-acl" + + # SCSI scanners +-KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG="udev-acl" +-KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG="udev-acl" ++KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG+="udev-acl" ++KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG+="udev-acl" + + # USB scanners +-ENV{libsane_matched}=="yes", TAG="udev-acl" ++ENV{libsane_matched}=="yes", TAG+="udev-acl" + + # HPLIP devices (necessary for ink level check and HP tool maintenance) +-ENV{ID_HPLIP}=="1", TAG="udev-acl" ++ENV{ID_HPLIP}=="1", TAG+="udev-acl" + + # optical drives +-SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG="udev-acl" ++SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="udev-acl" + + # sound devices +-SUBSYSTEM=="sound", TAG="udev-acl" ++SUBSYSTEM=="sound", TAG+="udev-acl" + # sound jack-sense +-SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG="udev-acl" ++SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG+="udev-acl" + + # webcams, frame grabber, TV cards +-SUBSYSTEM=="video4linux", TAG="udev-acl" +-SUBSYSTEM=="dvb", TAG="udev-acl" ++SUBSYSTEM=="video4linux", TAG+="udev-acl" ++SUBSYSTEM=="dvb", TAG+="udev-acl" + + # IIDC devices: industrial cameras and some webcams +-SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG="udev-acl" ++SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG+="udev-acl" + # AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more +-SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG="udev-acl" ++SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="udev-acl" + + # old style firewire devices +-KERNEL=="dv1394-[0-9]*", TAG="udev-acl" +-KERNEL=="video1394-[0-9]*", TAG="udev-acl" ++KERNEL=="dv1394-[0-9]*", TAG+="udev-acl" ++KERNEL=="video1394-[0-9]*", TAG+="udev-acl" + + # fingerprint readers +-SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", TAG="udev-acl" ++SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", TAG+="udev-acl" + + # GPS devices + # Garmin GPSMap 60 +-SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", TAG="udev-acl" ++SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", TAG+="udev-acl" + + + # DRI video devices +-SUBSYSTEM=="drm", KERNEL=="card*", TAG="udev-acl" ++SUBSYSTEM=="drm", KERNEL=="card*", TAG+="udev-acl" + + # KVM +-SUBSYSTEM=="misc", KERNEL=="kvm", TAG="udev-acl" ++SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl" + + # smart-card readers +-ENV{ID_SMARTCARD_READER}=="*?", TAG="udev-acl" ++ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" + + # joysticks +-SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG="udev-acl" ++SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" + + # smart phones +-SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", TAG="udev-acl" ++SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", TAG+="udev-acl" + + # color measurement devices +-ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG="udev-acl" ++ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="udev-acl" + + # apply ACL for all locally logged in users + LABEL="acl_apply", TAG=="udev-acl", TEST=="/var/run/ConsoleKit/database", \ +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 5965723..6f3335b 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -2442,6 +2442,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event + break; + } + case TK_A_TAG: ++ if (cur->key.op == OP_ASSIGN || cur->key.op == OP_ASSIGN_FINAL) ++ udev_device_cleanup_tags_list(event->dev); + udev_device_add_tag(event->dev, &rules->buf[cur->key.value_off]); + break; + case TK_A_NAME: +-- +1.7.0.1 + diff --git a/0013-delete-old-tags-when-configuration-changes.patch b/0013-delete-old-tags-when-configuration-changes.patch new file mode 100644 index 0000000..ed0d4da --- /dev/null +++ b/0013-delete-old-tags-when-configuration-changes.patch @@ -0,0 +1,168 @@ +From c1dbe11dc336f9faf02073a66fe30a12bd438e23 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 23 Apr 2010 09:01:56 +0200 +Subject: [PATCH 13/19] delete old tags when configuration changes + +--- + libudev/libudev-device-private.c | 67 +++++++++++++++++++++++++------------- + libudev/libudev-private.h | 1 + + udev/udev-event.c | 4 ++ + 3 files changed, 49 insertions(+), 23 deletions(-) + +diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c +index 13f1ebf..7e5fcbc 100644 +--- a/libudev/libudev-device-private.c ++++ b/libudev/libudev-device-private.c +@@ -22,34 +22,58 @@ + #include "libudev.h" + #include "libudev-private.h" + +-static int udev_device_tag_index(struct udev_device *udev_device, bool add) ++static void udev_device_tag(struct udev_device *dev, const char *tag, bool add) + { +- struct udev *udev = udev_device_get_udev(udev_device); +- struct udev_list_entry *list_entry; ++ struct udev *udev = udev_device_get_udev(dev); ++ char filename[UTIL_PATH_SIZE]; + +- udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) { +- char filename[UTIL_PATH_SIZE]; ++ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", tag, "/", ++ udev_device_get_subsystem(dev), ":", udev_device_get_sysname(dev), NULL); + +- util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", +- udev_list_entry_get_name(list_entry), "/", +- udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); ++ if (add) { ++ util_create_path(udev, filename); ++ symlink(udev_device_get_devpath(dev), filename); ++ /* possibly cleanup old entries after a device renaming */ ++ if (udev_device_get_sysname_old(dev) != NULL) { ++ char filename_old[UTIL_PATH_SIZE]; + +- if (add) { +- util_create_path(udev, filename); +- symlink(udev_device_get_devpath(udev_device), filename); +- if (udev_device_get_sysname_old(udev_device) != NULL) { +- char filename_old[UTIL_PATH_SIZE]; ++ util_strscpyl(filename_old, sizeof(filename_old), udev_get_dev_path(udev), "/.udev/tags/", tag, "/", ++ udev_device_get_subsystem(dev), ":", udev_device_get_sysname_old(dev), NULL); ++ unlink(filename_old); ++ } ++ } else { ++ unlink(filename); ++ } ++} + +- util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", +- udev_list_entry_get_name(list_entry), +- udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); +- unlink(filename_old); ++int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old, bool add) ++{ ++ struct udev_list_entry *list_entry; ++ bool found; ++ ++ if (add) { ++ /* delete possible left-over tags */ ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev_old)) { ++ const char *tag_old = udev_list_entry_get_name(list_entry); ++ struct udev_list_entry *list_entry_current; ++ ++ found = false; ++ udev_list_entry_foreach(list_entry_current, udev_device_get_tags_list_entry(dev)) { ++ const char *tag = udev_list_entry_get_name(list_entry_current); ++ ++ if (strcmp(tag, tag_old) == 0) { ++ found = true; ++ break; ++ } + } +- } else { +- unlink(filename); +- util_delete_path(udev, filename); ++ if (!found) ++ udev_device_tag(dev_old, tag_old, false); + } + } ++ ++ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev)) ++ udev_device_tag(dev, udev_list_entry_get_name(list_entry), add); ++ + return 0; + } + +@@ -140,7 +164,6 @@ file: + rename(filename_tmp, filename); + info(udev, "created db file for '%s' in '%s'\n", udev_device_get_devpath(udev_device), filename); + out: +- udev_device_tag_index(udev_device, true); + return 0; + } + +@@ -149,7 +172,6 @@ int udev_device_delete_db(struct udev_device *udev_device) + struct udev *udev = udev_device_get_udev(udev_device); + char filename[UTIL_PATH_SIZE]; + +- udev_device_tag_index(udev_device, false); + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); + unlink(filename); +@@ -169,6 +191,5 @@ int udev_device_rename_db(struct udev_device *udev_device) + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", + udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); +- udev_device_tag_index(udev_device, true); + return rename(filename_old, filename); + } +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 548f4ad..3f38a32 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -106,6 +106,7 @@ void udev_device_set_info_loaded(struct udev_device *device); + int udev_device_update_db(struct udev_device *udev_device); + int udev_device_delete_db(struct udev_device *udev_device); + int udev_device_rename_db(struct udev_device *udev_device); ++int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old, bool add); + + /* libudev-monitor.c - netlink/unix socket communication */ + int udev_monitor_disconnect(struct udev_monitor *udev_monitor); +diff --git a/udev/udev-event.c b/udev/udev-event.c +index 212ccc7..2d8becd 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -544,6 +544,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + if (strcmp(udev_device_get_action(dev), "remove") == 0) { + udev_device_read_db(dev); + udev_device_delete_db(dev); ++ udev_device_tag_index(dev, NULL, false); + + if (major(udev_device_get_devnum(dev)) != 0) + udev_watch_end(event->udev, dev); +@@ -577,6 +578,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + + /* delete stale db file */ + udev_device_delete_db(dev); ++ udev_device_tag_index(dev, NULL, false); + + /* remember old name */ + udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); +@@ -618,6 +620,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + if (event->name == NULL) { + /* things went wrong */ + udev_device_delete_db(dev); ++ udev_device_tag_index(dev, NULL, false); + udev_device_unref(event->dev_db); + err = -ENOMEM; + goto out; +@@ -629,6 +632,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) + } + + udev_device_update_db(dev); ++ udev_device_tag_index(dev, event->dev_db, true); + + if (major(udev_device_get_devnum(dev)) != 0) { + /* remove/update possible left-over symlinks from old database entry */ +-- +1.7.0.1 + diff --git a/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch b/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch deleted file mode 100644 index 488a6e0..0000000 --- a/0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 20b48c3727eef1f266cbfd6bf5854b5c1419beb9 Mon Sep 17 00:00:00 2001 -From: Andy Whitcroft -Date: Tue, 2 Mar 2010 13:55:03 +0100 -Subject: [PATCH 13/65] keymap: Add Samsung Q210/P210 force-release quirk - -The Samsung Q210/P210 laptop also needs all of its function keys quirked. - -https://launchpad.net/bugs/530093 - -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keyboard-force-release.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index 659ee95..48b896d 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -19,7 +19,7 @@ DRIVER!="atkbd", GOTO="force_release_end" - ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" - - --ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*", RUN+="keyboard-force-release.sh $devpath samsung-other" -+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other" - - ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" - --- -1.6.6 - diff --git a/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch b/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch deleted file mode 100644 index 8ce3972..0000000 --- a/0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch +++ /dev/null @@ -1,53 +0,0 @@ -From da96a11b9c9164447bef206db47c405342ab8daa Mon Sep 17 00:00:00 2001 -From: Andy Whitcroft -Date: Tue, 2 Mar 2010 14:00:32 +0100 -Subject: [PATCH 14/65] keymap: Add Fujitsu Amilo 1848+u force-release quirk - -The Fujitsu Amilo Si 1848+u laptop requires the volume and mute keys -quirking. - -https://launchpad.net/bugs/530089 - -Signed-off-by: Martin Pitt ---- - Makefile.am | 1 + - extras/keymap/95-keyboard-force-release.rules | 2 ++ - .../keymap/force-release-maps/fujitsu-amilo-si1848 | 3 +++ - 3 files changed, 6 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/force-release-maps/fujitsu-amilo-si1848 - -diff --git a/Makefile.am b/Makefile.am -index 3780f50..471c5dd 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -543,6 +543,7 @@ dist_udevkeymap_DATA = \ - udevkeymapforcereldir = $(libexecdir)/keymaps/force-release - dist_udevkeymapforcerel_DATA = \ - extras/keymap/force-release-maps/samsung-other \ -+ extras/keymap/force-release-maps/fujitsu-amilo-si1848 \ - extras/keymap/force-release-maps/dell-studio-1557 - - extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index 48b896d..28639a5 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -23,4 +23,6 @@ ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="* - - ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" - -+ENV{DMI_VENDOR}=="FUJITSU SIEMENS", ATTR{[dmi/id]product_name}=="AMILO Si 1848+u", RUN+="keyboard-force-release.sh $devpath fujitsu-amilo-si1848" -+ - LABEL="force_release_end" -diff --git a/extras/keymap/force-release-maps/fujitsu-amilo-si1848 b/extras/keymap/force-release-maps/fujitsu-amilo-si1848 -new file mode 100644 -index 0000000..1718673 ---- /dev/null -+++ b/extras/keymap/force-release-maps/fujitsu-amilo-si1848 -@@ -0,0 +1,3 @@ -+0xa0 #mute -+0xae #volume up -+0xb0 #volume down --- -1.6.6 - diff --git a/0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch b/0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch new file mode 100644 index 0000000..cd35b0d --- /dev/null +++ b/0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch @@ -0,0 +1,39 @@ +From 65f099c721fa568350f8ac019e3a99fda1966082 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 23 Apr 2010 09:22:42 +0200 +Subject: [PATCH 14/19] libudev: accept NULL in udev_device_get_tags_list_entry() + +--- + libudev/libudev-device-private.c | 2 +- + libudev/libudev-device.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c +index 7e5fcbc..8c8ac24 100644 +--- a/libudev/libudev-device-private.c ++++ b/libudev/libudev-device-private.c +@@ -51,7 +51,7 @@ int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old, + struct udev_list_entry *list_entry; + bool found; + +- if (add) { ++ if (add && dev_old != NULL) { + /* delete possible left-over tags */ + udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev_old)) { + const char *tag_old = udev_list_entry_get_name(list_entry); +diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c +index 3f441d0..a6a1ecb 100644 +--- a/libudev/libudev-device.c ++++ b/libudev/libudev-device.c +@@ -1289,6 +1289,8 @@ void udev_device_cleanup_tags_list(struct udev_device *udev_device) + + struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device) + { ++ if (udev_device == NULL) ++ return NULL; + return udev_list_get_entry(&udev_device->tags_list); + } + +-- +1.7.0.1 + diff --git a/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch b/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch deleted file mode 100644 index 98541ed..0000000 --- a/0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ecd42de2c56b4fcf0069b8b4a4d6607710e5de61 Mon Sep 17 00:00:00 2001 -From: David Zeuthen -Date: Tue, 2 Mar 2010 17:06:33 -0500 -Subject: [PATCH 15/65] Decrease buffer size when advancing past NUL byte - -Otherwise we'll overflow the buffer if space is tight. Also add a comment explaining this. - -Signed-off-by: David Zeuthen ---- - libudev/libudev-device.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 71fc775..4f42aa2 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -1166,7 +1166,9 @@ static int update_envp_monitor_buf(struct udev_device *udev_device) - l = util_strpcpyl(&s, l, key, "=", udev_list_entry_get_value(list_entry), NULL); - if (l == 0) - return -EINVAL; -+ /* advance past the trailing '\0' that util_strpcpyl() guarantees */ - s++; -+ l--; - } - udev_device->envp[i] = NULL; - udev_device->monitor_buf_len = s - udev_device->monitor_buf; --- -1.6.6 - diff --git a/0015-export-tag-functions.patch b/0015-export-tag-functions.patch new file mode 100644 index 0000000..2d6f066 --- /dev/null +++ b/0015-export-tag-functions.patch @@ -0,0 +1,24 @@ +From 2a34f9c31e17f4a6c4fc99a369f56e843a063390 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 23 Apr 2010 10:46:00 +0200 +Subject: [PATCH 15/19] export tag functions + +--- + libudev/exported_symbols | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/libudev/exported_symbols b/libudev/exported_symbols +index c0ca4b9..d2c458e 100644 +--- a/libudev/exported_symbols ++++ b/libudev/exported_symbols +@@ -46,6 +46,7 @@ udev_enumerate_add_nomatch_subsystem + udev_enumerate_add_match_sysattr + udev_enumerate_add_nomatch_sysattr + udev_enumerate_add_match_property ++udev_enumerate_add_match_tag + udev_enumerate_add_match_sysname + udev_enumerate_scan_devices + udev_enumerate_scan_subsystems +-- +1.7.0.1 + diff --git a/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch b/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch deleted file mode 100644 index 024ee15..0000000 --- a/0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3a19299202b5d34b89d5910fde25e8a4cfa2b31a Mon Sep 17 00:00:00 2001 -From: David Zeuthen -Date: Tue, 2 Mar 2010 17:07:14 -0500 -Subject: [PATCH 16/65] Use UTIL_LINE_SIZE, not UTIL_PATH_SIZE to truncate properties - -Signed-off-by: David Zeuthen ---- - libudev/libudev-device.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 4f42aa2..b841745 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -1089,7 +1089,7 @@ struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device - - struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property) - { -- char name[UTIL_PATH_SIZE]; -+ char name[UTIL_LINE_SIZE]; - char *val; - - util_strscpy(name, sizeof(name), property); --- -1.6.6 - diff --git a/0016-export-udev_device_get_tags_list_entry.patch b/0016-export-udev_device_get_tags_list_entry.patch new file mode 100644 index 0000000..1ce2e3d --- /dev/null +++ b/0016-export-udev_device_get_tags_list_entry.patch @@ -0,0 +1,50 @@ +From 2793f4e34bdf4f1a46d0263f7dbdb8fcffe78e32 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 23 Apr 2010 16:05:38 +0200 +Subject: [PATCH 16/19] export udev_device_get_tags_list_entry() + +--- + libudev/exported_symbols | 1 + + libudev/libudev-private.h | 1 - + libudev/libudev.h | 1 + + 3 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/libudev/exported_symbols b/libudev/exported_symbols +index d2c458e..935e361 100644 +--- a/libudev/exported_symbols ++++ b/libudev/exported_symbols +@@ -30,6 +30,7 @@ udev_device_get_subsystem + udev_device_get_devtype + udev_device_get_devlinks_list_entry + udev_device_get_properties_list_entry ++udev_device_get_tags_list_entry + udev_device_get_property_value + udev_device_get_action + udev_device_get_driver +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 3f38a32..7132357 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -87,7 +87,6 @@ int udev_device_set_devpath_old(struct udev_device *udev_device, const char *dev + const char *udev_device_get_knodename(struct udev_device *udev_device); + int udev_device_add_tag(struct udev_device *udev_device, const char *tag); + void udev_device_cleanup_tags_list(struct udev_device *udev_device); +-struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); + int udev_device_has_tag(struct udev_device *udev_device, const char *tag); + int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename); + int udev_device_get_timeout(struct udev_device *udev_device); +diff --git a/libudev/libudev.h b/libudev/libudev.h +index 3b73fbd..5bc42df 100644 +--- a/libudev/libudev.h ++++ b/libudev/libudev.h +@@ -90,6 +90,7 @@ const char *udev_device_get_sysnum(struct udev_device *udev_device); + const char *udev_device_get_devnode(struct udev_device *udev_device); + struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device); + struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device); ++struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); + const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key); + const char *udev_device_get_driver(struct udev_device *udev_device); + dev_t udev_device_get_devnum(struct udev_device *udev_device); +-- +1.7.0.1 + diff --git a/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch b/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch deleted file mode 100644 index d7419a1..0000000 --- a/0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e32d5237ea045045c621edba7341631abd602d74 Mon Sep 17 00:00:00 2001 -From: David Zeuthen -Date: Tue, 2 Mar 2010 17:10:02 -0500 -Subject: [PATCH 17/65] Increase UTIL_LINE_SIZE from 2048 to 16384 - -Recent udisks versions, for LVM2 integration, ships with probers that -produce very long lines such as - -UDISKS_LVM2_PV_VG_PV_LIST= - uuid=98lyZl-Ya7U-p26Z-Ia7b-xf8u-xZqP-jc4njb;size=2000397795328;allocated_size=2000397795328 - uuid=iFs0cM-sxCF-ceQK-hZl1-kbwo-ZTjq-gSewQR;size=2000397795328;allocated_size=2000397795328 - [...] - -e.g. roughly 100 bytes per LVM2 physical volume for each LVM2 -PV encountered. - -Signed-off-by: David Zeuthen ---- - libudev/libudev-private.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 0d28b80..e0c51dc 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -187,7 +187,7 @@ int udev_queue_export_device_failed(struct udev_queue_export *udev_queue_export, - /* libudev-util.c */ - #define UTIL_PATH_SIZE 1024 - #define UTIL_NAME_SIZE 512 --#define UTIL_LINE_SIZE 2048 -+#define UTIL_LINE_SIZE 16384 - #define UDEV_ALLOWED_CHARS_INPUT "/ $%?," - ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath, char *subsystem, size_t size); - ssize_t util_get_sys_driver(struct udev *udev, const char *syspath, char *driver, size_t size); --- -1.6.6 - diff --git a/0017-configure.ac-move-firmware-path-setting-out-of-extra.patch b/0017-configure.ac-move-firmware-path-setting-out-of-extra.patch new file mode 100644 index 0000000..a54acaf --- /dev/null +++ b/0017-configure.ac-move-firmware-path-setting-out-of-extra.patch @@ -0,0 +1,68 @@ +From 0c6a3f48357ed4a49c2c49c43f669f930d628382 Mon Sep 17 00:00:00 2001 +From: Robby Workman +Date: Sat, 24 Apr 2010 21:38:37 +0200 +Subject: [PATCH 17/19] configure.ac: move firmware-path setting out of extras section + +--- + configure.ac | 38 ++++++++++++++++++-------------------- + 1 files changed, 18 insertions(+), 20 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d4d29c4..4fe8c3c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,6 +46,24 @@ if test "x$enable_logging" = "xyes"; then + AC_DEFINE(ENABLE_LOGGING, [1], [System logging.]) + fi + ++AC_ARG_WITH(firmware-path, ++ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], ++ [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), ++ [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"] ++ ) ++OLD_IFS=$IFS ++IFS=: ++for i in $with_firmware_path ++do ++ if test "x${FIRMWARE_PATH}" = "x"; then ++ FIRMWARE_PATH="\\\"${i}/\\\"" ++ else ++ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" ++ fi ++done ++IFS=$OLD_IFS ++AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) ++ + AC_ARG_ENABLE([extras], + AS_HELP_STRING([--disable-extras], [disable extras with external dependencies]), + [], [enable_extras=yes]) +@@ -82,26 +100,6 @@ if test "x$enable_extras" = xyes; then + fi]) + AC_SUBST(PCI_DATABASE) + +- AC_ARG_WITH(firmware-path, +- AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], +- [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), +- [], +- [with_firmware_path="/lib/firmware/updates:/lib/firmware"] +- ) +- OLD_IFS=$IFS +- IFS=: +- for i in $with_firmware_path +- do +- if test "x${FIRMWARE_PATH}" = "x" +- then +- FIRMWARE_PATH="\\\"${i}/\\\"" +- else +- FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" +- fi +- done +- IFS=$OLD_IFS +- AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) +- + AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found])) + AC_SUBST([INCLUDE_PREFIX], [$(echo '#include ' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')]) + fi +-- +1.7.0.1 + diff --git a/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch b/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch deleted file mode 100644 index a536914..0000000 --- a/0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3c4b1738a9d591d7ddce361ea184b76b253c4e87 Mon Sep 17 00:00:00 2001 -From: Amit Shah -Date: Fri, 26 Feb 2010 14:05:41 +0530 -Subject: [PATCH 18/65] Fix virtio-ports rule to use $attr instead of $ATTR - -Newer udev versions don't understand $ATTR. - -Signed-off-by: Amit Shah -Signed-off-by: Martin Pitt ---- - rules/rules.d/50-udev-default.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index f8556d1..da1535f 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout" - KERNEL=="hvc*|hvsi*", GROUP="dialout" - - # virtio serial / console ports --KERNEL=="vport*", SYMLINK+="virtio-ports/$ATTR{name}" -+KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" - - # mem - KERNEL=="null|zero|full|random|urandom", MODE="0666" --- -1.6.6 - diff --git a/0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch b/0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch similarity index 69% rename from 0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch rename to 0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch index 41641dd..ac23c46 100644 --- a/0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch +++ b/0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch @@ -1,26 +1,26 @@ -From 43d08246dbb3a01e88062d5315194ee889e52dd4 Mon Sep 17 00:00:00 2001 +From ad3d4198439f06cab8a2a65190ad501b803666a1 Mon Sep 17 00:00:00 2001 From: Martin Pitt -Date: Wed, 24 Mar 2010 18:56:20 +0100 -Subject: [PATCH 39/65] keymap: Fix another key for Acer TravelMate 6593 +Date: Mon, 26 Apr 2010 08:28:36 +0200 +Subject: [PATCH 18/19] keymap: Fix Bluetooth key on Acer TravelMate 4720 -https://launchpad.net/bugs/536914 +https://launchpad.net/bugs/569815 --- extras/keymap/95-keymap.rules | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index b3b08ae..dd58453 100644 +index 2f41cb4..a27bc6d 100644 --- a/extras/keymap/95-keymap.rules +++ b/extras/keymap/95-keymap.rules -@@ -78,7 +78,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" +@@ -77,7 +77,7 @@ ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap + ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" --ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www" -+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" +-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" -- -1.6.6 +1.7.0.1 diff --git a/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch b/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch deleted file mode 100644 index d9aed68..0000000 --- a/0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5c3ebbf35a2c101e0212c7066f0d65e457fcf40c Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Thu, 4 Mar 2010 00:48:59 +0100 -Subject: [PATCH 19/65] udev-acl: Correctly handle ENV{ACL_MANAGE}==0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When a custom rule sets ACL_MANAGE to 0 to disable ACL management for a -particular device, handle this as "disabled", by explicitly checking against -"1" instead of "nonempty". - -Thanks to Rafał Rzepecki for pointing this out. ---- - extras/udev-acl/70-acl.rules | 2 +- - extras/udev-acl/udev-acl.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index 8380f53..874667c 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -69,7 +69,7 @@ SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", ENV{ACL_MANAG - ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1" - - # apply ACL for all locally logged in users --LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \ -+LABEL="acl_apply", ENV{ACL_MANAGE}=="1", TEST=="/var/run/ConsoleKit/database", \ - RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}" - - LABEL="acl_end" -diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c -index e670ce7..c070fcc 100644 ---- a/extras/udev-acl/udev-acl.c -+++ b/extras/udev-acl/udev-acl.c -@@ -289,7 +289,7 @@ static void apply_acl_to_devices(uid_t uid, int add) - /* iterate over all devices tagged with ACL_SET */ - udev = udev_new(); - enumerate = udev_enumerate_new(udev); -- udev_enumerate_add_match_property(enumerate, "ACL_MANAGE", "*"); -+ udev_enumerate_add_match_property(enumerate, "ACL_MANAGE", "1"); - udev_enumerate_scan_devices(enumerate); - udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) { - struct udev_device *device; --- -1.6.6 - diff --git a/0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch b/0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch new file mode 100644 index 0000000..3864b50 --- /dev/null +++ b/0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch @@ -0,0 +1,58 @@ +From 665ee17def2caa6811ae032ae68ebf8239a18cf8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 26 Apr 2010 12:21:16 +0200 +Subject: [PATCH 19/19] udevd: always try to find an idle worker instead of forking a new one + +We special-handle events with a TIMEOUT= set, so they don't get queued +or wait for parent events to finish, to make sure we can handle them +as fast as possible. + +With this change we first try to find an idle worker process before +forking a new one. +--- + udev/udevd.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index c27b4cd..7712543 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -360,7 +360,7 @@ static void worker_new(struct event *event) + } + } + +-static void event_run(struct event *event) ++static void event_run(struct event *event, bool force) + { + struct udev_list_node *loop; + +@@ -385,7 +385,7 @@ static void event_run(struct event *event) + return; + } + +- if (childs >= max_childs) { ++ if (!force && childs >= max_childs) { + info(event->udev, "maximum number (%i) of childs reached\n", childs); + return; + } +@@ -420,7 +420,7 @@ static void event_queue_insert(struct udev_device *dev) + + /* run all events with a timeout set immediately */ + if (udev_device_get_timeout(dev) > 0) { +- worker_new(event); ++ event_run(event, true); + return; + } + } +@@ -552,7 +552,7 @@ static void events_start(struct udev *udev) + continue; + } + +- event_run(event); ++ event_run(event, false); + } + } + +-- +1.7.0.1 + diff --git a/0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch b/0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch deleted file mode 100644 index b65e4e4..0000000 --- a/0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9a87132677191e49c3d464c91aac7fc218e1eb18 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 7 Mar 2010 13:47:34 +0100 -Subject: [PATCH 20/65] udev-acl: no not encourage use of ACL_MANAGE outside of rules file - ---- - extras/udev-acl/70-acl.rules | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index 874667c..fde2656 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -1,7 +1,9 @@ - # do not edit this file, it will be overwritten on update - -+# Do not use ACL_MANAGE outside of this file. This variable is private to -+# udev-acl of this udev release and may be replaced at any time. -+ - ENV{MAJOR}=="", GOTO="acl_end" --ENV{ACL_MANAGE}=="0", GOTO="acl_end" - ACTION!="add|change", GOTO="acl_apply" - - # PTP/MTP protocol devices, cameras, portable media players --- -1.6.6 - diff --git a/0021-input_id-Fix-linking.patch b/0021-input_id-Fix-linking.patch deleted file mode 100644 index 1e3734b..0000000 --- a/0021-input_id-Fix-linking.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a245a97b4e805c65ce22659742371550ccf002c1 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Wed, 10 Mar 2010 12:17:03 +0100 -Subject: [PATCH 21/65] input_id: Fix linking - -Link against libudev-private.a instead of libudev.a, to avoid runtime -dependency to libudev. ---- - Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 471c5dd..99a0133 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -239,7 +239,7 @@ dist_udevrules_DATA += extras/floppy/60-floppy.rules - # input_id - import input device class - # ------------------------------------------------------------------------------ - extras_input_id_input_id_SOURCES = extras/input_id/input_id.c --extras_input_id_input_id_LDADD = libudev/libudev.la -+extras_input_id_input_id_LDADD = libudev/libudev-private.la - libexec_PROGRAMS += extras/input_id/input_id - - # ------------------------------------------------------------------------------ --- -1.6.6 - diff --git a/0022-replace-utimes-with-utimensat.patch b/0022-replace-utimes-with-utimensat.patch deleted file mode 100644 index 57599d5..0000000 --- a/0022-replace-utimes-with-utimensat.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 455f792e4791e037eb0406005b92c345cf0baf56 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 10 Mar 2010 14:43:07 +0100 -Subject: [PATCH 22/65] replace utimes() with utimensat() - ---- - udev/udev-node.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/udev/udev-node.c b/udev/udev-node.c -index a70c147..307a76b 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -57,7 +57,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod - preserve = 1; - udev_selinux_lsetfilecon(udev, file, mode); - /* update time stamp when we re-use the node, like on media change events */ -- utimes(file, NULL); -+ utimensat(AT_FDCWD, file, NULL, 0); - } else { - char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)]; - -@@ -178,7 +178,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - info(udev, "preserve already existing symlink '%s' to '%s'\n", - slink, target); - udev_selinux_lsetfilecon(udev, slink, S_IFLNK); -- lutimes(slink, NULL); -+ utimensat(AT_FDCWD, slink, NULL, AT_SYMLINK_NOFOLLOW); - goto exit; - } - } --- -1.6.6 - diff --git a/0023-libbudev-private-rename-udev_list_entry_get_flag.patch b/0023-libbudev-private-rename-udev_list_entry_get_flag.patch deleted file mode 100644 index bb2ceb1..0000000 --- a/0023-libbudev-private-rename-udev_list_entry_get_flag.patch +++ /dev/null @@ -1,212 +0,0 @@ -From fbb31cd6e10fe66d2da781db0ba9a8d671a4c6aa Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 10 Mar 2010 14:52:42 +0100 -Subject: [PATCH 23/65] libbudev-private: rename udev_list_entry_get_flag() - ---- - libudev/libudev-device-private.c | 4 ++-- - libudev/libudev-device.c | 4 ++-- - libudev/libudev-list.c | 10 +++++----- - libudev/libudev-private.h | 9 ++++++--- - udev/udev-event.c | 2 +- - udev/udev-node.c | 2 +- - udev/udev-rules.c | 12 ++++++------ - 7 files changed, 23 insertions(+), 20 deletions(-) - -diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c -index 07249c3..1bcf441 100644 ---- a/libudev/libudev-device-private.c -+++ b/libudev/libudev-device-private.c -@@ -39,7 +39,7 @@ int udev_device_update_db(struct udev_device *udev_device) - util_strscpyl(filename_tmp, sizeof(filename_tmp), filename, ".tmp", NULL); - - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) -- if (udev_list_entry_get_flag(list_entry)) -+ if (udev_list_entry_get_flags(list_entry)) - goto file; - if (udev_device_get_num_fake_partitions(udev_device) != 0) - goto file; -@@ -102,7 +102,7 @@ file: - if (udev_device_get_watch_handle(udev_device) >= 0) - fprintf(f, "W:%i\n", udev_device_get_watch_handle(udev_device)); - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) { -- if (!udev_list_entry_get_flag(list_entry)) -+ if (!udev_list_entry_get_flags(list_entry)) - continue; - fprintf(f, "E:%s=%s\n", - udev_list_entry_get_name(list_entry), -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index b841745..aec5fb5 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008-2009 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -1068,7 +1068,7 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink - if (list_entry == NULL) - return -ENOMEM; - if (unique) -- udev_list_entry_set_flag(list_entry, 1); -+ udev_list_entry_set_flags(list_entry, 1); - return 0; - } - -diff --git a/libudev/libudev-list.c b/libudev/libudev-list.c -index f6637fc..b5e9645 100644 ---- a/libudev/libudev-list.c -+++ b/libudev/libudev-list.c -@@ -38,7 +38,7 @@ struct udev_list_entry { - struct udev_list_node *list; - char *name; - char *value; -- int flag; -+ unsigned int flags; - }; - - /* list head point to itself if empty */ -@@ -258,16 +258,16 @@ const char *udev_list_entry_get_value(struct udev_list_entry *list_entry) - return list_entry->value; - } - --int udev_list_entry_get_flag(struct udev_list_entry *list_entry) -+unsigned int udev_list_entry_get_flags(struct udev_list_entry *list_entry) - { - if (list_entry == NULL) - return -EINVAL; -- return list_entry->flag; -+ return list_entry->flags; - } - --void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag) -+void udev_list_entry_set_flags(struct udev_list_entry *list_entry, unsigned int flags) - { - if (list_entry == NULL) - return; -- list_entry->flag = flag; -+ list_entry->flags = flags; - } -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index e0c51dc..5ee0c58 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008-2009 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -82,6 +82,9 @@ const char *udev_device_get_devpath_old(struct udev_device *udev_device); - const char *udev_device_get_sysname_old(struct udev_device *udev_device); - int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old); - const char *udev_device_get_knodename(struct udev_device *udev_device); -+int udev_device_add_tag(struct udev_device *udev_device, const char *tag); -+struct udev_list_entry *udev_device_get_tag_list_entry(struct udev_device *udev_device); -+int udev_device_has_tag(struct udev_device *udev_device, const char *tag); - int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename); - int udev_device_get_timeout(struct udev_device *udev_device); - int udev_device_set_timeout(struct udev_device *udev_device, int timeout); -@@ -163,8 +166,8 @@ void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list - void udev_list_entry_append(struct udev_list_entry *new, struct udev_list_node *list); - void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *name_list); - struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list); --int udev_list_entry_get_flag(struct udev_list_entry *list_entry); --void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag); -+unsigned int udev_list_entry_get_flags(struct udev_list_entry *list_entry); -+void udev_list_entry_set_flags(struct udev_list_entry *list_entry, unsigned int flags); - #define udev_list_entry_foreach_safe(entry, tmp, first) \ - for (entry = first, tmp = udev_list_entry_get_next(entry); \ - entry != NULL; \ -diff --git a/udev/udev-event.c b/udev/udev-event.c -index 4e1773f..986c119 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -729,7 +729,7 @@ int udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask) - udev_event_apply_format(event, cmd, program, sizeof(program)); - envp = udev_device_get_properties_envp(event->dev); - if (util_run_program(event->udev, program, envp, NULL, 0, NULL, sigmask) != 0) { -- if (udev_list_entry_get_flag(list_entry)) -+ if (udev_list_entry_get_flags(list_entry)) - err = -1; - } - } -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 307a76b..23bfade 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -405,7 +405,7 @@ int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) - - /* create/update symlinks, add symlinks to name index */ - udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) { -- if (udev_list_entry_get_flag(list_entry)) -+ if (udev_list_entry_get_flags(list_entry)) - /* simple unmanaged link name */ - node_symlink(udev, udev_device_get_devnode(dev), udev_list_entry_get_name(list_entry)); - else -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 3da2033..60daad5 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -717,7 +717,7 @@ static int import_property_from_string(struct udev_device *dev, char *line) - entry = udev_device_add_property(dev, key, val); - /* store in db, skip private keys */ - if (key[0] != '.') -- udev_list_entry_set_flag(entry, 1); -+ udev_list_entry_set_flags(entry, 1); - } - return 0; - } -@@ -785,7 +785,7 @@ static int import_parent_into_properties(struct udev_device *dev, const char *fi - entry = udev_device_add_property(dev, key, val); - /* store in db, skip private keys */ - if (key[0] != '.') -- udev_list_entry_set_flag(entry, 1); -+ udev_list_entry_set_flags(entry, 1); - } - } - return 0; -@@ -1831,13 +1831,13 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) - filename_off = add_string(rules, filename); - /* the offset in the rule is limited to unsigned short */ - if (filename_off < USHRT_MAX) -- udev_list_entry_set_flag(file_loop, filename_off); -+ udev_list_entry_set_flags(file_loop, filename_off); - } - - /* parse list of files */ - udev_list_entry_foreach_safe(file_loop, file_tmp, udev_list_get_entry(&file_list)) { - const char *filename = udev_list_entry_get_name(file_loop); -- unsigned int filename_off = udev_list_entry_get_flag(file_loop); -+ unsigned int filename_off = udev_list_entry_get_flags(file_loop); - - if (stat(filename, &statbuf) == 0 && statbuf.st_size > 0) - parse_file(rules, filename, filename_off); -@@ -2420,7 +2420,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - entry = udev_device_add_property(event->dev, name, temp_value); - /* store in db, skip private keys */ - if (name[0] != '.') -- udev_list_entry_set_flag(entry, 1); -+ udev_list_entry_set_flags(entry, 1); - } else { - udev_device_add_property(event->dev, name, NULL); - } -@@ -2542,7 +2542,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - list_entry = udev_list_entry_add(event->udev, &event->run_list, - &rules->buf[cur->key.value_off], NULL, 1, 0); - if (cur->key.fail_on_error) -- udev_list_entry_set_flag(list_entry, 1); -+ udev_list_entry_set_flags(list_entry, 1); - break; - } - case TK_A_GOTO: --- -1.6.6 - diff --git a/0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch b/0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch deleted file mode 100644 index 6a6a349..0000000 --- a/0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch +++ /dev/null @@ -1,65 +0,0 @@ -From a00ff5db021b50864ba50cce15865bca2d52f91f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 10 Mar 2010 15:00:00 +0100 -Subject: [PATCH 24/65] udevadm: monitor - use / as separator in --subsystem-match=subsystem[/devtype] - ---- - udev/udevadm-monitor.c | 12 ++++++------ - udev/udevadm.xml | 6 ++++++ - 2 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c -index 4063c48..d136c60 100644 ---- a/udev/udevadm-monitor.c -+++ b/udev/udevadm-monitor.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (C) 2004-2009 Kay Sievers -+ * Copyright (C) 2004-2010 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 -@@ -111,7 +111,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - char *devtype; - - util_strscpy(subsys, sizeof(subsys), optarg); -- devtype = strchr(subsys, ':'); -+ devtype = strchr(subsys, '/'); - if (devtype != NULL) { - devtype[0] = '\0'; - devtype++; -@@ -121,10 +121,10 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - } - case 'h': - printf("Usage: udevadm monitor [--property] [--kernel] [--udev] [--help]\n" -- " --property print the event properties\n" -- " --kernel print kernel uevents\n" -- " --udev print udev events\n" -- " --subsystem-match= filter events\n" -+ " --property print the event properties\n" -+ " --kernel print kernel uevents\n" -+ " --udev print udev events\n" -+ " --subsystem-match= filter events by subsystem\n" - " --help\n\n"); - default: - goto out; -diff --git a/udev/udevadm.xml b/udev/udevadm.xml -index ad49249..fa1742b 100644 ---- a/udev/udevadm.xml -+++ b/udev/udevadm.xml -@@ -350,6 +350,12 @@ - - - -+ -+ -+ Filter events by subsystem[/devtype]. Only udev events with a matching subsystem value will pass. -+ -+ -+ - - - Print help text. --- -1.6.6 - diff --git a/0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch b/0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch deleted file mode 100644 index be5f864..0000000 --- a/0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch +++ /dev/null @@ -1,81 +0,0 @@ -From af24bb178eec6adcf4f04d3b183cd50a831c8b7e Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 10 Mar 2010 17:29:27 +0100 -Subject: [PATCH 25/65] use major:minor as entries in symlink stack instead of devpath - ---- - udev/udev-node.c | 30 ++++++++++++++++-------------- - 1 files changed, 16 insertions(+), 14 deletions(-) - -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 23bfade..4314cce 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -245,28 +245,26 @@ static const char *link_find_prioritized(struct udev_device *dev, bool add, cons - for (;;) { - struct udev_device *dev_db; - struct dirent *dent; -- char devpath[UTIL_PATH_SIZE]; -- char syspath[UTIL_PATH_SIZE]; -- ssize_t len; -+ int maj, min; -+ char type, type2; -+ dev_t devnum; - - dent = readdir(dir); - if (dent == NULL || dent->d_name[0] == '\0') - break; - if (dent->d_name[0] == '.') - continue; -- dbg(udev, "found '%s/%s'\n", stackdir, dent->d_name); -- len = readlinkat(dirfd(dir), dent->d_name, devpath, sizeof(devpath)); -- if (len <= 0 || len == (ssize_t)sizeof(devpath)) -+ if (sscanf(dent->d_name, "%c%i:%i", &type, &maj, &min) != 3) - continue; -- devpath[len] = '\0'; -- util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); -- info(udev, "found '%s' claiming '%s'\n", syspath, stackdir); -+ info(udev, "found '%c%i:%i' claiming '%s'\n", type, maj, min, stackdir); -+ devnum = makedev(maj, min); - - /* did we find ourself? */ -- if (strcmp(udev_device_get_syspath(dev), syspath) == 0) -+ type2 = strcmp(udev_device_get_subsystem(dev), "block") == 0 ? 'b' : 'c'; -+ if (udev_device_get_devnum(dev) == devnum && type == type2) - continue; - -- dev_db = udev_device_new_from_syspath(udev, syspath); -+ dev_db = udev_device_new_from_devnum(udev, type, devnum); - if (dev_db != NULL) { - const char *devnode; - -@@ -276,7 +274,7 @@ static const char *link_find_prioritized(struct udev_device *dev, bool add, cons - udev_device_get_devnode(dev_db), udev_device_get_devlink_priority(dev_db)); - if (target == NULL || udev_device_get_devlink_priority(dev_db) > priority) { - info(udev, "'%s' claims priority %i for '%s'\n", -- syspath, udev_device_get_devlink_priority(dev_db), stackdir); -+ udev_device_get_syspath(dev_db), udev_device_get_devlink_priority(dev_db), stackdir); - priority = udev_device_get_devlink_priority(dev_db); - util_strscpy(buf, bufsize, devnode); - target = buf; -@@ -328,11 +326,15 @@ static void link_update(struct udev_device *dev, const char *slink, bool add) - - dbg(udev, "creating index: '%s'\n", filename); - do { -+ int fd; -+ - err = util_create_path(udev, filename); - if (err != 0 && err != -ENOENT) - break; -- err = symlink(udev_device_get_devpath(dev), filename); -- if (err != 0) -+ fd = open(filename, O_WRONLY|O_CREAT, 0444); -+ if (fd >= 0) -+ close(fd); -+ else - err = -errno; - } while (err == -ENOENT); - } --- -1.6.6 - diff --git a/0026-use-major-minor-as-entries-in-watch-directory.patch b/0026-use-major-minor-as-entries-in-watch-directory.patch deleted file mode 100644 index ceb2939..0000000 --- a/0026-use-major-minor-as-entries-in-watch-directory.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 777239cb211ade308abb0a2b57d055614061f417 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 10 Mar 2010 18:54:35 +0100 -Subject: [PATCH 26/65] use major:minor as entries in watch directory - ---- - udev/udev-watch.c | 47 +++++++++++++++++++++++++++++------------------ - 1 files changed, 29 insertions(+), 18 deletions(-) - -diff --git a/udev/udev-watch.c b/udev/udev-watch.c -index d67083b..7135d9f 100644 ---- a/udev/udev-watch.c -+++ b/udev/udev-watch.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (C) 2004-2008 Kay Sievers -+ * Copyright (C) 2004-2010 Kay Sievers - * Copyright (C) 2009 Canonical Ltd. - * Copyright (C) 2009 Scott James Remnant - * -@@ -72,29 +72,29 @@ void udev_watch_restore(struct udev *udev) - size_t l; - ssize_t len; - struct udev_device *dev; -+ int maj, min; -+ char type; - -- if (ent->d_name[0] < '0' || ent->d_name[0] > '9') -+ if (ent->d_name[0] == '.') - continue; - - s = device; - l = util_strpcpy(&s, sizeof(device), udev_get_sys_path(udev)); - len = readlinkat(dirfd(dir), ent->d_name, s, l); -- if (len <= 0 || len >= (ssize_t)l) { -- unlinkat(dirfd(dir), ent->d_name, 0); -- continue; -- } -+ if (len <= 0 || len >= (ssize_t)l) -+ goto unlink; - s[len] = '\0'; -- dbg(udev, "old watch to '%s' found\n", device); -- dev = udev_device_new_from_syspath(udev, device); -- if (dev == NULL) { -- unlinkat(dirfd(dir), ent->d_name, 0); -- continue; -- } -+ -+ if (sscanf(s, "%c%i:%i", &type, &maj, &min) != 3) -+ goto unlink; -+ dev = udev_device_new_from_devnum(udev, type, makedev(maj, min)); -+ if (dev == NULL) -+ goto unlink; - - info(udev, "restoring old watch on '%s'\n", udev_device_get_devnode(dev)); - udev_watch_begin(udev, dev); -- - udev_device_unref(dev); -+unlink: - unlinkat(dirfd(dir), ent->d_name, 0); - } - -@@ -109,6 +109,7 @@ void udev_watch_restore(struct udev *udev) - void udev_watch_begin(struct udev *udev, struct udev_device *dev) - { - char filename[UTIL_PATH_SIZE]; -+ char majmin[UTIL_PATH_SIZE]; - int wd; - - if (inotify_fd < 0) -@@ -122,10 +123,13 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev) - return; - } - -+ snprintf(majmin, sizeof(majmin), "%c%i:%i", -+ strcmp(udev_device_get_subsystem(dev), "block") == 0 ? 'b' : 'c', -+ major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev))); - snprintf(filename, sizeof(filename), "%s/.udev/watch/%d", udev_get_dev_path(udev), wd); - util_create_path(udev, filename); - unlink(filename); -- symlink(udev_device_get_devpath(dev), filename); -+ symlink(majmin, filename); - - udev_device_set_watch_handle(dev, wd); - } -@@ -154,20 +158,27 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev) - struct udev_device *udev_watch_lookup(struct udev *udev, int wd) - { - char filename[UTIL_PATH_SIZE]; -- char syspath[UTIL_PATH_SIZE]; -+ char majmin[UTIL_PATH_SIZE]; - char *s; - size_t l; - ssize_t len; -+ int maj, min; -+ char type; -+ dev_t devnum; - - if (inotify_fd < 0 || wd < 0) - return NULL; - - snprintf(filename, sizeof(filename), "%s/.udev/watch/%d", udev_get_dev_path(udev), wd); -- s = syspath; -- l = util_strpcpy(&s, sizeof(syspath), udev_get_sys_path(udev)); -+ s = majmin; -+ l = util_strpcpy(&s, sizeof(majmin), udev_get_sys_path(udev)); - len = readlink(filename, s, l); - if (len < 0 || (size_t)len >= l) - return NULL; - s[len] = '\0'; -- return udev_device_new_from_syspath(udev, syspath); -+ -+ if (sscanf(s, "%c%i:%i", &type, &maj, &min) != 3) -+ return NULL; -+ devnum = makedev(maj, min); -+ return udev_device_new_from_devnum(udev, type, devnum); - } --- -1.6.6 - diff --git a/0028-udev-needs-automake-1.10.patch b/0028-udev-needs-automake-1.10.patch deleted file mode 100644 index 9cd9024..0000000 --- a/0028-udev-needs-automake-1.10.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b41102757d9d1f71aa04f3d264d57d573360d957 Mon Sep 17 00:00:00 2001 -From: Adrian Bunk -Date: Thu, 11 Mar 2010 15:05:42 +0200 -Subject: [PATCH 28/65] udev needs automake 1.10 - -extras/gudev/docs/Makefile.am:4: require Automake 1.10, but have 1.9.6 -libudev/docs/Makefile.am:4: require Automake 1.10, but have 1.9.6 - -Signed-off-by: Martin Pitt ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 88824b6..d53dd12 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,6 +1,6 @@ - AC_INIT([udev], [152], [linux-hotplug@vger.kernel.org]) - AC_PREREQ(2.60) --AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2 subdir-objects]) -+AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects]) - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - AC_DISABLE_STATIC - AC_USE_SYSTEM_EXTENSIONS --- -1.6.6 - diff --git a/0029-firmware-fix-possible-segfault-when-firmware-device-.patch b/0029-firmware-fix-possible-segfault-when-firmware-device-.patch deleted file mode 100644 index e48406f..0000000 --- a/0029-firmware-fix-possible-segfault-when-firmware-device-.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d44c27c5ab71dbbcfcf4745977027502309dd795 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 16 Mar 2010 10:57:44 +0100 -Subject: [PATCH 29/65] firmware: fix possible segfault when firmware device goes away while loading - -Thanks to Ruediger Oertel. ---- - extras/firmware/firmware.c | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c -index 16455de..92f0918 100644 ---- a/extras/firmware/firmware.c -+++ b/extras/firmware/firmware.c -@@ -63,8 +63,10 @@ static bool copy_firmware(struct udev *udev, const char *source, const char *tar - if (fwrite(buf, size, 1, ftarget) == 1) - ret = true; - exit: -- fclose(ftarget); -- fclose(fsource); -+ if (ftarget != NULL) -+ fclose(ftarget); -+ if (fsource != NULL) -+ fclose(fsource); - free(buf); - return ret; - } -@@ -178,7 +180,8 @@ int main(int argc, char **argv) - if (unlink(misspath) == 0) - util_delete_path(udev, misspath); - -- set_loading(udev, loadpath, "1"); -+ if (!set_loading(udev, loadpath, "1")) -+ goto exit; - - util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); - if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) { --- -1.6.6 - diff --git a/0030-rules-input-create-by-path-links-for-pci-devices.patch b/0030-rules-input-create-by-path-links-for-pci-devices.patch deleted file mode 100644 index 836fad5..0000000 --- a/0030-rules-input-create-by-path-links-for-pci-devices.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6b32e8192934619f787c3b5b6f0fe40c32d7d94a Mon Sep 17 00:00:00 2001 -From: Marco d'Itri -Date: Tue, 16 Mar 2010 12:44:43 +0100 -Subject: [PATCH 30/65] rules: input - create by-path/ links for pci devices - ---- - rules/rules.d/60-persistent-input.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules -index e4675ae..1ea4431 100644 ---- a/rules/rules.d/60-persistent-input.rules -+++ b/rules/rules.d/60-persistent-input.rules -@@ -27,7 +27,7 @@ SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", A - SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}" - - # by-path --SUBSYSTEMS=="usb|platform", IMPORT{program}="path_id %p" -+SUBSYSTEMS=="pci|usb|platform", IMPORT{program}="path_id %p" - ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{.INPUT_CLASS}" - ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{.INPUT_CLASS}" - # allow empty class for platform and usb devices; platform supports only a single interface that way --- -1.6.6 - diff --git a/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch b/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch deleted file mode 100644 index cf17eed..0000000 --- a/0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2b463cb050cbf77d9c6b51e0f5a9d89bf7eb1bc3 Mon Sep 17 00:00:00 2001 -From: Marco d'Itri -Date: Tue, 16 Mar 2010 12:47:42 +0100 -Subject: [PATCH 31/65] Fix switching Logitech bluetooth adapters into hci mode. - -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567237 -https://bugs.launchpad.net/ubuntu/+source/udev/+bug/444420 ---- - extras/hid2hci/70-hid2hci.rules | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules -index e133afd..01ff30d 100644 ---- a/extras/hid2hci/70-hid2hci.rules -+++ b/extras/hid2hci/70-hid2hci.rules -@@ -10,8 +10,8 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt - ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ - RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" - --# Logitech devices (hidraw) --KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ -+# Logitech devices -+KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ - RUN+="hid2hci --method=logitech-hid --devpath=%p" - - ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" --- -1.6.6 - diff --git a/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch b/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch deleted file mode 100644 index 864f039..0000000 --- a/0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 578cc8a8085a47c963b5940459e475ac5f07219c Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 17 Mar 2010 09:15:18 +0100 -Subject: [PATCH 32/65] do not reset SELinux context when the node was not touched - ---- - udev/udev-node.c | 42 +++++++++++++++++------------------------- - 1 files changed, 17 insertions(+), 25 deletions(-) - -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 4314cce..3aee15b 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -37,7 +37,6 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod - { - struct udev *udev = udev_device_get_udev(dev); - struct stat stats; -- int preserve = 0; - int err = 0; - - if (major(devnum) == 0) -@@ -54,9 +53,15 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod - if (lstat(file, &stats) == 0) { - if (((stats.st_mode & S_IFMT) == (mode & S_IFMT)) && (stats.st_rdev == devnum)) { - info(udev, "preserve file '%s', because it has correct dev_t\n", file); -- preserve = 1; -- udev_selinux_lsetfilecon(udev, file, mode); -- /* update time stamp when we re-use the node, like on media change events */ -+ if (stats.st_mode != mode || stats.st_uid != uid || stats.st_gid != gid) { -+ info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); -+ chmod(file, mode); -+ chown(file, uid, gid); -+ udev_selinux_lsetfilecon(udev, file, mode); -+ } else { -+ info(udev, "preserve permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); -+ } -+ /* always update timestamp when we re-use the node, like on media change events */ - utimensat(AT_FDCWD, file, NULL, 0); - } else { - char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)]; -@@ -76,7 +81,11 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod - if (err != 0) { - err(udev, "rename(%s, %s) failed: %m\n", file_tmp, file); - unlink(file_tmp); -+ goto exit; - } -+ info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); -+ chmod(file, mode); -+ chown(file, uid, gid); - } - } else { - info(udev, "mknod(%s, %#o, (%u,%u))\n", file, mode, major(devnum), minor(devnum)); -@@ -90,28 +99,11 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod - err = -errno; - udev_selinux_resetfscreatecon(udev); - } while (err == -ENOENT); -- if (err != 0) { -+ if (err != 0) - err(udev, "mknod(%s, %#o, (%u,%u) failed: %m\n", file, mode, major(devnum), minor(devnum)); -- goto exit; -- } -- } -- -- if (!preserve || stats.st_mode != mode) { -- info(udev, "chmod(%s, %#o)\n", file, mode); -- err = chmod(file, mode); -- if (err != 0) { -- err(udev, "chmod(%s, %#o) failed: %m\n", file, mode); -- goto exit; -- } -- } -- -- if (!preserve || stats.st_uid != uid || stats.st_gid != gid) { -- info(udev, "chown(%s, %u, %u)\n", file, uid, gid); -- err = chown(file, uid, gid); -- if (err != 0) { -- err(udev, "chown(%s, %u, %u) failed: %m\n", file, uid, gid); -- goto exit; -- } -+ info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); -+ chmod(file, mode); -+ chown(file, uid, gid); - } - exit: - return err; --- -1.6.6 - diff --git a/0033-libudev-add-udev_device_new_from_environment.patch b/0033-libudev-add-udev_device_new_from_environment.patch deleted file mode 100644 index f84c44e..0000000 --- a/0033-libudev-add-udev_device_new_from_environment.patch +++ /dev/null @@ -1,480 +0,0 @@ -From fc8d61c53d6c181dc1e9f5a23c0f805c32a392af Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 17 Mar 2010 17:42:35 +0100 -Subject: [PATCH 33/65] libudev: add udev_device_new_from_environment() - ---- - extras/usb_id/usb_id.c | 34 ++++--- - libudev/docs/libudev-sections.txt | 1 + - libudev/exported_symbols | 1 + - libudev/libudev-device.c | 214 ++++++++++++++++++++++++++++--------- - libudev/libudev-monitor.c | 66 +----------- - libudev/libudev-private.h | 3 +- - libudev/libudev.h | 1 + - 7 files changed, 192 insertions(+), 128 deletions(-) - -diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c -index b412598..42ccddf 100644 ---- a/extras/usb_id/usb_id.c -+++ b/extras/usb_id/usb_id.c -@@ -456,8 +456,6 @@ int main(int argc, char **argv) - }; - struct udev *udev; - struct udev_device *dev = NULL; -- char syspath[UTIL_PATH_SIZE]; -- const char *devpath; - static int export; - int retval = 0; - -@@ -492,7 +490,7 @@ int main(int argc, char **argv) - export = 1; - break; - case 'h': -- printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help] \n" -+ printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help] []\n" - " --usb-info use usb strings instead\n" - " --num-info use numerical values\n" - " --export print values as environment keys\n" -@@ -503,18 +501,26 @@ int main(int argc, char **argv) - } - } - -- devpath = argv[optind]; -- if (devpath == NULL) { -- fprintf(stderr, "No device specified\n"); -- retval = 1; -- goto exit; -- } -- -- util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); -- dev = udev_device_new_from_syspath(udev, syspath); -+ dev = udev_device_new_from_environment(udev); - if (dev == NULL) { -- err(udev, "unable to access '%s'\n", devpath); -- return 1; -+ char syspath[UTIL_PATH_SIZE]; -+ const char *devpath; -+ -+ devpath = argv[optind]; -+ if (devpath == NULL) { -+ fprintf(stderr, "missing device\n"); -+ retval = 1; -+ goto exit; -+ } -+ -+ util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); -+ dev = udev_device_new_from_syspath(udev, syspath); -+ if (dev == NULL) { -+ err(udev, "unable to access '%s'\n", devpath); -+ retval = 1; -+ goto exit; -+ return 1; -+ } - } - - retval = usb_id(dev); -diff --git a/libudev/docs/libudev-sections.txt b/libudev/docs/libudev-sections.txt -index c11a273..ca781ff 100644 ---- a/libudev/docs/libudev-sections.txt -+++ b/libudev/docs/libudev-sections.txt -@@ -35,6 +35,7 @@ udev_device_get_udev - udev_device_new_from_syspath - udev_device_new_from_devnum - udev_device_new_from_subsystem_sysname -+udev_device_new_from_environment - udev_device_get_parent - udev_device_get_parent_with_subsystem_devtype - udev_device_get_devpath -diff --git a/libudev/exported_symbols b/libudev/exported_symbols -index f48025a..61486c6 100644 ---- a/libudev/exported_symbols -+++ b/libudev/exported_symbols -@@ -15,6 +15,7 @@ udev_list_entry_get_value - udev_device_new_from_syspath - udev_device_new_from_devnum - udev_device_new_from_subsystem_sysname -+udev_device_new_from_environment - udev_device_get_parent - udev_device_get_parent_with_subsystem_devtype - udev_device_ref -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index aec5fb5..fe45880 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -67,6 +68,7 @@ struct udev_device { - int refcount; - dev_t devnum; - int watch_handle; -+ int maj, min; - unsigned int parent_set:1; - unsigned int subsystem_set:1; - unsigned int devtype_set:1; -@@ -77,6 +79,130 @@ struct udev_device { - unsigned int ignore_remove:1; - }; - -+struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) -+{ -+ udev_device->envp_uptodate = 0; -+ if (value == NULL) { -+ struct udev_list_entry *list_entry; -+ -+ list_entry = udev_device_get_properties_list_entry(udev_device); -+ list_entry = udev_list_entry_get_by_name(list_entry, key); -+ if (list_entry != NULL) -+ udev_list_entry_delete(list_entry); -+ return NULL; -+ } -+ return udev_list_entry_add(udev_device->udev, &udev_device->properties_list, key, value, 1, 0); -+} -+ -+static struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property) -+{ -+ char name[UTIL_LINE_SIZE]; -+ char *val; -+ -+ util_strscpy(name, sizeof(name), property); -+ val = strchr(name, '='); -+ if (val == NULL) -+ return NULL; -+ val[0] = '\0'; -+ val = &val[1]; -+ if (val[0] == '\0') -+ val = NULL; -+ return udev_device_add_property(udev_device, name, val); -+} -+ -+/* -+ * parse property string, and if needed, update internal values accordingly -+ * -+ * udev_device_add_property_from_string_parse_finish() needs to be -+ * called after adding properties, and its return value checked -+ * -+ * udev_device_set_info_loaded() needs to be set, to avoid trying -+ * to use a device without a DEVPATH set -+ */ -+void udev_device_add_property_from_string_parse(struct udev_device *udev_device, const char *property) -+{ -+ if (strncmp(property, "DEVPATH=", 8) == 0) { -+ char path[UTIL_PATH_SIZE]; -+ -+ util_strscpyl(path, sizeof(path), udev_get_sys_path(udev_device->udev), &property[8], NULL); -+ udev_device_set_syspath(udev_device, path); -+ } else if (strncmp(property, "SUBSYSTEM=", 10) == 0) { -+ udev_device_set_subsystem(udev_device, &property[10]); -+ } else if (strncmp(property, "DEVTYPE=", 8) == 0) { -+ udev_device_set_devtype(udev_device, &property[8]); -+ } else if (strncmp(property, "DEVNAME=", 8) == 0) { -+ if (property[8] == '/') -+ udev_device_set_devnode(udev_device, &property[8]); -+ else -+ udev_device_set_knodename(udev_device, &property[8]); -+ } else if (strncmp(property, "DEVLINKS=", 9) == 0) { -+ char devlinks[UTIL_PATH_SIZE]; -+ char *slink; -+ char *next; -+ -+ util_strscpy(devlinks, sizeof(devlinks), &property[9]); -+ slink = devlinks; -+ next = strchr(slink, ' '); -+ while (next != NULL) { -+ next[0] = '\0'; -+ udev_device_add_devlink(udev_device, slink, 0); -+ slink = &next[1]; -+ next = strchr(slink, ' '); -+ } -+ if (slink[0] != '\0') -+ udev_device_add_devlink(udev_device, slink, 0); -+ } else if (strncmp(property, "DRIVER=", 7) == 0) { -+ udev_device_set_driver(udev_device, &property[7]); -+ } else if (strncmp(property, "ACTION=", 7) == 0) { -+ udev_device_set_action(udev_device, &property[7]); -+ } else if (strncmp(property, "MAJOR=", 6) == 0) { -+ udev_device->maj = strtoull(&property[6], NULL, 10); -+ } else if (strncmp(property, "MINOR=", 6) == 0) { -+ udev_device->min = strtoull(&property[6], NULL, 10); -+ } else if (strncmp(property, "DEVPATH_OLD=", 12) == 0) { -+ udev_device_set_devpath_old(udev_device, &property[12]); -+ } else if (strncmp(property, "SEQNUM=", 7) == 0) { -+ udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10)); -+ } else if (strncmp(property, "TIMEOUT=", 8) == 0) { -+ udev_device_set_timeout(udev_device, strtoull(&property[8], NULL, 10)); -+ } else { -+ udev_device_add_property_from_string(udev_device, property); -+ } -+} -+ -+int udev_device_add_property_from_string_parse_finish(struct udev_device *udev_device) -+{ -+ if (udev_device->maj > 0) -+ udev_device_set_devnum(udev_device, makedev(udev_device->maj, udev_device->min)); -+ udev_device->maj = 0; -+ udev_device->min = 0; -+ -+ if (udev_device->devpath == NULL || udev_device->subsystem == NULL) -+ return -EINVAL; -+ return 0; -+} -+ -+/** -+ * udev_device_get_property_value: -+ * @udev_device: udev device -+ * @key: property name -+ * -+ * Returns: the value of a device property, or #NULL if there is no such property. -+ **/ -+const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key) -+{ -+ struct udev_list_entry *list_entry; -+ -+ if (udev_device == NULL) -+ return NULL; -+ if (key == NULL) -+ return NULL; -+ -+ list_entry = udev_device_get_properties_list_entry(udev_device); -+ list_entry = udev_list_entry_get_by_name(list_entry, key); -+ return udev_list_entry_get_value(list_entry); -+} -+ - int udev_device_read_db(struct udev_device *udev_device) - { - struct stat stats; -@@ -451,6 +577,42 @@ found: - return udev_device_new_from_syspath(udev, path_full); - } - -+/** -+ * udev_device_new_from_environment -+ * @udev: udev library context -+ * -+ * Create new udev device, and fill in information from the -+ * current process environment. This only works reliable if -+ * the process is called from a udev rule. It is usually used -+ * for tools executed from IMPORT= rules. -+ * -+ * The initial refcount is 1, and needs to be decremented to -+ * release the resources of the udev device. -+ * -+ * Returns: a new udev device, or #NULL, if it does not exist -+ **/ -+struct udev_device *udev_device_new_from_environment(struct udev *udev) -+{ -+ int i; -+ struct udev_device *udev_device; -+ -+ udev_device = udev_device_new(udev); -+ if (udev_device == NULL) -+ return NULL; -+ udev_device_set_info_loaded(udev_device); -+ -+ for (i = 0; environ[i] != NULL; i++) -+ udev_device_add_property_from_string_parse(udev_device, environ[i]); -+ -+ if (udev_device_add_property_from_string_parse_finish(udev_device) < 0) { -+ info(udev, "missing values, invalid device\n"); -+ udev_device_unref(udev_device); -+ udev_device = NULL; -+ } -+ -+ return udev_device; -+} -+ - static struct udev_device *device_new_from_parent(struct udev_device *udev_device) - { - struct udev_device *udev_device_parent = NULL; -@@ -1072,58 +1234,6 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink - return 0; - } - --struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) --{ -- udev_device->envp_uptodate = 0; -- if (value == NULL) { -- struct udev_list_entry *list_entry; -- -- list_entry = udev_device_get_properties_list_entry(udev_device); -- list_entry = udev_list_entry_get_by_name(list_entry, key); -- if (list_entry != NULL) -- udev_list_entry_delete(list_entry); -- return NULL; -- } -- return udev_list_entry_add(udev_device->udev, &udev_device->properties_list, key, value, 1, 0); --} -- --struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property) --{ -- char name[UTIL_LINE_SIZE]; -- char *val; -- -- util_strscpy(name, sizeof(name), property); -- val = strchr(name, '='); -- if (val == NULL) -- return NULL; -- val[0] = '\0'; -- val = &val[1]; -- if (val[0] == '\0') -- val = NULL; -- return udev_device_add_property(udev_device, name, val); --} -- --/** -- * udev_device_get_property_value: -- * @udev_device: udev device -- * @key: property name -- * -- * Returns: the value of a device property, or #NULL if there is no such property. -- **/ --const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key) --{ -- struct udev_list_entry *list_entry; -- -- if (udev_device == NULL) -- return NULL; -- if (key == NULL) -- return NULL; -- -- list_entry = udev_device_get_properties_list_entry(udev_device); -- list_entry = udev_list_entry_get_by_name(list_entry, key); -- return udev_list_entry_get_value(list_entry); --} -- - #define ENVP_SIZE 128 - #define MONITOR_BUF_SIZE 4096 - static int update_envp_monitor_buf(struct udev_device *udev_device) -diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c -index 96c153f..97e52c4 100644 ---- a/libudev/libudev-monitor.c -+++ b/libudev/libudev-monitor.c -@@ -497,11 +497,6 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito - ssize_t buflen; - ssize_t bufpos; - struct udev_monitor_netlink_header *nlh; -- int devpath_set = 0; -- int subsystem_set = 0; -- int action_set = 0; -- int maj = 0; -- int min = 0; - - retry: - if (udev_monitor == NULL) -@@ -589,6 +584,7 @@ retry: - udev_device = udev_device_new(udev_monitor->udev); - if (udev_device == NULL) - return NULL; -+ udev_device_set_info_loaded(udev_device); - - while (bufpos < buflen) { - char *key; -@@ -599,60 +595,11 @@ retry: - if (keylen == 0) - break; - bufpos += keylen + 1; -- -- if (strncmp(key, "DEVPATH=", 8) == 0) { -- char path[UTIL_PATH_SIZE]; -- -- util_strscpyl(path, sizeof(path), udev_get_sys_path(udev_monitor->udev), &key[8], NULL); -- udev_device_set_syspath(udev_device, path); -- devpath_set = 1; -- } else if (strncmp(key, "SUBSYSTEM=", 10) == 0) { -- udev_device_set_subsystem(udev_device, &key[10]); -- subsystem_set = 1; -- } else if (strncmp(key, "DEVTYPE=", 8) == 0) { -- udev_device_set_devtype(udev_device, &key[8]); -- } else if (strncmp(key, "DEVNAME=", 8) == 0) { -- if (key[8] == '/') -- udev_device_set_devnode(udev_device, &key[8]); -- else -- udev_device_set_knodename(udev_device, &key[8]); -- } else if (strncmp(key, "DEVLINKS=", 9) == 0) { -- char devlinks[UTIL_PATH_SIZE]; -- char *slink; -- char *next; -- -- util_strscpy(devlinks, sizeof(devlinks), &key[9]); -- slink = devlinks; -- next = strchr(slink, ' '); -- while (next != NULL) { -- next[0] = '\0'; -- udev_device_add_devlink(udev_device, slink, 0); -- slink = &next[1]; -- next = strchr(slink, ' '); -- } -- if (slink[0] != '\0') -- udev_device_add_devlink(udev_device, slink, 0); -- } else if (strncmp(key, "DRIVER=", 7) == 0) { -- udev_device_set_driver(udev_device, &key[7]); -- } else if (strncmp(key, "ACTION=", 7) == 0) { -- udev_device_set_action(udev_device, &key[7]); -- action_set = 1; -- } else if (strncmp(key, "MAJOR=", 6) == 0) { -- maj = strtoull(&key[6], NULL, 10); -- } else if (strncmp(key, "MINOR=", 6) == 0) { -- min = strtoull(&key[6], NULL, 10); -- } else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) { -- udev_device_set_devpath_old(udev_device, &key[12]); -- } else if (strncmp(key, "SEQNUM=", 7) == 0) { -- udev_device_set_seqnum(udev_device, strtoull(&key[7], NULL, 10)); -- } else if (strncmp(key, "TIMEOUT=", 8) == 0) { -- udev_device_set_timeout(udev_device, strtoull(&key[8], NULL, 10)); -- } else { -- udev_device_add_property_from_string(udev_device, key); -- } -+ udev_device_add_property_from_string_parse(udev_device, key); - } -- if (!devpath_set || !subsystem_set || !action_set) { -- info(udev_monitor->udev, "missing values, skip\n"); -+ -+ if (udev_device_add_property_from_string_parse_finish(udev_device) < 0) { -+ info(udev_monitor->udev, "missing values, invalid device\n"); - udev_device_unref(udev_device); - return NULL; - } -@@ -673,9 +620,6 @@ retry: - return NULL; - } - -- if (maj > 0) -- udev_device_set_devnum(udev_device, makedev(maj, min)); -- udev_device_set_info_loaded(udev_device); - return udev_device; - } - -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 5ee0c58..3f2861f 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -71,7 +71,8 @@ int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode - int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink, int unique); - void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); - struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value); --struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property); -+void udev_device_add_property_from_string_parse(struct udev_device *udev_device, const char *property); -+int udev_device_add_property_from_string_parse_finish(struct udev_device *udev_device); - char **udev_device_get_properties_envp(struct udev_device *udev_device); - ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_device, const char **buf); - int udev_device_read_db(struct udev_device *udev_device); -diff --git a/libudev/libudev.h b/libudev/libudev.h -index 9576ad4..750664f 100644 ---- a/libudev/libudev.h -+++ b/libudev/libudev.h -@@ -75,6 +75,7 @@ struct udev *udev_device_get_udev(struct udev_device *udev_device); - struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath); - struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum); - struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname); -+struct udev_device *udev_device_new_from_environment(struct udev *udev); - /* udev_device_get_parent_*() does not take a reference on the returned device, it is automatically unref'd with the parent */ - struct udev_device *udev_device_get_parent(struct udev_device *udev_device); - struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, --- -1.6.6 - diff --git a/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch b/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch deleted file mode 100644 index 0d34327..0000000 --- a/0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 38a3cde11bc77af49a96245b8a8a0f2b583a344c Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 18 Mar 2010 11:14:32 +0100 -Subject: [PATCH 35/65] cdrom_id: open non-mounted optical media with O_EXCL - -This should prevent confusing drives during CD burning sessions. Based -on a patch from Harald Hoyer. ---- - extras/cdrom_id/cdrom_id.c | 26 +++++++++++++++++++++++++- - 1 files changed, 25 insertions(+), 1 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 2380b15..e485768 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -112,6 +112,30 @@ static unsigned long long int cd_media_session_last_offset; - #define ASC(errcode) (((errcode) >> 8) & 0xFF) - #define ASCQ(errcode) ((errcode) & 0xFF) - -+static int is_mounted(const char *device) -+{ -+ struct stat statbuf; -+ FILE *fp; -+ int maj, min; -+ int mounted = 0; -+ -+ if (stat(device, &statbuf) < 0) -+ return -ENODEV; -+ -+ fp = fopen("/proc/self/mountinfo", "r"); -+ if (fp == NULL) -+ return -ENOSYS; -+ while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { -+ printf("got %u %u\n", maj, min); -+ if (makedev(maj, min) == statbuf.st_rdev) { -+ mounted = 1; -+ break; -+ } -+ } -+ fclose(fp); -+ return mounted; -+} -+ - static void info_scsi_cmd_err(struct udev *udev, char *cmd, int err) - { - if (err == -1) { -@@ -568,7 +592,7 @@ int main(int argc, char *argv[]) - goto exit; - } - -- fd = open(node, O_RDONLY | O_NONBLOCK); -+ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); - if (fd < 0) { - info(udev, "unable to open '%s'\n", node); - fprintf(stderr, "unable to open '%s'\n", node); --- -1.6.6 - diff --git a/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch b/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch deleted file mode 100644 index d3cf673..0000000 --- a/0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch +++ /dev/null @@ -1,2142 +0,0 @@ -From 4dd9b291354e76f34b0d6d7b5c3b28d03a624418 Mon Sep 17 00:00:00 2001 -From: Dan Williams -Date: Thu, 18 Mar 2010 17:13:59 -0700 -Subject: [PATCH 36/65] modeswitch: morph into tool that only switches Mobile Action cables - -Remove option modeswitching code; use usb_modeswitch already, people. ---- - Makefile.am | 27 +- - extras/mobile-action-modeswitch/.gitignore | 1 + - .../61-mobile-action.rules | 15 + - extras/mobile-action-modeswitch/ma8280p_us.c | 462 ++++++++++++++++++++ - extras/mobile-action-modeswitch/ma8280p_us.h | 24 + - .../mobile-action-modeswitch.c | 262 +++++++++++ - extras/mobile-action-modeswitch/utils.c | 83 ++++ - extras/mobile-action-modeswitch/utils.h | 32 ++ - extras/modem-modeswitch/.gitignore | 1 - - extras/modem-modeswitch/61-mobile-action.rules | 15 - - .../61-option-modem-modeswitch.rules | 44 -- - extras/modem-modeswitch/ma8280p_us.c | 462 -------------------- - extras/modem-modeswitch/ma8280p_us.h | 24 - - extras/modem-modeswitch/modem-modeswitch.c | 266 ----------- - extras/modem-modeswitch/option.c | 131 ------ - extras/modem-modeswitch/option.h | 29 -- - extras/modem-modeswitch/utils.c | 83 ---- - extras/modem-modeswitch/utils.h | 32 -- - 18 files changed, 891 insertions(+), 1102 deletions(-) - create mode 100644 extras/mobile-action-modeswitch/.gitignore - create mode 100644 extras/mobile-action-modeswitch/61-mobile-action.rules - create mode 100644 extras/mobile-action-modeswitch/ma8280p_us.c - create mode 100644 extras/mobile-action-modeswitch/ma8280p_us.h - create mode 100644 extras/mobile-action-modeswitch/mobile-action-modeswitch.c - create mode 100644 extras/mobile-action-modeswitch/utils.c - create mode 100644 extras/mobile-action-modeswitch/utils.h - delete mode 100644 extras/modem-modeswitch/.gitignore - delete mode 100644 extras/modem-modeswitch/61-mobile-action.rules - delete mode 100644 extras/modem-modeswitch/61-option-modem-modeswitch.rules - delete mode 100644 extras/modem-modeswitch/ma8280p_us.c - delete mode 100644 extras/modem-modeswitch/ma8280p_us.h - delete mode 100644 extras/modem-modeswitch/modem-modeswitch.c - delete mode 100644 extras/modem-modeswitch/option.c - delete mode 100644 extras/modem-modeswitch/option.h - delete mode 100644 extras/modem-modeswitch/utils.c - delete mode 100644 extras/modem-modeswitch/utils.h - -diff --git a/Makefile.am b/Makefile.am -index 99a0133..68a68d9 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -448,24 +448,21 @@ extras_usb_db_pci_db_LDADD = libudev/libudev-private.la - libexec_PROGRAMS += extras/usb-db/pci-db - - # ------------------------------------------------------------------------------ --# modem-modeswitch - magic config switch for 3G modems --# ------------------------------------------------------------------------------ --extras_modem_modeswitch_modem_modeswitch_SOURCES =\ -- extras/modem-modeswitch/modem-modeswitch.c \ -- extras/modem-modeswitch/utils.c \ -- extras/modem-modeswitch/utils.h \ -- extras/modem-modeswitch/ma8280p_us.c \ -- extras/modem-modeswitch/ma8280p_us.h \ -- extras/modem-modeswitch/option.c \ -- extras/modem-modeswitch/option.h --extras_modem_modeswitch_modem_modeswitch_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) --extras_modem_modeswitch_modem_modeswitch_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS) -+# mobile-action-modeswitch - switch Mobile Action cables into serial mode -+# ------------------------------------------------------------------------------ -+extras_mobile_action_modeswitch_mobile_action_modeswitch_SOURCES =\ -+ extras/mobile-action-modeswitch/mobile-action-modeswitch.c \ -+ extras/mobile-action-modeswitch/utils.c \ -+ extras/mobile-action-modeswitch/utils.h \ -+ extras/mobile-action-modeswitch/ma8280p_us.c \ -+ extras/mobile-action-modeswitch/ma8280p_us.h -+extras_mobile_action_modeswitch_mobile_action_modeswitch_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) -+extras_mobile_action_modeswitch_mobile_action_modeswitch_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS) - - dist_udevrules_DATA += \ -- extras/modem-modeswitch/61-option-modem-modeswitch.rules \ -- extras/modem-modeswitch/61-mobile-action.rules -+ extras/mobile-action-modeswitch/61-mobile-action.rules - --libexec_PROGRAMS += extras/modem-modeswitch/modem-modeswitch -+libexec_PROGRAMS += extras/mobile-action-modeswitch/mobile-action-modeswitch - - # ------------------------------------------------------------------------------ - # keymap - map custom hardware's multimedia keys -diff --git a/extras/mobile-action-modeswitch/61-mobile-action.rules b/extras/mobile-action-modeswitch/61-mobile-action.rules -new file mode 100644 -index 0000000..0af27a5 ---- /dev/null -+++ b/extras/mobile-action-modeswitch/61-mobile-action.rules -@@ -0,0 +1,15 @@ -+ACTION!="add", GOTO="mobile_action_end" -+ -+# ATTENTION: DO NOT USE THIS FILE FOR ANYTHING EXCEPT -+# MOBILE ACTION CABLES. DO NOT USE IT FOR 3G DEVICES! -+ -+SUBSYSTEM=="usb", ATTR{bDeviceClass}=="00|ff", ATTR{bDeviceSubClass}=="00|ff", ENV{DEVTYPE}=="usb_device", GOTO="mobile_action_switch" -+GOTO="mobile_action_end" -+ -+LABEL="mobile_action_switch" -+ -+# Mobile Action cables like the 8280p and 8230p -+ATTRS{idVendor}=="0df7", ATTRS{idProduct}=="0800", RUN+="mobile-action-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t mobile-action-8280p" -+ -+LABEL="mobile_action_end" -+ -diff --git a/extras/mobile-action-modeswitch/ma8280p_us.c b/extras/mobile-action-modeswitch/ma8280p_us.c -new file mode 100644 -index 0000000..d7cf4f4 ---- /dev/null -+++ b/extras/mobile-action-modeswitch/ma8280p_us.c -@@ -0,0 +1,462 @@ -+/* http://www.natox.be/ma8280p/ -+ * http://www.leopold.dk/~martin/ma-8230p.html -+ * http://figvam.blogspot.com/2007/01/mobile-action-8730p-usb-cable-and-linux.html -+ */ -+ -+/* -+ * -+ * Code by davy hollevoet. This is simply an adaptation of code -+ * generated by usbsnoop2libusb. (http://iki.fi/lindi/usb/usbsnoop2libusb.pl) -+ * -+ * This code is released under both the GPL version 2 and BSD licenses. -+ * Either license may be used. -+ * -+ * GPLv2 -+ * ******** -+ * 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; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * In addition: -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote -+ * products derived from this software without specific prior written -+ * permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ * POSSIBILITY OF SUCH DAMAGE. -+ * -+ * BSD -+ * ****** -+ * Copyright (c) 1998, Regents of the University of California -+ * All rights reserved. -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * * Neither the name of the University of California, Berkeley nor the -+ * names of its contributors may be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY -+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY -+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ */ -+ -+/* This file is (mostly) generated with usbsnoop2libusb.pl from a usbsnoop log file. */ -+/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "utils.h" -+#include "ma8280p_us.h" -+ -+static void msleep(long msec) -+{ -+ struct timespec duration = { 0, msec * 1000 * 1000 }; -+ -+ nanosleep(&duration, NULL); -+} -+ -+int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev) -+{ -+ int ret = 1; -+ char *buf = NULL; -+ -+ buf = malloc (65535); -+ if (!buf) { -+ error ("%s: not enough memory", dev->filename, ret); -+ return -1; -+ } -+ -+ usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); -+ msleep(6); -+ usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); -+ msleep(6); -+ usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000400); -+ msleep(10); -+ ret = usb_release_interface(devh, 0); -+ if (ret != 0) -+ debug ("%s: failed to release interface before set_configuration: %d", dev->filename, ret); -+ usb_set_configuration(devh, 0x0000001); -+ ret = usb_claim_interface(devh, 0); -+ if (ret != 0) -+ debug ("%s: claim after set_configuration failed with error %d", dev->filename, ret); -+ //usb_set_altinterface(devh, 0); -+ //msleep(33); -+ usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE + USB_ENDPOINT_IN, 0x0000001, 0x0000300, 0x0000000, buf, 0x0000008, 1000); -+ msleep(5); -+ memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); -+ usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); -+ msleep(4); -+ memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); -+ usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); -+ msleep(4); -+ -+ msleep(4); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(6); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -+ msleep(4); -+ memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(3); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(7); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(7); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(2); -+ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -+ msleep(4); -+ memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(2); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(7); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(7); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(8); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -+ msleep(4); -+ memcpy(buf, "\x33\x04\xfe\x00\xf4\x6c\x1f\xf0", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(3); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ msleep(1); -+ //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -+ msleep(4); -+ memcpy(buf, "\x32\x07\xfe\xf0\x29\xb9\x3a\xf0", 0x0000008); -+ usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -+ msleep(3); -+ usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -+ -+ if (buf) -+ free (buf); -+ return 0; -+} -diff --git a/extras/mobile-action-modeswitch/ma8280p_us.h b/extras/mobile-action-modeswitch/ma8280p_us.h -new file mode 100644 -index 0000000..bf0e304 ---- /dev/null -+++ b/extras/mobile-action-modeswitch/ma8280p_us.h -@@ -0,0 +1,24 @@ -+/* -+ * Modem mode switcher -+ * -+ * Copyright (C) 2009 Dan Williams -+ * -+ * 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; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details: -+ */ -+ -+#ifndef __MA8280P_H__ -+#define __MA8280P_H__ -+ -+#include -+ -+int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev); -+ -+#endif /* __MA8280P_H__ */ -diff --git a/extras/mobile-action-modeswitch/mobile-action-modeswitch.c b/extras/mobile-action-modeswitch/mobile-action-modeswitch.c -new file mode 100644 -index 0000000..36d7d81 ---- /dev/null -+++ b/extras/mobile-action-modeswitch/mobile-action-modeswitch.c -@@ -0,0 +1,262 @@ -+/* -+ * Mobile action cable mode switcher -+ * -+ * Copyright (C) 2008 - 2010 Dan Williams -+ * Copyright (C) 2008 Peter Henn -+ * -+ * Heavily based on the 'ozerocdoff' tool by Peter Henn. -+ * -+ * 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; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details: -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include "utils.h" -+ -+#include "ma8280p_us.h" -+ -+struct usb_dev_handle *handle = NULL; -+ -+typedef struct usb_device * (*FindFunc) (int vid, int pid); -+typedef int (*SwitchFunc) (struct usb_dev_handle *dh, struct usb_device *dev); -+ -+typedef enum { -+ ST_UNKNOWN = 0, -+ ST_MA8280P -+} SwitchType; -+ -+typedef struct SwitchEntry { -+ SwitchType st; -+ const char *clopt; -+ FindFunc find_func; -+ SwitchFunc switch_func; -+} SwitchEntry; -+ -+static SwitchEntry switch_types[] = { -+ { ST_MA8280P, "mobile-action-8280p", NULL, ma8280p_switch }, -+ { ST_UNKNOWN, NULL, NULL } -+}; -+ -+static struct usb_device * -+generic_find (int vid, int pid) -+{ -+ struct usb_bus *bus; -+ struct usb_device *dev; -+ -+ for (bus = usb_get_busses(); bus; bus = bus->next) { -+ for (dev = bus->devices; dev; dev = dev->next) { -+ if (dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { -+ debug ("Found device '%s'", dev->filename); -+ return dev; -+ } -+ } -+ } -+ return NULL; -+} -+ -+static void -+release_usb_device (int param) -+{ -+ usb_release_interface (handle, 0); -+ usb_close (handle); -+} -+ -+static void -+print_usage (void) -+{ -+ printf ("Usage: mobile-action-modeswitch [-hdq] [-l ] -v -p -t \n" -+ " -h, --help show this help message\n" -+ " -v, --vendor target USB vendor ID\n" -+ " -p, --product target USB product ID\n" -+ " -t, --type type of switch to attempt, varies by device:\n" -+ " mobile-action-8280p - For Mobile Action 8xxxP USB cables\n" -+ " -l, --log log output to a file\n" -+ " -q, --quiet don't print anything to stdout\n" -+ " -d, --debug display debugging messages\n\n" -+ "Examples:\n" -+ " mobile-action-modeswitch -v 0x0df7 -p 0x8000 -t mobile-action-8280p\n"); -+} -+ -+static SwitchEntry * -+parse_type (const char *s) -+{ -+ SwitchEntry *entry = &switch_types[0]; -+ -+ while (entry->clopt) { -+ if (!strcmp (entry->clopt, s)) -+ return entry; -+ entry++; -+ } -+ -+ return NULL; -+} -+ -+static void -+do_exit (int val) -+{ -+ log_shutdown (); -+ exit (val); -+} -+ -+int main(int argc, char **argv) -+{ -+ static struct option options[] = { -+ { "help", no_argument, NULL, 'h' }, -+ { "vendor", required_argument, NULL, 'v' }, -+ { "product", required_argument, NULL, 'p' }, -+ { "type", required_argument, NULL, 't' }, -+ { "log", required_argument, NULL, 'l' }, -+ { "debug", no_argument, NULL, 'd' }, -+ { "quiet", no_argument, NULL, 'q' }, -+ { NULL, 0, NULL, 0} -+ }; -+ -+ struct usb_device *dev; -+ int vid = 0, pid = 0; -+ const char *logpath = NULL; -+ char buffer[256]; -+ int ret, quiet = 0, debug = 0; -+ SwitchEntry *sentry = NULL; -+ -+ while (1) { -+ int option; -+ -+ option = getopt_long(argc, argv, "hv:p:l:t:dq", options, NULL); -+ if (option == -1) -+ break; -+ -+ switch (option) { -+ case 'v': -+ vid = strtol (optarg, NULL, 0); -+ break; -+ case 'p': -+ pid = strtol (optarg, NULL, 0); -+ break; -+ case 't': -+ sentry = parse_type (optarg); -+ if (!sentry) { -+ error ("unknown switch type '%s'", optarg); -+ print_usage (); -+ exit (1); -+ } -+ break; -+ case 'l': -+ logpath = optarg; -+ break; -+ case 'q': -+ quiet = 1; -+ break; -+ case 'd': -+ debug = 1; -+ break; -+ case 'h': -+ default: -+ print_usage (); -+ exit (1); -+ } -+ } -+ -+ if (log_startup (logpath, debug, quiet)) { -+ fprintf (stderr, "Couldn't open/create logfile %s", logpath); -+ exit (2); -+ } -+ -+ if (!sentry) { -+ if (!quiet) -+ print_usage (); -+ else -+ error ("missing device switch type."); -+ do_exit (3); -+ } -+ -+ if (!vid || !pid) { -+ if (!quiet) -+ print_usage (); -+ else -+ error ("missing vendor and device IDs."); -+ do_exit (3); -+ } -+ -+ usb_init(); -+ -+ if (usb_find_busses() < 0) { -+ error ("no USB busses found."); -+ do_exit (4); -+ } -+ -+ if (usb_find_devices() < 0) { -+ error ("no USB devices found."); -+ do_exit (4); -+ } -+ -+ if (sentry->find_func) -+ dev = (*sentry->find_func) (vid, pid); -+ else -+ dev = generic_find (vid, pid); -+ if (dev == NULL) { -+ error ("no device found."); -+ do_exit (5); -+ } -+ -+ handle = usb_open (dev); -+ if (handle == NULL) { -+ error ("%s: could not access the device.", -+ dev->filename); -+ do_exit (6); -+ } -+ -+ /* detach running default driver */ -+ signal (SIGTERM, release_usb_device); -+ ret = usb_get_driver_np (handle, 0, buffer, sizeof (buffer)); -+ if (ret == 0) { -+ debug ("%s: found already attached driver '%s'", dev->filename, buffer); -+ -+ ret = usb_detach_kernel_driver_np (handle, 0); -+ if (ret != 0) { -+ debug ("%s: error: unable to detach current driver.", dev->filename); -+ usb_close (handle); -+ do_exit (7); -+ } -+ } -+ -+ ret = usb_claim_interface (handle, 0); -+ if (ret != 0) { -+ debug ("%s: couldn't claim device's USB interface: %d.", -+ dev->filename, ret); -+ usb_close (handle); -+ do_exit (8); -+ } -+ -+ ret = (*sentry->switch_func) (handle, dev); -+ if (ret < 0) { -+ debug ("%s: failed to switch device to serial mode.", dev->filename); -+ usb_release_interface (handle, 0); -+ usb_close (handle); -+ do_exit(9); -+ } -+ -+ usb_release_interface (handle, 0); -+ -+ ret = usb_close (handle); -+ if (ret < 0) -+ debug ("%s: failed to close the device.", dev->filename); -+ -+ do_exit (0); -+ return 0; -+} -diff --git a/extras/mobile-action-modeswitch/utils.c b/extras/mobile-action-modeswitch/utils.c -new file mode 100644 -index 0000000..37d0df4 ---- /dev/null -+++ b/extras/mobile-action-modeswitch/utils.c -@@ -0,0 +1,83 @@ -+/* -+ * Modem mode switcher -+ * -+ * Copyright (C) 2009 Dan Williams -+ * -+ * 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; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details: -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "utils.h" -+ -+static int debug_on = 0; -+static int quiet = 0; -+FILE *logfile = NULL; -+ -+void -+do_log (int level, const char *fmt, ...) -+{ -+ va_list args; -+ char buffer[1024]; -+ char tag = 'L'; -+ -+ if (level >= LOG_DBG && !debug_on) -+ return; -+ -+ va_start (args, fmt); -+ vsnprintf (buffer, sizeof (buffer), fmt, args); -+ va_end (args); -+ -+ if (level == LOG_ERR) -+ tag = 'E'; -+ else if (level == LOG_MSG) -+ tag = 'L'; -+ else if (level == LOG_DBG) -+ tag = 'D'; -+ -+ if (logfile) -+ fprintf (logfile, "%c: %s\n", tag, buffer); -+ if (!quiet) -+ fprintf ((level == LOG_ERR) ? stderr : stdout, "%c: %s\n", tag, buffer); -+} -+ -+int -+log_startup (const char *path, int do_debug, int be_quiet) -+{ -+ time_t t; -+ -+ quiet = be_quiet; -+ debug_on = do_debug; -+ -+ if (!path) -+ return 0; -+ -+ logfile = fopen (path, "a+"); -+ if (!logfile) -+ return 1; -+ -+ t = time (NULL); -+ message ("\n**** Started: %s\n", ctime (&t)); -+ return 0; -+} -+ -+void -+log_shutdown (void) -+{ -+ if (logfile) -+ fclose (logfile); -+} -+ -diff --git a/extras/mobile-action-modeswitch/utils.h b/extras/mobile-action-modeswitch/utils.h -new file mode 100644 -index 0000000..1ef557a ---- /dev/null -+++ b/extras/mobile-action-modeswitch/utils.h -@@ -0,0 +1,32 @@ -+/* -+ * Modem mode switcher -+ * -+ * Copyright (C) 2009 Dan Williams -+ * -+ * 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; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details: -+ */ -+ -+#ifndef __UTILS_H__ -+#define __UTILS_H__ -+ -+#define LOG_ERR 0 -+#define LOG_MSG 1 -+#define LOG_DBG 2 -+ -+#define message(fmt, args...) do_log (LOG_MSG, fmt, ##args); -+#define error(fmt, args...) do_log (LOG_ERR, fmt, ##args); -+#define debug(fmt, args...) do_log (LOG_DBG, fmt, ##args); -+ -+void do_log (int level, const char *fmt, ...); -+int log_startup (const char *path, int do_debug, int be_quiet); -+void log_shutdown (void); -+ -+#endif /* __UTILS_H__ */ -diff --git a/extras/modem-modeswitch/61-mobile-action.rules b/extras/modem-modeswitch/61-mobile-action.rules -deleted file mode 100644 -index 29d460d..0000000 ---- a/extras/modem-modeswitch/61-mobile-action.rules -+++ /dev/null -@@ -1,15 +0,0 @@ --ACTION!="add", GOTO="mobile_action_end" -- --SUBSYSTEM=="usb", ATTR{bDeviceClass}=="00|ff", ATTR{bDeviceSubClass}=="00|ff", ENV{DEVTYPE}=="usb_device", GOTO="mobile_action_switch" --GOTO="mobile_action_end" -- --LABEL="mobile_action_switch" --ATTRS{idVendor}=="0df7", ATTRS{idProduct}=="0800", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t mobile-action-8280p" -- --LABEL="mobile_action_end" -- --# modem-modeswitch does not work with these devices, the fake CD-ROM needs to be ejected -- --# ZTE MF6xx --ACTION=="add", ENV{ID_CDROM}=="1", ENV{ID_VENDOR_ID}=="19d2", ENV{ID_MODEL_ID}=="2000", RUN+="/usr/bin/eject %k" -- -diff --git a/extras/modem-modeswitch/61-option-modem-modeswitch.rules b/extras/modem-modeswitch/61-option-modem-modeswitch.rules -deleted file mode 100644 -index 053733e..0000000 ---- a/extras/modem-modeswitch/61-option-modem-modeswitch.rules -+++ /dev/null -@@ -1,44 +0,0 @@ --# NOTE: only for devices manufactured by Option NV --# DO NOT add devices that are not manufactured by Option NV -- --ACTION!="add", GOTO="option_zerocd_end" -- --SUBSYSTEM=="usb", ATTR{bDeviceClass}!="ff", ENV{DEVTYPE}=="usb_device", GOTO="option_zerocd_disable" --SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", GOTO="option_zerocd_disable" --GOTO="option_zerocd_end" -- --LABEL="option_zerocd_disable" --ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6711", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6711", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6731", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6751", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6771", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6791", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6811", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6911", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6951", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="6971", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7011", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7031", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7051", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7071", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7111", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7211", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7251", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7271", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7311", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="c031", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="d031", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="d033", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7301", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7361", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7401", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7501", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" --ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" -- --# NOTE: only for devices manufactured by Option NV --# DO NOT add devices that are not manufactured by Option NV -- --LABEL="option_zerocd_end" -diff --git a/extras/modem-modeswitch/ma8280p_us.c b/extras/modem-modeswitch/ma8280p_us.c -deleted file mode 100644 -index d7cf4f4..0000000 ---- a/extras/modem-modeswitch/ma8280p_us.c -+++ /dev/null -@@ -1,462 +0,0 @@ --/* http://www.natox.be/ma8280p/ -- * http://www.leopold.dk/~martin/ma-8230p.html -- * http://figvam.blogspot.com/2007/01/mobile-action-8730p-usb-cable-and-linux.html -- */ -- --/* -- * -- * Code by davy hollevoet. This is simply an adaptation of code -- * generated by usbsnoop2libusb. (http://iki.fi/lindi/usb/usbsnoop2libusb.pl) -- * -- * This code is released under both the GPL version 2 and BSD licenses. -- * Either license may be used. -- * -- * GPLv2 -- * ******** -- * 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; either version 2 -- * of the License, or (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * In addition: -- * -- * Redistribution and use in source and binary forms, with or without -- * modification, are permitted provided that the following conditions -- * are met: -- * -- * 1. Redistributions of source code must retain the above copyright -- * notice, this list of conditions and the following disclaimer. -- * 2. Redistributions in binary form must reproduce the above copyright -- * notice, this list of conditions and the following disclaimer in the -- * documentation and/or other materials provided with the distribution. -- * 3. The name of the author may not be used to endorse or promote -- * products derived from this software without specific prior written -- * permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- * POSSIBILITY OF SUCH DAMAGE. -- * -- * BSD -- * ****** -- * Copyright (c) 1998, Regents of the University of California -- * All rights reserved. -- * Redistribution and use in source and binary forms, with or without -- * modification, are permitted provided that the following conditions are met: -- * -- * * Redistributions of source code must retain the above copyright -- * notice, this list of conditions and the following disclaimer. -- * * Redistributions in binary form must reproduce the above copyright -- * notice, this list of conditions and the following disclaimer in the -- * documentation and/or other materials provided with the distribution. -- * * Neither the name of the University of California, Berkeley nor the -- * names of its contributors may be used to endorse or promote products -- * derived from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY -- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY -- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- * -- */ -- --/* This file is (mostly) generated with usbsnoop2libusb.pl from a usbsnoop log file. */ --/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */ --#include --#include --#include --#include --#include --#include --#include --#include -- --#include "utils.h" --#include "ma8280p_us.h" -- --static void msleep(long msec) --{ -- struct timespec duration = { 0, msec * 1000 * 1000 }; -- -- nanosleep(&duration, NULL); --} -- --int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev) --{ -- int ret = 1; -- char *buf = NULL; -- -- buf = malloc (65535); -- if (!buf) { -- error ("%s: not enough memory", dev->filename, ret); -- return -1; -- } -- -- usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); -- msleep(6); -- usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); -- msleep(6); -- usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000400); -- msleep(10); -- ret = usb_release_interface(devh, 0); -- if (ret != 0) -- debug ("%s: failed to release interface before set_configuration: %d", dev->filename, ret); -- usb_set_configuration(devh, 0x0000001); -- ret = usb_claim_interface(devh, 0); -- if (ret != 0) -- debug ("%s: claim after set_configuration failed with error %d", dev->filename, ret); -- //usb_set_altinterface(devh, 0); -- //msleep(33); -- usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE + USB_ENDPOINT_IN, 0x0000001, 0x0000300, 0x0000000, buf, 0x0000008, 1000); -- msleep(5); -- memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); -- usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); -- msleep(4); -- memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); -- usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); -- msleep(4); -- -- msleep(4); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(6); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -- msleep(4); -- memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(3); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(7); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(7); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(2); -- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -- msleep(4); -- memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(2); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(7); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(7); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(8); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -- msleep(4); -- memcpy(buf, "\x33\x04\xfe\x00\xf4\x6c\x1f\xf0", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(3); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- msleep(1); -- //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped -- msleep(4); -- memcpy(buf, "\x32\x07\xfe\xf0\x29\xb9\x3a\xf0", 0x0000008); -- usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); -- msleep(3); -- usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); -- -- if (buf) -- free (buf); -- return 0; --} -diff --git a/extras/modem-modeswitch/ma8280p_us.h b/extras/modem-modeswitch/ma8280p_us.h -deleted file mode 100644 -index bf0e304..0000000 ---- a/extras/modem-modeswitch/ma8280p_us.h -+++ /dev/null -@@ -1,24 +0,0 @@ --/* -- * Modem mode switcher -- * -- * Copyright (C) 2009 Dan Williams -- * -- * 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; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details: -- */ -- --#ifndef __MA8280P_H__ --#define __MA8280P_H__ -- --#include -- --int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev); -- --#endif /* __MA8280P_H__ */ -diff --git a/extras/modem-modeswitch/modem-modeswitch.c b/extras/modem-modeswitch/modem-modeswitch.c -deleted file mode 100644 -index a60ce7a..0000000 ---- a/extras/modem-modeswitch/modem-modeswitch.c -+++ /dev/null -@@ -1,266 +0,0 @@ --/* -- * Modem mode switcher -- * -- * Copyright (C) 2008 Dan Williams -- * Copyright (C) 2008 Peter Henn -- * -- * Heavily based on the 'ozerocdoff' tool by Peter Henn. -- * -- * 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; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details: -- */ -- --#include --#include --#include --#include --#include --#include --#include -- --#include -- --#include "utils.h" -- --#include "ma8280p_us.h" --#include "option.h" -- --struct usb_dev_handle *handle = NULL; -- --typedef struct usb_device * (*FindFunc) (int vid, int pid); --typedef int (*SwitchFunc) (struct usb_dev_handle *dh, struct usb_device *dev); -- --typedef enum { -- ST_UNKNOWN = 0, -- ST_OPTION_ZEROCD, -- ST_MA8280P --} SwitchType; -- --typedef struct SwitchEntry { -- SwitchType st; -- const char *clopt; -- FindFunc find_func; -- SwitchFunc switch_func; --} SwitchEntry; -- --static SwitchEntry switch_types[] = { -- { ST_OPTION_ZEROCD, "option-zerocd", option_zerocd_find, option_zerocd_switch }, -- { ST_MA8280P, "mobile-action-8280p", NULL, ma8280p_switch }, -- { ST_UNKNOWN, NULL, NULL } --}; -- --static struct usb_device * --generic_find (int vid, int pid) --{ -- struct usb_bus *bus; -- struct usb_device *dev; -- -- for (bus = usb_get_busses(); bus; bus = bus->next) { -- for (dev = bus->devices; dev; dev = dev->next) { -- if (dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { -- debug ("Found device '%s'", dev->filename); -- return dev; -- } -- } -- } -- return NULL; --} -- --static void --release_usb_device (int param) --{ -- usb_release_interface (handle, 0); -- usb_close (handle); --} -- --static void --print_usage (void) --{ -- printf ("Usage: modem-modeswitch [-hdq] [-l ] -v -p -t \n" -- " -h, --help show this help message\n" -- " -v, --vendor target USB vendor ID\n" -- " -p, --product target USB product ID\n" -- " -t, --type type of switch to attempt, varies by device:\n" -- " option-zerocd - For many newer Option N.V. devices\n" -- " mobile-action-8280p - For Mobile Action 8xxxP USB cables\n" -- " -l, --log log output to a file\n" -- " -q, --quiet don't print anything to stdout\n" -- " -d, --debug display debugging messages\n\n" -- "Examples:\n" -- " modem-modeswitch -v 0x0af0 -p 0xc031 -t option-zerocd\n"); --} -- --static SwitchEntry * --parse_type (const char *s) --{ -- SwitchEntry *entry = &switch_types[0]; -- -- while (entry->clopt) { -- if (!strcmp (entry->clopt, s)) -- return entry; -- entry++; -- } -- -- return NULL; --} -- --static void --do_exit (int val) --{ -- log_shutdown (); -- exit (val); --} -- --int main(int argc, char **argv) --{ -- static struct option options[] = { -- { "help", no_argument, NULL, 'h' }, -- { "vendor", required_argument, NULL, 'v' }, -- { "product", required_argument, NULL, 'p' }, -- { "type", required_argument, NULL, 't' }, -- { "log", required_argument, NULL, 'l' }, -- { "debug", no_argument, NULL, 'd' }, -- { "quiet", no_argument, NULL, 'q' }, -- { NULL, 0, NULL, 0} -- }; -- -- struct usb_device *dev; -- int vid = 0, pid = 0; -- const char *logpath = NULL; -- char buffer[256]; -- int ret, quiet = 0, debug = 0; -- SwitchEntry *sentry = NULL; -- -- while (1) { -- int option; -- -- option = getopt_long(argc, argv, "hv:p:l:t:dq", options, NULL); -- if (option == -1) -- break; -- -- switch (option) { -- case 'v': -- vid = strtol (optarg, NULL, 0); -- break; -- case 'p': -- pid = strtol (optarg, NULL, 0); -- break; -- case 't': -- sentry = parse_type (optarg); -- if (!sentry) { -- error ("unknown switch type '%s'", optarg); -- print_usage (); -- exit (1); -- } -- break; -- case 'l': -- logpath = optarg; -- break; -- case 'q': -- quiet = 1; -- break; -- case 'd': -- debug = 1; -- break; -- case 'h': -- default: -- print_usage (); -- exit (1); -- } -- } -- -- if (log_startup (logpath, debug, quiet)) { -- fprintf (stderr, "Couldn't open/create logfile %s", logpath); -- exit (2); -- } -- -- if (!sentry) { -- if (!quiet) -- print_usage (); -- else -- error ("missing device switch type."); -- do_exit (3); -- } -- -- if (!vid || !pid) { -- if (!quiet) -- print_usage (); -- else -- error ("missing vendor and device IDs."); -- do_exit (3); -- } -- -- usb_init(); -- -- if (usb_find_busses() < 0) { -- error ("no USB busses found."); -- do_exit (4); -- } -- -- if (usb_find_devices() < 0) { -- error ("no USB devices found."); -- do_exit (4); -- } -- -- if (sentry->find_func) -- dev = (*sentry->find_func) (vid, pid); -- else -- dev = generic_find (vid, pid); -- if (dev == NULL) { -- error ("no device found."); -- do_exit (5); -- } -- -- handle = usb_open (dev); -- if (handle == NULL) { -- error ("%s: could not access the device.", -- dev->filename); -- do_exit (6); -- } -- -- /* detach running default driver */ -- signal (SIGTERM, release_usb_device); -- ret = usb_get_driver_np (handle, 0, buffer, sizeof (buffer)); -- if (ret == 0) { -- debug ("%s: found already attached driver '%s'", dev->filename, buffer); -- -- ret = usb_detach_kernel_driver_np (handle, 0); -- if (ret != 0) { -- debug ("%s: error: unable to detach current driver.", dev->filename); -- usb_close (handle); -- do_exit (7); -- } -- } -- -- ret = usb_claim_interface (handle, 0); -- if (ret != 0) { -- debug ("%s: couldn't claim device's USB interface: %d.", -- dev->filename, ret); -- usb_close (handle); -- do_exit (8); -- } -- -- ret = (*sentry->switch_func) (handle, dev); -- if (ret < 0) { -- debug ("%s: failed to switch device to modem mode.", dev->filename); -- usb_release_interface (handle, 0); -- usb_close (handle); -- do_exit(9); -- } -- -- usb_release_interface (handle, 0); -- -- ret = usb_close (handle); -- if (ret < 0) -- debug ("%s: failed to close the device.", dev->filename); -- -- do_exit (0); -- return 0; --} -diff --git a/extras/modem-modeswitch/option.c b/extras/modem-modeswitch/option.c -deleted file mode 100644 -index 5b299fd..0000000 ---- a/extras/modem-modeswitch/option.c -+++ /dev/null -@@ -1,131 +0,0 @@ --/* -- * Modem mode switcher -- * -- * Copyright (C) 2008 Dan Williams -- * Copyright (C) 2008 Peter Henn -- * -- * Heavily based on the 'ozerocdoff' tool by Peter Henn. -- * -- * 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; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details: -- */ -- --#include -- --#include "utils.h" --#include "option.h" -- --/* Borrowed from /usr/include/linux/usb/ch9.h */ --#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ --#define USB_ENDPOINT_XFER_BULK 2 --#define USB_ENDPOINT_DIR_MASK 0x80 --#define USB_DIR_OUT 0 /* to device */ --#define USB_DIR_IN 0x80 /* to host */ -- --struct usb_device * --option_zerocd_find (int vid, int pid) --{ -- struct usb_bus *bus; -- struct usb_device *dev; -- -- for (bus = usb_get_busses(); bus; bus = bus->next) { -- for (dev = bus->devices; dev; dev = dev->next) { -- if (dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { -- debug ("Found mass storage device:"); -- debug (" Endpoints: %d", dev->config[0].interface[0].altsetting[0].bNumEndpoints); -- debug (" Class: 0x%X", dev->config[0].interface[0].altsetting[0].bInterfaceClass); -- debug (" SubClass: 0x%X", dev->config[0].interface[0].altsetting[0].bInterfaceSubClass); -- debug (" Protocol: 0x%X", dev->config[0].interface[0].altsetting[0].bInterfaceProtocol); -- -- if ( (dev->config[0].interface[0].altsetting[0].bNumEndpoints == 2) -- && (dev->config[0].interface[0].altsetting[0].bInterfaceClass == 0x08) -- && (dev->config[0].interface[0].altsetting[0].bInterfaceSubClass == 0x06) -- && (dev->config[0].interface[0].altsetting[0].bInterfaceProtocol == 0x50) ) { -- debug ("Found modem mass storage device '%s'", dev->filename); -- return dev; -- } -- } -- } -- } -- return NULL; --} -- --static int --find_endpoints (struct usb_device *dev, int *in_ep, int *out_ep) --{ -- int i; -- -- for (i = 0; i < dev->config[0].interface[0].altsetting[0].bNumEndpoints; i++) { -- struct usb_endpoint_descriptor *ep = &(dev->config[0].interface[0].altsetting[0].endpoint[i]); -- -- if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) { -- unsigned int direction = ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK; -- -- if (!*out_ep && (direction == USB_DIR_OUT)) -- *out_ep = ep->bEndpointAddress; -- else if (!*in_ep && (direction == USB_DIR_IN)) -- *in_ep = ep->bEndpointAddress; -- } -- -- if (*in_ep && *out_ep) -- return 0; -- } -- -- return -1; --} -- --int --option_zerocd_switch (struct usb_dev_handle *dh, struct usb_device *dev) --{ -- const char const rezero_cbw[] = { -- 0x55, 0x53, 0x42, 0x43, /* bulk command signature (LE) */ -- 0x78, 0x56, 0x34, 0x12, /* bulk command host tag */ -- 0x01, 0x00, 0x00, 0x00, /* bulk command data transfer length (LE) */ -- 0x80, /* flags: direction data-in */ -- 0x00, /* LUN */ -- 0x06, /* SCSI command length */ -- 0x01, /* SCSI command: REZERO */ -- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* filler */ -- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -- }; -- -- int ret = -1, ep_in = 0, ep_out = 0; -- char buffer[256]; -- -- /* Find the device's bulk in and out endpoints */ -- if (find_endpoints (dev, &ep_in, &ep_out) < 0) { -- debug ("%s: couldn't find correct USB endpoints.", dev->filename); -- goto out; -- } -- -- usb_clear_halt (dh, ep_out); -- ret = usb_set_altinterface (dh, 0); -- if (ret != 0) { -- debug ("%s: couldn't set device alternate interface.", dev->filename); -- goto out; -- } -- -- /* Let the mass storage device settle */ -- sleep (1); -- -- /* Send the modeswitch command */ -- ret = usb_bulk_write (dh, ep_out, (char *) rezero_cbw, sizeof (rezero_cbw), 1000); -- if (ret < 0) -- return ret; -- -- debug ("%s: REZERO command sent.", dev->filename); -- -- /* Some devices need to be read from */ -- ret = usb_bulk_read (dh, ep_in, buffer, sizeof (buffer), 1000); -- --out: -- return ret; --} -- -diff --git a/extras/modem-modeswitch/option.h b/extras/modem-modeswitch/option.h -deleted file mode 100644 -index e00dabf..0000000 ---- a/extras/modem-modeswitch/option.h -+++ /dev/null -@@ -1,29 +0,0 @@ --/* -- * Modem mode switcher -- * -- * Copyright (C) 2008 Dan Williams -- * Copyright (C) 2008 Peter Henn -- * -- * Heavily based on the 'ozerocdoff' tool by Peter Henn. -- * -- * 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; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details: -- */ -- --#ifndef __OPTION_H__ --#define __OPTION_H__ -- --#include -- --struct usb_device *option_zerocd_find (int vid, int pid); -- --int option_zerocd_switch (struct usb_dev_handle *dh, struct usb_device *dev); -- --#endif /* __OPTION_H__ */ -diff --git a/extras/modem-modeswitch/utils.c b/extras/modem-modeswitch/utils.c -deleted file mode 100644 -index 37d0df4..0000000 ---- a/extras/modem-modeswitch/utils.c -+++ /dev/null -@@ -1,83 +0,0 @@ --/* -- * Modem mode switcher -- * -- * Copyright (C) 2009 Dan Williams -- * -- * 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; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details: -- */ -- --#include --#include --#include --#include --#include --#include -- --#include "utils.h" -- --static int debug_on = 0; --static int quiet = 0; --FILE *logfile = NULL; -- --void --do_log (int level, const char *fmt, ...) --{ -- va_list args; -- char buffer[1024]; -- char tag = 'L'; -- -- if (level >= LOG_DBG && !debug_on) -- return; -- -- va_start (args, fmt); -- vsnprintf (buffer, sizeof (buffer), fmt, args); -- va_end (args); -- -- if (level == LOG_ERR) -- tag = 'E'; -- else if (level == LOG_MSG) -- tag = 'L'; -- else if (level == LOG_DBG) -- tag = 'D'; -- -- if (logfile) -- fprintf (logfile, "%c: %s\n", tag, buffer); -- if (!quiet) -- fprintf ((level == LOG_ERR) ? stderr : stdout, "%c: %s\n", tag, buffer); --} -- --int --log_startup (const char *path, int do_debug, int be_quiet) --{ -- time_t t; -- -- quiet = be_quiet; -- debug_on = do_debug; -- -- if (!path) -- return 0; -- -- logfile = fopen (path, "a+"); -- if (!logfile) -- return 1; -- -- t = time (NULL); -- message ("\n**** Started: %s\n", ctime (&t)); -- return 0; --} -- --void --log_shutdown (void) --{ -- if (logfile) -- fclose (logfile); --} -- -diff --git a/extras/modem-modeswitch/utils.h b/extras/modem-modeswitch/utils.h -deleted file mode 100644 -index 1ef557a..0000000 ---- a/extras/modem-modeswitch/utils.h -+++ /dev/null -@@ -1,32 +0,0 @@ --/* -- * Modem mode switcher -- * -- * Copyright (C) 2009 Dan Williams -- * -- * 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; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details: -- */ -- --#ifndef __UTILS_H__ --#define __UTILS_H__ -- --#define LOG_ERR 0 --#define LOG_MSG 1 --#define LOG_DBG 2 -- --#define message(fmt, args...) do_log (LOG_MSG, fmt, ##args); --#define error(fmt, args...) do_log (LOG_ERR, fmt, ##args); --#define debug(fmt, args...) do_log (LOG_DBG, fmt, ##args); -- --void do_log (int level, const char *fmt, ...); --int log_startup (const char *path, int do_debug, int be_quiet); --void log_shutdown (void); -- --#endif /* __UTILS_H__ */ --- -1.6.6 - diff --git a/0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch b/0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch deleted file mode 100644 index bc8aa52..0000000 --- a/0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 00e43e357ea709d8c1def0aed13192abbf9ac193 Mon Sep 17 00:00:00 2001 -From: Amit Shah -Date: Mon, 22 Mar 2010 10:59:46 +0100 -Subject: [PATCH 37/65] rules: virtio - fix is to check if the 'name' attribute is present - -Fix provided by Harald Hoyer. - -Signed-off-by: Amit Shah ---- - rules/rules.d/50-udev-default.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index da1535f..e8116a3 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout" - KERNEL=="hvc*|hvsi*", GROUP="dialout" - - # virtio serial / console ports --KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" -+KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" - - # mem - KERNEL=="null|zero|full|random|urandom", MODE="0666" --- -1.6.6 - diff --git a/0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch b/0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch deleted file mode 100644 index 56aaa23..0000000 --- a/0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5b6172b1d9b5d582d05ea89985efd0ea7a0c8ad7 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Wed, 24 Mar 2010 17:44:39 +0100 -Subject: [PATCH 38/65] keymap: Add Acer TravelMate 6593G and Acer Aspire 1640 - -https://launchpad.net/bugs/536914 ---- - extras/keymap/95-keymap.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 65b0d6e..b3b08ae 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -78,6 +78,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" -+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" --- -1.6.6 - diff --git a/0040-libudev-update-documentation.patch b/0040-libudev-update-documentation.patch deleted file mode 100644 index 3b404c8..0000000 --- a/0040-libudev-update-documentation.patch +++ /dev/null @@ -1,108 +0,0 @@ -From dbba7e4029e2eb8157232e6b5ddd9ee0f68b51b5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 25 Mar 2010 16:45:15 +0100 -Subject: [PATCH 40/65] libudev: update documentation - ---- - libudev/docs/libudev-docs.xml | 2 +- - libudev/libudev-device.c | 14 ++++++-------- - libudev/libudev.c | 14 +++++++------- - 3 files changed, 14 insertions(+), 16 deletions(-) - -diff --git a/libudev/docs/libudev-docs.xml b/libudev/docs/libudev-docs.xml -index b037281..f470916 100644 ---- a/libudev/docs/libudev-docs.xml -+++ b/libudev/docs/libudev-docs.xml -@@ -9,7 +9,7 @@ - libudev Reference Manual - for libudev version &version; - -- 2009 -+ 2009-2010 - Kay Sievers <kay.sievers@vrfy.org> - - -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index fe45880..410f75b 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -463,10 +463,9 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char * - * @devnum: device major/minor number - * - * Create new udev device, and fill in information from the sys -- * device and the udev database entry. The device is looked up -- * by its major/minor number. Character and block device numbers -- * are not unique across the two types, they do not share the same -- * range of numbers. -+ * device and the udev database entry. The device is looked-up -+ * by its major/minor number and type. Character and block device -+ * numbers are not unique across the two types. - * - * The initial refcount is 1, and needs to be decremented to - * release the resources of the udev device. -@@ -497,10 +496,9 @@ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, de - * @subsystem: the subsystem of the device - * @sysname: the name of the device - * -- * Create new udev device, and fill in information from the sys -- * device and the udev database entry. The device is looked up -- * by the subsystem and name string of the device, like "mem", -- * "zero", or "block", "sda". -+ * Create new udev device, and fill in information from the sys device -+ * and the udev database entry. The device is looked up by the subsystem -+ * and name string of the device, like "mem" / "zero", or "block" / "sda". - * - * The initial refcount is 1, and needs to be decremented to - * release the resources of the udev device. -diff --git a/libudev/libudev.c b/libudev/libudev.c -index 411e9ae..0ae5a91 100644 ---- a/libudev/libudev.c -+++ b/libudev/libudev.c -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008-2009 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -71,7 +71,7 @@ static void log_stderr(struct udev *udev, - * @udev: udev library context - * - * Retrieve stored data pointer from library context. This might be useful -- * to access from callbacks. -+ * to access from callbacks like a custom logging function. - * - * Returns: stored userdata - **/ -@@ -321,10 +321,10 @@ void udev_set_log_fn(struct udev *udev, - * udev_get_log_priority: - * @udev: udev library context - * -- * The initial syslog priority is read from the udev config file -+ * The initial logging priority is read from the udev config file - * at startup. - * -- * Returns: the current syslog priority -+ * Returns: the current logging priority - **/ - int udev_get_log_priority(struct udev *udev) - { -@@ -334,10 +334,10 @@ int udev_get_log_priority(struct udev *udev) - /** - * udev_set_log_priority: - * @udev: udev library context -- * @priority: the new syslog priority -+ * @priority: the new logging priority - * -- * Set the current syslog priority. The value controls which messages -- * are send to syslog. -+ * Set the current logging priority. The value controls which messages -+ * are logged. - **/ - void udev_set_log_priority(struct udev *udev, int priority) - { --- -1.6.6 - diff --git a/0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch b/0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch deleted file mode 100644 index c7a2394..0000000 --- a/0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 233a922112408c7ed49bd72e73be228e231d46ba Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Wed, 24 Mar 2010 20:14:23 -0500 -Subject: [PATCH 41/65] Fix Keymapping for upcoming Dell Laptops - -This patch fixes it so that new upcoming Dell machines will work -correctly if users presses the touchpad toggle key. - -Currently 0xD8 is being mapped to sleep. Though this is only done by the -Latitude XT* laptops. Many upcoming Laptops from Dell are mapping this -key to "toogle touchpad off" .. giving the OS notification that it has -just turned off the touchpad. - -Though their is an issue in that if this key is mapped the hardware -first toogles .. then the software tries to do the samething after, if -they fall out of sync ... no more touchpad. So leave out mapping these -keys for now. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keymap.rules | 1 + - extras/keymap/keymaps/dell | 1 - - 2 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index dd58453..af39c21 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -54,6 +54,7 @@ LABEL="keyboard_vendorcheck" - - ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" - ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan" -+ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT*", RUN+="keymap $name 0xD8 screenlock" - - ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" - -diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell -index 5ff44d6..84e5b4e 100644 ---- a/extras/keymap/keymaps/dell -+++ b/extras/keymap/keymaps/dell -@@ -23,5 +23,4 @@ - 0x9B switchvideomode # Display Toggle button - 0xA2 playpause # Front panel play/pause - 0xA4 stopcd # Front panel stop --0xD8 screenlock # FIXME: Tablet lock button - 0xED media # MediaDirect button --- -1.6.6 - diff --git a/0042-Add-new-Dell-touchpad-keycode.patch b/0042-Add-new-Dell-touchpad-keycode.patch deleted file mode 100644 index c63b194..0000000 --- a/0042-Add-new-Dell-touchpad-keycode.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e22aa83ba0b09796d02ebe831a4a66ab7d9f5c1e Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Mon, 5 Apr 2010 18:45:34 -0500 -Subject: [PATCH 42/65] Add new Dell touchpad keycode - -After working very closely with Dell. They have now completely changed -the way they have implemented there touchpad hotkey for upcoming -machines. - -It now only generates a single keycode (0xD9). It nolonger does anything -in hardware, nor does it generate more then this keycode. - -This patch properly maps this keycode. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - extras/keymap/keymaps/dell | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell -index 84e5b4e..f90a4fd 100644 ---- a/extras/keymap/keymaps/dell -+++ b/extras/keymap/keymaps/dell -@@ -24,3 +24,4 @@ - 0xA2 playpause # Front panel play/pause - 0xA4 stopcd # Front panel stop - 0xED media # MediaDirect button -+0xD9 f22 # touchpad toggle --- -1.6.6 - diff --git a/0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch b/0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch deleted file mode 100644 index e2b6474..0000000 --- a/0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5fa8992c9c2e756aefe84a41f00c7a2555e8d975 Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Mon, 5 Apr 2010 18:45:35 -0500 -Subject: [PATCH 43/65] Revert special casing 0xD8 to latitude XT only - -Now that Dell has changed the functionality of upcoming machines with -touchpad toggle to only use keycode 0xD9 .. and not 0xD8 & 0xD9. It -seems best to add this back to the general map of Dell buttons. Just -incase a machine in the future uses this later. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keymap.rules | 1 - - extras/keymap/keymaps/dell | 1 + - 2 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index af39c21..dd58453 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -54,7 +54,6 @@ LABEL="keyboard_vendorcheck" - - ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" - ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan" --ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT*", RUN+="keymap $name 0xD8 screenlock" - - ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" - -diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell -index f90a4fd..6443b4b 100644 ---- a/extras/keymap/keymaps/dell -+++ b/extras/keymap/keymaps/dell -@@ -24,4 +24,5 @@ - 0xA2 playpause # Front panel play/pause - 0xA4 stopcd # Front panel stop - 0xED media # MediaDirect button -+0xD8 screenlock # FIXME: Tablet lock button - 0xD9 f22 # touchpad toggle --- -1.6.6 - diff --git a/0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch b/0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch deleted file mode 100644 index 3d7c051..0000000 --- a/0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f8ede05d7ad5286039319bcb188e86b9117551e2 Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Tue, 6 Apr 2010 12:59:12 -0500 -Subject: [PATCH 44/65] Fix Dell Studio 1558 volume keys not releasing - -This patch fixes the Dell Studio 1558 to give a key release when a -volume key is pressed. This is the same as the 1557. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keyboard-force-release.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index 28639a5..f0e1ab8 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -21,7 +21,7 @@ ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" - - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other" - --ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" -+ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath dell-studio-1557" - - ENV{DMI_VENDOR}=="FUJITSU SIEMENS", ATTR{[dmi/id]product_name}=="AMILO Si 1848+u", RUN+="keyboard-force-release.sh $devpath fujitsu-amilo-si1848" - --- -1.6.6 - diff --git a/0045-Add-support-for-another-Dell-touchpad-toggle-key.patch b/0045-Add-support-for-another-Dell-touchpad-toggle-key.patch deleted file mode 100644 index fae1ca8..0000000 --- a/0045-Add-support-for-another-Dell-touchpad-toggle-key.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6de84dee053a74c95f2200d6d94cfeb61516bc40 Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Tue, 6 Apr 2010 16:08:21 -0500 -Subject: [PATCH 45/65] Add support for another Dell touchpad toggle key - -There is another keycode that some Dell machines that are about to ship, -or shipping are using for touchpad toggle. That code is 0x9E. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - extras/keymap/keymaps/dell | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell -index 6443b4b..1a2e433 100644 ---- a/extras/keymap/keymaps/dell -+++ b/extras/keymap/keymaps/dell -@@ -21,6 +21,7 @@ - 0x99 nextsong # Front panel next song - 0x9A setup # Tablet tools button - 0x9B switchvideomode # Display Toggle button -+0x9E f22 #touchpad toggle - 0xA2 playpause # Front panel play/pause - 0xA4 stopcd # Front panel stop - 0xED media # MediaDirect button --- -1.6.6 - diff --git a/0047-scsi_id-add-rand-in-retry-loop.patch b/0047-scsi_id-add-rand-in-retry-loop.patch deleted file mode 100644 index c58beb4..0000000 --- a/0047-scsi_id-add-rand-in-retry-loop.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 1c8dc990dc20efbd6cd8e56a57c0fa567c2d6fc8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 7 Apr 2010 09:22:30 +0200 -Subject: [PATCH 47/65] scsi_id: add rand() in retry loop - ---- - extras/scsi_id/scsi_serial.c | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 0c9d9c3..8752e14 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -863,21 +863,21 @@ int scsi_get_serial(struct udev *udev, - { - unsigned char page0[SCSI_INQ_BUFF_LEN]; - int fd = -1; -- int cnt = 10; -+ int cnt; - int ind; - int retval; - - memset(dev_scsi->serial, 0, len); - dbg(udev, "opening %s\n", devname); -- while (--cnt) { -- const struct timespec duration = { 0, 500 * 1000 * 1000 }; -+ srand((unsigned int)getpid()); -+ for (cnt = 20; cnt > 0; cnt--) { -+ struct timespec duration; - - fd = open(devname, O_RDONLY | O_NONBLOCK); -- if (fd >= 0) -- break; -- info(udev, "%s: cannot open %s: %s\n", dev_scsi->kernel, devname, strerror(errno)); -- if (errno != EBUSY) -+ if (fd >= 0 || errno != EBUSY) - break; -+ duration.tv_sec = 0; -+ duration.tv_nsec = (200 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); - nanosleep(&duration, NULL); - } - if (fd < 0) --- -1.6.6 - diff --git a/0048-cdrom_id-remove-debugging-code.patch b/0048-cdrom_id-remove-debugging-code.patch deleted file mode 100644 index 57a4e07..0000000 --- a/0048-cdrom_id-remove-debugging-code.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 36a07a8c34a4cff5ad2bbb6e0fdfed49e8191661 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 7 Apr 2010 09:23:46 +0200 -Subject: [PATCH 48/65] cdrom_id: remove debugging code - ---- - extras/cdrom_id/cdrom_id.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index e485768..036ef28 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -126,7 +126,6 @@ static int is_mounted(const char *device) - if (fp == NULL) - return -ENOSYS; - while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) { -- printf("got %u %u\n", maj, min); - if (makedev(maj, min) == statbuf.st_rdev) { - mounted = 1; - break; --- -1.6.6 - diff --git a/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch b/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch deleted file mode 100644 index f7e6b27..0000000 --- a/0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch +++ /dev/null @@ -1,53 +0,0 @@ -From cccfffbe04c01be12fb42cb12f3f7aa5e2a22dd4 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 7 Apr 2010 09:24:25 +0200 -Subject: [PATCH 49/65] cdrom_id: retry to open the device, if EBUSY - -We might fight about the device with polling processes, or other -users who probe the device. Retry a few times if the other one goes -away in the meantime. - -Based on a patch from Harald Hoyer. ---- - extras/cdrom_id/cdrom_id.c | 18 +++++++++++++++++- - 1 files changed, 17 insertions(+), 1 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 036ef28..7c9f8cc 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -591,7 +592,22 @@ int main(int argc, char *argv[]) - goto exit; - } - -- fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); -+ if (is_mounted(node)) { -+ fd = open(node, O_RDONLY|O_NONBLOCK); -+ } else { -+ int cnt; -+ struct timespec duration; -+ -+ srand((unsigned int)getpid()); -+ for (cnt = 40; cnt > 0; cnt--) { -+ fd = open(node, O_RDONLY|O_NONBLOCK|O_EXCL); -+ if (fd >= 0 || errno != EBUSY) -+ break; -+ duration.tv_sec = 0; -+ duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); -+ nanosleep(&duration, NULL); -+ } -+ } - if (fd < 0) { - info(udev, "unable to open '%s'\n", node); - fprintf(stderr, "unable to open '%s'\n", node); --- -1.6.6 - diff --git a/0050-cdrom_id-check-mount-state-in-retry-loop.patch b/0050-cdrom_id-check-mount-state-in-retry-loop.patch deleted file mode 100644 index b4fb62b..0000000 --- a/0050-cdrom_id-check-mount-state-in-retry-loop.patch +++ /dev/null @@ -1,55 +0,0 @@ -From d45c8c8b01c99180f15e24b22f7cf81eaf3cdd1b Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 7 Apr 2010 11:32:22 +0200 -Subject: [PATCH 50/65] cdrom_id: check mount state in retry loop - -Based on a patch from Harald Hoyer. ---- - extras/cdrom_id/cdrom_id.c | 22 +++++++++------------- - 1 files changed, 9 insertions(+), 13 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 7c9f8cc..894a890 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -547,6 +547,7 @@ int main(int argc, char *argv[]) - const char *node = NULL; - int export = 0; - int fd = -1; -+ int cnt; - int rc = 0; - - udev = udev_new(); -@@ -592,21 +593,16 @@ int main(int argc, char *argv[]) - goto exit; - } - -- if (is_mounted(node)) { -- fd = open(node, O_RDONLY|O_NONBLOCK); -- } else { -- int cnt; -+ srand((unsigned int)getpid()); -+ for (cnt = 20; cnt > 0; cnt--) { - struct timespec duration; - -- srand((unsigned int)getpid()); -- for (cnt = 40; cnt > 0; cnt--) { -- fd = open(node, O_RDONLY|O_NONBLOCK|O_EXCL); -- if (fd >= 0 || errno != EBUSY) -- break; -- duration.tv_sec = 0; -- duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); -- nanosleep(&duration, NULL); -- } -+ fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL)); -+ if (fd >= 0 || errno != EBUSY) -+ break; -+ duration.tv_sec = 0; -+ duration.tv_nsec = (100 * 1000 * 1000) + (rand() % 100 * 1000 * 1000); -+ nanosleep(&duration, NULL); - } - if (fd < 0) { - info(udev, "unable to open '%s'\n", node); --- -1.6.6 - diff --git a/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch b/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch deleted file mode 100644 index 1d3be0e..0000000 --- a/0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5c5ebde711c4560ae0560e87c33fe477b5add354 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 01:12:23 +0200 -Subject: [PATCH 51/65] cdrom_id: always set ID_CDROM regardless if we can run cdrom_id - ---- - extras/cdrom_id/60-cdrom_id.rules | 12 +++++++++--- - 1 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules -index 132a680..811c4aa 100644 ---- a/extras/cdrom_id/60-cdrom_id.rules -+++ b/extras/cdrom_id/60-cdrom_id.rules -@@ -1,5 +1,11 @@ - # do not edit this file, it will be overwritten on update - --# import optical drive properties --ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \ -- KERNEL=="sr[0-9]*|xvd*", IMPORT{program}="cdrom_id --export $tempnode" -+ACTION!="add|change", GOTO="cdrom_end" -+SUBSYSTEM!="block", GOTO="cdrom_end" -+KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" -+ENV{DEVTYPE}!="disk", GOTO="cdrom_end" -+ -+ENV{ID_CDROM}="1" -+IMPORT{program}="cdrom_id --export $tempnode" -+ -+LABEL="cdrom_end" --- -1.6.6 - diff --git a/0052-rules-delete-outdated-packagees-rules.patch b/0052-rules-delete-outdated-packagees-rules.patch deleted file mode 100644 index eb65f78..0000000 --- a/0052-rules-delete-outdated-packagees-rules.patch +++ /dev/null @@ -1,124 +0,0 @@ -From a971fb4d58aee946e151b315453fdd1b18331402 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 10:45:27 +0200 -Subject: [PATCH 52/65] rules: delete outdated packagees rules - ---- - rules/packages/40-infiniband.rules | 9 -------- - rules/packages/40-isdn.rules | 4 --- - rules/packages/40-zaptel.rules | 7 ------ - rules/packages/64-device-mapper.rules | 4 --- - rules/packages/64-md-raid.rules | 36 --------------------------------- - rules/suse/64-device-mapper.rules | 2 - - 6 files changed, 0 insertions(+), 62 deletions(-) - delete mode 100644 rules/packages/40-infiniband.rules - delete mode 100644 rules/packages/40-isdn.rules - delete mode 100644 rules/packages/40-zaptel.rules - delete mode 100644 rules/packages/64-device-mapper.rules - delete mode 100644 rules/packages/64-md-raid.rules - -diff --git a/rules/packages/40-infiniband.rules b/rules/packages/40-infiniband.rules -deleted file mode 100644 -index e2e4748..0000000 ---- a/rules/packages/40-infiniband.rules -+++ /dev/null -@@ -1,9 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --KERNEL=="umad[0-9]*", NAME="infiniband/%k" --KERNEL=="issm[0-9]*", NAME="infiniband/%k" --KERNEL=="ucm[0-9]*", NAME="infiniband/%k", MODE="0666" --KERNEL=="uverbs[0-9]*", NAME="infiniband/%k", MODE="0666" --KERNEL=="uat", NAME="infiniband/%k", MODE="0666" --KERNEL=="ucma", NAME="infiniband/%k", MODE="0666" --KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0666" -diff --git a/rules/packages/40-isdn.rules b/rules/packages/40-isdn.rules -deleted file mode 100644 -index 1a31cb6..0000000 ---- a/rules/packages/40-isdn.rules -+++ /dev/null -@@ -1,4 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", GROUP="dialout" --SUBSYSTEM=="tty", KERNEL=="capi[0-9]*", NAME="capi/%n" -diff --git a/rules/packages/40-zaptel.rules b/rules/packages/40-zaptel.rules -deleted file mode 100644 -index cbd8b8a..0000000 ---- a/rules/packages/40-zaptel.rules -+++ /dev/null -@@ -1,7 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --KERNEL=="zap[0-9]*", NAME="zap/%n", GROUP="dialout" --KERNEL=="zapchannel", NAME="zap/channel", GROUP="dialout" --KERNEL=="zapctl", NAME="zap/ctl", GROUP="dialout" --KERNEL=="zappseudo", NAME="zap/pseudo", GROUP="dialout" --KERNEL=="zaptimer", NAME="zap/timer", GROUP="dialout" -diff --git a/rules/packages/64-device-mapper.rules b/rules/packages/64-device-mapper.rules -deleted file mode 100644 -index 8154ef3..0000000 ---- a/rules/packages/64-device-mapper.rules -+++ /dev/null -@@ -1,4 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --KERNEL=="device-mapper", NAME="mapper/control" -- -diff --git a/rules/packages/64-md-raid.rules b/rules/packages/64-md-raid.rules -deleted file mode 100644 -index 6ba93b6..0000000 ---- a/rules/packages/64-md-raid.rules -+++ /dev/null -@@ -1,36 +0,0 @@ --# do not edit this file, it will be overwritten on update -- --SUBSYSTEM!="block", GOTO="md_end" --ACTION!="add|change", GOTO="md_end" -- --# import data from a raid member and activate it --#ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}" --# import data from a raid set --KERNEL!="md*", GOTO="md_end" -- --# partitions have no md/{array_state,metadata_version} --ENV{DEVTYPE}=="partition", GOTO="md_ignore_state" -- --# container devices have a metadata version of e.g. 'external:ddf' and --# never leave state 'inactive' --ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" --TEST!="md/array_state", GOTO="md_end" --ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" --LABEL="md_ignore_state" -- --IMPORT{program}="/sbin/mdadm --detail --export $tempnode" --ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace" --ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" --ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}" --ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace" --ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n" --ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n" --ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n" -- --IMPORT{program}="/sbin/blkid -o udev -p $tempnode" --OPTIONS+="link_priority=100" --OPTIONS+="watch" --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}" -- --LABEL="md_end" -diff --git a/rules/suse/64-device-mapper.rules b/rules/suse/64-device-mapper.rules -index 36ac756..34e3307 100644 ---- a/rules/suse/64-device-mapper.rules -+++ b/rules/suse/64-device-mapper.rules -@@ -1,7 +1,5 @@ - # do not edit this file, it will be overwritten on update - --KERNEL=="device-mapper", NAME="mapper/control" -- - KERNEL!="dm-*", GOTO="device_mapper_end" - ACTION!="add|change", GOTO="device_mapper_end" - --- -1.6.6 - diff --git a/0053-rules-we-do-not-have-static-devices-which-are-rename.patch b/0053-rules-we-do-not-have-static-devices-which-are-rename.patch deleted file mode 100644 index 54294f0..0000000 --- a/0053-rules-we-do-not-have-static-devices-which-are-rename.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 421fbc71c7e951dac900eabd445dfe577158b9c3 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 10:50:59 +0200 -Subject: [PATCH 53/65] rules: we do not have static devices which are renamed - ---- - rules/rules.d/50-udev-default.rules | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index e8116a3..a5f0823 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -115,4 +115,3 @@ KERNEL=="rrom[0-9]*", MODE="0400" - - # do not delete static device nodes - ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove" --ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" --- -1.6.6 - diff --git a/0054-unify-cleanup-event-handling.patch b/0054-unify-cleanup-event-handling.patch deleted file mode 100644 index 8ab3525..0000000 --- a/0054-unify-cleanup-event-handling.patch +++ /dev/null @@ -1,362 +0,0 @@ -From 0ec5b5e1429307fa7573aaa9b8f25fbd9b1d71d5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 15:51:16 +0200 -Subject: [PATCH 54/65] unify/cleanup event handling - ---- - udev/udev-event.c | 231 ++++++++++++++++++++++------------------------------- - udev/udev-node.c | 24 ++++-- - udev/udev.h | 3 +- - 3 files changed, 111 insertions(+), 147 deletions(-) - -diff --git a/udev/udev-event.c b/udev/udev-event.c -index 986c119..c3a8281 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (C) 2003-2009 Kay Sievers -+ * Copyright (C) 2003-2010 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 -@@ -541,167 +541,124 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - udev_device_get_subsystem(dev), udev_device_get_sysname(dev)); - } - -- /* add device node */ -- if (major(udev_device_get_devnum(dev)) != 0 && -- (strcmp(udev_device_get_action(dev), "add") == 0 || strcmp(udev_device_get_action(dev), "change") == 0)) { -- char filename[UTIL_PATH_SIZE]; -- struct udev_device *dev_old; -- int delete_kdevnode = 0; -- -- dbg(event->udev, "device node add '%s'\n", udev_device_get_devpath(dev)); -- -- /* read old database entry */ -- dev_old = udev_device_new_from_syspath(event->udev, udev_device_get_syspath(dev)); -- if (dev_old != NULL) { -- udev_device_read_db(dev_old); -- udev_device_set_info_loaded(dev_old); -+ if (strcmp(udev_device_get_action(dev), "remove") == 0) { -+ udev_device_read_db(dev); -+ udev_device_set_info_loaded(dev); -+ udev_device_delete_db(dev); - -- /* disable watch during event processing */ -- udev_watch_end(event->udev, dev_old); -- } -+ if (major(udev_device_get_devnum(dev)) != 0) -+ udev_watch_end(event->udev, dev); - - udev_rules_apply_to_event(rules, event); -- if (event->tmp_node != NULL) { -- dbg(event->udev, "cleanup temporary device node\n"); -- util_unlink_secure(event->udev, event->tmp_node); -- free(event->tmp_node); -- event->tmp_node = NULL; -- } -- -- if (event->name != NULL && event->name[0] == '\0') { -- info(event->udev, "device node creation suppressed\n"); -- delete_kdevnode = 1; -- goto exit_add; -- } -- -- /* if rule given name disagrees with kernel node name, delete kernel node */ -- if (event->name != NULL && udev_device_get_knodename(dev) != NULL) { -- if (strcmp(event->name, udev_device_get_knodename(dev)) != 0) -- delete_kdevnode = 1; -- } -- -- /* no rule, use kernel provided name */ -- if (event->name == NULL) { -- if (udev_device_get_knodename(dev) != NULL) { -- event->name = strdup(udev_device_get_knodename(dev)); -- info(event->udev, "no node name set, will use kernel supplied name '%s'\n", event->name); -- } else { -- event->name = strdup(udev_device_get_sysname(event->dev)); -- info(event->udev, "no node name set, will use device name '%s'\n", event->name); -- } -- } - -- /* something went wrong */ -- if (event->name == NULL) { -- err(event->udev, "no node name for '%s'\n", udev_device_get_sysname(event->dev)); -- goto exit_add; -- } -- -- /* set device node name */ -- util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", event->name, NULL); -- udev_device_set_devnode(dev, filename); -- -- /* write current database entry */ -- udev_device_update_db(dev); -+ if (major(udev_device_get_devnum(dev)) != 0) -+ err = udev_node_remove(dev); -+ } else { -+ event->dev_db = udev_device_new_from_syspath(event->udev, udev_device_get_syspath(dev)); -+ if (event->dev_db != NULL) { -+ udev_device_read_db(event->dev_db); -+ udev_device_set_info_loaded(event->dev_db); - -- /* remove/update possible left-over symlinks from old database entry */ -- if (dev_old != NULL) -- udev_node_update_old_links(dev, dev_old); -- -- /* create new node and symlinks */ -- err = udev_node_add(dev, event->mode, event->uid, event->gid); --exit_add: -- if (delete_kdevnode && udev_device_get_knodename(dev) != NULL) { -- struct stat stats; -- -- util_strscpyl(filename, sizeof(filename), -- udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); -- if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) { -- unlink(filename); -- util_delete_path(event->udev, filename); -- info(event->udev, "removed kernel created node '%s'\n", filename); -- } -+ /* disable watch during event processing */ -+ if (major(udev_device_get_devnum(dev)) != 0) -+ udev_watch_end(event->udev, event->dev_db); - } -- udev_device_unref(dev_old); -- goto exit; -- } -- -- /* add netif */ -- if (strcmp(udev_device_get_subsystem(dev), "net") == 0 && strcmp(udev_device_get_action(dev), "add") == 0) { -- dbg(event->udev, "netif add '%s'\n", udev_device_get_devpath(dev)); -- udev_device_delete_db(dev); - - udev_rules_apply_to_event(rules, event); -- if (event->name == NULL) -- goto exit; - -- /* look if we want to change the name of the netif */ -- if (strcmp(event->name, udev_device_get_sysname(dev)) != 0) { -+ /* rename a new network interface, if needed */ -+ if (strcmp(udev_device_get_subsystem(dev), "net") == 0 && strcmp(udev_device_get_action(dev), "add") == 0 && -+ event->name != NULL && strcmp(event->name, udev_device_get_sysname(dev)) != 0) { - char syspath[UTIL_PATH_SIZE]; - char *pos; - - err = rename_netif(event); -- if (err != 0) -- goto exit; -- info(event->udev, "renamed netif to '%s'\n", event->name); -- -- /* remember old name */ -- udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); -- -- /* now change the devpath, because the kernel device name has changed */ -- util_strscpy(syspath, sizeof(syspath), udev_device_get_syspath(dev)); -- pos = strrchr(syspath, '/'); -- if (pos != NULL) { -- pos++; -- util_strscpy(pos, sizeof(syspath) - (pos - syspath), event->name); -- udev_device_set_syspath(event->dev, syspath); -- udev_device_add_property(dev, "INTERFACE", udev_device_get_sysname(dev)); -- info(event->udev, "changed devpath to '%s'\n", udev_device_get_devpath(dev)); -+ if (err == 0) { -+ info(event->udev, "renamed netif to '%s'\n", event->name); -+ -+ /* delete stale db file */ -+ udev_device_delete_db(dev); -+ -+ /* remember old name */ -+ udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); -+ -+ /* now change the devpath, because the kernel device name has changed */ -+ util_strscpy(syspath, sizeof(syspath), udev_device_get_syspath(dev)); -+ pos = strrchr(syspath, '/'); -+ if (pos != NULL) { -+ pos++; -+ util_strscpy(pos, sizeof(syspath) - (pos - syspath), event->name); -+ udev_device_set_syspath(event->dev, syspath); -+ udev_device_add_property(dev, "INTERFACE", udev_device_get_sysname(dev)); -+ info(event->udev, "changed devpath to '%s'\n", udev_device_get_devpath(dev)); -+ } - } - } -- udev_device_update_db(dev); -- goto exit; -- } - -- /* remove device node */ -- if (major(udev_device_get_devnum(dev)) != 0 && strcmp(udev_device_get_action(dev), "remove") == 0) { -- /* import database entry and delete it */ -- udev_device_read_db(dev); -- udev_device_set_info_loaded(dev); -- udev_device_delete_db(dev); -+ if (major(udev_device_get_devnum(dev)) != 0) { -+ char filename[UTIL_PATH_SIZE]; - -- /* remove watch */ -- udev_watch_end(event->udev, dev); -+ if (event->tmp_node != NULL) { -+ info(event->udev, "cleanup temporary device node\n"); -+ util_unlink_secure(event->udev, event->tmp_node); -+ free(event->tmp_node); -+ event->tmp_node = NULL; -+ } - -- if (udev_device_get_devnode(dev) == NULL) { -- char devnode[UTIL_PATH_SIZE]; -+ /* no rule, use kernel provided name */ -+ if (event->name == NULL) { -+ if (udev_device_get_knodename(dev) != NULL) { -+ event->name = strdup(udev_device_get_knodename(dev)); -+ info(event->udev, "no node name set, will use kernel supplied name '%s'\n", event->name); -+ } else { -+ event->name = strdup(udev_device_get_sysname(event->dev)); -+ info(event->udev, "no node name set, will use device name '%s'\n", event->name); -+ } -+ } -+ -+ if (event->name == NULL) { -+ /* things went wrong */ -+ udev_device_delete_db(dev); -+ udev_device_unref(event->dev_db); -+ err = -ENOMEM; -+ goto out; -+ } - -- info(event->udev, "'%s' not found in database, using kernel name '%s'\n", -- udev_device_get_syspath(dev), udev_device_get_knodename(dev)); -- util_strscpyl(devnode, sizeof(devnode), -- udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); -- udev_device_set_devnode(dev, devnode); -+ /* set device node name */ -+ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", event->name, NULL); -+ udev_device_set_devnode(dev, filename); - } - -- udev_rules_apply_to_event(rules, event); -+ udev_device_update_db(dev); - -- if (udev_device_get_ignore_remove(dev)) { -- info(event->udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev)); -- goto exit; -+ if (major(udev_device_get_devnum(dev)) != 0) { -+ /* remove/update possible left-over symlinks from old database entry */ -+ if (event->dev_db != NULL) -+ udev_node_update_old_links(dev, event->dev_db); -+ -+ if (event->name[0] != '\0') -+ err = udev_node_add(dev, event->mode, event->uid, event->gid); -+ else -+ info(event->udev, "device node creation suppressed\n"); -+ -+ /* remove kernel-created node, if needed */ -+ if (udev_device_get_knodename(dev) != NULL && strcmp(event->name, udev_device_get_knodename(dev)) != 0) { -+ struct stat stats; -+ char filename[UTIL_PATH_SIZE]; -+ -+ info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev)); -+ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); -+ if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) { -+ util_unlink_secure(event->udev, filename); -+ util_delete_path(event->udev, filename); -+ } -+ } - } - -- err = udev_node_remove(dev); -- goto exit; -+ udev_device_unref(event->dev_db); -+ event->dev_db = NULL; - } -- -- /* default devices */ -- udev_rules_apply_to_event(rules, event); -- -- if (strcmp(udev_device_get_action(dev), "remove") != 0) -- udev_device_update_db(dev); -- else -- udev_device_delete_db(dev); --exit: -+out: - return err; - } - -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 3aee15b..3b4eb5f 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (C) 2003-2009 Kay Sievers -+ * Copyright (C) 2003-2010 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 -@@ -416,7 +416,6 @@ int udev_node_remove(struct udev_device *dev) - const char *devnode; - char partitionname[UTIL_PATH_SIZE]; - struct stat stats; -- struct udev_device *dev_check; - int err = 0; - int num; - -@@ -436,15 +435,21 @@ int udev_node_remove(struct udev_device *dev) - return -1; - } - -- dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); -- if (dev_check != NULL && stats.st_rdev == udev_device_get_devnum(dev_check)) { -- /* do not remove device node if the same sys-device is re-created in the meantime */ -- info(udev, "keeping device node of existing device'%s'\n", devnode); -+ if (udev_device_get_ignore_remove(dev)) { -+ info(udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev)); - } else { -- info(udev, "removing device node '%s'\n", devnode); -- err = util_unlink_secure(udev, devnode); -+ struct udev_device *dev_check; -+ -+ dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); -+ if (dev_check != NULL && stats.st_rdev == udev_device_get_devnum(dev_check)) { -+ /* do not remove device node if the same sys-device is re-created in the meantime */ -+ info(udev, "keeping device node of existing device'%s'\n", devnode); -+ } else { -+ info(udev, "removing device node '%s'\n", devnode); -+ err = util_unlink_secure(udev, devnode); -+ } -+ udev_device_unref(dev_check); - } -- udev_device_unref(dev_check); - - num = udev_device_get_num_fake_partitions(dev); - if (num > 0) { -@@ -459,6 +464,7 @@ int udev_node_remove(struct udev_device *dev) - util_unlink_secure(udev, partitionname); - } - } -+ - util_delete_path(udev, devnode); - return err; - } -diff --git a/udev/udev.h b/udev/udev.h -index 555eae6..2b9bbec 100644 ---- a/udev/udev.h -+++ b/udev/udev.h -@@ -1,6 +1,6 @@ - /* - * Copyright (C) 2003 Greg Kroah-Hartman -- * Copyright (C) 2003-2008 Kay Sievers -+ * Copyright (C) 2003-2010 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 -@@ -35,6 +35,7 @@ struct udev_event { - struct udev *udev; - struct udev_device *dev; - struct udev_device *dev_parent; -+ struct udev_device *dev_db; - char *name; - char *tmp_node; - char *program_result; --- -1.6.6 - diff --git a/0055-allow-IMPORT-db-KEY.patch b/0055-allow-IMPORT-db-KEY.patch deleted file mode 100644 index 4a81bfa..0000000 --- a/0055-allow-IMPORT-db-KEY.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 5539f624e18e948e4e3a1f0d9f5d25de9c8fd8b8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 15:58:05 +0200 -Subject: [PATCH 55/65] allow IMPORT{db}="KEY" - ---- - udev/udev-rules.c | 26 +++++++++++++++++++++++++- - udev/udev.xml | 8 ++++++++ - 2 files changed, 33 insertions(+), 1 deletions(-) - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 60daad5..c4a2724 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (C) 2003-2009 Kay Sievers -+ * Copyright (C) 2003-2010 Kay Sievers - * Copyright (C) 2008 Alan Jenkins - * - * This program is free software: you can redistribute it and/or modify -@@ -141,6 +141,7 @@ enum token_type { - TK_M_PROGRAM, /* val */ - TK_M_IMPORT_FILE, /* val */ - TK_M_IMPORT_PROG, /* val */ -+ TK_M_IMPORT_DB, /* val */ - TK_M_IMPORT_PARENT, /* val */ - TK_M_RESULT, /* val */ - TK_M_MAX, -@@ -271,6 +272,7 @@ static const char *token_str(enum token_type type) - [TK_M_PROGRAM] = "M PROGRAM", - [TK_M_IMPORT_FILE] = "M IMPORT_FILE", - [TK_M_IMPORT_PROG] = "M IMPORT_PROG", -+ [TK_M_IMPORT_DB] = "M IMPORT_DB", - [TK_M_IMPORT_PARENT] = "M IMPORT_PARENT", - [TK_M_RESULT] = "M RESULT", - [TK_M_MAX] = "M MAX", -@@ -337,6 +339,7 @@ static void dump_token(struct udev_rules *rules, struct token *token) - case TK_M_PROGRAM: - case TK_M_IMPORT_FILE: - case TK_M_IMPORT_PROG: -+ case TK_M_IMPORT_DB: - case TK_M_IMPORT_PARENT: - case TK_M_RESULT: - case TK_A_NAME: -@@ -1001,6 +1004,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, - case TK_M_PROGRAM: - case TK_M_IMPORT_FILE: - case TK_M_IMPORT_PROG: -+ case TK_M_IMPORT_DB: - case TK_M_IMPORT_PARENT: - case TK_M_RESULT: - case TK_A_OWNER: -@@ -1379,6 +1383,9 @@ static int add_rule(struct udev_rules *rules, char *line, - } else if (attr != NULL && strstr(attr, "file")) { - dbg(rules->udev, "IMPORT will be included as file\n"); - rule_add_key(&rule_tmp, TK_M_IMPORT_FILE, op, value, NULL); -+ } else if (attr != NULL && strstr(attr, "db")) { -+ dbg(rules->udev, "IMPORT will include db values\n"); -+ rule_add_key(&rule_tmp, TK_M_IMPORT_DB, op, value, NULL); - } else if (attr != NULL && strstr(attr, "parent")) { - dbg(rules->udev, "IMPORT will include the parent values\n"); - rule_add_key(&rule_tmp, TK_M_IMPORT_PARENT, op, value, NULL); -@@ -2288,6 +2295,23 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - goto nomatch; - break; - } -+ case TK_M_IMPORT_DB: -+ { -+ const char *key = &rules->buf[cur->key.value_off]; -+ const char *value; -+ -+ value = udev_device_get_property_value(event->dev_db, key); -+ if (value != NULL) { -+ struct udev_list_entry *entry; -+ -+ entry = udev_device_add_property(event->dev, key, value); -+ udev_list_entry_set_flags(entry, 1); -+ } else { -+ if (cur->key.op != OP_NOMATCH) -+ goto nomatch; -+ } -+ break; -+ } - case TK_M_IMPORT_PARENT: - { - char import[UTIL_PATH_SIZE]; -diff --git a/udev/udev.xml b/udev/udev.xml -index b6c5933..175cdbe 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -399,6 +399,14 @@ - - - -+ -+ -+ Import a single property specified as the assigned value from the -+ current device database. This works only if the database is already populated -+ by an earlier event. -+ -+ -+ - - - Import the stored keys from the parent device by reading --- -1.6.6 - diff --git a/0056-usb-db-remove-double.patch b/0056-usb-db-remove-double.patch deleted file mode 100644 index 0f0d612..0000000 --- a/0056-usb-db-remove-double.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 86dc9133f88e8690aa89ccb5a240ff915b1fb69f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 16:10:05 +0200 -Subject: [PATCH 56/65] usb-db: remove double '/' - ---- - extras/usb-db/usb-db.c | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) - -diff --git a/extras/usb-db/usb-db.c b/extras/usb-db/usb-db.c -index db1f843..fe563c2 100644 ---- a/extras/usb-db/usb-db.c -+++ b/extras/usb-db/usb-db.c -@@ -1,5 +1,3 @@ --/*-*- linux-c -*-*/ -- - /* - * Copyright (C) 2009 Lennart Poettering - * -@@ -223,7 +221,7 @@ int main(int argc, char*argv[]) { - if (!(udev = udev_new())) - goto finish; - -- if (asprintf(&sp, "%s/%s", udev_get_sys_path(udev), argv[1]) < 0) { -+ if (asprintf(&sp, "%s%s", udev_get_sys_path(udev), argv[1]) < 0) { - fprintf(stderr, "Failed to allocate sysfs path.\n"); - goto finish; - } --- -1.6.6 - diff --git a/0057-replace-add-change-with-remove.patch b/0057-replace-add-change-with-remove.patch deleted file mode 100644 index 6ea9548..0000000 --- a/0057-replace-add-change-with-remove.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 4b06c409350d26af5e6ace0f368d01b80d75438e Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 16:52:41 +0200 -Subject: [PATCH 57/65] replace "add|change" with "!remove" - ---- - extras/cdrom_id/60-cdrom_id.rules | 2 +- - extras/edd_id/61-persistent-storage-edd.rules | 2 +- - extras/fstab_import/79-fstab_import.rules | 2 +- - extras/hid2hci/70-hid2hci.rules | 2 +- - extras/keymap/95-keyboard-force-release.rules | 2 +- - extras/keymap/95-keymap.rules | 2 +- - extras/udev-acl/70-acl.rules | 2 +- - extras/udev-acl/udev-acl.c | 6 ++---- - extras/v4l_id/60-persistent-v4l.rules | 2 +- - rules/rules.d/60-persistent-alsa.rules | 2 +- - rules/rules.d/60-persistent-input.rules | 2 +- - rules/rules.d/60-persistent-serial.rules | 2 +- - rules/rules.d/60-persistent-storage-tape.rules | 2 +- - rules/rules.d/60-persistent-storage.rules | 2 +- - rules/rules.d/75-net-description.rules | 2 +- - rules/rules.d/75-tty-description.rules | 2 +- - rules/suse/64-device-mapper.rules | 2 +- - udev/udev-rules.c | 5 ++--- - udev/udevd.c | 2 +- - 19 files changed, 21 insertions(+), 24 deletions(-) - -diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules -index 811c4aa..16b3af9 100644 ---- a/extras/cdrom_id/60-cdrom_id.rules -+++ b/extras/cdrom_id/60-cdrom_id.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="cdrom_end" -+ACTION=="remove", GOTO="cdrom_end" - SUBSYSTEM!="block", GOTO="cdrom_end" - KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" - ENV{DEVTYPE}!="disk", GOTO="cdrom_end" -diff --git a/extras/edd_id/61-persistent-storage-edd.rules b/extras/edd_id/61-persistent-storage-edd.rules -index 54ae086..1ab1be3 100644 ---- a/extras/edd_id/61-persistent-storage-edd.rules -+++ b/extras/edd_id/61-persistent-storage-edd.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="persistent_storage_edd_end" -+ACTION=="remove", GOTO="persistent_storage_edd_end" - SUBSYSTEM!="block", GOTO="persistent_storage_edd_end" - KERNEL!="sd*|hd*|cciss*", GOTO="persistent_storage_edd_end" - -diff --git a/extras/fstab_import/79-fstab_import.rules b/extras/fstab_import/79-fstab_import.rules -index 2adfe04..2ded7d3 100644 ---- a/extras/fstab_import/79-fstab_import.rules -+++ b/extras/fstab_import/79-fstab_import.rules -@@ -1,2 +1,2 @@ --ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem|other", IMPORT="fstab_import $name $links mapper/$env{DM_NAME}" -+ACTION!="remove", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem|other", IMPORT="fstab_import $name $links mapper/$env{DM_NAME}" - -diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules -index 01ff30d..0687c8a 100644 ---- a/extras/hid2hci/70-hid2hci.rules -+++ b/extras/hid2hci/70-hid2hci.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="hid2hci_end" -+ACTION=="remove", GOTO="hid2hci_end" - SUBSYSTEM!="usb", GOTO="hid2hci_end" - - # Variety of Dell Bluetooth devices - match on a mouse device that is -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index f0e1ab8..b973614 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -11,7 +11,7 @@ - # /lib/udev/keymap -i /dev/input/eventX - # on a Linux vt to find out. - --ACTION!="add|change", GOTO="force_release_end" -+ACTION=="remove", GOTO="force_release_end" - SUBSYSTEM!="serio", GOTO="force_release_end" - KERNEL!="serio*", GOTO="force_release_end" - DRIVER!="atkbd", GOTO="force_release_end" -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index dd58453..2f41cb4 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -5,7 +5,7 @@ - # a file name (in /lib/udev/keymaps), which has to contain scancode/keyname - # pairs. - --ACTION!="add|change", GOTO="keyboard_end" -+ACTION=="remove", GOTO="keyboard_end" - SUBSYSTEM!="input", GOTO="keyboard_end" - KERNEL!="event*", GOTO="keyboard_end" - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index fde2656..5b00bf8 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -4,7 +4,7 @@ - # udev-acl of this udev release and may be replaced at any time. - - ENV{MAJOR}=="", GOTO="acl_end" --ACTION!="add|change", GOTO="acl_apply" -+ACTION=="remove", GOTO="acl_apply" - - # PTP/MTP protocol devices, cameras, portable media players - SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" -diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c -index c070fcc..ce51590 100644 ---- a/extras/udev-acl/udev-acl.c -+++ b/extras/udev-acl/udev-acl.c -@@ -353,12 +353,10 @@ int main (int argc, char* argv[]) - - switch (option) { - case 'a': -- if (strcmp(optarg, "add") == 0 || strcmp(optarg, "change") == 0) -- action = ACTION_ADD; -- else if (strcmp(optarg, "remove") == 0) -+ if (strcmp(optarg, "remove") == 0) - action = ACTION_REMOVE; - else -- goto out; -+ action = ACTION_ADD; - break; - case 'D': - device = optarg; -diff --git a/extras/v4l_id/60-persistent-v4l.rules b/extras/v4l_id/60-persistent-v4l.rules -index a342a71..b6e1313 100644 ---- a/extras/v4l_id/60-persistent-v4l.rules -+++ b/extras/v4l_id/60-persistent-v4l.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="persistent_v4l_end" -+ACTION=="remove", GOTO="persistent_v4l_end" - SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" - ENV{MAJOR}=="", GOTO="persistent_v4l_end" - -diff --git a/rules/rules.d/60-persistent-alsa.rules b/rules/rules.d/60-persistent-alsa.rules -index a5206fd..39a3652 100644 ---- a/rules/rules.d/60-persistent-alsa.rules -+++ b/rules/rules.d/60-persistent-alsa.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="persistent_alsa_end" -+ACTION=="remove", GOTO="persistent_alsa_end" - SUBSYSTEM!="sound", GOTO="persistent_alsa_end" - KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end" - -diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules -index 1ea4431..634c4db 100644 ---- a/rules/rules.d/60-persistent-input.rules -+++ b/rules/rules.d/60-persistent-input.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="persistent_input_end" -+ACTION=="remove", GOTO="persistent_input_end" - SUBSYSTEM!="input", GOTO="persistent_input_end" - KERNEL=="input[0-9]*", GOTO="persistent_input_end" - -diff --git a/rules/rules.d/60-persistent-serial.rules b/rules/rules.d/60-persistent-serial.rules -index 351b385..3e1a565 100644 ---- a/rules/rules.d/60-persistent-serial.rules -+++ b/rules/rules.d/60-persistent-serial.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="persistent_serial_end" -+ACTION=="remove", GOTO="persistent_serial_end" - SUBSYSTEM!="tty", GOTO="persistent_serial_end" - KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end" - -diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules -index 968528d..833ef94 100644 ---- a/rules/rules.d/60-persistent-storage-tape.rules -+++ b/rules/rules.d/60-persistent-storage-tape.rules -@@ -2,7 +2,7 @@ - - # persistent storage links: /dev/tape/{by-id,by-path} - --ACTION!="add|change", GOTO="persistent_storage_tape_end" -+ACTION=="remove", GOTO="persistent_storage_tape_end" - - # type 8 devices are "Medium Changers" - SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" -diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules -index 89041a9..d9f8003 100644 ---- a/rules/rules.d/60-persistent-storage.rules -+++ b/rules/rules.d/60-persistent-storage.rules -@@ -6,7 +6,7 @@ - # forward scsi device event to corresponding block device - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - --ACTION!="add|change", GOTO="persistent_storage_end" -+ACTION=="remove", GOTO="persistent_storage_end" - SUBSYSTEM!="block", GOTO="persistent_storage_end" - - # skip rules for inappropriate block devices -diff --git a/rules/rules.d/75-net-description.rules b/rules/rules.d/75-net-description.rules -index 1c4c401..490fcce 100644 ---- a/rules/rules.d/75-net-description.rules -+++ b/rules/rules.d/75-net-description.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="net_end" -+ACTION=="remove", GOTO="net_end" - SUBSYSTEM!="net", GOTO="net_end" - - SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p" -diff --git a/rules/rules.d/75-tty-description.rules b/rules/rules.d/75-tty-description.rules -index ac868ad..c2980cf 100644 ---- a/rules/rules.d/75-tty-description.rules -+++ b/rules/rules.d/75-tty-description.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add|change", GOTO="tty_end" -+ACTION=="remove", GOTO="tty_end" - SUBSYSTEM!="tty", GOTO="tty_end" - - SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p" -diff --git a/rules/suse/64-device-mapper.rules b/rules/suse/64-device-mapper.rules -index 34e3307..12cae35 100644 ---- a/rules/suse/64-device-mapper.rules -+++ b/rules/suse/64-device-mapper.rules -@@ -1,7 +1,7 @@ - # do not edit this file, it will be overwritten on update - - KERNEL!="dm-*", GOTO="device_mapper_end" --ACTION!="add|change", GOTO="device_mapper_end" -+ACTION=="remove", GOTO="device_mapper_end" - - IMPORT{program}="/sbin/dmsetup export -j%M -m%m" - ENV{DM_NAME}!="?*", GOTO="device_mapper_end" -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index c4a2724..0361f68 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -2055,13 +2055,12 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - struct token *cur; - struct token *rule; - enum escape_type esc = ESCAPE_UNSET; -- int can_set_name; -+ bool can_set_name; - - if (rules->tokens == NULL) - return -1; - -- can_set_name = ((strcmp(udev_device_get_action(event->dev), "add") == 0 || -- strcmp(udev_device_get_action(event->dev), "change") == 0) && -+ can_set_name = ((strcmp(udev_device_get_action(event->dev), "remove") != 0) && - (major(udev_device_get_devnum(event->dev)) > 0 || - strcmp(udev_device_get_subsystem(event->dev), "net") == 0)); - -diff --git a/udev/udevd.c b/udev/udevd.c -index fe3352c..c27b4cd 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -168,7 +168,7 @@ static void event_queue_delete(struct event *event) - udev_list_node_remove(&event->node); - - /* mark as failed, if "add" event returns non-zero */ -- if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "add") == 0) -+ if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "remove") != 0) - udev_queue_export_device_failed(udev_queue_export, event->dev); - else - udev_queue_export_device_finished(udev_queue_export, event->dev); --- -1.6.6 - diff --git a/0058-update-NEWS.patch b/0058-update-NEWS.patch deleted file mode 100644 index 3f1774b..0000000 --- a/0058-update-NEWS.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5c4c389bba6cf986a8dd743b43017c2f60604cca Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 17:00:16 +0200 -Subject: [PATCH 58/65] update NEWS - ---- - NEWS | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/NEWS b/NEWS -index a4d46d7..687bcdf 100644 ---- a/NEWS -+++ b/NEWS -@@ -2,6 +2,13 @@ udev 152 - ======== - Bugfixes. - -+All "add|change" matches are replaced by "!remove" in the rules and -+in the udev logic. All types of events will update possible symlinks -+and permissions, only "remove" is handled special now. -+ -+The modem mode switch extra was removed and the external usb_modeswitch -+program should be used instead. -+ - New and fixed keymaps. - - udev 151 --- -1.6.6 - diff --git a/0059-log-info-only-if-we-actually-delete-the-node.patch b/0059-log-info-only-if-we-actually-delete-the-node.patch deleted file mode 100644 index eb54add..0000000 --- a/0059-log-info-only-if-we-actually-delete-the-node.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3ba7e651ad36e4f37d9bfffadb638bc2ef784217 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 17:13:37 +0200 -Subject: [PATCH 59/65] log info only if we actually delete the node - ---- - udev/udev-event.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev/udev-event.c b/udev/udev-event.c -index c3a8281..26939e7 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -646,9 +646,9 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - struct stat stats; - char filename[UTIL_PATH_SIZE]; - -- info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev)); - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL); - if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) { -+ info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev)); - util_unlink_secure(event->udev, filename); - util_delete_path(event->udev, filename); - } --- -1.6.6 - diff --git a/0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch b/0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch deleted file mode 100644 index 17c2b1f..0000000 --- a/0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 236fae6cf1a619a92174efdf84cd7d91e7d4348d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 12 Apr 2010 17:56:32 +0200 -Subject: [PATCH 60/65] udevadm: trigger - switch default action from "add" to "change" - ---- - NEWS | 3 +++ - udev/udevadm-trigger.c | 4 ++-- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/NEWS b/NEWS -index 687bcdf..c5fbbe1 100644 ---- a/NEWS -+++ b/NEWS -@@ -2,6 +2,9 @@ udev 152 - ======== - Bugfixes. - -+"udevadm trigger" default to "change" events now, instead of "add" -+events. -+ - All "add|change" matches are replaced by "!remove" in the rules and - in the udev logic. All types of events will update possible symlinks - and permissions, only "remove" is handled special now. -diff --git a/udev/udevadm-trigger.c b/udev/udevadm-trigger.c -index dbcaee3..03aa534 100644 ---- a/udev/udevadm-trigger.c -+++ b/udev/udevadm-trigger.c -@@ -110,7 +110,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) - TYPE_SUBSYSTEMS, - TYPE_FAILED, - } device_type = TYPE_DEVICES; -- const char *action = "add"; -+ const char *action = "change"; - struct udev_enumerate *udev_enumerate; - int rc = 0; - -@@ -184,7 +184,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) - " subsystems sys subsystems and drivers\n" - " failed trigger only the events which have been\n" - " marked as failed during a previous run\n" -- " --action= event action value, default is \"add\"\n" -+ " --action= event action value, default is \"change\"\n" - " --subsystem-match= trigger devices from a matching subsystem\n" - " --subsystem-nomatch= exclude devices from a matching subsystem\n" - " --attr-match=]> trigger devices with a matching attribute\n" --- -1.6.6 - diff --git a/0061-remove-all_partitions-option.patch b/0061-remove-all_partitions-option.patch deleted file mode 100644 index cd1d372..0000000 --- a/0061-remove-all_partitions-option.patch +++ /dev/null @@ -1,363 +0,0 @@ -From 1f084fe5811ce251d516a8022f8c7c27d0ef1f53 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 13 Apr 2010 08:52:48 +0200 -Subject: [PATCH 61/65] remove "all_partitions" option - -We can not predict the major/minor of non-existing devices: - $ grep . /sys/class/block/sd*/dev - /sys/class/block/sda1/dev:259:524288 - /sys/class/block/sda2/dev:259:262144 - /sys/class/block/sda3/dev:259:786432 - /sys/class/block/sda4/dev:259:131072 - /sys/class/block/sda/dev:259:0 - /sys/class/block/sdb/dev:259:655360 - /sys/class/block/sdc/dev:259:393216 - -If this functionality is still needed for some broken hardware, it needs to be -solved with a tool not part of the udev package. Because such option is unreliable -and unsafe to use. ---- - NEWS | 7 +++++- - libudev/libudev-device-private.c | 4 --- - libudev/libudev-device.c | 17 --------------- - libudev/libudev-private.h | 2 - - test/udev-test.pl | 43 -------------------------------------- - udev/udev-node.c | 35 ------------------------------ - udev/udev-rules.c | 23 -------------------- - udev/udev.xml | 8 ------- - udev/udevadm-info.c | 4 --- - 9 files changed, 6 insertions(+), 137 deletions(-) - -diff --git a/NEWS b/NEWS -index c5fbbe1..c422eaa 100644 ---- a/NEWS -+++ b/NEWS -@@ -2,9 +2,14 @@ udev 152 - ======== - Bugfixes. - --"udevadm trigger" default to "change" events now, instead of "add" -+"udevadm trigger" defaults to "change" events now, instead of "add" - events. - -+The option "all_partitons" was removed from udev. This should not be -+needed for usual hardware. Udev can not safely make assumptions -+about non-exixting partition major/minor numbers, and therefore no -+longer provide such an unreliable and unsafe option. -+ - All "add|change" matches are replaced by "!remove" in the rules and - in the udev logic. All types of events will update possible symlinks - and permissions, only "remove" is handled special now. -diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c -index 1bcf441..19c20b2 100644 ---- a/libudev/libudev-device-private.c -+++ b/libudev/libudev-device-private.c -@@ -41,8 +41,6 @@ int udev_device_update_db(struct udev_device *udev_device) - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) - if (udev_list_entry_get_flags(list_entry)) - goto file; -- if (udev_device_get_num_fake_partitions(udev_device) != 0) -- goto file; - if (udev_device_get_ignore_remove(udev_device)) - goto file; - if (udev_device_get_devlink_priority(udev_device) != 0) -@@ -95,8 +93,6 @@ file: - fprintf(f, "L:%i\n", udev_device_get_devlink_priority(udev_device)); - if (udev_device_get_event_timeout(udev_device) >= 0) - fprintf(f, "T:%i\n", udev_device_get_event_timeout(udev_device)); -- if (udev_device_get_num_fake_partitions(udev_device) != 0) -- fprintf(f, "A:%i\n", udev_device_get_num_fake_partitions(udev_device)); - if (udev_device_get_ignore_remove(udev_device)) - fprintf(f, "R:%i\n", udev_device_get_ignore_remove(udev_device)); - if (udev_device_get_watch_handle(udev_device) >= 0) -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 410f75b..75cc61c 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -63,7 +63,6 @@ struct udev_device { - unsigned long long int seqnum; - int event_timeout; - int timeout; -- int num_fake_partitions; - int devlink_priority; - int refcount; - dev_t devnum; -@@ -284,9 +283,6 @@ int udev_device_read_db(struct udev_device *udev_device) - case 'T': - udev_device_set_event_timeout(udev_device, atoi(val)); - break; -- case 'A': -- udev_device_set_num_fake_partitions(udev_device, atoi(val)); -- break; - case 'R': - udev_device_set_ignore_remove(udev_device, atoi(val)); - break; -@@ -1425,19 +1421,6 @@ int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) - return 0; - } - --int udev_device_get_num_fake_partitions(struct udev_device *udev_device) --{ -- if (!udev_device->info_loaded) -- device_load_info(udev_device); -- return udev_device->num_fake_partitions; --} -- --int udev_device_set_num_fake_partitions(struct udev_device *udev_device, int num) --{ -- udev_device->num_fake_partitions = num; -- return 0; --} -- - int udev_device_get_devlink_priority(struct udev_device *udev_device) - { - if (!udev_device->info_loaded) -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 3f2861f..bf9e923 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -93,8 +93,6 @@ int udev_device_get_event_timeout(struct udev_device *udev_device); - int udev_device_set_event_timeout(struct udev_device *udev_device, int event_timeout); - int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum); - int udev_device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum); --int udev_device_get_num_fake_partitions(struct udev_device *udev_device); --int udev_device_set_num_fake_partitions(struct udev_device *udev_device, int num); - int udev_device_get_devlink_priority(struct udev_device *udev_device); - int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio); - int udev_device_get_ignore_remove(struct udev_device *udev_device); -diff --git a/test/udev-test.pl b/test/udev-test.pl -index aeca948..4633d6b 100755 ---- a/test/udev-test.pl -+++ b/test/udev-test.pl -@@ -493,16 +493,6 @@ SUBSYSTEMS=="foo", PROGRAM=="/bin/echo -n foo-%b", SYMLINK+="%c" - EOF - }, - { -- desc => "create all possible partitions", -- subsys => "block", -- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -- exp_name => "sda15" , -- exp_majorminor => "8:15", -- rules => < "sysfs parent hierarchy", - subsys => "tty", - devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", -@@ -988,28 +978,6 @@ SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n node link1 link2 link3 link4", RESULT - EOF - }, - { -- desc => "all_partitions, option-only rule", -- subsys => "block", -- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -- exp_name => "node6", -- exp_rem_error => "yes", -- rules => < "all_partitions, option-only rule (fail on partition)", -- subsys => "block", -- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1", -- exp_name => "node6", -- exp_add_error => "yes", -- rules => < "ignore remove event test", - subsys => "block", - devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -@@ -1020,17 +988,6 @@ SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OPTIONS="ignore_remove" - EOF - }, - { -- desc => "ignore remove event test (with all partitions)", -- subsys => "block", -- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -- exp_name => "sda14", -- exp_rem_error => "yes", -- option => "clean", -- rules => < "SUBSYSTEM match test", - subsys => "block", - devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 3b4eb5f..4492c2e 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -365,8 +365,6 @@ void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev - int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) - { - struct udev *udev = udev_device_get_udev(dev); -- int i; -- int num; - struct udev_list_entry *list_entry; - int err = 0; - -@@ -380,23 +378,6 @@ int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) - goto exit; - } - -- /* create all_partitions if requested */ -- num = udev_device_get_num_fake_partitions(dev); -- if (num > 0) { -- info(udev, "creating device partition nodes '%s[1-%i]'\n", udev_device_get_devnode(dev), num); -- for (i = 1; i <= num; i++) { -- char partitionname[UTIL_PATH_SIZE]; -- dev_t part_devnum; -- -- snprintf(partitionname, sizeof(partitionname), "%s%d", -- udev_device_get_devnode(dev), i); -- partitionname[sizeof(partitionname)-1] = '\0'; -- part_devnum = makedev(major(udev_device_get_devnum(dev)), -- minor(udev_device_get_devnum(dev)) + i); -- udev_node_mknod(dev, partitionname, part_devnum, mode, uid, gid); -- } -- } -- - /* create/update symlinks, add symlinks to name index */ - udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) { - if (udev_list_entry_get_flags(list_entry)) -@@ -414,10 +395,8 @@ int udev_node_remove(struct udev_device *dev) - struct udev *udev = udev_device_get_udev(dev); - struct udev_list_entry *list_entry; - const char *devnode; -- char partitionname[UTIL_PATH_SIZE]; - struct stat stats; - int err = 0; -- int num; - - /* remove/update symlinks, remove symlinks from name index */ - udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) -@@ -451,20 +430,6 @@ int udev_node_remove(struct udev_device *dev) - udev_device_unref(dev_check); - } - -- num = udev_device_get_num_fake_partitions(dev); -- if (num > 0) { -- int i; -- -- info(udev, "removing all_partitions '%s[1-%i]'\n", devnode, num); -- if (num > 255) -- return -1; -- for (i = 1; i <= num; i++) { -- snprintf(partitionname, sizeof(partitionname), "%s%d", devnode, i); -- partitionname[sizeof(partitionname)-1] = '\0'; -- util_unlink_secure(udev, partitionname); -- } -- } -- - util_delete_path(udev, devnode); - return err; - } -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 0361f68..a4a86b6 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -196,7 +196,6 @@ struct token { - mode_t mode; - uid_t uid; - gid_t gid; -- int num_fake_part; - int devlink_prio; - int event_timeout; - int watch; -@@ -371,9 +370,6 @@ static void dump_token(struct udev_rules *rules, struct token *token) - case TK_A_INOTIFY_WATCH: - dbg(rules->udev, "%s %u\n", token_str(type), token->key.watch); - break; -- case TK_A_NUM_FAKE_PART: -- dbg(rules->udev, "%s %u\n", token_str(type), token->key.num_fake_part); -- break; - case TK_A_DEVLINK_PRIO: - dbg(rules->udev, "%s %s %u\n", token_str(type), operation_str(op), token->key.devlink_prio); - break; -@@ -1469,12 +1465,6 @@ static int add_rule(struct udev_rules *rules, char *line, - rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL); - attr = get_key_attribute(rules->udev, key + sizeof("NAME")-1); - if (attr != NULL) { -- if (strstr(attr, "all_partitions") != NULL) { -- int num = DEFAULT_FAKE_PARTITIONS_COUNT; -- -- dbg(rules->udev, "creation of partition nodes requested\n"); -- rule_add_key(&rule_tmp, TK_A_NUM_FAKE_PART, 0, NULL, &num); -- } - if (strstr(attr, "ignore_remove") != NULL) { - dbg(rules->udev, "remove event should be ignored\n"); - rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL); -@@ -1576,12 +1566,6 @@ static int add_rule(struct udev_rules *rules, char *line, - else if (strncmp(pos, "replace", strlen("replace")) == 0) - rule_add_key(&rule_tmp, TK_A_STRING_ESCAPE_REPLACE, 0, NULL, NULL); - } -- if (strstr(value, "all_partitions") != NULL) { -- int num = DEFAULT_FAKE_PARTITIONS_COUNT; -- -- rule_add_key(&rule_tmp, TK_A_NUM_FAKE_PART, 0, NULL, &num); -- dbg(rules->udev, "creation of partition nodes requested\n"); -- } - pos = strstr(value, "nowatch"); - if (pos != NULL) { - const int off = 0; -@@ -2331,13 +2315,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - case TK_A_STRING_ESCAPE_REPLACE: - esc = ESCAPE_REPLACE; - break; -- case TK_A_NUM_FAKE_PART: -- if (strcmp(udev_device_get_subsystem(event->dev), "block") != 0) -- break; -- if (udev_device_get_sysnum(event->dev) != NULL) -- break; -- udev_device_set_num_fake_partitions(event->dev, cur->key.num_fake_part); -- break; - case TK_A_INOTIFY_WATCH: - event->inotify_watch = cur->key.watch; - break; -diff --git a/udev/udev.xml b/udev/udev.xml -index 175cdbe..9275e0f 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -450,14 +450,6 @@ - - - -- -- -- 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. -- -- -- - - - Number of seconds an event will wait for operations to finish, before it -diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c -index 4711409..c57620f 100644 ---- a/udev/udevadm-info.c -+++ b/udev/udevadm-info.c -@@ -142,10 +142,6 @@ static void print_record(struct udev_device *device) - if (i != 0) - printf("L: %i\n", i); - -- i = udev_device_get_num_fake_partitions(device); -- if (i != 0) -- printf("A: %u\n", i); -- - i = udev_device_get_ignore_remove(device); - if (i != 0) - printf("R: %u\n", i); --- -1.6.6 - diff --git a/0062-cdrom_id-Fix-uninitialized-variables.patch b/0062-cdrom_id-Fix-uninitialized-variables.patch deleted file mode 100644 index 1caba57..0000000 --- a/0062-cdrom_id-Fix-uninitialized-variables.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 816e6bf0fb0849d03696a4b4ec2334e35e819425 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Tue, 13 Apr 2010 10:49:24 +0200 -Subject: [PATCH 62/65] cdrom_id: Fix uninitialized variables - -In cases where cdrom_id does not go through the entire code path and one of the -probing functions returns -1 or exits early, the remaining variables were never -initialized. This caused effects like "phantom" audio CDs on empty drives, or -bogus data like ID_CDROM_MEDIA_TRACK_COUNT=22528. - -Initialize the variables right away to avoid that. - -Bug-Ubuntu: https://launchpad.net/bugs/559723 ---- - extras/cdrom_id/cdrom_id.c | 96 ++++++++++++++++++++++---------------------- - 1 files changed, 48 insertions(+), 48 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 894a890..db3867c 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -56,57 +56,57 @@ static void log_fn(struct udev *udev, int priority, - } - - /* device info */ --static unsigned int cd_cd_rom; --static unsigned int cd_cd_r; --static unsigned int cd_cd_rw; --static unsigned int cd_dvd_rom; --static unsigned int cd_dvd_r; --static unsigned int cd_dvd_rw; --static unsigned int cd_dvd_ram; --static unsigned int cd_dvd_plus_r; --static unsigned int cd_dvd_plus_rw; --static unsigned int cd_dvd_plus_r_dl; --static unsigned int cd_dvd_plus_rw_dl; --static unsigned int cd_bd; --static unsigned int cd_bd_r; --static unsigned int cd_bd_re; --static unsigned int cd_hddvd; --static unsigned int cd_hddvd_r; --static unsigned int cd_hddvd_rw; --static unsigned int cd_mo; --static unsigned int cd_mrw; --static unsigned int cd_mrw_w; -+static unsigned int cd_cd_rom = 0; -+static unsigned int cd_cd_r = 0; -+static unsigned int cd_cd_rw = 0; -+static unsigned int cd_dvd_rom = 0; -+static unsigned int cd_dvd_r = 0; -+static unsigned int cd_dvd_rw = 0; -+static unsigned int cd_dvd_ram = 0; -+static unsigned int cd_dvd_plus_r = 0; -+static unsigned int cd_dvd_plus_rw = 0; -+static unsigned int cd_dvd_plus_r_dl = 0; -+static unsigned int cd_dvd_plus_rw_dl = 0; -+static unsigned int cd_bd = 0; -+static unsigned int cd_bd_r = 0; -+static unsigned int cd_bd_re = 0; -+static unsigned int cd_hddvd = 0; -+static unsigned int cd_hddvd_r = 0; -+static unsigned int cd_hddvd_rw = 0; -+static unsigned int cd_mo = 0; -+static unsigned int cd_mrw = 0; -+static unsigned int cd_mrw_w = 0; - - /* media info */ --static unsigned int cd_media; --static unsigned int cd_media_cd_rom; --static unsigned int cd_media_cd_r; --static unsigned int cd_media_cd_rw; --static unsigned int cd_media_dvd_rom; --static unsigned int cd_media_dvd_r; --static unsigned int cd_media_dvd_rw; --static unsigned int cd_media_dvd_ram; --static unsigned int cd_media_dvd_plus_r; --static unsigned int cd_media_dvd_plus_rw; --static unsigned int cd_media_dvd_plus_r_dl; --static unsigned int cd_media_dvd_plus_rw_dl; --static unsigned int cd_media_bd; --static unsigned int cd_media_bd_r; --static unsigned int cd_media_bd_re; --static unsigned int cd_media_hddvd; --static unsigned int cd_media_hddvd_r; --static unsigned int cd_media_hddvd_rw; --static unsigned int cd_media_mo; --static unsigned int cd_media_mrw; --static unsigned int cd_media_mrw_w; -- --static const char *cd_media_state; --static unsigned int cd_media_session_next; --static unsigned int cd_media_session_count; --static unsigned int cd_media_track_count; --static unsigned int cd_media_track_count_data; --static unsigned int cd_media_track_count_audio; --static unsigned long long int cd_media_session_last_offset; -+static unsigned int cd_media = 0; -+static unsigned int cd_media_cd_rom = 0; -+static unsigned int cd_media_cd_r = 0; -+static unsigned int cd_media_cd_rw = 0; -+static unsigned int cd_media_dvd_rom = 0; -+static unsigned int cd_media_dvd_r = 0; -+static unsigned int cd_media_dvd_rw = 0; -+static unsigned int cd_media_dvd_ram = 0; -+static unsigned int cd_media_dvd_plus_r = 0; -+static unsigned int cd_media_dvd_plus_rw = 0; -+static unsigned int cd_media_dvd_plus_r_dl = 0; -+static unsigned int cd_media_dvd_plus_rw_dl = 0; -+static unsigned int cd_media_bd = 0; -+static unsigned int cd_media_bd_r = 0; -+static unsigned int cd_media_bd_re = 0; -+static unsigned int cd_media_hddvd = 0; -+static unsigned int cd_media_hddvd_r = 0; -+static unsigned int cd_media_hddvd_rw = 0; -+static unsigned int cd_media_mo = 0; -+static unsigned int cd_media_mrw = 0; -+static unsigned int cd_media_mrw_w = 0; -+ -+static const char *cd_media_state = NULL; -+static unsigned int cd_media_session_next = 0; -+static unsigned int cd_media_session_count = 0; -+static unsigned int cd_media_track_count = 0; -+static unsigned int cd_media_track_count_data = 0; -+static unsigned int cd_media_track_count_audio = 0; -+static unsigned long long int cd_media_session_last_offset = 0; - - #define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) - #define SK(errcode) (((errcode) >> 16) & 0xF) --- -1.6.6 - diff --git a/0063-rules-call-modprobe-on-all-events-but-remove.patch b/0063-rules-call-modprobe-on-all-events-but-remove.patch deleted file mode 100644 index 97ce921..0000000 --- a/0063-rules-call-modprobe-on-all-events-but-remove.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 06ba47d8336c6d017a67d11f480341db07b9bc4b Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 13 Apr 2010 12:12:08 +0200 -Subject: [PATCH 63/65] rules: call modprobe on all events but "remove" - ---- - rules/rules.d/50-udev-default.rules | 3 --- - rules/rules.d/80-drivers.rules | 2 +- - 2 files changed, 1 insertions(+), 4 deletions(-) - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index a5f0823..7e09ea1 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -112,6 +112,3 @@ SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc" - KERNEL=="mmtimer", MODE="0644" - KERNEL=="rflash[0-9]*", MODE="0400" - KERNEL=="rrom[0-9]*", MODE="0400" -- --# do not delete static device nodes --ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove" -diff --git a/rules/rules.d/80-drivers.rules b/rules/rules.d/80-drivers.rules -index d0485e1..86eb918 100644 ---- a/rules/rules.d/80-drivers.rules -+++ b/rules/rules.d/80-drivers.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --ACTION!="add", GOTO="drivers_end" -+ACTION=="remove", GOTO="drivers_end" - - DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -b $env{MODALIAS}" - SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -b tifm_sd" --- -1.6.6 - diff --git a/0064-remove-ignore_remove-option.patch b/0064-remove-ignore_remove-option.patch deleted file mode 100644 index a1e8046..0000000 --- a/0064-remove-ignore_remove-option.patch +++ /dev/null @@ -1,273 +0,0 @@ -From a89d342dfb45b54e29381af9dbc495bbb2b057af Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 13 Apr 2010 12:45:38 +0200 -Subject: [PATCH 64/65] remove "ignore_remove" option - ---- - NEWS | 6 ++++++ - libudev/libudev-device-private.c | 4 ---- - libudev/libudev-device.c | 17 ----------------- - libudev/libudev-private.h | 2 -- - test/udev-test.pl | 10 ---------- - udev/udev-node.c | 38 ++++++++++++++++++++++---------------- - udev/udev-rules.c | 14 -------------- - udev/udev.xml | 7 ------- - udev/udevadm-info.c | 4 ---- - 9 files changed, 28 insertions(+), 74 deletions(-) - -diff --git a/NEWS b/NEWS -index c422eaa..ea5c19d 100644 ---- a/NEWS -+++ b/NEWS -@@ -10,6 +10,12 @@ needed for usual hardware. Udev can not safely make assumptions - about non-exixting partition major/minor numbers, and therefore no - longer provide such an unreliable and unsafe option. - -+The option "ignore_remove" was removed from udev. With devtmpfs -+udev passed control over device nodes to the kernel. This option -+should no longer be needed, or can not work as advertised. Neither -+udev nor the kernel will remove device nodes which are copied from -+the /lib/udev/devices/ directory. -+ - All "add|change" matches are replaced by "!remove" in the rules and - in the udev logic. All types of events will update possible symlinks - and permissions, only "remove" is handled special now. -diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c -index 19c20b2..5e4381e 100644 ---- a/libudev/libudev-device-private.c -+++ b/libudev/libudev-device-private.c -@@ -41,8 +41,6 @@ int udev_device_update_db(struct udev_device *udev_device) - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) - if (udev_list_entry_get_flags(list_entry)) - goto file; -- if (udev_device_get_ignore_remove(udev_device)) -- goto file; - if (udev_device_get_devlink_priority(udev_device) != 0) - goto file; - if (udev_device_get_event_timeout(udev_device) >= 0) -@@ -93,8 +91,6 @@ file: - fprintf(f, "L:%i\n", udev_device_get_devlink_priority(udev_device)); - if (udev_device_get_event_timeout(udev_device) >= 0) - fprintf(f, "T:%i\n", udev_device_get_event_timeout(udev_device)); -- if (udev_device_get_ignore_remove(udev_device)) -- fprintf(f, "R:%i\n", udev_device_get_ignore_remove(udev_device)); - if (udev_device_get_watch_handle(udev_device) >= 0) - fprintf(f, "W:%i\n", udev_device_get_watch_handle(udev_device)); - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) { -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 75cc61c..b3b6a63 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -75,7 +75,6 @@ struct udev_device { - unsigned int envp_uptodate:1; - unsigned int driver_set:1; - unsigned int info_loaded:1; -- unsigned int ignore_remove:1; - }; - - struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) -@@ -283,9 +282,6 @@ int udev_device_read_db(struct udev_device *udev_device) - case 'T': - udev_device_set_event_timeout(udev_device, atoi(val)); - break; -- case 'R': -- udev_device_set_ignore_remove(udev_device, atoi(val)); -- break; - case 'E': - udev_device_add_property_from_string(udev_device, val); - break; -@@ -1434,19 +1430,6 @@ int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio) - return 0; - } - --int udev_device_get_ignore_remove(struct udev_device *udev_device) --{ -- if (!udev_device->info_loaded) -- device_load_info(udev_device); -- return udev_device->ignore_remove; --} -- --int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore) --{ -- udev_device->ignore_remove = ignore; -- return 0; --} -- - int udev_device_get_watch_handle(struct udev_device *udev_device) - { - if (!udev_device->info_loaded) -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index bf9e923..8dc469e 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -95,8 +95,6 @@ int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum); - int udev_device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum); - int udev_device_get_devlink_priority(struct udev_device *udev_device); - int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio); --int udev_device_get_ignore_remove(struct udev_device *udev_device); --int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore); - int udev_device_get_watch_handle(struct udev_device *udev_device); - int udev_device_set_watch_handle(struct udev_device *udev_device, int handle); - void udev_device_set_info_loaded(struct udev_device *device); -diff --git a/test/udev-test.pl b/test/udev-test.pl -index 4633d6b..a4d3a72 100755 ---- a/test/udev-test.pl -+++ b/test/udev-test.pl -@@ -978,16 +978,6 @@ SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n node link1 link2 link3 link4", RESULT - EOF - }, - { -- desc => "ignore remove event test", -- subsys => "block", -- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -- exp_name => "node", -- exp_rem_error => "yes", -- rules => < "SUBSYSTEM match test", - subsys => "block", - devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 4492c2e..34de268 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -396,6 +396,8 @@ int udev_node_remove(struct udev_device *dev) - struct udev_list_entry *list_entry; - const char *devnode; - struct stat stats; -+ struct udev_device *dev_check; -+ char filename[UTIL_PATH_SIZE]; - int err = 0; - - /* remove/update symlinks, remove symlinks from name index */ -@@ -404,32 +406,36 @@ int udev_node_remove(struct udev_device *dev) - - devnode = udev_device_get_devnode(dev); - if (devnode == NULL) -- return 0; -+ goto out; -+ - if (stat(devnode, &stats) != 0) { - info(udev, "device node '%s' not found\n", devnode); -- return 0; -+ goto out; - } -+ - if (stats.st_rdev != udev_device_get_devnum(dev)) { - info(udev, "device node '%s' points to a different device, skip removal\n", devnode); -- return -1; -+ err = -1; -+ goto out; - } - -- if (udev_device_get_ignore_remove(dev)) { -- info(udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev)); -- } else { -- struct udev_device *dev_check; -- -- dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); -- if (dev_check != NULL && stats.st_rdev == udev_device_get_devnum(dev_check)) { -- /* do not remove device node if the same sys-device is re-created in the meantime */ -- info(udev, "keeping device node of existing device'%s'\n", devnode); -- } else { -- info(udev, "removing device node '%s'\n", devnode); -- err = util_unlink_secure(udev, devnode); -- } -+ dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev)); -+ if (dev_check != NULL) { -+ /* do not remove device node if the same sys-device is re-created in the meantime */ -+ info(udev, "keeping device node of existing device'%s'\n", devnode); - udev_device_unref(dev_check); -+ goto out; -+ } -+ -+ util_strscpyl(filename, sizeof(filename), LIBEXECDIR "/devices", &devnode[strlen(udev_get_dev_path(udev))], NULL); -+ if (stat(filename, &stats) == 0 || stats.st_rdev == udev_device_get_devnum(dev)) { -+ info(udev, "static device entry found '%s', skip removal\n", devnode); -+ goto out; - } - -+ info(udev, "removing device node '%s'\n", devnode); -+ err = util_unlink_secure(udev, devnode); - util_delete_path(udev, devnode); -+out: - return err; - } -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index a4a86b6..4f18aca 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1463,13 +1463,6 @@ static int add_rule(struct udev_rules *rules, char *line, - err(rules->udev, "NAME=\"%%k\" is superfluous and breaks " - "kernel supplied names, please remove it from %s:%u\n", filename, lineno); - rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL); -- attr = get_key_attribute(rules->udev, key + sizeof("NAME")-1); -- if (attr != NULL) { -- if (strstr(attr, "ignore_remove") != NULL) { -- dbg(rules->udev, "remove event should be ignored\n"); -- rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL); -- } -- } - } - rule_tmp.rule.rule.flags = 1; - continue; -@@ -1540,10 +1533,6 @@ static int add_rule(struct udev_rules *rules, char *line, - if (strcmp(key, "OPTIONS") == 0) { - const char *pos; - -- if (strstr(value, "ignore_remove") != NULL) { -- dbg(rules->udev, "remove event should be ignored\n"); -- rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL); -- } - pos = strstr(value, "link_priority="); - if (pos != NULL) { - int prio = atoi(&pos[strlen("link_priority=")]); -@@ -2501,9 +2490,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - case TK_A_EVENT_TIMEOUT: - udev_device_set_event_timeout(event->dev, cur->key.event_timeout); - break; -- case TK_A_IGNORE_REMOVE: -- udev_device_set_ignore_remove(event->dev, 1); -- break; - case TK_A_ATTR: - { - const char *key_name = &rules->buf[cur->key.attr_off]; -diff --git a/udev/udev.xml b/udev/udev.xml -index 9275e0f..dce953d 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -436,13 +436,6 @@ - Rule and device options: - - -- -- -- Do not remove the device node when the device goes away. This may be -- useful as a workaround for broken device drivers. -- -- -- - - - Specify the priority of the created symlinks. Devices with higher -diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c -index c57620f..5f6209a 100644 ---- a/udev/udevadm-info.c -+++ b/udev/udevadm-info.c -@@ -142,10 +142,6 @@ static void print_record(struct udev_device *device) - if (i != 0) - printf("L: %i\n", i); - -- i = udev_device_get_ignore_remove(device); -- if (i != 0) -- printf("R: %u\n", i); -- - i = udev_device_get_watch_handle(device); - if (i >= 0) - printf("W: %u\n", i); --- -1.6.6 - diff --git a/0065-cdrom_id-Fix-uninitialized-buffers.patch b/0065-cdrom_id-Fix-uninitialized-buffers.patch deleted file mode 100644 index 310e3c6..0000000 --- a/0065-cdrom_id-Fix-uninitialized-buffers.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 2b861dc92757b9a3214c2b8e9d8b1c3f3c162391 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Tue, 13 Apr 2010 15:25:48 +0200 -Subject: [PATCH 65/65] cdrom_id: Fix uninitialized buffers - -Commit 5c6954f is actually a no-op, since static variables are already zero'ed -by default anyway (but we keep it for clarity). The real difference was that a -build with -O0 wor while a build with -O2 didn't. - -Turns out that some ioctls do not actually touch the result buffer in some -cases, so we need to zero the result buffers to avoid interpreting random da as -CD properties. - -https://launchpad.net/bugs/559723 -https://launchpad.net/bugs/561585 ---- - extras/cdrom_id/cdrom_id.c | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index db3867c..b6797cd 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -237,6 +237,7 @@ static int cd_inquiry(struct udev *udev, int fd) { - unsigned char inq[128]; - int err; - -+ memset (inq, 0, sizeof (inq)); - scsi_cmd_set(udev, &sc, 0, 0x12); - scsi_cmd_set(udev, &sc, 4, 36); - scsi_cmd_set(udev, &sc, 5, 0); -@@ -265,6 +266,7 @@ static int cd_profiles(struct udev *udev, int fd) - unsigned int i; - int err; - -+ memset (header, 0, sizeof (header)); - scsi_cmd_set(udev, &sc, 0, 0x46); - scsi_cmd_set(udev, &sc, 1, 0); - scsi_cmd_set(udev, &sc, 8, sizeof(header)); -@@ -282,6 +284,7 @@ static int cd_profiles(struct udev *udev, int fd) - return -1; - } - -+ memset (profiles, 0, sizeof (profiles)); - scsi_cmd_set(udev, &sc, 0, 0x46); - scsi_cmd_set(udev, &sc, 1, 1); - scsi_cmd_set(udev, &sc, 6, len >> 16); -@@ -440,6 +443,7 @@ static int cd_media_info(struct udev *udev, int fd) - }; - int err; - -+ memset (header, 0, sizeof (header)); - scsi_cmd_set(udev, &sc, 0, 0x51); - scsi_cmd_set(udev, &sc, 8, sizeof(header)); - scsi_cmd_set(udev, &sc, 9, 0); -@@ -472,6 +476,7 @@ static int cd_media_toc(struct udev *udev, int fd) - unsigned char *p; - int err; - -+ memset (header, 0, sizeof (header)); - scsi_cmd_set(udev, &sc, 0, 0x43); - scsi_cmd_set(udev, &sc, 6, 1); - scsi_cmd_set(udev, &sc, 8, sizeof(header)); -@@ -493,6 +498,7 @@ static int cd_media_toc(struct udev *udev, int fd) - if (len < 8) - return 0; - -+ memset (toc, 0, sizeof (toc)); - scsi_cmd_set(udev, &sc, 0, 0x43); - scsi_cmd_set(udev, &sc, 6, header[2]); /* First Track/Session Number */ - scsi_cmd_set(udev, &sc, 7, len >> 8); -@@ -520,6 +526,7 @@ static int cd_media_toc(struct udev *udev, int fd) - cd_media_track_count_audio++; - } - -+ memset (header, 0, sizeof (header)); - scsi_cmd_set(udev, &sc, 0, 0x43); - scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ - scsi_cmd_set(udev, &sc, 8, 12); --- -1.6.6 - diff --git a/sources b/sources index 3161bc7..455487b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -aeae0e6273dcbec246c3c1b9868ebed1 udev-151.tar.bz2 +76d12a9d97c3409e9ef60a4288227e8f udev-153.tar.bz2 diff --git a/start_udev b/start_udev index df6c41b..72b548e 100755 --- a/start_udev +++ b/start_udev @@ -312,7 +312,7 @@ if [ -f "/sys/class/tty/console/uevent" ]; then echo "Triggering Rest" fi - /sbin/udevadm trigger + /sbin/udevadm trigger --action=add ret=$[$ret + $?] wait_for_queue $udevtimeout ret=$[$ret + $?] diff --git a/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch b/udev-153-LGPL.patch similarity index 99% rename from 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch rename to udev-153-LGPL.patch index 4b8ca14..aab0a10 100644 --- a/0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch +++ b/udev-153-LGPL.patch @@ -1,14 +1,8 @@ -From 23325a66ccf3a2f90a4f5d1702f60408187de28a Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 18 Mar 2010 09:57:44 +0100 -Subject: [PATCH 34/65] add LGPL COPYING to libudev and GUdev +commit 23325a66ccf3a2f90a4f5d1702f60408187de28a +Author: Kay Sievers +Date: Thu Mar 18 09:57:44 2010 +0100 ---- - extras/gudev/COPYING | 504 ++++++++++++++++++++++++++++++++++++++++++++++++++ - libudev/COPYING | 504 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1008 insertions(+), 0 deletions(-) - create mode 100644 extras/gudev/COPYING - create mode 100644 libudev/COPYING + add LGPL COPYING to libudev and GUdev diff --git a/extras/gudev/COPYING b/extras/gudev/COPYING new file mode 100644 @@ -1030,6 +1024,3 @@ index 0000000..8add30a +That's all there is to it! + + --- -1.6.6 - diff --git a/udev-145.tar.bz2.sign b/udev-153.tar.bz2.sign similarity index 61% rename from udev-145.tar.bz2.sign rename to udev-153.tar.bz2.sign index 23c18c4..566f6aa 100644 --- a/udev-145.tar.bz2.sign +++ b/udev-153.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBKWxhnyGugalF9Dw4RAvvjAJ9ed+RMRi8gXcFyTPxXsHZpbLSROgCfdpCc -lr5nSwsGGO9e0+wBbD7WDoc= -=5/z0 +iD8DBQBLzqFNyGugalF9Dw4RAkvzAJ4ureXWse6fF/61NaNe97mDDQMtUwCfegJi +Ar0G12dwUvDR2gYMcPTiRzs= +=vIft -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 60d3651..4183371 100644 --- a/udev.spec +++ b/udev.spec @@ -4,84 +4,38 @@ Summary: A userspace implementation of devfs Name: udev -Version: 152 -Release: 0.1.20100413git%{?dist} +Version: 153 +Release: 1.20100427git%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 -#Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-151.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch1: 0001-firmware-fix-error-reporting-on-missing-firmware-fil.patch -Patch2: 0002-keymap-Add-Dell-Inspiron-1011-Mini-10.patch -Patch3: 0003-Fix-brightness-keys-on-MSI-Wind-U-100.patch -Patch4: 0004-keymap-Add-support-for-Gateway-AOA110-AOA150-clones.patch -Patch5: 0005-keymap-Fix-LG-X110.patch -Patch6: 0006-Force-key-release-for-volume-keys-on-Dell-Studio-155.patch -Patch7: 0007-keymap-Add-Toshiba-Satellite-M30X.patch -Patch8: 0008-libudev-export-udev_monitor_set_receive_buffer_size.patch -Patch9: 0009-udevadm-monitor-increase-netlink-buffer-size.patch -Patch10: 0010-libudev-bump-minor-version.patch -Patch11: 0011-udevadm-fix-untested-and-broken-commit-to-set-buffer.patch -Patch12: 0012-configure.ac-version-bump.patch -Patch13: 0013-keymap-Add-Samsung-Q210-P210-force-release-quirk.patch -Patch14: 0014-keymap-Add-Fujitsu-Amilo-1848-u-force-release-quirk.patch -Patch15: 0015-Decrease-buffer-size-when-advancing-past-NUL-byte.patch -Patch16: 0016-Use-UTIL_LINE_SIZE-not-UTIL_PATH_SIZE-to-truncate-pr.patch -Patch17: 0017-Increase-UTIL_LINE_SIZE-from-2048-to-16384.patch -Patch18: 0018-Fix-virtio-ports-rule-to-use-attr-instead-of-ATTR.patch -Patch19: 0019-udev-acl-Correctly-handle-ENV-ACL_MANAGE-0.patch -Patch20: 0020-udev-acl-no-not-encourage-use-of-ACL_MANAGE-outside-.patch -Patch21: 0021-input_id-Fix-linking.patch -Patch22: 0022-replace-utimes-with-utimensat.patch -Patch23: 0023-libbudev-private-rename-udev_list_entry_get_flag.patch -Patch24: 0024-udevadm-monitor-use-as-separator-in-subsystem-match-.patch -Patch25: 0025-use-major-minor-as-entries-in-symlink-stack-instead-.patch -Patch26: 0026-use-major-minor-as-entries-in-watch-directory.patch -#Patch27: 0027-libudev-docs-.gitignore-backup-files.patch -Patch28: 0028-udev-needs-automake-1.10.patch -Patch29: 0029-firmware-fix-possible-segfault-when-firmware-device-.patch -Patch30: 0030-rules-input-create-by-path-links-for-pci-devices.patch -Patch31: 0031-Fix-switching-Logitech-bluetooth-adapters-into-hci-m.patch -Patch32: 0032-do-not-reset-SELinux-context-when-the-node-was-not-t.patch -Patch33: 0033-libudev-add-udev_device_new_from_environment.patch -Patch34: 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch -Patch35: 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch -Patch36: 0036-modeswitch-morph-into-tool-that-only-switches-Mobile.patch -Patch37: 0037-rules-virtio-fix-is-to-check-if-the-name-attribute-i.patch -Patch38: 0038-keymap-Add-Acer-TravelMate-6593G-and-Acer-Aspire-164.patch -Patch39: 0039-keymap-Fix-another-key-for-Acer-TravelMate-6593.patch -Patch40: 0040-libudev-update-documentation.patch -Patch41: 0041-Fix-Keymapping-for-upcoming-Dell-Laptops.patch -Patch42: 0042-Add-new-Dell-touchpad-keycode.patch -Patch43: 0043-Revert-special-casing-0xD8-to-latitude-XT-only.patch -Patch44: 0044-Fix-Dell-Studio-1558-volume-keys-not-releasing.patch -Patch45: 0045-Add-support-for-another-Dell-touchpad-toggle-key.patch -#Patch46: 0046-extras-mobile-action-modeswitch-update-gitignore.patch -Patch47: 0047-scsi_id-add-rand-in-retry-loop.patch -Patch48: 0048-cdrom_id-remove-debugging-code.patch -Patch49: 0049-cdrom_id-retry-to-open-the-device-if-EBUSY.patch -Patch50: 0050-cdrom_id-check-mount-state-in-retry-loop.patch -Patch51: 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch -Patch52: 0052-rules-delete-outdated-packagees-rules.patch -Patch53: 0053-rules-we-do-not-have-static-devices-which-are-rename.patch -Patch54: 0054-unify-cleanup-event-handling.patch -Patch55: 0055-allow-IMPORT-db-KEY.patch -Patch56: 0056-usb-db-remove-double.patch -Patch57: 0057-replace-add-change-with-remove.patch -Patch58: 0058-update-NEWS.patch -Patch59: 0059-log-info-only-if-we-actually-delete-the-node.patch -Patch60: 0060-udevadm-trigger-switch-default-action-from-add-to-ch.patch -Patch61: 0061-remove-all_partitions-option.patch -Patch62: 0062-cdrom_id-Fix-uninitialized-variables.patch -Patch63: 0063-rules-call-modprobe-on-all-events-but-remove.patch -Patch64: 0064-remove-ignore_remove-option.patch -Patch65: 0065-cdrom_id-Fix-uninitialized-buffers.patch +Patch1: 0001-configure.ac-version-bump.patch +Patch2: 0002-remove-buffer-overrun-risk-in-readlink-call.patch +Patch3: 0003-more-readlink-buffer-size-handling.patch +Patch4: 0004-remove-left-over-from-ignore_remove-and-all_partitio.patch +Patch5: 0005-fix-previous-commit.patch +Patch6: 0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch +Patch7: 0007-udevadm-info-export-db-remove-watch-handle-export.patch +Patch8: 0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch +Patch9: 0009-all-to-match-against-a-given-TAG.patch +Patch10: 0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch +Patch11: 0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch +Patch12: 0012-use-the-usual-TAG-TAG-logic.patch +Patch13: 0013-delete-old-tags-when-configuration-changes.patch +Patch14: 0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch +Patch15: 0015-export-tag-functions.patch +Patch16: 0016-export-udev_device_get_tags_list_entry.patch +Patch17: 0017-configure.ac-move-firmware-path-setting-out-of-extra.patch +Patch18: 0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch +Patch19: 0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch Patch101: udev-151-rules.patch +Patch102: udev-153-LGPL.patch Patch103: udev-151-gperf.patch Source1: start_udev @@ -177,7 +131,7 @@ This package contains the header and pkg-config files for developing glib-based applications using libudev functionality. %prep -%setup -q -n udev-151 +%setup -q %patch1 -p1 -b .git1 %patch2 -p1 -b .git2 @@ -198,55 +152,10 @@ glib-based applications using libudev functionality. %patch17 -p1 -b .git17 %patch18 -p1 -b .git18 %patch19 -p1 -b .git19 -%patch20 -p1 -b .git20 -%patch21 -p1 -b .git21 -%patch22 -p1 -b .git22 -%patch23 -p1 -b .git23 -%patch24 -p1 -b .git24 -%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 -%patch38 -p1 -b .git38 -%patch39 -p1 -b .git39 -%patch40 -p1 -b .git40 -%patch41 -p1 -b .git41 -%patch42 -p1 -b .git42 -%patch43 -p1 -b .git43 -%patch44 -p1 -b .git44 -%patch45 -p1 -b .git45 -#%patch46 -p1 -b .git46 -%patch47 -p1 -b .git47 -%patch48 -p1 -b .git48 -%patch49 -p1 -b .git49 -%patch50 -p1 -b .git50 -%patch51 -p1 -b .git51 -%patch52 -p1 -b .git52 -%patch53 -p1 -b .git53 -%patch54 -p1 -b .git54 -%patch55 -p1 -b .git55 -%patch56 -p1 -b .git56 -%patch57 -p1 -b .git57 -%patch58 -p1 -b .git58 -%patch59 -p1 -b .git59 -%patch60 -p1 -b .git60 -%patch61 -p1 -b .git61 -%patch62 -p1 -b .git62 -%patch63 -p1 -b .git63 -%patch64 -p1 -b .git64 -%patch65 -p1 -b .git65 %patch101 -p1 +%patch102 -p1 %patch103 -p1 %build @@ -258,7 +167,7 @@ libtoolize -f -c --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} --enable-introspection \ - --disable-rpath --enable-debug + --enable-debug make %{?_smp_mflags} @@ -481,6 +390,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Apr 27 2010 Harald Hoyer 153-1.20100427git +- version 153 + * Tue Apr 13 2010 Harald Hoyer 152-0.1.20100413git - pre release of version 152 From ba4a0c0ced98f1fdcc95f42e9b0babb1a92f3646 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 27 Apr 2010 11:48:03 +0000 Subject: [PATCH 556/640] - more cdrom_id bugfixes which can prevent autoclose of some cdroms --- ...cdrom_id-Fix-uninitialized-variables.patch | 4 +- 0065-cdrom_id-Fix-uninitialized-buffers.patch | 4 +- 0066-cdrom_id.patch | 88 ++++++ ...work-feature-profiles-buffer-parsing.patch | 277 ++++++++++++++++++ 0068-cdrom_id-print-more-debug-messages.patch | 121 ++++++++ ...id-debug-print-feature-values-in-hex.patch | 25 ++ ...id-debug-print-feature-values-in-hex.patch | 25 ++ ...-not-ignore-errors-from-scsi_cmd_run.patch | 79 +++++ ...wap-media-state-and-TOC-info-probing.patch | 38 +++ ...missing-profiles-to-feature_profiles.patch | 36 +++ ...D_CDROM_MEDIA-1-only-for-known-media.patch | 183 ++++++++++++ ...drom_id-only-mark-sr-0-9-as-ID_CDROM.patch | 26 ++ udev.spec | 28 +- 13 files changed, 929 insertions(+), 5 deletions(-) create mode 100644 0066-cdrom_id.patch create mode 100644 0067-cdrom_id-rework-feature-profiles-buffer-parsing.patch create mode 100644 0068-cdrom_id-print-more-debug-messages.patch create mode 100644 0069-cdrom_id-debug-print-feature-values-in-hex.patch create mode 100644 0070-cdrom_id-debug-print-feature-values-in-hex.patch create mode 100644 0071-cdrom_id-Do-not-ignore-errors-from-scsi_cmd_run.patch create mode 100644 0072-cdrom_id-Swap-media-state-and-TOC-info-probing.patch create mode 100644 0074-cdrom_id-add-missing-profiles-to-feature_profiles.patch create mode 100644 0075-cdrom_id-set-ID_CDROM_MEDIA-1-only-for-known-media.patch create mode 100644 0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch diff --git a/0062-cdrom_id-Fix-uninitialized-variables.patch b/0062-cdrom_id-Fix-uninitialized-variables.patch index 1caba57..b53056a 100644 --- a/0062-cdrom_id-Fix-uninitialized-variables.patch +++ b/0062-cdrom_id-Fix-uninitialized-variables.patch @@ -1,7 +1,7 @@ From 816e6bf0fb0849d03696a4b4ec2334e35e819425 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 13 Apr 2010 10:49:24 +0200 -Subject: [PATCH 62/65] cdrom_id: Fix uninitialized variables +Subject: [PATCH 062/110] cdrom_id: Fix uninitialized variables In cases where cdrom_id does not go through the entire code path and one of the probing functions returns -1 or exits early, the remaining variables were never @@ -127,5 +127,5 @@ index 894a890..db3867c 100644 #define ERRCODE(s) ((((s)[2] & 0x0F) << 16) | ((s)[12] << 8) | ((s)[13])) #define SK(errcode) (((errcode) >> 16) & 0xF) -- -1.6.6 +1.7.0.1 diff --git a/0065-cdrom_id-Fix-uninitialized-buffers.patch b/0065-cdrom_id-Fix-uninitialized-buffers.patch index 310e3c6..e0f3eb2 100644 --- a/0065-cdrom_id-Fix-uninitialized-buffers.patch +++ b/0065-cdrom_id-Fix-uninitialized-buffers.patch @@ -1,7 +1,7 @@ From 2b861dc92757b9a3214c2b8e9d8b1c3f3c162391 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 13 Apr 2010 15:25:48 +0200 -Subject: [PATCH 65/65] cdrom_id: Fix uninitialized buffers +Subject: [PATCH 065/110] cdrom_id: Fix uninitialized buffers Commit 5c6954f is actually a no-op, since static variables are already zero'ed by default anyway (but we keep it for clarity). The real difference was that a @@ -78,5 +78,5 @@ index db3867c..b6797cd 100644 scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ scsi_cmd_set(udev, &sc, 8, 12); -- -1.6.6 +1.7.0.1 diff --git a/0066-cdrom_id.patch b/0066-cdrom_id.patch new file mode 100644 index 0000000..2ff817c --- /dev/null +++ b/0066-cdrom_id.patch @@ -0,0 +1,88 @@ +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index b6797cd..afb481d 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -1,7 +1,7 @@ + /* + * cdrom_id - optical drive and media information prober + * +- * Copyright (C) 2008 Kay Sievers ++ * Copyright (C) 2008-2010 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 +@@ -157,7 +157,7 @@ struct scsi_cmd { + static void scsi_cmd_set(struct udev *udev, struct scsi_cmd *cmd, size_t i, int arg) + { + if (i == 0) { +- memset(cmd, 0x00, sizeof(struct scsi_cmd)); ++ memset(cmd, 0, sizeof(struct scsi_cmd)); + cmd->cgc.quiet = 1; + cmd->cgc.sense = &cmd->_sense.s; + memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); +@@ -237,7 +237,7 @@ static int cd_inquiry(struct udev *udev, int fd) { + unsigned char inq[128]; + int err; + +- memset (inq, 0, sizeof (inq)); ++ memset(inq, 0, sizeof(inq)); + scsi_cmd_set(udev, &sc, 0, 0x12); + scsi_cmd_set(udev, &sc, 4, 36); + scsi_cmd_set(udev, &sc, 5, 0); +@@ -266,7 +266,7 @@ static int cd_profiles(struct udev *udev, int fd) + unsigned int i; + int err; + +- memset (header, 0, sizeof (header)); ++ memset(header, 0, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x46); + scsi_cmd_set(udev, &sc, 1, 0); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -284,7 +284,7 @@ static int cd_profiles(struct udev *udev, int fd) + return -1; + } + +- memset (profiles, 0, sizeof (profiles)); ++ memset(profiles, 0, sizeof(profiles)); + scsi_cmd_set(udev, &sc, 0, 0x46); + scsi_cmd_set(udev, &sc, 1, 1); + scsi_cmd_set(udev, &sc, 6, len >> 16); +@@ -443,7 +443,7 @@ static int cd_media_info(struct udev *udev, int fd) + }; + int err; + +- memset (header, 0, sizeof (header)); ++ memset(header, 0, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x51); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); +@@ -476,7 +476,7 @@ static int cd_media_toc(struct udev *udev, int fd) + unsigned char *p; + int err; + +- memset (header, 0, sizeof (header)); ++ memset(header, 0, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, 1); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -498,7 +498,7 @@ static int cd_media_toc(struct udev *udev, int fd) + if (len < 8) + return 0; + +- memset (toc, 0, sizeof (toc)); ++ memset(toc, 0, sizeof(toc)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, header[2]); /* First Track/Session Number */ + scsi_cmd_set(udev, &sc, 7, len >> 8); +@@ -526,7 +526,7 @@ static int cd_media_toc(struct udev *udev, int fd) + cd_media_track_count_audio++; + } + +- memset (header, 0, sizeof (header)); ++ memset(header, 0, sizeof (header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ + scsi_cmd_set(udev, &sc, 8, 12); +-- +1.7.0.1 + diff --git a/0067-cdrom_id-rework-feature-profiles-buffer-parsing.patch b/0067-cdrom_id-rework-feature-profiles-buffer-parsing.patch new file mode 100644 index 0000000..8f96622 --- /dev/null +++ b/0067-cdrom_id-rework-feature-profiles-buffer-parsing.patch @@ -0,0 +1,277 @@ +From 0413a47ebfcd46ae43cb56ad508b2484bc97ff14 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 15 Apr 2010 20:07:07 +0200 +Subject: [PATCH 067/110] cdrom_id: rework feature/profiles buffer parsing + +--- + extras/cdrom_id/cdrom_id.c | 156 +++++++++++++++++++++++++------------------ + 1 files changed, 91 insertions(+), 65 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index afb481d..3f9ca4c 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -154,19 +154,22 @@ struct scsi_cmd { + struct sg_io_hdr sg_io; + }; + +-static void scsi_cmd_set(struct udev *udev, struct scsi_cmd *cmd, size_t i, int arg) ++static void scsi_cmd_init(struct udev *udev, struct scsi_cmd *cmd, unsigned char *buf, size_t bufsize) ++{ ++ memset(cmd, 0x00, sizeof(struct scsi_cmd)); ++ memset(buf, 0x00, bufsize); ++ cmd->cgc.quiet = 1; ++ cmd->cgc.sense = &cmd->_sense.s; ++ memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); ++ cmd->sg_io.interface_id = 'S'; ++ cmd->sg_io.mx_sb_len = sizeof(cmd->_sense); ++ cmd->sg_io.cmdp = cmd->cgc.cmd; ++ cmd->sg_io.sbp = cmd->_sense.u; ++ cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO; ++} ++ ++static void scsi_cmd_set(struct udev *udev, struct scsi_cmd *cmd, size_t i, unsigned char arg) + { +- if (i == 0) { +- memset(cmd, 0, sizeof(struct scsi_cmd)); +- cmd->cgc.quiet = 1; +- cmd->cgc.sense = &cmd->_sense.s; +- memset(&cmd->sg_io, 0, sizeof(cmd->sg_io)); +- cmd->sg_io.interface_id = 'S'; +- cmd->sg_io.mx_sb_len = sizeof(cmd->_sense); +- cmd->sg_io.cmdp = cmd->cgc.cmd; +- cmd->sg_io.sbp = cmd->_sense.u; +- cmd->sg_io.flags = SG_FLAG_LUN_INHIBIT | SG_FLAG_DIRECT_IO; +- } + cmd->sg_io.cmd_len = i + 1; + cmd->cgc.cmd[i] = arg; + } +@@ -237,7 +240,7 @@ static int cd_inquiry(struct udev *udev, int fd) { + unsigned char inq[128]; + int err; + +- memset(inq, 0, sizeof(inq)); ++ scsi_cmd_init(udev, &sc, inq, sizeof(inq)); + scsi_cmd_set(udev, &sc, 0, 0x12); + scsi_cmd_set(udev, &sc, 4, 36); + scsi_cmd_set(udev, &sc, 5, 0); +@@ -256,109 +259,132 @@ static int cd_inquiry(struct udev *udev, int fd) { + return 0; + } + +-static int cd_profiles(struct udev *udev, int fd) ++static int feature_profiles(struct udev *udev, const unsigned char *profiles, size_t size) + { +- struct scsi_cmd sc; +- unsigned char header[8]; +- unsigned char profiles[512]; +- unsigned int cur_profile; +- unsigned int len; + unsigned int i; +- int err; +- +- memset(header, 0, sizeof(header)); +- scsi_cmd_set(udev, &sc, 0, 0x46); +- scsi_cmd_set(udev, &sc, 1, 0); +- scsi_cmd_set(udev, &sc, 8, sizeof(header)); +- scsi_cmd_set(udev, &sc, 9, 0); +- err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); +- if ((err < 0)) { +- info_scsi_cmd_err(udev, "GET CONFIGURATION", err); +- return -1; +- } + +- len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]); +- info(udev, "GET CONFIGURATION: number of profiles %i\n", len); +- if (len > sizeof(profiles)) { +- info(udev, "invalid number of profiles\n"); +- return -1; +- } +- +- memset(profiles, 0, sizeof(profiles)); +- scsi_cmd_set(udev, &sc, 0, 0x46); +- scsi_cmd_set(udev, &sc, 1, 1); +- scsi_cmd_set(udev, &sc, 6, len >> 16); +- scsi_cmd_set(udev, &sc, 7, len >> 8); +- scsi_cmd_set(udev, &sc, 8, len); +- scsi_cmd_set(udev, &sc, 9, 0); +- err = scsi_cmd_run(udev, &sc, fd, profiles, len); +- if ((err < 0)) { +- info_scsi_cmd_err(udev, "GET CONFIGURATION", err); +- return -1; +- } +- +- /* device profiles */ +- for (i = 12; i < profiles[11]; i += 4) { +- unsigned int profile = (profiles[i] << 8 | profiles[i + 1]); +- if (profile == 0) +- continue; +- info(udev, "profile 0x%02x\n", profile); ++ for (i = 0; i+4 <= size; i += 4) { ++ int profile; + ++ profile = profiles[i] << 8 | profiles[i+1]; + switch (profile) { + case 0x03: + case 0x04: + case 0x05: ++ info(udev, "profile 0x%02x mo\n", profile); + cd_mo = 1; +- break; ++ break; + case 0x10: ++ info(udev, "profile 0x%02x dvd_rom\n", profile); + cd_dvd_rom = 1; + break; + case 0x12: ++ info(udev, "profile 0x%02x dvd_ram\n", profile); + cd_dvd_ram = 1; + break; + case 0x13: + case 0x14: ++ info(udev, "profile 0x%02x dvd_rw\n", profile); + cd_dvd_rw = 1; + break; + case 0x1B: ++ info(udev, "profile 0x%02x dvd_plus_r\n", profile); + cd_dvd_plus_r = 1; + break; + case 0x1A: ++ info(udev, "profile 0x%02x dvd_plus_rw\n", profile); + cd_dvd_plus_rw = 1; + break; + case 0x2A: ++ info(udev, "profile 0x%02x dvd_plus_rw_dl\n", profile); + cd_dvd_plus_rw_dl = 1; + break; + case 0x2B: ++ info(udev, "profile 0x%02x dvd_plus_r_dl\n", profile); + cd_dvd_plus_r_dl = 1; + break; + case 0x40: + cd_bd = 1; ++ info(udev, "profile 0x%02x bd\n", profile); + break; + case 0x41: + case 0x42: + cd_bd_r = 1; ++ info(udev, "profile 0x%02x bd_r\n", profile); + break; + case 0x43: + cd_bd_re = 1; ++ info(udev, "profile 0x%02x bd_re\n", profile); + break; + case 0x50: + cd_hddvd = 1; ++ info(udev, "profile 0x%02x hddvd\n", profile); + break; + case 0x51: + cd_hddvd_r = 1; ++ info(udev, "profile 0x%02x hddvd_r\n", profile); + break; + case 0x52: + cd_hddvd_rw = 1; ++ info(udev, "profile 0x%02x hddvd_rw\n", profile); ++ break; ++ default: ++ info(udev, "profile 0x%02x \n", profile); ++ break; ++ } ++ } ++ return 0; ++} ++ ++static int cd_profiles(struct udev *udev, int fd) ++{ ++ struct scsi_cmd sc; ++ unsigned char features[65530]; ++ unsigned int cur_profile = 0; ++ unsigned int len; ++ unsigned int i; ++ int err; ++ ++ scsi_cmd_init(udev, &sc, features, sizeof(features)); ++ scsi_cmd_set(udev, &sc, 0, 0x46); ++ scsi_cmd_set(udev, &sc, 7, (sizeof(features) >> 8) & 0xff); ++ scsi_cmd_set(udev, &sc, 8, sizeof(features) & 0xff); ++ scsi_cmd_set(udev, &sc, 9, 0); ++ err = scsi_cmd_run(udev, &sc, fd, features, sizeof(features)); ++ if ((err < 0)) { ++ info_scsi_cmd_err(udev, "GET CONFIGURATION", err); ++ return -1; ++ } ++ ++ len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3]; ++ info(udev, "GET CONFIGURATION: size of features buffer %i\n", len); ++ ++ if (len > sizeof(features)) { ++ info(udev, "can not get features in a single query, truncating\n"); ++ len = sizeof(features); ++ } ++ ++ /* device features */ ++ for (i = 8; i+4 < len; i += (4 + features[i+3])) { ++ unsigned int feature; ++ ++ feature = features[i] << 8 | features[i+1]; ++ ++ switch (feature) { ++ case 0x00: ++ info(udev, "GET CONFIGURATION: feature 'profiles', with %i entries\n", features[i+3] / 4); ++ feature_profiles(udev, &features[i]+4, features[i+3]); ++ ++ /* set current profile, if we got a profiles section */ ++ cur_profile = features[6] << 8 | features[7]; ++ info(udev, "current profile 0x%02x\n", cur_profile); + break; + default: ++ info(udev, "GET CONFIGURATION: feature %i , with %i bytes\n", feature, features[i+3]); + break; + } + } + +- /* current media profile */ +- cur_profile = header[6] << 8 | header[7]; +- info(udev, "current profile 0x%02x\n", cur_profile); + if (cur_profile == 0) { + info(udev, "no current profile, assuming no media\n"); + return -1; +@@ -443,7 +469,7 @@ static int cd_media_info(struct udev *udev, int fd) + }; + int err; + +- memset(header, 0, sizeof(header)); ++ scsi_cmd_init(udev, &sc, header, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x51); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); +@@ -476,7 +502,7 @@ static int cd_media_toc(struct udev *udev, int fd) + unsigned char *p; + int err; + +- memset(header, 0, sizeof(header)); ++ scsi_cmd_init(udev, &sc, header, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, 1); + scsi_cmd_set(udev, &sc, 8, sizeof(header)); +@@ -498,7 +524,7 @@ static int cd_media_toc(struct udev *udev, int fd) + if (len < 8) + return 0; + +- memset(toc, 0, sizeof(toc)); ++ scsi_cmd_init(udev, &sc, toc, sizeof(toc)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, header[2]); /* First Track/Session Number */ + scsi_cmd_set(udev, &sc, 7, len >> 8); +@@ -526,7 +552,7 @@ static int cd_media_toc(struct udev *udev, int fd) + cd_media_track_count_audio++; + } + +- memset(header, 0, sizeof (header)); ++ scsi_cmd_init(udev, &sc, header, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ + scsi_cmd_set(udev, &sc, 8, 12); +-- +1.7.0.1 + diff --git a/0068-cdrom_id-print-more-debug-messages.patch b/0068-cdrom_id-print-more-debug-messages.patch new file mode 100644 index 0000000..672c1bc --- /dev/null +++ b/0068-cdrom_id-print-more-debug-messages.patch @@ -0,0 +1,121 @@ +From 2e9df1981833e1e029b7ce6c12a44dffb6aad0cb Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 15 Apr 2010 20:48:04 +0200 +Subject: [PATCH 068/110] cdrom_id: print more debug messages + +--- + extras/cdrom_id/cdrom_id.c | 28 +++++++++++++++++++++++----- + 1 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 3f9ca4c..d9b6fbd 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -374,10 +374,6 @@ static int cd_profiles(struct udev *udev, int fd) + case 0x00: + info(udev, "GET CONFIGURATION: feature 'profiles', with %i entries\n", features[i+3] / 4); + feature_profiles(udev, &features[i]+4, features[i+3]); +- +- /* set current profile, if we got a profiles section */ +- cur_profile = features[6] << 8 | features[7]; +- info(udev, "current profile 0x%02x\n", cur_profile); + break; + default: + info(udev, "GET CONFIGURATION: feature %i , with %i bytes\n", feature, features[i+3]); +@@ -385,7 +381,10 @@ static int cd_profiles(struct udev *udev, int fd) + } + } + +- if (cur_profile == 0) { ++ cur_profile = features[6] << 8 | features[7]; ++ if (cur_profile > 0) { ++ info(udev, "current profile 0x%02x\n", cur_profile); ++ } else { + info(udev, "no current profile, assuming no media\n"); + return -1; + } +@@ -396,62 +395,81 @@ static int cd_profiles(struct udev *udev, int fd) + case 0x03: + case 0x04: + case 0x05: ++ info(udev, "profile 0x%02x \n", cur_profile); + cd_media_mo = 1; + break; + case 0x08: ++ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); + cd_media_cd_rom = 1; + break; + case 0x09: ++ info(udev, "profile 0x%02x media_cd_r\n", cur_profile); + cd_media_cd_r = 1; + break; + case 0x0a: ++ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); + cd_media_cd_rw = 1; + break; + case 0x10: ++ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); + cd_media_dvd_rom = 1; + break; + case 0x11: ++ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); + cd_media_dvd_r = 1; + break; + case 0x12: ++ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); + cd_media_dvd_ram = 1; + break; + case 0x13: + case 0x14: ++ info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile); + cd_media_dvd_rw = 1; + break; + case 0x1B: ++ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); + cd_media_dvd_plus_r = 1; + break; + case 0x1A: ++ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); + cd_media_dvd_plus_rw = 1; + break; + case 0x2A: ++ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); + cd_media_dvd_plus_rw_dl = 1; + break; + case 0x2B: ++ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); + cd_media_dvd_plus_r_dl = 1; + break; + case 0x40: ++ info(udev, "profile 0x%02x media_bd\n", cur_profile); + cd_media_bd = 1; + break; + case 0x41: + case 0x42: ++ info(udev, "profile 0x%02x media_bd_r\n", cur_profile); + cd_media_bd_r = 1; + break; + case 0x43: ++ info(udev, "profile 0x%02x media_bd_re\n", cur_profile); + cd_media_bd_re = 1; + break; + case 0x50: ++ info(udev, "profile 0x%02x media_hddvd\n", cur_profile); + cd_media_hddvd = 1; + break; + case 0x51: ++ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); + cd_media_hddvd_r = 1; + break; + case 0x52: ++ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); + cd_media_hddvd_rw = 1; + break; + default: ++ info(udev, "profile 0x%02x \n", cur_profile); + break; + } + return 0; +-- +1.7.0.1 + diff --git a/0069-cdrom_id-debug-print-feature-values-in-hex.patch b/0069-cdrom_id-debug-print-feature-values-in-hex.patch new file mode 100644 index 0000000..d34d52b --- /dev/null +++ b/0069-cdrom_id-debug-print-feature-values-in-hex.patch @@ -0,0 +1,25 @@ +From 140647ad1aec50e2f657e7838e893a87404ff83a Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 15 Apr 2010 21:18:21 +0200 +Subject: [PATCH 069/110] cdrom_id: debug - print feature values in hex + +--- + extras/cdrom_id/cdrom_id.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index d9b6fbd..b2c107b 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -376,7 +376,7 @@ static int cd_profiles(struct udev *udev, int fd) + feature_profiles(udev, &features[i]+4, features[i+3]); + break; + default: +- info(udev, "GET CONFIGURATION: feature %i , with %i bytes\n", feature, features[i+3]); ++ info(udev, "GET CONFIGURATION: feature 0x%04x , with 0x%02x bytes\n", feature, features[i+3]); + break; + } + } +-- +1.7.0.1 + diff --git a/0070-cdrom_id-debug-print-feature-values-in-hex.patch b/0070-cdrom_id-debug-print-feature-values-in-hex.patch new file mode 100644 index 0000000..1ff0b25 --- /dev/null +++ b/0070-cdrom_id-debug-print-feature-values-in-hex.patch @@ -0,0 +1,25 @@ +From a60b077a465b19af2efd9bf0cb5f0f67117be780 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 15 Apr 2010 21:22:38 +0200 +Subject: [PATCH 070/110] cdrom_id: debug - print feature values in hex + +--- + extras/cdrom_id/cdrom_id.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index b2c107b..16b1260 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -357,7 +357,7 @@ static int cd_profiles(struct udev *udev, int fd) + } + + len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3]; +- info(udev, "GET CONFIGURATION: size of features buffer %i\n", len); ++ info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len); + + if (len > sizeof(features)) { + info(udev, "can not get features in a single query, truncating\n"); +-- +1.7.0.1 + diff --git a/0071-cdrom_id-Do-not-ignore-errors-from-scsi_cmd_run.patch b/0071-cdrom_id-Do-not-ignore-errors-from-scsi_cmd_run.patch new file mode 100644 index 0000000..b5543bf --- /dev/null +++ b/0071-cdrom_id-Do-not-ignore-errors-from-scsi_cmd_run.patch @@ -0,0 +1,79 @@ +From 58e178894bfc040834e1270c6fe9b9fdef513550 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 15 Apr 2010 08:56:48 +0200 +Subject: [PATCH 071/110] cdrom_id: Do not ignore errors from scsi_cmd_run() + +scsi_cmd_run() can return positive error messages if we have CHECK_CONDITION +set and get the error code from the SCSI command result. So check the result +for non-zero, not for being negative. + +This should fix another cause for "phantom" media in empty CD-ROM drives. + +Thanks to Mike Brudevold for spotting this! + +https://launchpad.net/bugs/562978 +--- + extras/cdrom_id/cdrom_id.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 16b1260..37212e9 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -245,7 +245,7 @@ static int cd_inquiry(struct udev *udev, int fd) { + scsi_cmd_set(udev, &sc, 4, 36); + scsi_cmd_set(udev, &sc, 5, 0); + err = scsi_cmd_run(udev, &sc, fd, inq, 36); +- if ((err < 0)) { ++ if ((err != 0)) { + info_scsi_cmd_err(udev, "INQUIRY", err); + return -1; + } +@@ -351,7 +351,7 @@ static int cd_profiles(struct udev *udev, int fd) + scsi_cmd_set(udev, &sc, 8, sizeof(features) & 0xff); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, features, sizeof(features)); +- if ((err < 0)) { ++ if ((err != 0)) { + info_scsi_cmd_err(udev, "GET CONFIGURATION", err); + return -1; + } +@@ -492,7 +492,7 @@ static int cd_media_info(struct udev *udev, int fd) + scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); +- if ((err < 0)) { ++ if ((err != 0)) { + info_scsi_cmd_err(udev, "READ DISC INFORMATION", err); + return -1; + }; +@@ -526,7 +526,7 @@ static int cd_media_toc(struct udev *udev, int fd) + scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); +- if ((err < 0)) { ++ if ((err != 0)) { + info_scsi_cmd_err(udev, "READ TOC", err); + return -1; + } +@@ -549,7 +549,7 @@ static int cd_media_toc(struct udev *udev, int fd) + scsi_cmd_set(udev, &sc, 8, len); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, toc, len); +- if ((err < 0)) { ++ if ((err != 0)) { + info_scsi_cmd_err(udev, "READ TOC (tracks)", err); + return -1; + } +@@ -576,7 +576,7 @@ static int cd_media_toc(struct udev *udev, int fd) + scsi_cmd_set(udev, &sc, 8, 12); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); +- if ((err < 0)) { ++ if ((err != 0)) { + info_scsi_cmd_err(udev, "READ TOC (multi session)", err); + return -1; + } +-- +1.7.0.1 + diff --git a/0072-cdrom_id-Swap-media-state-and-TOC-info-probing.patch b/0072-cdrom_id-Swap-media-state-and-TOC-info-probing.patch new file mode 100644 index 0000000..2865983 --- /dev/null +++ b/0072-cdrom_id-Swap-media-state-and-TOC-info-probing.patch @@ -0,0 +1,38 @@ +From 30e3b1a0d3a3ec76f16736470dc656744848d941 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 15 Apr 2010 21:25:57 +0200 +Subject: [PATCH 072/110] cdrom_id: Swap media state and TOC info probing + +Blank CDs do not have a TOC, thus will fail cd_media_toc() (at least with the +"Do not ignore errors from scsi_cmd_run()" fix). Thus probe the media state +first, so that we can properly detect blank media. +--- + extras/cdrom_id/cdrom_id.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 37212e9..722b8f8 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -681,14 +681,14 @@ int main(int argc, char *argv[]) + if (cd_profiles(udev, fd) < 0) + goto print; + +- /* get session/track info */ +- if (cd_media_toc(udev, fd) < 0) +- goto print; +- + /* get writable media state */ + if (cd_media_info(udev, fd) < 0) + goto print; + ++ /* get session/track info */ ++ if (cd_media_toc(udev, fd) < 0) ++ goto print; ++ + print: + printf("ID_CDROM=1\n"); + if (cd_cd_rom) +-- +1.7.0.1 + diff --git a/0074-cdrom_id-add-missing-profiles-to-feature_profiles.patch b/0074-cdrom_id-add-missing-profiles-to-feature_profiles.patch new file mode 100644 index 0000000..26e92b1 --- /dev/null +++ b/0074-cdrom_id-add-missing-profiles-to-feature_profiles.patch @@ -0,0 +1,36 @@ +From 7c07740ce7b0941844b15573449a730283d5bba5 Mon Sep 17 00:00:00 2001 +From: Mike Brudevold +Date: Thu, 15 Apr 2010 19:55:50 -0500 +Subject: [PATCH 074/110] cdrom_id: add missing profiles to feature_profiles + +Signed-off-by: Mike Brudevold +--- + extras/cdrom_id/cdrom_id.c | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 722b8f8..da2785e 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -274,6 +274,18 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si + info(udev, "profile 0x%02x mo\n", profile); + cd_mo = 1; + break; ++ case 0x08: ++ info(udev, "profile 0x%02x cd_rom\n", profile); ++ cd_cd_rom = 1; ++ break; ++ case 0x09: ++ info(udev, "profile 0x%02x cd_r\n", profile); ++ cd_cd_r = 1; ++ break; ++ case 0x0A: ++ info(udev, "profile 0x%02x cd_rw\n", profile); ++ cd_cd_rw = 1; ++ break; + case 0x10: + info(udev, "profile 0x%02x dvd_rom\n", profile); + cd_dvd_rom = 1; +-- +1.7.0.1 + diff --git a/0075-cdrom_id-set-ID_CDROM_MEDIA-1-only-for-known-media.patch b/0075-cdrom_id-set-ID_CDROM_MEDIA-1-only-for-known-media.patch new file mode 100644 index 0000000..091bba3 --- /dev/null +++ b/0075-cdrom_id-set-ID_CDROM_MEDIA-1-only-for-known-media.patch @@ -0,0 +1,183 @@ +From bc913ce47821ed030437ec9b25507b5dd52b59cb Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 17 Apr 2010 19:31:44 +0200 +Subject: [PATCH 075/110] cdrom_id: set ID_CDROM_MEDIA=1 only for known media + +On Sat, Apr 17, 2010 at 18:26, Mike Brudevold wrote: +> My CD-RW drive experiences a problem in that it automatically closes +> after opening if there is media in the drive. This only happens if +> there was media in the drive when it was last closed (an empty drive +> stays open). +... +> cd_profiles: current profile 0x02 +> cd_profiles: profile 0x02 +... + +Do not pretend to have a media, when we receive a profile like 0x02, +which just means "Removable disk". + +Thanks to Mike Brudevold for the initial patch. +--- + extras/cdrom_id/cdrom_id.c | 33 +++++++++++++++++++++++++-------- + 1 files changed, 25 insertions(+), 8 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index da2785e..935f117 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -401,83 +401,99 @@ static int cd_profiles(struct udev *udev, int fd) + return -1; + } + +- cd_media = 1; +- + switch (cur_profile) { + case 0x03: + case 0x04: + case 0x05: + info(udev, "profile 0x%02x \n", cur_profile); ++ cd_media = 1; + cd_media_mo = 1; + break; + case 0x08: + info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); ++ cd_media = 1; + cd_media_cd_rom = 1; + break; + case 0x09: + info(udev, "profile 0x%02x media_cd_r\n", cur_profile); ++ cd_media = 1; + cd_media_cd_r = 1; + break; + case 0x0a: + info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); ++ cd_media = 1; + cd_media_cd_rw = 1; + break; + case 0x10: + info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_rom = 1; + break; + case 0x11: + info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_r = 1; + break; + case 0x12: + info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_ram = 1; + break; + case 0x13: + case 0x14: + info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_rw = 1; + break; + case 0x1B: + info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_plus_r = 1; + break; + case 0x1A: + info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_plus_rw = 1; + break; + case 0x2A: + info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_plus_rw_dl = 1; + break; + case 0x2B: + info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); ++ cd_media = 1; + cd_media_dvd_plus_r_dl = 1; + break; + case 0x40: + info(udev, "profile 0x%02x media_bd\n", cur_profile); ++ cd_media = 1; + cd_media_bd = 1; + break; + case 0x41: + case 0x42: + info(udev, "profile 0x%02x media_bd_r\n", cur_profile); ++ cd_media = 1; + cd_media_bd_r = 1; + break; + case 0x43: + info(udev, "profile 0x%02x media_bd_re\n", cur_profile); ++ cd_media = 1; + cd_media_bd_re = 1; + break; + case 0x50: + info(udev, "profile 0x%02x media_hddvd\n", cur_profile); ++ cd_media = 1; + cd_media_hddvd = 1; + break; + case 0x51: + info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); ++ cd_media = 1; + cd_media_hddvd_r = 1; + break; + case 0x52: + info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); ++ cd_media = 1; + cd_media_hddvd_rw = 1; + break; + default: +@@ -501,7 +517,7 @@ static int cd_media_info(struct udev *udev, int fd) + + scsi_cmd_init(udev, &sc, header, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x51); +- scsi_cmd_set(udev, &sc, 8, sizeof(header)); ++ scsi_cmd_set(udev, &sc, 8, sizeof(header) & 0xff); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); + if ((err != 0)) { +@@ -509,10 +525,11 @@ static int cd_media_info(struct udev *udev, int fd) + return -1; + }; + ++ cd_media = 1; + info(udev, "disk type %02x\n", header[8]); + + /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ +- if (!cd_media_cd_rom && (header[2] & 3) < 4) ++ if (!cd_media_cd_rom) + cd_media_state = media_status[header[2] & 3]; + + if ((header[2] & 3) != 2) +@@ -535,7 +552,7 @@ static int cd_media_toc(struct udev *udev, int fd) + scsi_cmd_init(udev, &sc, header, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, 1); +- scsi_cmd_set(udev, &sc, 8, sizeof(header)); ++ scsi_cmd_set(udev, &sc, 8, sizeof(header) & 0xff); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); + if ((err != 0)) { +@@ -557,8 +574,8 @@ static int cd_media_toc(struct udev *udev, int fd) + scsi_cmd_init(udev, &sc, toc, sizeof(toc)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 6, header[2]); /* First Track/Session Number */ +- scsi_cmd_set(udev, &sc, 7, len >> 8); +- scsi_cmd_set(udev, &sc, 8, len); ++ scsi_cmd_set(udev, &sc, 7, (len >> 8) & 0xff); ++ scsi_cmd_set(udev, &sc, 8, len & 0xff); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, toc, len); + if ((err != 0)) { +@@ -585,7 +602,7 @@ static int cd_media_toc(struct udev *udev, int fd) + scsi_cmd_init(udev, &sc, header, sizeof(header)); + scsi_cmd_set(udev, &sc, 0, 0x43); + scsi_cmd_set(udev, &sc, 2, 1); /* Session Info */ +- scsi_cmd_set(udev, &sc, 8, 12); ++ scsi_cmd_set(udev, &sc, 8, sizeof(header)); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); + if ((err != 0)) { +-- +1.7.0.1 + diff --git a/0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch b/0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch new file mode 100644 index 0000000..cc4a088 --- /dev/null +++ b/0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch @@ -0,0 +1,26 @@ +From 155e313bfda594b3d8e2a31d48f341765bdfa75d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 27 Apr 2010 12:22:42 +0200 +Subject: [PATCH 110/110] cdrom_id: only mark sr[0-9]* as ID_CDROM + +we cannot be sure for xvd* +--- + extras/cdrom_id/60-cdrom_id.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules +index 16b3af9..b3109f1 100644 +--- a/extras/cdrom_id/60-cdrom_id.rules ++++ b/extras/cdrom_id/60-cdrom_id.rules +@@ -5,7 +5,7 @@ SUBSYSTEM!="block", GOTO="cdrom_end" + KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" + ENV{DEVTYPE}!="disk", GOTO="cdrom_end" + +-ENV{ID_CDROM}="1" ++KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1" + IMPORT{program}="cdrom_id --export $tempnode" + + LABEL="cdrom_end" +-- +1.7.0.1 + diff --git a/udev.spec b/udev.spec index 37e0e9b..f2aa3d2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -38,6 +38,16 @@ Patch50: 0050-cdrom_id-check-mount-state-in-retry-loop.patch Patch51: 0051-cdrom_id-always-set-ID_CDROM-regardless-if-we-can-ru.patch Patch62: 0062-cdrom_id-Fix-uninitialized-variables.patch Patch65: 0065-cdrom_id-Fix-uninitialized-buffers.patch +Patch66: 0066-cdrom_id.patch +Patch67: 0067-cdrom_id-rework-feature-profiles-buffer-parsing.patch +Patch68: 0068-cdrom_id-print-more-debug-messages.patch +Patch69: 0069-cdrom_id-debug-print-feature-values-in-hex.patch +Patch70: 0070-cdrom_id-debug-print-feature-values-in-hex.patch +Patch71: 0071-cdrom_id-Do-not-ignore-errors-from-scsi_cmd_run.patch +Patch72: 0072-cdrom_id-Swap-media-state-and-TOC-info-probing.patch +Patch74: 0074-cdrom_id-add-missing-profiles-to-feature_profiles.patch +Patch75: 0075-cdrom_id-set-ID_CDROM_MEDIA-1-only-for-known-media.patch +Patch110: 0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch Patch101: udev-147-virtio.patch @@ -152,6 +162,18 @@ glib-based applications using libudev functionality. %patch62 -p1 -b .git62 %patch65 -p1 -b .git65 +%patch66 -p1 -b .git66 +%patch67 -p1 -b .git67 +%patch68 -p1 -b .git68 +%patch69 -p1 -b .git69 +%patch70 -p1 -b .git70 +%patch71 -p1 -b .git71 +%patch72 -p1 -b .git72 +%patch74 -p1 -b .git74 +%patch75 -p1 -b .git75 +%patch110 -p1 -b .git110 + + %patch101 -p1 autoreconf -i @@ -396,6 +418,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Apr 27 2010 Harald Hoyer 145-21 +- more cdrom_id bugfixes which can prevent autoclose of + some cdroms + * Tue Apr 13 2010 Harald Hoyer 145-20 - more cdrom_id bugfixes for buggy cdroms and CD burning (bug #577659, bug#566535, bug#561003, bug#481346, bug#580812) From 8ead087df86ebe74702dfb7e50b97047f4218d72 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 12 May 2010 14:41:26 +0000 Subject: [PATCH 557/640] - version 154 --- .cvsignore | 2 +- 0001-configure.ac-version-bump.patch | 34 - ...buffer-overrun-risk-in-readlink-call.patch | 32 - 0003-more-readlink-buffer-size-handling.patch | 113 -- ...-from-ignore_remove-and-all_partitio.patch | 73 - 0005-fix-previous-commit.patch | 33 - ...-not-releasing-for-Pegatron-platform.patch | 29 - ...export-db-remove-watch-handle-export.patch | 27 - ...ve-event-filtering-and-device-enumer.patch | 1706 ----------------- 0009-all-to-match-against-a-given-TAG.patch | 101 - ...ag-instead-of-a-property-to-mark-dev.patch | 125 -- ...mand-loading-logic-for-db-and-uevent.patch | 49 - 0012-use-the-usual-TAG-TAG-logic.patch | 129 -- ...-old-tags-when-configuration-changes.patch | 168 -- ...ULL-in-udev_device_get_tags_list_ent.patch | 39 - 0015-export-tag-functions.patch | 24 - ...port-udev_device_get_tags_list_entry.patch | 50 - ...e-firmware-path-setting-out-of-extra.patch | 68 - ...luetooth-key-on-Acer-TravelMate-4720.patch | 26 - ...-to-find-an-idle-worker-instead-of-f.patch | 58 - sources | 2 +- start_udev | 18 +- ...-153.tar.bz2.sign => udev-154.tar.bz2.sign | 6 +- udev.spec | 58 +- 24 files changed, 19 insertions(+), 2951 deletions(-) delete mode 100644 0001-configure.ac-version-bump.patch delete mode 100644 0002-remove-buffer-overrun-risk-in-readlink-call.patch delete mode 100644 0003-more-readlink-buffer-size-handling.patch delete mode 100644 0004-remove-left-over-from-ignore_remove-and-all_partitio.patch delete mode 100644 0005-fix-previous-commit.patch delete mode 100644 0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch delete mode 100644 0007-udevadm-info-export-db-remove-watch-handle-export.patch delete mode 100644 0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch delete mode 100644 0009-all-to-match-against-a-given-TAG.patch delete mode 100644 0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch delete mode 100644 0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch delete mode 100644 0012-use-the-usual-TAG-TAG-logic.patch delete mode 100644 0013-delete-old-tags-when-configuration-changes.patch delete mode 100644 0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch delete mode 100644 0015-export-tag-functions.patch delete mode 100644 0016-export-udev_device_get_tags_list_entry.patch delete mode 100644 0017-configure.ac-move-firmware-path-setting-out-of-extra.patch delete mode 100644 0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch delete mode 100644 0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch rename udev-153.tar.bz2.sign => udev-154.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index e15c73e..a4264db 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-153.tar.bz2 +udev-154.tar.bz2 diff --git a/0001-configure.ac-version-bump.patch b/0001-configure.ac-version-bump.patch deleted file mode 100644 index b54be08..0000000 --- a/0001-configure.ac-version-bump.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c51d2f2746a54c8418965f22d1882b1ac3a18ed8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 21 Apr 2010 08:50:59 +0200 -Subject: [PATCH 01/19] configure.ac: version bump - ---- - NEWS | 3 +++ - configure.ac | 2 +- - 2 files changed, 4 insertions(+), 1 deletions(-) - -diff --git a/NEWS b/NEWS -index 87d5343..f3163ec 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,6 @@ -+udev 154 -+======== -+ - udev 153 - ======== - Fix broken firmware loader search path. -diff --git a/configure.ac b/configure.ac -index 4fcdbcd..d4d29c4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,4 +1,4 @@ --AC_INIT([udev], [153], [linux-hotplug@vger.kernel.org]) -+AC_INIT([udev], [154], [linux-hotplug@vger.kernel.org]) - AC_PREREQ(2.60) - AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects]) - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) --- -1.7.0.1 - diff --git a/0002-remove-buffer-overrun-risk-in-readlink-call.patch b/0002-remove-buffer-overrun-risk-in-readlink-call.patch deleted file mode 100644 index 4e64f31..0000000 --- a/0002-remove-buffer-overrun-risk-in-readlink-call.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e925018786d85fb3aed3b62a0a89309f9a7d5e4f Mon Sep 17 00:00:00 2001 -From: Mathias Nyman -Date: Wed, 21 Apr 2010 13:52:52 +0300 -Subject: [PATCH 02/19] remove buffer-overrun risk in readlink call - -readlink does not write a nul character to the end of the -string it returns. Therefore ask for one fewer character -than the buffer size so there's always room for an extra \0. - -Signed-off-by: Mathias Nyman -Signed-off-by: Phil Carmody -Signed-off-by: Martin Pitt ---- - udev/udev-node.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 2a2c2cf..ceb1d52 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -163,7 +163,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - int len; - - dbg(udev, "found existing symlink '%s'\n", slink); -- len = readlink(slink, buf, sizeof(buf)); -+ len = readlink(slink, buf, sizeof(buf) - 1); - if (len > 0) { - buf[len] = '\0'; - if (strcmp(target, buf) == 0) { --- -1.7.0.1 - diff --git a/0003-more-readlink-buffer-size-handling.patch b/0003-more-readlink-buffer-size-handling.patch deleted file mode 100644 index 870fb72..0000000 --- a/0003-more-readlink-buffer-size-handling.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 60067cc75ac7dd583beea584f87f2f6d3358f3c1 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 21 Apr 2010 14:44:33 +0200 -Subject: [PATCH 03/19] more readlink buffer size handling - ---- - libudev/libudev-device.c | 27 ++++++++++++++------------- - libudev/libudev-queue.c | 2 +- - udev/udev-node.c | 4 ++-- - udev/udev-watch.c | 4 ++-- - 4 files changed, 19 insertions(+), 18 deletions(-) - -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index b3b6a63..4003545 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -222,12 +222,11 @@ int udev_device_read_db(struct udev_device *udev_device) - char *next; - - target_len = readlink(filename, target, sizeof(target)); -- if (target_len > 0) -- target[target_len] = '\0'; -- else { -- dbg(udev_device->udev, "error reading db link %s: %m\n", filename); -+ if (target_len <= 0 || target_len == sizeof(target)) { -+ info(udev_device->udev, "error reading db link %s: %m\n", filename); - return -1; - } -+ target[target_len] = '\0'; - - next = strchr(target, ' '); - if (next != NULL) { -@@ -1095,16 +1094,18 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const - goto out; - - len = readlink(path, target, sizeof(target)); -- if (len > 0) { -- target[len] = '\0'; -- pos = strrchr(target, '/'); -- if (pos != NULL) { -- pos = &pos[1]; -- dbg(udev_device->udev, "cache '%s' with link value '%s'\n", sysattr, pos); -- list_entry = udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, pos, 0, 0); -- val = udev_list_entry_get_value(list_entry); -- } -+ if (len <= 0 || len == sizeof(target)) -+ goto out; -+ target[len] = '\0'; -+ -+ pos = strrchr(target, '/'); -+ if (pos != NULL) { -+ pos = &pos[1]; -+ dbg(udev_device->udev, "cache '%s' with link value '%s'\n", sysattr, pos); -+ list_entry = udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, pos, 0, 0); -+ val = udev_list_entry_get_value(list_entry); - } -+ - goto out; - } - -diff --git a/libudev/libudev-queue.c b/libudev/libudev-queue.c -index f06c9e8..5a4a3dc 100644 ---- a/libudev/libudev-queue.c -+++ b/libudev/libudev-queue.c -@@ -488,7 +488,7 @@ struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev - s = syspath; - l = util_strpcpyl(&s, sizeof(syspath), udev_get_sys_path(udev_queue->udev), NULL); - len = readlinkat(dirfd(dir), dent->d_name, s, l); -- if (len < 0 || (size_t)len >= l) -+ if (len <= 0 || (size_t)len == l) - continue; - s[len] = '\0'; - dbg(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name); -diff --git a/udev/udev-node.c b/udev/udev-node.c -index ceb1d52..5c1b04b 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -163,8 +163,8 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - int len; - - dbg(udev, "found existing symlink '%s'\n", slink); -- len = readlink(slink, buf, sizeof(buf) - 1); -- if (len > 0) { -+ len = readlink(slink, buf, sizeof(buf)); -+ if (len > 0 && len < (int)sizeof(buf)) { - buf[len] = '\0'; - if (strcmp(target, buf) == 0) { - info(udev, "preserve already existing symlink '%s' to '%s'\n", -diff --git a/udev/udev-watch.c b/udev/udev-watch.c -index 7135d9f..5fa6010 100644 ---- a/udev/udev-watch.c -+++ b/udev/udev-watch.c -@@ -81,7 +81,7 @@ void udev_watch_restore(struct udev *udev) - s = device; - l = util_strpcpy(&s, sizeof(device), udev_get_sys_path(udev)); - len = readlinkat(dirfd(dir), ent->d_name, s, l); -- if (len <= 0 || len >= (ssize_t)l) -+ if (len <= 0 || len == (ssize_t)l) - goto unlink; - s[len] = '\0'; - -@@ -173,7 +173,7 @@ struct udev_device *udev_watch_lookup(struct udev *udev, int wd) - s = majmin; - l = util_strpcpy(&s, sizeof(majmin), udev_get_sys_path(udev)); - len = readlink(filename, s, l); -- if (len < 0 || (size_t)len >= l) -+ if (len <= 0 || (size_t)len == l) - return NULL; - s[len] = '\0'; - --- -1.7.0.1 - diff --git a/0004-remove-left-over-from-ignore_remove-and-all_partitio.patch b/0004-remove-left-over-from-ignore_remove-and-all_partitio.patch deleted file mode 100644 index b14f0a0..0000000 --- a/0004-remove-left-over-from-ignore_remove-and-all_partitio.patch +++ /dev/null @@ -1,73 +0,0 @@ -From e9906fec711192761f27468244d3012041bcb0ee Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 21 Apr 2010 15:11:57 +0200 -Subject: [PATCH 04/19] remove left-over from ignore_remove and all_partitions - ---- - udev/udev-rules.c | 10 ---------- - 1 files changed, 0 insertions(+), 10 deletions(-) - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 4f18aca..f5d23b4 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -149,7 +149,6 @@ enum token_type { - TK_A_STRING_ESCAPE_NONE, - TK_A_STRING_ESCAPE_REPLACE, - TK_A_INOTIFY_WATCH, /* int */ -- TK_A_NUM_FAKE_PART, /* int */ - TK_A_DEVLINK_PRIO, /* int */ - TK_A_OWNER, /* val */ - TK_A_GROUP, /* val */ -@@ -161,7 +160,6 @@ enum token_type { - TK_A_NAME, /* val */ - TK_A_DEVLINK, /* val */ - TK_A_EVENT_TIMEOUT, /* int */ -- TK_A_IGNORE_REMOVE, - TK_A_ATTR, /* val, attr */ - TK_A_RUN, /* val, bool */ - TK_A_GOTO, /* size_t */ -@@ -279,7 +277,6 @@ static const char *token_str(enum token_type type) - [TK_A_STRING_ESCAPE_NONE] = "A STRING_ESCAPE_NONE", - [TK_A_STRING_ESCAPE_REPLACE] = "A STRING_ESCAPE_REPLACE", - [TK_A_INOTIFY_WATCH] = "A INOTIFY_WATCH", -- [TK_A_NUM_FAKE_PART] = "A NUM_FAKE_PART", - [TK_A_DEVLINK_PRIO] = "A DEVLINK_PRIO", - [TK_A_OWNER] = "A OWNER", - [TK_A_GROUP] = "A GROUP", -@@ -291,7 +288,6 @@ static const char *token_str(enum token_type type) - [TK_A_NAME] = "A NAME", - [TK_A_DEVLINK] = "A DEVLINK", - [TK_A_EVENT_TIMEOUT] = "A EVENT_TIMEOUT", -- [TK_A_IGNORE_REMOVE] = "A IGNORE_REMOVE", - [TK_A_ATTR] = "A ATTR", - [TK_A_RUN] = "A RUN", - [TK_A_GOTO] = "A GOTO", -@@ -360,9 +356,6 @@ static void dump_token(struct udev_rules *rules, struct token *token) - break; - case TK_A_STRING_ESCAPE_NONE: - case TK_A_STRING_ESCAPE_REPLACE: -- case TK_A_IGNORE_REMOVE: -- dbg(rules->udev, "%s\n", token_str(type)); -- break; - case TK_M_TEST: - dbg(rules->udev, "%s %s '%s'(%s) %#o\n", - token_str(type), operation_str(op), value, string_glob_str(glob), token->key.mode); -@@ -1030,14 +1023,11 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, - break; - case TK_A_STRING_ESCAPE_NONE: - case TK_A_STRING_ESCAPE_REPLACE: -- case TK_A_IGNORE_REMOVE: -- break; - case TK_A_RUN: - token->key.value_off = add_string(rule_tmp->rules, value); - token->key.fail_on_error = *(int *)data; - break; - case TK_A_INOTIFY_WATCH: -- case TK_A_NUM_FAKE_PART: - case TK_A_DEVLINK_PRIO: - token->key.devlink_prio = *(int *)data; - break; --- -1.7.0.1 - diff --git a/0005-fix-previous-commit.patch b/0005-fix-previous-commit.patch deleted file mode 100644 index 9ade8ad..0000000 --- a/0005-fix-previous-commit.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5d69a34caffd595d918dd859a5b079f95d250064 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 21 Apr 2010 15:43:05 +0200 -Subject: [PATCH 05/19] fix previous commit - ---- - udev/udev-rules.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index f5d23b4..6eb8350 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -356,6 +356,8 @@ static void dump_token(struct udev_rules *rules, struct token *token) - break; - case TK_A_STRING_ESCAPE_NONE: - case TK_A_STRING_ESCAPE_REPLACE: -+ dbg(rules->udev, "%s\n", token_str(type)); -+ break; - case TK_M_TEST: - dbg(rules->udev, "%s %s '%s'(%s) %#o\n", - token_str(type), operation_str(op), value, string_glob_str(glob), token->key.mode); -@@ -1023,6 +1025,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, - break; - case TK_A_STRING_ESCAPE_NONE: - case TK_A_STRING_ESCAPE_REPLACE: -+ break; - case TK_A_RUN: - token->key.value_off = add_string(rule_tmp->rules, value); - token->key.fail_on_error = *(int *)data; --- -1.7.0.1 - diff --git a/0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch b/0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch deleted file mode 100644 index 3c27d50..0000000 --- a/0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d05137cca5f92a102a0bdd55e42de9852a739913 Mon Sep 17 00:00:00 2001 -From: Jerone Young -Date: Wed, 21 Apr 2010 12:19:37 -0500 -Subject: [PATCH 06/19] Fix volume keys not releasing for Pegatron platform - -Pegatron has a new platform coming out being sold by many small -manufacturers. This platform has volume keys that are not sending a key -release. This patch ensures those keys send release. - -Signed-off-by: Jerone Young -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keyboard-force-release.rules | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index c9edacf..011b2e3 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -29,4 +29,6 @@ ENV{DMI_VENDOR}=="FOXCONN", ATTR{[dmi/id]product_name}=="QBOOK", RUN+="keyboard- - - ENV{DMI_VENDOR}=="MTC", ATTR{[dmi/id]product_version}=="A0", RUN+="keyboard-force-release.sh $devpath common-volume-keys" - -+ENV{DMI_VENDOR}=="PEGATRON CORP.", ATTR{[dmi/id]product_name}=="Spring Peak", RUN+="keyboard-force-release.sh $devpath common-volume-keys" -+ - LABEL="force_release_end" --- -1.7.0.1 - diff --git a/0007-udevadm-info-export-db-remove-watch-handle-export.patch b/0007-udevadm-info-export-db-remove-watch-handle-export.patch deleted file mode 100644 index 8fa424e..0000000 --- a/0007-udevadm-info-export-db-remove-watch-handle-export.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e7964b93e826274d0e92d58e458decb49e502bf5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 22 Apr 2010 06:23:16 +0200 -Subject: [PATCH 07/19] udevadm: info --export-db -- remove watch handle export - ---- - udev/udevadm-info.c | 4 ---- - 1 files changed, 0 insertions(+), 4 deletions(-) - -diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c -index 5f6209a..b395ad9 100644 ---- a/udev/udevadm-info.c -+++ b/udev/udevadm-info.c -@@ -142,10 +142,6 @@ static void print_record(struct udev_device *device) - if (i != 0) - printf("L: %i\n", i); - -- i = udev_device_get_watch_handle(device); -- if (i >= 0) -- printf("W: %u\n", i); -- - udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) { - len = strlen(udev_get_dev_path(udev_device_get_udev(device))); - printf("S: %s\n", &udev_list_entry_get_name(list_entry)[len+1]); --- -1.7.0.1 - diff --git a/0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch b/0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch deleted file mode 100644 index d40b240..0000000 --- a/0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch +++ /dev/null @@ -1,1706 +0,0 @@ -From 28460195c2ae90892bf556aff2b80705a8f37795 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 22 Apr 2010 18:12:36 +0200 -Subject: [PATCH 08/19] add TAG= to improve event filtering and device enumeration - ---- - Makefile.am | 4 +- - libudev/docs/libudev-sections.txt | 2 + - libudev/exported_symbols | 1 + - libudev/libudev-device-private.c | 46 ++++++++- - libudev/libudev-device.c | 159 ++++++++++++++++++++------- - libudev/libudev-enumerate.c | 197 ++++++++++++++++++++++----------- - libudev/libudev-monitor.c | 218 +++++++++++++++++++++++++++---------- - libudev/libudev-private.h | 8 +- - libudev/libudev-util.c | 75 +++++++++++-- - libudev/libudev.h | 4 +- - udev/udev-event.c | 1 - - udev/udev-rules.c | 14 +++ - udev/udev.xml | 13 ++ - udev/udevadm-monitor.c | 17 +++- - udev/udevadm-trigger.c | 7 +- - udev/udevadm.xml | 13 ++ - 16 files changed, 595 insertions(+), 184 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 7403949..9d3fefd 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -28,9 +28,9 @@ CLEANFILES = - # ------------------------------------------------------------------------------ - # libudev - # ------------------------------------------------------------------------------ --LIBUDEV_CURRENT=7 -+LIBUDEV_CURRENT=8 - LIBUDEV_REVISION=0 --LIBUDEV_AGE=7 -+LIBUDEV_AGE=8 - - SUBDIRS += libudev/docs - -diff --git a/libudev/docs/libudev-sections.txt b/libudev/docs/libudev-sections.txt -index ca781ff..3f8c107 100644 ---- a/libudev/docs/libudev-sections.txt -+++ b/libudev/docs/libudev-sections.txt -@@ -68,6 +68,7 @@ udev_monitor_enable_receiving - udev_monitor_get_fd - udev_monitor_receive_device - udev_monitor_filter_add_match_subsystem_devtype -+udev_monitor_filter_add_match_tag - udev_monitor_filter_update - udev_monitor_filter_remove - -@@ -85,6 +86,7 @@ udev_enumerate_add_nomatch_subsystem - udev_enumerate_add_match_sysattr - udev_enumerate_add_nomatch_sysattr - udev_enumerate_add_match_property -+udev_enumerate_add_match_tag - udev_enumerate_add_match_sysname - udev_enumerate_add_syspath - udev_enumerate_scan_devices -diff --git a/libudev/exported_symbols b/libudev/exported_symbols -index 61486c6..c0ca4b9 100644 ---- a/libudev/exported_symbols -+++ b/libudev/exported_symbols -@@ -60,6 +60,7 @@ udev_monitor_get_udev - udev_monitor_get_fd - udev_monitor_receive_device - udev_monitor_filter_add_match_subsystem_devtype -+udev_monitor_filter_add_match_tag - udev_monitor_filter_update - udev_monitor_filter_remove - udev_queue_new -diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c -index 5e4381e..13f1ebf 100644 ---- a/libudev/libudev-device-private.c -+++ b/libudev/libudev-device-private.c -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -21,6 +22,37 @@ - #include "libudev.h" - #include "libudev-private.h" - -+static int udev_device_tag_index(struct udev_device *udev_device, bool add) -+{ -+ struct udev *udev = udev_device_get_udev(udev_device); -+ struct udev_list_entry *list_entry; -+ -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) { -+ char filename[UTIL_PATH_SIZE]; -+ -+ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", -+ udev_list_entry_get_name(list_entry), "/", -+ udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); -+ -+ if (add) { -+ util_create_path(udev, filename); -+ symlink(udev_device_get_devpath(udev_device), filename); -+ if (udev_device_get_sysname_old(udev_device) != NULL) { -+ char filename_old[UTIL_PATH_SIZE]; -+ -+ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", -+ udev_list_entry_get_name(list_entry), -+ udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); -+ unlink(filename_old); -+ } -+ } else { -+ unlink(filename); -+ util_delete_path(udev, filename); -+ } -+ } -+ return 0; -+} -+ - int udev_device_update_db(struct udev_device *udev_device) - { - struct udev *udev = udev_device_get_udev(udev_device); -@@ -41,6 +73,8 @@ int udev_device_update_db(struct udev_device *udev_device) - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) - if (udev_list_entry_get_flags(list_entry)) - goto file; -+ if (udev_device_get_tags_list_entry(udev_device) != NULL) -+ goto file; - if (udev_device_get_devlink_priority(udev_device) != 0) - goto file; - if (udev_device_get_event_timeout(udev_device) >= 0) -@@ -80,7 +114,7 @@ file: - if (f == NULL) { - err(udev, "unable to create temporary db file '%s': %m\n", filename_tmp); - return -1; -- } -+ } - - if (udev_device_get_devnode(udev_device) != NULL) { - fprintf(f, "N:%s\n", &udev_device_get_devnode(udev_device)[devlen]); -@@ -100,10 +134,13 @@ file: - udev_list_entry_get_name(list_entry), - udev_list_entry_get_value(list_entry)); - } -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) -+ fprintf(f, "G:%s\n", udev_list_entry_get_name(list_entry)); - fclose(f); - rename(filename_tmp, filename); - info(udev, "created db file for '%s' in '%s'\n", udev_device_get_devpath(udev_device), filename); - out: -+ udev_device_tag_index(udev_device, true); - return 0; - } - -@@ -112,6 +149,7 @@ int udev_device_delete_db(struct udev_device *udev_device) - struct udev *udev = udev_device_get_udev(udev_device); - char filename[UTIL_PATH_SIZE]; - -+ udev_device_tag_index(udev_device, false); - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); - unlink(filename); -@@ -124,9 +162,13 @@ int udev_device_rename_db(struct udev_device *udev_device) - char filename_old[UTIL_PATH_SIZE]; - char filename[UTIL_PATH_SIZE]; - -+ if (strcmp(udev_device_get_sysname(udev_device), udev_device_get_sysname_old(udev_device)) == 0) -+ return 0; -+ - util_strscpyl(filename_old, sizeof(filename_old), udev_get_dev_path(udev), "/.udev/db/", - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); -+ udev_device_tag_index(udev_device, true); - return rename(filename_old, filename); - } -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 4003545..478fdcb 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -60,6 +60,7 @@ struct udev_device { - struct udev_list_node devlinks_list; - struct udev_list_node properties_list; - struct udev_list_node sysattr_list; -+ struct udev_list_node tags_list; - unsigned long long int seqnum; - int event_timeout; - int timeout; -@@ -68,18 +69,21 @@ struct udev_device { - dev_t devnum; - int watch_handle; - int maj, min; -- unsigned int parent_set:1; -- unsigned int subsystem_set:1; -- unsigned int devtype_set:1; -- unsigned int devlinks_uptodate:1; -- unsigned int envp_uptodate:1; -- unsigned int driver_set:1; -- unsigned int info_loaded:1; -+ bool parent_set; -+ bool subsystem_set; -+ bool devtype_set; -+ bool devlinks_uptodate; -+ bool envp_uptodate; -+ bool tags_uptodate; -+ bool driver_set; -+ bool info_loaded; -+ bool db_loaded; -+ bool uevent_loaded; - }; - - struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) - { -- udev_device->envp_uptodate = 0; -+ udev_device->envp_uptodate = false; - if (value == NULL) { - struct udev_list_entry *list_entry; - -@@ -149,6 +153,26 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device, - } - if (slink[0] != '\0') - udev_device_add_devlink(udev_device, slink, 0); -+ } else if (strncmp(property, "TAGS=", 5) == 0) { -+ char tags[UTIL_PATH_SIZE]; -+ char *next; -+ -+ util_strscpy(tags, sizeof(tags), &property[5]); -+ next = strchr(tags, ':'); -+ if (next != NULL) { -+ next++; -+ while (next[0] != '\0') { -+ char *tag; -+ -+ tag = next; -+ next = strchr(tag, ':'); -+ if (next == NULL) -+ break; -+ next[0] = '\0'; -+ next++; -+ udev_device_add_tag(udev_device, tag); -+ } -+ } - } else if (strncmp(property, "DRIVER=", 7) == 0) { - udev_device_set_driver(udev_device, &property[7]); - } else if (strncmp(property, "ACTION=", 7) == 0) { -@@ -208,6 +232,9 @@ int udev_device_read_db(struct udev_device *udev_device) - char line[UTIL_LINE_SIZE]; - FILE *f; - -+ if (udev_device->db_loaded) -+ return 0; -+ - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev_device->udev), "/.udev/db/", - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); - -@@ -284,6 +311,9 @@ int udev_device_read_db(struct udev_device *udev_device) - case 'E': - udev_device_add_property_from_string(udev_device, val); - break; -+ case 'G': -+ udev_device_add_tag(udev_device, val); -+ break; - case 'W': - udev_device_set_watch_handle(udev_device, atoi(val)); - break; -@@ -292,6 +322,7 @@ int udev_device_read_db(struct udev_device *udev_device) - fclose(f); - - info(udev_device->udev, "device %p filled with db file data\n", udev_device); -+ udev_device->db_loaded = true; - return 0; - } - -@@ -303,6 +334,9 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) - int maj = 0; - int min = 0; - -+ if (udev_device->uevent_loaded) -+ return 0; -+ - util_strscpyl(filename, sizeof(filename), udev_device->syspath, "/uevent", NULL); - f = fopen(filename, "r"); - if (f == NULL) -@@ -329,21 +363,14 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) - } - - udev_device->devnum = makedev(maj, min); -- - fclose(f); -+ udev_device->uevent_loaded = true; - return 0; - } - --static void device_load_info(struct udev_device *device) --{ -- device->info_loaded = 1; -- udev_device_read_uevent_file(device); -- udev_device_read_db(device); --} -- - void udev_device_set_info_loaded(struct udev_device *device) - { -- device->info_loaded = 1; -+ device->info_loaded = true; - } - - struct udev_device *udev_device_new(struct udev *udev) -@@ -362,6 +389,7 @@ struct udev_device *udev_device_new(struct udev *udev) - udev_list_init(&udev_device->devlinks_list); - udev_list_init(&udev_device->properties_list); - udev_list_init(&udev_device->sysattr_list); -+ udev_list_init(&udev_device->tags_list); - udev_device->event_timeout = -1; - udev_device->watch_handle = -1; - /* copy global properties */ -@@ -420,7 +448,7 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char * - util_strscpy(path, sizeof(path), syspath); - util_resolve_sys_link(udev, path, sizeof(path)); - -- if (strncmp(&syspath[len], "/devices/", 9) == 0) { -+ if (strncmp(&path[len], "/devices/", 9) == 0) { - char file[UTIL_PATH_SIZE]; - - /* all "devices" require a "uevent" file */ -@@ -648,7 +676,7 @@ struct udev_device *udev_device_get_parent(struct udev_device *udev_device) - if (udev_device == NULL) - return NULL; - if (!udev_device->parent_set) { -- udev_device->parent_set = 1; -+ udev_device->parent_set = true; - udev_device->parent_device = device_new_from_parent(udev_device); - } - if (udev_device->parent_device != NULL) -@@ -758,12 +786,13 @@ void udev_device_unref(struct udev_device *udev_device) - free(udev_device->devtype); - udev_list_cleanup_entries(udev_device->udev, &udev_device->devlinks_list); - udev_list_cleanup_entries(udev_device->udev, &udev_device->properties_list); -+ udev_list_cleanup_entries(udev_device->udev, &udev_device->sysattr_list); -+ udev_list_cleanup_entries(udev_device->udev, &udev_device->tags_list); - free(udev_device->action); - free(udev_device->driver); - free(udev_device->devpath_old); - free(udev_device->sysname_old); - free(udev_device->knodename); -- udev_list_cleanup_entries(udev_device->udev, &udev_device->sysattr_list); - free(udev_device->envp); - free(udev_device->monitor_buf); - dbg(udev_device->udev, "udev_device: %p released\n", udev_device); -@@ -842,7 +871,7 @@ const char *udev_device_get_devnode(struct udev_device *udev_device) - if (udev_device == NULL) - return NULL; - if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ udev_device_read_db(udev_device); - return udev_device->devnode; - } - -@@ -862,7 +891,7 @@ const char *udev_device_get_subsystem(struct udev_device *udev_device) - if (udev_device == NULL) - return NULL; - if (!udev_device->subsystem_set) { -- udev_device->subsystem_set = 1; -+ udev_device->subsystem_set = true; - /* read "subsystem" link */ - if (util_get_sys_subsystem(udev_device->udev, udev_device->syspath, subsystem, sizeof(subsystem)) > 0) { - udev_device_set_subsystem(udev_device, subsystem); -@@ -900,9 +929,8 @@ const char *udev_device_get_devtype(struct udev_device *udev_device) - if (udev_device == NULL) - return NULL; - if (!udev_device->devtype_set) { -- udev_device->devtype_set = 1; -- if (!udev_device->info_loaded) -- udev_device_read_uevent_file(udev_device); -+ udev_device->devtype_set = true; -+ udev_device_read_uevent_file(udev_device); - } - return udev_device->devtype; - } -@@ -925,13 +953,13 @@ struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device * - if (udev_device == NULL) - return NULL; - if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ udev_device_read_db(udev_device); - return udev_list_get_entry(&udev_device->devlinks_list); - } - - void udev_device_cleanup_devlinks_list(struct udev_device *udev_device) - { -- udev_device->devlinks_uptodate = 0; -+ udev_device->devlinks_uptodate = false; - udev_list_cleanup_entries(udev_device->udev, &udev_device->devlinks_list); - } - -@@ -951,13 +979,15 @@ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device - { - if (udev_device == NULL) - return NULL; -- if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ if (!udev_device->info_loaded) { -+ udev_device_read_uevent_file(udev_device); -+ udev_device_read_db(udev_device); -+ } - if (!udev_device->devlinks_uptodate) { - char symlinks[UTIL_PATH_SIZE]; - struct udev_list_entry *list_entry; - -- udev_device->devlinks_uptodate = 1; -+ udev_device->devlinks_uptodate = true; - list_entry = udev_device_get_devlinks_list_entry(udev_device); - if (list_entry != NULL) { - char *s; -@@ -970,6 +1000,21 @@ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device - udev_device_add_property(udev_device, "DEVLINKS", symlinks); - } - } -+ if (!udev_device->tags_uptodate) { -+ udev_device->tags_uptodate = true; -+ if (udev_device_get_tags_list_entry(udev_device) != NULL) { -+ char tags[UTIL_PATH_SIZE]; -+ struct udev_list_entry *list_entry; -+ char *s; -+ size_t l; -+ -+ s = tags; -+ l = util_strpcpyl(&s, sizeof(tags), ":", NULL); -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) -+ l = util_strpcpyl(&s, l, udev_list_entry_get_name(list_entry), ":", NULL); -+ udev_device_add_property(udev_device, "TAGS", tags); -+ } -+ } - return udev_list_get_entry(&udev_device->properties_list); - } - -@@ -986,7 +1031,7 @@ const char *udev_device_get_driver(struct udev_device *udev_device) - if (udev_device == NULL) - return NULL; - if (!udev_device->driver_set) { -- udev_device->driver_set = 1; -+ udev_device->driver_set = true; - if (util_get_sys_driver(udev_device->udev, udev_device->syspath, driver, sizeof(driver)) > 0) - udev_device->driver = strdup(driver); - } -@@ -1004,7 +1049,7 @@ dev_t udev_device_get_devnum(struct udev_device *udev_device) - if (udev_device == NULL) - return makedev(0, 0); - if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ udev_device_read_uevent_file(udev_device); - return udev_device->devnum; - } - -@@ -1184,7 +1229,7 @@ int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsy - udev_device->subsystem = strdup(subsystem); - if (udev_device->subsystem == NULL) - return -ENOMEM; -- udev_device->subsystem_set = 1; -+ udev_device->subsystem_set = true; - udev_device_add_property(udev_device, "SUBSYSTEM", udev_device->subsystem); - return 0; - } -@@ -1195,7 +1240,7 @@ int udev_device_set_devtype(struct udev_device *udev_device, const char *devtype - udev_device->devtype = strdup(devtype); - if (udev_device->devtype == NULL) - return -ENOMEM; -- udev_device->devtype_set = 1; -+ udev_device->devtype_set = true; - udev_device_add_property(udev_device, "DEVTYPE", udev_device->devtype); - return 0; - } -@@ -1216,7 +1261,7 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink - { - struct udev_list_entry *list_entry; - -- udev_device->devlinks_uptodate = 0; -+ udev_device->devlinks_uptodate = false; - list_entry = udev_list_entry_add(udev_device->udev, &udev_device->devlinks_list, devlink, NULL, 1, 0); - if (list_entry == NULL) - return -ENOMEM; -@@ -1225,6 +1270,40 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink - return 0; - } - -+int udev_device_add_tag(struct udev_device *udev_device, const char *tag) -+{ -+ if (strchr(tag, ':') != NULL || strchr(tag, ' ') != NULL) -+ return -EINVAL; -+ udev_device->tags_uptodate = false; -+ if (udev_list_entry_add(udev_device->udev, &udev_device->tags_list, tag, NULL, 1, 0) != NULL) -+ return 0; -+ return -ENOMEM; -+} -+ -+void udev_device_cleanup_tags_list(struct udev_device *udev_device) -+{ -+ udev_device->tags_uptodate = false; -+ udev_list_cleanup_entries(udev_device->udev, &udev_device->tags_list); -+} -+ -+struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device) -+{ -+ return udev_list_get_entry(&udev_device->tags_list); -+} -+ -+int udev_device_has_tag(struct udev_device *udev_device, const char *tag) -+{ -+ struct udev_list_entry *list_entry; -+ -+ if (!udev_device->info_loaded) -+ udev_device_read_db(udev_device); -+ list_entry = udev_device_get_tags_list_entry(udev_device); -+ list_entry = udev_list_entry_get_by_name(list_entry, tag); -+ if (list_entry != NULL) -+ return 1; -+ return 0; -+} -+ - #define ENVP_SIZE 128 - #define MONITOR_BUF_SIZE 4096 - static int update_envp_monitor_buf(struct udev_device *udev_device) -@@ -1273,7 +1352,7 @@ static int update_envp_monitor_buf(struct udev_device *udev_device) - } - udev_device->envp[i] = NULL; - udev_device->monitor_buf_len = s - udev_device->monitor_buf; -- udev_device->envp_uptodate = 1; -+ udev_device->envp_uptodate = true; - dbg(udev_device->udev, "filled envp/monitor buffer, %u properties, %zu bytes\n", - i, udev_device->monitor_buf_len); - return 0; -@@ -1312,7 +1391,7 @@ int udev_device_set_driver(struct udev_device *udev_device, const char *driver) - udev_device->driver = strdup(driver); - if (udev_device->driver == NULL) - return -ENOMEM; -- udev_device->driver_set = 1; -+ udev_device->driver_set = true; - udev_device_add_property(udev_device, "DRIVER", udev_device->driver); - return 0; - } -@@ -1385,7 +1464,7 @@ int udev_device_set_timeout(struct udev_device *udev_device, int timeout) - int udev_device_get_event_timeout(struct udev_device *udev_device) - { - if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ udev_device_read_db(udev_device); - return udev_device->event_timeout; - } - -@@ -1421,7 +1500,7 @@ int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) - int udev_device_get_devlink_priority(struct udev_device *udev_device) - { - if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ udev_device_read_db(udev_device); - return udev_device->devlink_priority; - } - -@@ -1434,7 +1513,7 @@ int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio) - int udev_device_get_watch_handle(struct udev_device *udev_device) - { - if (!udev_device->info_loaded) -- device_load_info(udev_device); -+ udev_device_read_db(udev_device); - return udev_device->watch_handle; - } - -diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c -index 9a61a61..da83144 100644 ---- a/libudev/libudev-enumerate.c -+++ b/libudev/libudev-enumerate.c -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -51,6 +51,7 @@ struct udev_enumerate { - struct udev_list_node subsystem_nomatch_list; - struct udev_list_node sysname_match_list; - struct udev_list_node properties_match_list; -+ struct udev_list_node tags_match_list; - struct udev_list_node devices_list; - struct syspath *devices; - unsigned int devices_cur; -@@ -79,6 +80,7 @@ struct udev_enumerate *udev_enumerate_new(struct udev *udev) - udev_list_init(&udev_enumerate->subsystem_nomatch_list); - udev_list_init(&udev_enumerate->sysname_match_list); - udev_list_init(&udev_enumerate->properties_match_list); -+ udev_list_init(&udev_enumerate->tags_match_list); - udev_list_init(&udev_enumerate->devices_list); - return udev_enumerate; - } -@@ -121,6 +123,7 @@ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate) - udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->subsystem_nomatch_list); - udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->sysname_match_list); - udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->properties_match_list); -+ udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->tags_match_list); - udev_list_cleanup_entries(udev_enumerate->udev, &udev_enumerate->devices_list); - for (i = 0; i < udev_enumerate->devices_cur; i++) - free(udev_enumerate->devices[i].syspath); -@@ -191,7 +194,7 @@ static int syspath_cmp(const void *p1, const void *p2) - } - - /* For devices that should be moved to the absolute end of the list */ --static int devices_delay_end(struct udev *udev, const char *syspath) -+static bool devices_delay_end(struct udev *udev, const char *syspath) - { - static const char *delay_device_list[] = { - "/block/md", -@@ -205,10 +208,10 @@ static int devices_delay_end(struct udev *udev, const char *syspath) - for (i = 0; delay_device_list[i] != NULL; i++) { - if (strstr(&syspath[len], delay_device_list[i]) != NULL) { - dbg(udev, "delaying: %s\n", syspath); -- return 1; -+ return true; - } - } -- return 0; -+ return false; - } - - /* For devices that should just be moved a little bit later, just -@@ -394,16 +397,12 @@ int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, co - return 0; - } - --static int match_sysattr_value(struct udev *udev, const char *syspath, const char *sysattr, const char *match_val) -+static int match_sysattr_value(struct udev_device *dev, const char *sysattr, const char *match_val) - { -- struct udev_device *device; - const char *val = NULL; - bool match = false; - -- device = udev_device_new_from_syspath(udev, syspath); -- if (device == NULL) -- return -EINVAL; -- val = udev_device_get_sysattr_value(device, sysattr); -+ val = udev_device_get_sysattr_value(dev, sysattr); - if (val == NULL) - goto exit; - if (match_val == NULL) { -@@ -415,7 +414,6 @@ static int match_sysattr_value(struct udev *udev, const char *syspath, const cha - goto exit; - } - exit: -- udev_device_unref(device); - return match; - } - -@@ -440,6 +438,25 @@ int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, con - } - - /** -+ * udev_enumerate_add_match_tag: -+ * @udev_enumerate: context -+ * @tag: filter for a tag of the device to include in the list -+ * -+ * Returns: 0 on success, otherwise a negative error value. -+ */ -+int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag) -+{ -+ if (udev_enumerate == NULL) -+ return -EINVAL; -+ if (tag == NULL) -+ return 0; -+ if (udev_list_entry_add(udev_enumerate_get_udev(udev_enumerate), -+ &udev_enumerate->tags_match_list, tag, NULL, 1, 0) == NULL) -+ return -ENOMEM; -+ return 0; -+} -+ -+/** - * udev_enumerate_add_match_sysname: - * @udev_enumerate: context - * @sysname: filter for the name of the device to include in the list -@@ -458,46 +475,37 @@ int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, cons - return 0; - } - --static int match_sysattr(struct udev_enumerate *udev_enumerate, const char *syspath) -+static bool match_sysattr(struct udev_enumerate *udev_enumerate, struct udev_device *dev) - { -- struct udev *udev = udev_enumerate_get_udev(udev_enumerate); - struct udev_list_entry *list_entry; - - /* skip list */ - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->sysattr_nomatch_list)) { -- if (match_sysattr_value(udev, syspath, -- udev_list_entry_get_name(list_entry), -- udev_list_entry_get_value(list_entry))) -- return 0; -+ if (match_sysattr_value(dev, udev_list_entry_get_name(list_entry), -+ udev_list_entry_get_value(list_entry))) -+ return false; - } - /* include list */ - if (udev_list_get_entry(&udev_enumerate->sysattr_match_list) != NULL) { - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->sysattr_match_list)) { - /* anything that does not match, will make it FALSE */ -- if (!match_sysattr_value(udev, syspath, -- udev_list_entry_get_name(list_entry), -- udev_list_entry_get_value(list_entry))) -- return 0; -+ if (!match_sysattr_value(dev, udev_list_entry_get_name(list_entry), -+ udev_list_entry_get_value(list_entry))) -+ return false; - } -- return 1; -+ return true; - } -- return 1; -+ return true; - } - --static int match_property(struct udev_enumerate *udev_enumerate, const char *syspath) -+static bool match_property(struct udev_enumerate *udev_enumerate, struct udev_device *dev) - { -- struct udev_device *dev; - struct udev_list_entry *list_entry; -- int match = false; -+ bool match = false; - - /* no match always matches */ - if (udev_list_get_entry(&udev_enumerate->properties_match_list) == NULL) -- return 1; -- -- /* no device does not match */ -- dev = udev_device_new_from_syspath(udev_enumerate->udev, syspath); -- if (dev == NULL) -- return 0; -+ return true; - - /* loop over matches */ - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->properties_match_list)) { -@@ -525,23 +533,38 @@ static int match_property(struct udev_enumerate *udev_enumerate, const char *sys - } - } - out: -- udev_device_unref(dev); - return match; - } - --static int match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname) -+static bool match_tag(struct udev_enumerate *udev_enumerate, struct udev_device *dev) -+{ -+ struct udev_list_entry *list_entry; -+ -+ /* no match always matches */ -+ if (udev_list_get_entry(&udev_enumerate->tags_match_list) == NULL) -+ return true; -+ -+ /* loop over matches */ -+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->tags_match_list)) -+ if (!udev_device_has_tag(dev, udev_list_entry_get_name(list_entry))) -+ return false; -+ -+ return true; -+} -+ -+static bool match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname) - { - struct udev_list_entry *list_entry; - - if (udev_list_get_entry(&udev_enumerate->sysname_match_list) == NULL) -- return 1; -+ return true; - - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->sysname_match_list)) { - if (fnmatch(udev_list_entry_get_name(list_entry), sysname, 0) != 0) - continue; -- return 1; -+ return true; - } -- return 0; -+ return false; - } - - static int scan_dir_and_add_devices(struct udev_enumerate *udev_enumerate, -@@ -562,54 +585,53 @@ static int scan_dir_and_add_devices(struct udev_enumerate *udev_enumerate, - util_strpcpyl(&s, l, "/", subdir2, NULL); - dir = opendir(path); - if (dir == NULL) -- return -1; -+ return -ENOENT; - for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { - char syspath[UTIL_PATH_SIZE]; -- char filename[UTIL_PATH_SIZE]; -- struct stat statbuf; -+ struct udev_device *dev; - - if (dent->d_name[0] == '.') - continue; -+ - if (!match_sysname(udev_enumerate, dent->d_name)) - continue; - - util_strscpyl(syspath, sizeof(syspath), path, "/", dent->d_name, NULL); -- if (!match_property(udev_enumerate, syspath)) -- continue; -- if (lstat(syspath, &statbuf) != 0) -- continue; -- if (S_ISREG(statbuf.st_mode)) -+ dev = udev_device_new_from_syspath(udev_enumerate->udev, syspath); -+ if (dev == NULL) - continue; -- if (S_ISLNK(statbuf.st_mode)) -- util_resolve_sys_link(udev, syspath, sizeof(syspath)); - -- util_strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); -- if (stat(filename, &statbuf) != 0) -- continue; -- if (!match_sysattr(udev_enumerate, syspath)) -- continue; -- syspath_add(udev_enumerate, syspath); -+ if (!match_tag(udev_enumerate, dev)) -+ goto nomatch; -+ if (!match_property(udev_enumerate, dev)) -+ goto nomatch; -+ if (!match_sysattr(udev_enumerate, dev)) -+ goto nomatch; -+ -+ syspath_add(udev_enumerate, udev_device_get_syspath(dev)); -+nomatch: -+ udev_device_unref(dev); - } - closedir(dir); - return 0; - } - --static int match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem) -+static bool match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem) - { - struct udev_list_entry *list_entry; - - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->subsystem_nomatch_list)) { - if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0) -- return 0; -+ return false; - } - if (udev_list_get_entry(&udev_enumerate->subsystem_match_list) != NULL) { - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->subsystem_match_list)) { - if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0) -- return 1; -+ return true; - } -- return 0; -+ return false; - } -- return 1; -+ return true; - } - - static int scan_dir(struct udev_enumerate *udev_enumerate, const char *basedir, const char *subdir, const char *subsystem) -@@ -675,17 +697,59 @@ int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate) - - if (udev_enumerate == NULL) - return -EINVAL; -- util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); -- if (stat(base, &statbuf) == 0) { -- /* we have /subsystem/, forget all the old stuff */ -- dbg(udev, "searching '/subsystem/*/devices/*' dir\n"); -- scan_dir(udev_enumerate, "subsystem", "devices", NULL); -+ -+ if (udev_list_get_entry(&udev_enumerate->tags_match_list) != NULL) { -+ struct udev_list_entry *list_entry; -+ -+ /* scan only tagged devices, use tags reverse-index, instead of searching all devices in /sys */ -+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->tags_match_list)) { -+ DIR *dir; -+ struct dirent *dent; -+ char path[UTIL_PATH_SIZE]; -+ -+ util_strscpyl(path, sizeof(path), udev_get_dev_path(udev), "/.udev/tags/", -+ udev_list_entry_get_name(list_entry), NULL); -+ dir = opendir(path); -+ if (dir == NULL) -+ continue; -+ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { -+ struct udev_device *dev; -+ char syspath[UTIL_PATH_SIZE]; -+ char *s; -+ size_t l; -+ ssize_t len; -+ -+ if (dent->d_name[0] == '.') -+ continue; -+ -+ s = syspath; -+ l = util_strpcpyl(&s, sizeof(syspath), udev_get_sys_path(udev), NULL); -+ len = readlinkat(dirfd(dir), dent->d_name, s, l); -+ if (len <= 0 || (size_t)len == l) -+ continue; -+ s[len] = '\0'; -+ -+ dev = udev_device_new_from_syspath(udev_enumerate->udev, syspath); -+ if (dev == NULL) -+ continue; -+ syspath_add(udev_enumerate, udev_device_get_syspath(dev)); -+ udev_device_unref(dev); -+ } -+ } - } else { -+ util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); -+ if (stat(base, &statbuf) == 0) { -+ /* we have /subsystem/, forget all the old stuff */ -+ dbg(udev, "searching '/subsystem/*/devices/*' dir\n"); -+ scan_dir(udev_enumerate, "subsystem", "devices", NULL); -+ } else { - dbg(udev, "searching '/bus/*/devices/*' dir\n"); -- scan_dir(udev_enumerate, "bus", "devices", NULL); -- dbg(udev, "searching '/class/*' dir\n"); -- scan_dir(udev_enumerate, "class", NULL, NULL); -+ scan_dir(udev_enumerate, "bus", "devices", NULL); -+ dbg(udev, "searching '/class/*' dir\n"); -+ scan_dir(udev_enumerate, "class", NULL, NULL); -+ } - } -+ - return 0; - } - -@@ -704,6 +768,7 @@ int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate) - - if (udev_enumerate == NULL) - return -EINVAL; -+ - util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); - if (stat(base, &statbuf) == 0) - subsysdir = "subsystem"; -diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c -index 97e52c4..24e8aea 100644 ---- a/libudev/libudev-monitor.c -+++ b/libudev/libudev-monitor.c -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008-2009 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -49,6 +49,7 @@ struct udev_monitor { - struct sockaddr_un sun; - socklen_t addrlen; - struct udev_list_node filter_subsystem_list; -+ struct udev_list_node filter_tag_list; - }; - - enum udev_monitor_netlink_group { -@@ -57,25 +58,28 @@ enum udev_monitor_netlink_group { - UDEV_MONITOR_UDEV, - }; - --#define UDEV_MONITOR_MAGIC 0xcafe1dea -+#define UDEV_MONITOR_MAGIC 0xfeedcafe - struct udev_monitor_netlink_header { -- /* udev version text */ -- char version[16]; -+ /* "libudev" prefix to distinguish libudev and kernel messages */ -+ char prefix[8]; - /* - * magic to protect against daemon <-> library message format mismatch - * used in the kernel from socket filter rules; needs to be stored in network order - */ - unsigned int magic; -- /* properties buffer */ -- unsigned short properties_off; -- unsigned short properties_len; -+ /* total length of header structure known to the sender */ -+ unsigned int header_size; -+ /* properties string buffer */ -+ unsigned int properties_off; -+ unsigned int properties_len; - /* -- * hashes of some common device properties strings to filter with socket filters in -- * the client used in the kernel from socket filter rules; needs to be stored in -- * network order -+ * hashes of primary device properties strings, to let libudev subscribers -+ * use in-kernel socket filters; values need to be stored in network order - */ -- unsigned int filter_subsystem; -- unsigned int filter_devtype; -+ unsigned int filter_subsystem_hash; -+ unsigned int filter_devtype_hash; -+ unsigned int filter_tag_bloom_hi; -+ unsigned int filter_tag_bloom_lo; - }; - - static struct udev_monitor *udev_monitor_new(struct udev *udev) -@@ -88,6 +92,7 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev) - udev_monitor->refcount = 1; - udev_monitor->udev = udev; - udev_list_init(&udev_monitor->filter_subsystem_list); -+ udev_list_init(&udev_monitor->filter_tag_list); - return udev_monitor; - } - -@@ -247,13 +252,14 @@ static inline void bpf_jmp(struct sock_filter *inss, unsigned int *i, - */ - int udev_monitor_filter_update(struct udev_monitor *udev_monitor) - { -- static struct sock_filter ins[256]; -- static struct sock_fprog filter; -+ struct sock_filter ins[512]; -+ struct sock_fprog filter; - unsigned int i; - struct udev_list_entry *list_entry; - int err; - -- if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL) -+ if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL && -+ udev_list_get_entry(&udev_monitor->filter_tag_list) == NULL) - return 0; - - memset(ins, 0x00, sizeof(ins)); -@@ -266,35 +272,74 @@ int udev_monitor_filter_update(struct udev_monitor *udev_monitor) - /* wrong magic, pass packet */ - bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); - -- /* add all subsystem match values */ -- udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { -- unsigned int hash; -- -- /* load filter_subsystem value in A */ -- bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_subsystem)); -- hash = util_string_hash32(udev_list_entry_get_name(list_entry)); -- if (udev_list_entry_get_value(list_entry) == NULL) { -- /* jump if subsystem does not match */ -- bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); -- } else { -- /* jump if subsystem does not match */ -- bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 3); -- -- /* load filter_devtype value in A */ -- bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_devtype)); -- /* jump if value does not match */ -- hash = util_string_hash32(udev_list_entry_get_value(list_entry)); -- bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); -+ if (udev_list_get_entry(&udev_monitor->filter_tag_list) != NULL) { -+ int tag_matches; -+ -+ /* count tag matches, to calculate end of tag match block */ -+ tag_matches = 0; -+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_tag_list)) -+ tag_matches++; -+ -+ /* add all tags matches */ -+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_tag_list)) { -+ uint64_t tag_bloom_bits = util_string_bloom64(udev_list_entry_get_name(list_entry)); -+ uint32_t tag_bloom_hi = tag_bloom_bits >> 32; -+ uint32_t tag_bloom_lo = tag_bloom_bits & 0xffffffff; -+ -+ /* load device bloom bits in A */ -+ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_tag_bloom_hi)); -+ /* clear bits (tag bits & bloom bits) */ -+ bpf_stmt(ins, &i, BPF_ALU|BPF_AND|BPF_K, tag_bloom_hi); -+ /* jump to next tag if it does not match */ -+ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, tag_bloom_hi, 0, 3); -+ -+ /* load device bloom bits in A */ -+ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_tag_bloom_lo)); -+ /* clear bits (tag bits & bloom bits) */ -+ bpf_stmt(ins, &i, BPF_ALU|BPF_AND|BPF_K, tag_bloom_lo); -+ /* jump behind end of tag match block if tag matches */ -+ tag_matches--; -+ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, tag_bloom_lo, 1 + (tag_matches * 6), 0); - } - -- /* matched, pass packet */ -- bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); -+ /* nothing matched, drop packet */ -+ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); -+ } - -- if (i+1 >= ARRAY_SIZE(ins)) -- return -1; -+ /* add all subsystem matches */ -+ if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) != NULL) { -+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { -+ unsigned int hash = util_string_hash32(udev_list_entry_get_name(list_entry)); -+ -+ /* load device subsystem value in A */ -+ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_subsystem_hash)); -+ if (udev_list_entry_get_value(list_entry) == NULL) { -+ /* jump if subsystem does not match */ -+ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); -+ } else { -+ /* jump if subsystem does not match */ -+ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 3); -+ -+ /* load device devtype value in A */ -+ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, filter_devtype_hash)); -+ /* jump if value does not match */ -+ hash = util_string_hash32(udev_list_entry_get_value(list_entry)); -+ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); -+ } -+ -+ /* matched, pass packet */ -+ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); -+ -+ if (i+1 >= ARRAY_SIZE(ins)) -+ return -1; -+ } -+ -+ /* nothing matched, drop packet */ -+ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); - } -- /* nothing matched, drop packet */ -- bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); -+ -+ /* matched, pass packet */ -+ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); - - /* install filter */ - filter.len = i; -@@ -406,6 +451,7 @@ void udev_monitor_unref(struct udev_monitor *udev_monitor) - if (udev_monitor->sock >= 0) - close(udev_monitor->sock); - udev_list_cleanup_entries(udev_monitor->udev, &udev_monitor->filter_subsystem_list); -+ udev_list_cleanup_entries(udev_monitor->udev, &udev_monitor->filter_tag_list); - dbg(udev_monitor->udev, "monitor %p released\n", udev_monitor); - free(udev_monitor); - } -@@ -445,8 +491,7 @@ static int passes_filter(struct udev_monitor *udev_monitor, struct udev_device * - struct udev_list_entry *list_entry; - - if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL) -- return 1; -- -+ goto tag; - udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { - const char *subsys = udev_list_entry_get_name(list_entry); - const char *dsubsys = udev_device_get_subsystem(udev_device); -@@ -458,11 +503,22 @@ static int passes_filter(struct udev_monitor *udev_monitor, struct udev_device * - - devtype = udev_list_entry_get_value(list_entry); - if (devtype == NULL) -- return 1; -+ goto tag; - ddevtype = udev_device_get_devtype(udev_device); - if (ddevtype == NULL) - continue; - if (strcmp(ddevtype, devtype) == 0) -+ goto tag; -+ } -+ return 0; -+ -+tag: -+ if (udev_list_get_entry(&udev_monitor->filter_tag_list) == NULL) -+ return 1; -+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_tag_list)) { -+ const char *tag = udev_list_entry_get_name(list_entry); -+ -+ if (udev_device_has_tag(udev_device, tag)) - return 1; - } - return 0; -@@ -556,13 +612,11 @@ retry: - return NULL; - } - -- if (strncmp(buf, "udev-", 5) == 0) { -+ if (memcmp(buf, "libudev", 8) == 0) { - /* udev message needs proper version magic */ - nlh = (struct udev_monitor_netlink_header *) buf; - if (nlh->magic != htonl(UDEV_MONITOR_MAGIC)) - return NULL; -- if (nlh->properties_off < sizeof(struct udev_monitor_netlink_header)) -- return NULL; - if (nlh->properties_off+32 > buflen) - return NULL; - bufpos = nlh->properties_off; -@@ -626,17 +680,17 @@ retry: - int udev_monitor_send_device(struct udev_monitor *udev_monitor, - struct udev_monitor *destination, struct udev_device *udev_device) - { -- struct msghdr smsg; -- struct iovec iov[2]; - const char *buf; - ssize_t blen; - ssize_t count; - - blen = udev_device_get_properties_monitor_buf(udev_device, &buf); - if (blen < 32) -- return -1; -+ return -EINVAL; - - if (udev_monitor->sun.sun_family != 0) { -+ struct msghdr smsg; -+ struct iovec iov[2]; - const char *action; - char header[2048]; - char *s; -@@ -660,23 +714,41 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, - smsg.msg_iovlen = 2; - smsg.msg_name = &udev_monitor->sun; - smsg.msg_namelen = udev_monitor->addrlen; -- } else if (udev_monitor->snl.nl_family != 0) { -+ count = sendmsg(udev_monitor->sock, &smsg, 0); -+ info(udev_monitor->udev, "passed %zi bytes to socket monitor %p\n", count, udev_monitor); -+ return count; -+ } -+ -+ if (udev_monitor->snl.nl_family != 0) { -+ struct msghdr smsg; -+ struct iovec iov[2]; - const char *val; - struct udev_monitor_netlink_header nlh; -- -+ struct udev_list_entry *list_entry; -+ uint64_t tag_bloom_bits; - - /* add versioned header */ - memset(&nlh, 0x00, sizeof(struct udev_monitor_netlink_header)); -- util_strscpy(nlh.version, sizeof(nlh.version), "udev-" VERSION); -+ memcpy(nlh.prefix, "libudev", 8); - nlh.magic = htonl(UDEV_MONITOR_MAGIC); -+ nlh.header_size = sizeof(struct udev_monitor_netlink_header); - val = udev_device_get_subsystem(udev_device); -- nlh.filter_subsystem = htonl(util_string_hash32(val)); -+ nlh.filter_subsystem_hash = htonl(util_string_hash32(val)); - val = udev_device_get_devtype(udev_device); - if (val != NULL) -- nlh.filter_devtype = htonl(util_string_hash32(val)); -+ nlh.filter_devtype_hash = htonl(util_string_hash32(val)); - iov[0].iov_base = &nlh; - iov[0].iov_len = sizeof(struct udev_monitor_netlink_header); - -+ /* add tag bloom filter */ -+ tag_bloom_bits = 0; -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) -+ tag_bloom_bits |= util_string_bloom64(udev_list_entry_get_name(list_entry)); -+ if (tag_bloom_bits > 0) { -+ nlh.filter_tag_bloom_hi = htonl(tag_bloom_bits >> 32); -+ nlh.filter_tag_bloom_lo = htonl(tag_bloom_bits & 0xffffffff); -+ } -+ - /* add properties list */ - nlh.properties_off = iov[0].iov_len; - nlh.properties_len = blen; -@@ -697,13 +769,12 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, - else - smsg.msg_name = &udev_monitor->snl_destination; - smsg.msg_namelen = sizeof(struct sockaddr_nl); -- } else { -- return -1; -+ count = sendmsg(udev_monitor->sock, &smsg, 0); -+ info(udev_monitor->udev, "passed %zi bytes to netlink monitor %p\n", count, udev_monitor); -+ return count; - } - -- count = sendmsg(udev_monitor->sock, &smsg, 0); -- info(udev_monitor->udev, "passed %zi bytes to monitor %p\n", count, udev_monitor); -- return count; -+ return -EINVAL; - } - - /** -@@ -712,6 +783,9 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, - * @subsystem: the subsystem value to match the incoming devices against - * @devtype: the devtype value to match the incoming devices against - * -+ * This filer is efficiently executed inside the kernel, and libudev subscribers -+ * will usually not be woken up for devices which do not match. -+ * - * The filter must be installed before the monitor is switched to listening mode. - * - * Returns: 0 on success, otherwise a negative error value. -@@ -721,7 +795,7 @@ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_mo - if (udev_monitor == NULL) - return -EINVAL; - if (subsystem == NULL) -- return 0; -+ return -EINVAL; - if (udev_list_entry_add(udev_monitor->udev, - &udev_monitor->filter_subsystem_list, subsystem, devtype, 0, 0) == NULL) - return -ENOMEM; -@@ -729,6 +803,30 @@ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_mo - } - - /** -+ * udev_monitor_filter_add_match_tag: -+ * @udev_monitor: the monitor -+ * @tag: the name of a tag -+ * -+ * This filer is efficiently executed inside the kernel, and libudev subscribers -+ * will usually not be woken up for devices which do not match. -+ * -+ * The filter must be installed before the monitor is switched to listening mode. -+ * -+ * Returns: 0 on success, otherwise a negative error value. -+ */ -+int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag) -+{ -+ if (udev_monitor == NULL) -+ return -EINVAL; -+ if (tag == NULL) -+ return -EINVAL; -+ if (udev_list_entry_add(udev_monitor->udev, -+ &udev_monitor->filter_tag_list, tag, NULL, 0, 0) == NULL) -+ return -ENOMEM; -+ return 0; -+} -+ -+/** - * udev_monitor_filter_remove: - * @udev_monitor: monitor - * -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 8dc469e..548f4ad 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -14,6 +14,8 @@ - - #include - #include -+#include -+#include - #include "libudev.h" - - #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -@@ -84,7 +86,8 @@ const char *udev_device_get_sysname_old(struct udev_device *udev_device); - int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old); - const char *udev_device_get_knodename(struct udev_device *udev_device); - int udev_device_add_tag(struct udev_device *udev_device, const char *tag); --struct udev_list_entry *udev_device_get_tag_list_entry(struct udev_device *udev_device); -+void udev_device_cleanup_tags_list(struct udev_device *udev_device); -+struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); - int udev_device_has_tag(struct udev_device *udev_device, const char *tag); - int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename); - int udev_device_get_timeout(struct udev_device *udev_device); -@@ -203,7 +206,8 @@ size_t util_strscpyl(char *dest, size_t size, const char *src, ...) __attribute_ - int udev_util_replace_whitespace(const char *str, char *to, size_t len); - int udev_util_replace_chars(char *str, const char *white); - int udev_util_encode_string(const char *str, char *str_enc, size_t len); --unsigned int util_string_hash32(const char *str); -+unsigned int util_string_hash32(const char *key); -+uint64_t util_string_bloom64(const char *str); - - /* libudev-util-private.c */ - int util_create_path(struct udev *udev, const char *path); -diff --git a/libudev/libudev-util.c b/libudev/libudev-util.c -index c0209f9..3a67b0c 100644 ---- a/libudev/libudev-util.c -+++ b/libudev/libudev-util.c -@@ -481,15 +481,74 @@ err: - return -1; - } - -+/* -+ * http://sites.google.com/site/murmurhash/ -+ * -+ * All code is released to the public domain. For business purposes, -+ * Murmurhash is under the MIT license. -+ * -+ */ -+static unsigned int murmur_hash2(const char *key, int len, unsigned int seed) -+{ -+ /* -+ * 'm' and 'r' are mixing constants generated offline. -+ * They're not really 'magic', they just happen to work well. -+ */ -+ const unsigned int m = 0x5bd1e995; -+ const int r = 24; -+ -+ /* initialize the hash to a 'random' value */ -+ unsigned int h = seed ^ len; -+ -+ /* mix 4 bytes at a time into the hash */ -+ const unsigned char * data = (const unsigned char *)key; -+ -+ while(len >= 4) { -+ unsigned int k = *(unsigned int *)data; -+ -+ k *= m; -+ k ^= k >> r; -+ k *= m; -+ h *= m; -+ h ^= k; -+ -+ data += 4; -+ len -= 4; -+ } -+ -+ /* handle the last few bytes of the input array */ -+ switch(len) { -+ case 3: -+ h ^= data[2] << 16; -+ case 2: -+ h ^= data[1] << 8; -+ case 1: -+ h ^= data[0]; -+ h *= m; -+ }; -+ -+ /* do a few final mixes of the hash to ensure the last few bytes are well-incorporated */ -+ h ^= h >> 13; -+ h *= m; -+ h ^= h >> 15; -+ -+ return h; -+} -+ - unsigned int util_string_hash32(const char *str) - { -- unsigned int hash = 0; -+ return murmur_hash2(str, strlen(str), 0); -+} - -- while (str[0] != '\0') { -- hash += str[0] << 4; -- hash += str[0] >> 4; -- hash *= 11; -- str++; -- } -- return hash; -+/* get a bunch of bit numbers out of the hash, and set the bits in our bit field */ -+uint64_t util_string_bloom64(const char *str) -+{ -+ uint64_t bits = 0; -+ unsigned int hash = util_string_hash32(str); -+ -+ bits |= 1LLU << (hash & 63); -+ bits |= 1LLU << ((hash >> 6) & 63); -+ bits |= 1LLU << ((hash >> 12) & 63); -+ bits |= 1LLU << ((hash >> 18) & 63); -+ return bits; - } -diff --git a/libudev/libudev.h b/libudev/libudev.h -index 750664f..3b73fbd 100644 ---- a/libudev/libudev.h -+++ b/libudev/libudev.h -@@ -1,7 +1,7 @@ - /* - * libudev - interface to udev device information - * -- * Copyright (C) 2008-2009 Kay Sievers -+ * Copyright (C) 2008-2010 Kay Sievers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -118,6 +118,7 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito - /* in-kernel socket filters to select messages that get delivered to a listener */ - int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, - const char *subsystem, const char *devtype); -+int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag); - int udev_monitor_filter_update(struct udev_monitor *udev_monitor); - int udev_monitor_filter_remove(struct udev_monitor *udev_monitor); - -@@ -138,6 +139,7 @@ int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, cons - int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value); - int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value); - int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname); -+int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag); - int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath); - /* run enumeration with active filters */ - int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate); -diff --git a/udev/udev-event.c b/udev/udev-event.c -index b2e1bae..212ccc7 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -543,7 +543,6 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - - if (strcmp(udev_device_get_action(dev), "remove") == 0) { - udev_device_read_db(dev); -- udev_device_set_info_loaded(dev); - udev_device_delete_db(dev); - - if (major(udev_device_get_devnum(dev)) != 0) -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 6eb8350..b5016d0 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -157,6 +157,7 @@ enum token_type { - TK_A_GROUP_ID, /* gid_t */ - TK_A_MODE_ID, /* mode_t */ - TK_A_ENV, /* val, attr */ -+ TK_A_TAG, /* val */ - TK_A_NAME, /* val */ - TK_A_DEVLINK, /* val */ - TK_A_EVENT_TIMEOUT, /* int */ -@@ -285,6 +286,7 @@ static const char *token_str(enum token_type type) - [TK_A_GROUP_ID] = "A GROUP_ID", - [TK_A_MODE_ID] = "A MODE_ID", - [TK_A_ENV] = "A ENV", -+ [TK_A_TAG] = "A ENV", - [TK_A_NAME] = "A NAME", - [TK_A_DEVLINK] = "A DEVLINK", - [TK_A_EVENT_TIMEOUT] = "A EVENT_TIMEOUT", -@@ -354,6 +356,9 @@ static void dump_token(struct udev_rules *rules, struct token *token) - dbg(rules->udev, "%s %s '%s' '%s'(%s)\n", - token_str(type), operation_str(op), attr, value, string_glob_str(glob)); - break; -+ case TK_A_TAG: -+ dbg(rules->udev, "%s %s '%s'\n", token_str(type), operation_str(op), value); -+ break; - case TK_A_STRING_ESCAPE_NONE: - case TK_A_STRING_ESCAPE_REPLACE: - dbg(rules->udev, "%s\n", token_str(type)); -@@ -1003,6 +1008,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, - case TK_A_MODE: - case TK_A_NAME: - case TK_A_GOTO: -+ case TK_A_TAG: - token->key.value_off = add_string(rule_tmp->rules, value); - break; - case TK_M_ENV: -@@ -1350,6 +1356,11 @@ static int add_rule(struct udev_rules *rules, char *line, - continue; - } - -+ if (strcmp(key, "TAG") == 0) { -+ rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL); -+ continue; -+ } -+ - if (strcmp(key, "PROGRAM") == 0) { - rule_add_key(&rule_tmp, TK_M_PROGRAM, op, value, NULL); - continue; -@@ -2408,6 +2419,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - } - break; - } -+ case TK_A_TAG: -+ udev_device_add_tag(event->dev, &rules->buf[cur->key.value_off]); -+ break; - case TK_A_NAME: - { - const char *name = &rules->buf[cur->key.value_off]; -diff --git a/udev/udev.xml b/udev/udev.xml -index 192a6f1..842fd5d 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -349,6 +349,19 @@ - - - -+ -+ -+ Attach a tag to a device. This is used to filter events for users -+ of libudev's monitor functionality, or to enumerate a group of tagged -+ devices. The implementation can only work efficiently if only a few -+ tags are attached to a device. It is only meant to be used in -+ contexts with specific device filter requirements, and not as a -+ general-purpose flag. Excessive use might result in inefficient event -+ handling. -+ -+ -+ -+ - - - Add a program to the list of programs to be executed for a specific -diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c -index d136c60..fb65084 100644 ---- a/udev/udevadm-monitor.c -+++ b/udev/udevadm-monitor.c -@@ -73,6 +73,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - int print_kernel = 0; - int print_udev = 0; - struct udev_list_node subsystem_match_list; -+ struct udev_list_node tag_match_list; - struct udev_monitor *udev_monitor = NULL; - struct udev_monitor *kernel_monitor = NULL; - fd_set readfds; -@@ -84,13 +85,15 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - { "kernel", no_argument, NULL, 'k' }, - { "udev", no_argument, NULL, 'u' }, - { "subsystem-match", required_argument, NULL, 's' }, -+ { "tag-match", required_argument, NULL, 't' }, - { "help", no_argument, NULL, 'h' }, - {} - }; - - udev_list_init(&subsystem_match_list); -+ udev_list_init(&tag_match_list); - while (1) { -- option = getopt_long(argc, argv, "epkus:h", options, NULL); -+ option = getopt_long(argc, argv, "pekus:t:h", options, NULL); - if (option == -1) - break; - -@@ -119,12 +122,16 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - udev_list_entry_add(udev, &subsystem_match_list, subsys, devtype, 0, 0); - break; - } -+ case 't': -+ udev_list_entry_add(udev, &tag_match_list, optarg, NULL, 0, 0); -+ break; - case 'h': - printf("Usage: udevadm monitor [--property] [--kernel] [--udev] [--help]\n" - " --property print the event properties\n" - " --kernel print kernel uevents\n" - " --udev print udev events\n" - " --subsystem-match= filter events by subsystem\n" -+ " --tag-match= filter events by tag\n" - " --help\n\n"); - default: - goto out; -@@ -168,6 +175,13 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) - fprintf(stderr, "error: unable to apply subsystem filter '%s'\n", subsys); - } - -+ udev_list_entry_foreach(entry, udev_list_get_entry(&tag_match_list)) { -+ const char *tag = udev_list_entry_get_name(entry); -+ -+ if (udev_monitor_filter_add_match_tag(udev_monitor, tag) < 0) -+ fprintf(stderr, "error: unable to apply tag filter '%s'\n", tag); -+ } -+ - if (udev_monitor_enable_receiving(udev_monitor) < 0) { - fprintf(stderr, "error: unable to subscribe to udev events\n"); - rc = 2; -@@ -244,5 +258,6 @@ out: - udev_monitor_unref(udev_monitor); - udev_monitor_unref(kernel_monitor); - udev_list_cleanup_entries(udev, &subsystem_match_list); -+ udev_list_cleanup_entries(udev, &tag_match_list); - return rc; - } -diff --git a/udev/udevadm-trigger.c b/udev/udevadm-trigger.c -index 03aa534..3cb07dd 100644 ---- a/udev/udevadm-trigger.c -+++ b/udev/udevadm-trigger.c -@@ -101,6 +101,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) - { "attr-match", required_argument, NULL, 'a' }, - { "attr-nomatch", required_argument, NULL, 'A' }, - { "property-match", required_argument, NULL, 'p' }, -+ { "tag-match", required_argument, NULL, 'g' }, - { "sysname-match", required_argument, NULL, 'y' }, - { "help", no_argument, NULL, 'h' }, - {} -@@ -127,7 +128,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) - const char *val; - char buf[UTIL_PATH_SIZE]; - -- option = getopt_long(argc, argv, "vnFo:t:hcp:s:S:a:A:y:", options, NULL); -+ option = getopt_long(argc, argv, "vng:o:t:hcp:s:S:a:A:y:", options, NULL); - if (option == -1) - break; - -@@ -172,6 +173,9 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) - key = keyval(optarg, &val, buf, sizeof(buf)); - udev_enumerate_add_match_property(udev_enumerate, key, val); - break; -+ case 'g': -+ udev_enumerate_add_match_tag(udev_enumerate, optarg); -+ break; - case 'y': - udev_enumerate_add_match_sysname(udev_enumerate, optarg); - break; -@@ -190,6 +194,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) - " --attr-match=]> trigger devices with a matching attribute\n" - " --attr-nomatch=]> exclude devices with a matching attribute\n" - " --property-match== trigger devices with a matching property\n" -+ " --tag-match== trigger devices with a matching property\n" - " --sysname-match= trigger devices with a matching name\n" - " --help\n\n"); - goto exit; -diff --git a/udev/udevadm.xml b/udev/udevadm.xml -index fa1742b..73e6f11 100644 ---- a/udev/udevadm.xml -+++ b/udev/udevadm.xml -@@ -217,6 +217,13 @@ - - - -+ -+ -+ Trigger events for devices with a matching tag. This option can be -+ specified multiple times. -+ -+ -+ - - - Trigger events for devices with a matching sys device name. This option can be -@@ -356,6 +363,12 @@ - - - -+ -+ -+ Filter events by property. Only udev events with a given tag attached will pass. -+ -+ -+ - - - Print help text. --- -1.7.0.1 - diff --git a/0009-all-to-match-against-a-given-TAG.patch b/0009-all-to-match-against-a-given-TAG.patch deleted file mode 100644 index 7366d27..0000000 --- a/0009-all-to-match-against-a-given-TAG.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 3f896a2abd76972eafe636cac4110608b6d3ff2f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 22 Apr 2010 18:33:24 +0200 -Subject: [PATCH 09/19] all to match against a given TAG== - ---- - udev/udev-rules.c | 24 +++++++++++++++++++++++- - udev/udev.xml | 7 +++++++ - 2 files changed, 30 insertions(+), 1 deletions(-) - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index b5016d0..5965723 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -125,6 +125,7 @@ enum token_type { - TK_M_DEVLINK, /* val */ - TK_M_NAME, /* val */ - TK_M_ENV, /* val, attr */ -+ TK_M_TAG, /* val */ - TK_M_SUBSYSTEM, /* val */ - TK_M_DRIVER, /* val */ - TK_M_WAITFOR, /* val */ -@@ -254,6 +255,7 @@ static const char *token_str(enum token_type type) - [TK_M_DEVLINK] = "M DEVLINK", - [TK_M_NAME] = "M NAME", - [TK_M_ENV] = "M ENV", -+ [TK_M_TAG] = "M TAG", - [TK_M_SUBSYSTEM] = "M SUBSYSTEM", - [TK_M_DRIVER] = "M DRIVER", - [TK_M_WAITFOR] = "M WAITFOR", -@@ -356,6 +358,7 @@ static void dump_token(struct udev_rules *rules, struct token *token) - dbg(rules->udev, "%s %s '%s' '%s'(%s)\n", - token_str(type), operation_str(op), attr, value, string_glob_str(glob)); - break; -+ case TK_M_TAG: - case TK_A_TAG: - dbg(rules->udev, "%s %s '%s'\n", token_str(type), operation_str(op), value); - break; -@@ -1008,6 +1011,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type, - case TK_A_MODE: - case TK_A_NAME: - case TK_A_GOTO: -+ case TK_M_TAG: - case TK_A_TAG: - token->key.value_off = add_string(rule_tmp->rules, value); - break; -@@ -1357,7 +1361,10 @@ static int add_rule(struct udev_rules *rules, char *line, - } - - if (strcmp(key, "TAG") == 0) { -- rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL); -+ if (op < OP_MATCH_MAX) -+ rule_add_key(&rule_tmp, TK_M_TAG, op, value, NULL); -+ else -+ rule_add_key(&rule_tmp, TK_A_TAG, op, value, NULL); - continue; - } - -@@ -2104,6 +2111,21 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - goto nomatch; - break; - } -+ case TK_M_TAG: -+ { -+ struct udev_list_entry *list_entry; -+ bool match = false; -+ -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(event->dev)) { -+ if (strcmp(&rules->buf[cur->key.value_off], udev_list_entry_get_name(list_entry)) == 0) { -+ match = true; -+ break; -+ } -+ } -+ if (!match && (cur->key.op != OP_NOMATCH)) -+ goto nomatch; -+ break; -+ } - case TK_M_SUBSYSTEM: - if (match_key(rules, cur, udev_device_get_subsystem(event->dev)) != 0) - goto nomatch; -diff --git a/udev/udev.xml b/udev/udev.xml -index 842fd5d..d2277c9 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -238,6 +238,13 @@ - - - -+ -+ -+ Match against a device tag. -+ -+ -+ -+ - - - Test the existence of a file. An octal mode mask can be specified --- -1.7.0.1 - diff --git a/0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch b/0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch deleted file mode 100644 index cff2caa..0000000 --- a/0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch +++ /dev/null @@ -1,125 +0,0 @@ -From f24362441f6165544888d8d97d63ff881e78f13f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 22 Apr 2010 18:33:49 +0200 -Subject: [PATCH 10/19] udev-acl: use a tag instead of a property to mark devices - ---- - extras/udev-acl/70-acl.rules | 48 +++++++++++++++++++++--------------------- - extras/udev-acl/udev-acl.c | 2 +- - 2 files changed, 25 insertions(+), 25 deletions(-) - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index 5b00bf8..cf6b0ea 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -8,70 +8,70 @@ ACTION=="remove", GOTO="acl_apply" - - # PTP/MTP protocol devices, cameras, portable media players - SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" --SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG="udev-acl" - - # digicams with proprietary protocol --ENV{ID_GPHOTO2}=="*?", ENV{ACL_MANAGE}="1" -+ENV{ID_GPHOTO2}=="*?", TAG="udev-acl" - - # SCSI scanners --KERNEL=="sg[0-9]*", ATTRS{type}=="6", ENV{ACL_MANAGE}="1" --KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", ENV{ACL_MANAGE}="1" -+KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG="udev-acl" -+KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG="udev-acl" - - # USB scanners --ENV{libsane_matched}=="yes", ENV{ACL_MANAGE}="1" -+ENV{libsane_matched}=="yes", TAG="udev-acl" - - # HPLIP devices (necessary for ink level check and HP tool maintenance) --ENV{ID_HPLIP}=="1", ENV{ACL_MANAGE}="1" -+ENV{ID_HPLIP}=="1", TAG="udev-acl" - - # optical drives --SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG="udev-acl" - - # sound devices --SUBSYSTEM=="sound", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="sound", TAG="udev-acl" - # sound jack-sense --SUBSYSTEM=="input", SUBSYSTEMS=="sound", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG="udev-acl" - - # webcams, frame grabber, TV cards --SUBSYSTEM=="video4linux", ENV{ACL_MANAGE}="1" --SUBSYSTEM=="dvb", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="video4linux", TAG="udev-acl" -+SUBSYSTEM=="dvb", TAG="udev-acl" - - # IIDC devices: industrial cameras and some webcams --SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG="udev-acl" - # AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more --SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG="udev-acl" - - # old style firewire devices --KERNEL=="dv1394-[0-9]*", ENV{ACL_MANAGE}="1" --KERNEL=="video1394-[0-9]*", ENV{ACL_MANAGE}="1" -+KERNEL=="dv1394-[0-9]*", TAG="udev-acl" -+KERNEL=="video1394-[0-9]*", TAG="udev-acl" - - # fingerprint readers --SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", TAG="udev-acl" - - # GPS devices - # Garmin GPSMap 60 --SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", TAG="udev-acl" - - - # DRI video devices --SUBSYSTEM=="drm", KERNEL=="card*", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="drm", KERNEL=="card*", TAG="udev-acl" - - # KVM --SUBSYSTEM=="misc", KERNEL=="kvm", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="misc", KERNEL=="kvm", TAG="udev-acl" - - # smart-card readers --ENV{ID_SMARTCARD_READER}=="*?", ENV{ACL_MANAGE}="1" -+ENV{ID_SMARTCARD_READER}=="*?", TAG="udev-acl" - - # joysticks --SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG="udev-acl" - - # smart phones --SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", ENV{ACL_MANAGE}="1" -+SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", TAG="udev-acl" - - # color measurement devices --ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1" -+ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG="udev-acl" - - # apply ACL for all locally logged in users --LABEL="acl_apply", ENV{ACL_MANAGE}=="1", TEST=="/var/run/ConsoleKit/database", \ -+LABEL="acl_apply", TAG=="udev-acl", TEST=="/var/run/ConsoleKit/database", \ - RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}" - - LABEL="acl_end" -diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c -index ce51590..ff04ec6 100644 ---- a/extras/udev-acl/udev-acl.c -+++ b/extras/udev-acl/udev-acl.c -@@ -289,7 +289,7 @@ static void apply_acl_to_devices(uid_t uid, int add) - /* iterate over all devices tagged with ACL_SET */ - udev = udev_new(); - enumerate = udev_enumerate_new(udev); -- udev_enumerate_add_match_property(enumerate, "ACL_MANAGE", "1"); -+ udev_enumerate_add_match_tag(enumerate, "udev-acl"); - udev_enumerate_scan_devices(enumerate); - udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) { - struct udev_device *device; --- -1.7.0.1 - diff --git a/0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch b/0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch deleted file mode 100644 index 5224fc8..0000000 --- a/0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch +++ /dev/null @@ -1,49 +0,0 @@ -From bfd88b1d7b689ce86a2b04f62ac5a2b23b0aef84 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 22 Apr 2010 18:50:43 +0200 -Subject: [PATCH 11/19] fix logic on-demand loading logic for db and uevent - ---- - libudev/libudev-device.c | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 478fdcb..3f441d0 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -284,6 +284,8 @@ int udev_device_read_db(struct udev_device *udev_device) - dbg(udev_device->udev, "error reading db file %s: %m\n", filename); - return -1; - } -+ udev_device->db_loaded = true; -+ - while (fgets(line, sizeof(line), f)) { - ssize_t len; - const char *val; -@@ -322,7 +324,6 @@ int udev_device_read_db(struct udev_device *udev_device) - fclose(f); - - info(udev_device->udev, "device %p filled with db file data\n", udev_device); -- udev_device->db_loaded = true; - return 0; - } - -@@ -341,6 +342,7 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) - f = fopen(filename, "r"); - if (f == NULL) - return -1; -+ udev_device->uevent_loaded = true; - - while (fgets(line, sizeof(line), f)) { - char *pos; -@@ -364,7 +366,6 @@ int udev_device_read_uevent_file(struct udev_device *udev_device) - - udev_device->devnum = makedev(maj, min); - fclose(f); -- udev_device->uevent_loaded = true; - return 0; - } - --- -1.7.0.1 - diff --git a/0012-use-the-usual-TAG-TAG-logic.patch b/0012-use-the-usual-TAG-TAG-logic.patch deleted file mode 100644 index c898ed7..0000000 --- a/0012-use-the-usual-TAG-TAG-logic.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 1dbfbfbea6d80971fba6bb57469b5c437a8980d6 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 22 Apr 2010 19:03:11 +0200 -Subject: [PATCH 12/19] use the usual TAG+=, TAG= logic - ---- - extras/udev-acl/70-acl.rules | 48 +++++++++++++++++++++--------------------- - udev/udev-rules.c | 2 + - 2 files changed, 26 insertions(+), 24 deletions(-) - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index cf6b0ea..8300ec2 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -1,6 +1,6 @@ - # do not edit this file, it will be overwritten on update - --# Do not use ACL_MANAGE outside of this file. This variable is private to -+# Do not use TAG+="udev-acl" outside of this file. This variable is private to - # udev-acl of this udev release and may be replaced at any time. - - ENV{MAJOR}=="", GOTO="acl_end" -@@ -8,67 +8,67 @@ ACTION=="remove", GOTO="acl_apply" - - # PTP/MTP protocol devices, cameras, portable media players - SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" --SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG="udev-acl" -+SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl" - - # digicams with proprietary protocol --ENV{ID_GPHOTO2}=="*?", TAG="udev-acl" -+ENV{ID_GPHOTO2}=="*?", TAG+="udev-acl" - - # SCSI scanners --KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG="udev-acl" --KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG="udev-acl" -+KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG+="udev-acl" -+KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG+="udev-acl" - - # USB scanners --ENV{libsane_matched}=="yes", TAG="udev-acl" -+ENV{libsane_matched}=="yes", TAG+="udev-acl" - - # HPLIP devices (necessary for ink level check and HP tool maintenance) --ENV{ID_HPLIP}=="1", TAG="udev-acl" -+ENV{ID_HPLIP}=="1", TAG+="udev-acl" - - # optical drives --SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG="udev-acl" -+SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="udev-acl" - - # sound devices --SUBSYSTEM=="sound", TAG="udev-acl" -+SUBSYSTEM=="sound", TAG+="udev-acl" - # sound jack-sense --SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG="udev-acl" -+SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG+="udev-acl" - - # webcams, frame grabber, TV cards --SUBSYSTEM=="video4linux", TAG="udev-acl" --SUBSYSTEM=="dvb", TAG="udev-acl" -+SUBSYSTEM=="video4linux", TAG+="udev-acl" -+SUBSYSTEM=="dvb", TAG+="udev-acl" - - # IIDC devices: industrial cameras and some webcams --SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG="udev-acl" -+SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG+="udev-acl" - # AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more --SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG="udev-acl" -+SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="udev-acl" - - # old style firewire devices --KERNEL=="dv1394-[0-9]*", TAG="udev-acl" --KERNEL=="video1394-[0-9]*", TAG="udev-acl" -+KERNEL=="dv1394-[0-9]*", TAG+="udev-acl" -+KERNEL=="video1394-[0-9]*", TAG+="udev-acl" - - # fingerprint readers --SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", TAG="udev-acl" -+SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", TAG+="udev-acl" - - # GPS devices - # Garmin GPSMap 60 --SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", TAG="udev-acl" -+SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", TAG+="udev-acl" - - - # DRI video devices --SUBSYSTEM=="drm", KERNEL=="card*", TAG="udev-acl" -+SUBSYSTEM=="drm", KERNEL=="card*", TAG+="udev-acl" - - # KVM --SUBSYSTEM=="misc", KERNEL=="kvm", TAG="udev-acl" -+SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl" - - # smart-card readers --ENV{ID_SMARTCARD_READER}=="*?", TAG="udev-acl" -+ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" - - # joysticks --SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG="udev-acl" -+SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" - - # smart phones --SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", TAG="udev-acl" -+SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", TAG+="udev-acl" - - # color measurement devices --ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG="udev-acl" -+ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="udev-acl" - - # apply ACL for all locally logged in users - LABEL="acl_apply", TAG=="udev-acl", TEST=="/var/run/ConsoleKit/database", \ -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 5965723..6f3335b 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -2442,6 +2442,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event - break; - } - case TK_A_TAG: -+ if (cur->key.op == OP_ASSIGN || cur->key.op == OP_ASSIGN_FINAL) -+ udev_device_cleanup_tags_list(event->dev); - udev_device_add_tag(event->dev, &rules->buf[cur->key.value_off]); - break; - case TK_A_NAME: --- -1.7.0.1 - diff --git a/0013-delete-old-tags-when-configuration-changes.patch b/0013-delete-old-tags-when-configuration-changes.patch deleted file mode 100644 index ed0d4da..0000000 --- a/0013-delete-old-tags-when-configuration-changes.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c1dbe11dc336f9faf02073a66fe30a12bd438e23 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 23 Apr 2010 09:01:56 +0200 -Subject: [PATCH 13/19] delete old tags when configuration changes - ---- - libudev/libudev-device-private.c | 67 +++++++++++++++++++++++++------------- - libudev/libudev-private.h | 1 + - udev/udev-event.c | 4 ++ - 3 files changed, 49 insertions(+), 23 deletions(-) - -diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c -index 13f1ebf..7e5fcbc 100644 ---- a/libudev/libudev-device-private.c -+++ b/libudev/libudev-device-private.c -@@ -22,34 +22,58 @@ - #include "libudev.h" - #include "libudev-private.h" - --static int udev_device_tag_index(struct udev_device *udev_device, bool add) -+static void udev_device_tag(struct udev_device *dev, const char *tag, bool add) - { -- struct udev *udev = udev_device_get_udev(udev_device); -- struct udev_list_entry *list_entry; -+ struct udev *udev = udev_device_get_udev(dev); -+ char filename[UTIL_PATH_SIZE]; - -- udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device)) { -- char filename[UTIL_PATH_SIZE]; -+ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", tag, "/", -+ udev_device_get_subsystem(dev), ":", udev_device_get_sysname(dev), NULL); - -- util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", -- udev_list_entry_get_name(list_entry), "/", -- udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); -+ if (add) { -+ util_create_path(udev, filename); -+ symlink(udev_device_get_devpath(dev), filename); -+ /* possibly cleanup old entries after a device renaming */ -+ if (udev_device_get_sysname_old(dev) != NULL) { -+ char filename_old[UTIL_PATH_SIZE]; - -- if (add) { -- util_create_path(udev, filename); -- symlink(udev_device_get_devpath(udev_device), filename); -- if (udev_device_get_sysname_old(udev_device) != NULL) { -- char filename_old[UTIL_PATH_SIZE]; -+ util_strscpyl(filename_old, sizeof(filename_old), udev_get_dev_path(udev), "/.udev/tags/", tag, "/", -+ udev_device_get_subsystem(dev), ":", udev_device_get_sysname_old(dev), NULL); -+ unlink(filename_old); -+ } -+ } else { -+ unlink(filename); -+ } -+} - -- util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/tags/", -- udev_list_entry_get_name(list_entry), -- udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); -- unlink(filename_old); -+int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old, bool add) -+{ -+ struct udev_list_entry *list_entry; -+ bool found; -+ -+ if (add) { -+ /* delete possible left-over tags */ -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev_old)) { -+ const char *tag_old = udev_list_entry_get_name(list_entry); -+ struct udev_list_entry *list_entry_current; -+ -+ found = false; -+ udev_list_entry_foreach(list_entry_current, udev_device_get_tags_list_entry(dev)) { -+ const char *tag = udev_list_entry_get_name(list_entry_current); -+ -+ if (strcmp(tag, tag_old) == 0) { -+ found = true; -+ break; -+ } - } -- } else { -- unlink(filename); -- util_delete_path(udev, filename); -+ if (!found) -+ udev_device_tag(dev_old, tag_old, false); - } - } -+ -+ udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev)) -+ udev_device_tag(dev, udev_list_entry_get_name(list_entry), add); -+ - return 0; - } - -@@ -140,7 +164,6 @@ file: - rename(filename_tmp, filename); - info(udev, "created db file for '%s' in '%s'\n", udev_device_get_devpath(udev_device), filename); - out: -- udev_device_tag_index(udev_device, true); - return 0; - } - -@@ -149,7 +172,6 @@ int udev_device_delete_db(struct udev_device *udev_device) - struct udev *udev = udev_device_get_udev(udev_device); - char filename[UTIL_PATH_SIZE]; - -- udev_device_tag_index(udev_device, false); - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); - unlink(filename); -@@ -169,6 +191,5 @@ int udev_device_rename_db(struct udev_device *udev_device) - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL); - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", - udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname(udev_device), NULL); -- udev_device_tag_index(udev_device, true); - return rename(filename_old, filename); - } -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 548f4ad..3f38a32 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -106,6 +106,7 @@ void udev_device_set_info_loaded(struct udev_device *device); - int udev_device_update_db(struct udev_device *udev_device); - int udev_device_delete_db(struct udev_device *udev_device); - int udev_device_rename_db(struct udev_device *udev_device); -+int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old, bool add); - - /* libudev-monitor.c - netlink/unix socket communication */ - int udev_monitor_disconnect(struct udev_monitor *udev_monitor); -diff --git a/udev/udev-event.c b/udev/udev-event.c -index 212ccc7..2d8becd 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -544,6 +544,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - if (strcmp(udev_device_get_action(dev), "remove") == 0) { - udev_device_read_db(dev); - udev_device_delete_db(dev); -+ udev_device_tag_index(dev, NULL, false); - - if (major(udev_device_get_devnum(dev)) != 0) - udev_watch_end(event->udev, dev); -@@ -577,6 +578,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - - /* delete stale db file */ - udev_device_delete_db(dev); -+ udev_device_tag_index(dev, NULL, false); - - /* remember old name */ - udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); -@@ -618,6 +620,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - if (event->name == NULL) { - /* things went wrong */ - udev_device_delete_db(dev); -+ udev_device_tag_index(dev, NULL, false); - udev_device_unref(event->dev_db); - err = -ENOMEM; - goto out; -@@ -629,6 +632,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) - } - - udev_device_update_db(dev); -+ udev_device_tag_index(dev, event->dev_db, true); - - if (major(udev_device_get_devnum(dev)) != 0) { - /* remove/update possible left-over symlinks from old database entry */ --- -1.7.0.1 - diff --git a/0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch b/0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch deleted file mode 100644 index cd35b0d..0000000 --- a/0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 65f099c721fa568350f8ac019e3a99fda1966082 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 23 Apr 2010 09:22:42 +0200 -Subject: [PATCH 14/19] libudev: accept NULL in udev_device_get_tags_list_entry() - ---- - libudev/libudev-device-private.c | 2 +- - libudev/libudev-device.c | 2 ++ - 2 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c -index 7e5fcbc..8c8ac24 100644 ---- a/libudev/libudev-device-private.c -+++ b/libudev/libudev-device-private.c -@@ -51,7 +51,7 @@ int udev_device_tag_index(struct udev_device *dev, struct udev_device *dev_old, - struct udev_list_entry *list_entry; - bool found; - -- if (add) { -+ if (add && dev_old != NULL) { - /* delete possible left-over tags */ - udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(dev_old)) { - const char *tag_old = udev_list_entry_get_name(list_entry); -diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c -index 3f441d0..a6a1ecb 100644 ---- a/libudev/libudev-device.c -+++ b/libudev/libudev-device.c -@@ -1289,6 +1289,8 @@ void udev_device_cleanup_tags_list(struct udev_device *udev_device) - - struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device) - { -+ if (udev_device == NULL) -+ return NULL; - return udev_list_get_entry(&udev_device->tags_list); - } - --- -1.7.0.1 - diff --git a/0015-export-tag-functions.patch b/0015-export-tag-functions.patch deleted file mode 100644 index 2d6f066..0000000 --- a/0015-export-tag-functions.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2a34f9c31e17f4a6c4fc99a369f56e843a063390 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 23 Apr 2010 10:46:00 +0200 -Subject: [PATCH 15/19] export tag functions - ---- - libudev/exported_symbols | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/libudev/exported_symbols b/libudev/exported_symbols -index c0ca4b9..d2c458e 100644 ---- a/libudev/exported_symbols -+++ b/libudev/exported_symbols -@@ -46,6 +46,7 @@ udev_enumerate_add_nomatch_subsystem - udev_enumerate_add_match_sysattr - udev_enumerate_add_nomatch_sysattr - udev_enumerate_add_match_property -+udev_enumerate_add_match_tag - udev_enumerate_add_match_sysname - udev_enumerate_scan_devices - udev_enumerate_scan_subsystems --- -1.7.0.1 - diff --git a/0016-export-udev_device_get_tags_list_entry.patch b/0016-export-udev_device_get_tags_list_entry.patch deleted file mode 100644 index 1ce2e3d..0000000 --- a/0016-export-udev_device_get_tags_list_entry.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2793f4e34bdf4f1a46d0263f7dbdb8fcffe78e32 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 23 Apr 2010 16:05:38 +0200 -Subject: [PATCH 16/19] export udev_device_get_tags_list_entry() - ---- - libudev/exported_symbols | 1 + - libudev/libudev-private.h | 1 - - libudev/libudev.h | 1 + - 3 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/libudev/exported_symbols b/libudev/exported_symbols -index d2c458e..935e361 100644 ---- a/libudev/exported_symbols -+++ b/libudev/exported_symbols -@@ -30,6 +30,7 @@ udev_device_get_subsystem - udev_device_get_devtype - udev_device_get_devlinks_list_entry - udev_device_get_properties_list_entry -+udev_device_get_tags_list_entry - udev_device_get_property_value - udev_device_get_action - udev_device_get_driver -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 3f38a32..7132357 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -87,7 +87,6 @@ int udev_device_set_devpath_old(struct udev_device *udev_device, const char *dev - const char *udev_device_get_knodename(struct udev_device *udev_device); - int udev_device_add_tag(struct udev_device *udev_device, const char *tag); - void udev_device_cleanup_tags_list(struct udev_device *udev_device); --struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); - int udev_device_has_tag(struct udev_device *udev_device, const char *tag); - int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename); - int udev_device_get_timeout(struct udev_device *udev_device); -diff --git a/libudev/libudev.h b/libudev/libudev.h -index 3b73fbd..5bc42df 100644 ---- a/libudev/libudev.h -+++ b/libudev/libudev.h -@@ -90,6 +90,7 @@ const char *udev_device_get_sysnum(struct udev_device *udev_device); - const char *udev_device_get_devnode(struct udev_device *udev_device); - struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device); - struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device); -+struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); - const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key); - const char *udev_device_get_driver(struct udev_device *udev_device); - dev_t udev_device_get_devnum(struct udev_device *udev_device); --- -1.7.0.1 - diff --git a/0017-configure.ac-move-firmware-path-setting-out-of-extra.patch b/0017-configure.ac-move-firmware-path-setting-out-of-extra.patch deleted file mode 100644 index a54acaf..0000000 --- a/0017-configure.ac-move-firmware-path-setting-out-of-extra.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 0c6a3f48357ed4a49c2c49c43f669f930d628382 Mon Sep 17 00:00:00 2001 -From: Robby Workman -Date: Sat, 24 Apr 2010 21:38:37 +0200 -Subject: [PATCH 17/19] configure.ac: move firmware-path setting out of extras section - ---- - configure.ac | 38 ++++++++++++++++++-------------------- - 1 files changed, 18 insertions(+), 20 deletions(-) - -diff --git a/configure.ac b/configure.ac -index d4d29c4..4fe8c3c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -46,6 +46,24 @@ if test "x$enable_logging" = "xyes"; then - AC_DEFINE(ENABLE_LOGGING, [1], [System logging.]) - fi - -+AC_ARG_WITH(firmware-path, -+ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], -+ [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), -+ [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"] -+ ) -+OLD_IFS=$IFS -+IFS=: -+for i in $with_firmware_path -+do -+ if test "x${FIRMWARE_PATH}" = "x"; then -+ FIRMWARE_PATH="\\\"${i}/\\\"" -+ else -+ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" -+ fi -+done -+IFS=$OLD_IFS -+AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) -+ - AC_ARG_ENABLE([extras], - AS_HELP_STRING([--disable-extras], [disable extras with external dependencies]), - [], [enable_extras=yes]) -@@ -82,26 +100,6 @@ if test "x$enable_extras" = xyes; then - fi]) - AC_SUBST(PCI_DATABASE) - -- AC_ARG_WITH(firmware-path, -- AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], -- [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), -- [], -- [with_firmware_path="/lib/firmware/updates:/lib/firmware"] -- ) -- OLD_IFS=$IFS -- IFS=: -- for i in $with_firmware_path -- do -- if test "x${FIRMWARE_PATH}" = "x" -- then -- FIRMWARE_PATH="\\\"${i}/\\\"" -- else -- FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" -- fi -- done -- IFS=$OLD_IFS -- AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) -- - AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found])) - AC_SUBST([INCLUDE_PREFIX], [$(echo '#include ' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')]) - fi --- -1.7.0.1 - diff --git a/0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch b/0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch deleted file mode 100644 index ac23c46..0000000 --- a/0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ad3d4198439f06cab8a2a65190ad501b803666a1 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 26 Apr 2010 08:28:36 +0200 -Subject: [PATCH 18/19] keymap: Fix Bluetooth key on Acer TravelMate 4720 - -https://launchpad.net/bugs/569815 ---- - extras/keymap/95-keymap.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 2f41cb4..a27bc6d 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -77,7 +77,7 @@ ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap - ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" --ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" -+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" --- -1.7.0.1 - diff --git a/0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch b/0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch deleted file mode 100644 index 3864b50..0000000 --- a/0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 665ee17def2caa6811ae032ae68ebf8239a18cf8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 26 Apr 2010 12:21:16 +0200 -Subject: [PATCH 19/19] udevd: always try to find an idle worker instead of forking a new one - -We special-handle events with a TIMEOUT= set, so they don't get queued -or wait for parent events to finish, to make sure we can handle them -as fast as possible. - -With this change we first try to find an idle worker process before -forking a new one. ---- - udev/udevd.c | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/udev/udevd.c b/udev/udevd.c -index c27b4cd..7712543 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -360,7 +360,7 @@ static void worker_new(struct event *event) - } - } - --static void event_run(struct event *event) -+static void event_run(struct event *event, bool force) - { - struct udev_list_node *loop; - -@@ -385,7 +385,7 @@ static void event_run(struct event *event) - return; - } - -- if (childs >= max_childs) { -+ if (!force && childs >= max_childs) { - info(event->udev, "maximum number (%i) of childs reached\n", childs); - return; - } -@@ -420,7 +420,7 @@ static void event_queue_insert(struct udev_device *dev) - - /* run all events with a timeout set immediately */ - if (udev_device_get_timeout(dev) > 0) { -- worker_new(event); -+ event_run(event, true); - return; - } - } -@@ -552,7 +552,7 @@ static void events_start(struct udev *udev) - continue; - } - -- event_run(event); -+ event_run(event, false); - } - } - --- -1.7.0.1 - diff --git a/sources b/sources index 455487b..5fbdd93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -76d12a9d97c3409e9ef60a4288227e8f udev-153.tar.bz2 +28064e0325050a1eedec4c142da65ea7 udev-154.tar.bz2 diff --git a/start_udev b/start_udev index 72b548e..69639e9 100755 --- a/start_udev +++ b/start_udev @@ -127,10 +127,6 @@ make_extra_nodes () { [ -c /dev/fuse ] || /bin/mknod -m 0666 /dev/fuse c 10 229 #/bin/chown root:root /dev/fuse - if [ -x /sbin/restorecon ]; then - /sbin/restorecon -R /dev - fi - if [ -x "$MAKEDEV" ]; then for i in /etc/udev/makedev.d/*.nodes; do if [ -f "$i" ]; then @@ -165,14 +161,15 @@ make_extra_nodes () { if [ "$1" != "*" ]; then #echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." cp -ar "$@" $udev_root/ - if [ -x /sbin/restorecon ]; then - pushd "$udev_root" &> "$udev_root/null" - /sbin/restorecon "$@" - popd &> "$udev_root/null" - fi fi popd &> "$udev_root/null" done + + if [ -x /sbin/restorecon ]; then + /sbin/restorecon -R /dev + fi + + } kill_udevd() { @@ -296,8 +293,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then /sbin/udevadm control --max-childs=$(getval udevchilds $cmdline) fi - /sbin/udevadm control --env=STARTUP=1 - if strstr "$cmdline" modprobedebug; then /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" echo @@ -318,7 +313,6 @@ if [ -f "/sys/class/tty/console/uevent" ]; then ret=$[$ret + $?] wait ret=$[$ret + $?] - /sbin/udevadm control --env=STARTUP= # touch all device files for timezone glitches # "find" is in /usr/bin and might not be available if [ -f /etc/sysconfig/clock ]; then diff --git a/udev-153.tar.bz2.sign b/udev-154.tar.bz2.sign similarity index 61% rename from udev-153.tar.bz2.sign rename to udev-154.tar.bz2.sign index 566f6aa..763fe27 100644 --- a/udev-153.tar.bz2.sign +++ b/udev-154.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBLzqFNyGugalF9Dw4RAkvzAJ4ureXWse6fF/61NaNe97mDDQMtUwCfegJi -Ar0G12dwUvDR2gYMcPTiRzs= -=vIft +iD8DBQBL6cfoyGugalF9Dw4RAgHRAJ4uiUTYmlpX91E61jQCPORk+rXiLQCfbkaL +GHVrrEPnh6SqXnXN1zRsNco= +=YhCs -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 4183371..9036352 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 153 -Release: 1.20100427git%{?dist} +Version: 154 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,29 +14,8 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch1: 0001-configure.ac-version-bump.patch -Patch2: 0002-remove-buffer-overrun-risk-in-readlink-call.patch -Patch3: 0003-more-readlink-buffer-size-handling.patch -Patch4: 0004-remove-left-over-from-ignore_remove-and-all_partitio.patch -Patch5: 0005-fix-previous-commit.patch -Patch6: 0006-Fix-volume-keys-not-releasing-for-Pegatron-platform.patch -Patch7: 0007-udevadm-info-export-db-remove-watch-handle-export.patch -Patch8: 0008-add-TAG-to-improve-event-filtering-and-device-enumer.patch -Patch9: 0009-all-to-match-against-a-given-TAG.patch -Patch10: 0010-udev-acl-use-a-tag-instead-of-a-property-to-mark-dev.patch -Patch11: 0011-fix-logic-on-demand-loading-logic-for-db-and-uevent.patch -Patch12: 0012-use-the-usual-TAG-TAG-logic.patch -Patch13: 0013-delete-old-tags-when-configuration-changes.patch -Patch14: 0014-libudev-accept-NULL-in-udev_device_get_tags_list_ent.patch -Patch15: 0015-export-tag-functions.patch -Patch16: 0016-export-udev_device_get_tags_list_entry.patch -Patch17: 0017-configure.ac-move-firmware-path-setting-out-of-extra.patch -Patch18: 0018-keymap-Fix-Bluetooth-key-on-Acer-TravelMate-4720.patch -Patch19: 0019-udevd-always-try-to-find-an-idle-worker-instead-of-f.patch - Patch101: udev-151-rules.patch -Patch102: udev-153-LGPL.patch -Patch103: udev-151-gperf.patch +#Patch103: udev-151-gperf.patch Source1: start_udev Source3: udev-post.init @@ -133,38 +112,14 @@ glib-based applications using libudev functionality. %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 - %patch101 -p1 -%patch102 -p1 -%patch103 -p1 +#%patch103 -p1 %build -autoreconf -i -automake -# get rid of rpath libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ - --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \ + --sysconfdir=%{_sysconfdir} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} --enable-introspection \ --enable-debug @@ -390,6 +345,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed May 12 2010 Harald Hoyer 154-1 +- version 154 + * Tue Apr 27 2010 Harald Hoyer 153-1.20100427git - version 153 From 7b608d10c88acde3703f1df1631d760e2cde9f92 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 25 May 2010 12:09:05 +0000 Subject: [PATCH 558/640] - version 156 --- .cvsignore | 2 +- sources | 2 +- udev-154.tar.bz2.sign => udev-156.tar.bz2.sign | 6 +++--- udev.spec | 14 ++++++++------ 4 files changed, 13 insertions(+), 11 deletions(-) rename udev-154.tar.bz2.sign => udev-156.tar.bz2.sign (61%) diff --git a/.cvsignore b/.cvsignore index a4264db..ad65381 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-154.tar.bz2 +udev-156.tar.bz2 diff --git a/sources b/sources index 5fbdd93..5c65b78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -28064e0325050a1eedec4c142da65ea7 udev-154.tar.bz2 +5efef35990dd20d8bb459eaff36d1f88 udev-156.tar.bz2 diff --git a/udev-154.tar.bz2.sign b/udev-156.tar.bz2.sign similarity index 61% rename from udev-154.tar.bz2.sign rename to udev-156.tar.bz2.sign index 763fe27..0a620a6 100644 --- a/udev-154.tar.bz2.sign +++ b/udev-156.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBL6cfoyGugalF9Dw4RAgHRAJ4uiUTYmlpX91E61jQCPORk+rXiLQCfbkaL -GHVrrEPnh6SqXnXN1zRsNco= -=YhCs +iD8DBQBL+6Y0yGugalF9Dw4RAiXCAJ46yjnuIIL1HVdbEgng81WqFdufFACdGo+0 +nOsBxQEHIdTdXHqoC25Aa/s= +=/xG7 -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 9036352..5e15845 100644 --- a/udev.spec +++ b/udev.spec @@ -4,7 +4,7 @@ Summary: A userspace implementation of devfs Name: udev -Version: 154 +Version: 156 Release: 1%{?dist} License: GPLv2 Group: System Environment/Base @@ -121,8 +121,7 @@ libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ --sysconfdir=%{_sysconfdir} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ - --with-rootlibdir=/%{_lib} --enable-introspection \ - --enable-debug + --with-rootlibdir=/%{_lib} --enable-introspection make %{?_smp_mflags} @@ -193,9 +192,6 @@ fi exit 0 %pre -# to be removed after F10 EOL (and for RHEL-6) -getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || : -getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || : # to be kept getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : @@ -345,6 +341,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue May 25 2010 Harald Hoyer 156-1 +- version 156 + +* Tue May 25 2010 Harald Hoyer 155-1 +- version 155 + * Wed May 12 2010 Harald Hoyer 154-1 - version 154 From 84bd1b90a3f8d2f4240e8cb17994fc4bcb3018b4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 27 May 2010 09:31:37 +0000 Subject: [PATCH 559/640] - cleaned up start_udev and udev-post initscript - removed redhat specific rules - removed all the makedev.d stuff, udevd now natively supports /lib/udev/devices - added basic devices in /lib/udev/devices --- start_udev | 275 +++++++++---------------------------------------- udev-post.init | 28 ----- udev.spec | 67 +++++++----- 3 files changed, 89 insertions(+), 281 deletions(-) diff --git a/start_udev b/start_udev index 69639e9..2aa0381 100755 --- a/start_udev +++ b/start_udev @@ -29,32 +29,11 @@ export TZ=/etc/localtime [ -d $sysfs_dir/class ] || exit 1 [ -r /proc/mounts ] || exit 1 [ -x /sbin/udevd ] || exit 1 -[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf -udev_root=${udev_root-/dev} - -if [ -f /dev/.in_sysinit ]; then - exec >/dev/console 2>/dev/console "$md5file" - fi - . "$md5file" >$udev_root/null 2>&1 - else - ( sed -e 's,#.*,,g' "$i" | \ - xargs_simple -n 100 $MAKEDEV -x ) - fi - fi - done - fi - - for devdir in /etc/udev/devices /lib/udev/devices; do - [ -d "$devdir" ] || continue - pushd $devdir &> "$udev_root/null" - set * - if [ "$1" != "*" ]; then - #echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/." - cp -ar "$@" $udev_root/ - fi - popd &> "$udev_root/null" - done - - if [ -x /sbin/restorecon ]; then - /sbin/restorecon -R /dev - fi - - -} - -kill_udevd() { - if [ -x /sbin/pidof ]; then - pid=`/sbin/pidof -x udevd` - [ -n "$pid" ] && kill $pid - fi -} - findalias () { local n for n in "$1"/* ; do @@ -223,107 +88,63 @@ wait_for_queue() { } export ACTION=add -prog=udev ret=0 STRING=$"Starting $prog: " -# propagate $udev_root from /sys +# propagate /dev from /sys echo -n "$STRING" -# mount the tmpfs on ${udev_root%/}, if not already done -LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs\" ) { exit 1 }" /proc/mounts && { - if LANG=C grep -Fq "none ${udev_root%/}/pts " /proc/mounts; then - PTSDIR=$(mktemp -d) - mount --move $udev_root/pts "$PTSDIR" - fi - if LANG=C grep -Fq "none ${udev_root%/}/shm " /proc/mounts; then - SHMDIR=$(mktemp -d) - mount --move $udev_root/shm "$SHMDIR" - fi - # First try to mount a devtmpfs on $udev_root - mount -n -o mode=0755 -t devtmpfs none "$udev_root" 2>/dev/null \ - || mount -n -o mode=0755 -t tmpfs none "$udev_root" - mkdir -m 0755 $udev_root/pts - mkdir -m 0755 $udev_root/shm - if [ -n "$PTSDIR" ]; then - mount --move "$PTSDIR" $udev_root/pts - rmdir "$PTSDIR" - fi - if [ -n "$SHMDIR" ]; then - mount --move "$SHMDIR" $udev_root/shm - rmdir "$SHMDIR" - fi - - ret=$[$ret + $?] -} +rm -fr /dev/.udev > "/dev/null" 2>&1 -make_extra_nodes -kill_udevd > "$udev_root/null" 2>&1 -rm -fr $udev_root/.udev > "$udev_root/null" 2>&1 -mkdir -p $udev_root/.udev > "$udev_root/null" 2>&1 UDEV_OPTS="" -if [ -f "/sys/class/tty/console/uevent" ]; then - # trigger the sorted events - echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug +cmdline=$(cat /proc/cmdline) - cmdline=$(cat /proc/cmdline) +if strstr "$cmdline" udevtrace; then + UDEV_OPTS="$UDEV_OPTS --debug-trace" +fi - if strstr "$cmdline" udevtrace; then - UDEV_OPTS="$UDEV_OPTS --debug-trace" - fi - - if strstr "$cmdline" udevlog; then - UDEV_OPTS="$UDEV_OPTS --debug" - /sbin/udevd -d $UDEV_OPTS 2>$udev_root/.udev/udev.log - else - /sbin/udevd -d $UDEV_OPTS - fi - - wait - ret=$[$ret + $?] - - udevtimeout=$(getval udevtimeout $cmdline) - - if strstr "$cmdline" udevdebug; then - /sbin/udevadm control --log-priority=debug - fi - if strstr "$cmdline" udevinfo; then - /sbin/udevadm control --log-priority=info - fi - if strstr "$cmdline" udevchilds; then - /sbin/udevadm control --max-childs=$(getval udevchilds $cmdline) - fi - - if strstr "$cmdline" modprobedebug; then - /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" - echo - findalias /sys | while read modules ; do - if [ -n "$modules" ]; then - echo "Loading modules for $modules in 5 seconds" - sleep 5 - /sbin/modprobe -a -v -q $modules - wait_for_queue $udevtimeout - fi - done - echo "Triggering Rest" - fi - - /sbin/udevadm trigger --action=add - ret=$[$ret + $?] - wait_for_queue $udevtimeout - ret=$[$ret + $?] - wait - ret=$[$ret + $?] - # touch all device files for timezone glitches - # "find" is in /usr/bin and might not be available - if [ -f /etc/sysconfig/clock ]; then - . /etc/sysconfig/clock - [[ "$UTC" == "false" || "$UTC" == "no" ]] \ - && touch_recursive /dev > "$udev_root/null" 2>&1 - fi +if strstr "$cmdline" udevlog; then + UDEV_OPTS="$UDEV_OPTS --debug" + /sbin/udevd -d $UDEV_OPTS 2>/dev/.udev/udev.log else - echo -n " kernel too old for this udev version " - /sbin/udevd -d $UDEV_OPTS - ret=10 + /sbin/udevd -d $UDEV_OPTS +fi + +ret=$[$ret + $?] + +udevtimeout=$(getval udevtimeout $cmdline) + +if strstr "$cmdline" udevdebug; then + /sbin/udevadm control --log-priority=debug +fi +if strstr "$cmdline" udevinfo; then + /sbin/udevadm control --log-priority=info +fi + +if strstr "$cmdline" modprobedebug; then + /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" + echo + findalias /sys | while read modules ; do + if [ -n "$modules" ]; then + echo "Loading modules for $modules in 5 seconds" + sleep 5 + /sbin/modprobe -a -v -q $modules + wait_for_queue $udevtimeout + fi + done + echo "Triggering Rest" +fi + +/sbin/udevadm trigger --type=subsystems --action=add +/sbin/udevadm trigger --type=devices --action=add +wait_for_queue $udevtimeout +ret=$[$ret + $?] + +# touch all device files for timezone glitches +# "find" is in /usr/bin and might not be available +if [ -f /etc/sysconfig/clock ]; then + . /etc/sysconfig/clock + [[ "$UTC" == "false" || "$UTC" == "no" ]] \ + && touch_recursive /dev > "/dev/null" 2>&1 fi [ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" diff --git a/udev-post.init b/udev-post.init index 67ed0c9..903f686 100644 --- a/udev-post.init +++ b/udev-post.init @@ -55,34 +55,6 @@ case "$1" in ;; stop) [ -w /var/lock/subsys ] || exit 4 - STRING=$"Generating udev makedev cache file" - MAKEDEV="/sbin/MAKEDEV" - USE_MD5="false" - [[ "$UDEV_USE_MAKEDEV_CACHE" == "yes" && -x /usr/bin/md5sum ]] && USE_MD5="true" - if [[ "$USE_MD5" == "true" && -x "$MAKEDEV" ]]; then - for i in /etc/udev/makedev.d/*.nodes; do - if [ -f "$i" ]; then - # use a little caching to speedup things - md5=$(/usr/bin/md5sum "$i"|(read a b; echo $a)) - md5file="/var/lib/udev/makedev.d/${md5}.sh" - - if [ ! -f "$md5file" ]; then - echo -n $STRING - ( sed -e 's,#.*,,g' "$i" | \ - xargs $MAKEDEV -x -a -S ) \ - > "$md5file" - rc=$? - if [ "$rc" -eq "0" ]; then - success "$STRING" - echo - elif [ "$rc" -eq "1" ]; then - failure "$STRING" - echo - fi - fi - fi - done - fi rm -f /var/lock/subsys/udev-post exit 0 ;; diff --git a/udev.spec b/udev.spec index 5e15845..d8c5129 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 156 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -27,7 +27,7 @@ URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): /usr/bin/stat /sbin/pidof -Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd +Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata %ifarch s390 s390x @@ -36,7 +36,7 @@ Requires: s390utils-base %endif BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel -BuildRequires: glib2-devel bison findutils MAKEDEV +BuildRequires: glib2-devel bison findutils BuildRequires: gperf libtool BuildRequires: libusb-devel libacl-devel BuildRequires: libxslt @@ -136,7 +136,7 @@ rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la # Deprecated, but keep the ownership -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d mkdir -p $RPM_BUILD_ROOT%{_bindir} touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config @@ -145,7 +145,6 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id for i in \ - rules/redhat/40-redhat.rules \ %ifarch ia64 rules/packages/40-ia64.rules \ %endif @@ -159,7 +158,9 @@ for i in \ install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done -mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices} +mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices,devices/net,devices/pts,devices/shm,devices/hugepages} + +ln -s /sbin/MAKEDEV $RPM_BUILD_ROOT%{udev_scriptdir}/devices/MAKEDEV install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh @@ -174,8 +175,6 @@ install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev -mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d - %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then if [ -x /sbin/pidof ]; then @@ -192,7 +191,6 @@ fi exit 0 %pre -# to be kept getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : @@ -227,12 +225,6 @@ fi exit 0 -%triggerin -- selinux-policy -rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : - -%triggerin -- MAKEDEV -rm -f /var/lib/udev/makenode.d/* >/dev/null 2>&1 || : - %post -n libudev -p /sbin/ldconfig %postun -n libudev -p /sbin/ldconfig @@ -267,15 +259,33 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/input_id %attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh - %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %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) %dir %{udev_scriptdir}/devices/net +%attr(0755,root,root) %dir %{udev_scriptdir}/devices/hugepages +%attr(0755,root,root) %dir %{udev_scriptdir}/devices/pts +%attr(0755,root,root) %dir %{udev_scriptdir}/devices/shm +%{udev_scriptdir}/devices/MAKEDEV +%attr(666,root,root) %dev(c,10,200) %{udev_scriptdir}/devices/net/tun +%attr(600,root,root) %dev(c,108,0) %{udev_scriptdir}/devices/ppp +%attr(666,root,root) %dev(c,10,229) %{udev_scriptdir}/devices/fuse +%attr(660,root,lp) %dev(c,6,0) %{udev_scriptdir}/devices/lp0 +%attr(660,root,lp) %dev(c,6,1) %{udev_scriptdir}/devices/lp1 +%attr(660,root,lp) %dev(c,6,2) %{udev_scriptdir}/devices/lp2 +%attr(660,root,lp) %dev(c,6,3) %{udev_scriptdir}/devices/lp3 +%attr(640,root,disk) %dev(c,7,0) %{udev_scriptdir}/devices/loop0 +%attr(640,root,disk) %dev(c,7,1) %{udev_scriptdir}/devices/loop1 +%attr(640,root,disk) %dev(c,7,2) %{udev_scriptdir}/devices/loop2 +%attr(640,root,disk) %dev(c,7,3) %{udev_scriptdir}/devices/loop3 +%attr(640,root,disk) %dev(c,7,4) %{udev_scriptdir}/devices/loop4 +%attr(640,root,disk) %dev(c,7,5) %{udev_scriptdir}/devices/loop5 +%attr(640,root,disk) %dev(c,7,6) %{udev_scriptdir}/devices/loop6 +%attr(640,root,disk) %dev(c,7,7) %{udev_scriptdir}/devices/loop7 + %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf @@ -288,14 +298,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%dir %attr(0755,root,root) /var/lib/udev -%dir %attr(0755,root,root) /var/lib/udev/makedev.d - -# Deprecated, but keep the ownership -%ghost %dir %{_sysconfdir}/udev/scripts/ -%ghost %dir %{_sysconfdir}/udev/devices/ -%ghost %dir %{_sysconfdir}/dev.d/ - %attr(0755,root,root) %{udev_scriptdir}/mobile-action-modeswitch %attr(0755,root,root) %{udev_scriptdir}/pci-db %attr(0755,root,root) %{udev_scriptdir}/usb-db @@ -307,6 +309,12 @@ rm -rf $RPM_BUILD_ROOT %{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck +# Deprecated, but keep the ownership +%ghost %dir /var/lib/udev +%ghost %dir %{_sysconfdir}/udev/scripts/ +%ghost %dir %{_sysconfdir}/udev/devices/ +%ghost %dir %{_sysconfdir}/dev.d/ +%ghost %dir %{_sysconfdir}/udev/makedev.d/ %files -n libudev %defattr(0644, root, root, 0755) @@ -341,6 +349,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu May 27 2010 Harald Hoyer 156-2 +- cleaned up start_udev and udev-post initscript +- removed redhat specific rules +- removed all the makedev.d stuff, udevd now natively supports + /lib/udev/devices +- added basic devices in /lib/udev/devices + * Tue May 25 2010 Harald Hoyer 156-1 - version 156 From cb30ef5c02c0514380c306b71749150ca1fc1d5e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 24 Jun 2010 12:01:42 +0000 Subject: [PATCH 560/640] - version 158 --- .cvsignore | 2 +- sources | 2 +- start_udev | 9 - udev-151-3.patch | 89 -- udev-151-gperf.patch | 13 - udev-151-rules.patch | 25 - udev-153-LGPL.patch | 1026 ----------------------- udev-86a7a2f-fix-missing-firmware.patch | 43 - udev.spec | 15 +- 9 files changed, 8 insertions(+), 1216 deletions(-) delete mode 100644 udev-151-3.patch delete mode 100644 udev-151-gperf.patch delete mode 100644 udev-151-rules.patch delete mode 100644 udev-153-LGPL.patch delete mode 100644 udev-86a7a2f-fix-missing-firmware.patch diff --git a/.cvsignore b/.cvsignore index ad65381..f62c5e6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-156.tar.bz2 +udev-158.tar.bz2 diff --git a/sources b/sources index 5c65b78..a75a271 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5efef35990dd20d8bb459eaff36d1f88 udev-156.tar.bz2 +26f99dde11f8e393d659614d7d1a3964 udev-158.tar.bz2 diff --git a/start_udev b/start_udev index 2aa0381..a6e931c 100755 --- a/start_udev +++ b/start_udev @@ -93,8 +93,6 @@ STRING=$"Starting $prog: " # propagate /dev from /sys echo -n "$STRING" -rm -fr /dev/.udev > "/dev/null" 2>&1 - UDEV_OPTS="" cmdline=$(cat /proc/cmdline) @@ -113,13 +111,6 @@ ret=$[$ret + $?] udevtimeout=$(getval udevtimeout $cmdline) -if strstr "$cmdline" udevdebug; then - /sbin/udevadm control --log-priority=debug -fi -if strstr "$cmdline" udevinfo; then - /sbin/udevadm control --log-priority=info -fi - if strstr "$cmdline" modprobedebug; then /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" echo diff --git a/udev-151-3.patch b/udev-151-3.patch deleted file mode 100644 index 3dfcab0..0000000 --- a/udev-151-3.patch +++ /dev/null @@ -1,89 +0,0 @@ -? udev-147 -? udev-147.tar.bz2 -? udev-151 -? udev-151-2.fc13.src.rpm -Index: udev-86a7a2f-fix-missing-firmware.patch -=================================================================== -RCS file: udev-86a7a2f-fix-missing-firmware.patch -diff -N udev-86a7a2f-fix-missing-firmware.patch ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ udev-86a7a2f-fix-missing-firmware.patch 7 Feb 2010 04:22:50 -0000 -@@ -0,0 +1,43 @@ -+From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 -+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= -+Date: Sun, 31 Jan 2010 13:49:02 +0100 -+Subject: firmware: fix error reporting on missing firmware files -+ -+The new firmware loader does not report an error to the kernel if a firmware file -+is missing. This results in modprobe stalling for 60 seconds for each firmware -+a module tries to load. -+--- -+ extras/firmware/firmware.c | 3 ++- -+ 1 files changed, 2 insertions(+), 1 deletions(-) -+ -+diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c -+index 8f70be4..16455de 100644 -+--- a/extras/firmware/firmware.c -++++ b/extras/firmware/firmware.c -+@@ -149,6 +149,7 @@ int main(int argc, char **argv) -+ -+ util_path_encode(firmware, fwencpath, sizeof(fwencpath)); -+ util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL); -++ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); -+ -+ if (fwfile == NULL) { -+ int err; -+@@ -166,6 +167,7 @@ int main(int argc, char **argv) -+ udev_selinux_resetfscreatecon(udev); -+ } while (err == -ENOENT); -+ rc = 2; -++ set_loading(udev, loadpath, "-1"); -+ goto exit; -+ } -+ -+@@ -176,7 +178,6 @@ int main(int argc, char **argv) -+ if (unlink(misspath) == 0) -+ util_delete_path(udev, misspath); -+ -+- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); -+ set_loading(udev, loadpath, "1"); -+ -+ util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); -+-- -+1.6.6 -+ -Index: udev.spec -=================================================================== -RCS file: /cvs/pkgs/rpms/udev/devel/udev.spec,v -retrieving revision 1.300 -diff -u -p -r1.300 udev.spec ---- udev.spec 29 Jan 2010 09:57:03 -0000 1.300 -+++ udev.spec 7 Feb 2010 04:22:50 -0000 -@@ -14,6 +14,7 @@ Obsoletes: udev-extras < 20090618 - Provides: udev-extras = 20090618-1 - Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 - Patch1: udev-151-rules.patch -+Patch2: udev-86a7a2f-fix-missing-firmware.patch - - Source1: start_udev - Source3: udev-post.init -@@ -110,6 +111,7 @@ glib-based applications using libudev fu - %prep - %setup -q - %patch1 -p1 -+%patch2 -p1 - - %build - # get rid of rpath -@@ -356,6 +358,11 @@ rm -rf $RPM_BUILD_ROOT - %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* - - %changelog -+* Sun Feb 07 2010 Kyle McMartin 151-3 -+- udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading -+ microcode (since microcode_intel tries to probe firmware which does -+ not exist. *sigh*) -+ - * Fri Jan 29 2010 Harald Hoyer 151-2 - - fixed rules and startup script (#559844) - diff --git a/udev-151-gperf.patch b/udev-151-gperf.patch deleted file mode 100644 index db93ba7..0000000 --- a/udev-151-gperf.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up udev-151/extras/keymap/keys-from-name.gperf udev-151/extras/keymap/keys-from-name -diff -up udev-151/Makefile.am.gperf udev-151/Makefile.am ---- udev-151/Makefile.am.gperf 2010-03-19 14:04:36.000000000 +0100 -+++ udev-151/Makefile.am 2010-03-19 14:04:52.000000000 +0100 -@@ -550,7 +550,7 @@ extras/keymap/keys-from-name.gperf: extr - $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@ - - extras/keymap/keys-from-name.h: extras/keymap/keys-from-name.gperf Makefile -- $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@ -+ $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C -D < $< > $@ - - extras/keymap/keys-to-name.h: extras/keymap/keys.txt Makefile - $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@ diff --git a/udev-151-rules.patch b/udev-151-rules.patch deleted file mode 100644 index b713f03..0000000 --- a/udev-151-rules.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/rules/redhat/40-redhat.rules b/rules/redhat/40-redhat.rules -index 47ce9e5..aaba82b 100644 ---- a/rules/redhat/40-redhat.rules -+++ b/rules/redhat/40-redhat.rules -@@ -5,11 +5,11 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="flo - - KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result" - --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" -+ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_device", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660" - --ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" -+ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_device", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk" - --BUS=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" -+SUBSYSTEM=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k" - - KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k" - -@@ -25,3 +25,5 @@ KERNEL=="vcsa[0-9]*", OWNER="vcsa", GROUP="tty" - KERNEL=="vcc/*", OWNER="vcsa", GROUP="tty" - - KERNEL=="event*", ATTRS{idVendor}=="03f0", ATTRS{interface}=="Virtual Mouse", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="input/hp_ilo_mouse" -+ -+ACTION=="add", SUBSYSTEM=="cpu", KERNEL=="cpu[0-9]*", ATTR{online}="1" diff --git a/udev-153-LGPL.patch b/udev-153-LGPL.patch deleted file mode 100644 index aab0a10..0000000 --- a/udev-153-LGPL.patch +++ /dev/null @@ -1,1026 +0,0 @@ -commit 23325a66ccf3a2f90a4f5d1702f60408187de28a -Author: Kay Sievers -Date: Thu Mar 18 09:57:44 2010 +0100 - - add LGPL COPYING to libudev and GUdev - -diff --git a/extras/gudev/COPYING b/extras/gudev/COPYING -new file mode 100644 -index 0000000..8add30a ---- /dev/null -+++ b/extras/gudev/COPYING -@@ -0,0 +1,504 @@ -+ GNU LESSER GENERAL PUBLIC LICENSE -+ Version 2.1, February 1999 -+ -+ Copyright (C) 1991, 1999 Free Software Foundation, Inc. -+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+[This is the first released version of the Lesser GPL. It also counts -+ as the successor of the GNU Library Public License, version 2, hence -+ the version number 2.1.] -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+Licenses are intended to guarantee your freedom to share and change -+free software--to make sure the software is free for all its users. -+ -+ This license, the Lesser General Public License, applies to some -+specially designated software packages--typically libraries--of the -+Free Software Foundation and other authors who decide to use it. You -+can use it too, but we suggest you first think carefully about whether -+this license or the ordinary General Public License is the better -+strategy to use in any particular case, based on the explanations below. -+ -+ When we speak of free software, we are referring to freedom of use, -+not price. Our General Public Licenses are designed to make sure that -+you have the freedom to distribute copies of free software (and charge -+for this service if you wish); that you receive source code or can get -+it if you want it; that you can change the software and use pieces of -+it in new free programs; and that you are informed that you can do -+these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+distributors to deny you these rights or to ask you to surrender these -+rights. These restrictions translate to certain responsibilities for -+you if you distribute copies of the library or if you modify it. -+ -+ For example, if you distribute copies of the library, whether gratis -+or for a fee, you must give the recipients all the rights that we gave -+you. You must make sure that they, too, receive or can get the source -+code. If you link other code with the library, you must provide -+complete object files to the recipients, so that they can relink them -+with the library after making changes to the library and recompiling -+it. And you must show them these terms so they know their rights. -+ -+ We protect your rights with a two-step method: (1) we copyright the -+library, and (2) we offer you this license, which gives you legal -+permission to copy, distribute and/or modify the library. -+ -+ To protect each distributor, we want to make it very clear that -+there is no warranty for the free library. Also, if the library is -+modified by someone else and passed on, the recipients should know -+that what they have is not the original version, so that the original -+author's reputation will not be affected by problems that might be -+introduced by others. -+ -+ Finally, software patents pose a constant threat to the existence of -+any free program. We wish to make sure that a company cannot -+effectively restrict the users of a free program by obtaining a -+restrictive license from a patent holder. Therefore, we insist that -+any patent license obtained for a version of the library must be -+consistent with the full freedom of use specified in this license. -+ -+ Most GNU software, including some libraries, is covered by the -+ordinary GNU General Public License. This license, the GNU Lesser -+General Public License, applies to certain designated libraries, and -+is quite different from the ordinary General Public License. We use -+this license for certain libraries in order to permit linking those -+libraries into non-free programs. -+ -+ When a program is linked with a library, whether statically or using -+a shared library, the combination of the two is legally speaking a -+combined work, a derivative of the original library. The ordinary -+General Public License therefore permits such linking only if the -+entire combination fits its criteria of freedom. The Lesser General -+Public License permits more lax criteria for linking other code with -+the library. -+ -+ We call this license the "Lesser" General Public License because it -+does Less to protect the user's freedom than the ordinary General -+Public License. It also provides other free software developers Less -+of an advantage over competing non-free programs. These disadvantages -+are the reason we use the ordinary General Public License for many -+libraries. However, the Lesser license provides advantages in certain -+special circumstances. -+ -+ For example, on rare occasions, there may be a special need to -+encourage the widest possible use of a certain library, so that it becomes -+a de-facto standard. To achieve this, non-free programs must be -+allowed to use the library. A more frequent case is that a free -+library does the same job as widely used non-free libraries. In this -+case, there is little to gain by limiting the free library to free -+software only, so we use the Lesser General Public License. -+ -+ In other cases, permission to use a particular library in non-free -+programs enables a greater number of people to use a large body of -+free software. For example, permission to use the GNU C Library in -+non-free programs enables many more people to use the whole GNU -+operating system, as well as its variant, the GNU/Linux operating -+system. -+ -+ Although the Lesser General Public License is Less protective of the -+users' freedom, it does ensure that the user of a program that is -+linked with the Library has the freedom and the wherewithal to run -+that program using a modified version of the Library. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. Pay close attention to the difference between a -+"work based on the library" and a "work that uses the library". The -+former contains code derived from the library, whereas the latter must -+be combined with the library in order to run. -+ -+ GNU LESSER GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License Agreement applies to any software library or other -+program which contains a notice placed by the copyright holder or -+other authorized party saying it may be distributed under the terms of -+this Lesser General Public License (also called "this License"). -+Each licensee is addressed as "you". -+ -+ A "library" means a collection of software functions and/or data -+prepared so as to be conveniently linked with application programs -+(which use some of those functions and data) to form executables. -+ -+ The "Library", below, refers to any such software library or work -+which has been distributed under these terms. A "work based on the -+Library" means either the Library or any derivative work under -+copyright law: that is to say, a work containing the Library or a -+portion of it, either verbatim or with modifications and/or translated -+straightforwardly into another language. (Hereinafter, translation is -+included without limitation in the term "modification".) -+ -+ "Source code" for a work means the preferred form of the work for -+making modifications to it. For a library, complete source code means -+all the source code for all modules it contains, plus any associated -+interface definition files, plus the scripts used to control compilation -+and installation of the library. -+ -+ Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running a program using the Library is not restricted, and output from -+such a program is covered only if its contents constitute a work based -+on the Library (independent of the use of the Library in a tool for -+writing it). Whether that is true depends on what the Library does -+and what the program that uses the Library does. -+ -+ 1. You may copy and distribute verbatim copies of the Library's -+complete source code as you receive it, in any medium, provided that -+you conspicuously and appropriately publish on each copy an -+appropriate copyright notice and disclaimer of warranty; keep intact -+all the notices that refer to this License and to the absence of any -+warranty; and distribute a copy of this License along with the -+Library. -+ -+ You may charge a fee for the physical act of transferring a copy, -+and you may at your option offer warranty protection in exchange for a -+fee. -+ -+ 2. You may modify your copy or copies of the Library or any portion -+of it, thus forming a work based on the Library, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) The modified work must itself be a software library. -+ -+ b) You must cause the files modified to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ c) You must cause the whole of the work to be licensed at no -+ charge to all third parties under the terms of this License. -+ -+ d) If a facility in the modified Library refers to a function or a -+ table of data to be supplied by an application program that uses -+ the facility, other than as an argument passed when the facility -+ is invoked, then you must make a good faith effort to ensure that, -+ in the event an application does not supply such function or -+ table, the facility still operates, and performs whatever part of -+ its purpose remains meaningful. -+ -+ (For example, a function in a library to compute square roots has -+ a purpose that is entirely well-defined independent of the -+ application. Therefore, Subsection 2d requires that any -+ application-supplied function or table used by this function must -+ be optional: if the application does not supply it, the square -+ root function must still compute square roots.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Library, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Library, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote -+it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Library. -+ -+In addition, mere aggregation of another work not based on the Library -+with the Library (or with a work based on the Library) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may opt to apply the terms of the ordinary GNU General Public -+License instead of this License to a given copy of the Library. To do -+this, you must alter all the notices that refer to this License, so -+that they refer to the ordinary GNU General Public License, version 2, -+instead of to this License. (If a newer version than version 2 of the -+ordinary GNU General Public License has appeared, then you can specify -+that version instead if you wish.) Do not make any other change in -+these notices. -+ -+ Once this change is made in a given copy, it is irreversible for -+that copy, so the ordinary GNU General Public License applies to all -+subsequent copies and derivative works made from that copy. -+ -+ This option is useful when you wish to copy part of the code of -+the Library into a program that is not a library. -+ -+ 4. You may copy and distribute the Library (or a portion or -+derivative of it, under Section 2) in object code or executable form -+under the terms of Sections 1 and 2 above provided that you accompany -+it with the complete corresponding machine-readable source code, which -+must be distributed under the terms of Sections 1 and 2 above on a -+medium customarily used for software interchange. -+ -+ If distribution of object code is made by offering access to copy -+from a designated place, then offering equivalent access to copy the -+source code from the same place satisfies the requirement to -+distribute the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 5. A program that contains no derivative of any portion of the -+Library, but is designed to work with the Library by being compiled or -+linked with it, is called a "work that uses the Library". Such a -+work, in isolation, is not a derivative work of the Library, and -+therefore falls outside the scope of this License. -+ -+ However, linking a "work that uses the Library" with the Library -+creates an executable that is a derivative of the Library (because it -+contains portions of the Library), rather than a "work that uses the -+library". The executable is therefore covered by this License. -+Section 6 states terms for distribution of such executables. -+ -+ When a "work that uses the Library" uses material from a header file -+that is part of the Library, the object code for the work may be a -+derivative work of the Library even though the source code is not. -+Whether this is true is especially significant if the work can be -+linked without the Library, or if the work is itself a library. The -+threshold for this to be true is not precisely defined by law. -+ -+ If such an object file uses only numerical parameters, data -+structure layouts and accessors, and small macros and small inline -+functions (ten lines or less in length), then the use of the object -+file is unrestricted, regardless of whether it is legally a derivative -+work. (Executables containing this object code plus portions of the -+Library will still fall under Section 6.) -+ -+ Otherwise, if the work is a derivative of the Library, you may -+distribute the object code for the work under the terms of Section 6. -+Any executables containing that work also fall under Section 6, -+whether or not they are linked directly with the Library itself. -+ -+ 6. As an exception to the Sections above, you may also combine or -+link a "work that uses the Library" with the Library to produce a -+work containing portions of the Library, and distribute that work -+under terms of your choice, provided that the terms permit -+modification of the work for the customer's own use and reverse -+engineering for debugging such modifications. -+ -+ You must give prominent notice with each copy of the work that the -+Library is used in it and that the Library and its use are covered by -+this License. You must supply a copy of this License. If the work -+during execution displays copyright notices, you must include the -+copyright notice for the Library among them, as well as a reference -+directing the user to the copy of this License. Also, you must do one -+of these things: -+ -+ a) Accompany the work with the complete corresponding -+ machine-readable source code for the Library including whatever -+ changes were used in the work (which must be distributed under -+ Sections 1 and 2 above); and, if the work is an executable linked -+ with the Library, with the complete machine-readable "work that -+ uses the Library", as object code and/or source code, so that the -+ user can modify the Library and then relink to produce a modified -+ executable containing the modified Library. (It is understood -+ that the user who changes the contents of definitions files in the -+ Library will not necessarily be able to recompile the application -+ to use the modified definitions.) -+ -+ b) Use a suitable shared library mechanism for linking with the -+ Library. A suitable mechanism is one that (1) uses at run time a -+ copy of the library already present on the user's computer system, -+ rather than copying library functions into the executable, and (2) -+ will operate properly with a modified version of the library, if -+ the user installs one, as long as the modified version is -+ interface-compatible with the version that the work was made with. -+ -+ c) Accompany the work with a written offer, valid for at -+ least three years, to give the same user the materials -+ specified in Subsection 6a, above, for a charge no more -+ than the cost of performing this distribution. -+ -+ d) If distribution of the work is made by offering access to copy -+ from a designated place, offer equivalent access to copy the above -+ specified materials from the same place. -+ -+ e) Verify that the user has already received a copy of these -+ materials or that you have already sent this user a copy. -+ -+ For an executable, the required form of the "work that uses the -+Library" must include any data and utility programs needed for -+reproducing the executable from it. However, as a special exception, -+the materials to be distributed need not include anything that is -+normally distributed (in either source or binary form) with the major -+components (compiler, kernel, and so on) of the operating system on -+which the executable runs, unless that component itself accompanies -+the executable. -+ -+ It may happen that this requirement contradicts the license -+restrictions of other proprietary libraries that do not normally -+accompany the operating system. Such a contradiction means you cannot -+use both them and the Library together in an executable that you -+distribute. -+ -+ 7. You may place library facilities that are a work based on the -+Library side-by-side in a single library together with other library -+facilities not covered by this License, and distribute such a combined -+library, provided that the separate distribution of the work based on -+the Library and of the other library facilities is otherwise -+permitted, and provided that you do these two things: -+ -+ a) Accompany the combined library with a copy of the same work -+ based on the Library, uncombined with any other library -+ facilities. This must be distributed under the terms of the -+ Sections above. -+ -+ b) Give prominent notice with the combined library of the fact -+ that part of it is a work based on the Library, and explaining -+ where to find the accompanying uncombined form of the same work. -+ -+ 8. You may not copy, modify, sublicense, link with, or distribute -+the Library except as expressly provided under this License. Any -+attempt otherwise to copy, modify, sublicense, link with, or -+distribute the Library is void, and will automatically terminate your -+rights under this License. However, parties who have received copies, -+or rights, from you under this License will not have their licenses -+terminated so long as such parties remain in full compliance. -+ -+ 9. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Library or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Library (or any work based on the -+Library), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Library or works based on it. -+ -+ 10. Each time you redistribute the Library (or any work based on the -+Library), the recipient automatically receives a license from the -+original licensor to copy, distribute, link with or modify the Library -+subject to these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties with -+this License. -+ -+ 11. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Library at all. For example, if a patent -+license would not permit royalty-free redistribution of the Library by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Library. -+ -+If any portion of this section is held invalid or unenforceable under any -+particular circumstance, the balance of the section is intended to apply, -+and the section as a whole is intended to apply in other circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 12. If the distribution and/or use of the Library is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Library under this License may add -+an explicit geographical distribution limitation excluding those countries, -+so that distribution is permitted only in or among countries not thus -+excluded. In such case, this License incorporates the limitation as if -+written in the body of this License. -+ -+ 13. The Free Software Foundation may publish revised and/or new -+versions of the Lesser General Public License from time to time. -+Such new versions will be similar in spirit to the present version, -+but may differ in detail to address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Library -+specifies a version number of this License which applies to it and -+"any later version", you have the option of following the terms and -+conditions either of that version or of any later version published by -+the Free Software Foundation. If the Library does not specify a -+license version number, you may choose any version ever published by -+the Free Software Foundation. -+ -+ 14. If you wish to incorporate parts of the Library into other free -+programs whose distribution conditions are incompatible with these, -+write to the author to ask for permission. For software which is -+copyrighted by the Free Software Foundation, write to the Free -+Software Foundation; we sometimes make exceptions for this. Our -+decision will be guided by the two goals of preserving the free status -+of all derivatives of our free software and of promoting the sharing -+and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -+ -+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -+DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ How to Apply These Terms to Your New Libraries -+ -+ If you develop a new library, and you want it to be of the greatest -+possible use to the public, we recommend making it free software that -+everyone can redistribute and change. You can do so by permitting -+redistribution under these terms (or, alternatively, under the terms of the -+ordinary General Public License). -+ -+ To apply these terms, attach the following notices to the library. It is -+safest to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least the -+"copyright" line and a pointer to where the full notice is found. -+ -+ -+ Copyright (C) -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ This library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the library, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the -+ library `Frob' (a library for tweaking knobs) written by James Random Hacker. -+ -+ , 1 April 1990 -+ Ty Coon, President of Vice -+ -+That's all there is to it! -+ -+ -diff --git a/libudev/COPYING b/libudev/COPYING -new file mode 100644 -index 0000000..8add30a ---- /dev/null -+++ b/libudev/COPYING -@@ -0,0 +1,504 @@ -+ GNU LESSER GENERAL PUBLIC LICENSE -+ Version 2.1, February 1999 -+ -+ Copyright (C) 1991, 1999 Free Software Foundation, Inc. -+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+[This is the first released version of the Lesser GPL. It also counts -+ as the successor of the GNU Library Public License, version 2, hence -+ the version number 2.1.] -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+Licenses are intended to guarantee your freedom to share and change -+free software--to make sure the software is free for all its users. -+ -+ This license, the Lesser General Public License, applies to some -+specially designated software packages--typically libraries--of the -+Free Software Foundation and other authors who decide to use it. You -+can use it too, but we suggest you first think carefully about whether -+this license or the ordinary General Public License is the better -+strategy to use in any particular case, based on the explanations below. -+ -+ When we speak of free software, we are referring to freedom of use, -+not price. Our General Public Licenses are designed to make sure that -+you have the freedom to distribute copies of free software (and charge -+for this service if you wish); that you receive source code or can get -+it if you want it; that you can change the software and use pieces of -+it in new free programs; and that you are informed that you can do -+these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+distributors to deny you these rights or to ask you to surrender these -+rights. These restrictions translate to certain responsibilities for -+you if you distribute copies of the library or if you modify it. -+ -+ For example, if you distribute copies of the library, whether gratis -+or for a fee, you must give the recipients all the rights that we gave -+you. You must make sure that they, too, receive or can get the source -+code. If you link other code with the library, you must provide -+complete object files to the recipients, so that they can relink them -+with the library after making changes to the library and recompiling -+it. And you must show them these terms so they know their rights. -+ -+ We protect your rights with a two-step method: (1) we copyright the -+library, and (2) we offer you this license, which gives you legal -+permission to copy, distribute and/or modify the library. -+ -+ To protect each distributor, we want to make it very clear that -+there is no warranty for the free library. Also, if the library is -+modified by someone else and passed on, the recipients should know -+that what they have is not the original version, so that the original -+author's reputation will not be affected by problems that might be -+introduced by others. -+ -+ Finally, software patents pose a constant threat to the existence of -+any free program. We wish to make sure that a company cannot -+effectively restrict the users of a free program by obtaining a -+restrictive license from a patent holder. Therefore, we insist that -+any patent license obtained for a version of the library must be -+consistent with the full freedom of use specified in this license. -+ -+ Most GNU software, including some libraries, is covered by the -+ordinary GNU General Public License. This license, the GNU Lesser -+General Public License, applies to certain designated libraries, and -+is quite different from the ordinary General Public License. We use -+this license for certain libraries in order to permit linking those -+libraries into non-free programs. -+ -+ When a program is linked with a library, whether statically or using -+a shared library, the combination of the two is legally speaking a -+combined work, a derivative of the original library. The ordinary -+General Public License therefore permits such linking only if the -+entire combination fits its criteria of freedom. The Lesser General -+Public License permits more lax criteria for linking other code with -+the library. -+ -+ We call this license the "Lesser" General Public License because it -+does Less to protect the user's freedom than the ordinary General -+Public License. It also provides other free software developers Less -+of an advantage over competing non-free programs. These disadvantages -+are the reason we use the ordinary General Public License for many -+libraries. However, the Lesser license provides advantages in certain -+special circumstances. -+ -+ For example, on rare occasions, there may be a special need to -+encourage the widest possible use of a certain library, so that it becomes -+a de-facto standard. To achieve this, non-free programs must be -+allowed to use the library. A more frequent case is that a free -+library does the same job as widely used non-free libraries. In this -+case, there is little to gain by limiting the free library to free -+software only, so we use the Lesser General Public License. -+ -+ In other cases, permission to use a particular library in non-free -+programs enables a greater number of people to use a large body of -+free software. For example, permission to use the GNU C Library in -+non-free programs enables many more people to use the whole GNU -+operating system, as well as its variant, the GNU/Linux operating -+system. -+ -+ Although the Lesser General Public License is Less protective of the -+users' freedom, it does ensure that the user of a program that is -+linked with the Library has the freedom and the wherewithal to run -+that program using a modified version of the Library. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. Pay close attention to the difference between a -+"work based on the library" and a "work that uses the library". The -+former contains code derived from the library, whereas the latter must -+be combined with the library in order to run. -+ -+ GNU LESSER GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License Agreement applies to any software library or other -+program which contains a notice placed by the copyright holder or -+other authorized party saying it may be distributed under the terms of -+this Lesser General Public License (also called "this License"). -+Each licensee is addressed as "you". -+ -+ A "library" means a collection of software functions and/or data -+prepared so as to be conveniently linked with application programs -+(which use some of those functions and data) to form executables. -+ -+ The "Library", below, refers to any such software library or work -+which has been distributed under these terms. A "work based on the -+Library" means either the Library or any derivative work under -+copyright law: that is to say, a work containing the Library or a -+portion of it, either verbatim or with modifications and/or translated -+straightforwardly into another language. (Hereinafter, translation is -+included without limitation in the term "modification".) -+ -+ "Source code" for a work means the preferred form of the work for -+making modifications to it. For a library, complete source code means -+all the source code for all modules it contains, plus any associated -+interface definition files, plus the scripts used to control compilation -+and installation of the library. -+ -+ Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running a program using the Library is not restricted, and output from -+such a program is covered only if its contents constitute a work based -+on the Library (independent of the use of the Library in a tool for -+writing it). Whether that is true depends on what the Library does -+and what the program that uses the Library does. -+ -+ 1. You may copy and distribute verbatim copies of the Library's -+complete source code as you receive it, in any medium, provided that -+you conspicuously and appropriately publish on each copy an -+appropriate copyright notice and disclaimer of warranty; keep intact -+all the notices that refer to this License and to the absence of any -+warranty; and distribute a copy of this License along with the -+Library. -+ -+ You may charge a fee for the physical act of transferring a copy, -+and you may at your option offer warranty protection in exchange for a -+fee. -+ -+ 2. You may modify your copy or copies of the Library or any portion -+of it, thus forming a work based on the Library, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) The modified work must itself be a software library. -+ -+ b) You must cause the files modified to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ c) You must cause the whole of the work to be licensed at no -+ charge to all third parties under the terms of this License. -+ -+ d) If a facility in the modified Library refers to a function or a -+ table of data to be supplied by an application program that uses -+ the facility, other than as an argument passed when the facility -+ is invoked, then you must make a good faith effort to ensure that, -+ in the event an application does not supply such function or -+ table, the facility still operates, and performs whatever part of -+ its purpose remains meaningful. -+ -+ (For example, a function in a library to compute square roots has -+ a purpose that is entirely well-defined independent of the -+ application. Therefore, Subsection 2d requires that any -+ application-supplied function or table used by this function must -+ be optional: if the application does not supply it, the square -+ root function must still compute square roots.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Library, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Library, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote -+it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Library. -+ -+In addition, mere aggregation of another work not based on the Library -+with the Library (or with a work based on the Library) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may opt to apply the terms of the ordinary GNU General Public -+License instead of this License to a given copy of the Library. To do -+this, you must alter all the notices that refer to this License, so -+that they refer to the ordinary GNU General Public License, version 2, -+instead of to this License. (If a newer version than version 2 of the -+ordinary GNU General Public License has appeared, then you can specify -+that version instead if you wish.) Do not make any other change in -+these notices. -+ -+ Once this change is made in a given copy, it is irreversible for -+that copy, so the ordinary GNU General Public License applies to all -+subsequent copies and derivative works made from that copy. -+ -+ This option is useful when you wish to copy part of the code of -+the Library into a program that is not a library. -+ -+ 4. You may copy and distribute the Library (or a portion or -+derivative of it, under Section 2) in object code or executable form -+under the terms of Sections 1 and 2 above provided that you accompany -+it with the complete corresponding machine-readable source code, which -+must be distributed under the terms of Sections 1 and 2 above on a -+medium customarily used for software interchange. -+ -+ If distribution of object code is made by offering access to copy -+from a designated place, then offering equivalent access to copy the -+source code from the same place satisfies the requirement to -+distribute the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 5. A program that contains no derivative of any portion of the -+Library, but is designed to work with the Library by being compiled or -+linked with it, is called a "work that uses the Library". Such a -+work, in isolation, is not a derivative work of the Library, and -+therefore falls outside the scope of this License. -+ -+ However, linking a "work that uses the Library" with the Library -+creates an executable that is a derivative of the Library (because it -+contains portions of the Library), rather than a "work that uses the -+library". The executable is therefore covered by this License. -+Section 6 states terms for distribution of such executables. -+ -+ When a "work that uses the Library" uses material from a header file -+that is part of the Library, the object code for the work may be a -+derivative work of the Library even though the source code is not. -+Whether this is true is especially significant if the work can be -+linked without the Library, or if the work is itself a library. The -+threshold for this to be true is not precisely defined by law. -+ -+ If such an object file uses only numerical parameters, data -+structure layouts and accessors, and small macros and small inline -+functions (ten lines or less in length), then the use of the object -+file is unrestricted, regardless of whether it is legally a derivative -+work. (Executables containing this object code plus portions of the -+Library will still fall under Section 6.) -+ -+ Otherwise, if the work is a derivative of the Library, you may -+distribute the object code for the work under the terms of Section 6. -+Any executables containing that work also fall under Section 6, -+whether or not they are linked directly with the Library itself. -+ -+ 6. As an exception to the Sections above, you may also combine or -+link a "work that uses the Library" with the Library to produce a -+work containing portions of the Library, and distribute that work -+under terms of your choice, provided that the terms permit -+modification of the work for the customer's own use and reverse -+engineering for debugging such modifications. -+ -+ You must give prominent notice with each copy of the work that the -+Library is used in it and that the Library and its use are covered by -+this License. You must supply a copy of this License. If the work -+during execution displays copyright notices, you must include the -+copyright notice for the Library among them, as well as a reference -+directing the user to the copy of this License. Also, you must do one -+of these things: -+ -+ a) Accompany the work with the complete corresponding -+ machine-readable source code for the Library including whatever -+ changes were used in the work (which must be distributed under -+ Sections 1 and 2 above); and, if the work is an executable linked -+ with the Library, with the complete machine-readable "work that -+ uses the Library", as object code and/or source code, so that the -+ user can modify the Library and then relink to produce a modified -+ executable containing the modified Library. (It is understood -+ that the user who changes the contents of definitions files in the -+ Library will not necessarily be able to recompile the application -+ to use the modified definitions.) -+ -+ b) Use a suitable shared library mechanism for linking with the -+ Library. A suitable mechanism is one that (1) uses at run time a -+ copy of the library already present on the user's computer system, -+ rather than copying library functions into the executable, and (2) -+ will operate properly with a modified version of the library, if -+ the user installs one, as long as the modified version is -+ interface-compatible with the version that the work was made with. -+ -+ c) Accompany the work with a written offer, valid for at -+ least three years, to give the same user the materials -+ specified in Subsection 6a, above, for a charge no more -+ than the cost of performing this distribution. -+ -+ d) If distribution of the work is made by offering access to copy -+ from a designated place, offer equivalent access to copy the above -+ specified materials from the same place. -+ -+ e) Verify that the user has already received a copy of these -+ materials or that you have already sent this user a copy. -+ -+ For an executable, the required form of the "work that uses the -+Library" must include any data and utility programs needed for -+reproducing the executable from it. However, as a special exception, -+the materials to be distributed need not include anything that is -+normally distributed (in either source or binary form) with the major -+components (compiler, kernel, and so on) of the operating system on -+which the executable runs, unless that component itself accompanies -+the executable. -+ -+ It may happen that this requirement contradicts the license -+restrictions of other proprietary libraries that do not normally -+accompany the operating system. Such a contradiction means you cannot -+use both them and the Library together in an executable that you -+distribute. -+ -+ 7. You may place library facilities that are a work based on the -+Library side-by-side in a single library together with other library -+facilities not covered by this License, and distribute such a combined -+library, provided that the separate distribution of the work based on -+the Library and of the other library facilities is otherwise -+permitted, and provided that you do these two things: -+ -+ a) Accompany the combined library with a copy of the same work -+ based on the Library, uncombined with any other library -+ facilities. This must be distributed under the terms of the -+ Sections above. -+ -+ b) Give prominent notice with the combined library of the fact -+ that part of it is a work based on the Library, and explaining -+ where to find the accompanying uncombined form of the same work. -+ -+ 8. You may not copy, modify, sublicense, link with, or distribute -+the Library except as expressly provided under this License. Any -+attempt otherwise to copy, modify, sublicense, link with, or -+distribute the Library is void, and will automatically terminate your -+rights under this License. However, parties who have received copies, -+or rights, from you under this License will not have their licenses -+terminated so long as such parties remain in full compliance. -+ -+ 9. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Library or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Library (or any work based on the -+Library), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Library or works based on it. -+ -+ 10. Each time you redistribute the Library (or any work based on the -+Library), the recipient automatically receives a license from the -+original licensor to copy, distribute, link with or modify the Library -+subject to these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties with -+this License. -+ -+ 11. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Library at all. For example, if a patent -+license would not permit royalty-free redistribution of the Library by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Library. -+ -+If any portion of this section is held invalid or unenforceable under any -+particular circumstance, the balance of the section is intended to apply, -+and the section as a whole is intended to apply in other circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 12. If the distribution and/or use of the Library is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Library under this License may add -+an explicit geographical distribution limitation excluding those countries, -+so that distribution is permitted only in or among countries not thus -+excluded. In such case, this License incorporates the limitation as if -+written in the body of this License. -+ -+ 13. The Free Software Foundation may publish revised and/or new -+versions of the Lesser General Public License from time to time. -+Such new versions will be similar in spirit to the present version, -+but may differ in detail to address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Library -+specifies a version number of this License which applies to it and -+"any later version", you have the option of following the terms and -+conditions either of that version or of any later version published by -+the Free Software Foundation. If the Library does not specify a -+license version number, you may choose any version ever published by -+the Free Software Foundation. -+ -+ 14. If you wish to incorporate parts of the Library into other free -+programs whose distribution conditions are incompatible with these, -+write to the author to ask for permission. For software which is -+copyrighted by the Free Software Foundation, write to the Free -+Software Foundation; we sometimes make exceptions for this. Our -+decision will be guided by the two goals of preserving the free status -+of all derivatives of our free software and of promoting the sharing -+and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -+ -+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -+DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ How to Apply These Terms to Your New Libraries -+ -+ If you develop a new library, and you want it to be of the greatest -+possible use to the public, we recommend making it free software that -+everyone can redistribute and change. You can do so by permitting -+redistribution under these terms (or, alternatively, under the terms of the -+ordinary General Public License). -+ -+ To apply these terms, attach the following notices to the library. It is -+safest to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least the -+"copyright" line and a pointer to where the full notice is found. -+ -+ -+ Copyright (C) -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ This library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the library, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the -+ library `Frob' (a library for tweaking knobs) written by James Random Hacker. -+ -+ , 1 April 1990 -+ Ty Coon, President of Vice -+ -+That's all there is to it! -+ -+ diff --git a/udev-86a7a2f-fix-missing-firmware.patch b/udev-86a7a2f-fix-missing-firmware.patch deleted file mode 100644 index 0213bdf..0000000 --- a/udev-86a7a2f-fix-missing-firmware.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 86a7a2f853fe6022c5b0c1b415918047b65533be Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20B=C3=A4chler?= -Date: Sun, 31 Jan 2010 13:49:02 +0100 -Subject: firmware: fix error reporting on missing firmware files - -The new firmware loader does not report an error to the kernel if a firmware file -is missing. This results in modprobe stalling for 60 seconds for each firmware -a module tries to load. ---- - extras/firmware/firmware.c | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c -index 8f70be4..16455de 100644 ---- a/extras/firmware/firmware.c -+++ b/extras/firmware/firmware.c -@@ -149,6 +149,7 @@ int main(int argc, char **argv) - - util_path_encode(firmware, fwencpath, sizeof(fwencpath)); - util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL); -+ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); - - if (fwfile == NULL) { - int err; -@@ -166,6 +167,7 @@ int main(int argc, char **argv) - udev_selinux_resetfscreatecon(udev); - } while (err == -ENOENT); - rc = 2; -+ set_loading(udev, loadpath, "-1"); - goto exit; - } - -@@ -176,7 +178,6 @@ int main(int argc, char **argv) - if (unlink(misspath) == 0) - util_delete_path(udev, misspath); - -- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL); - set_loading(udev, loadpath, "1"); - - util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL); --- -1.6.6 - diff --git a/udev.spec b/udev.spec index d8c5129..272bb00 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A userspace implementation of devfs Name: udev -Version: 156 -Release: 2%{?dist} +Version: 158 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,9 +14,6 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Patch101: udev-151-rules.patch -#Patch103: udev-151-gperf.patch - Source1: start_udev Source3: udev-post.init Source4: fw_unit_symlinks.sh @@ -112,10 +109,6 @@ glib-based applications using libudev functionality. %prep %setup -q - -%patch101 -p1 -#%patch103 -p1 - %build libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ @@ -258,6 +251,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/fstab_import %attr(0755,root,root) %{udev_scriptdir}/input_id %attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh +%attr(0755,root,root) %{udev_scriptdir}/mtd_probe %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post @@ -349,6 +343,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Jun 24 2010 Harald Hoyer 158-1 +- version 158 + * Thu May 27 2010 Harald Hoyer 156-2 - cleaned up start_udev and udev-post initscript - removed redhat specific rules From fda0e26b466f3b5fda02103e6d320ceb1eccc8f8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 25 Jun 2010 13:33:19 +0000 Subject: [PATCH 561/640] - moved udev pkgconfig to base file on authors request - specfile cleanups --- 0001-version-bump.patch | 35 +++ 0002-add-systemd-service-files.patch | 76 +++++ ...-and-install-systemd-service-files-w.patch | 230 ++++++++++++++ 0004-make-fix-make-distcheck.patch | 27 ++ ...ft-over-from-GPLv2-to-GPLv2-or-later.patch | 296 ++++++++++++++++++ 0006-path_id-add-handle_scsi_sas.patch | 88 ++++++ fw_unit_symlinks.sh | 25 -- start_udev | 80 +---- udev-151-virtio.patch | 30 -- ...-156.tar.bz2.sign => udev-158.tar.bz2.sign | 6 +- udev.spec | 55 ++-- 11 files changed, 790 insertions(+), 158 deletions(-) create mode 100644 0001-version-bump.patch create mode 100644 0002-add-systemd-service-files.patch create mode 100644 0003-make-pre-process-and-install-systemd-service-files-w.patch create mode 100644 0004-make-fix-make-distcheck.patch create mode 100644 0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch create mode 100644 0006-path_id-add-handle_scsi_sas.patch delete mode 100644 fw_unit_symlinks.sh delete mode 100644 udev-151-virtio.patch rename udev-156.tar.bz2.sign => udev-158.tar.bz2.sign (61%) diff --git a/0001-version-bump.patch b/0001-version-bump.patch new file mode 100644 index 0000000..4917fbd --- /dev/null +++ b/0001-version-bump.patch @@ -0,0 +1,35 @@ +From cbcb846a4c9c9b8215a3f484d70e3cefde5ba226 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 24 Jun 2010 10:17:15 +0200 +Subject: [PATCH 1/6] version bump + +--- + NEWS | 4 ++++ + configure.ac | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/NEWS b/NEWS +index 002ecba..88dc34d 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,7 @@ ++udev 159 ++======== ++Bugfixes. ++ + udev 158 + ======== + Bugfixes. +diff --git a/configure.ac b/configure.ac +index 7e9b1f8..4bac653 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,4 +1,4 @@ +-AC_INIT([udev], [158], [linux-hotplug@vger.kernel.org]) ++AC_INIT([udev], [159], [linux-hotplug@vger.kernel.org]) + AC_PREREQ(2.60) + AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +-- +1.7.0.1 + diff --git a/0002-add-systemd-service-files.patch b/0002-add-systemd-service-files.patch new file mode 100644 index 0000000..dc6ea1a --- /dev/null +++ b/0002-add-systemd-service-files.patch @@ -0,0 +1,76 @@ +From 43fefbf6f1c528947a77643582bcc34cf3538b2d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 25 Jun 2010 01:31:57 +0200 +Subject: [PATCH 2/6] add systemd service files + +--- + init/udev-retry.service | 13 +++++++++++++ + init/udev-settle.service | 13 +++++++++++++ + init/udev.service | 15 +++++++++++++++ + 3 files changed, 41 insertions(+), 0 deletions(-) + create mode 100644 init/udev-retry.service + create mode 100644 init/udev-settle.service + create mode 100644 init/udev.service + +diff --git a/init/udev-retry.service b/init/udev-retry.service +new file mode 100644 +index 0000000..0792875 +--- /dev/null ++++ b/init/udev-retry.service +@@ -0,0 +1,13 @@ ++[Unit] ++Description=re-trigger failed events after filesystems are available ++After=local-fs.target ++ ++[Service] ++Type=finish ++ValidNoProcess=yes ++ExecStart=/sbin/udevadm trigger --type=failed ++ ++[Install] ++WantedBy=sysinit.target ++Also=udev.service ++Also=udev-settle.service +diff --git a/init/udev-settle.service b/init/udev-settle.service +new file mode 100644 +index 0000000..3c73a96 +--- /dev/null ++++ b/init/udev-settle.service +@@ -0,0 +1,13 @@ ++[Unit] ++Description=wait until full initialization ++After=udev.service ++ ++[Service] ++Type=finish ++ValidNoProcess=yes ++ExecStart=/sbin/udevadm settle ++ ++[Install] ++WantedBy=sysinit.target ++Also=udev.service ++Also=udev-retry.service +diff --git a/init/udev.service b/init/udev.service +new file mode 100644 +index 0000000..f6824a2 +--- /dev/null ++++ b/init/udev.service +@@ -0,0 +1,15 @@ ++[Unit] ++Description=/dev and kernel device manager ++Before=sysinit.target ++ ++[Service] ++Type=notify ++ExecStart=/sbin/udevd ++ExecStartPost=/sbin/udevadm trigger --type=subsystems --action=add ++ExecStartPost=/sbin/udevadm trigger --type=devices --action=add ++ ++[Install] ++WantedBy=sysinit.target ++Also=udev-settle.service ++Also=udev-retry.service ++ +-- +1.7.0.1 + diff --git a/0003-make-pre-process-and-install-systemd-service-files-w.patch b/0003-make-pre-process-and-install-systemd-service-files-w.patch new file mode 100644 index 0000000..b7c9383 --- /dev/null +++ b/0003-make-pre-process-and-install-systemd-service-files-w.patch @@ -0,0 +1,230 @@ +From 08b4c88353b48302ae94088b55b2066ad01c63f8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 25 Jun 2010 10:30:55 +0200 +Subject: [PATCH 3/6] make: pre-process and install systemd service files when needed + +--- + Makefile.am | 7 +++++++ + configure.ac | 16 +++++++++++++--- + extras/mtd_probe/.gitignore | 1 + + init/.gitignore | 1 + + init/udev-retry.service | 13 ------------- + init/udev-retry.service.in | 13 +++++++++++++ + init/udev-settle.service | 13 ------------- + init/udev-settle.service.in | 13 +++++++++++++ + init/udev.service | 15 --------------- + init/udev.service.in | 15 +++++++++++++++ + 10 files changed, 63 insertions(+), 44 deletions(-) + create mode 100644 extras/mtd_probe/.gitignore + create mode 100644 init/.gitignore + delete mode 100644 init/udev-retry.service + create mode 100644 init/udev-retry.service.in + delete mode 100644 init/udev-settle.service + create mode 100644 init/udev-settle.service.in + delete mode 100644 init/udev.service + create mode 100644 init/udev.service.in + +diff --git a/Makefile.am b/Makefile.am +index 1916770..198c06c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -114,6 +114,13 @@ dist_udevconf_DATA = udev.conf + sharepkgconfigdir = $(datadir)/pkgconfig + sharepkgconfig_DATA = udev/udev.pc + ++if WITH_SYSTEMD ++systemdsystemunit_DATA = \ ++ init/udev.service \ ++ init/udev-settle.service \ ++ init/udev-retry.service ++endif ++ + sbin_PROGRAMS = \ + udev/udevd \ + udev/udevadm +diff --git a/configure.ac b/configure.ac +index 4bac653..255ee18 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,8 +49,7 @@ fi + AC_ARG_WITH(firmware-path, + AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], + [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), +- [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"] +- ) ++ [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"]) + OLD_IFS=$IFS + IFS=: + for i in $with_firmware_path +@@ -64,6 +63,12 @@ done + IFS=$OLD_IFS + AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) + ++AC_ARG_WITH([systemdsystemunitdir], ++ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), ++ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) ++AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ++AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir"]) ++ + AC_ARG_ENABLE([extras], + AS_HELP_STRING([--disable-extras], [disable extras with external dependencies]), + [], [enable_extras=yes]) +@@ -126,10 +131,13 @@ AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes]) + AC_CONFIG_HEADERS(config.h) + AC_CONFIG_FILES([ + Makefile ++ udev/udev.pc ++ init/udev.service ++ init/udev-settle.service ++ init/udev-retry.service + libudev/libudev.pc + libudev/docs/Makefile + libudev/docs/version.xml +- udev/udev.pc + extras/gudev/gudev-1.0.pc + extras/gudev/docs/Makefile + extras/gudev/docs/version.xml +@@ -153,6 +161,8 @@ AC_MSG_RESULT([ + + include_prefix: ${INCLUDE_PREFIX} + ++ systemdsystemunitdir: ${systemdsystemunitdir} ++ + logging: ${enable_logging} + debug: ${enable_debug} + selinux: ${with_selinux} +diff --git a/extras/mtd_probe/.gitignore b/extras/mtd_probe/.gitignore +new file mode 100644 +index 0000000..82b8ab5 +--- /dev/null ++++ b/extras/mtd_probe/.gitignore +@@ -0,0 +1 @@ ++mtd_probe +diff --git a/init/.gitignore b/init/.gitignore +new file mode 100644 +index 0000000..904e445 +--- /dev/null ++++ b/init/.gitignore +@@ -0,0 +1 @@ ++udev*.service +diff --git a/init/udev-retry.service b/init/udev-retry.service +deleted file mode 100644 +index 0792875..0000000 +--- a/init/udev-retry.service ++++ /dev/null +@@ -1,13 +0,0 @@ +-[Unit] +-Description=re-trigger failed events after filesystems are available +-After=local-fs.target +- +-[Service] +-Type=finish +-ValidNoProcess=yes +-ExecStart=/sbin/udevadm trigger --type=failed +- +-[Install] +-WantedBy=sysinit.target +-Also=udev.service +-Also=udev-settle.service +diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in +new file mode 100644 +index 0000000..b7d5320 +--- /dev/null ++++ b/init/udev-retry.service.in +@@ -0,0 +1,13 @@ ++[Unit] ++Description=re-trigger failed events after filesystems are available ++After=local-fs.target ++ ++[Service] ++Type=finish ++ValidNoProcess=yes ++ExecStart=@sbindir@/udevadm trigger --type=failed ++ ++[Install] ++WantedBy=sysinit.target ++Also=udev.service ++Also=udev-settle.service +diff --git a/init/udev-settle.service b/init/udev-settle.service +deleted file mode 100644 +index 3c73a96..0000000 +--- a/init/udev-settle.service ++++ /dev/null +@@ -1,13 +0,0 @@ +-[Unit] +-Description=wait until full initialization +-After=udev.service +- +-[Service] +-Type=finish +-ValidNoProcess=yes +-ExecStart=/sbin/udevadm settle +- +-[Install] +-WantedBy=sysinit.target +-Also=udev.service +-Also=udev-retry.service +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +new file mode 100644 +index 0000000..d13beae +--- /dev/null ++++ b/init/udev-settle.service.in +@@ -0,0 +1,13 @@ ++[Unit] ++Description=wait until full initialization ++After=udev.service ++ ++[Service] ++Type=finish ++ValidNoProcess=yes ++ExecStart=@sbindir@/udevadm settle ++ ++[Install] ++WantedBy=sysinit.target ++Also=udev.service ++Also=udev-retry.service +diff --git a/init/udev.service b/init/udev.service +deleted file mode 100644 +index f6824a2..0000000 +--- a/init/udev.service ++++ /dev/null +@@ -1,15 +0,0 @@ +-[Unit] +-Description=/dev and kernel device manager +-Before=sysinit.target +- +-[Service] +-Type=notify +-ExecStart=/sbin/udevd +-ExecStartPost=/sbin/udevadm trigger --type=subsystems --action=add +-ExecStartPost=/sbin/udevadm trigger --type=devices --action=add +- +-[Install] +-WantedBy=sysinit.target +-Also=udev-settle.service +-Also=udev-retry.service +- +diff --git a/init/udev.service.in b/init/udev.service.in +new file mode 100644 +index 0000000..a54626d +--- /dev/null ++++ b/init/udev.service.in +@@ -0,0 +1,15 @@ ++[Unit] ++Description=/dev and kernel device manager ++Before=sysinit.target ++ ++[Service] ++Type=notify ++ExecStart=@sbindir@/udevd ++ExecStartPost=@sbindir@/udevadm trigger --type=subsystems --action=add ++ExecStartPost=@sbindir@/udevadm trigger --type=devices --action=add ++ ++[Install] ++WantedBy=sysinit.target ++Also=udev-settle.service ++Also=udev-retry.service ++ +-- +1.7.0.1 + diff --git a/0004-make-fix-make-distcheck.patch b/0004-make-fix-make-distcheck.patch new file mode 100644 index 0000000..91bc78d --- /dev/null +++ b/0004-make-fix-make-distcheck.patch @@ -0,0 +1,27 @@ +From f0565500f499cbc5503edebcacd98f305099df86 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 25 Jun 2010 10:42:33 +0200 +Subject: [PATCH 4/6] make: fix 'make distcheck' + udev-159.tar.gz + +--- + Makefile.am | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 198c06c..8515e14 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -21,7 +21,8 @@ AM_LDFLAGS = \ + -Wl,--as-needed + + DISTCHECK_CONFIGURE_FLAGS = \ +- --enable-gtk-doc ++ --enable-gtk-doc \ ++ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + + CLEANFILES = + +-- +1.7.0.1 + diff --git a/0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch b/0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch new file mode 100644 index 0000000..0929831 --- /dev/null +++ b/0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch @@ -0,0 +1,296 @@ +From 8b5651bb009bf892b3a5537c5f36b8891f238aa4 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 25 Jun 2010 11:39:21 +0200 +Subject: [PATCH 5/6] switch a few left-over from GPLv2 to GPLv2 or later + +--- + extras/edd_id/edd_id.c | 15 +++++++++++-- + extras/floppy/create_floppy_devices.c | 20 ++++++++++++------ + extras/rule_generator/rule_generator.functions | 20 ++++++++++++++++-- + extras/rule_generator/write_cd_rules | 17 ++++++++++++--- + extras/rule_generator/write_net_rules | 25 ++++++++++++++++------- + extras/scsi_id/scsi_id.c | 16 ++++++++++---- + extras/scsi_id/scsi_id.h | 15 +++++++++++-- + extras/scsi_id/scsi_serial.c | 18 ++++++++++++---- + extras/usb_id/usb_id.c | 18 ++++++++++++---- + 9 files changed, 121 insertions(+), 43 deletions(-) + +diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c +index 15295ed..ac4da07 100644 +--- a/extras/edd_id/edd_id.c ++++ b/extras/edd_id/edd_id.c +@@ -4,9 +4,18 @@ + * Copyright (C) 2005 John Hull + * Copyright (C) 2005 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 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, either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + + #ifndef _GNU_SOURCE +diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c +index 2fc05cc..47724f8 100644 +--- a/extras/floppy/create_floppy_devices.c ++++ b/extras/floppy/create_floppy_devices.c +@@ -1,17 +1,23 @@ + /* +- * create_floppy_devices +- * + * Create all possible floppy device based on the CMOS type. + * Based upon code from drivers/block/floppy.c + * + * Copyright(C) 2005, SUSE Linux Products GmbH + * +- * Author: +- * Hannes Reinecke ++ * Author: Hannes Reinecke ++ * ++ * 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, either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. + * +- * 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. ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + + #include +diff --git a/extras/rule_generator/rule_generator.functions b/extras/rule_generator/rule_generator.functions +index b972091..e2060a2 100644 +--- a/extras/rule_generator/rule_generator.functions ++++ b/extras/rule_generator/rule_generator.functions +@@ -1,8 +1,22 @@ + # functions used by the udev rule generator ++ ++# Copyright (C) 2006 Marco d'Itri ++ ++# 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, either version 2 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++PATH='/sbin:/bin' + # +-# 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. + + PATH='/sbin:/bin' + +diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules +index 0d16fe6..00382ad 100644 +--- a/extras/rule_generator/write_cd_rules ++++ b/extras/rule_generator/write_cd_rules +@@ -4,12 +4,21 @@ + # + # It adds symlinks for optical drives based on the device class determined + # by cdrom_id and used ID_PATH to identify the device. +-# ++ + # (C) 2006 Marco d'Itri + # +-# 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 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, either version 2 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + + # debug, if UDEV_LOG= + if [ -n "$UDEV_LOG" ]; then +diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules +index cb34675..644fbce 100644 +--- a/extras/rule_generator/write_net_rules ++++ b/extras/rule_generator/write_net_rules +@@ -1,12 +1,5 @@ + #!/bin/sh -e +-# +-# 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 +@@ -22,6 +15,22 @@ + # INTERFACE_NAME requested name supplied by external tool + # INTERFACE_NEW new interface name returned by rule writer + ++# 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, either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ + # debug, if UDEV_LOG= + if [ -n "$UDEV_LOG" ]; then + if [ "$UDEV_LOG" -ge 7 ]; then +diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c +index d7dfe3e..3811ea5 100644 +--- a/extras/scsi_id/scsi_id.c ++++ b/extras/scsi_id/scsi_id.c +@@ -2,12 +2,18 @@ + * Copyright (C) IBM Corp. 2003 + * Copyright (C) SUSE Linux Products GmbH, 2006 + * +- * Author: +- * Patrick Mansfield ++ * 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, either version 2 of the License, or ++ * (at your option) any later version. + * +- * 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 program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + + #include +diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h +index ff5b70d..4475eac 100644 +--- a/extras/scsi_id/scsi_id.h ++++ b/extras/scsi_id/scsi_id.h +@@ -1,9 +1,18 @@ + /* + * Copyright (C) IBM Corp. 2003 + * +- * 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 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, either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + + #define MAX_PATH_LEN 512 +diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c +index 22456b7..dd5e1fd 100644 +--- a/extras/scsi_id/scsi_serial.c ++++ b/extras/scsi_id/scsi_serial.c +@@ -1,12 +1,20 @@ + /* + * Copyright (C) IBM Corp. 2003 + * +- * Author: +- * Patrick Mansfield ++ * Author: Patrick Mansfield + * +- * 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 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, either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + + #include +diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c +index 42ccddf..fabd092 100644 +--- a/extras/usb_id/usb_id.c ++++ b/extras/usb_id/usb_id.c +@@ -3,12 +3,20 @@ + * + * Copyright (c) 2005 SUSE Linux Products GmbH, Germany + * +- * Author: +- * Hannes Reinecke ++ * Author: Hannes Reinecke + * +- * 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 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, either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + + #include +-- +1.7.0.1 + diff --git a/0006-path_id-add-handle_scsi_sas.patch b/0006-path_id-add-handle_scsi_sas.patch new file mode 100644 index 0000000..16857cf --- /dev/null +++ b/0006-path_id-add-handle_scsi_sas.patch @@ -0,0 +1,88 @@ +From 3d1b8ed2af6dd8bf3da6983f1bed67afefc5581f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 25 Jun 2010 14:20:41 +0200 +Subject: [PATCH 6/6] path_id: add handle_scsi_sas + +based on code by Jim Garlick. +--- + extras/path_id/path_id.c | 64 +++++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 63 insertions(+), 1 deletions(-) + +diff --git a/extras/path_id/path_id.c b/extras/path_id/path_id.c +index dcee378..c3d241b 100644 +--- a/extras/path_id/path_id.c ++++ b/extras/path_id/path_id.c +@@ -121,7 +121,69 @@ out: + + static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path) + { +- return NULL; ++ struct udev *udev = udev_device_get_udev(parent); ++ struct udev_device *end_dev; ++ struct udev_device *sasdev; ++ struct udev_device *phydev; ++ struct udev_device *parent_dev; ++ struct udev_device *child_dev; ++ char syspath[UTIL_PATH_SIZE], *base; ++ char phy_path[UTIL_PATH_SIZE]; ++ const char *end_name, *name, *enc, *bay; ++ const char *port_path; ++ int scsi_host; ++ int num_phys = 8; ++ int i; ++ ++ parent_dev = parent; ++ while (1) { ++ child_dev = parent_dev; ++ parent_dev = udev_device_get_parent(child_dev); ++ if (parent_dev == NULL) ++ return NULL; ++ name = udev_device_get_sysname(parent_dev); ++ if (strstr(name, "end_device-")) { ++ end_dev = parent_dev; ++ end_name = name; ++ } else if (sscanf(name, "host%d", &scsi_host)) { ++ port_path = udev_device_get_syspath(child_dev); ++ break; ++ } ++ } ++ ++ base = strdup(udev_device_get_syspath(end_dev)); ++ if (!base) ++ return NULL; ++ snprintf(syspath, sizeof(syspath), "%s/sas_device/%s", base, end_name); ++ free(base); ++ ++ for (i = 0 ; i < num_phys ; i++) { ++ snprintf(phy_path, sizeof(phy_path), "%s/phy-%d:%d", ++ port_path, scsi_host, i); ++ if (phydev = udev_device_new_from_syspath(udev, phy_path)) { ++ udev_device_unref(phydev); ++ break; ++ } ++ } ++ if (i == num_phys) ++ return NULL; ++ ++ sasdev = udev_device_new_from_syspath(udev, syspath); ++ if (sasdev == NULL) { ++ fprintf(stderr, "unable to access '%s'\n", syspath); ++ return NULL; ++ } ++ enc = udev_device_get_sysattr_value(sasdev, "enclosure_identifier"); ++ bay = udev_device_get_sysattr_value(sasdev, "bay_identifier"); ++ if (bay == NULL) { ++ parent = NULL; ++ goto out; ++ } ++ ++ path_prepend(path, "sas-%s-%s-%s", strrchr(phy_path, '/') + 1, enc ? enc : "unknown", bay); ++out: ++ udev_device_unref(sasdev); ++ return parent; + } + + static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path) +-- +1.7.0.1 + diff --git a/fw_unit_symlinks.sh b/fw_unit_symlinks.sh deleted file mode 100644 index c4cdd6b..0000000 --- a/fw_unit_symlinks.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/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 diff --git a/start_udev b/start_udev index a6e931c..f8062b6 100755 --- a/start_udev +++ b/start_udev @@ -22,16 +22,14 @@ # # don't use udev if sysfs is not mounted. -sysfs_dir=/sys export TZ=/etc/localtime -[ -d $sysfs_dir/class ] || exit 1 +[ -d /sys/class ] || exit 1 [ -r /proc/mounts ] || exit 1 [ -x /sbin/udevd ] || exit 1 . /etc/init.d/functions -. /etc/sysconfig/udev prog=udev @@ -44,90 +42,18 @@ touch_recursive() { return 0 } -findalias () { - local n - for n in "$1"/* ; do - [ -h "$n" ] && continue - [ -d "$n" ] && { findalias "$n" ; continue; } - [ "${n##*/}" == "modalias" ] && echo $(cat $n) - done -} - -# returns OK if $1 contains $2 -strstr() { - [ "${1#*$2*}" = "$1" ] && return 1 - return 0 -} - -getval() { - what=$1 - shift - for arg; do - if strstr "$arg" "$what="; then - val=${arg#${what}=*} - echo $val - return 0 - fi - done - return 1 -} - -wait_for_queue() { - local timeout=${1:-0} - local ret=0 - if [ $timeout -gt 0 ]; then - /sbin/udevadm settle --timeout=$timeout - else - /sbin/udevadm settle - fi - ret=$? - if [ $ret -ne 0 ]; then - echo -n "Wait timeout. Will continue in the background." - fi - return $ret; -} - -export ACTION=add ret=0 STRING=$"Starting $prog: " # propagate /dev from /sys echo -n "$STRING" -UDEV_OPTS="" -cmdline=$(cat /proc/cmdline) - -if strstr "$cmdline" udevtrace; then - UDEV_OPTS="$UDEV_OPTS --debug-trace" -fi - -if strstr "$cmdline" udevlog; then - UDEV_OPTS="$UDEV_OPTS --debug" - /sbin/udevd -d $UDEV_OPTS 2>/dev/.udev/udev.log -else - /sbin/udevd -d $UDEV_OPTS -fi +/sbin/udevd -d ret=$[$ret + $?] -udevtimeout=$(getval udevtimeout $cmdline) - -if strstr "$cmdline" modprobedebug; then - /sbin/udevadm control --env=MODPROBE_OPTIONS="-s -v -q" - echo - findalias /sys | while read modules ; do - if [ -n "$modules" ]; then - echo "Loading modules for $modules in 5 seconds" - sleep 5 - /sbin/modprobe -a -v -q $modules - wait_for_queue $udevtimeout - fi - done - echo "Triggering Rest" -fi - /sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add -wait_for_queue $udevtimeout +/sbin/udevadm settle ret=$[$ret + $?] # touch all device files for timezone glitches diff --git a/udev-151-virtio.patch b/udev-151-virtio.patch deleted file mode 100644 index 53bbef6..0000000 --- a/udev-151-virtio.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 764304885705e51ef3eb1d078eed3cf6604c4684 Mon Sep 17 00:00:00 2001 -From: Amit Shah -Date: Fri, 26 Feb 2010 14:02:51 +0530 -Subject: [PATCH] Fix virtio-ports rule to use $attr instead of $ATTR - -Newer udev versions don't understand $ATTR. - -Signed-off-by: Amit Shah ---- - rules/rules.d/50-udev-default.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -Changed by Harald Hoyer - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index f8556d1..da1535f 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout" - KERNEL=="hvc*|hvsi*", GROUP="dialout" - - # virtio serial / console ports --KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}" -+KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" - - # mem - KERNEL=="null|zero|full|random|urandom", MODE="0666" --- -1.6.2.5 - diff --git a/udev-156.tar.bz2.sign b/udev-158.tar.bz2.sign similarity index 61% rename from udev-156.tar.bz2.sign rename to udev-158.tar.bz2.sign index 0a620a6..4e3f413 100644 --- a/udev-156.tar.bz2.sign +++ b/udev-158.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBL+6Y0yGugalF9Dw4RAiXCAJ46yjnuIIL1HVdbEgng81WqFdufFACdGo+0 -nOsBxQEHIdTdXHqoC25Aa/s= -=/xG7 +iD8DBQBMIxfRyGugalF9Dw4RAjKIAKCDl0sXElsnGZRbnHKDc+loyOO3jwCdHeEY +R3NsLuhJGdepccsr1Df6SHg= +=PODk -----END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index 272bb00..8c42fc4 100644 --- a/udev.spec +++ b/udev.spec @@ -2,22 +2,25 @@ %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware -Summary: A userspace implementation of devfs +Summary: A rule-based device node and kernel event manager Name: udev Version: 158 -Release: 1%{?dist} -License: GPLv2 +Release: 2%{?dist} +License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 -Obsoletes: udev-extras < 20090618 -Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source3: udev-post.init -Source4: fw_unit_symlinks.sh -Source5: udev.sysconfig +Source2: udev-post.init + +#Patch1: 0001-version-bump.patch +Patch2: 0002-add-systemd-service-files.patch +Patch3: 0003-make-pre-process-and-install-systemd-service-files-w.patch +Patch4: 0004-make-fix-make-distcheck.patch +Patch5: 0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch +Patch6: 0006-path_id-add-handle_scsi_sas.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -26,6 +29,7 @@ Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata +Requires: pkgconfig %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -47,15 +51,15 @@ Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 -Obsoletes: DeviceKit < 004 -Obsoletes: DeviceKit-devel < 004 -Provides: DeviceKit = 004 DeviceKit-devel = 004 # hid2hci moved to udev Conflicts: bluez < 4.47 %description -The udev package contains an implementation of devfs in -userspace using sysfs and netlink. +udev is a collection of tools and a daemon to manage events received +from the kernel and deal with them in user-space. Primarily this +involves managing permissions, and creating and removing meaningful +symlinks to device nodes in /dev when hardware is discovered or +removed from the system. %package -n libudev Summary: Dynamic library to access udev device information @@ -73,6 +77,7 @@ Summary: Development files for libudev Group: Development/Libraries Requires: udev = %{version}-%{release} Requires: libudev = %{version}-%{release} +Requires: pkgconfig License: LGPLv2+ %description -n libudev-devel @@ -98,6 +103,7 @@ Group: Development/Libraries Requires: libudev-devel >= 142 Provides: libgudev-devel = 20090518 Obsoletes: libgudev-devel <= 20090517 +Requires: pkgconfig License: LGPLv2+ Requires: libgudev1 = %{version}-%{release} @@ -109,6 +115,13 @@ glib-based applications using libudev functionality. %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 + %build libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ @@ -155,18 +168,13 @@ mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices,devices/net,devices/pts,devi ln -s /sbin/MAKEDEV $RPM_BUILD_ROOT%{udev_scriptdir}/devices/MAKEDEV -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 mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d -install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post - -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig -install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev +install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then @@ -242,7 +250,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/path_id %attr(0755,root,root) %{udev_scriptdir}/hid2hci %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices -%attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh %attr(0755,root,root) %{udev_scriptdir}/firmware %attr(0644,root,root) %{udev_scriptdir}/rule_generator.functions %attr(0755,root,root) %{udev_scriptdir}/write_cd_rules @@ -280,8 +287,6 @@ rm -rf $RPM_BUILD_ROOT %attr(640,root,disk) %dev(c,7,6) %{udev_scriptdir}/devices/loop6 %attr(640,root,disk) %dev(c,7,7) %{udev_scriptdir}/devices/loop7 -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev - %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules @@ -302,6 +307,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{udev_scriptdir}/keymaps %{udev_scriptdir}/keymaps/* %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck +%{_datadir}/pkgconfig/udev.pc # Deprecated, but keep the ownership %ghost %dir /var/lib/udev @@ -321,7 +327,6 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc -%{_datadir}/pkgconfig/udev.pc %{_datadir}/gtk-doc/html/libudev/* %files -n libgudev1 @@ -343,6 +348,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Jun 25 2010 Harald Hoyer 158-2 +- moved udev pkgconfig to base file on authors request +- specfile cleanups + * Thu Jun 24 2010 Harald Hoyer 158-1 - version 158 From 29c9ccefc506a1b50e776dd47e1e07a94bbfef18 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Jul 2010 19:19:47 +0000 Subject: [PATCH 562/640] - version 160 - add systemd service files - fixed COPYRIGHT files --- .cvsignore | 2 +- 0001-version-bump.patch | 35 --- 0002-add-systemd-service-files.patch | 76 ----- ...-and-install-systemd-service-files-w.patch | 230 -------------- 0004-make-fix-make-distcheck.patch | 27 -- ...ft-over-from-GPLv2-to-GPLv2-or-later.patch | 296 ------------------ 0006-path_id-add-handle_scsi_sas.patch | 88 ------ sources | 2 +- ...-158.tar.bz2.sign => udev-160.tar.bz2.sign | 6 +- udev-post.init | 1 - udev.spec | 44 +-- udev.sysconfig | 4 - 12 files changed, 29 insertions(+), 782 deletions(-) delete mode 100644 0001-version-bump.patch delete mode 100644 0002-add-systemd-service-files.patch delete mode 100644 0003-make-pre-process-and-install-systemd-service-files-w.patch delete mode 100644 0004-make-fix-make-distcheck.patch delete mode 100644 0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch delete mode 100644 0006-path_id-add-handle_scsi_sas.patch rename udev-158.tar.bz2.sign => udev-160.tar.bz2.sign (61%) delete mode 100644 udev.sysconfig diff --git a/.cvsignore b/.cvsignore index f62c5e6..22be2f6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -udev-158.tar.bz2 +udev-160.tar.bz2 diff --git a/0001-version-bump.patch b/0001-version-bump.patch deleted file mode 100644 index 4917fbd..0000000 --- a/0001-version-bump.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cbcb846a4c9c9b8215a3f484d70e3cefde5ba226 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 24 Jun 2010 10:17:15 +0200 -Subject: [PATCH 1/6] version bump - ---- - NEWS | 4 ++++ - configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/NEWS b/NEWS -index 002ecba..88dc34d 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,7 @@ -+udev 159 -+======== -+Bugfixes. -+ - udev 158 - ======== - Bugfixes. -diff --git a/configure.ac b/configure.ac -index 7e9b1f8..4bac653 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,4 +1,4 @@ --AC_INIT([udev], [158], [linux-hotplug@vger.kernel.org]) -+AC_INIT([udev], [159], [linux-hotplug@vger.kernel.org]) - AC_PREREQ(2.60) - AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects]) - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) --- -1.7.0.1 - diff --git a/0002-add-systemd-service-files.patch b/0002-add-systemd-service-files.patch deleted file mode 100644 index dc6ea1a..0000000 --- a/0002-add-systemd-service-files.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 43fefbf6f1c528947a77643582bcc34cf3538b2d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 25 Jun 2010 01:31:57 +0200 -Subject: [PATCH 2/6] add systemd service files - ---- - init/udev-retry.service | 13 +++++++++++++ - init/udev-settle.service | 13 +++++++++++++ - init/udev.service | 15 +++++++++++++++ - 3 files changed, 41 insertions(+), 0 deletions(-) - create mode 100644 init/udev-retry.service - create mode 100644 init/udev-settle.service - create mode 100644 init/udev.service - -diff --git a/init/udev-retry.service b/init/udev-retry.service -new file mode 100644 -index 0000000..0792875 ---- /dev/null -+++ b/init/udev-retry.service -@@ -0,0 +1,13 @@ -+[Unit] -+Description=re-trigger failed events after filesystems are available -+After=local-fs.target -+ -+[Service] -+Type=finish -+ValidNoProcess=yes -+ExecStart=/sbin/udevadm trigger --type=failed -+ -+[Install] -+WantedBy=sysinit.target -+Also=udev.service -+Also=udev-settle.service -diff --git a/init/udev-settle.service b/init/udev-settle.service -new file mode 100644 -index 0000000..3c73a96 ---- /dev/null -+++ b/init/udev-settle.service -@@ -0,0 +1,13 @@ -+[Unit] -+Description=wait until full initialization -+After=udev.service -+ -+[Service] -+Type=finish -+ValidNoProcess=yes -+ExecStart=/sbin/udevadm settle -+ -+[Install] -+WantedBy=sysinit.target -+Also=udev.service -+Also=udev-retry.service -diff --git a/init/udev.service b/init/udev.service -new file mode 100644 -index 0000000..f6824a2 ---- /dev/null -+++ b/init/udev.service -@@ -0,0 +1,15 @@ -+[Unit] -+Description=/dev and kernel device manager -+Before=sysinit.target -+ -+[Service] -+Type=notify -+ExecStart=/sbin/udevd -+ExecStartPost=/sbin/udevadm trigger --type=subsystems --action=add -+ExecStartPost=/sbin/udevadm trigger --type=devices --action=add -+ -+[Install] -+WantedBy=sysinit.target -+Also=udev-settle.service -+Also=udev-retry.service -+ --- -1.7.0.1 - diff --git a/0003-make-pre-process-and-install-systemd-service-files-w.patch b/0003-make-pre-process-and-install-systemd-service-files-w.patch deleted file mode 100644 index b7c9383..0000000 --- a/0003-make-pre-process-and-install-systemd-service-files-w.patch +++ /dev/null @@ -1,230 +0,0 @@ -From 08b4c88353b48302ae94088b55b2066ad01c63f8 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 25 Jun 2010 10:30:55 +0200 -Subject: [PATCH 3/6] make: pre-process and install systemd service files when needed - ---- - Makefile.am | 7 +++++++ - configure.ac | 16 +++++++++++++--- - extras/mtd_probe/.gitignore | 1 + - init/.gitignore | 1 + - init/udev-retry.service | 13 ------------- - init/udev-retry.service.in | 13 +++++++++++++ - init/udev-settle.service | 13 ------------- - init/udev-settle.service.in | 13 +++++++++++++ - init/udev.service | 15 --------------- - init/udev.service.in | 15 +++++++++++++++ - 10 files changed, 63 insertions(+), 44 deletions(-) - create mode 100644 extras/mtd_probe/.gitignore - create mode 100644 init/.gitignore - delete mode 100644 init/udev-retry.service - create mode 100644 init/udev-retry.service.in - delete mode 100644 init/udev-settle.service - create mode 100644 init/udev-settle.service.in - delete mode 100644 init/udev.service - create mode 100644 init/udev.service.in - -diff --git a/Makefile.am b/Makefile.am -index 1916770..198c06c 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -114,6 +114,13 @@ dist_udevconf_DATA = udev.conf - sharepkgconfigdir = $(datadir)/pkgconfig - sharepkgconfig_DATA = udev/udev.pc - -+if WITH_SYSTEMD -+systemdsystemunit_DATA = \ -+ init/udev.service \ -+ init/udev-settle.service \ -+ init/udev-retry.service -+endif -+ - sbin_PROGRAMS = \ - udev/udevd \ - udev/udevadm -diff --git a/configure.ac b/configure.ac -index 4bac653..255ee18 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -49,8 +49,7 @@ fi - AC_ARG_WITH(firmware-path, - AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], - [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), -- [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"] -- ) -+ [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"]) - OLD_IFS=$IFS - IFS=: - for i in $with_firmware_path -@@ -64,6 +63,12 @@ done - IFS=$OLD_IFS - AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) - -+AC_ARG_WITH([systemdsystemunitdir], -+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), -+ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) -+AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) -+AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir"]) -+ - AC_ARG_ENABLE([extras], - AS_HELP_STRING([--disable-extras], [disable extras with external dependencies]), - [], [enable_extras=yes]) -@@ -126,10 +131,13 @@ AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes]) - AC_CONFIG_HEADERS(config.h) - AC_CONFIG_FILES([ - Makefile -+ udev/udev.pc -+ init/udev.service -+ init/udev-settle.service -+ init/udev-retry.service - libudev/libudev.pc - libudev/docs/Makefile - libudev/docs/version.xml -- udev/udev.pc - extras/gudev/gudev-1.0.pc - extras/gudev/docs/Makefile - extras/gudev/docs/version.xml -@@ -153,6 +161,8 @@ AC_MSG_RESULT([ - - include_prefix: ${INCLUDE_PREFIX} - -+ systemdsystemunitdir: ${systemdsystemunitdir} -+ - logging: ${enable_logging} - debug: ${enable_debug} - selinux: ${with_selinux} -diff --git a/extras/mtd_probe/.gitignore b/extras/mtd_probe/.gitignore -new file mode 100644 -index 0000000..82b8ab5 ---- /dev/null -+++ b/extras/mtd_probe/.gitignore -@@ -0,0 +1 @@ -+mtd_probe -diff --git a/init/.gitignore b/init/.gitignore -new file mode 100644 -index 0000000..904e445 ---- /dev/null -+++ b/init/.gitignore -@@ -0,0 +1 @@ -+udev*.service -diff --git a/init/udev-retry.service b/init/udev-retry.service -deleted file mode 100644 -index 0792875..0000000 ---- a/init/udev-retry.service -+++ /dev/null -@@ -1,13 +0,0 @@ --[Unit] --Description=re-trigger failed events after filesystems are available --After=local-fs.target -- --[Service] --Type=finish --ValidNoProcess=yes --ExecStart=/sbin/udevadm trigger --type=failed -- --[Install] --WantedBy=sysinit.target --Also=udev.service --Also=udev-settle.service -diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in -new file mode 100644 -index 0000000..b7d5320 ---- /dev/null -+++ b/init/udev-retry.service.in -@@ -0,0 +1,13 @@ -+[Unit] -+Description=re-trigger failed events after filesystems are available -+After=local-fs.target -+ -+[Service] -+Type=finish -+ValidNoProcess=yes -+ExecStart=@sbindir@/udevadm trigger --type=failed -+ -+[Install] -+WantedBy=sysinit.target -+Also=udev.service -+Also=udev-settle.service -diff --git a/init/udev-settle.service b/init/udev-settle.service -deleted file mode 100644 -index 3c73a96..0000000 ---- a/init/udev-settle.service -+++ /dev/null -@@ -1,13 +0,0 @@ --[Unit] --Description=wait until full initialization --After=udev.service -- --[Service] --Type=finish --ValidNoProcess=yes --ExecStart=/sbin/udevadm settle -- --[Install] --WantedBy=sysinit.target --Also=udev.service --Also=udev-retry.service -diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in -new file mode 100644 -index 0000000..d13beae ---- /dev/null -+++ b/init/udev-settle.service.in -@@ -0,0 +1,13 @@ -+[Unit] -+Description=wait until full initialization -+After=udev.service -+ -+[Service] -+Type=finish -+ValidNoProcess=yes -+ExecStart=@sbindir@/udevadm settle -+ -+[Install] -+WantedBy=sysinit.target -+Also=udev.service -+Also=udev-retry.service -diff --git a/init/udev.service b/init/udev.service -deleted file mode 100644 -index f6824a2..0000000 ---- a/init/udev.service -+++ /dev/null -@@ -1,15 +0,0 @@ --[Unit] --Description=/dev and kernel device manager --Before=sysinit.target -- --[Service] --Type=notify --ExecStart=/sbin/udevd --ExecStartPost=/sbin/udevadm trigger --type=subsystems --action=add --ExecStartPost=/sbin/udevadm trigger --type=devices --action=add -- --[Install] --WantedBy=sysinit.target --Also=udev-settle.service --Also=udev-retry.service -- -diff --git a/init/udev.service.in b/init/udev.service.in -new file mode 100644 -index 0000000..a54626d ---- /dev/null -+++ b/init/udev.service.in -@@ -0,0 +1,15 @@ -+[Unit] -+Description=/dev and kernel device manager -+Before=sysinit.target -+ -+[Service] -+Type=notify -+ExecStart=@sbindir@/udevd -+ExecStartPost=@sbindir@/udevadm trigger --type=subsystems --action=add -+ExecStartPost=@sbindir@/udevadm trigger --type=devices --action=add -+ -+[Install] -+WantedBy=sysinit.target -+Also=udev-settle.service -+Also=udev-retry.service -+ --- -1.7.0.1 - diff --git a/0004-make-fix-make-distcheck.patch b/0004-make-fix-make-distcheck.patch deleted file mode 100644 index 91bc78d..0000000 --- a/0004-make-fix-make-distcheck.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f0565500f499cbc5503edebcacd98f305099df86 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 25 Jun 2010 10:42:33 +0200 -Subject: [PATCH 4/6] make: fix 'make distcheck' - udev-159.tar.gz - ---- - Makefile.am | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 198c06c..8515e14 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -21,7 +21,8 @@ AM_LDFLAGS = \ - -Wl,--as-needed - - DISTCHECK_CONFIGURE_FLAGS = \ -- --enable-gtk-doc -+ --enable-gtk-doc \ -+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) - - CLEANFILES = - --- -1.7.0.1 - diff --git a/0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch b/0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch deleted file mode 100644 index 0929831..0000000 --- a/0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch +++ /dev/null @@ -1,296 +0,0 @@ -From 8b5651bb009bf892b3a5537c5f36b8891f238aa4 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 25 Jun 2010 11:39:21 +0200 -Subject: [PATCH 5/6] switch a few left-over from GPLv2 to GPLv2 or later - ---- - extras/edd_id/edd_id.c | 15 +++++++++++-- - extras/floppy/create_floppy_devices.c | 20 ++++++++++++------ - extras/rule_generator/rule_generator.functions | 20 ++++++++++++++++-- - extras/rule_generator/write_cd_rules | 17 ++++++++++++--- - extras/rule_generator/write_net_rules | 25 ++++++++++++++++------- - extras/scsi_id/scsi_id.c | 16 ++++++++++---- - extras/scsi_id/scsi_id.h | 15 +++++++++++-- - extras/scsi_id/scsi_serial.c | 18 ++++++++++++---- - extras/usb_id/usb_id.c | 18 ++++++++++++---- - 9 files changed, 121 insertions(+), 43 deletions(-) - -diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c -index 15295ed..ac4da07 100644 ---- a/extras/edd_id/edd_id.c -+++ b/extras/edd_id/edd_id.c -@@ -4,9 +4,18 @@ - * Copyright (C) 2005 John Hull - * Copyright (C) 2005 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 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, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . - */ - - #ifndef _GNU_SOURCE -diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c -index 2fc05cc..47724f8 100644 ---- a/extras/floppy/create_floppy_devices.c -+++ b/extras/floppy/create_floppy_devices.c -@@ -1,17 +1,23 @@ - /* -- * create_floppy_devices -- * - * Create all possible floppy device based on the CMOS type. - * Based upon code from drivers/block/floppy.c - * - * Copyright(C) 2005, SUSE Linux Products GmbH - * -- * Author: -- * Hannes Reinecke -+ * Author: Hannes Reinecke -+ * -+ * 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, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. - * -- * 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. -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . - */ - - #include -diff --git a/extras/rule_generator/rule_generator.functions b/extras/rule_generator/rule_generator.functions -index b972091..e2060a2 100644 ---- a/extras/rule_generator/rule_generator.functions -+++ b/extras/rule_generator/rule_generator.functions -@@ -1,8 +1,22 @@ - # functions used by the udev rule generator -+ -+# Copyright (C) 2006 Marco d'Itri -+ -+# 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, either version 2 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+PATH='/sbin:/bin' - # --# 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. - - PATH='/sbin:/bin' - -diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules -index 0d16fe6..00382ad 100644 ---- a/extras/rule_generator/write_cd_rules -+++ b/extras/rule_generator/write_cd_rules -@@ -4,12 +4,21 @@ - # - # It adds symlinks for optical drives based on the device class determined - # by cdrom_id and used ID_PATH to identify the device. --# -+ - # (C) 2006 Marco d'Itri - # --# 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 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, either version 2 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . - - # debug, if UDEV_LOG= - if [ -n "$UDEV_LOG" ]; then -diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules -index cb34675..644fbce 100644 ---- a/extras/rule_generator/write_net_rules -+++ b/extras/rule_generator/write_net_rules -@@ -1,12 +1,5 @@ - #!/bin/sh -e --# --# 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 -@@ -22,6 +15,22 @@ - # INTERFACE_NAME requested name supplied by external tool - # INTERFACE_NEW new interface name returned by rule writer - -+# 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, either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ - # debug, if UDEV_LOG= - if [ -n "$UDEV_LOG" ]; then - if [ "$UDEV_LOG" -ge 7 ]; then -diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c -index d7dfe3e..3811ea5 100644 ---- a/extras/scsi_id/scsi_id.c -+++ b/extras/scsi_id/scsi_id.c -@@ -2,12 +2,18 @@ - * Copyright (C) IBM Corp. 2003 - * Copyright (C) SUSE Linux Products GmbH, 2006 - * -- * Author: -- * Patrick Mansfield -+ * 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, either version 2 of the License, or -+ * (at your option) any later version. - * -- * 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 program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . - */ - - #include -diff --git a/extras/scsi_id/scsi_id.h b/extras/scsi_id/scsi_id.h -index ff5b70d..4475eac 100644 ---- a/extras/scsi_id/scsi_id.h -+++ b/extras/scsi_id/scsi_id.h -@@ -1,9 +1,18 @@ - /* - * Copyright (C) IBM Corp. 2003 - * -- * 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 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, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . - */ - - #define MAX_PATH_LEN 512 -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c -index 22456b7..dd5e1fd 100644 ---- a/extras/scsi_id/scsi_serial.c -+++ b/extras/scsi_id/scsi_serial.c -@@ -1,12 +1,20 @@ - /* - * Copyright (C) IBM Corp. 2003 - * -- * Author: -- * Patrick Mansfield -+ * Author: Patrick Mansfield - * -- * 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 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, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . - */ - - #include -diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c -index 42ccddf..fabd092 100644 ---- a/extras/usb_id/usb_id.c -+++ b/extras/usb_id/usb_id.c -@@ -3,12 +3,20 @@ - * - * Copyright (c) 2005 SUSE Linux Products GmbH, Germany - * -- * Author: -- * Hannes Reinecke -+ * Author: Hannes Reinecke - * -- * 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 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, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . - */ - - #include --- -1.7.0.1 - diff --git a/0006-path_id-add-handle_scsi_sas.patch b/0006-path_id-add-handle_scsi_sas.patch deleted file mode 100644 index 16857cf..0000000 --- a/0006-path_id-add-handle_scsi_sas.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 3d1b8ed2af6dd8bf3da6983f1bed67afefc5581f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 25 Jun 2010 14:20:41 +0200 -Subject: [PATCH 6/6] path_id: add handle_scsi_sas - -based on code by Jim Garlick. ---- - extras/path_id/path_id.c | 64 +++++++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 63 insertions(+), 1 deletions(-) - -diff --git a/extras/path_id/path_id.c b/extras/path_id/path_id.c -index dcee378..c3d241b 100644 ---- a/extras/path_id/path_id.c -+++ b/extras/path_id/path_id.c -@@ -121,7 +121,69 @@ out: - - static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path) - { -- return NULL; -+ struct udev *udev = udev_device_get_udev(parent); -+ struct udev_device *end_dev; -+ struct udev_device *sasdev; -+ struct udev_device *phydev; -+ struct udev_device *parent_dev; -+ struct udev_device *child_dev; -+ char syspath[UTIL_PATH_SIZE], *base; -+ char phy_path[UTIL_PATH_SIZE]; -+ const char *end_name, *name, *enc, *bay; -+ const char *port_path; -+ int scsi_host; -+ int num_phys = 8; -+ int i; -+ -+ parent_dev = parent; -+ while (1) { -+ child_dev = parent_dev; -+ parent_dev = udev_device_get_parent(child_dev); -+ if (parent_dev == NULL) -+ return NULL; -+ name = udev_device_get_sysname(parent_dev); -+ if (strstr(name, "end_device-")) { -+ end_dev = parent_dev; -+ end_name = name; -+ } else if (sscanf(name, "host%d", &scsi_host)) { -+ port_path = udev_device_get_syspath(child_dev); -+ break; -+ } -+ } -+ -+ base = strdup(udev_device_get_syspath(end_dev)); -+ if (!base) -+ return NULL; -+ snprintf(syspath, sizeof(syspath), "%s/sas_device/%s", base, end_name); -+ free(base); -+ -+ for (i = 0 ; i < num_phys ; i++) { -+ snprintf(phy_path, sizeof(phy_path), "%s/phy-%d:%d", -+ port_path, scsi_host, i); -+ if (phydev = udev_device_new_from_syspath(udev, phy_path)) { -+ udev_device_unref(phydev); -+ break; -+ } -+ } -+ if (i == num_phys) -+ return NULL; -+ -+ sasdev = udev_device_new_from_syspath(udev, syspath); -+ if (sasdev == NULL) { -+ fprintf(stderr, "unable to access '%s'\n", syspath); -+ return NULL; -+ } -+ enc = udev_device_get_sysattr_value(sasdev, "enclosure_identifier"); -+ bay = udev_device_get_sysattr_value(sasdev, "bay_identifier"); -+ if (bay == NULL) { -+ parent = NULL; -+ goto out; -+ } -+ -+ path_prepend(path, "sas-%s-%s-%s", strrchr(phy_path, '/') + 1, enc ? enc : "unknown", bay); -+out: -+ udev_device_unref(sasdev); -+ return parent; - } - - static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path) --- -1.7.0.1 - diff --git a/sources b/sources index a75a271..c193652 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -26f99dde11f8e393d659614d7d1a3964 udev-158.tar.bz2 +65459a1f090082c0471bf4e5112208d7 udev-160.tar.bz2 diff --git a/udev-158.tar.bz2.sign b/udev-160.tar.bz2.sign similarity index 61% rename from udev-158.tar.bz2.sign rename to udev-160.tar.bz2.sign index 4e3f413..f5465a6 100644 --- a/udev-158.tar.bz2.sign +++ b/udev-160.tar.bz2.sign @@ -2,7 +2,7 @@ Version: GnuPG v1.4.9 (GNU/Linux) Comment: See http://www.kernel.org/signature.html for info -iD8DBQBMIxfRyGugalF9Dw4RAjKIAKCDl0sXElsnGZRbnHKDc+loyOO3jwCdHeEY -R3NsLuhJGdepccsr1Df6SHg= -=PODk +iD8DBQBMOkG1yGugalF9Dw4RAjB0AJ9ftRX/zmCiRcSyQWhcWJXsnXDn3gCeMFbR +KdR80Jxmitbil01dFfPzwEE= +=8B8M -----END PGP SIGNATURE----- diff --git a/udev-post.init b/udev-post.init index 903f686..f882e0d 100644 --- a/udev-post.init +++ b/udev-post.init @@ -18,7 +18,6 @@ ### END INIT INFO . /etc/rc.d/init.d/functions -. /etc/sysconfig/udev # See how we were called. case "$1" in diff --git a/udev.spec b/udev.spec index 8c42fc4..50c715c 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 158 -Release: 2%{?dist} +Version: 160 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,13 +15,6 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev-post.init -#Patch1: 0001-version-bump.patch -Patch2: 0002-add-systemd-service-files.patch -Patch3: 0003-make-pre-process-and-install-systemd-service-files-w.patch -Patch4: 0004-make-fix-make-distcheck.patch -Patch5: 0005-switch-a-few-left-over-from-GPLv2-to-GPLv2-or-later.patch -Patch6: 0006-path_id-add-handle_scsi_sas.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -30,6 +23,8 @@ Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: pkgconfig +Requires: systemd-units +Conflicts: systemd < 3 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -46,6 +41,9 @@ BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc BuildRequires: usbutils >= 0.82 BuildRequires: libtool >= 2.2.6 +BuildRequires: systemd-units +BuildRequires: systemd +BuildRequires: pkgconfig Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 Requires: util-linux-ng >= 2.15.1 @@ -115,19 +113,13 @@ glib-based applications using libudev functionality. %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 - %build libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ --sysconfdir=%{_sysconfdir} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ - --with-rootlibdir=/%{_lib} --enable-introspection + --with-rootlibdir=/%{_lib} \ + --enable-introspection make %{?_smp_mflags} @@ -188,6 +180,7 @@ if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then fi if [ "$1" -eq 0 ]; then /sbin/chkconfig --del udev-post + /usr/bin/systemd-install --system --start disable udev.service >/dev/null 2>&1 || : fi exit 0 @@ -223,6 +216,7 @@ if test -f /proc/1/exe -a -d /proc/1/root; then fi fi /sbin/chkconfig --add udev-post +/usr/bin/systemd-install --system --start enable udev.service >/dev/null 2>&1 || : exit 0 @@ -240,7 +234,6 @@ rm -rf $RPM_BUILD_ROOT %doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevd -%attr(0755,root,root) /sbin/start_udev %attr(0755,root,root) /sbin/scsi_id %attr(0755,root,root) %{udev_scriptdir}/scsi_id %attr(0755,root,root) %{udev_scriptdir}/ata_id @@ -309,6 +302,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %{_datadir}/pkgconfig/udev.pc +%attr(0755,root,root) /sbin/start_udev +%define systemdsystemunitdir %(/usr/bin/pkg-config --variable=systemdsystemunitdir systemd) +%attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service +%attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service +%attr(0644,root,root) %{systemdsystemunitdir}/udev.service + # Deprecated, but keep the ownership %ghost %dir /var/lib/udev %ghost %dir %{_sysconfdir}/udev/scripts/ @@ -323,7 +322,7 @@ rm -rf $RPM_BUILD_ROOT %files -n libudev-devel %defattr(0644, root, root, 0755) -%doc libudev/COPYING libudev/docs/html/* +%doc libudev/docs/html/* %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc @@ -337,7 +336,7 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1-devel %defattr(0644, root, root, 0755) -%doc extras/gudev/COPYING extras/gudev/docs/html/* +%doc extras/gudev/docs/html/* %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %dir %attr(0755,root,root) %{_includedir}/gudev-1.0 %dir %attr(0755,root,root) %{_includedir}/gudev-1.0/gudev @@ -348,6 +347,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 13 2010 Harald Hoyer 160-1 +- version 160 +- add systemd service files +- fixed COPYRIGHT files + * Fri Jun 25 2010 Harald Hoyer 158-2 - moved udev pkgconfig to base file on authors request - specfile cleanups diff --git a/udev.sysconfig b/udev.sysconfig deleted file mode 100644 index 9a58d98..0000000 --- a/udev.sysconfig +++ /dev/null @@ -1,4 +0,0 @@ -# If set to "yes", generates cache shell files of what MAKEDEV would do. -# May speedup some systems with slow disks. -# EXPERIMENTAL - use at your own risk -UDEV_USE_MAKEDEV_CACHE="no" From bc17ac23b4362f5ee33068161b3d75deea696214 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 13 Jul 2010 19:40:37 +0000 Subject: [PATCH 563/640] Don't require systemd .pc file --- udev.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/udev.spec b/udev.spec index 50c715c..bb68cb9 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -22,7 +22,6 @@ Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata -Requires: pkgconfig Requires: systemd-units Conflicts: systemd < 3 @@ -119,7 +118,8 @@ libtoolize -f -c --sysconfdir=%{_sysconfdir} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} \ - --enable-introspection + --enable-introspection \ + --with-systemdsystemunitdir=/lib/systemd/system make %{?_smp_mflags} @@ -303,7 +303,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pkgconfig/udev.pc %attr(0755,root,root) /sbin/start_udev -%define systemdsystemunitdir %(/usr/bin/pkg-config --variable=systemdsystemunitdir systemd) +%define systemdsystemunitdir %(/lib/systemd/system) %attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service @@ -347,6 +347,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 13 2010 Lennart Poettering - 160-2 +- Don't require systemd .pc file, to break build dependency cycle + * Tue Jul 13 2010 Harald Hoyer 160-1 - version 160 - add systemd service files From ef9ccbd582aa31c14c4b27c1bcf456a756b83ca8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 13 Jul 2010 19:41:07 +0000 Subject: [PATCH 564/640] fix my email address --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index bb68cb9..743ee61 100644 --- a/udev.spec +++ b/udev.spec @@ -347,7 +347,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog -* Tue Jul 13 2010 Lennart Poettering - 160-2 +* Tue Jul 13 2010 Lennart Poettering - 160-2 - Don't require systemd .pc file, to break build dependency cycle * Tue Jul 13 2010 Harald Hoyer 160-1 From 8e5a749a3e94d6c8087d73fbe6f225b752c56dd8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 13 Jul 2010 19:54:32 +0000 Subject: [PATCH 565/640] Update systemd-install lines to use --realize instead of --start (which got renamed in systemd) --- udev.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/udev.spec b/udev.spec index 743ee61..9b70948 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -23,6 +23,7 @@ Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units +Requires: pkgconfig Conflicts: systemd < 3 %ifarch s390 s390x @@ -40,8 +41,6 @@ BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc BuildRequires: usbutils >= 0.82 BuildRequires: libtool >= 2.2.6 -BuildRequires: systemd-units -BuildRequires: systemd BuildRequires: pkgconfig Requires: libselinux >= 0:1.17.9-2 sed Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 @@ -180,7 +179,7 @@ if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then fi if [ "$1" -eq 0 ]; then /sbin/chkconfig --del udev-post - /usr/bin/systemd-install --system --start disable udev.service >/dev/null 2>&1 || : + /usr/bin/systemd-install --system --realize disable udev.service >/dev/null 2>&1 || : fi exit 0 @@ -216,7 +215,7 @@ if test -f /proc/1/exe -a -d /proc/1/root; then fi fi /sbin/chkconfig --add udev-post -/usr/bin/systemd-install --system --start enable udev.service >/dev/null 2>&1 || : +/usr/bin/systemd-install --system --realize=minimal enable udev.service >/dev/null 2>&1 || : exit 0 @@ -303,7 +302,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pkgconfig/udev.pc %attr(0755,root,root) /sbin/start_udev -%define systemdsystemunitdir %(/lib/systemd/system) +%define systemdsystemunitdir /lib/systemd/system %attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service @@ -347,6 +346,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 13 2010 Lennart Poettering - 160-3 +- Update systemd-install lines to use --realize instead of --start (which got renamed in systemd) + * Tue Jul 13 2010 Lennart Poettering - 160-2 - Don't require systemd .pc file, to break build dependency cycle From 1fbe74e970a5928df6a0102c8aa2af57add96c64 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 13 Jul 2010 20:07:15 +0000 Subject: [PATCH 566/640] Comment systemd-install for now as long as sysinit is not split into pieces --- udev.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 9b70948..6827f89 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -179,7 +179,7 @@ if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then fi if [ "$1" -eq 0 ]; then /sbin/chkconfig --del udev-post - /usr/bin/systemd-install --system --realize disable udev.service >/dev/null 2>&1 || : +# /usr/bin/systemd-install --system --realize disable udev.service >/dev/null 2>&1 || : fi exit 0 @@ -215,7 +215,7 @@ if test -f /proc/1/exe -a -d /proc/1/root; then fi fi /sbin/chkconfig --add udev-post -/usr/bin/systemd-install --system --realize=minimal enable udev.service >/dev/null 2>&1 || : +#/usr/bin/systemd-install --system --realize=minimal enable udev.service >/dev/null 2>&1 || : exit 0 @@ -346,6 +346,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 13 2010 Lennart Poettering - 160-4 +- Comment systemd-install for now as long as sysinit is not split into pieces + * Tue Jul 13 2010 Lennart Poettering - 160-3 - Update systemd-install lines to use --realize instead of --start (which got renamed in systemd) From 120363a3883ef85db017318c2d7c0bc5488a3020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 14 Jul 2010 08:39:36 +0000 Subject: [PATCH 567/640] - update paths to arch-specific rules --- udev.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/udev.spec b/udev.spec index 6827f89..910ca87 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -143,13 +143,13 @@ ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id for i in \ %ifarch ia64 - rules/packages/40-ia64.rules \ + rules/arch/40-ia64.rules \ %endif %ifarch ppc ppc64 - rules/packages/40-ppc.rules \ + rules/arch/40-ppc.rules \ %endif %ifarch s390 s390x - rules/packages/40-s390.rules \ + rules/arch/40-s390.rules \ %endif ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" @@ -346,6 +346,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jul 14 2010 Dan Horák 160-5 +- update paths to arch-specific rules + * Tue Jul 13 2010 Lennart Poettering - 160-4 - Comment systemd-install for now as long as sysinit is not split into pieces From 2576ac70df20cdcd71b395d1768cbf073fa0e743 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 15 Jul 2010 06:32:02 +0000 Subject: [PATCH 568/640] - add versioned requires for libudev to udev --- udev.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 910ca87..0d67082 100644 --- a/udev.spec +++ b/udev.spec @@ -2,10 +2,12 @@ %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware +%define systemdsystemunitdir /lib/systemd/system + Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -49,6 +51,7 @@ Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 # hid2hci moved to udev Conflicts: bluez < 4.47 +Requires: libudev = %{version}-%{release} %description udev is a collection of tools and a daemon to manage events received @@ -118,7 +121,7 @@ libtoolize -f -c --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} \ --enable-introspection \ - --with-systemdsystemunitdir=/lib/systemd/system + --with-systemdsystemunitdir=%{systemdsystemunitdir} make %{?_smp_mflags} @@ -302,7 +305,6 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pkgconfig/udev.pc %attr(0755,root,root) /sbin/start_udev -%define systemdsystemunitdir /lib/systemd/system %attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service @@ -346,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Jul 15 2010 Harald Hoyer 160-6 +- add versioned requires for libudev to udev + * Wed Jul 14 2010 Dan Horák 160-5 - update paths to arch-specific rules From 48e3b21647f6c0819753878eebed8ccac4f8e971 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jul 2010 11:31:27 +0000 Subject: [PATCH 569/640] - turn off hotplug in /sys/kernel/uevent_helper or /proc/sys/kernel/hotplug --- start_udev | 9 +++++++++ udev.spec | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/start_udev b/start_udev index f8062b6..49fc286 100755 --- a/start_udev +++ b/start_udev @@ -47,6 +47,15 @@ STRING=$"Starting $prog: " # propagate /dev from /sys echo -n "$STRING" +# turn off hotplug binary calling +if ! [ -x /sbin/hotplug ]; then + if [ -e /sys/kernel/uevent_helper ]; then + echo -e '\000\000\000\000' > /sys/kernel/uevent_helper + elif [ -e /proc/sys/kernel/hotplug ]; then + echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + fi +fi + /sbin/udevd -d ret=$[$ret + $?] diff --git a/udev.spec b/udev.spec index 0d67082..bdd1507 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -348,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 20 2010 Harald Hoyer 160-7 +- turn off hotplug in /sys/kernel/uevent_helper or /proc/sys/kernel/hotplug + * Thu Jul 15 2010 Harald Hoyer 160-6 - add versioned requires for libudev to udev From 9c03079ed4a1bc22c78fa540872cb7b719d04490 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 20 Jul 2010 13:21:05 +0000 Subject: [PATCH 570/640] - make loop block device again --- udev.spec | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/udev.spec b/udev.spec index bdd1507..37d0082 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 160 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -273,14 +273,14 @@ rm -rf $RPM_BUILD_ROOT %attr(660,root,lp) %dev(c,6,1) %{udev_scriptdir}/devices/lp1 %attr(660,root,lp) %dev(c,6,2) %{udev_scriptdir}/devices/lp2 %attr(660,root,lp) %dev(c,6,3) %{udev_scriptdir}/devices/lp3 -%attr(640,root,disk) %dev(c,7,0) %{udev_scriptdir}/devices/loop0 -%attr(640,root,disk) %dev(c,7,1) %{udev_scriptdir}/devices/loop1 -%attr(640,root,disk) %dev(c,7,2) %{udev_scriptdir}/devices/loop2 -%attr(640,root,disk) %dev(c,7,3) %{udev_scriptdir}/devices/loop3 -%attr(640,root,disk) %dev(c,7,4) %{udev_scriptdir}/devices/loop4 -%attr(640,root,disk) %dev(c,7,5) %{udev_scriptdir}/devices/loop5 -%attr(640,root,disk) %dev(c,7,6) %{udev_scriptdir}/devices/loop6 -%attr(640,root,disk) %dev(c,7,7) %{udev_scriptdir}/devices/loop7 +%attr(640,root,disk) %dev(b,7,0) %{udev_scriptdir}/devices/loop0 +%attr(640,root,disk) %dev(b,7,1) %{udev_scriptdir}/devices/loop1 +%attr(640,root,disk) %dev(b,7,2) %{udev_scriptdir}/devices/loop2 +%attr(640,root,disk) %dev(b,7,3) %{udev_scriptdir}/devices/loop3 +%attr(640,root,disk) %dev(b,7,4) %{udev_scriptdir}/devices/loop4 +%attr(640,root,disk) %dev(b,7,5) %{udev_scriptdir}/devices/loop5 +%attr(640,root,disk) %dev(b,7,6) %{udev_scriptdir}/devices/loop6 +%attr(640,root,disk) %dev(b,7,7) %{udev_scriptdir}/devices/loop7 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules @@ -348,6 +348,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Jul 20 2010 Harald Hoyer 160-8 +- make loop block device again + * Tue Jul 20 2010 Harald Hoyer 160-7 - turn off hotplug in /sys/kernel/uevent_helper or /proc/sys/kernel/hotplug From 61152969f16d478cecc323ee20cf94e10ed8bd5c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:37:56 +0000 Subject: [PATCH 571/640] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 22 ---------------------- branch | 1 - 3 files changed, 23 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 43f056c..0000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Makefile for source rpm: udev -# $Id$ -NAME := udev -SPECFILE = $(firstword $(wildcard *.spec)) -UPSTREAM_CHECKS = sign - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12 From cd22a06c9a7e17455469443eeb847899b9b5e4fc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:38:21 +0000 Subject: [PATCH 572/640] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 22 ---------------------- 2 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile 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 c72f44b..0000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Makefile for source rpm: udev -# $Id: Makefile,v 1.3 2007/10/15 19:29:11 notting Exp $ -NAME := udev -SPECFILE = $(firstword $(wildcard *.spec)) -UPSTREAM_CHECKS = sign - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From d2cb40f302ec24942f7d6d72801e80b7e0be983a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 17 Aug 2010 11:45:34 +0200 Subject: [PATCH 573/640] - udev-161 with an upstream quirk for the qemu cdrom and more cdrom handling bugfixes Resolves: rhbz#609049 rhbz#624286 - added floppy group Resolves: rhbz#620814 --- sources | 3 ++- udev.spec | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/sources b/sources index c193652..f53200e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -65459a1f090082c0471bf4e5112208d7 udev-160.tar.bz2 +2f42aff9f8c7258fecde71df321032b7 udev-161.tar.bz2.sign +95b6a0ffc9913f3e8021c65f51eb4f88 udev-161.tar.bz2 diff --git a/udev.spec b/udev.spec index 37d0082..8b8febb 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 160 -Release: 8%{?dist} +Version: 161 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -190,6 +190,7 @@ exit 0 getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : +getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then @@ -348,6 +349,20 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Aug 17 2010 Harald Hoyer 161-1 +- udev-161 with an upstream quirk for the qemu cdrom and + more cdrom handling bugfixes +Resolves: rhbz#609049 rhbz#624286 +- added floppy group +Resolves: rhbz#620814 + +* Fri Aug 06 2010 Harald Hoyer 160-9 +- added quirk to cdrom_id, to boot from qemu +Resolves: rhbz#609049 +- fix console switching and ACLs +Resolves: rhbz#608712 +- minor bugfixes + * Tue Jul 20 2010 Harald Hoyer 160-8 - make loop block device again From b11538a6c787f92b59f88c73b52069d4bf4f1fe8 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Sep 2010 11:26:01 +0200 Subject: [PATCH 574/640] - bugfixes for systemd service files - bugfix for selinux labeling - bugfixes for cdrom_id --- ...-cdrom_id-Add-media-status-debugging.patch | 26 ++++++++ ...-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch | 56 +++++++++++++++++ ...rop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch | 34 ++++++++++ 0004-init-update-systemd-service-files.patch | 42 +++++++++++++ 0005-init-update-systemd-service-files.patch | 38 +++++++++++ ...mistake-all-SCSI-processor-devices-f.patch | 33 ++++++++++ ...-description-in-systemd-service-file.patch | 47 ++++++++++++++ 0008-udevd-add-pid-to-kmsg-logs.patch | 41 ++++++++++++ ...it-edit-systemd-service-descriptions.patch | 47 ++++++++++++++ ...-required-extension-and-remove-some-.patch | 42 +++++++++++++ 0012-keymap-Add-Onkyo-PC.patch | 63 +++++++++++++++++++ 0013-keymap-Add-HP-G60.patch | 26 ++++++++ ...eeded-credential-passing-from-init_n.patch | 58 +++++++++++++++++ 0015-Add-support-for-oom_score_adj.patch | 48 ++++++++++++++ 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch | 28 +++++++++ ...ev-7-manpage-Fix-description-of-attr.patch | 32 ++++++++++ ...ix-crash-if-netlink-is-not-available.patch | 57 +++++++++++++++++ 0019-keymap-Fix-Acer-TravelMate-4720.patch | 28 +++++++++ ...-cdrom_id-Fix-DVD-RW-media-detection.patch | 53 ++++++++++++++++ ...-blank-detection-for-sloppy-firmware.patch | 42 +++++++++++++ ...text-on-add-but-not-on-change-events.patch | 35 +++++++++++ ...rsistent-name-rules-for-KVM-network-.patch | 28 +++++++++ udev.spec | 52 ++++++++++++++- 23 files changed, 955 insertions(+), 1 deletion(-) create mode 100644 0001-cdrom_id-Add-media-status-debugging.patch create mode 100644 0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch create mode 100644 0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch create mode 100644 0004-init-update-systemd-service-files.patch create mode 100644 0005-init-update-systemd-service-files.patch create mode 100644 0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch create mode 100644 0007-init-add-udev-to-description-in-systemd-service-file.patch create mode 100644 0008-udevd-add-pid-to-kmsg-logs.patch create mode 100644 0009-init-edit-systemd-service-descriptions.patch create mode 100644 0011-udev-7-Point-out-required-extension-and-remove-some-.patch create mode 100644 0012-keymap-Add-Onkyo-PC.patch create mode 100644 0013-keymap-Add-HP-G60.patch create mode 100644 0014-udevd-remove-unneeded-credential-passing-from-init_n.patch create mode 100644 0015-Add-support-for-oom_score_adj.patch create mode 100644 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch create mode 100644 0017-udev-7-manpage-Fix-description-of-attr.patch create mode 100644 0018-gudev-fix-crash-if-netlink-is-not-available.patch create mode 100644 0019-keymap-Fix-Acer-TravelMate-4720.patch create mode 100644 0020-cdrom_id-Fix-DVD-RW-media-detection.patch create mode 100644 0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch create mode 100644 0022-set-SELinux-context-on-add-but-not-on-change-events.patch create mode 100644 0023-do-not-create-persistent-name-rules-for-KVM-network-.patch diff --git a/0001-cdrom_id-Add-media-status-debugging.patch b/0001-cdrom_id-Add-media-status-debugging.patch new file mode 100644 index 0000000..f282114 --- /dev/null +++ b/0001-cdrom_id-Add-media-status-debugging.patch @@ -0,0 +1,26 @@ +From 24af530a543c70ac59fdd244377d648ef77a0e21 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 12 Aug 2010 07:10:12 +0200 +Subject: [PATCH 01/23] cdrom_id: Add media status debugging + +Show which media status the hardware originally reports, since we mangle it in +some cases. +--- + extras/cdrom_id/cdrom_id.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 83e95d5..d59991c 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -573,6 +573,7 @@ static int cd_media_info(struct udev *udev, int fd) + + cd_media = 1; + info(udev, "disk type %02x\n", header[8]); ++ info(udev, "hardware reported media status: %s\n", media_status[header[2] & 3]); + + /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ + if (!cd_media_cd_rom) +-- +1.7.2.2 + diff --git a/0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch b/0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch new file mode 100644 index 0000000..486c148 --- /dev/null +++ b/0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch @@ -0,0 +1,56 @@ +From 9cd075e35b8f660c75b0d72d4bea496fd6459f29 Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Thu, 12 Aug 2010 17:04:55 +0100 +Subject: [PATCH 02/23] Add keymap for Lenovo IdeaPad S10-3 + +Tested on S10-3, but presumably applicable to all IdeaPads. + +Signed-off-by: Martin Pitt +--- + Makefile.am | 1 + + extras/keymap/95-keymap.rules | 2 ++ + extras/keymap/keymaps/lenovo-ideapad | 7 +++++++ + 3 files changed, 10 insertions(+), 0 deletions(-) + create mode 100644 extras/keymap/keymaps/lenovo-ideapad + +diff --git a/Makefile.am b/Makefile.am +index c16b259..77df6ab 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -537,6 +537,7 @@ dist_udevkeymap_DATA = \ + extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint \ + extras/keymap/keymaps/inventec-symphony_6.0_7.0 \ + extras/keymap/keymaps/lenovo-3000 \ ++ extras/keymap/keymaps/lenovo-ideapad \ + extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \ + extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \ + extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \ +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 13b5571..2241422 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -65,6 +65,8 @@ ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+=" + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000" + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X6*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x6_tablet" + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X200 Tablet*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x200_tablet" ++ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*IdeaPad*", RUN+="keymap $name lenovo-ideapad" ++ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_name}=="S10-*", RUN+="keymap $name lenovo-ideapad" + + ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet" +diff --git a/extras/keymap/keymaps/lenovo-ideapad b/extras/keymap/keymaps/lenovo-ideapad +new file mode 100644 +index 0000000..d5f2567 +--- /dev/null ++++ b/extras/keymap/keymaps/lenovo-ideapad +@@ -0,0 +1,7 @@ ++# Key codes observed on S10-3, assumed valid on other IdeaPad models ++0x81 rfkill # does nothing in BIOS ++0x83 display_off # BIOS toggles screen state ++0xB9 brightnessup # does nothing in BIOS ++0xBA brightnessdown # does nothing in BIOS ++0xF1 camera # BIOS toggles camera power ++0xf2 unknown # trackpad enable/disable (does nothing in BIOS) +-- +1.7.2.2 + diff --git a/0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch b/0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch new file mode 100644 index 0000000..d476ee5 --- /dev/null +++ b/0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch @@ -0,0 +1,34 @@ +From b367a1c9d8a0f565effcdb45f86a365be1c8b622 Mon Sep 17 00:00:00 2001 +From: Jan Drzewiecki +Date: Fri, 13 Aug 2010 07:24:29 +0200 +Subject: [PATCH 03/23] cdrom_id: Drop MEDIA_SESSION_NEXT for DVD-RW-RO + +Commit cf2205a fixed the media status for fresh DVD-RW in restricted overwrite +mode, but missed a detail: We should not report the ID_CDROM_MEDIA_SESSION_NEXT +property either, since in that mode you can never append tracks/sessions; this +just works in sequential mode. + +Signed-off-by: Martin Pitt +--- + extras/cdrom_id/cdrom_id.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index d59991c..f9d6e0b 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -690,8 +690,9 @@ static int cd_media_info(struct udev *udev, int fd) + } + + determined: +- /* "other" is e. g. DVD-RAM, can't append sessions there either */ +- if ((header[2] & 3) < 2) ++ /* "other" is e. g. DVD-RAM, can't append sessions there; DVDs in ++ * restricted overwrite mode can never append, only in sequential mode */ ++ if ((header[2] & 3) < 2 && !cd_media_dvd_rw_ro) + cd_media_session_next = header[10] << 8 | header[5]; + cd_media_session_count = header[9] << 8 | header[4]; + cd_media_track_count = header[11] << 8 | header[6]; +-- +1.7.2.2 + diff --git a/0004-init-update-systemd-service-files.patch b/0004-init-update-systemd-service-files.patch new file mode 100644 index 0000000..a68e467 --- /dev/null +++ b/0004-init-update-systemd-service-files.patch @@ -0,0 +1,42 @@ +From 68bc0d7963a22967cc00244c4fad96fb45870712 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 17 Aug 2010 09:37:57 +0200 +Subject: [PATCH 04/23] init: update systemd service files + +--- + init/udev-retry.service.in | 4 ++-- + init/udev-settle.service.in | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in +index 7667899..d8ed8a8 100644 +--- a/init/udev-retry.service.in ++++ b/init/udev-retry.service.in +@@ -4,9 +4,9 @@ DefaultDependencies=no + After=local-fs.target udev.service + + [Service] +-Type=finish ++Type=oneshot + ValidNoProcess=yes +-ExecStart=@sbindir@/udevadm trigger --type=failed ++ExecStart=@sbindir@/udevadm trigger --type=failed --action=add + + [Install] + WantedBy=sysinit.target +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +index 0594d72..4db61f2 100644 +--- a/init/udev-settle.service.in ++++ b/init/udev-settle.service.in +@@ -4,7 +4,7 @@ DefaultDependencies=no + After=udev.service + + [Service] +-Type=finish ++Type=oneshot + ValidNoProcess=yes + ExecStart=@sbindir@/udevadm settle + +-- +1.7.2.2 + diff --git a/0005-init-update-systemd-service-files.patch b/0005-init-update-systemd-service-files.patch new file mode 100644 index 0000000..e7865d7 --- /dev/null +++ b/0005-init-update-systemd-service-files.patch @@ -0,0 +1,38 @@ +From bd078c90b97c73ba5fe7475947e6ecd20e2eb048 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 17 Aug 2010 18:53:57 +0200 +Subject: [PATCH 05/23] init: update systemd service files + +--- + init/udev-retry.service.in | 1 - + init/udev-settle.service.in | 2 +- + 2 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in +index d8ed8a8..7a0819c 100644 +--- a/init/udev-retry.service.in ++++ b/init/udev-retry.service.in +@@ -5,7 +5,6 @@ After=local-fs.target udev.service + + [Service] + Type=oneshot +-ValidNoProcess=yes + ExecStart=@sbindir@/udevadm trigger --type=failed --action=add + + [Install] +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +index 4db61f2..4cb33aa 100644 +--- a/init/udev-settle.service.in ++++ b/init/udev-settle.service.in +@@ -5,7 +5,7 @@ After=udev.service + + [Service] + Type=oneshot +-ValidNoProcess=yes ++RemainAfterExit=yes + ExecStart=@sbindir@/udevadm settle + + [Install] +-- +1.7.2.2 + diff --git a/0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch b/0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch new file mode 100644 index 0000000..0864ad4 --- /dev/null +++ b/0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch @@ -0,0 +1,33 @@ +From 3bd7b89dc40c4a0440ee5fce2ea907971bfcfb10 Mon Sep 17 00:00:00 2001 +From: Marco d'Itri +Date: Wed, 18 Aug 2010 13:35:25 +0200 +Subject: [PATCH 06/23] udev-acl: do not mistake all SCSI "processor" devices for scanner + +Both rules can be removed since now libsane sets libsane_matched also +for SCSI scanners. + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589751 +--- + extras/udev-acl/70-acl.rules | 6 +----- + 1 files changed, 1 insertions(+), 5 deletions(-) + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index 6ec04ee..c7134bc 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -13,11 +13,7 @@ SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl" + # digicams with proprietary protocol + ENV{ID_GPHOTO2}=="*?", TAG+="udev-acl" + +-# SCSI scanners +-KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG+="udev-acl" +-KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG+="udev-acl" +- +-# USB scanners ++# SCSI and USB scanners + ENV{libsane_matched}=="yes", TAG+="udev-acl" + + # HPLIP devices (necessary for ink level check and HP tool maintenance) +-- +1.7.2.2 + diff --git a/0007-init-add-udev-to-description-in-systemd-service-file.patch b/0007-init-add-udev-to-description-in-systemd-service-file.patch new file mode 100644 index 0000000..bb13a7b --- /dev/null +++ b/0007-init-add-udev-to-description-in-systemd-service-file.patch @@ -0,0 +1,47 @@ +From d15b727ef1375c665057c0fa278b2ea3778b8d3d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 19 Aug 2010 08:48:44 +0200 +Subject: [PATCH 07/23] init: add 'udev -' to description in systemd service files + +--- + init/udev-retry.service.in | 2 +- + init/udev-settle.service.in | 2 +- + init/udev.service.in | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in +index 7a0819c..a6612da 100644 +--- a/init/udev-retry.service.in ++++ b/init/udev-retry.service.in +@@ -1,5 +1,5 @@ + [Unit] +-Description=re-trigger failed events after filesystems are available ++Description=udev - re-trigger failed events after filesystems are available + DefaultDependencies=no + After=local-fs.target udev.service + +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +index 4cb33aa..578a24f 100644 +--- a/init/udev-settle.service.in ++++ b/init/udev-settle.service.in +@@ -1,5 +1,5 @@ + [Unit] +-Description=wait until full initialization ++Description=udev - wait until full initialization + DefaultDependencies=no + After=udev.service + +diff --git a/init/udev.service.in b/init/udev.service.in +index e95cb47..5a63b77 100644 +--- a/init/udev.service.in ++++ b/init/udev.service.in +@@ -1,5 +1,5 @@ + [Unit] +-Description=/dev and kernel device manager ++Description=udev - /dev and kernel device manager + DefaultDependencies=no + Before=sysinit.target + +-- +1.7.2.2 + diff --git a/0008-udevd-add-pid-to-kmsg-logs.patch b/0008-udevd-add-pid-to-kmsg-logs.patch new file mode 100644 index 0000000..5b7a8df --- /dev/null +++ b/0008-udevd-add-pid-to-kmsg-logs.patch @@ -0,0 +1,41 @@ +From c25bfbfb1b20781698ff3c8cbc884a9e190052ee Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 19 Aug 2010 08:49:43 +0200 +Subject: [PATCH 08/23] udevd: add pid to kmsg logs + +--- + udev/udev-event.c | 4 ++-- + udev/udevd.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/udev/udev-event.c b/udev/udev-event.c +index 9b5326b..ae523f8 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -454,8 +454,8 @@ static void rename_netif_kernel_log(struct ifreq ifr) + return; + } + +- fprintf(f, "<6>udev: renamed network interface %s to %s\n", +- ifr.ifr_name, ifr.ifr_newname); ++ fprintf(f, "<6>udev[%u]: renamed network interface %s to %s\n", ++ getpid(), ifr.ifr_name, ifr.ifr_newname); + fclose(f); + } + +diff --git a/udev/udevd.c b/udev/udevd.c +index 61b76f5..ad2ca3b 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -1298,7 +1298,7 @@ int main(int argc, char *argv[]) + + f = fopen("/dev/kmsg", "w"); + if (f != NULL) { +- fprintf(f, "<6>udev: starting version " VERSION "\n"); ++ fprintf(f, "<6>udev[%u]: starting version " VERSION "\n", getpid()); + fclose(f); + } + +-- +1.7.2.2 + diff --git a/0009-init-edit-systemd-service-descriptions.patch b/0009-init-edit-systemd-service-descriptions.patch new file mode 100644 index 0000000..45b8119 --- /dev/null +++ b/0009-init-edit-systemd-service-descriptions.patch @@ -0,0 +1,47 @@ +From 4c9b12a7aa57e43e568b78da9cbed4138b1292df Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 19 Aug 2010 18:02:20 +0200 +Subject: [PATCH 09/23] init: edit systemd service descriptions + +--- + init/udev-retry.service.in | 2 +- + init/udev-settle.service.in | 2 +- + init/udev.service.in | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in +index a6612da..ab8241b 100644 +--- a/init/udev-retry.service.in ++++ b/init/udev-retry.service.in +@@ -1,5 +1,5 @@ + [Unit] +-Description=udev - re-trigger failed events after filesystems are available ++Description=udev Retry Failed Events + DefaultDependencies=no + After=local-fs.target udev.service + +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +index 578a24f..d58ea9c 100644 +--- a/init/udev-settle.service.in ++++ b/init/udev-settle.service.in +@@ -1,5 +1,5 @@ + [Unit] +-Description=udev - wait until full initialization ++Description=udev Wait for Complete Device Initialization + DefaultDependencies=no + After=udev.service + +diff --git a/init/udev.service.in b/init/udev.service.in +index 5a63b77..b07f4db 100644 +--- a/init/udev.service.in ++++ b/init/udev.service.in +@@ -1,5 +1,5 @@ + [Unit] +-Description=udev - /dev and kernel device manager ++Description=udev Kernel Device Manager + DefaultDependencies=no + Before=sysinit.target + +-- +1.7.2.2 + diff --git a/0011-udev-7-Point-out-required-extension-and-remove-some-.patch b/0011-udev-7-Point-out-required-extension-and-remove-some-.patch new file mode 100644 index 0000000..bd75f26 --- /dev/null +++ b/0011-udev-7-Point-out-required-extension-and-remove-some-.patch @@ -0,0 +1,42 @@ +From 6593e8961afbe0b74d5a67c545a991c7733e88df Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Fri, 20 Aug 2010 12:19:23 +0200 +Subject: [PATCH 11/23] udev(7): Point out required extension, and remove some confusion + +Rules files must end in .rules. + +Also drop the redundant and confusing sentence about "file names must be +unique". What is really meant is explained in a better way in the paragraph +above. + +https://launchpad.net/bugs/616108 +--- + udev/udev.xml | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/udev/udev.xml b/udev/udev.xml +index 20c394c..336b203 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -75,12 +75,13 @@ + the custom rules directory /etc/udev/rules.d/ + and the temporary rules directory /dev/.udev/rules.d/. + All rule files are sorted and processed in lexical order, regardless +- in which of these directories they live. ++ in which of these directories they live. Files in ++ /etc/udev/rules.d/ have precedence over files with ++ the same name in /lib/udev/rules.d/. This can be ++ used to ignore a default rules file if needed. + +- Rule files are required to have a unique name, duplicate file names +- are ignored. Files in /etc/udev/rules.d/ have precedence +- over files with the same name in /lib/udev/rules.d/. This +- can be used to ignore a default rules file if needed. ++ Rule files must end in .rules, other extensions ++ are ignored. + + Every line in the rules file contains at least one key value pair. + There are two kind of keys, match and assignment keys. +-- +1.7.2.2 + diff --git a/0012-keymap-Add-Onkyo-PC.patch b/0012-keymap-Add-Onkyo-PC.patch new file mode 100644 index 0000000..e7b283b --- /dev/null +++ b/0012-keymap-Add-Onkyo-PC.patch @@ -0,0 +1,63 @@ +From acf865b68e1a5c78677537b373b6e082c287fc27 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Sun, 22 Aug 2010 11:00:34 +0200 +Subject: [PATCH 12/23] keymap: Add Onkyo PC + +Thanks to Pau Oliva! + +https://launchpad.net/bugs/612529 +--- + Makefile.am | 1 + + extras/keymap/95-keymap.rules | 2 ++ + extras/keymap/keymaps/onkyo | 14 ++++++++++++++ + 3 files changed, 17 insertions(+), 0 deletions(-) + create mode 100644 extras/keymap/keymaps/onkyo + +diff --git a/Makefile.am b/Makefile.am +index 77df6ab..512de34 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -555,6 +555,7 @@ dist_udevkeymap_DATA = \ + extras/keymap/keymaps/module-sony \ + extras/keymap/keymaps/module-sony-old \ + extras/keymap/keymaps/olpc-xo \ ++ extras/keymap/keymaps/onkyo \ + extras/keymap/keymaps/oqo-model2 \ + extras/keymap/keymaps/samsung-other \ + extras/keymap/keymaps/samsung-sq1us \ +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 2241422..e9d5721 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -127,6 +127,8 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+=" + + ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2" + ++ENV{DMI_VENDOR}=="ONKYO CORPORATION", ATTR{[dmi/id]product_name}=="ONKYOPC", RUN+="keymap $name onkyo" ++ + ENV{DMI_VENDOR}=="ASUS", RUN+="keymap $name asus" + + ENV{DMI_VENDOR}=="VIA", ATTR{[dmi/id]product_name}=="K8N800", ATTR{[dmi/id]product_version}=="VT8204B", RUN+="keymap $name 0x81 prog1" +diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo +new file mode 100644 +index 0000000..7dd80a1 +--- /dev/null ++++ b/extras/keymap/keymaps/onkyo +@@ -0,0 +1,14 @@ ++0xA0 mute # Fn+D ++0xAE volumedown # Fn+F ++0xB0 volumeup # Fn+G ++0xDF sleep # Fn+W ++0xE0 bluetooth # Fn+H ++0xE2 cyclewindows # Fn+Esc ++0xEE battery # Fn+Q ++0xF0 media # Fn+R ++0xF5 switchvideomode # Fn+E ++0xF6 camera # Fn+T ++0xF7 f22 # Fn+Y (touchpad toggle) ++0xF8 brightnessup # Fn+S ++0xF9 brightnessdown # Fn+A ++0xFB wlan # Fn+J +-- +1.7.2.2 + diff --git a/0013-keymap-Add-HP-G60.patch b/0013-keymap-Add-HP-G60.patch new file mode 100644 index 0000000..cbeb33c --- /dev/null +++ b/0013-keymap-Add-HP-G60.patch @@ -0,0 +1,26 @@ +From 92cffb0bd18bd8fd245666a519ad0e54dc537031 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Mon, 23 Aug 2010 10:47:28 +0200 +Subject: [PATCH 13/23] keymap: Add HP G60 + +https://launchpad.net/bugs/554944 +--- + extras/keymap/95-keymap.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index e9d5721..5656de9 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -72,7 +72,7 @@ ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keymap $name hewlett-packard-pavilion" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*|*2230s*", RUN+="keymap $name hewlett-packard-compaq_elitebook" +-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*", RUN+="keymap $name hewlett-packard-2510p_2530p" ++ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keymap $name hewlett-packard-2510p_2530p" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2" + ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100" + # HP Pavillion dv6315ea has empty DMI_VENDOR +-- +1.7.2.2 + diff --git a/0014-udevd-remove-unneeded-credential-passing-from-init_n.patch b/0014-udevd-remove-unneeded-credential-passing-from-init_n.patch new file mode 100644 index 0000000..858371b --- /dev/null +++ b/0014-udevd-remove-unneeded-credential-passing-from-init_n.patch @@ -0,0 +1,58 @@ +From 13f90be7a33353fdbcd4a389630a05c608bdf2a4 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 25 Aug 2010 16:26:54 +0200 +Subject: [PATCH 14/23] udevd: remove unneeded credential passing from init_notify() + +--- + udev/udevd.c | 17 ----------------- + 1 files changed, 0 insertions(+), 17 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index ad2ca3b..374a4e0 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -964,15 +964,10 @@ static int init_notify(const char *state) + int fd = -1, r; + struct msghdr msghdr; + struct iovec iovec; +- struct ucred *ucred; + union { + struct sockaddr sa; + struct sockaddr_un un; + } sockaddr; +- union { +- struct cmsghdr cmsghdr; +- uint8_t buf[CMSG_SPACE(sizeof(struct ucred))]; +- } control; + const char *e; + + if (!(e = getenv("NOTIFY_SOCKET"))) { +@@ -1002,16 +997,6 @@ static int init_notify(const char *state) + iovec.iov_base = (char*) state; + iovec.iov_len = strlen(state); + +- memset(&control, 0, sizeof(control)); +- control.cmsghdr.cmsg_level = SOL_SOCKET; +- control.cmsghdr.cmsg_type = SCM_CREDENTIALS; +- control.cmsghdr.cmsg_len = CMSG_LEN(sizeof(struct ucred)); +- +- ucred = (struct ucred*) CMSG_DATA(&control.cmsghdr); +- ucred->pid = getpid(); +- ucred->uid = getuid(); +- ucred->gid = getgid(); +- + memset(&msghdr, 0, sizeof(msghdr)); + msghdr.msg_name = &sockaddr; + msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e); +@@ -1019,8 +1004,6 @@ static int init_notify(const char *state) + msghdr.msg_namelen = sizeof(struct sockaddr_un); + msghdr.msg_iov = &iovec; + msghdr.msg_iovlen = 1; +- msghdr.msg_control = &control; +- msghdr.msg_controllen = control.cmsghdr.cmsg_len; + + if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) { + r = -errno; +-- +1.7.2.2 + diff --git a/0015-Add-support-for-oom_score_adj.patch b/0015-Add-support-for-oom_score_adj.patch new file mode 100644 index 0000000..e00e50d --- /dev/null +++ b/0015-Add-support-for-oom_score_adj.patch @@ -0,0 +1,48 @@ +From c61eea9459045c2c9032a0c98234985a371fac58 Mon Sep 17 00:00:00 2001 +From: Luca Tettamanti +Date: Mon, 23 Aug 2010 14:35:37 +0200 +Subject: [PATCH 15/23] Add support for oom_score_adj + +/proc//oom_adj has been deprecated (kernel v2.6.36) due to the +rework of the badness heuristic; oom_score_adj is the replacement. +Keep a fallback to the old interface for compatibility with older +kernels. + +See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a63d83f427fbce97a6cea0db2e64b0eb8435cd10 + +Signed-off-by: Martin Pitt +--- + udev/udevd.c | 15 +++++++++++---- + 1 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index 374a4e0..0ec3c3d 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -1285,12 +1285,19 @@ int main(int argc, char *argv[]) + fclose(f); + } + +- /* OOM_DISABLE == -17 */ +- fd = open("/proc/self/oom_adj", O_RDWR); ++ fd = open("/proc/self/oom_score_adj", O_RDWR); + if (fd < 0) { +- err(udev, "error disabling OOM: %m\n"); ++ /* Fallback to old interface */ ++ fd = open("/proc/self/oom_adj", O_RDWR); ++ if (fd < 0) { ++ err(udev, "error disabling OOM: %m\n"); ++ } else { ++ /* OOM_DISABLE == -17 */ ++ write(fd, "-17", 3); ++ close(fd); ++ } + } else { +- write(fd, "-17", 3); ++ write(fd, "-1000", 5); + close(fd); + } + +-- +1.7.2.2 + diff --git a/0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch b/0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch new file mode 100644 index 0000000..d5c7fff --- /dev/null +++ b/0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch @@ -0,0 +1,28 @@ +From 38b5ccbcf7f3643ea8180a8186cfe3e5fa9cb983 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Wed, 25 Aug 2010 17:02:51 +0200 +Subject: [PATCH 16/23] keymap: Fix Sony VAIO VGN-SZ2HP/B + +Reportedly this needs the module-sony keymap, not the -old one. + +https://launchpad.net/bugs/613578 +--- + extras/keymap/95-keymap.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 5656de9..cb066bd 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -46,7 +46,7 @@ ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", + ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony" + + # Older Vaios have some different keys +-ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*|*VGN-SZ2HP_B*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old" ++ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old" + + # + # The following rules belong to standard i8042 AT keyboard with high key codes. +-- +1.7.2.2 + diff --git a/0017-udev-7-manpage-Fix-description-of-attr.patch b/0017-udev-7-manpage-Fix-description-of-attr.patch new file mode 100644 index 0000000..6b41ecf --- /dev/null +++ b/0017-udev-7-manpage-Fix-description-of-attr.patch @@ -0,0 +1,32 @@ +From 83184d008ba23724fd30996440534c0633a0d0aa Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Fri, 27 Aug 2010 16:54:52 +0200 +Subject: [PATCH 17/23] udev(7) manpage: Fix description of $attr + +Fix the manpage to describe the real behaviour of $attr: It doesn't search all +parent devices any more, just the one selected by KERNELS etc. + +https://launchpad.net/bugs/348513 +--- + udev/udev.xml | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/udev/udev.xml b/udev/udev.xml +index 336b203..6085dff 100644 +--- a/udev/udev.xml ++++ b/udev/udev.xml +@@ -578,8 +578,9 @@ + + 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, follow the chain of parent devices and use the value +- of the first attribute that matches. ++ such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or ++ ATTRS test selected a parent device, use the attribute from that ++ parent device. + If the attribute is a symlink, the last element of the symlink target is + returned as the value. + +-- +1.7.2.2 + diff --git a/0018-gudev-fix-crash-if-netlink-is-not-available.patch b/0018-gudev-fix-crash-if-netlink-is-not-available.patch new file mode 100644 index 0000000..2a5872e --- /dev/null +++ b/0018-gudev-fix-crash-if-netlink-is-not-available.patch @@ -0,0 +1,57 @@ +From e4dcdc4ab232bcbbe61a2026c16e647d9302cdd2 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Fri, 27 Aug 2010 18:12:59 +0200 +Subject: [PATCH 18/23] gudev: fix crash if netlink is not available + +gudev_client_new() assumes that priv->monitor is never NULL, but this happens +on older kernels. Let's not crash client programs because of that. + +https://launchpad.net/bugs/581527 +--- + extras/gudev/gudevclient.c | 18 ++++++++++++------ + 1 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/extras/gudev/gudevclient.c b/extras/gudev/gudevclient.c +index fa31f70..f5f7a19 100644 +--- a/extras/gudev/gudevclient.c ++++ b/extras/gudev/gudevclient.c +@@ -93,6 +93,8 @@ monitor_event (GIOChannel *source, + GUdevDevice *device; + struct udev_device *udevice; + ++ if (client->priv->monitor == NULL) ++ goto out; + udevice = udev_monitor_receive_device (client->priv->monitor); + if (udevice == NULL) + goto out; +@@ -216,17 +218,21 @@ g_udev_client_constructed (GObject *object) + *s = '\0'; + } + +- udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype); ++ if (client->priv->monitor != NULL) ++ udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype); + + g_free (subsystem); + } + + /* listen to events, and buffer them */ +- udev_monitor_enable_receiving (client->priv->monitor); +- +- channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor)); +- client->priv->watch_id = g_io_add_watch (channel, G_IO_IN, monitor_event, client); +- g_io_channel_unref (channel); ++ if (client->priv->monitor != NULL) ++ { ++ udev_monitor_enable_receiving (client->priv->monitor); ++ channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor)); ++ client->priv->watch_id = g_io_add_watch (channel, G_IO_IN, monitor_event, client); ++ g_io_channel_unref (channel); ++ } else ++ client->priv->watch_id = NULL; + } + + if (G_OBJECT_CLASS (g_udev_client_parent_class)->constructed != NULL) +-- +1.7.2.2 + diff --git a/0019-keymap-Fix-Acer-TravelMate-4720.patch b/0019-keymap-Fix-Acer-TravelMate-4720.patch new file mode 100644 index 0000000..35a9922 --- /dev/null +++ b/0019-keymap-Fix-Acer-TravelMate-4720.patch @@ -0,0 +1,28 @@ +From d17c065e28fa4baac90b02b4913c7ef32d54f3c7 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Fri, 27 Aug 2010 18:48:53 +0200 +Subject: [PATCH 19/23] keymap: Fix Acer TravelMate 4720 + +The previous change just fixed the Bluetooth key, but Screen Lock and Browser +also need to be changed. + +https://launchpad.net/bugs/569815 +--- + extras/keymap/95-keymap.rules | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index cb066bd..913b380 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -85,6 +85,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*4720*", RUN+="keymap $name 0xB2 www 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" +-- +1.7.2.2 + diff --git a/0020-cdrom_id-Fix-DVD-RW-media-detection.patch b/0020-cdrom_id-Fix-DVD-RW-media-detection.patch new file mode 100644 index 0000000..4a91a4e --- /dev/null +++ b/0020-cdrom_id-Fix-DVD-RW-media-detection.patch @@ -0,0 +1,53 @@ +From 2458db3edd8d66827b34978ff471dff8f879e9ab Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Mon, 30 Aug 2010 15:33:26 +0200 +Subject: [PATCH 20/23] cdrom_id: Fix DVD-RW media detection + +Commit cf2205a19 applied the "restricted overwrite" vs. "sequential" DVD-RW +test to feature_profiles() (which reads the drive capabilities), which caused +every DVD medium to be detected as ID_CDROM_MEDIA_DVD_RW. Now apply it to +cd_profiles() instead, to just check the current profile. +--- + extras/cdrom_id/cdrom_id.c | 13 +++++++------ + 1 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index f9d6e0b..8480d7b 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -297,14 +297,9 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si + cd_dvd_ram = 1; + break; + case 0x13: +- info(udev, "profile 0x%02x media_dvd_rw\n", profile); +- cd_media_dvd_rw = 1; +- cd_media_dvd_rw_ro = 1; +- break; + case 0x14: + info(udev, "profile 0x%02x dvd_rw\n", profile); + cd_dvd_rw = 1; +- cd_media_dvd_rw_seq = 1; + break; + case 0x1B: + info(udev, "profile 0x%02x dvd_plus_r\n", profile); +@@ -486,10 +481,16 @@ static int cd_profiles(struct udev *udev, int fd) + cd_media_dvd_ram = 1; + break; + case 0x13: ++ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_ro = 1; ++ break; + case 0x14: +- info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile); ++ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); + cd_media = 1; + cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_seq = 1; + break; + case 0x1B: + info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); +-- +1.7.2.2 + diff --git a/0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch b/0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch new file mode 100644 index 0000000..d033307 --- /dev/null +++ b/0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch @@ -0,0 +1,42 @@ +From 5e267ea5a36de0b2a9a8965ca93dd45bbd6b1a8b Mon Sep 17 00:00:00 2001 +From: Jan Drzewiecki +Date: Tue, 31 Aug 2010 00:37:28 +0200 +Subject: [PATCH 21/23] cdrom_id: Fix DVD blank detection for sloppy firmware + +Reportedly, many CD drive firmwares will only consider the MSB in a READ +command, thus if we request 17 blocks to be read, we'll actually only get 16 in +many cases, and thus miss out the interesting sector #17. This would lead to +falsely considering nonempty DVDs as blank. + +Fetch 32 blocks now, which should work everywhere. + +Signed-off-by: Martin Pitt +--- + extras/cdrom_id/cdrom_id.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 8480d7b..0153af6 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -590,7 +590,7 @@ static int cd_media_info(struct udev *udev, int fd) + * always "complete", DVD-RAM are "other" or "complete" if the disc is + * write protected; we need to check the contents if it is blank */ + if ((cd_media_dvd_rw_ro || cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) { +- unsigned char buffer[17 * 2048]; ++ unsigned char buffer[32 * 2048]; + unsigned char result, len; + int block, offset; + +@@ -661,7 +661,7 @@ static int cd_media_info(struct udev *udev, int fd) + scsi_cmd_init(udev, &sc, buffer, sizeof(buffer)); + scsi_cmd_set(udev, &sc, 0, 0x28); + scsi_cmd_set(udev, &sc, 5, 0); +- scsi_cmd_set(udev, &sc, 8, 17); ++ scsi_cmd_set(udev, &sc, 8, 32); + scsi_cmd_set(udev, &sc, 9, 0); + err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer)); + if ((err != 0)) { +-- +1.7.2.2 + diff --git a/0022-set-SELinux-context-on-add-but-not-on-change-events.patch b/0022-set-SELinux-context-on-add-but-not-on-change-events.patch new file mode 100644 index 0000000..aa99300 --- /dev/null +++ b/0022-set-SELinux-context-on-add-but-not-on-change-events.patch @@ -0,0 +1,35 @@ +From 326c5fc3ea684825629eccaf33a548759162a539 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 31 Aug 2010 21:29:21 +0200 +Subject: [PATCH 22/23] set SELinux context on 'add' but not on 'change' events + +--- + udev/udev-node.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/udev/udev-node.c b/udev/udev-node.c +index 228b3eb..c8113f1 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -56,10 +56,17 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_ + info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); + chmod(file, mode); + chown(file, uid, gid); +- udev_selinux_lsetfilecon(udev, file, mode); + } else { + info(udev, "preserve permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); + } ++ /* ++ * Set initial selinux file context only on add events. ++ * We set the proper context on bootup (triger) or for newly ++ * added devices, but we don't change it later, in case ++ * something else has set a custom context in the meantime. ++ */ ++ if (strcmp(udev_device_get_action(dev), "add") == 0) ++ udev_selinux_lsetfilecon(udev, file, mode); + /* always update timestamp when we re-use the node, like on media change events */ + utimensat(AT_FDCWD, file, NULL, 0); + } else { +-- +1.7.2.2 + diff --git a/0023-do-not-create-persistent-name-rules-for-KVM-network-.patch b/0023-do-not-create-persistent-name-rules-for-KVM-network-.patch new file mode 100644 index 0000000..16b7dab --- /dev/null +++ b/0023-do-not-create-persistent-name-rules-for-KVM-network-.patch @@ -0,0 +1,28 @@ +From af29bf0966994bc233282148f519e12ea29e1c5a Mon Sep 17 00:00:00 2001 +From: Marco d'Itri +Date: Tue, 31 Aug 2010 21:44:34 +0200 +Subject: [PATCH 23/23] do not create persistent name rules for KVM network interfaces + +The virtual interfaces created by KVM are stable, 54:52:00 is the MAC-48 +range of KVM. +--- + .../75-persistent-net-generator.rules | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules +index a9dfdce..8119d0e 100644 +--- a/extras/rule_generator/75-persistent-net-generator.rules ++++ b/extras/rule_generator/75-persistent-net-generator.rules +@@ -29,6 +29,9 @@ ENV{MATCHADDR}="$attr{address}" + # match interface type + ENV{MATCHIFTYPE}="$attr{type}" + ++# ignore KVM virtual interfaces ++ENV{MATCHADDR}=="54:52:00:*", GOTO="persistent_net_generator_end" ++ + # These vendors are known to violate the local MAC address assignment scheme + # Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom + ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist" +-- +1.7.2.2 + diff --git a/udev.spec b/udev.spec index 8b8febb..6fc041f 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 161 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -17,6 +17,29 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev-post.init +Patch1: 0001-cdrom_id-Add-media-status-debugging.patch +Patch2: 0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch +Patch3: 0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch +Patch4: 0004-init-update-systemd-service-files.patch +Patch5: 0005-init-update-systemd-service-files.patch +Patch6: 0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch +Patch7: 0007-init-add-udev-to-description-in-systemd-service-file.patch +Patch8: 0008-udevd-add-pid-to-kmsg-logs.patch +Patch9: 0009-init-edit-systemd-service-descriptions.patch +Patch11: 0011-udev-7-Point-out-required-extension-and-remove-some-.patch +Patch12: 0012-keymap-Add-Onkyo-PC.patch +Patch13: 0013-keymap-Add-HP-G60.patch +Patch14: 0014-udevd-remove-unneeded-credential-passing-from-init_n.patch +Patch15: 0015-Add-support-for-oom_score_adj.patch +Patch16: 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch +Patch17: 0017-udev-7-manpage-Fix-description-of-attr.patch +Patch18: 0018-gudev-fix-crash-if-netlink-is-not-available.patch +Patch19: 0019-keymap-Fix-Acer-TravelMate-4720.patch +Patch20: 0020-cdrom_id-Fix-DVD-RW-media-detection.patch +Patch21: 0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch +Patch22: 0022-set-SELinux-context-on-add-but-not-on-change-events.patch +Patch23: 0023-do-not-create-persistent-name-rules-for-KVM-network-.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -113,6 +136,28 @@ glib-based applications using libudev functionality. %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 +%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 +%patch23 -p1 -b .git23 %build libtoolize -f -c @@ -349,6 +394,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Sep 01 2010 Harald Hoyer 161-2 +- bugfixes for systemd service files +- bugfix for selinux labeling +- bugfixes for cdrom_id + * Tue Aug 17 2010 Harald Hoyer 161-1 - udev-161 with an upstream quirk for the qemu cdrom and more cdrom handling bugfixes From eeb28fb1718e5061ff5736683b9941f701084d18 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 21 Sep 2010 13:43:32 +0200 Subject: [PATCH 575/640] - backported the upstream cdrom_id bugfixes and enhancements (bug #533643) - backported the upstream keymaps bugfixes and enhancements (bug #444440) - fixed floppy devices (bug#492404) --- udev-145-cdrom_id-backport.patch | 298 ++ udev-145-floppy.patch | 14 + udev-145-keymap-backport.patch | 4134 +++++++++++++++++ ...ives-use-ID_CDROM_MEDIA_TRACK_COUNT_.patch | 14 + udev-145.tar.bz2.sign | 8 - udev.spec | 27 +- 6 files changed, 4483 insertions(+), 12 deletions(-) create mode 100644 udev-145-cdrom_id-backport.patch create mode 100644 udev-145-floppy.patch create mode 100644 udev-145-keymap-backport.patch create mode 100644 udev-145-rules-optical-drives-use-ID_CDROM_MEDIA_TRACK_COUNT_.patch delete mode 100644 udev-145.tar.bz2.sign diff --git a/udev-145-cdrom_id-backport.patch b/udev-145-cdrom_id-backport.patch new file mode 100644 index 0000000..baa5d8a --- /dev/null +++ b/udev-145-cdrom_id-backport.patch @@ -0,0 +1,298 @@ +diff -urN udev-145-orig/extras/cdrom_id/60-cdrom_id.rules udev-145/extras/cdrom_id/60-cdrom_id.rules +--- udev-145-orig/extras/cdrom_id/60-cdrom_id.rules 2010-09-21 12:05:03.025750002 +0200 ++++ udev-145/extras/cdrom_id/60-cdrom_id.rules 2010-06-11 10:52:56.000000000 +0200 +@@ -1,7 +1,6 @@ + # do not edit this file, it will be overwritten on update + +-# import optical drive properties +-ACTION!="add|change", GOTO="cdrom_end" ++ACTION=="remove", GOTO="cdrom_end" + SUBSYSTEM!="block", GOTO="cdrom_end" + KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" + ENV{DEVTYPE}!="disk", GOTO="cdrom_end" +Binary files udev-145-orig/extras/cdrom_id/cdrom_id and udev-145/extras/cdrom_id/cdrom_id differ +diff -urN udev-145-orig/extras/cdrom_id/cdrom_id.c udev-145/extras/cdrom_id/cdrom_id.c +--- udev-145-orig/extras/cdrom_id/cdrom_id.c 2010-09-21 12:05:03.024750002 +0200 ++++ udev-145/extras/cdrom_id/cdrom_id.c 2010-08-31 10:35:41.000000000 +0200 +@@ -85,6 +85,8 @@ + static unsigned int cd_media_dvd_rom = 0; + static unsigned int cd_media_dvd_r = 0; + static unsigned int cd_media_dvd_rw = 0; ++static unsigned int cd_media_dvd_rw_ro = 0; /* restricted overwrite mode */ ++static unsigned int cd_media_dvd_rw_seq = 0; /* sequential mode */ + static unsigned int cd_media_dvd_ram = 0; + static unsigned int cd_media_dvd_plus_r = 0; + static unsigned int cd_media_dvd_plus_rw = 0; +@@ -200,27 +202,27 @@ + + static int cd_capability_compat(struct udev *udev, int fd) + { +- int capabilty; ++ int capability; + +- capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL); +- if (capabilty < 0) { ++ capability = ioctl(fd, CDROM_GET_CAPABILITY, NULL); ++ if (capability < 0) { + info(udev, "CDROM_GET_CAPABILITY failed\n"); + return -1; + } + +- if (capabilty & CDC_CD_R) ++ if (capability & CDC_CD_R) + cd_cd_r = 1; +- if (capabilty & CDC_CD_RW) ++ if (capability & CDC_CD_RW) + cd_cd_rw = 1; +- if (capabilty & CDC_DVD) ++ if (capability & CDC_DVD) + cd_dvd_rom = 1; +- if (capabilty & CDC_DVD_R) ++ if (capability & CDC_DVD_R) + cd_dvd_r = 1; +- if (capabilty & CDC_DVD_RAM) ++ if (capability & CDC_DVD_RAM) + cd_dvd_ram = 1; +- if (capabilty & CDC_MRW) ++ if (capability & CDC_MRW) + cd_mrw = 1; +- if (capabilty & CDC_MRW_W) ++ if (capability & CDC_MRW_W) + cd_mrw_w = 1; + return 0; + } +@@ -348,6 +350,39 @@ + return 0; + } + ++static int cd_profiles_old_mmc(struct udev *udev, int fd) ++{ ++ struct scsi_cmd sc; ++ int err; ++ ++ unsigned char header[32]; ++ ++ scsi_cmd_init(udev, &sc, header, sizeof(header)); ++ scsi_cmd_set(udev, &sc, 0, 0x51); ++ scsi_cmd_set(udev, &sc, 8, sizeof(header)); ++ scsi_cmd_set(udev, &sc, 9, 0); ++ err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header)); ++ if ((err != 0)) { ++ info_scsi_cmd_err(udev, "READ DISC INFORMATION", err); ++ info(udev, "no current profile, assuming no media\n"); ++ return -1; ++ }; ++ ++ cd_media = 1; ++ ++ if (header[2] & 16) { ++ cd_media_cd_rw = 1; ++ info(udev, "profile 0x0a media_cd_rw\n"); ++ } else if ((header[2] & 3) < 2 && cd_cd_r) { ++ cd_media_cd_r = 1; ++ info(udev, "profile 0x09 media_cd_r\n"); ++ } else { ++ cd_media_cd_rom = 1; ++ info(udev, "profile 0x08 media_cd_rom\n"); ++ } ++ return 0; ++} ++ + static int cd_profiles(struct udev *udev, int fd) + { + struct scsi_cmd sc; +@@ -365,6 +400,12 @@ + err = scsi_cmd_run(udev, &sc, fd, features, sizeof(features)); + if ((err != 0)) { + info_scsi_cmd_err(udev, "GET CONFIGURATION", err); ++ /* handle pre-MMC2 drives which do not support GET CONFIGURATION */ ++ if (SK(err) == 0x5 && ASC(err) == 0x20) { ++ info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n"); ++ info(udev, "trying to work around the problem\n"); ++ return cd_profiles_old_mmc(udev, fd); ++ } + return -1; + } + +@@ -440,10 +481,16 @@ + cd_media_dvd_ram = 1; + break; + case 0x13: ++ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_ro = 1; ++ break; + case 0x14: +- info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile); ++ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); + cd_media = 1; + cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_seq = 1; + break; + case 0x1B: + info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); +@@ -527,12 +574,126 @@ + + cd_media = 1; + info(udev, "disk type %02x\n", header[8]); ++ info(udev, "hardware reported media status: %s\n", media_status[header[2] & 3]); + + /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ + if (!cd_media_cd_rom) + cd_media_state = media_status[header[2] & 3]; + +- if ((header[2] & 3) != 2) ++ /* fresh DVD-RW in restricted overwite mode reports itself as ++ * "appendable"; change it to "blank" to make it consistent with what ++ * gets reported after blanking, and what userspace expects */ ++ if (cd_media_dvd_rw_ro && (header[2] & 3) == 1) ++ cd_media_state = media_status[0]; ++ ++ /* DVD+RW discs (and DVD-RW in restricted mode) once formatted are ++ * always "complete", DVD-RAM are "other" or "complete" if the disc is ++ * write protected; we need to check the contents if it is blank */ ++ if ((cd_media_dvd_rw_ro || cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) { ++ unsigned char buffer[32 * 2048]; ++ unsigned char result, len; ++ int block, offset; ++ ++ if (cd_media_dvd_ram) { ++ /* a write protected dvd-ram may report "complete" status */ ++ ++ unsigned char dvdstruct[8]; ++ unsigned char format[12]; ++ ++ scsi_cmd_init(udev, &sc, dvdstruct, sizeof(dvdstruct)); ++ scsi_cmd_set(udev, &sc, 0, 0xAD); ++ scsi_cmd_set(udev, &sc, 7, 0xC0); ++ scsi_cmd_set(udev, &sc, 9, sizeof(dvdstruct)); ++ scsi_cmd_set(udev, &sc, 11, 0); ++ err = scsi_cmd_run(udev, &sc, fd, dvdstruct, sizeof(dvdstruct)); ++ if ((err != 0)) { ++ info_scsi_cmd_err(udev, "READ DVD STRUCTURE", err); ++ return -1; ++ } ++ if (dvdstruct[4] & 0x02) { ++ cd_media_state = media_status[2]; ++ info(udev, "write-protected DVD-RAM media inserted\n"); ++ goto determined; ++ } ++ ++ /* let's make sure we don't try to read unformatted media */ ++ scsi_cmd_init(udev, &sc, format, sizeof(format)); ++ scsi_cmd_set(udev, &sc, 0, 0x23); ++ scsi_cmd_set(udev, &sc, 8, sizeof(format)); ++ scsi_cmd_set(udev, &sc, 9, 0); ++ err = scsi_cmd_run(udev, &sc, fd, format, sizeof(format)); ++ if ((err != 0)) { ++ info_scsi_cmd_err(udev, "READ DVD FORMAT CAPACITIES", err); ++ return -1; ++ } ++ ++ len = format[3]; ++ if (len & 7 || len < 16) { ++ info(udev, "invalid format capacities length\n"); ++ return -1; ++ } ++ ++ switch(format[8] & 3) { ++ case 1: ++ info(udev, "unformatted DVD-RAM media inserted\n"); ++ /* This means that last format was interrupted ++ * or failed, blank dvd-ram discs are factory ++ * formatted. Take no action here as it takes ++ * quite a while to reformat a dvd-ram and it's ++ * not automatically started */ ++ goto determined; ++ ++ case 2: ++ info(udev, "formatted DVD-RAM media inserted\n"); ++ break; ++ ++ case 3: ++ cd_media = 0; //return no media ++ info(udev, "format capacities returned no media\n"); ++ return -1; ++ } ++ } ++ ++ /* Take a closer look at formatted media (unformatted DVD+RW ++ * has "blank" status", DVD-RAM was examined earlier) and check ++ * for ISO and UDF PVDs or a fs superblock presence and do it ++ * in one ioctl (we need just sectors 0 and 16) */ ++ scsi_cmd_init(udev, &sc, buffer, sizeof(buffer)); ++ scsi_cmd_set(udev, &sc, 0, 0x28); ++ scsi_cmd_set(udev, &sc, 5, 0); ++ scsi_cmd_set(udev, &sc, 8, 32); ++ scsi_cmd_set(udev, &sc, 9, 0); ++ err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer)); ++ if ((err != 0)) { ++ info_scsi_cmd_err(udev, "READ FIRST 32 BLOCKS", err); ++ return -1; ++ } ++ ++ /* if any non-zero data is found in sector 16 (iso and udf) or ++ * eventually 0 (fat32 boot sector, ext2 superblock, etc), disc ++ * is assumed non-blank */ ++ result = 0; ++ ++ for (block = 32768; block >= 0 && !result; block -= 32768) { ++ offset = block; ++ while (offset < (block + 2048) && !result) { ++ result = buffer [offset]; ++ offset++; ++ } ++ } ++ ++ if (!result) { ++ cd_media_state = media_status[0]; ++ info(udev, "no data in blocks 0 or 16, assuming blank\n"); ++ } else { ++ info(udev, "data in blocks 0 or 16, assuming complete\n"); ++ } ++ } ++ ++determined: ++ /* "other" is e. g. DVD-RAM, can't append sessions there; DVDs in ++ * restricted overwrite mode can never append, only in sequential mode */ ++ if ((header[2] & 3) < 2 && !cd_media_dvd_rw_ro) + cd_media_session_next = header[10] << 8 | header[5]; + cd_media_session_count = header[9] << 8 | header[4]; + cd_media_track_count = header[11] << 8 | header[6]; +@@ -710,13 +871,11 @@ + if (cd_profiles(udev, fd) < 0) + goto print; + +- /* get writable media state */ +- if (cd_media_info(udev, fd) < 0) +- goto print; +- + /* get session/track info */ +- if (cd_media_toc(udev, fd) < 0) +- goto print; ++ cd_media_toc(udev, fd); ++ ++ /* get writable media state */ ++ cd_media_info(udev, fd); + + print: + printf("ID_CDROM=1\n"); +@@ -810,14 +969,14 @@ + printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next); + if (cd_media_session_count > 0) + printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count); ++ if (cd_media_session_count > 1 && cd_media_session_last_offset > 0) ++ printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); + if (cd_media_track_count > 0) + printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count); + if (cd_media_track_count_audio > 0) + printf("ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=%d\n", cd_media_track_count_audio); + if (cd_media_track_count_data > 0) + printf("ID_CDROM_MEDIA_TRACK_COUNT_DATA=%d\n", cd_media_track_count_data); +- if (cd_media_session_last_offset > 0) +- printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); + exit: + if (fd >= 0) + close(fd); + diff --git a/udev-145-floppy.patch b/udev-145-floppy.patch new file mode 100644 index 0000000..1d5c45b --- /dev/null +++ b/udev-145-floppy.patch @@ -0,0 +1,14 @@ +diff -up udev-145/rules/rules.d/50-udev-default.rules.floppy udev-145/rules/rules.d/50-udev-default.rules +--- udev-145/rules/rules.d/50-udev-default.rules.floppy 2010-09-21 12:16:36.562750009 +0200 ++++ udev-145/rules/rules.d/50-udev-default.rules 2010-09-21 12:17:48.201750065 +0200 +@@ -69,7 +69,9 @@ SUBSYSTEM=="block", GROUP="disk" + + # floppy + 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=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", ENV{CMOS_TYPE}="$attr{cmos}", \ ++ RUN+="create_floppy_devices -c -t $env{CMOS_TYPE} -m %M -M 0640 -G floppy $root/%k" ++ + KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" + + # cdrom diff --git a/udev-145-keymap-backport.patch b/udev-145-keymap-backport.patch new file mode 100644 index 0000000..76b96a3 --- /dev/null +++ b/udev-145-keymap-backport.patch @@ -0,0 +1,4134 @@ +diff -urN udev-145-orig/extras/keymap/95-keyboard-force-release.rules udev-145/extras/keymap/95-keyboard-force-release.rules +--- udev-145-orig/extras/keymap/95-keyboard-force-release.rules 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/95-keyboard-force-release.rules 2010-08-04 14:23:27.000000000 +0200 +@@ -0,0 +1,38 @@ ++# Set model specific atkbd force_release quirk ++# ++# Several laptops have hotkeys which don't generate release events, ++# which can cause problems with software key repeat. ++# The atkbd driver has a quirk handler for generating synthetic ++# release events, which can be configured via sysfs since 2.6.32. ++# Simply add a file with a list of scancodes for your laptop model ++# in /lib/udev/keymaps, and add a rule here. ++# If the hotkeys also need a keymap assignment you can copy the ++# scancodes from the keymap file, otherwise you can run ++# /lib/udev/keymap -i /dev/input/eventX ++# on a Linux vt to find out. ++ ++ACTION=="remove", GOTO="force_release_end" ++SUBSYSTEM!="serio", GOTO="force_release_end" ++KERNEL!="serio*", GOTO="force_release_end" ++DRIVER!="atkbd", GOTO="force_release_end" ++ ++ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" ++ ++ ++ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*E252*|*N120*|*N128*|*N130*|*N140*|*N148/N208*|*N150*|*N150/N210/N220*|*N220*|*N308*|*N310*|*N510*|*NB30*|*NC10/N110*|*ND10*|*Q210/P210*|*R410P*|*R425/R525*|*R428/P428*|*R460*|*R463*|*R468/R418*|*R480/R431/R481*|*R509*|*R518*|*R519/R719*|*R520/R522/R620*|*R528/R728*|*R530/R730*|*R530/R730/P590*|*R560*|*R580*|*R580/R590*|*R59/R60/R61*|*R59P/R60P/R61P*|*R710*|*R720*|*R780/R778*|*SR58P*|*SR700*|*SR70S/SR71S*|*SX22S*|*X118*|*X120*|*X460*", RUN+="keyboard-force-release.sh $devpath samsung-other" ++ ++ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++ENV{DMI_VENDOR}=="FUJITSU SIEMENS", ATTR{[dmi/id]product_name}=="AMILO Si 1848+u", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++ENV{DMI_VENDOR}=="FOXCONN", ATTR{[dmi/id]product_name}=="QBOOK", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++ENV{DMI_VENDOR}=="MTC", ATTR{[dmi/id]product_version}=="A0", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++ENV{DMI_VENDOR}=="PEGATRON CORP.", ATTR{[dmi/id]product_name}=="Spring Peak", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite U300|Satellite Pro U300|Satellite U305", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys" ++ ++LABEL="force_release_end" +diff -urN udev-145-orig/extras/keymap/95-keymap.rules udev-145/extras/keymap/95-keymap.rules +--- udev-145-orig/extras/keymap/95-keymap.rules 2010-09-21 11:38:12.791750001 +0200 ++++ udev-145/extras/keymap/95-keymap.rules 2010-09-21 12:02:18.722750001 +0200 +@@ -1,22 +1,52 @@ +-ACTION!="add", GOTO="keyboard_end" ++# Set model specific hotkey keycodes. ++# ++# Key map overrides can be specified by either giving scancode/keyname pairs ++# directly as keymap arguments (if there are just one or two to change), or as ++# a file name (in /lib/udev/keymaps), which has to contain scancode/keyname ++# pairs. ++ ++ACTION=="remove", GOTO="keyboard_end" + SUBSYSTEM!="input", GOTO="keyboard_end" + KERNEL!="event*", GOTO="keyboard_end" + +-ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" +-ENV{DMI_VENDOR}=="", GOTO="keyboard_end" ++SUBSYSTEMS=="usb", ENV{ID_VENDOR}=="", IMPORT{program}="usb_id --export %p" ++SUBSYSTEMS=="usb", GOTO="keyboard_usbcheck" ++GOTO="keyboard_modulecheck" ++ ++# ++# The following are external USB keyboards ++# ++ ++LABEL="keyboard_usbcheck" ++ ++ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave" ++ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-cordless" ++# Logitech Cordless Wave Pro looks slightly weird; some hotkeys are coming through the mouse interface ++ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="c529", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-pro-cordless" ++ ++ENV{ID_VENDOR}=="Lite-On_Technology_Corp*", ATTRS{name}=="Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint", RUN+="keymap $name lenovo-thinkpad-usb-keyboard-trackpoint" ++ENV{ID_VENDOR_ID}=="04b3", ENV{ID_MODEL_ID}=="301[89]", RUN+="keymap $name ibm-thinkpad-usb-keyboard-trackpoint" ++ ++GOTO="keyboard_end" + + # + # The following are exposed as separate input devices with low key codes, thus + # we need to check their input device product name + # + ++LABEL="keyboard_modulecheck" ++ ++ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" ++ENV{DMI_VENDOR}=="", GOTO="keyboard_end" ++ + ENV{DMI_VENDOR}=="IBM*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-ibm" + ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-lenovo" ++ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="Lenovo ThinkPad SL Series extra buttons", RUN+="keymap $name 0x0E bluetooth" + ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j" + ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony" + + # Older Vaios have some different keys +-ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*|*VGN-SZ2HP_B*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old" ++ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old" + + # + # The following rules belong to standard i8042 AT keyboard with high key codes. +@@ -28,26 +58,41 @@ + LABEL="keyboard_vendorcheck" + + ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" +-ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N610c*|*Evo N600c*", RUN+="keymap $name compaq-e_evo" ++ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 910|Inspiron 1010|Inspiron 1011|Inspiron 1012|Inspiron 1110|Inspiron 1210", RUN+="keymap $name 0x84 wlan" ++ ++ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" + + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000" + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X6*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x6_tablet" + ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X200 Tablet*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x200_tablet" ++ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*IdeaPad*", RUN+="keymap $name lenovo-ideapad" ++ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_name}=="S10-*", RUN+="keymap $name lenovo-ideapad" ++ENV{DMI_VENDOR}=="LENOVO", ATTR{[dmi/id]product_version}=="*IdeaPad Y550*", RUN+="keymap $name 0x95 media 0xA3 play" + + ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keymap $name hewlett-packard-pavilion" +-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*", RUN+="keymap $name hewlett-packard-compaq_elitebook" +-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*", RUN+="keymap $name hewlett-packard-2510p_2530p" ++ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*|*2230s*", RUN+="keymap $name hewlett-packard-compaq_elitebook" ++ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keymap $name hewlett-packard-2510p_2530p" + ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2" ++ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100" ++# HP Pavillion dv6315ea has empty DMI_VENDOR ++ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play ++ ++# Gateway clone of Acer Aspire One AOA110/AOA150 ++ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer" + + ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" +-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name acer-extensa_5xxx" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" +-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*", RUN+="keymap $name acer-travelmate_6292" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*4720*", RUN+="keymap $name 0xB2 www 0xEE screenlock" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" + +-ENV{DMI_VENDOR}=="*BenQ*", ATTR{[dmi/id]product_name}=="*Joybook R22*", RUN+="keymap $name benq-joybook_r22" ++ENV{DMI_VENDOR}=="*BenQ*", ATTR{[dmi/id]product_name}=="*Joybook R22*", RUN+="keymap $name 0x6E wlan" + + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*AMILO Pro V3205*", RUN+="keymap $name fujitsu-amilo_pro_v3205" + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*AMILO Pa 2548*", RUN+="keymap $name fujitsu-amilo_pa_2548" +@@ -55,6 +100,10 @@ + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*ESPRIMO Mobile V6*", RUN+="keymap $name fujitsu-esprimo_mobile_v6" + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*AMILO Pro Edition V3505*", RUN+="keymap $name fujitsu-amilo_pro_edition_v3505" + ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="*Amilo Si 1520*", RUN+="keymap $name fujitsu-amilo_si_1520" ++ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="AMILO*M*", RUN+="keymap $name 0x97 prog2 0x9F prog1" ++ENV{DMI_VENDOR}=="FUJITSU*", ATTR{[dmi/id]product_name}=="Amilo Li 1718", RUN+="keymap $name 0xD6 wlan" ++ ++ENV{DMI_VENDOR}=="LG*", ATTR{[dmi/id]product_name}=="*X110*", RUN+="keymap $name lg-x110" + + ENV{DMI_VENDOR}=="MEDION*", ATTR{[dmi/id]product_name}=="*FID2060*", RUN+="keymap $name medion-fid2060" + ENV{DMI_VENDOR}=="MEDIONNB", ATTR{[dmi/id]product_name}=="A555*", RUN+="keymap $name medionnb-a555" +@@ -70,15 +119,28 @@ + + ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000" + +-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*NC10*|*SP55S*|*SQ45S70S*|*SX60P*|*SX30S*|*R59P/R60P/R61P*|*Q210*|*Q310*|*X05*|*P560*|*R560*", RUN+="keymap $name samsung-other" ++ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keymap $name samsung-other" + ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s" + ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us" + + ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="SATELLITE A100", RUN+="keymap $name toshiba-satellite_a100" + ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite A110", RUN+="keymap $name toshiba-satellite_a110" ++ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+="keymap $name toshiba-satellite_m30x" + + ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2" + ++ENV{DMI_VENDOR}=="ONKYO CORPORATION", ATTR{[dmi/id]product_name}=="ONKYOPC", RUN+="keymap $name onkyo" ++ + ENV{DMI_VENDOR}=="ASUS", RUN+="keymap $name asus" + ++ENV{DMI_VENDOR}=="VIA", ATTR{[dmi/id]product_name}=="K8N800", ATTR{[dmi/id]product_version}=="VT8204B", RUN+="keymap $name 0x81 prog1" ++ ++ENV{DMI_VENDOR}=="Zepto", ATTR{[dmi/id]product_name}=="Znote", ATTR{[dmi/id]product_version}=="62*|63*", RUN+="keymap $name zepto-znote" ++ ++ENV{DMI_VENDOR}=="Everex", ATTR{[dmi/id]product_name}=="XT5000*", RUN+="keymap $name everex-xt5000" ++ ++ENV{DMI_VENDOR}=="COMPAL", ATTR{[dmi/id]product_name}=="HEL80I", RUN+="keymap $name 0x84 wlan" ++ ++ENV{DMI_VENDOR}=="OLPC", ATTR{[dmi/id]product_name}=="XO", RUN+="keymap $name olpc-xo" ++ + LABEL="keyboard_end" +diff -urN udev-145-orig/extras/keymap/check-keymaps.sh udev-145/extras/keymap/check-keymaps.sh +--- udev-145-orig/extras/keymap/check-keymaps.sh 2009-05-16 16:06:31.000000000 +0200 ++++ udev-145/extras/keymap/check-keymaps.sh 2010-06-11 10:52:56.000000000 +0200 +@@ -1,29 +1,37 @@ + #!/bin/bash + + # check that all key names in keymaps/* are known in +-KEYLIST=./keys.txt +-RULES=95-keymap.rules ++# and that all key maps listed in the rules are valid and present in ++# Makefile.am ++SRCDIR=$1 ++KEYLIST=$2 ++KEYMAPS_DIR=$SRCDIR/extras/keymap/keymaps #extras/keymap/keymaps ++RULES=$SRCDIR/extras/keymap/95-keymap.rules + + [ -e "$KEYLIST" ] || { + echo "need $KEYLIST please build first" >&2 + exit 1 + } + +-missing=$(join -v 2 <(awk '{print tolower(substr($1,5))}' $KEYLIST | sort -u) <(awk '{print $2}' keymaps/*|sort -u)) ++missing=$(join -v 2 <(awk '{print tolower(substr($1,5))}' $KEYLIST | sort -u) \ ++ <(grep -hv '^#' ${KEYMAPS_DIR}/*| awk '{print $2}' | sort -u)) + [ -z "$missing" ] || { +- echo "ERROR: unknown key names in keymaps/*:" >&2 ++ echo "ERROR: unknown key names in extras/keymap/keymaps/*:" >&2 + echo "$missing" >&2 + exit 1 + } + + # check that all maps referred to in $RULES exist +-maps=$(sed -rn '/keymap \$name/ { s/^.*\$name ([^"]+).*$/\1/; p }' $RULES) ++maps=$(sed -rn '/keymap \$name/ { s/^.*\$name ([^"[:space:]]+).*$/\1/; p }' $RULES) + for m in $maps; do +- [ -e keymaps/$m ] || { ++ # ignore inline mappings ++ [ "$m" = "${m#0x}" ] || continue ++ ++ [ -e ${KEYMAPS_DIR}/$m ] || { + echo "ERROR: unknown map name in $RULES: $m" >&2 + exit 1 + } +- grep -q "keymaps/$m\>" Makefile.am || { ++ grep -q "extras/keymap/keymaps/$m\>" $SRCDIR/Makefile.am || { + echo "ERROR: map file $m is not added to Makefile.am" >&2 + exit 1 + } +diff -urN udev-145-orig/extras/keymap/.deps/extras_keymap_keymap-keymap.Po udev-145/extras/keymap/.deps/extras_keymap_keymap-keymap.Po +--- udev-145-orig/extras/keymap/.deps/extras_keymap_keymap-keymap.Po 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/.deps/extras_keymap_keymap-keymap.Po 2010-08-11 15:14:22.000000000 +0200 +@@ -0,0 +1,208 @@ ++extras/keymap/extras_keymap_keymap-keymap.o: extras/keymap/keymap.c \ ++ config.h /usr/include/stdio.h /usr/include/features.h \ ++ /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ ++ /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ ++ /usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/stddef.h \ ++ /usr/include/bits/types.h /usr/include/bits/typesizes.h \ ++ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ ++ /usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/stdarg.h \ ++ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ ++ /usr/include/bits/stdio.h /usr/include/stdlib.h \ ++ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ ++ /usr/include/endian.h /usr/include/bits/endian.h \ ++ /usr/include/bits/byteswap.h /usr/include/xlocale.h \ ++ /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ ++ /usr/include/bits/select.h /usr/include/bits/sigset.h \ ++ /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ ++ /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ ++ /usr/include/string.h /usr/include/bits/string.h \ ++ /usr/include/bits/string2.h /usr/include/ctype.h /usr/include/unistd.h \ ++ /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ ++ /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/errno.h \ ++ /usr/include/bits/errno.h /usr/include/linux/errno.h \ ++ /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \ ++ /usr/include/asm-generic/errno-base.h \ ++ /usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/limits.h \ ++ /usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/syslimits.h \ ++ /usr/include/limits.h /usr/include/bits/posix1_lim.h \ ++ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ ++ /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ ++ /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/bits/uio.h \ ++ /usr/include/bits/stat.h /usr/include/sys/ioctl.h \ ++ /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \ ++ /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ ++ /usr/include/asm/ioctl.h /usr/include/asm-generic/ioctl.h \ ++ /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \ ++ /usr/include/linux/input.h /usr/include/sys/time.h \ ++ /usr/include/linux/types.h /usr/include/asm/types.h \ ++ /usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \ ++ /usr/include/asm/bitsperlong.h /usr/include/asm-generic/bitsperlong.h \ ++ /usr/include/linux/posix_types.h /usr/include/linux/stddef.h \ ++ /usr/include/asm/posix_types.h /usr/include/asm/posix_types_64.h \ ++ extras/keymap/keys-from-name.h extras/keymap/keys-to-name.h ++ ++config.h: ++ ++/usr/include/stdio.h: ++ ++/usr/include/features.h: ++ ++/usr/include/sys/cdefs.h: ++ ++/usr/include/bits/wordsize.h: ++ ++/usr/include/gnu/stubs.h: ++ ++/usr/include/gnu/stubs-64.h: ++ ++/usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/stddef.h: ++ ++/usr/include/bits/types.h: ++ ++/usr/include/bits/typesizes.h: ++ ++/usr/include/libio.h: ++ ++/usr/include/_G_config.h: ++ ++/usr/include/wchar.h: ++ ++/usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/stdarg.h: ++ ++/usr/include/bits/stdio_lim.h: ++ ++/usr/include/bits/sys_errlist.h: ++ ++/usr/include/bits/stdio.h: ++ ++/usr/include/stdlib.h: ++ ++/usr/include/bits/waitflags.h: ++ ++/usr/include/bits/waitstatus.h: ++ ++/usr/include/endian.h: ++ ++/usr/include/bits/endian.h: ++ ++/usr/include/bits/byteswap.h: ++ ++/usr/include/xlocale.h: ++ ++/usr/include/sys/types.h: ++ ++/usr/include/time.h: ++ ++/usr/include/sys/select.h: ++ ++/usr/include/bits/select.h: ++ ++/usr/include/bits/sigset.h: ++ ++/usr/include/bits/time.h: ++ ++/usr/include/sys/sysmacros.h: ++ ++/usr/include/bits/pthreadtypes.h: ++ ++/usr/include/alloca.h: ++ ++/usr/include/string.h: ++ ++/usr/include/bits/string.h: ++ ++/usr/include/bits/string2.h: ++ ++/usr/include/ctype.h: ++ ++/usr/include/unistd.h: ++ ++/usr/include/bits/posix_opt.h: ++ ++/usr/include/bits/environments.h: ++ ++/usr/include/bits/confname.h: ++ ++/usr/include/getopt.h: ++ ++/usr/include/errno.h: ++ ++/usr/include/bits/errno.h: ++ ++/usr/include/linux/errno.h: ++ ++/usr/include/asm/errno.h: ++ ++/usr/include/asm-generic/errno.h: ++ ++/usr/include/asm-generic/errno-base.h: ++ ++/usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/limits.h: ++ ++/usr/lib/gcc/x86_64-redhat-linux/4.5.0/include/syslimits.h: ++ ++/usr/include/limits.h: ++ ++/usr/include/bits/posix1_lim.h: ++ ++/usr/include/bits/local_lim.h: ++ ++/usr/include/linux/limits.h: ++ ++/usr/include/bits/posix2_lim.h: ++ ++/usr/include/bits/xopen_lim.h: ++ ++/usr/include/fcntl.h: ++ ++/usr/include/bits/fcntl.h: ++ ++/usr/include/bits/uio.h: ++ ++/usr/include/bits/stat.h: ++ ++/usr/include/sys/ioctl.h: ++ ++/usr/include/bits/ioctls.h: ++ ++/usr/include/asm/ioctls.h: ++ ++/usr/include/asm-generic/ioctls.h: ++ ++/usr/include/linux/ioctl.h: ++ ++/usr/include/asm/ioctl.h: ++ ++/usr/include/asm-generic/ioctl.h: ++ ++/usr/include/bits/ioctl-types.h: ++ ++/usr/include/sys/ttydefaults.h: ++ ++/usr/include/linux/input.h: ++ ++/usr/include/sys/time.h: ++ ++/usr/include/linux/types.h: ++ ++/usr/include/asm/types.h: ++ ++/usr/include/asm-generic/types.h: ++ ++/usr/include/asm-generic/int-ll64.h: ++ ++/usr/include/asm/bitsperlong.h: ++ ++/usr/include/asm-generic/bitsperlong.h: ++ ++/usr/include/linux/posix_types.h: ++ ++/usr/include/linux/stddef.h: ++ ++/usr/include/asm/posix_types.h: ++ ++/usr/include/asm/posix_types_64.h: ++ ++extras/keymap/keys-from-name.h: ++ ++extras/keymap/keys-to-name.h: +Binary files udev-145-orig/extras/keymap/extras_keymap_keymap-keymap.o and udev-145/extras/keymap/extras_keymap_keymap-keymap.o differ +diff -urN udev-145-orig/extras/keymap/findkeyboards udev-145/extras/keymap/findkeyboards +--- udev-145-orig/extras/keymap/findkeyboards 2009-05-16 16:06:31.000000000 +0200 ++++ udev-145/extras/keymap/findkeyboards 2010-07-08 11:37:47.000000000 +0200 +@@ -17,21 +17,25 @@ + + # print a list of input devices which are keyboard-like + keyboard_devices() { +- input_devs=`udevadm trigger --dry-run --verbose --subsystem-match=input --attr-match=dev` +- + # standard AT keyboard +- for dev in $input_devs; do +- info=`udevadm info --attribute-walk --path=$dev` +- +- if echo "$info" | grep -q 'DRIVERS=="atkbd"'; then ++ for dev in `udevadm trigger --dry-run --verbose --property-match=ID_INPUT_KEYBOARD=1`; do ++ walk=`udevadm info --attribute-walk --path=$dev` ++ env=`udevadm info --query=env --path=$dev` ++ if echo "$walk" | grep -q 'DRIVERS=="atkbd"'; then + echo -n 'AT keyboard: ' +- udevadm info --query=name --path=$dev ++ elif echo "$env" | grep -q '^ID_USB_DRIVER=usbhid'; then ++ echo -n 'USB keyboard: ' ++ else ++ echo -n 'Unknown type: ' + fi ++ udevadm info --query=name --path=$dev + done + + # modules + module=`udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*Extra Buttons'` + module="$module ++`udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*extra buttons'`" ++ module="$module + `udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='Sony Vaio Keys'`" + for m in $module; do + evdev=`ls -d $m/event* 2>/dev/null` +diff -urN udev-145-orig/extras/keymap/force-release-maps/common-volume-keys udev-145/extras/keymap/force-release-maps/common-volume-keys +--- udev-145-orig/extras/keymap/force-release-maps/common-volume-keys 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/force-release-maps/common-volume-keys 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,3 @@ ++0xa0 #mute ++0xae #volume down ++0xb0 #volume up +diff -urN udev-145-orig/extras/keymap/force-release-maps/samsung-other udev-145/extras/keymap/force-release-maps/samsung-other +--- udev-145-orig/extras/keymap/force-release-maps/samsung-other 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/force-release-maps/samsung-other 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,10 @@ ++# list of scancodes (hex or decimal), optional comment ++0x82 # Fn+F4 CRT/LCD ++0x83 # Fn+F2 battery ++0x84 # Fn+F5 backlight on/off ++0x86 # Fn+F9 WLAN ++0x88 # Fn-Up brightness up ++0x89 # Fn-Down brightness down ++0xB3 # Fn+F8 switch power mode (battery/dynamic/performance) ++0xF7 # Fn+F10 Touchpad on ++0xF9 # Fn+F10 Touchpad off +diff -urN udev-145-orig/extras/keymap/.gitignore udev-145/extras/keymap/.gitignore +--- udev-145-orig/extras/keymap/.gitignore 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/.gitignore 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,6 @@ ++keymap ++keys-from-name.gperf ++keys-from-name.h ++keys-to-name.h ++keys.txt ++ +diff -urN udev-145-orig/extras/keymap/keyboard-force-release.sh udev-145/extras/keymap/keyboard-force-release.sh +--- udev-145-orig/extras/keymap/keyboard-force-release.sh 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keyboard-force-release.sh 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,22 @@ ++#!/bin/sh -e ++# read list of scancodes, convert hex to decimal and ++# append to the atkbd force_release sysfs attribute ++# $1 sysfs devpath for serioX ++# $2 file with scancode list (hex or dec) ++ ++case "$2" in ++ /*) scf="$2" ;; ++ *) scf="/lib/udev/keymaps/force-release/$2" ;; ++esac ++ ++read attr <"/sys/$1/force_release" ++while read scancode dummy; do ++ case "$scancode" in ++ \#*) ;; ++ *) ++ scancode=$(($scancode)) ++ attr="$attr${attr:+,}$scancode" ++ ;; ++ esac ++done <"$scf" ++echo "$attr" >"/sys/$1/force_release" +Binary files udev-145-orig/extras/keymap/keymap and udev-145/extras/keymap/keymap differ +diff -urN udev-145-orig/extras/keymap/keymap.c udev-145/extras/keymap/keymap.c +--- udev-145-orig/extras/keymap/keymap.c 2009-06-17 16:14:33.000000000 +0200 ++++ udev-145/extras/keymap/keymap.c 2010-06-11 10:52:56.000000000 +0200 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + const struct key* lookup_key (const char *str, unsigned int len); +@@ -153,6 +154,34 @@ + return r; + } + ++static void set_key(int fd, const char* scancode_str, const char* keyname) ++{ ++ unsigned scancode; ++ char *endptr; ++ char t[105] = "KEY_UNKNOWN"; ++ const struct key *k; ++ ++ scancode = (unsigned) strtol(scancode_str, &endptr, 0); ++ if (*endptr != '\0') { ++ fprintf(stderr, "ERROR: Invalid scancode\n"); ++ exit(1); ++ } ++ ++ snprintf(t, sizeof(t), "KEY_%s", keyname); ++ ++ if (!(k = lookup_key(t, strlen(t)))) { ++ fprintf(stderr, "ERROR: Unknown key name '%s'\n", keyname); ++ exit(1); ++ } ++ ++ if (evdev_set_keycode(fd, scancode, k->id) < 0) ++ fprintf(stderr, "setting scancode 0x%2X to key code %i failed\n", ++ scancode, k->id); ++ else ++ printf("setting scancode 0x%2X to key code %i\n", ++ scancode, k->id); ++} ++ + static int merge_table(int fd, const char *filename) { + int r = 0; + int line = 0; +@@ -219,7 +248,7 @@ + { + static char result[PATH_MAX]; + +- /* If keymap file is given without a path, assume udev diretory; must end with '/' * */ ++ /* If keymap file is given without a path, assume udev directory; must end with '/' * */ + if (!strchr(path, '/')) { + snprintf(result, sizeof(result), "%s%s", LIBEXECDIR "/keymaps/", path); + return result; +@@ -230,15 +259,22 @@ + static void print_key(struct input_event *event) + { + static int cur_scancode = 0; ++ const char *keyname; + + /* save scan code for next EV_KEY event */ + if (event->type == EV_MSC && event->code == MSC_SCAN) + cur_scancode = event->value; + + /* key press */ +- if (event->type == EV_KEY && event->value) +- printf("scan code: 0x%02X key code: %s\n", cur_scancode, +- format_keyname(key_names[event->code])); ++ if (event->type == EV_KEY && event->value) { ++ keyname = key_names[event->code]; ++ if (keyname != NULL) ++ printf("scan code: 0x%02X key code: %s\n", cur_scancode, ++ format_keyname(key_names[event->code])); ++ else ++ printf("scan code: 0x%02X key code: %03X\n", cur_scancode, ++ event->code); ++ } + } + + static void interactive(int fd) +@@ -272,6 +308,20 @@ + ioctl(fd, EVIOCGRAB, 0); + } + ++static void help(int error) ++{ ++ const char* h = "Usage: keymap []\n" ++ " keymap scancode keyname [...]\n" ++ " keymap -i \n"; ++ if (error) { ++ fputs(h, stderr); ++ exit(2); ++ } else { ++ fputs(h, stdout); ++ exit(0); ++ } ++} ++ + int main(int argc, char **argv) + { + static const struct option options[] = { +@@ -281,6 +331,7 @@ + }; + int fd = -1; + int opt_interactive = 0; ++ int i; + + while (1) { + int option; +@@ -291,8 +342,7 @@ + + switch (option) { + case 'h': +- printf("Usage: keymap []\n\n"); +- return 0; ++ help(0); + + case 'i': + opt_interactive = 1; +@@ -302,21 +352,35 @@ + } + } + +- if (argc < optind+1 || argc > optind+2) { +- fprintf(stderr, "Usage: keymap []\n\n"); +- return 2; +- } ++ if (argc < optind+1) ++ help (1); + + if ((fd = evdev_open(argv[optind])) < 0) + return 3; + +- if (argc == optind+2) +- merge_table(fd, default_keymap_path(argv[optind+1])); +- else { ++ /* one argument (device): dump or interactive */ ++ if (argc == optind+1) { + if (opt_interactive) + interactive(fd); + else + dump_table(fd); ++ return 0; + } +- return 0; ++ ++ /* two arguments (device, mapfile): set map file */ ++ if (argc == optind+2) { ++ merge_table(fd, default_keymap_path(argv[optind+1])); ++ return 0; ++ } ++ ++ /* more arguments (device, scancode/keyname pairs): set keys directly */ ++ if ((argc - optind - 1) % 2 == 0) { ++ for (i = optind+1; i < argc; i += 2) ++ set_key(fd, argv[i], argv[i+1]); ++ return 0; ++ } ++ ++ /* invalid number of arguments */ ++ help(1); ++ return 1; /* not reached */ + } +Binary files udev-145-orig/extras/keymap/keymap-keymap.o and udev-145/extras/keymap/keymap-keymap.o differ +diff -urN udev-145-orig/extras/keymap/keymaps/acer-aspire_5720 udev-145/extras/keymap/keymaps/acer-aspire_5720 +--- udev-145-orig/extras/keymap/keymaps/acer-aspire_5720 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/acer-aspire_5720 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,5 @@ ++0x84 bluetooth # sent when bluetooth module missing, and key pressed ++0x92 media # acer arcade ++0xD4 bluetooth # bluetooth on ++0xD9 bluetooth # bluetooth off ++ +diff -urN udev-145-orig/extras/keymap/keymaps/acer-aspire_6920 udev-145/extras/keymap/keymaps/acer-aspire_6920 +--- udev-145-orig/extras/keymap/keymaps/acer-aspire_6920 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/acer-aspire_6920 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,5 @@ ++0xD9 bluetooth # (toggle) on-to-off ++0x92 media ++0x9E back ++0x83 rewind ++0x89 fastforward +diff -urN udev-145-orig/extras/keymap/keymaps/dell udev-145/extras/keymap/keymaps/dell +--- udev-145-orig/extras/keymap/keymaps/dell 2009-05-09 12:41:34.000000000 +0200 ++++ udev-145/extras/keymap/keymaps/dell 2010-06-11 10:52:56.000000000 +0200 +@@ -21,7 +21,9 @@ + 0x99 nextsong # Front panel next song + 0x9A setup # Tablet tools button + 0x9B switchvideomode # Display Toggle button ++0x9E f22 #touchpad toggle + 0xA2 playpause # Front panel play/pause + 0xA4 stopcd # Front panel stop +-0xD8 screenlock # FIXME: Tablet lock button + 0xED media # MediaDirect button ++0xD8 screenlock # FIXME: Tablet lock button ++0xD9 f22 # touchpad toggle +diff -urN udev-145-orig/extras/keymap/keymaps/everex-xt5000 udev-145/extras/keymap/keymaps/everex-xt5000 +--- udev-145-orig/extras/keymap/keymaps/everex-xt5000 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/everex-xt5000 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,7 @@ ++0x5C media ++0x65 f22 # Fn+F5 Touchpad toggle ++0x67 prog3 # Fan Speed Control button ++0x6F brightnessup ++0x7F brightnessdown ++0xB2 www ++0xEC mail +diff -urN udev-145-orig/extras/keymap/keymaps/hewlett-packard-presario-2100 udev-145/extras/keymap/keymaps/hewlett-packard-presario-2100 +--- udev-145-orig/extras/keymap/keymaps/hewlett-packard-presario-2100 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/hewlett-packard-presario-2100 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,3 @@ ++0xF0 help ++0xF1 screenlock ++0xF3 search +diff -urN udev-145-orig/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint udev-145/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint +--- udev-145-orig/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint 2010-07-07 10:58:29.000000000 +0200 +@@ -0,0 +1,7 @@ ++0x900f0 screenlock ++0x900f1 wlan ++0x900f2 switchvideomode ++0x900f3 suspend ++0x900f4 brightnessup ++0x900f5 brightnessdown ++0x900f8 zoom +diff -urN udev-145-orig/extras/keymap/keymaps/lenovo-ideapad udev-145/extras/keymap/keymaps/lenovo-ideapad +--- udev-145-orig/extras/keymap/keymaps/lenovo-ideapad 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/lenovo-ideapad 2010-08-17 16:31:27.000000000 +0200 +@@ -0,0 +1,7 @@ ++# Key codes observed on S10-3, assumed valid on other IdeaPad models ++0x81 rfkill # does nothing in BIOS ++0x83 display_off # BIOS toggles screen state ++0xB9 brightnessup # does nothing in BIOS ++0xBA brightnessdown # does nothing in BIOS ++0xF1 camera # BIOS toggles camera power ++0xf2 unknown # trackpad enable/disable (does nothing in BIOS) +diff -urN udev-145-orig/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint udev-145/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint +--- udev-145-orig/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,13 @@ ++0x90012 screenlock # Fn+F2 ++0x90013 battery # Fn+F3 ++0x90014 wlan # Fn+F5 ++0x90016 switchvideomode # Fn+F7 ++0x90017 f22 # Fn+F8 touchpadtoggle ++0x90019 suspend # Fn+F12 ++0x9001A brightnessup # Fn+Home ++0x9001B brightnessdown # Fn+End ++0x9001D zoom # Fn+Space ++0x90011 prog1 # Thinkvantage button ++ ++0x90015 camera # Fn+F6 headset/camera VoIP key ?? ++# 0x90010 # Microphone mute button ?? +diff -urN udev-145-orig/extras/keymap/keymaps/lg-x110 udev-145/extras/keymap/keymaps/lg-x110 +--- udev-145-orig/extras/keymap/keymaps/lg-x110 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/lg-x110 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,12 @@ ++0xA0 mute # Fn-F9 ++0xAE volumedown # Fn-Left ++0xAF search # Fn-F3 ++0xB0 volumeup # Fn-Right ++0xB1 battery # Fn-F10 Info ++0xB3 suspend # Fn-F12 ++0xDF sleep # Fn-F4 ++# 0xE2 bluetooth # satellite dish2 ++0xE4 f22 # Fn-F5 Touchpad disable ++0xF6 wlan # Fn-F6 ++0xF7 reserved # brightnessdown # Fn-Down ++0xF8 reserved # brightnessup # Fn-Up +\ No newline at end of file +diff -urN udev-145-orig/extras/keymap/keymaps/logitech-wave udev-145/extras/keymap/keymaps/logitech-wave +--- udev-145-orig/extras/keymap/keymaps/logitech-wave 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/logitech-wave 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,16 @@ ++0x9001C scale #expo ++0x9001F zoomout #zoom out ++0x90020 zoomin #zoom in ++0x9003D prog1 #gadget ++0x90005 camera #camera ++0x90018 media #media center ++0x90041 wordprocessor #fn+f1 (word) ++0x90042 spreadsheet #fn+f2 (excel) ++0x90043 calendar #fn+f3 (calendar) ++0x90044 prog2 #fn+f4 (program a) ++0x90045 prog3 #fn+f5 (program b) ++0x90046 prog4 #fn+f6 (program c) ++0x90048 messenger #fn+f8 (msn messenger) ++0x9002D find #fn+f10 (search www) ++0x9004B search #fn+f11 (search pc) ++0x9004C ejectclosecd #fn+f12 (eject) +diff -urN udev-145-orig/extras/keymap/keymaps/logitech-wave-cordless udev-145/extras/keymap/keymaps/logitech-wave-cordless +--- udev-145-orig/extras/keymap/keymaps/logitech-wave-cordless 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/logitech-wave-cordless 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,15 @@ ++0xD4 zoomin ++0xCC zoomout ++0xC0183 media ++0xC1005 camera ++0xC101F zoomout ++0xC1020 zoomin ++0xC1041 wordprocessor ++0xC1042 spreadsheet ++0xC1043 calendar ++0xC1044 prog2 #fn+f4 (program a) ++0xC1045 prog3 #fn+f5 (program b) ++0xC1046 prog4 #fn+f6 (program c) ++0xC1048 messenger ++0xC104A find #fn+f10 (search www) ++0xC104C ejectclosecd +diff -urN udev-145-orig/extras/keymap/keymaps/logitech-wave-pro-cordless udev-145/extras/keymap/keymaps/logitech-wave-pro-cordless +--- udev-145-orig/extras/keymap/keymaps/logitech-wave-pro-cordless 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/logitech-wave-pro-cordless 2010-07-07 10:58:29.000000000 +0200 +@@ -0,0 +1,12 @@ ++0xC01B6 camera ++0xC0183 media ++0xC0184 wordprocessor ++0xC0186 spreadsheet ++0xC018E calendar ++0xC0223 homepage ++0xC01BC messenger ++0xC018A mail ++0xC0221 search ++0xC00B8 ejectcd ++0xC022D zoomin ++0xC022E zoomout +diff -urN udev-145-orig/extras/keymap/keymaps/micro-star udev-145/extras/keymap/keymaps/micro-star +--- udev-145-orig/extras/keymap/keymaps/micro-star 2009-05-09 12:41:34.000000000 +0200 ++++ udev-145/extras/keymap/keymaps/micro-star 2010-06-11 10:52:56.000000000 +0200 +@@ -6,6 +6,7 @@ + 0xE2 bluetooth # satellite dish2 + 0xE4 f22 # Fn-F3 Touchpad disable + 0xEC email # envelope button ++0xEE camera # Fn-F6 camera disable + 0xF6 wlan # satellite dish1 + 0xF7 brightnessdown # Fn-F4 + 0xF8 brightnessup # Fn-F5 +diff -urN udev-145-orig/extras/keymap/keymaps/olpc-xo udev-145/extras/keymap/keymaps/olpc-xo +--- udev-145-orig/extras/keymap/keymaps/olpc-xo 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/olpc-xo 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,60 @@ ++0x59 fn ++0x81 fn_esc ++0xF9 camera ++0xF8 sound # Fn-CAMERA = Mic ++0xBB fn_f1 ++0xBC fn_f2 ++0xBD fn_f3 ++0xBE fn_f4 ++0xBF fn_f5 ++0xC0 fn_f6 ++0xC1 fn_f7 ++0xC2 fn_f8 ++0xC3 fn_f9 ++0xC4 fn_f10 ++0xD7 fn_f11 ++0xD8 fn_f12 ++ ++# Using F13-F21 for the .5 F keys right now. ++0xF7 f13 ++0xF6 f14 ++0xF5 f15 ++0xF4 f16 ++0xF3 f17 ++0xF2 f18 ++0xF1 f19 ++0xF0 f20 ++0xEF f21 ++ ++0xEE chat ++0xE4 chat # Just mapping Fn-Chat to Chat for now ++0xDD menu # Frame ++0xDA prog1 # Fn-Frame ++ ++# The FN of some keys is other keys ++0xD3 delete ++0xD2 insert ++0xC9 pageup ++0xD1 pagedown ++0xC7 home ++0xCF end ++ ++# Language key - don't ask what they are doing as KEY_HP ++0x73 hp ++0x7E hp ++ ++0xDB leftmeta # left grab ++0xDC rightmeta # right grab ++0x85 rightmeta # Right grab releases on a different scancode ++0xD6 kbdillumtoggle # Fn-space ++0x69 switchvideomode # Brightness key ++ ++# Game keys ++0x65 kp8 # up ++0x66 kp2 # down ++0x67 kp4 # left ++0x68 kp6 # right ++0xE5 kp9 # pgup ++0xE6 kp3 # pgdn ++0xE7 kp7 # home ++0xE8 kp1 # end +diff -urN udev-145-orig/extras/keymap/keymaps/onkyo udev-145/extras/keymap/keymaps/onkyo +--- udev-145-orig/extras/keymap/keymaps/onkyo 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/onkyo 2010-08-31 10:35:41.000000000 +0200 +@@ -0,0 +1,14 @@ ++0xA0 mute # Fn+D ++0xAE volumedown # Fn+F ++0xB0 volumeup # Fn+G ++0xDF sleep # Fn+W ++0xE0 bluetooth # Fn+H ++0xE2 cyclewindows # Fn+Esc ++0xEE battery # Fn+Q ++0xF0 media # Fn+R ++0xF5 switchvideomode # Fn+E ++0xF6 camera # Fn+T ++0xF7 f22 # Fn+Y (touchpad toggle) ++0xF8 brightnessup # Fn+S ++0xF9 brightnessdown # Fn+A ++0xFB wlan # Fn+J +diff -urN udev-145-orig/extras/keymap/keymaps/toshiba-satellite_m30x udev-145/extras/keymap/keymaps/toshiba-satellite_m30x +--- udev-145-orig/extras/keymap/keymaps/toshiba-satellite_m30x 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/toshiba-satellite_m30x 2010-06-11 10:52:56.000000000 +0200 +@@ -0,0 +1,7 @@ ++0xef brightnessdown ++0xd9 brightnessup ++0xee screenlock ++0x93 media ++0x9e prog1 #touchpad_enable ++0x9f prog2 #touchpad_disable ++ +diff -urN udev-145-orig/extras/keymap/keymaps/zepto-znote udev-145/extras/keymap/keymaps/zepto-znote +--- udev-145-orig/extras/keymap/keymaps/zepto-znote 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keymaps/zepto-znote 2010-03-18 16:44:52.000000000 +0100 +@@ -0,0 +1,11 @@ ++0x93 switchvideomode # Fn+F3 Toggle Video Output ++0x95 brightnessdown # Fn+F4 Brightness Down ++0x91 brightnessup # Fn+F5 Brightness Up ++0xA5 f22 # Fn+F6 Disable Touchpad ++0xA6 f22 # Fn+F6 Enable Touchpad ++0xA7 bluetooth # Fn+F10 Enable Bluetooth ++0XA9 bluetooth # Fn+F10 Disable Bluetooth ++0xF1 wlan # RF Switch Off ++0xF2 wlan # RF Switch On ++0xF4 prog1 # P1 Button ++0xF3 prog2 # P2 Button +diff -urN udev-145-orig/extras/keymap/keys-from-name.gperf udev-145/extras/keymap/keys-from-name.gperf +--- udev-145-orig/extras/keymap/keys-from-name.gperf 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keys-from-name.gperf 2010-08-10 16:45:45.000000000 +0200 +@@ -0,0 +1,382 @@ ++struct key { const char* name; unsigned short id; }; ++%null-strings ++%% ++KEY_RESERVED, KEY_RESERVED ++KEY_ESC, KEY_ESC ++KEY_1, KEY_1 ++KEY_2, KEY_2 ++KEY_3, KEY_3 ++KEY_4, KEY_4 ++KEY_5, KEY_5 ++KEY_6, KEY_6 ++KEY_7, KEY_7 ++KEY_8, KEY_8 ++KEY_9, KEY_9 ++KEY_0, KEY_0 ++KEY_MINUS, KEY_MINUS ++KEY_EQUAL, KEY_EQUAL ++KEY_BACKSPACE, KEY_BACKSPACE ++KEY_TAB, KEY_TAB ++KEY_Q, KEY_Q ++KEY_W, KEY_W ++KEY_E, KEY_E ++KEY_R, KEY_R ++KEY_T, KEY_T ++KEY_Y, KEY_Y ++KEY_U, KEY_U ++KEY_I, KEY_I ++KEY_O, KEY_O ++KEY_P, KEY_P ++KEY_LEFTBRACE, KEY_LEFTBRACE ++KEY_RIGHTBRACE, KEY_RIGHTBRACE ++KEY_ENTER, KEY_ENTER ++KEY_LEFTCTRL, KEY_LEFTCTRL ++KEY_A, KEY_A ++KEY_S, KEY_S ++KEY_D, KEY_D ++KEY_F, KEY_F ++KEY_G, KEY_G ++KEY_H, KEY_H ++KEY_J, KEY_J ++KEY_K, KEY_K ++KEY_L, KEY_L ++KEY_SEMICOLON, KEY_SEMICOLON ++KEY_APOSTROPHE, KEY_APOSTROPHE ++KEY_GRAVE, KEY_GRAVE ++KEY_LEFTSHIFT, KEY_LEFTSHIFT ++KEY_BACKSLASH, KEY_BACKSLASH ++KEY_Z, KEY_Z ++KEY_X, KEY_X ++KEY_C, KEY_C ++KEY_V, KEY_V ++KEY_B, KEY_B ++KEY_N, KEY_N ++KEY_M, KEY_M ++KEY_COMMA, KEY_COMMA ++KEY_DOT, KEY_DOT ++KEY_SLASH, KEY_SLASH ++KEY_RIGHTSHIFT, KEY_RIGHTSHIFT ++KEY_KPASTERISK, KEY_KPASTERISK ++KEY_LEFTALT, KEY_LEFTALT ++KEY_SPACE, KEY_SPACE ++KEY_CAPSLOCK, KEY_CAPSLOCK ++KEY_F1, KEY_F1 ++KEY_F2, KEY_F2 ++KEY_F3, KEY_F3 ++KEY_F4, KEY_F4 ++KEY_F5, KEY_F5 ++KEY_F6, KEY_F6 ++KEY_F7, KEY_F7 ++KEY_F8, KEY_F8 ++KEY_F9, KEY_F9 ++KEY_F10, KEY_F10 ++KEY_NUMLOCK, KEY_NUMLOCK ++KEY_SCROLLLOCK, KEY_SCROLLLOCK ++KEY_KP7, KEY_KP7 ++KEY_KP8, KEY_KP8 ++KEY_KP9, KEY_KP9 ++KEY_KPMINUS, KEY_KPMINUS ++KEY_KP4, KEY_KP4 ++KEY_KP5, KEY_KP5 ++KEY_KP6, KEY_KP6 ++KEY_KPPLUS, KEY_KPPLUS ++KEY_KP1, KEY_KP1 ++KEY_KP2, KEY_KP2 ++KEY_KP3, KEY_KP3 ++KEY_KP0, KEY_KP0 ++KEY_KPDOT, KEY_KPDOT ++KEY_ZENKAKUHANKAKU, KEY_ZENKAKUHANKAKU ++KEY_102ND, KEY_102ND ++KEY_F11, KEY_F11 ++KEY_F12, KEY_F12 ++KEY_RO, KEY_RO ++KEY_KATAKANA, KEY_KATAKANA ++KEY_HIRAGANA, KEY_HIRAGANA ++KEY_HENKAN, KEY_HENKAN ++KEY_KATAKANAHIRAGANA, KEY_KATAKANAHIRAGANA ++KEY_MUHENKAN, KEY_MUHENKAN ++KEY_KPJPCOMMA, KEY_KPJPCOMMA ++KEY_KPENTER, KEY_KPENTER ++KEY_RIGHTCTRL, KEY_RIGHTCTRL ++KEY_KPSLASH, KEY_KPSLASH ++KEY_SYSRQ, KEY_SYSRQ ++KEY_RIGHTALT, KEY_RIGHTALT ++KEY_LINEFEED, KEY_LINEFEED ++KEY_HOME, KEY_HOME ++KEY_UP, KEY_UP ++KEY_PAGEUP, KEY_PAGEUP ++KEY_LEFT, KEY_LEFT ++KEY_RIGHT, KEY_RIGHT ++KEY_END, KEY_END ++KEY_DOWN, KEY_DOWN ++KEY_PAGEDOWN, KEY_PAGEDOWN ++KEY_INSERT, KEY_INSERT ++KEY_DELETE, KEY_DELETE ++KEY_MACRO, KEY_MACRO ++KEY_MUTE, KEY_MUTE ++KEY_VOLUMEDOWN, KEY_VOLUMEDOWN ++KEY_VOLUMEUP, KEY_VOLUMEUP ++KEY_POWER, KEY_POWER ++KEY_KPEQUAL, KEY_KPEQUAL ++KEY_KPPLUSMINUS, KEY_KPPLUSMINUS ++KEY_PAUSE, KEY_PAUSE ++KEY_SCALE, KEY_SCALE ++KEY_KPCOMMA, KEY_KPCOMMA ++KEY_HANGEUL, KEY_HANGEUL ++KEY_HANJA, KEY_HANJA ++KEY_YEN, KEY_YEN ++KEY_LEFTMETA, KEY_LEFTMETA ++KEY_RIGHTMETA, KEY_RIGHTMETA ++KEY_COMPOSE, KEY_COMPOSE ++KEY_STOP, KEY_STOP ++KEY_AGAIN, KEY_AGAIN ++KEY_PROPS, KEY_PROPS ++KEY_UNDO, KEY_UNDO ++KEY_FRONT, KEY_FRONT ++KEY_COPY, KEY_COPY ++KEY_OPEN, KEY_OPEN ++KEY_PASTE, KEY_PASTE ++KEY_FIND, KEY_FIND ++KEY_CUT, KEY_CUT ++KEY_HELP, KEY_HELP ++KEY_MENU, KEY_MENU ++KEY_CALC, KEY_CALC ++KEY_SETUP, KEY_SETUP ++KEY_SLEEP, KEY_SLEEP ++KEY_WAKEUP, KEY_WAKEUP ++KEY_FILE, KEY_FILE ++KEY_SENDFILE, KEY_SENDFILE ++KEY_DELETEFILE, KEY_DELETEFILE ++KEY_XFER, KEY_XFER ++KEY_PROG1, KEY_PROG1 ++KEY_PROG2, KEY_PROG2 ++KEY_WWW, KEY_WWW ++KEY_MSDOS, KEY_MSDOS ++KEY_SCREENLOCK, KEY_SCREENLOCK ++KEY_DIRECTION, KEY_DIRECTION ++KEY_CYCLEWINDOWS, KEY_CYCLEWINDOWS ++KEY_MAIL, KEY_MAIL ++KEY_BOOKMARKS, KEY_BOOKMARKS ++KEY_COMPUTER, KEY_COMPUTER ++KEY_BACK, KEY_BACK ++KEY_FORWARD, KEY_FORWARD ++KEY_CLOSECD, KEY_CLOSECD ++KEY_EJECTCD, KEY_EJECTCD ++KEY_EJECTCLOSECD, KEY_EJECTCLOSECD ++KEY_NEXTSONG, KEY_NEXTSONG ++KEY_PLAYPAUSE, KEY_PLAYPAUSE ++KEY_PREVIOUSSONG, KEY_PREVIOUSSONG ++KEY_STOPCD, KEY_STOPCD ++KEY_RECORD, KEY_RECORD ++KEY_REWIND, KEY_REWIND ++KEY_PHONE, KEY_PHONE ++KEY_ISO, KEY_ISO ++KEY_CONFIG, KEY_CONFIG ++KEY_HOMEPAGE, KEY_HOMEPAGE ++KEY_REFRESH, KEY_REFRESH ++KEY_EXIT, KEY_EXIT ++KEY_MOVE, KEY_MOVE ++KEY_EDIT, KEY_EDIT ++KEY_SCROLLUP, KEY_SCROLLUP ++KEY_SCROLLDOWN, KEY_SCROLLDOWN ++KEY_KPLEFTPAREN, KEY_KPLEFTPAREN ++KEY_KPRIGHTPAREN, KEY_KPRIGHTPAREN ++KEY_NEW, KEY_NEW ++KEY_REDO, KEY_REDO ++KEY_F13, KEY_F13 ++KEY_F14, KEY_F14 ++KEY_F15, KEY_F15 ++KEY_F16, KEY_F16 ++KEY_F17, KEY_F17 ++KEY_F18, KEY_F18 ++KEY_F19, KEY_F19 ++KEY_F20, KEY_F20 ++KEY_F21, KEY_F21 ++KEY_F22, KEY_F22 ++KEY_F23, KEY_F23 ++KEY_F24, KEY_F24 ++KEY_PLAYCD, KEY_PLAYCD ++KEY_PAUSECD, KEY_PAUSECD ++KEY_PROG3, KEY_PROG3 ++KEY_PROG4, KEY_PROG4 ++KEY_DASHBOARD, KEY_DASHBOARD ++KEY_SUSPEND, KEY_SUSPEND ++KEY_CLOSE, KEY_CLOSE ++KEY_PLAY, KEY_PLAY ++KEY_FASTFORWARD, KEY_FASTFORWARD ++KEY_BASSBOOST, KEY_BASSBOOST ++KEY_PRINT, KEY_PRINT ++KEY_HP, KEY_HP ++KEY_CAMERA, KEY_CAMERA ++KEY_SOUND, KEY_SOUND ++KEY_QUESTION, KEY_QUESTION ++KEY_EMAIL, KEY_EMAIL ++KEY_CHAT, KEY_CHAT ++KEY_SEARCH, KEY_SEARCH ++KEY_CONNECT, KEY_CONNECT ++KEY_FINANCE, KEY_FINANCE ++KEY_SPORT, KEY_SPORT ++KEY_SHOP, KEY_SHOP ++KEY_ALTERASE, KEY_ALTERASE ++KEY_CANCEL, KEY_CANCEL ++KEY_BRIGHTNESSDOWN, KEY_BRIGHTNESSDOWN ++KEY_BRIGHTNESSUP, KEY_BRIGHTNESSUP ++KEY_MEDIA, KEY_MEDIA ++KEY_SWITCHVIDEOMODE, KEY_SWITCHVIDEOMODE ++KEY_KBDILLUMTOGGLE, KEY_KBDILLUMTOGGLE ++KEY_KBDILLUMDOWN, KEY_KBDILLUMDOWN ++KEY_KBDILLUMUP, KEY_KBDILLUMUP ++KEY_SEND, KEY_SEND ++KEY_REPLY, KEY_REPLY ++KEY_FORWARDMAIL, KEY_FORWARDMAIL ++KEY_SAVE, KEY_SAVE ++KEY_DOCUMENTS, KEY_DOCUMENTS ++KEY_BATTERY, KEY_BATTERY ++KEY_BLUETOOTH, KEY_BLUETOOTH ++KEY_WLAN, KEY_WLAN ++KEY_UWB, KEY_UWB ++KEY_UNKNOWN, KEY_UNKNOWN ++KEY_VIDEO_NEXT, KEY_VIDEO_NEXT ++KEY_VIDEO_PREV, KEY_VIDEO_PREV ++KEY_BRIGHTNESS_CYCLE, KEY_BRIGHTNESS_CYCLE ++KEY_BRIGHTNESS_ZERO, KEY_BRIGHTNESS_ZERO ++KEY_DISPLAY_OFF, KEY_DISPLAY_OFF ++KEY_WIMAX, KEY_WIMAX ++KEY_RFKILL, KEY_RFKILL ++KEY_OK, KEY_OK ++KEY_SELECT, KEY_SELECT ++KEY_GOTO, KEY_GOTO ++KEY_CLEAR, KEY_CLEAR ++KEY_POWER2, KEY_POWER2 ++KEY_OPTION, KEY_OPTION ++KEY_INFO, KEY_INFO ++KEY_TIME, KEY_TIME ++KEY_VENDOR, KEY_VENDOR ++KEY_ARCHIVE, KEY_ARCHIVE ++KEY_PROGRAM, KEY_PROGRAM ++KEY_CHANNEL, KEY_CHANNEL ++KEY_FAVORITES, KEY_FAVORITES ++KEY_EPG, KEY_EPG ++KEY_PVR, KEY_PVR ++KEY_MHP, KEY_MHP ++KEY_LANGUAGE, KEY_LANGUAGE ++KEY_TITLE, KEY_TITLE ++KEY_SUBTITLE, KEY_SUBTITLE ++KEY_ANGLE, KEY_ANGLE ++KEY_ZOOM, KEY_ZOOM ++KEY_MODE, KEY_MODE ++KEY_KEYBOARD, KEY_KEYBOARD ++KEY_SCREEN, KEY_SCREEN ++KEY_PC, KEY_PC ++KEY_TV, KEY_TV ++KEY_TV2, KEY_TV2 ++KEY_VCR, KEY_VCR ++KEY_VCR2, KEY_VCR2 ++KEY_SAT, KEY_SAT ++KEY_SAT2, KEY_SAT2 ++KEY_CD, KEY_CD ++KEY_TAPE, KEY_TAPE ++KEY_RADIO, KEY_RADIO ++KEY_TUNER, KEY_TUNER ++KEY_PLAYER, KEY_PLAYER ++KEY_TEXT, KEY_TEXT ++KEY_DVD, KEY_DVD ++KEY_AUX, KEY_AUX ++KEY_MP3, KEY_MP3 ++KEY_AUDIO, KEY_AUDIO ++KEY_VIDEO, KEY_VIDEO ++KEY_DIRECTORY, KEY_DIRECTORY ++KEY_LIST, KEY_LIST ++KEY_MEMO, KEY_MEMO ++KEY_CALENDAR, KEY_CALENDAR ++KEY_RED, KEY_RED ++KEY_GREEN, KEY_GREEN ++KEY_YELLOW, KEY_YELLOW ++KEY_BLUE, KEY_BLUE ++KEY_CHANNELUP, KEY_CHANNELUP ++KEY_CHANNELDOWN, KEY_CHANNELDOWN ++KEY_FIRST, KEY_FIRST ++KEY_LAST, KEY_LAST ++KEY_AB, KEY_AB ++KEY_NEXT, KEY_NEXT ++KEY_RESTART, KEY_RESTART ++KEY_SLOW, KEY_SLOW ++KEY_SHUFFLE, KEY_SHUFFLE ++KEY_BREAK, KEY_BREAK ++KEY_PREVIOUS, KEY_PREVIOUS ++KEY_DIGITS, KEY_DIGITS ++KEY_TEEN, KEY_TEEN ++KEY_TWEN, KEY_TWEN ++KEY_VIDEOPHONE, KEY_VIDEOPHONE ++KEY_GAMES, KEY_GAMES ++KEY_ZOOMIN, KEY_ZOOMIN ++KEY_ZOOMOUT, KEY_ZOOMOUT ++KEY_ZOOMRESET, KEY_ZOOMRESET ++KEY_WORDPROCESSOR, KEY_WORDPROCESSOR ++KEY_EDITOR, KEY_EDITOR ++KEY_SPREADSHEET, KEY_SPREADSHEET ++KEY_GRAPHICSEDITOR, KEY_GRAPHICSEDITOR ++KEY_PRESENTATION, KEY_PRESENTATION ++KEY_DATABASE, KEY_DATABASE ++KEY_NEWS, KEY_NEWS ++KEY_VOICEMAIL, KEY_VOICEMAIL ++KEY_ADDRESSBOOK, KEY_ADDRESSBOOK ++KEY_MESSENGER, KEY_MESSENGER ++KEY_DISPLAYTOGGLE, KEY_DISPLAYTOGGLE ++KEY_SPELLCHECK, KEY_SPELLCHECK ++KEY_LOGOFF, KEY_LOGOFF ++KEY_DOLLAR, KEY_DOLLAR ++KEY_EURO, KEY_EURO ++KEY_FRAMEBACK, KEY_FRAMEBACK ++KEY_FRAMEFORWARD, KEY_FRAMEFORWARD ++KEY_CONTEXT_MENU, KEY_CONTEXT_MENU ++KEY_MEDIA_REPEAT, KEY_MEDIA_REPEAT ++KEY_DEL_EOL, KEY_DEL_EOL ++KEY_DEL_EOS, KEY_DEL_EOS ++KEY_INS_LINE, KEY_INS_LINE ++KEY_DEL_LINE, KEY_DEL_LINE ++KEY_FN, KEY_FN ++KEY_FN_ESC, KEY_FN_ESC ++KEY_FN_F1, KEY_FN_F1 ++KEY_FN_F2, KEY_FN_F2 ++KEY_FN_F3, KEY_FN_F3 ++KEY_FN_F4, KEY_FN_F4 ++KEY_FN_F5, KEY_FN_F5 ++KEY_FN_F6, KEY_FN_F6 ++KEY_FN_F7, KEY_FN_F7 ++KEY_FN_F8, KEY_FN_F8 ++KEY_FN_F9, KEY_FN_F9 ++KEY_FN_F10, KEY_FN_F10 ++KEY_FN_F11, KEY_FN_F11 ++KEY_FN_F12, KEY_FN_F12 ++KEY_FN_1, KEY_FN_1 ++KEY_FN_2, KEY_FN_2 ++KEY_FN_D, KEY_FN_D ++KEY_FN_E, KEY_FN_E ++KEY_FN_F, KEY_FN_F ++KEY_FN_S, KEY_FN_S ++KEY_FN_B, KEY_FN_B ++KEY_BRL_DOT1, KEY_BRL_DOT1 ++KEY_BRL_DOT2, KEY_BRL_DOT2 ++KEY_BRL_DOT3, KEY_BRL_DOT3 ++KEY_BRL_DOT4, KEY_BRL_DOT4 ++KEY_BRL_DOT5, KEY_BRL_DOT5 ++KEY_BRL_DOT6, KEY_BRL_DOT6 ++KEY_BRL_DOT7, KEY_BRL_DOT7 ++KEY_BRL_DOT8, KEY_BRL_DOT8 ++KEY_BRL_DOT9, KEY_BRL_DOT9 ++KEY_BRL_DOT10, KEY_BRL_DOT10 ++KEY_NUMERIC_0, KEY_NUMERIC_0 ++KEY_NUMERIC_1, KEY_NUMERIC_1 ++KEY_NUMERIC_2, KEY_NUMERIC_2 ++KEY_NUMERIC_3, KEY_NUMERIC_3 ++KEY_NUMERIC_4, KEY_NUMERIC_4 ++KEY_NUMERIC_5, KEY_NUMERIC_5 ++KEY_NUMERIC_6, KEY_NUMERIC_6 ++KEY_NUMERIC_7, KEY_NUMERIC_7 ++KEY_NUMERIC_8, KEY_NUMERIC_8 ++KEY_NUMERIC_9, KEY_NUMERIC_9 ++KEY_NUMERIC_STAR, KEY_NUMERIC_STAR ++KEY_NUMERIC_POUND, KEY_NUMERIC_POUND ++KEY_CAMERA_FOCUS, KEY_CAMERA_FOCUS ++KEY_WPS_BUTTON, KEY_WPS_BUTTON +diff -urN udev-145-orig/extras/keymap/keys-from-name.h udev-145/extras/keymap/keys-from-name.h +--- udev-145-orig/extras/keymap/keys-from-name.h 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keys-from-name.h 2010-08-11 15:14:09.000000000 +0200 +@@ -0,0 +1,1064 @@ ++/* ANSI-C code produced by gperf version 3.0.4 */ ++/* Command-line: /usr/bin/gperf -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C */ ++/* Computed positions: -k'5-8,$' */ ++ ++#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ ++ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ ++ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ ++ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ ++ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ ++ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ ++ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ ++ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ ++ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ ++ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ ++ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ ++ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ ++ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ ++ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ ++ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ ++ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ ++ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ ++ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ ++ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ ++ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ ++ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ ++ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ ++ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) ++/* The character set is not based on ISO-646. */ ++#error "gperf generated tables don't work with this execution character set. Please report a bug to ." ++#endif ++ ++struct key { const char* name; unsigned short id; }; ++ ++#define TOTAL_KEYWORDS 379 ++#define MIN_WORD_LENGTH 5 ++#define MAX_WORD_LENGTH 20 ++#define MIN_HASH_VALUE 5 ++#define MAX_HASH_VALUE 1967 ++/* maximum key range = 1963, duplicates = 0 */ ++ ++#ifndef GPERF_DOWNCASE ++#define GPERF_DOWNCASE 1 ++static unsigned char gperf_downcase[256] = ++ { ++ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ++ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, ++ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ++ 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, ++ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, ++ 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, ++ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, ++ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, ++ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, ++ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, ++ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, ++ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, ++ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, ++ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, ++ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, ++ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, ++ 255 ++ }; ++#endif ++ ++#ifndef GPERF_CASE_STRCMP ++#define GPERF_CASE_STRCMP 1 ++static int ++gperf_case_strcmp (register const char *s1, register const char *s2) ++{ ++ for (;;) ++ { ++ unsigned char c1 = gperf_downcase[(unsigned char)*s1++]; ++ unsigned char c2 = gperf_downcase[(unsigned char)*s2++]; ++ if (c1 != 0 && c1 == c2) ++ continue; ++ return (int)c1 - (int)c2; ++ } ++} ++#endif ++ ++#ifdef __GNUC__ ++__inline ++#else ++#ifdef __cplusplus ++inline ++#endif ++#endif ++static unsigned int ++hash_key_name (register const char *str, register unsigned int len) ++{ ++ static const unsigned short asso_values[] = ++ { ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 170, 245, ++ 160, 265, 275, 390, 380, 315, 225, 35, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 40, 200, 70, 5, 0, ++ 310, 185, 250, 105, 270, 260, 115, 150, 95, 15, ++ 30, 65, 10, 20, 25, 220, 485, 490, 55, 375, ++ 410, 1968, 1968, 1968, 1968, 305, 1968, 40, 200, 70, ++ 5, 0, 310, 185, 250, 105, 270, 260, 115, 150, ++ 95, 15, 30, 65, 10, 20, 25, 220, 485, 490, ++ 55, 375, 410, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, ++ 1968, 1968, 1968, 1968, 1968, 1968 ++ }; ++ register int hval = len; ++ ++ switch (hval) ++ { ++ default: ++ hval += asso_values[(unsigned char)str[7]]; ++ /*FALLTHROUGH*/ ++ case 7: ++ hval += asso_values[(unsigned char)str[6]]; ++ /*FALLTHROUGH*/ ++ case 6: ++ hval += asso_values[(unsigned char)str[5]]; ++ /*FALLTHROUGH*/ ++ case 5: ++ hval += asso_values[(unsigned char)str[4]]; ++ break; ++ } ++ return hval + asso_values[(unsigned char)str[len - 1]]; ++} ++ ++#ifdef __GNUC__ ++__inline ++#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif ++#endif ++const struct key * ++lookup_key (register const char *str, register unsigned int len) ++{ ++ static const struct key wordlist[] = ++ { ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_E", KEY_E}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_D", KEY_D}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_R", KEY_R}, ++ {(char*)0}, ++ {"KEY_RED", KEY_RED}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_O", KEY_O}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_S", KEY_S}, ++ {"KEY_RO", KEY_RO}, ++ {"KEY_RESERVED", KEY_RESERVED}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_REDO", KEY_REDO}, ++ {(char*)0}, ++ {"KEY_T", KEY_T}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_P", KEY_P}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_9", KEY_9}, ++ {(char*)0}, ++ {"KEY_DOT", KEY_DOT}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_A", KEY_A}, ++ {"KEY_CD", KEY_CD}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_RESTART", KEY_RESTART}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_SPREADSHEET", KEY_SPREADSHEET}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_TAPE", KEY_TAPE}, ++ {(char*)0}, ++ {"KEY_STOPCD", KEY_STOPCD}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_SPORT", KEY_SPORT}, ++ {"KEY_RECORD", KEY_RECORD}, ++ {(char*)0}, ++ {"KEY_END", KEY_END}, ++ {(char*)0}, ++ {"KEY_PROPS", KEY_PROPS}, ++ {"KEY_X", KEY_X}, ++ {(char*)0}, ++ {"KEY_SAT", KEY_SAT}, ++ {(char*)0}, ++ {"KEY_APOSTROPHE", KEY_APOSTROPHE}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_DATABASE", KEY_DATABASE}, ++ {(char*)0}, ++ {"KEY_PASTE", KEY_PASTE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_STOP", KEY_STOP}, ++ {(char*)0}, ++ {"KEY_DELETE", KEY_DELETE}, ++ {(char*)0}, ++ {"KEY_SENDFILE", KEY_SENDFILE}, ++ {"KEY_SEND", KEY_SEND}, ++ {"KEY_DELETEFILE", KEY_DELETEFILE}, ++ {"KEY_Q", KEY_Q}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_TEXT", KEY_TEXT}, ++ {"KEY_ENTER", KEY_ENTER}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_C", KEY_C}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_EDITOR", KEY_EDITOR}, ++ {(char*)0}, ++ {"KEY_SCROLLUP", KEY_SCROLLUP}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_ISO", KEY_ISO}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_ESC", KEY_ESC}, ++ {"KEY_EDIT", KEY_EDIT}, ++ {"KEY_SPACE", KEY_SPACE}, ++ {"KEY_SELECT", KEY_SELECT}, ++ {"KEY_PRESENTATION", KEY_PRESENTATION}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_SLEEP", KEY_SLEEP}, ++ {(char*)0}, ++ {"KEY_PC", KEY_PC}, ++ {"KEY_DISPLAYTOGGLE", KEY_DISPLAYTOGGLE}, ++ {"KEY_MODE", KEY_MODE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_RADIO", KEY_RADIO}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_ALTERASE", KEY_ALTERASE}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_N", KEY_N}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_SCREEN", KEY_SCREEN}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_NEXT", KEY_NEXT}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_MESSENGER", KEY_MESSENGER}, ++ {(char*)0}, ++ {"KEY_I", KEY_I}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_EXIT", KEY_EXIT}, ++ {"KEY_MSDOS", KEY_MSDOS}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_TEEN", KEY_TEEN}, ++ {"KEY_SCROLLDOWN", KEY_SCROLLDOWN}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_DIRECTION", KEY_DIRECTION}, ++ {"KEY_CLOSE", KEY_CLOSE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_LAST", KEY_LAST}, ++ {(char*)0}, ++ {"KEY_L", KEY_L}, ++ {"KEY_CLOSECD", KEY_CLOSECD}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_OPEN", KEY_OPEN}, ++ {"KEY_CLEAR", KEY_CLEAR}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_CALENDAR", KEY_CALENDAR}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_SCALE", KEY_SCALE}, ++ {"KEY_INSERT", KEY_INSERT}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_GOTO", KEY_GOTO}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_EURO", KEY_EURO}, ++ {(char*)0}, ++ {"KEY_DOLLAR", KEY_DOLLAR}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_PRINT", KEY_PRINT}, ++ {(char*)0}, ++ {"KEY_COMPOSE", KEY_COMPOSE}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_TITLE", KEY_TITLE}, ++ {"KEY_OPTION", KEY_OPTION}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_UP", KEY_UP}, ++ {"KEY_COMPUTER", KEY_COMPUTER}, ++ {"KEY_TIME", KEY_TIME}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_GRAPHICSEDITOR", KEY_GRAPHICSEDITOR}, ++ {"KEY_MACRO", KEY_MACRO}, ++ {"KEY_PAGEUP", KEY_PAGEUP}, ++ {"KEY_CAMERA_FOCUS", KEY_CAMERA_FOCUS}, ++ {(char*)0}, ++ {"KEY_LIST", KEY_LIST}, ++ {"KEY_GREEN", KEY_GREEN}, ++ {(char*)0}, ++ {"KEY_MEDIA_REPEAT", KEY_MEDIA_REPEAT}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_SETUP", KEY_SETUP}, ++ {"KEY_M", KEY_M}, ++ {"KEY_SUSPEND", KEY_SUSPEND}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_MEDIA", KEY_MEDIA}, ++ {"KEY_CAMERA", KEY_CAMERA}, ++ {"KEY_CONNECT", KEY_CONNECT}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_HP", KEY_HP}, ++ {(char*)0}, ++ {"KEY_BASSBOOST", KEY_BASSBOOST}, ++ {"KEY_PAUSE", KEY_PAUSE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_2", KEY_2}, ++ {"KEY_PAUSECD", KEY_PAUSECD}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_SEARCH", KEY_SEARCH}, ++ {(char*)0}, ++ {"KEY_LINEFEED", KEY_LINEFEED}, ++ {"KEY_DASHBOARD", KEY_DASHBOARD}, ++ {(char*)0}, ++ {"KEY_ADDRESSBOOK", KEY_ADDRESSBOOK}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_MEMO", KEY_MEMO}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_DOCUMENTS", KEY_DOCUMENTS}, ++ {"KEY_KPDOT", KEY_KPDOT}, ++ {"KEY_0", KEY_0}, ++ {(char*)0}, ++ {"KEY_CUT", KEY_CUT}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_SHOP", KEY_SHOP}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_EJECTCD", KEY_EJECTCD}, ++ {(char*)0}, ++ {"KEY_UNDO", KEY_UNDO}, ++ {"KEY_TUNER", KEY_TUNER}, ++ {(char*)0}, ++ {"KEY_EJECTCLOSECD", KEY_EJECTCLOSECD}, ++ {"KEY_PAGEDOWN", KEY_PAGEDOWN}, ++ {(char*)0}, ++ {"KEY_SOUND", KEY_SOUND}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_KP9", KEY_KP9}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_NEXTSONG", KEY_NEXTSONG}, ++ {"KEY_CALC", KEY_CALC}, ++ {"KEY_SCREENLOCK", KEY_SCREENLOCK}, ++ {"KEY_G", KEY_G}, ++ {(char*)0}, ++ {"KEY_AUX", KEY_AUX}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_ARCHIVE", KEY_ARCHIVE}, ++ {(char*)0}, ++ {"KEY_SEMICOLON", KEY_SEMICOLON}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_F9", KEY_F9}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_SCROLLLOCK", KEY_SCROLLLOCK}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_XFER", KEY_XFER}, ++ {"KEY_AUDIO", KEY_AUDIO}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_PHONE", KEY_PHONE}, ++ {"KEY_CANCEL", KEY_CANCEL}, ++ {"KEY_PROGRAM", KEY_PROGRAM}, ++ {(char*)0}, ++ {"KEY_MUTE", KEY_MUTE}, ++ {"KEY_GAMES", KEY_GAMES}, ++ {"KEY_B", KEY_B}, ++ {"KEY_KPENTER", KEY_KPENTER}, ++ {"KEY_EPG", KEY_EPG}, ++ {(char*)0}, ++ {"KEY_PROG2", KEY_PROG2}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_QUESTION", KEY_QUESTION}, ++ {"KEY_SAT2", KEY_SAT2}, ++ {(char*)0}, ++ {"KEY_FASTFORWARD", KEY_FASTFORWARD}, ++ {(char*)0}, ++ {"KEY_KATAKANA", KEY_KATAKANA}, ++ {"KEY_CHAT", KEY_CHAT}, ++ {"KEY_EMAIL", KEY_EMAIL}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_HOME", KEY_HOME}, ++ {(char*)0}, ++ {"KEY_KATAKANAHIRAGANA", KEY_KATAKANAHIRAGANA}, ++ {"KEY_KPCOMMA", KEY_KPCOMMA}, ++ {"KEY_HOMEPAGE", KEY_HOMEPAGE}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_DIGITS", KEY_DIGITS}, ++ {(char*)0}, ++ {"KEY_CAPSLOCK", KEY_CAPSLOCK}, ++ {"KEY_HELP", KEY_HELP}, ++ {"KEY_COMMA", KEY_COMMA}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_DEL_LINE", KEY_DEL_LINE}, ++ {(char*)0}, ++ {"KEY_SPELLCHECK", KEY_SPELLCHECK}, ++ {(char*)0}, ++ {"KEY_CONTEXT_MENU", KEY_CONTEXT_MENU}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_ANGLE", KEY_ANGLE}, ++ {"KEY_U", KEY_U}, ++ {"KEY_AB", KEY_AB}, ++ {"KEY_LANGUAGE", KEY_LANGUAGE}, ++ {(char*)0}, ++ {"KEY_EQUAL", KEY_EQUAL}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_SLASH", KEY_SLASH}, ++ {"KEY_8", KEY_8}, ++ {"KEY_DEL_EOS", KEY_DEL_EOS}, ++ {"KEY_HIRAGANA", KEY_HIRAGANA}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_LEFTBRACE", KEY_LEFTBRACE}, ++ {"KEY_FRONT", KEY_FRONT}, ++ {"KEY_KPPLUS", KEY_KPPLUS}, ++ {(char*)0}, ++ {"KEY_MHP", KEY_MHP}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_KPPLUSMINUS", KEY_KPPLUSMINUS}, ++ {(char*)0}, ++ {"KEY_TAB", KEY_TAB}, ++ {(char*)0}, ++ {"KEY_AGAIN", KEY_AGAIN}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_SUBTITLE", KEY_SUBTITLE}, ++ {(char*)0}, ++ {"KEY_FIRST", KEY_FIRST}, ++ {(char*)0}, ++ {"KEY_KPEQUAL", KEY_KPEQUAL}, ++ {(char*)0}, ++ {"KEY_LEFT", KEY_LEFT}, ++ {(char*)0}, ++ {"KEY_DISPLAY_OFF", KEY_DISPLAY_OFF}, ++ {"KEY_LEFTALT", KEY_LEFTALT}, ++ {"KEY_NUMERIC_POUND", KEY_NUMERIC_POUND}, ++ {"KEY_LEFTSHIFT", KEY_LEFTSHIFT}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_STAR", KEY_NUMERIC_STAR}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_PROG1", KEY_PROG1}, ++ {"KEY_1", KEY_1}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_CHANNELUP", KEY_CHANNELUP}, ++ {"KEY_SYSRQ", KEY_SYSRQ}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_LEFTMETA", KEY_LEFTMETA}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_H", KEY_H}, ++ {"KEY_FN", KEY_FN}, ++ {"KEY_DVD", KEY_DVD}, ++ {"KEY_DIRECTORY", KEY_DIRECTORY}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_9", KEY_NUMERIC_9}, ++ {"KEY_PROG3", KEY_PROG3}, ++ {"KEY_KPLEFTPAREN", KEY_KPLEFTPAREN}, ++ {"KEY_KPRIGHTPAREN", KEY_KPRIGHTPAREN}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_BREAK", KEY_BREAK}, ++ {"KEY_BRIGHTNESS_CYCLE", KEY_BRIGHTNESS_CYCLE}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_BOOKMARKS", KEY_BOOKMARKS}, ++ {"KEY_PROG4", KEY_PROG4}, ++ {"KEY_K", KEY_K}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FIND", KEY_FIND}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FRAMEFORWARD", KEY_FRAMEFORWARD}, ++ {(char*)0}, ++ {"KEY_MAIL", KEY_MAIL}, ++ {"KEY_BRIGHTNESS_ZERO", KEY_BRIGHTNESS_ZERO}, ++ {"KEY_3", KEY_3}, ++ {(char*)0}, ++ {"KEY_INS_LINE", KEY_INS_LINE}, ++ {"KEY_FILE", KEY_FILE}, ++ {"KEY_REPLY", KEY_REPLY}, ++ {(char*)0}, ++ {"KEY_OK", KEY_OK}, ++ {"KEY_PVR", KEY_PVR}, ++ {"KEY_BLUE", KEY_BLUE}, ++ {(char*)0}, ++ {"KEY_J", KEY_J}, ++ {"KEY_BRIGHTNESSUP", KEY_BRIGHTNESSUP}, ++ {"KEY_WORDPROCESSOR", KEY_WORDPROCESSOR}, ++ {"KEY_INFO", KEY_INFO}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_DEL_EOL", KEY_DEL_EOL}, ++ {(char*)0}, ++ {"KEY_SAVE", KEY_SAVE}, ++ {"KEY_POWER", KEY_POWER}, ++ {"KEY_4", KEY_4}, ++ {(char*)0}, ++ {"KEY_PREVIOUS", KEY_PREVIOUS}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_FINANCE", KEY_FINANCE}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_RIGHTBRACE", KEY_RIGHTBRACE}, ++ {"KEY_CHANNELDOWN", KEY_CHANNELDOWN}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_YEN", KEY_YEN}, ++ {"KEY_PLAYPAUSE", KEY_PLAYPAUSE}, ++ {(char*)0}, ++ {"KEY_PLAYCD", KEY_PLAYCD}, ++ {"KEY_KPMINUS", KEY_KPMINUS}, ++ {"KEY_LEFTCTRL", KEY_LEFTCTRL}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_PLAYER", KEY_PLAYER}, ++ {"KEY_CHANNEL", KEY_CHANNEL}, ++ {"KEY_VCR", KEY_VCR}, ++ {"KEY_BACKSPACE", KEY_BACKSPACE}, ++ {"KEY_RIGHT", KEY_RIGHT}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_RIGHTALT", KEY_RIGHTALT}, ++ {"KEY_KBDILLUMTOGGLE", KEY_KBDILLUMTOGGLE}, ++ {"KEY_RIGHTSHIFT", KEY_RIGHTSHIFT}, ++ {(char*)0}, ++ {"KEY_REFRESH", KEY_REFRESH}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_MINUS", KEY_MINUS}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_RIGHTMETA", KEY_RIGHTMETA}, ++ {(char*)0}, ++ {"KEY_VENDOR", KEY_VENDOR}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_VIDEOPHONE", KEY_VIDEOPHONE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_BRIGHTNESSDOWN", KEY_BRIGHTNESSDOWN}, ++ {"KEY_KBDILLUMUP", KEY_KBDILLUMUP}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_KP2", KEY_KP2}, ++ {(char*)0}, ++ {"KEY_VIDEO", KEY_VIDEO}, ++ {"KEY_REWIND", KEY_REWIND}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_KPASTERISK", KEY_KPASTERISK}, ++ {"KEY_F", KEY_F}, ++ {"KEY_ZOOMOUT", KEY_ZOOMOUT}, ++ {(char*)0}, ++ {"KEY_ZOOMRESET", KEY_ZOOMRESET}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F19", KEY_F19}, ++ {"KEY_NEWS", KEY_NEWS}, ++ {"KEY_VIDEO_NEXT", KEY_VIDEO_NEXT}, ++ {"KEY_7", KEY_7}, ++ {"KEY_F2", KEY_F2}, ++ {"KEY_KP0", KEY_KP0}, ++ {"KEY_NUMERIC_2", KEY_NUMERIC_2}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_KPJPCOMMA", KEY_KPJPCOMMA}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_0", KEY_NUMERIC_0}, ++ {(char*)0}, ++ {"KEY_LOGOFF", KEY_LOGOFF}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_MOVE", KEY_MOVE}, ++ {"KEY_SWITCHVIDEOMODE", KEY_SWITCHVIDEOMODE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_CYCLEWINDOWS", KEY_CYCLEWINDOWS}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_BATTERY", KEY_BATTERY}, ++ {"KEY_BRL_DOT9", KEY_BRL_DOT9}, ++ {"KEY_RIGHTCTRL", KEY_RIGHTCTRL}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_KBDILLUMDOWN", KEY_KBDILLUMDOWN}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_102ND", KEY_102ND}, ++ {"KEY_CONFIG", KEY_CONFIG}, ++ {"KEY_KPSLASH", KEY_KPSLASH}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_MENU", KEY_MENU}, ++ {(char*)0}, ++ {"KEY_ZOOMIN", KEY_ZOOMIN}, ++ {"KEY_HANGEUL", KEY_HANGEUL}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_8", KEY_NUMERIC_8}, ++ {"KEY_HANJA", KEY_HANJA}, ++ {"KEY_POWER2", KEY_POWER2}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_DOWN", KEY_DOWN}, ++ {(char*)0}, ++ {"KEY_HENKAN", KEY_HENKAN}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_TWEN", KEY_TWEN}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_MP3", KEY_MP3}, ++ {"KEY_FN_E", KEY_FN_E}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_1", KEY_NUMERIC_1}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_PREVIOUSSONG", KEY_PREVIOUSSONG}, ++ {"KEY_MUHENKAN", KEY_MUHENKAN}, ++ {"KEY_FN_D", KEY_FN_D}, ++ {"KEY_GRAVE", KEY_GRAVE}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_NUMERIC_3", KEY_NUMERIC_3}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_KP8", KEY_KP8}, ++ {"KEY_ZOOM", KEY_ZOOM}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_4", KEY_NUMERIC_4}, ++ {(char*)0}, ++ {"KEY_Y", KEY_Y}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FN_S", KEY_FN_S}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_6", KEY_6}, ++ {"KEY_F8", KEY_F8}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_UNKNOWN", KEY_UNKNOWN}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FRAMEBACK", KEY_FRAMEBACK}, ++ {(char*)0}, ++ {"KEY_5", KEY_5}, ++ {(char*)0}, ++ {"KEY_KP1", KEY_KP1}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FN_ESC", KEY_FN_ESC}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_NUMERIC_7", KEY_NUMERIC_7}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F22", KEY_F22}, ++ {"KEY_BLUETOOTH", KEY_BLUETOOTH}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_BRL_DOT2", KEY_BRL_DOT2}, ++ {"KEY_VOICEMAIL", KEY_VOICEMAIL}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_F1", KEY_F1}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_RFKILL", KEY_RFKILL}, ++ {"KEY_SHUFFLE", KEY_SHUFFLE}, ++ {(char*)0}, ++ {"KEY_BRL_DOT10", KEY_BRL_DOT10}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F20", KEY_F20}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_Z", KEY_Z}, ++ {(char*)0}, ++ {"KEY_KP3", KEY_KP3}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_WAKEUP", KEY_WAKEUP}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_BACKSLASH", KEY_BACKSLASH}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_TV2", KEY_TV2}, ++ {"KEY_BACK", KEY_BACK}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FORWARD", KEY_FORWARD}, ++ {(char*)0}, ++ {"KEY_WLAN", KEY_WLAN}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_F3", KEY_F3}, ++ {"KEY_KP4", KEY_KP4}, ++ {(char*)0}, ++ {"KEY_WIMAX", KEY_WIMAX}, ++ {(char*)0}, ++ {"KEY_NUMLOCK", KEY_NUMLOCK}, ++ {"KEY_KEYBOARD", KEY_KEYBOARD}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_NUMERIC_6", KEY_NUMERIC_6}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F4", KEY_F4}, ++ {"KEY_BRL_DOT8", KEY_BRL_DOT8}, ++ {"KEY_NUMERIC_5", KEY_NUMERIC_5}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_COPY", KEY_COPY}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_VOLUMEUP", KEY_VOLUMEUP}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F12", KEY_F12}, ++ {"KEY_FAVORITES", KEY_FAVORITES}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_BRL_DOT1", KEY_BRL_DOT1}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_VCR2", KEY_VCR2}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F10", KEY_F10}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_BRL_DOT3", KEY_BRL_DOT3}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_BRL_DOT4", KEY_BRL_DOT4}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_KP7", KEY_KP7}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_PLAY", KEY_PLAY}, ++ {"KEY_VOLUMEDOWN", KEY_VOLUMEDOWN}, ++ {(char*)0}, ++ {"KEY_F7", KEY_F7}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_WPS_BUTTON", KEY_WPS_BUTTON}, ++ {"KEY_FORWARDMAIL", KEY_FORWARDMAIL}, ++ {(char*)0}, ++ {"KEY_BRL_DOT7", KEY_BRL_DOT7}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_F21", KEY_F21}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_V", KEY_V}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_W", KEY_W}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_TV", KEY_TV}, ++ {(char*)0}, ++ {"KEY_ZENKAKUHANKAKU", KEY_ZENKAKUHANKAKU}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F23", KEY_F23}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F18", KEY_F18}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_BRL_DOT6", KEY_BRL_DOT6}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F24", KEY_F24}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_BRL_DOT5", KEY_BRL_DOT5}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_FN_2", KEY_FN_2}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_F11", KEY_F11}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_KP6", KEY_KP6}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FN_F9", KEY_FN_F9}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F6", KEY_F6}, ++ {"KEY_KP5", KEY_KP5}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_NEW", KEY_NEW}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_F13", KEY_F13}, ++ {(char*)0}, ++ {"KEY_VIDEO_PREV", KEY_VIDEO_PREV}, ++ {(char*)0}, ++ {"KEY_F5", KEY_F5}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_YELLOW", KEY_YELLOW}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_F14", KEY_F14}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_UWB", KEY_UWB}, ++ {"KEY_FN_B", KEY_FN_B}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_SLOW", KEY_SLOW}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FN_F2", KEY_FN_F2}, ++ {"KEY_FN_F12", KEY_FN_F12}, ++ {(char*)0}, ++ {"KEY_F17", KEY_F17}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_FN_F10", KEY_FN_F10}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_FN_1", KEY_FN_1}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_FN_F8", KEY_FN_F8}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_FN_F1", KEY_FN_F1}, ++ {"KEY_FN_F11", KEY_FN_F11}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, ++ {"KEY_FN_F3", KEY_FN_F3}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_FN_F4", KEY_FN_F4}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_F16", KEY_F16}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_FN_F", KEY_FN_F}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_F15", KEY_F15}, ++ {(char*)0}, ++ {"KEY_FN_F7", KEY_FN_F7}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_FN_F6", KEY_FN_F6}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, ++ {"KEY_FN_F5", KEY_FN_F5}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, ++ {(char*)0}, {(char*)0}, {(char*)0}, ++ {"KEY_WWW", KEY_WWW} ++ }; ++ ++ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) ++ { ++ register int key = hash_key_name (str, len); ++ ++ if (key <= MAX_HASH_VALUE && key >= 0) ++ { ++ register const char *s = wordlist[key].name; ++ ++ if (s && (((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strcmp (str, s)) ++ return &wordlist[key]; ++ } ++ } ++ return 0; ++} +diff -urN udev-145-orig/extras/keymap/keys-to-name.h udev-145/extras/keymap/keys-to-name.h +--- udev-145-orig/extras/keymap/keys-to-name.h 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keys-to-name.h 2010-08-11 15:14:10.000000000 +0200 +@@ -0,0 +1,381 @@ ++const char* const key_names[KEY_CNT] = { ++[KEY_RESERVED] = "KEY_RESERVED", ++[KEY_ESC] = "KEY_ESC", ++[KEY_1] = "KEY_1", ++[KEY_2] = "KEY_2", ++[KEY_3] = "KEY_3", ++[KEY_4] = "KEY_4", ++[KEY_5] = "KEY_5", ++[KEY_6] = "KEY_6", ++[KEY_7] = "KEY_7", ++[KEY_8] = "KEY_8", ++[KEY_9] = "KEY_9", ++[KEY_0] = "KEY_0", ++[KEY_MINUS] = "KEY_MINUS", ++[KEY_EQUAL] = "KEY_EQUAL", ++[KEY_BACKSPACE] = "KEY_BACKSPACE", ++[KEY_TAB] = "KEY_TAB", ++[KEY_Q] = "KEY_Q", ++[KEY_W] = "KEY_W", ++[KEY_E] = "KEY_E", ++[KEY_R] = "KEY_R", ++[KEY_T] = "KEY_T", ++[KEY_Y] = "KEY_Y", ++[KEY_U] = "KEY_U", ++[KEY_I] = "KEY_I", ++[KEY_O] = "KEY_O", ++[KEY_P] = "KEY_P", ++[KEY_LEFTBRACE] = "KEY_LEFTBRACE", ++[KEY_RIGHTBRACE] = "KEY_RIGHTBRACE", ++[KEY_ENTER] = "KEY_ENTER", ++[KEY_LEFTCTRL] = "KEY_LEFTCTRL", ++[KEY_A] = "KEY_A", ++[KEY_S] = "KEY_S", ++[KEY_D] = "KEY_D", ++[KEY_F] = "KEY_F", ++[KEY_G] = "KEY_G", ++[KEY_H] = "KEY_H", ++[KEY_J] = "KEY_J", ++[KEY_K] = "KEY_K", ++[KEY_L] = "KEY_L", ++[KEY_SEMICOLON] = "KEY_SEMICOLON", ++[KEY_APOSTROPHE] = "KEY_APOSTROPHE", ++[KEY_GRAVE] = "KEY_GRAVE", ++[KEY_LEFTSHIFT] = "KEY_LEFTSHIFT", ++[KEY_BACKSLASH] = "KEY_BACKSLASH", ++[KEY_Z] = "KEY_Z", ++[KEY_X] = "KEY_X", ++[KEY_C] = "KEY_C", ++[KEY_V] = "KEY_V", ++[KEY_B] = "KEY_B", ++[KEY_N] = "KEY_N", ++[KEY_M] = "KEY_M", ++[KEY_COMMA] = "KEY_COMMA", ++[KEY_DOT] = "KEY_DOT", ++[KEY_SLASH] = "KEY_SLASH", ++[KEY_RIGHTSHIFT] = "KEY_RIGHTSHIFT", ++[KEY_KPASTERISK] = "KEY_KPASTERISK", ++[KEY_LEFTALT] = "KEY_LEFTALT", ++[KEY_SPACE] = "KEY_SPACE", ++[KEY_CAPSLOCK] = "KEY_CAPSLOCK", ++[KEY_F1] = "KEY_F1", ++[KEY_F2] = "KEY_F2", ++[KEY_F3] = "KEY_F3", ++[KEY_F4] = "KEY_F4", ++[KEY_F5] = "KEY_F5", ++[KEY_F6] = "KEY_F6", ++[KEY_F7] = "KEY_F7", ++[KEY_F8] = "KEY_F8", ++[KEY_F9] = "KEY_F9", ++[KEY_F10] = "KEY_F10", ++[KEY_NUMLOCK] = "KEY_NUMLOCK", ++[KEY_SCROLLLOCK] = "KEY_SCROLLLOCK", ++[KEY_KP7] = "KEY_KP7", ++[KEY_KP8] = "KEY_KP8", ++[KEY_KP9] = "KEY_KP9", ++[KEY_KPMINUS] = "KEY_KPMINUS", ++[KEY_KP4] = "KEY_KP4", ++[KEY_KP5] = "KEY_KP5", ++[KEY_KP6] = "KEY_KP6", ++[KEY_KPPLUS] = "KEY_KPPLUS", ++[KEY_KP1] = "KEY_KP1", ++[KEY_KP2] = "KEY_KP2", ++[KEY_KP3] = "KEY_KP3", ++[KEY_KP0] = "KEY_KP0", ++[KEY_KPDOT] = "KEY_KPDOT", ++[KEY_ZENKAKUHANKAKU] = "KEY_ZENKAKUHANKAKU", ++[KEY_102ND] = "KEY_102ND", ++[KEY_F11] = "KEY_F11", ++[KEY_F12] = "KEY_F12", ++[KEY_RO] = "KEY_RO", ++[KEY_KATAKANA] = "KEY_KATAKANA", ++[KEY_HIRAGANA] = "KEY_HIRAGANA", ++[KEY_HENKAN] = "KEY_HENKAN", ++[KEY_KATAKANAHIRAGANA] = "KEY_KATAKANAHIRAGANA", ++[KEY_MUHENKAN] = "KEY_MUHENKAN", ++[KEY_KPJPCOMMA] = "KEY_KPJPCOMMA", ++[KEY_KPENTER] = "KEY_KPENTER", ++[KEY_RIGHTCTRL] = "KEY_RIGHTCTRL", ++[KEY_KPSLASH] = "KEY_KPSLASH", ++[KEY_SYSRQ] = "KEY_SYSRQ", ++[KEY_RIGHTALT] = "KEY_RIGHTALT", ++[KEY_LINEFEED] = "KEY_LINEFEED", ++[KEY_HOME] = "KEY_HOME", ++[KEY_UP] = "KEY_UP", ++[KEY_PAGEUP] = "KEY_PAGEUP", ++[KEY_LEFT] = "KEY_LEFT", ++[KEY_RIGHT] = "KEY_RIGHT", ++[KEY_END] = "KEY_END", ++[KEY_DOWN] = "KEY_DOWN", ++[KEY_PAGEDOWN] = "KEY_PAGEDOWN", ++[KEY_INSERT] = "KEY_INSERT", ++[KEY_DELETE] = "KEY_DELETE", ++[KEY_MACRO] = "KEY_MACRO", ++[KEY_MUTE] = "KEY_MUTE", ++[KEY_VOLUMEDOWN] = "KEY_VOLUMEDOWN", ++[KEY_VOLUMEUP] = "KEY_VOLUMEUP", ++[KEY_POWER] = "KEY_POWER", ++[KEY_KPEQUAL] = "KEY_KPEQUAL", ++[KEY_KPPLUSMINUS] = "KEY_KPPLUSMINUS", ++[KEY_PAUSE] = "KEY_PAUSE", ++[KEY_SCALE] = "KEY_SCALE", ++[KEY_KPCOMMA] = "KEY_KPCOMMA", ++[KEY_HANGEUL] = "KEY_HANGEUL", ++[KEY_HANJA] = "KEY_HANJA", ++[KEY_YEN] = "KEY_YEN", ++[KEY_LEFTMETA] = "KEY_LEFTMETA", ++[KEY_RIGHTMETA] = "KEY_RIGHTMETA", ++[KEY_COMPOSE] = "KEY_COMPOSE", ++[KEY_STOP] = "KEY_STOP", ++[KEY_AGAIN] = "KEY_AGAIN", ++[KEY_PROPS] = "KEY_PROPS", ++[KEY_UNDO] = "KEY_UNDO", ++[KEY_FRONT] = "KEY_FRONT", ++[KEY_COPY] = "KEY_COPY", ++[KEY_OPEN] = "KEY_OPEN", ++[KEY_PASTE] = "KEY_PASTE", ++[KEY_FIND] = "KEY_FIND", ++[KEY_CUT] = "KEY_CUT", ++[KEY_HELP] = "KEY_HELP", ++[KEY_MENU] = "KEY_MENU", ++[KEY_CALC] = "KEY_CALC", ++[KEY_SETUP] = "KEY_SETUP", ++[KEY_SLEEP] = "KEY_SLEEP", ++[KEY_WAKEUP] = "KEY_WAKEUP", ++[KEY_FILE] = "KEY_FILE", ++[KEY_SENDFILE] = "KEY_SENDFILE", ++[KEY_DELETEFILE] = "KEY_DELETEFILE", ++[KEY_XFER] = "KEY_XFER", ++[KEY_PROG1] = "KEY_PROG1", ++[KEY_PROG2] = "KEY_PROG2", ++[KEY_WWW] = "KEY_WWW", ++[KEY_MSDOS] = "KEY_MSDOS", ++[KEY_SCREENLOCK] = "KEY_SCREENLOCK", ++[KEY_DIRECTION] = "KEY_DIRECTION", ++[KEY_CYCLEWINDOWS] = "KEY_CYCLEWINDOWS", ++[KEY_MAIL] = "KEY_MAIL", ++[KEY_BOOKMARKS] = "KEY_BOOKMARKS", ++[KEY_COMPUTER] = "KEY_COMPUTER", ++[KEY_BACK] = "KEY_BACK", ++[KEY_FORWARD] = "KEY_FORWARD", ++[KEY_CLOSECD] = "KEY_CLOSECD", ++[KEY_EJECTCD] = "KEY_EJECTCD", ++[KEY_EJECTCLOSECD] = "KEY_EJECTCLOSECD", ++[KEY_NEXTSONG] = "KEY_NEXTSONG", ++[KEY_PLAYPAUSE] = "KEY_PLAYPAUSE", ++[KEY_PREVIOUSSONG] = "KEY_PREVIOUSSONG", ++[KEY_STOPCD] = "KEY_STOPCD", ++[KEY_RECORD] = "KEY_RECORD", ++[KEY_REWIND] = "KEY_REWIND", ++[KEY_PHONE] = "KEY_PHONE", ++[KEY_ISO] = "KEY_ISO", ++[KEY_CONFIG] = "KEY_CONFIG", ++[KEY_HOMEPAGE] = "KEY_HOMEPAGE", ++[KEY_REFRESH] = "KEY_REFRESH", ++[KEY_EXIT] = "KEY_EXIT", ++[KEY_MOVE] = "KEY_MOVE", ++[KEY_EDIT] = "KEY_EDIT", ++[KEY_SCROLLUP] = "KEY_SCROLLUP", ++[KEY_SCROLLDOWN] = "KEY_SCROLLDOWN", ++[KEY_KPLEFTPAREN] = "KEY_KPLEFTPAREN", ++[KEY_KPRIGHTPAREN] = "KEY_KPRIGHTPAREN", ++[KEY_NEW] = "KEY_NEW", ++[KEY_REDO] = "KEY_REDO", ++[KEY_F13] = "KEY_F13", ++[KEY_F14] = "KEY_F14", ++[KEY_F15] = "KEY_F15", ++[KEY_F16] = "KEY_F16", ++[KEY_F17] = "KEY_F17", ++[KEY_F18] = "KEY_F18", ++[KEY_F19] = "KEY_F19", ++[KEY_F20] = "KEY_F20", ++[KEY_F21] = "KEY_F21", ++[KEY_F22] = "KEY_F22", ++[KEY_F23] = "KEY_F23", ++[KEY_F24] = "KEY_F24", ++[KEY_PLAYCD] = "KEY_PLAYCD", ++[KEY_PAUSECD] = "KEY_PAUSECD", ++[KEY_PROG3] = "KEY_PROG3", ++[KEY_PROG4] = "KEY_PROG4", ++[KEY_DASHBOARD] = "KEY_DASHBOARD", ++[KEY_SUSPEND] = "KEY_SUSPEND", ++[KEY_CLOSE] = "KEY_CLOSE", ++[KEY_PLAY] = "KEY_PLAY", ++[KEY_FASTFORWARD] = "KEY_FASTFORWARD", ++[KEY_BASSBOOST] = "KEY_BASSBOOST", ++[KEY_PRINT] = "KEY_PRINT", ++[KEY_HP] = "KEY_HP", ++[KEY_CAMERA] = "KEY_CAMERA", ++[KEY_SOUND] = "KEY_SOUND", ++[KEY_QUESTION] = "KEY_QUESTION", ++[KEY_EMAIL] = "KEY_EMAIL", ++[KEY_CHAT] = "KEY_CHAT", ++[KEY_SEARCH] = "KEY_SEARCH", ++[KEY_CONNECT] = "KEY_CONNECT", ++[KEY_FINANCE] = "KEY_FINANCE", ++[KEY_SPORT] = "KEY_SPORT", ++[KEY_SHOP] = "KEY_SHOP", ++[KEY_ALTERASE] = "KEY_ALTERASE", ++[KEY_CANCEL] = "KEY_CANCEL", ++[KEY_BRIGHTNESSDOWN] = "KEY_BRIGHTNESSDOWN", ++[KEY_BRIGHTNESSUP] = "KEY_BRIGHTNESSUP", ++[KEY_MEDIA] = "KEY_MEDIA", ++[KEY_SWITCHVIDEOMODE] = "KEY_SWITCHVIDEOMODE", ++[KEY_KBDILLUMTOGGLE] = "KEY_KBDILLUMTOGGLE", ++[KEY_KBDILLUMDOWN] = "KEY_KBDILLUMDOWN", ++[KEY_KBDILLUMUP] = "KEY_KBDILLUMUP", ++[KEY_SEND] = "KEY_SEND", ++[KEY_REPLY] = "KEY_REPLY", ++[KEY_FORWARDMAIL] = "KEY_FORWARDMAIL", ++[KEY_SAVE] = "KEY_SAVE", ++[KEY_DOCUMENTS] = "KEY_DOCUMENTS", ++[KEY_BATTERY] = "KEY_BATTERY", ++[KEY_BLUETOOTH] = "KEY_BLUETOOTH", ++[KEY_WLAN] = "KEY_WLAN", ++[KEY_UWB] = "KEY_UWB", ++[KEY_UNKNOWN] = "KEY_UNKNOWN", ++[KEY_VIDEO_NEXT] = "KEY_VIDEO_NEXT", ++[KEY_VIDEO_PREV] = "KEY_VIDEO_PREV", ++[KEY_BRIGHTNESS_CYCLE] = "KEY_BRIGHTNESS_CYCLE", ++[KEY_BRIGHTNESS_ZERO] = "KEY_BRIGHTNESS_ZERO", ++[KEY_DISPLAY_OFF] = "KEY_DISPLAY_OFF", ++[KEY_WIMAX] = "KEY_WIMAX", ++[KEY_RFKILL] = "KEY_RFKILL", ++[KEY_OK] = "KEY_OK", ++[KEY_SELECT] = "KEY_SELECT", ++[KEY_GOTO] = "KEY_GOTO", ++[KEY_CLEAR] = "KEY_CLEAR", ++[KEY_POWER2] = "KEY_POWER2", ++[KEY_OPTION] = "KEY_OPTION", ++[KEY_INFO] = "KEY_INFO", ++[KEY_TIME] = "KEY_TIME", ++[KEY_VENDOR] = "KEY_VENDOR", ++[KEY_ARCHIVE] = "KEY_ARCHIVE", ++[KEY_PROGRAM] = "KEY_PROGRAM", ++[KEY_CHANNEL] = "KEY_CHANNEL", ++[KEY_FAVORITES] = "KEY_FAVORITES", ++[KEY_EPG] = "KEY_EPG", ++[KEY_PVR] = "KEY_PVR", ++[KEY_MHP] = "KEY_MHP", ++[KEY_LANGUAGE] = "KEY_LANGUAGE", ++[KEY_TITLE] = "KEY_TITLE", ++[KEY_SUBTITLE] = "KEY_SUBTITLE", ++[KEY_ANGLE] = "KEY_ANGLE", ++[KEY_ZOOM] = "KEY_ZOOM", ++[KEY_MODE] = "KEY_MODE", ++[KEY_KEYBOARD] = "KEY_KEYBOARD", ++[KEY_SCREEN] = "KEY_SCREEN", ++[KEY_PC] = "KEY_PC", ++[KEY_TV] = "KEY_TV", ++[KEY_TV2] = "KEY_TV2", ++[KEY_VCR] = "KEY_VCR", ++[KEY_VCR2] = "KEY_VCR2", ++[KEY_SAT] = "KEY_SAT", ++[KEY_SAT2] = "KEY_SAT2", ++[KEY_CD] = "KEY_CD", ++[KEY_TAPE] = "KEY_TAPE", ++[KEY_RADIO] = "KEY_RADIO", ++[KEY_TUNER] = "KEY_TUNER", ++[KEY_PLAYER] = "KEY_PLAYER", ++[KEY_TEXT] = "KEY_TEXT", ++[KEY_DVD] = "KEY_DVD", ++[KEY_AUX] = "KEY_AUX", ++[KEY_MP3] = "KEY_MP3", ++[KEY_AUDIO] = "KEY_AUDIO", ++[KEY_VIDEO] = "KEY_VIDEO", ++[KEY_DIRECTORY] = "KEY_DIRECTORY", ++[KEY_LIST] = "KEY_LIST", ++[KEY_MEMO] = "KEY_MEMO", ++[KEY_CALENDAR] = "KEY_CALENDAR", ++[KEY_RED] = "KEY_RED", ++[KEY_GREEN] = "KEY_GREEN", ++[KEY_YELLOW] = "KEY_YELLOW", ++[KEY_BLUE] = "KEY_BLUE", ++[KEY_CHANNELUP] = "KEY_CHANNELUP", ++[KEY_CHANNELDOWN] = "KEY_CHANNELDOWN", ++[KEY_FIRST] = "KEY_FIRST", ++[KEY_LAST] = "KEY_LAST", ++[KEY_AB] = "KEY_AB", ++[KEY_NEXT] = "KEY_NEXT", ++[KEY_RESTART] = "KEY_RESTART", ++[KEY_SLOW] = "KEY_SLOW", ++[KEY_SHUFFLE] = "KEY_SHUFFLE", ++[KEY_BREAK] = "KEY_BREAK", ++[KEY_PREVIOUS] = "KEY_PREVIOUS", ++[KEY_DIGITS] = "KEY_DIGITS", ++[KEY_TEEN] = "KEY_TEEN", ++[KEY_TWEN] = "KEY_TWEN", ++[KEY_VIDEOPHONE] = "KEY_VIDEOPHONE", ++[KEY_GAMES] = "KEY_GAMES", ++[KEY_ZOOMIN] = "KEY_ZOOMIN", ++[KEY_ZOOMOUT] = "KEY_ZOOMOUT", ++[KEY_ZOOMRESET] = "KEY_ZOOMRESET", ++[KEY_WORDPROCESSOR] = "KEY_WORDPROCESSOR", ++[KEY_EDITOR] = "KEY_EDITOR", ++[KEY_SPREADSHEET] = "KEY_SPREADSHEET", ++[KEY_GRAPHICSEDITOR] = "KEY_GRAPHICSEDITOR", ++[KEY_PRESENTATION] = "KEY_PRESENTATION", ++[KEY_DATABASE] = "KEY_DATABASE", ++[KEY_NEWS] = "KEY_NEWS", ++[KEY_VOICEMAIL] = "KEY_VOICEMAIL", ++[KEY_ADDRESSBOOK] = "KEY_ADDRESSBOOK", ++[KEY_MESSENGER] = "KEY_MESSENGER", ++[KEY_DISPLAYTOGGLE] = "KEY_DISPLAYTOGGLE", ++[KEY_SPELLCHECK] = "KEY_SPELLCHECK", ++[KEY_LOGOFF] = "KEY_LOGOFF", ++[KEY_DOLLAR] = "KEY_DOLLAR", ++[KEY_EURO] = "KEY_EURO", ++[KEY_FRAMEBACK] = "KEY_FRAMEBACK", ++[KEY_FRAMEFORWARD] = "KEY_FRAMEFORWARD", ++[KEY_CONTEXT_MENU] = "KEY_CONTEXT_MENU", ++[KEY_MEDIA_REPEAT] = "KEY_MEDIA_REPEAT", ++[KEY_DEL_EOL] = "KEY_DEL_EOL", ++[KEY_DEL_EOS] = "KEY_DEL_EOS", ++[KEY_INS_LINE] = "KEY_INS_LINE", ++[KEY_DEL_LINE] = "KEY_DEL_LINE", ++[KEY_FN] = "KEY_FN", ++[KEY_FN_ESC] = "KEY_FN_ESC", ++[KEY_FN_F1] = "KEY_FN_F1", ++[KEY_FN_F2] = "KEY_FN_F2", ++[KEY_FN_F3] = "KEY_FN_F3", ++[KEY_FN_F4] = "KEY_FN_F4", ++[KEY_FN_F5] = "KEY_FN_F5", ++[KEY_FN_F6] = "KEY_FN_F6", ++[KEY_FN_F7] = "KEY_FN_F7", ++[KEY_FN_F8] = "KEY_FN_F8", ++[KEY_FN_F9] = "KEY_FN_F9", ++[KEY_FN_F10] = "KEY_FN_F10", ++[KEY_FN_F11] = "KEY_FN_F11", ++[KEY_FN_F12] = "KEY_FN_F12", ++[KEY_FN_1] = "KEY_FN_1", ++[KEY_FN_2] = "KEY_FN_2", ++[KEY_FN_D] = "KEY_FN_D", ++[KEY_FN_E] = "KEY_FN_E", ++[KEY_FN_F] = "KEY_FN_F", ++[KEY_FN_S] = "KEY_FN_S", ++[KEY_FN_B] = "KEY_FN_B", ++[KEY_BRL_DOT1] = "KEY_BRL_DOT1", ++[KEY_BRL_DOT2] = "KEY_BRL_DOT2", ++[KEY_BRL_DOT3] = "KEY_BRL_DOT3", ++[KEY_BRL_DOT4] = "KEY_BRL_DOT4", ++[KEY_BRL_DOT5] = "KEY_BRL_DOT5", ++[KEY_BRL_DOT6] = "KEY_BRL_DOT6", ++[KEY_BRL_DOT7] = "KEY_BRL_DOT7", ++[KEY_BRL_DOT8] = "KEY_BRL_DOT8", ++[KEY_BRL_DOT9] = "KEY_BRL_DOT9", ++[KEY_BRL_DOT10] = "KEY_BRL_DOT10", ++[KEY_NUMERIC_0] = "KEY_NUMERIC_0", ++[KEY_NUMERIC_1] = "KEY_NUMERIC_1", ++[KEY_NUMERIC_2] = "KEY_NUMERIC_2", ++[KEY_NUMERIC_3] = "KEY_NUMERIC_3", ++[KEY_NUMERIC_4] = "KEY_NUMERIC_4", ++[KEY_NUMERIC_5] = "KEY_NUMERIC_5", ++[KEY_NUMERIC_6] = "KEY_NUMERIC_6", ++[KEY_NUMERIC_7] = "KEY_NUMERIC_7", ++[KEY_NUMERIC_8] = "KEY_NUMERIC_8", ++[KEY_NUMERIC_9] = "KEY_NUMERIC_9", ++[KEY_NUMERIC_STAR] = "KEY_NUMERIC_STAR", ++[KEY_NUMERIC_POUND] = "KEY_NUMERIC_POUND", ++[KEY_CAMERA_FOCUS] = "KEY_CAMERA_FOCUS", ++[KEY_WPS_BUTTON] = "KEY_WPS_BUTTON", ++}; +diff -urN udev-145-orig/extras/keymap/keys.txt udev-145/extras/keymap/keys.txt +--- udev-145-orig/extras/keymap/keys.txt 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/keys.txt 2010-08-10 16:45:45.000000000 +0200 +@@ -0,0 +1,379 @@ ++KEY_RESERVED ++KEY_ESC ++KEY_1 ++KEY_2 ++KEY_3 ++KEY_4 ++KEY_5 ++KEY_6 ++KEY_7 ++KEY_8 ++KEY_9 ++KEY_0 ++KEY_MINUS ++KEY_EQUAL ++KEY_BACKSPACE ++KEY_TAB ++KEY_Q ++KEY_W ++KEY_E ++KEY_R ++KEY_T ++KEY_Y ++KEY_U ++KEY_I ++KEY_O ++KEY_P ++KEY_LEFTBRACE ++KEY_RIGHTBRACE ++KEY_ENTER ++KEY_LEFTCTRL ++KEY_A ++KEY_S ++KEY_D ++KEY_F ++KEY_G ++KEY_H ++KEY_J ++KEY_K ++KEY_L ++KEY_SEMICOLON ++KEY_APOSTROPHE ++KEY_GRAVE ++KEY_LEFTSHIFT ++KEY_BACKSLASH ++KEY_Z ++KEY_X ++KEY_C ++KEY_V ++KEY_B ++KEY_N ++KEY_M ++KEY_COMMA ++KEY_DOT ++KEY_SLASH ++KEY_RIGHTSHIFT ++KEY_KPASTERISK ++KEY_LEFTALT ++KEY_SPACE ++KEY_CAPSLOCK ++KEY_F1 ++KEY_F2 ++KEY_F3 ++KEY_F4 ++KEY_F5 ++KEY_F6 ++KEY_F7 ++KEY_F8 ++KEY_F9 ++KEY_F10 ++KEY_NUMLOCK ++KEY_SCROLLLOCK ++KEY_KP7 ++KEY_KP8 ++KEY_KP9 ++KEY_KPMINUS ++KEY_KP4 ++KEY_KP5 ++KEY_KP6 ++KEY_KPPLUS ++KEY_KP1 ++KEY_KP2 ++KEY_KP3 ++KEY_KP0 ++KEY_KPDOT ++KEY_ZENKAKUHANKAKU ++KEY_102ND ++KEY_F11 ++KEY_F12 ++KEY_RO ++KEY_KATAKANA ++KEY_HIRAGANA ++KEY_HENKAN ++KEY_KATAKANAHIRAGANA ++KEY_MUHENKAN ++KEY_KPJPCOMMA ++KEY_KPENTER ++KEY_RIGHTCTRL ++KEY_KPSLASH ++KEY_SYSRQ ++KEY_RIGHTALT ++KEY_LINEFEED ++KEY_HOME ++KEY_UP ++KEY_PAGEUP ++KEY_LEFT ++KEY_RIGHT ++KEY_END ++KEY_DOWN ++KEY_PAGEDOWN ++KEY_INSERT ++KEY_DELETE ++KEY_MACRO ++KEY_MUTE ++KEY_VOLUMEDOWN ++KEY_VOLUMEUP ++KEY_POWER ++KEY_KPEQUAL ++KEY_KPPLUSMINUS ++KEY_PAUSE ++KEY_SCALE ++KEY_KPCOMMA ++KEY_HANGEUL ++KEY_HANJA ++KEY_YEN ++KEY_LEFTMETA ++KEY_RIGHTMETA ++KEY_COMPOSE ++KEY_STOP ++KEY_AGAIN ++KEY_PROPS ++KEY_UNDO ++KEY_FRONT ++KEY_COPY ++KEY_OPEN ++KEY_PASTE ++KEY_FIND ++KEY_CUT ++KEY_HELP ++KEY_MENU ++KEY_CALC ++KEY_SETUP ++KEY_SLEEP ++KEY_WAKEUP ++KEY_FILE ++KEY_SENDFILE ++KEY_DELETEFILE ++KEY_XFER ++KEY_PROG1 ++KEY_PROG2 ++KEY_WWW ++KEY_MSDOS ++KEY_SCREENLOCK ++KEY_DIRECTION ++KEY_CYCLEWINDOWS ++KEY_MAIL ++KEY_BOOKMARKS ++KEY_COMPUTER ++KEY_BACK ++KEY_FORWARD ++KEY_CLOSECD ++KEY_EJECTCD ++KEY_EJECTCLOSECD ++KEY_NEXTSONG ++KEY_PLAYPAUSE ++KEY_PREVIOUSSONG ++KEY_STOPCD ++KEY_RECORD ++KEY_REWIND ++KEY_PHONE ++KEY_ISO ++KEY_CONFIG ++KEY_HOMEPAGE ++KEY_REFRESH ++KEY_EXIT ++KEY_MOVE ++KEY_EDIT ++KEY_SCROLLUP ++KEY_SCROLLDOWN ++KEY_KPLEFTPAREN ++KEY_KPRIGHTPAREN ++KEY_NEW ++KEY_REDO ++KEY_F13 ++KEY_F14 ++KEY_F15 ++KEY_F16 ++KEY_F17 ++KEY_F18 ++KEY_F19 ++KEY_F20 ++KEY_F21 ++KEY_F22 ++KEY_F23 ++KEY_F24 ++KEY_PLAYCD ++KEY_PAUSECD ++KEY_PROG3 ++KEY_PROG4 ++KEY_DASHBOARD ++KEY_SUSPEND ++KEY_CLOSE ++KEY_PLAY ++KEY_FASTFORWARD ++KEY_BASSBOOST ++KEY_PRINT ++KEY_HP ++KEY_CAMERA ++KEY_SOUND ++KEY_QUESTION ++KEY_EMAIL ++KEY_CHAT ++KEY_SEARCH ++KEY_CONNECT ++KEY_FINANCE ++KEY_SPORT ++KEY_SHOP ++KEY_ALTERASE ++KEY_CANCEL ++KEY_BRIGHTNESSDOWN ++KEY_BRIGHTNESSUP ++KEY_MEDIA ++KEY_SWITCHVIDEOMODE ++KEY_KBDILLUMTOGGLE ++KEY_KBDILLUMDOWN ++KEY_KBDILLUMUP ++KEY_SEND ++KEY_REPLY ++KEY_FORWARDMAIL ++KEY_SAVE ++KEY_DOCUMENTS ++KEY_BATTERY ++KEY_BLUETOOTH ++KEY_WLAN ++KEY_UWB ++KEY_UNKNOWN ++KEY_VIDEO_NEXT ++KEY_VIDEO_PREV ++KEY_BRIGHTNESS_CYCLE ++KEY_BRIGHTNESS_ZERO ++KEY_DISPLAY_OFF ++KEY_WIMAX ++KEY_RFKILL ++KEY_OK ++KEY_SELECT ++KEY_GOTO ++KEY_CLEAR ++KEY_POWER2 ++KEY_OPTION ++KEY_INFO ++KEY_TIME ++KEY_VENDOR ++KEY_ARCHIVE ++KEY_PROGRAM ++KEY_CHANNEL ++KEY_FAVORITES ++KEY_EPG ++KEY_PVR ++KEY_MHP ++KEY_LANGUAGE ++KEY_TITLE ++KEY_SUBTITLE ++KEY_ANGLE ++KEY_ZOOM ++KEY_MODE ++KEY_KEYBOARD ++KEY_SCREEN ++KEY_PC ++KEY_TV ++KEY_TV2 ++KEY_VCR ++KEY_VCR2 ++KEY_SAT ++KEY_SAT2 ++KEY_CD ++KEY_TAPE ++KEY_RADIO ++KEY_TUNER ++KEY_PLAYER ++KEY_TEXT ++KEY_DVD ++KEY_AUX ++KEY_MP3 ++KEY_AUDIO ++KEY_VIDEO ++KEY_DIRECTORY ++KEY_LIST ++KEY_MEMO ++KEY_CALENDAR ++KEY_RED ++KEY_GREEN ++KEY_YELLOW ++KEY_BLUE ++KEY_CHANNELUP ++KEY_CHANNELDOWN ++KEY_FIRST ++KEY_LAST ++KEY_AB ++KEY_NEXT ++KEY_RESTART ++KEY_SLOW ++KEY_SHUFFLE ++KEY_BREAK ++KEY_PREVIOUS ++KEY_DIGITS ++KEY_TEEN ++KEY_TWEN ++KEY_VIDEOPHONE ++KEY_GAMES ++KEY_ZOOMIN ++KEY_ZOOMOUT ++KEY_ZOOMRESET ++KEY_WORDPROCESSOR ++KEY_EDITOR ++KEY_SPREADSHEET ++KEY_GRAPHICSEDITOR ++KEY_PRESENTATION ++KEY_DATABASE ++KEY_NEWS ++KEY_VOICEMAIL ++KEY_ADDRESSBOOK ++KEY_MESSENGER ++KEY_DISPLAYTOGGLE ++KEY_SPELLCHECK ++KEY_LOGOFF ++KEY_DOLLAR ++KEY_EURO ++KEY_FRAMEBACK ++KEY_FRAMEFORWARD ++KEY_CONTEXT_MENU ++KEY_MEDIA_REPEAT ++KEY_DEL_EOL ++KEY_DEL_EOS ++KEY_INS_LINE ++KEY_DEL_LINE ++KEY_FN ++KEY_FN_ESC ++KEY_FN_F1 ++KEY_FN_F2 ++KEY_FN_F3 ++KEY_FN_F4 ++KEY_FN_F5 ++KEY_FN_F6 ++KEY_FN_F7 ++KEY_FN_F8 ++KEY_FN_F9 ++KEY_FN_F10 ++KEY_FN_F11 ++KEY_FN_F12 ++KEY_FN_1 ++KEY_FN_2 ++KEY_FN_D ++KEY_FN_E ++KEY_FN_F ++KEY_FN_S ++KEY_FN_B ++KEY_BRL_DOT1 ++KEY_BRL_DOT2 ++KEY_BRL_DOT3 ++KEY_BRL_DOT4 ++KEY_BRL_DOT5 ++KEY_BRL_DOT6 ++KEY_BRL_DOT7 ++KEY_BRL_DOT8 ++KEY_BRL_DOT9 ++KEY_BRL_DOT10 ++KEY_NUMERIC_0 ++KEY_NUMERIC_1 ++KEY_NUMERIC_2 ++KEY_NUMERIC_3 ++KEY_NUMERIC_4 ++KEY_NUMERIC_5 ++KEY_NUMERIC_6 ++KEY_NUMERIC_7 ++KEY_NUMERIC_8 ++KEY_NUMERIC_9 ++KEY_NUMERIC_STAR ++KEY_NUMERIC_POUND ++KEY_CAMERA_FOCUS ++KEY_WPS_BUTTON +diff -urN udev-145-orig/extras/keymap/Makefile udev-145/extras/keymap/Makefile +--- udev-145-orig/extras/keymap/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-145/extras/keymap/Makefile 2010-09-21 11:57:16.449750002 +0200 +@@ -0,0 +1,882 @@ ++# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# extras/keymap/Makefile. Generated from Makefile.in by configure. ++ ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, ++# Inc. ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++ ++ ++ ++ ++ ++pkgdatadir = $(datadir)/udev ++pkgincludedir = $(includedir)/udev ++pkglibdir = $(libdir)/udev ++pkglibexecdir = $(libexecdir)/udev ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++build_triplet = x86_64-unknown-linux-gnu ++host_triplet = x86_64-unknown-linux-gnu ++DIST_COMMON = $(dist_doc_DATA) $(dist_libexec_SCRIPTS) \ ++ $(dist_udevrules_DATA) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.inc ++libexec_PROGRAMS = keymap$(EXEEXT) ++subdir = extras/keymap ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ ++ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ ++ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ ++ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++mkinstalldirs = $(install_sh) -d ++CONFIG_HEADER = $(top_builddir)/config.h ++CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_VPATH_FILES = ++am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)" \ ++ "$(DESTDIR)$(docdir)" "$(DESTDIR)$(udevrulesdir)" \ ++ "$(DESTDIR)$(udevkeymapdir)" ++PROGRAMS = $(libexec_PROGRAMS) ++am_keymap_OBJECTS = keymap-keymap.$(OBJEXT) ++nodist_keymap_OBJECTS = ++keymap_OBJECTS = $(am_keymap_OBJECTS) $(nodist_keymap_OBJECTS) ++keymap_LDADD = $(LDADD) ++AM_V_lt = $(am__v_lt_$(V)) ++am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) ++am__v_lt_0 = --silent ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; ++am__install_max = 40 ++am__nobase_strip_setup = \ ++ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` ++am__nobase_strip = \ ++ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" ++am__nobase_list = $(am__nobase_strip_setup); \ ++ for p in $$list; do echo "$$p $$p"; done | \ ++ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ ++ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ ++ if (++n[$$2] == $(am__install_max)) \ ++ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ ++ END { for (dir in files) print dir, files[dir] }' ++am__base_list = \ ++ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ ++ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' ++SCRIPTS = $(dist_libexec_SCRIPTS) ++DEFAULT_INCLUDES = -I. -I$(top_builddir) ++depcomp = $(SHELL) $(top_srcdir)/depcomp ++am__depfiles_maybe = depfiles ++am__mv = mv -f ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ ++ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ ++ $(AM_CFLAGS) $(CFLAGS) ++AM_V_CC = $(am__v_CC_$(V)) ++am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) ++am__v_CC_0 = @echo " CC " $@; ++AM_V_at = $(am__v_at_$(V)) ++am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) ++am__v_at_0 = @ ++CCLD = $(CC) ++LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++AM_V_CCLD = $(am__v_CCLD_$(V)) ++am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) ++am__v_CCLD_0 = @echo " CCLD " $@; ++AM_V_GEN = $(am__v_GEN_$(V)) ++am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) ++am__v_GEN_0 = @echo " GEN " $@; ++SOURCES = $(keymap_SOURCES) $(nodist_keymap_SOURCES) ++DIST_SOURCES = $(keymap_SOURCES) ++DATA = $(dist_doc_DATA) $(dist_udevrules_DATA) $(udevkeymap_DATA) ++ETAGS = etags ++CTAGS = ctags ++am__tty_colors = \ ++red=; grn=; lgn=; blu=; std= ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++ACLOCAL = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run aclocal-1.11 ++AMTAR = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run tar ++AM_DEFAULT_VERBOSITY = 0 ++AR = ar ++AUTOCONF = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run autoconf ++AUTOHEADER = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run autoheader ++AUTOMAKE = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run automake-1.11 ++AWK = gawk ++CC = gcc ++CCDEPMODE = depmode=none ++CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic ++CPP = gcc -E ++CPPFLAGS = ++CYGPATH_W = echo ++DEFS = -DHAVE_CONFIG_H ++DEPDIR = .deps ++DSYMUTIL = ++DUMPBIN = ++ECHO_C = ++ECHO_N = -n ++ECHO_T = ++EGREP = /bin/grep -E ++EXEEXT = ++FGREP = /bin/grep -F ++GIRDIR = /usr/share/gir-1.0 ++GIRTYPELIBDIR = /usr/lib64/girepository-1.0 ++GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include ++GLIB_LIBS = -pthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 ++GPERF = /usr/bin/gperf ++GREP = /bin/grep ++GTKDOC_CHECK = /usr/bin/gtkdoc-check ++G_IR_COMPILER = /usr/bin/g-ir-compiler ++G_IR_GENERATE = /usr/bin/g-ir-generate ++G_IR_SCANNER = /usr/bin/g-ir-scanner ++HTML_DIR = ${datadir}/gtk-doc/html ++INSTALL = /usr/bin/install -c ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_SCRIPT = ${INSTALL} ++INSTALL_STRIP_PROGRAM = $(install_sh) -c -s ++INTROSPECTION_CFLAGS = -pthread -I/usr/include/gobject-introspection-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi-3.0.9/include ++INTROSPECTION_LIBS = -Wl,--export-dynamic -pthread -lgirepository-1.0 -lgobject-2.0 -lgmodule-2.0 -lffi -lgthread-2.0 -lrt -lglib-2.0 ++LD = /usr/bin/ld -m elf_x86_64 ++LDFLAGS = ++LIBOBJS = ++LIBS = ++LIBTOOL = $(SHELL) $(top_builddir)/libtool ++LIBUSB_CFLAGS = ++LIBUSB_LIBS = -lusb ++LIPO = ++LN_S = ln -s ++LTLIBOBJS = ++MAKEINFO = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run makeinfo ++MKDIR_P = /bin/mkdir -p ++NM = /usr/bin/nm -B ++NMEDIT = ++OBJDUMP = objdump ++OBJEXT = o ++OTOOL = ++OTOOL64 = ++PACKAGE = udev ++PACKAGE_BUGREPORT = linux-hotplug@vger.kernel.org ++PACKAGE_NAME = udev ++PACKAGE_STRING = udev 145 ++PACKAGE_TARNAME = udev ++PACKAGE_URL = ++PACKAGE_VERSION = 145 ++PATH_SEPARATOR = : ++PCI_DATABASE = /usr/share/hwdata/pci.ids ++PKG_CONFIG = /usr/bin/pkg-config ++PKG_CONFIG_LIBDIR = ++PKG_CONFIG_PATH = /usr/lib64/pkgconfig:/usr/share/pkgconfig ++RANLIB = ranlib ++SED = /bin/sed ++SELINUX_LIBS = -lselinux -lsepol ++SET_MAKE = ++SHELL = /bin/sh ++STRIP = strip ++USBUTILS_CFLAGS = ++USBUTILS_LIBS = ++USB_DATABASE = /usr/share/hwdata/usb.ids ++VERSION = 145 ++XSLTPROC = /usr/bin/xsltproc ++abs_builddir = /home/harald/git/fedora/harald/udev/f12/udev-145/extras/keymap ++abs_srcdir = /home/harald/git/fedora/harald/udev/f12/udev-145/extras/keymap ++abs_top_builddir = /home/harald/git/fedora/harald/udev/f12/udev-145 ++abs_top_srcdir = /home/harald/git/fedora/harald/udev/f12/udev-145 ++ac_ct_CC = gcc ++ac_ct_DUMPBIN = ++am__include = include ++am__leading_dot = . ++am__quote = ++am__tar = ${AMTAR} chof - "$$tardir" ++am__untar = ${AMTAR} xf - ++bindir = /usr/bin ++build = x86_64-unknown-linux-gnu ++build_alias = x86_64-unknown-linux-gnu ++build_cpu = x86_64 ++build_os = linux-gnu ++build_vendor = unknown ++builddir = . ++datadir = /usr/share ++datarootdir = ${prefix}/share ++docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} ++dvidir = ${docdir} ++exec_prefix = ++host = x86_64-unknown-linux-gnu ++host_alias = x86_64-unknown-linux-gnu ++host_cpu = x86_64 ++host_os = linux-gnu ++host_vendor = unknown ++htmldir = ${docdir} ++includedir = /usr/include ++infodir = /usr/share/info ++install_sh = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/install-sh ++libdir = /usr/lib64 ++libexecdir = /lib/udev ++localedir = ${datarootdir}/locale ++localstatedir = /var ++mandir = /usr/share/man ++mkdir_p = /bin/mkdir -p ++oldincludedir = /usr/include ++pdfdir = ${docdir} ++prefix = /usr ++program_transform_name = s&^&& ++psdir = ${docdir} ++rootlib_execdir = /lib64 ++sbindir = /sbin ++sharedstatedir = /var/lib ++srcdir = . ++sysconfdir = /etc ++target_alias = ++top_build_prefix = ../../ ++top_builddir = ../.. ++top_srcdir = ../.. ++AM_CPPFLAGS = \ ++ -include $(top_builddir)/config.h \ ++ -I$(top_srcdir)/libudev \ ++ -DSYSCONFDIR=\""$(sysconfdir)"\" \ ++ -DLIBEXECDIR=\""$(libexecdir)"\" ++ ++AM_CFLAGS = ++AM_LDFLAGS = \ ++ -Wl,--as-needed ++ ++udevrulesdir = \ ++ $(libexecdir)/rules.d ++ ++dist_udevrules_DATA = 95-keymap.rules ++udevkeymapdir = $(libexecdir)/keymaps ++udevkeymap_DATA = \ ++keymaps/acer \ ++ keymaps/acer-aspire_5920g \ ++ keymaps/acer-extensa_5xxx \ ++ keymaps/acer-travelmate_6292 \ ++ keymaps/acer-travelmate_c300 \ ++ keymaps/asus \ ++ keymaps/benq-joybook_r22 \ ++ keymaps/compaq-e_evo \ ++ keymaps/dell \ ++ keymaps/fujitsu-amilo_pa_2548 \ ++ keymaps/fujitsu-amilo_pro_edition_v3505 \ ++ keymaps/fujitsu-amilo_pro_v3205 \ ++ keymaps/fujitsu-amilo_si_1520 \ ++ keymaps/fujitsu-esprimo_mobile_v5 \ ++ keymaps/fujitsu-esprimo_mobile_v6 \ ++ keymaps/hewlett-packard \ ++ keymaps/hewlett-packard-2510p_2530p \ ++ keymaps/hewlett-packard-compaq_elitebook \ ++ keymaps/hewlett-packard-pavilion \ ++ keymaps/hewlett-packard-tablet \ ++ keymaps/hewlett-packard-tx2 \ ++ keymaps/inventec-symphony_6.0_7.0 \ ++ keymaps/lenovo-3000 \ ++ keymaps/lenovo-thinkpad_x6_tablet \ ++ keymaps/lenovo-thinkpad_x200_tablet \ ++ keymaps/maxdata-pro_7000 \ ++ keymaps/medion-fid2060 \ ++ keymaps/medionnb-a555 \ ++ keymaps/micro-star \ ++ keymaps/module-asus-w3j \ ++ keymaps/module-ibm \ ++ keymaps/module-lenovo \ ++ keymaps/module-sony \ ++ keymaps/module-sony-old \ ++ keymaps/oqo-model2 \ ++ keymaps/samsung-other \ ++ keymaps/samsung-sq1us \ ++ keymaps/samsung-sx20s \ ++ keymaps/toshiba-satellite_a100 \ ++ keymaps/toshiba-satellite_a110 ++ ++dist_libexec_SCRIPTS = findkeyboards ++keymap_SOURCES = keymap.c ++nodist_keymap_SOURCES = keys-from-name.h keys-to-name.h ++keymap_CPPFLAGS = $(AM_CPPFLAGS) ++dist_doc_DATA = README.keymap.txt ++EXTRA_DIST = \ ++ keymaps \ ++ check-keymaps.sh ++ ++BUILT_SOURCES = \ ++ keys-from-name.h \ ++ keys-to-name.h ++ ++CLEANFILES = \ ++ keys.txt keys-from-name.gperf \ ++ keys-from-name.h keys-to-name.h ++ ++TESTS = check-keymaps.sh ++all: $(BUILT_SOURCES) ++ $(MAKE) $(AM_MAKEFLAGS) all-am ++ ++.SUFFIXES: ++.SUFFIXES: .c .lo .o .obj ++$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.inc $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extras/keymap/Makefile'; \ ++ $(am__cd) $(top_srcdir) && \ ++ $(AUTOMAKE) --foreign extras/keymap/Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ++ esac; ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++ ++$(top_srcdir)/configure: $(am__configure_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(ACLOCAL_M4): $(am__aclocal_m4_deps) ++ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ++$(am__aclocal_m4_deps): ++install-libexecPROGRAMS: $(libexec_PROGRAMS) ++ @$(NORMAL_INSTALL) ++ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" ++ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ ++ for p in $$list; do echo "$$p $$p"; done | \ ++ sed 's/$(EXEEXT)$$//' | \ ++ while read p p1; do if test -f $$p || test -f $$p1; \ ++ then echo "$$p"; echo "$$p"; else :; fi; \ ++ done | \ ++ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ ++ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ ++ sed 'N;N;N;s,\n, ,g' | \ ++ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ ++ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ ++ if ($$2 == $$4) files[d] = files[d] " " $$1; \ ++ else { print "f", $$3 "/" $$4, $$1; } } \ ++ END { for (d in files) print "f", d, files[d] }' | \ ++ while read type dir files; do \ ++ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ ++ test -z "$$files" || { \ ++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ ++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ ++ } \ ++ ; done ++ ++uninstall-libexecPROGRAMS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ ++ files=`for p in $$list; do echo "$$p"; done | \ ++ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ ++ -e 's/$$/$(EXEEXT)/' `; \ ++ test -n "$$list" || exit 0; \ ++ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ ++ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files ++ ++clean-libexecPROGRAMS: ++ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ ++ echo " rm -f" $$list; \ ++ rm -f $$list || exit $$?; \ ++ test -n "$(EXEEXT)" || exit 0; \ ++ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ ++ echo " rm -f" $$list; \ ++ rm -f $$list ++keymap$(EXEEXT): $(keymap_OBJECTS) $(keymap_DEPENDENCIES) ++ @rm -f keymap$(EXEEXT) ++ $(AM_V_CCLD)$(LINK) $(keymap_OBJECTS) $(keymap_LDADD) $(LIBS) ++install-dist_libexecSCRIPTS: $(dist_libexec_SCRIPTS) ++ @$(NORMAL_INSTALL) ++ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" ++ @list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ ++ done | \ ++ sed -e 'p;s,.*/,,;n' \ ++ -e 'h;s|.*|.|' \ ++ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ ++ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ ++ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ ++ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ ++ if (++n[d] == $(am__install_max)) { \ ++ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ ++ else { print "f", d "/" $$4, $$1 } } \ ++ END { for (d in files) print "f", d, files[d] }' | \ ++ while read type dir files; do \ ++ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ ++ test -z "$$files" || { \ ++ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ ++ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ ++ } \ ++ ; done ++ ++uninstall-dist_libexecSCRIPTS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \ ++ files=`for p in $$list; do echo "$$p"; done | \ ++ sed -e 's,.*/,,;$(transform)'`; \ ++ test -n "$$list" || exit 0; \ ++ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ ++ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files ++ ++mostlyclean-compile: ++ -rm -f *.$(OBJEXT) ++ ++distclean-compile: ++ -rm -f *.tab.c ++ ++#include ./$(DEPDIR)/keymap-keymap.Po ++ ++.c.o: ++# $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++ $(AM_V_CC) \ ++# source='$<' object='$@' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(COMPILE) -c $< ++ ++.c.obj: ++# $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++ $(AM_V_CC) \ ++# source='$<' object='$@' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(COMPILE) -c `$(CYGPATH_W) '$<'` ++ ++.c.lo: ++# $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo ++ $(AM_V_CC) \ ++# source='$<' object='$@' libtool=yes ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(LTCOMPILE) -c -o $@ $< ++ ++keymap-keymap.o: keymap.c ++# $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT keymap-keymap.o -MD -MP -MF $(DEPDIR)/keymap-keymap.Tpo -c -o keymap-keymap.o `test -f 'keymap.c' || echo '$(srcdir)/'`keymap.c ++# $(AM_V_at)$(am__mv) $(DEPDIR)/keymap-keymap.Tpo $(DEPDIR)/keymap-keymap.Po ++ $(AM_V_CC) \ ++# source='keymap.c' object='keymap-keymap.o' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o keymap-keymap.o `test -f 'keymap.c' || echo '$(srcdir)/'`keymap.c ++ ++keymap-keymap.obj: keymap.c ++# $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT keymap-keymap.obj -MD -MP -MF $(DEPDIR)/keymap-keymap.Tpo -c -o keymap-keymap.obj `if test -f 'keymap.c'; then $(CYGPATH_W) 'keymap.c'; else $(CYGPATH_W) '$(srcdir)/keymap.c'; fi` ++# $(AM_V_at)$(am__mv) $(DEPDIR)/keymap-keymap.Tpo $(DEPDIR)/keymap-keymap.Po ++ $(AM_V_CC) \ ++# source='keymap.c' object='keymap-keymap.obj' libtool=no ++# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) ++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o keymap-keymap.obj `if test -f 'keymap.c'; then $(CYGPATH_W) 'keymap.c'; else $(CYGPATH_W) '$(srcdir)/keymap.c'; fi` ++ ++mostlyclean-libtool: ++ -rm -f *.lo ++ ++clean-libtool: ++ -rm -rf .libs _libs ++install-dist_docDATA: $(dist_doc_DATA) ++ @$(NORMAL_INSTALL) ++ test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" ++ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; \ ++ done | $(am__base_list) | \ ++ while read files; do \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ ++ done ++ ++uninstall-dist_docDATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ ++ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ test -n "$$files" || exit 0; \ ++ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ ++ cd "$(DESTDIR)$(docdir)" && rm -f $$files ++install-dist_udevrulesDATA: $(dist_udevrules_DATA) ++ @$(NORMAL_INSTALL) ++ test -z "$(udevrulesdir)" || $(MKDIR_P) "$(DESTDIR)$(udevrulesdir)" ++ @list='$(dist_udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; \ ++ done | $(am__base_list) | \ ++ while read files; do \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevrulesdir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(udevrulesdir)" || exit $$?; \ ++ done ++ ++uninstall-dist_udevrulesDATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(dist_udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ ++ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ test -n "$$files" || exit 0; \ ++ echo " ( cd '$(DESTDIR)$(udevrulesdir)' && rm -f" $$files ")"; \ ++ cd "$(DESTDIR)$(udevrulesdir)" && rm -f $$files ++install-udevkeymapDATA: $(udevkeymap_DATA) ++ @$(NORMAL_INSTALL) ++ test -z "$(udevkeymapdir)" || $(MKDIR_P) "$(DESTDIR)$(udevkeymapdir)" ++ @list='$(udevkeymap_DATA)'; test -n "$(udevkeymapdir)" || list=; \ ++ for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; \ ++ done | $(am__base_list) | \ ++ while read files; do \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevkeymapdir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(udevkeymapdir)" || exit $$?; \ ++ done ++ ++uninstall-udevkeymapDATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(udevkeymap_DATA)'; test -n "$(udevkeymapdir)" || list=; \ ++ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ test -n "$$files" || exit 0; \ ++ echo " ( cd '$(DESTDIR)$(udevkeymapdir)' && rm -f" $$files ")"; \ ++ cd "$(DESTDIR)$(udevkeymapdir)" && rm -f $$files ++ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ mkid -fID $$unique ++tags: TAGS ++ ++TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ set x; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ shift; \ ++ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ if test $$# -gt 0; then \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ "$$@" $$unique; \ ++ else \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$unique; \ ++ fi; \ ++ fi ++ctags: CTAGS ++CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ test -z "$(CTAGS_ARGS)$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && $(am__cd) $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) "$$here" ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++ ++check-TESTS: $(TESTS) ++ @failed=0; all=0; xfail=0; xpass=0; skip=0; \ ++ srcdir=$(srcdir); export srcdir; \ ++ list=' $(TESTS) '; \ ++ $(am__tty_colors); \ ++ if test -n "$$list"; then \ ++ for tst in $$list; do \ ++ if test -f ./$$tst; then dir=./; \ ++ elif test -f $$tst; then dir=; \ ++ else dir="$(srcdir)/"; fi; \ ++ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ ++ all=`expr $$all + 1`; \ ++ case " $(XFAIL_TESTS) " in \ ++ *[\ \ ]$$tst[\ \ ]*) \ ++ xpass=`expr $$xpass + 1`; \ ++ failed=`expr $$failed + 1`; \ ++ col=$$red; res=XPASS; \ ++ ;; \ ++ *) \ ++ col=$$grn; res=PASS; \ ++ ;; \ ++ esac; \ ++ elif test $$? -ne 77; then \ ++ all=`expr $$all + 1`; \ ++ case " $(XFAIL_TESTS) " in \ ++ *[\ \ ]$$tst[\ \ ]*) \ ++ xfail=`expr $$xfail + 1`; \ ++ col=$$lgn; res=XFAIL; \ ++ ;; \ ++ *) \ ++ failed=`expr $$failed + 1`; \ ++ col=$$red; res=FAIL; \ ++ ;; \ ++ esac; \ ++ else \ ++ skip=`expr $$skip + 1`; \ ++ col=$$blu; res=SKIP; \ ++ fi; \ ++ echo "$${col}$$res$${std}: $$tst"; \ ++ done; \ ++ if test "$$all" -eq 1; then \ ++ tests="test"; \ ++ All=""; \ ++ else \ ++ tests="tests"; \ ++ All="All "; \ ++ fi; \ ++ if test "$$failed" -eq 0; then \ ++ if test "$$xfail" -eq 0; then \ ++ banner="$$All$$all $$tests passed"; \ ++ else \ ++ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ ++ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ ++ fi; \ ++ else \ ++ if test "$$xpass" -eq 0; then \ ++ banner="$$failed of $$all $$tests failed"; \ ++ else \ ++ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ ++ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ ++ fi; \ ++ fi; \ ++ dashes="$$banner"; \ ++ skipped=""; \ ++ if test "$$skip" -ne 0; then \ ++ if test "$$skip" -eq 1; then \ ++ skipped="($$skip test was not run)"; \ ++ else \ ++ skipped="($$skip tests were not run)"; \ ++ fi; \ ++ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ ++ dashes="$$skipped"; \ ++ fi; \ ++ report=""; \ ++ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ ++ report="Please report to $(PACKAGE_BUGREPORT)"; \ ++ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ ++ dashes="$$report"; \ ++ fi; \ ++ dashes=`echo "$$dashes" | sed s/./=/g`; \ ++ if test "$$failed" -eq 0; then \ ++ echo "$$grn$$dashes"; \ ++ else \ ++ echo "$$red$$dashes"; \ ++ fi; \ ++ echo "$$banner"; \ ++ test -z "$$skipped" || echo "$$skipped"; \ ++ test -z "$$report" || echo "$$report"; \ ++ echo "$$dashes$$std"; \ ++ test "$$failed" -eq 0; \ ++ else :; fi ++ ++distdir: $(DISTFILES) ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test -d "$(distdir)/$$file"; then \ ++ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ ++ fi; \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ ++ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ ++ fi; \ ++ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ ++ else \ ++ test -f "$(distdir)/$$file" \ ++ || cp -p $$d/$$file "$(distdir)/$$file" \ ++ || exit 1; \ ++ fi; \ ++ done ++check-am: all-am ++ $(MAKE) $(AM_MAKEFLAGS) check-TESTS ++check: $(BUILT_SOURCES) ++ $(MAKE) $(AM_MAKEFLAGS) check-am ++all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) ++installdirs: ++ for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(udevkeymapdir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done ++install: $(BUILT_SOURCES) ++ $(MAKE) $(AM_MAKEFLAGS) install-am ++install-exec: install-exec-am ++install-data: install-data-am ++uninstall: uninstall-am ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-am ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++mostlyclean-generic: ++ ++clean-generic: ++ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) ++ ++distclean-generic: ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) ++clean: clean-am ++ ++clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ ++ mostlyclean-am ++ ++distclean: distclean-am ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-tags ++ ++dvi: dvi-am ++ ++dvi-am: ++ ++html: html-am ++ ++html-am: ++ ++info: info-am ++ ++info-am: ++ ++install-data-am: install-dist_docDATA install-dist_udevrulesDATA \ ++ install-udevkeymapDATA ++ ++install-dvi: install-dvi-am ++ ++install-dvi-am: ++ ++install-exec-am: install-dist_libexecSCRIPTS install-libexecPROGRAMS ++ ++install-html: install-html-am ++ ++install-html-am: ++ ++install-info: install-info-am ++ ++install-info-am: ++ ++install-man: ++ ++install-pdf: install-pdf-am ++ ++install-pdf-am: ++ ++install-ps: install-ps-am ++ ++install-ps-am: ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-am ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-am ++ ++mostlyclean-am: mostlyclean-compile mostlyclean-generic \ ++ mostlyclean-libtool ++ ++pdf: pdf-am ++ ++pdf-am: ++ ++ps: ps-am ++ ++ps-am: ++ ++uninstall-am: uninstall-dist_docDATA uninstall-dist_libexecSCRIPTS \ ++ uninstall-dist_udevrulesDATA uninstall-libexecPROGRAMS \ ++ uninstall-udevkeymapDATA ++ ++.MAKE: all check check-am install install-am install-strip ++ ++.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ ++ clean-generic clean-libexecPROGRAMS clean-libtool ctags \ ++ distclean distclean-compile distclean-generic \ ++ distclean-libtool distclean-tags distdir dvi dvi-am html \ ++ html-am info info-am install install-am install-data \ ++ install-data-am install-dist_docDATA \ ++ install-dist_libexecSCRIPTS install-dist_udevrulesDATA \ ++ install-dvi install-dvi-am install-exec install-exec-am \ ++ install-html install-html-am install-info install-info-am \ ++ install-libexecPROGRAMS install-man install-pdf install-pdf-am \ ++ install-ps install-ps-am install-strip install-udevkeymapDATA \ ++ installcheck installcheck-am installdirs maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ++ tags uninstall uninstall-am uninstall-dist_docDATA \ ++ uninstall-dist_libexecSCRIPTS uninstall-dist_udevrulesDATA \ ++ uninstall-libexecPROGRAMS uninstall-udevkeymapDATA ++ ++ ++keys.txt: /usr/include/linux/input.h ++ $(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@ ++ ++keys-from-name.gperf: keys.txt ++ $(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@ ++ ++keys-from-name.h: keys-from-name.gperf Makefile ++ $(GPERF) -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@ ++ ++keys-to-name.h: keys.txt Makefile ++ $(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@ ++ ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: +diff -urN udev-145-orig/extras/keymap/README.keymap.txt udev-145/extras/keymap/README.keymap.txt +--- udev-145-orig/extras/keymap/README.keymap.txt 2009-06-19 19:21:26.000000000 +0200 ++++ udev-145/extras/keymap/README.keymap.txt 2010-06-11 10:52:56.000000000 +0200 +@@ -48,7 +48,8 @@ + keyboard" and possibly a "module". Some laptops (notably Thinkpads, Sonys, and + Acers) have multimedia/function keys on a separate input device instead of the + primary keyboard. The keyboard device should have a name like "input/event3". +- In the following commands, the name will be written as "input/eventX". ++ In the following commands, the name will be written as "input/eventX" (replace ++ X with the appropriate number). + + 2. Dump current mapping: + +@@ -73,6 +74,12 @@ + /lib/udev/keymaps/ for existing key map files and make sure that you use the + same structure. + ++ If the key only ever works once and then your keyboard (or the entire desktop) ++ gets stuck for a long time, then it is likely that the BIOS fails to send a ++ corresponding "key release" event after the key press event. Please note down ++ this case as well, as it can be worked around in ++ /lib/udev/keymaps/95-keyboard-force-release.rules . ++ + 4. Find out your system vendor and product: + + cat /sys/class/dmi/id/sys_vendor +@@ -84,7 +91,7 @@ + /tmp/orig-map.txt from step 2, and /tmp/udev-db.txt from step 5 + to the bug tracker, so that they can be included in the next release: + +- https://bugs.launchpad.net/udev-extras/+bugs ++ https://bugs.launchpad.net/udev/+bugs + + For local testing, copy your map file to /lib/udev/keymaps/ with an appropriate + name, and add an appropriate udev rule to /lib/udev/rules.d/95-keymap.rules: diff --git a/udev-145-rules-optical-drives-use-ID_CDROM_MEDIA_TRACK_COUNT_.patch b/udev-145-rules-optical-drives-use-ID_CDROM_MEDIA_TRACK_COUNT_.patch new file mode 100644 index 0000000..cacc5cb --- /dev/null +++ b/udev-145-rules-optical-drives-use-ID_CDROM_MEDIA_TRACK_COUNT_.patch @@ -0,0 +1,14 @@ +--- udev-145/rules/rules.d/60-persistent-storage.rules.orig 2010-09-21 10:56:28.992750001 +0200 ++++ udev-145/rules/rules.d/60-persistent-storage.rules 2010-09-21 11:36:11.395750000 +0200 +@@ -61,9 +61,9 @@ + ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # probe filesystem metadata of optical drives which have a media inserted +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" + # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" ++KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks + KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" diff --git a/udev-145.tar.bz2.sign b/udev-145.tar.bz2.sign deleted file mode 100644 index 23c18c4..0000000 --- a/udev-145.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.9 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBKWxhnyGugalF9Dw4RAvvjAJ9ed+RMRi8gXcFyTPxXsHZpbLSROgCfdpCc -lr5nSwsGGO9e0+wBbD7WDoc= -=5/z0 ------END PGP SIGNATURE----- diff --git a/udev.spec b/udev.spec index f2aa3d2..c9bf04a 100644 --- a/udev.spec +++ b/udev.spec @@ -5,7 +5,7 @@ Summary: A userspace implementation of devfs Name: udev Version: 145 -Release: 21%{?dist} +Release: 22%{?dist} License: GPLv2 Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -14,8 +14,6 @@ Obsoletes: udev-extras < 20090618 Provides: udev-extras = 20090618-1 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -BuildRequires: libtool automake autoconf - Patch1: 0001-enumeration-move-ALSA-control-devices-to-the-end-of-.patch Patch2: 0002-udevd-add-timestamp-to-debug-output.patch Patch3: 0003-fix-wrong-parameter-size-on-ioctl-FIONREAD.patch @@ -30,6 +28,9 @@ Patch10: 0001-cdrom_id-Still-check-profiles-even-if-there-is-no-me.patch Patch11: udev-145-rename.patch Patch13: udev.git-d7e2d38c1f0ead2239808dd117577a99a3ad3cde.patch Patch14: udev.git-fa0612104ad30d4228aa7782308a77e21b7f6fb5.patch +Patch15: udev-145-rules-optical-drives-use-ID_CDROM_MEDIA_TRACK_COUNT_.patch +Patch16: udev-145-keymap-backport.patch +Patch17: udev-145-floppy.patch Patch35: 0035-cdrom_id-open-non-mounted-optical-media-with-O_EXCL.patch Patch48: 0048-cdrom_id-remove-debugging-code.patch @@ -47,8 +48,12 @@ Patch71: 0071-cdrom_id-Do-not-ignore-errors-from-scsi_cmd_run.patch Patch72: 0072-cdrom_id-Swap-media-state-and-TOC-info-probing.patch Patch74: 0074-cdrom_id-add-missing-profiles-to-feature_profiles.patch Patch75: 0075-cdrom_id-set-ID_CDROM_MEDIA-1-only-for-known-media.patch + +Patch80: udev-145-cdrom_id-backport.patch + Patch110: 0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch + Patch101: udev-147-virtio.patch Source1: start_udev @@ -64,9 +69,10 @@ Requires(pre): /usr/bin/stat /sbin/pidof Requires(pre): MAKEDEV >= 0:3.11 /usr/bin/getent /usr/sbin/groupadd Requires: hwdata +BuildRequires: automake autoconf BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils MAKEDEV -BuildRequires: gperf libtool +BuildRequires: gperf BuildRequires: libusb-devel libacl-devel BuildRequires: libxslt BuildRequires: hwdata @@ -153,6 +159,9 @@ glib-based applications using libudev functionality. %patch11 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 -b .floppy %patch35 -p1 -b .git35 %patch48 -p1 -b .git48 @@ -171,6 +180,9 @@ glib-based applications using libudev functionality. %patch72 -p1 -b .git72 %patch74 -p1 -b .git74 %patch75 -p1 -b .git75 + +%patch80 -p1 + %patch110 -p1 -b .git110 @@ -418,6 +430,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Sep 21 2010 Harald Hoyer 145-22 +- backported the upstream cdrom_id bugfixes and enhancements + (bug #533643) +- backported the upstream keymaps bugfixes and enhancements + (bug #444440) +- fixed floppy devices (bug#492404) + * Tue Apr 27 2010 Harald Hoyer 145-21 - more cdrom_id bugfixes which can prevent autoclose of some cdroms From e6e25c4fd521764922365c8aa438adb66b665c5a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 21 Sep 2010 15:57:31 +0200 Subject: [PATCH 576/640] fixed keymap patch --- udev-145-keymap-backport.patch | 3108 -------------------------------- 1 file changed, 3108 deletions(-) diff --git a/udev-145-keymap-backport.patch b/udev-145-keymap-backport.patch index 76b96a3..dac4b04 100644 --- a/udev-145-keymap-backport.patch +++ b/udev-145-keymap-backport.patch @@ -989,3114 +989,6 @@ diff -urN udev-145-orig/extras/keymap/keymaps/zepto-znote udev-145/extras/keymap +0xF2 wlan # RF Switch On +0xF4 prog1 # P1 Button +0xF3 prog2 # P2 Button -diff -urN udev-145-orig/extras/keymap/keys-from-name.gperf udev-145/extras/keymap/keys-from-name.gperf ---- udev-145-orig/extras/keymap/keys-from-name.gperf 1970-01-01 01:00:00.000000000 +0100 -+++ udev-145/extras/keymap/keys-from-name.gperf 2010-08-10 16:45:45.000000000 +0200 -@@ -0,0 +1,382 @@ -+struct key { const char* name; unsigned short id; }; -+%null-strings -+%% -+KEY_RESERVED, KEY_RESERVED -+KEY_ESC, KEY_ESC -+KEY_1, KEY_1 -+KEY_2, KEY_2 -+KEY_3, KEY_3 -+KEY_4, KEY_4 -+KEY_5, KEY_5 -+KEY_6, KEY_6 -+KEY_7, KEY_7 -+KEY_8, KEY_8 -+KEY_9, KEY_9 -+KEY_0, KEY_0 -+KEY_MINUS, KEY_MINUS -+KEY_EQUAL, KEY_EQUAL -+KEY_BACKSPACE, KEY_BACKSPACE -+KEY_TAB, KEY_TAB -+KEY_Q, KEY_Q -+KEY_W, KEY_W -+KEY_E, KEY_E -+KEY_R, KEY_R -+KEY_T, KEY_T -+KEY_Y, KEY_Y -+KEY_U, KEY_U -+KEY_I, KEY_I -+KEY_O, KEY_O -+KEY_P, KEY_P -+KEY_LEFTBRACE, KEY_LEFTBRACE -+KEY_RIGHTBRACE, KEY_RIGHTBRACE -+KEY_ENTER, KEY_ENTER -+KEY_LEFTCTRL, KEY_LEFTCTRL -+KEY_A, KEY_A -+KEY_S, KEY_S -+KEY_D, KEY_D -+KEY_F, KEY_F -+KEY_G, KEY_G -+KEY_H, KEY_H -+KEY_J, KEY_J -+KEY_K, KEY_K -+KEY_L, KEY_L -+KEY_SEMICOLON, KEY_SEMICOLON -+KEY_APOSTROPHE, KEY_APOSTROPHE -+KEY_GRAVE, KEY_GRAVE -+KEY_LEFTSHIFT, KEY_LEFTSHIFT -+KEY_BACKSLASH, KEY_BACKSLASH -+KEY_Z, KEY_Z -+KEY_X, KEY_X -+KEY_C, KEY_C -+KEY_V, KEY_V -+KEY_B, KEY_B -+KEY_N, KEY_N -+KEY_M, KEY_M -+KEY_COMMA, KEY_COMMA -+KEY_DOT, KEY_DOT -+KEY_SLASH, KEY_SLASH -+KEY_RIGHTSHIFT, KEY_RIGHTSHIFT -+KEY_KPASTERISK, KEY_KPASTERISK -+KEY_LEFTALT, KEY_LEFTALT -+KEY_SPACE, KEY_SPACE -+KEY_CAPSLOCK, KEY_CAPSLOCK -+KEY_F1, KEY_F1 -+KEY_F2, KEY_F2 -+KEY_F3, KEY_F3 -+KEY_F4, KEY_F4 -+KEY_F5, KEY_F5 -+KEY_F6, KEY_F6 -+KEY_F7, KEY_F7 -+KEY_F8, KEY_F8 -+KEY_F9, KEY_F9 -+KEY_F10, KEY_F10 -+KEY_NUMLOCK, KEY_NUMLOCK -+KEY_SCROLLLOCK, KEY_SCROLLLOCK -+KEY_KP7, KEY_KP7 -+KEY_KP8, KEY_KP8 -+KEY_KP9, KEY_KP9 -+KEY_KPMINUS, KEY_KPMINUS -+KEY_KP4, KEY_KP4 -+KEY_KP5, KEY_KP5 -+KEY_KP6, KEY_KP6 -+KEY_KPPLUS, KEY_KPPLUS -+KEY_KP1, KEY_KP1 -+KEY_KP2, KEY_KP2 -+KEY_KP3, KEY_KP3 -+KEY_KP0, KEY_KP0 -+KEY_KPDOT, KEY_KPDOT -+KEY_ZENKAKUHANKAKU, KEY_ZENKAKUHANKAKU -+KEY_102ND, KEY_102ND -+KEY_F11, KEY_F11 -+KEY_F12, KEY_F12 -+KEY_RO, KEY_RO -+KEY_KATAKANA, KEY_KATAKANA -+KEY_HIRAGANA, KEY_HIRAGANA -+KEY_HENKAN, KEY_HENKAN -+KEY_KATAKANAHIRAGANA, KEY_KATAKANAHIRAGANA -+KEY_MUHENKAN, KEY_MUHENKAN -+KEY_KPJPCOMMA, KEY_KPJPCOMMA -+KEY_KPENTER, KEY_KPENTER -+KEY_RIGHTCTRL, KEY_RIGHTCTRL -+KEY_KPSLASH, KEY_KPSLASH -+KEY_SYSRQ, KEY_SYSRQ -+KEY_RIGHTALT, KEY_RIGHTALT -+KEY_LINEFEED, KEY_LINEFEED -+KEY_HOME, KEY_HOME -+KEY_UP, KEY_UP -+KEY_PAGEUP, KEY_PAGEUP -+KEY_LEFT, KEY_LEFT -+KEY_RIGHT, KEY_RIGHT -+KEY_END, KEY_END -+KEY_DOWN, KEY_DOWN -+KEY_PAGEDOWN, KEY_PAGEDOWN -+KEY_INSERT, KEY_INSERT -+KEY_DELETE, KEY_DELETE -+KEY_MACRO, KEY_MACRO -+KEY_MUTE, KEY_MUTE -+KEY_VOLUMEDOWN, KEY_VOLUMEDOWN -+KEY_VOLUMEUP, KEY_VOLUMEUP -+KEY_POWER, KEY_POWER -+KEY_KPEQUAL, KEY_KPEQUAL -+KEY_KPPLUSMINUS, KEY_KPPLUSMINUS -+KEY_PAUSE, KEY_PAUSE -+KEY_SCALE, KEY_SCALE -+KEY_KPCOMMA, KEY_KPCOMMA -+KEY_HANGEUL, KEY_HANGEUL -+KEY_HANJA, KEY_HANJA -+KEY_YEN, KEY_YEN -+KEY_LEFTMETA, KEY_LEFTMETA -+KEY_RIGHTMETA, KEY_RIGHTMETA -+KEY_COMPOSE, KEY_COMPOSE -+KEY_STOP, KEY_STOP -+KEY_AGAIN, KEY_AGAIN -+KEY_PROPS, KEY_PROPS -+KEY_UNDO, KEY_UNDO -+KEY_FRONT, KEY_FRONT -+KEY_COPY, KEY_COPY -+KEY_OPEN, KEY_OPEN -+KEY_PASTE, KEY_PASTE -+KEY_FIND, KEY_FIND -+KEY_CUT, KEY_CUT -+KEY_HELP, KEY_HELP -+KEY_MENU, KEY_MENU -+KEY_CALC, KEY_CALC -+KEY_SETUP, KEY_SETUP -+KEY_SLEEP, KEY_SLEEP -+KEY_WAKEUP, KEY_WAKEUP -+KEY_FILE, KEY_FILE -+KEY_SENDFILE, KEY_SENDFILE -+KEY_DELETEFILE, KEY_DELETEFILE -+KEY_XFER, KEY_XFER -+KEY_PROG1, KEY_PROG1 -+KEY_PROG2, KEY_PROG2 -+KEY_WWW, KEY_WWW -+KEY_MSDOS, KEY_MSDOS -+KEY_SCREENLOCK, KEY_SCREENLOCK -+KEY_DIRECTION, KEY_DIRECTION -+KEY_CYCLEWINDOWS, KEY_CYCLEWINDOWS -+KEY_MAIL, KEY_MAIL -+KEY_BOOKMARKS, KEY_BOOKMARKS -+KEY_COMPUTER, KEY_COMPUTER -+KEY_BACK, KEY_BACK -+KEY_FORWARD, KEY_FORWARD -+KEY_CLOSECD, KEY_CLOSECD -+KEY_EJECTCD, KEY_EJECTCD -+KEY_EJECTCLOSECD, KEY_EJECTCLOSECD -+KEY_NEXTSONG, KEY_NEXTSONG -+KEY_PLAYPAUSE, KEY_PLAYPAUSE -+KEY_PREVIOUSSONG, KEY_PREVIOUSSONG -+KEY_STOPCD, KEY_STOPCD -+KEY_RECORD, KEY_RECORD -+KEY_REWIND, KEY_REWIND -+KEY_PHONE, KEY_PHONE -+KEY_ISO, KEY_ISO -+KEY_CONFIG, KEY_CONFIG -+KEY_HOMEPAGE, KEY_HOMEPAGE -+KEY_REFRESH, KEY_REFRESH -+KEY_EXIT, KEY_EXIT -+KEY_MOVE, KEY_MOVE -+KEY_EDIT, KEY_EDIT -+KEY_SCROLLUP, KEY_SCROLLUP -+KEY_SCROLLDOWN, KEY_SCROLLDOWN -+KEY_KPLEFTPAREN, KEY_KPLEFTPAREN -+KEY_KPRIGHTPAREN, KEY_KPRIGHTPAREN -+KEY_NEW, KEY_NEW -+KEY_REDO, KEY_REDO -+KEY_F13, KEY_F13 -+KEY_F14, KEY_F14 -+KEY_F15, KEY_F15 -+KEY_F16, KEY_F16 -+KEY_F17, KEY_F17 -+KEY_F18, KEY_F18 -+KEY_F19, KEY_F19 -+KEY_F20, KEY_F20 -+KEY_F21, KEY_F21 -+KEY_F22, KEY_F22 -+KEY_F23, KEY_F23 -+KEY_F24, KEY_F24 -+KEY_PLAYCD, KEY_PLAYCD -+KEY_PAUSECD, KEY_PAUSECD -+KEY_PROG3, KEY_PROG3 -+KEY_PROG4, KEY_PROG4 -+KEY_DASHBOARD, KEY_DASHBOARD -+KEY_SUSPEND, KEY_SUSPEND -+KEY_CLOSE, KEY_CLOSE -+KEY_PLAY, KEY_PLAY -+KEY_FASTFORWARD, KEY_FASTFORWARD -+KEY_BASSBOOST, KEY_BASSBOOST -+KEY_PRINT, KEY_PRINT -+KEY_HP, KEY_HP -+KEY_CAMERA, KEY_CAMERA -+KEY_SOUND, KEY_SOUND -+KEY_QUESTION, KEY_QUESTION -+KEY_EMAIL, KEY_EMAIL -+KEY_CHAT, KEY_CHAT -+KEY_SEARCH, KEY_SEARCH -+KEY_CONNECT, KEY_CONNECT -+KEY_FINANCE, KEY_FINANCE -+KEY_SPORT, KEY_SPORT -+KEY_SHOP, KEY_SHOP -+KEY_ALTERASE, KEY_ALTERASE -+KEY_CANCEL, KEY_CANCEL -+KEY_BRIGHTNESSDOWN, KEY_BRIGHTNESSDOWN -+KEY_BRIGHTNESSUP, KEY_BRIGHTNESSUP -+KEY_MEDIA, KEY_MEDIA -+KEY_SWITCHVIDEOMODE, KEY_SWITCHVIDEOMODE -+KEY_KBDILLUMTOGGLE, KEY_KBDILLUMTOGGLE -+KEY_KBDILLUMDOWN, KEY_KBDILLUMDOWN -+KEY_KBDILLUMUP, KEY_KBDILLUMUP -+KEY_SEND, KEY_SEND -+KEY_REPLY, KEY_REPLY -+KEY_FORWARDMAIL, KEY_FORWARDMAIL -+KEY_SAVE, KEY_SAVE -+KEY_DOCUMENTS, KEY_DOCUMENTS -+KEY_BATTERY, KEY_BATTERY -+KEY_BLUETOOTH, KEY_BLUETOOTH -+KEY_WLAN, KEY_WLAN -+KEY_UWB, KEY_UWB -+KEY_UNKNOWN, KEY_UNKNOWN -+KEY_VIDEO_NEXT, KEY_VIDEO_NEXT -+KEY_VIDEO_PREV, KEY_VIDEO_PREV -+KEY_BRIGHTNESS_CYCLE, KEY_BRIGHTNESS_CYCLE -+KEY_BRIGHTNESS_ZERO, KEY_BRIGHTNESS_ZERO -+KEY_DISPLAY_OFF, KEY_DISPLAY_OFF -+KEY_WIMAX, KEY_WIMAX -+KEY_RFKILL, KEY_RFKILL -+KEY_OK, KEY_OK -+KEY_SELECT, KEY_SELECT -+KEY_GOTO, KEY_GOTO -+KEY_CLEAR, KEY_CLEAR -+KEY_POWER2, KEY_POWER2 -+KEY_OPTION, KEY_OPTION -+KEY_INFO, KEY_INFO -+KEY_TIME, KEY_TIME -+KEY_VENDOR, KEY_VENDOR -+KEY_ARCHIVE, KEY_ARCHIVE -+KEY_PROGRAM, KEY_PROGRAM -+KEY_CHANNEL, KEY_CHANNEL -+KEY_FAVORITES, KEY_FAVORITES -+KEY_EPG, KEY_EPG -+KEY_PVR, KEY_PVR -+KEY_MHP, KEY_MHP -+KEY_LANGUAGE, KEY_LANGUAGE -+KEY_TITLE, KEY_TITLE -+KEY_SUBTITLE, KEY_SUBTITLE -+KEY_ANGLE, KEY_ANGLE -+KEY_ZOOM, KEY_ZOOM -+KEY_MODE, KEY_MODE -+KEY_KEYBOARD, KEY_KEYBOARD -+KEY_SCREEN, KEY_SCREEN -+KEY_PC, KEY_PC -+KEY_TV, KEY_TV -+KEY_TV2, KEY_TV2 -+KEY_VCR, KEY_VCR -+KEY_VCR2, KEY_VCR2 -+KEY_SAT, KEY_SAT -+KEY_SAT2, KEY_SAT2 -+KEY_CD, KEY_CD -+KEY_TAPE, KEY_TAPE -+KEY_RADIO, KEY_RADIO -+KEY_TUNER, KEY_TUNER -+KEY_PLAYER, KEY_PLAYER -+KEY_TEXT, KEY_TEXT -+KEY_DVD, KEY_DVD -+KEY_AUX, KEY_AUX -+KEY_MP3, KEY_MP3 -+KEY_AUDIO, KEY_AUDIO -+KEY_VIDEO, KEY_VIDEO -+KEY_DIRECTORY, KEY_DIRECTORY -+KEY_LIST, KEY_LIST -+KEY_MEMO, KEY_MEMO -+KEY_CALENDAR, KEY_CALENDAR -+KEY_RED, KEY_RED -+KEY_GREEN, KEY_GREEN -+KEY_YELLOW, KEY_YELLOW -+KEY_BLUE, KEY_BLUE -+KEY_CHANNELUP, KEY_CHANNELUP -+KEY_CHANNELDOWN, KEY_CHANNELDOWN -+KEY_FIRST, KEY_FIRST -+KEY_LAST, KEY_LAST -+KEY_AB, KEY_AB -+KEY_NEXT, KEY_NEXT -+KEY_RESTART, KEY_RESTART -+KEY_SLOW, KEY_SLOW -+KEY_SHUFFLE, KEY_SHUFFLE -+KEY_BREAK, KEY_BREAK -+KEY_PREVIOUS, KEY_PREVIOUS -+KEY_DIGITS, KEY_DIGITS -+KEY_TEEN, KEY_TEEN -+KEY_TWEN, KEY_TWEN -+KEY_VIDEOPHONE, KEY_VIDEOPHONE -+KEY_GAMES, KEY_GAMES -+KEY_ZOOMIN, KEY_ZOOMIN -+KEY_ZOOMOUT, KEY_ZOOMOUT -+KEY_ZOOMRESET, KEY_ZOOMRESET -+KEY_WORDPROCESSOR, KEY_WORDPROCESSOR -+KEY_EDITOR, KEY_EDITOR -+KEY_SPREADSHEET, KEY_SPREADSHEET -+KEY_GRAPHICSEDITOR, KEY_GRAPHICSEDITOR -+KEY_PRESENTATION, KEY_PRESENTATION -+KEY_DATABASE, KEY_DATABASE -+KEY_NEWS, KEY_NEWS -+KEY_VOICEMAIL, KEY_VOICEMAIL -+KEY_ADDRESSBOOK, KEY_ADDRESSBOOK -+KEY_MESSENGER, KEY_MESSENGER -+KEY_DISPLAYTOGGLE, KEY_DISPLAYTOGGLE -+KEY_SPELLCHECK, KEY_SPELLCHECK -+KEY_LOGOFF, KEY_LOGOFF -+KEY_DOLLAR, KEY_DOLLAR -+KEY_EURO, KEY_EURO -+KEY_FRAMEBACK, KEY_FRAMEBACK -+KEY_FRAMEFORWARD, KEY_FRAMEFORWARD -+KEY_CONTEXT_MENU, KEY_CONTEXT_MENU -+KEY_MEDIA_REPEAT, KEY_MEDIA_REPEAT -+KEY_DEL_EOL, KEY_DEL_EOL -+KEY_DEL_EOS, KEY_DEL_EOS -+KEY_INS_LINE, KEY_INS_LINE -+KEY_DEL_LINE, KEY_DEL_LINE -+KEY_FN, KEY_FN -+KEY_FN_ESC, KEY_FN_ESC -+KEY_FN_F1, KEY_FN_F1 -+KEY_FN_F2, KEY_FN_F2 -+KEY_FN_F3, KEY_FN_F3 -+KEY_FN_F4, KEY_FN_F4 -+KEY_FN_F5, KEY_FN_F5 -+KEY_FN_F6, KEY_FN_F6 -+KEY_FN_F7, KEY_FN_F7 -+KEY_FN_F8, KEY_FN_F8 -+KEY_FN_F9, KEY_FN_F9 -+KEY_FN_F10, KEY_FN_F10 -+KEY_FN_F11, KEY_FN_F11 -+KEY_FN_F12, KEY_FN_F12 -+KEY_FN_1, KEY_FN_1 -+KEY_FN_2, KEY_FN_2 -+KEY_FN_D, KEY_FN_D -+KEY_FN_E, KEY_FN_E -+KEY_FN_F, KEY_FN_F -+KEY_FN_S, KEY_FN_S -+KEY_FN_B, KEY_FN_B -+KEY_BRL_DOT1, KEY_BRL_DOT1 -+KEY_BRL_DOT2, KEY_BRL_DOT2 -+KEY_BRL_DOT3, KEY_BRL_DOT3 -+KEY_BRL_DOT4, KEY_BRL_DOT4 -+KEY_BRL_DOT5, KEY_BRL_DOT5 -+KEY_BRL_DOT6, KEY_BRL_DOT6 -+KEY_BRL_DOT7, KEY_BRL_DOT7 -+KEY_BRL_DOT8, KEY_BRL_DOT8 -+KEY_BRL_DOT9, KEY_BRL_DOT9 -+KEY_BRL_DOT10, KEY_BRL_DOT10 -+KEY_NUMERIC_0, KEY_NUMERIC_0 -+KEY_NUMERIC_1, KEY_NUMERIC_1 -+KEY_NUMERIC_2, KEY_NUMERIC_2 -+KEY_NUMERIC_3, KEY_NUMERIC_3 -+KEY_NUMERIC_4, KEY_NUMERIC_4 -+KEY_NUMERIC_5, KEY_NUMERIC_5 -+KEY_NUMERIC_6, KEY_NUMERIC_6 -+KEY_NUMERIC_7, KEY_NUMERIC_7 -+KEY_NUMERIC_8, KEY_NUMERIC_8 -+KEY_NUMERIC_9, KEY_NUMERIC_9 -+KEY_NUMERIC_STAR, KEY_NUMERIC_STAR -+KEY_NUMERIC_POUND, KEY_NUMERIC_POUND -+KEY_CAMERA_FOCUS, KEY_CAMERA_FOCUS -+KEY_WPS_BUTTON, KEY_WPS_BUTTON -diff -urN udev-145-orig/extras/keymap/keys-from-name.h udev-145/extras/keymap/keys-from-name.h ---- udev-145-orig/extras/keymap/keys-from-name.h 1970-01-01 01:00:00.000000000 +0100 -+++ udev-145/extras/keymap/keys-from-name.h 2010-08-11 15:14:09.000000000 +0200 -@@ -0,0 +1,1064 @@ -+/* ANSI-C code produced by gperf version 3.0.4 */ -+/* Command-line: /usr/bin/gperf -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C */ -+/* Computed positions: -k'5-8,$' */ -+ -+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ -+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ -+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ -+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ -+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ -+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ -+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ -+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ -+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ -+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ -+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ -+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ -+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ -+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ -+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ -+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ -+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ -+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ -+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ -+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ -+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ -+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ -+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -+/* The character set is not based on ISO-646. */ -+#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -+#endif -+ -+struct key { const char* name; unsigned short id; }; -+ -+#define TOTAL_KEYWORDS 379 -+#define MIN_WORD_LENGTH 5 -+#define MAX_WORD_LENGTH 20 -+#define MIN_HASH_VALUE 5 -+#define MAX_HASH_VALUE 1967 -+/* maximum key range = 1963, duplicates = 0 */ -+ -+#ifndef GPERF_DOWNCASE -+#define GPERF_DOWNCASE 1 -+static unsigned char gperf_downcase[256] = -+ { -+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, -+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, -+ 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, -+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, -+ 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, -+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, -+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, -+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, -+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, -+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, -+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, -+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, -+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, -+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, -+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, -+ 255 -+ }; -+#endif -+ -+#ifndef GPERF_CASE_STRCMP -+#define GPERF_CASE_STRCMP 1 -+static int -+gperf_case_strcmp (register const char *s1, register const char *s2) -+{ -+ for (;;) -+ { -+ unsigned char c1 = gperf_downcase[(unsigned char)*s1++]; -+ unsigned char c2 = gperf_downcase[(unsigned char)*s2++]; -+ if (c1 != 0 && c1 == c2) -+ continue; -+ return (int)c1 - (int)c2; -+ } -+} -+#endif -+ -+#ifdef __GNUC__ -+__inline -+#else -+#ifdef __cplusplus -+inline -+#endif -+#endif -+static unsigned int -+hash_key_name (register const char *str, register unsigned int len) -+{ -+ static const unsigned short asso_values[] = -+ { -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 170, 245, -+ 160, 265, 275, 390, 380, 315, 225, 35, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 40, 200, 70, 5, 0, -+ 310, 185, 250, 105, 270, 260, 115, 150, 95, 15, -+ 30, 65, 10, 20, 25, 220, 485, 490, 55, 375, -+ 410, 1968, 1968, 1968, 1968, 305, 1968, 40, 200, 70, -+ 5, 0, 310, 185, 250, 105, 270, 260, 115, 150, -+ 95, 15, 30, 65, 10, 20, 25, 220, 485, 490, -+ 55, 375, 410, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, -+ 1968, 1968, 1968, 1968, 1968, 1968 -+ }; -+ register int hval = len; -+ -+ switch (hval) -+ { -+ default: -+ hval += asso_values[(unsigned char)str[7]]; -+ /*FALLTHROUGH*/ -+ case 7: -+ hval += asso_values[(unsigned char)str[6]]; -+ /*FALLTHROUGH*/ -+ case 6: -+ hval += asso_values[(unsigned char)str[5]]; -+ /*FALLTHROUGH*/ -+ case 5: -+ hval += asso_values[(unsigned char)str[4]]; -+ break; -+ } -+ return hval + asso_values[(unsigned char)str[len - 1]]; -+} -+ -+#ifdef __GNUC__ -+__inline -+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -+__attribute__ ((__gnu_inline__)) -+#endif -+#endif -+const struct key * -+lookup_key (register const char *str, register unsigned int len) -+{ -+ static const struct key wordlist[] = -+ { -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_E", KEY_E}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_D", KEY_D}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_R", KEY_R}, -+ {(char*)0}, -+ {"KEY_RED", KEY_RED}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_O", KEY_O}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_S", KEY_S}, -+ {"KEY_RO", KEY_RO}, -+ {"KEY_RESERVED", KEY_RESERVED}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_REDO", KEY_REDO}, -+ {(char*)0}, -+ {"KEY_T", KEY_T}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_P", KEY_P}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_9", KEY_9}, -+ {(char*)0}, -+ {"KEY_DOT", KEY_DOT}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_A", KEY_A}, -+ {"KEY_CD", KEY_CD}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_RESTART", KEY_RESTART}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_SPREADSHEET", KEY_SPREADSHEET}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_TAPE", KEY_TAPE}, -+ {(char*)0}, -+ {"KEY_STOPCD", KEY_STOPCD}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_SPORT", KEY_SPORT}, -+ {"KEY_RECORD", KEY_RECORD}, -+ {(char*)0}, -+ {"KEY_END", KEY_END}, -+ {(char*)0}, -+ {"KEY_PROPS", KEY_PROPS}, -+ {"KEY_X", KEY_X}, -+ {(char*)0}, -+ {"KEY_SAT", KEY_SAT}, -+ {(char*)0}, -+ {"KEY_APOSTROPHE", KEY_APOSTROPHE}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_DATABASE", KEY_DATABASE}, -+ {(char*)0}, -+ {"KEY_PASTE", KEY_PASTE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_STOP", KEY_STOP}, -+ {(char*)0}, -+ {"KEY_DELETE", KEY_DELETE}, -+ {(char*)0}, -+ {"KEY_SENDFILE", KEY_SENDFILE}, -+ {"KEY_SEND", KEY_SEND}, -+ {"KEY_DELETEFILE", KEY_DELETEFILE}, -+ {"KEY_Q", KEY_Q}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_TEXT", KEY_TEXT}, -+ {"KEY_ENTER", KEY_ENTER}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_C", KEY_C}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_EDITOR", KEY_EDITOR}, -+ {(char*)0}, -+ {"KEY_SCROLLUP", KEY_SCROLLUP}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_ISO", KEY_ISO}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_ESC", KEY_ESC}, -+ {"KEY_EDIT", KEY_EDIT}, -+ {"KEY_SPACE", KEY_SPACE}, -+ {"KEY_SELECT", KEY_SELECT}, -+ {"KEY_PRESENTATION", KEY_PRESENTATION}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_SLEEP", KEY_SLEEP}, -+ {(char*)0}, -+ {"KEY_PC", KEY_PC}, -+ {"KEY_DISPLAYTOGGLE", KEY_DISPLAYTOGGLE}, -+ {"KEY_MODE", KEY_MODE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_RADIO", KEY_RADIO}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_ALTERASE", KEY_ALTERASE}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_N", KEY_N}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_SCREEN", KEY_SCREEN}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_NEXT", KEY_NEXT}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_MESSENGER", KEY_MESSENGER}, -+ {(char*)0}, -+ {"KEY_I", KEY_I}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_EXIT", KEY_EXIT}, -+ {"KEY_MSDOS", KEY_MSDOS}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_TEEN", KEY_TEEN}, -+ {"KEY_SCROLLDOWN", KEY_SCROLLDOWN}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_DIRECTION", KEY_DIRECTION}, -+ {"KEY_CLOSE", KEY_CLOSE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_LAST", KEY_LAST}, -+ {(char*)0}, -+ {"KEY_L", KEY_L}, -+ {"KEY_CLOSECD", KEY_CLOSECD}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_OPEN", KEY_OPEN}, -+ {"KEY_CLEAR", KEY_CLEAR}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_CALENDAR", KEY_CALENDAR}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_SCALE", KEY_SCALE}, -+ {"KEY_INSERT", KEY_INSERT}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_GOTO", KEY_GOTO}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_EURO", KEY_EURO}, -+ {(char*)0}, -+ {"KEY_DOLLAR", KEY_DOLLAR}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_PRINT", KEY_PRINT}, -+ {(char*)0}, -+ {"KEY_COMPOSE", KEY_COMPOSE}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_TITLE", KEY_TITLE}, -+ {"KEY_OPTION", KEY_OPTION}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_UP", KEY_UP}, -+ {"KEY_COMPUTER", KEY_COMPUTER}, -+ {"KEY_TIME", KEY_TIME}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_GRAPHICSEDITOR", KEY_GRAPHICSEDITOR}, -+ {"KEY_MACRO", KEY_MACRO}, -+ {"KEY_PAGEUP", KEY_PAGEUP}, -+ {"KEY_CAMERA_FOCUS", KEY_CAMERA_FOCUS}, -+ {(char*)0}, -+ {"KEY_LIST", KEY_LIST}, -+ {"KEY_GREEN", KEY_GREEN}, -+ {(char*)0}, -+ {"KEY_MEDIA_REPEAT", KEY_MEDIA_REPEAT}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_SETUP", KEY_SETUP}, -+ {"KEY_M", KEY_M}, -+ {"KEY_SUSPEND", KEY_SUSPEND}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_MEDIA", KEY_MEDIA}, -+ {"KEY_CAMERA", KEY_CAMERA}, -+ {"KEY_CONNECT", KEY_CONNECT}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_HP", KEY_HP}, -+ {(char*)0}, -+ {"KEY_BASSBOOST", KEY_BASSBOOST}, -+ {"KEY_PAUSE", KEY_PAUSE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_2", KEY_2}, -+ {"KEY_PAUSECD", KEY_PAUSECD}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_SEARCH", KEY_SEARCH}, -+ {(char*)0}, -+ {"KEY_LINEFEED", KEY_LINEFEED}, -+ {"KEY_DASHBOARD", KEY_DASHBOARD}, -+ {(char*)0}, -+ {"KEY_ADDRESSBOOK", KEY_ADDRESSBOOK}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_MEMO", KEY_MEMO}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_DOCUMENTS", KEY_DOCUMENTS}, -+ {"KEY_KPDOT", KEY_KPDOT}, -+ {"KEY_0", KEY_0}, -+ {(char*)0}, -+ {"KEY_CUT", KEY_CUT}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_SHOP", KEY_SHOP}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_EJECTCD", KEY_EJECTCD}, -+ {(char*)0}, -+ {"KEY_UNDO", KEY_UNDO}, -+ {"KEY_TUNER", KEY_TUNER}, -+ {(char*)0}, -+ {"KEY_EJECTCLOSECD", KEY_EJECTCLOSECD}, -+ {"KEY_PAGEDOWN", KEY_PAGEDOWN}, -+ {(char*)0}, -+ {"KEY_SOUND", KEY_SOUND}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_KP9", KEY_KP9}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_NEXTSONG", KEY_NEXTSONG}, -+ {"KEY_CALC", KEY_CALC}, -+ {"KEY_SCREENLOCK", KEY_SCREENLOCK}, -+ {"KEY_G", KEY_G}, -+ {(char*)0}, -+ {"KEY_AUX", KEY_AUX}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_ARCHIVE", KEY_ARCHIVE}, -+ {(char*)0}, -+ {"KEY_SEMICOLON", KEY_SEMICOLON}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_F9", KEY_F9}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_SCROLLLOCK", KEY_SCROLLLOCK}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_XFER", KEY_XFER}, -+ {"KEY_AUDIO", KEY_AUDIO}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_PHONE", KEY_PHONE}, -+ {"KEY_CANCEL", KEY_CANCEL}, -+ {"KEY_PROGRAM", KEY_PROGRAM}, -+ {(char*)0}, -+ {"KEY_MUTE", KEY_MUTE}, -+ {"KEY_GAMES", KEY_GAMES}, -+ {"KEY_B", KEY_B}, -+ {"KEY_KPENTER", KEY_KPENTER}, -+ {"KEY_EPG", KEY_EPG}, -+ {(char*)0}, -+ {"KEY_PROG2", KEY_PROG2}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_QUESTION", KEY_QUESTION}, -+ {"KEY_SAT2", KEY_SAT2}, -+ {(char*)0}, -+ {"KEY_FASTFORWARD", KEY_FASTFORWARD}, -+ {(char*)0}, -+ {"KEY_KATAKANA", KEY_KATAKANA}, -+ {"KEY_CHAT", KEY_CHAT}, -+ {"KEY_EMAIL", KEY_EMAIL}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_HOME", KEY_HOME}, -+ {(char*)0}, -+ {"KEY_KATAKANAHIRAGANA", KEY_KATAKANAHIRAGANA}, -+ {"KEY_KPCOMMA", KEY_KPCOMMA}, -+ {"KEY_HOMEPAGE", KEY_HOMEPAGE}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_DIGITS", KEY_DIGITS}, -+ {(char*)0}, -+ {"KEY_CAPSLOCK", KEY_CAPSLOCK}, -+ {"KEY_HELP", KEY_HELP}, -+ {"KEY_COMMA", KEY_COMMA}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_DEL_LINE", KEY_DEL_LINE}, -+ {(char*)0}, -+ {"KEY_SPELLCHECK", KEY_SPELLCHECK}, -+ {(char*)0}, -+ {"KEY_CONTEXT_MENU", KEY_CONTEXT_MENU}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_ANGLE", KEY_ANGLE}, -+ {"KEY_U", KEY_U}, -+ {"KEY_AB", KEY_AB}, -+ {"KEY_LANGUAGE", KEY_LANGUAGE}, -+ {(char*)0}, -+ {"KEY_EQUAL", KEY_EQUAL}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_SLASH", KEY_SLASH}, -+ {"KEY_8", KEY_8}, -+ {"KEY_DEL_EOS", KEY_DEL_EOS}, -+ {"KEY_HIRAGANA", KEY_HIRAGANA}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_LEFTBRACE", KEY_LEFTBRACE}, -+ {"KEY_FRONT", KEY_FRONT}, -+ {"KEY_KPPLUS", KEY_KPPLUS}, -+ {(char*)0}, -+ {"KEY_MHP", KEY_MHP}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_KPPLUSMINUS", KEY_KPPLUSMINUS}, -+ {(char*)0}, -+ {"KEY_TAB", KEY_TAB}, -+ {(char*)0}, -+ {"KEY_AGAIN", KEY_AGAIN}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_SUBTITLE", KEY_SUBTITLE}, -+ {(char*)0}, -+ {"KEY_FIRST", KEY_FIRST}, -+ {(char*)0}, -+ {"KEY_KPEQUAL", KEY_KPEQUAL}, -+ {(char*)0}, -+ {"KEY_LEFT", KEY_LEFT}, -+ {(char*)0}, -+ {"KEY_DISPLAY_OFF", KEY_DISPLAY_OFF}, -+ {"KEY_LEFTALT", KEY_LEFTALT}, -+ {"KEY_NUMERIC_POUND", KEY_NUMERIC_POUND}, -+ {"KEY_LEFTSHIFT", KEY_LEFTSHIFT}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_STAR", KEY_NUMERIC_STAR}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_PROG1", KEY_PROG1}, -+ {"KEY_1", KEY_1}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_CHANNELUP", KEY_CHANNELUP}, -+ {"KEY_SYSRQ", KEY_SYSRQ}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_LEFTMETA", KEY_LEFTMETA}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_H", KEY_H}, -+ {"KEY_FN", KEY_FN}, -+ {"KEY_DVD", KEY_DVD}, -+ {"KEY_DIRECTORY", KEY_DIRECTORY}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_9", KEY_NUMERIC_9}, -+ {"KEY_PROG3", KEY_PROG3}, -+ {"KEY_KPLEFTPAREN", KEY_KPLEFTPAREN}, -+ {"KEY_KPRIGHTPAREN", KEY_KPRIGHTPAREN}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_BREAK", KEY_BREAK}, -+ {"KEY_BRIGHTNESS_CYCLE", KEY_BRIGHTNESS_CYCLE}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_BOOKMARKS", KEY_BOOKMARKS}, -+ {"KEY_PROG4", KEY_PROG4}, -+ {"KEY_K", KEY_K}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FIND", KEY_FIND}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FRAMEFORWARD", KEY_FRAMEFORWARD}, -+ {(char*)0}, -+ {"KEY_MAIL", KEY_MAIL}, -+ {"KEY_BRIGHTNESS_ZERO", KEY_BRIGHTNESS_ZERO}, -+ {"KEY_3", KEY_3}, -+ {(char*)0}, -+ {"KEY_INS_LINE", KEY_INS_LINE}, -+ {"KEY_FILE", KEY_FILE}, -+ {"KEY_REPLY", KEY_REPLY}, -+ {(char*)0}, -+ {"KEY_OK", KEY_OK}, -+ {"KEY_PVR", KEY_PVR}, -+ {"KEY_BLUE", KEY_BLUE}, -+ {(char*)0}, -+ {"KEY_J", KEY_J}, -+ {"KEY_BRIGHTNESSUP", KEY_BRIGHTNESSUP}, -+ {"KEY_WORDPROCESSOR", KEY_WORDPROCESSOR}, -+ {"KEY_INFO", KEY_INFO}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_DEL_EOL", KEY_DEL_EOL}, -+ {(char*)0}, -+ {"KEY_SAVE", KEY_SAVE}, -+ {"KEY_POWER", KEY_POWER}, -+ {"KEY_4", KEY_4}, -+ {(char*)0}, -+ {"KEY_PREVIOUS", KEY_PREVIOUS}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_FINANCE", KEY_FINANCE}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_RIGHTBRACE", KEY_RIGHTBRACE}, -+ {"KEY_CHANNELDOWN", KEY_CHANNELDOWN}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_YEN", KEY_YEN}, -+ {"KEY_PLAYPAUSE", KEY_PLAYPAUSE}, -+ {(char*)0}, -+ {"KEY_PLAYCD", KEY_PLAYCD}, -+ {"KEY_KPMINUS", KEY_KPMINUS}, -+ {"KEY_LEFTCTRL", KEY_LEFTCTRL}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_PLAYER", KEY_PLAYER}, -+ {"KEY_CHANNEL", KEY_CHANNEL}, -+ {"KEY_VCR", KEY_VCR}, -+ {"KEY_BACKSPACE", KEY_BACKSPACE}, -+ {"KEY_RIGHT", KEY_RIGHT}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_RIGHTALT", KEY_RIGHTALT}, -+ {"KEY_KBDILLUMTOGGLE", KEY_KBDILLUMTOGGLE}, -+ {"KEY_RIGHTSHIFT", KEY_RIGHTSHIFT}, -+ {(char*)0}, -+ {"KEY_REFRESH", KEY_REFRESH}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_MINUS", KEY_MINUS}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_RIGHTMETA", KEY_RIGHTMETA}, -+ {(char*)0}, -+ {"KEY_VENDOR", KEY_VENDOR}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_VIDEOPHONE", KEY_VIDEOPHONE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_BRIGHTNESSDOWN", KEY_BRIGHTNESSDOWN}, -+ {"KEY_KBDILLUMUP", KEY_KBDILLUMUP}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_KP2", KEY_KP2}, -+ {(char*)0}, -+ {"KEY_VIDEO", KEY_VIDEO}, -+ {"KEY_REWIND", KEY_REWIND}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_KPASTERISK", KEY_KPASTERISK}, -+ {"KEY_F", KEY_F}, -+ {"KEY_ZOOMOUT", KEY_ZOOMOUT}, -+ {(char*)0}, -+ {"KEY_ZOOMRESET", KEY_ZOOMRESET}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F19", KEY_F19}, -+ {"KEY_NEWS", KEY_NEWS}, -+ {"KEY_VIDEO_NEXT", KEY_VIDEO_NEXT}, -+ {"KEY_7", KEY_7}, -+ {"KEY_F2", KEY_F2}, -+ {"KEY_KP0", KEY_KP0}, -+ {"KEY_NUMERIC_2", KEY_NUMERIC_2}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_KPJPCOMMA", KEY_KPJPCOMMA}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_0", KEY_NUMERIC_0}, -+ {(char*)0}, -+ {"KEY_LOGOFF", KEY_LOGOFF}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_MOVE", KEY_MOVE}, -+ {"KEY_SWITCHVIDEOMODE", KEY_SWITCHVIDEOMODE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_CYCLEWINDOWS", KEY_CYCLEWINDOWS}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_BATTERY", KEY_BATTERY}, -+ {"KEY_BRL_DOT9", KEY_BRL_DOT9}, -+ {"KEY_RIGHTCTRL", KEY_RIGHTCTRL}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_KBDILLUMDOWN", KEY_KBDILLUMDOWN}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_102ND", KEY_102ND}, -+ {"KEY_CONFIG", KEY_CONFIG}, -+ {"KEY_KPSLASH", KEY_KPSLASH}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_MENU", KEY_MENU}, -+ {(char*)0}, -+ {"KEY_ZOOMIN", KEY_ZOOMIN}, -+ {"KEY_HANGEUL", KEY_HANGEUL}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_8", KEY_NUMERIC_8}, -+ {"KEY_HANJA", KEY_HANJA}, -+ {"KEY_POWER2", KEY_POWER2}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_DOWN", KEY_DOWN}, -+ {(char*)0}, -+ {"KEY_HENKAN", KEY_HENKAN}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_TWEN", KEY_TWEN}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_MP3", KEY_MP3}, -+ {"KEY_FN_E", KEY_FN_E}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_1", KEY_NUMERIC_1}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_PREVIOUSSONG", KEY_PREVIOUSSONG}, -+ {"KEY_MUHENKAN", KEY_MUHENKAN}, -+ {"KEY_FN_D", KEY_FN_D}, -+ {"KEY_GRAVE", KEY_GRAVE}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_NUMERIC_3", KEY_NUMERIC_3}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_KP8", KEY_KP8}, -+ {"KEY_ZOOM", KEY_ZOOM}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_4", KEY_NUMERIC_4}, -+ {(char*)0}, -+ {"KEY_Y", KEY_Y}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FN_S", KEY_FN_S}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_6", KEY_6}, -+ {"KEY_F8", KEY_F8}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_UNKNOWN", KEY_UNKNOWN}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FRAMEBACK", KEY_FRAMEBACK}, -+ {(char*)0}, -+ {"KEY_5", KEY_5}, -+ {(char*)0}, -+ {"KEY_KP1", KEY_KP1}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FN_ESC", KEY_FN_ESC}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_NUMERIC_7", KEY_NUMERIC_7}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F22", KEY_F22}, -+ {"KEY_BLUETOOTH", KEY_BLUETOOTH}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_BRL_DOT2", KEY_BRL_DOT2}, -+ {"KEY_VOICEMAIL", KEY_VOICEMAIL}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_F1", KEY_F1}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_RFKILL", KEY_RFKILL}, -+ {"KEY_SHUFFLE", KEY_SHUFFLE}, -+ {(char*)0}, -+ {"KEY_BRL_DOT10", KEY_BRL_DOT10}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F20", KEY_F20}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_Z", KEY_Z}, -+ {(char*)0}, -+ {"KEY_KP3", KEY_KP3}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_WAKEUP", KEY_WAKEUP}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_BACKSLASH", KEY_BACKSLASH}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_TV2", KEY_TV2}, -+ {"KEY_BACK", KEY_BACK}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FORWARD", KEY_FORWARD}, -+ {(char*)0}, -+ {"KEY_WLAN", KEY_WLAN}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_F3", KEY_F3}, -+ {"KEY_KP4", KEY_KP4}, -+ {(char*)0}, -+ {"KEY_WIMAX", KEY_WIMAX}, -+ {(char*)0}, -+ {"KEY_NUMLOCK", KEY_NUMLOCK}, -+ {"KEY_KEYBOARD", KEY_KEYBOARD}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_NUMERIC_6", KEY_NUMERIC_6}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F4", KEY_F4}, -+ {"KEY_BRL_DOT8", KEY_BRL_DOT8}, -+ {"KEY_NUMERIC_5", KEY_NUMERIC_5}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_COPY", KEY_COPY}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_VOLUMEUP", KEY_VOLUMEUP}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F12", KEY_F12}, -+ {"KEY_FAVORITES", KEY_FAVORITES}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_BRL_DOT1", KEY_BRL_DOT1}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_VCR2", KEY_VCR2}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F10", KEY_F10}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_BRL_DOT3", KEY_BRL_DOT3}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_BRL_DOT4", KEY_BRL_DOT4}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_KP7", KEY_KP7}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_PLAY", KEY_PLAY}, -+ {"KEY_VOLUMEDOWN", KEY_VOLUMEDOWN}, -+ {(char*)0}, -+ {"KEY_F7", KEY_F7}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_WPS_BUTTON", KEY_WPS_BUTTON}, -+ {"KEY_FORWARDMAIL", KEY_FORWARDMAIL}, -+ {(char*)0}, -+ {"KEY_BRL_DOT7", KEY_BRL_DOT7}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_F21", KEY_F21}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_V", KEY_V}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_W", KEY_W}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_TV", KEY_TV}, -+ {(char*)0}, -+ {"KEY_ZENKAKUHANKAKU", KEY_ZENKAKUHANKAKU}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F23", KEY_F23}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F18", KEY_F18}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_BRL_DOT6", KEY_BRL_DOT6}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F24", KEY_F24}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_BRL_DOT5", KEY_BRL_DOT5}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_FN_2", KEY_FN_2}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_F11", KEY_F11}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_KP6", KEY_KP6}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FN_F9", KEY_FN_F9}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F6", KEY_F6}, -+ {"KEY_KP5", KEY_KP5}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_NEW", KEY_NEW}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_F13", KEY_F13}, -+ {(char*)0}, -+ {"KEY_VIDEO_PREV", KEY_VIDEO_PREV}, -+ {(char*)0}, -+ {"KEY_F5", KEY_F5}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_YELLOW", KEY_YELLOW}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_F14", KEY_F14}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_UWB", KEY_UWB}, -+ {"KEY_FN_B", KEY_FN_B}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_SLOW", KEY_SLOW}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FN_F2", KEY_FN_F2}, -+ {"KEY_FN_F12", KEY_FN_F12}, -+ {(char*)0}, -+ {"KEY_F17", KEY_F17}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_FN_F10", KEY_FN_F10}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_FN_1", KEY_FN_1}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_FN_F8", KEY_FN_F8}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_FN_F1", KEY_FN_F1}, -+ {"KEY_FN_F11", KEY_FN_F11}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, -+ {"KEY_FN_F3", KEY_FN_F3}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_FN_F4", KEY_FN_F4}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_F16", KEY_F16}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_FN_F", KEY_FN_F}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_F15", KEY_F15}, -+ {(char*)0}, -+ {"KEY_FN_F7", KEY_FN_F7}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_FN_F6", KEY_FN_F6}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, -+ {"KEY_FN_F5", KEY_FN_F5}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, -+ {(char*)0}, {(char*)0}, {(char*)0}, -+ {"KEY_WWW", KEY_WWW} -+ }; -+ -+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) -+ { -+ register int key = hash_key_name (str, len); -+ -+ if (key <= MAX_HASH_VALUE && key >= 0) -+ { -+ register const char *s = wordlist[key].name; -+ -+ if (s && (((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strcmp (str, s)) -+ return &wordlist[key]; -+ } -+ } -+ return 0; -+} -diff -urN udev-145-orig/extras/keymap/keys-to-name.h udev-145/extras/keymap/keys-to-name.h ---- udev-145-orig/extras/keymap/keys-to-name.h 1970-01-01 01:00:00.000000000 +0100 -+++ udev-145/extras/keymap/keys-to-name.h 2010-08-11 15:14:10.000000000 +0200 -@@ -0,0 +1,381 @@ -+const char* const key_names[KEY_CNT] = { -+[KEY_RESERVED] = "KEY_RESERVED", -+[KEY_ESC] = "KEY_ESC", -+[KEY_1] = "KEY_1", -+[KEY_2] = "KEY_2", -+[KEY_3] = "KEY_3", -+[KEY_4] = "KEY_4", -+[KEY_5] = "KEY_5", -+[KEY_6] = "KEY_6", -+[KEY_7] = "KEY_7", -+[KEY_8] = "KEY_8", -+[KEY_9] = "KEY_9", -+[KEY_0] = "KEY_0", -+[KEY_MINUS] = "KEY_MINUS", -+[KEY_EQUAL] = "KEY_EQUAL", -+[KEY_BACKSPACE] = "KEY_BACKSPACE", -+[KEY_TAB] = "KEY_TAB", -+[KEY_Q] = "KEY_Q", -+[KEY_W] = "KEY_W", -+[KEY_E] = "KEY_E", -+[KEY_R] = "KEY_R", -+[KEY_T] = "KEY_T", -+[KEY_Y] = "KEY_Y", -+[KEY_U] = "KEY_U", -+[KEY_I] = "KEY_I", -+[KEY_O] = "KEY_O", -+[KEY_P] = "KEY_P", -+[KEY_LEFTBRACE] = "KEY_LEFTBRACE", -+[KEY_RIGHTBRACE] = "KEY_RIGHTBRACE", -+[KEY_ENTER] = "KEY_ENTER", -+[KEY_LEFTCTRL] = "KEY_LEFTCTRL", -+[KEY_A] = "KEY_A", -+[KEY_S] = "KEY_S", -+[KEY_D] = "KEY_D", -+[KEY_F] = "KEY_F", -+[KEY_G] = "KEY_G", -+[KEY_H] = "KEY_H", -+[KEY_J] = "KEY_J", -+[KEY_K] = "KEY_K", -+[KEY_L] = "KEY_L", -+[KEY_SEMICOLON] = "KEY_SEMICOLON", -+[KEY_APOSTROPHE] = "KEY_APOSTROPHE", -+[KEY_GRAVE] = "KEY_GRAVE", -+[KEY_LEFTSHIFT] = "KEY_LEFTSHIFT", -+[KEY_BACKSLASH] = "KEY_BACKSLASH", -+[KEY_Z] = "KEY_Z", -+[KEY_X] = "KEY_X", -+[KEY_C] = "KEY_C", -+[KEY_V] = "KEY_V", -+[KEY_B] = "KEY_B", -+[KEY_N] = "KEY_N", -+[KEY_M] = "KEY_M", -+[KEY_COMMA] = "KEY_COMMA", -+[KEY_DOT] = "KEY_DOT", -+[KEY_SLASH] = "KEY_SLASH", -+[KEY_RIGHTSHIFT] = "KEY_RIGHTSHIFT", -+[KEY_KPASTERISK] = "KEY_KPASTERISK", -+[KEY_LEFTALT] = "KEY_LEFTALT", -+[KEY_SPACE] = "KEY_SPACE", -+[KEY_CAPSLOCK] = "KEY_CAPSLOCK", -+[KEY_F1] = "KEY_F1", -+[KEY_F2] = "KEY_F2", -+[KEY_F3] = "KEY_F3", -+[KEY_F4] = "KEY_F4", -+[KEY_F5] = "KEY_F5", -+[KEY_F6] = "KEY_F6", -+[KEY_F7] = "KEY_F7", -+[KEY_F8] = "KEY_F8", -+[KEY_F9] = "KEY_F9", -+[KEY_F10] = "KEY_F10", -+[KEY_NUMLOCK] = "KEY_NUMLOCK", -+[KEY_SCROLLLOCK] = "KEY_SCROLLLOCK", -+[KEY_KP7] = "KEY_KP7", -+[KEY_KP8] = "KEY_KP8", -+[KEY_KP9] = "KEY_KP9", -+[KEY_KPMINUS] = "KEY_KPMINUS", -+[KEY_KP4] = "KEY_KP4", -+[KEY_KP5] = "KEY_KP5", -+[KEY_KP6] = "KEY_KP6", -+[KEY_KPPLUS] = "KEY_KPPLUS", -+[KEY_KP1] = "KEY_KP1", -+[KEY_KP2] = "KEY_KP2", -+[KEY_KP3] = "KEY_KP3", -+[KEY_KP0] = "KEY_KP0", -+[KEY_KPDOT] = "KEY_KPDOT", -+[KEY_ZENKAKUHANKAKU] = "KEY_ZENKAKUHANKAKU", -+[KEY_102ND] = "KEY_102ND", -+[KEY_F11] = "KEY_F11", -+[KEY_F12] = "KEY_F12", -+[KEY_RO] = "KEY_RO", -+[KEY_KATAKANA] = "KEY_KATAKANA", -+[KEY_HIRAGANA] = "KEY_HIRAGANA", -+[KEY_HENKAN] = "KEY_HENKAN", -+[KEY_KATAKANAHIRAGANA] = "KEY_KATAKANAHIRAGANA", -+[KEY_MUHENKAN] = "KEY_MUHENKAN", -+[KEY_KPJPCOMMA] = "KEY_KPJPCOMMA", -+[KEY_KPENTER] = "KEY_KPENTER", -+[KEY_RIGHTCTRL] = "KEY_RIGHTCTRL", -+[KEY_KPSLASH] = "KEY_KPSLASH", -+[KEY_SYSRQ] = "KEY_SYSRQ", -+[KEY_RIGHTALT] = "KEY_RIGHTALT", -+[KEY_LINEFEED] = "KEY_LINEFEED", -+[KEY_HOME] = "KEY_HOME", -+[KEY_UP] = "KEY_UP", -+[KEY_PAGEUP] = "KEY_PAGEUP", -+[KEY_LEFT] = "KEY_LEFT", -+[KEY_RIGHT] = "KEY_RIGHT", -+[KEY_END] = "KEY_END", -+[KEY_DOWN] = "KEY_DOWN", -+[KEY_PAGEDOWN] = "KEY_PAGEDOWN", -+[KEY_INSERT] = "KEY_INSERT", -+[KEY_DELETE] = "KEY_DELETE", -+[KEY_MACRO] = "KEY_MACRO", -+[KEY_MUTE] = "KEY_MUTE", -+[KEY_VOLUMEDOWN] = "KEY_VOLUMEDOWN", -+[KEY_VOLUMEUP] = "KEY_VOLUMEUP", -+[KEY_POWER] = "KEY_POWER", -+[KEY_KPEQUAL] = "KEY_KPEQUAL", -+[KEY_KPPLUSMINUS] = "KEY_KPPLUSMINUS", -+[KEY_PAUSE] = "KEY_PAUSE", -+[KEY_SCALE] = "KEY_SCALE", -+[KEY_KPCOMMA] = "KEY_KPCOMMA", -+[KEY_HANGEUL] = "KEY_HANGEUL", -+[KEY_HANJA] = "KEY_HANJA", -+[KEY_YEN] = "KEY_YEN", -+[KEY_LEFTMETA] = "KEY_LEFTMETA", -+[KEY_RIGHTMETA] = "KEY_RIGHTMETA", -+[KEY_COMPOSE] = "KEY_COMPOSE", -+[KEY_STOP] = "KEY_STOP", -+[KEY_AGAIN] = "KEY_AGAIN", -+[KEY_PROPS] = "KEY_PROPS", -+[KEY_UNDO] = "KEY_UNDO", -+[KEY_FRONT] = "KEY_FRONT", -+[KEY_COPY] = "KEY_COPY", -+[KEY_OPEN] = "KEY_OPEN", -+[KEY_PASTE] = "KEY_PASTE", -+[KEY_FIND] = "KEY_FIND", -+[KEY_CUT] = "KEY_CUT", -+[KEY_HELP] = "KEY_HELP", -+[KEY_MENU] = "KEY_MENU", -+[KEY_CALC] = "KEY_CALC", -+[KEY_SETUP] = "KEY_SETUP", -+[KEY_SLEEP] = "KEY_SLEEP", -+[KEY_WAKEUP] = "KEY_WAKEUP", -+[KEY_FILE] = "KEY_FILE", -+[KEY_SENDFILE] = "KEY_SENDFILE", -+[KEY_DELETEFILE] = "KEY_DELETEFILE", -+[KEY_XFER] = "KEY_XFER", -+[KEY_PROG1] = "KEY_PROG1", -+[KEY_PROG2] = "KEY_PROG2", -+[KEY_WWW] = "KEY_WWW", -+[KEY_MSDOS] = "KEY_MSDOS", -+[KEY_SCREENLOCK] = "KEY_SCREENLOCK", -+[KEY_DIRECTION] = "KEY_DIRECTION", -+[KEY_CYCLEWINDOWS] = "KEY_CYCLEWINDOWS", -+[KEY_MAIL] = "KEY_MAIL", -+[KEY_BOOKMARKS] = "KEY_BOOKMARKS", -+[KEY_COMPUTER] = "KEY_COMPUTER", -+[KEY_BACK] = "KEY_BACK", -+[KEY_FORWARD] = "KEY_FORWARD", -+[KEY_CLOSECD] = "KEY_CLOSECD", -+[KEY_EJECTCD] = "KEY_EJECTCD", -+[KEY_EJECTCLOSECD] = "KEY_EJECTCLOSECD", -+[KEY_NEXTSONG] = "KEY_NEXTSONG", -+[KEY_PLAYPAUSE] = "KEY_PLAYPAUSE", -+[KEY_PREVIOUSSONG] = "KEY_PREVIOUSSONG", -+[KEY_STOPCD] = "KEY_STOPCD", -+[KEY_RECORD] = "KEY_RECORD", -+[KEY_REWIND] = "KEY_REWIND", -+[KEY_PHONE] = "KEY_PHONE", -+[KEY_ISO] = "KEY_ISO", -+[KEY_CONFIG] = "KEY_CONFIG", -+[KEY_HOMEPAGE] = "KEY_HOMEPAGE", -+[KEY_REFRESH] = "KEY_REFRESH", -+[KEY_EXIT] = "KEY_EXIT", -+[KEY_MOVE] = "KEY_MOVE", -+[KEY_EDIT] = "KEY_EDIT", -+[KEY_SCROLLUP] = "KEY_SCROLLUP", -+[KEY_SCROLLDOWN] = "KEY_SCROLLDOWN", -+[KEY_KPLEFTPAREN] = "KEY_KPLEFTPAREN", -+[KEY_KPRIGHTPAREN] = "KEY_KPRIGHTPAREN", -+[KEY_NEW] = "KEY_NEW", -+[KEY_REDO] = "KEY_REDO", -+[KEY_F13] = "KEY_F13", -+[KEY_F14] = "KEY_F14", -+[KEY_F15] = "KEY_F15", -+[KEY_F16] = "KEY_F16", -+[KEY_F17] = "KEY_F17", -+[KEY_F18] = "KEY_F18", -+[KEY_F19] = "KEY_F19", -+[KEY_F20] = "KEY_F20", -+[KEY_F21] = "KEY_F21", -+[KEY_F22] = "KEY_F22", -+[KEY_F23] = "KEY_F23", -+[KEY_F24] = "KEY_F24", -+[KEY_PLAYCD] = "KEY_PLAYCD", -+[KEY_PAUSECD] = "KEY_PAUSECD", -+[KEY_PROG3] = "KEY_PROG3", -+[KEY_PROG4] = "KEY_PROG4", -+[KEY_DASHBOARD] = "KEY_DASHBOARD", -+[KEY_SUSPEND] = "KEY_SUSPEND", -+[KEY_CLOSE] = "KEY_CLOSE", -+[KEY_PLAY] = "KEY_PLAY", -+[KEY_FASTFORWARD] = "KEY_FASTFORWARD", -+[KEY_BASSBOOST] = "KEY_BASSBOOST", -+[KEY_PRINT] = "KEY_PRINT", -+[KEY_HP] = "KEY_HP", -+[KEY_CAMERA] = "KEY_CAMERA", -+[KEY_SOUND] = "KEY_SOUND", -+[KEY_QUESTION] = "KEY_QUESTION", -+[KEY_EMAIL] = "KEY_EMAIL", -+[KEY_CHAT] = "KEY_CHAT", -+[KEY_SEARCH] = "KEY_SEARCH", -+[KEY_CONNECT] = "KEY_CONNECT", -+[KEY_FINANCE] = "KEY_FINANCE", -+[KEY_SPORT] = "KEY_SPORT", -+[KEY_SHOP] = "KEY_SHOP", -+[KEY_ALTERASE] = "KEY_ALTERASE", -+[KEY_CANCEL] = "KEY_CANCEL", -+[KEY_BRIGHTNESSDOWN] = "KEY_BRIGHTNESSDOWN", -+[KEY_BRIGHTNESSUP] = "KEY_BRIGHTNESSUP", -+[KEY_MEDIA] = "KEY_MEDIA", -+[KEY_SWITCHVIDEOMODE] = "KEY_SWITCHVIDEOMODE", -+[KEY_KBDILLUMTOGGLE] = "KEY_KBDILLUMTOGGLE", -+[KEY_KBDILLUMDOWN] = "KEY_KBDILLUMDOWN", -+[KEY_KBDILLUMUP] = "KEY_KBDILLUMUP", -+[KEY_SEND] = "KEY_SEND", -+[KEY_REPLY] = "KEY_REPLY", -+[KEY_FORWARDMAIL] = "KEY_FORWARDMAIL", -+[KEY_SAVE] = "KEY_SAVE", -+[KEY_DOCUMENTS] = "KEY_DOCUMENTS", -+[KEY_BATTERY] = "KEY_BATTERY", -+[KEY_BLUETOOTH] = "KEY_BLUETOOTH", -+[KEY_WLAN] = "KEY_WLAN", -+[KEY_UWB] = "KEY_UWB", -+[KEY_UNKNOWN] = "KEY_UNKNOWN", -+[KEY_VIDEO_NEXT] = "KEY_VIDEO_NEXT", -+[KEY_VIDEO_PREV] = "KEY_VIDEO_PREV", -+[KEY_BRIGHTNESS_CYCLE] = "KEY_BRIGHTNESS_CYCLE", -+[KEY_BRIGHTNESS_ZERO] = "KEY_BRIGHTNESS_ZERO", -+[KEY_DISPLAY_OFF] = "KEY_DISPLAY_OFF", -+[KEY_WIMAX] = "KEY_WIMAX", -+[KEY_RFKILL] = "KEY_RFKILL", -+[KEY_OK] = "KEY_OK", -+[KEY_SELECT] = "KEY_SELECT", -+[KEY_GOTO] = "KEY_GOTO", -+[KEY_CLEAR] = "KEY_CLEAR", -+[KEY_POWER2] = "KEY_POWER2", -+[KEY_OPTION] = "KEY_OPTION", -+[KEY_INFO] = "KEY_INFO", -+[KEY_TIME] = "KEY_TIME", -+[KEY_VENDOR] = "KEY_VENDOR", -+[KEY_ARCHIVE] = "KEY_ARCHIVE", -+[KEY_PROGRAM] = "KEY_PROGRAM", -+[KEY_CHANNEL] = "KEY_CHANNEL", -+[KEY_FAVORITES] = "KEY_FAVORITES", -+[KEY_EPG] = "KEY_EPG", -+[KEY_PVR] = "KEY_PVR", -+[KEY_MHP] = "KEY_MHP", -+[KEY_LANGUAGE] = "KEY_LANGUAGE", -+[KEY_TITLE] = "KEY_TITLE", -+[KEY_SUBTITLE] = "KEY_SUBTITLE", -+[KEY_ANGLE] = "KEY_ANGLE", -+[KEY_ZOOM] = "KEY_ZOOM", -+[KEY_MODE] = "KEY_MODE", -+[KEY_KEYBOARD] = "KEY_KEYBOARD", -+[KEY_SCREEN] = "KEY_SCREEN", -+[KEY_PC] = "KEY_PC", -+[KEY_TV] = "KEY_TV", -+[KEY_TV2] = "KEY_TV2", -+[KEY_VCR] = "KEY_VCR", -+[KEY_VCR2] = "KEY_VCR2", -+[KEY_SAT] = "KEY_SAT", -+[KEY_SAT2] = "KEY_SAT2", -+[KEY_CD] = "KEY_CD", -+[KEY_TAPE] = "KEY_TAPE", -+[KEY_RADIO] = "KEY_RADIO", -+[KEY_TUNER] = "KEY_TUNER", -+[KEY_PLAYER] = "KEY_PLAYER", -+[KEY_TEXT] = "KEY_TEXT", -+[KEY_DVD] = "KEY_DVD", -+[KEY_AUX] = "KEY_AUX", -+[KEY_MP3] = "KEY_MP3", -+[KEY_AUDIO] = "KEY_AUDIO", -+[KEY_VIDEO] = "KEY_VIDEO", -+[KEY_DIRECTORY] = "KEY_DIRECTORY", -+[KEY_LIST] = "KEY_LIST", -+[KEY_MEMO] = "KEY_MEMO", -+[KEY_CALENDAR] = "KEY_CALENDAR", -+[KEY_RED] = "KEY_RED", -+[KEY_GREEN] = "KEY_GREEN", -+[KEY_YELLOW] = "KEY_YELLOW", -+[KEY_BLUE] = "KEY_BLUE", -+[KEY_CHANNELUP] = "KEY_CHANNELUP", -+[KEY_CHANNELDOWN] = "KEY_CHANNELDOWN", -+[KEY_FIRST] = "KEY_FIRST", -+[KEY_LAST] = "KEY_LAST", -+[KEY_AB] = "KEY_AB", -+[KEY_NEXT] = "KEY_NEXT", -+[KEY_RESTART] = "KEY_RESTART", -+[KEY_SLOW] = "KEY_SLOW", -+[KEY_SHUFFLE] = "KEY_SHUFFLE", -+[KEY_BREAK] = "KEY_BREAK", -+[KEY_PREVIOUS] = "KEY_PREVIOUS", -+[KEY_DIGITS] = "KEY_DIGITS", -+[KEY_TEEN] = "KEY_TEEN", -+[KEY_TWEN] = "KEY_TWEN", -+[KEY_VIDEOPHONE] = "KEY_VIDEOPHONE", -+[KEY_GAMES] = "KEY_GAMES", -+[KEY_ZOOMIN] = "KEY_ZOOMIN", -+[KEY_ZOOMOUT] = "KEY_ZOOMOUT", -+[KEY_ZOOMRESET] = "KEY_ZOOMRESET", -+[KEY_WORDPROCESSOR] = "KEY_WORDPROCESSOR", -+[KEY_EDITOR] = "KEY_EDITOR", -+[KEY_SPREADSHEET] = "KEY_SPREADSHEET", -+[KEY_GRAPHICSEDITOR] = "KEY_GRAPHICSEDITOR", -+[KEY_PRESENTATION] = "KEY_PRESENTATION", -+[KEY_DATABASE] = "KEY_DATABASE", -+[KEY_NEWS] = "KEY_NEWS", -+[KEY_VOICEMAIL] = "KEY_VOICEMAIL", -+[KEY_ADDRESSBOOK] = "KEY_ADDRESSBOOK", -+[KEY_MESSENGER] = "KEY_MESSENGER", -+[KEY_DISPLAYTOGGLE] = "KEY_DISPLAYTOGGLE", -+[KEY_SPELLCHECK] = "KEY_SPELLCHECK", -+[KEY_LOGOFF] = "KEY_LOGOFF", -+[KEY_DOLLAR] = "KEY_DOLLAR", -+[KEY_EURO] = "KEY_EURO", -+[KEY_FRAMEBACK] = "KEY_FRAMEBACK", -+[KEY_FRAMEFORWARD] = "KEY_FRAMEFORWARD", -+[KEY_CONTEXT_MENU] = "KEY_CONTEXT_MENU", -+[KEY_MEDIA_REPEAT] = "KEY_MEDIA_REPEAT", -+[KEY_DEL_EOL] = "KEY_DEL_EOL", -+[KEY_DEL_EOS] = "KEY_DEL_EOS", -+[KEY_INS_LINE] = "KEY_INS_LINE", -+[KEY_DEL_LINE] = "KEY_DEL_LINE", -+[KEY_FN] = "KEY_FN", -+[KEY_FN_ESC] = "KEY_FN_ESC", -+[KEY_FN_F1] = "KEY_FN_F1", -+[KEY_FN_F2] = "KEY_FN_F2", -+[KEY_FN_F3] = "KEY_FN_F3", -+[KEY_FN_F4] = "KEY_FN_F4", -+[KEY_FN_F5] = "KEY_FN_F5", -+[KEY_FN_F6] = "KEY_FN_F6", -+[KEY_FN_F7] = "KEY_FN_F7", -+[KEY_FN_F8] = "KEY_FN_F8", -+[KEY_FN_F9] = "KEY_FN_F9", -+[KEY_FN_F10] = "KEY_FN_F10", -+[KEY_FN_F11] = "KEY_FN_F11", -+[KEY_FN_F12] = "KEY_FN_F12", -+[KEY_FN_1] = "KEY_FN_1", -+[KEY_FN_2] = "KEY_FN_2", -+[KEY_FN_D] = "KEY_FN_D", -+[KEY_FN_E] = "KEY_FN_E", -+[KEY_FN_F] = "KEY_FN_F", -+[KEY_FN_S] = "KEY_FN_S", -+[KEY_FN_B] = "KEY_FN_B", -+[KEY_BRL_DOT1] = "KEY_BRL_DOT1", -+[KEY_BRL_DOT2] = "KEY_BRL_DOT2", -+[KEY_BRL_DOT3] = "KEY_BRL_DOT3", -+[KEY_BRL_DOT4] = "KEY_BRL_DOT4", -+[KEY_BRL_DOT5] = "KEY_BRL_DOT5", -+[KEY_BRL_DOT6] = "KEY_BRL_DOT6", -+[KEY_BRL_DOT7] = "KEY_BRL_DOT7", -+[KEY_BRL_DOT8] = "KEY_BRL_DOT8", -+[KEY_BRL_DOT9] = "KEY_BRL_DOT9", -+[KEY_BRL_DOT10] = "KEY_BRL_DOT10", -+[KEY_NUMERIC_0] = "KEY_NUMERIC_0", -+[KEY_NUMERIC_1] = "KEY_NUMERIC_1", -+[KEY_NUMERIC_2] = "KEY_NUMERIC_2", -+[KEY_NUMERIC_3] = "KEY_NUMERIC_3", -+[KEY_NUMERIC_4] = "KEY_NUMERIC_4", -+[KEY_NUMERIC_5] = "KEY_NUMERIC_5", -+[KEY_NUMERIC_6] = "KEY_NUMERIC_6", -+[KEY_NUMERIC_7] = "KEY_NUMERIC_7", -+[KEY_NUMERIC_8] = "KEY_NUMERIC_8", -+[KEY_NUMERIC_9] = "KEY_NUMERIC_9", -+[KEY_NUMERIC_STAR] = "KEY_NUMERIC_STAR", -+[KEY_NUMERIC_POUND] = "KEY_NUMERIC_POUND", -+[KEY_CAMERA_FOCUS] = "KEY_CAMERA_FOCUS", -+[KEY_WPS_BUTTON] = "KEY_WPS_BUTTON", -+}; -diff -urN udev-145-orig/extras/keymap/keys.txt udev-145/extras/keymap/keys.txt ---- udev-145-orig/extras/keymap/keys.txt 1970-01-01 01:00:00.000000000 +0100 -+++ udev-145/extras/keymap/keys.txt 2010-08-10 16:45:45.000000000 +0200 -@@ -0,0 +1,379 @@ -+KEY_RESERVED -+KEY_ESC -+KEY_1 -+KEY_2 -+KEY_3 -+KEY_4 -+KEY_5 -+KEY_6 -+KEY_7 -+KEY_8 -+KEY_9 -+KEY_0 -+KEY_MINUS -+KEY_EQUAL -+KEY_BACKSPACE -+KEY_TAB -+KEY_Q -+KEY_W -+KEY_E -+KEY_R -+KEY_T -+KEY_Y -+KEY_U -+KEY_I -+KEY_O -+KEY_P -+KEY_LEFTBRACE -+KEY_RIGHTBRACE -+KEY_ENTER -+KEY_LEFTCTRL -+KEY_A -+KEY_S -+KEY_D -+KEY_F -+KEY_G -+KEY_H -+KEY_J -+KEY_K -+KEY_L -+KEY_SEMICOLON -+KEY_APOSTROPHE -+KEY_GRAVE -+KEY_LEFTSHIFT -+KEY_BACKSLASH -+KEY_Z -+KEY_X -+KEY_C -+KEY_V -+KEY_B -+KEY_N -+KEY_M -+KEY_COMMA -+KEY_DOT -+KEY_SLASH -+KEY_RIGHTSHIFT -+KEY_KPASTERISK -+KEY_LEFTALT -+KEY_SPACE -+KEY_CAPSLOCK -+KEY_F1 -+KEY_F2 -+KEY_F3 -+KEY_F4 -+KEY_F5 -+KEY_F6 -+KEY_F7 -+KEY_F8 -+KEY_F9 -+KEY_F10 -+KEY_NUMLOCK -+KEY_SCROLLLOCK -+KEY_KP7 -+KEY_KP8 -+KEY_KP9 -+KEY_KPMINUS -+KEY_KP4 -+KEY_KP5 -+KEY_KP6 -+KEY_KPPLUS -+KEY_KP1 -+KEY_KP2 -+KEY_KP3 -+KEY_KP0 -+KEY_KPDOT -+KEY_ZENKAKUHANKAKU -+KEY_102ND -+KEY_F11 -+KEY_F12 -+KEY_RO -+KEY_KATAKANA -+KEY_HIRAGANA -+KEY_HENKAN -+KEY_KATAKANAHIRAGANA -+KEY_MUHENKAN -+KEY_KPJPCOMMA -+KEY_KPENTER -+KEY_RIGHTCTRL -+KEY_KPSLASH -+KEY_SYSRQ -+KEY_RIGHTALT -+KEY_LINEFEED -+KEY_HOME -+KEY_UP -+KEY_PAGEUP -+KEY_LEFT -+KEY_RIGHT -+KEY_END -+KEY_DOWN -+KEY_PAGEDOWN -+KEY_INSERT -+KEY_DELETE -+KEY_MACRO -+KEY_MUTE -+KEY_VOLUMEDOWN -+KEY_VOLUMEUP -+KEY_POWER -+KEY_KPEQUAL -+KEY_KPPLUSMINUS -+KEY_PAUSE -+KEY_SCALE -+KEY_KPCOMMA -+KEY_HANGEUL -+KEY_HANJA -+KEY_YEN -+KEY_LEFTMETA -+KEY_RIGHTMETA -+KEY_COMPOSE -+KEY_STOP -+KEY_AGAIN -+KEY_PROPS -+KEY_UNDO -+KEY_FRONT -+KEY_COPY -+KEY_OPEN -+KEY_PASTE -+KEY_FIND -+KEY_CUT -+KEY_HELP -+KEY_MENU -+KEY_CALC -+KEY_SETUP -+KEY_SLEEP -+KEY_WAKEUP -+KEY_FILE -+KEY_SENDFILE -+KEY_DELETEFILE -+KEY_XFER -+KEY_PROG1 -+KEY_PROG2 -+KEY_WWW -+KEY_MSDOS -+KEY_SCREENLOCK -+KEY_DIRECTION -+KEY_CYCLEWINDOWS -+KEY_MAIL -+KEY_BOOKMARKS -+KEY_COMPUTER -+KEY_BACK -+KEY_FORWARD -+KEY_CLOSECD -+KEY_EJECTCD -+KEY_EJECTCLOSECD -+KEY_NEXTSONG -+KEY_PLAYPAUSE -+KEY_PREVIOUSSONG -+KEY_STOPCD -+KEY_RECORD -+KEY_REWIND -+KEY_PHONE -+KEY_ISO -+KEY_CONFIG -+KEY_HOMEPAGE -+KEY_REFRESH -+KEY_EXIT -+KEY_MOVE -+KEY_EDIT -+KEY_SCROLLUP -+KEY_SCROLLDOWN -+KEY_KPLEFTPAREN -+KEY_KPRIGHTPAREN -+KEY_NEW -+KEY_REDO -+KEY_F13 -+KEY_F14 -+KEY_F15 -+KEY_F16 -+KEY_F17 -+KEY_F18 -+KEY_F19 -+KEY_F20 -+KEY_F21 -+KEY_F22 -+KEY_F23 -+KEY_F24 -+KEY_PLAYCD -+KEY_PAUSECD -+KEY_PROG3 -+KEY_PROG4 -+KEY_DASHBOARD -+KEY_SUSPEND -+KEY_CLOSE -+KEY_PLAY -+KEY_FASTFORWARD -+KEY_BASSBOOST -+KEY_PRINT -+KEY_HP -+KEY_CAMERA -+KEY_SOUND -+KEY_QUESTION -+KEY_EMAIL -+KEY_CHAT -+KEY_SEARCH -+KEY_CONNECT -+KEY_FINANCE -+KEY_SPORT -+KEY_SHOP -+KEY_ALTERASE -+KEY_CANCEL -+KEY_BRIGHTNESSDOWN -+KEY_BRIGHTNESSUP -+KEY_MEDIA -+KEY_SWITCHVIDEOMODE -+KEY_KBDILLUMTOGGLE -+KEY_KBDILLUMDOWN -+KEY_KBDILLUMUP -+KEY_SEND -+KEY_REPLY -+KEY_FORWARDMAIL -+KEY_SAVE -+KEY_DOCUMENTS -+KEY_BATTERY -+KEY_BLUETOOTH -+KEY_WLAN -+KEY_UWB -+KEY_UNKNOWN -+KEY_VIDEO_NEXT -+KEY_VIDEO_PREV -+KEY_BRIGHTNESS_CYCLE -+KEY_BRIGHTNESS_ZERO -+KEY_DISPLAY_OFF -+KEY_WIMAX -+KEY_RFKILL -+KEY_OK -+KEY_SELECT -+KEY_GOTO -+KEY_CLEAR -+KEY_POWER2 -+KEY_OPTION -+KEY_INFO -+KEY_TIME -+KEY_VENDOR -+KEY_ARCHIVE -+KEY_PROGRAM -+KEY_CHANNEL -+KEY_FAVORITES -+KEY_EPG -+KEY_PVR -+KEY_MHP -+KEY_LANGUAGE -+KEY_TITLE -+KEY_SUBTITLE -+KEY_ANGLE -+KEY_ZOOM -+KEY_MODE -+KEY_KEYBOARD -+KEY_SCREEN -+KEY_PC -+KEY_TV -+KEY_TV2 -+KEY_VCR -+KEY_VCR2 -+KEY_SAT -+KEY_SAT2 -+KEY_CD -+KEY_TAPE -+KEY_RADIO -+KEY_TUNER -+KEY_PLAYER -+KEY_TEXT -+KEY_DVD -+KEY_AUX -+KEY_MP3 -+KEY_AUDIO -+KEY_VIDEO -+KEY_DIRECTORY -+KEY_LIST -+KEY_MEMO -+KEY_CALENDAR -+KEY_RED -+KEY_GREEN -+KEY_YELLOW -+KEY_BLUE -+KEY_CHANNELUP -+KEY_CHANNELDOWN -+KEY_FIRST -+KEY_LAST -+KEY_AB -+KEY_NEXT -+KEY_RESTART -+KEY_SLOW -+KEY_SHUFFLE -+KEY_BREAK -+KEY_PREVIOUS -+KEY_DIGITS -+KEY_TEEN -+KEY_TWEN -+KEY_VIDEOPHONE -+KEY_GAMES -+KEY_ZOOMIN -+KEY_ZOOMOUT -+KEY_ZOOMRESET -+KEY_WORDPROCESSOR -+KEY_EDITOR -+KEY_SPREADSHEET -+KEY_GRAPHICSEDITOR -+KEY_PRESENTATION -+KEY_DATABASE -+KEY_NEWS -+KEY_VOICEMAIL -+KEY_ADDRESSBOOK -+KEY_MESSENGER -+KEY_DISPLAYTOGGLE -+KEY_SPELLCHECK -+KEY_LOGOFF -+KEY_DOLLAR -+KEY_EURO -+KEY_FRAMEBACK -+KEY_FRAMEFORWARD -+KEY_CONTEXT_MENU -+KEY_MEDIA_REPEAT -+KEY_DEL_EOL -+KEY_DEL_EOS -+KEY_INS_LINE -+KEY_DEL_LINE -+KEY_FN -+KEY_FN_ESC -+KEY_FN_F1 -+KEY_FN_F2 -+KEY_FN_F3 -+KEY_FN_F4 -+KEY_FN_F5 -+KEY_FN_F6 -+KEY_FN_F7 -+KEY_FN_F8 -+KEY_FN_F9 -+KEY_FN_F10 -+KEY_FN_F11 -+KEY_FN_F12 -+KEY_FN_1 -+KEY_FN_2 -+KEY_FN_D -+KEY_FN_E -+KEY_FN_F -+KEY_FN_S -+KEY_FN_B -+KEY_BRL_DOT1 -+KEY_BRL_DOT2 -+KEY_BRL_DOT3 -+KEY_BRL_DOT4 -+KEY_BRL_DOT5 -+KEY_BRL_DOT6 -+KEY_BRL_DOT7 -+KEY_BRL_DOT8 -+KEY_BRL_DOT9 -+KEY_BRL_DOT10 -+KEY_NUMERIC_0 -+KEY_NUMERIC_1 -+KEY_NUMERIC_2 -+KEY_NUMERIC_3 -+KEY_NUMERIC_4 -+KEY_NUMERIC_5 -+KEY_NUMERIC_6 -+KEY_NUMERIC_7 -+KEY_NUMERIC_8 -+KEY_NUMERIC_9 -+KEY_NUMERIC_STAR -+KEY_NUMERIC_POUND -+KEY_CAMERA_FOCUS -+KEY_WPS_BUTTON -diff -urN udev-145-orig/extras/keymap/Makefile udev-145/extras/keymap/Makefile ---- udev-145-orig/extras/keymap/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ udev-145/extras/keymap/Makefile 2010-09-21 11:57:16.449750002 +0200 -@@ -0,0 +1,882 @@ -+# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# extras/keymap/Makefile. Generated from Makefile.in by configure. -+ -+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. -+# This Makefile.in is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -+# PARTICULAR PURPOSE. -+ -+ -+ -+ -+ -+ -+pkgdatadir = $(datadir)/udev -+pkgincludedir = $(includedir)/udev -+pkglibdir = $(libdir)/udev -+pkglibexecdir = $(libexecdir)/udev -+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -+install_sh_DATA = $(install_sh) -c -m 644 -+install_sh_PROGRAM = $(install_sh) -c -+install_sh_SCRIPT = $(install_sh) -c -+INSTALL_HEADER = $(INSTALL_DATA) -+transform = $(program_transform_name) -+NORMAL_INSTALL = : -+PRE_INSTALL = : -+POST_INSTALL = : -+NORMAL_UNINSTALL = : -+PRE_UNINSTALL = : -+POST_UNINSTALL = : -+build_triplet = x86_64-unknown-linux-gnu -+host_triplet = x86_64-unknown-linux-gnu -+DIST_COMMON = $(dist_doc_DATA) $(dist_libexec_SCRIPTS) \ -+ $(dist_udevrules_DATA) $(srcdir)/Makefile.am \ -+ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.inc -+libexec_PROGRAMS = keymap$(EXEEXT) -+subdir = extras/keymap -+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ -+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ -+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ -+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ -+ $(ACLOCAL_M4) -+mkinstalldirs = $(install_sh) -d -+CONFIG_HEADER = $(top_builddir)/config.h -+CONFIG_CLEAN_FILES = -+CONFIG_CLEAN_VPATH_FILES = -+am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)" \ -+ "$(DESTDIR)$(docdir)" "$(DESTDIR)$(udevrulesdir)" \ -+ "$(DESTDIR)$(udevkeymapdir)" -+PROGRAMS = $(libexec_PROGRAMS) -+am_keymap_OBJECTS = keymap-keymap.$(OBJEXT) -+nodist_keymap_OBJECTS = -+keymap_OBJECTS = $(am_keymap_OBJECTS) $(nodist_keymap_OBJECTS) -+keymap_LDADD = $(LDADD) -+AM_V_lt = $(am__v_lt_$(V)) -+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -+am__v_lt_0 = --silent -+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -+am__vpath_adj = case $$p in \ -+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ -+ *) f=$$p;; \ -+ esac; -+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -+am__install_max = 40 -+am__nobase_strip_setup = \ -+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -+am__nobase_strip = \ -+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -+am__nobase_list = $(am__nobase_strip_setup); \ -+ for p in $$list; do echo "$$p $$p"; done | \ -+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ -+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ -+ if (++n[$$2] == $(am__install_max)) \ -+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ -+ END { for (dir in files) print dir, files[dir] }' -+am__base_list = \ -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -+SCRIPTS = $(dist_libexec_SCRIPTS) -+DEFAULT_INCLUDES = -I. -I$(top_builddir) -+depcomp = $(SHELL) $(top_srcdir)/depcomp -+am__depfiles_maybe = depfiles -+am__mv = mv -f -+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ -+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ -+ $(AM_CFLAGS) $(CFLAGS) -+AM_V_CC = $(am__v_CC_$(V)) -+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -+am__v_CC_0 = @echo " CC " $@; -+AM_V_at = $(am__v_at_$(V)) -+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -+am__v_at_0 = @ -+CCLD = $(CC) -+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -+ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+AM_V_CCLD = $(am__v_CCLD_$(V)) -+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -+am__v_CCLD_0 = @echo " CCLD " $@; -+AM_V_GEN = $(am__v_GEN_$(V)) -+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -+am__v_GEN_0 = @echo " GEN " $@; -+SOURCES = $(keymap_SOURCES) $(nodist_keymap_SOURCES) -+DIST_SOURCES = $(keymap_SOURCES) -+DATA = $(dist_doc_DATA) $(dist_udevrules_DATA) $(udevkeymap_DATA) -+ETAGS = etags -+CTAGS = ctags -+am__tty_colors = \ -+red=; grn=; lgn=; blu=; std= -+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -+ACLOCAL = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run aclocal-1.11 -+AMTAR = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run tar -+AM_DEFAULT_VERBOSITY = 0 -+AR = ar -+AUTOCONF = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run autoconf -+AUTOHEADER = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run autoheader -+AUTOMAKE = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run automake-1.11 -+AWK = gawk -+CC = gcc -+CCDEPMODE = depmode=none -+CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -+CPP = gcc -E -+CPPFLAGS = -+CYGPATH_W = echo -+DEFS = -DHAVE_CONFIG_H -+DEPDIR = .deps -+DSYMUTIL = -+DUMPBIN = -+ECHO_C = -+ECHO_N = -n -+ECHO_T = -+EGREP = /bin/grep -E -+EXEEXT = -+FGREP = /bin/grep -F -+GIRDIR = /usr/share/gir-1.0 -+GIRTYPELIBDIR = /usr/lib64/girepository-1.0 -+GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -+GLIB_LIBS = -pthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -+GPERF = /usr/bin/gperf -+GREP = /bin/grep -+GTKDOC_CHECK = /usr/bin/gtkdoc-check -+G_IR_COMPILER = /usr/bin/g-ir-compiler -+G_IR_GENERATE = /usr/bin/g-ir-generate -+G_IR_SCANNER = /usr/bin/g-ir-scanner -+HTML_DIR = ${datadir}/gtk-doc/html -+INSTALL = /usr/bin/install -c -+INSTALL_DATA = ${INSTALL} -m 644 -+INSTALL_PROGRAM = ${INSTALL} -+INSTALL_SCRIPT = ${INSTALL} -+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -+INTROSPECTION_CFLAGS = -pthread -I/usr/include/gobject-introspection-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi-3.0.9/include -+INTROSPECTION_LIBS = -Wl,--export-dynamic -pthread -lgirepository-1.0 -lgobject-2.0 -lgmodule-2.0 -lffi -lgthread-2.0 -lrt -lglib-2.0 -+LD = /usr/bin/ld -m elf_x86_64 -+LDFLAGS = -+LIBOBJS = -+LIBS = -+LIBTOOL = $(SHELL) $(top_builddir)/libtool -+LIBUSB_CFLAGS = -+LIBUSB_LIBS = -lusb -+LIPO = -+LN_S = ln -s -+LTLIBOBJS = -+MAKEINFO = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/missing --run makeinfo -+MKDIR_P = /bin/mkdir -p -+NM = /usr/bin/nm -B -+NMEDIT = -+OBJDUMP = objdump -+OBJEXT = o -+OTOOL = -+OTOOL64 = -+PACKAGE = udev -+PACKAGE_BUGREPORT = linux-hotplug@vger.kernel.org -+PACKAGE_NAME = udev -+PACKAGE_STRING = udev 145 -+PACKAGE_TARNAME = udev -+PACKAGE_URL = -+PACKAGE_VERSION = 145 -+PATH_SEPARATOR = : -+PCI_DATABASE = /usr/share/hwdata/pci.ids -+PKG_CONFIG = /usr/bin/pkg-config -+PKG_CONFIG_LIBDIR = -+PKG_CONFIG_PATH = /usr/lib64/pkgconfig:/usr/share/pkgconfig -+RANLIB = ranlib -+SED = /bin/sed -+SELINUX_LIBS = -lselinux -lsepol -+SET_MAKE = -+SHELL = /bin/sh -+STRIP = strip -+USBUTILS_CFLAGS = -+USBUTILS_LIBS = -+USB_DATABASE = /usr/share/hwdata/usb.ids -+VERSION = 145 -+XSLTPROC = /usr/bin/xsltproc -+abs_builddir = /home/harald/git/fedora/harald/udev/f12/udev-145/extras/keymap -+abs_srcdir = /home/harald/git/fedora/harald/udev/f12/udev-145/extras/keymap -+abs_top_builddir = /home/harald/git/fedora/harald/udev/f12/udev-145 -+abs_top_srcdir = /home/harald/git/fedora/harald/udev/f12/udev-145 -+ac_ct_CC = gcc -+ac_ct_DUMPBIN = -+am__include = include -+am__leading_dot = . -+am__quote = -+am__tar = ${AMTAR} chof - "$$tardir" -+am__untar = ${AMTAR} xf - -+bindir = /usr/bin -+build = x86_64-unknown-linux-gnu -+build_alias = x86_64-unknown-linux-gnu -+build_cpu = x86_64 -+build_os = linux-gnu -+build_vendor = unknown -+builddir = . -+datadir = /usr/share -+datarootdir = ${prefix}/share -+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -+dvidir = ${docdir} -+exec_prefix = -+host = x86_64-unknown-linux-gnu -+host_alias = x86_64-unknown-linux-gnu -+host_cpu = x86_64 -+host_os = linux-gnu -+host_vendor = unknown -+htmldir = ${docdir} -+includedir = /usr/include -+infodir = /usr/share/info -+install_sh = ${SHELL} /home/harald/git/fedora/harald/udev/f12/udev-145/install-sh -+libdir = /usr/lib64 -+libexecdir = /lib/udev -+localedir = ${datarootdir}/locale -+localstatedir = /var -+mandir = /usr/share/man -+mkdir_p = /bin/mkdir -p -+oldincludedir = /usr/include -+pdfdir = ${docdir} -+prefix = /usr -+program_transform_name = s&^&& -+psdir = ${docdir} -+rootlib_execdir = /lib64 -+sbindir = /sbin -+sharedstatedir = /var/lib -+srcdir = . -+sysconfdir = /etc -+target_alias = -+top_build_prefix = ../../ -+top_builddir = ../.. -+top_srcdir = ../.. -+AM_CPPFLAGS = \ -+ -include $(top_builddir)/config.h \ -+ -I$(top_srcdir)/libudev \ -+ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -+ -DLIBEXECDIR=\""$(libexecdir)"\" -+ -+AM_CFLAGS = -+AM_LDFLAGS = \ -+ -Wl,--as-needed -+ -+udevrulesdir = \ -+ $(libexecdir)/rules.d -+ -+dist_udevrules_DATA = 95-keymap.rules -+udevkeymapdir = $(libexecdir)/keymaps -+udevkeymap_DATA = \ -+keymaps/acer \ -+ keymaps/acer-aspire_5920g \ -+ keymaps/acer-extensa_5xxx \ -+ keymaps/acer-travelmate_6292 \ -+ keymaps/acer-travelmate_c300 \ -+ keymaps/asus \ -+ keymaps/benq-joybook_r22 \ -+ keymaps/compaq-e_evo \ -+ keymaps/dell \ -+ keymaps/fujitsu-amilo_pa_2548 \ -+ keymaps/fujitsu-amilo_pro_edition_v3505 \ -+ keymaps/fujitsu-amilo_pro_v3205 \ -+ keymaps/fujitsu-amilo_si_1520 \ -+ keymaps/fujitsu-esprimo_mobile_v5 \ -+ keymaps/fujitsu-esprimo_mobile_v6 \ -+ keymaps/hewlett-packard \ -+ keymaps/hewlett-packard-2510p_2530p \ -+ keymaps/hewlett-packard-compaq_elitebook \ -+ keymaps/hewlett-packard-pavilion \ -+ keymaps/hewlett-packard-tablet \ -+ keymaps/hewlett-packard-tx2 \ -+ keymaps/inventec-symphony_6.0_7.0 \ -+ keymaps/lenovo-3000 \ -+ keymaps/lenovo-thinkpad_x6_tablet \ -+ keymaps/lenovo-thinkpad_x200_tablet \ -+ keymaps/maxdata-pro_7000 \ -+ keymaps/medion-fid2060 \ -+ keymaps/medionnb-a555 \ -+ keymaps/micro-star \ -+ keymaps/module-asus-w3j \ -+ keymaps/module-ibm \ -+ keymaps/module-lenovo \ -+ keymaps/module-sony \ -+ keymaps/module-sony-old \ -+ keymaps/oqo-model2 \ -+ keymaps/samsung-other \ -+ keymaps/samsung-sq1us \ -+ keymaps/samsung-sx20s \ -+ keymaps/toshiba-satellite_a100 \ -+ keymaps/toshiba-satellite_a110 -+ -+dist_libexec_SCRIPTS = findkeyboards -+keymap_SOURCES = keymap.c -+nodist_keymap_SOURCES = keys-from-name.h keys-to-name.h -+keymap_CPPFLAGS = $(AM_CPPFLAGS) -+dist_doc_DATA = README.keymap.txt -+EXTRA_DIST = \ -+ keymaps \ -+ check-keymaps.sh -+ -+BUILT_SOURCES = \ -+ keys-from-name.h \ -+ keys-to-name.h -+ -+CLEANFILES = \ -+ keys.txt keys-from-name.gperf \ -+ keys-from-name.h keys-to-name.h -+ -+TESTS = check-keymaps.sh -+all: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) all-am -+ -+.SUFFIXES: -+.SUFFIXES: .c .lo .o .obj -+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.inc $(am__configure_deps) -+ @for dep in $?; do \ -+ case '$(am__configure_deps)' in \ -+ *$$dep*) \ -+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ -+ && { if test -f $@; then exit 0; else break; fi; }; \ -+ exit 1;; \ -+ esac; \ -+ done; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extras/keymap/Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --foreign extras/keymap/Makefile -+.PRECIOUS: Makefile -+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -+ @case '$?' in \ -+ *config.status*) \ -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ -+ *) \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ esac; -+ -+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+ -+$(top_srcdir)/configure: $(am__configure_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(ACLOCAL_M4): $(am__aclocal_m4_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(am__aclocal_m4_deps): -+install-libexecPROGRAMS: $(libexec_PROGRAMS) -+ @$(NORMAL_INSTALL) -+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" -+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ -+ for p in $$list; do echo "$$p $$p"; done | \ -+ sed 's/$(EXEEXT)$$//' | \ -+ while read p p1; do if test -f $$p || test -f $$p1; \ -+ then echo "$$p"; echo "$$p"; else :; fi; \ -+ done | \ -+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ -+ sed 'N;N;N;s,\n, ,g' | \ -+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ -+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ -+ if ($$2 == $$4) files[d] = files[d] " " $$1; \ -+ else { print "f", $$3 "/" $$4, $$1; } } \ -+ END { for (d in files) print "f", d, files[d] }' | \ -+ while read type dir files; do \ -+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ -+ test -z "$$files" || { \ -+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ -+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ -+ } \ -+ ; done -+ -+uninstall-libexecPROGRAMS: -+ @$(NORMAL_UNINSTALL) -+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ -+ files=`for p in $$list; do echo "$$p"; done | \ -+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -+ -e 's/$$/$(EXEEXT)/' `; \ -+ test -n "$$list" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files -+ -+clean-libexecPROGRAMS: -+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ -+ echo " rm -f" $$list; \ -+ rm -f $$list || exit $$?; \ -+ test -n "$(EXEEXT)" || exit 0; \ -+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ -+ echo " rm -f" $$list; \ -+ rm -f $$list -+keymap$(EXEEXT): $(keymap_OBJECTS) $(keymap_DEPENDENCIES) -+ @rm -f keymap$(EXEEXT) -+ $(AM_V_CCLD)$(LINK) $(keymap_OBJECTS) $(keymap_LDADD) $(LIBS) -+install-dist_libexecSCRIPTS: $(dist_libexec_SCRIPTS) -+ @$(NORMAL_INSTALL) -+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" -+ @list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \ -+ for p in $$list; do \ -+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ -+ done | \ -+ sed -e 'p;s,.*/,,;n' \ -+ -e 'h;s|.*|.|' \ -+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ -+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ -+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ -+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ -+ if (++n[d] == $(am__install_max)) { \ -+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ -+ else { print "f", d "/" $$4, $$1 } } \ -+ END { for (d in files) print "f", d, files[d] }' | \ -+ while read type dir files; do \ -+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ -+ test -z "$$files" || { \ -+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ -+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ -+ } \ -+ ; done -+ -+uninstall-dist_libexecSCRIPTS: -+ @$(NORMAL_UNINSTALL) -+ @list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \ -+ files=`for p in $$list; do echo "$$p"; done | \ -+ sed -e 's,.*/,,;$(transform)'`; \ -+ test -n "$$list" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files -+ -+mostlyclean-compile: -+ -rm -f *.$(OBJEXT) -+ -+distclean-compile: -+ -rm -f *.tab.c -+ -+#include ./$(DEPDIR)/keymap-keymap.Po -+ -+.c.o: -+# $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -+# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+ $(AM_V_CC) \ -+# source='$<' object='$@' libtool=no -+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) -+ $(COMPILE) -c $< -+ -+.c.obj: -+# $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -+# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+ $(AM_V_CC) \ -+# source='$<' object='$@' libtool=no -+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) -+ $(COMPILE) -c `$(CYGPATH_W) '$<'` -+ -+.c.lo: -+# $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -+# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -+ $(AM_V_CC) \ -+# source='$<' object='$@' libtool=yes -+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) -+ $(LTCOMPILE) -c -o $@ $< -+ -+keymap-keymap.o: keymap.c -+# $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT keymap-keymap.o -MD -MP -MF $(DEPDIR)/keymap-keymap.Tpo -c -o keymap-keymap.o `test -f 'keymap.c' || echo '$(srcdir)/'`keymap.c -+# $(AM_V_at)$(am__mv) $(DEPDIR)/keymap-keymap.Tpo $(DEPDIR)/keymap-keymap.Po -+ $(AM_V_CC) \ -+# source='keymap.c' object='keymap-keymap.o' libtool=no -+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o keymap-keymap.o `test -f 'keymap.c' || echo '$(srcdir)/'`keymap.c -+ -+keymap-keymap.obj: keymap.c -+# $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT keymap-keymap.obj -MD -MP -MF $(DEPDIR)/keymap-keymap.Tpo -c -o keymap-keymap.obj `if test -f 'keymap.c'; then $(CYGPATH_W) 'keymap.c'; else $(CYGPATH_W) '$(srcdir)/keymap.c'; fi` -+# $(AM_V_at)$(am__mv) $(DEPDIR)/keymap-keymap.Tpo $(DEPDIR)/keymap-keymap.Po -+ $(AM_V_CC) \ -+# source='keymap.c' object='keymap-keymap.obj' libtool=no -+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keymap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o keymap-keymap.obj `if test -f 'keymap.c'; then $(CYGPATH_W) 'keymap.c'; else $(CYGPATH_W) '$(srcdir)/keymap.c'; fi` -+ -+mostlyclean-libtool: -+ -rm -f *.lo -+ -+clean-libtool: -+ -rm -rf .libs _libs -+install-dist_docDATA: $(dist_doc_DATA) -+ @$(NORMAL_INSTALL) -+ test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" -+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ -+ for p in $$list; do \ -+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ -+ done -+ -+uninstall-dist_docDATA: -+ @$(NORMAL_UNINSTALL) -+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(docdir)" && rm -f $$files -+install-dist_udevrulesDATA: $(dist_udevrules_DATA) -+ @$(NORMAL_INSTALL) -+ test -z "$(udevrulesdir)" || $(MKDIR_P) "$(DESTDIR)$(udevrulesdir)" -+ @list='$(dist_udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ -+ for p in $$list; do \ -+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevrulesdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(udevrulesdir)" || exit $$?; \ -+ done -+ -+uninstall-dist_udevrulesDATA: -+ @$(NORMAL_UNINSTALL) -+ @list='$(dist_udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(udevrulesdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(udevrulesdir)" && rm -f $$files -+install-udevkeymapDATA: $(udevkeymap_DATA) -+ @$(NORMAL_INSTALL) -+ test -z "$(udevkeymapdir)" || $(MKDIR_P) "$(DESTDIR)$(udevkeymapdir)" -+ @list='$(udevkeymap_DATA)'; test -n "$(udevkeymapdir)" || list=; \ -+ for p in $$list; do \ -+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevkeymapdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(udevkeymapdir)" || exit $$?; \ -+ done -+ -+uninstall-udevkeymapDATA: -+ @$(NORMAL_UNINSTALL) -+ @list='$(udevkeymap_DATA)'; test -n "$(udevkeymapdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(udevkeymapdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(udevkeymapdir)" && rm -f $$files -+ -+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ -+ END { if (nonempty) { for (i in files) print i; }; }'`; \ -+ mkid -fID $$unique -+tags: TAGS -+ -+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -+ $(TAGS_FILES) $(LISP) -+ set x; \ -+ here=`pwd`; \ -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ -+ END { if (nonempty) { for (i in files) print i; }; }'`; \ -+ shift; \ -+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ -+ test -n "$$unique" || unique=$$empty_fix; \ -+ if test $$# -gt 0; then \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ "$$@" $$unique; \ -+ else \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$unique; \ -+ fi; \ -+ fi -+ctags: CTAGS -+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -+ $(TAGS_FILES) $(LISP) -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ -+ END { if (nonempty) { for (i in files) print i; }; }'`; \ -+ test -z "$(CTAGS_ARGS)$$unique" \ -+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ -+ $$unique -+ -+GTAGS: -+ here=`$(am__cd) $(top_builddir) && pwd` \ -+ && $(am__cd) $(top_srcdir) \ -+ && gtags -i $(GTAGS_ARGS) "$$here" -+ -+distclean-tags: -+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -+ -+check-TESTS: $(TESTS) -+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \ -+ srcdir=$(srcdir); export srcdir; \ -+ list=' $(TESTS) '; \ -+ $(am__tty_colors); \ -+ if test -n "$$list"; then \ -+ for tst in $$list; do \ -+ if test -f ./$$tst; then dir=./; \ -+ elif test -f $$tst; then dir=; \ -+ else dir="$(srcdir)/"; fi; \ -+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ -+ all=`expr $$all + 1`; \ -+ case " $(XFAIL_TESTS) " in \ -+ *[\ \ ]$$tst[\ \ ]*) \ -+ xpass=`expr $$xpass + 1`; \ -+ failed=`expr $$failed + 1`; \ -+ col=$$red; res=XPASS; \ -+ ;; \ -+ *) \ -+ col=$$grn; res=PASS; \ -+ ;; \ -+ esac; \ -+ elif test $$? -ne 77; then \ -+ all=`expr $$all + 1`; \ -+ case " $(XFAIL_TESTS) " in \ -+ *[\ \ ]$$tst[\ \ ]*) \ -+ xfail=`expr $$xfail + 1`; \ -+ col=$$lgn; res=XFAIL; \ -+ ;; \ -+ *) \ -+ failed=`expr $$failed + 1`; \ -+ col=$$red; res=FAIL; \ -+ ;; \ -+ esac; \ -+ else \ -+ skip=`expr $$skip + 1`; \ -+ col=$$blu; res=SKIP; \ -+ fi; \ -+ echo "$${col}$$res$${std}: $$tst"; \ -+ done; \ -+ if test "$$all" -eq 1; then \ -+ tests="test"; \ -+ All=""; \ -+ else \ -+ tests="tests"; \ -+ All="All "; \ -+ fi; \ -+ if test "$$failed" -eq 0; then \ -+ if test "$$xfail" -eq 0; then \ -+ banner="$$All$$all $$tests passed"; \ -+ else \ -+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ -+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ -+ fi; \ -+ else \ -+ if test "$$xpass" -eq 0; then \ -+ banner="$$failed of $$all $$tests failed"; \ -+ else \ -+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ -+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ -+ fi; \ -+ fi; \ -+ dashes="$$banner"; \ -+ skipped=""; \ -+ if test "$$skip" -ne 0; then \ -+ if test "$$skip" -eq 1; then \ -+ skipped="($$skip test was not run)"; \ -+ else \ -+ skipped="($$skip tests were not run)"; \ -+ fi; \ -+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ -+ dashes="$$skipped"; \ -+ fi; \ -+ report=""; \ -+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ -+ report="Please report to $(PACKAGE_BUGREPORT)"; \ -+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ -+ dashes="$$report"; \ -+ fi; \ -+ dashes=`echo "$$dashes" | sed s/./=/g`; \ -+ if test "$$failed" -eq 0; then \ -+ echo "$$grn$$dashes"; \ -+ else \ -+ echo "$$red$$dashes"; \ -+ fi; \ -+ echo "$$banner"; \ -+ test -z "$$skipped" || echo "$$skipped"; \ -+ test -z "$$report" || echo "$$report"; \ -+ echo "$$dashes$$std"; \ -+ test "$$failed" -eq 0; \ -+ else :; fi -+ -+distdir: $(DISTFILES) -+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ -+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ -+ list='$(DISTFILES)'; \ -+ dist_files=`for file in $$list; do echo $$file; done | \ -+ sed -e "s|^$$srcdirstrip/||;t" \ -+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ -+ case $$dist_files in \ -+ */*) $(MKDIR_P) `echo "$$dist_files" | \ -+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ -+ sort -u` ;; \ -+ esac; \ -+ for file in $$dist_files; do \ -+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ -+ if test -d $$d/$$file; then \ -+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d "$(distdir)/$$file"; then \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ -+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ -+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ -+ else \ -+ test -f "$(distdir)/$$file" \ -+ || cp -p $$d/$$file "$(distdir)/$$file" \ -+ || exit 1; \ -+ fi; \ -+ done -+check-am: all-am -+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS -+check: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) check-am -+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) -+installdirs: -+ for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(udevkeymapdir)"; do \ -+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ -+ done -+install: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) install-am -+install-exec: install-exec-am -+install-data: install-data-am -+uninstall: uninstall-am -+ -+install-am: all-am -+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -+ -+installcheck: installcheck-am -+install-strip: -+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -+ `test -z '$(STRIP)' || \ -+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -+mostlyclean-generic: -+ -+clean-generic: -+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) -+ -+distclean-generic: -+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -+ -+maintainer-clean-generic: -+ @echo "This command is intended for maintainers to use" -+ @echo "it deletes files that may require special tools to rebuild." -+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -+clean: clean-am -+ -+clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ -+ mostlyclean-am -+ -+distclean: distclean-am -+ -rm -rf ./$(DEPDIR) -+ -rm -f Makefile -+distclean-am: clean-am distclean-compile distclean-generic \ -+ distclean-tags -+ -+dvi: dvi-am -+ -+dvi-am: -+ -+html: html-am -+ -+html-am: -+ -+info: info-am -+ -+info-am: -+ -+install-data-am: install-dist_docDATA install-dist_udevrulesDATA \ -+ install-udevkeymapDATA -+ -+install-dvi: install-dvi-am -+ -+install-dvi-am: -+ -+install-exec-am: install-dist_libexecSCRIPTS install-libexecPROGRAMS -+ -+install-html: install-html-am -+ -+install-html-am: -+ -+install-info: install-info-am -+ -+install-info-am: -+ -+install-man: -+ -+install-pdf: install-pdf-am -+ -+install-pdf-am: -+ -+install-ps: install-ps-am -+ -+install-ps-am: -+ -+installcheck-am: -+ -+maintainer-clean: maintainer-clean-am -+ -rm -rf ./$(DEPDIR) -+ -rm -f Makefile -+maintainer-clean-am: distclean-am maintainer-clean-generic -+ -+mostlyclean: mostlyclean-am -+ -+mostlyclean-am: mostlyclean-compile mostlyclean-generic \ -+ mostlyclean-libtool -+ -+pdf: pdf-am -+ -+pdf-am: -+ -+ps: ps-am -+ -+ps-am: -+ -+uninstall-am: uninstall-dist_docDATA uninstall-dist_libexecSCRIPTS \ -+ uninstall-dist_udevrulesDATA uninstall-libexecPROGRAMS \ -+ uninstall-udevkeymapDATA -+ -+.MAKE: all check check-am install install-am install-strip -+ -+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ -+ clean-generic clean-libexecPROGRAMS clean-libtool ctags \ -+ distclean distclean-compile distclean-generic \ -+ distclean-libtool distclean-tags distdir dvi dvi-am html \ -+ html-am info info-am install install-am install-data \ -+ install-data-am install-dist_docDATA \ -+ install-dist_libexecSCRIPTS install-dist_udevrulesDATA \ -+ install-dvi install-dvi-am install-exec install-exec-am \ -+ install-html install-html-am install-info install-info-am \ -+ install-libexecPROGRAMS install-man install-pdf install-pdf-am \ -+ install-ps install-ps-am install-strip install-udevkeymapDATA \ -+ installcheck installcheck-am installdirs maintainer-clean \ -+ maintainer-clean-generic mostlyclean mostlyclean-compile \ -+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ -+ tags uninstall uninstall-am uninstall-dist_docDATA \ -+ uninstall-dist_libexecSCRIPTS uninstall-dist_udevrulesDATA \ -+ uninstall-libexecPROGRAMS uninstall-udevkeymapDATA -+ -+ -+keys.txt: /usr/include/linux/input.h -+ $(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@ -+ -+keys-from-name.gperf: keys.txt -+ $(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@ -+ -+keys-from-name.h: keys-from-name.gperf Makefile -+ $(GPERF) -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@ -+ -+keys-to-name.h: keys.txt Makefile -+ $(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@ -+ -+# Tell versions [3.59,3.63) of GNU make to not export all variables. -+# Otherwise a system limit (for SysV at least) may be exceeded. -+.NOEXPORT: diff -urN udev-145-orig/extras/keymap/README.keymap.txt udev-145/extras/keymap/README.keymap.txt --- udev-145-orig/extras/keymap/README.keymap.txt 2009-06-19 19:21:26.000000000 +0200 +++ udev-145/extras/keymap/README.keymap.txt 2010-06-11 10:52:56.000000000 +0200 From d8bca2a5df480f6b3e69d57ef3a60029c300504d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 21 Sep 2010 20:18:19 -0400 Subject: [PATCH 577/640] Rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 6fc041f..01b6f16 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 161 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -394,6 +394,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Sep 21 2010 Matthias Clasen 161-3 +- Rebuild against newer gobject-introspection + * Wed Sep 01 2010 Harald Hoyer 161-2 - bugfixes for systemd service files - bugfix for selinux labeling From 94c7d90643db70fb052ceb4c80b866e6099d86eb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 29 Sep 2010 15:24:41 -0700 Subject: [PATCH 578/640] - Rebuilt for gcc bug 634757 --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 01b6f16..d727903 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 161 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -394,6 +394,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Sep 29 2010 jkeating - 161-4 +- Rebuilt for gcc bug 634757 + * Tue Sep 21 2010 Matthias Clasen 161-3 - Rebuild against newer gobject-introspection From 8fcb6e53edbe03b884264d643e56562732df50e2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 29 Oct 2010 10:55:52 +0200 Subject: [PATCH 579/640] - version 164 - skip start_udev with systemd --- .gitignore | 2 ++ sources | 4 ++-- start_udev | 4 ++++ udev.spec | 59 ++++++++++-------------------------------------------- 4 files changed, 19 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index 22be2f6..65d08f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ udev-160.tar.bz2 +/udev-164.tar.bz2 +/udev-164.tar.bz2.sign diff --git a/sources b/sources index f53200e..8dc2880 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -2f42aff9f8c7258fecde71df321032b7 udev-161.tar.bz2.sign -95b6a0ffc9913f3e8021c65f51eb4f88 udev-161.tar.bz2 +cd285a85f969518a671834de2f4d6614 udev-164.tar.bz2 +43b3842a00854e712b1d58af3a03e4ed udev-164.tar.bz2.sign diff --git a/start_udev b/start_udev index 49fc286..ebb9cb6 100755 --- a/start_udev +++ b/start_udev @@ -22,6 +22,10 @@ # # don't use udev if sysfs is not mounted. +# if we run with systemctl, just wait for settle +if [ -x "$(type -P systemctl)" ]; then + systemctl start udev-settle.service &>/dev/null && exit 0 +fi export TZ=/etc/localtime diff --git a/udev.spec b/udev.spec index d727903..d38aa03 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 161 -Release: 4%{?dist} +Version: 164 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -17,29 +17,6 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev-post.init -Patch1: 0001-cdrom_id-Add-media-status-debugging.patch -Patch2: 0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch -Patch3: 0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch -Patch4: 0004-init-update-systemd-service-files.patch -Patch5: 0005-init-update-systemd-service-files.patch -Patch6: 0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch -Patch7: 0007-init-add-udev-to-description-in-systemd-service-file.patch -Patch8: 0008-udevd-add-pid-to-kmsg-logs.patch -Patch9: 0009-init-edit-systemd-service-descriptions.patch -Patch11: 0011-udev-7-Point-out-required-extension-and-remove-some-.patch -Patch12: 0012-keymap-Add-Onkyo-PC.patch -Patch13: 0013-keymap-Add-HP-G60.patch -Patch14: 0014-udevd-remove-unneeded-credential-passing-from-init_n.patch -Patch15: 0015-Add-support-for-oom_score_adj.patch -Patch16: 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch -Patch17: 0017-udev-7-manpage-Fix-description-of-attr.patch -Patch18: 0018-gudev-fix-crash-if-netlink-is-not-available.patch -Patch19: 0019-keymap-Fix-Acer-TravelMate-4720.patch -Patch20: 0020-cdrom_id-Fix-DVD-RW-media-detection.patch -Patch21: 0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch -Patch22: 0022-set-SELinux-context-on-add-but-not-on-change-events.patch -Patch23: 0023-do-not-create-persistent-name-rules-for-KVM-network-.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -136,28 +113,6 @@ glib-based applications using libudev functionality. %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 -%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 -%patch23 -p1 -b .git23 %build libtoolize -f -c @@ -354,6 +309,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service +%{systemdsystemunitdir}/basic.target.wants/udev-retry.service +%{systemdsystemunitdir}/basic.target.wants/udev-settle.service +%{systemdsystemunitdir}/basic.target.wants/udev.service + # Deprecated, but keep the ownership %ghost %dir /var/lib/udev @@ -378,7 +337,7 @@ rm -rf $RPM_BUILD_ROOT %files -n libgudev1 %defattr(0644, root, root, 0755) %doc extras/gudev/COPYING -%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* +%attr(0755,root,root) /%{_lib}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel @@ -394,6 +353,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Oct 29 2010 Harald Hoyer 164-1 +- version 164 +- skip start_udev with systemd + * Wed Sep 29 2010 jkeating - 161-4 - Rebuilt for gcc bug 634757 From 3ce9b8531482cea88827ccfa89ac371af06abdfc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 29 Oct 2010 10:56:18 +0200 Subject: [PATCH 580/640] - version 164 - skip start_udev with systemd --- ...-cdrom_id-Add-media-status-debugging.patch | 26 -------- ...-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch | 56 ----------------- ...rop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch | 34 ---------- 0004-init-update-systemd-service-files.patch | 42 ------------- 0005-init-update-systemd-service-files.patch | 38 ----------- ...mistake-all-SCSI-processor-devices-f.patch | 33 ---------- ...-description-in-systemd-service-file.patch | 47 -------------- 0008-udevd-add-pid-to-kmsg-logs.patch | 41 ------------ ...it-edit-systemd-service-descriptions.patch | 47 -------------- ...-required-extension-and-remove-some-.patch | 42 ------------- 0012-keymap-Add-Onkyo-PC.patch | 63 ------------------- 0013-keymap-Add-HP-G60.patch | 26 -------- ...eeded-credential-passing-from-init_n.patch | 58 ----------------- 0015-Add-support-for-oom_score_adj.patch | 48 -------------- 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch | 28 --------- ...ev-7-manpage-Fix-description-of-attr.patch | 32 ---------- ...ix-crash-if-netlink-is-not-available.patch | 57 ----------------- 0019-keymap-Fix-Acer-TravelMate-4720.patch | 28 --------- ...-cdrom_id-Fix-DVD-RW-media-detection.patch | 53 ---------------- ...-blank-detection-for-sloppy-firmware.patch | 42 ------------- ...text-on-add-but-not-on-change-events.patch | 35 ----------- ...rsistent-name-rules-for-KVM-network-.patch | 28 --------- 22 files changed, 904 deletions(-) delete mode 100644 0001-cdrom_id-Add-media-status-debugging.patch delete mode 100644 0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch delete mode 100644 0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch delete mode 100644 0004-init-update-systemd-service-files.patch delete mode 100644 0005-init-update-systemd-service-files.patch delete mode 100644 0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch delete mode 100644 0007-init-add-udev-to-description-in-systemd-service-file.patch delete mode 100644 0008-udevd-add-pid-to-kmsg-logs.patch delete mode 100644 0009-init-edit-systemd-service-descriptions.patch delete mode 100644 0011-udev-7-Point-out-required-extension-and-remove-some-.patch delete mode 100644 0012-keymap-Add-Onkyo-PC.patch delete mode 100644 0013-keymap-Add-HP-G60.patch delete mode 100644 0014-udevd-remove-unneeded-credential-passing-from-init_n.patch delete mode 100644 0015-Add-support-for-oom_score_adj.patch delete mode 100644 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch delete mode 100644 0017-udev-7-manpage-Fix-description-of-attr.patch delete mode 100644 0018-gudev-fix-crash-if-netlink-is-not-available.patch delete mode 100644 0019-keymap-Fix-Acer-TravelMate-4720.patch delete mode 100644 0020-cdrom_id-Fix-DVD-RW-media-detection.patch delete mode 100644 0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch delete mode 100644 0022-set-SELinux-context-on-add-but-not-on-change-events.patch delete mode 100644 0023-do-not-create-persistent-name-rules-for-KVM-network-.patch diff --git a/0001-cdrom_id-Add-media-status-debugging.patch b/0001-cdrom_id-Add-media-status-debugging.patch deleted file mode 100644 index f282114..0000000 --- a/0001-cdrom_id-Add-media-status-debugging.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 24af530a543c70ac59fdd244377d648ef77a0e21 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Thu, 12 Aug 2010 07:10:12 +0200 -Subject: [PATCH 01/23] cdrom_id: Add media status debugging - -Show which media status the hardware originally reports, since we mangle it in -some cases. ---- - extras/cdrom_id/cdrom_id.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 83e95d5..d59991c 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -573,6 +573,7 @@ static int cd_media_info(struct udev *udev, int fd) - - cd_media = 1; - info(udev, "disk type %02x\n", header[8]); -+ info(udev, "hardware reported media status: %s\n", media_status[header[2] & 3]); - - /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */ - if (!cd_media_cd_rom) --- -1.7.2.2 - diff --git a/0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch b/0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch deleted file mode 100644 index 486c148..0000000 --- a/0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9cd075e35b8f660c75b0d72d4bea496fd6459f29 Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Thu, 12 Aug 2010 17:04:55 +0100 -Subject: [PATCH 02/23] Add keymap for Lenovo IdeaPad S10-3 - -Tested on S10-3, but presumably applicable to all IdeaPads. - -Signed-off-by: Martin Pitt ---- - Makefile.am | 1 + - extras/keymap/95-keymap.rules | 2 ++ - extras/keymap/keymaps/lenovo-ideapad | 7 +++++++ - 3 files changed, 10 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/keymaps/lenovo-ideapad - -diff --git a/Makefile.am b/Makefile.am -index c16b259..77df6ab 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -537,6 +537,7 @@ dist_udevkeymap_DATA = \ - extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint \ - extras/keymap/keymaps/inventec-symphony_6.0_7.0 \ - extras/keymap/keymaps/lenovo-3000 \ -+ extras/keymap/keymaps/lenovo-ideapad \ - extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \ - extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \ - extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \ -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 13b5571..2241422 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -65,6 +65,8 @@ ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+=" - ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000" - ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X6*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x6_tablet" - ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X200 Tablet*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x200_tablet" -+ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*IdeaPad*", RUN+="keymap $name lenovo-ideapad" -+ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_name}=="S10-*", RUN+="keymap $name lenovo-ideapad" - - ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard" - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet" -diff --git a/extras/keymap/keymaps/lenovo-ideapad b/extras/keymap/keymaps/lenovo-ideapad -new file mode 100644 -index 0000000..d5f2567 ---- /dev/null -+++ b/extras/keymap/keymaps/lenovo-ideapad -@@ -0,0 +1,7 @@ -+# Key codes observed on S10-3, assumed valid on other IdeaPad models -+0x81 rfkill # does nothing in BIOS -+0x83 display_off # BIOS toggles screen state -+0xB9 brightnessup # does nothing in BIOS -+0xBA brightnessdown # does nothing in BIOS -+0xF1 camera # BIOS toggles camera power -+0xf2 unknown # trackpad enable/disable (does nothing in BIOS) --- -1.7.2.2 - diff --git a/0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch b/0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch deleted file mode 100644 index d476ee5..0000000 --- a/0003-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b367a1c9d8a0f565effcdb45f86a365be1c8b622 Mon Sep 17 00:00:00 2001 -From: Jan Drzewiecki -Date: Fri, 13 Aug 2010 07:24:29 +0200 -Subject: [PATCH 03/23] cdrom_id: Drop MEDIA_SESSION_NEXT for DVD-RW-RO - -Commit cf2205a fixed the media status for fresh DVD-RW in restricted overwrite -mode, but missed a detail: We should not report the ID_CDROM_MEDIA_SESSION_NEXT -property either, since in that mode you can never append tracks/sessions; this -just works in sequential mode. - -Signed-off-by: Martin Pitt ---- - extras/cdrom_id/cdrom_id.c | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index d59991c..f9d6e0b 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -690,8 +690,9 @@ static int cd_media_info(struct udev *udev, int fd) - } - - determined: -- /* "other" is e. g. DVD-RAM, can't append sessions there either */ -- if ((header[2] & 3) < 2) -+ /* "other" is e. g. DVD-RAM, can't append sessions there; DVDs in -+ * restricted overwrite mode can never append, only in sequential mode */ -+ if ((header[2] & 3) < 2 && !cd_media_dvd_rw_ro) - cd_media_session_next = header[10] << 8 | header[5]; - cd_media_session_count = header[9] << 8 | header[4]; - cd_media_track_count = header[11] << 8 | header[6]; --- -1.7.2.2 - diff --git a/0004-init-update-systemd-service-files.patch b/0004-init-update-systemd-service-files.patch deleted file mode 100644 index a68e467..0000000 --- a/0004-init-update-systemd-service-files.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 68bc0d7963a22967cc00244c4fad96fb45870712 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 17 Aug 2010 09:37:57 +0200 -Subject: [PATCH 04/23] init: update systemd service files - ---- - init/udev-retry.service.in | 4 ++-- - init/udev-settle.service.in | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in -index 7667899..d8ed8a8 100644 ---- a/init/udev-retry.service.in -+++ b/init/udev-retry.service.in -@@ -4,9 +4,9 @@ DefaultDependencies=no - After=local-fs.target udev.service - - [Service] --Type=finish -+Type=oneshot - ValidNoProcess=yes --ExecStart=@sbindir@/udevadm trigger --type=failed -+ExecStart=@sbindir@/udevadm trigger --type=failed --action=add - - [Install] - WantedBy=sysinit.target -diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in -index 0594d72..4db61f2 100644 ---- a/init/udev-settle.service.in -+++ b/init/udev-settle.service.in -@@ -4,7 +4,7 @@ DefaultDependencies=no - After=udev.service - - [Service] --Type=finish -+Type=oneshot - ValidNoProcess=yes - ExecStart=@sbindir@/udevadm settle - --- -1.7.2.2 - diff --git a/0005-init-update-systemd-service-files.patch b/0005-init-update-systemd-service-files.patch deleted file mode 100644 index e7865d7..0000000 --- a/0005-init-update-systemd-service-files.patch +++ /dev/null @@ -1,38 +0,0 @@ -From bd078c90b97c73ba5fe7475947e6ecd20e2eb048 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 17 Aug 2010 18:53:57 +0200 -Subject: [PATCH 05/23] init: update systemd service files - ---- - init/udev-retry.service.in | 1 - - init/udev-settle.service.in | 2 +- - 2 files changed, 1 insertions(+), 2 deletions(-) - -diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in -index d8ed8a8..7a0819c 100644 ---- a/init/udev-retry.service.in -+++ b/init/udev-retry.service.in -@@ -5,7 +5,6 @@ After=local-fs.target udev.service - - [Service] - Type=oneshot --ValidNoProcess=yes - ExecStart=@sbindir@/udevadm trigger --type=failed --action=add - - [Install] -diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in -index 4db61f2..4cb33aa 100644 ---- a/init/udev-settle.service.in -+++ b/init/udev-settle.service.in -@@ -5,7 +5,7 @@ After=udev.service - - [Service] - Type=oneshot --ValidNoProcess=yes -+RemainAfterExit=yes - ExecStart=@sbindir@/udevadm settle - - [Install] --- -1.7.2.2 - diff --git a/0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch b/0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch deleted file mode 100644 index 0864ad4..0000000 --- a/0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3bd7b89dc40c4a0440ee5fce2ea907971bfcfb10 Mon Sep 17 00:00:00 2001 -From: Marco d'Itri -Date: Wed, 18 Aug 2010 13:35:25 +0200 -Subject: [PATCH 06/23] udev-acl: do not mistake all SCSI "processor" devices for scanner - -Both rules can be removed since now libsane sets libsane_matched also -for SCSI scanners. - -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589751 ---- - extras/udev-acl/70-acl.rules | 6 +----- - 1 files changed, 1 insertions(+), 5 deletions(-) - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index 6ec04ee..c7134bc 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -13,11 +13,7 @@ SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl" - # digicams with proprietary protocol - ENV{ID_GPHOTO2}=="*?", TAG+="udev-acl" - --# SCSI scanners --KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG+="udev-acl" --KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG+="udev-acl" -- --# USB scanners -+# SCSI and USB scanners - ENV{libsane_matched}=="yes", TAG+="udev-acl" - - # HPLIP devices (necessary for ink level check and HP tool maintenance) --- -1.7.2.2 - diff --git a/0007-init-add-udev-to-description-in-systemd-service-file.patch b/0007-init-add-udev-to-description-in-systemd-service-file.patch deleted file mode 100644 index bb13a7b..0000000 --- a/0007-init-add-udev-to-description-in-systemd-service-file.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d15b727ef1375c665057c0fa278b2ea3778b8d3d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 19 Aug 2010 08:48:44 +0200 -Subject: [PATCH 07/23] init: add 'udev -' to description in systemd service files - ---- - init/udev-retry.service.in | 2 +- - init/udev-settle.service.in | 2 +- - init/udev.service.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in -index 7a0819c..a6612da 100644 ---- a/init/udev-retry.service.in -+++ b/init/udev-retry.service.in -@@ -1,5 +1,5 @@ - [Unit] --Description=re-trigger failed events after filesystems are available -+Description=udev - re-trigger failed events after filesystems are available - DefaultDependencies=no - After=local-fs.target udev.service - -diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in -index 4cb33aa..578a24f 100644 ---- a/init/udev-settle.service.in -+++ b/init/udev-settle.service.in -@@ -1,5 +1,5 @@ - [Unit] --Description=wait until full initialization -+Description=udev - wait until full initialization - DefaultDependencies=no - After=udev.service - -diff --git a/init/udev.service.in b/init/udev.service.in -index e95cb47..5a63b77 100644 ---- a/init/udev.service.in -+++ b/init/udev.service.in -@@ -1,5 +1,5 @@ - [Unit] --Description=/dev and kernel device manager -+Description=udev - /dev and kernel device manager - DefaultDependencies=no - Before=sysinit.target - --- -1.7.2.2 - diff --git a/0008-udevd-add-pid-to-kmsg-logs.patch b/0008-udevd-add-pid-to-kmsg-logs.patch deleted file mode 100644 index 5b7a8df..0000000 --- a/0008-udevd-add-pid-to-kmsg-logs.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c25bfbfb1b20781698ff3c8cbc884a9e190052ee Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 19 Aug 2010 08:49:43 +0200 -Subject: [PATCH 08/23] udevd: add pid to kmsg logs - ---- - udev/udev-event.c | 4 ++-- - udev/udevd.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/udev/udev-event.c b/udev/udev-event.c -index 9b5326b..ae523f8 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -454,8 +454,8 @@ static void rename_netif_kernel_log(struct ifreq ifr) - return; - } - -- fprintf(f, "<6>udev: renamed network interface %s to %s\n", -- ifr.ifr_name, ifr.ifr_newname); -+ fprintf(f, "<6>udev[%u]: renamed network interface %s to %s\n", -+ getpid(), ifr.ifr_name, ifr.ifr_newname); - fclose(f); - } - -diff --git a/udev/udevd.c b/udev/udevd.c -index 61b76f5..ad2ca3b 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -1298,7 +1298,7 @@ int main(int argc, char *argv[]) - - f = fopen("/dev/kmsg", "w"); - if (f != NULL) { -- fprintf(f, "<6>udev: starting version " VERSION "\n"); -+ fprintf(f, "<6>udev[%u]: starting version " VERSION "\n", getpid()); - fclose(f); - } - --- -1.7.2.2 - diff --git a/0009-init-edit-systemd-service-descriptions.patch b/0009-init-edit-systemd-service-descriptions.patch deleted file mode 100644 index 45b8119..0000000 --- a/0009-init-edit-systemd-service-descriptions.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 4c9b12a7aa57e43e568b78da9cbed4138b1292df Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 19 Aug 2010 18:02:20 +0200 -Subject: [PATCH 09/23] init: edit systemd service descriptions - ---- - init/udev-retry.service.in | 2 +- - init/udev-settle.service.in | 2 +- - init/udev.service.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in -index a6612da..ab8241b 100644 ---- a/init/udev-retry.service.in -+++ b/init/udev-retry.service.in -@@ -1,5 +1,5 @@ - [Unit] --Description=udev - re-trigger failed events after filesystems are available -+Description=udev Retry Failed Events - DefaultDependencies=no - After=local-fs.target udev.service - -diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in -index 578a24f..d58ea9c 100644 ---- a/init/udev-settle.service.in -+++ b/init/udev-settle.service.in -@@ -1,5 +1,5 @@ - [Unit] --Description=udev - wait until full initialization -+Description=udev Wait for Complete Device Initialization - DefaultDependencies=no - After=udev.service - -diff --git a/init/udev.service.in b/init/udev.service.in -index 5a63b77..b07f4db 100644 ---- a/init/udev.service.in -+++ b/init/udev.service.in -@@ -1,5 +1,5 @@ - [Unit] --Description=udev - /dev and kernel device manager -+Description=udev Kernel Device Manager - DefaultDependencies=no - Before=sysinit.target - --- -1.7.2.2 - diff --git a/0011-udev-7-Point-out-required-extension-and-remove-some-.patch b/0011-udev-7-Point-out-required-extension-and-remove-some-.patch deleted file mode 100644 index bd75f26..0000000 --- a/0011-udev-7-Point-out-required-extension-and-remove-some-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 6593e8961afbe0b74d5a67c545a991c7733e88df Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 20 Aug 2010 12:19:23 +0200 -Subject: [PATCH 11/23] udev(7): Point out required extension, and remove some confusion - -Rules files must end in .rules. - -Also drop the redundant and confusing sentence about "file names must be -unique". What is really meant is explained in a better way in the paragraph -above. - -https://launchpad.net/bugs/616108 ---- - udev/udev.xml | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/udev/udev.xml b/udev/udev.xml -index 20c394c..336b203 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -75,12 +75,13 @@ - the custom rules directory /etc/udev/rules.d/ - and the temporary rules directory /dev/.udev/rules.d/. - All rule files are sorted and processed in lexical order, regardless -- in which of these directories they live. -+ in which of these directories they live. Files in -+ /etc/udev/rules.d/ have precedence over files with -+ the same name in /lib/udev/rules.d/. This can be -+ used to ignore a default rules file if needed. - -- Rule files are required to have a unique name, duplicate file names -- are ignored. Files in /etc/udev/rules.d/ have precedence -- over files with the same name in /lib/udev/rules.d/. This -- can be used to ignore a default rules file if needed. -+ Rule files must end in .rules, other extensions -+ are ignored. - - Every line in the rules file contains at least one key value pair. - There are two kind of keys, match and assignment keys. --- -1.7.2.2 - diff --git a/0012-keymap-Add-Onkyo-PC.patch b/0012-keymap-Add-Onkyo-PC.patch deleted file mode 100644 index e7b283b..0000000 --- a/0012-keymap-Add-Onkyo-PC.patch +++ /dev/null @@ -1,63 +0,0 @@ -From acf865b68e1a5c78677537b373b6e082c287fc27 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Sun, 22 Aug 2010 11:00:34 +0200 -Subject: [PATCH 12/23] keymap: Add Onkyo PC - -Thanks to Pau Oliva! - -https://launchpad.net/bugs/612529 ---- - Makefile.am | 1 + - extras/keymap/95-keymap.rules | 2 ++ - extras/keymap/keymaps/onkyo | 14 ++++++++++++++ - 3 files changed, 17 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/keymaps/onkyo - -diff --git a/Makefile.am b/Makefile.am -index 77df6ab..512de34 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -555,6 +555,7 @@ dist_udevkeymap_DATA = \ - extras/keymap/keymaps/module-sony \ - extras/keymap/keymaps/module-sony-old \ - extras/keymap/keymaps/olpc-xo \ -+ extras/keymap/keymaps/onkyo \ - extras/keymap/keymaps/oqo-model2 \ - extras/keymap/keymaps/samsung-other \ - extras/keymap/keymaps/samsung-sq1us \ -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 2241422..e9d5721 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -127,6 +127,8 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+=" - - ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2" - -+ENV{DMI_VENDOR}=="ONKYO CORPORATION", ATTR{[dmi/id]product_name}=="ONKYOPC", RUN+="keymap $name onkyo" -+ - ENV{DMI_VENDOR}=="ASUS", RUN+="keymap $name asus" - - ENV{DMI_VENDOR}=="VIA", ATTR{[dmi/id]product_name}=="K8N800", ATTR{[dmi/id]product_version}=="VT8204B", RUN+="keymap $name 0x81 prog1" -diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo -new file mode 100644 -index 0000000..7dd80a1 ---- /dev/null -+++ b/extras/keymap/keymaps/onkyo -@@ -0,0 +1,14 @@ -+0xA0 mute # Fn+D -+0xAE volumedown # Fn+F -+0xB0 volumeup # Fn+G -+0xDF sleep # Fn+W -+0xE0 bluetooth # Fn+H -+0xE2 cyclewindows # Fn+Esc -+0xEE battery # Fn+Q -+0xF0 media # Fn+R -+0xF5 switchvideomode # Fn+E -+0xF6 camera # Fn+T -+0xF7 f22 # Fn+Y (touchpad toggle) -+0xF8 brightnessup # Fn+S -+0xF9 brightnessdown # Fn+A -+0xFB wlan # Fn+J --- -1.7.2.2 - diff --git a/0013-keymap-Add-HP-G60.patch b/0013-keymap-Add-HP-G60.patch deleted file mode 100644 index cbeb33c..0000000 --- a/0013-keymap-Add-HP-G60.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 92cffb0bd18bd8fd245666a519ad0e54dc537031 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 23 Aug 2010 10:47:28 +0200 -Subject: [PATCH 13/23] keymap: Add HP G60 - -https://launchpad.net/bugs/554944 ---- - extras/keymap/95-keymap.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index e9d5721..5656de9 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -72,7 +72,7 @@ ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard" - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet" - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keymap $name hewlett-packard-pavilion" - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*|*2230s*", RUN+="keymap $name hewlett-packard-compaq_elitebook" --ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*", RUN+="keymap $name hewlett-packard-2510p_2530p" -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keymap $name hewlett-packard-2510p_2530p" - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2" - ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100" - # HP Pavillion dv6315ea has empty DMI_VENDOR --- -1.7.2.2 - diff --git a/0014-udevd-remove-unneeded-credential-passing-from-init_n.patch b/0014-udevd-remove-unneeded-credential-passing-from-init_n.patch deleted file mode 100644 index 858371b..0000000 --- a/0014-udevd-remove-unneeded-credential-passing-from-init_n.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 13f90be7a33353fdbcd4a389630a05c608bdf2a4 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 25 Aug 2010 16:26:54 +0200 -Subject: [PATCH 14/23] udevd: remove unneeded credential passing from init_notify() - ---- - udev/udevd.c | 17 ----------------- - 1 files changed, 0 insertions(+), 17 deletions(-) - -diff --git a/udev/udevd.c b/udev/udevd.c -index ad2ca3b..374a4e0 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -964,15 +964,10 @@ static int init_notify(const char *state) - int fd = -1, r; - struct msghdr msghdr; - struct iovec iovec; -- struct ucred *ucred; - union { - struct sockaddr sa; - struct sockaddr_un un; - } sockaddr; -- union { -- struct cmsghdr cmsghdr; -- uint8_t buf[CMSG_SPACE(sizeof(struct ucred))]; -- } control; - const char *e; - - if (!(e = getenv("NOTIFY_SOCKET"))) { -@@ -1002,16 +997,6 @@ static int init_notify(const char *state) - iovec.iov_base = (char*) state; - iovec.iov_len = strlen(state); - -- memset(&control, 0, sizeof(control)); -- control.cmsghdr.cmsg_level = SOL_SOCKET; -- control.cmsghdr.cmsg_type = SCM_CREDENTIALS; -- control.cmsghdr.cmsg_len = CMSG_LEN(sizeof(struct ucred)); -- -- ucred = (struct ucred*) CMSG_DATA(&control.cmsghdr); -- ucred->pid = getpid(); -- ucred->uid = getuid(); -- ucred->gid = getgid(); -- - memset(&msghdr, 0, sizeof(msghdr)); - msghdr.msg_name = &sockaddr; - msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e); -@@ -1019,8 +1004,6 @@ static int init_notify(const char *state) - msghdr.msg_namelen = sizeof(struct sockaddr_un); - msghdr.msg_iov = &iovec; - msghdr.msg_iovlen = 1; -- msghdr.msg_control = &control; -- msghdr.msg_controllen = control.cmsghdr.cmsg_len; - - if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) { - r = -errno; --- -1.7.2.2 - diff --git a/0015-Add-support-for-oom_score_adj.patch b/0015-Add-support-for-oom_score_adj.patch deleted file mode 100644 index e00e50d..0000000 --- a/0015-Add-support-for-oom_score_adj.patch +++ /dev/null @@ -1,48 +0,0 @@ -From c61eea9459045c2c9032a0c98234985a371fac58 Mon Sep 17 00:00:00 2001 -From: Luca Tettamanti -Date: Mon, 23 Aug 2010 14:35:37 +0200 -Subject: [PATCH 15/23] Add support for oom_score_adj - -/proc//oom_adj has been deprecated (kernel v2.6.36) due to the -rework of the badness heuristic; oom_score_adj is the replacement. -Keep a fallback to the old interface for compatibility with older -kernels. - -See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a63d83f427fbce97a6cea0db2e64b0eb8435cd10 - -Signed-off-by: Martin Pitt ---- - udev/udevd.c | 15 +++++++++++---- - 1 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/udev/udevd.c b/udev/udevd.c -index 374a4e0..0ec3c3d 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -1285,12 +1285,19 @@ int main(int argc, char *argv[]) - fclose(f); - } - -- /* OOM_DISABLE == -17 */ -- fd = open("/proc/self/oom_adj", O_RDWR); -+ fd = open("/proc/self/oom_score_adj", O_RDWR); - if (fd < 0) { -- err(udev, "error disabling OOM: %m\n"); -+ /* Fallback to old interface */ -+ fd = open("/proc/self/oom_adj", O_RDWR); -+ if (fd < 0) { -+ err(udev, "error disabling OOM: %m\n"); -+ } else { -+ /* OOM_DISABLE == -17 */ -+ write(fd, "-17", 3); -+ close(fd); -+ } - } else { -- write(fd, "-17", 3); -+ write(fd, "-1000", 5); - close(fd); - } - --- -1.7.2.2 - diff --git a/0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch b/0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch deleted file mode 100644 index d5c7fff..0000000 --- a/0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 38b5ccbcf7f3643ea8180a8186cfe3e5fa9cb983 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Wed, 25 Aug 2010 17:02:51 +0200 -Subject: [PATCH 16/23] keymap: Fix Sony VAIO VGN-SZ2HP/B - -Reportedly this needs the module-sony keymap, not the -old one. - -https://launchpad.net/bugs/613578 ---- - extras/keymap/95-keymap.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 5656de9..cb066bd 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -46,7 +46,7 @@ ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", - ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony" - - # Older Vaios have some different keys --ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*|*VGN-SZ2HP_B*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old" -+ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old" - - # - # The following rules belong to standard i8042 AT keyboard with high key codes. --- -1.7.2.2 - diff --git a/0017-udev-7-manpage-Fix-description-of-attr.patch b/0017-udev-7-manpage-Fix-description-of-attr.patch deleted file mode 100644 index 6b41ecf..0000000 --- a/0017-udev-7-manpage-Fix-description-of-attr.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 83184d008ba23724fd30996440534c0633a0d0aa Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 27 Aug 2010 16:54:52 +0200 -Subject: [PATCH 17/23] udev(7) manpage: Fix description of $attr - -Fix the manpage to describe the real behaviour of $attr: It doesn't search all -parent devices any more, just the one selected by KERNELS etc. - -https://launchpad.net/bugs/348513 ---- - udev/udev.xml | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/udev/udev.xml b/udev/udev.xml -index 336b203..6085dff 100644 ---- a/udev/udev.xml -+++ b/udev/udev.xml -@@ -578,8 +578,9 @@ - - 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, follow the chain of parent devices and use the value -- of the first attribute that matches. -+ such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or -+ ATTRS test selected a parent device, use the attribute from that -+ parent device. - If the attribute is a symlink, the last element of the symlink target is - returned as the value. - --- -1.7.2.2 - diff --git a/0018-gudev-fix-crash-if-netlink-is-not-available.patch b/0018-gudev-fix-crash-if-netlink-is-not-available.patch deleted file mode 100644 index 2a5872e..0000000 --- a/0018-gudev-fix-crash-if-netlink-is-not-available.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e4dcdc4ab232bcbbe61a2026c16e647d9302cdd2 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 27 Aug 2010 18:12:59 +0200 -Subject: [PATCH 18/23] gudev: fix crash if netlink is not available - -gudev_client_new() assumes that priv->monitor is never NULL, but this happens -on older kernels. Let's not crash client programs because of that. - -https://launchpad.net/bugs/581527 ---- - extras/gudev/gudevclient.c | 18 ++++++++++++------ - 1 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/extras/gudev/gudevclient.c b/extras/gudev/gudevclient.c -index fa31f70..f5f7a19 100644 ---- a/extras/gudev/gudevclient.c -+++ b/extras/gudev/gudevclient.c -@@ -93,6 +93,8 @@ monitor_event (GIOChannel *source, - GUdevDevice *device; - struct udev_device *udevice; - -+ if (client->priv->monitor == NULL) -+ goto out; - udevice = udev_monitor_receive_device (client->priv->monitor); - if (udevice == NULL) - goto out; -@@ -216,17 +218,21 @@ g_udev_client_constructed (GObject *object) - *s = '\0'; - } - -- udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype); -+ if (client->priv->monitor != NULL) -+ udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype); - - g_free (subsystem); - } - - /* listen to events, and buffer them */ -- udev_monitor_enable_receiving (client->priv->monitor); -- -- channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor)); -- client->priv->watch_id = g_io_add_watch (channel, G_IO_IN, monitor_event, client); -- g_io_channel_unref (channel); -+ if (client->priv->monitor != NULL) -+ { -+ udev_monitor_enable_receiving (client->priv->monitor); -+ channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor)); -+ client->priv->watch_id = g_io_add_watch (channel, G_IO_IN, monitor_event, client); -+ g_io_channel_unref (channel); -+ } else -+ client->priv->watch_id = NULL; - } - - if (G_OBJECT_CLASS (g_udev_client_parent_class)->constructed != NULL) --- -1.7.2.2 - diff --git a/0019-keymap-Fix-Acer-TravelMate-4720.patch b/0019-keymap-Fix-Acer-TravelMate-4720.patch deleted file mode 100644 index 35a9922..0000000 --- a/0019-keymap-Fix-Acer-TravelMate-4720.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d17c065e28fa4baac90b02b4913c7ef32d54f3c7 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 27 Aug 2010 18:48:53 +0200 -Subject: [PATCH 19/23] keymap: Fix Acer TravelMate 4720 - -The previous change just fixed the Bluetooth key, but Screen Lock and Browser -also need to be changed. - -https://launchpad.net/bugs/569815 ---- - extras/keymap/95-keymap.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index cb066bd..913b380 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -85,6 +85,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth" -+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*4720*", RUN+="keymap $name 0xB2 www 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" --- -1.7.2.2 - diff --git a/0020-cdrom_id-Fix-DVD-RW-media-detection.patch b/0020-cdrom_id-Fix-DVD-RW-media-detection.patch deleted file mode 100644 index 4a91a4e..0000000 --- a/0020-cdrom_id-Fix-DVD-RW-media-detection.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 2458db3edd8d66827b34978ff471dff8f879e9ab Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 30 Aug 2010 15:33:26 +0200 -Subject: [PATCH 20/23] cdrom_id: Fix DVD-RW media detection - -Commit cf2205a19 applied the "restricted overwrite" vs. "sequential" DVD-RW -test to feature_profiles() (which reads the drive capabilities), which caused -every DVD medium to be detected as ID_CDROM_MEDIA_DVD_RW. Now apply it to -cd_profiles() instead, to just check the current profile. ---- - extras/cdrom_id/cdrom_id.c | 13 +++++++------ - 1 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index f9d6e0b..8480d7b 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -297,14 +297,9 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si - cd_dvd_ram = 1; - break; - case 0x13: -- info(udev, "profile 0x%02x media_dvd_rw\n", profile); -- cd_media_dvd_rw = 1; -- cd_media_dvd_rw_ro = 1; -- break; - case 0x14: - info(udev, "profile 0x%02x dvd_rw\n", profile); - cd_dvd_rw = 1; -- cd_media_dvd_rw_seq = 1; - break; - case 0x1B: - info(udev, "profile 0x%02x dvd_plus_r\n", profile); -@@ -486,10 +481,16 @@ static int cd_profiles(struct udev *udev, int fd) - cd_media_dvd_ram = 1; - break; - case 0x13: -+ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rw = 1; -+ cd_media_dvd_rw_ro = 1; -+ break; - case 0x14: -- info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile); -+ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); - cd_media = 1; - cd_media_dvd_rw = 1; -+ cd_media_dvd_rw_seq = 1; - break; - case 0x1B: - info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); --- -1.7.2.2 - diff --git a/0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch b/0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch deleted file mode 100644 index d033307..0000000 --- a/0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5e267ea5a36de0b2a9a8965ca93dd45bbd6b1a8b Mon Sep 17 00:00:00 2001 -From: Jan Drzewiecki -Date: Tue, 31 Aug 2010 00:37:28 +0200 -Subject: [PATCH 21/23] cdrom_id: Fix DVD blank detection for sloppy firmware - -Reportedly, many CD drive firmwares will only consider the MSB in a READ -command, thus if we request 17 blocks to be read, we'll actually only get 16 in -many cases, and thus miss out the interesting sector #17. This would lead to -falsely considering nonempty DVDs as blank. - -Fetch 32 blocks now, which should work everywhere. - -Signed-off-by: Martin Pitt ---- - extras/cdrom_id/cdrom_id.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 8480d7b..0153af6 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -590,7 +590,7 @@ static int cd_media_info(struct udev *udev, int fd) - * always "complete", DVD-RAM are "other" or "complete" if the disc is - * write protected; we need to check the contents if it is blank */ - if ((cd_media_dvd_rw_ro || cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) { -- unsigned char buffer[17 * 2048]; -+ unsigned char buffer[32 * 2048]; - unsigned char result, len; - int block, offset; - -@@ -661,7 +661,7 @@ static int cd_media_info(struct udev *udev, int fd) - scsi_cmd_init(udev, &sc, buffer, sizeof(buffer)); - scsi_cmd_set(udev, &sc, 0, 0x28); - scsi_cmd_set(udev, &sc, 5, 0); -- scsi_cmd_set(udev, &sc, 8, 17); -+ scsi_cmd_set(udev, &sc, 8, 32); - scsi_cmd_set(udev, &sc, 9, 0); - err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer)); - if ((err != 0)) { --- -1.7.2.2 - diff --git a/0022-set-SELinux-context-on-add-but-not-on-change-events.patch b/0022-set-SELinux-context-on-add-but-not-on-change-events.patch deleted file mode 100644 index aa99300..0000000 --- a/0022-set-SELinux-context-on-add-but-not-on-change-events.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 326c5fc3ea684825629eccaf33a548759162a539 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 31 Aug 2010 21:29:21 +0200 -Subject: [PATCH 22/23] set SELinux context on 'add' but not on 'change' events - ---- - udev/udev-node.c | 9 ++++++++- - 1 files changed, 8 insertions(+), 1 deletions(-) - -diff --git a/udev/udev-node.c b/udev/udev-node.c -index 228b3eb..c8113f1 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -56,10 +56,17 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_ - info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); - chmod(file, mode); - chown(file, uid, gid); -- udev_selinux_lsetfilecon(udev, file, mode); - } else { - info(udev, "preserve permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid); - } -+ /* -+ * Set initial selinux file context only on add events. -+ * We set the proper context on bootup (triger) or for newly -+ * added devices, but we don't change it later, in case -+ * something else has set a custom context in the meantime. -+ */ -+ if (strcmp(udev_device_get_action(dev), "add") == 0) -+ udev_selinux_lsetfilecon(udev, file, mode); - /* always update timestamp when we re-use the node, like on media change events */ - utimensat(AT_FDCWD, file, NULL, 0); - } else { --- -1.7.2.2 - diff --git a/0023-do-not-create-persistent-name-rules-for-KVM-network-.patch b/0023-do-not-create-persistent-name-rules-for-KVM-network-.patch deleted file mode 100644 index 16b7dab..0000000 --- a/0023-do-not-create-persistent-name-rules-for-KVM-network-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From af29bf0966994bc233282148f519e12ea29e1c5a Mon Sep 17 00:00:00 2001 -From: Marco d'Itri -Date: Tue, 31 Aug 2010 21:44:34 +0200 -Subject: [PATCH 23/23] do not create persistent name rules for KVM network interfaces - -The virtual interfaces created by KVM are stable, 54:52:00 is the MAC-48 -range of KVM. ---- - .../75-persistent-net-generator.rules | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules -index a9dfdce..8119d0e 100644 ---- a/extras/rule_generator/75-persistent-net-generator.rules -+++ b/extras/rule_generator/75-persistent-net-generator.rules -@@ -29,6 +29,9 @@ ENV{MATCHADDR}="$attr{address}" - # match interface type - ENV{MATCHIFTYPE}="$attr{type}" - -+# ignore KVM virtual interfaces -+ENV{MATCHADDR}=="54:52:00:*", GOTO="persistent_net_generator_end" -+ - # These vendors are known to violate the local MAC address assignment scheme - # Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom - ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist" --- -1.7.2.2 - From dfa8b8fed24b48109bfa560c4fdc83a508174402 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 12 Nov 2010 14:20:37 +0100 Subject: [PATCH 581/640] - do not create mount point dirs in /dev --- udev.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/udev.spec b/udev.spec index d38aa03..8f6eb58 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -263,9 +263,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{udev_scriptdir}/ %attr(0755,root,root) %dir %{udev_scriptdir}/devices/ %attr(0755,root,root) %dir %{udev_scriptdir}/devices/net -%attr(0755,root,root) %dir %{udev_scriptdir}/devices/hugepages -%attr(0755,root,root) %dir %{udev_scriptdir}/devices/pts -%attr(0755,root,root) %dir %{udev_scriptdir}/devices/shm %{udev_scriptdir}/devices/MAKEDEV %attr(666,root,root) %dev(c,10,200) %{udev_scriptdir}/devices/net/tun %attr(600,root,root) %dev(c,108,0) %{udev_scriptdir}/devices/ppp @@ -353,6 +350,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Nov 12 2010 Harald Hoyer 164-2 +- do not create mount point dirs in /dev + * Fri Oct 29 2010 Harald Hoyer 164-1 - version 164 - skip start_udev with systemd From 1efa3f58ceeab69ecf402bc1be624b73b17d454f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 12 Nov 2010 15:29:16 +0100 Subject: [PATCH 582/640] - enlarged the import buffer to fix the ressize bugs Resolves: rhbz#652318 --- udev-ressize.patch | 24 ++++++++++++++++++++++++ udev.spec | 9 ++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 udev-ressize.patch diff --git a/udev-ressize.patch b/udev-ressize.patch new file mode 100644 index 0000000..788b859 --- /dev/null +++ b/udev-ressize.patch @@ -0,0 +1,24 @@ +commit 851dd4ddc5aeb1ee517145d9e3334c2017595321 +Author: Harald Hoyer +Date: Fri Nov 12 14:39:14 2010 +0100 + + udev-rules.c: change import property buffer to 16384 bytes + + import_program_into_properties() should have the same line length as + import_file_into_properties() + + see also https://bugzilla.redhat.com/show_bug.cgi?id=652318 + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 52f121c..ab7b6ae 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -751,7 +751,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p + { + struct udev *udev = udev_device_get_udev(dev); + char **envp; +- char result[4096]; ++ char result[UTIL_LINE_SIZE]; + size_t reslen; + char *line; + diff --git a/udev.spec b/udev.spec index 8f6eb58..15dda4c 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -17,6 +17,8 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Source2: udev-post.init +Patch1: udev-ressize.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -113,6 +115,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch1 -p1 %build libtoolize -f -c @@ -350,6 +353,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Nov 12 2010 Harald Hoyer 164-3 +- enlarged the import buffer to fix the ressize bugs +Resolves: rhbz#652318 + * Fri Nov 12 2010 Harald Hoyer 164-2 - do not create mount point dirs in /dev From 9a010ac3e50b5c293aa0bb23d67a1b440b796867 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 12 Nov 2010 15:49:43 +0100 Subject: [PATCH 583/640] - add ACLs for PDA devices Resolves: rhbz#642435 --- udev-pda-acl.patch | 20 ++++++++++++++++++++ udev.spec | 8 +++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 udev-pda-acl.patch diff --git a/udev-pda-acl.patch b/udev-pda-acl.patch new file mode 100644 index 0000000..b48103a --- /dev/null +++ b/udev-pda-acl.patch @@ -0,0 +1,20 @@ +commit d69207c3f20f0af2a5e510515ae5473f4fe54476 +Author: Harald Hoyer +Date: Fri Nov 12 15:44:34 2010 +0100 + + 70-acl.rules: add ACLs for ID_PDA devices + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index c7134bc..66375de 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -47,6 +47,9 @@ SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl" + # smart-card readers + ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" + ++# PDA devices ++ENV{ID_PDA}=="*?", TAG+="udev-acl" ++ + # joysticks + SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" + diff --git a/udev.spec b/udev.spec index 15dda4c..0ae5b6b 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,7 @@ Source1: start_udev Source2: udev-post.init Patch1: udev-ressize.patch +Patch2: udev-pda-acl.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -116,6 +117,7 @@ glib-based applications using libudev functionality. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build libtoolize -f -c @@ -353,6 +355,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Nov 12 2010 Harald Hoyer 164-4 +- add ACLs for PDA devices +Resolves: rhbz#642435 + * Fri Nov 12 2010 Harald Hoyer 164-3 - enlarged the import buffer to fix the ressize bugs Resolves: rhbz#652318 From 3f6713d0dfc903fd176e3e6731feb0905ce3400e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 25 Nov 2010 16:05:53 +0000 Subject: [PATCH 584/640] - Add patches to fix touchpad toggle key handling --- ...map-Make-touchpad-buttons-consistent.patch | 232 ++++++++++++++++++ ...dd-force-release-for-HP-touchpad-off.patch | 56 +++++ udev.spec | 9 +- 3 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 0001-extras-keymap-Make-touchpad-buttons-consistent.patch create mode 100644 0001-keymap-Add-force-release-for-HP-touchpad-off.patch diff --git a/0001-extras-keymap-Make-touchpad-buttons-consistent.patch b/0001-extras-keymap-Make-touchpad-buttons-consistent.patch new file mode 100644 index 0000000..bd36b5f --- /dev/null +++ b/0001-extras-keymap-Make-touchpad-buttons-consistent.patch @@ -0,0 +1,232 @@ +From a1ca5f60e0770299c5c5f21bd371f5823802412b Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 4 Nov 2010 23:58:56 +0000 +Subject: [PATCH] extras/keymap: Make touchpad buttons consistent + +We'll need to standardise on the Touchpad related keys in udev, kernel, and +X.org. I selected F21 for XF86TouchpadToggle, F22 for XF86TouchpadOn and F23 +for XF86TouchpadOff. + +See: +https://bugs.freedesktop.org/show_bug.cgi?id=31333 + +Signed-off-by: Martin Pitt +--- + extras/keymap/keymaps/acer | 2 +- + extras/keymap/keymaps/dell | 4 ++-- + extras/keymap/keymaps/everex-xt5000 | 2 +- + extras/keymap/keymaps/hewlett-packard-2510p_2530p | 4 ++-- + extras/keymap/keymaps/hewlett-packard-pavilion | 4 ++-- + extras/keymap/keymaps/hewlett-packard-tx2 | 2 +- + .../lenovo-thinkpad-usb-keyboard-trackpoint | 2 +- + extras/keymap/keymaps/lg-x110 | 4 ++-- + extras/keymap/keymaps/micro-star | 2 +- + extras/keymap/keymaps/module-lenovo | 2 +- + extras/keymap/keymaps/onkyo | 2 +- + extras/keymap/keymaps/samsung-other | 2 +- + extras/keymap/keymaps/samsung-sx20s | 4 ++-- + extras/keymap/keymaps/toshiba-satellite_a110 | 4 ++-- + extras/keymap/keymaps/toshiba-satellite_m30x | 4 ++-- + extras/keymap/keymaps/zepto-znote | 2 +- + 16 files changed, 23 insertions(+), 23 deletions(-) + +diff --git a/extras/keymap/keymaps/acer b/extras/keymap/keymaps/acer +index 6abe39c..4e7c297 100644 +--- a/extras/keymap/keymaps/acer ++++ b/extras/keymap/keymaps/acer +@@ -14,7 +14,7 @@ + 0xEE brightnessup # Fn+Right + 0xEF brightnessdown # Fn+Left + 0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on) +-0xF2 f22 # Fn+F7 Touchpad toggle (on-to-off) ++0xF2 f23 # Fn+F7 Touchpad toggle (on-to-off) + 0xF3 prog2 # "P2" programmable button + 0xF4 prog1 # "P1" programmable button + 0xF5 presentation +diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell +index 1a2e433..fbbb903 100644 +--- a/extras/keymap/keymaps/dell ++++ b/extras/keymap/keymaps/dell +@@ -21,9 +21,9 @@ + 0x99 nextsong # Front panel next song + 0x9A setup # Tablet tools button + 0x9B switchvideomode # Display Toggle button +-0x9E f22 #touchpad toggle ++0x9E f21 #touchpad toggle + 0xA2 playpause # Front panel play/pause + 0xA4 stopcd # Front panel stop + 0xED media # MediaDirect button + 0xD8 screenlock # FIXME: Tablet lock button +-0xD9 f22 # touchpad toggle ++0xD9 f21 # touchpad toggle +diff --git a/extras/keymap/keymaps/everex-xt5000 b/extras/keymap/keymaps/everex-xt5000 +index 53bdd7a..4823a83 100644 +--- a/extras/keymap/keymaps/everex-xt5000 ++++ b/extras/keymap/keymaps/everex-xt5000 +@@ -1,5 +1,5 @@ + 0x5C media +-0x65 f22 # Fn+F5 Touchpad toggle ++0x65 f21 # Fn+F5 Touchpad toggle + 0x67 prog3 # Fan Speed Control button + 0x6F brightnessup + 0x7F brightnessdown +diff --git a/extras/keymap/keymaps/hewlett-packard-2510p_2530p b/extras/keymap/keymaps/hewlett-packard-2510p_2530p +index 2bc70c2..41ad2e9 100644 +--- a/extras/keymap/keymaps/hewlett-packard-2510p_2530p ++++ b/extras/keymap/keymaps/hewlett-packard-2510p_2530p +@@ -1,2 +1,2 @@ +-0xD8 f22 # touchpad off +-0xD9 f23 # touchpad on ++0xD8 f23 # touchpad off ++0xD9 f22 # touchpad on +diff --git a/extras/keymap/keymaps/hewlett-packard-pavilion b/extras/keymap/keymaps/hewlett-packard-pavilion +index a55d2b7..3d3cefc 100644 +--- a/extras/keymap/keymaps/hewlett-packard-pavilion ++++ b/extras/keymap/keymaps/hewlett-packard-pavilion +@@ -1,3 +1,3 @@ + 0x88 media # FIXME: quick play +-0xD8 f22 # touchpad off +-0xD9 f23 # touchpad on ++0xD8 f23 # touchpad off ++0xD9 f22 # touchpad on +diff --git a/extras/keymap/keymaps/hewlett-packard-tx2 b/extras/keymap/keymaps/hewlett-packard-tx2 +index 206c004..36a690f 100644 +--- a/extras/keymap/keymaps/hewlett-packard-tx2 ++++ b/extras/keymap/keymaps/hewlett-packard-tx2 +@@ -1,3 +1,3 @@ + 0xC2 media +-0xD8 f22 # Toggle touchpad button on tx2 (OFF) ++0xD8 f23 # Toggle touchpad button on tx2 (OFF) + 0xD9 f22 # Toggle touchpad button on tx2 (ON) +diff --git a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint +index 7612f79..bc91470 100644 +--- a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint ++++ b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint +@@ -2,7 +2,7 @@ + 0x90013 battery # Fn+F3 + 0x90014 wlan # Fn+F5 + 0x90016 switchvideomode # Fn+F7 +-0x90017 f22 # Fn+F8 touchpadtoggle ++0x90017 f21 # Fn+F8 touchpadtoggle + 0x90019 suspend # Fn+F12 + 0x9001A brightnessup # Fn+Home + 0x9001B brightnessdown # Fn+End +diff --git a/extras/keymap/keymaps/lg-x110 b/extras/keymap/keymaps/lg-x110 +index a61cf3d..ba08cba 100644 +--- a/extras/keymap/keymaps/lg-x110 ++++ b/extras/keymap/keymaps/lg-x110 +@@ -6,7 +6,7 @@ + 0xB3 suspend # Fn-F12 + 0xDF sleep # Fn-F4 + # 0xE2 bluetooth # satellite dish2 +-0xE4 f22 # Fn-F5 Touchpad disable ++0xE4 f21 # Fn-F5 Touchpad disable + 0xF6 wlan # Fn-F6 + 0xF7 reserved # brightnessdown # Fn-Down +-0xF8 reserved # brightnessup # Fn-Up +\ No newline at end of file ++0xF8 reserved # brightnessup # Fn-Up +diff --git a/extras/keymap/keymaps/micro-star b/extras/keymap/keymaps/micro-star +index 0de5ae6..4a43869 100644 +--- a/extras/keymap/keymaps/micro-star ++++ b/extras/keymap/keymaps/micro-star +@@ -4,7 +4,7 @@ + 0xB2 www # e button + 0xDF sleep # Fn-F12 + 0xE2 bluetooth # satellite dish2 +-0xE4 f22 # Fn-F3 Touchpad disable ++0xE4 f21 # Fn-F3 Touchpad disable + 0xEC email # envelope button + 0xEE camera # Fn-F6 camera disable + 0xF6 wlan # satellite dish1 +diff --git a/extras/keymap/keymaps/module-lenovo b/extras/keymap/keymaps/module-lenovo +index 7c597bd..9cb74b2 100644 +--- a/extras/keymap/keymaps/module-lenovo ++++ b/extras/keymap/keymaps/module-lenovo +@@ -3,7 +3,7 @@ + 0x3 sleep # Fn+F4 + 0x4 wlan # Fn+F5 + 0x6 switchvideomode # Fn+F7 +-0x7 f22 # Fn+F8 touchpadtoggle ++0x7 f21 # Fn+F8 touchpadtoggle + 0x8 f24 # Fn+F9 undock + 0xB suspend # Fn+F12 + 0xF brightnessup # Fn+Home +diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo +index 7dd80a1..ee864ad 100644 +--- a/extras/keymap/keymaps/onkyo ++++ b/extras/keymap/keymaps/onkyo +@@ -8,7 +8,7 @@ + 0xF0 media # Fn+R + 0xF5 switchvideomode # Fn+E + 0xF6 camera # Fn+T +-0xF7 f22 # Fn+Y (touchpad toggle) ++0xF7 f21 # Fn+Y (touchpad toggle) + 0xF8 brightnessup # Fn+S + 0xF9 brightnessdown # Fn+A + 0xFB wlan # Fn+J +diff --git a/extras/keymap/keymaps/samsung-other b/extras/keymap/keymaps/samsung-other +index 6a0928c..3ac0c2f 100644 +--- a/extras/keymap/keymaps/samsung-other ++++ b/extras/keymap/keymaps/samsung-other +@@ -11,4 +11,4 @@ + 0xB3 prog3 # Fn+F8 switch power mode (battery/dynamic/performance) + 0xB4 wlan # Fn+F9 (X60P) + 0xF7 f22 # Fn+F10 Touchpad on +-0xF9 f22 # Fn+F10 Touchpad off ++0xF9 f23 # Fn+F10 Touchpad off +diff --git a/extras/keymap/keymaps/samsung-sx20s b/extras/keymap/keymaps/samsung-sx20s +index daf7d3e..9d954ee 100644 +--- a/extras/keymap/keymaps/samsung-sx20s ++++ b/extras/keymap/keymaps/samsung-sx20s +@@ -1,4 +1,4 @@ + 0x74 mute + 0x75 mute +-0x77 f21 # FIXME: Touchpad on +-0x79 f21 # FIXME: Touchpad off ++0x77 f22 # Touchpad on ++0x79 f23 # Touchpad off +diff --git a/extras/keymap/keymaps/toshiba-satellite_a110 b/extras/keymap/keymaps/toshiba-satellite_a110 +index 0f2aaec..1429409 100644 +--- a/extras/keymap/keymaps/toshiba-satellite_a110 ++++ b/extras/keymap/keymaps/toshiba-satellite_a110 +@@ -1,8 +1,8 @@ + 0x92 stop + 0x93 www + 0x94 media +-0x9E f21 # FIXME: Touchpad on +-0x9F f21 # FIXME: Touchpad off ++0x9E f22 # Touchpad on ++0x9F f23 # Touchpad off + 0xB9 nextsong + 0xD9 brightnessup + 0xEE screenlock +diff --git a/extras/keymap/keymaps/toshiba-satellite_m30x b/extras/keymap/keymaps/toshiba-satellite_m30x +index cf6d912..9280ae0 100644 +--- a/extras/keymap/keymaps/toshiba-satellite_m30x ++++ b/extras/keymap/keymaps/toshiba-satellite_m30x +@@ -2,6 +2,6 @@ + 0xd9 brightnessup + 0xee screenlock + 0x93 media +-0x9e prog1 #touchpad_enable +-0x9f prog2 #touchpad_disable ++0x9e f22 #touchpad_enable ++0x9f f23 #touchpad_disable + +diff --git a/extras/keymap/keymaps/zepto-znote b/extras/keymap/keymaps/zepto-znote +index e076516..cf72fda 100644 +--- a/extras/keymap/keymaps/zepto-znote ++++ b/extras/keymap/keymaps/zepto-znote +@@ -1,7 +1,7 @@ + 0x93 switchvideomode # Fn+F3 Toggle Video Output + 0x95 brightnessdown # Fn+F4 Brightness Down + 0x91 brightnessup # Fn+F5 Brightness Up +-0xA5 f22 # Fn+F6 Disable Touchpad ++0xA5 f23 # Fn+F6 Disable Touchpad + 0xA6 f22 # Fn+F6 Enable Touchpad + 0xA7 bluetooth # Fn+F10 Enable Bluetooth + 0XA9 bluetooth # Fn+F10 Disable Bluetooth +-- +1.7.3.2 + diff --git a/0001-keymap-Add-force-release-for-HP-touchpad-off.patch b/0001-keymap-Add-force-release-for-HP-touchpad-off.patch new file mode 100644 index 0000000..1ba3551 --- /dev/null +++ b/0001-keymap-Add-force-release-for-HP-touchpad-off.patch @@ -0,0 +1,56 @@ +From ecfad20871e855d9e54d3a528cf9219ce5c93626 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 1 Nov 2010 16:29:09 +0000 +Subject: [PATCH] keymap: Add force release for HP touchpad off + +Force the touchpad off/on keys getting released, as they usually +only send a "repeat". + +https://bugzilla.redhat.com/show_bug.cgi?id=623239 + +Signed-off-by: Martin Pitt +--- + Makefile.am | 1 + + extras/keymap/95-keyboard-force-release.rules | 5 +++++ + extras/keymap/force-release-maps/hp-other | 3 +++ + 3 files changed, 9 insertions(+), 0 deletions(-) + create mode 100644 extras/keymap/force-release-maps/hp-other + +diff --git a/Makefile.am b/Makefile.am +index 3a95046..032eb28 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -601,6 +601,7 @@ dist_udevkeymap_DATA = \ + + udevkeymapforcereldir = $(libexecdir)/keymaps/force-release + dist_udevkeymapforcerel_DATA = \ ++ extras/keymap/force-release-maps/hp-other \ + extras/keymap/force-release-maps/samsung-other \ + extras/keymap/force-release-maps/common-volume-keys + +diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules +index 562dc8d..6f7c0fd 100644 +--- a/extras/keymap/95-keyboard-force-release.rules ++++ b/extras/keymap/95-keyboard-force-release.rules +@@ -35,4 +35,9 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite U300|Satellit + + ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys" + ++# These are all the HP laptops that setup a touchpad toggle key ++ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keyboard-force-release.sh $devpath hp-other" ++ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keyboard-force-release.sh $devpath hp-other" ++ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keyboard-force-release.sh $devpath hp-other" ++ + LABEL="force_release_end" +diff --git a/extras/keymap/force-release-maps/hp-other b/extras/keymap/force-release-maps/hp-other +new file mode 100644 +index 0000000..6621370 +--- /dev/null ++++ b/extras/keymap/force-release-maps/hp-other +@@ -0,0 +1,3 @@ ++# list of scancodes (hex or decimal), optional comment ++0xd8 # Touchpad off ++0xd9 # Touchpad on +-- +1.7.3.2 + diff --git a/udev.spec b/udev.spec index 0ae5b6b..5ca3750 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -19,6 +19,8 @@ Source2: udev-post.init Patch1: udev-ressize.patch Patch2: udev-pda-acl.patch +Patch3: 0001-keymap-Add-force-release-for-HP-touchpad-off.patch +Patch4: 0001-extras-keymap-Make-touchpad-buttons-consistent.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -118,6 +120,8 @@ glib-based applications using libudev functionality. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build libtoolize -f -c @@ -355,6 +359,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Nov 25 2010 Bastien Nocera 164-5 +- Add patches to fix touchpad toggle key handling + * Fri Nov 12 2010 Harald Hoyer 164-4 - add ACLs for PDA devices Resolves: rhbz#642435 From 15fa57fca0f4a9d31950a71f325f0638bdd329c1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 6 Dec 2010 09:50:38 +0100 Subject: [PATCH 585/640] udev.spec: fixed pre/post udev kill loop --- udev.spec | 58 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/udev.spec b/udev.spec index 5ca3750..823fa5d 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -181,17 +181,24 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then - if [ -x /sbin/pidof ]; then - pid=$(/sbin/pidof -c udevd) - if [ -n "$pid" ]; then - kill $pid - fi - fi - /sbin/chkconfig --del udev + if test -x /usr/bin/stat -a \ + "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if [ -x /sbin/pidof ]; then + pid=$(/sbin/pidof -c udevd) + while [ -n "$pid" ]; do + for p in $pid; do + kill $hard $p 2>/dev/null + done + sleep 0.2 + pid=$(/sbin/pidof -c udevd) + hard="-9" + done + fi + fi + /sbin/chkconfig --del udev fi if [ "$1" -eq 0 ]; then - /sbin/chkconfig --del udev-post -# /usr/bin/systemd-install --system --realize disable udev.service >/dev/null 2>&1 || : + /sbin/chkconfig --del udev-post fi exit 0 @@ -203,19 +210,21 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then - if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - if test -x /sbin/udevd -a -x /sbin/pidof ; then - /sbin/udevadm control --stop-exec-queue - pid=$(/sbin/pidof -c udevd) - while [ -n "$pid" ]; do - for p in $pid; do - kill $hard $p; - done - pid=$(/sbin/pidof -c udevd) - hard="-9" - done - fi - fi + if test -x /usr/bin/stat -a \ + "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + if test -x /sbin/udevd -a -x /sbin/pidof ; then + /sbin/udevadm control --stop-exec-queue + pid=$(/sbin/pidof -c udevd) + while [ -n "$pid" ]; do + for p in $pid; do + kill $hard $p 2>/dev/null + done + sleep 0.2 + pid=$(/sbin/pidof -c udevd) + hard="-9" + done + fi + fi fi exit 0 @@ -359,6 +368,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Dec 06 2010 Harald Hoyer 164-6 +- fixed kill loop + * Thu Nov 25 2010 Bastien Nocera 164-5 - Add patches to fix touchpad toggle key handling From ad72e1d94476392befa54e773acf746b7f6eabc7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 6 Dec 2010 10:20:50 +0100 Subject: [PATCH 586/640] udev.spec: removed MAKEDEV symlink --- udev.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 823fa5d..95eaf57 100644 --- a/udev.spec +++ b/udev.spec @@ -169,8 +169,6 @@ done mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices,devices/net,devices/pts,devices/shm,devices/hugepages} -ln -s /sbin/MAKEDEV $RPM_BUILD_ROOT%{udev_scriptdir}/devices/MAKEDEV - mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev @@ -281,7 +279,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %dir %{udev_scriptdir}/ %attr(0755,root,root) %dir %{udev_scriptdir}/devices/ %attr(0755,root,root) %dir %{udev_scriptdir}/devices/net -%{udev_scriptdir}/devices/MAKEDEV %attr(666,root,root) %dev(c,10,200) %{udev_scriptdir}/devices/net/tun %attr(600,root,root) %dev(c,108,0) %{udev_scriptdir}/devices/ppp %attr(666,root,root) %dev(c,10,229) %{udev_scriptdir}/devices/fuse @@ -369,7 +366,10 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon Dec 06 2010 Harald Hoyer 164-6 +- removed MAKEDEV symlink +Resolves: rhbz#660091 - fixed kill loop +Resolves: rhbz#657651 * Thu Nov 25 2010 Bastien Nocera 164-5 - Add patches to fix touchpad toggle key handling From 863c17e8e2af04abcb2b8c32f813072e72c79a24 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Feb 2011 18:35:27 +0100 Subject: [PATCH 587/640] - fixed: network device renaming 2-step exceeds IFNAMSIZ Resolves: rhbz#673675 --- udev.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/udev.spec b/udev.spec index 95eaf57..d744c3a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 6%{?dist} +Release: 8%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -21,6 +21,7 @@ Patch1: udev-ressize.patch Patch2: udev-pda-acl.patch Patch3: 0001-keymap-Add-force-release-for-HP-touchpad-off.patch Patch4: 0001-extras-keymap-Make-touchpad-buttons-consistent.patch +Patch5: udev-random_temporary_ifname.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -122,6 +123,7 @@ glib-based applications using libudev functionality. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build libtoolize -f -c @@ -278,14 +280,6 @@ 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/ -%attr(0755,root,root) %dir %{udev_scriptdir}/devices/net -%attr(666,root,root) %dev(c,10,200) %{udev_scriptdir}/devices/net/tun -%attr(600,root,root) %dev(c,108,0) %{udev_scriptdir}/devices/ppp -%attr(666,root,root) %dev(c,10,229) %{udev_scriptdir}/devices/fuse -%attr(660,root,lp) %dev(c,6,0) %{udev_scriptdir}/devices/lp0 -%attr(660,root,lp) %dev(c,6,1) %{udev_scriptdir}/devices/lp1 -%attr(660,root,lp) %dev(c,6,2) %{udev_scriptdir}/devices/lp2 -%attr(660,root,lp) %dev(c,6,3) %{udev_scriptdir}/devices/lp3 %attr(640,root,disk) %dev(b,7,0) %{udev_scriptdir}/devices/loop0 %attr(640,root,disk) %dev(b,7,1) %{udev_scriptdir}/devices/loop1 %attr(640,root,disk) %dev(b,7,2) %{udev_scriptdir}/devices/loop2 @@ -365,6 +359,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Feb 02 2011 Harald Hoyer 164-8 +- fixed: network device renaming 2-step exceeds IFNAMSIZ +Resolves: rhbz#673675 + +* Fri Jan 21 2011 Harald Hoyer 164-7 +- removed unnecessary devices from /lib/udev/devices + * Mon Dec 06 2010 Harald Hoyer 164-6 - removed MAKEDEV symlink Resolves: rhbz#660091 From c67280da85d933b01462fc718d8b421a1c22aa7e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Feb 2011 18:35:54 +0100 Subject: [PATCH 588/640] - fixed: network device renaming 2-step exceeds IFNAMSIZ Resolves: rhbz#673675 --- udev-random_temporary_ifname.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 udev-random_temporary_ifname.patch diff --git a/udev-random_temporary_ifname.patch b/udev-random_temporary_ifname.patch new file mode 100644 index 0000000..ff5ad5c --- /dev/null +++ b/udev-random_temporary_ifname.patch @@ -0,0 +1,22 @@ +diff --git a/udev/udev-event.c b/udev/udev-event.c +index 0648735..5387c00 100644 +--- a/udev/udev-event.c ++++ b/udev/udev-event.c +@@ -462,6 +462,7 @@ static void rename_netif_kernel_log(struct ifreq ifr) + static int rename_netif(struct udev_event *event) + { + struct udev_device *dev = event->dev; ++ char iftmp[IFNAMSIZ]; + int sk; + struct ifreq ifr; + int loop; +@@ -492,7 +493,8 @@ static int rename_netif(struct udev_event *event) + goto out; + + /* free our own name, another process may wait for us */ +- util_strscpyl(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL); ++ util_strscpyl(iftmp, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL); ++ sprintf(ifr.ifr_newname, "eth_%X",util_string_hash32(iftmp)); + err = ioctl(sk, SIOCSIFNAME, &ifr); + if (err < 0) { + err = -errno; From 243a0734e5ca5fe6e4170f552ee735a95501bdbf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 2 Feb 2011 18:59:23 +0100 Subject: [PATCH 589/640] - fixed: network device renaming 2-step exceeds IFNAMSIZ Resolves: rhbz#673675 --- udev-164-no-v4l1.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ udev.spec | 3 +++ 2 files changed, 45 insertions(+) create mode 100644 udev-164-no-v4l1.patch diff --git a/udev-164-no-v4l1.patch b/udev-164-no-v4l1.patch new file mode 100644 index 0000000..9d9ef7c --- /dev/null +++ b/udev-164-no-v4l1.patch @@ -0,0 +1,42 @@ +diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c +index d530a6d..e4b22bf 100644 +--- a/extras/v4l_id/v4l_id.c ++++ b/extras/v4l_id/v4l_id.c +@@ -28,7 +28,6 @@ + #include + #include + #include +-#include + #include + + int main (int argc, char *argv[]) +@@ -39,7 +38,6 @@ int main (int argc, char *argv[]) + }; + int fd; + char *device; +- struct video_capability v1cap; + struct v4l2_capability v2cap; + + while (1) { +@@ -82,20 +80,7 @@ int main (int argc, char *argv[]) + if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0) + printf("radio:"); + printf("\n"); +- } else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) { +- printf("ID_V4L_VERSION=1\n"); +- printf("ID_V4L_PRODUCT=%s\n", v1cap.name); +- printf("ID_V4L_CAPABILITIES=:"); +- if ((v1cap.type & VID_TYPE_CAPTURE) > 0) +- printf("capture:"); +- if ((v1cap.type & VID_TYPE_OVERLAY) > 0) +- printf("video_overlay:"); +- if (v1cap.audios > 0) +- printf("audio:"); +- if ((v1cap.type & VID_TYPE_TUNER) > 0) +- printf("tuner:"); +- printf("\n"); +- } ++ } + + close (fd); + return 0; diff --git a/udev.spec b/udev.spec index d744c3a..24ca8bd 100644 --- a/udev.spec +++ b/udev.spec @@ -22,6 +22,7 @@ Patch2: udev-pda-acl.patch Patch3: 0001-keymap-Add-force-release-for-HP-touchpad-off.patch Patch4: 0001-extras-keymap-Make-touchpad-buttons-consistent.patch Patch5: udev-random_temporary_ifname.patch +Patch6: udev-164-no-v4l1.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -124,6 +125,7 @@ glib-based applications using libudev functionality. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build libtoolize -f -c @@ -362,6 +364,7 @@ rm -rf $RPM_BUILD_ROOT * Wed Feb 02 2011 Harald Hoyer 164-8 - fixed: network device renaming 2-step exceeds IFNAMSIZ Resolves: rhbz#673675 +- removed v4l version 1 * Fri Jan 21 2011 Harald Hoyer 164-7 - removed unnecessary devices from /lib/udev/devices From 61095fb1d9852e736147097627a51714fff7754f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 17:57:39 -0600 Subject: [PATCH 590/640] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 24ca8bd..49dfbb6 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 164 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -361,6 +361,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 164-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Feb 02 2011 Harald Hoyer 164-8 - fixed: network device renaming 2-step exceeds IFNAMSIZ Resolves: rhbz#673675 From 57a491c1af046cbe4c2c8b7740cc855de4cc2224 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Feb 2011 18:26:09 +0100 Subject: [PATCH 591/640] - renamed udev-post initscript to udev-retry to match upstream systemd service name - version 166 --- .gitignore | 2 + ...map-Make-touchpad-buttons-consistent.patch | 232 ------------------ ...dd-force-release-for-HP-touchpad-off.patch | 56 ----- sources | 4 +- udev-pda-acl.patch | 20 -- udev-random_temporary_ifname.patch | 22 -- udev-ressize.patch | 24 -- udev-post.init => udev-retry.init | 8 +- udev.spec | 42 ++-- 9 files changed, 31 insertions(+), 379 deletions(-) delete mode 100644 0001-extras-keymap-Make-touchpad-buttons-consistent.patch delete mode 100644 0001-keymap-Add-force-release-for-HP-touchpad-off.patch delete mode 100644 udev-pda-acl.patch delete mode 100644 udev-random_temporary_ifname.patch delete mode 100644 udev-ressize.patch rename udev-post.init => udev-retry.init (89%) diff --git a/.gitignore b/.gitignore index 65d08f4..ff4586d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ udev-160.tar.bz2 /udev-164.tar.bz2 /udev-164.tar.bz2.sign +/udev-166.tar.bz2 +/udev-166.tar.bz2.sign diff --git a/0001-extras-keymap-Make-touchpad-buttons-consistent.patch b/0001-extras-keymap-Make-touchpad-buttons-consistent.patch deleted file mode 100644 index bd36b5f..0000000 --- a/0001-extras-keymap-Make-touchpad-buttons-consistent.patch +++ /dev/null @@ -1,232 +0,0 @@ -From a1ca5f60e0770299c5c5f21bd371f5823802412b Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 4 Nov 2010 23:58:56 +0000 -Subject: [PATCH] extras/keymap: Make touchpad buttons consistent - -We'll need to standardise on the Touchpad related keys in udev, kernel, and -X.org. I selected F21 for XF86TouchpadToggle, F22 for XF86TouchpadOn and F23 -for XF86TouchpadOff. - -See: -https://bugs.freedesktop.org/show_bug.cgi?id=31333 - -Signed-off-by: Martin Pitt ---- - extras/keymap/keymaps/acer | 2 +- - extras/keymap/keymaps/dell | 4 ++-- - extras/keymap/keymaps/everex-xt5000 | 2 +- - extras/keymap/keymaps/hewlett-packard-2510p_2530p | 4 ++-- - extras/keymap/keymaps/hewlett-packard-pavilion | 4 ++-- - extras/keymap/keymaps/hewlett-packard-tx2 | 2 +- - .../lenovo-thinkpad-usb-keyboard-trackpoint | 2 +- - extras/keymap/keymaps/lg-x110 | 4 ++-- - extras/keymap/keymaps/micro-star | 2 +- - extras/keymap/keymaps/module-lenovo | 2 +- - extras/keymap/keymaps/onkyo | 2 +- - extras/keymap/keymaps/samsung-other | 2 +- - extras/keymap/keymaps/samsung-sx20s | 4 ++-- - extras/keymap/keymaps/toshiba-satellite_a110 | 4 ++-- - extras/keymap/keymaps/toshiba-satellite_m30x | 4 ++-- - extras/keymap/keymaps/zepto-znote | 2 +- - 16 files changed, 23 insertions(+), 23 deletions(-) - -diff --git a/extras/keymap/keymaps/acer b/extras/keymap/keymaps/acer -index 6abe39c..4e7c297 100644 ---- a/extras/keymap/keymaps/acer -+++ b/extras/keymap/keymaps/acer -@@ -14,7 +14,7 @@ - 0xEE brightnessup # Fn+Right - 0xEF brightnessdown # Fn+Left - 0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on) --0xF2 f22 # Fn+F7 Touchpad toggle (on-to-off) -+0xF2 f23 # Fn+F7 Touchpad toggle (on-to-off) - 0xF3 prog2 # "P2" programmable button - 0xF4 prog1 # "P1" programmable button - 0xF5 presentation -diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell -index 1a2e433..fbbb903 100644 ---- a/extras/keymap/keymaps/dell -+++ b/extras/keymap/keymaps/dell -@@ -21,9 +21,9 @@ - 0x99 nextsong # Front panel next song - 0x9A setup # Tablet tools button - 0x9B switchvideomode # Display Toggle button --0x9E f22 #touchpad toggle -+0x9E f21 #touchpad toggle - 0xA2 playpause # Front panel play/pause - 0xA4 stopcd # Front panel stop - 0xED media # MediaDirect button - 0xD8 screenlock # FIXME: Tablet lock button --0xD9 f22 # touchpad toggle -+0xD9 f21 # touchpad toggle -diff --git a/extras/keymap/keymaps/everex-xt5000 b/extras/keymap/keymaps/everex-xt5000 -index 53bdd7a..4823a83 100644 ---- a/extras/keymap/keymaps/everex-xt5000 -+++ b/extras/keymap/keymaps/everex-xt5000 -@@ -1,5 +1,5 @@ - 0x5C media --0x65 f22 # Fn+F5 Touchpad toggle -+0x65 f21 # Fn+F5 Touchpad toggle - 0x67 prog3 # Fan Speed Control button - 0x6F brightnessup - 0x7F brightnessdown -diff --git a/extras/keymap/keymaps/hewlett-packard-2510p_2530p b/extras/keymap/keymaps/hewlett-packard-2510p_2530p -index 2bc70c2..41ad2e9 100644 ---- a/extras/keymap/keymaps/hewlett-packard-2510p_2530p -+++ b/extras/keymap/keymaps/hewlett-packard-2510p_2530p -@@ -1,2 +1,2 @@ --0xD8 f22 # touchpad off --0xD9 f23 # touchpad on -+0xD8 f23 # touchpad off -+0xD9 f22 # touchpad on -diff --git a/extras/keymap/keymaps/hewlett-packard-pavilion b/extras/keymap/keymaps/hewlett-packard-pavilion -index a55d2b7..3d3cefc 100644 ---- a/extras/keymap/keymaps/hewlett-packard-pavilion -+++ b/extras/keymap/keymaps/hewlett-packard-pavilion -@@ -1,3 +1,3 @@ - 0x88 media # FIXME: quick play --0xD8 f22 # touchpad off --0xD9 f23 # touchpad on -+0xD8 f23 # touchpad off -+0xD9 f22 # touchpad on -diff --git a/extras/keymap/keymaps/hewlett-packard-tx2 b/extras/keymap/keymaps/hewlett-packard-tx2 -index 206c004..36a690f 100644 ---- a/extras/keymap/keymaps/hewlett-packard-tx2 -+++ b/extras/keymap/keymaps/hewlett-packard-tx2 -@@ -1,3 +1,3 @@ - 0xC2 media --0xD8 f22 # Toggle touchpad button on tx2 (OFF) -+0xD8 f23 # Toggle touchpad button on tx2 (OFF) - 0xD9 f22 # Toggle touchpad button on tx2 (ON) -diff --git a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint -index 7612f79..bc91470 100644 ---- a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint -+++ b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint -@@ -2,7 +2,7 @@ - 0x90013 battery # Fn+F3 - 0x90014 wlan # Fn+F5 - 0x90016 switchvideomode # Fn+F7 --0x90017 f22 # Fn+F8 touchpadtoggle -+0x90017 f21 # Fn+F8 touchpadtoggle - 0x90019 suspend # Fn+F12 - 0x9001A brightnessup # Fn+Home - 0x9001B brightnessdown # Fn+End -diff --git a/extras/keymap/keymaps/lg-x110 b/extras/keymap/keymaps/lg-x110 -index a61cf3d..ba08cba 100644 ---- a/extras/keymap/keymaps/lg-x110 -+++ b/extras/keymap/keymaps/lg-x110 -@@ -6,7 +6,7 @@ - 0xB3 suspend # Fn-F12 - 0xDF sleep # Fn-F4 - # 0xE2 bluetooth # satellite dish2 --0xE4 f22 # Fn-F5 Touchpad disable -+0xE4 f21 # Fn-F5 Touchpad disable - 0xF6 wlan # Fn-F6 - 0xF7 reserved # brightnessdown # Fn-Down --0xF8 reserved # brightnessup # Fn-Up -\ No newline at end of file -+0xF8 reserved # brightnessup # Fn-Up -diff --git a/extras/keymap/keymaps/micro-star b/extras/keymap/keymaps/micro-star -index 0de5ae6..4a43869 100644 ---- a/extras/keymap/keymaps/micro-star -+++ b/extras/keymap/keymaps/micro-star -@@ -4,7 +4,7 @@ - 0xB2 www # e button - 0xDF sleep # Fn-F12 - 0xE2 bluetooth # satellite dish2 --0xE4 f22 # Fn-F3 Touchpad disable -+0xE4 f21 # Fn-F3 Touchpad disable - 0xEC email # envelope button - 0xEE camera # Fn-F6 camera disable - 0xF6 wlan # satellite dish1 -diff --git a/extras/keymap/keymaps/module-lenovo b/extras/keymap/keymaps/module-lenovo -index 7c597bd..9cb74b2 100644 ---- a/extras/keymap/keymaps/module-lenovo -+++ b/extras/keymap/keymaps/module-lenovo -@@ -3,7 +3,7 @@ - 0x3 sleep # Fn+F4 - 0x4 wlan # Fn+F5 - 0x6 switchvideomode # Fn+F7 --0x7 f22 # Fn+F8 touchpadtoggle -+0x7 f21 # Fn+F8 touchpadtoggle - 0x8 f24 # Fn+F9 undock - 0xB suspend # Fn+F12 - 0xF brightnessup # Fn+Home -diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo -index 7dd80a1..ee864ad 100644 ---- a/extras/keymap/keymaps/onkyo -+++ b/extras/keymap/keymaps/onkyo -@@ -8,7 +8,7 @@ - 0xF0 media # Fn+R - 0xF5 switchvideomode # Fn+E - 0xF6 camera # Fn+T --0xF7 f22 # Fn+Y (touchpad toggle) -+0xF7 f21 # Fn+Y (touchpad toggle) - 0xF8 brightnessup # Fn+S - 0xF9 brightnessdown # Fn+A - 0xFB wlan # Fn+J -diff --git a/extras/keymap/keymaps/samsung-other b/extras/keymap/keymaps/samsung-other -index 6a0928c..3ac0c2f 100644 ---- a/extras/keymap/keymaps/samsung-other -+++ b/extras/keymap/keymaps/samsung-other -@@ -11,4 +11,4 @@ - 0xB3 prog3 # Fn+F8 switch power mode (battery/dynamic/performance) - 0xB4 wlan # Fn+F9 (X60P) - 0xF7 f22 # Fn+F10 Touchpad on --0xF9 f22 # Fn+F10 Touchpad off -+0xF9 f23 # Fn+F10 Touchpad off -diff --git a/extras/keymap/keymaps/samsung-sx20s b/extras/keymap/keymaps/samsung-sx20s -index daf7d3e..9d954ee 100644 ---- a/extras/keymap/keymaps/samsung-sx20s -+++ b/extras/keymap/keymaps/samsung-sx20s -@@ -1,4 +1,4 @@ - 0x74 mute - 0x75 mute --0x77 f21 # FIXME: Touchpad on --0x79 f21 # FIXME: Touchpad off -+0x77 f22 # Touchpad on -+0x79 f23 # Touchpad off -diff --git a/extras/keymap/keymaps/toshiba-satellite_a110 b/extras/keymap/keymaps/toshiba-satellite_a110 -index 0f2aaec..1429409 100644 ---- a/extras/keymap/keymaps/toshiba-satellite_a110 -+++ b/extras/keymap/keymaps/toshiba-satellite_a110 -@@ -1,8 +1,8 @@ - 0x92 stop - 0x93 www - 0x94 media --0x9E f21 # FIXME: Touchpad on --0x9F f21 # FIXME: Touchpad off -+0x9E f22 # Touchpad on -+0x9F f23 # Touchpad off - 0xB9 nextsong - 0xD9 brightnessup - 0xEE screenlock -diff --git a/extras/keymap/keymaps/toshiba-satellite_m30x b/extras/keymap/keymaps/toshiba-satellite_m30x -index cf6d912..9280ae0 100644 ---- a/extras/keymap/keymaps/toshiba-satellite_m30x -+++ b/extras/keymap/keymaps/toshiba-satellite_m30x -@@ -2,6 +2,6 @@ - 0xd9 brightnessup - 0xee screenlock - 0x93 media --0x9e prog1 #touchpad_enable --0x9f prog2 #touchpad_disable -+0x9e f22 #touchpad_enable -+0x9f f23 #touchpad_disable - -diff --git a/extras/keymap/keymaps/zepto-znote b/extras/keymap/keymaps/zepto-znote -index e076516..cf72fda 100644 ---- a/extras/keymap/keymaps/zepto-znote -+++ b/extras/keymap/keymaps/zepto-znote -@@ -1,7 +1,7 @@ - 0x93 switchvideomode # Fn+F3 Toggle Video Output - 0x95 brightnessdown # Fn+F4 Brightness Down - 0x91 brightnessup # Fn+F5 Brightness Up --0xA5 f22 # Fn+F6 Disable Touchpad -+0xA5 f23 # Fn+F6 Disable Touchpad - 0xA6 f22 # Fn+F6 Enable Touchpad - 0xA7 bluetooth # Fn+F10 Enable Bluetooth - 0XA9 bluetooth # Fn+F10 Disable Bluetooth --- -1.7.3.2 - diff --git a/0001-keymap-Add-force-release-for-HP-touchpad-off.patch b/0001-keymap-Add-force-release-for-HP-touchpad-off.patch deleted file mode 100644 index 1ba3551..0000000 --- a/0001-keymap-Add-force-release-for-HP-touchpad-off.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ecfad20871e855d9e54d3a528cf9219ce5c93626 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Mon, 1 Nov 2010 16:29:09 +0000 -Subject: [PATCH] keymap: Add force release for HP touchpad off - -Force the touchpad off/on keys getting released, as they usually -only send a "repeat". - -https://bugzilla.redhat.com/show_bug.cgi?id=623239 - -Signed-off-by: Martin Pitt ---- - Makefile.am | 1 + - extras/keymap/95-keyboard-force-release.rules | 5 +++++ - extras/keymap/force-release-maps/hp-other | 3 +++ - 3 files changed, 9 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/force-release-maps/hp-other - -diff --git a/Makefile.am b/Makefile.am -index 3a95046..032eb28 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -601,6 +601,7 @@ dist_udevkeymap_DATA = \ - - udevkeymapforcereldir = $(libexecdir)/keymaps/force-release - dist_udevkeymapforcerel_DATA = \ -+ extras/keymap/force-release-maps/hp-other \ - extras/keymap/force-release-maps/samsung-other \ - extras/keymap/force-release-maps/common-volume-keys - -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index 562dc8d..6f7c0fd 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -35,4 +35,9 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite U300|Satellit - - ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys" - -+# These are all the HP laptops that setup a touchpad toggle key -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keyboard-force-release.sh $devpath hp-other" -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keyboard-force-release.sh $devpath hp-other" -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keyboard-force-release.sh $devpath hp-other" -+ - LABEL="force_release_end" -diff --git a/extras/keymap/force-release-maps/hp-other b/extras/keymap/force-release-maps/hp-other -new file mode 100644 -index 0000000..6621370 ---- /dev/null -+++ b/extras/keymap/force-release-maps/hp-other -@@ -0,0 +1,3 @@ -+# list of scancodes (hex or decimal), optional comment -+0xd8 # Touchpad off -+0xd9 # Touchpad on --- -1.7.3.2 - diff --git a/sources b/sources index 8dc2880..871f305 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -cd285a85f969518a671834de2f4d6614 udev-164.tar.bz2 -43b3842a00854e712b1d58af3a03e4ed udev-164.tar.bz2.sign +4db27d73fdbe94f47fd89fdd105c2dfb udev-166.tar.bz2 +3cb37564a589d4fedd6e7e3e178698d4 udev-166.tar.bz2.sign diff --git a/udev-pda-acl.patch b/udev-pda-acl.patch deleted file mode 100644 index b48103a..0000000 --- a/udev-pda-acl.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit d69207c3f20f0af2a5e510515ae5473f4fe54476 -Author: Harald Hoyer -Date: Fri Nov 12 15:44:34 2010 +0100 - - 70-acl.rules: add ACLs for ID_PDA devices - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index c7134bc..66375de 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -47,6 +47,9 @@ SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl" - # smart-card readers - ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" - -+# PDA devices -+ENV{ID_PDA}=="*?", TAG+="udev-acl" -+ - # joysticks - SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" - diff --git a/udev-random_temporary_ifname.patch b/udev-random_temporary_ifname.patch deleted file mode 100644 index ff5ad5c..0000000 --- a/udev-random_temporary_ifname.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/udev/udev-event.c b/udev/udev-event.c -index 0648735..5387c00 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -462,6 +462,7 @@ static void rename_netif_kernel_log(struct ifreq ifr) - static int rename_netif(struct udev_event *event) - { - struct udev_device *dev = event->dev; -+ char iftmp[IFNAMSIZ]; - int sk; - struct ifreq ifr; - int loop; -@@ -492,7 +493,8 @@ static int rename_netif(struct udev_event *event) - goto out; - - /* free our own name, another process may wait for us */ -- util_strscpyl(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL); -+ util_strscpyl(iftmp, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL); -+ sprintf(ifr.ifr_newname, "eth_%X",util_string_hash32(iftmp)); - err = ioctl(sk, SIOCSIFNAME, &ifr); - if (err < 0) { - err = -errno; diff --git a/udev-ressize.patch b/udev-ressize.patch deleted file mode 100644 index 788b859..0000000 --- a/udev-ressize.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 851dd4ddc5aeb1ee517145d9e3334c2017595321 -Author: Harald Hoyer -Date: Fri Nov 12 14:39:14 2010 +0100 - - udev-rules.c: change import property buffer to 16384 bytes - - import_program_into_properties() should have the same line length as - import_file_into_properties() - - see also https://bugzilla.redhat.com/show_bug.cgi?id=652318 - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 52f121c..ab7b6ae 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -751,7 +751,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p - { - struct udev *udev = udev_device_get_udev(dev); - char **envp; -- char result[4096]; -+ char result[UTIL_LINE_SIZE]; - size_t reslen; - char *line; - diff --git a/udev-post.init b/udev-retry.init similarity index 89% rename from udev-post.init rename to udev-retry.init index f882e0d..b4cb201 100644 --- a/udev-post.init +++ b/udev-retry.init @@ -1,6 +1,6 @@ #!/bin/bash # -# udev-post Post script for udev, after all filesystems are mounted +# udev-retry Post script for udev, after all filesystems are mounted # # Authors: Harald Hoyer # @@ -14,7 +14,7 @@ # Required-Stop: # Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Description: Moves the generated persistent udev rules to /etc/udev/rules.d -# Provides: udev-post +# Provides: udev-retry ### END INIT INFO . /etc/rc.d/init.d/functions @@ -49,12 +49,12 @@ case "$1" in fi done - touch /var/lock/subsys/udev-post + touch /var/lock/subsys/udev-retry exit 0 ;; stop) [ -w /var/lock/subsys ] || exit 4 - rm -f /var/lock/subsys/udev-post + rm -f /var/lock/subsys/udev-retry exit 0 ;; status) diff --git a/udev.spec b/udev.spec index 49dfbb6..be272ad 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 164 -Release: 9%{?dist} +Version: 166 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,13 +15,8 @@ Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source2: udev-post.init +Source2: udev-retry.init -Patch1: udev-ressize.patch -Patch2: udev-pda-acl.patch -Patch3: 0001-keymap-Add-force-release-for-HP-touchpad-off.patch -Patch4: 0001-extras-keymap-Make-touchpad-buttons-consistent.patch -Patch5: udev-random_temporary_ifname.patch Patch6: udev-164-no-v4l1.patch ExclusiveOS: Linux @@ -120,14 +115,15 @@ glib-based applications using libudev functionality. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %patch6 -p1 %build +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" + +# prevent man pages from re-building (xmlto) +find . -name "*.[1-8]" -exec touch '{}' \; +export V=1 + libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ --sysconfdir=%{_sysconfdir} \ @@ -179,7 +175,7 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d -install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post +install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-retry %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then @@ -200,8 +196,9 @@ if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then /sbin/chkconfig --del udev fi if [ "$1" -eq 0 ]; then - /sbin/chkconfig --del udev-post + /sbin/chkconfig --del udev-retry fi +/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : exit 0 %pre @@ -231,15 +228,17 @@ fi exit 0 %post +# convert old database files +/sbin/udevadm info --convert-db >/dev/null 2>&1 || : + # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then /sbin/udevd -d - /sbin/udevadm control --start-exec-queue + /sbin/udevadm control --start-exec-queue || : fi fi -/sbin/chkconfig --add udev-post -#/usr/bin/systemd-install --system --realize=minimal enable udev.service >/dev/null 2>&1 || : +/sbin/chkconfig --add udev-retry exit 0 @@ -277,7 +276,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/mtd_probe %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ -%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post +%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-retry %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -361,6 +360,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Feb 16 2011 Harald Hoyer 166-1 +- renamed udev-post initscript to udev-retry to match + upstream systemd service name +- version 166 + * Mon Feb 07 2011 Fedora Release Engineering - 164-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 400c0eaaaae00808c3a5a259ac14788289ab5aa0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Feb 2011 18:26:09 +0100 Subject: [PATCH 592/640] - renamed udev-post initscript to udev-retry to match upstream systemd service name - version 166 --- .gitignore | 2 + ...map-Make-touchpad-buttons-consistent.patch | 232 ------------------ ...dd-force-release-for-HP-touchpad-off.patch | 56 ----- sources | 4 +- udev-pda-acl.patch | 20 -- udev-random_temporary_ifname.patch | 22 -- udev-ressize.patch | 24 -- udev-post.init => udev-retry.init | 8 +- udev.spec | 42 ++-- 9 files changed, 31 insertions(+), 379 deletions(-) delete mode 100644 0001-extras-keymap-Make-touchpad-buttons-consistent.patch delete mode 100644 0001-keymap-Add-force-release-for-HP-touchpad-off.patch delete mode 100644 udev-pda-acl.patch delete mode 100644 udev-random_temporary_ifname.patch delete mode 100644 udev-ressize.patch rename udev-post.init => udev-retry.init (89%) diff --git a/.gitignore b/.gitignore index 65d08f4..ff4586d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ udev-160.tar.bz2 /udev-164.tar.bz2 /udev-164.tar.bz2.sign +/udev-166.tar.bz2 +/udev-166.tar.bz2.sign diff --git a/0001-extras-keymap-Make-touchpad-buttons-consistent.patch b/0001-extras-keymap-Make-touchpad-buttons-consistent.patch deleted file mode 100644 index bd36b5f..0000000 --- a/0001-extras-keymap-Make-touchpad-buttons-consistent.patch +++ /dev/null @@ -1,232 +0,0 @@ -From a1ca5f60e0770299c5c5f21bd371f5823802412b Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 4 Nov 2010 23:58:56 +0000 -Subject: [PATCH] extras/keymap: Make touchpad buttons consistent - -We'll need to standardise on the Touchpad related keys in udev, kernel, and -X.org. I selected F21 for XF86TouchpadToggle, F22 for XF86TouchpadOn and F23 -for XF86TouchpadOff. - -See: -https://bugs.freedesktop.org/show_bug.cgi?id=31333 - -Signed-off-by: Martin Pitt ---- - extras/keymap/keymaps/acer | 2 +- - extras/keymap/keymaps/dell | 4 ++-- - extras/keymap/keymaps/everex-xt5000 | 2 +- - extras/keymap/keymaps/hewlett-packard-2510p_2530p | 4 ++-- - extras/keymap/keymaps/hewlett-packard-pavilion | 4 ++-- - extras/keymap/keymaps/hewlett-packard-tx2 | 2 +- - .../lenovo-thinkpad-usb-keyboard-trackpoint | 2 +- - extras/keymap/keymaps/lg-x110 | 4 ++-- - extras/keymap/keymaps/micro-star | 2 +- - extras/keymap/keymaps/module-lenovo | 2 +- - extras/keymap/keymaps/onkyo | 2 +- - extras/keymap/keymaps/samsung-other | 2 +- - extras/keymap/keymaps/samsung-sx20s | 4 ++-- - extras/keymap/keymaps/toshiba-satellite_a110 | 4 ++-- - extras/keymap/keymaps/toshiba-satellite_m30x | 4 ++-- - extras/keymap/keymaps/zepto-znote | 2 +- - 16 files changed, 23 insertions(+), 23 deletions(-) - -diff --git a/extras/keymap/keymaps/acer b/extras/keymap/keymaps/acer -index 6abe39c..4e7c297 100644 ---- a/extras/keymap/keymaps/acer -+++ b/extras/keymap/keymaps/acer -@@ -14,7 +14,7 @@ - 0xEE brightnessup # Fn+Right - 0xEF brightnessdown # Fn+Left - 0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on) --0xF2 f22 # Fn+F7 Touchpad toggle (on-to-off) -+0xF2 f23 # Fn+F7 Touchpad toggle (on-to-off) - 0xF3 prog2 # "P2" programmable button - 0xF4 prog1 # "P1" programmable button - 0xF5 presentation -diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell -index 1a2e433..fbbb903 100644 ---- a/extras/keymap/keymaps/dell -+++ b/extras/keymap/keymaps/dell -@@ -21,9 +21,9 @@ - 0x99 nextsong # Front panel next song - 0x9A setup # Tablet tools button - 0x9B switchvideomode # Display Toggle button --0x9E f22 #touchpad toggle -+0x9E f21 #touchpad toggle - 0xA2 playpause # Front panel play/pause - 0xA4 stopcd # Front panel stop - 0xED media # MediaDirect button - 0xD8 screenlock # FIXME: Tablet lock button --0xD9 f22 # touchpad toggle -+0xD9 f21 # touchpad toggle -diff --git a/extras/keymap/keymaps/everex-xt5000 b/extras/keymap/keymaps/everex-xt5000 -index 53bdd7a..4823a83 100644 ---- a/extras/keymap/keymaps/everex-xt5000 -+++ b/extras/keymap/keymaps/everex-xt5000 -@@ -1,5 +1,5 @@ - 0x5C media --0x65 f22 # Fn+F5 Touchpad toggle -+0x65 f21 # Fn+F5 Touchpad toggle - 0x67 prog3 # Fan Speed Control button - 0x6F brightnessup - 0x7F brightnessdown -diff --git a/extras/keymap/keymaps/hewlett-packard-2510p_2530p b/extras/keymap/keymaps/hewlett-packard-2510p_2530p -index 2bc70c2..41ad2e9 100644 ---- a/extras/keymap/keymaps/hewlett-packard-2510p_2530p -+++ b/extras/keymap/keymaps/hewlett-packard-2510p_2530p -@@ -1,2 +1,2 @@ --0xD8 f22 # touchpad off --0xD9 f23 # touchpad on -+0xD8 f23 # touchpad off -+0xD9 f22 # touchpad on -diff --git a/extras/keymap/keymaps/hewlett-packard-pavilion b/extras/keymap/keymaps/hewlett-packard-pavilion -index a55d2b7..3d3cefc 100644 ---- a/extras/keymap/keymaps/hewlett-packard-pavilion -+++ b/extras/keymap/keymaps/hewlett-packard-pavilion -@@ -1,3 +1,3 @@ - 0x88 media # FIXME: quick play --0xD8 f22 # touchpad off --0xD9 f23 # touchpad on -+0xD8 f23 # touchpad off -+0xD9 f22 # touchpad on -diff --git a/extras/keymap/keymaps/hewlett-packard-tx2 b/extras/keymap/keymaps/hewlett-packard-tx2 -index 206c004..36a690f 100644 ---- a/extras/keymap/keymaps/hewlett-packard-tx2 -+++ b/extras/keymap/keymaps/hewlett-packard-tx2 -@@ -1,3 +1,3 @@ - 0xC2 media --0xD8 f22 # Toggle touchpad button on tx2 (OFF) -+0xD8 f23 # Toggle touchpad button on tx2 (OFF) - 0xD9 f22 # Toggle touchpad button on tx2 (ON) -diff --git a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint -index 7612f79..bc91470 100644 ---- a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint -+++ b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint -@@ -2,7 +2,7 @@ - 0x90013 battery # Fn+F3 - 0x90014 wlan # Fn+F5 - 0x90016 switchvideomode # Fn+F7 --0x90017 f22 # Fn+F8 touchpadtoggle -+0x90017 f21 # Fn+F8 touchpadtoggle - 0x90019 suspend # Fn+F12 - 0x9001A brightnessup # Fn+Home - 0x9001B brightnessdown # Fn+End -diff --git a/extras/keymap/keymaps/lg-x110 b/extras/keymap/keymaps/lg-x110 -index a61cf3d..ba08cba 100644 ---- a/extras/keymap/keymaps/lg-x110 -+++ b/extras/keymap/keymaps/lg-x110 -@@ -6,7 +6,7 @@ - 0xB3 suspend # Fn-F12 - 0xDF sleep # Fn-F4 - # 0xE2 bluetooth # satellite dish2 --0xE4 f22 # Fn-F5 Touchpad disable -+0xE4 f21 # Fn-F5 Touchpad disable - 0xF6 wlan # Fn-F6 - 0xF7 reserved # brightnessdown # Fn-Down --0xF8 reserved # brightnessup # Fn-Up -\ No newline at end of file -+0xF8 reserved # brightnessup # Fn-Up -diff --git a/extras/keymap/keymaps/micro-star b/extras/keymap/keymaps/micro-star -index 0de5ae6..4a43869 100644 ---- a/extras/keymap/keymaps/micro-star -+++ b/extras/keymap/keymaps/micro-star -@@ -4,7 +4,7 @@ - 0xB2 www # e button - 0xDF sleep # Fn-F12 - 0xE2 bluetooth # satellite dish2 --0xE4 f22 # Fn-F3 Touchpad disable -+0xE4 f21 # Fn-F3 Touchpad disable - 0xEC email # envelope button - 0xEE camera # Fn-F6 camera disable - 0xF6 wlan # satellite dish1 -diff --git a/extras/keymap/keymaps/module-lenovo b/extras/keymap/keymaps/module-lenovo -index 7c597bd..9cb74b2 100644 ---- a/extras/keymap/keymaps/module-lenovo -+++ b/extras/keymap/keymaps/module-lenovo -@@ -3,7 +3,7 @@ - 0x3 sleep # Fn+F4 - 0x4 wlan # Fn+F5 - 0x6 switchvideomode # Fn+F7 --0x7 f22 # Fn+F8 touchpadtoggle -+0x7 f21 # Fn+F8 touchpadtoggle - 0x8 f24 # Fn+F9 undock - 0xB suspend # Fn+F12 - 0xF brightnessup # Fn+Home -diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo -index 7dd80a1..ee864ad 100644 ---- a/extras/keymap/keymaps/onkyo -+++ b/extras/keymap/keymaps/onkyo -@@ -8,7 +8,7 @@ - 0xF0 media # Fn+R - 0xF5 switchvideomode # Fn+E - 0xF6 camera # Fn+T --0xF7 f22 # Fn+Y (touchpad toggle) -+0xF7 f21 # Fn+Y (touchpad toggle) - 0xF8 brightnessup # Fn+S - 0xF9 brightnessdown # Fn+A - 0xFB wlan # Fn+J -diff --git a/extras/keymap/keymaps/samsung-other b/extras/keymap/keymaps/samsung-other -index 6a0928c..3ac0c2f 100644 ---- a/extras/keymap/keymaps/samsung-other -+++ b/extras/keymap/keymaps/samsung-other -@@ -11,4 +11,4 @@ - 0xB3 prog3 # Fn+F8 switch power mode (battery/dynamic/performance) - 0xB4 wlan # Fn+F9 (X60P) - 0xF7 f22 # Fn+F10 Touchpad on --0xF9 f22 # Fn+F10 Touchpad off -+0xF9 f23 # Fn+F10 Touchpad off -diff --git a/extras/keymap/keymaps/samsung-sx20s b/extras/keymap/keymaps/samsung-sx20s -index daf7d3e..9d954ee 100644 ---- a/extras/keymap/keymaps/samsung-sx20s -+++ b/extras/keymap/keymaps/samsung-sx20s -@@ -1,4 +1,4 @@ - 0x74 mute - 0x75 mute --0x77 f21 # FIXME: Touchpad on --0x79 f21 # FIXME: Touchpad off -+0x77 f22 # Touchpad on -+0x79 f23 # Touchpad off -diff --git a/extras/keymap/keymaps/toshiba-satellite_a110 b/extras/keymap/keymaps/toshiba-satellite_a110 -index 0f2aaec..1429409 100644 ---- a/extras/keymap/keymaps/toshiba-satellite_a110 -+++ b/extras/keymap/keymaps/toshiba-satellite_a110 -@@ -1,8 +1,8 @@ - 0x92 stop - 0x93 www - 0x94 media --0x9E f21 # FIXME: Touchpad on --0x9F f21 # FIXME: Touchpad off -+0x9E f22 # Touchpad on -+0x9F f23 # Touchpad off - 0xB9 nextsong - 0xD9 brightnessup - 0xEE screenlock -diff --git a/extras/keymap/keymaps/toshiba-satellite_m30x b/extras/keymap/keymaps/toshiba-satellite_m30x -index cf6d912..9280ae0 100644 ---- a/extras/keymap/keymaps/toshiba-satellite_m30x -+++ b/extras/keymap/keymaps/toshiba-satellite_m30x -@@ -2,6 +2,6 @@ - 0xd9 brightnessup - 0xee screenlock - 0x93 media --0x9e prog1 #touchpad_enable --0x9f prog2 #touchpad_disable -+0x9e f22 #touchpad_enable -+0x9f f23 #touchpad_disable - -diff --git a/extras/keymap/keymaps/zepto-znote b/extras/keymap/keymaps/zepto-znote -index e076516..cf72fda 100644 ---- a/extras/keymap/keymaps/zepto-znote -+++ b/extras/keymap/keymaps/zepto-znote -@@ -1,7 +1,7 @@ - 0x93 switchvideomode # Fn+F3 Toggle Video Output - 0x95 brightnessdown # Fn+F4 Brightness Down - 0x91 brightnessup # Fn+F5 Brightness Up --0xA5 f22 # Fn+F6 Disable Touchpad -+0xA5 f23 # Fn+F6 Disable Touchpad - 0xA6 f22 # Fn+F6 Enable Touchpad - 0xA7 bluetooth # Fn+F10 Enable Bluetooth - 0XA9 bluetooth # Fn+F10 Disable Bluetooth --- -1.7.3.2 - diff --git a/0001-keymap-Add-force-release-for-HP-touchpad-off.patch b/0001-keymap-Add-force-release-for-HP-touchpad-off.patch deleted file mode 100644 index 1ba3551..0000000 --- a/0001-keymap-Add-force-release-for-HP-touchpad-off.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ecfad20871e855d9e54d3a528cf9219ce5c93626 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Mon, 1 Nov 2010 16:29:09 +0000 -Subject: [PATCH] keymap: Add force release for HP touchpad off - -Force the touchpad off/on keys getting released, as they usually -only send a "repeat". - -https://bugzilla.redhat.com/show_bug.cgi?id=623239 - -Signed-off-by: Martin Pitt ---- - Makefile.am | 1 + - extras/keymap/95-keyboard-force-release.rules | 5 +++++ - extras/keymap/force-release-maps/hp-other | 3 +++ - 3 files changed, 9 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/force-release-maps/hp-other - -diff --git a/Makefile.am b/Makefile.am -index 3a95046..032eb28 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -601,6 +601,7 @@ dist_udevkeymap_DATA = \ - - udevkeymapforcereldir = $(libexecdir)/keymaps/force-release - dist_udevkeymapforcerel_DATA = \ -+ extras/keymap/force-release-maps/hp-other \ - extras/keymap/force-release-maps/samsung-other \ - extras/keymap/force-release-maps/common-volume-keys - -diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules -index 562dc8d..6f7c0fd 100644 ---- a/extras/keymap/95-keyboard-force-release.rules -+++ b/extras/keymap/95-keyboard-force-release.rules -@@ -35,4 +35,9 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite U300|Satellit - - ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys" - -+# These are all the HP laptops that setup a touchpad toggle key -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keyboard-force-release.sh $devpath hp-other" -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keyboard-force-release.sh $devpath hp-other" -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keyboard-force-release.sh $devpath hp-other" -+ - LABEL="force_release_end" -diff --git a/extras/keymap/force-release-maps/hp-other b/extras/keymap/force-release-maps/hp-other -new file mode 100644 -index 0000000..6621370 ---- /dev/null -+++ b/extras/keymap/force-release-maps/hp-other -@@ -0,0 +1,3 @@ -+# list of scancodes (hex or decimal), optional comment -+0xd8 # Touchpad off -+0xd9 # Touchpad on --- -1.7.3.2 - diff --git a/sources b/sources index 8dc2880..871f305 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -cd285a85f969518a671834de2f4d6614 udev-164.tar.bz2 -43b3842a00854e712b1d58af3a03e4ed udev-164.tar.bz2.sign +4db27d73fdbe94f47fd89fdd105c2dfb udev-166.tar.bz2 +3cb37564a589d4fedd6e7e3e178698d4 udev-166.tar.bz2.sign diff --git a/udev-pda-acl.patch b/udev-pda-acl.patch deleted file mode 100644 index b48103a..0000000 --- a/udev-pda-acl.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit d69207c3f20f0af2a5e510515ae5473f4fe54476 -Author: Harald Hoyer -Date: Fri Nov 12 15:44:34 2010 +0100 - - 70-acl.rules: add ACLs for ID_PDA devices - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index c7134bc..66375de 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -47,6 +47,9 @@ SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl" - # smart-card readers - ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" - -+# PDA devices -+ENV{ID_PDA}=="*?", TAG+="udev-acl" -+ - # joysticks - SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" - diff --git a/udev-random_temporary_ifname.patch b/udev-random_temporary_ifname.patch deleted file mode 100644 index ff5ad5c..0000000 --- a/udev-random_temporary_ifname.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/udev/udev-event.c b/udev/udev-event.c -index 0648735..5387c00 100644 ---- a/udev/udev-event.c -+++ b/udev/udev-event.c -@@ -462,6 +462,7 @@ static void rename_netif_kernel_log(struct ifreq ifr) - static int rename_netif(struct udev_event *event) - { - struct udev_device *dev = event->dev; -+ char iftmp[IFNAMSIZ]; - int sk; - struct ifreq ifr; - int loop; -@@ -492,7 +493,8 @@ static int rename_netif(struct udev_event *event) - goto out; - - /* free our own name, another process may wait for us */ -- util_strscpyl(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL); -+ util_strscpyl(iftmp, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL); -+ sprintf(ifr.ifr_newname, "eth_%X",util_string_hash32(iftmp)); - err = ioctl(sk, SIOCSIFNAME, &ifr); - if (err < 0) { - err = -errno; diff --git a/udev-ressize.patch b/udev-ressize.patch deleted file mode 100644 index 788b859..0000000 --- a/udev-ressize.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 851dd4ddc5aeb1ee517145d9e3334c2017595321 -Author: Harald Hoyer -Date: Fri Nov 12 14:39:14 2010 +0100 - - udev-rules.c: change import property buffer to 16384 bytes - - import_program_into_properties() should have the same line length as - import_file_into_properties() - - see also https://bugzilla.redhat.com/show_bug.cgi?id=652318 - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 52f121c..ab7b6ae 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -751,7 +751,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p - { - struct udev *udev = udev_device_get_udev(dev); - char **envp; -- char result[4096]; -+ char result[UTIL_LINE_SIZE]; - size_t reslen; - char *line; - diff --git a/udev-post.init b/udev-retry.init similarity index 89% rename from udev-post.init rename to udev-retry.init index f882e0d..b4cb201 100644 --- a/udev-post.init +++ b/udev-retry.init @@ -1,6 +1,6 @@ #!/bin/bash # -# udev-post Post script for udev, after all filesystems are mounted +# udev-retry Post script for udev, after all filesystems are mounted # # Authors: Harald Hoyer # @@ -14,7 +14,7 @@ # Required-Stop: # Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d # Description: Moves the generated persistent udev rules to /etc/udev/rules.d -# Provides: udev-post +# Provides: udev-retry ### END INIT INFO . /etc/rc.d/init.d/functions @@ -49,12 +49,12 @@ case "$1" in fi done - touch /var/lock/subsys/udev-post + touch /var/lock/subsys/udev-retry exit 0 ;; stop) [ -w /var/lock/subsys ] || exit 4 - rm -f /var/lock/subsys/udev-post + rm -f /var/lock/subsys/udev-retry exit 0 ;; status) diff --git a/udev.spec b/udev.spec index 49dfbb6..be272ad 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 164 -Release: 9%{?dist} +Version: 166 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,13 +15,8 @@ Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source2: udev-post.init +Source2: udev-retry.init -Patch1: udev-ressize.patch -Patch2: udev-pda-acl.patch -Patch3: 0001-keymap-Add-force-release-for-HP-touchpad-off.patch -Patch4: 0001-extras-keymap-Make-touchpad-buttons-consistent.patch -Patch5: udev-random_temporary_ifname.patch Patch6: udev-164-no-v4l1.patch ExclusiveOS: Linux @@ -120,14 +115,15 @@ glib-based applications using libudev functionality. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %patch6 -p1 %build +export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" + +# prevent man pages from re-building (xmlto) +find . -name "*.[1-8]" -exec touch '{}' \; +export V=1 + libtoolize -f -c %configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ --sysconfdir=%{_sysconfdir} \ @@ -179,7 +175,7 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d -install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post +install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-retry %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then @@ -200,8 +196,9 @@ if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then /sbin/chkconfig --del udev fi if [ "$1" -eq 0 ]; then - /sbin/chkconfig --del udev-post + /sbin/chkconfig --del udev-retry fi +/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : exit 0 %pre @@ -231,15 +228,17 @@ fi exit 0 %post +# convert old database files +/sbin/udevadm info --convert-db >/dev/null 2>&1 || : + # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then /sbin/udevd -d - /sbin/udevadm control --start-exec-queue + /sbin/udevadm control --start-exec-queue || : fi fi -/sbin/chkconfig --add udev-post -#/usr/bin/systemd-install --system --realize=minimal enable udev.service >/dev/null 2>&1 || : +/sbin/chkconfig --add udev-retry exit 0 @@ -277,7 +276,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/mtd_probe %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ -%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post +%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-retry %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -361,6 +360,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Feb 16 2011 Harald Hoyer 166-1 +- renamed udev-post initscript to udev-retry to match + upstream systemd service name +- version 166 + * Mon Feb 07 2011 Fedora Release Engineering - 164-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 99318e91b4c0852f5c359dda15e6e1c22a910fe7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Mar 2011 13:35:43 +0100 Subject: [PATCH 593/640] - add ACLs for harmony remote controls Resolves: rhbz#559412 - fixed CDROM profile handling --- ...9245f2d2fd03c2586a7f1140300b073a4abe.patch | 25 ++ ...6a377285d5943563cfa397e8b350e43878ec.patch | 345 ++++++++++++++++++ udev.spec | 12 +- 3 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch create mode 100644 udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch diff --git a/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch b/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch new file mode 100644 index 0000000..83d2c11 --- /dev/null +++ b/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch @@ -0,0 +1,25 @@ +commit 5e199245f2d2fd03c2586a7f1140300b073a4abe +Author: Harald Hoyer +Date: Thu Mar 17 20:36:20 2011 +0100 + + udev-acl/70-acl.rules: tag ID_REMOTE_CONTROL with acl + + Used by "concordance" to access Logitech Harmony programmable remote + controls. + + http://www.phildev.net/concordance/ + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index dd5a7ab..037349d 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -52,6 +52,9 @@ ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" + # PDA devices + ENV{ID_PDA}=="*?", TAG+="udev-acl" + ++# Programmable remote control ++ENV{ID_REMOTE_CONTROL}=="1", TAG+="udev-acl" ++ + # joysticks + SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" + diff --git a/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch b/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch new file mode 100644 index 0000000..699add5 --- /dev/null +++ b/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch @@ -0,0 +1,345 @@ +commit 98ab6a377285d5943563cfa397e8b350e43878ec +Author: David Zeuthen +Date: Tue Mar 15 12:05:00 2011 -0400 + + cdrom_id: Don't ignore profiles when there is no media available + + Just because the GET CONFIGURATION MMC-2 command returns the current + profile as 0 does not mean that we can ignore the profiles describing + the capabilities of the drive - it only means that there currently is + no recognized media in the drive. Therefore, do process the returned + profiles even when cur_profile is 0. + + This fixes a bug where only + + ID_CDROM=1 + ID_CDROM_CD_R=1 + ID_CDROM_CD_RW=1 + ID_CDROM_DVD=1 + ID_CDROM_DVD_R=1 + ID_CDROM_DVD_RAM=1 + + was returned when there is no media in the drive instead of + + ID_CDROM=1 + ID_CDROM_CD=1 + ID_CDROM_CD_R=1 + ID_CDROM_CD_RW=1 + ID_CDROM_DVD=1 + ID_CDROM_DVD_R=1 + ID_CDROM_DVD_RW=1 + ID_CDROM_DVD_RAM=1 + ID_CDROM_DVD_PLUS_R=1 + ID_CDROM_DVD_PLUS_RW=1 + ID_CDROM_DVD_PLUS_R_DL=1 + ID_CDROM_BD=1 + ID_CDROM_BD_R=1 + ID_CDROM_BD_RE=1 + ID_CDROM_HDDVD=1 + + as is returned now. + + Signed-off-by: David Zeuthen + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 4a58a49..b2f897e 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -261,6 +261,115 @@ static int cd_inquiry(struct udev *udev, int fd) { + return 0; + } + ++static void feature_profile_media(struct udev *udev, int cur_profile) ++{ ++ switch (cur_profile) { ++ case 0x03: ++ case 0x04: ++ case 0x05: ++ info(udev, "profile 0x%02x \n", cur_profile); ++ cd_media = 1; ++ cd_media_mo = 1; ++ break; ++ case 0x08: ++ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); ++ cd_media = 1; ++ cd_media_cd_rom = 1; ++ break; ++ case 0x09: ++ info(udev, "profile 0x%02x media_cd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_cd_r = 1; ++ break; ++ case 0x0a: ++ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); ++ cd_media = 1; ++ cd_media_cd_rw = 1; ++ break; ++ case 0x10: ++ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rom = 1; ++ break; ++ case 0x11: ++ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_r = 1; ++ break; ++ case 0x12: ++ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_ram = 1; ++ break; ++ case 0x13: ++ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_ro = 1; ++ break; ++ case 0x14: ++ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_seq = 1; ++ break; ++ case 0x1B: ++ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_r = 1; ++ break; ++ case 0x1A: ++ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_rw = 1; ++ break; ++ case 0x2A: ++ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_rw_dl = 1; ++ break; ++ case 0x2B: ++ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_r_dl = 1; ++ break; ++ case 0x40: ++ info(udev, "profile 0x%02x media_bd\n", cur_profile); ++ cd_media = 1; ++ cd_media_bd = 1; ++ break; ++ case 0x41: ++ case 0x42: ++ info(udev, "profile 0x%02x media_bd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_bd_r = 1; ++ break; ++ case 0x43: ++ info(udev, "profile 0x%02x media_bd_re\n", cur_profile); ++ cd_media = 1; ++ cd_media_bd_re = 1; ++ break; ++ case 0x50: ++ info(udev, "profile 0x%02x media_hddvd\n", cur_profile); ++ cd_media = 1; ++ cd_media_hddvd = 1; ++ break; ++ case 0x51: ++ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_hddvd_r = 1; ++ break; ++ case 0x52: ++ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); ++ cd_media = 1; ++ cd_media_hddvd_rw = 1; ++ break; ++ default: ++ info(udev, "profile 0x%02x \n", cur_profile); ++ break; ++ } ++} ++ + static int feature_profiles(struct udev *udev, const unsigned char *profiles, size_t size) + { + unsigned int i; +@@ -350,6 +459,7 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si + return 0; + } + ++/* returns 0 if media was detected */ + static int cd_profiles_old_mmc(struct udev *udev, int fd) + { + struct scsi_cmd sc; +@@ -389,6 +499,7 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd) + return 0; + } + ++/* returns 0 if media was detected */ + static int cd_profiles(struct udev *udev, int fd) + { + struct scsi_cmd sc; +@@ -397,6 +508,9 @@ static int cd_profiles(struct udev *udev, int fd) + unsigned int len; + unsigned int i; + int err; ++ int ret; ++ ++ ret = -1; + + /* First query the current profile */ + scsi_cmd_init(udev, &sc, features, sizeof(features)); +@@ -410,126 +524,20 @@ static int cd_profiles(struct udev *udev, int fd) + if (SK(err) == 0x5 && ASC(err) == 0x20) { + info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n"); + info(udev, "trying to work around the problem\n"); +- return cd_profiles_old_mmc(udev, fd); ++ ret = cd_profiles_old_mmc(udev, fd); + } +- return -1; ++ goto out; + } + + cur_profile = features[6] << 8 | features[7]; + if (cur_profile > 0) { + info(udev, "current profile 0x%02x\n", cur_profile); ++ feature_profile_media (udev, cur_profile); ++ ret = 0; /* we have media */ + } else { + info(udev, "no current profile, assuming no media\n"); +- return -1; + } + +- switch (cur_profile) { +- case 0x03: +- case 0x04: +- case 0x05: +- info(udev, "profile 0x%02x \n", cur_profile); +- cd_media = 1; +- cd_media_mo = 1; +- break; +- case 0x08: +- info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); +- cd_media = 1; +- cd_media_cd_rom = 1; +- break; +- case 0x09: +- info(udev, "profile 0x%02x media_cd_r\n", cur_profile); +- cd_media = 1; +- cd_media_cd_r = 1; +- break; +- case 0x0a: +- info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); +- cd_media = 1; +- cd_media_cd_rw = 1; +- break; +- case 0x10: +- info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_rom = 1; +- break; +- case 0x11: +- info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_r = 1; +- break; +- case 0x12: +- info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_ram = 1; +- break; +- case 0x13: +- info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_rw = 1; +- cd_media_dvd_rw_ro = 1; +- break; +- case 0x14: +- info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_rw = 1; +- cd_media_dvd_rw_seq = 1; +- break; +- case 0x1B: +- info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_r = 1; +- break; +- case 0x1A: +- info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_rw = 1; +- break; +- case 0x2A: +- info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_rw_dl = 1; +- break; +- case 0x2B: +- info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_r_dl = 1; +- break; +- case 0x40: +- info(udev, "profile 0x%02x media_bd\n", cur_profile); +- cd_media = 1; +- cd_media_bd = 1; +- break; +- case 0x41: +- case 0x42: +- info(udev, "profile 0x%02x media_bd_r\n", cur_profile); +- cd_media = 1; +- cd_media_bd_r = 1; +- break; +- case 0x43: +- info(udev, "profile 0x%02x media_bd_re\n", cur_profile); +- cd_media = 1; +- cd_media_bd_re = 1; +- break; +- case 0x50: +- info(udev, "profile 0x%02x media_hddvd\n", cur_profile); +- cd_media = 1; +- cd_media_hddvd = 1; +- break; +- case 0x51: +- info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); +- cd_media = 1; +- cd_media_hddvd_r = 1; +- break; +- case 0x52: +- info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); +- cd_media = 1; +- cd_media_hddvd_rw = 1; +- break; +- default: +- info(udev, "profile 0x%02x \n", cur_profile); +- break; +- } +- +- + len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3]; + info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len); + +@@ -577,8 +585,8 @@ static int cd_profiles(struct udev *udev, int fd) + break; + } + } +- +- return 0; ++out: ++ return ret; + } + + static int cd_media_info(struct udev *udev, int fd) +@@ -905,9 +913,12 @@ int main(int argc, char *argv[]) + goto print; + + /* read drive and possibly current profile */ +- if (cd_profiles(udev, fd) < 0) ++ if (cd_profiles(udev, fd) != 0) + goto print; + ++ /* at this point we are guaranteed to have media in the ++ * drive - find out more about it */ ++ + /* get session/track info */ + cd_media_toc(udev, fd); + diff --git a/udev.spec b/udev.spec index be272ad..105de70 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 166 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,9 @@ Source1: start_udev Source2: udev-retry.init Patch6: udev-164-no-v4l1.patch +Patch7: udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch +Patch8: udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -116,6 +119,8 @@ glib-based applications using libudev functionality. %prep %setup -q %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" @@ -360,6 +365,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Mar 23 2011 Harald Hoyer 166-2 +- add ACLs for harmony remote controls +Resolves: rhbz#559412 +- fixed CDROM profile handling + * Wed Feb 16 2011 Harald Hoyer 166-1 - renamed udev-post initscript to udev-retry to match upstream systemd service name From 545bd16ca5fdbd22a9e385941b04ca3ba2c93d87 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Mar 2011 13:35:43 +0100 Subject: [PATCH 594/640] - add ACLs for harmony remote controls Resolves: rhbz#559412 - fixed CDROM profile handling --- ...9245f2d2fd03c2586a7f1140300b073a4abe.patch | 25 ++ ...6a377285d5943563cfa397e8b350e43878ec.patch | 345 ++++++++++++++++++ udev.spec | 12 +- 3 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch create mode 100644 udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch diff --git a/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch b/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch new file mode 100644 index 0000000..83d2c11 --- /dev/null +++ b/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch @@ -0,0 +1,25 @@ +commit 5e199245f2d2fd03c2586a7f1140300b073a4abe +Author: Harald Hoyer +Date: Thu Mar 17 20:36:20 2011 +0100 + + udev-acl/70-acl.rules: tag ID_REMOTE_CONTROL with acl + + Used by "concordance" to access Logitech Harmony programmable remote + controls. + + http://www.phildev.net/concordance/ + +diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules +index dd5a7ab..037349d 100644 +--- a/extras/udev-acl/70-acl.rules ++++ b/extras/udev-acl/70-acl.rules +@@ -52,6 +52,9 @@ ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" + # PDA devices + ENV{ID_PDA}=="*?", TAG+="udev-acl" + ++# Programmable remote control ++ENV{ID_REMOTE_CONTROL}=="1", TAG+="udev-acl" ++ + # joysticks + SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" + diff --git a/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch b/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch new file mode 100644 index 0000000..699add5 --- /dev/null +++ b/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch @@ -0,0 +1,345 @@ +commit 98ab6a377285d5943563cfa397e8b350e43878ec +Author: David Zeuthen +Date: Tue Mar 15 12:05:00 2011 -0400 + + cdrom_id: Don't ignore profiles when there is no media available + + Just because the GET CONFIGURATION MMC-2 command returns the current + profile as 0 does not mean that we can ignore the profiles describing + the capabilities of the drive - it only means that there currently is + no recognized media in the drive. Therefore, do process the returned + profiles even when cur_profile is 0. + + This fixes a bug where only + + ID_CDROM=1 + ID_CDROM_CD_R=1 + ID_CDROM_CD_RW=1 + ID_CDROM_DVD=1 + ID_CDROM_DVD_R=1 + ID_CDROM_DVD_RAM=1 + + was returned when there is no media in the drive instead of + + ID_CDROM=1 + ID_CDROM_CD=1 + ID_CDROM_CD_R=1 + ID_CDROM_CD_RW=1 + ID_CDROM_DVD=1 + ID_CDROM_DVD_R=1 + ID_CDROM_DVD_RW=1 + ID_CDROM_DVD_RAM=1 + ID_CDROM_DVD_PLUS_R=1 + ID_CDROM_DVD_PLUS_RW=1 + ID_CDROM_DVD_PLUS_R_DL=1 + ID_CDROM_BD=1 + ID_CDROM_BD_R=1 + ID_CDROM_BD_RE=1 + ID_CDROM_HDDVD=1 + + as is returned now. + + Signed-off-by: David Zeuthen + +diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c +index 4a58a49..b2f897e 100644 +--- a/extras/cdrom_id/cdrom_id.c ++++ b/extras/cdrom_id/cdrom_id.c +@@ -261,6 +261,115 @@ static int cd_inquiry(struct udev *udev, int fd) { + return 0; + } + ++static void feature_profile_media(struct udev *udev, int cur_profile) ++{ ++ switch (cur_profile) { ++ case 0x03: ++ case 0x04: ++ case 0x05: ++ info(udev, "profile 0x%02x \n", cur_profile); ++ cd_media = 1; ++ cd_media_mo = 1; ++ break; ++ case 0x08: ++ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); ++ cd_media = 1; ++ cd_media_cd_rom = 1; ++ break; ++ case 0x09: ++ info(udev, "profile 0x%02x media_cd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_cd_r = 1; ++ break; ++ case 0x0a: ++ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); ++ cd_media = 1; ++ cd_media_cd_rw = 1; ++ break; ++ case 0x10: ++ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rom = 1; ++ break; ++ case 0x11: ++ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_r = 1; ++ break; ++ case 0x12: ++ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_ram = 1; ++ break; ++ case 0x13: ++ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_ro = 1; ++ break; ++ case 0x14: ++ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_rw = 1; ++ cd_media_dvd_rw_seq = 1; ++ break; ++ case 0x1B: ++ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_r = 1; ++ break; ++ case 0x1A: ++ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_rw = 1; ++ break; ++ case 0x2A: ++ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_rw_dl = 1; ++ break; ++ case 0x2B: ++ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); ++ cd_media = 1; ++ cd_media_dvd_plus_r_dl = 1; ++ break; ++ case 0x40: ++ info(udev, "profile 0x%02x media_bd\n", cur_profile); ++ cd_media = 1; ++ cd_media_bd = 1; ++ break; ++ case 0x41: ++ case 0x42: ++ info(udev, "profile 0x%02x media_bd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_bd_r = 1; ++ break; ++ case 0x43: ++ info(udev, "profile 0x%02x media_bd_re\n", cur_profile); ++ cd_media = 1; ++ cd_media_bd_re = 1; ++ break; ++ case 0x50: ++ info(udev, "profile 0x%02x media_hddvd\n", cur_profile); ++ cd_media = 1; ++ cd_media_hddvd = 1; ++ break; ++ case 0x51: ++ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); ++ cd_media = 1; ++ cd_media_hddvd_r = 1; ++ break; ++ case 0x52: ++ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); ++ cd_media = 1; ++ cd_media_hddvd_rw = 1; ++ break; ++ default: ++ info(udev, "profile 0x%02x \n", cur_profile); ++ break; ++ } ++} ++ + static int feature_profiles(struct udev *udev, const unsigned char *profiles, size_t size) + { + unsigned int i; +@@ -350,6 +459,7 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si + return 0; + } + ++/* returns 0 if media was detected */ + static int cd_profiles_old_mmc(struct udev *udev, int fd) + { + struct scsi_cmd sc; +@@ -389,6 +499,7 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd) + return 0; + } + ++/* returns 0 if media was detected */ + static int cd_profiles(struct udev *udev, int fd) + { + struct scsi_cmd sc; +@@ -397,6 +508,9 @@ static int cd_profiles(struct udev *udev, int fd) + unsigned int len; + unsigned int i; + int err; ++ int ret; ++ ++ ret = -1; + + /* First query the current profile */ + scsi_cmd_init(udev, &sc, features, sizeof(features)); +@@ -410,126 +524,20 @@ static int cd_profiles(struct udev *udev, int fd) + if (SK(err) == 0x5 && ASC(err) == 0x20) { + info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n"); + info(udev, "trying to work around the problem\n"); +- return cd_profiles_old_mmc(udev, fd); ++ ret = cd_profiles_old_mmc(udev, fd); + } +- return -1; ++ goto out; + } + + cur_profile = features[6] << 8 | features[7]; + if (cur_profile > 0) { + info(udev, "current profile 0x%02x\n", cur_profile); ++ feature_profile_media (udev, cur_profile); ++ ret = 0; /* we have media */ + } else { + info(udev, "no current profile, assuming no media\n"); +- return -1; + } + +- switch (cur_profile) { +- case 0x03: +- case 0x04: +- case 0x05: +- info(udev, "profile 0x%02x \n", cur_profile); +- cd_media = 1; +- cd_media_mo = 1; +- break; +- case 0x08: +- info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); +- cd_media = 1; +- cd_media_cd_rom = 1; +- break; +- case 0x09: +- info(udev, "profile 0x%02x media_cd_r\n", cur_profile); +- cd_media = 1; +- cd_media_cd_r = 1; +- break; +- case 0x0a: +- info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); +- cd_media = 1; +- cd_media_cd_rw = 1; +- break; +- case 0x10: +- info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_rom = 1; +- break; +- case 0x11: +- info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_r = 1; +- break; +- case 0x12: +- info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_ram = 1; +- break; +- case 0x13: +- info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_rw = 1; +- cd_media_dvd_rw_ro = 1; +- break; +- case 0x14: +- info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_rw = 1; +- cd_media_dvd_rw_seq = 1; +- break; +- case 0x1B: +- info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_r = 1; +- break; +- case 0x1A: +- info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_rw = 1; +- break; +- case 0x2A: +- info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_rw_dl = 1; +- break; +- case 0x2B: +- info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); +- cd_media = 1; +- cd_media_dvd_plus_r_dl = 1; +- break; +- case 0x40: +- info(udev, "profile 0x%02x media_bd\n", cur_profile); +- cd_media = 1; +- cd_media_bd = 1; +- break; +- case 0x41: +- case 0x42: +- info(udev, "profile 0x%02x media_bd_r\n", cur_profile); +- cd_media = 1; +- cd_media_bd_r = 1; +- break; +- case 0x43: +- info(udev, "profile 0x%02x media_bd_re\n", cur_profile); +- cd_media = 1; +- cd_media_bd_re = 1; +- break; +- case 0x50: +- info(udev, "profile 0x%02x media_hddvd\n", cur_profile); +- cd_media = 1; +- cd_media_hddvd = 1; +- break; +- case 0x51: +- info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); +- cd_media = 1; +- cd_media_hddvd_r = 1; +- break; +- case 0x52: +- info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); +- cd_media = 1; +- cd_media_hddvd_rw = 1; +- break; +- default: +- info(udev, "profile 0x%02x \n", cur_profile); +- break; +- } +- +- + len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3]; + info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len); + +@@ -577,8 +585,8 @@ static int cd_profiles(struct udev *udev, int fd) + break; + } + } +- +- return 0; ++out: ++ return ret; + } + + static int cd_media_info(struct udev *udev, int fd) +@@ -905,9 +913,12 @@ int main(int argc, char *argv[]) + goto print; + + /* read drive and possibly current profile */ +- if (cd_profiles(udev, fd) < 0) ++ if (cd_profiles(udev, fd) != 0) + goto print; + ++ /* at this point we are guaranteed to have media in the ++ * drive - find out more about it */ ++ + /* get session/track info */ + cd_media_toc(udev, fd); + diff --git a/udev.spec b/udev.spec index be272ad..105de70 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 166 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -18,6 +18,9 @@ Source1: start_udev Source2: udev-retry.init Patch6: udev-164-no-v4l1.patch +Patch7: udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch +Patch8: udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -116,6 +119,8 @@ glib-based applications using libudev functionality. %prep %setup -q %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" @@ -360,6 +365,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Mar 23 2011 Harald Hoyer 166-2 +- add ACLs for harmony remote controls +Resolves: rhbz#559412 +- fixed CDROM profile handling + * Wed Feb 16 2011 Harald Hoyer 166-1 - renamed udev-post initscript to udev-retry to match upstream systemd service name From a8dfb502d8fa50964e6a4d38d8a755e2ad8f0f17 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 30 Mar 2011 16:50:28 +0200 Subject: [PATCH 595/640] - version 167 --- .gitignore | 1 + sources | 3 +- udev-160.tar.bz2.sign | 8 - udev-164-no-v4l1.patch | 42 --- ...9245f2d2fd03c2586a7f1140300b073a4abe.patch | 25 -- ...6a377285d5943563cfa397e8b350e43878ec.patch | 345 ------------------ udev-retry.init | 67 ---- udev.spec | 28 +- upstream | 1 - upstream-key.gpg | 54 --- 10 files changed, 11 insertions(+), 563 deletions(-) delete mode 100644 udev-160.tar.bz2.sign delete mode 100644 udev-164-no-v4l1.patch delete mode 100644 udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch delete mode 100644 udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch delete mode 100644 udev-retry.init delete mode 100644 upstream delete mode 100644 upstream-key.gpg diff --git a/.gitignore b/.gitignore index ff4586d..80bcd9e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ udev-160.tar.bz2 /udev-164.tar.bz2.sign /udev-166.tar.bz2 /udev-166.tar.bz2.sign +/udev-167.tar.bz2 diff --git a/sources b/sources index 871f305..db4315b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -4db27d73fdbe94f47fd89fdd105c2dfb udev-166.tar.bz2 -3cb37564a589d4fedd6e7e3e178698d4 udev-166.tar.bz2.sign +4b37e1222f06c14c24147de346aa0bad udev-167.tar.bz2 diff --git a/udev-160.tar.bz2.sign b/udev-160.tar.bz2.sign deleted file mode 100644 index f5465a6..0000000 --- a/udev-160.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.9 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBMOkG1yGugalF9Dw4RAjB0AJ9ftRX/zmCiRcSyQWhcWJXsnXDn3gCeMFbR -KdR80Jxmitbil01dFfPzwEE= -=8B8M ------END PGP SIGNATURE----- diff --git a/udev-164-no-v4l1.patch b/udev-164-no-v4l1.patch deleted file mode 100644 index 9d9ef7c..0000000 --- a/udev-164-no-v4l1.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c -index d530a6d..e4b22bf 100644 ---- a/extras/v4l_id/v4l_id.c -+++ b/extras/v4l_id/v4l_id.c -@@ -28,7 +28,6 @@ - #include - #include - #include --#include - #include - - int main (int argc, char *argv[]) -@@ -39,7 +38,6 @@ int main (int argc, char *argv[]) - }; - int fd; - char *device; -- struct video_capability v1cap; - struct v4l2_capability v2cap; - - while (1) { -@@ -82,20 +80,7 @@ int main (int argc, char *argv[]) - if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0) - printf("radio:"); - printf("\n"); -- } else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) { -- printf("ID_V4L_VERSION=1\n"); -- printf("ID_V4L_PRODUCT=%s\n", v1cap.name); -- printf("ID_V4L_CAPABILITIES=:"); -- if ((v1cap.type & VID_TYPE_CAPTURE) > 0) -- printf("capture:"); -- if ((v1cap.type & VID_TYPE_OVERLAY) > 0) -- printf("video_overlay:"); -- if (v1cap.audios > 0) -- printf("audio:"); -- if ((v1cap.type & VID_TYPE_TUNER) > 0) -- printf("tuner:"); -- printf("\n"); -- } -+ } - - close (fd); - return 0; diff --git a/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch b/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch deleted file mode 100644 index 83d2c11..0000000 --- a/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 5e199245f2d2fd03c2586a7f1140300b073a4abe -Author: Harald Hoyer -Date: Thu Mar 17 20:36:20 2011 +0100 - - udev-acl/70-acl.rules: tag ID_REMOTE_CONTROL with acl - - Used by "concordance" to access Logitech Harmony programmable remote - controls. - - http://www.phildev.net/concordance/ - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index dd5a7ab..037349d 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -52,6 +52,9 @@ ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" - # PDA devices - ENV{ID_PDA}=="*?", TAG+="udev-acl" - -+# Programmable remote control -+ENV{ID_REMOTE_CONTROL}=="1", TAG+="udev-acl" -+ - # joysticks - SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" - diff --git a/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch b/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch deleted file mode 100644 index 699add5..0000000 --- a/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch +++ /dev/null @@ -1,345 +0,0 @@ -commit 98ab6a377285d5943563cfa397e8b350e43878ec -Author: David Zeuthen -Date: Tue Mar 15 12:05:00 2011 -0400 - - cdrom_id: Don't ignore profiles when there is no media available - - Just because the GET CONFIGURATION MMC-2 command returns the current - profile as 0 does not mean that we can ignore the profiles describing - the capabilities of the drive - it only means that there currently is - no recognized media in the drive. Therefore, do process the returned - profiles even when cur_profile is 0. - - This fixes a bug where only - - ID_CDROM=1 - ID_CDROM_CD_R=1 - ID_CDROM_CD_RW=1 - ID_CDROM_DVD=1 - ID_CDROM_DVD_R=1 - ID_CDROM_DVD_RAM=1 - - was returned when there is no media in the drive instead of - - ID_CDROM=1 - ID_CDROM_CD=1 - ID_CDROM_CD_R=1 - ID_CDROM_CD_RW=1 - ID_CDROM_DVD=1 - ID_CDROM_DVD_R=1 - ID_CDROM_DVD_RW=1 - ID_CDROM_DVD_RAM=1 - ID_CDROM_DVD_PLUS_R=1 - ID_CDROM_DVD_PLUS_RW=1 - ID_CDROM_DVD_PLUS_R_DL=1 - ID_CDROM_BD=1 - ID_CDROM_BD_R=1 - ID_CDROM_BD_RE=1 - ID_CDROM_HDDVD=1 - - as is returned now. - - Signed-off-by: David Zeuthen - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 4a58a49..b2f897e 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -261,6 +261,115 @@ static int cd_inquiry(struct udev *udev, int fd) { - return 0; - } - -+static void feature_profile_media(struct udev *udev, int cur_profile) -+{ -+ switch (cur_profile) { -+ case 0x03: -+ case 0x04: -+ case 0x05: -+ info(udev, "profile 0x%02x \n", cur_profile); -+ cd_media = 1; -+ cd_media_mo = 1; -+ break; -+ case 0x08: -+ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); -+ cd_media = 1; -+ cd_media_cd_rom = 1; -+ break; -+ case 0x09: -+ info(udev, "profile 0x%02x media_cd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_cd_r = 1; -+ break; -+ case 0x0a: -+ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); -+ cd_media = 1; -+ cd_media_cd_rw = 1; -+ break; -+ case 0x10: -+ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rom = 1; -+ break; -+ case 0x11: -+ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_r = 1; -+ break; -+ case 0x12: -+ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_ram = 1; -+ break; -+ case 0x13: -+ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rw = 1; -+ cd_media_dvd_rw_ro = 1; -+ break; -+ case 0x14: -+ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rw = 1; -+ cd_media_dvd_rw_seq = 1; -+ break; -+ case 0x1B: -+ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_r = 1; -+ break; -+ case 0x1A: -+ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_rw = 1; -+ break; -+ case 0x2A: -+ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_rw_dl = 1; -+ break; -+ case 0x2B: -+ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_r_dl = 1; -+ break; -+ case 0x40: -+ info(udev, "profile 0x%02x media_bd\n", cur_profile); -+ cd_media = 1; -+ cd_media_bd = 1; -+ break; -+ case 0x41: -+ case 0x42: -+ info(udev, "profile 0x%02x media_bd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_bd_r = 1; -+ break; -+ case 0x43: -+ info(udev, "profile 0x%02x media_bd_re\n", cur_profile); -+ cd_media = 1; -+ cd_media_bd_re = 1; -+ break; -+ case 0x50: -+ info(udev, "profile 0x%02x media_hddvd\n", cur_profile); -+ cd_media = 1; -+ cd_media_hddvd = 1; -+ break; -+ case 0x51: -+ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_hddvd_r = 1; -+ break; -+ case 0x52: -+ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); -+ cd_media = 1; -+ cd_media_hddvd_rw = 1; -+ break; -+ default: -+ info(udev, "profile 0x%02x \n", cur_profile); -+ break; -+ } -+} -+ - static int feature_profiles(struct udev *udev, const unsigned char *profiles, size_t size) - { - unsigned int i; -@@ -350,6 +459,7 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si - return 0; - } - -+/* returns 0 if media was detected */ - static int cd_profiles_old_mmc(struct udev *udev, int fd) - { - struct scsi_cmd sc; -@@ -389,6 +499,7 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd) - return 0; - } - -+/* returns 0 if media was detected */ - static int cd_profiles(struct udev *udev, int fd) - { - struct scsi_cmd sc; -@@ -397,6 +508,9 @@ static int cd_profiles(struct udev *udev, int fd) - unsigned int len; - unsigned int i; - int err; -+ int ret; -+ -+ ret = -1; - - /* First query the current profile */ - scsi_cmd_init(udev, &sc, features, sizeof(features)); -@@ -410,126 +524,20 @@ static int cd_profiles(struct udev *udev, int fd) - if (SK(err) == 0x5 && ASC(err) == 0x20) { - info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n"); - info(udev, "trying to work around the problem\n"); -- return cd_profiles_old_mmc(udev, fd); -+ ret = cd_profiles_old_mmc(udev, fd); - } -- return -1; -+ goto out; - } - - cur_profile = features[6] << 8 | features[7]; - if (cur_profile > 0) { - info(udev, "current profile 0x%02x\n", cur_profile); -+ feature_profile_media (udev, cur_profile); -+ ret = 0; /* we have media */ - } else { - info(udev, "no current profile, assuming no media\n"); -- return -1; - } - -- switch (cur_profile) { -- case 0x03: -- case 0x04: -- case 0x05: -- info(udev, "profile 0x%02x \n", cur_profile); -- cd_media = 1; -- cd_media_mo = 1; -- break; -- case 0x08: -- info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); -- cd_media = 1; -- cd_media_cd_rom = 1; -- break; -- case 0x09: -- info(udev, "profile 0x%02x media_cd_r\n", cur_profile); -- cd_media = 1; -- cd_media_cd_r = 1; -- break; -- case 0x0a: -- info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); -- cd_media = 1; -- cd_media_cd_rw = 1; -- break; -- case 0x10: -- info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_rom = 1; -- break; -- case 0x11: -- info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_r = 1; -- break; -- case 0x12: -- info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_ram = 1; -- break; -- case 0x13: -- info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_rw = 1; -- cd_media_dvd_rw_ro = 1; -- break; -- case 0x14: -- info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_rw = 1; -- cd_media_dvd_rw_seq = 1; -- break; -- case 0x1B: -- info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_r = 1; -- break; -- case 0x1A: -- info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_rw = 1; -- break; -- case 0x2A: -- info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_rw_dl = 1; -- break; -- case 0x2B: -- info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_r_dl = 1; -- break; -- case 0x40: -- info(udev, "profile 0x%02x media_bd\n", cur_profile); -- cd_media = 1; -- cd_media_bd = 1; -- break; -- case 0x41: -- case 0x42: -- info(udev, "profile 0x%02x media_bd_r\n", cur_profile); -- cd_media = 1; -- cd_media_bd_r = 1; -- break; -- case 0x43: -- info(udev, "profile 0x%02x media_bd_re\n", cur_profile); -- cd_media = 1; -- cd_media_bd_re = 1; -- break; -- case 0x50: -- info(udev, "profile 0x%02x media_hddvd\n", cur_profile); -- cd_media = 1; -- cd_media_hddvd = 1; -- break; -- case 0x51: -- info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); -- cd_media = 1; -- cd_media_hddvd_r = 1; -- break; -- case 0x52: -- info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); -- cd_media = 1; -- cd_media_hddvd_rw = 1; -- break; -- default: -- info(udev, "profile 0x%02x \n", cur_profile); -- break; -- } -- -- - len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3]; - info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len); - -@@ -577,8 +585,8 @@ static int cd_profiles(struct udev *udev, int fd) - break; - } - } -- -- return 0; -+out: -+ return ret; - } - - static int cd_media_info(struct udev *udev, int fd) -@@ -905,9 +913,12 @@ int main(int argc, char *argv[]) - goto print; - - /* read drive and possibly current profile */ -- if (cd_profiles(udev, fd) < 0) -+ if (cd_profiles(udev, fd) != 0) - goto print; - -+ /* at this point we are guaranteed to have media in the -+ * drive - find out more about it */ -+ - /* get session/track info */ - cd_media_toc(udev, fd); - diff --git a/udev-retry.init b/udev-retry.init deleted file mode 100644 index b4cb201..0000000 --- a/udev-retry.init +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# -# udev-retry Post script for udev, after all filesystems are mounted -# -# Authors: Harald Hoyer -# -# chkconfig: 12345 26 75 -# description: Moves the generated persistent udev rules to /etc/udev/rules.d -# -### BEGIN INIT INFO -# Default-Start: 12345 -# Default-Stop: 0 6 -# Required-Start: $local_fs -# Required-Stop: -# Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d -# Description: Moves the generated persistent udev rules to /etc/udev/rules.d -# Provides: udev-retry -### END INIT INFO - -. /etc/rc.d/init.d/functions - -# See how we were called. -case "$1" in - start|reload) - [ -w /var/lock/subsys ] || exit 4 - STRING=$"Retrigger failed udev events" - echo -n $STRING - /sbin/udevadm trigger --type=failed - success "$STRING" - echo - - 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 - - touch /var/lock/subsys/udev-retry - exit 0 - ;; - stop) - [ -w /var/lock/subsys ] || exit 4 - rm -f /var/lock/subsys/udev-retry - exit 0 - ;; - status) - exit 3 - ;; - *) - echo $"Usage: $0 {start|stop|reload}" - exit 2 -esac -exit 0 diff --git a/udev.spec b/udev.spec index 105de70..35c5349 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 166 -Release: 2%{?dist} +Version: 167 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,12 +15,6 @@ Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source2: udev-retry.init - -Patch6: udev-164-no-v4l1.patch -Patch7: udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch -Patch8: udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -118,9 +112,6 @@ glib-based applications using libudev functionality. %prep %setup -q -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" @@ -180,7 +171,6 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d -install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-retry %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then @@ -243,7 +233,6 @@ if test -f /proc/1/exe -a -d /proc/1/root; then /sbin/udevadm control --start-exec-queue || : fi fi -/sbin/chkconfig --add udev-retry exit 0 @@ -275,13 +264,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/write_cd_rules %attr(0755,root,root) %{udev_scriptdir}/write_net_rules %attr(0755,root,root) %{udev_scriptdir}/collect -%attr(0755,root,root) %{udev_scriptdir}/fstab_import %attr(0755,root,root) %{udev_scriptdir}/input_id %attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh %attr(0755,root,root) %{udev_scriptdir}/mtd_probe %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ -%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-retry %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -318,13 +305,13 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pkgconfig/udev.pc %attr(0755,root,root) /sbin/start_udev -%attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service +%attr(0644,root,root) %{systemdsystemunitdir}/udev-trigger.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service -%{systemdsystemunitdir}/basic.target.wants/udev-retry.service -%{systemdsystemunitdir}/basic.target.wants/udev-settle.service +%attr(0644,root,root) %{systemdsystemunitdir}/udev.socket %{systemdsystemunitdir}/basic.target.wants/udev.service - +%{systemdsystemunitdir}/basic.target.wants/udev-trigger.service +%{systemdsystemunitdir}/sockets.target.wants/udev.socket # Deprecated, but keep the ownership %ghost %dir /var/lib/udev @@ -365,6 +352,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Mar 30 2011 Harald Hoyer 167-1 +- version 167 + * Wed Mar 23 2011 Harald Hoyer 166-2 - add ACLs for harmony remote controls Resolves: rhbz#559412 diff --git a/upstream b/upstream deleted file mode 100644 index 287b708..0000000 --- a/upstream +++ /dev/null @@ -1 +0,0 @@ -udev-145.tar.bz2 diff --git a/upstream-key.gpg b/upstream-key.gpg deleted file mode 100644 index 81cd947..0000000 --- a/upstream-key.gpg +++ /dev/null @@ -1,54 +0,0 @@ -pub 1024D/517D0F0E 2000-10-10 Linux Kernel Archives Verification Key - Key fingerprint = C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E -sub 4096g/E50A8F2A 2000-10-10 - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.0.3 (GNU/Linux) -Comment: For info see http://www.gnupg.org - -mQGiBDnirDkRBADCTL/iUTeZKb0tiAcKdZdsUP/KSnrGGjlinolUAsUC0D6/hUB1 -RdCpJOOERTIEr1yvehqDM7veRhNMoxJNQxa/sSrkywey5qc8uaskUNEqenimq/70 -bahWJeoWXjad68mQFh65lULnHQrrioeJnh9UpyGJppNb/yIjdnymH9aYEwCglgP7 -UegBzH22h8NVQEK2PWWbyUUD/jQA4lI0wRWcL9HpkYkHcH0LTKRB9zYpQYtyvzJi -yTGwJyFMfYNXy0RT11dICeLkf3HMR84hkPERKMhALobLxVUbfc7j2AygmzGphWGy -DH/xjptQP/zrsq87ylYRONK18w1J42cm+yZa4XThMDPJMrb9/l8qnxU1JnW7W1al -HKTpBACbs+91KLqrnIGcF44TMwxgUj5CUrayPoEnLU+ZMBqfSjmu8RqEYmTxJCKv -7erBFSuazBGj5X7twunrtrW3bxO63MbLbHjfXSRrMnKOb8dRULIg6eWAnoAx8VVZ -YjrOpwAntU3WxYOpbiCHt9kLbb+N5rvNtFcmOqRRQaCIUFOOaLQ8TGludXggS2Vy -bmVsIEFyY2hpdmVzIFZlcmlmaWNhdGlvbiBLZXkgPGZ0cGFkbWluQGtlcm5lbC5v -cmc+iFUEExECABUFAjnirDkDCwoDAxUDAgMWAgECF4AACgkQyGugalF9Dw4MNACe -JiQTyCmQzPGou2cl/RyOXj79kYYAnAsT6xt72hp/PFiywYM9vBsDVv9niQEVAwUQ -OeKwNWx5eAAqlgcFAQEdZgf/Vn2dMKrn8021NhavP0uA3pHGRmdKQ2WJBdLiN2tv -LkpAioZtho+op+xBz8j1zdIJQ/7XWko869KHge2BAFwA8rWDzjtaAWdE0Jo/NiAR -epUwV2FdRRwSxIcNG2CCPyJnfPokRqjdl2z9k2PkwidHSq+2k6JxCWnOcIXChSKf -kHnemtA65ixAlhuxvyN3MPuYs1jAHyDGcyMfomp1qH9tXFQhhyXRrG2eMAfslstC -XGXLcoLN3O2BMR/fG2GlV6kOqGOvoMIW3clVeQLQ9B1yyekKiVY6Vg+CgK5qhg8z -9tjH4f33zzNDwsx1WSCOU/1LIPzFBNbR9QtTF2XmOUfRs4hGBBARAgAGBQI54rBc -AAoJEH2d7s4ry8YhmjsAoMUW9RxfXBSos0A6LwGd+5pXv/MRAKCYFLG2T4GSV+qf -iRsXnrgDHQHD04hGBBARAgAGBQI54rOZAAoJEPKlddweGoeC/+sAoL5f7JF21mRe -Z8VV4nhh7prm+idSAKCMXDWW/tBOeJDYpiEhgyGSGgJJWrkEDQQ54q+cEBAAjRmb -txamcZ9EYsQTnQvVL2l6vY5Rnbc1JDdcyHEV1kH5OwZWqvckL4QgKKBbTQwyB9pC -o0nGK4PkBbrwL0outfHQ5jl9DUzTKIu+asWUyf3fxfUV6j2A6BMo59KNnJzUyJ2+ -B5na6NN8nEqEtmogROtjT8LkOvYwqD4A/5re2vwtie+h5yU6A+JbyGQF6lFxThZj -4WGctBgCcDBqRkPAG8DFFAdeN5SMAArktCYuUGXi2q88EDoOs3Ykw0kB8+ZFECz/ -4/b93so5Wt2hC15cxAJoXFfR3mXHm40EHzMdEublWV4blB2KvFocQC74/H74QPUk -cWlc6EhPodKvcuOfTimDxXaiGNFONUPgNAmCXeVoOapdWpb3x7iOHPwSaXeJSrO9 -fc4GtVjDv90DT2ekK7cvYk8s6B3t7p7W21Xi+hRgrw63B3HElr01gdMZY5XA5ey/ -WmnyBS6LOxXlnVBE+2uSQ+aZHqrLpXcRvq2ZonOziDSE0i940ZvIwlSzn0U5BQWl -9hBDQw78RacYqaFvlpcGiPj75bScB4eemxV6Wdo9mtK0Vrr+9bWScXHEv7did4X+ -7tBWKbA8M+g290OSzjeQBGLuPmbjxzEKH9jcUumzBzzC5x5GFh7On9TLXQ4K/oRT -6QQpS93YrTVbR60G4MKsePWLJmg7IgYUtNdLGjsAAwUP/0aAAq8CmWtourj1XxNY -pFmOAU45d65fPWVadKyF++B+uDyRNYN7HQCqrJ7ddn0sH7OBtlE8yaBYgR0TFly9 -9+LqQO4r4IGCw2TBgA5tKnOWoPGEzvrLeoxR3SnPrKBlDvx6Rr9h3OJ9UV5u/NLh -mCP9iN10gWCGzsWbONc6qD6PugbTur44D6s4CRK9xfliSrtG3GBHW914UKjJeB9s -e3oc1rkmNv39kKcu33w4XVETAj4qpXnwoJvy639dfvnQt1TWFjIt20iP7m+jkT3B -b526uJ5GuJl6r8sm5OYYRs5cLigvUzRZVgYnjjqlRRACx0WcinKK55Li2Pq4qcRV -vSE5Tr3kTUTGxdmy113FbscrhLhesGALv3Hb7jeeWC8jviGEaHppgUumR6v0hsI1 -rZ3K8kCjFRAYV8OKtcEeMqjouArGi5dn0ClmG4lwH4SEdqC/TRNWGG+iVpWf5yCj -9mvtvUhLtl6QjXHLrJdSGyafvqR1EQMJadFt4URvx0M7tqZIcwPUnb+7Oc+J96po -e/EQmnm6rFnTpWz0BbY4mbJC7vUH4JyLs0nlxiKrBjaO9C1DSAKBpjqaga8dQe1Z -kLOI2F7IWFeKV2LaMl+ZvvfWMECNcqNW2fkCuP9Fpz5K+xg21TwovVy93aWKgFL6 -06jK51oQp3fW86xXK9ZGKYqQiEYEGBECAAYFAjnir5wACgkQyGugalF9Dw5M9QCg -hhmHalzWf8B3AVrjPrtrRHA1vlgAn3YRlU5l0V5W1iXvHXQCUHIESpgm -=SZZb ------END PGP PUBLIC KEY BLOCK----- From 9ecfc0140b6e3248a8428d1fe42411439cd6a47e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 30 Mar 2011 17:18:01 +0200 Subject: [PATCH 596/640] - version 167 --- udev.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 35c5349..b88a4da 100644 --- a/udev.spec +++ b/udev.spec @@ -206,6 +206,7 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : if test -f /proc/1/exe -a -d /proc/1/root; then if test -x /usr/bin/stat -a \ "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + /bin/systemctl stop udev.service >/dev/null 2>&1 || : if test -x /sbin/udevd -a -x /sbin/pidof ; then /sbin/udevadm control --stop-exec-queue pid=$(/sbin/pidof -c udevd) @@ -223,19 +224,22 @@ fi exit 0 %post -# convert old database files -/sbin/udevadm info --convert-db >/dev/null 2>&1 || : +/bin/systemctl daemon-reload >/dev/null 2>&1 || : # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /sbin/udevd -d + /bin/systemctl start udev.service >/dev/null 2>&1 || : + /sbin/udevd -d >/dev/null 2>&1 || : /sbin/udevadm control --start-exec-queue || : fi fi exit 0 +%postun +/bin/systemctl daemon-reload >/dev/null 2>&1 || : + %post -n libudev -p /sbin/ldconfig %postun -n libudev -p /sbin/ldconfig From 7d03ac0923bbc8941f0faad2f23cd66d36094150 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 30 Mar 2011 16:50:28 +0200 Subject: [PATCH 597/640] - version 167 --- .gitignore | 1 + sources | 3 +- udev-160.tar.bz2.sign | 8 - udev-164-no-v4l1.patch | 42 --- ...9245f2d2fd03c2586a7f1140300b073a4abe.patch | 25 -- ...6a377285d5943563cfa397e8b350e43878ec.patch | 345 ------------------ udev-retry.init | 67 ---- udev.spec | 28 +- upstream | 1 - upstream-key.gpg | 54 --- 10 files changed, 11 insertions(+), 563 deletions(-) delete mode 100644 udev-160.tar.bz2.sign delete mode 100644 udev-164-no-v4l1.patch delete mode 100644 udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch delete mode 100644 udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch delete mode 100644 udev-retry.init delete mode 100644 upstream delete mode 100644 upstream-key.gpg diff --git a/.gitignore b/.gitignore index ff4586d..80bcd9e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ udev-160.tar.bz2 /udev-164.tar.bz2.sign /udev-166.tar.bz2 /udev-166.tar.bz2.sign +/udev-167.tar.bz2 diff --git a/sources b/sources index 871f305..db4315b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -4db27d73fdbe94f47fd89fdd105c2dfb udev-166.tar.bz2 -3cb37564a589d4fedd6e7e3e178698d4 udev-166.tar.bz2.sign +4b37e1222f06c14c24147de346aa0bad udev-167.tar.bz2 diff --git a/udev-160.tar.bz2.sign b/udev-160.tar.bz2.sign deleted file mode 100644 index f5465a6..0000000 --- a/udev-160.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.9 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQBMOkG1yGugalF9Dw4RAjB0AJ9ftRX/zmCiRcSyQWhcWJXsnXDn3gCeMFbR -KdR80Jxmitbil01dFfPzwEE= -=8B8M ------END PGP SIGNATURE----- diff --git a/udev-164-no-v4l1.patch b/udev-164-no-v4l1.patch deleted file mode 100644 index 9d9ef7c..0000000 --- a/udev-164-no-v4l1.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c -index d530a6d..e4b22bf 100644 ---- a/extras/v4l_id/v4l_id.c -+++ b/extras/v4l_id/v4l_id.c -@@ -28,7 +28,6 @@ - #include - #include - #include --#include - #include - - int main (int argc, char *argv[]) -@@ -39,7 +38,6 @@ int main (int argc, char *argv[]) - }; - int fd; - char *device; -- struct video_capability v1cap; - struct v4l2_capability v2cap; - - while (1) { -@@ -82,20 +80,7 @@ int main (int argc, char *argv[]) - if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0) - printf("radio:"); - printf("\n"); -- } else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) { -- printf("ID_V4L_VERSION=1\n"); -- printf("ID_V4L_PRODUCT=%s\n", v1cap.name); -- printf("ID_V4L_CAPABILITIES=:"); -- if ((v1cap.type & VID_TYPE_CAPTURE) > 0) -- printf("capture:"); -- if ((v1cap.type & VID_TYPE_OVERLAY) > 0) -- printf("video_overlay:"); -- if (v1cap.audios > 0) -- printf("audio:"); -- if ((v1cap.type & VID_TYPE_TUNER) > 0) -- printf("tuner:"); -- printf("\n"); -- } -+ } - - close (fd); - return 0; diff --git a/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch b/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch deleted file mode 100644 index 83d2c11..0000000 --- a/udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 5e199245f2d2fd03c2586a7f1140300b073a4abe -Author: Harald Hoyer -Date: Thu Mar 17 20:36:20 2011 +0100 - - udev-acl/70-acl.rules: tag ID_REMOTE_CONTROL with acl - - Used by "concordance" to access Logitech Harmony programmable remote - controls. - - http://www.phildev.net/concordance/ - -diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules -index dd5a7ab..037349d 100644 ---- a/extras/udev-acl/70-acl.rules -+++ b/extras/udev-acl/70-acl.rules -@@ -52,6 +52,9 @@ ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" - # PDA devices - ENV{ID_PDA}=="*?", TAG+="udev-acl" - -+# Programmable remote control -+ENV{ID_REMOTE_CONTROL}=="1", TAG+="udev-acl" -+ - # joysticks - SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" - diff --git a/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch b/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch deleted file mode 100644 index 699add5..0000000 --- a/udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch +++ /dev/null @@ -1,345 +0,0 @@ -commit 98ab6a377285d5943563cfa397e8b350e43878ec -Author: David Zeuthen -Date: Tue Mar 15 12:05:00 2011 -0400 - - cdrom_id: Don't ignore profiles when there is no media available - - Just because the GET CONFIGURATION MMC-2 command returns the current - profile as 0 does not mean that we can ignore the profiles describing - the capabilities of the drive - it only means that there currently is - no recognized media in the drive. Therefore, do process the returned - profiles even when cur_profile is 0. - - This fixes a bug where only - - ID_CDROM=1 - ID_CDROM_CD_R=1 - ID_CDROM_CD_RW=1 - ID_CDROM_DVD=1 - ID_CDROM_DVD_R=1 - ID_CDROM_DVD_RAM=1 - - was returned when there is no media in the drive instead of - - ID_CDROM=1 - ID_CDROM_CD=1 - ID_CDROM_CD_R=1 - ID_CDROM_CD_RW=1 - ID_CDROM_DVD=1 - ID_CDROM_DVD_R=1 - ID_CDROM_DVD_RW=1 - ID_CDROM_DVD_RAM=1 - ID_CDROM_DVD_PLUS_R=1 - ID_CDROM_DVD_PLUS_RW=1 - ID_CDROM_DVD_PLUS_R_DL=1 - ID_CDROM_BD=1 - ID_CDROM_BD_R=1 - ID_CDROM_BD_RE=1 - ID_CDROM_HDDVD=1 - - as is returned now. - - Signed-off-by: David Zeuthen - -diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c -index 4a58a49..b2f897e 100644 ---- a/extras/cdrom_id/cdrom_id.c -+++ b/extras/cdrom_id/cdrom_id.c -@@ -261,6 +261,115 @@ static int cd_inquiry(struct udev *udev, int fd) { - return 0; - } - -+static void feature_profile_media(struct udev *udev, int cur_profile) -+{ -+ switch (cur_profile) { -+ case 0x03: -+ case 0x04: -+ case 0x05: -+ info(udev, "profile 0x%02x \n", cur_profile); -+ cd_media = 1; -+ cd_media_mo = 1; -+ break; -+ case 0x08: -+ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); -+ cd_media = 1; -+ cd_media_cd_rom = 1; -+ break; -+ case 0x09: -+ info(udev, "profile 0x%02x media_cd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_cd_r = 1; -+ break; -+ case 0x0a: -+ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); -+ cd_media = 1; -+ cd_media_cd_rw = 1; -+ break; -+ case 0x10: -+ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rom = 1; -+ break; -+ case 0x11: -+ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_r = 1; -+ break; -+ case 0x12: -+ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_ram = 1; -+ break; -+ case 0x13: -+ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rw = 1; -+ cd_media_dvd_rw_ro = 1; -+ break; -+ case 0x14: -+ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_rw = 1; -+ cd_media_dvd_rw_seq = 1; -+ break; -+ case 0x1B: -+ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_r = 1; -+ break; -+ case 0x1A: -+ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_rw = 1; -+ break; -+ case 0x2A: -+ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_rw_dl = 1; -+ break; -+ case 0x2B: -+ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); -+ cd_media = 1; -+ cd_media_dvd_plus_r_dl = 1; -+ break; -+ case 0x40: -+ info(udev, "profile 0x%02x media_bd\n", cur_profile); -+ cd_media = 1; -+ cd_media_bd = 1; -+ break; -+ case 0x41: -+ case 0x42: -+ info(udev, "profile 0x%02x media_bd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_bd_r = 1; -+ break; -+ case 0x43: -+ info(udev, "profile 0x%02x media_bd_re\n", cur_profile); -+ cd_media = 1; -+ cd_media_bd_re = 1; -+ break; -+ case 0x50: -+ info(udev, "profile 0x%02x media_hddvd\n", cur_profile); -+ cd_media = 1; -+ cd_media_hddvd = 1; -+ break; -+ case 0x51: -+ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); -+ cd_media = 1; -+ cd_media_hddvd_r = 1; -+ break; -+ case 0x52: -+ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); -+ cd_media = 1; -+ cd_media_hddvd_rw = 1; -+ break; -+ default: -+ info(udev, "profile 0x%02x \n", cur_profile); -+ break; -+ } -+} -+ - static int feature_profiles(struct udev *udev, const unsigned char *profiles, size_t size) - { - unsigned int i; -@@ -350,6 +459,7 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si - return 0; - } - -+/* returns 0 if media was detected */ - static int cd_profiles_old_mmc(struct udev *udev, int fd) - { - struct scsi_cmd sc; -@@ -389,6 +499,7 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd) - return 0; - } - -+/* returns 0 if media was detected */ - static int cd_profiles(struct udev *udev, int fd) - { - struct scsi_cmd sc; -@@ -397,6 +508,9 @@ static int cd_profiles(struct udev *udev, int fd) - unsigned int len; - unsigned int i; - int err; -+ int ret; -+ -+ ret = -1; - - /* First query the current profile */ - scsi_cmd_init(udev, &sc, features, sizeof(features)); -@@ -410,126 +524,20 @@ static int cd_profiles(struct udev *udev, int fd) - if (SK(err) == 0x5 && ASC(err) == 0x20) { - info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n"); - info(udev, "trying to work around the problem\n"); -- return cd_profiles_old_mmc(udev, fd); -+ ret = cd_profiles_old_mmc(udev, fd); - } -- return -1; -+ goto out; - } - - cur_profile = features[6] << 8 | features[7]; - if (cur_profile > 0) { - info(udev, "current profile 0x%02x\n", cur_profile); -+ feature_profile_media (udev, cur_profile); -+ ret = 0; /* we have media */ - } else { - info(udev, "no current profile, assuming no media\n"); -- return -1; - } - -- switch (cur_profile) { -- case 0x03: -- case 0x04: -- case 0x05: -- info(udev, "profile 0x%02x \n", cur_profile); -- cd_media = 1; -- cd_media_mo = 1; -- break; -- case 0x08: -- info(udev, "profile 0x%02x media_cd_rom\n", cur_profile); -- cd_media = 1; -- cd_media_cd_rom = 1; -- break; -- case 0x09: -- info(udev, "profile 0x%02x media_cd_r\n", cur_profile); -- cd_media = 1; -- cd_media_cd_r = 1; -- break; -- case 0x0a: -- info(udev, "profile 0x%02x media_cd_rw\n", cur_profile); -- cd_media = 1; -- cd_media_cd_rw = 1; -- break; -- case 0x10: -- info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_rom = 1; -- break; -- case 0x11: -- info(udev, "profile 0x%02x media_dvd_r\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_r = 1; -- break; -- case 0x12: -- info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_ram = 1; -- break; -- case 0x13: -- info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_rw = 1; -- cd_media_dvd_rw_ro = 1; -- break; -- case 0x14: -- info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_rw = 1; -- cd_media_dvd_rw_seq = 1; -- break; -- case 0x1B: -- info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_r = 1; -- break; -- case 0x1A: -- info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_rw = 1; -- break; -- case 0x2A: -- info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_rw_dl = 1; -- break; -- case 0x2B: -- info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile); -- cd_media = 1; -- cd_media_dvd_plus_r_dl = 1; -- break; -- case 0x40: -- info(udev, "profile 0x%02x media_bd\n", cur_profile); -- cd_media = 1; -- cd_media_bd = 1; -- break; -- case 0x41: -- case 0x42: -- info(udev, "profile 0x%02x media_bd_r\n", cur_profile); -- cd_media = 1; -- cd_media_bd_r = 1; -- break; -- case 0x43: -- info(udev, "profile 0x%02x media_bd_re\n", cur_profile); -- cd_media = 1; -- cd_media_bd_re = 1; -- break; -- case 0x50: -- info(udev, "profile 0x%02x media_hddvd\n", cur_profile); -- cd_media = 1; -- cd_media_hddvd = 1; -- break; -- case 0x51: -- info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile); -- cd_media = 1; -- cd_media_hddvd_r = 1; -- break; -- case 0x52: -- info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile); -- cd_media = 1; -- cd_media_hddvd_rw = 1; -- break; -- default: -- info(udev, "profile 0x%02x \n", cur_profile); -- break; -- } -- -- - len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3]; - info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len); - -@@ -577,8 +585,8 @@ static int cd_profiles(struct udev *udev, int fd) - break; - } - } -- -- return 0; -+out: -+ return ret; - } - - static int cd_media_info(struct udev *udev, int fd) -@@ -905,9 +913,12 @@ int main(int argc, char *argv[]) - goto print; - - /* read drive and possibly current profile */ -- if (cd_profiles(udev, fd) < 0) -+ if (cd_profiles(udev, fd) != 0) - goto print; - -+ /* at this point we are guaranteed to have media in the -+ * drive - find out more about it */ -+ - /* get session/track info */ - cd_media_toc(udev, fd); - diff --git a/udev-retry.init b/udev-retry.init deleted file mode 100644 index b4cb201..0000000 --- a/udev-retry.init +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# -# udev-retry Post script for udev, after all filesystems are mounted -# -# Authors: Harald Hoyer -# -# chkconfig: 12345 26 75 -# description: Moves the generated persistent udev rules to /etc/udev/rules.d -# -### BEGIN INIT INFO -# Default-Start: 12345 -# Default-Stop: 0 6 -# Required-Start: $local_fs -# Required-Stop: -# Short-Description: Moves the generated persistent udev rules to /etc/udev/rules.d -# Description: Moves the generated persistent udev rules to /etc/udev/rules.d -# Provides: udev-retry -### END INIT INFO - -. /etc/rc.d/init.d/functions - -# See how we were called. -case "$1" in - start|reload) - [ -w /var/lock/subsys ] || exit 4 - STRING=$"Retrigger failed udev events" - echo -n $STRING - /sbin/udevadm trigger --type=failed - success "$STRING" - echo - - 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 - - touch /var/lock/subsys/udev-retry - exit 0 - ;; - stop) - [ -w /var/lock/subsys ] || exit 4 - rm -f /var/lock/subsys/udev-retry - exit 0 - ;; - status) - exit 3 - ;; - *) - echo $"Usage: $0 {start|stop|reload}" - exit 2 -esac -exit 0 diff --git a/udev.spec b/udev.spec index 105de70..35c5349 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 166 -Release: 2%{?dist} +Version: 167 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -15,12 +15,6 @@ Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 Source1: start_udev -Source2: udev-retry.init - -Patch6: udev-164-no-v4l1.patch -Patch7: udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch -Patch8: udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -118,9 +112,6 @@ glib-based applications using libudev functionality. %prep %setup -q -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" @@ -180,7 +171,6 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d -install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-retry %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then @@ -243,7 +233,6 @@ if test -f /proc/1/exe -a -d /proc/1/root; then /sbin/udevadm control --start-exec-queue || : fi fi -/sbin/chkconfig --add udev-retry exit 0 @@ -275,13 +264,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/write_cd_rules %attr(0755,root,root) %{udev_scriptdir}/write_net_rules %attr(0755,root,root) %{udev_scriptdir}/collect -%attr(0755,root,root) %{udev_scriptdir}/fstab_import %attr(0755,root,root) %{udev_scriptdir}/input_id %attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh %attr(0755,root,root) %{udev_scriptdir}/mtd_probe %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ -%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-retry %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0755,root,root) %dir %{udev_scriptdir}/ @@ -318,13 +305,13 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pkgconfig/udev.pc %attr(0755,root,root) /sbin/start_udev -%attr(0644,root,root) %{systemdsystemunitdir}/udev-retry.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service +%attr(0644,root,root) %{systemdsystemunitdir}/udev-trigger.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service -%{systemdsystemunitdir}/basic.target.wants/udev-retry.service -%{systemdsystemunitdir}/basic.target.wants/udev-settle.service +%attr(0644,root,root) %{systemdsystemunitdir}/udev.socket %{systemdsystemunitdir}/basic.target.wants/udev.service - +%{systemdsystemunitdir}/basic.target.wants/udev-trigger.service +%{systemdsystemunitdir}/sockets.target.wants/udev.socket # Deprecated, but keep the ownership %ghost %dir /var/lib/udev @@ -365,6 +352,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Mar 30 2011 Harald Hoyer 167-1 +- version 167 + * Wed Mar 23 2011 Harald Hoyer 166-2 - add ACLs for harmony remote controls Resolves: rhbz#559412 diff --git a/upstream b/upstream deleted file mode 100644 index 287b708..0000000 --- a/upstream +++ /dev/null @@ -1 +0,0 @@ -udev-145.tar.bz2 diff --git a/upstream-key.gpg b/upstream-key.gpg deleted file mode 100644 index 81cd947..0000000 --- a/upstream-key.gpg +++ /dev/null @@ -1,54 +0,0 @@ -pub 1024D/517D0F0E 2000-10-10 Linux Kernel Archives Verification Key - Key fingerprint = C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E -sub 4096g/E50A8F2A 2000-10-10 - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.0.3 (GNU/Linux) -Comment: For info see http://www.gnupg.org - -mQGiBDnirDkRBADCTL/iUTeZKb0tiAcKdZdsUP/KSnrGGjlinolUAsUC0D6/hUB1 -RdCpJOOERTIEr1yvehqDM7veRhNMoxJNQxa/sSrkywey5qc8uaskUNEqenimq/70 -bahWJeoWXjad68mQFh65lULnHQrrioeJnh9UpyGJppNb/yIjdnymH9aYEwCglgP7 -UegBzH22h8NVQEK2PWWbyUUD/jQA4lI0wRWcL9HpkYkHcH0LTKRB9zYpQYtyvzJi -yTGwJyFMfYNXy0RT11dICeLkf3HMR84hkPERKMhALobLxVUbfc7j2AygmzGphWGy -DH/xjptQP/zrsq87ylYRONK18w1J42cm+yZa4XThMDPJMrb9/l8qnxU1JnW7W1al -HKTpBACbs+91KLqrnIGcF44TMwxgUj5CUrayPoEnLU+ZMBqfSjmu8RqEYmTxJCKv -7erBFSuazBGj5X7twunrtrW3bxO63MbLbHjfXSRrMnKOb8dRULIg6eWAnoAx8VVZ -YjrOpwAntU3WxYOpbiCHt9kLbb+N5rvNtFcmOqRRQaCIUFOOaLQ8TGludXggS2Vy -bmVsIEFyY2hpdmVzIFZlcmlmaWNhdGlvbiBLZXkgPGZ0cGFkbWluQGtlcm5lbC5v -cmc+iFUEExECABUFAjnirDkDCwoDAxUDAgMWAgECF4AACgkQyGugalF9Dw4MNACe -JiQTyCmQzPGou2cl/RyOXj79kYYAnAsT6xt72hp/PFiywYM9vBsDVv9niQEVAwUQ -OeKwNWx5eAAqlgcFAQEdZgf/Vn2dMKrn8021NhavP0uA3pHGRmdKQ2WJBdLiN2tv -LkpAioZtho+op+xBz8j1zdIJQ/7XWko869KHge2BAFwA8rWDzjtaAWdE0Jo/NiAR -epUwV2FdRRwSxIcNG2CCPyJnfPokRqjdl2z9k2PkwidHSq+2k6JxCWnOcIXChSKf -kHnemtA65ixAlhuxvyN3MPuYs1jAHyDGcyMfomp1qH9tXFQhhyXRrG2eMAfslstC -XGXLcoLN3O2BMR/fG2GlV6kOqGOvoMIW3clVeQLQ9B1yyekKiVY6Vg+CgK5qhg8z -9tjH4f33zzNDwsx1WSCOU/1LIPzFBNbR9QtTF2XmOUfRs4hGBBARAgAGBQI54rBc -AAoJEH2d7s4ry8YhmjsAoMUW9RxfXBSos0A6LwGd+5pXv/MRAKCYFLG2T4GSV+qf -iRsXnrgDHQHD04hGBBARAgAGBQI54rOZAAoJEPKlddweGoeC/+sAoL5f7JF21mRe -Z8VV4nhh7prm+idSAKCMXDWW/tBOeJDYpiEhgyGSGgJJWrkEDQQ54q+cEBAAjRmb -txamcZ9EYsQTnQvVL2l6vY5Rnbc1JDdcyHEV1kH5OwZWqvckL4QgKKBbTQwyB9pC -o0nGK4PkBbrwL0outfHQ5jl9DUzTKIu+asWUyf3fxfUV6j2A6BMo59KNnJzUyJ2+ -B5na6NN8nEqEtmogROtjT8LkOvYwqD4A/5re2vwtie+h5yU6A+JbyGQF6lFxThZj -4WGctBgCcDBqRkPAG8DFFAdeN5SMAArktCYuUGXi2q88EDoOs3Ykw0kB8+ZFECz/ -4/b93so5Wt2hC15cxAJoXFfR3mXHm40EHzMdEublWV4blB2KvFocQC74/H74QPUk -cWlc6EhPodKvcuOfTimDxXaiGNFONUPgNAmCXeVoOapdWpb3x7iOHPwSaXeJSrO9 -fc4GtVjDv90DT2ekK7cvYk8s6B3t7p7W21Xi+hRgrw63B3HElr01gdMZY5XA5ey/ -WmnyBS6LOxXlnVBE+2uSQ+aZHqrLpXcRvq2ZonOziDSE0i940ZvIwlSzn0U5BQWl -9hBDQw78RacYqaFvlpcGiPj75bScB4eemxV6Wdo9mtK0Vrr+9bWScXHEv7did4X+ -7tBWKbA8M+g290OSzjeQBGLuPmbjxzEKH9jcUumzBzzC5x5GFh7On9TLXQ4K/oRT -6QQpS93YrTVbR60G4MKsePWLJmg7IgYUtNdLGjsAAwUP/0aAAq8CmWtourj1XxNY -pFmOAU45d65fPWVadKyF++B+uDyRNYN7HQCqrJ7ddn0sH7OBtlE8yaBYgR0TFly9 -9+LqQO4r4IGCw2TBgA5tKnOWoPGEzvrLeoxR3SnPrKBlDvx6Rr9h3OJ9UV5u/NLh -mCP9iN10gWCGzsWbONc6qD6PugbTur44D6s4CRK9xfliSrtG3GBHW914UKjJeB9s -e3oc1rkmNv39kKcu33w4XVETAj4qpXnwoJvy639dfvnQt1TWFjIt20iP7m+jkT3B -b526uJ5GuJl6r8sm5OYYRs5cLigvUzRZVgYnjjqlRRACx0WcinKK55Li2Pq4qcRV -vSE5Tr3kTUTGxdmy113FbscrhLhesGALv3Hb7jeeWC8jviGEaHppgUumR6v0hsI1 -rZ3K8kCjFRAYV8OKtcEeMqjouArGi5dn0ClmG4lwH4SEdqC/TRNWGG+iVpWf5yCj -9mvtvUhLtl6QjXHLrJdSGyafvqR1EQMJadFt4URvx0M7tqZIcwPUnb+7Oc+J96po -e/EQmnm6rFnTpWz0BbY4mbJC7vUH4JyLs0nlxiKrBjaO9C1DSAKBpjqaga8dQe1Z -kLOI2F7IWFeKV2LaMl+ZvvfWMECNcqNW2fkCuP9Fpz5K+xg21TwovVy93aWKgFL6 -06jK51oQp3fW86xXK9ZGKYqQiEYEGBECAAYFAjnir5wACgkQyGugalF9Dw5M9QCg -hhmHalzWf8B3AVrjPrtrRHA1vlgAn3YRlU5l0V5W1iXvHXQCUHIESpgm -=SZZb ------END PGP PUBLIC KEY BLOCK----- From 90347b2001f3341d541e9cad71c5f557d67d8403 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 30 Mar 2011 17:18:01 +0200 Subject: [PATCH 598/640] - version 167 --- udev.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 35c5349..b88a4da 100644 --- a/udev.spec +++ b/udev.spec @@ -206,6 +206,7 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : if test -f /proc/1/exe -a -d /proc/1/root; then if test -x /usr/bin/stat -a \ "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + /bin/systemctl stop udev.service >/dev/null 2>&1 || : if test -x /sbin/udevd -a -x /sbin/pidof ; then /sbin/udevadm control --stop-exec-queue pid=$(/sbin/pidof -c udevd) @@ -223,19 +224,22 @@ fi exit 0 %post -# convert old database files -/sbin/udevadm info --convert-db >/dev/null 2>&1 || : +/bin/systemctl daemon-reload >/dev/null 2>&1 || : # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /sbin/udevd -d + /bin/systemctl start udev.service >/dev/null 2>&1 || : + /sbin/udevd -d >/dev/null 2>&1 || : /sbin/udevadm control --start-exec-queue || : fi fi exit 0 +%postun +/bin/systemctl daemon-reload >/dev/null 2>&1 || : + %post -n libudev -p /sbin/ldconfig %postun -n libudev -p /sbin/ldconfig From 21ab8351360f598421e83c6ca1a5077b160b779f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 30 Mar 2011 17:36:11 +0200 Subject: [PATCH 599/640] removed libxslt buildreq and touch man pages, to prevent rebuild --- udev.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index b88a4da..55d4f63 100644 --- a/udev.spec +++ b/udev.spec @@ -36,7 +36,6 @@ BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils BuildRequires: gperf libtool BuildRequires: libusb-devel libacl-devel -BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc @@ -114,6 +113,9 @@ glib-based applications using libudev functionality. %setup -q %build +# prevent man pages from re-building (xmlto) +find . -name "*.[1-8]" -exec touch '{}' \; + export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" # prevent man pages from re-building (xmlto) From 0b0304cfe18782b99aaa0814f9610d7ec91fcc2b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 31 Mar 2011 17:58:51 +0200 Subject: [PATCH 600/640] - fixed udev-trigger.service --- ...le-depend-on-trigger-do-not-block-ba.patch | 51 +++++++++++++++++++ udev.spec | 8 ++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch diff --git a/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch b/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch new file mode 100644 index 0000000..aa67cf1 --- /dev/null +++ b/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch @@ -0,0 +1,51 @@ +From daf32d32172e19e78754999b41c27b45e3629326 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 31 Mar 2011 13:15:47 +0200 +Subject: [PATCH] systemd: let settle depend on trigger, do not block basic with trigger + +--- + init/udev-settle.service.in | 15 +++++++++------ + init/udev-trigger.service.in | 1 - + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +index be06a39..bda8626 100644 +--- a/init/udev-settle.service.in ++++ b/init/udev-settle.service.in +@@ -1,15 +1,18 @@ +-# This barrier service is usually not enabled by default. If enabled, +-# it acts as a barrier for basic.target -- so all later services will ++# This service is usually not enabled by default. If enabled, it ++# acts as a barrier for basic.target -- so all later services will + # wait for udev completely finishing its coldplug run. + # +-# It might be enabled just unconditionally, or pulled-in on-demand by +-# broken or non-hotplug-aware services that assume a fully populated +-# /dev at startup. ++# If needed, to work around broken or non-hotplug-aware services, ++# it might be enabled unconditionally, or pulled-in on-demand by ++# the services that assume a fully populated /dev at startup. It ++# should not be used or pulled-in ever on systems without such ++# legacy services running. + + [Unit] + Description=udev Wait for Complete Device Initialization + DefaultDependencies=no +-After=udev.service ++Requires=udev.service ++After=udev-trigger.service + Before=basic.target + + [Service] +diff --git a/init/udev-trigger.service.in b/init/udev-trigger.service.in +index 0ede317..745974a 100644 +--- a/init/udev-trigger.service.in ++++ b/init/udev-trigger.service.in +@@ -2,7 +2,6 @@ + Description=udev Coldplug all Devices + Requires=udev.service + After=udev.service +-Before=basic.target + DefaultDependencies=no + + [Service] diff --git a/udev.spec b/udev.spec index 55d4f63..223ac87 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 167 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -16,6 +16,8 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev +Patch3: 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -111,6 +113,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch3 -p1 -b .git3 %build # prevent man pages from re-building (xmlto) @@ -358,6 +361,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Mar 31 2011 Harald Hoyer 167-2 +- fixed udev-trigger.service + * Wed Mar 30 2011 Harald Hoyer 167-1 - version 167 From 8cf0c7defa5e033369d66ac319ed380c3fe73882 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 31 Mar 2011 17:58:51 +0200 Subject: [PATCH 601/640] - fixed udev-trigger.service --- ...le-depend-on-trigger-do-not-block-ba.patch | 51 +++++++++++++++++++ udev.spec | 8 ++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch diff --git a/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch b/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch new file mode 100644 index 0000000..aa67cf1 --- /dev/null +++ b/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch @@ -0,0 +1,51 @@ +From daf32d32172e19e78754999b41c27b45e3629326 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 31 Mar 2011 13:15:47 +0200 +Subject: [PATCH] systemd: let settle depend on trigger, do not block basic with trigger + +--- + init/udev-settle.service.in | 15 +++++++++------ + init/udev-trigger.service.in | 1 - + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in +index be06a39..bda8626 100644 +--- a/init/udev-settle.service.in ++++ b/init/udev-settle.service.in +@@ -1,15 +1,18 @@ +-# This barrier service is usually not enabled by default. If enabled, +-# it acts as a barrier for basic.target -- so all later services will ++# This service is usually not enabled by default. If enabled, it ++# acts as a barrier for basic.target -- so all later services will + # wait for udev completely finishing its coldplug run. + # +-# It might be enabled just unconditionally, or pulled-in on-demand by +-# broken or non-hotplug-aware services that assume a fully populated +-# /dev at startup. ++# If needed, to work around broken or non-hotplug-aware services, ++# it might be enabled unconditionally, or pulled-in on-demand by ++# the services that assume a fully populated /dev at startup. It ++# should not be used or pulled-in ever on systems without such ++# legacy services running. + + [Unit] + Description=udev Wait for Complete Device Initialization + DefaultDependencies=no +-After=udev.service ++Requires=udev.service ++After=udev-trigger.service + Before=basic.target + + [Service] +diff --git a/init/udev-trigger.service.in b/init/udev-trigger.service.in +index 0ede317..745974a 100644 +--- a/init/udev-trigger.service.in ++++ b/init/udev-trigger.service.in +@@ -2,7 +2,6 @@ + Description=udev Coldplug all Devices + Requires=udev.service + After=udev.service +-Before=basic.target + DefaultDependencies=no + + [Service] diff --git a/udev.spec b/udev.spec index b88a4da..195364c 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 167 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -16,6 +16,8 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev +Patch3: 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -112,6 +114,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch3 -p1 -b .git3 %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" @@ -356,6 +359,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Mar 31 2011 Harald Hoyer 167-2 +- fixed udev-trigger.service + * Wed Mar 30 2011 Harald Hoyer 167-1 - version 167 From cbf7ac132cb5c8c9c7169c763df6714c5ad45b17 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 30 Mar 2011 17:36:11 +0200 Subject: [PATCH 602/640] removed libxslt buildreq and touch man pages, to prevent rebuild --- udev.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 195364c..223ac87 100644 --- a/udev.spec +++ b/udev.spec @@ -38,7 +38,6 @@ BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel BuildRequires: glib2-devel bison findutils BuildRequires: gperf libtool BuildRequires: libusb-devel libacl-devel -BuildRequires: libxslt BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: gtk-doc @@ -117,6 +116,9 @@ glib-based applications using libudev functionality. %patch3 -p1 -b .git3 %build +# prevent man pages from re-building (xmlto) +find . -name "*.[1-8]" -exec touch '{}' \; + export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" # prevent man pages from re-building (xmlto) From 58624e426ed9b5d2b26f4a428cdc5cb8e4e6d4bf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 31 Mar 2011 18:30:08 +0200 Subject: [PATCH 603/640] udev.spec: removed gtk-doc --- udev.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/udev.spec b/udev.spec index 223ac87..c557701 100644 --- a/udev.spec +++ b/udev.spec @@ -40,7 +40,6 @@ BuildRequires: gperf libtool BuildRequires: libusb-devel libacl-devel BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 -BuildRequires: gtk-doc BuildRequires: usbutils >= 0.82 BuildRequires: libtool >= 2.2.6 BuildRequires: pkgconfig From cef722535fe5217175547110e8d11e7dfdbbea2d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 7 Apr 2011 17:19:42 -0700 Subject: [PATCH 604/640] selinux_label.patch: don't label files outside of /dev --- udev-167-selinux_label.patch | 208 +++++++++++++++++++++++++++++++++++ udev.spec | 9 +- 2 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 udev-167-selinux_label.patch diff --git a/udev-167-selinux_label.patch b/udev-167-selinux_label.patch new file mode 100644 index 0000000..f583f0f --- /dev/null +++ b/udev-167-selinux_label.patch @@ -0,0 +1,208 @@ +From 51f43b53293c4cc64c2a55598491c6cbf27b6bd5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 8 Apr 2011 01:03:49 +0200 +Subject: [PATCH] selinux: do not label files in runtime dir + +Do not label any files in the udev runtime directory, but only nodes, +links and directories below /dev. + +In case the runtime directory falls back to /dev/.udev, label this +directory once at udevd startup, but never anything below it. +--- + libudev/libudev-private.h | 1 + + libudev/libudev-queue-private.c | 2 -- + libudev/libudev-util-private.c | 18 +++++++++++++++--- + udev/udev-node.c | 6 +++--- + udev/udevd.c | 18 ++++++++---------- + 5 files changed, 27 insertions(+), 18 deletions(-) + +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 7078b0f..8495f9a 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -220,6 +220,7 @@ uint64_t util_string_bloom64(const char *str); + + /* libudev-util-private.c */ + int util_create_path(struct udev *udev, const char *path); ++int util_create_path_selinux(struct udev *udev, const char *path); + int util_delete_path(struct udev *udev, const char *path); + int util_unlink_secure(struct udev *udev, const char *filename); + uid_t util_lookup_user(struct udev *udev, const char *user); +diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c +index a714572..2f1afec 100644 +--- a/libudev/libudev-queue-private.c ++++ b/libudev/libudev-queue-private.c +@@ -409,9 +409,7 @@ static void update_failed(struct udev_queue_export *udev_queue_export, + /* record event in the failed directory */ + udev_queue_export->failed_count++; + util_create_path(udev, filename); +- udev_selinux_setfscreatecon(udev, filename, S_IFLNK); + symlink(udev_device_get_devpath(udev_device), filename); +- udev_selinux_resetfscreatecon(udev); + break; + + case DEVICE_QUEUED: +diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c +index 6b68b6a..19f979e 100644 +--- a/libudev/libudev-util-private.c ++++ b/libudev/libudev-util-private.c +@@ -25,7 +25,7 @@ + #include "libudev.h" + #include "libudev-private.h" + +-int util_create_path(struct udev *udev, const char *path) ++static int create_path(struct udev *udev, const char *path, bool selinux) + { + char p[UTIL_PATH_SIZE]; + char *pos; +@@ -55,7 +55,8 @@ int util_create_path(struct udev *udev, const char *path) + return err; + + dbg(udev, "mkdir '%s'\n", p); +- udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); ++ if (selinux) ++ udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); + err = mkdir(p, 0755); + if (err != 0) { + err = -errno; +@@ -66,10 +67,21 @@ int util_create_path(struct udev *udev, const char *path) + err = -ENOTDIR; + } + } +- udev_selinux_resetfscreatecon(udev); ++ if (selinux) ++ udev_selinux_resetfscreatecon(udev); + return err; + } + ++int util_create_path(struct udev *udev, const char *path) ++{ ++ return create_path(udev, path, false); ++} ++ ++int util_create_path_selinux(struct udev *udev, const char *path) ++{ ++ return create_path(udev, path, true); ++} ++ + int util_delete_path(struct udev *udev, const char *path) + { + char p[UTIL_PATH_SIZE]; +diff --git a/udev/udev-node.c b/udev/udev-node.c +index ab4e932..5e791ff 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -96,7 +96,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_ + } else { + info(udev, "mknod '%s' %u:%u %#o\n", file, major(devnum), minor(devnum), mode); + do { +- err = util_create_path(udev, file); ++ err = util_create_path_selinux(udev, file); + if (err != 0 && err != -ENOENT) + break; + udev_selinux_setfscreatecon(udev, file, mode); +@@ -184,7 +184,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + } else { + info(udev, "creating symlink '%s' to '%s'\n", slink, target); + do { +- err = util_create_path(udev, slink); ++ err = util_create_path_selinux(udev, slink); + if (err != 0 && err != -ENOENT) + break; + udev_selinux_setfscreatecon(udev, slink, S_IFLNK); +@@ -201,7 +201,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL); + unlink(slink_tmp); + do { +- err = util_create_path(udev, slink_tmp); ++ err = util_create_path_selinux(udev, slink_tmp); + if (err != 0 && err != -ENOENT) + break; + udev_selinux_setfscreatecon(udev, slink_tmp, S_IFLNK); +diff --git a/udev/udevd.c b/udev/udevd.c +index a8b339f..df5c199 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -822,7 +822,7 @@ static void static_dev_create_from_modules(struct udev *udev) + continue; + + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/", devname, NULL); +- util_create_path(udev, filename); ++ util_create_path_selinux(udev, filename); + udev_selinux_setfscreatecon(udev, filename, mode); + info(udev, "mknod '%s' %c%u:%u\n", filename, type, maj, min); + if (mknod(filename, mode, makedev(maj, min)) < 0 && errno == EEXIST) +@@ -833,7 +833,7 @@ static void static_dev_create_from_modules(struct udev *udev) + fclose(f); + } + +-static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) ++static int copy_dev_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) + { + struct dirent *dent; + +@@ -886,7 +886,7 @@ static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) + continue; + } + +- copy_dir(udev, dir2_from, dir2_to, maxdepth-1); ++ copy_dev_dir(udev, dir2_from, dir2_to, maxdepth-1); + + closedir(dir2_to); + closedir(dir2_from); +@@ -930,7 +930,7 @@ static void static_dev_create_from_devices(struct udev *udev, DIR *dir) + dir_from = opendir(LIBEXECDIR "/devices"); + if (dir_from == NULL) + return; +- copy_dir(udev, dir_from, dir, 8); ++ copy_dev_dir(udev, dir_from, dir, 8); + closedir(dir_from); + } + +@@ -985,9 +985,7 @@ static int convert_db(struct udev *udev) + + /* make sure we do not get here again */ + util_create_path(udev, filename); +- udev_selinux_setfscreatecon(udev, udev_get_run_path(udev), S_IFDIR|0755); + mkdir(filename, 0755); +- udev_selinux_resetfscreatecon(udev); + + /* old database */ + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db", NULL); +@@ -1097,9 +1095,7 @@ int main(int argc, char *argv[]) + /* make sure, that our runtime dir exists and is writable */ + if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) < 0) { + /* try to create our own subdirectory, do not create parent directories */ +- udev_selinux_setfscreatecon(udev, udev_get_run_config_path(udev), S_IFDIR|0755); + mkdir(udev_get_run_config_path(udev), 0755); +- udev_selinux_resetfscreatecon(udev); + + if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) >= 0) { + /* directory seems writable now */ +@@ -1111,8 +1107,12 @@ int main(int argc, char *argv[]) + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev", NULL); + if (udev_set_run_path(udev, filename) == NULL) + goto exit; ++ mkdir(udev_get_run_path(udev), 0755); + } + } ++ /* relabel runtime dir only if it resides below /dev */ ++ if (strncmp(udev_get_run_path(udev), udev_get_dev_path(udev), strlen(udev_get_dev_path(udev))) == 0) ++ udev_selinux_lsetfilecon(udev, udev_get_run_path(udev), 0755); + info(udev, "runtime dir '%s'\n", udev_get_run_path(udev)); + + for (;;) { +@@ -1281,9 +1281,7 @@ int main(int argc, char *argv[]) + util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); + if (stat(filename, &statbuf) != 0) { + util_create_path(udev, filename); +- udev_selinux_setfscreatecon(udev, filename, S_IFDIR|0755); + mkdir(filename, 0755); +- udev_selinux_resetfscreatecon(udev); + } + inotify_add_watch(pfd[FD_INOTIFY].fd, filename, + IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); +-- +1.7.4.4 + + diff --git a/udev.spec b/udev.spec index 195364c..f5117a2 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 167 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -17,6 +17,9 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev Patch3: 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch +# Upstream 51f43b53293c4cc64c2a55598491c6cbf27b6bd5: don't SELinux label +# files outside of /dev. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=693247 +Patch4: udev-167-selinux_label.patch ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -115,6 +118,7 @@ glib-based applications using libudev functionality. %prep %setup -q %patch3 -p1 -b .git3 +%patch4 -p1 -b .label %build export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" @@ -359,6 +363,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Apr 7 2011 Adam Williamson - 167-3 +- selinux_label.patch: from upstream, don't label files outside of /dev + * Thu Mar 31 2011 Harald Hoyer 167-2 - fixed udev-trigger.service From b52809d0defa175a70ac097d5457cae865eea42b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 1 Apr 2011 09:40:44 +0200 Subject: [PATCH 605/640] udev.spec: untabify --- udev.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/udev.spec b/udev.spec index c557701..f963cff 100644 --- a/udev.spec +++ b/udev.spec @@ -179,7 +179,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then if test -x /usr/bin/stat -a \ - "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then if [ -x /sbin/pidof ]; then pid=$(/sbin/pidof -c udevd) while [ -n "$pid" ]; do @@ -189,7 +189,7 @@ if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then sleep 0.2 pid=$(/sbin/pidof -c udevd) hard="-9" - done + done fi fi /sbin/chkconfig --del udev @@ -209,8 +209,8 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test -x /usr/bin/stat -a \ - "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /bin/systemctl stop udev.service >/dev/null 2>&1 || : + "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + /bin/systemctl stop udev.service >/dev/null 2>&1 || : if test -x /sbin/udevd -a -x /sbin/pidof ; then /sbin/udevadm control --stop-exec-queue pid=$(/sbin/pidof -c udevd) @@ -233,7 +233,7 @@ exit 0 # start daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /bin/systemctl start udev.service >/dev/null 2>&1 || : + /bin/systemctl start udev.service >/dev/null 2>&1 || : /sbin/udevd -d >/dev/null 2>&1 || : /sbin/udevadm control --start-exec-queue || : fi From 83891f63812610132f33ce33d91d53e097539216 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 11 Apr 2011 12:15:57 +0200 Subject: [PATCH 606/640] - more selinux fixes --- ...-ata_id-on-non-removable-USB-devices.patch | 56 +++++ ...r-Aspire-One-ZG8-to-use-acer-aspire_.patch | 29 +++ ...vd-add-N-to-optstring-in-getopt_long.patch | 22 ++ ...not-build-extras-with-disable-extras.patch | 34 +++ ...nning-up-CD-on-pressing-eject-button.patch | 45 ++++ ...ell-Latitude-XT2-tablet-mode-navigat.patch | 56 +++++ ...ux-do-not-label-files-in-runtime-dir.patch | 204 ++++++++++++++++++ ...re-do-not-label-files-in-runtime-dir.patch | 25 +++ udev.spec | 26 ++- 9 files changed, 492 insertions(+), 5 deletions(-) create mode 100644 0002-Run-ata_id-on-non-removable-USB-devices.patch create mode 100644 0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch create mode 100644 0005-udevd-add-N-to-optstring-in-getopt_long.patch create mode 100644 0006-Revert-Do-not-build-extras-with-disable-extras.patch create mode 100644 0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch create mode 100644 0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch create mode 100644 0009-selinux-do-not-label-files-in-runtime-dir.patch create mode 100644 0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch diff --git a/0002-Run-ata_id-on-non-removable-USB-devices.patch b/0002-Run-ata_id-on-non-removable-USB-devices.patch new file mode 100644 index 0000000..e58c4aa --- /dev/null +++ b/0002-Run-ata_id-on-non-removable-USB-devices.patch @@ -0,0 +1,56 @@ +From 42b9482ab2da64b4c2f254c227c0efaf83988a84 Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Wed, 30 Mar 2011 08:11:03 -0400 +Subject: [PATCH] Run ata_id on non-removable USB devices + +If a USB device is marked as removable, it is often a SATA/PATA disk +in an enclosure (note that flash card readers and usb storage sticks +are always marked as removable). In this case, try running ata_id +(which sends ATA commands wrapped in SCSI ATA PASS THROUGH commands) +to get information about the disk. If this fails, just fall back to +running usb_id since it could be the device isn't an ATA device at +all or the device doesn't have a SAT layer. + +This extra information is nice to have as it indicates if it is +suitable to send e.g. SMART commands to the disk, whether the disk +supports power management and so on. Additionally, the VPD and serial +number returned by ata_id is usually more accurate as it stems from +the disk itself instead of the enclosure. + +Note that udisks has been doing this for a while + + KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode" + +so this change shouldn't be too disruptive (udisks-probe-ata-smart +also sends ATA commands via the ATA PASS THROUGH command). + +Signed-off-by: David Zeuthen +--- + rules/rules.d/60-persistent-storage.rules | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 6a9abdd..12fabef 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -22,14 +22,18 @@ ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" + KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}" + KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n" + +-# USB devices use their own serial number +-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" + # ATA devices with their own "ata" kernel subsystem + KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="ata", IMPORT{program}="ata_id --export $tempnode" + # ATA devices using the "scsi" subsystem + KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $tempnode" + # ATA/ATAPI devices (SPC-3 or later) using the "scsi" subsystem + KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $tempnode" ++ ++# Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures) ++KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $tempnode" ++# Otherwise fall back to using usb_id for USB devices ++KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" ++ + # scsi devices + KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" + KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="cciss" diff --git a/0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch b/0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch new file mode 100644 index 0000000..b343faf --- /dev/null +++ b/0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch @@ -0,0 +1,29 @@ +From ff4a035a8aaba6a7b5b85c4b348886d72c42e84c Mon Sep 17 00:00:00 2001 +From: Lee, Chun-Yi +Date: Thu, 31 Mar 2011 18:01:05 +0800 +Subject: [PATCH] Add rule for Acer Aspire One ZG8 to use acer-aspire_5720 keymap + +Acer Aspire One ZG8's bluetooth HW key emit 0xD9 scancode, it must map +to KEY_BLUETOOTH like Acer Aspire 5720. So, add rule for Acer Aspire One +ZG8 use acer-aspire_5720 keymap. + +Tested on Acer Aspire One ZG8 netbook. + +Signed-off-by: Lee, Chun-Yi +Signed-off-by: Martin Pitt +--- + extras/keymap/95-keymap.rules | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 0c3ae38..44d5064 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -100,6 +100,7 @@ ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keyma + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" + ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 8930", RUN+="keymap $name acer-aspire_8930" ++ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_serial}=="ZG8*", RUN+="keymap $name acer-aspire_5720" + + ENV{DMI_VENDOR}=="*BenQ*", ATTR{[dmi/id]product_name}=="*Joybook R22*", RUN+="keymap $name 0x6E wlan" + diff --git a/0005-udevd-add-N-to-optstring-in-getopt_long.patch b/0005-udevd-add-N-to-optstring-in-getopt_long.patch new file mode 100644 index 0000000..c8ca5c6 --- /dev/null +++ b/0005-udevd-add-N-to-optstring-in-getopt_long.patch @@ -0,0 +1,22 @@ +From 6ee9b2cb8cf023253853f1c80e707598685b11f3 Mon Sep 17 00:00:00 2001 +From: Thomas Egerer +Date: Thu, 31 Mar 2011 17:25:31 +0200 +Subject: [PATCH] udevd: add 'N:' to optstring in getopt_long + +--- + udev/udevd.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index 1871474..a8b339f 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -1118,7 +1118,7 @@ int main(int argc, char *argv[]) + for (;;) { + int option; + +- option = getopt_long(argc, argv, "c:deDthV", options, NULL); ++ option = getopt_long(argc, argv, "c:deDtN:hV", options, NULL); + if (option == -1) + break; + diff --git a/0006-Revert-Do-not-build-extras-with-disable-extras.patch b/0006-Revert-Do-not-build-extras-with-disable-extras.patch new file mode 100644 index 0000000..a7f4f96 --- /dev/null +++ b/0006-Revert-Do-not-build-extras-with-disable-extras.patch @@ -0,0 +1,34 @@ +From 9bb54267a1483e8f3b2de352c7be433f625e5606 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 31 Mar 2011 19:23:19 +0200 +Subject: [PATCH] Revert "Do not build extras with --disable-extras" + +This reverts commit 905818f5961446ac32d1b2d165185fffddc4915a. + +We do want to build some extras, just not the ones with extra dependencies. +Thanks to Juergen Daubert for pointing this out. +--- + Makefile.am | 3 --- + 1 files changed, 0 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index df70bf7..2c20f46 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -225,7 +225,6 @@ dist_udevrules_DATA += \ + extras/rule_generator/75-cd-aliases-generator.rules \ + extras/rule_generator/75-persistent-net-generator.rules + +-if ENABLE_EXTRAS + # ------------------------------------------------------------------------------ + # firmware - firmware loading + # ------------------------------------------------------------------------------ +@@ -314,8 +313,6 @@ extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la + libexec_PROGRAMS += extras/v4l_id/v4l_id + dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules + +-endif # ENABLE_EXTRAS +- + # ------------------------------------------------------------------------------ + # qemu -- qemu/kvm guest tweaks + # ------------------------------------------------------------------------------ diff --git a/0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch b/0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch new file mode 100644 index 0000000..efeecfe --- /dev/null +++ b/0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch @@ -0,0 +1,45 @@ +From 55eb500cc5465babf1fd773dbcceeb90eeefd997 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Mon, 4 Apr 2011 11:47:54 +0200 +Subject: [PATCH] Avoid spinning up CD on pressing eject button + +When the CD tray door is locked and the hardware eject button is pressed, newer +kernels (2.6.38+) will send out a change event with a DISK_EJECT_REQUEST==1 +property. Do not run cdrom_id and blkid in this case, as the media state and +contents does not change, and this only needlessly spins up the drive again +right before ejection. +--- + extras/cdrom_id/60-cdrom_id.rules | 3 +++ + rules/rules.d/60-persistent-storage.rules | 4 ++-- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules +index b3109f1..aedf6f0 100644 +--- a/extras/cdrom_id/60-cdrom_id.rules ++++ b/extras/cdrom_id/60-cdrom_id.rules +@@ -5,6 +5,9 @@ SUBSYSTEM!="block", GOTO="cdrom_end" + KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" + ENV{DEVTYPE}!="disk", GOTO="cdrom_end" + ++# this is only a button press event ++ENV{DISK_EJECT_REQUEST}=="?*", GOTO="cdrom_end" ++ + KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1" + IMPORT{program}="cdrom_id --export $tempnode" + +diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules +index 12fabef..05a405f 100644 +--- a/rules/rules.d/60-persistent-storage.rules ++++ b/rules/rules.d/60-persistent-storage.rules +@@ -62,9 +62,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA + ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # probe filesystem metadata of optical drives which have a media inserted +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" + # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET +-KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" ++KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks + KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" diff --git a/0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch b/0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch new file mode 100644 index 0000000..f8e7404 --- /dev/null +++ b/0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch @@ -0,0 +1,56 @@ +From 5e0ec43fc40e3e6dd0e44a7d617846879e1dac9e Mon Sep 17 00:00:00 2001 +From: Seth Forshee +Date: Tue, 5 Apr 2011 11:43:00 -0500 +Subject: [PATCH] keymap: Support Dell Latitude XT2 tablet-mode navigation keys + +The XT2 has a rocker (up/down/enter) and back button on the side +in tablet mode, none of which work currently. Add entries for +these keys. + +There is some overlap here with scan codes used in other Dell +models, so these buttons are put in a new file specific to this +model. + +Signed-off-by: Seth Forshee +Signed-off-by: Martin Pitt +--- + Makefile.am | 1 + + extras/keymap/95-keymap.rules | 1 + + extras/keymap/keymaps/dell-latitude-xt2 | 4 ++++ + 3 files changed, 6 insertions(+), 0 deletions(-) + create mode 100644 extras/keymap/keymaps/dell-latitude-xt2 + +diff --git a/Makefile.am b/Makefile.am +index 2c20f46..4244089 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -568,6 +568,7 @@ dist_udevkeymap_DATA = \ + extras/keymap/keymaps/asus \ + extras/keymap/keymaps/compaq-e_evo \ + extras/keymap/keymaps/dell \ ++ extras/keymap/keymaps/dell-latitude-xt2 \ + extras/keymap/keymaps/everex-xt5000 \ + extras/keymap/keymaps/fujitsu-amilo_pa_2548 \ + extras/keymap/keymaps/fujitsu-amilo_pro_edition_v3505 \ +diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules +index 44d5064..350f111 100644 +--- a/extras/keymap/95-keymap.rules ++++ b/extras/keymap/95-keymap.rules +@@ -67,6 +67,7 @@ LABEL="keyboard_vendorcheck" + + ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" + ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 910|Inspiron 1010|Inspiron 1011|Inspiron 1012|Inspiron 1110|Inspiron 1210", RUN+="keymap $name 0x84 wlan" ++ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT2", RUN+="keymap $name dell-latitude-xt2" + + ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" + +diff --git a/extras/keymap/keymaps/dell-latitude-xt2 b/extras/keymap/keymaps/dell-latitude-xt2 +new file mode 100644 +index 0000000..39872f5 +--- /dev/null ++++ b/extras/keymap/keymaps/dell-latitude-xt2 +@@ -0,0 +1,4 @@ ++0x9B up # tablet rocker up ++0x9E enter # tablet rocker press ++0x9F back # tablet back ++0xA3 down # tablet rocker down diff --git a/0009-selinux-do-not-label-files-in-runtime-dir.patch b/0009-selinux-do-not-label-files-in-runtime-dir.patch new file mode 100644 index 0000000..56d16ac --- /dev/null +++ b/0009-selinux-do-not-label-files-in-runtime-dir.patch @@ -0,0 +1,204 @@ +From 51f43b53293c4cc64c2a55598491c6cbf27b6bd5 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 8 Apr 2011 01:03:49 +0200 +Subject: [PATCH] selinux: do not label files in runtime dir + +Do not label any files in the udev runtime directory, but only nodes, +links and directories below /dev. + +In case the runtime directory falls back to /dev/.udev, label this +directory once at udevd startup, but never anything below it. +--- + libudev/libudev-private.h | 1 + + libudev/libudev-queue-private.c | 2 -- + libudev/libudev-util-private.c | 18 +++++++++++++++--- + udev/udev-node.c | 6 +++--- + udev/udevd.c | 18 ++++++++---------- + 5 files changed, 27 insertions(+), 18 deletions(-) + +diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h +index 7078b0f..8495f9a 100644 +--- a/libudev/libudev-private.h ++++ b/libudev/libudev-private.h +@@ -220,6 +220,7 @@ uint64_t util_string_bloom64(const char *str); + + /* libudev-util-private.c */ + int util_create_path(struct udev *udev, const char *path); ++int util_create_path_selinux(struct udev *udev, const char *path); + int util_delete_path(struct udev *udev, const char *path); + int util_unlink_secure(struct udev *udev, const char *filename); + uid_t util_lookup_user(struct udev *udev, const char *user); +diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c +index a714572..2f1afec 100644 +--- a/libudev/libudev-queue-private.c ++++ b/libudev/libudev-queue-private.c +@@ -409,9 +409,7 @@ static void update_failed(struct udev_queue_export *udev_queue_export, + /* record event in the failed directory */ + udev_queue_export->failed_count++; + util_create_path(udev, filename); +- udev_selinux_setfscreatecon(udev, filename, S_IFLNK); + symlink(udev_device_get_devpath(udev_device), filename); +- udev_selinux_resetfscreatecon(udev); + break; + + case DEVICE_QUEUED: +diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c +index 6b68b6a..19f979e 100644 +--- a/libudev/libudev-util-private.c ++++ b/libudev/libudev-util-private.c +@@ -25,7 +25,7 @@ + #include "libudev.h" + #include "libudev-private.h" + +-int util_create_path(struct udev *udev, const char *path) ++static int create_path(struct udev *udev, const char *path, bool selinux) + { + char p[UTIL_PATH_SIZE]; + char *pos; +@@ -55,7 +55,8 @@ int util_create_path(struct udev *udev, const char *path) + return err; + + dbg(udev, "mkdir '%s'\n", p); +- udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); ++ if (selinux) ++ udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); + err = mkdir(p, 0755); + if (err != 0) { + err = -errno; +@@ -66,10 +67,21 @@ int util_create_path(struct udev *udev, const char *path) + err = -ENOTDIR; + } + } +- udev_selinux_resetfscreatecon(udev); ++ if (selinux) ++ udev_selinux_resetfscreatecon(udev); + return err; + } + ++int util_create_path(struct udev *udev, const char *path) ++{ ++ return create_path(udev, path, false); ++} ++ ++int util_create_path_selinux(struct udev *udev, const char *path) ++{ ++ return create_path(udev, path, true); ++} ++ + int util_delete_path(struct udev *udev, const char *path) + { + char p[UTIL_PATH_SIZE]; +diff --git a/udev/udev-node.c b/udev/udev-node.c +index ab4e932..5e791ff 100644 +--- a/udev/udev-node.c ++++ b/udev/udev-node.c +@@ -96,7 +96,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_ + } else { + info(udev, "mknod '%s' %u:%u %#o\n", file, major(devnum), minor(devnum), mode); + do { +- err = util_create_path(udev, file); ++ err = util_create_path_selinux(udev, file); + if (err != 0 && err != -ENOENT) + break; + udev_selinux_setfscreatecon(udev, file, mode); +@@ -184,7 +184,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + } else { + info(udev, "creating symlink '%s' to '%s'\n", slink, target); + do { +- err = util_create_path(udev, slink); ++ err = util_create_path_selinux(udev, slink); + if (err != 0 && err != -ENOENT) + break; + udev_selinux_setfscreatecon(udev, slink, S_IFLNK); +@@ -201,7 +201,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) + util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL); + unlink(slink_tmp); + do { +- err = util_create_path(udev, slink_tmp); ++ err = util_create_path_selinux(udev, slink_tmp); + if (err != 0 && err != -ENOENT) + break; + udev_selinux_setfscreatecon(udev, slink_tmp, S_IFLNK); +diff --git a/udev/udevd.c b/udev/udevd.c +index a8b339f..df5c199 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -822,7 +822,7 @@ static void static_dev_create_from_modules(struct udev *udev) + continue; + + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/", devname, NULL); +- util_create_path(udev, filename); ++ util_create_path_selinux(udev, filename); + udev_selinux_setfscreatecon(udev, filename, mode); + info(udev, "mknod '%s' %c%u:%u\n", filename, type, maj, min); + if (mknod(filename, mode, makedev(maj, min)) < 0 && errno == EEXIST) +@@ -833,7 +833,7 @@ static void static_dev_create_from_modules(struct udev *udev) + fclose(f); + } + +-static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) ++static int copy_dev_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) + { + struct dirent *dent; + +@@ -886,7 +886,7 @@ static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) + continue; + } + +- copy_dir(udev, dir2_from, dir2_to, maxdepth-1); ++ copy_dev_dir(udev, dir2_from, dir2_to, maxdepth-1); + + closedir(dir2_to); + closedir(dir2_from); +@@ -930,7 +930,7 @@ static void static_dev_create_from_devices(struct udev *udev, DIR *dir) + dir_from = opendir(LIBEXECDIR "/devices"); + if (dir_from == NULL) + return; +- copy_dir(udev, dir_from, dir, 8); ++ copy_dev_dir(udev, dir_from, dir, 8); + closedir(dir_from); + } + +@@ -985,9 +985,7 @@ static int convert_db(struct udev *udev) + + /* make sure we do not get here again */ + util_create_path(udev, filename); +- udev_selinux_setfscreatecon(udev, udev_get_run_path(udev), S_IFDIR|0755); + mkdir(filename, 0755); +- udev_selinux_resetfscreatecon(udev); + + /* old database */ + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db", NULL); +@@ -1097,9 +1095,7 @@ int main(int argc, char *argv[]) + /* make sure, that our runtime dir exists and is writable */ + if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) < 0) { + /* try to create our own subdirectory, do not create parent directories */ +- udev_selinux_setfscreatecon(udev, udev_get_run_config_path(udev), S_IFDIR|0755); + mkdir(udev_get_run_config_path(udev), 0755); +- udev_selinux_resetfscreatecon(udev); + + if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) >= 0) { + /* directory seems writable now */ +@@ -1111,8 +1107,12 @@ int main(int argc, char *argv[]) + util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev", NULL); + if (udev_set_run_path(udev, filename) == NULL) + goto exit; ++ mkdir(udev_get_run_path(udev), 0755); + } + } ++ /* relabel runtime dir only if it resides below /dev */ ++ if (strncmp(udev_get_run_path(udev), udev_get_dev_path(udev), strlen(udev_get_dev_path(udev))) == 0) ++ udev_selinux_lsetfilecon(udev, udev_get_run_path(udev), 0755); + info(udev, "runtime dir '%s'\n", udev_get_run_path(udev)); + + for (;;) { +@@ -1281,9 +1281,7 @@ int main(int argc, char *argv[]) + util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); + if (stat(filename, &statbuf) != 0) { + util_create_path(udev, filename); +- udev_selinux_setfscreatecon(udev, filename, S_IFDIR|0755); + mkdir(filename, 0755); +- udev_selinux_resetfscreatecon(udev); + } + inotify_add_watch(pfd[FD_INOTIFY].fd, filename, + IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); diff --git a/0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch b/0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch new file mode 100644 index 0000000..a14e5d4 --- /dev/null +++ b/0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch @@ -0,0 +1,25 @@ +From 960250952193db522b8ced336bf998bd7e8e4a31 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Fri, 8 Apr 2011 03:08:16 +0200 +Subject: [PATCH] selinux: firmware - do not label files in runtime dir + +--- + extras/firmware/firmware.c | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c +index 8199820..f2df76c 100644 +--- a/extras/firmware/firmware.c ++++ b/extras/firmware/firmware.c +@@ -159,11 +159,9 @@ int main(int argc, char **argv) + err = util_create_path(udev, misspath); + if (err != 0 && err != -ENOENT) + break; +- udev_selinux_setfscreatecon(udev, misspath, S_IFLNK); + err = symlink(devpath, misspath); + if (err != 0) + err = -errno; +- udev_selinux_resetfscreatecon(udev); + } while (err == -ENOENT); + rc = 2; + set_loading(udev, loadpath, "-1"); diff --git a/udev.spec b/udev.spec index a1bf568..6b402b4 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 167 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -16,10 +16,16 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t Source1: start_udev +Patch2: 0002-Run-ata_id-on-non-removable-USB-devices.patch Patch3: 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch -# Upstream 51f43b53293c4cc64c2a55598491c6cbf27b6bd5: don't SELinux label -# files outside of /dev. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=693247 -Patch4: udev-167-selinux_label.patch +Patch4: 0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch +Patch5: 0005-udevd-add-N-to-optstring-in-getopt_long.patch +Patch6: 0006-Revert-Do-not-build-extras-with-disable-extras.patch +Patch7: 0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch +Patch8: 0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch +Patch9: 0009-selinux-do-not-label-files-in-runtime-dir.patch +Patch10: 0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html @@ -115,8 +121,15 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch2 -p1 -b .git2 %patch3 -p1 -b .git3 -%patch4 -p1 -b .label +%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 %build # prevent man pages from re-building (xmlto) @@ -364,6 +377,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Apr 11 2011 Harald Hoyer 167-4 +- more selinux fixes + * Thu Apr 7 2011 Adam Williamson - 167-3 - selinux_label.patch: from upstream, don't label files outside of /dev From e70c43125b3db3ddd6c0678655428f33d40e6191 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 May 2011 14:40:12 +0200 Subject: [PATCH 607/640] version 170 removed /sbin/start_udev --- ...-ata_id-on-non-removable-USB-devices.patch | 56 ----- ...le-depend-on-trigger-do-not-block-ba.patch | 51 ----- ...r-Aspire-One-ZG8-to-use-acer-aspire_.patch | 29 --- ...vd-add-N-to-optstring-in-getopt_long.patch | 22 -- ...not-build-extras-with-disable-extras.patch | 34 --- ...nning-up-CD-on-pressing-eject-button.patch | 45 ---- ...ell-Latitude-XT2-tablet-mode-navigat.patch | 56 ----- ...ux-do-not-label-files-in-runtime-dir.patch | 204 ----------------- ...re-do-not-label-files-in-runtime-dir.patch | 25 --- start_udev | 82 ------- udev-167-selinux_label.patch | 208 ------------------ udev.spec | 91 +++----- 12 files changed, 27 insertions(+), 876 deletions(-) delete mode 100644 0002-Run-ata_id-on-non-removable-USB-devices.patch delete mode 100644 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch delete mode 100644 0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch delete mode 100644 0005-udevd-add-N-to-optstring-in-getopt_long.patch delete mode 100644 0006-Revert-Do-not-build-extras-with-disable-extras.patch delete mode 100644 0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch delete mode 100644 0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch delete mode 100644 0009-selinux-do-not-label-files-in-runtime-dir.patch delete mode 100644 0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch delete mode 100755 start_udev delete mode 100644 udev-167-selinux_label.patch diff --git a/0002-Run-ata_id-on-non-removable-USB-devices.patch b/0002-Run-ata_id-on-non-removable-USB-devices.patch deleted file mode 100644 index e58c4aa..0000000 --- a/0002-Run-ata_id-on-non-removable-USB-devices.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 42b9482ab2da64b4c2f254c227c0efaf83988a84 Mon Sep 17 00:00:00 2001 -From: David Zeuthen -Date: Wed, 30 Mar 2011 08:11:03 -0400 -Subject: [PATCH] Run ata_id on non-removable USB devices - -If a USB device is marked as removable, it is often a SATA/PATA disk -in an enclosure (note that flash card readers and usb storage sticks -are always marked as removable). In this case, try running ata_id -(which sends ATA commands wrapped in SCSI ATA PASS THROUGH commands) -to get information about the disk. If this fails, just fall back to -running usb_id since it could be the device isn't an ATA device at -all or the device doesn't have a SAT layer. - -This extra information is nice to have as it indicates if it is -suitable to send e.g. SMART commands to the disk, whether the disk -supports power management and so on. Additionally, the VPD and serial -number returned by ata_id is usually more accurate as it stems from -the disk itself instead of the enclosure. - -Note that udisks has been doing this for a while - - KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode" - -so this change shouldn't be too disruptive (udisks-probe-ata-smart -also sends ATA commands via the ATA PASS THROUGH command). - -Signed-off-by: David Zeuthen ---- - rules/rules.d/60-persistent-storage.rules | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules -index 6a9abdd..12fabef 100644 ---- a/rules/rules.d/60-persistent-storage.rules -+++ b/rules/rules.d/60-persistent-storage.rules -@@ -22,14 +22,18 @@ ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" - KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}" - KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n" - --# USB devices use their own serial number --KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" - # ATA devices with their own "ata" kernel subsystem - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="ata", IMPORT{program}="ata_id --export $tempnode" - # ATA devices using the "scsi" subsystem - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $tempnode" - # ATA/ATAPI devices (SPC-3 or later) using the "scsi" subsystem - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $tempnode" -+ -+# Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures) -+KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $tempnode" -+# Otherwise fall back to using usb_id for USB devices -+KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p" -+ - # scsi devices - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="scsi" - KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode", ENV{ID_BUS}="cciss" diff --git a/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch b/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch deleted file mode 100644 index aa67cf1..0000000 --- a/0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch +++ /dev/null @@ -1,51 +0,0 @@ -From daf32d32172e19e78754999b41c27b45e3629326 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 31 Mar 2011 13:15:47 +0200 -Subject: [PATCH] systemd: let settle depend on trigger, do not block basic with trigger - ---- - init/udev-settle.service.in | 15 +++++++++------ - init/udev-trigger.service.in | 1 - - 2 files changed, 9 insertions(+), 7 deletions(-) - -diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in -index be06a39..bda8626 100644 ---- a/init/udev-settle.service.in -+++ b/init/udev-settle.service.in -@@ -1,15 +1,18 @@ --# This barrier service is usually not enabled by default. If enabled, --# it acts as a barrier for basic.target -- so all later services will -+# This service is usually not enabled by default. If enabled, it -+# acts as a barrier for basic.target -- so all later services will - # wait for udev completely finishing its coldplug run. - # --# It might be enabled just unconditionally, or pulled-in on-demand by --# broken or non-hotplug-aware services that assume a fully populated --# /dev at startup. -+# If needed, to work around broken or non-hotplug-aware services, -+# it might be enabled unconditionally, or pulled-in on-demand by -+# the services that assume a fully populated /dev at startup. It -+# should not be used or pulled-in ever on systems without such -+# legacy services running. - - [Unit] - Description=udev Wait for Complete Device Initialization - DefaultDependencies=no --After=udev.service -+Requires=udev.service -+After=udev-trigger.service - Before=basic.target - - [Service] -diff --git a/init/udev-trigger.service.in b/init/udev-trigger.service.in -index 0ede317..745974a 100644 ---- a/init/udev-trigger.service.in -+++ b/init/udev-trigger.service.in -@@ -2,7 +2,6 @@ - Description=udev Coldplug all Devices - Requires=udev.service - After=udev.service --Before=basic.target - DefaultDependencies=no - - [Service] diff --git a/0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch b/0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch deleted file mode 100644 index b343faf..0000000 --- a/0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ff4a035a8aaba6a7b5b85c4b348886d72c42e84c Mon Sep 17 00:00:00 2001 -From: Lee, Chun-Yi -Date: Thu, 31 Mar 2011 18:01:05 +0800 -Subject: [PATCH] Add rule for Acer Aspire One ZG8 to use acer-aspire_5720 keymap - -Acer Aspire One ZG8's bluetooth HW key emit 0xD9 scancode, it must map -to KEY_BLUETOOTH like Acer Aspire 5720. So, add rule for Acer Aspire One -ZG8 use acer-aspire_5720 keymap. - -Tested on Acer Aspire One ZG8 netbook. - -Signed-off-by: Lee, Chun-Yi -Signed-off-by: Martin Pitt ---- - extras/keymap/95-keymap.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 0c3ae38..44d5064 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -100,6 +100,7 @@ ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keyma - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5720*", RUN+="keymap $name acer-aspire_5720" - ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 8930", RUN+="keymap $name acer-aspire_8930" -+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_serial}=="ZG8*", RUN+="keymap $name acer-aspire_5720" - - ENV{DMI_VENDOR}=="*BenQ*", ATTR{[dmi/id]product_name}=="*Joybook R22*", RUN+="keymap $name 0x6E wlan" - diff --git a/0005-udevd-add-N-to-optstring-in-getopt_long.patch b/0005-udevd-add-N-to-optstring-in-getopt_long.patch deleted file mode 100644 index c8ca5c6..0000000 --- a/0005-udevd-add-N-to-optstring-in-getopt_long.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 6ee9b2cb8cf023253853f1c80e707598685b11f3 Mon Sep 17 00:00:00 2001 -From: Thomas Egerer -Date: Thu, 31 Mar 2011 17:25:31 +0200 -Subject: [PATCH] udevd: add 'N:' to optstring in getopt_long - ---- - udev/udevd.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/udev/udevd.c b/udev/udevd.c -index 1871474..a8b339f 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -1118,7 +1118,7 @@ int main(int argc, char *argv[]) - for (;;) { - int option; - -- option = getopt_long(argc, argv, "c:deDthV", options, NULL); -+ option = getopt_long(argc, argv, "c:deDtN:hV", options, NULL); - if (option == -1) - break; - diff --git a/0006-Revert-Do-not-build-extras-with-disable-extras.patch b/0006-Revert-Do-not-build-extras-with-disable-extras.patch deleted file mode 100644 index a7f4f96..0000000 --- a/0006-Revert-Do-not-build-extras-with-disable-extras.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 9bb54267a1483e8f3b2de352c7be433f625e5606 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Thu, 31 Mar 2011 19:23:19 +0200 -Subject: [PATCH] Revert "Do not build extras with --disable-extras" - -This reverts commit 905818f5961446ac32d1b2d165185fffddc4915a. - -We do want to build some extras, just not the ones with extra dependencies. -Thanks to Juergen Daubert for pointing this out. ---- - Makefile.am | 3 --- - 1 files changed, 0 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index df70bf7..2c20f46 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -225,7 +225,6 @@ dist_udevrules_DATA += \ - extras/rule_generator/75-cd-aliases-generator.rules \ - extras/rule_generator/75-persistent-net-generator.rules - --if ENABLE_EXTRAS - # ------------------------------------------------------------------------------ - # firmware - firmware loading - # ------------------------------------------------------------------------------ -@@ -314,8 +313,6 @@ extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la - libexec_PROGRAMS += extras/v4l_id/v4l_id - dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules - --endif # ENABLE_EXTRAS -- - # ------------------------------------------------------------------------------ - # qemu -- qemu/kvm guest tweaks - # ------------------------------------------------------------------------------ diff --git a/0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch b/0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch deleted file mode 100644 index efeecfe..0000000 --- a/0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 55eb500cc5465babf1fd773dbcceeb90eeefd997 Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 4 Apr 2011 11:47:54 +0200 -Subject: [PATCH] Avoid spinning up CD on pressing eject button - -When the CD tray door is locked and the hardware eject button is pressed, newer -kernels (2.6.38+) will send out a change event with a DISK_EJECT_REQUEST==1 -property. Do not run cdrom_id and blkid in this case, as the media state and -contents does not change, and this only needlessly spins up the drive again -right before ejection. ---- - extras/cdrom_id/60-cdrom_id.rules | 3 +++ - rules/rules.d/60-persistent-storage.rules | 4 ++-- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules -index b3109f1..aedf6f0 100644 ---- a/extras/cdrom_id/60-cdrom_id.rules -+++ b/extras/cdrom_id/60-cdrom_id.rules -@@ -5,6 +5,9 @@ SUBSYSTEM!="block", GOTO="cdrom_end" - KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end" - ENV{DEVTYPE}!="disk", GOTO="cdrom_end" - -+# this is only a button press event -+ENV{DISK_EJECT_REQUEST}=="?*", GOTO="cdrom_end" -+ - KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1" - IMPORT{program}="cdrom_id --export $tempnode" - -diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules -index 12fabef..05a405f 100644 ---- a/rules/rules.d/60-persistent-storage.rules -+++ b/rules/rules.d/60-persistent-storage.rules -@@ -62,9 +62,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA - ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" - - # probe filesystem metadata of optical drives which have a media inserted --KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" -+KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" - # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET --KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" -+KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" - - # probe filesystem metadata of disks - KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" diff --git a/0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch b/0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch deleted file mode 100644 index f8e7404..0000000 --- a/0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 5e0ec43fc40e3e6dd0e44a7d617846879e1dac9e Mon Sep 17 00:00:00 2001 -From: Seth Forshee -Date: Tue, 5 Apr 2011 11:43:00 -0500 -Subject: [PATCH] keymap: Support Dell Latitude XT2 tablet-mode navigation keys - -The XT2 has a rocker (up/down/enter) and back button on the side -in tablet mode, none of which work currently. Add entries for -these keys. - -There is some overlap here with scan codes used in other Dell -models, so these buttons are put in a new file specific to this -model. - -Signed-off-by: Seth Forshee -Signed-off-by: Martin Pitt ---- - Makefile.am | 1 + - extras/keymap/95-keymap.rules | 1 + - extras/keymap/keymaps/dell-latitude-xt2 | 4 ++++ - 3 files changed, 6 insertions(+), 0 deletions(-) - create mode 100644 extras/keymap/keymaps/dell-latitude-xt2 - -diff --git a/Makefile.am b/Makefile.am -index 2c20f46..4244089 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -568,6 +568,7 @@ dist_udevkeymap_DATA = \ - extras/keymap/keymaps/asus \ - extras/keymap/keymaps/compaq-e_evo \ - extras/keymap/keymaps/dell \ -+ extras/keymap/keymaps/dell-latitude-xt2 \ - extras/keymap/keymaps/everex-xt5000 \ - extras/keymap/keymaps/fujitsu-amilo_pa_2548 \ - extras/keymap/keymaps/fujitsu-amilo_pro_edition_v3505 \ -diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules -index 44d5064..350f111 100644 ---- a/extras/keymap/95-keymap.rules -+++ b/extras/keymap/95-keymap.rules -@@ -67,6 +67,7 @@ LABEL="keyboard_vendorcheck" - - ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell" - ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 910|Inspiron 1010|Inspiron 1011|Inspiron 1012|Inspiron 1110|Inspiron 1210", RUN+="keymap $name 0x84 wlan" -+ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Latitude XT2", RUN+="keymap $name dell-latitude-xt2" - - ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo" - -diff --git a/extras/keymap/keymaps/dell-latitude-xt2 b/extras/keymap/keymaps/dell-latitude-xt2 -new file mode 100644 -index 0000000..39872f5 ---- /dev/null -+++ b/extras/keymap/keymaps/dell-latitude-xt2 -@@ -0,0 +1,4 @@ -+0x9B up # tablet rocker up -+0x9E enter # tablet rocker press -+0x9F back # tablet back -+0xA3 down # tablet rocker down diff --git a/0009-selinux-do-not-label-files-in-runtime-dir.patch b/0009-selinux-do-not-label-files-in-runtime-dir.patch deleted file mode 100644 index 56d16ac..0000000 --- a/0009-selinux-do-not-label-files-in-runtime-dir.patch +++ /dev/null @@ -1,204 +0,0 @@ -From 51f43b53293c4cc64c2a55598491c6cbf27b6bd5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 8 Apr 2011 01:03:49 +0200 -Subject: [PATCH] selinux: do not label files in runtime dir - -Do not label any files in the udev runtime directory, but only nodes, -links and directories below /dev. - -In case the runtime directory falls back to /dev/.udev, label this -directory once at udevd startup, but never anything below it. ---- - libudev/libudev-private.h | 1 + - libudev/libudev-queue-private.c | 2 -- - libudev/libudev-util-private.c | 18 +++++++++++++++--- - udev/udev-node.c | 6 +++--- - udev/udevd.c | 18 ++++++++---------- - 5 files changed, 27 insertions(+), 18 deletions(-) - -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 7078b0f..8495f9a 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -220,6 +220,7 @@ uint64_t util_string_bloom64(const char *str); - - /* libudev-util-private.c */ - int util_create_path(struct udev *udev, const char *path); -+int util_create_path_selinux(struct udev *udev, const char *path); - int util_delete_path(struct udev *udev, const char *path); - int util_unlink_secure(struct udev *udev, const char *filename); - uid_t util_lookup_user(struct udev *udev, const char *user); -diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c -index a714572..2f1afec 100644 ---- a/libudev/libudev-queue-private.c -+++ b/libudev/libudev-queue-private.c -@@ -409,9 +409,7 @@ static void update_failed(struct udev_queue_export *udev_queue_export, - /* record event in the failed directory */ - udev_queue_export->failed_count++; - util_create_path(udev, filename); -- udev_selinux_setfscreatecon(udev, filename, S_IFLNK); - symlink(udev_device_get_devpath(udev_device), filename); -- udev_selinux_resetfscreatecon(udev); - break; - - case DEVICE_QUEUED: -diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c -index 6b68b6a..19f979e 100644 ---- a/libudev/libudev-util-private.c -+++ b/libudev/libudev-util-private.c -@@ -25,7 +25,7 @@ - #include "libudev.h" - #include "libudev-private.h" - --int util_create_path(struct udev *udev, const char *path) -+static int create_path(struct udev *udev, const char *path, bool selinux) - { - char p[UTIL_PATH_SIZE]; - char *pos; -@@ -55,7 +55,8 @@ int util_create_path(struct udev *udev, const char *path) - return err; - - dbg(udev, "mkdir '%s'\n", p); -- udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); -+ if (selinux) -+ udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); - err = mkdir(p, 0755); - if (err != 0) { - err = -errno; -@@ -66,10 +67,21 @@ int util_create_path(struct udev *udev, const char *path) - err = -ENOTDIR; - } - } -- udev_selinux_resetfscreatecon(udev); -+ if (selinux) -+ udev_selinux_resetfscreatecon(udev); - return err; - } - -+int util_create_path(struct udev *udev, const char *path) -+{ -+ return create_path(udev, path, false); -+} -+ -+int util_create_path_selinux(struct udev *udev, const char *path) -+{ -+ return create_path(udev, path, true); -+} -+ - int util_delete_path(struct udev *udev, const char *path) - { - char p[UTIL_PATH_SIZE]; -diff --git a/udev/udev-node.c b/udev/udev-node.c -index ab4e932..5e791ff 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -96,7 +96,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_ - } else { - info(udev, "mknod '%s' %u:%u %#o\n", file, major(devnum), minor(devnum), mode); - do { -- err = util_create_path(udev, file); -+ err = util_create_path_selinux(udev, file); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, file, mode); -@@ -184,7 +184,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - } else { - info(udev, "creating symlink '%s' to '%s'\n", slink, target); - do { -- err = util_create_path(udev, slink); -+ err = util_create_path_selinux(udev, slink); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, slink, S_IFLNK); -@@ -201,7 +201,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL); - unlink(slink_tmp); - do { -- err = util_create_path(udev, slink_tmp); -+ err = util_create_path_selinux(udev, slink_tmp); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, slink_tmp, S_IFLNK); -diff --git a/udev/udevd.c b/udev/udevd.c -index a8b339f..df5c199 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -822,7 +822,7 @@ static void static_dev_create_from_modules(struct udev *udev) - continue; - - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/", devname, NULL); -- util_create_path(udev, filename); -+ util_create_path_selinux(udev, filename); - udev_selinux_setfscreatecon(udev, filename, mode); - info(udev, "mknod '%s' %c%u:%u\n", filename, type, maj, min); - if (mknod(filename, mode, makedev(maj, min)) < 0 && errno == EEXIST) -@@ -833,7 +833,7 @@ static void static_dev_create_from_modules(struct udev *udev) - fclose(f); - } - --static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) -+static int copy_dev_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) - { - struct dirent *dent; - -@@ -886,7 +886,7 @@ static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) - continue; - } - -- copy_dir(udev, dir2_from, dir2_to, maxdepth-1); -+ copy_dev_dir(udev, dir2_from, dir2_to, maxdepth-1); - - closedir(dir2_to); - closedir(dir2_from); -@@ -930,7 +930,7 @@ static void static_dev_create_from_devices(struct udev *udev, DIR *dir) - dir_from = opendir(LIBEXECDIR "/devices"); - if (dir_from == NULL) - return; -- copy_dir(udev, dir_from, dir, 8); -+ copy_dev_dir(udev, dir_from, dir, 8); - closedir(dir_from); - } - -@@ -985,9 +985,7 @@ static int convert_db(struct udev *udev) - - /* make sure we do not get here again */ - util_create_path(udev, filename); -- udev_selinux_setfscreatecon(udev, udev_get_run_path(udev), S_IFDIR|0755); - mkdir(filename, 0755); -- udev_selinux_resetfscreatecon(udev); - - /* old database */ - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db", NULL); -@@ -1097,9 +1095,7 @@ int main(int argc, char *argv[]) - /* make sure, that our runtime dir exists and is writable */ - if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) < 0) { - /* try to create our own subdirectory, do not create parent directories */ -- udev_selinux_setfscreatecon(udev, udev_get_run_config_path(udev), S_IFDIR|0755); - mkdir(udev_get_run_config_path(udev), 0755); -- udev_selinux_resetfscreatecon(udev); - - if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) >= 0) { - /* directory seems writable now */ -@@ -1111,8 +1107,12 @@ int main(int argc, char *argv[]) - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev", NULL); - if (udev_set_run_path(udev, filename) == NULL) - goto exit; -+ mkdir(udev_get_run_path(udev), 0755); - } - } -+ /* relabel runtime dir only if it resides below /dev */ -+ if (strncmp(udev_get_run_path(udev), udev_get_dev_path(udev), strlen(udev_get_dev_path(udev))) == 0) -+ udev_selinux_lsetfilecon(udev, udev_get_run_path(udev), 0755); - info(udev, "runtime dir '%s'\n", udev_get_run_path(udev)); - - for (;;) { -@@ -1281,9 +1281,7 @@ int main(int argc, char *argv[]) - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); - if (stat(filename, &statbuf) != 0) { - util_create_path(udev, filename); -- udev_selinux_setfscreatecon(udev, filename, S_IFDIR|0755); - mkdir(filename, 0755); -- udev_selinux_resetfscreatecon(udev); - } - inotify_add_watch(pfd[FD_INOTIFY].fd, filename, - IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); diff --git a/0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch b/0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch deleted file mode 100644 index a14e5d4..0000000 --- a/0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 960250952193db522b8ced336bf998bd7e8e4a31 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 8 Apr 2011 03:08:16 +0200 -Subject: [PATCH] selinux: firmware - do not label files in runtime dir - ---- - extras/firmware/firmware.c | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) - -diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c -index 8199820..f2df76c 100644 ---- a/extras/firmware/firmware.c -+++ b/extras/firmware/firmware.c -@@ -159,11 +159,9 @@ int main(int argc, char **argv) - err = util_create_path(udev, misspath); - if (err != 0 && err != -ENOENT) - break; -- udev_selinux_setfscreatecon(udev, misspath, S_IFLNK); - err = symlink(devpath, misspath); - if (err != 0) - err = -errno; -- udev_selinux_resetfscreatecon(udev); - } while (err == -ENOENT); - rc = 2; - set_loading(udev, loadpath, "-1"); diff --git a/start_udev b/start_udev deleted file mode 100755 index ebb9cb6..0000000 --- a/start_udev +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# -# start_udev -# -# script to initialize /dev by using udev. -# -# Copyright (C) 2004 Greg Kroah-Hartman -# -# Released under the GPL v2 only. -# -# This needs to be run at the earliest possible point in the boot -# process. -# -# Based on the udev init.d script -# -# Thanks go out to the Gentoo developers for proving -# that this is possible to do. -# -# Yes, it's very verbose, feel free to turn off all of the echo calls, -# they were there to make me feel better that everything was working -# properly during development... -# -# don't use udev if sysfs is not mounted. - -# if we run with systemctl, just wait for settle -if [ -x "$(type -P systemctl)" ]; then - systemctl start udev-settle.service &>/dev/null && exit 0 -fi - -export TZ=/etc/localtime - -[ -d /sys/class ] || exit 1 -[ -r /proc/mounts ] || exit 1 -[ -x /sbin/udevd ] || exit 1 - -. /etc/init.d/functions - -prog=udev - -touch_recursive() { - ( cd $1; - for i in *; do - [[ -c "$i" || -b "$i" ]] && touch --no-create "$i" - [ -d "$i" ] && touch_recursive "$i" - done ) - return 0 -} - -ret=0 -STRING=$"Starting $prog: " -# propagate /dev from /sys -echo -n "$STRING" - -# turn off hotplug binary calling -if ! [ -x /sbin/hotplug ]; then - if [ -e /sys/kernel/uevent_helper ]; then - echo -e '\000\000\000\000' > /sys/kernel/uevent_helper - elif [ -e /proc/sys/kernel/hotplug ]; then - echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - fi -fi - -/sbin/udevd -d - -ret=$[$ret + $?] - -/sbin/udevadm trigger --type=subsystems --action=add -/sbin/udevadm trigger --type=devices --action=add -/sbin/udevadm settle -ret=$[$ret + $?] - -# touch all device files for timezone glitches -# "find" is in /usr/bin and might not be available -if [ -f /etc/sysconfig/clock ]; then - . /etc/sysconfig/clock - [[ "$UTC" == "false" || "$UTC" == "no" ]] \ - && touch_recursive /dev > "/dev/null" 2>&1 -fi - -[ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING" -echo -exit 0 diff --git a/udev-167-selinux_label.patch b/udev-167-selinux_label.patch deleted file mode 100644 index f583f0f..0000000 --- a/udev-167-selinux_label.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 51f43b53293c4cc64c2a55598491c6cbf27b6bd5 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Fri, 8 Apr 2011 01:03:49 +0200 -Subject: [PATCH] selinux: do not label files in runtime dir - -Do not label any files in the udev runtime directory, but only nodes, -links and directories below /dev. - -In case the runtime directory falls back to /dev/.udev, label this -directory once at udevd startup, but never anything below it. ---- - libudev/libudev-private.h | 1 + - libudev/libudev-queue-private.c | 2 -- - libudev/libudev-util-private.c | 18 +++++++++++++++--- - udev/udev-node.c | 6 +++--- - udev/udevd.c | 18 ++++++++---------- - 5 files changed, 27 insertions(+), 18 deletions(-) - -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h -index 7078b0f..8495f9a 100644 ---- a/libudev/libudev-private.h -+++ b/libudev/libudev-private.h -@@ -220,6 +220,7 @@ uint64_t util_string_bloom64(const char *str); - - /* libudev-util-private.c */ - int util_create_path(struct udev *udev, const char *path); -+int util_create_path_selinux(struct udev *udev, const char *path); - int util_delete_path(struct udev *udev, const char *path); - int util_unlink_secure(struct udev *udev, const char *filename); - uid_t util_lookup_user(struct udev *udev, const char *user); -diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c -index a714572..2f1afec 100644 ---- a/libudev/libudev-queue-private.c -+++ b/libudev/libudev-queue-private.c -@@ -409,9 +409,7 @@ static void update_failed(struct udev_queue_export *udev_queue_export, - /* record event in the failed directory */ - udev_queue_export->failed_count++; - util_create_path(udev, filename); -- udev_selinux_setfscreatecon(udev, filename, S_IFLNK); - symlink(udev_device_get_devpath(udev_device), filename); -- udev_selinux_resetfscreatecon(udev); - break; - - case DEVICE_QUEUED: -diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c -index 6b68b6a..19f979e 100644 ---- a/libudev/libudev-util-private.c -+++ b/libudev/libudev-util-private.c -@@ -25,7 +25,7 @@ - #include "libudev.h" - #include "libudev-private.h" - --int util_create_path(struct udev *udev, const char *path) -+static int create_path(struct udev *udev, const char *path, bool selinux) - { - char p[UTIL_PATH_SIZE]; - char *pos; -@@ -55,7 +55,8 @@ int util_create_path(struct udev *udev, const char *path) - return err; - - dbg(udev, "mkdir '%s'\n", p); -- udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); -+ if (selinux) -+ udev_selinux_setfscreatecon(udev, p, S_IFDIR|0755); - err = mkdir(p, 0755); - if (err != 0) { - err = -errno; -@@ -66,10 +67,21 @@ int util_create_path(struct udev *udev, const char *path) - err = -ENOTDIR; - } - } -- udev_selinux_resetfscreatecon(udev); -+ if (selinux) -+ udev_selinux_resetfscreatecon(udev); - return err; - } - -+int util_create_path(struct udev *udev, const char *path) -+{ -+ return create_path(udev, path, false); -+} -+ -+int util_create_path_selinux(struct udev *udev, const char *path) -+{ -+ return create_path(udev, path, true); -+} -+ - int util_delete_path(struct udev *udev, const char *path) - { - char p[UTIL_PATH_SIZE]; -diff --git a/udev/udev-node.c b/udev/udev-node.c -index ab4e932..5e791ff 100644 ---- a/udev/udev-node.c -+++ b/udev/udev-node.c -@@ -96,7 +96,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_ - } else { - info(udev, "mknod '%s' %u:%u %#o\n", file, major(devnum), minor(devnum), mode); - do { -- err = util_create_path(udev, file); -+ err = util_create_path_selinux(udev, file); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, file, mode); -@@ -184,7 +184,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - } else { - info(udev, "creating symlink '%s' to '%s'\n", slink, target); - do { -- err = util_create_path(udev, slink); -+ err = util_create_path_selinux(udev, slink); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, slink, S_IFLNK); -@@ -201,7 +201,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink) - util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL); - unlink(slink_tmp); - do { -- err = util_create_path(udev, slink_tmp); -+ err = util_create_path_selinux(udev, slink_tmp); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, slink_tmp, S_IFLNK); -diff --git a/udev/udevd.c b/udev/udevd.c -index a8b339f..df5c199 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -822,7 +822,7 @@ static void static_dev_create_from_modules(struct udev *udev) - continue; - - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/", devname, NULL); -- util_create_path(udev, filename); -+ util_create_path_selinux(udev, filename); - udev_selinux_setfscreatecon(udev, filename, mode); - info(udev, "mknod '%s' %c%u:%u\n", filename, type, maj, min); - if (mknod(filename, mode, makedev(maj, min)) < 0 && errno == EEXIST) -@@ -833,7 +833,7 @@ static void static_dev_create_from_modules(struct udev *udev) - fclose(f); - } - --static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) -+static int copy_dev_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) - { - struct dirent *dent; - -@@ -886,7 +886,7 @@ static int copy_dir(struct udev *udev, DIR *dir_from, DIR *dir_to, int maxdepth) - continue; - } - -- copy_dir(udev, dir2_from, dir2_to, maxdepth-1); -+ copy_dev_dir(udev, dir2_from, dir2_to, maxdepth-1); - - closedir(dir2_to); - closedir(dir2_from); -@@ -930,7 +930,7 @@ static void static_dev_create_from_devices(struct udev *udev, DIR *dir) - dir_from = opendir(LIBEXECDIR "/devices"); - if (dir_from == NULL) - return; -- copy_dir(udev, dir_from, dir, 8); -+ copy_dev_dir(udev, dir_from, dir, 8); - closedir(dir_from); - } - -@@ -985,9 +985,7 @@ static int convert_db(struct udev *udev) - - /* make sure we do not get here again */ - util_create_path(udev, filename); -- udev_selinux_setfscreatecon(udev, udev_get_run_path(udev), S_IFDIR|0755); - mkdir(filename, 0755); -- udev_selinux_resetfscreatecon(udev); - - /* old database */ - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db", NULL); -@@ -1097,9 +1095,7 @@ int main(int argc, char *argv[]) - /* make sure, that our runtime dir exists and is writable */ - if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) < 0) { - /* try to create our own subdirectory, do not create parent directories */ -- udev_selinux_setfscreatecon(udev, udev_get_run_config_path(udev), S_IFDIR|0755); - mkdir(udev_get_run_config_path(udev), 0755); -- udev_selinux_resetfscreatecon(udev); - - if (utimensat(AT_FDCWD, udev_get_run_config_path(udev), NULL, 0) >= 0) { - /* directory seems writable now */ -@@ -1111,8 +1107,12 @@ int main(int argc, char *argv[]) - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev", NULL); - if (udev_set_run_path(udev, filename) == NULL) - goto exit; -+ mkdir(udev_get_run_path(udev), 0755); - } - } -+ /* relabel runtime dir only if it resides below /dev */ -+ if (strncmp(udev_get_run_path(udev), udev_get_dev_path(udev), strlen(udev_get_dev_path(udev))) == 0) -+ udev_selinux_lsetfilecon(udev, udev_get_run_path(udev), 0755); - info(udev, "runtime dir '%s'\n", udev_get_run_path(udev)); - - for (;;) { -@@ -1281,9 +1281,7 @@ int main(int argc, char *argv[]) - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); - if (stat(filename, &statbuf) != 0) { - util_create_path(udev, filename); -- udev_selinux_setfscreatecon(udev, filename, S_IFDIR|0755); - mkdir(filename, 0755); -- udev_selinux_resetfscreatecon(udev); - } - inotify_add_watch(pfd[FD_INOTIFY].fd, filename, - IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); --- -1.7.4.4 - - diff --git a/udev.spec b/udev.spec index 6b402b4..afa762f 100644 --- a/udev.spec +++ b/udev.spec @@ -6,27 +6,14 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 167 -Release: 4%{?dist} +Version: 170 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 -Source1: start_udev - -Patch2: 0002-Run-ata_id-on-non-removable-USB-devices.patch -Patch3: 0003-systemd-let-settle-depend-on-trigger-do-not-block-ba.patch -Patch4: 0004-Add-rule-for-Acer-Aspire-One-ZG8-to-use-acer-aspire_.patch -Patch5: 0005-udevd-add-N-to-optstring-in-getopt_long.patch -Patch6: 0006-Revert-Do-not-build-extras-with-disable-extras.patch -Patch7: 0007-Avoid-spinning-up-CD-on-pressing-eject-button.patch -Patch8: 0008-keymap-Support-Dell-Latitude-XT2-tablet-mode-navigat.patch -Patch9: 0009-selinux-do-not-label-files-in-runtime-dir.patch -Patch10: 0010-selinux-firmware-do-not-label-files-in-runtime-dir.patch - - ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -36,7 +23,7 @@ Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units Requires: pkgconfig -Conflicts: systemd < 3 +Conflicts: systemd < 25 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -121,15 +108,6 @@ glib-based applications using libudev functionality. %prep %setup -q -%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 %build # prevent man pages from re-building (xmlto) @@ -147,7 +125,10 @@ libtoolize -f -c --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} \ --enable-introspection \ - --with-systemdsystemunitdir=%{systemdsystemunitdir} + --with-systemdsystemunitdir=%{systemdsystemunitdir} \ + --enable-floppy \ + --enable-edd \ + --enable-action_modeswitch make %{?_smp_mflags} @@ -183,7 +164,7 @@ for i in \ ; do install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done - + mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices,devices/net,devices/pts,devices/shm,devices/hugepages} mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev @@ -197,22 +178,12 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then if test -x /usr/bin/stat -a \ "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - if [ -x /sbin/pidof ]; then - pid=$(/sbin/pidof -c udevd) - while [ -n "$pid" ]; do - for p in $pid; do - kill $hard $p 2>/dev/null - done - sleep 0.2 - pid=$(/sbin/pidof -c udevd) - hard="-9" - done - fi + /sbin/udevadm control --exit 2>&1 || : fi - /sbin/chkconfig --del udev + /sbin/chkconfig --del udev || : fi if [ "$1" -eq 0 ]; then - /sbin/chkconfig --del udev-retry + /sbin/chkconfig --del udev-retry || : fi /sbin/chkconfig --del udev-post >/dev/null 2>&1 || : exit 0 @@ -223,39 +194,28 @@ getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : -# kill daemon if we are not in a chroot -if test -f /proc/1/exe -a -d /proc/1/root; then - if test -x /usr/bin/stat -a \ - "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /bin/systemctl stop udev.service >/dev/null 2>&1 || : - if test -x /sbin/udevd -a -x /sbin/pidof ; then - /sbin/udevadm control --stop-exec-queue - pid=$(/sbin/pidof -c udevd) - while [ -n "$pid" ]; do - for p in $pid; do - kill $hard $p 2>/dev/null - done - sleep 0.2 - pid=$(/sbin/pidof -c udevd) - hard="-9" - done - fi - fi +if ! /bin/systemctl stop udev.service udev.socket >/dev/null 2>&1; then + # kill daemon if we are not in a chroot + if test -f /proc/1/exe -a -d /proc/1/root; then + if test -x /usr/bin/stat -a \ + "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then + /sbin/udevadm control --exit 2>&1 || : + fi + fi fi exit 0 %post /bin/systemctl daemon-reload >/dev/null 2>&1 || : -# start daemon if we are not in a chroot -if test -f /proc/1/exe -a -d /proc/1/root; then +if ! /bin/systemctl start udev.service >/dev/null 2>&1; then + # start daemon if we are not in a chroot + if test -f /proc/1/exe -a -d /proc/1/root; then if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /bin/systemctl start udev.service >/dev/null 2>&1 || : /sbin/udevd -d >/dev/null 2>&1 || : - /sbin/udevadm control --start-exec-queue || : fi + fi fi - exit 0 %postun @@ -282,7 +242,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/usb_id %attr(0755,root,root) %{udev_scriptdir}/cdrom_id %attr(0755,root,root) %{udev_scriptdir}/path_id -%attr(0755,root,root) %{udev_scriptdir}/hid2hci %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices %attr(0755,root,root) %{udev_scriptdir}/firmware %attr(0644,root,root) %{udev_scriptdir}/rule_generator.functions @@ -377,6 +336,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri May 20 2011 Harald Hoyer 170-1 +- version 170 +- removed /sbin/start_udev + * Mon Apr 11 2011 Harald Hoyer 167-4 - more selinux fixes From 60836322f1f7c80554b860e8e5b52101bdc52683 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 May 2011 14:45:08 +0200 Subject: [PATCH 608/640] version 170 removed /sbin/start_udev --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 80bcd9e..465b6ed 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ udev-160.tar.bz2 /udev-166.tar.bz2 /udev-166.tar.bz2.sign /udev-167.tar.bz2 +/udev-170.tar.bz2 diff --git a/sources b/sources index db4315b..5395054 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b37e1222f06c14c24147de346aa0bad udev-167.tar.bz2 +6e132d1a3b4dae24dafd2726c5cdd982 udev-170.tar.bz2 From 3ad6199da322e160fd22408038488859f2445db5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 May 2011 14:53:29 +0200 Subject: [PATCH 609/640] version 170 removed /sbin/start_udev --- udev.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/udev.spec b/udev.spec index afa762f..6180f87 100644 --- a/udev.spec +++ b/udev.spec @@ -168,7 +168,6 @@ done mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices,devices/net,devices/pts,devices/shm,devices/hugepages} mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev -install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} @@ -288,7 +287,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %{_datadir}/pkgconfig/udev.pc -%attr(0755,root,root) /sbin/start_udev %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-trigger.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service From f9e3401ad50172630d7d400f6026ecfa5ffe2d03 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 May 2011 11:18:48 +0200 Subject: [PATCH 610/640] version 171 --- .gitignore | 1 + sources | 2 +- udev.spec | 15 ++++++++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 465b6ed..c4bbefe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ udev-160.tar.bz2 /udev-166.tar.bz2.sign /udev-167.tar.bz2 /udev-170.tar.bz2 +/udev-171.tar.bz2 diff --git a/sources b/sources index 5395054..e1aa70f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e132d1a3b4dae24dafd2726c5cdd982 udev-170.tar.bz2 +bdf4617284be2ecac11767437417e209 udev-171.tar.bz2 diff --git a/udev.spec b/udev.spec index 6180f87..4a14c08 100644 --- a/udev.spec +++ b/udev.spec @@ -6,7 +6,7 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 170 +Version: 171 Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base @@ -23,7 +23,7 @@ Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units Requires: pkgconfig -Conflicts: systemd < 25 +Conflicts: systemd < 28 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -193,7 +193,7 @@ getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : -if ! /bin/systemctl stop udev.service udev.socket >/dev/null 2>&1; then +if ! /bin/systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1; then # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root; then if test -x /usr/bin/stat -a \ @@ -290,10 +290,12 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service %attr(0644,root,root) %{systemdsystemunitdir}/udev-trigger.service %attr(0644,root,root) %{systemdsystemunitdir}/udev.service -%attr(0644,root,root) %{systemdsystemunitdir}/udev.socket +%attr(0644,root,root) %{systemdsystemunitdir}/udev-kernel.socket +%attr(0644,root,root) %{systemdsystemunitdir}/udev-control.socket %{systemdsystemunitdir}/basic.target.wants/udev.service %{systemdsystemunitdir}/basic.target.wants/udev-trigger.service -%{systemdsystemunitdir}/sockets.target.wants/udev.socket +%{systemdsystemunitdir}/sockets.target.wants/udev-control.socket +%{systemdsystemunitdir}/sockets.target.wants/udev-kernel.socket # Deprecated, but keep the ownership %ghost %dir /var/lib/udev @@ -334,6 +336,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri May 27 2011 Harald Hoyer 171-1 +- version 171 + * Fri May 20 2011 Harald Hoyer 170-1 - version 170 - removed /sbin/start_udev From 3643fbe9e58d2f561ad1350df0f9f2c540f96a0b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 20 Jun 2011 10:22:00 +0200 Subject: [PATCH 611/640] udev.spec: remove introspection and unneeded dirs --- udev.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/udev.spec b/udev.spec index 4a14c08..f8434dd 100644 --- a/udev.spec +++ b/udev.spec @@ -124,7 +124,6 @@ libtoolize -f -c --sysconfdir=%{_sysconfdir} \ --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} \ - --enable-introspection \ --with-systemdsystemunitdir=%{systemdsystemunitdir} \ --enable-floppy \ --enable-edd \ @@ -165,14 +164,9 @@ for i in \ install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" done -mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices,devices/net,devices/pts,devices/shm,devices/hugepages} - mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev - mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d - %preun if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then if test -x /usr/bin/stat -a \ From 2443122e5f429f84e19a679d7ad0ead3b51f982d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 20 Jun 2011 10:23:17 +0200 Subject: [PATCH 612/640] udev.spec: own the ConsoleKit and ConsoleKit/run-seat.d dirs If udev does not actually require ConsoleKit, the dependency should not be added just for dir ownership, instead the dirs should be owned in udev which is what the patch does. http://fedoraproject.org/wiki/Packaging/Guidelines#File_and_Directory_Ownership https://bugzilla.redhat.com/show_bug.cgi?id=710781 --- udev.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udev.spec b/udev.spec index f8434dd..4c85464 100644 --- a/udev.spec +++ b/udev.spec @@ -278,6 +278,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/findkeyboards %dir %{udev_scriptdir}/keymaps %{udev_scriptdir}/keymaps/* +%dir %{_prefix}/lib/ConsoleKit +%dir %{_prefix}/lib/ConsoleKit/run-seat.d %attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %{_datadir}/pkgconfig/udev.pc From 27c9ba33fe09b996c7c7fda3bba9282b9190a07c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 20 Jun 2011 10:27:09 +0200 Subject: [PATCH 613/640] build without introspection removed unused dirs added ConsoleKit dirs --- udev.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 4c85464..90b58b7 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 171 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -332,6 +332,11 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Jun 20 2011 Harald Hoyer 171-2 +- build without introspection +- removed unused dirs +- added ConsoleKit dirs + * Fri May 27 2011 Harald Hoyer 171-1 - version 171 From 0c6edc1da227453b89d470ca5789565fd8b3e158 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 11 Jul 2011 15:12:16 +0200 Subject: [PATCH 614/640] version 172 --- .gitignore | 1 + sources | 2 +- udev.spec | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c4bbefe..9febfe1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ udev-160.tar.bz2 /udev-167.tar.bz2 /udev-170.tar.bz2 /udev-171.tar.bz2 +/udev-172.tar.bz2 diff --git a/sources b/sources index e1aa70f..cee2704 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bdf4617284be2ecac11767437417e209 udev-171.tar.bz2 +bd122d04cf758441f498aad0169a454f udev-172.tar.bz2 diff --git a/udev.spec b/udev.spec index 90b58b7..84faac5 100644 --- a/udev.spec +++ b/udev.spec @@ -6,8 +6,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 171 -Release: 2%{?dist} +Version: 172 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -125,9 +125,7 @@ libtoolize -f -c --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ --with-rootlibdir=/%{_lib} \ --with-systemdsystemunitdir=%{systemdsystemunitdir} \ - --enable-floppy \ - --enable-edd \ - --enable-action_modeswitch + --enable-floppy make %{?_smp_mflags} @@ -231,7 +229,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) /sbin/scsi_id %attr(0755,root,root) %{udev_scriptdir}/scsi_id %attr(0755,root,root) %{udev_scriptdir}/ata_id -%attr(0755,root,root) %{udev_scriptdir}/edd_id %attr(0755,root,root) %{udev_scriptdir}/usb_id %attr(0755,root,root) %{udev_scriptdir}/cdrom_id %attr(0755,root,root) %{udev_scriptdir}/path_id @@ -244,6 +241,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/input_id %attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh %attr(0755,root,root) %{udev_scriptdir}/mtd_probe +%attr(0755,root,root) %{udev_scriptdir}/accelerometer %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/ @@ -269,7 +267,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* -%attr(0755,root,root) %{udev_scriptdir}/mobile-action-modeswitch %attr(0755,root,root) %{udev_scriptdir}/pci-db %attr(0755,root,root) %{udev_scriptdir}/usb-db %attr(0755,root,root) %{udev_scriptdir}/keymap @@ -332,6 +329,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Jul 11 2011 Harald Hoyer 172-1 +- version 172 + * Mon Jun 20 2011 Harald Hoyer 171-2 - build without introspection - removed unused dirs From c48bf88aeae0c89a23f1220dd3424c2082f4e7b1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Jul 2011 13:29:29 +0200 Subject: [PATCH 615/640] removed loop devices (should be compiled in the kernel) --- udev.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/udev.spec b/udev.spec index 84faac5..bc31d9a 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 172 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -248,14 +248,6 @@ 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/ -%attr(640,root,disk) %dev(b,7,0) %{udev_scriptdir}/devices/loop0 -%attr(640,root,disk) %dev(b,7,1) %{udev_scriptdir}/devices/loop1 -%attr(640,root,disk) %dev(b,7,2) %{udev_scriptdir}/devices/loop2 -%attr(640,root,disk) %dev(b,7,3) %{udev_scriptdir}/devices/loop3 -%attr(640,root,disk) %dev(b,7,4) %{udev_scriptdir}/devices/loop4 -%attr(640,root,disk) %dev(b,7,5) %{udev_scriptdir}/devices/loop5 -%attr(640,root,disk) %dev(b,7,6) %{udev_scriptdir}/devices/loop6 -%attr(640,root,disk) %dev(b,7,7) %{udev_scriptdir}/devices/loop7 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules @@ -329,6 +321,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jul 20 2011 Harald Hoyer 172-2 +- removed loop devices (should be compiled in the kernel) + * Mon Jul 11 2011 Harald Hoyer 172-1 - version 172 From 6ae88f0d846a67e8834570ac67e1baa47ac905f6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Jul 2011 13:50:03 +0200 Subject: [PATCH 616/640] removed loop devices (should be compiled in the kernel) removed deprecated directories --- udev.spec | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/udev.spec b/udev.spec index bc31d9a..40ba7c7 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,5 @@ -%define debug true %define udev_scriptdir /lib/udev %define firmwaredir /lib/firmware - %define systemdsystemunitdir /lib/systemd/system Summary: A rule-based device node and kernel event manager @@ -140,10 +138,8 @@ rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la # Deprecated, but keep the ownership -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts,devices} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,devices} mkdir -p $RPM_BUILD_ROOT%{_bindir} -touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config # force relative symlinks ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id @@ -283,11 +279,7 @@ rm -rf $RPM_BUILD_ROOT %{systemdsystemunitdir}/sockets.target.wants/udev-kernel.socket # Deprecated, but keep the ownership -%ghost %dir /var/lib/udev -%ghost %dir %{_sysconfdir}/udev/scripts/ %ghost %dir %{_sysconfdir}/udev/devices/ -%ghost %dir %{_sysconfdir}/dev.d/ -%ghost %dir %{_sysconfdir}/udev/makedev.d/ %files -n libudev %defattr(0644, root, root, 0755) @@ -323,6 +315,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Wed Jul 20 2011 Harald Hoyer 172-2 - removed loop devices (should be compiled in the kernel) +- removed deprecated directories * Mon Jul 11 2011 Harald Hoyer 172-1 - version 172 From c28cf5922cc6d9b2978e28d49509f3a1ba68cf61 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Jul 2011 13:58:40 +0200 Subject: [PATCH 617/640] removed loop devices (should be compiled in the kernel) removed deprecated directories removed scsi_id symlink cleanup of requirements --- udev.spec | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/udev.spec b/udev.spec index 40ba7c7..1bf02ec 100644 --- a/udev.spec +++ b/udev.spec @@ -15,8 +15,8 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires(pre): /bin/sh fileutils /sbin/chkconfig /sbin/service -Requires(pre): /usr/bin/stat /sbin/pidof +Requires(pre): /bin/sh fileutils +Requires(pre): /usr/bin/stat Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units @@ -28,18 +28,18 @@ Conflicts: systemd < 28 Requires: s390utils-base %endif -BuildRequires: sed libselinux-devel >= 0:1.17.9-2 flex libsepol-devel -BuildRequires: glib2-devel bison findutils +BuildRequires: sed libselinux-devel >= 0:1.17.9-2 libsepol-devel +BuildRequires: glib2-devel findutils BuildRequires: gperf libtool -BuildRequires: libusb-devel libacl-devel +BuildRequires: libacl-devel BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 BuildRequires: libtool >= 2.2.6 BuildRequires: pkgconfig Requires: libselinux >= 0:1.17.9-2 sed -Conflicts: kernel < 0:2.6 mkinitrd <= 0:4.1.11-1 initscripts < 7.84 -Requires: util-linux-ng >= 2.15.1 +Conflicts: kernel < 0:2.6 +Requires: util-linux >= 2.15.1 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 # hid2hci moved to udev @@ -141,9 +141,6 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,devices} mkdir -p $RPM_BUILD_ROOT%{_bindir} -# force relative symlinks -ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id - for i in \ %ifarch ia64 rules/arch/40-ia64.rules \ @@ -222,8 +219,6 @@ rm -rf $RPM_BUILD_ROOT %doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm %attr(0755,root,root) /sbin/udevd -%attr(0755,root,root) /sbin/scsi_id -%attr(0755,root,root) %{udev_scriptdir}/scsi_id %attr(0755,root,root) %{udev_scriptdir}/ata_id %attr(0755,root,root) %{udev_scriptdir}/usb_id %attr(0755,root,root) %{udev_scriptdir}/cdrom_id @@ -248,13 +243,12 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules -%ghost %config(noreplace,missingok) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config - %dir %attr(0755,root,root) %{firmwaredir} %attr(0644,root,root) %{_mandir}/man8/udev*.8* %attr(0644,root,root) %{_mandir}/man7/udev*.7* %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* +%attr(0755,root,root) %{udev_scriptdir}/scsi_id %attr(0755,root,root) %{udev_scriptdir}/pci-db %attr(0755,root,root) %{udev_scriptdir}/usb-db %attr(0755,root,root) %{udev_scriptdir}/keymap @@ -316,6 +310,8 @@ rm -rf $RPM_BUILD_ROOT * Wed Jul 20 2011 Harald Hoyer 172-2 - removed loop devices (should be compiled in the kernel) - removed deprecated directories +- removed scsi_id symlink +- cleanup of requirements * Mon Jul 11 2011 Harald Hoyer 172-1 - version 172 From 08ec76712b2cceddbbeecab60437a76f0b70d2f5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 1 Aug 2011 13:21:13 +0200 Subject: [PATCH 618/640] version 173 udev-acl functionality is in systemd --- .gitignore | 1 + sources | 2 +- udev.spec | 15 +++++++-------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 9febfe1..26a7948 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ udev-160.tar.bz2 /udev-170.tar.bz2 /udev-171.tar.bz2 /udev-172.tar.bz2 +/udev-173.tar.bz2 diff --git a/sources b/sources index cee2704..cba6520 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd122d04cf758441f498aad0169a454f udev-172.tar.bz2 +91a88a359b60bbd074b024883cc0dbde udev-173.tar.bz2 diff --git a/udev.spec b/udev.spec index 1bf02ec..e026339 100644 --- a/udev.spec +++ b/udev.spec @@ -4,8 +4,8 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 172 -Release: 2%{?dist} +Version: 173 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} @@ -21,7 +21,7 @@ Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units Requires: pkgconfig -Conflicts: systemd < 28 +Conflicts: systemd < 32 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -31,7 +31,6 @@ Requires: s390utils-base BuildRequires: sed libselinux-devel >= 0:1.17.9-2 libsepol-devel BuildRequires: glib2-devel findutils BuildRequires: gperf libtool -BuildRequires: libacl-devel BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 @@ -252,14 +251,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{udev_scriptdir}/pci-db %attr(0755,root,root) %{udev_scriptdir}/usb-db %attr(0755,root,root) %{udev_scriptdir}/keymap -%attr(0755,root,root) %{udev_scriptdir}/udev-acl %attr(0755,root,root) %{udev_scriptdir}/v4l_id %attr(0755,root,root) %{udev_scriptdir}/findkeyboards %dir %{udev_scriptdir}/keymaps %{udev_scriptdir}/keymaps/* -%dir %{_prefix}/lib/ConsoleKit -%dir %{_prefix}/lib/ConsoleKit/run-seat.d -%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck %{_datadir}/pkgconfig/udev.pc %attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service @@ -307,6 +302,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Aug 01 2011 Harald Hoyer 173-1 +- version 173 +- udev-acl functionality is in systemd + * Wed Jul 20 2011 Harald Hoyer 172-2 - removed loop devices (should be compiled in the kernel) - removed deprecated directories From 5fd2aaff27c2c868222011a94f2019f4bb2648fa Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Mon, 29 Aug 2011 09:10:39 +0100 Subject: [PATCH 619/640] Update OLPC XO keymap --- udev-olpc-keymap-update.patch | 65 +++++++++++++++++++++++++++++++++++ udev.spec | 8 ++++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 udev-olpc-keymap-update.patch diff --git a/udev-olpc-keymap-update.patch b/udev-olpc-keymap-update.patch new file mode 100644 index 0000000..f1bbecf --- /dev/null +++ b/udev-olpc-keymap-update.patch @@ -0,0 +1,65 @@ +From 00fc377e7a6b1997db346c8de51cbf05cad48376 Mon Sep 17 00:00:00 2001 +From: Paul Fox +Date: Mon, 22 Aug 2011 06:39:06 +0200 +Subject: [PATCH] keymap: update the OLPC keymap for correct function key + behavior + +New mappings were needed when the mechanical keyboard was +introduced, and GNOME was made a peer to the sugar desktop. +see http://lists.laptop.org/pipermail/devel/2010-July/029384.html +--- + extras/keymap/keymaps/olpc-xo | 38 ++++++++++++++++++++++++++------------ + 1 files changed, 26 insertions(+), 12 deletions(-) + +diff --git a/extras/keymap/keymaps/olpc-xo b/extras/keymap/keymaps/olpc-xo +index 7fe0662..34434a1 100644 +--- a/extras/keymap/keymaps/olpc-xo ++++ b/extras/keymap/keymaps/olpc-xo +@@ -2,18 +2,32 @@ + 0x81 fn_esc + 0xF9 camera + 0xF8 sound # Fn-CAMERA = Mic +-0xBB fn_f1 +-0xBC fn_f2 +-0xBD fn_f3 +-0xBE fn_f4 +-0xBF fn_f5 +-0xC0 fn_f6 +-0xC1 fn_f7 +-0xC2 fn_f8 +-0xC3 fn_f9 +-0xC4 fn_f10 +-0xD7 fn_f11 +-0xD8 fn_f12 ++ ++ ++# Function key mappings, as per ++# http://dev.laptop.org/ticket/10213#comment:20 ++# ++# Unmodified F1-F8 produce F1-F8, so no remap necessary. ++# Unmodified F9-F12 control brightness and volume. ++0x43 brightnessdown ++0x44 brightnessup ++0x57 volumedown ++0x58 volumeup ++ ++# fn-modified fkeys all produce the unmodified version of the key. ++0xBB f1 ++0xBC f2 ++0xBD f3 ++0xBE f4 ++0xBF f5 ++0xC0 f6 ++0xC1 f7 ++0xC2 f8 ++0xC3 f9 ++0xC4 f10 ++0xD7 f11 ++0xD8 f12 ++ + + # Using F13-F21 for the .5 F keys right now. + 0xF7 f13 +-- +1.7.4.4 + diff --git a/udev.spec b/udev.spec index e026339..598dcf2 100644 --- a/udev.spec +++ b/udev.spec @@ -5,13 +5,15 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 173 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Provides: udev-persistent = %{version}-%{release} Obsoletes: udev-persistent < 0:030-5 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +Patch1: udev-olpc-keymap-update.patch + ExclusiveOS: Linux URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -105,6 +107,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch1 -p1 %build # prevent man pages from re-building (xmlto) @@ -302,6 +305,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Aug 29 2011 Daniel Drake 173-2 +- Update OLPC XO keymap + * Mon Aug 01 2011 Harald Hoyer 173-1 - version 173 - udev-acl functionality is in systemd From 2618aa966eb7b47967048fc8e582a79bd7f3faa5 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 19 Oct 2011 21:22:11 +0200 Subject: [PATCH 620/640] version 174 --- .gitignore | 11 +- sources | 2 +- udev-olpc-keymap-update.patch | 65 -------- udev.spec | 277 ++++++++++++---------------------- 4 files changed, 95 insertions(+), 260 deletions(-) delete mode 100644 udev-olpc-keymap-update.patch diff --git a/.gitignore b/.gitignore index 26a7948..aaa1534 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1 @@ -udev-160.tar.bz2 -/udev-164.tar.bz2 -/udev-164.tar.bz2.sign -/udev-166.tar.bz2 -/udev-166.tar.bz2.sign -/udev-167.tar.bz2 -/udev-170.tar.bz2 -/udev-171.tar.bz2 -/udev-172.tar.bz2 -/udev-173.tar.bz2 +/udev-174.tar.bz2 diff --git a/sources b/sources index cba6520..5e58980 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -91a88a359b60bbd074b024883cc0dbde udev-173.tar.bz2 +3b84706046a33d7a7e00491a1136804d udev-174.tar.bz2 diff --git a/udev-olpc-keymap-update.patch b/udev-olpc-keymap-update.patch deleted file mode 100644 index f1bbecf..0000000 --- a/udev-olpc-keymap-update.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 00fc377e7a6b1997db346c8de51cbf05cad48376 Mon Sep 17 00:00:00 2001 -From: Paul Fox -Date: Mon, 22 Aug 2011 06:39:06 +0200 -Subject: [PATCH] keymap: update the OLPC keymap for correct function key - behavior - -New mappings were needed when the mechanical keyboard was -introduced, and GNOME was made a peer to the sugar desktop. -see http://lists.laptop.org/pipermail/devel/2010-July/029384.html ---- - extras/keymap/keymaps/olpc-xo | 38 ++++++++++++++++++++++++++------------ - 1 files changed, 26 insertions(+), 12 deletions(-) - -diff --git a/extras/keymap/keymaps/olpc-xo b/extras/keymap/keymaps/olpc-xo -index 7fe0662..34434a1 100644 ---- a/extras/keymap/keymaps/olpc-xo -+++ b/extras/keymap/keymaps/olpc-xo -@@ -2,18 +2,32 @@ - 0x81 fn_esc - 0xF9 camera - 0xF8 sound # Fn-CAMERA = Mic --0xBB fn_f1 --0xBC fn_f2 --0xBD fn_f3 --0xBE fn_f4 --0xBF fn_f5 --0xC0 fn_f6 --0xC1 fn_f7 --0xC2 fn_f8 --0xC3 fn_f9 --0xC4 fn_f10 --0xD7 fn_f11 --0xD8 fn_f12 -+ -+ -+# Function key mappings, as per -+# http://dev.laptop.org/ticket/10213#comment:20 -+# -+# Unmodified F1-F8 produce F1-F8, so no remap necessary. -+# Unmodified F9-F12 control brightness and volume. -+0x43 brightnessdown -+0x44 brightnessup -+0x57 volumedown -+0x58 volumeup -+ -+# fn-modified fkeys all produce the unmodified version of the key. -+0xBB f1 -+0xBC f2 -+0xBD f3 -+0xBE f4 -+0xBF f5 -+0xC0 f6 -+0xC1 f7 -+0xC2 f8 -+0xC3 f9 -+0xC4 f10 -+0xD7 f11 -+0xD8 f12 -+ - - # Using F13-F21 for the .5 F keys right now. - 0xF7 f13 --- -1.7.4.4 - diff --git a/udev.spec b/udev.spec index 598dcf2..15e136a 100644 --- a/udev.spec +++ b/udev.spec @@ -1,52 +1,36 @@ -%define udev_scriptdir /lib/udev -%define firmwaredir /lib/firmware -%define systemdsystemunitdir /lib/systemd/system - -Summary: A rule-based device node and kernel event manager -Name: udev -Version: 173 -Release: 2%{?dist} -License: GPLv2+ -Group: System Environment/Base -Provides: udev-persistent = %{version}-%{release} -Obsoletes: udev-persistent < 0:030-5 -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 - -Patch1: udev-olpc-keymap-update.patch - -ExclusiveOS: Linux -URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires(pre): /bin/sh fileutils -Requires(pre): /usr/bin/stat -Requires(pre): /usr/bin/getent /usr/sbin/groupadd -Requires: hwdata -Requires: systemd-units -Requires: pkgconfig -Conflicts: systemd < 32 +Summary: A rule-based device node and kernel event manager +Name: udev +Version: 174 +Release: 1%{?dist} +License: GPLv2+ +Group: System Environment/Base +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: gperf +BuildRequires: libselinux-devel libsepol-devel +BuildRequires: glib2-devel +BuildRequires: hwdata +BuildRequires: gobject-introspection-devel >= 0.6.2 +BuildRequires: usbutils >= 0.82 +Obsoletes: dev <= 0:3.12-1 +Provides: dev = 0:3.12-2 +Requires(pre): fileutils +Requires(pre): /usr/bin/getent /usr/sbin/groupadd +Requires: hwdata +Requires: systemd-units +Requires: pkgconfig +Requires: util-linux >= 2.15.1 +Conflicts: systemd < 37 +Conflicts: dracut < 013-85.git20111019 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 -Requires: s390utils-base +Requires: s390utils-base %endif -BuildRequires: sed libselinux-devel >= 0:1.17.9-2 libsepol-devel -BuildRequires: glib2-devel findutils -BuildRequires: gperf libtool -BuildRequires: hwdata -BuildRequires: gobject-introspection-devel >= 0.6.2 -BuildRequires: usbutils >= 0.82 -BuildRequires: libtool >= 2.2.6 -BuildRequires: pkgconfig -Requires: libselinux >= 0:1.17.9-2 sed -Conflicts: kernel < 0:2.6 -Requires: util-linux >= 2.15.1 -Obsoletes: dev <= 0:3.12-1 -Provides: dev = 0:3.12-2 -# hid2hci moved to udev -Conflicts: bluez < 4.47 -Requires: libudev = %{version}-%{release} - %description udev is a collection of tools and a daemon to manage events received from the kernel and deal with them in user-space. Primarily this @@ -55,94 +39,70 @@ symlinks to device nodes in /dev when hardware is discovered or removed from the system. %package -n libudev -Summary: Dynamic library to access udev device information -Group: System Environment/Libraries -Obsoletes: libudev0 <= 142 -Provides: libudev0 = 143 -License: LGPLv2+ +Summary: Dynamic library to access udev device information +Group: System Environment/Libraries +Requires: udev = %{version}-%{release} +License: LGPLv2+ %description -n libudev This package contains the dynamic library libudev, which provides access to udev device information, and an interface to search devices in sysfs. %package -n libudev-devel -Summary: Development files for libudev -Group: Development/Libraries -Requires: udev = %{version}-%{release} -Requires: libudev = %{version}-%{release} -Requires: pkgconfig -License: LGPLv2+ +Summary: Development files for libudev +Group: Development/Libraries +Requires: libudev = %{version}-%{release} +Requires: pkgconfig +License: LGPLv2+ %description -n libudev-devel This package contains the development files for the library libudev, a dynamic library, which provides access to udev device information. %package -n libgudev1 -Summary: Libraries for adding libudev support to applications that use glib -Group: Development/Libraries -Requires: libudev >= 142 -# remove the following lines for libgudev so major 1 -Provides: libgudev = 20090518 -Obsoletes: libgudev <= 20090517 -License: LGPLv2+ +Summary: Libraries for adding libudev support to applications that use glib +Group: Development/Libraries +Requires: libudev = %{version}-%{release} +License: LGPLv2+ %description -n libgudev1 This package contains the libraries that make it easier to use libudev functionality from applications that use glib. %package -n libgudev1-devel -Summary: Header files for adding libudev support to applications that use glib -Group: Development/Libraries -Requires: libudev-devel >= 142 -Provides: libgudev-devel = 20090518 -Obsoletes: libgudev-devel <= 20090517 -Requires: pkgconfig -License: LGPLv2+ - -Requires: libgudev1 = %{version}-%{release} +Summary: Header files for adding libudev support to applications that use glib +Group: Development/Libraries +Requires: libgudev1 = %{version}-%{release} +License: LGPLv2+ %description -n libgudev1-devel This package contains the header and pkg-config files for developing glib-based applications using libudev functionality. -%prep -%setup -q -%patch1 -p1 +%prep +%setup -q %build # prevent man pages from re-building (xmlto) find . -name "*.[1-8]" -exec touch '{}' \; - export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" - -# prevent man pages from re-building (xmlto) -find . -name "*.[1-8]" -exec touch '{}' \; export V=1 - -libtoolize -f -c -%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \ - --sysconfdir=%{_sysconfdir} \ - --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \ - --with-rootlibdir=/%{_lib} \ - --with-systemdsystemunitdir=%{systemdsystemunitdir} \ - --enable-floppy - +%configure \ + --prefix=%{_prefix} \ + --sysconfdir=%{_sysconfdir} \ + --sbindir=/sbin \ + --libexecdir=/lib/udev \ + --with-rootlibdir=/%{_lib} \ + --with-selinux \ + --with-systemdsystemunitdir=/lib/systemd/system \ + --enable-floppy make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT - -mkdir -p $RPM_BUILD_ROOT%{_sbindir} - make install DESTDIR=$RPM_BUILD_ROOT - rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la - -# Deprecated, but keep the ownership -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,devices} -mkdir -p $RPM_BUILD_ROOT%{_bindir} - for i in \ %ifarch ia64 rules/arch/40-ia64.rules \ @@ -154,55 +114,21 @@ for i in \ rules/arch/40-s390.rules \ %endif ; do - install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}" + install -m 0644 "$i" "$RPM_BUILD_ROOT/lib/udev/rules.d/${i##*/}" done - -mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev -mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir} - -%preun -if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then - if test -x /usr/bin/stat -a \ - "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /sbin/udevadm control --exit 2>&1 || : - fi - /sbin/chkconfig --del udev || : -fi -if [ "$1" -eq 0 ]; then - /sbin/chkconfig --del udev-retry || : -fi -/sbin/chkconfig --del udev-post >/dev/null 2>&1 || : -exit 0 +mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware +mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware/updates %pre getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : - -if ! /bin/systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1; then - # kill daemon if we are not in a chroot - if test -f /proc/1/exe -a -d /proc/1/root; then - if test -x /usr/bin/stat -a \ - "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /sbin/udevadm control --exit 2>&1 || : - fi - fi -fi -exit 0 +/bin/systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : %post /bin/systemctl daemon-reload >/dev/null 2>&1 || : - -if ! /bin/systemctl start udev.service >/dev/null 2>&1; then - # start daemon if we are not in a chroot - if test -f /proc/1/exe -a -d /proc/1/root; then - if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then - /sbin/udevd -d >/dev/null 2>&1 || : - fi - fi -fi -exit 0 +/bin/systemctl start udev.service >/dev/null 2>&1 || : %postun /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -217,61 +143,30 @@ exit 0 rm -rf $RPM_BUILD_ROOT %files -%defattr(0644, root, root, 0755) +%defattr(-, root, root, 0755) %doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm -%attr(0755,root,root) /sbin/udevd -%attr(0755,root,root) %{udev_scriptdir}/ata_id -%attr(0755,root,root) %{udev_scriptdir}/usb_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}/firmware -%attr(0644,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) %{udev_scriptdir}/collect -%attr(0755,root,root) %{udev_scriptdir}/input_id -%attr(0755,root,root) %{udev_scriptdir}/keyboard-force-release.sh -%attr(0755,root,root) %{udev_scriptdir}/mtd_probe -%attr(0755,root,root) %{udev_scriptdir}/accelerometer - -%attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/ +%attr(0755,root,root) /lib/udev/udevd +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) %dir %{udev_scriptdir}/ -%attr(0755,root,root) %dir %{udev_scriptdir}/devices/ - -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules - -%dir %attr(0755,root,root) %{firmwaredir} -%attr(0644,root,root) %{_mandir}/man8/udev*.8* -%attr(0644,root,root) %{_mandir}/man7/udev*.7* -%attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* - -%attr(0755,root,root) %{udev_scriptdir}/scsi_id -%attr(0755,root,root) %{udev_scriptdir}/pci-db -%attr(0755,root,root) %{udev_scriptdir}/usb-db -%attr(0755,root,root) %{udev_scriptdir}/keymap -%attr(0755,root,root) %{udev_scriptdir}/v4l_id -%attr(0755,root,root) %{udev_scriptdir}/findkeyboards -%dir %{udev_scriptdir}/keymaps -%{udev_scriptdir}/keymaps/* +%attr(0755,root,root) %dir /lib/udev +%attr(0755,root,root) %dir /lib/udev/rules.d/ +%attr(0755,root,root) %dir /lib/udev/devices/ +%attr(0755,root,root) %dir /lib/udev/keymaps +/lib/udev/* +/lib/udev/keymaps/* +%attr(0644,root,root) /lib/udev/rules.d/*.rules +%attr(0644,root,root) %{_mandir}/man7/*.7* +%attr(0644,root,root) %{_mandir}/man8/*.8* %{_datadir}/pkgconfig/udev.pc +%dir %attr(0755,root,root) /lib/firmware +%dir %attr(0755,root,root) /lib/firmware/updates -%attr(0644,root,root) %{systemdsystemunitdir}/udev-settle.service -%attr(0644,root,root) %{systemdsystemunitdir}/udev-trigger.service -%attr(0644,root,root) %{systemdsystemunitdir}/udev.service -%attr(0644,root,root) %{systemdsystemunitdir}/udev-kernel.socket -%attr(0644,root,root) %{systemdsystemunitdir}/udev-control.socket -%{systemdsystemunitdir}/basic.target.wants/udev.service -%{systemdsystemunitdir}/basic.target.wants/udev-trigger.service -%{systemdsystemunitdir}/sockets.target.wants/udev-control.socket -%{systemdsystemunitdir}/sockets.target.wants/udev-kernel.socket - -# Deprecated, but keep the ownership -%ghost %dir %{_sysconfdir}/udev/devices/ +%attr(0644,root,root) /lib/systemd/system/*.service +%attr(0644,root,root) /lib/systemd/system/*.socket +/lib/systemd/system/basic.target.wants/*.service +/lib/systemd/system/sockets.target.wants/*.socket %files -n libudev %defattr(0644, root, root, 0755) @@ -305,6 +200,20 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Oct 10 2011 Kay Sievers 173-4 +- version 174 + - path_id, usb_id, input_id tools are built-in commands + - fusectl is mounted by systemd + - SYSFS=, ID=, BUS= are removed + - udevadm trigger --type=failed is removed + - udev control socket is now in /run/udev/control + - disable persistent net and cdrom rule generator +- remove obsolete rpm dependencies +- remove SYSV init script controls + +* Mon Aug 29 2011 Kay Sievers 173-3 +- fix bluetooth input device handling (brc#733862) + * Mon Aug 29 2011 Daniel Drake 173-2 - Update OLPC XO keymap From 2d66943d2fe4aa0610be58f866264708aacf017e Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 20 Oct 2011 00:24:46 +0200 Subject: [PATCH 621/640] fix version in changelog --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 15e136a..25c72e2 100644 --- a/udev.spec +++ b/udev.spec @@ -200,7 +200,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog -* Mon Oct 10 2011 Kay Sievers 173-4 +* Mon Oct 10 2011 Kay Sievers 174-1 - version 174 - path_id, usb_id, input_id tools are built-in commands - fusectl is mounted by systemd From 9653945ff2fc121267e714150575a12c4ff88358 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 20 Oct 2011 13:55:54 +0200 Subject: [PATCH 622/640] update dracut requirement, include entire /lib/udev directory --- udev.spec | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/udev.spec b/udev.spec index 25c72e2..a083a95 100644 --- a/udev.spec +++ b/udev.spec @@ -24,7 +24,7 @@ Requires: systemd-units Requires: pkgconfig Requires: util-linux >= 2.15.1 Conflicts: systemd < 37 -Conflicts: dracut < 013-85.git20111019 +Conflicts: dracut < 013-93 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -146,23 +146,15 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root, 0755) %doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt %attr(0755,root,root) /sbin/udevadm -%attr(0755,root,root) /lib/udev/udevd %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) %dir /lib/udev -%attr(0755,root,root) %dir /lib/udev/rules.d/ -%attr(0755,root,root) %dir /lib/udev/devices/ -%attr(0755,root,root) %dir /lib/udev/keymaps -/lib/udev/* -/lib/udev/keymaps/* -%attr(0644,root,root) /lib/udev/rules.d/*.rules +%attr(0755,root,root) /lib/udev %attr(0644,root,root) %{_mandir}/man7/*.7* %attr(0644,root,root) %{_mandir}/man8/*.8* %{_datadir}/pkgconfig/udev.pc %dir %attr(0755,root,root) /lib/firmware %dir %attr(0755,root,root) /lib/firmware/updates - %attr(0644,root,root) /lib/systemd/system/*.service %attr(0644,root,root) /lib/systemd/system/*.socket /lib/systemd/system/basic.target.wants/*.service @@ -200,7 +192,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog -* Mon Oct 10 2011 Kay Sievers 174-1 +* Thu Oct 20 2011 Kay Sievers 174-1 - version 174 - path_id, usb_id, input_id tools are built-in commands - fusectl is mounted by systemd From 4dfe0853b64444e1c5c8f0c7564909ce7b9ed81a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sat, 22 Oct 2011 22:06:39 +0200 Subject: [PATCH 623/640] ignore entire rule when a key is unknown --- ...-rules-line-if-unknown-keys-are-used.patch | 26 +++++++++++++++++++ udev.spec | 7 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch diff --git a/0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch b/0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch new file mode 100644 index 0000000..4d9f1c6 --- /dev/null +++ b/0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch @@ -0,0 +1,26 @@ +From 95691487363ef213fec6975219c87d29415a2479 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 22 Oct 2011 20:50:23 +0200 +Subject: [PATCH] ignore entire rules line if unknown keys are used + +--- + udev/udev-rules.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/udev/udev-rules.c b/udev/udev-rules.c +index 75636d9..f540a5a 100644 +--- a/udev/udev-rules.c ++++ b/udev/udev-rules.c +@@ -1612,7 +1612,9 @@ static int add_rule(struct udev_rules *rules, char *line, + + continue; + } ++ + err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno); ++ goto invalid; + } + + /* add rule token */ +-- +1.7.6.4 + diff --git a/udev.spec b/udev.spec index a083a95..f2e24ff 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 174 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 @@ -25,6 +25,7 @@ Requires: pkgconfig Requires: util-linux >= 2.15.1 Conflicts: systemd < 37 Conflicts: dracut < 013-93 +Patch10: 0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -81,6 +82,7 @@ glib-based applications using libudev functionality. %prep %setup -q +%patch10 -p1 %build # prevent man pages from re-building (xmlto) @@ -192,6 +194,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Sat Oct 22 2011 Kay Sievers 174-2 +- ignore entire rule when a key is unknown (brc#748082) + * Thu Oct 20 2011 Kay Sievers 174-1 - version 174 - path_id, usb_id, input_id tools are built-in commands From f9c13ce3bfd1f58042484f7eb631fc64ac121767 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 8 Nov 2011 01:46:54 +0100 Subject: [PATCH 624/640] version 175 --- .gitignore | 2 +- ...-rules-line-if-unknown-keys-are-used.patch | 26 ------------------- sources | 2 +- udev.spec | 10 ++++--- 4 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch diff --git a/.gitignore b/.gitignore index aaa1534..9e36943 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/udev-174.tar.bz2 +/udev-175.tar.bz2 diff --git a/0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch b/0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch deleted file mode 100644 index 4d9f1c6..0000000 --- a/0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 95691487363ef213fec6975219c87d29415a2479 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sat, 22 Oct 2011 20:50:23 +0200 -Subject: [PATCH] ignore entire rules line if unknown keys are used - ---- - udev/udev-rules.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 75636d9..f540a5a 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1612,7 +1612,9 @@ static int add_rule(struct udev_rules *rules, char *line, - - continue; - } -+ - err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno); -+ goto invalid; - } - - /* add rule token */ --- -1.7.6.4 - diff --git a/sources b/sources index 5e58980..f573b89 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3b84706046a33d7a7e00491a1136804d udev-174.tar.bz2 +2fc9c1efcbde98e3d73ffee7a77aea47 udev-175.tar.bz2 diff --git a/udev.spec b/udev.spec index f2e24ff..09ee959 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 174 -Release: 2%{?dist} +Version: 175 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 @@ -25,7 +25,6 @@ Requires: pkgconfig Requires: util-linux >= 2.15.1 Conflicts: systemd < 37 Conflicts: dracut < 013-93 -Patch10: 0001-ignore-entire-rules-line-if-unknown-keys-are-used.patch %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -82,7 +81,6 @@ glib-based applications using libudev functionality. %prep %setup -q -%patch10 -p1 %build # prevent man pages from re-building (xmlto) @@ -194,6 +192,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Mon Nov 7 2011 Kay Sievers 175-1 +- version 175 + - bug fix release + * Sat Oct 22 2011 Kay Sievers 174-2 - ignore entire rule when a key is unknown (brc#748082) From 27412d3df258a617bfc05f4b1d820b23e3ebe866 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 01:25:45 -0600 Subject: [PATCH 625/640] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- udev.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 09ee959..a52b63b 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 175 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 @@ -192,6 +192,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 175-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Nov 7 2011 Kay Sievers 175-1 - version 175 - bug fix release From faded2be30b587c563f6aceba52826ef1ea8f7fe Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 25 Jan 2012 14:04:35 +0100 Subject: [PATCH 626/640] version 179 --- .gitignore | 2 +- sources | 2 +- udev.spec | 62 ++++++++++++++++++++++-------------------------------- 3 files changed, 27 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 9e36943..9e7171b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/udev-175.tar.bz2 +/udev-179.tar.xz diff --git a/sources b/sources index f573b89..85ba111 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2fc9c1efcbde98e3d73ffee7a77aea47 udev-175.tar.bz2 +c966a07dd75fd8d3f1a7e3d210a96c6b udev-179.tar.xz diff --git a/udev.spec b/udev.spec index a52b63b..6c26f64 100644 --- a/udev.spec +++ b/udev.spec @@ -1,12 +1,11 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 175 -Release: 2%{?dist} +Version: 179 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2 +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: gperf @@ -15,13 +14,14 @@ BuildRequires: glib2-devel BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 +BuildRequires: kmod-libs >= 4 +BuildRequires: libblkid-devel >= 2.20 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 Requires(pre): fileutils Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units -Requires: pkgconfig Requires: util-linux >= 2.15.1 Conflicts: systemd < 37 Conflicts: dracut < 013-93 @@ -89,35 +89,24 @@ export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" export V=1 %configure \ --prefix=%{_prefix} \ + --with-rootprefix= \ --sysconfdir=%{_sysconfdir} \ - --sbindir=/sbin \ - --libexecdir=/lib/udev \ + --bindir=/sbin \ + --libexecdir=/lib \ --with-rootlibdir=/%{_lib} \ --with-selinux \ - --with-systemdsystemunitdir=/lib/systemd/system \ - --enable-floppy + --with-systemdsystemunitdir=/lib/systemd/system make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -for i in \ -%ifarch ia64 - rules/arch/40-ia64.rules \ -%endif -%ifarch ppc ppc64 - rules/arch/40-ppc.rules \ -%endif -%ifarch s390 s390x - rules/arch/40-s390.rules \ -%endif - ; do - install -m 0644 "$i" "$RPM_BUILD_ROOT/lib/udev/rules.d/${i##*/}" -done mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware/updates +%ifarch s390 s390x +install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT/lib/udev/rules.d +%endif %pre getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : @@ -139,17 +128,13 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %post -n libgudev1 -p /sbin/ldconfig %postun -n libgudev1 -p /sbin/ldconfig -%clean -rm -rf $RPM_BUILD_ROOT - %files -%defattr(-, root, root, 0755) -%doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt +%doc NEWS COPYING README TODO ChangeLog src/extras/keymap/README.keymap.txt +/lib/udev %attr(0755,root,root) /sbin/udevadm %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0755,root,root) /lib/udev %attr(0644,root,root) %{_mandir}/man7/*.7* %attr(0644,root,root) %{_mandir}/man8/*.8* %{_datadir}/pkgconfig/udev.pc @@ -161,27 +146,23 @@ rm -rf $RPM_BUILD_ROOT /lib/systemd/system/sockets.target.wants/*.socket %files -n libudev -%defattr(0644, root, root, 0755) -%doc libudev/COPYING +%doc src/COPYING %attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel -%defattr(0644, root, root, 0755) -%doc libudev/docs/html/* +%doc src/docs/html/* %{_includedir}/libudev.h %{_libdir}/libudev.so %{_libdir}/pkgconfig/libudev.pc %{_datadir}/gtk-doc/html/libudev/* %files -n libgudev1 -%defattr(0644, root, root, 0755) -%doc extras/gudev/COPYING +%doc src/extras/gudev/COPYING %attr(0755,root,root) /%{_lib}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel -%defattr(0644, root, root, 0755) -%doc extras/gudev/docs/html/* +%doc src/extras/gudev/docs/html/* %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %dir %attr(0755,root,root) %{_includedir}/gudev-1.0 %dir %attr(0755,root,root) %{_includedir}/gudev-1.0/gudev @@ -192,6 +173,13 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jan 25 2012 Kay Sievers 179-1 +- version 179 + - devtmpfs is mandatory now + - /run is mandatory now + - modules are loaded with 'libkmod' + - blkid is built-in now + * Sat Jan 14 2012 Fedora Release Engineering - 175-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From e0eeb8a6eb14a00a01f3a1d8f384cc1309db4e06 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 25 Jan 2012 14:47:02 +0100 Subject: [PATCH 627/640] require 'kmod-devel' instead of 'kmod-libs' --- udev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev.spec b/udev.spec index 6c26f64..290d0e4 100644 --- a/udev.spec +++ b/udev.spec @@ -14,7 +14,7 @@ BuildRequires: glib2-devel BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 -BuildRequires: kmod-libs >= 4 +BuildRequires: kmod-devel >= 4 BuildRequires: libblkid-devel >= 2.20 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 From f110253ee56616d3d843e7cfd14a6788d63ec9c6 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 25 Jan 2012 15:02:58 +0100 Subject: [PATCH 628/640] work around broken upstream tarball's 'xslt' ifdef --- udev.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/udev.spec b/udev.spec index 290d0e4..2aeb9b3 100644 --- a/udev.spec +++ b/udev.spec @@ -16,6 +16,7 @@ BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 BuildRequires: kmod-devel >= 4 BuildRequires: libblkid-devel >= 2.20 +BuildRequires: libxslt Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 Requires(pre): fileutils From dc3e663505775fa2e4d743d6a6033565ebdaf096 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 25 Jan 2012 15:26:48 +0100 Subject: [PATCH 629/640] install everything in /usr This patch is needed for the /usr-move feature https://fedoraproject.org/wiki/Features/UsrMove This package requires now 'filesystem' >= 3, which is only installable on a system which has /bin, /sbin, /lib, /lib64 as symlinks to /usr and not regular directories. The 'filesystem' package acts as a guard, to prevent *this* package to be installed on old unconverted systems. New installations will have the 'filesystem' >=3 layout right away, old installations need to be converted with anaconda or dracut first; only after that, the 'filesystem' package, and also *this* package can be installed. Packages *should* not install files in /bin, /sbin, /lib, /lib64, but only in the corresponding directories in /usr. Packages *must* not install conflicting files with the same names in the corresponding directories in / and /usr. Especially compatibilty symlinks must not be installed. Feel free to modify any of the changes to the spec file, but keep the above in mind. --- udev.spec | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/udev.spec b/udev.spec index 2aeb9b3..0ac9dcf 100644 --- a/udev.spec +++ b/udev.spec @@ -24,8 +24,9 @@ Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata Requires: systemd-units Requires: util-linux >= 2.15.1 -Conflicts: systemd < 37 +Conflicts: systemd < 39 Conflicts: dracut < 013-93 +Conflicts: filesystem < 3 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -43,6 +44,7 @@ removed from the system. Summary: Dynamic library to access udev device information Group: System Environment/Libraries Requires: udev = %{version}-%{release} +Conflicts: filesystem < 3 License: LGPLv2+ %description -n libudev @@ -64,6 +66,7 @@ dynamic library, which provides access to udev device information. Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev = %{version}-%{release} +Conflicts: filesystem < 3 License: LGPLv2+ %description -n libgudev1 @@ -90,23 +93,22 @@ export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" export V=1 %configure \ --prefix=%{_prefix} \ - --with-rootprefix= \ --sysconfdir=%{_sysconfdir} \ - --bindir=/sbin \ - --libexecdir=/lib \ - --with-rootlibdir=/%{_lib} \ + --libexecdir=%{_prefix}/lib \ --with-selinux \ - --with-systemdsystemunitdir=/lib/systemd/system + --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware -mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware/updates +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware/updates +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/sbin +ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_prefix}/sbin/udevadm %ifarch s390 s390x -install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT/lib/udev/rules.d +install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d %endif %pre @@ -131,24 +133,25 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %files %doc NEWS COPYING README TODO ChangeLog src/extras/keymap/README.keymap.txt -/lib/udev -%attr(0755,root,root) /sbin/udevadm +%{_bindir}/udevadm +%{_prefix}/sbin/udevadm +%{_prefix}/lib/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0644,root,root) %{_mandir}/man7/*.7* %attr(0644,root,root) %{_mandir}/man8/*.8* %{_datadir}/pkgconfig/udev.pc -%dir %attr(0755,root,root) /lib/firmware -%dir %attr(0755,root,root) /lib/firmware/updates -%attr(0644,root,root) /lib/systemd/system/*.service -%attr(0644,root,root) /lib/systemd/system/*.socket -/lib/systemd/system/basic.target.wants/*.service -/lib/systemd/system/sockets.target.wants/*.socket +%dir %attr(0755,root,root) %{_prefix}/lib/firmware +%dir %attr(0755,root,root) %{_prefix}/lib/firmware/updates +%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.service +%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.socket +%{_prefix}/lib/systemd/system/basic.target.wants/*.service +%{_prefix}/lib/systemd/system/sockets.target.wants/*.socket %files -n libudev %doc src/COPYING -%attr(0755,root,root) /%{_lib}/libudev.so.* +%attr(0755,root,root) %{_libdir}/libudev.so.* %files -n libudev-devel %doc src/docs/html/* @@ -159,7 +162,7 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %files -n libgudev1 %doc src/extras/gudev/COPYING -%attr(0755,root,root) /%{_lib}/libgudev-1.0.so.* +%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel @@ -174,6 +177,10 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jan 25 2012 Kay Sievers 179-1 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + * Wed Jan 25 2012 Kay Sievers 179-1 - version 179 - devtmpfs is mandatory now From 36b9856624b9245a937a7c89b692cbcb709d0a8b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 25 Jan 2012 15:42:00 +0100 Subject: [PATCH 630/640] increment release --- udev.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 0ac9dcf..826ea6c 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 179 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -177,7 +177,7 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog -* Wed Jan 25 2012 Kay Sievers 179-1 +* Wed Jan 25 2012 Kay Sievers 179-2 - install everything in /usr https://fedoraproject.org/wiki/Features/UsrMove From e0bc75be11e9b7ab64d883c517d8906d15cb5a74 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 25 Jan 2012 19:36:33 +0100 Subject: [PATCH 631/640] use %{_sbindir} now that everything is in /usr --- udev.spec | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/udev.spec b/udev.spec index 826ea6c..382ee15 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 179 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -87,16 +87,16 @@ glib-based applications using libudev functionality. %setup -q %build -# prevent man pages from re-building (xmlto) +# prevent man pages from re-building (xsltproc) find . -name "*.[1-8]" -exec touch '{}' \; export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" export V=1 %configure \ - --prefix=%{_prefix} \ - --sysconfdir=%{_sysconfdir} \ - --libexecdir=%{_prefix}/lib \ - --with-selinux \ - --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system + --prefix=%{_prefix} \ + --sysconfdir=%{_sysconfdir} \ + --libexecdir=%{_prefix}/lib \ + --with-selinux \ + --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system make %{?_smp_mflags} %install @@ -105,8 +105,8 @@ rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware/updates -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/sbin -ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_prefix}/sbin/udevadm +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sbindir} +ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevadm %ifarch s390 s390x install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d %endif @@ -116,14 +116,14 @@ getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : -/bin/systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : +systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : %post -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -/bin/systemctl start udev.service >/dev/null 2>&1 || : +systemctl daemon-reload >/dev/null 2>&1 || : +systemctl start udev.service >/dev/null 2>&1 || : %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +systemctl daemon-reload >/dev/null 2>&1 || : %post -n libudev -p /sbin/ldconfig %postun -n libudev -p /sbin/ldconfig @@ -134,7 +134,7 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %files %doc NEWS COPYING README TODO ChangeLog src/extras/keymap/README.keymap.txt %{_bindir}/udevadm -%{_prefix}/sbin/udevadm +%{_sbindir}/udevadm %{_prefix}/lib/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ @@ -177,6 +177,9 @@ getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jan 25 2012 Kay Sievers 179-3 +- use %{_sbindir} + * Wed Jan 25 2012 Kay Sievers 179-2 - install everything in /usr https://fedoraproject.org/wiki/Features/UsrMove From 17aa1fb443765c6d357ea2d00cc0feff87842c0b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 29 Jan 2012 06:10:55 +0100 Subject: [PATCH 632/640] version 180 --- .gitignore | 2 +- sources | 2 +- udev.spec | 52 ++++++++++++++++++++++++++++------------------------ 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 9e7171b..fc16718 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/udev-179.tar.xz +/udev-180.tar.xz diff --git a/sources b/sources index 85ba111..c1d8327 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c966a07dd75fd8d3f1a7e3d210a96c6b udev-179.tar.xz +b8fb801e7d8371d1bc5c80535008d608 udev-180.tar.xz diff --git a/udev.spec b/udev.spec index 382ee15..06d97fa 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 179 -Release: 3%{?dist} +Version: 180 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -16,7 +16,6 @@ BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 BuildRequires: kmod-devel >= 4 BuildRequires: libblkid-devel >= 2.20 -BuildRequires: libxslt Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 Requires(pre): fileutils @@ -26,7 +25,6 @@ Requires: systemd-units Requires: util-linux >= 2.15.1 Conflicts: systemd < 39 Conflicts: dracut < 013-93 -Conflicts: filesystem < 3 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -44,7 +42,6 @@ removed from the system. Summary: Dynamic library to access udev device information Group: System Environment/Libraries Requires: udev = %{version}-%{release} -Conflicts: filesystem < 3 License: LGPLv2+ %description -n libudev @@ -66,7 +63,6 @@ dynamic library, which provides access to udev device information. Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev = %{version}-%{release} -Conflicts: filesystem < 3 License: LGPLv2+ %description -n libgudev1 @@ -93,22 +89,23 @@ export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" export V=1 %configure \ --prefix=%{_prefix} \ + --with-rootprefix= \ --sysconfdir=%{_sysconfdir} \ - --libexecdir=%{_prefix}/lib \ + --libexecdir=/lib \ + --bindir=/sbin \ + --with-rootlibdir=/%{_lib} \ --with-selinux \ - --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system + --with-systemdsystemunitdir=/lib/systemd/system make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware/updates -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sbindir} -ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevadm +mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware +mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware/updates %ifarch s390 s390x -install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d +install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT/lib/udev/rules.d %endif %pre @@ -133,25 +130,24 @@ systemctl daemon-reload >/dev/null 2>&1 || : %files %doc NEWS COPYING README TODO ChangeLog src/extras/keymap/README.keymap.txt -%{_bindir}/udevadm -%{_sbindir}/udevadm -%{_prefix}/lib/udev +/lib/udev +/sbin/udevadm %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0644,root,root) %{_mandir}/man7/*.7* %attr(0644,root,root) %{_mandir}/man8/*.8* %{_datadir}/pkgconfig/udev.pc -%dir %attr(0755,root,root) %{_prefix}/lib/firmware -%dir %attr(0755,root,root) %{_prefix}/lib/firmware/updates -%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.service -%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.socket -%{_prefix}/lib/systemd/system/basic.target.wants/*.service -%{_prefix}/lib/systemd/system/sockets.target.wants/*.socket +%dir %attr(0755,root,root) /lib/firmware +%dir %attr(0755,root,root) /lib/firmware/updates +%attr(0644,root,root) /lib/systemd/system/*.service +%attr(0644,root,root) /lib/systemd/system/*.socket +/lib/systemd/system/basic.target.wants/*.service +/lib/systemd/system/sockets.target.wants/*.socket %files -n libudev %doc src/COPYING -%attr(0755,root,root) %{_libdir}/libudev.so.* +%attr(0755,root,root) /%{_lib}/libudev.so.* %files -n libudev-devel %doc src/docs/html/* @@ -162,7 +158,7 @@ systemctl daemon-reload >/dev/null 2>&1 || : %files -n libgudev1 %doc src/extras/gudev/COPYING -%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* +%attr(0755,root,root) /%{_lib}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel @@ -177,6 +173,14 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Wed Jan 25 2012 Kay Sievers 180-1 +- version 180 + - fix rule execution (brc#785148) + - ID_PART_* export for udisks2 +- temporarily revert 'install everything in /usr' to be + able to update teh current rawhide package without the + dependency on the /usr-move converted filessytem + * Wed Jan 25 2012 Kay Sievers 179-3 - use %{_sbindir} From 90bdfa8bcd577423f731f8a96ce3c334a7a0610f Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 29 Jan 2012 18:36:10 +0100 Subject: [PATCH 633/640] install everything in /usr --- udev.spec | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/udev.spec b/udev.spec index 06d97fa..82c072b 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 180 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -25,6 +25,7 @@ Requires: systemd-units Requires: util-linux >= 2.15.1 Conflicts: systemd < 39 Conflicts: dracut < 013-93 +Conflicts: filesystem < 3 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -42,6 +43,7 @@ removed from the system. Summary: Dynamic library to access udev device information Group: System Environment/Libraries Requires: udev = %{version}-%{release} +Conflicts: filesystem < 3 License: LGPLv2+ %description -n libudev @@ -63,6 +65,7 @@ dynamic library, which provides access to udev device information. Summary: Libraries for adding libudev support to applications that use glib Group: Development/Libraries Requires: libudev = %{version}-%{release} +Conflicts: filesystem < 3 License: LGPLv2+ %description -n libgudev1 @@ -89,23 +92,22 @@ export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" export V=1 %configure \ --prefix=%{_prefix} \ - --with-rootprefix= \ --sysconfdir=%{_sysconfdir} \ - --libexecdir=/lib \ - --bindir=/sbin \ - --with-rootlibdir=/%{_lib} \ + --libexecdir=%{_prefix}/lib \ --with-selinux \ - --with-systemdsystemunitdir=/lib/systemd/system + --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT%{_docdir}/udev rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware -mkdir -p -m 0755 $RPM_BUILD_ROOT/lib/firmware/updates +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware/updates +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sbindir} +ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevadm %ifarch s390 s390x -install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT/lib/udev/rules.d +install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d %endif %pre @@ -130,24 +132,25 @@ systemctl daemon-reload >/dev/null 2>&1 || : %files %doc NEWS COPYING README TODO ChangeLog src/extras/keymap/README.keymap.txt -/lib/udev -/sbin/udevadm +%{_bindir}/udevadm +%{_sbindir}/udevadm +%{_prefix}/lib/udev %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf %attr(0755,root,root) %dir %{_sysconfdir}/udev/ %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ %attr(0644,root,root) %{_mandir}/man7/*.7* %attr(0644,root,root) %{_mandir}/man8/*.8* %{_datadir}/pkgconfig/udev.pc -%dir %attr(0755,root,root) /lib/firmware -%dir %attr(0755,root,root) /lib/firmware/updates -%attr(0644,root,root) /lib/systemd/system/*.service -%attr(0644,root,root) /lib/systemd/system/*.socket -/lib/systemd/system/basic.target.wants/*.service -/lib/systemd/system/sockets.target.wants/*.socket +%dir %attr(0755,root,root) %{_prefix}/lib/firmware +%dir %attr(0755,root,root) %{_prefix}/lib/firmware/updates +%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.service +%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.socket +%{_prefix}/lib/systemd/system/basic.target.wants/*.service +%{_prefix}/lib/systemd/system/sockets.target.wants/*.socket %files -n libudev %doc src/COPYING -%attr(0755,root,root) /%{_lib}/libudev.so.* +%attr(0755,root,root) %{_libdir}/libudev.so.* %files -n libudev-devel %doc src/docs/html/* @@ -158,7 +161,7 @@ systemctl daemon-reload >/dev/null 2>&1 || : %files -n libgudev1 %doc src/extras/gudev/COPYING -%attr(0755,root,root) /%{_lib}/libgudev-1.0.so.* +%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel @@ -173,7 +176,11 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog -* Wed Jan 25 2012 Kay Sievers 180-1 +* Sun Jan 29 2012 Kay Sievers 180-2 + - install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Sun Jan 29 2012 Kay Sievers 180-1 - version 180 - fix rule execution (brc#785148) - ID_PART_* export for udisks2 From 9646fdce3ab5383710aefaaac5a944347b8e9dec Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 3 Feb 2012 11:36:31 +0100 Subject: [PATCH 634/640] test building with filesystem guard --- udev.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 82c072b..1b2c087 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 180 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -25,7 +25,7 @@ Requires: systemd-units Requires: util-linux >= 2.15.1 Conflicts: systemd < 39 Conflicts: dracut < 013-93 -Conflicts: filesystem < 3 +Conflicts: filesystem < 3-2 %ifarch s390 s390x # Require s390utils-base, because it's essential on s390 @@ -176,6 +176,9 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Fri Feb 3 2012 Kay Sievers 180-3 + - require an newer filesystem (repo test rebuild) + * Sun Jan 29 2012 Kay Sievers 180-2 - install everything in /usr https://fedoraproject.org/wiki/Features/UsrMove From d138c6fc556b77a1c7cb6764a2389af39a3f0d18 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 7 Feb 2012 02:10:33 +0100 Subject: [PATCH 635/640] version 181 --- .gitignore | 2 +- sources | 2 +- udev.spec | 15 ++++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index fc16718..74b8c82 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/udev-180.tar.xz +/udev-181.tar.xz diff --git a/sources b/sources index c1d8327..e40f349 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b8fb801e7d8371d1bc5c80535008d608 udev-180.tar.xz +ef86e3e1b4f3eaa9d8c72ac76b9466a7 udev-181.tar.xz diff --git a/udev.spec b/udev.spec index 1b2c087..7d30523 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 180 -Release: 3%{?dist} +Version: 181 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -14,7 +14,7 @@ BuildRequires: glib2-devel BuildRequires: hwdata BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 -BuildRequires: kmod-devel >= 4 +BuildRequires: kmod-devel >= 5 BuildRequires: libblkid-devel >= 2.20 Obsoletes: dev <= 0:3.12-1 Provides: dev = 0:3.12-2 @@ -176,11 +176,16 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Feb 7 2012 Kay Sievers 181-1 +- version 181 + - require kmod 5 + - provide /dev/cdrom for /dev/sr0 + * Fri Feb 3 2012 Kay Sievers 180-3 - - require an newer filesystem (repo test rebuild) +- require an newer filesystem (repo test rebuild) * Sun Jan 29 2012 Kay Sievers 180-2 - - install everything in /usr +- install everything in /usr https://fedoraproject.org/wiki/Features/UsrMove * Sun Jan 29 2012 Kay Sievers 180-1 From 1fcd4845c9b26c2226bf4e20f75394e46142a7a6 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 9 Feb 2012 13:08:07 +0100 Subject: [PATCH 636/640] rebuild with fixed binutils --- udev.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/udev.spec b/udev.spec index 7d30523..660f4fa 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 181 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -16,8 +16,6 @@ BuildRequires: gobject-introspection-devel >= 0.6.2 BuildRequires: usbutils >= 0.82 BuildRequires: kmod-devel >= 5 BuildRequires: libblkid-devel >= 2.20 -Obsoletes: dev <= 0:3.12-1 -Provides: dev = 0:3.12-2 Requires(pre): fileutils Requires(pre): /usr/bin/getent /usr/sbin/groupadd Requires: hwdata @@ -176,6 +174,10 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu Feb 09 2012 Kay Sievers - 181-2 +- rebuild with fixed binutils +- remove 'dev' package dependency handling + * Tue Feb 7 2012 Kay Sievers 181-1 - version 181 - require kmod 5 From b59133e5f90761a437061d6c1c74a7765afe4894 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 18 Mar 2012 20:24:36 +0100 Subject: [PATCH 637/640] version 182 --- .gitignore | 2 +- sources | 2 +- udev.spec | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 74b8c82..fbb633d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/udev-181.tar.xz +/udev-182.tar.xz diff --git a/sources b/sources index e40f349..9690345 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ef86e3e1b4f3eaa9d8c72ac76b9466a7 udev-181.tar.xz +d0a1ac9501d7c4ae68839d1b601592b8 udev-182.tar.xz diff --git a/udev.spec b/udev.spec index 660f4fa..dc7af54 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev -Version: 181 -Release: 2%{?dist} +Version: 182 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -129,7 +129,7 @@ systemctl daemon-reload >/dev/null 2>&1 || : %postun -n libgudev1 -p /sbin/ldconfig %files -%doc NEWS COPYING README TODO ChangeLog src/extras/keymap/README.keymap.txt +%doc NEWS COPYING README TODO ChangeLog src/keymap/README.keymap.txt %{_bindir}/udevadm %{_sbindir}/udevadm %{_prefix}/lib/udev @@ -158,12 +158,12 @@ systemctl daemon-reload >/dev/null 2>&1 || : %{_datadir}/gtk-doc/html/libudev/* %files -n libgudev1 -%doc src/extras/gudev/COPYING +%doc src/gudev/COPYING %attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* %attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib %files -n libgudev1-devel -%doc src/extras/gudev/docs/html/* +%doc src/gudev/docs/html/* %attr(0755,root,root) %{_libdir}/libgudev-1.0.so %dir %attr(0755,root,root) %{_includedir}/gudev-1.0 %dir %attr(0755,root,root) %{_includedir}/gudev-1.0/gudev @@ -174,6 +174,13 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Sun Mar 18 2012 Kay Sievers - 182-1 +- version 182 + - enable USB sutosuspend for some built-in HID devices + - do not create /dev/disk/by-path/ for 'ATA transport class' devices + - do not create /dev/disk/by-id/scsi-* for pure ATA devices + - let rules file in /etc override rules with the same name in /run + * Thu Feb 09 2012 Kay Sievers - 181-2 - rebuild with fixed binutils - remove 'dev' package dependency handling From 38609fdb7ff28c251c81e709afc21a001612dd8c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 27 Mar 2012 16:54:27 +0200 Subject: [PATCH 638/640] udev-182-2 - removed s390 rules --- udev.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/udev.spec b/udev.spec index dc7af54..93ff898 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 182 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -104,9 +104,6 @@ mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware/updates mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sbindir} ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevadm -%ifarch s390 s390x -install -m 0644 rules/arch/40-s390.rules $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d -%endif %pre getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : @@ -174,6 +171,9 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue Mar 27 2012 Harald Hoyer 182-2 +- removed s390 rules + * Sun Mar 18 2012 Kay Sievers - 182-1 - version 182 - enable USB sutosuspend for some built-in HID devices From a07cb8f5f4171b869e6644fd507e84a34eadff2f Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 24 May 2012 22:51:05 +0200 Subject: [PATCH 639/640] drop dependency on specific udev daemon verison --- udev.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/udev.spec b/udev.spec index 93ff898..437d229 100644 --- a/udev.spec +++ b/udev.spec @@ -1,7 +1,7 @@ Summary: A rule-based device node and kernel event manager Name: udev Version: 182 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz @@ -40,7 +40,6 @@ removed from the system. %package -n libudev Summary: Dynamic library to access udev device information Group: System Environment/Libraries -Requires: udev = %{version}-%{release} Conflicts: filesystem < 3 License: LGPLv2+ @@ -171,6 +170,9 @@ systemctl daemon-reload >/dev/null 2>&1 || : %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Thu May 24 2012 Kay Sievers - 182-3 +- libudev: drop dependency on specific udev daemon version + * Tue Mar 27 2012 Harald Hoyer 182-2 - removed s390 rules From ce9320b04bb17d68672063a8a8308ad8721c14a1 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 11 Jul 2012 14:28:30 +0200 Subject: [PATCH 640/640] obsolete udev, it is replaced by systemd --- .gitignore | 1 - Makefile.git | 6 - dead.package | 1 + mirrors | 1 - sources | 1 - udev.spec | 1536 -------------------------------------------------- 6 files changed, 1 insertion(+), 1545 deletions(-) delete mode 100644 .gitignore delete mode 100644 Makefile.git create mode 100644 dead.package delete mode 100644 mirrors delete mode 100644 sources delete mode 100644 udev.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fbb633d..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/udev-182.tar.xz diff --git a/Makefile.git b/Makefile.git deleted file mode 100644 index ea5486a..0000000 --- a/Makefile.git +++ /dev/null @@ -1,6 +0,0 @@ -Patch: - @for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done - -patch: - @for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..401b5da --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +obsolete udev, it is replaced by systemd diff --git a/mirrors b/mirrors deleted file mode 100644 index 74b0af6..0000000 --- a/mirrors +++ /dev/null @@ -1 +0,0 @@ -ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ diff --git a/sources b/sources deleted file mode 100644 index 9690345..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -d0a1ac9501d7c4ae68839d1b601592b8 udev-182.tar.xz diff --git a/udev.spec b/udev.spec deleted file mode 100644 index 437d229..0000000 --- a/udev.spec +++ /dev/null @@ -1,1536 +0,0 @@ -Summary: A rule-based device node and kernel event manager -Name: udev -Version: 182 -Release: 3%{?dist} -License: GPLv2+ -Group: System Environment/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.xz -URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -BuildRequires: libtool -BuildRequires: pkgconfig -BuildRequires: gperf -BuildRequires: libselinux-devel libsepol-devel -BuildRequires: glib2-devel -BuildRequires: hwdata -BuildRequires: gobject-introspection-devel >= 0.6.2 -BuildRequires: usbutils >= 0.82 -BuildRequires: kmod-devel >= 5 -BuildRequires: libblkid-devel >= 2.20 -Requires(pre): fileutils -Requires(pre): /usr/bin/getent /usr/sbin/groupadd -Requires: hwdata -Requires: systemd-units -Requires: util-linux >= 2.15.1 -Conflicts: systemd < 39 -Conflicts: dracut < 013-93 -Conflicts: filesystem < 3-2 - -%ifarch s390 s390x -# Require s390utils-base, because it's essential on s390 -Requires: s390utils-base -%endif - -%description -udev is a collection of tools and a daemon to manage events received -from the kernel and deal with them in user-space. Primarily this -involves managing permissions, and creating and removing meaningful -symlinks to device nodes in /dev when hardware is discovered or -removed from the system. - -%package -n libudev -Summary: Dynamic library to access udev device information -Group: System Environment/Libraries -Conflicts: filesystem < 3 -License: LGPLv2+ - -%description -n libudev -This package contains the dynamic library libudev, which provides access -to udev device information, and an interface to search devices in sysfs. - -%package -n libudev-devel -Summary: Development files for libudev -Group: Development/Libraries -Requires: libudev = %{version}-%{release} -Requires: pkgconfig -License: LGPLv2+ - -%description -n libudev-devel -This package contains the development files for the library libudev, a -dynamic library, which provides access to udev device information. - -%package -n libgudev1 -Summary: Libraries for adding libudev support to applications that use glib -Group: Development/Libraries -Requires: libudev = %{version}-%{release} -Conflicts: filesystem < 3 -License: LGPLv2+ - -%description -n libgudev1 -This package contains the libraries that make it easier to use libudev -functionality from applications that use glib. - -%package -n libgudev1-devel -Summary: Header files for adding libudev support to applications that use glib -Group: Development/Libraries -Requires: libgudev1 = %{version}-%{release} -License: LGPLv2+ - -%description -n libgudev1-devel -This package contains the header and pkg-config files for developing -glib-based applications using libudev functionality. - -%prep -%setup -q - -%build -# prevent man pages from re-building (xsltproc) -find . -name "*.[1-8]" -exec touch '{}' \; -export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fPIE -DPIE -pie -Wl,-z,relro -Wl,-z,now" -export V=1 -%configure \ - --prefix=%{_prefix} \ - --sysconfdir=%{_sysconfdir} \ - --libexecdir=%{_prefix}/lib \ - --with-selinux \ - --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system -make %{?_smp_mflags} - -%install -make install DESTDIR=$RPM_BUILD_ROOT -rm -fr $RPM_BUILD_ROOT%{_docdir}/udev -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firmware/updates -mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sbindir} -ln -sf ../bin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevadm - -%pre -getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || : -getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || : -getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || : -getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || : -systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : - -%post -systemctl daemon-reload >/dev/null 2>&1 || : -systemctl start udev.service >/dev/null 2>&1 || : - -%postun -systemctl daemon-reload >/dev/null 2>&1 || : - -%post -n libudev -p /sbin/ldconfig -%postun -n libudev -p /sbin/ldconfig - -%post -n libgudev1 -p /sbin/ldconfig -%postun -n libgudev1 -p /sbin/ldconfig - -%files -%doc NEWS COPYING README TODO ChangeLog src/keymap/README.keymap.txt -%{_bindir}/udevadm -%{_sbindir}/udevadm -%{_prefix}/lib/udev -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf -%attr(0755,root,root) %dir %{_sysconfdir}/udev/ -%attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/ -%attr(0644,root,root) %{_mandir}/man7/*.7* -%attr(0644,root,root) %{_mandir}/man8/*.8* -%{_datadir}/pkgconfig/udev.pc -%dir %attr(0755,root,root) %{_prefix}/lib/firmware -%dir %attr(0755,root,root) %{_prefix}/lib/firmware/updates -%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.service -%attr(0644,root,root) %{_prefix}/lib/systemd/system/*.socket -%{_prefix}/lib/systemd/system/basic.target.wants/*.service -%{_prefix}/lib/systemd/system/sockets.target.wants/*.socket - -%files -n libudev -%doc src/COPYING -%attr(0755,root,root) %{_libdir}/libudev.so.* - -%files -n libudev-devel -%doc src/docs/html/* -%{_includedir}/libudev.h -%{_libdir}/libudev.so -%{_libdir}/pkgconfig/libudev.pc -%{_datadir}/gtk-doc/html/libudev/* - -%files -n libgudev1 -%doc src/gudev/COPYING -%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.* -%attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib - -%files -n libgudev1-devel -%doc src/gudev/docs/html/* -%attr(0755,root,root) %{_libdir}/libgudev-1.0.so -%dir %attr(0755,root,root) %{_includedir}/gudev-1.0 -%dir %attr(0755,root,root) %{_includedir}/gudev-1.0/gudev -%attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h -%attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir -%dir %{_datadir}/gtk-doc/html/gudev -%attr(0644,root,root) %{_datadir}/gtk-doc/html/gudev/* -%attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0* - -%changelog -* Thu May 24 2012 Kay Sievers - 182-3 -- libudev: drop dependency on specific udev daemon version - -* Tue Mar 27 2012 Harald Hoyer 182-2 -- removed s390 rules - -* Sun Mar 18 2012 Kay Sievers - 182-1 -- version 182 - - enable USB sutosuspend for some built-in HID devices - - do not create /dev/disk/by-path/ for 'ATA transport class' devices - - do not create /dev/disk/by-id/scsi-* for pure ATA devices - - let rules file in /etc override rules with the same name in /run - -* Thu Feb 09 2012 Kay Sievers - 181-2 -- rebuild with fixed binutils -- remove 'dev' package dependency handling - -* Tue Feb 7 2012 Kay Sievers 181-1 -- version 181 - - require kmod 5 - - provide /dev/cdrom for /dev/sr0 - -* Fri Feb 3 2012 Kay Sievers 180-3 -- require an newer filesystem (repo test rebuild) - -* Sun Jan 29 2012 Kay Sievers 180-2 -- install everything in /usr - https://fedoraproject.org/wiki/Features/UsrMove - -* Sun Jan 29 2012 Kay Sievers 180-1 -- version 180 - - fix rule execution (brc#785148) - - ID_PART_* export for udisks2 -- temporarily revert 'install everything in /usr' to be - able to update teh current rawhide package without the - dependency on the /usr-move converted filessytem - -* Wed Jan 25 2012 Kay Sievers 179-3 -- use %{_sbindir} - -* Wed Jan 25 2012 Kay Sievers 179-2 -- install everything in /usr - https://fedoraproject.org/wiki/Features/UsrMove - -* Wed Jan 25 2012 Kay Sievers 179-1 -- version 179 - - devtmpfs is mandatory now - - /run is mandatory now - - modules are loaded with 'libkmod' - - blkid is built-in now - -* Sat Jan 14 2012 Fedora Release Engineering - 175-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Nov 7 2011 Kay Sievers 175-1 -- version 175 - - bug fix release - -* Sat Oct 22 2011 Kay Sievers 174-2 -- ignore entire rule when a key is unknown (brc#748082) - -* Thu Oct 20 2011 Kay Sievers 174-1 -- version 174 - - path_id, usb_id, input_id tools are built-in commands - - fusectl is mounted by systemd - - SYSFS=, ID=, BUS= are removed - - udevadm trigger --type=failed is removed - - udev control socket is now in /run/udev/control - - disable persistent net and cdrom rule generator -- remove obsolete rpm dependencies -- remove SYSV init script controls - -* Mon Aug 29 2011 Kay Sievers 173-3 -- fix bluetooth input device handling (brc#733862) - -* Mon Aug 29 2011 Daniel Drake 173-2 -- Update OLPC XO keymap - -* Mon Aug 01 2011 Harald Hoyer 173-1 -- version 173 -- udev-acl functionality is in systemd - -* Wed Jul 20 2011 Harald Hoyer 172-2 -- removed loop devices (should be compiled in the kernel) -- removed deprecated directories -- removed scsi_id symlink -- cleanup of requirements - -* Mon Jul 11 2011 Harald Hoyer 172-1 -- version 172 - -* Mon Jun 20 2011 Harald Hoyer 171-2 -- build without introspection -- removed unused dirs -- added ConsoleKit dirs - -* Fri May 27 2011 Harald Hoyer 171-1 -- version 171 - -* Fri May 20 2011 Harald Hoyer 170-1 -- version 170 -- removed /sbin/start_udev - -* Mon Apr 11 2011 Harald Hoyer 167-4 -- more selinux fixes - -* Thu Apr 7 2011 Adam Williamson - 167-3 -- selinux_label.patch: from upstream, don't label files outside of /dev - -* Thu Mar 31 2011 Harald Hoyer 167-2 -- fixed udev-trigger.service - -* Wed Mar 30 2011 Harald Hoyer 167-1 -- version 167 - -* Wed Mar 23 2011 Harald Hoyer 166-2 -- add ACLs for harmony remote controls -Resolves: rhbz#559412 -- fixed CDROM profile handling - -* Wed Feb 16 2011 Harald Hoyer 166-1 -- renamed udev-post initscript to udev-retry to match - upstream systemd service name -- version 166 - -* Mon Feb 07 2011 Fedora Release Engineering - 164-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Feb 02 2011 Harald Hoyer 164-8 -- fixed: network device renaming 2-step exceeds IFNAMSIZ -Resolves: rhbz#673675 -- removed v4l version 1 - -* Fri Jan 21 2011 Harald Hoyer 164-7 -- removed unnecessary devices from /lib/udev/devices - -* Mon Dec 06 2010 Harald Hoyer 164-6 -- removed MAKEDEV symlink -Resolves: rhbz#660091 -- fixed kill loop -Resolves: rhbz#657651 - -* Thu Nov 25 2010 Bastien Nocera 164-5 -- Add patches to fix touchpad toggle key handling - -* Fri Nov 12 2010 Harald Hoyer 164-4 -- add ACLs for PDA devices -Resolves: rhbz#642435 - -* Fri Nov 12 2010 Harald Hoyer 164-3 -- enlarged the import buffer to fix the ressize bugs -Resolves: rhbz#652318 - -* Fri Nov 12 2010 Harald Hoyer 164-2 -- do not create mount point dirs in /dev - -* Fri Oct 29 2010 Harald Hoyer 164-1 -- version 164 -- skip start_udev with systemd - -* Wed Sep 29 2010 jkeating - 161-4 -- Rebuilt for gcc bug 634757 - -* Tue Sep 21 2010 Matthias Clasen 161-3 -- Rebuild against newer gobject-introspection - -* Wed Sep 01 2010 Harald Hoyer 161-2 -- bugfixes for systemd service files -- bugfix for selinux labeling -- bugfixes for cdrom_id - -* Tue Aug 17 2010 Harald Hoyer 161-1 -- udev-161 with an upstream quirk for the qemu cdrom and - more cdrom handling bugfixes -Resolves: rhbz#609049 rhbz#624286 -- added floppy group -Resolves: rhbz#620814 - -* Fri Aug 06 2010 Harald Hoyer 160-9 -- added quirk to cdrom_id, to boot from qemu -Resolves: rhbz#609049 -- fix console switching and ACLs -Resolves: rhbz#608712 -- minor bugfixes - -* Tue Jul 20 2010 Harald Hoyer 160-8 -- make loop block device again - -* Tue Jul 20 2010 Harald Hoyer 160-7 -- turn off hotplug in /sys/kernel/uevent_helper or /proc/sys/kernel/hotplug - -* Thu Jul 15 2010 Harald Hoyer 160-6 -- add versioned requires for libudev to udev - -* Wed Jul 14 2010 Dan Horák 160-5 -- update paths to arch-specific rules - -* Tue Jul 13 2010 Lennart Poettering - 160-4 -- Comment systemd-install for now as long as sysinit is not split into pieces - -* Tue Jul 13 2010 Lennart Poettering - 160-3 -- Update systemd-install lines to use --realize instead of --start (which got renamed in systemd) - -* Tue Jul 13 2010 Lennart Poettering - 160-2 -- Don't require systemd .pc file, to break build dependency cycle - -* Tue Jul 13 2010 Harald Hoyer 160-1 -- version 160 -- add systemd service files -- fixed COPYRIGHT files - -* Fri Jun 25 2010 Harald Hoyer 158-2 -- moved udev pkgconfig to base file on authors request -- specfile cleanups - -* Thu Jun 24 2010 Harald Hoyer 158-1 -- version 158 - -* Thu May 27 2010 Harald Hoyer 156-2 -- cleaned up start_udev and udev-post initscript -- removed redhat specific rules -- removed all the makedev.d stuff, udevd now natively supports - /lib/udev/devices -- added basic devices in /lib/udev/devices - -* Tue May 25 2010 Harald Hoyer 156-1 -- version 156 - -* Tue May 25 2010 Harald Hoyer 155-1 -- version 155 - -* Wed May 12 2010 Harald Hoyer 154-1 -- version 154 - -* Tue Apr 27 2010 Harald Hoyer 153-1.20100427git -- version 153 - -* Tue Apr 13 2010 Harald Hoyer 152-0.1.20100413git -- pre release of version 152 - -* Mon Mar 22 2010 Harald Hoyer 151-8 -- only correct the timestamp, if UTC=="no" - -* Mon Mar 22 2010 Harald Hoyer 151-7 -- touch with "--no-create", will not use open() - and trigger devs/watchdogs (bug #575417) - -* Mon Mar 22 2010 Harald Hoyer 151-6 -- fixed return code of touching the device nodes [FAIL] -> [OK] - -* Fri Mar 19 2010 Harald Hoyer 151-5 -- add "-D" to gperf call - -* Fri Mar 19 2010 Harald Hoyer 151-4 -- add patch for virtio-ports (#569700) -- own libgudev dirs (#561319) -- minor udev startup script improvements (#549518) -- create /dev/hugepages subdir in start_udev (#541998) -- remove GPL COPYING file from LGPL subpackages (#536843) -- removed symlinks to udevadm -- touch all device nodes after udev settled for the timezone - timestamp (#569335) -- add some upstream bugfixes - -* Sun Feb 07 2010 Kyle McMartin 151-3 -- udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading - microcode (since microcode_intel tries to probe firmware which does - not exist. *sigh*) - -* Fri Jan 29 2010 Harald Hoyer 151-2 -- fixed rules and startup script (#559844) - -* Wed Jan 27 2010 Harald Hoyer 151-1 -- version 151 -- fixed udev-post initscript -- only require s390utils-base, rather than s390utils (#553156) - -* Tue Nov 24 2009 Harald Hoyer 147-2 -- require s390utils, because it's essential on s390 - -* Thu Nov 12 2009 Harald Hoyer 147-1 -- version 147 -- Fix upgrade from Fedora 11 with bluez installed (#533925) -- obsolete DeviceKit and DeviceKit-devel (#532961) -- fixed udev-post exit codes (#523976) -- own directory /lib/udev/keymaps (#521801) -- no more floppy modaliases (#514329) -- added one more modems to modem-modeswitch.rules (#515349) -- add NEWS file to the doc section -- automatically turn on hotplugged CPUs (rhbz#523127) -- recognize a devtmpfs on /dev (bug #528488) - -* Fri Oct 09 2009 Harald Hoyer 147-0.1.gitdf3e07d -- pre 147 -- database format changed -- lots of potential buffer overflow fixes - -* Tue Sep 29 2009 Harald Hoyer 145-10 -- add ConsoleKit patch for ConsoleKit 0.4.1 - -* Fri Sep 25 2009 harald@redhat.com 145-9 -- add patches to fix cdrom_id -- add patch to fix the inotify bug (bug #524752) - -* Wed Sep 23 2009 harald@redhat.com 145-8 -- obsolete libgudev and libgudev-devel (bug #523569) - -* Mon Aug 24 2009 Karsten Hopp 145-7 -- drop ifnarch s390x for usbutils, as we now have usbutils for s390x - -* Mon Aug 24 2009 Harald Hoyer 145-6 -- ifnarch s390 for usbutils - -* Tue Aug 04 2009 Harald Hoyer 145-5 -- do not make extra nodes in parallel -- restorecon on /dev - -* Tue Aug 04 2009 Harald Hoyer 145-4 -- --enable-debug -- add patch for timestamps in debugging output - -* Wed Jul 29 2009 Harald Hoyer 145-3 -- add patch from upstream git to fix bug #514086 -- add version to usbutils build requirement - -* Fri Jul 24 2009 Harald Hoyer 145-2 -- fix file permissions -- remove rpath -- chkconfig --add for udev-post -- fix summaries -- add "Required-Stop" to udev-post - -* Tue Jul 14 2009 Harald Hoyer 145-1 -- version 145 -- add "udevlog" kernel command line option to redirect the - output of udevd to /dev/.udev/udev.log - -* Fri Jul 03 2009 Harald Hoyer 143-2 -- add acpi floppy modalias -- add retrigger of failed events in udev-post.init -- killall pids of udev in %%pre - -* Fri Jun 19 2009 Harald Hoyer 143-1 -- version 143 - -* Thu Jun 08 2009 Harald Hoyer 142-4 -- git fix: udevadm: settle - fix timeout -- git fix: OWNER/GROUP: fix if logic -- git fix: rule-generator: cd - skip by-path links if we create by-id links -- git fix: fix possible endless loop for GOTO to non-existent LABEL -- git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable - CDROM media - -* Thu Jun 08 2009 Harald Hoyer 142-3 -- delay device-mapper changes - -* Fri Jun 05 2009 Bastien Nocera 142-2 -- Rebuild in dist-f12 - -* Fri May 15 2009 Harald Hoyer 142-1 -- version 142 -- no more libvolume_id and vol_id - -* Fri Apr 17 2009 Harald Hoyer 141-3 -- added /dev/fuse creation to start_udev - -* Thu Apr 16 2009 Harald Hoyer 141-2 -- fixed post and pre - -* Tue Apr 14 2009 Harald Hoyer 141-1 -- version 141 - -* Wed Apr 01 2009 Harald Hoyer 139-4 -- double the IMPORT buffer (bug #488554) -- Resolves: rhbz#488554 - -* Wed Apr 01 2009 Harald Hoyer 139-3 -- renamed modprobe /etc/modprobe.d/floppy-pnp to - /etc/modprobe.d/floppy-pnp.conf (bug #492732 #488768) -- Resolves: rhbz#492732 - -* Tue Mar 03 2009 Harald Hoyer 139-2 -- speedup of start_udev by doing make_extra_nodes in parallel to - the daemon start - -* Fri Feb 27 2009 Harald Hoyer 139-1 -- version 139 - -* Wed Feb 25 2009 Fedora Release Engineering - 137-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Feb 05 2009 Harald Hoyer 137-4 -- fixed md change/remove event handling - -* Thu Feb 05 2009 Harald Hoyer 137-3 -- added 5 second sleep for "modprobedebug" to catch bad modules - -* Fri Jan 30 2009 Harald Hoyer 137-2 -- moved groupadd to pre section (bug #483089) - -* Thu Jan 29 2009 Harald Hoyer 137-1 -- version 137 -- add vol_id patches from kzak -- dialout group has gid 18 now - -* Tue Jan 20 2009 Harald Hoyer 136-2 -- added some rule fixes, which will be in udev-137 - -* Tue Jan 20 2009 Harald Hoyer 136-1 -- test for restorecon in start_udev before it is used (bug #480608) -- added groups video audio cdrom tape dialout in post - (might be moved to MAKEDEV) -- version 136 - -* Tue Dec 16 2008 Harald Hoyer 135-3 -- added sepol patch - -* Tue Dec 16 2008 Harald Hoyer 135-2 -- changed udevsettle -> udevadm settle -- added doc to libudev-devel -- added more attr and defattr -- various rpmlint fixes - -* Tue Dec 02 2008 Harald Hoyer 135-1 -- version 135 - -* Wed Nov 19 2008 Harald Hoyer 133-1 -- version 133 - -* Mon Nov 10 2008 Harald Hoyer 132-1 -- version 132 -- added memory stick rules (bug #470096) - -* Thu Oct 16 2008 Harald Hoyer 127-2 -- added 2 patches for md raid vol_id - -* Mon Sep 01 2008 Harald Hoyer 127-1 -- version 127 - -* Fri Aug 08 2008 Harald Hoyer 126-1 -- version 126 -- fixed udevadm syntax in start_udev (credits B.J.W. Polman) -- removed some manually created devices from makedev (bug #457125) - -* Tue Jun 17 2008 Harald Hoyer 124-1.1 -- readded udevcontrol, udevtrigger symlinks for Fedora 9, - which are needed by live-cd-tools - -* Thu Jun 12 2008 Harald Hoyer 124-1 -- version 124 -- removed udevcontrol, udevtrigger symlinks (use udevadm now) - -* Tue Jun 3 2008 Jeremy Katz - 121-2.20080516git -- Add lost F9 change to remove /dev/.udev in start_udev (#442827) - -* Fri May 16 2008 Harald Hoyer 121-1.20080516git -- version 121 + latest git fixes - -* Thu May 07 2008 Harald Hoyer 120-6.20080421git -- added input/hp_ilo_mouse symlink - -* Tue May 06 2008 Harald Hoyer 120-5.20080421git -- remove /dev/.udev in start_udev (bug #442827) - -* Mon Apr 21 2008 Harald Hoyer 120-4.20080421git -- added patches from git: -- persistent device naming: also read unpartitioned media -- scsi_id: initialize serial strings -- logging: add trailing newline to all strings -- path_id: remove subsystem whitelist -- allow setting of MODE="0000" -- selinux: more context settings -- rules_generator: net rules - always add KERNEL== match to generated rules -- cdrom_id: replace with version which also exports media properties -- vol_id: add --offset option -- udevinfo: do not replace chars when printing ATTR== matches -- Resolves: rhbz#440568 - -* Fri Apr 11 2008 Harald Hoyer 120-3 -- fixed pre/preun scriptlets (bug #441941) -- removed fedora specific patch for selinux symlink handling - -* Sat Apr 05 2008 Harald Hoyer 120-2 -- removed warning about deprecated /lib/udev/devices (rhbz#440961) -- replaced /usr/bin/find with shell find function (rhbz#440961) - -* Fri Apr 04 2008 Harald Hoyer 120-1 -- version 120 - -* Mon Mar 17 2008 Harald Hoyer 118-11 -- removed /var/lib/udev/rules.d again - -* Fri Mar 14 2008 Harald Hoyer 118-10 -- turned off MAKEDEV cache, until the generated shell scripts - create new directories - -* Thu Mar 13 2008 Harald Hoyer 118-9 -- added more support for the "modprobedebug" kernel command - line option, to debug hanging kernel modules - -* Thu Mar 13 2008 Harald Hoyer 118-8 -- added /etc/sysconfig/udev to configure some speedups -- added "udevnopersist" as a kernel command line, to disable - persistent storage symlink generation - -* Thu Mar 13 2008 Harald Hoyer 118-7 -- files from /var/lib/udev/rules.d are copied to /dev/.udev/rules.d - at startup and back at shutdown -- persistent cd and net rules generate the files in - /dev/.udev/rules.d now -- added post section to symlink 70-persistent-cd.rules 70-persistent-net.rules - from /etc/udev/rules.d to /dev/.udev/rules.d - -* Thu Mar 13 2008 Harald Hoyer 118-6 -- moved all generated files to /var/lib/udev - (also 70-persistent-cd.rules 70-persistent-net.rules) -- added a caching mechanism for MAKEDEV (saves some seconds on startup) -- added trigger for selinux-policy and MAKEDEV to remove the udev cache files - -* Wed Feb 20 2008 Harald Hoyer 118-4 -- made symlinks relative (rhbz#432878) -- removed the backgrounding of node creation (rhbz#381461) -- do not change sg group ownership to disk for scanners (rhbz#432602) -- attempt to fix selinux symlink bug (rhbz#345071) -- fixed URL -- made rpmlint mostly happy -- disabled static version (no static selinux lib) - -* Mon Feb 18 2008 Fedora Release Engineering - 118-3 -- Autorebuild for GCC 4.3 - -* Wed Jan 09 2008 Harald Hoyer 118-2 -- reenabled static version - -* Tue Jan 08 2008 Harald Hoyer 118-1 -- version 118 -- removed old USB compat rule (rhbz#424331) -- disabled static version - -* 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 - -* 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 - -* 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 - -* 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 - -* Thu Aug 23 2007 Harald Hoyer - 114-3 -- changed license tag -- changed to latest upstream rule ordering - -* 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 - -* 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 - -* 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) - -* 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) - -* Wed May 02 2007 Harald Hoyer - 106-4 -- do not skip all events on modprobe (#238385) -- Resolves: rhbz#238385 - -* Fri Apr 27 2007 Harald Hoyer - 106-3 -- modprobe only on modalias (bug #238140) -- make startup messages visible again -- speedup boot process by not executing pam_console_apply while booting -- Resolves: rhbz#238140 - -* Wed Apr 11 2007 Harald Hoyer - 106-2 -- create floppy device nodes with the correct selinux context (bug #235953) -- Resolves: rhbz#235953 - -* Wed Mar 7 2007 Harald Hoyer - 106-1 -- version 106 -- specfile cleanup -- removed pilot rule -- removed dasd_id and dasd_id rule -- provide static versions in a subpackage - -* Wed Feb 21 2007 Harald Hoyer - 105-1 -- version 105 - -* Tue Feb 6 2007 Harald Hoyer - 104-2 -- moved uinput to input subdirectory (rhbz#213854) -- added USB floppy symlinks (rhbz#185171) -- fixed ZIP drive handling (rhbz#223016) -- Resolves: rhbz#213854,rhbz#185171,rhbz#223016 - -* Tue Jan 23 2007 Harald Hoyer - 104-1 -- version 104 -- merged changes from RHEL - -* Wed Dec 6 2006 Harald Hoyer - 103-3 -- changed DRIVER to DRIVERS -- Resolves: rhbz#218160 - -* Fri Nov 10 2006 Harald Hoyer - 103-2 -- changed SYSFS to new ATTR rules -- Resolves: rhbz#214898 - -* Fri Nov 10 2006 Harald Hoyer - 103-1 -- Removed 51-hotplug.rules -- Resolves: rhbz#214277 - -* Wed Oct 11 2006 Harald Hoyer - 095-14 -- skip persistent block for gnbd devices (bug #210227) - -* Wed Oct 4 2006 Harald Hoyer - 095-13 -- fixed path_id script (bug #207139) - -* Tue Oct 3 2006 Jeremy Katz - 095-12 -- autoload mmc_block (#171687) - -* Wed Sep 27 2006 Harald Hoyer - 095-10 -- typo in xpram/slram rule (bug #205563) - -* Mon Sep 25 2006 Harald Hoyer - 095-9 -- improved error msg for firmware_helper (bug #206944) -- added xpram symlink to slram device nodes (bug #205563) -- removed infiniband rules (bug #206224) -- use newest path_id script (bug #207139) - -* Tue Aug 29 2006 Harald Hoyer - 095-8 -- fixed bug #204157 - -* Wed Aug 16 2006 Harald Hoyer - 095-7 -- added udevtimeout= - kernel command line parameters for start_udev - (default is to wait forever) - -* Wed Aug 16 2006 Harald Hoyer - 095-6 -- new speedup patch for selinux (bug #202673) - -* Thu Aug 10 2006 Harald Hoyer - 095-5 -- allow long comments (bug #200244) - -* Mon Aug 7 2006 Harald Hoyer - 095-4 -- fixed CAPI device nodes (bug #139321) -- fixed bug #201422 - -* Wed Jul 12 2006 Harald Hoyer - 095-3 -- more infiniband rules (bug #198501) - -* Wed Jul 12 2006 Jesse Keating - 095-2.1 -- rebuild - -* Thu Jul 6 2006 Harald Hoyer - 095-2 -- added option to debug udev with kernel cmdline option "udevdebug" - -* Wed Jul 5 2006 Harald Hoyer - 095-1 -- version 095 - -* Wed Jun 14 2006 Harald Hoyer - 094-1 -- version 094 - -* Sun May 21 2006 Peter Jones - 092-2 -- Fix typo in pam-console rule - -* Wed May 18 2006 Harald Hoyer - 092-1 -- version 092 -- corrected some rules (bug #192210 #190927) - -* Tue May 09 2006 Harald Hoyer - 091-3 -- corrected some rules (bug #190927) - -* Wed May 03 2006 Harald Hoyer - 091-2 -- added subpackages libvolume_id and libvolume_id-devel - -* Wed May 03 2006 Harald Hoyer - 091-1 -- version 091 - -* Wed Apr 19 2006 Harald Hoyer - 090-1 -- version 090 - -* Thu Apr 13 2006 Harald Hoyer - 089-1 -- version 089 -- do not force loading of parport_pc (bug #186850) -- manually load snd-powermac (bug #176761) -- added usb floppy symlink (bug #185171) -- start_udev uses udevtrigger now instead of udevstart - -* Wed Mar 08 2006 Harald Hoyer - 084-13 -- fixed pam_console rules (#182600) - -* Mon Mar 06 2006 Harald Hoyer - 084-12 -- fixed DRI permissions - -* Sun Mar 05 2006 Bill Nottingham - 084-11 -- use $ENV{MODALIAS}, not $modalias (#181494) - -* Thu Mar 02 2006 Harald Hoyer - 084-10 -- fixed cdrom rule - -* Wed Mar 01 2006 Harald Hoyer - 084-9 -- create non-enum device (cdrom, floppy, scanner, changer) - for compatibility (random device wins) - e.g. /dev/cdrom -> hdd /dev/cdrom-hdc -> hdc /dev/cdrom-hdd -> hdd - -* Wed Mar 01 2006 Harald Hoyer - 084-8 -- fixed ZIP drive thrashing (bz #181041 #182601) -- fixed enumeration (%%e does not work anymore) (bz #183288) - -* Fri Feb 24 2006 Peter Jones - 084-7 -- Don't start udevd in %%post unless it's already running -- Stop udevd before chkconfig --del in %%preun - -* Fri Feb 24 2006 Harald Hoyer - 084-6 -- put back original WAIT_FOR_SYSFS rule - -* Fri Feb 24 2006 Harald Hoyer - 084-5 -- removed WAIT_FOR_SYSFS rule - -* Wed Feb 22 2006 Harald Hoyer - 084-4 -- fixed group issue with vol_id (bz #181432) -- fixed dvb permissions (bz #179993) -- added support for scsi media changer (bz #181911) -- fixed pktcdvd device creation (bz #161268) - -* Tue Feb 21 2006 Florian La Roche - 084-3 -- also output the additional space char as part of the startup message - -* Fri Feb 10 2006 Jesse Keating - 084-1.1 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Harald Hoyer - 084-1 -- version 084 - -* Mon Feb 06 2006 Harald Hoyer - 078-9 -- closed fd leak (bug #179980) - -* Thu Jan 26 2006 Harald Hoyer - 078-8 -- changed usb device naming - -* Tue Jan 24 2006 Harald Hoyer - 078-7 -- put WAIT_FOR_SYSFS rules in 05-udev-early.rules - -* Mon Jan 23 2006 Harald Hoyer - 078-6 -- added some WAIT_FOR_SYSFS rules -- removed warning message, if udev_db is not available - -* Sun Jan 22 2006 Kristian Høgsberg 078-5 -- Drop udev dependency (#178621). - -* Tue Jan 11 2006 Harald Hoyer - 078-4 -- removed group "video" from the rules -- fixed specfile -- load nvram, floppy, parport and lp modules in - /etc/sysconfig/modules/udev-stw.modules until there - is a better solution -- fixed more floppy module loading - -* Fri Dec 23 2005 Harald Hoyer - 078-3 -- fixed floppy module loading -- added monitor socket -- fixed typo in dvb rule - -* Wed Dec 21 2005 Bill Nottingham - 078-2 -- udevstart change: allow greylisting of certain modaliases (usb, firewire) - -* Wed Dec 21 2005 Harald Hoyer - 078-1 -- version 078 -- fixed symlink to pam_console.dev - -* Thu Dec 15 2005 Harald Hoyer - 077-2 -- switched back to udevstart and use active /dev/.udev/queue waiting - in start_udev -- removed support for old kernels -- refined some udev.rules - -* Mon Dec 13 2005 Harald Hoyer - 077-1 -- version 077 -- patch to include udevstart2 in udevd and delay daemonize until queue is empty - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Tue Dec 06 2005 Harald Hoyer - 076-1 -- speedup udevd with selinux by calling matchpathcon_init_prefix() -- version 076 - -* Mon Nov 21 2005 Harald Hoyer - 075-4 -- speedup udev event replay with udevstart2 - -* Fri Nov 18 2005 Harald Hoyer - 075-3 -- refined start_udev for old kernels - -* Fri Nov 11 2005 Harald Hoyer - 075-2 -- moved /etc/udev/scripts to /lib/udev -- moved /etc/udev/devices to /lib/udev/devices -- added new event replay for kernel >= 2.6.15 -- added usb devices -- renamed cpu device to cpuid (bug #161538) -- changed vendor string "Onstream" to "On[sS]tream" (bug #173043) -- compiled all *_id programs statically - -* Fri Nov 11 2005 Harald Hoyer - 075-1 -- version 075 - -* Tue Oct 25 2005 Harald Hoyer - 071-1 -- version 071 - -* Mon Oct 10 2005 Harald Hoyer - 069-10 -- removed group usb - -* Mon Oct 10 2005 Harald Hoyer - 069-9 -- added libsepol-devel BuildReq -- refined persistent rules - -* Mon Oct 10 2005 Harald Hoyer - 069-8 -- corrected c&p edd_id rule, symlink for js devices -- added -lsepol - -* Thu Oct 06 2005 Harald Hoyer - 069-7 -- added edd_id - -* Fri Sep 30 2005 Harald Hoyer - 069-6 -- special handling of IEEE1394 firewire devices (bug #168093) - -* Fri Sep 23 2005 Harald Hoyer - 069-5 -- added missing path_id - -* Wed Sep 21 2005 Harald Hoyer - 069-4 -- readded volume_id now known as vol_id, bug #168883 - -* Thu Sep 15 2005 Bill Nottingham - 069-3 -- fix firmware loading - -* Wed Sep 14 2005 Bill Nottingham - 069-2 -- own /lib/firmware (#167016) - -* Wed Sep 14 2005 Harald Hoyer - 069-1 -- version 069 - -* Thu Aug 04 2005 Harald Hoyer - 063-6 -- compile with pie .. again... (#158935) -- fixed typo in echo (#138509) - -* Tue Aug 02 2005 Harald Hoyer - 063-5 -- fixed scsi hotplug replay - -* Tue Aug 02 2005 Bill Nottingham - 063-5 -- add rule to allow function id matching for pcmcia after loading - modules (#164665) - -* Tue Aug 02 2005 Harald Hoyer - 063-4 -- fixed typo for tape devices and changed mode to 0660 - -* Thu Jul 28 2005 Harald Hoyer - 063-3 -- changed "SYMLINK=" to "SYMLINK+=" - -* Sun Jul 24 2005 Bill Nottingham - 063-2 -- don't set SEQNUM for scsi replay events (#163729) - -* Tue Jul 19 2005 Bill Nottingham - 063-1 -- update to 063 -- handle the hotplug events for ieee1394, scsi, firmware - -* Fri Jul 08 2005 Bill Nottingham - 062-2 -- update to 062 -- use included ata_id, build usb_id -- load modules for pci, usb, pcmcia -- ship RELEASE-NOTES in %%doc - -* Thu Jul 07 2005 Harald Hoyer - 058-2 -- compile with pie - -* Fri May 20 2005 Bill Nottingham - 058-1 -- update to 058, fixes conflict with newer kernels (#158371) - -* Thu May 12 2005 Harald Hoyer - 057-6 -- polished persistent scripts - -* Thu May 5 2005 Bill Nottingham - 057-5 -- rebuild - -* Thu May 5 2005 Bill Nottingham - 057-4 -- better check for mounted tmpfs on /dev (#156862) - -* Wed Apr 27 2005 Peter Jones - 057-3 -- use udevstart rather than udev for udevstart.static - -* Thu Apr 21 2005 Harald Hoyer - 057-2 -- added Inifiniband devices (bug #147035) -- fixed pam_console.dev (bug #153250) - -* Mon Apr 18 2005 Harald Hoyer - 057-1 -- version 057 - -* Fri Apr 15 2005 Dan Walsh - 056-2 -- Fix SELinux during creation of Symlinks - -* Mon Apr 11 2005 Harald Hoyer - 056-1 -- updated to version 056 -- merged permissions in the rules file -- added udevpermconv.sh to convert old permission files - -* Mon Mar 28 2005 Warren Togami - 050-10 -- own default and net dirs (#151368 Hans de Goede) - -* Mon Mar 07 2005 Warren Togami - 050-9 -- fixed rh#150462 (udev DRI permissions) - -* Wed Mar 02 2005 Harald Hoyer - 050-8 -- fixed rh#144598 - -* Fri Feb 18 2005 Harald Hoyer - 050-6 -- introducing /etc/udev/makedev.d/50-udev.nodes -- glibcstatic patch modified to let gcc4 compile udev - -* Thu Feb 10 2005 Harald Hoyer - 050-5 -- doh, reverted the start_udev devel version, which slipped in - -* Thu Feb 10 2005 Harald Hoyer - 050-3 -- fixed forgotten " in udev.rules - -* Tue Jan 11 2005 Harald Hoyer - 050-2 -- removed /dev/microcode, /dev/cpu/microcode is now the real node -- cleaned up start_udev - -* Tue Jan 11 2005 Harald Hoyer - 050-1 -- version 050 -- /dev/cpu/0/microcode -> /dev/cpu/microcode - -* Tue Dec 21 2004 Dan Walsh - 048-4 -- Call selinux_restore to fix labeling problem in selinux -- Fixes rh#142817 - -* Tue Dec 21 2004 Harald Hoyer - 048-3 -- maybe fixed bug rh#143367 - -* Thu Dec 16 2004 Harald Hoyer - 048-2 -- fixed a case where reading /proc/ide/hd?/media returns EIO - (bug rh#142713) -- changed all device node permissions of group "disk" to 0640 - (bug rh#110197) -- remove $udev_db with -fr in case of a directory (bug rh#142962) - -* Mon Dec 13 2004 Harald Hoyer - 048-1 -- version 048 -- major specfile cleanup - -* Thu Nov 04 2004 Harald Hoyer - 042-1 -- version 042 - -* Thu Nov 04 2004 Harald Hoyer - 039-10 -- speed improvement, scripts in rules are now executed only once, - instead of four times - -* Thu Nov 04 2004 Harald Hoyer - 039-9 -- removed wrong SIG_IGN for SIGCHLD -- moved ide media check to script to wait for the procfs - -* Wed Nov 3 2004 Jeremy Katz - 039-8.FC3 -- recreate lvm device nodes if needed in the trigger (#137807) - -* Wed Nov 03 2004 Harald Hoyer - 039-6.FC3.2 -- replace udev.conf by default -- LANG=C for fgrep in start_udev; turn grep into fgrep - -* Tue Nov 02 2004 Harald Hoyer - 039-6.FC3.1 -- speed up pam_console.dev -- mount pts and shm, in case of the dev trigger -- increased timeout for udevstart -- removed syslog() from signal handler (caused vmware locks) -- turned off logging, which speeds up the boot process - -* Thu Oct 21 2004 Harald Hoyer - 039-6 -- fixed typo - -* Thu Oct 21 2004 Harald Hoyer - 039-5 -- added udev-039-norm.patch, which prevents removal of hd* devices, - because the kernel sends remove/add events, if an IDE removable device - is close(2)ed. mke2fs, e.g. would fail in this case. - -* Wed Oct 20 2004 Harald Hoyer - 039-4 -- do not call dev.d scripts, if network interface hasn't changed - the name -- correct wait for dummy network devices -- removed NONBLOCK from volume-id -- do not log in udev.static, which should fix bug 136005 - -* Mon Oct 18 2004 Harald Hoyer - 039-3 -- refined wait_for_sysfs for udev.static - -* Mon Oct 18 2004 Harald Hoyer - 039-2 -- improved wait_for_sysfs for virtual consoles with Kay Siever's patch -- wait for ppp class -- wait for LVM dm- devices -- integrate wait_for_sys in udev.static for the initrd - -* Mon Oct 18 2004 Harald Hoyer - 039-1 -- version 039, fixes also manpage bug 135996 -- fixed glibc issue for static version (getgrnam, getpwnam) (bug 136005) -- close the syslog in every app - -* Fri Oct 15 2004 Harald Hoyer - 038-2 -- par[0-9] is now a symlink to lp -- MAKEDEV the parport devices -- now conflicts with older initscripts - -* Thu Oct 14 2004 Harald Hoyer - 038-1 -- raw device nodes are now created in directory raw -- version 038 - -* Wed Oct 13 2004 Harald Hoyer - 036-1 -- better wait_for_sysfs warning messages - -* Wed Oct 13 2004 Harald Hoyer - 035-2 -- fixed double bug in start_udev (bug 135405) - -* Tue Oct 12 2004 Harald Hoyer - 035-1 -- version 035, which only improves wait_for_sysfs -- load ide modules in start_udev, until a hotplug script is available - (bug 135260) - -* Mon Oct 11 2004 Harald Hoyer - 034-3 -- removed scary error messages from wait_for_sysfs -- symlink from nst? -> tape? -- kill udevd on update - -* Fri Oct 8 2004 Harald Hoyer - 034-2 -- check for /proc/sys/dev/cdrom/info existence in check-cdrom.sh - -* Fri Oct 8 2004 Harald Hoyer - 034-1 -- new version udev-034 -- removed patches, which went upstream -- pam_console.dev link renamed to 05-pam_console.dev -- MAKEDEV.dev links renamed to 10-MAKEDEV.dev - -* Thu Oct 07 2004 Harald Hoyer - 032-10 -- added floppy madness (bug 134830) -- replay scsi events in start_udev for the devices on the adapter (bug 130746) - -* Wed Oct 06 2004 Harald Hoyer - 032-9 -- obsoleted $UDEV_LOG, use udev_log -- correct SYMLINK handling in pam_console.dev -- specfile cleanup -- added check-cdrom.sh for nice cdrom symlinks - -* Mon Oct 04 2004 Harald Hoyer - 032-8 -- added patches from Féliciano Matias for multiple symlinks (bug 134477 and 134478) -- corrected some permissions with a missing leading 0 -- added z90crypt to the permissions file (bug 134448) -- corrected requires and conflicts tags -- removed /dev/log from MAKEDEV creation - -* Fri Oct 01 2004 Harald Hoyer - 032-7 -- more device nodes for those without initrd - -* Thu Sep 30 2004 Harald Hoyer - 032-6 -- prevent error message from device copying -- use already translated starting strings - -* Wed Sep 29 2004 Harald Hoyer - 032-5 -- add "fi" to start_udev -- do not create floppy devices manually (bug 133838) - -* Tue Sep 28 2004 Harald Hoyer - 032-4 -- made /etc/udev/devices/ for manual device nodes -- refined SELINUX check, if /dev is not yet mounted in start_dev - -* Mon Sep 27 2004 Harald Hoyer - 032-3 -- corrected permissions for /dev/rtc (bug 133636) -- renamed device-mapper to mapper/control (bug 133688) - -* Wed Sep 22 2004 Harald Hoyer - 032-2 -- removed option to turn off udev -- udevstart.static now symling to udev.static - -* Tue Sep 21 2004 Harald Hoyer - 032-1 -- version 032 - -* Mon Sep 20 2004 Harald Hoyer - 030-27 -- simplified udev.conf -- refined close_on_exec patch -- added pam_console supply for symlinks, now gives correct permissions, - for e.g. later plugged in cdroms -- renamed sr? to scd? (see devices.txt; k3b likes that :) - -* Mon Sep 13 2004 Jeremy Katz - 030-26 -- require a 2.6 kernel -- prereq instead of requires MAKEDEV -- obsolete and provide dev -- add a trigger for the removal of /dev so that we set things up - -* Fri Sep 10 2004 Dan Walsh - 030-25 -- Use matchmediacon - -* Fri Sep 10 2004 Harald Hoyer - 030-24 -- check if SELINUX is not disabled before executing setfiles (bug 132099) - -* Wed Sep 8 2004 Harald Hoyer - 030-23 -- mount tmpfs with mode 0755 in start_udev - -* Tue Sep 7 2004 Harald Hoyer - 030-22 -- applied rules from David Zeuthen which read /proc directly without - shellscript - -* Tue Sep 7 2004 Harald Hoyer - 030-21 -- applied enumeration patch from David Zeuthen for cdrom symlinks (bug 131532) -- create /dev/ppp in start_udev (bug 131114) -- removed nvidia devices from start_udev -- check for restorecon presence in start_udev (bug 131904) - -* Fri Sep 3 2004 Harald Hoyer - 030-20 -- due to -x added to MAKEDEV specify the par and lp numbers - -* Fri Sep 3 2004 Harald Hoyer - 030-19 -- added udev-030-rhsec.patch (bug 130351) - -* Thu Sep 2 2004 Jeremy Katz - 030-18 -- make the exact device in start_udev (and thus, require new MAKEDEV) - -* Thu Sep 2 2004 Jeremy Katz - 030-17 -- make sure file contexts of everything in the tmpfs /dev are set right - when start_udev runs - -* Thu Sep 02 2004 Harald Hoyer - 030-16 -- moved %%{_sysconfdir}/hotplug.d/default/udev.hotplug to %%{_sysconfdir}/hotplug.d/default/10-udev.hotplug - -* Thu Sep 02 2004 Harald Hoyer - 030-15 -- added nvidia devices to start_udev -- added UDEV_RAMFS for backwards compat to udev.conf -- changed Group (bug 131488) -- added libselinux-devel to build requirements - -* Wed Sep 1 2004 Jeremy Katz - 030-14 -- require MAKEDEV - -* Wed Sep 1 2004 Dan Walsh - 030-13 -- Change to setfilecon if directory exists. - -* Wed Sep 01 2004 Harald Hoyer - 030-12 -- fixed start_udev - -* Tue Aug 31 2004 Jeremy Katz - 030-11 -- use tmpfs instead of ramfs (it has xattr support now) -- change variables appropriately to TMPFS intead of RAMFS in udev.conf -- create loopN, not just loop in start_udev - -* Fri Aug 27 2004 Dan Walsh - 030-10 -- Fix Patch - -* Thu Aug 26 2004 Dan Walsh - 030-9 -- Cleaned up selinux patch - -* Tue Aug 24 2004 Harald Hoyer - 030-8 -- changed defaults not to remove device nodes -- added rule for net/tun -- extended start_udev to create devices, which can trigger module autoloading -- refined cloexec patch, to redirect stdin,out,err of /dev.d execed apps to /dev/null - -* Mon Aug 23 2004 Harald Hoyer - 030-7 -- removed usage of /usr/bin/seq in start_udev -- set correct permissions in start_udev -- extended the cloexec patch -- removed udev-persistent package (define with_persistent==0) -- check for /var/run/console/console.lock before calling /sbin/pam_console_setowner -- linked pam_console_setowner statically against libglib-2.0.a - -* Fri Aug 20 2004 Harald Hoyer - 030-5 -- use correct console.lock file now in pam_console_setowner - -* Wed Aug 18 2004 Harald Hoyer - 030-4 -- added the selinux patch - -* Fri Jul 23 2004 Harald Hoyer - 030-3 -- extended the cloexec patch - -* Wed Jul 21 2004 Dan Walsh - 030-2 -- Close Database fd in exec processes using FD_CLOSEXEC - -* Wed Jul 14 2004 Harald Hoyer - 030-1 -- version 030 - -* Wed Jul 14 2004 Harald Hoyer - 029-4 -- added udevstart.static - -* Wed Jul 14 2004 Harald Hoyer - 029-3 -- put /etc/sysconfig/udev in /etc/udev/udev.conf and removed it -- made only udev.static static -- make our defaults the default values -- removed /udev - -* Tue Jul 6 2004 Harald Hoyer - 029-1 -- version 029, added udev_remove and udev_owner to udev.conf - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Tue Jun 8 2004 Harald Hoyer - 026-3 -- fixed UDEV_REMOVE=no - -* Tue Jun 8 2004 Harald Hoyer - 026-2 -- udev-026 -- preserve ownership of device nodes, which already exist -- do not remove device nodes if UDEV_REMOVE="no" -- added volume_id -- build with klibc - -* Wed May 26 2004 Harald Hoyer - 025-1 -- udev-025 -- added ata_identify -- build nearly all with dietlibc - -* Mon May 10 2004 Elliot Lee 024-6 -- Turn off udevd by default for FC2 - -* Tue Apr 20 2004 Harald Hoyer - 024-5 -- fixed permission for /dev/tty (FC2) - -* Thu Apr 15 2004 Harald Hoyer - 024-4 -- moved the 00- files to 50-, to let the use place his files in front - -* Thu Apr 15 2004 Harald Hoyer - 024-3 -- set UDEV_SELINUX to yes -- added UDEV_LOG - -* Thu Apr 15 2004 Harald Hoyer - 024-2 -- added /udev to filelist - -* Wed Apr 14 2004 Harald Hoyer - 024-1 -- update to 024 -- added /etc/sysconfig/udev -- added selinux, pam_console, dbus support - -* Fri Mar 26 2004 Harald Hoyer - 023-1 -- update to 023 - -* Wed Mar 24 2004 Bill Nottingham 022-1 -- update to 022 - -* Sun Mar 21 2004 Florian La Roche -- really move initscript - -* Sun Feb 29 2004 Florian La Roche -- move chkconv to preun -- nicer url - -* Wed Feb 25 2004 Harald Hoyer - 018-1 -- changes permissions and rules - -* Mon Feb 23 2004 Dan Walsh -- Add selinux support - -* Thu Feb 19 2004 Greg Kroah-Hartman -- add some more files to the documentation directory -- add ability to build scsi_id and make it the default - -* Mon Feb 16 2004 Greg Kroah-Hartman -- fix up udevd build, as it's no longer needed to be build seperatly -- add udevtest to list of files -- more Red Hat sync ups. - -* Thu Feb 12 2004 Greg Kroah-Hartman -- add some changes from the latest Fedora udev release. - -* Mon Feb 2 2004 Greg Kroah-Hartman -- add udevsend, and udevd to the files -- add ability to build udevd with glibc after the rest is build with klibc - -* Mon Jan 26 2004 Greg Kroah-Hartman -- added udevinfo to rpm -- added URL to spec file -- added udevinfo's man page - -* Mon Jan 05 2004 Rolf Eike Beer -- add defines to choose the init script (Redhat or LSB) - -* Tue Dec 16 2003 Robert Love -- install the initscript and run chkconfig on it - -* Tue Nov 2 2003 Greg Kroah-Hartman -- changes due to config file name changes - -* Fri Oct 17 2003 Robert Love -- Make work without a build root -- Correctly install the right files -- Pass the RPM_OPT_FLAGS to gcc so we can build per the build policy -- Put some prereqs in -- Install the hotplug symlink to udev - -* Mon Jul 28 2003 Paul Mundt -- Initial spec file for udev-0.2.