Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1959914

Summary: Adopt kernel macros and scripts from redhat-rpm-config
Product: Red Hat Enterprise Linux 9 Reporter: Michal Domonkos <mdomonko>
Component: kernel-srpm-macrosAssignee: Michal Domonkos <mdomonko>
Status: CLOSED CURRENTRELEASE QA Contact: Radek Bíba <rbiba>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0Keywords: Triaged
Target Milestone: betaFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-srpm-macros-1.0-7.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 21:50:14 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:

Description Michal Domonkos 2021-05-12 15:43:35 UTC
Consolidate the kernel-specific RPM macros and build scripts from redhat-rpm-config into this component.  This will (hopefully) make life easier for everybody, both the Kernel and RPM folks.

Specifically, this involves the adoption of the following items:

* The kernel-rpm-macros subpackage
* The kmod.attr macro file

The kmod.attr file is currently shipped via the binary redhat-rpm-config package itself, so to avoid a file conflict on upgrades, we'll also need to add an explicit Conflicts to the new kernel-rpm-macros version.

Oh, and speaking of versions - we'll also need to make sure kernel-rpm-macros actually is NVR-newer than the current release, so we'll also adopt the same versioning scheme from redhat-rpm-config.  This may not be optimal in the long run, but will prevent breakage for now.

Note that there still remain some kernel-specific bits in redhat-rpm-config, specifically in the find-provides and find-requires scripts; those are not subject of this BZ and may be moved later.

Comment 1 Michal Domonkos 2021-05-12 17:27:40 UTC
CentOS Stream MR:
https://gitlab.com/redhat/centos-stream/rpms/kernel-srpm-macros/-/merge_requests/1

Comment 2 Michal Domonkos 2021-05-13 11:05:31 UTC
One quick way to verify that the union of the files installed by the three affected packages remains the same before vs. after this change:

$ rpm -q redhat-rpm-config kernel-rpm-macros kernel-srpm-macros
redhat-rpm-config-184-1.el9.noarch
kernel-rpm-macros-184-1.el9.noarch
kernel-srpm-macros-1.0-5.el9.noarch

$ rpm -q --qf '[%{FILENAMES} %{FILESIZES} %{FILEDIGESTS}\n]' redhat-rpm-config kernel-rpm-macros kernel-srpm-macros | sort > old.list

$ dnf upgrade ...

$ rpm -q redhat-rpm-config kernel-rpm-macros kernel-srpm-macros
redhat-rpm-config-185-1.el9.noarch
kernel-rpm-macros-185-6.el9.el9.noarch
kernel-srpm-macros-1.0-6.el9.noarch

$ rpm -q --qf '[%{FILENAMES} %{FILESIZES} %{FILEDIGESTS}\n]' redhat-rpm-config kernel-rpm-macros kernel-srpm-macros | sort > new.list

$ diff old.list new.list  # shouldn't print anything