RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2059291 - Add new subpackage nbdkit-srpm-macros for automatic Provides generation
Summary: Add new subpackage nbdkit-srpm-macros for automatic Provides generation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nbdkit
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: mxie@redhat.com
URL:
Whiteboard:
Depends On: 2067105
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-28 16:37 UTC by Richard W.M. Jones
Modified: 2022-11-15 10:07 UTC (History)
11 users (show)

Fixed In Version: nbdkit-1.30.8-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 09:50:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-114035 0 None None None 2022-02-28 16:46:51 UTC
Red Hat Product Errata RHBA-2022:7945 0 None None None 2022-11-15 09:50:40 UTC

Description Richard W.M. Jones 2022-02-28 16:37:29 UTC
Description of problem:

In Fedora I added a new nbdkit-srpm-macros subpackage.  This
contains RPM macros which do automatic Provides generation
for plugins and filters.  Whereas previously we had to
tediously list out every plugin or filter that was provided
by a particular package, eg:

Provides:       nbdkit-data-plugin = %{version}-%{release}
Provides:       nbdkit-eval-plugin = %{version}-%{release}
Provides:       nbdkit-file-plugin = %{version}-%{release}
...

using these macros these are generated automatically at
build time.

This requires a two stage bootstrap.  See how I did it for Fedora:

https://src.fedoraproject.org/rpms/nbdkit/c/90d0f9b2f0de0f94fdaba9015370476c27c24a2e?branch=rawhide
https://src.fedoraproject.org/rpms/nbdkit/c/14ef88f762551cb79c398d3d0e31e156735ffc0b?branch=rawhide

It also adds a new subpackage that will have to go into
the right RHEL channel.  Probably buildroot is fine.

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

nbdkit 1.30 (see also bug 2059289)

Broadly speaking there shouldn't be any significant
changes to the dependencies before and after this change.
The difference is that the old dependencies are removed
from the spec file and are now generated automatically.

Comment 1 Richard W.M. Jones 2022-02-28 16:38:56 UTC
Yash, if we want to add a new subpackage in RHEL 9.1, and we probably
want that subpackage to go into buildroot, do we need to do anything
at all?  And if we wanted it to go into CRB instead, do we need to
do anything for that?

Comment 2 Yash Mankad 2022-03-03 21:06:34 UTC
(In reply to Richard W.M. Jones from comment #1)
> Yash, if we want to add a new subpackage in RHEL 9.1, and we probably
> want that subpackage to go into buildroot, do we need to do anything
> at all?  And if we wanted it to go into CRB instead, do we need to
> do anything for that?

Hmm, good question.

nbdkit is in AppStream, so the subpackage will be added to AppStream, but then we can file a BZ against the distribution component to have it moved to CRB or buildroot.
Should be straightforward.

Comment 3 Richard W.M. Jones 2022-03-03 21:19:38 UTC
I think for this new subpackage, CRB will be appropriate, but if
it went into AppStream it's not really a problem either.  (It's
a trivial package that contains only a couple of text files)

Comment 6 mxie@redhat.com 2022-03-23 08:52:18 UTC
Test the bug with nbdkit-srpm-macros-1.30.1-2.el9.noarch

Steps:
1.Try to rebuild rpm packages from nbdkit-1.30.1-2.el9.src.rpm, found nbdkit-srpm-macros is required for building
# rpmbuild --rebuild nbdkit-1.30.1-2.el9.src.rpm 
.....
	nbdkit-srpm-macros >= 1.30.0 is needed by nbdkit-1.30.1-2.el9.x86_64

2.Install required dependence packages to build nbdkit-1.30.1-2.el9.src.rpm, can see below info during building
.....
Provides: Provides: nbdkit-null-plugin = 1.30.1-2.el9 nbdkit-server = 1.30.1-2.el9 nbdkit-server(x86-64) = 1.30.1-2.el9
.....
Provides: Provides: nbdkit-basic-plugins = 1.30.1-2.el9 nbdkit-basic-plugins(x86-64) = 1.30.1-2.el9 nbdkit-data-plugin = 1.30.1-2.el9 nbdkit-eval-plugin = 1.30.1-2.el9 nbdkit-file-plugin = 1.30.1-2.el9 nbdkit-floppy-plugin = 1.30.1-2.el9 nbdkit-full-plugin = 1.30.1-2.el9 nbdkit-info-plugin = 1.30.1-2.el9 nbdkit-memory-plugin = 1.30.1-2.el9 nbdkit-ondemand-plugin = 1.30.1-2.el9 nbdkit-partitioning-plugin = 1.30.1-2.el9 nbdkit-pattern-plugin = 1.30.1-2.el9 nbdkit-random-plugin = 1.30.1-2.el9 nbdkit-sh-plugin = 1.30.1-2.el9 nbdkit-sparse-random-plugin = 1.30.1-2.el9 nbdkit-split-plugin = 1.30.1-2.el9 nbdkit-zero-plugin = 1.30.1-2.el9
.....
Provides: nbdkit-srpm-macros = 1.30.1-2.el9
.....
Wrote: /root/rpmbuild/RPMS/noarch/nbdkit-srpm-macros-1.30.1-2.el9.noarch.rpm
.....
+ exit 0

3.Check if nbdkit-srpm-macros rpm package is listed in rhel9.1 compose, but found nbdkit-srpm-macros rpm package is not listed in neither Appstream nor CRB 


Hi rjones
    Please help to check the result of step3, thanks!

Comment 7 Richard W.M. Jones 2022-03-23 10:23:17 UTC
(In reply to mxie from comment #6)
> Test the bug with nbdkit-srpm-macros-1.30.1-2.el9.noarch
> 
> Steps:
> 1.Try to rebuild rpm packages from nbdkit-1.30.1-2.el9.src.rpm, found
> nbdkit-srpm-macros is required for building
> # rpmbuild --rebuild nbdkit-1.30.1-2.el9.src.rpm 
> .....
> 	nbdkit-srpm-macros >= 1.30.0 is needed by nbdkit-1.30.1-2.el9.x86_64

Correct, it's a circular dependency.  I had to rebuild the package in two
steps in RHEL 9.1 (first without the dependency, then with the dependency
added back).

> 2.Install required dependence packages to build nbdkit-1.30.1-2.el9.src.rpm,
> can see below info during building
> .....
> Provides: Provides: nbdkit-null-plugin = 1.30.1-2.el9 nbdkit-server =
> 1.30.1-2.el9 nbdkit-server(x86-64) = 1.30.1-2.el9
> .....
> Provides: Provides: nbdkit-basic-plugins = 1.30.1-2.el9
> nbdkit-basic-plugins(x86-64) = 1.30.1-2.el9 nbdkit-data-plugin =
> 1.30.1-2.el9 nbdkit-eval-plugin = 1.30.1-2.el9 nbdkit-file-plugin =
> 1.30.1-2.el9 nbdkit-floppy-plugin = 1.30.1-2.el9 nbdkit-full-plugin =
> 1.30.1-2.el9 nbdkit-info-plugin = 1.30.1-2.el9 nbdkit-memory-plugin =
> 1.30.1-2.el9 nbdkit-ondemand-plugin = 1.30.1-2.el9
> nbdkit-partitioning-plugin = 1.30.1-2.el9 nbdkit-pattern-plugin =
> 1.30.1-2.el9 nbdkit-random-plugin = 1.30.1-2.el9 nbdkit-sh-plugin =
> 1.30.1-2.el9 nbdkit-sparse-random-plugin = 1.30.1-2.el9 nbdkit-split-plugin
> = 1.30.1-2.el9 nbdkit-zero-plugin = 1.30.1-2.el9
> .....
> Provides: nbdkit-srpm-macros = 1.30.1-2.el9
> .....
> Wrote: /root/rpmbuild/RPMS/noarch/nbdkit-srpm-macros-1.30.1-2.el9.noarch.rpm
> .....
> + exit 0
> 
> 3.Check if nbdkit-srpm-macros rpm package is listed in rhel9.1 compose, but
> found nbdkit-srpm-macros rpm package is not listed in neither Appstream nor
> CRB 

It should be in AppStream automatically (see comment 2), or we could move it
to CRB (comment 3).  If it's in neither then we will need to work out how to
add it to CRB.  There's a process for doing this but it's complicated, see
here for a previous change I made:
https://bugzilla.redhat.com/show_bug.cgi?id=2060850
https://gitlab.com/redhat/centos-stream/release-engineering/comps/-/merge_requests/223

I will file a bug ...

Comment 8 Richard W.M. Jones 2022-03-23 10:27:17 UTC
See: https://bugzilla.redhat.com/show_bug.cgi?id=2067105
mxie, can you QA ack that bug please?

Comment 9 mxie@redhat.com 2022-03-23 11:11:08 UTC
The problem of step3 of comment6 has been tracked by bug2067105, so move the bug from ON_QA to VERIFIED

Comment 11 errata-xmlrpc 2022-11-15 09:50:17 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 (nbdkit bug fix and enhancement update), 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/RHBA-2022:7945


Note You need to log in before you can comment on or make changes to this bug.