introduce --with-system-qemu-traditional
v2 cover introduce --with-system-qemu-traditional
Hi all,
This patch series introduces a new configure command line option to provide an externally built qemu-dm binary and stop xen-unstable from trying to clone and build qemu-xen-traditional.
Changes in v2:
- update INSTALL file
- retain disable-qemu-traditional configure option
Stefano Stabellini (2):
Introduce configure option --with-system-qemu-traditional Update configure scripts by calling autogen
INSTALL | 3 +++ tools/config.h.in | 3 +++ tools/configure | 29 +++++++++++++++++++++++++++++ tools/configure.ac | 16 ++++++++++++++++ tools/libxl/libxl_dm.c | 11 ++++++++++- 5 files changed, 61 insertions(+), 1 deletion(-)
Cheers,
Stefano
PATCH v2 1/2 Introduce configure option --with-system-qemu-traditional
Introduce a configure option to disable the in-tree qemu-traditional build and use an externally provided qemu-dm binary. The option is very similar to the existing --with-system-qemu-xen.
--- INSTALL | 3 +++ tools/configure.ac | 16 ++++++++++++++++ tools/libxl/libxl_dm.c | 11 ++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-)
INSTALL +3 -0
@@ -107,6 +107,9 @@ qemu-traditional. --enable-qemu-traditional --enable-rombios +Use the given qemu-traditional binary instead of compiling a private copy. + --with-system-qemu-traditional=PATH + The libxl toolstack uses the upstream qemu per default. A private copy will be built. If desired this private copy can be configured with additional options passed to its configure script.
tools/configure.ac +16 -0
@@ -169,6 +169,22 @@ AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled]) ]) AC_SUBST(rombios) +AC_ARG_WITH([system-qemu-traditional], + AS_HELP_STRING([--with-system-qemu-traditional@<:@=PATH@:>@], + [Use system supplied qemu-traditional PATH or qemu-dm + (taken from $PATH) as qemu-traditional device model instead of + building and installing our own version]),[ + case $withval in + yes) qemu_traditional=n; qemu_traditional_path=qemu-dm ;; + no) qemu_traditional=y; qemu_traditional_path= ;; + *) qemu_traditional=n; qemu_traditional_path=$withval ;; + esac +],[]) +AS_IF([test "x$qemu_traditional" = "xn"], [ + AC_DEFINE_UNQUOTED([QEMU_TRADITIONAL_PATH], ["$qemu_traditional_path"], [Qemu Traditional Xen path]) +]) +AC_SUBST(qemu_traditional_path) + AC_ARG_WITH([system-qemu], AS_HELP_STRING([--with-system-qemu@<:@=PATH@:>@], [Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
tools/libxl/libxl_dm.c +10 -1
@@ -43,6 +43,15 @@ static const char *qemu_xen_path(libxl__gc *gc)#endif } +static const char *qemu_traditional_path (libxl__gc *gc) +{ +#ifdef QEMU_TRADITIONAL_PATH +return QEMU_TRADITIONAL_PATH ; +#else +return libxl__abs_path (gc,"qemu-dm" ,libxl__private_bindir_path ()); +#endif +} +static int libxl__create_qemu_logfile (libxl__gc *gc,char *name) {char *logfile;
@@ -74,7 +83,7 @@ const char *libxl__domain_device_model(libxl__gc *gc, }else {switch (info->device_model_version) {case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : - dm =libxl__abs_path (gc,"qemu-dm" ,libxl__private_bindir_path ()); + dm =qemu_traditional_path (gc);break ;case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : dm =qemu_xen_path (gc);
Signature · 1 line
1.7.10.4
Re: [PATCH v2 1/2] Introduce configure option --with-system-qemu-traditional
Quoted 3 lines · Stefano Stabellini
Introduce a configure option to disable the in-tree qemu-traditional build and use an externally provided qemu-dm binary. The option is very similar to the existing --with-system-qemu-xen.
^^^^^
--with-system-qemuQuoted 31 lines
Signed-off-by Stefano Stabellini <[email protected]>--- INSTALL | 3 +++ tools/configure.ac | 16 ++++++++++++++++ tools/libxl/libxl_dm.c | 11 ++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-)INSTALL +3
-0@@ -107,6 +107,9 @@ qemu-traditional. --enable-qemu-traditional --enable-rombios +Use the given qemu-traditional binary instead of compiling a private copy. + --with-system-qemu-traditional=PATH + The libxl toolstack uses the upstream qemu per default. A private copy will be built. If desired this private copy can be configured with additional options passed to its configure script.tools/configure.ac +1
-0@@ -169,6 +169,22 @@ AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled]) ]) AC_SUBST(rombios) +AC_ARG_WITH([system-qemu-traditional],
tools/configure.ac AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled]) · line 182
Quoted 10 lines
tools/configure.ac +10
-0+ AS_HELP_STRING([--with-system-qemu-traditional@<:@=PATH@:>@], + [Use system supplied qemu-traditional PATH or qemu-dm + (taken from $PATH) as qemu-traditional device model instead of + building and installing our own version]),[ + case $withval in + yes) qemu_traditional=n; qemu_traditional_path=qemu-dm ;; + no) qemu_traditional=y; qemu_traditional_path= ;; + *) qemu_traditional=n; qemu_traditional_path=$withval ;; + esac +],[])
Shouldn't this have something similar to qemu_xen case -- test architecture to determine whether to build it or not.
And how does this option interact with --enable-qemu-traditional?
Wei.
Re: [PATCH v2 1/2] Introduce configure option --with-system-qemu-traditional
In reply to Stefano StabelliniQuoted 3 lines · Stefano Stabellini
Introduce a configure option to disable the in-tree qemu-traditional build and use an externally provided qemu-dm binary. The option is very similar to the existing --with-system-qemu-xen.
This overlaps a bit with the existing --with(out)-qemu-traditional.
Rather than having two similarish options I think it would be better to allow the existing option to accept "yes", "no" or a path which is to be used (and implies yes).
Ian.
PATCH v2 2/2 Update configure scripts by calling autogen
In reply to Stefano StabelliniI run ./autogen.sh and committed the result.
--- tools/config.h.in | 3 +++ tools/configure | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+)
tools/config.h.in +3 -0
@@ -93,6 +93,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Qemu Traditional Xen path */ +#undef QEMU_TRADITIONAL_PATH + /* Qemu Xen path */ #undef QEMU_XEN_PATH
tools/configure +29 -0
@@ -699,6 +699,7 @@ EXTRA_QEMUU_CONFIGURE_ARGS ovmf_path seabios_path qemu_xen +qemu_traditional_path rombios qemu_traditional blktap2
@@ -797,6 +798,7 @@ with_linux_backend_modules enable_blktap2 enable_qemu_traditional enable_rombios +with_system_qemu_traditional with_system_qemu with_system_seabios with_system_ovmf
@@ -1489,6 +1491,10 @@ Optional Packages: --with-linux-backend-modules="mod1 mod2" List of Linux backend module or modalias names to be autoloaded on startup. + --with-system-qemu-traditional[=PATH] + Use system supplied qemu-traditional PATH or qemu-dm + (taken from $PATH) as qemu-traditional device model + instead of building and installing our own version --with-system-qemu[=PATH] Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen device model instead of building
@@ -4127,6 +4133,29 @@ fi +# Check whether --with-system-qemu-traditional was given. +if test "${with_system_qemu_traditional+set}" = set; then : + withval=$with_system_qemu_traditional; + case $withval in + yes) qemu_traditional=n; qemu_traditional_path=qemu-dm ;; + no) qemu_traditional=y; qemu_traditional_path= ;; + *) qemu_traditional=n; qemu_traditional_path=$withval ;; + esac + +fi + +if test "x$qemu_traditional" = "xn"; then : + + +cat >>confdefs.h <<_ACEOF +#define QEMU_TRADITIONAL_PATH "$qemu_traditional_path" +_ACEOF + + +fi + + + # Check whether --with-system-qemu was given. if test "${with_system_qemu+set}" = set; then : withval=$with_system_qemu;
Signature · 1 line
1.7.10.4
Re: [PATCH v2 2/2] Update configure scripts by calling autogen
Quoted 2 lines · Stefano Stabellini
I run ./autogen.sh and committed the result.
This patch needs to be squashed into previous to keep the tree bisectable.
Wei.
Re: [PATCH v2 2/2] Update configure scripts by calling autogen
Quoted 6 lines · Wei Liu
Quoted 2 lines · Stefano Stabellini
I run ./autogen.sh and committed the result.
This patch needs to be squashed into previous to keep the tree bisectable.
I assumed the intention was for the committer to apply the previous patch and run autogen and then skip this patch.
Ian.