WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [XEN-3.4.1-rc5] no udev rules with udev 124

To: Daniel Schroeder <sec@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [XEN-3.4.1-rc5] no udev rules with udev 124
From: "Marc - A. Dahlhaus" <mad@xxxxxx>
Date: Thu, 02 Jul 2009 01:18:09 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 01 Jul 2009 16:18:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A4BDBDC.5020602@xxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C6715E9B.EB0B%keir.fraser@xxxxxxxxxxxxx> <4A4BDAA2.4050501@xxxxxxxxxxxxxxx> <4A4BDBDC.5020602@xxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)
Hello Daniel,

does this patch fix the installation of udev rules on your system?

Marc - A. Dahlhaus schrieb:
Hello Daniel,

it was added  on version 128...
I'll submit a followup fix for this problem shortly, testing it right now.

Marc

Daniel Schroeder schrieb:
this could be the problem in
http://xenbits.xensource.com/xen-3.4-testing.hg?rev/1bc7dd557233
:

<snip>
+ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1)
+UDEVINFO = /sbin/udevadm
+else
+UDEVINFO = /usr/bin/udevinfo
+endif
.
.
.
+ifeq ($(shell [ -x $(UDEVINFO) -a `$(UDEVINFO) -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
</snip>

i am not sure, but this evaluates to, if /sbin/udevadm exists, then set
UDEVINFO to it and get the version with /sbin/udevadm -V...the problem
is, that udev 124 doesnt know the -V switch...

<udev124>
/sbin/udevadm -V
unknown command, try help
</udev124>

<udev141>
/sbin/udevadm -V
141
</udev141>

--
daniel

Keir Fraser wrote:
If you revert changeset 19668 in xen-3.4-testing.hg (e.g., hg export 19668 |
patch -Rp1) then does the problem go away?

 -- Keir

On 01/07/2009 18:01, "Daniel Schroeder" <sec@xxxxxxxxxxxxxxx> wrote:

hello *,

rc5 and udev version 141 = fine
rc5 and udev version 124 = missing files

--
daniel

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


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


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

Fix the detection of udev with udevadm version < 128


Signed-off-by: Marc-A. Dahlhaus <mad@xxxxxx>

--- xen-3.4.1-rc5.orig/install.sh
+++ xen-3.4.1-rc5/install.sh
@@ -30,7 +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)
+[ -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"
--- xen-3.4.1-rc5.orig/tools/check/check_udev
+++ xen-3.4.1-rc5/tools/check/check_udev
@@ -8,7 +8,8 @@ OpenBSD|NetBSD|FreeBSD)
        has_or_fail vnconfig
        ;;
 Linux)
-       has /sbin/udevadm && udevver=`/sbin/udevadm -V`
+       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 || \
--- xen-3.4.1-rc5.orig/tools/hotplug/Linux/Makefile
+++ xen-3.4.1-rc5/tools/hotplug/Linux/Makefile
@@ -28,10 +28,12 @@ XEN_SCRIPT_DATA += vtpm-migration.sh vtp
 XEN_HOTPLUG_DIR = /etc/hotplug
 XEN_HOTPLUG_SCRIPTS = xen-backend.agent
 
+UDEVVER = 0
 ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1)
-UDEVINFO = /sbin/udevadm
-else
-UDEVINFO = /usr/bin/udevinfo
+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
@@ -42,7 +44,7 @@ DE = $(if $(DESTDIR),$(shell readlink -f
 ifeq ($(findstring $(DI),$(DE)),$(DI))
 HOTPLUGS=install-hotplug install-udev
 else
-ifeq ($(shell [ -x $(UDEVINFO) -a `$(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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel