English Japanese
Versioning Guidelines
Fedora's package versioning scheme encompasses both the `+Version:+` and `+Release:+` tags, as well as `+Epoch:+`. The overriding goal is to provide sequences of packages which are treated as updates by RPM's version comparison algorithm while accommodating varied and often inconsistent upstream versioning schemes.
Some definitions
release version
A version of the software which upstream has decided to release. The act of releasing the software can be as simple as adding a git tag. This includes so-called "point releases" or "patchlevels" which some upstreams make, since those are actually assigned versions and released.
snapshot
An archive taken from upstream's source code control system which is not associated with any release version.
prerelease version
Before a release happens, many upstreams will decide which version that will release will have, and then produce "alphas", "betas", "release candidates", or the like which carry that new version but indicate that the release of that version has not yet been made. These we call prerelease versions. Any snapshots made while upstream is preparing for their release are also considered prerelease versions.
postrelease version
Any version which happens after a particular release is technically "post-release", but before upstream begins making prereleases for the next version, any snapshot is considered a postrelease version.
non-sorting version sequence
A sequence of version strings which is not ordered in the same way that RPM's version comparison function would order it. RPM has a somewhat complicated version comparison function which it will use to determine if a package is "newer". If upstream's idea of what constitutes a "newer" version differs from RPM's implementation then simply using upstream's versions directly will result in updates which don't actually update any packages.
Examples
Epoch: tag
Simple versioning
This is a very common versioning scheme, and the vast majority of software projects use something which works like this.
To package *release versions* of software using this versioning scheme:
Use the upstream verbatim in the `+Version:+` tag. Don't trim leading zeroes.
Use a `+Release:+` tag starting with 1 (never 0). Append the xref:DistTag.adoc[Dist Tag]. Increment the release (by 1) for each update you make. Reset to 1 whenever you change `+Version:+`.