From 246d05c71814207a747349b22ab310fa4c91f270 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 9 Jun 2005 10:09:25 +0000 Subject: Apply most of http://bugs.uclibc.org/view.php?id=290 --- package/udev/udev.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/package/udev/udev.mk b/package/udev/udev.mk index ce0091f84..9a3c1f79b 100644 --- a/package/udev/udev.mk +++ b/package/udev/udev.mk @@ -3,7 +3,7 @@ # udev # ############################################################# -UDEV_VERSION:=030 +UDEV_VERSION:=058 UDEV_SOURCE:=udev-$(UDEV_VERSION).tar.bz2 UDEV_SITE:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ UDEV_CAT:=bzcat @@ -11,6 +11,9 @@ UDEV_DIR:=$(BUILD_DIR)/udev-$(UDEV_VERSION) UDEV_TARGET_BINARY:=sbin/udev UDEV_BINARY:=udev +# UDEV_ROOT is /dev so we can replace devfs, not /udev for experiments +UDEV_ROOT:=/dev + $(DL_DIR)/$(UDEV_SOURCE): $(WGET) -P $(DL_DIR) $(UDEV_SITE)/$(UDEV_SOURCE) @@ -25,12 +28,24 @@ $(UDEV_DIR)/.configured: $(UDEV_DIR)/.unpacked $(UDEV_DIR)/$(UDEV_BINARY): $(UDEV_DIR)/.configured $(MAKE) CROSS=$(TARGET_CROSS) GCC=$(TARGET_CC) \ - USE_LOG=false USE_SELINUX=false -C $(UDEV_DIR) + USE_LOG=false USE_SELINUX=false \ + udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) touch -c $(UDEV_DIR)/$(UDEV_BINARY) +# UDEV_CONF overrides default policies for device access control and naming; +# default access controls prevent non-root tasks from running. Many of the +# rule files rely on PROGRAM invocations (e.g. extra /etc/udev/scripts); +# for now we'll avoid having buildroot systems rely on them. +UDEV_CONF:=etc/udev/frugalware/udev.rules + $(TARGET_DIR)/$(UDEV_TARGET_BINARY): $(UDEV_DIR)/$(UDEV_BINARY) + -mkdir $(TARGET_DIR)/sys + install -D -m 0644 $(UDEV_DIR)/$(UDEV_CONF) \ + $(TARGET_DIR)/etc/udev/rules.d/50-udev.rules $(MAKE) CROSS=$(TARGET_CROSS) GCC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) \ - USE_LOG=false USE_SELINUX=false -C $(UDEV_DIR) install + USE_LOG=false USE_SELINUX=false \ + udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) install + $(INSTALL) -m 0755 -D package/udev/init-udev $(TARGET_DIR)/etc/init.d/S10udev udev: uclibc $(TARGET_DIR)/$(UDEV_TARGET_BINARY) -- cgit v1.2.3