RPM support for semantic versioning
Panu Matilainen
pmatilai at laiskiainen.org
Thu Nov 6 11:36:53 UTC 2014
On 11/06/2014 01:20 PM, Andreas Maier wrote:
>
>
> Panu Matilainen wrote on 06.11.2014 11:59:06:
>>
>> On 11/06/2014 10:40 AM, Andreas Maier wrote:
>>>
>>> My questions are:
>>> 1. Is there support in RPM today, for correctly treating pre-versions
>>> according to the semantic versioning definition?
>>
>> No. In rpm (and dpkg as well), the hyphen is the delimiter character
>> between name, version and release components and thus entirely illegal
>> in version.
>>
>> Note that rpm and dpkg predate semantic version spec by more than a
>> decade AFAICT so "correct" is entirely in the eye of the beholder.
>
> Agreed. I just wanted to express semantic version compatibility, and
> not judge RPM versioning vs. semantic versioning.
>
>>
>>> 2. If not, can it be added, maybe with an option?
>>
>> Highly unlikely, the use of '-' in semantic versioning is a
>> world-breaker in dpkg/rpm land already.
>>
>
> Ok, I understand that the hyphen from semantic versions could not show
> up in the actual package names.
>
> Would it then be possible to accept semantic version compatible version
> strings in RPM spec files and transform these versions to RPM
> compatible versions? E.g. semantic version "1.2.3-beta.1+build.987"
> would become RPM version "1.2.3~beta.1".
We're talking about changing a '-' into a '~', how hard could it
possibly be? ;) The much bigger question is whether such automatic
translations are always possible for all the differences between rpm and
semantic versioning (whatever they are). Dunno, but I doubt it.
- Panu -
More information about the Rpm-list
mailing list