From 0ff31d848f715c7f9c3100d4e41994ef33f1fc61 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Mon, 24 Aug 2009 20:16:07 +0000 Subject: [PATCH] udevtrigger: Breakout udevtrigger package Current versions of udev no longer provide the separate udevtrigger utility that hotplug2 needs. To allow for the udev package to be updated, yet still provide a udevtrigger, create a new package udevtrigger that is built from old udev sources. Signed-off-by: Geoff Levand SVN-Revision: 17377 --- package/udev/Makefile | 13 ------ package/udevtrigger/Makefile | 43 +++++++++++++++++++ .../udevtrigger/patches/001-no_debug.patch | 22 ++++++++++ .../patches/002-udevtrigger_no_config.patch | 12 ++++++ 4 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 package/udevtrigger/Makefile create mode 100644 package/udevtrigger/patches/001-no_debug.patch create mode 100644 package/udevtrigger/patches/002-udevtrigger_no_config.patch diff --git a/package/udev/Makefile b/package/udev/Makefile index 9bb8af9b64..95115a2446 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -31,13 +31,6 @@ define Package/udev/description the /dev directory, or it renames network interfaces. endef -define Package/udevtrigger -$(call Package/udev) - SECTION:=base - CATEGORY:=Base system - TITLE:=Small utility to request kernel devices events for coldplug -endef - define Package/udevextras $(call Package/udev) TITLE:=Utilities for udev scripts, for general device discovery @@ -81,11 +74,6 @@ define Package/udev/install $(CP) files/20-input-grouping.rules $(1)/etc/udev/rules.d/ endef -define Package/udevtrigger/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevtrigger $(1)/sbin/ -endef - define Package/udevextras/install $(INSTALL_DIR) $(1)/etc/udev $(CP) $(PKG_BUILD_DIR)/etc/udev/rules.d $(1)/etc/udev/ @@ -96,5 +84,4 @@ define Package/udevextras/install endef $(eval $(call BuildPackage,udev)) -$(eval $(call BuildPackage,udevtrigger)) $(eval $(call BuildPackage,udevextras)) diff --git a/package/udevtrigger/Makefile b/package/udevtrigger/Makefile new file mode 100644 index 0000000000..dd7a5396a4 --- /dev/null +++ b/package/udevtrigger/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=udevtrigger +PKG_VERSION:=106 +PKG_RELEASE:=1 + +PKG_SOURCE:=udev-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/ +PKG_MD5SUM:=320ccd2d0f4540d10e021bafa14f8985 + +TAR_OPTIONS+=--transform='s,udev-$(PKG_VERSION),$(PKG_NAME)-$(PKG_VERSION),' + +include $(INCLUDE_DIR)/package.mk + +define Package/udevtrigger + SECTION:=base + CATEGORY:=Base system + TITLE:=Small utility to request kernel devices events for coldplug + URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html + MAINTAINER:=Geoff Levand +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + STRIP="/bin/true" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + udevtrigger +endef + +define Package/udevtrigger/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/udevtrigger $(1)/sbin/ +endef + +$(eval $(call BuildPackage,udevtrigger)) diff --git a/package/udevtrigger/patches/001-no_debug.patch b/package/udevtrigger/patches/001-no_debug.patch new file mode 100644 index 0000000000..626181e478 --- /dev/null +++ b/package/udevtrigger/patches/001-no_debug.patch @@ -0,0 +1,22 @@ +Index: udev-106/Makefile +=================================================================== +--- udev-106.orig/Makefile 2007-06-04 13:22:17.765154568 +0200 ++++ udev-106/Makefile 2007-06-04 13:22:17.831144536 +0200 +@@ -113,7 +113,7 @@ + AR = $(CROSS_COMPILE)ar + RANLIB = $(CROSS_COMPILE)ranlib + +-CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ++CFLAGS = -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 + WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \ + -Wchar-subscripts -Wmissing-declarations -Wnested-externs \ + -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes +@@ -130,7 +130,7 @@ + + # if DEBUG is enabled, then we do not strip + ifeq ($(strip $(DEBUG)),true) +- CFLAGS += -DDEBUG ++ CFLAGS += -g -DDEBUG + endif + + ifeq ($(strip $(USE_GCOV)),true) diff --git a/package/udevtrigger/patches/002-udevtrigger_no_config.patch b/package/udevtrigger/patches/002-udevtrigger_no_config.patch new file mode 100644 index 0000000000..db68ebf760 --- /dev/null +++ b/package/udevtrigger/patches/002-udevtrigger_no_config.patch @@ -0,0 +1,12 @@ +Index: udev-106/udevtrigger.c +=================================================================== +--- udev-106.orig/udevtrigger.c 2007-06-04 13:22:17.745157608 +0200 ++++ udev-106/udevtrigger.c 2007-06-04 13:22:18.022115504 +0200 +@@ -446,7 +446,6 @@ + }; + + logging_init("udevtrigger"); +- udev_config_init(); + dbg("version %s", UDEV_VERSION); + sysfs_init(); + -- 2.30.2