From Fedora Project Wiki

No edit summary
(Spiff up the first table a bit)
 
(12 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Fedora Versioning Examples}}
{{DISPLAYTITLE:Fedora Versioning Examples}}
<div style="float: right; margin-left: 0.5em" class="toclimit-2">__TOC__</div>
<div style="float: right; margin-left: 0.5em" class="toclimit-2">__TOC__</div>
Each of these examples shows a versioning scenario.  The sequence of versions used


Ideally there will be at least one example here for every tricky versioning scenario.
Ideally there will be at least one example here for every tricky versioning scenario.


Things to add which we don't currently have examples for:
Things to add which we don't currently have examples for:
* Upstream just uses random words as names: "spectacled", "cinnamon", "polar", "kodiak".
* Upstream uses negative numbers.  "1.-1.7", "1.-1.8", "1.0.0".  (I sure hope nobody ever does this, but I don't actually know how we would handle it.)


* Upstream just uses random words as names: "spectacled", "cinnamon", "polar", "kodiak".
== Simple versioning examples ==


* Upstream uses negative numbers. "1.-1.7", "1.-1.8", "1.0.0"(I sure hope nobody ever does this, but I don't actually know how we would handle it.)
{| class="wikitable" style="width: 100%"
|+ '''Some basic examples'''
|-
!rowspan=2 style="vertical-align:bottom;"|Upstream
|colspan=3 style="font-size: 120%; text-align:center;"|'''Simple versioning'''
|- <!-- column headers -->
!style="width:5em;"|Version:
!style="width:7em;"|Release:
! Explanation
|-
! 1.0
| <code>1.0</code> || <code>1%{?dist}</code> || The first release.
|-
! 1.1
| <code>1.1</code> || <code>1%{?dist}</code> || An upstream update.
|-
! 1.1
| <code>1.1</code> || <code>2%{?dist}</code> || You made a change to the package but the upstream version didn't change.
|-
! 1.2
| <code>1.2</code> || <code>1%{?dist}</code> || The upstream version changed, so Release: goes back to 1.
|-
! 1.2.1
| <code>1.2.1</code> || <code>1%{?dist}</code> || Extra levels of versioning are OK.
|-
! 1.3
| <code>1.3</code> || <code>1%{?dist}</code> || They can come and go without problems.
|-
!rowspan=2|
|colspan=3 style="font-size: 120%; text-align:center;"|'''Simple version with letters'''
|-
! Version: !! Release: !! Explanation
|-
! 5.2
| <code>5.2</code> || <code>1%{?dist}</code> ||
|-
! 5.2a
| <code>5.2a</code> || <code>1%{?dist}</code> || Upstream introduced a letter to indicate a patch releaseYou trust upstream to use letters in alphabetical order, so it's OK to use the version as is.
|-
! 5.2b
| <code>5.2b</code> || <code>1%{?dist}</code> ||
|-
! 5.2b.1
| <code>5.2b.1</code> || <code>1%{?dist}</code> || Even this is OK as long as the sequence increases.
|-
! 5.3
| <code>5.3</code> || <code>1%{?dist}</code> ||
|}


== Complex versioning examples ==


Example (post-release cvs):
Example (post-release cvs):
<pre>
<pre>
kismet-1.0-1%{?dist} (this is the formal release of kismet 1.0)
pkg-1.0-1%{?dist} (this is the formal release of pkg 1.0)
kismet-1.0-2%{?dist} (this is a bugfix build to the 1.0 release)
pkg-1.0-2%{?dist} (this is a bugfix build to the 1.0 release)
kismet-1.0-3.20050515cvs%{?dist} (move to a post-release cvs checkout)
pkg-1.0-3.20050515cvs%{?dist} (move to a post-release cvs checkout)
kismet-1.0-4.20050515cvs%{?dist} (bugfix to the post-release cvs checkout)
pkg-1.0-4.20050515cvs%{?dist} (bugfix to the post-release cvs checkout)
kismet-1.0-5.20050517cvs%{?dist} (new cvs checkout, note the increment of %{X})
pkg-1.0-5.20050517cvs%{?dist} (new cvs checkout, note the increment of %{X})
</pre>
</pre>


==== Examples ====
{| cellpadding=1
{|
|+ '''Example (pkg pre-release)'''
|+ '''Example (mozilla pre-release)'''
|-
|-
! Source Archive !! Description
! Source Archive !! Description
|-
|-
|style=white-space:nowrap| <code>mozilla-1.4a.tar.gz</code> || (this is a pre-release, version 1.4a of mozilla)
|style=white-space:nowrap| <code>pkg-1.4a.tar.gz</code> || (this is a pre-release, version 1.4a of pkg)
|-
|-
| <code>mozilla-1.4.tar.gz</code> || (this is what the 1.4 release will actually look like)
| <code>pkg-1.4.tar.gz</code> || (this is what the 1.4 release will actually look like)
|-
|-
! Release Tag !! Explanation
! Release Tag !! Explanation
|-
|-
| <code>mozilla-1.4-0.1.a%{?dist}</code> || (so, this is the acceptable Fedora <code>%{name}-%{version}-%{release}</code>)
| <code>pkg-1.4-0.1.a%{?dist}</code> || (so, this is the acceptable Fedora <code>%{name}-%{version}-%{release}</code>)
|-
|-
| <code>mozilla-1.4-1%{?dist}</code> || (and this is what the 1.4 release Fedora <code>%{name}-%{version}-%{release}</code> should be)
| <code>pkg-1.4-1%{?dist}</code> || (and this is what the 1.4 release Fedora <code>%{name}-%{version}-%{release}</code> should be)
|}
|}




{|
{|
|+ '''Example (alsa-lib pre-release)'''
|+ '''Example (pkg pre-release)'''
|-
|-
! Source Archive !! Description
! Source Archive !! Description
|-
|-
|style=white-space:nowrap| <code>alsa-lib-0.9.2beta1.tar.gz</code> || (this is a beta release of alsa-lib, version 0.9.2beta1)
|style=white-space:nowrap| <code>pkg-0.9.2beta1.tar.gz</code> || (this is a beta release of pkg, version 0.9.2beta1)
|-
|-
! Release Tag !! Explanation
! Release Tag !! Explanation
|-
|-
| <code>alsa-lib-0.9.2-0.1.beta1%{?dist}</code> || (this is the correct Fedora <code>%{name}-%{version}-%{release}</code>)
| <code>pkg-0.9.2-0.1.beta1%{?dist}</code> || (this is the correct Fedora <code>%{name}-%{version}-%{release}</code>)
|-
|-
| <code>alsa-lib-0.9.2-0.2.beta1%{?dist}</code> || (this is an incremented Fedora <code>%{name}-%{version}-%{release}</code>. Note that the first 0 is not incremented.)
| <code>pkg-0.9.2-0.2.beta1%{?dist}</code> || (this is an incremented Fedora <code>%{name}-%{version}-%{release}</code>. Note that the first 0 is not incremented.)
|}
|}




{|
{|
|+ '''Example (kismet pre-release svn checkout)'''
|+ '''Example (pkg pre-release svn checkout)'''
|-
|-
! Release Tag !! Explanation
! Release Tag !! Explanation
|-
|-
|style=white-space:nowrap| <code>kismet-0-0.1.20040110svn%{?dist}</code> || (this is a pre-release, svn checkout of kismet)
|style=white-space:nowrap| <code>pkg-0-0.1.20040110svn%{?dist}</code> || (this is a pre-release, svn checkout of pkg)
|-
|-
| <code>kismet-0-0.2.20040110svn%{?dist}</code> || (this is a bugfix to the previous package)
| <code>pkg-0-0.2.20040110svn%{?dist}</code> || (this is a bugfix to the previous package)
|-
|-
| <code>kismet-0-0.3.20040204svn%{?dist}</code> || (this is a new svn checkout, note the increment of <code>%{X}</code>)
| <code>pkg-0-0.3.20040204svn%{?dist}</code> || (this is a new svn checkout, note the increment of <code>%{X}</code>)
|-
|-
| <code>kismet-1.0-1%{?dist}</code> || (this is the formal release of kismet 1.0)
| <code>pkg-1.0-1%{?dist}</code> || (this is the formal release of pkg 1.0)
|}
|}




{|
{| style="width: 100%"
|+ '''Upgrade Path Example (mozilla)'''
|+ '''Upgrade Path Example'''
|-
|-
! Release Tag !! Explanation
! Release Tag !! Explanation
|-
|-
|style=white-space:nowrap| <code>mozilla-1.4-0.1.a%{?dist}</code> || (this is the Fedora package for 1.4a, as [[#PreReleaseExampleMozilla|above]])
|style=white-space:nowrap| <code>pkg-1.4-0.1.a%{?dist}</code> || (this is the Fedora package for 1.4a, as [[#PreReleaseExamplepkg|above]])
|-
|-
| <code>mozilla-1.4-0.2.a%{?dist}</code> || (this is the first patch on top of 1.4a)
| <code>pkg-1.4-0.2.a%{?dist}</code> || (this is the first patch on top of 1.4a)
|-
|-
| <code>mozilla-1.4-0.3.a%{?dist}</code> || (this is another new patch on top of 1.4a)
| <code>pkg-1.4-0.3.a%{?dist}</code> || (this is another new patch on top of 1.4a)
|-
|-
| <code>mozilla-1.4-0.4.b%{?dist}</code> || (this is the first build after upgrade to 1.4b)
| <code>pkg-1.4-0.4.b%{?dist}</code> || (this is the first build after upgrade to 1.4b)
|-
|-
| <code>mozilla-1.4-0.5.b%{?dist}</code> || (this is a new patch on top of 1.4b)
| <code>pkg-1.4-0.5.b%{?dist}</code> || (this is a new patch on top of 1.4b)
|-
|-
| <code>mozilla-1.4-1%{?dist}</code> || (this is after moving to 1.4 "final", and to a normal version)
| <code>pkg-1.4-1%{?dist}</code> || (this is after moving to 1.4 "final", and to a normal version)
|-
|-
| <code>mozilla-1.4-2%{?dist}</code> || (this is a new patch on top of 1.4 "final")
| <code>pkg-1.4-2%{?dist}</code> || (this is a new patch on top of 1.4 "final")
|}
|}




{|
{|
|+ '''Upgrade Path Example (alsa-lib)'''
|+ '''Upgrade Path Example (pkg)'''
|-
|-
! Release Tag !! Explanation
! Release Tag !! Explanation
|-
|-
|style=white-space:nowrap| <code>alsa-lib-0.9.2-0.1.beta1%{?dist}</code> || (this is the Fedora package for 0.9.2beta1, as [[#PreReleaseExampleAlsaLib|above]])
|style=white-space:nowrap| <code>pkg-0.9.2-0.1.beta1%{?dist}</code> || (this is the Fedora package for 0.9.2beta1, as [[#PreReleaseExampleAlsaLib|above]])
|-
|-
| <code>alsa-lib-0.9.2-0.2.beta1%{?dist}</code> || (this is a new patch on top of 0.9.2beta1)
| <code>pkg-0.9.2-0.2.beta1%{?dist}</code> || (this is a new patch on top of 0.9.2beta1)
|-
|-
| <code>alsa-lib-0.9.2-0.3.beta2%{?dist}</code> || (this is after upgrading to 0.9.2beta2)
| <code>pkg-0.9.2-0.3.beta2%{?dist}</code> || (this is after upgrading to 0.9.2beta2)
|-
|-
| <code>alsa-lib-0.9.2-0.4.beta3%{?dist}</code> || (this is after upgrading to 0.9.2beta3)
| <code>pkg-0.9.2-0.4.beta3%{?dist}</code> || (this is after upgrading to 0.9.2beta3)
|-
|-
| <code>alsa-lib-0.9.2-0.5.beta3%{?dist}</code> || (this is a new patch on top of 0.9.2beta3)
| <code>pkg-0.9.2-0.5.beta3%{?dist}</code> || (this is a new patch on top of 0.9.2beta3)
|-
|-
| <code>alsa-lib-0.9.2-0.6.rc1%{?dist}</code> || (this is after upgrading to 0.9.2rc1)
| <code>pkg-0.9.2-0.6.rc1%{?dist}</code> || (this is after upgrading to 0.9.2rc1)
|-
|-
| <code>alsa-lib-0.9.2-0.7.rc2%{?dist}</code> || (this is after upgrading to 0.9.2rc2)
| <code>pkg-0.9.2-0.7.rc2%{?dist}</code> || (this is after upgrading to 0.9.2rc2)
|-
|-
| <code>alsa-lib-0.9.2-1%{?dist}</code> || (this is after upgrading to 0.9.2 "final", version becomes normal)
| <code>pkg-0.9.2-1%{?dist}</code> || (this is after upgrading to 0.9.2 "final", version becomes normal)
|-
|-
| <code>alsa-lib-0.9.2-2%{?dist}</code> || (this is a new patch on top of 0.9.2 "final")
| <code>pkg-0.9.2-2%{?dist}</code> || (this is a new patch on top of 0.9.2 "final")
|}
|}


Example (complicated post-release):
Example (complicated post-release):
<pre>
<pre>
foo-1.1.0-0.1.BETA%{?dist} (this is a prerelease, first beta)
pkg-1.1.0-0.1.BETA%{?dist} (this is a prerelease, first beta)
foo-1.1.0-0.2.BETA1%{?dist} (this is a prerelease, second beta)
pkg-1.1.0-0.2.BETA1%{?dist} (this is a prerelease, second beta)
foo-1.1.0-0.3.BETA2%{?dist} (this is a prerelease, third beta)
pkg-1.1.0-0.3.BETA2%{?dist} (this is a prerelease, third beta)
foo-1.1.0-0.4.CR1%{?dist} (this is a prerelease, candidate release 1)
pkg-1.1.0-0.4.CR1%{?dist} (this is a prerelease, candidate release 1)
foo-1.1.0-0.5.CR2%{?dist} (this is a prerelease, candidate release 2)
pkg-1.1.0-0.5.CR2%{?dist} (this is a prerelease, candidate release 2)
foo-1.1.0-1%{?dist} (final release)
pkg-1.1.0-1%{?dist} (final release)
foo-1.1.0-2.GA1%{?dist} (post release, GA1)
pkg-1.1.0-2.GA1%{?dist} (post release, GA1)
foo-1.1.0-3.CP1%{?dist} (post release, CP1, after GA1)
pkg-1.1.0-3.CP1%{?dist} (post release, CP1, after GA1)
foo-1.1.0-4.CP2%{?dist} (post release, CP2, after CP1)
pkg-1.1.0-4.CP2%{?dist} (post release, CP2, after CP1)
foo-1.1.0-5.SP1%{?dist} (post release, SP1, after CP2)
pkg-1.1.0-5.SP1%{?dist} (post release, SP1, after CP2)
foo-1.1.0-6.SP1_CP1%{?dist} (post release, SP1_CP1, after SP1)
pkg-1.1.0-6.SP1_CP1%{?dist} (post release, SP1_CP1, after SP1)
</pre>
</pre>
{| style="width: 100%"
|+ Template
|-
! Upstream version !! Description !! Version: !! Release: !! Explanation
|-
|}

Latest revision as of 09:39, 28 April 2020

Each of these examples shows a versioning scenario. The sequence of versions used

Ideally there will be at least one example here for every tricky versioning scenario.

Things to add which we don't currently have examples for:

  • Upstream just uses random words as names: "spectacled", "cinnamon", "polar", "kodiak".
  • Upstream uses negative numbers. "1.-1.7", "1.-1.8", "1.0.0". (I sure hope nobody ever does this, but I don't actually know how we would handle it.)

Simple versioning examples

Some basic examples
Upstream Simple versioning
Version: Release: Explanation
1.0 1.0 1%{?dist} The first release.
1.1 1.1 1%{?dist} An upstream update.
1.1 1.1 2%{?dist} You made a change to the package but the upstream version didn't change.
1.2 1.2 1%{?dist} The upstream version changed, so Release: goes back to 1.
1.2.1 1.2.1 1%{?dist} Extra levels of versioning are OK.
1.3 1.3 1%{?dist} They can come and go without problems.
Simple version with letters
Version: Release: Explanation
5.2 5.2 1%{?dist}
5.2a 5.2a 1%{?dist} Upstream introduced a letter to indicate a patch release. You trust upstream to use letters in alphabetical order, so it's OK to use the version as is.
5.2b 5.2b 1%{?dist}
5.2b.1 5.2b.1 1%{?dist} Even this is OK as long as the sequence increases.
5.3 5.3 1%{?dist}

Complex versioning examples

Example (post-release cvs):

pkg-1.0-1%{?dist} (this is the formal release of pkg 1.0)
pkg-1.0-2%{?dist} (this is a bugfix build to the 1.0 release)
pkg-1.0-3.20050515cvs%{?dist} (move to a post-release cvs checkout)
pkg-1.0-4.20050515cvs%{?dist} (bugfix to the post-release cvs checkout)
pkg-1.0-5.20050517cvs%{?dist} (new cvs checkout, note the increment of %{X})
Example (pkg pre-release)
Source Archive Description
pkg-1.4a.tar.gz (this is a pre-release, version 1.4a of pkg)
pkg-1.4.tar.gz (this is what the 1.4 release will actually look like)
Release Tag Explanation
pkg-1.4-0.1.a%{?dist} (so, this is the acceptable Fedora %{name}-%{version}-%{release})
pkg-1.4-1%{?dist} (and this is what the 1.4 release Fedora %{name}-%{version}-%{release} should be)


Example (pkg pre-release)
Source Archive Description
pkg-0.9.2beta1.tar.gz (this is a beta release of pkg, version 0.9.2beta1)
Release Tag Explanation
pkg-0.9.2-0.1.beta1%{?dist} (this is the correct Fedora %{name}-%{version}-%{release})
pkg-0.9.2-0.2.beta1%{?dist} (this is an incremented Fedora %{name}-%{version}-%{release}. Note that the first 0 is not incremented.)


Example (pkg pre-release svn checkout)
Release Tag Explanation
pkg-0-0.1.20040110svn%{?dist} (this is a pre-release, svn checkout of pkg)
pkg-0-0.2.20040110svn%{?dist} (this is a bugfix to the previous package)
pkg-0-0.3.20040204svn%{?dist} (this is a new svn checkout, note the increment of %{X})
pkg-1.0-1%{?dist} (this is the formal release of pkg 1.0)


Upgrade Path Example
Release Tag Explanation
pkg-1.4-0.1.a%{?dist} (this is the Fedora package for 1.4a, as above)
pkg-1.4-0.2.a%{?dist} (this is the first patch on top of 1.4a)
pkg-1.4-0.3.a%{?dist} (this is another new patch on top of 1.4a)
pkg-1.4-0.4.b%{?dist} (this is the first build after upgrade to 1.4b)
pkg-1.4-0.5.b%{?dist} (this is a new patch on top of 1.4b)
pkg-1.4-1%{?dist} (this is after moving to 1.4 "final", and to a normal version)
pkg-1.4-2%{?dist} (this is a new patch on top of 1.4 "final")


Upgrade Path Example (pkg)
Release Tag Explanation
pkg-0.9.2-0.1.beta1%{?dist} (this is the Fedora package for 0.9.2beta1, as above)
pkg-0.9.2-0.2.beta1%{?dist} (this is a new patch on top of 0.9.2beta1)
pkg-0.9.2-0.3.beta2%{?dist} (this is after upgrading to 0.9.2beta2)
pkg-0.9.2-0.4.beta3%{?dist} (this is after upgrading to 0.9.2beta3)
pkg-0.9.2-0.5.beta3%{?dist} (this is a new patch on top of 0.9.2beta3)
pkg-0.9.2-0.6.rc1%{?dist} (this is after upgrading to 0.9.2rc1)
pkg-0.9.2-0.7.rc2%{?dist} (this is after upgrading to 0.9.2rc2)
pkg-0.9.2-1%{?dist} (this is after upgrading to 0.9.2 "final", version becomes normal)
pkg-0.9.2-2%{?dist} (this is a new patch on top of 0.9.2 "final")

Example (complicated post-release):

pkg-1.1.0-0.1.BETA%{?dist} (this is a prerelease, first beta)
pkg-1.1.0-0.2.BETA1%{?dist} (this is a prerelease, second beta)
pkg-1.1.0-0.3.BETA2%{?dist} (this is a prerelease, third beta)
pkg-1.1.0-0.4.CR1%{?dist} (this is a prerelease, candidate release 1)
pkg-1.1.0-0.5.CR2%{?dist} (this is a prerelease, candidate release 2)
pkg-1.1.0-1%{?dist} (final release)
pkg-1.1.0-2.GA1%{?dist} (post release, GA1)
pkg-1.1.0-3.CP1%{?dist} (post release, CP1, after GA1)
pkg-1.1.0-4.CP2%{?dist} (post release, CP2, after CP1)
pkg-1.1.0-5.SP1%{?dist} (post release, SP1, after CP2)
pkg-1.1.0-6.SP1_CP1%{?dist} (post release, SP1_CP1, after SP1)
Template
Upstream version Description Version: Release: Explanation