nfpm can produce RPMs with an invalid verison field. This happens when the version contains multiple hyphens, e.g. 1.2.3-alpha-beta-gamma. nfpm will identify alpha-beta-gamma as the prerelease and correctly join it with the version using a tilde, producing 1.2.3~alpha-beta-gamma. However, this version is invalid because hyphens are not allowed in version strings according to the official RPM documentation.
RPM almost handles the version correctly, but since hyphens are used as delimiters for parsing a NEVRA, you hit odd behavior at times:
What happened?
nfpm can produce RPMs with an invalid verison field. This happens when the version contains multiple hyphens, e.g.
1.2.3-alpha-beta-gamma
. nfpm will identifyalpha-beta-gamma
as the prerelease and correctly join it with the version using a tilde, producing1.2.3~alpha-beta-gamma
. However, this version is invalid because hyphens are not allowed in version strings according to the official RPM documentation.RPM almost handles the version correctly, but since hyphens are used as delimiters for parsing a NEVRA, you hit odd behavior at times:
I think nfpm should either
_
,.
, or+
.How can we reproduce this?
nfpm.yaml
nfpm p -p rpm
nfpm version
Search
Code of Conduct
Additional context
No response