# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1246547923 -3600
# Node ID b4bf3a6e2feb778d3e9ff281a21d8ad6017a2284
# Parent 92c5bbe9077774276204cdda0cf19928a281cbb4
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@xxxxxx>
xen-unstable changeset: 19835:edfdeb150f27
xen-unstable date: Thu Jun 25 13:02:37 2009 +0100
buikd: Fix the detection of udev with udevadm version < 128
Signed-off-by: Marc-A. Dahlhaus <mad@xxxxxx>
xen-unstable changeset: 19878:c964dd391c7d
xen-unstable date: Thu Jul 02 11:31:00 2009 +0100
---
install.sh | 3 +++
tools/check/check_udev | 7 +++++--
tools/examples/Makefile | 10 +++++++++-
3 files changed, 17 insertions(+), 3 deletions(-)
diff -r 92c5bbe90777 -r b4bf3a6e2feb install.sh
--- a/install.sh Tue Jun 23 11:40:57 2009 +0100
+++ b/install.sh Thu Jul 02 16:18:43 2009 +0100
@@ -30,6 +30,9 @@ 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 info -V | awk '{print $NF}')
+
if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
echo " - installing for udev-based system"
rm -rf "$tmp/etc/hotplug"
diff -r 92c5bbe90777 -r b4bf3a6e2feb tools/check/check_udev
--- a/tools/check/check_udev Tue Jun 23 11:40:57 2009 +0100
+++ b/tools/check/check_udev Thu Jul 02 16:18:43 2009 +0100
@@ -8,8 +8,11 @@ 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 info -V | awk '{print $NF}'`
+ [ -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"
;;
diff -r 92c5bbe90777 -r b4bf3a6e2feb tools/examples/Makefile
--- a/tools/examples/Makefile Tue Jun 23 11:40:57 2009 +0100
+++ b/tools/examples/Makefile Thu Jul 02 16:18:43 2009 +0100
@@ -44,6 +44,14 @@ XEN_HOTPLUG_DIR = /etc/hotplug
XEN_HOTPLUG_DIR = /etc/hotplug
XEN_HOTPLUG_SCRIPTS = xen-backend.agent
+UDEVVER = 0
+ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1)
+UDEVVER = $(shell /sbin/udevadm info -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' )
+endif
+ifeq ($(shell [ -x /usr/bin/udevinfo ] && echo 1),1)
+UDEVVER = $(shell /usr/bin/udevinfo -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' )
+endif
+
UDEV_RULES_DIR = /etc/udev
UDEV_RULES = xen-backend.rules
@@ -52,7 +60,7 @@ ifeq ($(findstring $(DI),$(DE)),$(DI))
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 [ $(UDEVVER) -ge 059 ] && echo 1),1)
HOTPLUGS=install-udev
else
HOTPLUGS=install-hotplug
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|