RPM support for semantic versioning

Thierry Vignaud thierry.vignaud at gmail.com
Thu Nov 6 11:16:06 UTC 2014

On 6 November 2014 09:40, Andreas Maier <MAIERA at de.ibm.com> wrote:
> Hi,
> Apologies if this has been discussed before, but I did not find it using
> G**gle... So here we go:
> I would like to use semantic versioning (see http://semver.org/) in a
> package. One particular definition in semantic versioning is that of a
> "pre-release". Quoting from its web page:
>    9. A pre-release version MAY be denoted by appending a hyphen and a
>       series of dot separated identifiers immediately following the patch
>       version. Identifiers MUST comprise only ASCII alphanumerics and
>       hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric
>       identifiers MUST NOT include leading zeroes. Pre-release versions
>       have a lower precedence than the associated normal version. A
>       pre-release version indicates that the version is unstable and might
>       not satisfy the intended compatibility requirements as denoted by its
>       associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1,
>       1.0.0-0.3.7, 1.0.0-x.7.z.92.
> According to this definition, a pre-version "1.2.3-beta.1" is *older* than
> the normal version "1.2.3".
> However, RPM considers that pre-version to be *younger* than the normal
> version.
> RPM instead supports the tilde to denote pre-versions, so "1.2.3~beta.1" is
> considered older than "1.2.3".
> My questions are:
> 1. Is there support in RPM today, for correctly treating pre-versions
> according to the semantic versioning definition?
> 2. If not, can it be added, maybe with an option?
> Andy
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list

With rpm >= 4.10.0, you should be able to use "1.2.3~beta.1" .
Using the tilde ("~") ensures rpm will treat it as less than 1.2.3

More information about the Rpm-list mailing list