After RPM is before RPM - Changes needed for RPM 4.20
Dear Tumbleweed hackers and packagers, It is just a few days ago that Factory was updated to RPM 4.19 (and we are still missing a few fixes for packages requiring user() symbols and not providing them) The next RPM version will come - for sure (if previous release cycles are any indication, RPM 4.20 should be out around September) So far we have come across one change that will impact a log of packages: RPM 4.20 will no longer support %patchN (e.g %patch0); RPM 4.19 has warned about this during the build already. The preferred way to apply patches are, in order: * %autosetup -p1 * %autosetup -N / %autopatch -p1 * %setup / %patch -P <N> -p 1 (upper case P denotes patch number, lower case is the usual patch -p>num> strip level) * If your package has no patches, best to be prepared for the future and use %autosetup over %setup. Technically, RPM preferred would be %setup / %patch N when not using %autosetup/%autopatch, BUT %patch 1 is only supported properly from RPM 4.18 on, Not behaving as expected on older RPMs, like in Leap 15.x. That's why we switched our packages to the backward compatible form %patch -P 1 I (and some others) have started to go through the openSUSE:Factory packages that apply patches using %patchN (found a total of 2066 packages). About 10% of those have been fixed today with SRs to the development projects. I would appreciate it if you'd take a look at your packages over the next few days/weeks/months and adjust them to use autosetup or, if patches are applied conditionally, use the %patch -P N format. Cheers, Dominique
On 2/20/2024 9:29, Dominique Leuenberger wrote:
The preferred way to apply patches are, in order:
* %autosetup -p...
Is it considered best practice to use %autosetup (over %setup) even if a package doesn't have patches? i.e. is it worth making that change or just leave such a package as is? thanks, -- Jason Craig
On Fri, Feb 23, 2024 at 5:58 PM Jason Craig <os@jacraig.com> wrote:
On 2/20/2024 9:29, Dominique Leuenberger wrote:
The preferred way to apply patches are, in order:
* %autosetup -p...
Is it considered best practice to use %autosetup (over %setup) even if a package doesn't have patches? i.e. is it worth making that change or just leave such a package as is?
Yes. Please use %autosetup unless you have a really good reason not to. -- 真実はいつも一つ!/ Always, there's only one truth!
participants (3)
-
Dominique Leuenberger
-
Jason Craig
-
Neal Gompa