All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc - A. Dahlhaus [ Administration | Westermann GmbH ]" <mad@wol.de>
To: Xen-devel <xen-devel@lists.xensource.com>
Cc: Daniel Schroeder <sec@dschroeder.info>,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: [PATCH] Fix buildsystem to detect udev > version 124
Date: Wed, 24 Jun 2009 18:26:36 +0200	[thread overview]
Message-ID: <1245860796.28193.7.camel@marc> (raw)

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

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 <mad@wol.de>



[-- Attachment #2: xen-3.4-udev-1.patch --]
[-- Type: text/x-patch, Size: 1861 bytes --]

--- 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"

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2009-06-24 16:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 16:26 Marc - A. Dahlhaus [ Administration | Westermann GmbH ] [this message]
2009-06-25  5:10 ` [PATCH] Fix buildsystem to detect udev > version 124 Jun Koi
     [not found]   ` <1245914667.9952.5.camel@marc>
     [not found]     ` <fdaac4d50906250027l4c90c950mf1fa77a75087fcde@mail.gmail.com>
2009-06-25  7:39       ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
  -- strict thread matches above, loose matches on Subject: below --
2009-06-25  7:06 Boris Derzhavets
2009-06-25  7:19 ` Jun Koi
2009-06-25  7:50 Boris Derzhavets
2009-06-25  9:37 Boris Derzhavets
2009-06-26  3:03 Boris Derzhavets
2009-06-26  9:12 ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
2009-06-26  3:11 Boris Derzhavets
2009-06-27 18:53 Boris Derzhavets
2009-06-27 20:02 ` Marc - A. Dahlhaus
2009-10-17  7:35   ` Dulloor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245860796.28193.7.camel@marc \
    --to=mad@wol.de \
    --cc=keir.fraser@eu.citrix.com \
    --cc=sec@dschroeder.info \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.