[Lunar-commits] <moonbase> udev: bump it to version 124.

Florin Braescu florin at lunar-linux.org
Fri Jul 18 13:20:39 CEST 2008


commit 0b0f3f536b7df7b4e00ad303c54c17603db4ffc3
Author: Florin Braescu <florin at lunar-linux.org>
Date:   Fri Jul 18 14:20:39 2008 +0300

    udev: bump it to version 124.
    
    Many thanks to Zbiggy who did it for 122 version.
    Bumped by me to 124 version.
---
 filesys/udev/BUILD        |   31 +++++++++++++------------------
 filesys/udev/DETAILS      |   14 +++++++-------
 filesys/udev/POST_INSTALL |   35 ++++++++++++++++++++++-------------
 filesys/udev/udev         |   10 +++++++---
 4 files changed, 49 insertions(+), 41 deletions(-)

diff --git a/filesys/udev/BUILD b/filesys/udev/BUILD
index 911badc..cdf229c 100644
--- a/filesys/udev/BUILD
+++ b/filesys/udev/BUILD
@@ -5,21 +5,15 @@
     add_priv_group usb
     add_priv_group cdrw
 
-    UDEV_EXTRAS="extras/ata_id  extras/collect extras/firmware \
-                 extras/path_id extras/scsi_id extras/volume_id \
-                 extras/cdrom_id extras/edd_id extras/floppy \
-                 extras/rule_generator extras/usb_id"
+    # create static nodes dir if missing
+    mkdir -p /lib/udev/devices &&
 
     patch_it $SOURCE2 0 &&
 
-    make EXTRAS="${UDEV_EXTRAS}" &&
-    prepare_install &&
-    make EXTRAS="${UDEV_EXTRAS}" install &&
+    for DIR in `ls extras`; do EXTRAS+="extras/$DIR "; done &&
+    sedit "s@^EXTRAS\ =@EXTRAS =$EXTRAS@" Makefile &&
 
-
-    # Deprecated .. but udevd still doesn't do what udevstart does
-    install -m755 udevstart /sbin/ &&
-    install -m644 udevstart.8 /usr/share/man/man8/ &&
+    default_build &&
 
     # install the init.d script
     # we cannot use automagic install via coretools
@@ -27,17 +21,18 @@
     # and would interfere with boot/{reboot,halt}
     mkdir -p /etc/udev/rules.d /etc/udev/scripts.d &&
 
-    install -m755 ${SCRIPT_DIRECTORY}/udev /etc/init.d/ &&
-
-    # We provide our own default set of rules
-    rm -f /etc/udev/rules.d/50-udev-default.rules &&
+    install -m755 ${SCRIPT_DIRECTORY}/udev /etc/init.d &&
 
