virt-v2v/0017-test-data-phony-guests-fix-prerequisite-list-of-fedo.patch
Laszlo Ersek 552929e8d3 recognize "--key /dev/mapper/VG-LV🔑password"; fix %check phase
(1) Backport the upstream patches for recognizing the command line option

      --key /dev/mapper/VG-LV🔑password

    Similarly to the backports for guestfs-tools BZ#2209280 and libguestfs
    BZ#2209279, here we need to update the common submodule (thankfully we
    need not excise any hunks -- we had to do that for libguestfs).

    Unlike those "single-step" submodule updates however, for virt-v2v we
    bridge the same submodule commit range 70c10a079a30..b636c3f20a1b in
    two steps, stopping at commit 38e6988c1864 in the middle. We do that
    simply because that's how upstream virt-v2v moved; i.e., there are two
    upstream patches to cherry-pick for advancing our submodule reference.

(2) In dist-git commit ef9a918d7e, there was a typo: the "test" command
    was left out. Therefore even our simple test conversion has not been
    invoked -- see e.g.
    <https://download.eng.bos.redhat.com/brewroot/vol/rhel-9/packages/virt-v2v/2.3.4/2.el9/data/logs/x86_64/build.log>:

> + -s test-data/phony-guests/windows.img
> /var/tmp/rpm-tmp.UMecKA: line 48: -s: command not found

    Unfortunately, incorrectly (not) invoking "test -s" has had results
    identical to invoking "test -s" correctly and "test -s" failing;
    therefore we've been just silently skipping our simple conversion,
    assuming "no non-empty guest disk images".

    Fix this typo...

(3) ... and then run the sole "test-v2v-fedora-luks-on-lvm-conversion.sh"
    test from the test suite, for verifying the backport in the build
    environment. (The idea for the future is that we'd run such individual
    tests whenever backporting patches.) For this, we also start depending
    (at build time) on the sqlite3 command.

resolves: rhbz#2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2023-06-20 16:40:47 +02:00

64 lines
2.6 KiB
Diff

From 10192f8ee3a7900e76d5c9a0fb330eb5ff1fe22c Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Mon, 19 Jun 2023 18:27:29 +0200
Subject: [PATCH] test-data/phony-guests: fix prerequisite list of
"fedora-luks-on-lvm.img"
In the virt-v2v repo, commit 1e75569aa074 ("test-data/phony-guests: Allow
virt-v2v to work against phony Fedora") is an ancestor of commit
e4efe4b7d240 ("tests: add LUKS-on-LVM test"). The latter created a state
where "fedora-static-bin" and LUKS on LVM testing would coexist (i.e.,
where "fedora-static-bin" would be uploaded to the LUKS-on-LVM disk image
as well), but the commit didn't spell out the dependency in
"test-data/phony-guests/Makefile.am".
Do that now.
The problem can be triggered with:
> autoreconf -i
> ./configure
> make
> make -C test-data/phony-guests fedora-luks-on-lvm.img
where the last command fails with
> make: Entering directory '.../test-data/phony-guests'
> SRCDIR=. LAYOUT=luks-on-lvm ../../run --test ./make-fedora-img.pl
> open: fedora-static-bin: No such file or directory at
> .../test-data/phony-guests/make-fedora-img.pl line 373.
(In the guestfs-tools repo, the relative order (the descendancy) between
both commits is the opposite. There, commit 27da4b0c4991 ("inspector: add
LUKS-on-LVM test") came first, and commit eb0ff1859eb6
("test-data/phony-guests: Allow virt-v2v to work against phony Fedora"),
came second. The latter commit, in fact being a port of virt-v2v commit
1e75569aa074, brought together "fedora-static-bin" with "LUKS on LVM"
testing, and it correctly added "fedora-static-bin" as a pre-requisite
for building "fedora-luks-on-lvm.img".)
Fixes: e4efe4b7d240b66b1d53fbe5a127f4f5966f6903
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230619162729.153334-1-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit 13a6f4b9686e3fc385663bffc31c08d2c2bb7959)
---
test-data/phony-guests/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test-data/phony-guests/Makefile.am b/test-data/phony-guests/Makefile.am
index 29dbd4d0..10c0241b 100644
--- a/test-data/phony-guests/Makefile.am
+++ b/test-data/phony-guests/Makefile.am
@@ -103,7 +103,8 @@ fedora-btrfs.img: make-fedora-img.pl \
# Make a (dummy) Fedora image with LUKS-on-LVM.
fedora-luks-on-lvm.img: make-fedora-img.pl \
fedora-journal.tar.xz \
- fedora.db
+ fedora.db \
+ fedora-static-bin
SRCDIR=$(srcdir) LAYOUT=luks-on-lvm $(top_builddir)/run --test ./$<
# Make a (dummy) Fedora image with LVM-on-LUKS.