Skip to contentSkip to conversation

Several fixes for autoconf and xencommons

PATCH New Roger Pau Monne 1 participant 6 messages Feb 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Several fixes for autoconf and xencommons

Fix autoconf under NetBSD and add some tests to Linux xencommons to check for the necessary tools to run hotplug scripts.

#1 lore raw

PATCH 1/1 autoconf: remove (yet another) brctl leftover

# HG changeset patch
# User Roger Pau Monne <[email protected]> # Date 1329857655 -3600
# Node ID 72fc6b55447b9f45fd4d8a5d7ef09d4dd899edc2 # Parent a4d93d0e0df2fafe5b3e2dab3e34799498a875e2
autoconf: remove (yet another) brctl leftover

config/Tools.mk.in +0 -1
diff -r a4d93d0e0df2 -r 72fc6b55447b config/Tools.mk.in
@@ -11,7 +11,6 @@ FLEX                := @FLEX@
 PYTHON              := @PYTHON@
 PYTHON_PATH         := @PYTHONPATH@
 PERL                := @PERL@
-BRCTL               := @BRCTL@
 IP                  := @IP@
 CURL_CONFIG         := @CURL@
 XML2_CONFIG         := @XML@
#2 lore raw

PATCH 1/1 autconf: remove ip check

In reply to Roger Pau Monne

# HG changeset patch
# User Roger Pau Monne <[email protected]> # Date 1330003783 -3600
# Node ID 21734a9d28823bdda72423282582ff973289c758 # Parent 72fc6b55447b9f45fd4d8a5d7ef09d4dd899edc2
autconf: remove ip check

ip is a run-time dependency, and it is not needed to build Xen tools.

config/Tools.mk.in +0 -1
diff -r 72fc6b55447b -r 21734a9d2882 config/Tools.mk.in
@@ -11,7 +11,6 @@ FLEX                := @FLEX@
 PYTHON              := @PYTHON@
 PYTHON_PATH         := @PYTHONPATH@
 PERL                := @PERL@
-IP                  := @IP@
 CURL_CONFIG         := @CURL@
 XML2_CONFIG         := @XML@
 BASH                := @BASH@
tools/configure +0 -49

79 lines not on this page · raw message

tools/configure.ac +0 -2
diff -r 72fc6b55447b -r 21734a9d2882 tools/configure.ac
@@ -62,7 +62,6 @@ AX_SET_FLAGS
 
 AC_ARG_VAR([PYTHON], [Path to the Python parser])
 AC_ARG_VAR([PERL], [Path to Perl parser])
-AC_ARG_VAR([IP], [Path to ip tool])
 AC_ARG_VAR([BISON], [Path to Bison parser generator])
 AC_ARG_VAR([FLEX], [Path to Flex lexical analyser generator])
 AC_ARG_VAR([CURL], [Path to curl-config tool])
@@ -77,7 +76,6 @@ AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
-AX_PATH_PROG_OR_FAIL([IP], [ip])
 AX_PATH_PROG_OR_FAIL([BISON], [bison])
 AX_PATH_PROG_OR_FAIL([FLEX], [flex])
 AS_IF([test "x$xapi" = "xy"], [
#3 lore raw

PATCH 1/1 autoconf: run libuuid test under Linux only

In reply to Roger Pau Monne

# HG changeset patch
# User Roger Pau Monne <[email protected]> # Date 1330004063 -3600
# Node ID 8bd684735341cd4e41aa6ea1047556a88b84f625 # Parent 21734a9d28823bdda72423282582ff973289c758
autoconf: run libuuid test under Linux only

libuuid is only required to compile Xen tools under Linux.

tools/configure +5 -1
diff -r 21734a9d2882 -r 8bd684735341 tools/configure
@@ -6840,7 +6840,9 @@ if test "x$ac_cv_lib_rt_clock_gettime" =
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_clear in -luuid" >&5
+if test "x$host_os" == "xlinux-gnu"; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_clear in -luuid" >&5
 $as_echo_n "checking for uuid_clear in -luuid... " >&6; }
 if test "${ac_cv_lib_uuid_uuid_clear+set}" = set; then :
   $as_echo_n "(cached) " >&6
@@ -6887,6 +6889,8 @@ else
   as_fn_error $? "Could not find libuuid" "$LINENO" 5
 fi
 
+
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl_alloc in -lyajl" >&5
 $as_echo_n "checking for yajl_alloc in -lyajl... " >&6; }
 if test "${ac_cv_lib_yajl_yajl_alloc+set}" = set; then :
