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

Search for extracted rpm src dir instead of hardcoded path #266

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

mildas
Copy link
Contributor

@mildas mildas commented Sep 26, 2024

In Fedora 41<=, RPM 4.20 introduced Guaranteed per-build directory causing rpmbuild process extract the sources to BUILD/foo-<version>-build/foo-<version>/ instead of BUILD/foo-<version>/.
https://artifacts.dev.testing-farm.io/d009d9a8-6ded-4578-b2f8-31163d6ada1d/

The simplest and obvious solution to me (keeping it compatible with old RPM versions) is just to search for the directory. Hardcoding is not the right way. Citing one of comments from rpm Github issues:

Rpm never gave any promises about the directory outside itself, but when a thing stays the same for 20+ years people start assuming it, fact of life.

So far only Fedora41<= is affected and blocks rpmbuild test introduction to content upstream CI (only Fedora jobs). I know Contest doesn't support Fedora, but wouldn't hold my breath they don't introduce it to RHEL10 Beta as well.

Being tested in ComplianceAsCode/content#12176

@mildas mildas force-pushed the rpm420 branch 2 times, most recently from 16e231a to fe6dab9 Compare September 26, 2024 12:56
@comps
Copy link
Contributor

comps commented Sep 26, 2024

Sure, LGTM.

Maybe some short comment explaining why we do it like that would be useful in the code.

@mildas
Copy link
Contributor Author

mildas commented Sep 26, 2024

@comps comment added

@mildas mildas merged commit 0da7fe5 into RHSecurityCompliance:main Sep 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants