Skip to contentSkip to conversation

no udev rules with udev 124

XEN-3.4.1-rc5 Daniel Schroeder 3 participants 10 messages Jul 1, 2009 – Jul 2, 2009

lore
Share & tools
lore
#0 lore raw

hello *,

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

--
daniel

#1 lore raw

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

Quoted 12 lines · Daniel Schroeder

hello *,

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

--
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Hello Daniel,
hello Kier,

the Problem is, that udev 124 does not know the the option -V without info as the first param.

I'll check on which version this was introduced and send a patch to fix this problem.

Marc

Quoted 29 lines · Keir Fraser

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

Quoted 5 lines · Daniel Schroeder

hello *,

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

Quoted 8 lines

--
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
In reply to Keir Fraser

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

Quoted 21 lines · Keir Fraser

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

Quoted 12 lines · Daniel Schroeder

hello *,

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

--
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw

Hello Daniel,

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

Marc

Quoted 65 lines · Daniel Schroeder

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

<snip>

(quoted diff) +5 -0
+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

Quoted 22 lines · Keir Fraser

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

Quoted 13 lines · Daniel Schroeder

hello *,

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

--
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw

Hello Daniel,

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

Quoted 75 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Marc

Quoted 26 lines · Daniel Schroeder

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

<snip>

(quoted diff) +5 -0
+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>

Quoted 39 lines

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

Signature · 1 line
daniel
Quoted 22 lines · Keir Fraser

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

Quoted 13 lines · Daniel Schroeder

hello *,

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

Signature · 6 lines
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Fix the detection of udev with udevadm version < 128

install.sh +2 -1
@@ -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"
tools/check/check_udev +2 -1
@@ -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 || \
tools/hotplug/Linux/Makefile +6 -4
@@ -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
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw

Hi Marc,

yepp, this patch fixes the installation on udev 124.

--
daniel

Quoted 87 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Quoted 81 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Marc

Quoted 26 lines · Daniel Schroeder

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

<snip>

(quoted diff) +5 -0
+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>

Quoted 40 lines

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

Signature · 1 line
daniel
Quoted 4 lines · Keir Fraser

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

Quoted 19 lines

-- Keir

Quoted 13 lines · Daniel Schroeder

hello *,

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

Signature · 6 lines
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#7 lore raw

Thanks for testing Daniel.

Keir,

i've tested installation target with udev versions from 120 up to 141.

Should i create a backported version of the patch for xen-3.3?

Am Donnerstag, den 02.07.2009, 10:10 +0200 schrieb Daniel Schroeder:

Quoted 95 lines

Hi Marc,

yepp, this patch fixes the installation on udev 124.

--
daniel

Quoted 87 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Quoted 81 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Marc

Quoted 26 lines · Daniel Schroeder

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

<snip>

(quoted diff) +5 -0
+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>

Quoted 40 lines

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

Signature · 1 line
daniel
Quoted 4 lines · Keir Fraser

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

Quoted 19 lines

-- Keir

Quoted 13 lines · Daniel Schroeder

hello *,

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

Signature · 6 lines
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw

Sure.

Quoted 107 lines · Marc - A. Dahlhaus [ Administration | Westermann GmbH ]

Thanks for testing Daniel.

Keir,

i've tested installation target with udev versions from 120 up to 141.

Should i create a backported version of the patch for xen-3.3?

Am Donnerstag, den 02.07.2009, 10:10 +0200 schrieb Daniel Schroeder:

Quoted 95 lines

Hi Marc,

yepp, this patch fixes the installation on udev 124.

--
daniel

Quoted 87 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Quoted 81 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Marc

Quoted 26 lines · Daniel Schroeder

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

<snip>

(quoted diff) +5 -0
+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>

Quoted 40 lines

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

Signature · 1 line
daniel
Quoted 4 lines · Keir Fraser

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

Quoted 19 lines

-- Keir

Quoted 13 lines · Daniel Schroeder

hello *,

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

Signature · 6 lines
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#9 lore raw

Here we go...
Same logic as tested with xen-3.4...

Marc

Am Donnerstag, den 02.07.2009, 11:27 +0100 schrieb Keir Fraser:

Quoted 114 lines

Sure.

Quoted 107 lines · Marc - A. Dahlhaus [ Administration | Westermann GmbH ]

Thanks for testing Daniel.

Keir,

i've tested installation target with udev versions from 120 up to 141.

Should i create a backported version of the patch for xen-3.3?

Am Donnerstag, den 02.07.2009, 10:10 +0200 schrieb Daniel Schroeder:

Quoted 95 lines

Hi Marc,

yepp, this patch fixes the installation on udev 124.

--
daniel

Quoted 87 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Quoted 81 lines · Marc - A. Dahlhaus

Hello Daniel,

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

Marc

Quoted 26 lines · Daniel Schroeder

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

<snip>

(quoted diff) +5 -0
+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>

Quoted 40 lines

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

Signature · 1 line
daniel
Quoted 4 lines · Keir Fraser

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

Quoted 19 lines

-- Keir

Quoted 13 lines · Daniel Schroeder

hello *,

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

Signature · 6 lines
daniel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Fix the detection of udev with udev version > 123

install.sh +3 -0
diff -Nurp xen-3.3.1.orig/install.sh xen-3.3.1/install.sh
@@ -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"
tools/check/check_udev +5 -2
diff -Nurp xen-3.3.1.orig/tools/check/check_udev xen-3.3.1/tools/check/check_udev
@@ -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"
 	;;
tools/examples/Makefile +9 -1
diff -Nurp xen-3.3.1.orig/tools/examples/Makefile xen-3.3.1/tools/examples/Makefile
@@ -44,6 +44,14 @@ 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)
+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 @@ 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 [ $(UDEVVER) -ge 059 ] && echo 1),1)
 HOTPLUGS=install-udev
 else
 HOTPLUGS=install-hotplug

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel