Skip to content
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

Merged
merged 1 commit into from
May 13, 2024

Conversation

pmatilai
Copy link
Member

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.

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.
@pmatilai pmatilai added the test Testsuite-related label May 13, 2024
@dmnks
Copy link
Contributor

dmnks commented May 13, 2024

I wonder what happened to the "modernization" patch, though 😄 Since the hello.c file now has the patch "applied" in the SRPM.

@dmnks
Copy link
Contributor

dmnks commented May 13, 2024

IOW, it seems like a noop patch now (haven't tested manually).

@pmatilai
Copy link
Member Author

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.

@dmnks
Copy link
Contributor

dmnks commented May 13, 2024

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).

@dmnks dmnks merged commit ed1f2da into rpm-software-management:master May 13, 2024
1 check passed
dmnks added a commit to dmnks/rpm that referenced this pull request Jun 7, 2024
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).
dmnks added a commit to dmnks/rpm that referenced this pull request Jun 7, 2024
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).
dmnks added a commit to dmnks/rpm that referenced this pull request Jun 7, 2024
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Testsuite-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants