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.
.New `-m` and `-M` parameters are now supported for the `%autopatch` rpm macro
With this update, the `-m` (min) and `-M` (max) parameters have been added to the `%autopatch` macro to apply only a range of patches with given parameters.
Description of problem:
RPM 4.15 adds the -m and -M flags to the %autopatch macro to allow specifying minimum and maximum patch numbers to apply [0]. This is broadly useful, but also brings specific benefits to CentOS as we work to incorporate our debranding as conditionals in RHEL spec files. For example, gnome-settings-daemon includes a subscription manager plugin. Disabling that requires skipping several patches. Currently our only option is to apply the patches individually.
%patch00001 -p 1
%patch00002 -p 1
%patch00003 -p 1
%patch00004 -p 1
%patch00005 -p 1
%patch00006 -p 1
%patch10001 -p 1
%if %{with subman}
%patch10002 -p 1
%patch10003 -p 1
%patch10004 -p 1
%endif
Backporting the min/max flags would allow this to be much cleaner, as well as reducing errors when adding and removing patches in the future.
%autopatch -p 1 -M 10001
%if %{with subman}
%autopatch -p 1 -m 10002 -M 10004
%endif
Please consider backporting the upstream commit [1] to the RHEL 8 rpm package.
Version-Release number of selected component (if applicable):
rpm-4.14.2-37.el8
Additional info:
[0]: https://rpm.org/wiki/Releases/4.15.0#macros
[1]: https://github.com/rpm-software-management/rpm/commit/f00bb5be9caa62220c6aeaf3f7264840d5c089e3
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 (rpm 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-2021:1606
Description of problem: RPM 4.15 adds the -m and -M flags to the %autopatch macro to allow specifying minimum and maximum patch numbers to apply [0]. This is broadly useful, but also brings specific benefits to CentOS as we work to incorporate our debranding as conditionals in RHEL spec files. For example, gnome-settings-daemon includes a subscription manager plugin. Disabling that requires skipping several patches. Currently our only option is to apply the patches individually. %patch00001 -p 1 %patch00002 -p 1 %patch00003 -p 1 %patch00004 -p 1 %patch00005 -p 1 %patch00006 -p 1 %patch10001 -p 1 %if %{with subman} %patch10002 -p 1 %patch10003 -p 1 %patch10004 -p 1 %endif Backporting the min/max flags would allow this to be much cleaner, as well as reducing errors when adding and removing patches in the future. %autopatch -p 1 -M 10001 %if %{with subman} %autopatch -p 1 -m 10002 -M 10004 %endif Please consider backporting the upstream commit [1] to the RHEL 8 rpm package. Version-Release number of selected component (if applicable): rpm-4.14.2-37.el8 Additional info: [0]: https://rpm.org/wiki/Releases/4.15.0#macros [1]: https://github.com/rpm-software-management/rpm/commit/f00bb5be9caa62220c6aeaf3f7264840d5c089e3