From a13d4f93b6d802daf4aa5180e3a8dace6c64c00d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 20 Jun 2009 18:50:06 +0200 Subject: [PATCH] udev: install the initramfs-tools hook. This replaces klibc-udev, which adds extra work for a little gain, so just use the real pkg. Bump revision. --HG-- extra : convert_revision : c01ed34d0766012254b24b1da090b24a261a6bf7 --- templates/klibc-udev/build.diff | 50 ------------------- .../files/udev.initramfs-bottom | 4 -- .../files/udev.initramfs-hook | 6 +-- .../files/udev.initramfs-premount | 0 templates/udev/template | 13 ++++- 5 files changed, 15 insertions(+), 58 deletions(-) delete mode 100644 templates/klibc-udev/build.diff rename templates/{klibc-udev => udev}/files/udev.initramfs-bottom (66%) rename templates/{klibc-udev => udev}/files/udev.initramfs-hook (86%) rename templates/{klibc-udev => udev}/files/udev.initramfs-premount (100%) diff --git a/templates/klibc-udev/build.diff b/templates/klibc-udev/build.diff deleted file mode 100644 index 6c6bb5b0c2c..00000000000 --- a/templates/klibc-udev/build.diff +++ /dev/null @@ -1,50 +0,0 @@ ---- extras/Makefile.in.orig 2009-06-19 14:51:53.084747653 +0200 -+++ extras/Makefile.in 2009-06-19 14:52:05.712058999 +0200 -@@ -189,15 +189,11 @@ AM_LDFLAGS = \ - - SUBDIRS = \ - ata_id \ -- cdrom_id \ - edd_id \ - path_id \ - firmware \ -- collect \ - floppy \ -- fstab_import \ - rule_generator \ -- scsi_id \ - usb_id - - all: all-recursive ---- udev/udev-util.c.orig 2009-06-19 14:52:40.767402973 +0200 -+++ udev/udev-util.c 2009-06-19 14:54:05.981115992 +0200 -@@ -126,6 +126,7 @@ int util_unlink_secure(struct udev *udev - - uid_t util_lookup_user(struct udev *udev, const char *user) - { -+ /* - char *endptr; - int buflen = sysconf(_SC_GETPW_R_SIZE_MAX); - char buf[buflen]; -@@ -147,11 +148,13 @@ uid_t util_lookup_user(struct udev *udev - err(udev, "specified user '%s' unknown\n", user); - else - err(udev, "error resolving user '%s': %m\n", user); -+ */ - return 0; - } - - gid_t util_lookup_group(struct udev *udev, const char *group) - { -+ /* - char *endptr; - int buflen = sysconf(_SC_GETGR_R_SIZE_MAX); - char buf[buflen]; -@@ -173,6 +176,7 @@ gid_t util_lookup_group(struct udev *ude - err(udev, "specified group '%s' unknown\n", group); - else - err(udev, "error resolving group '%s': %m\n", group); -+ */ - return 0; - } - diff --git a/templates/klibc-udev/files/udev.initramfs-bottom b/templates/udev/files/udev.initramfs-bottom similarity index 66% rename from templates/klibc-udev/files/udev.initramfs-bottom rename to templates/udev/files/udev.initramfs-bottom index 6c59eb0a95b..30f2b32ae24 100644 --- a/templates/klibc-udev/files/udev.initramfs-bottom +++ b/templates/udev/files/udev.initramfs-bottom @@ -20,9 +20,5 @@ esac # Stop udevd, we'll miss a few events while we run init, but we catch up pkill udevd -# udevd might have been in the middle of something when we killed it, -# but it doesn't matter because we'll do everything again in userspace -rm -rf /dev/.udev/queue - # Move /dev to the real filesystem mount -n -o move /dev ${rootmnt}/dev diff --git a/templates/klibc-udev/files/udev.initramfs-hook b/templates/udev/files/udev.initramfs-hook similarity index 86% rename from templates/klibc-udev/files/udev.initramfs-hook rename to templates/udev/files/udev.initramfs-hook index b906037fc8f..216e478f04d 100644 --- a/templates/klibc-udev/files/udev.initramfs-hook +++ b/templates/udev/files/udev.initramfs-hook @@ -25,8 +25,8 @@ copy_exec /usr/bin/pkill /sbin copy_exec /bin/rm /bin # Copy across the udev binaries -copy_exec /usr/lib/klibc/udev/udevd /sbin -copy_exec /usr/lib/klibc/udev/udevadm /sbin +copy_exec /sbin/udevd /sbin +copy_exec /sbin/udevadm /sbin # Copy udev configuration mkdir -p ${DESTDIR}/etc/udev @@ -42,5 +42,5 @@ done # Copy across helpers the rules need mkdir -p ${DESTDIR}/lib/udev -copy_exec /usr/lib/klibc/udev/path_id /lib/udev +copy_exec /lib/udev/path_id /lib/udev cp -f /lib/udev/firmware.sh ${DESTDIR}/lib/udev diff --git a/templates/klibc-udev/files/udev.initramfs-premount b/templates/udev/files/udev.initramfs-premount similarity index 100% rename from templates/klibc-udev/files/udev.initramfs-premount rename to templates/udev/files/udev.initramfs-premount diff --git a/templates/udev/template b/templates/udev/template index e4afe428293..d6082703873 100644 --- a/templates/udev/template +++ b/templates/udev/template @@ -2,6 +2,7 @@ pkgname=udev sourcepkg=$pkgname version=143 +revision=1 distfiles="${KERNEL_SITE}/utils/kernel/hotplug/udev-${version}.tar.bz2" build_style=gnu_configure configure_args="--exec-prefix= --without-selinux --libexecdir=/lib/udev @@ -22,7 +23,6 @@ Add_dependency full procps Add_dependency full libblkid Add_dependency full glib Add_dependency full acl -Add_dependency full libusb-compat Add_dependency full usbutils 0.82 Add_dependency full pciutils Add_dependency build gperf @@ -51,4 +51,15 @@ post_install() # Install the OpenRC service install -D -m755 ${FILESDIR}/udev.rc ${DESTDIR}/etc/init.d/udev + + # Install the initramfs-tools hook/scripts. + install -d $DESTDIR/usr/share/initramfs-tools/hooks + install -d $DESTDIR/usr/share/initramfs-tools/scripts/init-premount + install -d $DESTDIR/usr/share/initramfs-tools/scripts/init-bottom + install -m 755 ${FILESDIR}/udev.initramfs-hook \ + $DESTDIR/usr/share/initramfs-tools/hooks/udev + install -m 755 ${FILESDIR}/udev.initramfs-premount \ + $DESTDIR/usr/share/initramfs-tools/scripts/init-premount/udev + install -m 755 ${FILESDIR}/udev.initramfs-bottom \ + $DESTDIR/usr/share/initramfs-tools/scripts/init-bottom/udev }