On 03/31/22 14:27, Richard W.M. Jones wrote:
On Thu, Mar 31, 2022 at 09:22:02AM +0200, Laszlo Ersek wrote:
diff --git a/dependencies.m4 b/dependencies.m4 index 40b3786cb0b7..20d068028dbe 100644 --- a/dependencies.m4 +++ b/dependencies.m4 @@ -23,39 +23,40 @@ dnl only runs on the virt-v2v conversion server. ifelse(REDHAT,1, dnl Used by the virt-p2v binary. pcre libxml2 gtk`'GTK_VERSION dbus-libs
dnl Run as external programs by the p2v binary. /usr/bin/ssh - /usr/bin/qemu-nbd + /usr/sbin/nbdkit + /usr/lib64/nbdkit/plugins/nbdkit-file-plugin.so
This should be:
- /usr/bin/qemu-nbd + nbdkit-server + nbdkit-file-plugin
All Fedora & RHEL packages we've ever shipped should recognise these virtual Provides and install just the nbdkit server and the file plugin, without pulling in any complicated dependencies.
I used pathnames rather than package names just to stick with the tradition of "/usr/bin/qemu-nbd". Secondly, there is no package called "nbdkit-file-plugin"; it's called "nbdkit-basic-plugins". Do you mean that "nbdkit-file-plugin" is resolvable due to the work done for <https://bugzilla.redhat.com/show_bug.cgi?id=2059291> (and before that, manually listed Provides:?) ... I think that dnf behaves very misleadingly here. Consider:
# dnf search nbdkit-file-plugin No matches found.
(Because I *did* try that yesterday.) At the same time:
# dnf install nbdkit-file-plugin Dependencies resolved. ====================================================================================================================== Package Architecture Version Repository Size ====================================================================================================================== Installing: nbdkit-basic-plugins x86_64 1.28.6-1.fc35 updates 204 k Installing dependencies: nbdkit-server x86_64 1.28.6-1.fc35 updates 130 k
Transaction Summary ====================================================================================================================== Install 2 Packages
Total download size: 334 k Installed size: 719 k Is this ok [y/N]:
This is very non-intuitive. A virtual "provides" apparently satisfies "install", but does not satisfy "search". IMO that's simply a bug in dnf, one that keeps tricking me. Anyway, I'll update the deps. Back to your email: On 03/31/22 14:27, Richard W.M. Jones wrote:
In the same file, the DEBIAN section should be modified:
- qemu-utils + nbdkit
because:
https://packages.debian.org/sid/amd64/nbdkit/filelist
(Unfortunately this will pull in some large dependencies, but that's a problem for Debian to fix.)
In the same file, for ARCHLINUX:
- qemu + nbdkit
(https://aur.archlinux.org/packages/nbdkit)
In the same file, for SUSE (same as REDHAT):
- qemu-tools + nbdkit-server + nbdkit-file-plugin
@@ -128,33 +129,34 @@ ifelse(SUSE,1, ifelse(OPENMANDRIVA,1, dnl Used by the virt-p2v binary. pcre libxml2 gtk`'GTK_VERSION dbus-libs
dnl Run as external programs by the p2v binary. /usr/bin/ssh - /usr/bin/qemu-nbd + /usr/sbin/nbdkit + /usr/lib64/nbdkit/plugins/nbdkit-file-plugin.so which
I couldn't find any reference to any openmandriva nbdkit package, but I guess we can leave this hunk alone and the openmandriva developers can fix it if they want.
OK.
[...]
diff --git a/test-virt-p2v-nbdkit.sh b/test-virt-p2v-nbdkit.sh index 9adb195f9249..8e91d45c4014 100755 --- a/test-virt-p2v-nbdkit.sh +++ b/test-virt-p2v-nbdkit.sh @@ -1,28 +1,27 @@ #!/bin/bash - # libguestfs virt-p2v test script # Copyright (C) 2014-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, see <https://www.gnu.org/licenses/>.
-# Test virt-p2v in non-GUI mode using nbdkit instead of qemu-nbd. +# Test virt-p2v in non-GUI mode using nbdkit.
set -e
$TEST_FUNCTIONS skip_if_skipped skip_if_backend uml -skip_unless nbdkit file --version
Don't we want to keep this line? The p2v-building instructions say that nbdkit is optional, so we should skip the test if it's not available.
I removed this line because the qemu-nbd based "sibling" test case, "test-virt-p2v.sh", which this patch removes, has a hard dependency on qemu-nbd (i.e., it does not include a similar "skip_unless" line), despite the docs listing qemu-nbd as optional too. And now with this patch, nbdkit takes the place of qemu-nbd. If your argument is that the lack of "skip_unless qemu-nbd --version" is a preexistent bug in "test-virt-p2v.sh", then I agree to keep "skip_unless nbdkit file --version" here. Thanks! Laszlo