tools/configure.ac +4 -2
diff -r 21734a9d2882 -r 8bd684735341 tools/configure.ac
@@ -120,8 +120,10 @@ AC_SUBST(libgcrypt)
 AC_CHECK_LIB([pthread], [pthread_create], [] ,
     [AC_MSG_ERROR([Could not find libpthread])])
 AC_CHECK_LIB([rt], [clock_gettime])
-AC_CHECK_LIB([uuid], [uuid_clear], [],
-    [AC_MSG_ERROR([Could not find libuuid])])
+AS_IF([test "x$host_os" == "xlinux-gnu"], [
+    AC_CHECK_LIB([uuid], [uuid_clear], [],
+        [AC_MSG_ERROR([Could not find libuuid])])
+])
 AC_CHECK_LIB([yajl], [yajl_alloc], [],
     [AC_MSG_ERROR([Could not find yajl])])
 AC_CHECK_LIB([z], [deflateCopy], [], [AC_MSG_ERROR([Could not find zlib])])
#4 lore raw

PATCH 1/1 Linux/init: check for brctl and ip at xencommons

In reply to Roger Pau Monne

# HG changeset patch
# User Roger Pau Monne <[email protected]> # Date 1329811412 -3600
# Node ID 6c6c59861319b2be13fde935e20b62ead39905ca # Parent 8bd684735341cd4e41aa6ea1047556a88b84f625 Linux/init: check for brctl and ip at xencommons

Check for brctl and ip at xencommons, since hotplug scripts use it.

tools/hotplug/Linux/init.d/xencommons +8 -0
diff -r 8bd684735341 -r 6c6c59861319 tools/hotplug/Linux/init.d/xencommons
@@ -50,6 +50,14 @@ if test -f /proc/xen/capabilities && \
 	exit 0
 fi
 
+# List of tools needed by xen (hotplug scripts)
+REQ_TOOLS="brctl ip"
+
+for tool in $REQ_TOOLS
+do
+	hash $tool > /dev/null 2>&1 || echo "Warning: $tool not found"
+done
+
 do_start () {
         local time=0
 	local timeout=30
#5 lore raw

PATCH 1/1 Linux/init: check for udev >= 59 at xencommons

In reply to Roger Pau Monne

# HG changeset patch
# User Roger Pau Monne <[email protected]> # Date 1329814249 -3600
# Node ID 9fa89fb4ee2b3a587ec537c404a270f0c0e2169d # Parent 6c6c59861319b2be13fde935e20b62ead39905ca Linux/init: check for udev >= 59 at xencommons

Check for udev at xencommons, since hotplug scripts use it.

tools/hotplug/Linux/init.d/xencommons +20 -0
diff -r 6c6c59861319 -r 9fa89fb4ee2b tools/hotplug/Linux/init.d/xencommons
@@ -58,6 +58,26 @@ do
 	hash $tool > /dev/null 2>&1 || echo "Warning: $tool not found"
 done
 
+# Check for udev >= 59
+if ! hash udevadm > /dev/null 2>&1
+then
+	if ! hash udevinfo > /dev/null 2>&1
+	then
+		echo "Warning: unable to find udevadm or udevinfo"
+	else
+		udevver=`udevinfo -V | awk '{print $NF}'`
+	fi
+else
+	udevver=`udevadm info -V | awk '{print $NF}'`
+fi
+if test -z "${udevver}" || test "${udevver}" -lt 59
+then
+	if ! hash hotplug > /dev/null 2>&1
+	then
+		echo "Warning: udev is too old, upgrade to version 59 or later"
+	fi
+fi
+
 do_start () {
         local time=0
 	local timeout=30