From 1dda3c1bca1d343f0447dfb4f60c6a96f1a7f787 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 5 Apr 2011 06:32:33 +0000 Subject: [PATCH] udev: update to 167. --- udev/.footprint | 45 +++++++++++++++------------------------------ udev/.md5sum | 6 +++--- udev/Pkgfile | 45 ++++++++++++++++++--------------------------- udev/start_udev | 36 ++++++++++++++++++++++++++++-------- 4 files changed, 64 insertions(+), 68 deletions(-) diff --git a/udev/.footprint b/udev/.footprint index 6242dbd..402d325 100644 --- a/udev/.footprint +++ b/udev/.footprint @@ -1,14 +1,11 @@ drwxr-xr-x root/root etc/ --rw-r--r-- root/root etc/scsi_id.config drwxr-xr-x root/root etc/udev/ drwxr-xr-x root/root etc/udev/rules.d/ -rw-r--r-- root/root etc/udev/udev.conf drwxr-xr-x root/root lib/ drwxr-xr-x root/root lib/firmware/ -lrwxrwxrwx root/root lib/libudev.so.0 -> libudev.so.0.2.0 --rwxr-xr-x root/root lib/libudev.so.0.2.0 -lrwxrwxrwx root/root lib/libvolume_id.so.1 -> libvolume_id.so.1.1.0 --rwxr-xr-x root/root lib/libvolume_id.so.1.1.0 +lrwxrwxrwx root/root lib/libudev.so.0 -> libudev.so.0.11.1 +-rwxr-xr-x root/root lib/libudev.so.0.11.1 drwxr-xr-x root/root lib/udev/ -rwxr-xr-x root/root lib/udev/ata_id -rwxr-xr-x root/root lib/udev/cdrom_id @@ -16,72 +13,60 @@ drwxr-xr-x root/root lib/udev/ -rwxr-xr-x root/root lib/udev/create_floppy_devices drwxr-xr-x root/root lib/udev/devices/ crw------- root/root lib/udev/devices/console (5, 1) -lrwxrwxrwx root/root lib/udev/devices/core -> /proc/kcore -lrwxrwxrwx root/root lib/udev/devices/fd -> /proc/self/fd +crw------- root/root lib/udev/devices/kmsg (1, 11) crw-rw-rw- root/root lib/udev/devices/null (1, 3) drwxr-xr-x root/root lib/udev/devices/pts/ drwxr-xr-x root/root lib/udev/devices/shm/ -lrwxrwxrwx root/root lib/udev/devices/stderr -> /proc/self/fd/2 -lrwxrwxrwx root/root lib/udev/devices/stdin -> /proc/self/fd/0 -lrwxrwxrwx root/root lib/udev/devices/stdout -> /proc/self/fd/1 crw-rw-rw- root/root lib/udev/devices/zero (1, 5) -rwxr-xr-x root/root lib/udev/edd_id --rwxr-xr-x root/root lib/udev/firmware.sh --rwxr-xr-x root/root lib/udev/fstab_import +-rwxr-xr-x root/root lib/udev/firmware +-rwxr-xr-x root/root lib/udev/input_id -rwxr-xr-x root/root lib/udev/path_id -rw-r--r-- root/root lib/udev/rule_generator.functions drwxr-xr-x root/root lib/udev/rules.d/ --rw-r--r-- root/root lib/udev/rules.d/40-alsa.rules +-rw-r--r-- root/root lib/udev/rules.d/42-qemu-usb.rules -rw-r--r-- root/root lib/udev/rules.d/50-firmware.rules -rw-r--r-- root/root lib/udev/rules.d/50-udev-default.rules --rw-r--r-- root/root lib/udev/rules.d/55-lfs.rules -rw-r--r-- root/root lib/udev/rules.d/60-cdrom_id.rules +-rw-r--r-- root/root lib/udev/rules.d/60-floppy.rules +-rw-r--r-- root/root lib/udev/rules.d/60-persistent-alsa.rules -rw-r--r-- root/root lib/udev/rules.d/60-persistent-input.rules -rw-r--r-- root/root lib/udev/rules.d/60-persistent-serial.rules -rw-r--r-- root/root lib/udev/rules.d/60-persistent-storage-tape.rules -rw-r--r-- root/root lib/udev/rules.d/60-persistent-storage.rules -rw-r--r-- root/root lib/udev/rules.d/60-persistent-v4l.rules --rw-r--r-- root/root lib/udev/rules.d/61-cdrom.rules -rw-r--r-- root/root lib/udev/rules.d/61-persistent-storage-edd.rules -rw-r--r-- root/root lib/udev/rules.d/75-cd-aliases-generator.rules -rw-r--r-- root/root lib/udev/rules.d/75-persistent-net-generator.rules --rw-r--r-- root/root lib/udev/rules.d/79-fstab_import.rules -rw-r--r-- root/root lib/udev/rules.d/80-drivers.rules -rw-r--r-- root/root lib/udev/rules.d/95-udev-late.rules -rwxr-xr-x root/root lib/udev/scsi_id -rwxr-xr-x root/root lib/udev/usb_id --rwxr-xr-x root/root lib/udev/vol_id +-rwxr-xr-x root/root lib/udev/v4l_id -rwxr-xr-x root/root lib/udev/write_cd_rules -rwxr-xr-x root/root lib/udev/write_net_rules drwxr-xr-x root/root sbin/ -lrwxrwxrwx root/root sbin/scsi_id -> ../lib/udev/scsi_id -rwxr-xr-x root/root sbin/start_udev -rwxr-xr-x root/root sbin/udevadm -rwxr-xr-x root/root sbin/udevd -lrwxrwxrwx root/root sbin/vol_id -> ../lib/udev/vol_id drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ lrwxrwxrwx root/root usr/bin/udevinfo -> /sbin/udevadm drwxr-xr-x root/root usr/include/ -rw-r--r-- root/root usr/include/libudev.h --rw-r--r-- root/root usr/include/libvolume_id.h drwxr-xr-x root/root usr/lib/ -lrwxrwxrwx root/root usr/lib/libudev.so -> ../../lib/libudev.so.0.2.0 -lrwxrwxrwx root/root usr/lib/libvolume_id.so -> ../../lib/libvolume_id.so.1.1.0 +-rw-r--r-- root/root usr/lib/libudev.a +-rwxr-xr-x root/root usr/lib/libudev.la +lrwxrwxrwx root/root usr/lib/libudev.so -> ../../lib/libudev.so.0.11.1 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/libudev.pc --rw-r--r-- root/root usr/lib/pkgconfig/libvolume_id.pc drwxr-xr-x root/root usr/man/ drwxr-xr-x root/root usr/man/man7/ -rw-r--r-- root/root usr/man/man7/udev.7.gz drwxr-xr-x root/root usr/man/man8/ --rw-r--r-- root/root usr/man/man8/ata_id.8.gz --rw-r--r-- root/root usr/man/man8/cdrom_id.8.gz --rw-r--r-- root/root usr/man/man8/create_floppy_devices.8.gz --rw-r--r-- root/root usr/man/man8/edd_id.8.gz --rw-r--r-- root/root usr/man/man8/path_id.8.gz -rw-r--r-- root/root usr/man/man8/scsi_id.8.gz -rw-r--r-- root/root usr/man/man8/udevadm.8.gz -rw-r--r-- root/root usr/man/man8/udevd.8.gz --rw-r--r-- root/root usr/man/man8/usb_id.8.gz --rw-r--r-- root/root usr/man/man8/vol_id.8.gz +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/pkgconfig/ +-rw-r--r-- root/root usr/share/pkgconfig/udev.pc diff --git a/udev/.md5sum b/udev/.md5sum index 8f85b6f..f698572 100644 --- a/udev/.md5sum +++ b/udev/.md5sum @@ -1,3 +1,3 @@ -f27ca9ef668bcf7561717e7543d06f4c start_udev -1670fe81cabf5161319c52084cf81134 udev-141.tar.bz2 -54a23553332b0f1aa6366f884cd4799e udev-config-20081015.tar.bz2 +167288ed62db73b0b93b20506a08d064 start_udev +4b37e1222f06c14c24147de346aa0bad udev-167.tar.bz2 +53554c9688df0f5e87e38a86e4314c61 udev-disable_extras.patch diff --git a/udev/Pkgfile b/udev/Pkgfile index ed4d430..06944d3 100644 --- a/udev/Pkgfile +++ b/udev/Pkgfile @@ -2,59 +2,50 @@ # URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html # Maintainer: CRUX System Team, core-ports at crux dot nu # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu -# Depends on: name=udev -version=141 +version=167 release=1 source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \ - http://crux.nu/files/distfiles/udev-config-20081015.tar.bz2 \ - start_udev) + $name-disable_extras.patch start_udev) build() { cd udev-$version + patch -p1 -i $SRC/$name-disable_extras.patch + + autoreconf ./configure --build=$CHOST \ --host=$CTARGET \ --prefix=/usr \ - --exec-prefix= \ + --sbindir=/sbin \ --sysconfdir=/etc \ - --mandir=/usr/man + --with-rootlibdir=/lib \ + --libexecdir=/lib/udev \ + --mandir=/usr/man \ + --disable-extras \ + --disable-introspection \ + --enable-static make make install DESTDIR=$PKG - # scsi_id + vol_id need to be multi-path - (cd $PKG/sbin; ln -s ../lib/udev/vol_id vol_id) - (cd $PKG/sbin; ln -s ../lib/udev/scsi_id scsi_id) - mkdir -p $PKG/lib/{firmware,udev/devices/{pts,shm}} + mkdir -p $PKG/lib # Populate nodes mknod -m 600 $PKG/lib/udev/devices/console c 5 1 + mknod -m 600 $PKG/lib/udev/devices/kmsg c 1 11 mknod -m 666 $PKG/lib/udev/devices/null c 1 3 mknod -m 666 $PKG/lib/udev/devices/zero c 1 5 - ln -s /proc/self/fd $PKG/lib/udev/devices/fd - ln -s /proc/self/fd/0 $PKG/lib/udev/devices/stdin - ln -s /proc/self/fd/1 $PKG/lib/udev/devices/stdout - ln -s /proc/self/fd/2 $PKG/lib/udev/devices/stderr - ln -s /proc/kcore $PKG/lib/udev/devices/core - - # Install some upstream rules - cp -a rules/packages/40-alsa.rules $PKG/lib/udev/rules.d/ - # Add CRUX items + LFS rules + # Add CRUX items install -m 0755 $SRC/start_udev $PKG/sbin - pushd $SRC/udev-config-20081015 - make DESTDIR=$PKG RULES_DIR=/lib/udev/rules.d install - popd - - # Comment uucp lines in default rules - sed -i 's|.*uucp.*|#&|g' $PKG/lib/udev/rules.d/50-udev-default.rules - sed -i 's|.*uucp.*|#&|g' $PKG/lib/udev/rules.d/55-lfs.rules - # Keep udevinfo for legacy support mkdir -p $PKG/usr/bin ln -s /sbin/udevadm $PKG/usr/bin/udevinfo + + # Remove junk + rm -rf $PKG/usr/share/{gtk-,}doc } diff --git a/udev/start_udev b/udev/start_udev index 1be7ce9..3319a4d 100644 --- a/udev/start_udev +++ b/udev/start_udev @@ -1,17 +1,37 @@ #!/bin/sh -# mount /dev as a tmpfs; note: some video drivers require exec access in /dev -/bin/mount -n -t tmpfs udev /dev -o exec,nosuid,mode=0755 +# - if /dev is not mounted - mount as a devtmpfs (CONFIG_DEVTMPFS=y) or tmpfs +# - if /dev is mounted (e.g. due to handover from initramfs or +# CONFIG_DEVTMPFS_MOUNT=y), remount with specific options +# - some video drivers require exec access in /dev, thus it's set here +# - for completness, we add few sanity limits (2k non-empty files, 16k inodes) -# unset hotplugger +UDEVOPTS="exec,nosuid,noatime,mode=0755,nr_blocks=2048,nr_inodes=16384" +if /bin/mountpoint -q /dev ; then + /bin/mount -n -o remount,${UDEVOPTS} dev /dev +else + if /bin/sed -n '/devtmpfs/q1' /proc/filesystems ; then + UDEVFS=tmpfs + else + UDEVFS=devtmpfs + fi + /bin/mount -n -t $UDEVFS -o ${UDEVOPTS} dev /dev +fi + +# make sure hotplugger is not set echo > /proc/sys/kernel/hotplug -# populate /dev with static nodes and directories -/bin/cp -a /lib/udev/devices/* /dev/ +# since v155, udevd automatically copies /lib/udev/devices +# and creates /proc/{kcore,self/fd/{0,1,2}} symlinks -# launch udev daemon -/sbin/udevd --daemon +# launch udev daemon, make sure it's not running first +test -z "$(/bin/pidof -s udevd)" && /sbin/udevd --daemon # coldplug devices and wait for the queue to be processed -/sbin/udevadm trigger +/sbin/udevadm trigger --type=subsystems --action=add +/sbin/udevadm trigger --type=devices --action=add +/sbin/udevadm settle + +# retry any failures +/sbin/udevadm trigger --type=failed --action=add /sbin/udevadm settle -- 2.26.2