Fixes https://pagure.io/packaging-committee/issue/1442
I'll note the %patch 1 syntax works on all current versions of Fedora, but not on EPEL 9 or 8. I'm not opposed to merging as-is, but on the EPEL side we should add a section on this page about when that format doesn't work (we need it anyways independent of this PR to be honest).
%patch 1
A more compatible alternative to recommend in guidelines examples would be %patch -P1, which works everywhere.
%patch -P1
I assumed that this works on EPEL 9 via https://gitlab.com/redhat/centos-stream/rpms/rpm/-/commit/216e684ef4853a3ad75d9fad824c7d5a7bee94d7 -- however, that seems to not yet be available in 9.5.
Those examples explain how to apply patches conditionally, I don't think it's essential that they are EPEL-compatible. However, if this would be a problem, I can update them to use -P.
-P
Nice, I wasn't aware that had been backported, thanks for the clarification.
I agree it's not essential to use the maximum-compatible syntax, especially since soon it will only be relevant for EPEL 8.
The question is really which syntax we would prefer to see. We shouldn't go out of our way to include things which break on EPEL, but I think %patch 1 looks cleaner and it sounds like we're close to this mattering only for EL8, so I guess I'm in favor of merging as is. I would expect the vast majority of specs to just use %autosetup anyway.
%autosetup
Commit 0e6ca426 fixes this pull-request
Pull-Request has been merged by james
Fixes https://pagure.io/packaging-committee/issue/1442