Fedora Account System
Red Hat Associate
Red Hat Customer
For an RPM with multiple sources the computed version string always includes the commit information for the secondary sources. I tried varying combinations of %forgemeta and %forgeversion with the -z option, but the end result is always an all inclusive version string. In a spec file with: %global forgeurl0 https://github.com/citeproc-py/citeproc-py %global forgeurl1 https://github.com/citation-style-language/schema %global forgeurl2 https://github.com/citation-style-language/locales %global version0 0.8.2 %global commit1 e295d63 %global commit2 bd8d2db %forgemeta -a Version: %forgeversion Release: %autorelease the final Version is set to "0.8.2-1.s20250328gite295d63.s20250328gitbd8d2db". According to the documentation in the source `-z0` is the default for %forgeversion. Passing `-z0` explicitly doesn't change anything. Seemingly `%forgemeta -a` gets in the way and overrules (passes on) the behavior to %forgeversion. When using `%forgemeta -z0` followed by `%forgeversion` it works. But since I need the other source URLs as weel,, I have to invoke `%forgemeta -z1` and `%forgemeta -z2` at some point. As soon as I invoke those the version string is expanded again regardless of whether or not I add `-z0` to `%forgeversion`. I would expect the following to work: %global forgeurl0 https://github.com/citeproc-py/citeproc-py %global forgeurl1 https://github.com/citation-style-language/schema %global forgeurl2 https://github.com/citation-style-language/locales %global version0 0.8.2 %global commit1 e295d63 %global commit2 bd8d2db %forgemeta -z0 Version: %forgeversion -z0 Release: %autorelease URL: %forgeurl Source0: %forgesource0 %forgemeta -z1 Source1: %forgesource1 %forgemeta -z2 Source2: %forgesource2 Though, it is a bit clumsy. I'd prefer the first snippet using `%forgemeta -a` and possibly having to add `-z0` to `%forgeversion`. Currently, no combination of flags or macro ordering appears to yield the desired result of not adding the `%_forgeversionsuffix` of the secondary sources to Version. Reproducible: Always
https://git.sr.ht/~gotmax23/forge-srpm-macros/commit/ca72c7b7fcf7672b5df10ccd5eeb24bd6df6f586