On Fri, Sep 20, 2019 at 09:33:06AM -0500, Eric Blake wrote:
Checking for file existence for filters is somewhat less fragile
than
for plugins, because all filters are built in-tree (we've specifically
documented that we don't provide ABI guarantees for filters, so the only
sane way to use a filter is to compile it at the same time/version as
the nbdkit binary that will load it). But you do have a point that
checking for files is still more fragile than just asking nbdkit whether
a given filter exists:
$ nbdkit --dump-plugin --filter=nosuch null
nbdkit: error: cannot open filter 'nosuch':
/usr/lib64/nbdkit/filters/nbdkit-nosuch-filter.so: cannot open shared
object file: No such file or directory
This is definitely the best we can do now, and I've posted a patch
suggesting this change for the nbdkit-probing(1) man page.
However it's not without a subtle problem: It requires the null plugin
to be present. It's possible to ship nbdkit on its own. On Fedora
try installing just the nbdkit-server package. The null plugin won't
be available so this command will always fail.
So we do also need to change nbdkit to allow easier probing for
plugins or filters in the long term.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html