-    install -m644 ${SOURCE_DIRECTORY}/etc/udev/gentoo/50-udev.rules \
-                  /etc/udev/rules.d/50-udev.rules &&
+    install -m644 etc/udev/gentoo/* \
+                  etc/udev/rules.d/* \
+                  etc/udev/packages/* \
+                 /etc/udev/rules.d
     install -m755 ${SOURCE_CACHE}/${SOURCE3} \
                   /etc/udev/scripts.d/raid-devfs.sh &&
 
     # We need to remove those in order to get a clean start
-    rm -f /etc/udev/rules.d/70-persistent-{cd,net}.rules
+    rm -f /etc/udev/rules.d/70-persistent-{cd,net}.rules &&
+
+    mv -f /etc/udev/rules.d/40-gentoo.rules /etc/udev/rules.d/40-lunar.rules
 
 ) > $C_FIFO 2>&1
diff --git a/filesys/udev/DETAILS b/filesys/udev/DETAILS
index d12bbd2..1b97a8c 100644
--- a/filesys/udev/DETAILS
+++ b/filesys/udev/DETAILS
@@ -1,17 +1,17 @@
           MODULE=udev
-         VERSION=115
+         VERSION=124
           SOURCE=$MODULE-$VERSION.tar.bz2
-         SOURCE2=udev.rules-v9.patch
+         SOURCE2=udev.rules-v10.patch
          SOURCE3=raid-devfs.sh-udev-088
-      SOURCE_URL=http://www.kernel.org/pub/linux/utils/kernel/hotplug/
+      SOURCE_URL=$KERNEL_URL/pub/linux/utils/kernel/hotplug
      SOURCE2_URL=$PATCH_URL
      SOURCE3_URL=$PATCH_URL
-      SOURCE_VFY=sha1:392f5a8d35a231b0edf075827f194ccfd946234f
-     SOURCE2_VFY=sha1:b089dc4c68c506208f3093b5726ce7f63aa2bada
+      SOURCE_VFY=sha1:5b5426d8b9dc2e7a7b7602ba9fb8fca62e96d8ee
+     SOURCE2_VFY=sha1:82545ca2eb9a9d35aa3c7c7385076e45dd98025e
      SOURCE3_VFY=sha1:44a12035774c2b42b784267d38e61a34aa0b645b
         WEB_SITE=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
          ENTERED=20040104
-         UPDATED=20071118
+         UPDATED=20080718
       MAINTAINER=moe at lunar-linux.org
            SHORT="hotplug and device handling daemon"
 
@@ -31,4 +31,4 @@ differences are:
   that fit your needs and rules
 * udev provides LSB standard device names
 * udev is also the hotplug handler of the future
-EOF   
+EOF
diff --git a/filesys/udev/POST_INSTALL b/filesys/udev/POST_INSTALL
index 8c3989a..11467ab 100644
--- a/filesys/udev/POST_INSTALL
+++ b/filesys/udev/POST_INSTALL
@@ -3,7 +3,8 @@
 # devfs on top, you will see the underlaying static nodes
 
 FAKEROOT=/tmp/UDEV_NODE_ROOT
-DEVPREFIX=${FAKEROOT}/dev 
+DEVPREFIX=${FAKEROOT}/dev
+STATICDIR=/lib/udev/devices
 
 create_node()
 {
@@ -18,29 +19,37 @@ create_node()
   echo -ne "\tTesting for /dev/${NODE}: "
 
   if [ -e ${DEVPREFIX}/${NODE} ]; then
-     echo "node already present. " 
+     echo "node already present."
   else
      mknod -m $PERMS ${DEVPREFIX}/${NODE} ${TYPE} ${MAJOR} ${MINOR} || { echo "cannot create node."; exit 1; }
-     echo "node created. "
+     echo "node created."
   fi
-  
+
+  echo -ne "\tTesting for ${STATICDIR}/${NODE}: "
+
+  if [ -e ${STATICDIR}/${NODE} ]; then
+     echo "node already present."
+  else
+     mknod -m $PERMS ${STATICDIR}/${NODE} ${TYPE} ${MAJOR} ${MINOR} || { echo "cannot create node in $STATICDIR."; exit 1; }
+     echo "static node created in $STATICDIR"
+  fi
+
   test -z "${SYMLINK}" &&  return 0
 
   echo -ne "\tTesting for /dev/${SYMLINK} -> /dev/${NODE} symlink: "
 
   if [ -e ${DEVPREFIX}/${SYMLINK} ]; then
-     if [ "`readlink ${DEVPREFIX}/${SYMLINK}`" = "${NODE}" ]; then 
+     if [ "`readlink ${DEVPREFIX}/${SYMLINK}`" = "${NODE}" ]; then
         echo "already present."
         return 0
-     fi 
-
+     fi
      rm ${DEVPREFIX}/${SYMLINK}
   fi
 
   ln -sf ${NODE} ${DEVPREFIX}/${SYMLINK} || { echo "cannot create."; exit 1; }
   echo "created."
 
-  return 0  
+  return 0
 }
 
 echo    ""
@@ -48,10 +57,10 @@ echo -n "Creating virtual fake root... "       && mkdir ${FAKEROOT}/          &&
 echo -n "Creating fake root to check /dev... " && mount --bind / ${FAKEROOT}/ && echo "done." &&
 echo    "Checking /dev/ for needed static boot nodes... " &&
 
-create_node 0600 console c 5 1      &&
-create_node 0666 null    c 1 3      && 
-create_node 0600 ram0    b 1 0 ram  &&
-create_node 0600 ram1    b 1 1      &&
+create_node 0600 console c 5 1     &&
+create_node 0666 null    c 1 3     &&
+create_node 0600 ram0    b 1 0 ram &&
+create_node 0600 ram1    b 1 1     &&
 
-echo -n "Unmounting fake root... "   && umount ${FAKEROOT} && echo "done." && 
+echo -n "Unmounting fake root... "   && umount ${FAKEROOT} && echo "done." &&
 echo -n "Removing fake root dir... " && rm -rf ${FAKEROOT} && echo "done."
diff --git a/filesys/udev/udev b/filesys/udev/udev
index 820ccb1..de822ae 100644
--- a/filesys/udev/udev
+++ b/filesys/udev/udev
@@ -1,15 +1,19 @@
 #! /bin/bash
 #
 # udev init script to setup /dev
-# config: /etc/udev/udev.conf 
+# config: /etc/udev/udev.conf
 
 case "$1" in
 
   start)
     rm -rf /dev/.udevdb
     export ACTION=add
-    /sbin/udevstart
-    /sbin/udevd --daemon || exit 1;
+    /sbin/udevd --daemon
+    /sbin/udevadm trigger
+    /sbin/udevadm settle
+    # Wake up again lazy devices
+    #/sbin/udevadm trigger --retry-failed
+    #/sbin/udevadm settle || exit 1;
     ;;
 
   stop)


More information about the Lunar-commits mailing list