Yesterday, we ran into an issue where some of rpm upstream testcases are
suddenly failing on one system. The difference to everybody elses
working tests turned out to be Fedora 40, and was easily reproduced
elsewhere on F40 then.
On a closer look, the failing tests were all complaining about implicit
function declarations. Okay, something to do with the C modernization
change. The first of the failure cases was supposed to patch the old
source against this though, but somehow the patch wasn't getting
applied. WTH? There was a bit of a panic rising, are we missing patch
applications somehow? And as a result of the C modernization changes? What?
Looking closer still, the failing test had this:
---
%patchlist
hello-1.0-modernize.patch
hello-1.0-install.patch
%prep
%autosetup -N
%autopatch 1
%autopatch -m 2
---
Spot the error?
Patch and source numbers start from zero, that goes for automatically
numbered patches too. So there's an off by one in the application, and
the latter %autopatch which is supposed to apply patches >= 2 simply has
nothing to do, and falls through silently. That's a bug of course in
itself, filed now:
https://github.com/rpm-software-management/rpm/issues/3093
The rest of the failures were simply using a common old source from who
knows when, relying on implicitly defined printf(). So no hair-rising
silent patch application failure bugs, thankfully.
We had a pretty good laugh over the whole thing once it unravelled.
Cheers for the C modernization change work for unearthing these little
buglets.
- Panu -
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue