Blame SOURCES/0021-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch

c1a9fa
From b61a03ad272bb08ff5ca757ade6a23bfef34fdc9 Mon Sep 17 00:00:00 2001
c1a9fa
From: "Richard W.M. Jones" <rjones@redhat.com>
c1a9fa
Date: Tue, 5 Jul 2022 11:56:54 +0100
c1a9fa
Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test
c1a9fa
c1a9fa
In RHEL 9 nbdcopy 1.12.4-2 will be sufficient (vs nbdcopy 1.13.5
c1a9fa
upstream).  We will enforce this through RPM dependencies and test it
c1a9fa
separately.  Thus remove the version check and test.
c1a9fa
---
c1a9fa
 output/output.ml  | 11 -----------
c1a9fa
 tests/Makefile.am |  1 -
c1a9fa
 2 files changed, 12 deletions(-)
c1a9fa
c1a9fa
diff --git a/output/output.ml b/output/output.ml
c1a9fa
index 23c3932d..496c32b6 100644
c1a9fa
--- a/output/output.ml
c1a9fa
+++ b/output/output.ml
c1a9fa
@@ -83,17 +83,6 @@ let output_to_local_file ?(changeuid = fun f -> f ()) ?(compressed = false)
c1a9fa
     if output_format <> "qcow2" then
c1a9fa
       error (f_"‘-oo compressed’ is only allowed when the output format \
c1a9fa
                 is a local qcow2-format file, i.e. ‘-of qcow2’");
c1a9fa
-
c1a9fa
-    (* Check nbdcopy is new enough.  This assumes that the version of
c1a9fa
-     * libnbd is the same as the version of nbdcopy, but parsing this
c1a9fa
-     * is easier.  We can remove this check when we build-depend on
c1a9fa
-     * libnbd >= 1.14.
c1a9fa
-     *)
c1a9fa
-    let version =
c1a9fa
-      NBD.create () |> NBD.get_version |>
c1a9fa
-      String.nsplit "." |> List.map int_of_string in
c1a9fa
-    if version < [1; 13; 5] then
c1a9fa
-      error (f_"-oo compressed option requires nbdcopy >= 1.13.5")
c1a9fa
   );
c1a9fa
 
c1a9fa
   let g = open_guestfs () in
c1a9fa
diff --git a/tests/Makefile.am b/tests/Makefile.am
c1a9fa
index a26ecf7a..47e5f10d 100644
c1a9fa
--- a/tests/Makefile.am
c1a9fa
+++ b/tests/Makefile.am
c1a9fa
@@ -82,7 +82,6 @@ TESTS = \
c1a9fa
 	test-v2v-networks-and-bridges.sh \
c1a9fa
 	test-v2v-o-glance.sh \
c1a9fa
 	test-v2v-o-libvirt.sh \
c1a9fa
-	test-v2v-o-local-qcow2-compressed.sh \
c1a9fa
 	test-v2v-o-null.sh \
c1a9fa
 	test-v2v-o-openstack.sh \
c1a9fa
 	test-v2v-o-qemu.sh \