Added klibc-udev-138 template, for the initramfs.

Move initramfs-tools udev hook to this pkg.

--HG--
extra : convert_revision : d88915bc50cdf9211fae16f09a3b306814c6ed1f
This commit is contained in:
Juan RP 2009-03-08 02:09:37 +01:00
parent 9d6298398c
commit 26a8c1b1fa
6 changed files with 92 additions and 16 deletions

View file

@ -0,0 +1,46 @@
--- udev/udev-util.c 2008-11-06 02:56:15.000000000 +0100
+++ udev/udev-util.c 2008-11-09 18:28:30.000000000 +0100
@@ -126,6 +126,7 @@
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 @@
err(udev, "specified user '%s' unknown\n", user);
else
err(udev, "error resolving user '%s': %m\n", user);
+ */
return 0;
}
extern 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 @@
err(udev, "specified group '%s' unknown\n", group);
else
err(udev, "error resolving group '%s': %m\n", group);
+ */
return 0;
}
--- Makefile.in.orig 2009-03-08 01:04:54.032608782 +0100
+++ Makefile.in 2009-03-08 01:05:10.728461250 +0100
@@ -212,10 +212,7 @@ AM_CFLAGS =
AM_LDFLAGS = \
-Wl,--as-needed
-SUBDIRS = \
- udev \
- rules \
- extras
+SUBDIRS = udev
udevconfdir = $(sysconfdir)/udev
udevconf_DATA = \

View file

@ -25,8 +25,8 @@ copy_exec /usr/bin/pkill /sbin
copy_exec /bin/rm /bin
# Copy across the udev binaries
copy_exec /sbin/udevd /sbin
copy_exec /sbin/udevadm /sbin
copy_exec /usr/lib/klibc/bin/udevd /sbin
copy_exec /usr/lib/klibc/bin/udevadm /sbin
# Copy udev configuration
mkdir -p ${DESTDIR}/etc/udev
@ -48,5 +48,3 @@ copy_exec /lib/udev/usb_id /lib/udev
copy_exec /lib/udev/vol_id /lib/udev
copy_exec /lib/udev/scsi_id /lib/udev
copy_exec /lib/udev/path_id /lib/udev
# 61-persistent-storage-edd.rules
#copy_exec /lib/udev/edd_id /lib/udev

View file

@ -0,0 +1,44 @@
# Template file for 'klibc-udev'
pkgname=klibc-udev
version=138
wrksrc="udev-${version}"
distfiles="
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-$version.tar.bz2"
build_style=custom-install
configure_args="--prefix="
configure_env="CC=klcc LD=klcc"
short_desc="A Userspace implementation of devfs (for initramfs)"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=bc525a4d6bdbace1b23433256643cc331e4049e1e2442333707e6d2ba8a173b4
long_desc="
udev is a implementation of devfs in userspace using sysfs and
/sbin/hotplug. It requires a 2.5/2.6 kernel to run properly.
This package has been built with klibc for use on the initramfs."
Add_dependency build klibc-devel
Add_dependency run klibc
do_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
cd $wrksrc
CC=klcc LD=klcc CFLAGS="-O2" ./configure --prefix=
make || exit 1
install -d ${destdir}/usr/lib/klibc/bin
install -s -m755 udev/udevd ${destdir}/usr/lib/klibc/bin
install -s -m755 udev/udevadm ${destdir}/usr/lib/klibc/bin
# Install the initramfs-tools hook.
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
}

View file

@ -20,18 +20,6 @@ post_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
# Install the initramfs-tools udev scripts.
mkdir -p $destdir/usr/share/initramfs-tools/hooks
mkdir -p $destdir/usr/share/initramfs-tools/scripts/init-premount
mkdir -p $destdir/usr/share/initramfs-tools/scripts/init-bottom
install -m 755 $XBPS_TEMPLATESDIR/udev/udev.initramfs-hook \
$destdir/usr/share/initramfs-tools/hooks/udev
install -m 755 $XBPS_TEMPLATESDIR/udev/udev.initramfs-premount \
$destdir/usr/share/initramfs-tools/scripts/init-premount/udev
install -m 755 $XBPS_TEMPLATESDIR/udev/udev.initramfs-bottom \
$destdir/usr/share/initramfs-tools/scripts/init-bottom/udev
install -d $destdir/lib/firmware
install -d $destdir/lib/udev/devices/pts
install -d $destdir/lib/udev/devices/shm