ia64/xen-unstable

changeset 19835:edfdeb150f27

Fix buildsystem to detect udev > version 124

udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 13:02:37 2009 +0100 (2009-06-25)
parents edd603e77be4
children d9890e67d2b7
files install.sh tools/check/check_udev tools/hotplug/Linux/Makefile
line diff
     1.1 --- a/install.sh	Thu Jun 25 12:59:46 2009 +0100
     1.2 +++ b/install.sh	Thu Jun 25 13:02:37 2009 +0100
     1.3 @@ -30,6 +30,8 @@ echo "Installing Xen from '$src' to '$ds
     1.4  [ -x "$(which udevinfo)" ] && \
     1.5    UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
     1.6  
     1.7 +[ -z "$UDEV_VERSION" -a -x /sbin/udevadm ] && UDEV_VERSION=$(/sbin/udevadm -V)
     1.8 +
     1.9  if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
    1.10    echo " - installing for udev-based system"
    1.11    rm -rf "$tmp/etc/hotplug"
     2.1 --- a/tools/check/check_udev	Thu Jun 25 12:59:46 2009 +0100
     2.2 +++ b/tools/check/check_udev	Thu Jun 25 13:02:37 2009 +0100
     2.3 @@ -8,8 +8,10 @@ OpenBSD|NetBSD|FreeBSD)
     2.4  	has_or_fail vnconfig
     2.5  	;;
     2.6  Linux)
     2.7 -	has_or_fail udevinfo
     2.8 -	[ "`udevinfo -V | awk '{print $NF}'`" -ge 59 ] 2>/dev/null || \
     2.9 +	has /sbin/udevadm && udevver=`/sbin/udevadm -V`
    2.10 +	[ -z "$udevver" ] && has_or_fail udevinfo && \
    2.11 +		udevver=`udevinfo -V | awk '{print $NF}'`
    2.12 +	[ "$udevver" -ge 59 ] 2>/dev/null || \
    2.13  		has hotplug || \
    2.14  		fail "udev is too old, upgrade to version 59 or later"
    2.15  	;;
     3.1 --- a/tools/hotplug/Linux/Makefile	Thu Jun 25 12:59:46 2009 +0100
     3.2 +++ b/tools/hotplug/Linux/Makefile	Thu Jun 25 13:02:37 2009 +0100
     3.3 @@ -24,6 +24,12 @@ XEN_SCRIPT_DATA += vtpm-migration.sh vtp
     3.4  XEN_HOTPLUG_DIR = $(CONFIG_DIR)/hotplug
     3.5  XEN_HOTPLUG_SCRIPTS = xen-backend.agent
     3.6  
     3.7 +ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1)
     3.8 +UDEVINFO = /sbin/udevadm
     3.9 +else
    3.10 +UDEVINFO = /usr/bin/udevinfo
    3.11 +endif
    3.12 +
    3.13  UDEV_RULES_DIR = $(CONFIG_DIR)/udev
    3.14  UDEV_RULES = xen-backend.rules xend.rules
    3.15  
    3.16 @@ -32,7 +38,7 @@ DE = $(if $(DESTDIR),$(shell readlink -f
    3.17  ifeq ($(findstring $(DI),$(DE)),$(DI))
    3.18  HOTPLUGS=install-hotplug install-udev
    3.19  else
    3.20 -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)
    3.21 +ifeq ($(shell [ -x $(UDEVINFO) -a `$(UDEVINFO) -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
    3.22  HOTPLUGS=install-udev
    3.23  else
    3.24  HOTPLUGS=install-hotplug