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.
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 ofBUILD/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:
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 https://github.com/ComplianceAsCode/content/pull/12176