From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Marc - A. Dahlhaus [ Administration | Westermann GmbH ]" Subject: [PATCH] Fix buildsystem to detect udev > version 124 Date: Wed, 24 Jun 2009 18:26:36 +0200 Message-ID: <1245860796.28193.7.camel@marc> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-zZbQFwlA/vlmwgTIn9Vz" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen-devel Cc: Daniel Schroeder , Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-zZbQFwlA/vlmwgTIn9Vz Content-Type: text/plain Content-Transfer-Encoding: 7bit udev removed the udevinfo symlink from versions higher than 123 and xens build-system could not detect if udev is in place and has the required version. Attached patch fixes this. Signed-off-by: Marc-A. Dahlhaus --=-zZbQFwlA/vlmwgTIn9Vz Content-Disposition: attachment; filename="xen-3.4-udev-1.patch" Content-Type: text/x-patch; name="xen-3.4-udev-1.patch"; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit --- xen-3.4.0.orig/tools/hotplug/Linux/Makefile +++ xen-3.4.0/tools/hotplug/Linux/Makefile @@ -28,6 +28,12 @@ XEN_SCRIPT_DATA += vtpm-migration.sh vtp XEN_HOTPLUG_DIR = /etc/hotplug XEN_HOTPLUG_SCRIPTS = xen-backend.agent +ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1) +UDEVINFO = /sbin/udevadm +else +UDEVINFO = /usr/bin/udevinfo +endif + UDEV_RULES_DIR = /etc/udev UDEV_RULES = xen-backend.rules xend.rules @@ -36,7 +43,7 @@ DE = $(if $(DESTDIR),$(shell readlink -f ifeq ($(findstring $(DI),$(DE)),$(DI)) HOTPLUGS=install-hotplug install-udev else -ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1) +ifeq ($(shell [ -x $(UDEVINFO) -a `$(UDEVINFO) -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1) HOTPLUGS=install-udev else HOTPLUGS=install-hotplug --- xen-3.4.0.orig/tools/check/check_udev +++ xen-3.4.0/tools/check/check_udev @@ -8,8 +8,10 @@ OpenBSD|NetBSD|FreeBSD) has_or_fail vnconfig ;; Linux) - has_or_fail udevinfo - [ "`udevinfo -V | awk '{print $NF}'`" -ge 59 ] 2>/dev/null || \ + has /sbin/udevadm && udevver=`/sbin/udevadm -V` + [ -z "$udevver" ] && has_or_fail udevinfo && \ + udevver=`udevinfo -V | awk '{print $NF}'` + [ "$udevver" -ge 59 ] 2>/dev/null || \ has hotplug || \ fail "udev is too old, upgrade to version 59 or later" ;; --- xen-3.4.0.orig/install.sh +++ xen-3.4.0/install.sh @@ -30,6 +30,8 @@ echo "Installing Xen from '$src' to '$ds [ -x "$(which udevinfo)" ] && \ UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/') +[ -z "$UDEV_VERSION" -a -x /sbin/udevadm ] && UDEV_VERSION=$(/sbin/udevadm -V) + if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then echo " - installing for udev-based system" rm -rf "$tmp/etc/hotplug" --=-zZbQFwlA/vlmwgTIn9Vz Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-zZbQFwlA/vlmwgTIn9Vz--