Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix header source/patch names disagreeing with src.rpm contents
If sources or patches in the spec are defined via a macro that does not yet exist, it'll still work for building if the macro has been defined by that time as there's another round of expansion there. But this can leave the source/patch names inserted to the header disagreeing with what actually ended up in the source package, eg in the testcase you'd previously get '%{somemacro}-2.0.tar.gz' in the header whereas the src.rpm had the right contents. While defining sources this way seems mad and brittle, it does actually work for building rpms and there's a whole ecosystem of packages relying on it in Fedora. So lets at least be consistent about it, and re-expand the source paths once more before inserting in the header, because that's what happens for them in the actual build as well. Originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=2233878
- Loading branch information