You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a _link file with a <add> element to add a small patch to an upstream package.
Since yesterday, that package is no longer passing the build on the openbuildservice.org and it looks like OBS is using and outdated way of adding patches to RPM spec files.
[ 71s] gnome-shell.spec:194: E: patch-macro-old-format (Badness: 10000)
[ 71s] The usage of %patchN is not supported by RPM >= 4.20. The preferred way to
[ 71s] apply patches are, in order: * %autosetup -p1 * %autosetup -N / %autopatch
[ 71s] -p1 * %setup / %patch -P <N> -p 1 (upper case P denotes patch number,
[ 71s] lower case is the usual patch -p<num> strip level)
The "badness" on that rule causes the termination of the packaging progress with the message Badness 10002 exceeds threshold 999, abortingafter it completes the build and packaging. According to the package installations in the log, it was only using rpm-4.19.1.1-3.2, so it should have worked, despite the error.
Expected Result
OBS uses a modern patch insertion method for <add>. A build failure is not forced by linting rules.
How to Reproduce
Run OBS with rpm-4.19 and rpmlint-mini-2.6.1+git20240918.5cb5647
Create a new package with a _link file that links to another package with at least N patches
Add <patches><add name="my-bug-fix.patch" after="N" popt="1"/></patches> inside the <link> (where N is the number of the patch that you want to run your patch after)
Create a valid my-bug-fix.patch
Wait for the build to complete
Build completes but then gets force-failed by linting rules
Further Information
It looks like it's this bit of code that is responsible, but I don't know what other impact is of swapping %patch$nrx for %patch -P $nrx, and I can't test it on the public OBS server even if I did!
If I set after="0" then I don't get the "old format" error, but I get Patch number not specified instead. If I don't include the after attribute then it auto-generates a number and hits the same error as when I specify a number.
Issue Description
I am using a
_link
file with a<add>
element to add a small patch to an upstream package.Since yesterday, that package is no longer passing the build on the openbuildservice.org and it looks like OBS is using and outdated way of adding patches to RPM spec files.
The "badness" on that rule causes the termination of the packaging progress with the message
Badness 10002 exceeds threshold 999, aborting
after it completes the build and packaging. According to the package installations in the log, it was only usingrpm-4.19.1.1-3.2
, so it should have worked, despite the error.Expected Result
OBS uses a modern patch insertion method for
<add>
. A build failure is not forced by linting rules.How to Reproduce
rpm-4.19
andrpmlint-mini-2.6.1+git20240918.5cb5647
_link
file that links to another package with at least N patches<patches><add name="my-bug-fix.patch" after="N" popt="1"/></patches>
inside the<link>
(whereN
is the number of the patch that you want to run your patch after)my-bug-fix.patch
Further Information
It looks like it's this bit of code that is responsible, but I don't know what other impact is of swapping
%patch$nrx
for%patch -P $nrx
, and I can't test it on the public OBS server even if I did!If I set
after="0"
then I don't get the "old format" error, but I getPatch number not specified
instead. If I don't include theafter
attribute then it auto-generates a number and hits the same error as when I specify a number.The text was updated successfully, but these errors were encountered: