* [PATCH v2] tools: require OCaml version 3.09.3 or greater
@ 2014-02-11 10:38 Roger Pau Monne
2014-02-11 12:49 ` Ian Campbell
2014-02-11 16:22 ` Don Slutz
0 siblings, 2 replies; 12+ messages in thread
From: Roger Pau Monne @ 2014-02-11 10:38 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Don Slutz, Roger Pau Monne
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Don Slutz <dslutz@verizon.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@citrix.com>
---
I've removed Don's "Tested-by" because the patch has changed, could
you please re-test it Don?
Please run autogen.sh after applying.
---
m4/ax_compare_version.m4 | 179 ++++++++++++++++++++++++++++++++++++++++++++++
tools/configure.ac | 7 ++
2 files changed, 186 insertions(+), 0 deletions(-)
create mode 100644 m4/ax_compare_version.m4
diff --git a/m4/ax_compare_version.m4 b/m4/ax_compare_version.m4
new file mode 100644
index 0000000..26f4dec
--- /dev/null
+++ b/m4/ax_compare_version.m4
@@ -0,0 +1,179 @@
+# Fetched from http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_compare_version.m4
+# Commit ID: 27948f49ca30e4222bb7cdd55182bd7341ac50c5
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+#
+# DESCRIPTION
+#
+# This macro compares two version strings. Due to the various number of
+# minor-version numbers that can exist, and the fact that string
+# comparisons are not compatible with numeric comparisons, this is not
+# necessarily trivial to do in a autoconf script. This macro makes doing
+# these comparisons easy.
+#
+# The six basic comparisons are available, as well as checking equality
+# limited to a certain number of minor-version levels.
+#
+# The operator OP determines what type of comparison to do, and can be one
+# of:
+#
+# eq - equal (test A == B)
+# ne - not equal (test A != B)
+# le - less than or equal (test A <= B)
+# ge - greater than or equal (test A >= B)
+# lt - less than (test A < B)
+# gt - greater than (test A > B)
+#
+# Additionally, the eq and ne operator can have a number after it to limit
+# the test to that number of minor versions.
+#
+# eq0 - equal up to the length of the shorter version
+# ne0 - not equal up to the length of the shorter version
+# eqN - equal up to N sub-version levels
+# neN - not equal up to N sub-version levels
+#
+# When the condition is true, shell commands ACTION-IF-TRUE are run,
+# otherwise shell commands ACTION-IF-FALSE are run. The environment
+# variable 'ax_compare_version' is always set to either 'true' or 'false'
+# as well.
+#
+# Examples:
+#
+# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
+# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
+#
+# would both be true.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
+# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
+#
+# would both be false.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
+#
+# would be true because it is only comparing two minor versions.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
+#
+# would be true because it is only comparing the lesser number of minor
+# versions of the two values.
+#
+# Note: The characters that separate the version numbers do not matter. An
+# empty string is the same as version 0. OP is evaluated by autoconf, not
+# configure, so must be a string, not a variable.
+#
+# The author would like to acknowledge Guido Draheim whose advice about
+# the m4_case and m4_ifvaln functions make this macro only include the
+# portions necessary to perform the specific comparison specified by the
+# OP argument in the final configure script.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 11
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ AC_REQUIRE([AC_PROG_AWK])
+
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [illegal OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([illegal OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
diff --git a/tools/configure.ac b/tools/configure.ac
index 0754f0e..3496c12 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -46,6 +46,7 @@ m4_include([../m4/pthread.m4])
m4_include([../m4/ptyfuncs.m4])
m4_include([../m4/extfs.m4])
m4_include([../m4/fetcher.m4])
+m4_include([../m4/ax_compare_version.m4])
# Enable/disable options
AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
@@ -161,6 +162,12 @@ AS_IF([test "x$ocamltools" = "xy"], [
AS_IF([test "x$enable_ocamltools" = "xyes"], [
AC_MSG_ERROR([Ocaml tools enabled, but unable to find Ocaml])])
ocamltools="n"
+ ], [
+ AX_COMPARE_VERSION([$OCAMLVERSION], [lt], [3.09.3], [
+ AS_IF([test "x$enable_ocamltools" = "xyes"], [
+ AC_MSG_ERROR([Your version of OCaml: $OCAMLVERSION is not supported])])
+ ocamltools="n"
+ ])
])
])
AS_IF([test "x$xsmpolicy" = "xy"], [
--
1.7.7.5 (Apple Git-26)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-02-11 10:38 [PATCH v2] tools: require OCaml version 3.09.3 or greater Roger Pau Monne
@ 2014-02-11 12:49 ` Ian Campbell
2014-02-11 13:02 ` Roger Pau Monné
2014-02-11 16:22 ` Don Slutz
1 sibling, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2014-02-11 12:49 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: George Dunlap, xen-devel, Don Slutz, Ian Jackson
On Tue, 2014-02-11 at 11:38 +0100, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Don Slutz <dslutz@verizon.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@citrix.com>
> ---
> I've removed Don's "Tested-by" because the patch has changed, could
> you please re-test it Don?
>
> Please run autogen.sh after applying.
Is this intended for 4.4? If Yes then you need to make the case to
George.
Or shall we simply release note the minimum requirement and enforce it
for 4.5?
I'm probably unduly nervous about changing autoconf stuff...
I've applied Don's CAMLreturnT fix BTW.
> ---
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-02-11 12:49 ` Ian Campbell
@ 2014-02-11 13:02 ` Roger Pau Monné
2014-02-11 16:23 ` Don Slutz
0 siblings, 1 reply; 12+ messages in thread
From: Roger Pau Monné @ 2014-02-11 13:02 UTC (permalink / raw)
To: Ian Campbell; +Cc: George Dunlap, xen-devel, Don Slutz, Ian Jackson
On 11/02/14 13:49, Ian Campbell wrote:
> On Tue, 2014-02-11 at 11:38 +0100, Roger Pau Monne wrote:
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> Cc: Don Slutz <dslutz@verizon.com>
>> Cc: Ian Campbell <ian.campbell@citrix.com>
>> Cc: Ian Jackson <ian.jackson@citrix.com>
>> ---
>> I've removed Don's "Tested-by" because the patch has changed, could
>> you please re-test it Don?
>>
>> Please run autogen.sh after applying.
>
> Is this intended for 4.4? If Yes then you need to make the case to
> George.
>
> Or shall we simply release note the minimum requirement and enforce it
> for 4.5?
>
> I'm probably unduly nervous about changing autoconf stuff...
>
> I've applied Don's CAMLreturnT fix BTW.
IMHO I think it can wait until 4.5 and then backport it to previous
releases as needed.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-02-11 13:02 ` Roger Pau Monné
@ 2014-02-11 16:23 ` Don Slutz
0 siblings, 0 replies; 12+ messages in thread
From: Don Slutz @ 2014-02-11 16:23 UTC (permalink / raw)
To: Roger Pau Monné, Ian Campbell
Cc: George Dunlap, xen-devel, Don Slutz, Ian Jackson
On 02/11/14 08:02, Roger Pau Monné wrote:
> On 11/02/14 13:49, Ian Campbell wrote:
>> On Tue, 2014-02-11 at 11:38 +0100, Roger Pau Monne wrote:
>>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>>> Cc: Don Slutz <dslutz@verizon.com>
>>> Cc: Ian Campbell <ian.campbell@citrix.com>
>>> Cc: Ian Jackson <ian.jackson@citrix.com>
>>> ---
>>> I've removed Don's "Tested-by" because the patch has changed, could
>>> you please re-test it Don?
>>>
>>> Please run autogen.sh after applying.
>> Is this intended for 4.4? If Yes then you need to make the case to
>> George.
>>
>> Or shall we simply release note the minimum requirement and enforce it
>> for 4.5?
>>
>> I'm probably unduly nervous about changing autoconf stuff...
>>
>> I've applied Don's CAMLreturnT fix BTW.
> IMHO I think it can wait until 4.5 and then backport it to previous
> releases as needed.
>
> Roger.
>
I have no issue with this waiting for 4.5.
-Don Slutz
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-02-11 10:38 [PATCH v2] tools: require OCaml version 3.09.3 or greater Roger Pau Monne
2014-02-11 12:49 ` Ian Campbell
@ 2014-02-11 16:22 ` Don Slutz
2014-03-12 14:50 ` Ian Campbell
1 sibling, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-02-11 16:22 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel; +Cc: Ian Jackson, Ian Campbell, Don Slutz
On 02/11/14 05:38, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Don Slutz <dslutz@verizon.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@citrix.com>
> ---
> I've removed Don's "Tested-by" because the patch has changed, could
> you please re-test it Don?
>
> Please run autogen.sh after applying.
I have retested after applying, and autogen.sh ran cleanly for me on Fedora 17 system. Fails (as expected on CentOS 5.10).
So you can add
Tested-by: Don Slutz <dslutz@verizon.com>
-Don Slutz
> ---
> m4/ax_compare_version.m4 | 179 ++++++++++++++++++++++++++++++++++++++++++++++
> tools/configure.ac | 7 ++
> 2 files changed, 186 insertions(+), 0 deletions(-)
> create mode 100644 m4/ax_compare_version.m4
>
> diff --git a/m4/ax_compare_version.m4 b/m4/ax_compare_version.m4
> new file mode 100644
> index 0000000..26f4dec
> --- /dev/null
> +++ b/m4/ax_compare_version.m4
> @@ -0,0 +1,179 @@
> +# Fetched from http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_compare_version.m4
> +# Commit ID: 27948f49ca30e4222bb7cdd55182bd7341ac50c5
> +# ===========================================================================
> +# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
> +#
> +# DESCRIPTION
> +#
> +# This macro compares two version strings. Due to the various number of
> +# minor-version numbers that can exist, and the fact that string
> +# comparisons are not compatible with numeric comparisons, this is not
> +# necessarily trivial to do in a autoconf script. This macro makes doing
> +# these comparisons easy.
> +#
> +# The six basic comparisons are available, as well as checking equality
> +# limited to a certain number of minor-version levels.
> +#
> +# The operator OP determines what type of comparison to do, and can be one
> +# of:
> +#
> +# eq - equal (test A == B)
> +# ne - not equal (test A != B)
> +# le - less than or equal (test A <= B)
> +# ge - greater than or equal (test A >= B)
> +# lt - less than (test A < B)
> +# gt - greater than (test A > B)
> +#
> +# Additionally, the eq and ne operator can have a number after it to limit
> +# the test to that number of minor versions.
> +#
> +# eq0 - equal up to the length of the shorter version
> +# ne0 - not equal up to the length of the shorter version
> +# eqN - equal up to N sub-version levels
> +# neN - not equal up to N sub-version levels
> +#
> +# When the condition is true, shell commands ACTION-IF-TRUE are run,
> +# otherwise shell commands ACTION-IF-FALSE are run. The environment
> +# variable 'ax_compare_version' is always set to either 'true' or 'false'
> +# as well.
> +#
> +# Examples:
> +#
> +# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
> +# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
> +#
> +# would both be true.
> +#
> +# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
> +# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
> +#
> +# would both be false.
> +#
> +# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
> +#
> +# would be true because it is only comparing two minor versions.
> +#
> +# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
> +#
> +# would be true because it is only comparing the lesser number of minor
> +# versions of the two values.
> +#
> +# Note: The characters that separate the version numbers do not matter. An
> +# empty string is the same as version 0. OP is evaluated by autoconf, not
> +# configure, so must be a string, not a variable.
> +#
> +# The author would like to acknowledge Guido Draheim whose advice about
> +# the m4_case and m4_ifvaln functions make this macro only include the
> +# portions necessary to perform the specific comparison specified by the
> +# OP argument in the final configure script.
> +#
> +# LICENSE
> +#
> +# Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
> +#
> +# Copying and distribution of this file, with or without modification, are
> +# permitted in any medium without royalty provided the copyright notice
> +# and this notice are preserved. This file is offered as-is, without any
> +# warranty.
> +
> +#serial 11
> +
> +dnl #########################################################################
> +AC_DEFUN([AX_COMPARE_VERSION], [
> + AC_REQUIRE([AC_PROG_AWK])
> +
> + # Used to indicate true or false condition
> + ax_compare_version=false
> +
> + # Convert the two version strings to be compared into a format that
> + # allows a simple string comparison. The end result is that a version
> + # string of the form 1.12.5-r617 will be converted to the form
> + # 0001001200050617. In other words, each number is zero padded to four
> + # digits, and non digits are removed.
> + AS_VAR_PUSHDEF([A],[ax_compare_version_A])
> + A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
> + -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
> + -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
> + -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
> + -e 's/[[^0-9]]//g'`
> +
> + AS_VAR_PUSHDEF([B],[ax_compare_version_B])
> + B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
> + -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
> + -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
> + -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
> + -e 's/[[^0-9]]//g'`
> +
> + dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
> + dnl # then the first line is used to determine if the condition is true.
> + dnl # The sed right after the echo is to remove any indented white space.
> + m4_case(m4_tolower($2),
> + [lt],[
> + ax_compare_version=`echo "x$A
> +x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
> + ],
> + [gt],[
> + ax_compare_version=`echo "x$A
> +x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
> + ],
> + [le],[
> + ax_compare_version=`echo "x$A
> +x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
> + ],
> + [ge],[
> + ax_compare_version=`echo "x$A
> +x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
> + ],[
> + dnl Split the operator from the subversion count if present.
> + m4_bmatch(m4_substr($2,2),
> + [0],[
> + # A count of zero means use the length of the shorter version.
> + # Determine the number of characters in A and B.
> + ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
> + ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
> +
> + # Set A to no more than B's length and B to no more than A's length.
> + A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
> + B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
> + ],
> + [[0-9]+],[
> + # A count greater than zero means use only that many subversions
> + A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
> + B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
> + ],
> + [.+],[
> + AC_WARNING(
> + [illegal OP numeric parameter: $2])
> + ],[])
> +
> + # Pad zeros at end of numbers to make same length.
> + ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
> + B="$B`echo $A | sed 's/./0/g'`"
> + A="$ax_compare_version_tmp_A"
> +
> + # Check for equality or inequality as necessary.
> + m4_case(m4_tolower(m4_substr($2,0,2)),
> + [eq],[
> + test "x$A" = "x$B" && ax_compare_version=true
> + ],
> + [ne],[
> + test "x$A" != "x$B" && ax_compare_version=true
> + ],[
> + AC_WARNING([illegal OP parameter: $2])
> + ])
> + ])
> +
> + AS_VAR_POPDEF([A])dnl
> + AS_VAR_POPDEF([B])dnl
> +
> + dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
> + if test "$ax_compare_version" = "true" ; then
> + m4_ifvaln([$4],[$4],[:])dnl
> + m4_ifvaln([$5],[else $5])dnl
> + fi
> +]) dnl AX_COMPARE_VERSION
> diff --git a/tools/configure.ac b/tools/configure.ac
> index 0754f0e..3496c12 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -46,6 +46,7 @@ m4_include([../m4/pthread.m4])
> m4_include([../m4/ptyfuncs.m4])
> m4_include([../m4/extfs.m4])
> m4_include([../m4/fetcher.m4])
> +m4_include([../m4/ax_compare_version.m4])
>
> # Enable/disable options
> AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
> @@ -161,6 +162,12 @@ AS_IF([test "x$ocamltools" = "xy"], [
> AS_IF([test "x$enable_ocamltools" = "xyes"], [
> AC_MSG_ERROR([Ocaml tools enabled, but unable to find Ocaml])])
> ocamltools="n"
> + ], [
> + AX_COMPARE_VERSION([$OCAMLVERSION], [lt], [3.09.3], [
> + AS_IF([test "x$enable_ocamltools" = "xyes"], [
> + AC_MSG_ERROR([Your version of OCaml: $OCAMLVERSION is not supported])])
> + ocamltools="n"
> + ])
> ])
> ])
> AS_IF([test "x$xsmpolicy" = "xy"], [
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-02-11 16:22 ` Don Slutz
@ 2014-03-12 14:50 ` Ian Campbell
2014-04-25 12:14 ` Ian Campbell
0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2014-03-12 14:50 UTC (permalink / raw)
To: Don Slutz; +Cc: xen-devel, Ian Jackson, Roger Pau Monne
On Tue, 2014-02-11 at 11:22 -0500, Don Slutz wrote:
> On 02/11/14 05:38, Roger Pau Monne wrote:
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > Cc: Don Slutz <dslutz@verizon.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@citrix.com>
> > ---
> > I've removed Don's "Tested-by" because the patch has changed, could
> > you please re-test it Don?
> >
> > Please run autogen.sh after applying.
>
> I have retested after applying, and autogen.sh ran cleanly for me on Fedora 17 system. Fails (as expected on CentOS 5.10).
>
> So you can add
>
> Tested-by: Don Slutz <dslutz@verizon.com>
Thanks. Acked + applied.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-03-12 14:50 ` Ian Campbell
@ 2014-04-25 12:14 ` Ian Campbell
2014-04-30 15:04 ` Ian Jackson
0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2014-04-25 12:14 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel, Don Slutz, Roger Pau Monne
On Wed, 2014-03-12 at 14:50 +0000, Ian Campbell wrote:
> On Tue, 2014-02-11 at 11:22 -0500, Don Slutz wrote:
> > On 02/11/14 05:38, Roger Pau Monne wrote:
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > Cc: Don Slutz <dslutz@verizon.com>
> > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > Cc: Ian Jackson <ian.jackson@citrix.com>
> > > ---
> > > I've removed Don's "Tested-by" because the patch has changed, could
> > > you please re-test it Don?
> > >
> > > Please run autogen.sh after applying.
> >
> > I have retested after applying, and autogen.sh ran cleanly for me on Fedora 17 system. Fails (as expected on CentOS 5.10).
> >
> > So you can add
> >
> > Tested-by: Don Slutz <dslutz@verizon.com>
>
> Thanks. Acked + applied.
Ian,
I have this on my list of things for backport, but it's comes under your
umbrella. What do you think?
commit a37c389930936c3a9b1215c385fdd22854836871
Author: Roger Pau Monne <roger.pau@citrix.com>
Date: Tue Feb 11 11:38:24 2014 +0100
tools: require OCaml version 3.09.3 or greater
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Don Slutz <dslutz@verizon.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-04-25 12:14 ` Ian Campbell
@ 2014-04-30 15:04 ` Ian Jackson
2014-04-30 15:10 ` Ian Campbell
0 siblings, 1 reply; 12+ messages in thread
From: Ian Jackson @ 2014-04-30 15:04 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Don Slutz, Roger Pau Monne
Ian Campbell writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
> I have this on my list of things for backport, but it's comes under your
> umbrella. What do you think?
I looked through the past email thread and I can't see /why/ this
patch was applied. The commit message doesn't explain either!
Rather than me digging through list archives, perhaps someone could
enlighten me ? If I ever knew I have forgotten ...
Thanks,
Ian.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-04-30 15:04 ` Ian Jackson
@ 2014-04-30 15:10 ` Ian Campbell
2014-04-30 23:01 ` Don Slutz
0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2014-04-30 15:10 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel, Don Slutz, Roger Pau Monne
On Wed, 2014-04-30 at 16:04 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
> > I have this on my list of things for backport, but it's comes under your
> > umbrella. What do you think?
>
> I looked through the past email thread and I can't see /why/ this
> patch was applied. The commit message doesn't explain either!
>
> Rather than me digging through list archives, perhaps someone could
> enlighten me ? If I ever knew I have forgotten ...
>From memory something or other didn't compile with the ocaml in RHEL5,
which was older.
Ian.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-04-30 15:10 ` Ian Campbell
@ 2014-04-30 23:01 ` Don Slutz
2014-05-02 16:28 ` Ian Jackson
0 siblings, 1 reply; 12+ messages in thread
From: Don Slutz @ 2014-04-30 23:01 UTC (permalink / raw)
To: Ian Campbell, Ian Jackson; +Cc: xen-devel, Don Slutz, Roger Pau Monne
On 04/30/14 11:10, Ian Campbell wrote:
> On Wed, 2014-04-30 at 16:04 +0100, Ian Jackson wrote:
>> Ian Campbell writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
>>> I have this on my list of things for backport, but it's comes under your
>>> umbrella. What do you think?
>> I looked through the past email thread and I can't see /why/ this
>> patch was applied. The commit message doesn't explain either!
>>
>> Rather than me digging through list archives, perhaps someone could
>> enlighten me ? If I ever knew I have forgotten ...
> From memory something or other didn't compile with the ocaml in RHEL5,
> which was older.
I was the person that found an ocaml change that did not compile in RHEL5 (OCaml version 3.09.3)
This was done to help catch build errors. The fix for RHEL5 was:
[BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
...
+/*
+ * Starting with ocaml-3.09.3, CAMLreturn can only be used for ``value''
+ * types. CAMLreturnT was only added in 3.09.4, so we define our own
+ * version here if needed.
+ */
Hope this helps.
-Don Slutz
> Ian.
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-04-30 23:01 ` Don Slutz
@ 2014-05-02 16:28 ` Ian Jackson
2014-05-22 15:39 ` Ian Jackson
0 siblings, 1 reply; 12+ messages in thread
From: Ian Jackson @ 2014-05-02 16:28 UTC (permalink / raw)
To: Don Slutz; +Cc: xen-devel, Ian Campbell, Roger Pau Monne
Don Slutz writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
> On 04/30/14 11:10, Ian Campbell wrote:
> > On Wed, 2014-04-30 at 16:04 +0100, Ian Jackson wrote:
> >> Ian Campbell writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
> >>> I have this on my list of things for backport, but it's comes under your
> >>> umbrella. What do you think?
> >> I looked through the past email thread and I can't see /why/ this
> >> patch was applied. The commit message doesn't explain either!
> >>
> >> Rather than me digging through list archives, perhaps someone could
> >> enlighten me ? If I ever knew I have forgotten ...
> > From memory something or other didn't compile with the ocaml in RHEL5,
> > which was older.
>
> I was the person that found an ocaml change that did not compile in RHEL5 (OCaml version 3.09.3)
>
> This was done to help catch build errors. The fix for RHEL5 was:
>
> [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
>
> ...
>
> +/*
> + * Starting with ocaml-3.09.3, CAMLreturn can only be used for ``value''
> + * types. CAMLreturnT was only added in 3.09.4, so we define our own
> + * version here if needed.
> + */
>
> Hope this helps.
Thanks. I have added this to my backport list.
Ian.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2] tools: require OCaml version 3.09.3 or greater
2014-05-02 16:28 ` Ian Jackson
@ 2014-05-22 15:39 ` Ian Jackson
0 siblings, 0 replies; 12+ messages in thread
From: Ian Jackson @ 2014-05-22 15:39 UTC (permalink / raw)
To: Don Slutz, Ian Campbell, xen-devel, Roger Pau Monne
Ian Jackson writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
> Don Slutz writes ("Re: [Xen-devel] [PATCH v2] tools: require OCaml version 3.09.3 or greater"):
> > This was done to help catch build errors. The fix for RHEL5 was:
> >
> > [BUGFIX][PATCH 1/1] xenlight_stubs.c: Allow it to build with ocaml 3.09.3
> >
> > ...
> >
> > +/*
> > + * Starting with ocaml-3.09.3, CAMLreturn can only be used for ``value''
> > + * types. CAMLreturnT was only added in 3.09.4, so we define our own
> > + * version here if needed.
> > + */
> >
> > Hope this helps.
>
> Thanks. I have added this to my backport list.
I have backported this to Xen 4.4 and will push it shortly. 4.3 and
earlier don't seem to have the patch mentioned above so I assume it's
either not applicable, or would need adapting (eg to require 3.09.4).
Ian.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-05-22 15:39 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 10:38 [PATCH v2] tools: require OCaml version 3.09.3 or greater Roger Pau Monne
2014-02-11 12:49 ` Ian Campbell
2014-02-11 13:02 ` Roger Pau Monné
2014-02-11 16:23 ` Don Slutz
2014-02-11 16:22 ` Don Slutz
2014-03-12 14:50 ` Ian Campbell
2014-04-25 12:14 ` Ian Campbell
2014-04-30 15:04 ` Ian Jackson
2014-04-30 15:10 ` Ian Campbell
2014-04-30 23:01 ` Don Slutz
2014-05-02 16:28 ` Ian Jackson
2014-05-22 15:39 ` Ian Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).