qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified
@ 2011-07-23 23:16 Michael Roth
  2011-07-23 23:35 ` [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option Michael Roth
  2011-07-24 17:28 ` [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Blue Swirl
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Roth @ 2011-07-23 23:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, mdroth

QAPI requires python to generate code. Check for python during
configuration and allow python to be specified manually.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 Makefile  |   12 ++++++------
 configure |   13 +++++++++++++
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index f3a03ad..daa3aa0 100644
--- a/Makefile
+++ b/Makefile
@@ -168,22 +168,22 @@ test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-di
 
 $(qapi-dir)/test-qapi-types.c: $(qapi-dir)/test-qapi-types.h
 $(qapi-dir)/test-qapi-types.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
-	$(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
 $(qapi-dir)/test-qapi-visit.c: $(qapi-dir)/test-qapi-visit.h
 $(qapi-dir)/test-qapi-visit.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
-	$(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
 $(qapi-dir)/test-qmp-commands.h: $(qapi-dir)/test-qmp-marshal.c
 $(qapi-dir)/test-qmp-marshal.c: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
-	    $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+	    $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
 
 $(qapi-dir)/qga-qapi-types.c: $(qapi-dir)/qga-qapi-types.h
 $(qapi-dir)/qga-qapi-types.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
-	$(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
 $(qapi-dir)/qga-qapi-visit.c: $(qapi-dir)/qga-qapi-visit.h
 $(qapi-dir)/qga-qapi-visit.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py
-	$(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
 $(qapi-dir)/qga-qmp-marshal.c: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py
-	$(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
 
 test-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
 test-visitor: test-visitor.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
diff --git a/configure b/configure
index 6911c3b..c0cb979 100755
--- a/configure
+++ b/configure
@@ -225,6 +225,7 @@ strip="${cross_prefix}${STRIP-strip}"
 windres="${cross_prefix}${WINDRES-windres}"
 pkg_config="${cross_prefix}${PKG_CONFIG-pkg-config}"
 sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}"
+python_path="${cross_prefix}${PYTHON_PATH-python}"
 
 # default flags for all hosts
 QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
@@ -748,6 +749,8 @@ for opt do
   ;;
   --enable-usb-redir) usb_redir="yes"
   ;;
+  --python-path=*) python_path="$optarg"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1025,6 +1028,7 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
 echo "  --enable-smartcard-nss   enable smartcard nss support"
 echo "  --disable-usb-redir      disable usb network redirection support"
 echo "  --enable-usb-redir       enable usb network redirection support"
+echo "  --python-path=PATH       path to python executable"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -1810,6 +1814,13 @@ EOF
 fi
 
 ##########################################
+# python probe
+if ! $python_path -V >/dev/null 2>&1; then
+    echo "python executable not found: $python_path. You can specify with --python-path"
+    exit 1
+fi
+
+##########################################
 # glib support probe
 if $pkg_config --modversion gthread-2.0 gio-2.0 > /dev/null 2>&1 ; then
     glib_cflags=`$pkg_config --cflags gthread-2.0 gio-2.0 2>/dev/null`
@@ -2655,6 +2666,7 @@ echo "xfsctl support    $xfs"
 echo "nss used          $smartcard_nss"
 echo "usb net redir     $usb_redir"
 echo "OpenGL support    $opengl"
+echo "python path       $python_path"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -3026,6 +3038,7 @@ echo "ARLIBS_END=$arlibs_end" >> $config_host_mak
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
+echo "PYTHON=$python_path" >> $config_host_mak
 
 # generate list of library paths for linker script
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option
  2011-07-23 23:16 [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Michael Roth
@ 2011-07-23 23:35 ` Michael Roth
  2011-07-24 17:28 ` [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Blue Swirl
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Roth @ 2011-07-23 23:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, mdroth, agraf

QAPI will require glib/python, but for now the guest agent is the only
user. For now, make these dependencies an explicit guest agent one, and
gives users the option to disable it if need be.

Once QAPI is adopted in core QEMU code, we would basically revert this
patch.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |   36 +++++++++++++++++++++++++-----------
 1 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index c0cb979..fa32274 100755
--- a/configure
+++ b/configure
@@ -179,6 +179,7 @@ smartcard=""
 smartcard_nss=""
 usb_redir=""
 opengl=""
+guest_agent="yes"
 
 # parse CC options first
 for opt do
@@ -749,6 +750,10 @@ for opt do
   ;;
   --enable-usb-redir) usb_redir="yes"
   ;;
+  --enable-guest-agent) guest_agent="yes"
+  ;;
+  --disable-guest-agent) guest_agent="no"
+  ;;
   --python-path=*) python_path="$optarg"
   ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
@@ -1028,6 +1033,8 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
 echo "  --enable-smartcard-nss   enable smartcard nss support"
 echo "  --disable-usb-redir      disable usb network redirection support"
 echo "  --enable-usb-redir       enable usb network redirection support"
+echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
+echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
 echo "  --python-path=PATH       path to python executable"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
@@ -1815,21 +1822,25 @@ fi
 
 ##########################################
 # python probe
-if ! $python_path -V >/dev/null 2>&1; then
-    echo "python executable not found: $python_path. You can specify with --python-path"
-    exit 1
+if test "$guest_agent" != "no" ; then
+    if ! $python_path -V >/dev/null 2>&1; then
+        echo "python executable not found: $python_path. You can specify with --python-path"
+        exit 1
+    fi
 fi
 
 ##########################################
 # glib support probe
-if $pkg_config --modversion gthread-2.0 gio-2.0 > /dev/null 2>&1 ; then
-    glib_cflags=`$pkg_config --cflags gthread-2.0 gio-2.0 2>/dev/null`
-    glib_libs=`$pkg_config --libs gthread-2.0 gio-2.0 2>/dev/null`
-    libs_softmmu="$glib_libs $libs_softmmu"
-    libs_tools="$glib_libs $libs_tools"
-else
-    echo "glib-2.0 required to compile QEMU"
-    exit 1
+if test "$guest_agent" != "no" ; then
+    if $pkg_config --modversion gthread-2.0 gio-2.0 > /dev/null 2>&1 ; then
+        glib_cflags=`$pkg_config --cflags gthread-2.0 gio-2.0 2>/dev/null`
+        glib_libs=`$pkg_config --libs gthread-2.0 gio-2.0 2>/dev/null`
+        libs_softmmu="$glib_libs $libs_softmmu"
+        libs_tools="$glib_libs $libs_tools"
+    else
+        echo "glib-2.0 required to compile QEMU"
+        exit 1
+    fi
 fi
 
 ##########################################
@@ -2566,7 +2577,9 @@ if test "$softmmu" = yes ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
       tools="qemu-nbd\$(EXESUF) $tools"
+    if [ "$guest_agent" = "yes" ]; then
       tools="qemu-ga\$(EXESUF) $tools"
+    fi
     if [ "$check_utests" = "yes" ]; then
       tools="check-qint check-qstring check-qdict check-qlist $tools"
       tools="check-qfloat check-qjson $tools"
@@ -2666,6 +2679,7 @@ echo "xfsctl support    $xfs"
 echo "nss used          $smartcard_nss"
 echo "usb net redir     $usb_redir"
 echo "OpenGL support    $opengl"
+echo "build guest agent $guest_agent"
 echo "python path       $python_path"
 
 if test $sdl_too_old = "yes"; then
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified
  2011-07-23 23:16 [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Michael Roth
  2011-07-23 23:35 ` [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option Michael Roth
@ 2011-07-24 17:28 ` Blue Swirl
  2011-07-24 18:39   ` Michael Roth
  1 sibling, 1 reply; 7+ messages in thread
From: Blue Swirl @ 2011-07-24 17:28 UTC (permalink / raw)
  To: Michael Roth; +Cc: aliguori, qemu-devel

On Sun, Jul 24, 2011 at 2:16 AM, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> QAPI requires python to generate code. Check for python during
> configuration and allow python to be specified manually.
>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
>  Makefile  |   12 ++++++------
>  configure |   13 +++++++++++++
>  2 files changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index f3a03ad..daa3aa0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -168,22 +168,22 @@ test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-di
>
>  $(qapi-dir)/test-qapi-types.c: $(qapi-dir)/test-qapi-types.h
>  $(qapi-dir)/test-qapi-types.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
>  $(qapi-dir)/test-qapi-visit.c: $(qapi-dir)/test-qapi-visit.h
>  $(qapi-dir)/test-qapi-visit.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
>  $(qapi-dir)/test-qmp-commands.h: $(qapi-dir)/test-qmp-marshal.c
>  $(qapi-dir)/test-qmp-marshal.c: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
> -           $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
> +           $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
>
>  $(qapi-dir)/qga-qapi-types.c: $(qapi-dir)/qga-qapi-types.h
>  $(qapi-dir)/qga-qapi-types.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
>  $(qapi-dir)/qga-qapi-visit.c: $(qapi-dir)/qga-qapi-visit.h
>  $(qapi-dir)/qga-qapi-visit.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py
> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
>  $(qapi-dir)/qga-qmp-marshal.c: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py
> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-" < $<, "  GEN   $@")
>
>  test-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
>  test-visitor: test-visitor.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
> diff --git a/configure b/configure
> index 6911c3b..c0cb979 100755
> --- a/configure
> +++ b/configure
> @@ -225,6 +225,7 @@ strip="${cross_prefix}${STRIP-strip}"
>  windres="${cross_prefix}${WINDRES-windres}"
>  pkg_config="${cross_prefix}${PKG_CONFIG-pkg-config}"
>  sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}"
> +python_path="${cross_prefix}${PYTHON_PATH-python}"

In my version, the environment variable is named PYTHON, which I think
is more logical and also consistent with MAKE, STRIP etc.

>
>  # default flags for all hosts
>  QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
> @@ -748,6 +749,8 @@ for opt do
>   ;;
>   --enable-usb-redir) usb_redir="yes"
>   ;;
> +  --python-path=*) python_path="$optarg"

Also here the other tools are specified with --make and --install.

> +  ;;
>   *) echo "ERROR: unknown option $opt"; show_help="yes"
>   ;;
>   esac
> @@ -1025,6 +1028,7 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
>  echo "  --enable-smartcard-nss   enable smartcard nss support"
>  echo "  --disable-usb-redir      disable usb network redirection support"
>  echo "  --enable-usb-redir       enable usb network redirection support"
> +echo "  --python-path=PATH       path to python executable"
>  echo ""
>  echo "NOTE: The object files are built at the place where configure is launched"
>  exit 1
> @@ -1810,6 +1814,13 @@ EOF
>  fi
>
>  ##########################################
> +# python probe
> +if ! $python_path -V >/dev/null 2>&1; then

I used 'has'.

> +    echo "python executable not found: $python_path. You can specify with --python-path"
> +    exit 1
> +fi
> +
> +##########################################
>  # glib support probe
>  if $pkg_config --modversion gthread-2.0 gio-2.0 > /dev/null 2>&1 ; then
>     glib_cflags=`$pkg_config --cflags gthread-2.0 gio-2.0 2>/dev/null`
> @@ -2655,6 +2666,7 @@ echo "xfsctl support    $xfs"
>  echo "nss used          $smartcard_nss"
>  echo "usb net redir     $usb_redir"
>  echo "OpenGL support    $opengl"
> +echo "python path       $python_path"

Other tools are printed out without the word 'path'.

>
>  if test $sdl_too_old = "yes"; then
>  echo "-> Your SDL version is too old - please upgrade to have SDL support"
> @@ -3026,6 +3038,7 @@ echo "ARLIBS_END=$arlibs_end" >> $config_host_mak
>  echo "LIBS+=$LIBS" >> $config_host_mak
>  echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
>  echo "EXESUF=$EXESUF" >> $config_host_mak
> +echo "PYTHON=$python_path" >> $config_host_mak
>
>  # generate list of library paths for linker script
>
> --
> 1.7.0.4
>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified
  2011-07-24 17:28 ` [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Blue Swirl
@ 2011-07-24 18:39   ` Michael Roth
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Roth @ 2011-07-24 18:39 UTC (permalink / raw)
  To: Blue Swirl; +Cc: aliguori, qemu-devel

On 07/24/2011 12:28 PM, Blue Swirl wrote:
> On Sun, Jul 24, 2011 at 2:16 AM, Michael Roth<mdroth@linux.vnet.ibm.com>  wrote:
>> QAPI requires python to generate code. Check for python during
>> configuration and allow python to be specified manually.
>>
>> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>
>> ---
>>   Makefile  |   12 ++++++------
>>   configure |   13 +++++++++++++
>>   2 files changed, 19 insertions(+), 6 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index f3a03ad..daa3aa0 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -168,22 +168,22 @@ test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-di
>>
>>   $(qapi-dir)/test-qapi-types.c: $(qapi-dir)/test-qapi-types.h
>>   $(qapi-dir)/test-qapi-types.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
>> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-"<  $<, "  GEN   $@")
>> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-"<  $<, "  GEN   $@")
>>   $(qapi-dir)/test-qapi-visit.c: $(qapi-dir)/test-qapi-visit.h
>>   $(qapi-dir)/test-qapi-visit.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
>> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-"<  $<, "  GEN   $@")
>> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-"<  $<, "  GEN   $@")
>>   $(qapi-dir)/test-qmp-commands.h: $(qapi-dir)/test-qmp-marshal.c
>>   $(qapi-dir)/test-qmp-marshal.c: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
>> -           $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-"<  $<, "  GEN   $@")
>> +           $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-"<  $<, "  GEN   $@")
>>
>>   $(qapi-dir)/qga-qapi-types.c: $(qapi-dir)/qga-qapi-types.h
>>   $(qapi-dir)/qga-qapi-types.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
>> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-"<  $<, "  GEN   $@")
>> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-"<  $<, "  GEN   $@")
>>   $(qapi-dir)/qga-qapi-visit.c: $(qapi-dir)/qga-qapi-visit.h
>>   $(qapi-dir)/qga-qapi-visit.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py
>> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-"<  $<, "  GEN   $@")
>> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-"<  $<, "  GEN   $@")
>>   $(qapi-dir)/qga-qmp-marshal.c: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py
>> -       $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-"<  $<, "  GEN   $@")
>> +       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-"<  $<, "  GEN   $@")
>>
>>   test-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
>>   test-visitor: test-visitor.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
>> diff --git a/configure b/configure
>> index 6911c3b..c0cb979 100755
>> --- a/configure
>> +++ b/configure
>> @@ -225,6 +225,7 @@ strip="${cross_prefix}${STRIP-strip}"
>>   windres="${cross_prefix}${WINDRES-windres}"
>>   pkg_config="${cross_prefix}${PKG_CONFIG-pkg-config}"
>>   sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}"
>> +python_path="${cross_prefix}${PYTHON_PATH-python}"
>
> In my version, the environment variable is named PYTHON, which I think
> is more logical and also consistent with MAKE, STRIP etc.
>
>>
>>   # default flags for all hosts
>>   QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
>> @@ -748,6 +749,8 @@ for opt do
>>    ;;
>>    --enable-usb-redir) usb_redir="yes"
>>    ;;
>> +  --python-path=*) python_path="$optarg"
>
> Also here the other tools are specified with --make and --install.
>

Thanks, I agree. Not sure what swung me in the other direction.. The v2 
I just sent should have all these addressed accordingly.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option
@ 2011-08-01 19:52 Michael Roth
  2011-08-01 21:40 ` Anthony Liguori
  2011-08-04 22:08 ` Anthony Liguori
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Roth @ 2011-08-01 19:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, mdroth

QAPI will require glib/python, but for now the guest agent is the only
user. For now, make these dependencies an explicit guest agent one, and
give users the option to disable it if need be.

Once QAPI is adopted in core QEMU code, we would basically revert this
patch.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |   40 +++++++++++++++++++++++++++-------------
 1 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/configure b/configure
index 77194cf..58a37d9 100755
--- a/configure
+++ b/configure
@@ -181,6 +181,7 @@ smartcard_nss=""
 usb_redir=""
 opengl=""
 zlib="yes"
+guest_agent="yes"
 
 # parse CC options first
 for opt do
@@ -757,6 +758,10 @@ for opt do
   ;;
   --disable-zlib-test) zlib="no"
   ;;
+  --enable-guest-agent) guest_agent="yes"
+  ;;
+  --disable-guest-agent) guest_agent="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1035,6 +1040,8 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
 echo "  --enable-smartcard-nss   enable smartcard nss support"
 echo "  --disable-usb-redir      disable usb network redirection support"
 echo "  --enable-usb-redir       enable usb network redirection support"
+echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
+echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -1094,11 +1101,13 @@ if test "$solaris" = "yes" ; then
   fi
 fi
 
-if has $python; then
-  :
-else
-  echo "Python not found. Use --python=/path/to/python"
-  exit 1
+if test "$guest_agent" != "no" ; then
+  if has $python; then
+    :
+  else
+    echo "Python not found. Use --python=/path/to/python"
+    exit 1
+  fi
 fi
 
 if test -z "$target_list" ; then
@@ -1830,14 +1839,16 @@ fi
 
 ##########################################
 # glib support probe
-if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
-    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
-    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
-    libs_softmmu="$glib_libs $libs_softmmu"
-    libs_tools="$glib_libs $libs_tools"
-else
-    echo "glib-2.0 required to compile QEMU"
-    exit 1
+if test "$guest_agent" != "no" ; then
+    if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
+        glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
+        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
+        libs_softmmu="$glib_libs $libs_softmmu"
+        libs_tools="$glib_libs $libs_tools"
+    else
+        echo "glib-2.0 required to compile QEMU"
+        exit 1
+    fi
 fi
 
 ##########################################
@@ -2597,7 +2608,9 @@ if test "$softmmu" = yes ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
       tools="qemu-nbd\$(EXESUF) $tools"
+    if [ "$guest_agent" = "yes" ]; then
       tools="qemu-ga\$(EXESUF) $tools"
+    fi
     if [ "$check_utests" = "yes" ]; then
       tools="check-qint check-qstring check-qdict check-qlist $tools"
       tools="check-qfloat check-qjson $tools"
@@ -2699,6 +2712,7 @@ echo "xfsctl support    $xfs"
 echo "nss used          $smartcard_nss"
 echo "usb net redir     $usb_redir"
 echo "OpenGL support    $opengl"
+echo "build guest agent $guest_agent"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option
  2011-08-01 19:52 [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option Michael Roth
@ 2011-08-01 21:40 ` Anthony Liguori
  2011-08-04 22:08 ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2011-08-01 21:40 UTC (permalink / raw)
  To: Michael Roth; +Cc: Yoder Stuart-B08248, qemu-devel

On 08/01/2011 02:52 PM, Michael Roth wrote:
> QAPI will require glib/python, but for now the guest agent is the only
> user. For now, make these dependencies an explicit guest agent one, and
> give users the option to disable it if need be.
>
> Once QAPI is adopted in core QEMU code, we would basically revert this
> patch.
>
> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>

Hi Stuart,

Can you confirm this patch fixes your problem?

Thanks for sending this Mike.

Regards,

Anthony Liguori

> ---
>   configure |   40 +++++++++++++++++++++++++++-------------
>   1 files changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index 77194cf..58a37d9 100755
> --- a/configure
> +++ b/configure
> @@ -181,6 +181,7 @@ smartcard_nss=""
>   usb_redir=""
>   opengl=""
>   zlib="yes"
> +guest_agent="yes"
>
>   # parse CC options first
>   for opt do
> @@ -757,6 +758,10 @@ for opt do
>     ;;
>     --disable-zlib-test) zlib="no"
>     ;;
> +  --enable-guest-agent) guest_agent="yes"
> +  ;;
> +  --disable-guest-agent) guest_agent="no"
> +  ;;
>     *) echo "ERROR: unknown option $opt"; show_help="yes"
>     ;;
>     esac
> @@ -1035,6 +1040,8 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
>   echo "  --enable-smartcard-nss   enable smartcard nss support"
>   echo "  --disable-usb-redir      disable usb network redirection support"
>   echo "  --enable-usb-redir       enable usb network redirection support"
> +echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
> +echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
>   echo ""
>   echo "NOTE: The object files are built at the place where configure is launched"
>   exit 1
> @@ -1094,11 +1101,13 @@ if test "$solaris" = "yes" ; then
>     fi
>   fi
>
> -if has $python; then
> -  :
> -else
> -  echo "Python not found. Use --python=/path/to/python"
> -  exit 1
> +if test "$guest_agent" != "no" ; then
> +  if has $python; then
> +    :
> +  else
> +    echo "Python not found. Use --python=/path/to/python"
> +    exit 1
> +  fi
>   fi
>
>   if test -z "$target_list" ; then
> @@ -1830,14 +1839,16 @@ fi
>
>   ##########################################
>   # glib support probe
> -if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> -    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> -    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> -    libs_softmmu="$glib_libs $libs_softmmu"
> -    libs_tools="$glib_libs $libs_tools"
> -else
> -    echo "glib-2.0 required to compile QEMU"
> -    exit 1
> +if test "$guest_agent" != "no" ; then
> +    if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> +        glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> +        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> +        libs_softmmu="$glib_libs $libs_softmmu"
> +        libs_tools="$glib_libs $libs_tools"
> +    else
> +        echo "glib-2.0 required to compile QEMU"
> +        exit 1
> +    fi
>   fi
>
>   ##########################################
> @@ -2597,7 +2608,9 @@ if test "$softmmu" = yes ; then
>     tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
>     if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
>         tools="qemu-nbd\$(EXESUF) $tools"
> +    if [ "$guest_agent" = "yes" ]; then
>         tools="qemu-ga\$(EXESUF) $tools"
> +    fi
>       if [ "$check_utests" = "yes" ]; then
>         tools="check-qint check-qstring check-qdict check-qlist $tools"
>         tools="check-qfloat check-qjson $tools"
> @@ -2699,6 +2712,7 @@ echo "xfsctl support    $xfs"
>   echo "nss used          $smartcard_nss"
>   echo "usb net redir     $usb_redir"
>   echo "OpenGL support    $opengl"
> +echo "build guest agent $guest_agent"
>
>   if test $sdl_too_old = "yes"; then
>   echo "->  Your SDL version is too old - please upgrade to have SDL support"

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option
  2011-08-01 19:52 [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option Michael Roth
  2011-08-01 21:40 ` Anthony Liguori
@ 2011-08-04 22:08 ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2011-08-04 22:08 UTC (permalink / raw)
  To: Michael Roth; +Cc: qemu-devel

On 08/01/2011 02:52 PM, Michael Roth wrote:
> QAPI will require glib/python, but for now the guest agent is the only
> user. For now, make these dependencies an explicit guest agent one, and
> give users the option to disable it if need be.
>
> Once QAPI is adopted in core QEMU code, we would basically revert this
> patch.
>
> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   configure |   40 +++++++++++++++++++++++++++-------------
>   1 files changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index 77194cf..58a37d9 100755
> --- a/configure
> +++ b/configure
> @@ -181,6 +181,7 @@ smartcard_nss=""
>   usb_redir=""
>   opengl=""
>   zlib="yes"
> +guest_agent="yes"
>
>   # parse CC options first
>   for opt do
> @@ -757,6 +758,10 @@ for opt do
>     ;;
>     --disable-zlib-test) zlib="no"
>     ;;
> +  --enable-guest-agent) guest_agent="yes"
> +  ;;
> +  --disable-guest-agent) guest_agent="no"
> +  ;;
>     *) echo "ERROR: unknown option $opt"; show_help="yes"
>     ;;
>     esac
> @@ -1035,6 +1040,8 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
>   echo "  --enable-smartcard-nss   enable smartcard nss support"
>   echo "  --disable-usb-redir      disable usb network redirection support"
>   echo "  --enable-usb-redir       enable usb network redirection support"
> +echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
> +echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
>   echo ""
>   echo "NOTE: The object files are built at the place where configure is launched"
>   exit 1
> @@ -1094,11 +1101,13 @@ if test "$solaris" = "yes" ; then
>     fi
>   fi
>
> -if has $python; then
> -  :
> -else
> -  echo "Python not found. Use --python=/path/to/python"
> -  exit 1
> +if test "$guest_agent" != "no" ; then
> +  if has $python; then
> +    :
> +  else
> +    echo "Python not found. Use --python=/path/to/python"
> +    exit 1
> +  fi
>   fi
>
>   if test -z "$target_list" ; then
> @@ -1830,14 +1839,16 @@ fi
>
>   ##########################################
>   # glib support probe
> -if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> -    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> -    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> -    libs_softmmu="$glib_libs $libs_softmmu"
> -    libs_tools="$glib_libs $libs_tools"
> -else
> -    echo "glib-2.0 required to compile QEMU"
> -    exit 1
> +if test "$guest_agent" != "no" ; then
> +    if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> +        glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> +        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> +        libs_softmmu="$glib_libs $libs_softmmu"
> +        libs_tools="$glib_libs $libs_tools"
> +    else
> +        echo "glib-2.0 required to compile QEMU"
> +        exit 1
> +    fi
>   fi
>
>   ##########################################
> @@ -2597,7 +2608,9 @@ if test "$softmmu" = yes ; then
>     tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
>     if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
>         tools="qemu-nbd\$(EXESUF) $tools"
> +    if [ "$guest_agent" = "yes" ]; then
>         tools="qemu-ga\$(EXESUF) $tools"
> +    fi
>       if [ "$check_utests" = "yes" ]; then
>         tools="check-qint check-qstring check-qdict check-qlist $tools"
>         tools="check-qfloat check-qjson $tools"
> @@ -2699,6 +2712,7 @@ echo "xfsctl support    $xfs"
>   echo "nss used          $smartcard_nss"
>   echo "usb net redir     $usb_redir"
>   echo "OpenGL support    $opengl"
> +echo "build guest agent $guest_agent"
>
>   if test $sdl_too_old = "yes"; then
>   echo "->  Your SDL version is too old - please upgrade to have SDL support"

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-04 22:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-23 23:16 [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Michael Roth
2011-07-23 23:35 ` [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option Michael Roth
2011-07-24 17:28 ` [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified Blue Swirl
2011-07-24 18:39   ` Michael Roth
  -- strict thread matches above, loose matches on Subject: below --
2011-08-01 19:52 [Qemu-devel] [PATCH] guest agent: add --enable-guest-agent config option Michael Roth
2011-08-01 21:40 ` Anthony Liguori
2011-08-04 22:08 ` Anthony Liguori

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).