#416 Fix source flattening fix for newer RPM versions
Merged by mvadkert. Opened by psutter.
psutter/standard-test-roles flattening-fix  into  master

Download 416.patch

It looks like the original attempt at fixing for the described extra
build directory level remained in place by accident when pushing the
build directory discovery task: The latter returns {{srcdir}}
irrespective of RPM version which contains the extracted upstream source
tarball. The "Flatten sources" task is meant to strip the typically
contained top-level directory from there.

Fixes: 164e28b05d87c ("Correct source flattening for RPM 4.19.90+ (#2290735)")
Signed-off-by: Phil Sutter psutter@redhat.com

I'm not sure about this. What and where is "the build directory discovery task"?

oh, hmm, ISWYM. yeah...possibly I left the additional level of unpacking from the other PRs in this one. Though it seems odd nobody noticed for a year, including me. I'll have to try and find some affected packages again and see what's happening with their tests lately.

OK, it was a bit tricky, but I found a recent (i.e. not garbage collected...) Fedora update for a package that's still using standard-test-source - https://bodhi.fedoraproject.org/updates/FEDORA-2025-2e8686a9e2 - and indeed the test failed the same way - mv: will not overwrite just-created '/var/str//source/python-dasbus-1.7-build/__init__.py' with '/var/str//source/python-dasbus-1.7-build/dasbus-1.7/tests/__init__.py'.

So yeah, I think you're right and I boobooed this, and somehow nobody noticed.

:thumbsup:

Hi Adam,

OK, it was a bit tricky, but I found a recent (i.e. not garbage collected...) Fedora update for a package that's still using standard-test-source - https://bodhi.fedoraproject.org/updates/FEDORA-2025-2e8686a9e2 - and indeed the test failed the same way - mv: will not overwrite just-created '/var/str//source/python-dasbus-1.7-build/__init__.py' with '/var/str//source/python-dasbus-1.7-build/dasbus-1.7/tests/__init__.py'.

So yeah, I think you're right and I boobooed this, and somehow nobody noticed.

:thumbsup:

Yes, the trick is to have a package which has subdirectories in its source tree with identical files, typically stuff like Makefile*. Maybe this is not as common as I expect wrt. the projects I usually work on? OTOH, standard-test-source task may just be rarely used nowadays, no idea.

Anyway, thanks for digging up a separate proof for my claim!

it does seem to be rarely used, yeah. I grepped my packages directory, which has 516 packages in it, for standard-test-source and only found a handful, and most of those had already updated to TMT when I git pulled them. So that might be why nobody noticed, I guess.

What is the status here, @adamwill ?
I still have this pending conntrack-tools update which is stuck in CI pipeline due to this bug.

I can't merge this, I don't own this project. I sent my change as a PR. Mine was merged by @msrb , maybe he can help?

We will take care of it in Testing Farm 2025-09.1 scheduled to be released next week (we did not make it this week)

Commit bac17971 fixes this pull-request

Pull-Request has been merged by mvadkert

Pull-Request has been merged by mvadkert

Metadata