Description of problem: rpm >= 4.18 supports new `%patch 1` syntax, while the older `%patch1` syntax is going to be deprecated. Is there a chance to support the `%patch 1` to speedup the adoption of the new syntax? Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: `%patch 1` is not supported Expected results: `%patch 1` is supported Additional info:
Just FTR, I have reported this against RHEL8, but if that does not work, it would be better to address this at least in RHEL9.
It's too late for this kind of change in RHEL 8, but we'll consider for RHEL 9. The main issue is compatibility, or lack of thereof, with some old quirky behaviors. Fedora/RHEL package set should not be affected but who knows what's out there...
Actually the story here is that rpm always supported patch numbers as positional arguments to %patch. The gotcha here is that %patch is *also* interpreted to mean either "patch number zero" or "numberless Patch:", depending on the rpm version, so '%patch 1' would try to apply patches 0 and 1. Which makes no sense whatsover, and could be considered as a bug. There problem is there may be people relying on '%patch' to apply patch 0/numberless patch. This needs quite some care to avoid breaking and/or making the compat situation actually worse.
> Bug 2161293 - `%patch 1` applies patches 0 and 1 https://bugzilla.redhat.com/show_bug.cgi?id=2161293#c4 > The gotcha here is that %patch is *also* interpreted to mean either "patch number zero" or "numberless Patch:", depending on the rpm version, so '%patch 1' would try to apply patches 0 and 1. Which makes no sense whatsover, and could be considered as a bug. There problem is there may be people relying on '%patch' to apply patch 0/numberless patch. The `%patch 1` try to apply "both" patch 0 and 1? Hmm, confusing.