mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
v2v: -o rhv-upload: Allow configure to set the nbdkit Python version.
No functional change, but it does allow downstream distributions to adjust the nbdkit Python plugin used by virt-v2v -o rhv-upload mode: ./configure --with-virt-v2v-nbdkit-python-plugin=...
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -678,6 +678,7 @@ Makefile.in
|
||||
/utils/qemu-boot/qemu-boot
|
||||
/utils/qemu-speed-test/qemu-speed-test
|
||||
/v2v/.depend
|
||||
/v2v/config.ml
|
||||
/v2v/oUnit-*
|
||||
/v2v/output_rhv_upload_*_source.ml
|
||||
/v2v/real-*.d/
|
||||
|
||||
@@ -354,6 +354,7 @@ po/POTFILES-ml: configure.ac
|
||||
cd $(srcdir); \
|
||||
find builder common/ml* customize dib get-kernel resize sparsify sysprep v2v -name '*.ml' | \
|
||||
grep -v '^builder/templates/' | \
|
||||
grep -v '^v2v/config.ml$$' | \
|
||||
LC_ALL=C sort > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
@@ -162,6 +162,10 @@ m4_include([m4/guestfs-golang.m4])
|
||||
HEADING([Checking for GObject Introspection])
|
||||
m4_include([m4/guestfs-gobject.m4])
|
||||
|
||||
dnl virt-v2v, virt-p2v.
|
||||
HEADING([Checking the virt-v2v and virt-p2v dependencies])
|
||||
m4_include([m4/guestfs-v2v.m4])
|
||||
|
||||
dnl Bash completion.
|
||||
HEADING([Checking for bash completion])
|
||||
m4_include([m4/guestfs-bash-completion.m4])
|
||||
@@ -365,6 +369,7 @@ AC_CONFIG_FILES([Makefile
|
||||
utils/qemu-boot/Makefile
|
||||
utils/qemu-speed-test/Makefile
|
||||
v2v/Makefile
|
||||
v2v/config.ml
|
||||
v2v/test-harness/Makefile
|
||||
v2v/test-harness/META
|
||||
website/index.html])
|
||||
|
||||
28
m4/guestfs-v2v.m4
Normal file
28
m4/guestfs-v2v.m4
Normal file
@@ -0,0 +1,28 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2019 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
dnl Virt-v2v and virt-p2v.
|
||||
|
||||
dnl nbdkit python plugin.
|
||||
AC_MSG_CHECKING([for the nbdkit python plugin name])
|
||||
AC_ARG_WITH([virt-v2v-nbdkit-python-plugin],
|
||||
[AS_HELP_STRING([--with-virt-v2v-nbdkit-python-plugin="python|..."],
|
||||
[set nbdkit python plugin name used by virt-v2v @<:@default=python@:>@])],
|
||||
[VIRT_V2V_NBDKIT_PYTHON_PLUGIN="$withval"],
|
||||
[VIRT_V2V_NBDKIT_PYTHON_PLUGIN=python])
|
||||
AC_MSG_RESULT([$VIRT_V2V_NBDKIT_PYTHON_PLUGIN])
|
||||
AC_SUBST([VIRT_V2V_NBDKIT_PYTHON_PLUGIN])
|
||||
@@ -23,6 +23,7 @@ generator_built = \
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(generator_built) \
|
||||
config.ml \
|
||||
output_rhv_upload_createvm_source.ml \
|
||||
output_rhv_upload_plugin_source.ml \
|
||||
output_rhv_upload_precheck_source.ml
|
||||
@@ -48,6 +49,7 @@ EXTRA_DIST = \
|
||||
SOURCES_MLI = \
|
||||
changeuid.mli \
|
||||
cmdline.mli \
|
||||
config.mli \
|
||||
convert_linux.mli \
|
||||
convert_windows.mli \
|
||||
create_libvirt_xml.mli \
|
||||
@@ -100,6 +102,7 @@ SOURCES_MLI = \
|
||||
windows_virtio.mli
|
||||
|
||||
SOURCES_ML = \
|
||||
config.ml \
|
||||
types.ml \
|
||||
uefi.ml \
|
||||
utils.ml \
|
||||
@@ -697,6 +700,7 @@ v2v_unit_tests_LINK = \
|
||||
.depend: \
|
||||
$(srcdir)/*.mli \
|
||||
$(srcdir)/*.ml \
|
||||
config.ml \
|
||||
output_rhv_upload_*_source.ml
|
||||
$(top_builddir)/ocaml-dep.sh $^
|
||||
-include .depend
|
||||
|
||||
20
v2v/config.ml.in
Normal file
20
v2v/config.ml.in
Normal file
@@ -0,0 +1,20 @@
|
||||
(* virt-v2v
|
||||
* Copyright (C) 2019 Red Hat Inc.
|
||||
* @configure_input@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*)
|
||||
|
||||
let virt_v2v_nbdkit_python_plugin = "@VIRT_V2V_NBDKIT_PYTHON_PLUGIN@"
|
||||
26
v2v/config.mli
Normal file
26
v2v/config.mli
Normal file
@@ -0,0 +1,26 @@
|
||||
(* virt-v2v
|
||||
* Copyright (C) 2019 Red Hat Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*)
|
||||
|
||||
val virt_v2v_nbdkit_python_plugin : string
|
||||
(** Return the name of the nbdkit python plugin used by
|
||||
[virt-v2v -o rhv-upload].
|
||||
|
||||
As above this must also be the Python 3 version of the plugin,
|
||||
unless you change it. The configure command to change this is:
|
||||
|
||||
[./configure --with-virt-v2v-nbdkit-python-plugin=...] *)
|
||||
@@ -78,7 +78,7 @@ let parse_output_options options =
|
||||
|
||||
{ rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer }
|
||||
|
||||
let nbdkit_python_plugin = "python"
|
||||
let nbdkit_python_plugin = Config.virt_v2v_nbdkit_python_plugin
|
||||
let pidfile_timeout = 30
|
||||
let finalization_timeout = 5*60
|
||||
|
||||
|
||||
Reference in New Issue
Block a user