-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix test-suite under Fedora 40 modern C rules #3094
Conversation
Multiple tests are failing on Fedora 40 due to their distro-wide C modernization effort, which cause our ancient "hello world" package to fail due to implicit printf() function usage. There are two separate issues here: - hello-autopatch.spec had off-by-one in its patch application, causing the modernization patch to not apply (see rpm-software-management#3093 for the reason) - others were using the original hello-1.0-1.src.rpm from 2007 with some very outdated practises, code and md5 hashes Update the src.rpm, removing silly fubar while we're at it. Regenerated now on x86_64 so adjust the test-expectation, and update the python archive test to calculate sha256 instead. And, fix the autopatch test numbers.
I wonder what happened to the "modernization" patch, though 😄 Since the |
IOW, it seems like a noop patch now (haven't tested manually). |
The modernization patch never was included in the src.rpm, it's only in separate specs based off that hello.spec. And, we still have the original hello-1.0.tar.gz to which the modernize patch applies (and is applied) in various other tests. |
Oh, right, my bad... The SRPM is of course not used in the autopatch test specifically (the tarball is separate indeed). And it's fixed in the SRPM for a reason (to avoid the compiler warning, now error). |
Require the Dockerfile to also match the host OS release, not just name, in order for mktree to enable "native" mode. In other words, stop overriding the FROM directive with the host OS version and assuming that the rest of the Dockerfile is compatible or tested against it. I was bitten by this recently when I upgraded my workstation to F40 and the tests, only ever tested against F39 at that point, started failing for me (and only me), see rpm-software-management#3094 and rpm-software-management#2799 for details if you're interested. Keep the --from override in mktree, though, as that will allow us to express additional compatible OS releases via Dockerfile symlinks instead of duplicating them (see the next commit).
Require the Dockerfile also match the host OS release, not just OS name, in order for mktree to enable "native" mode. In other words, stop overriding the FROM directive with the host OS version and assuming that the rest of the Dockerfile is compatible or tested against it. I was bitten by this recently when I upgraded my workstation to F40 and the tests, only ever tested against F39 at that point, started failing for me (and only me), see rpm-software-management#3094 and rpm-software-management#2799 for details if you're interested. Keep the --from override in mktree, though, as that will allow us to express additional compatible OS releases via Dockerfile symlinks instead of duplicating them (see the next commit).
When looking for a Dockerfile compatible with the host OS (for mktree to work in "native" mode), require that the OS release matches as well. In other words, stop overriding the FROM directive with the host OS version and assuming that the rest of the Dockerfile is compatible or tested against the same. I was bitten by this recently when I upgraded my workstation to F40 and the tests, only ever tested against F39 at that point, started failing for me (and only me), see rpm-software-management#3094 and rpm-software-management#2799 for details. Keep the --from override in mktree, though, as that will allow us to express additional compatible OS releases via Dockerfile symlinks instead of duplicating those files (see the next commit).
Multiple tests are failing on Fedora 40 due to their distro-wide C modernization effort, which cause our ancient "hello world" package to fail due to implicit printf() function usage.
There are two separate issues here:
Update the src.rpm, removing silly fubar while we're at it. Regenerated now on x86_64 so adjust the test-expectation, and update the python archive test to calculate sha256 instead. And, fix the autopatch test numbers.