From: Daniel Veillard Date: Wed, 9 Sep 2009 14:44:44 +0000 (+0200) Subject: Deprecate lzma and lzop in favor of xz, add dep X-Git-Tag: v0.7.1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5a305584f20482e756758bc6b6239e1947e02bc;p=thirdparty%2Flibvirt.git Deprecate lzma and lzop in favor of xz, add dep * src/qemu_driver.c: drop lzma and lzop images compression options as they are deprecated by xz * libvirt.spec.in: add requires for xz/bzip2/gzip as they are needed to implement the compression options --- diff --git a/libvirt.spec.in b/libvirt.spec.in index 9371898ea0..b01f9c2e9a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -114,6 +114,10 @@ Requires: glusterfs-client >= 2.0.1 %if %{with_qemu} # From QEMU RPMs Requires: /usr/bin/qemu-img +# For image compression +Requires: gzip +Requires: bzip2 +Requires: xz %else %if %{with_xen} # From Xen RPMs diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 9a9ae7374e..8f16e726cb 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -3622,9 +3622,12 @@ enum qemud_save_formats { QEMUD_SAVE_FORMAT_RAW = 0, QEMUD_SAVE_FORMAT_GZIP = 1, QEMUD_SAVE_FORMAT_BZIP2 = 2, - QEMUD_SAVE_FORMAT_LZMA = 3, /* deprecated, in favor of xz */ - QEMUD_SAVE_FORMAT_LZOP = 4, - QEMUD_SAVE_FORMAT_XZ = 5, + /* + * Deprecated by xz and never used as part of a release + * QEMUD_SAVE_FORMAT_LZMA, + * QEMUD_SAVE_FORMAT_LZOP, + */ + QEMUD_SAVE_FORMAT_XZ = 3, /* Note: add new members only at the end. These values are used in the on-disk format. Do not change or re-use numbers. */ @@ -3637,8 +3640,6 @@ VIR_ENUM_IMPL(qemudSaveCompression, QEMUD_SAVE_FORMAT_LAST, "raw", "gzip", "bzip2", - "lzma", - "lzop", "xz") struct qemud_save_header { @@ -4381,10 +4382,6 @@ static int qemudDomainRestore(virConnectPtr conn, intermediate_argv[0] = "gzip"; else if (header.compressed == QEMUD_SAVE_FORMAT_BZIP2) intermediate_argv[0] = "bzip2"; - else if (header.compressed == QEMUD_SAVE_FORMAT_LZMA) - intermediate_argv[0] = "lzma"; - else if (header.compressed == QEMUD_SAVE_FORMAT_LZOP) - intermediate_argv[0] = "lzop"; else if (header.compressed == QEMUD_SAVE_FORMAT_XZ) intermediate_argv[0] = "xz"; else if (header.compressed != QEMUD_SAVE_FORMAT_RAW) {