Bug 2021154

Summary: Move nbdkit-null-plugin to nbdkit-server package
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: nbdkitAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: Vera <vwu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: eblake, lersek, mxie, rjones, tyan, tzheng, virt-maint, vwu, xiaodwan
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nbdkit-1.28.2-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:50:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2016527    

Description Richard W.M. Jones 2021-11-08 13:20:54 UTC
Description of problem:

Currently the nbdkit-server package is the pure nbdkit server
with no plugins or filters.  It is packaged like this to
reduce overhead for people who want to ship their own plugin
and don't care about the built-in ones.

The way we'll actually use this from libvirt (bug 2016527) is
to use something like:

  Requires: nbdkit-server, nbdkit-curl-plugin, nbdkit-ssh-plugin

This would result in nbdkit server + only the curl and ssh plugins
being installed.

The problem with this is that the documentation describes using
"nbdkit --filter=X null ..." to probe for filters, assuming therefore
that nbdkit-null-plugin is always installed.
(https://libguestfs.org/nbdkit-probing.1.html)

The solution is to move nbdkit-null-plugin (only) into nbdkit-server.
It is not very large - just 16K - so does not add significantly
to the size of the nbdkit server package, and does not any dependencies.

Version-Release number of selected component (if applicable):

nbdkit-server-1.28.1-2.el9

The same change in Fedora:
https://src.fedoraproject.org/rpms/nbdkit/c/048b8de83c0e54418e01b3f75fc541fcf1b539e3?branch=rawhide

Comment 3 Vera 2021-12-17 07:20:02 UTC
Verified with the version below:
nbdkit-1.28.3-2.el9.x86_64

Steps:
1. check if "nbdkit-null-plugin" exists;
# man nbdkit-null-plugin
nbdkit-null-plugin(1)                                               NBDKIT                                               nbdkit-null-plugin(1)

NAME
       nbdkit-null-plugin - nbdkit bitbucket plugin

SYNOPSIS
        nbdkit null [[size=]SIZE]

..................


nbdkit-1.28.3                                                     2021-12-08                                             nbdkit-null-plugin(1)

2. check the commands;
# nbdkit foo --version
nbdkit: error: cannot open plugin 'foo': /usr/lib64/nbdkit/plugins/nbdkit-foo-plugin.so: cannot open shared object file: No such file or directory
Use 'nbdkit --help' or read the nbdkit(1) manual page for documentation.

# nbdkit --filter=foo null --version
nbdkit: error: cannot open filter 'foo': /usr/lib64/nbdkit/filters/nbdkit-foo-filter.so: cannot open shared object file: No such file or directory



Hi rjones,
Do you have any suggestions to verify this bug on the QA side?
Thanks,
Vera

Comment 4 Richard W.M. Jones 2021-12-17 10:11:57 UTC
The file /usr/lib64/nbdkit/plugins/nbdkit-null-plugin.so should have
moved from nbdkit-basic-plugins to nbdkit-server.  Try comparing
the output of these commands across the two versions of nbdkit:

$ rpm -ql nbdkit-basic-plugins | grep null-plugin

$ rpm -ql nbdkit-server | grep null-plugin

Comment 5 Vera 2021-12-21 03:08:19 UTC
Thanks, rjones.

Verified with the version below:
nbdkit-1.28.3-2.el9.x86_64

Steps:
1. check if "nbdkit-null-plugin" exists;

# ls -al /usr/lib64/nbdkit/plugins/nbdkit-null-plugin.so
-rwxr-xr-x. 1 root root 16432 Dec  8 07:06 /usr/lib64/nbdkit/plugins/nbdkit-null-plugin.so

# man nbdkit-null-plugin
nbdkit-null-plugin(1)                                               NBDKIT                                               nbdkit-null-plugin(1)

NAME
       nbdkit-null-plugin - nbdkit bitbucket plugin

SYNOPSIS
        nbdkit null [[size=]SIZE]

..................


nbdkit-1.28.3                                                     2021-12-08                                             nbdkit-null-plugin(1)

2. compare with 2 versions of nbdkit and check the following commands;

# rpm -qa nbdkit
nbdkit-1.28.3-2.el9.x86_64
# rpm -ql nbdkit-basic-plugins | grep null-plugin
# rpm -ql nbdkit-server | grep null-plugin
/usr/lib64/nbdkit/plugins/nbdkit-null-plugin.so
/usr/share/man/man1/nbdkit-null-plugin.1.gz


# rpm -qa nbdkit
nbdkit-1.24.0-3.module+el8.6.0+12861+13975d62.x86_64
# rpm -ql nbdkit-basic-plugins | grep null-plugin
/usr/lib64/nbdkit/plugins/nbdkit-null-plugin.so
/usr/share/man/man1/nbdkit-null-plugin.1.gz
# rpm -ql nbdkit-server | grep null-plugin
#


Moving status to VERIFIED.

Comment 7 errata-xmlrpc 2022-05-17 12:50:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: nbdkit), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:2408