[pve-devel] [PATCH storage v3 01/10] copy OVF.pm from qemu-server

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed May 22 10:56:08 CEST 2024


On April 29, 2024 1:21 pm, Dominik Csapak wrote:
> copies the OVF.pm and relevant ovf tests from qemu-server.
> We need it here, and it uses PVE::Storage already, and since there is no
> intermediary package/repository we could put it, it seems fitting in
> here.
> 
> Put it in a new GuestImport module
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PVE/GuestImport/Makefile                  |   3 +
>  src/PVE/GuestImport/OVF.pm                    | 242 ++++++++++++++++++
>  src/PVE/Makefile                              |   1 +
>  src/PVE/Storage/Makefile                      |   1 +
>  src/test/Makefile                             |   5 +-
>  src/test/ovf_manifests/Win10-Liz-disk1.vmdk   | Bin 0 -> 65536 bytes
>  src/test/ovf_manifests/Win10-Liz.ovf          | 142 ++++++++++
>  .../ovf_manifests/Win10-Liz_no_default_ns.ovf | 142 ++++++++++
>  .../ovf_manifests/Win_2008_R2_two-disks.ovf   | 145 +++++++++++
>  src/test/ovf_manifests/disk1.vmdk             | Bin 0 -> 65536 bytes
>  src/test/ovf_manifests/disk2.vmdk             | Bin 0 -> 65536 bytes
>  src/test/run_ovf_tests.pl                     |  71 +++++
>  12 files changed, 751 insertions(+), 1 deletion(-)
>  create mode 100644 src/PVE/GuestImport/Makefile
>  create mode 100644 src/PVE/GuestImport/OVF.pm
>  create mode 100644 src/test/ovf_manifests/Win10-Liz-disk1.vmdk
>  create mode 100755 src/test/ovf_manifests/Win10-Liz.ovf
>  create mode 100755 src/test/ovf_manifests/Win10-Liz_no_default_ns.ovf
>  create mode 100755 src/test/ovf_manifests/Win_2008_R2_two-disks.ovf
>  create mode 100644 src/test/ovf_manifests/disk1.vmdk
>  create mode 100644 src/test/ovf_manifests/disk2.vmdk
>  create mode 100755 src/test/run_ovf_tests.pl
> 
> diff --git a/src/PVE/GuestImport/Makefile b/src/PVE/GuestImport/Makefile
> new file mode 100644
> index 0000000..5948384
> --- /dev/null
> +++ b/src/PVE/GuestImport/Makefile
> @@ -0,0 +1,3 @@
> +.PHONY: install
> +install:
> +	install -D -m 0644 OVF.pm ${DESTDIR}${PERLDIR}/PVE/GuestImport/OVF.pm
> diff --git a/src/PVE/GuestImport/OVF.pm b/src/PVE/GuestImport/OVF.pm
> new file mode 100644
> index 0000000..055ebf5
> --- /dev/null
> +++ b/src/PVE/GuestImport/OVF.pm
> @@ -0,0 +1,242 @@
> +# Open Virtualization Format import routines
> +# https://www.dmtf.org/standards/ovf
> +package PVE::GuestImport::OVF;
> +
> +use strict;
> +use warnings;
> +
> +use XML::LibXML;

this means the libxml-libxml-perl dependency should also move from
qemu-server to libpve-storage-perl

> +use File::Spec;
> +use File::Basename;
> +use Data::Dumper;

not used?

> +use Cwd 'realpath';
> +
> +use PVE::Tools;
> +use PVE::Storage;

this one here makes a circular dependency, since the DirPlugin then uses
this module.. it is within the repository though, which we have quite
often, but it's a bit of a bummer..

> +
> [..]




More information about the pve-devel mailing list