devel-versioning.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 10 Feb 2018 01:49:07 +0200
changeset 2230 9e6ad6607a9e
parent 2228 837f1337c59b
permissions -rw-r--r--
Fixed formatting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1115
diff changeset
     1
.. -*- coding: utf-8; -*-
1032
4decc3e00bb6 Fix coding and contents.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1009
diff changeset
     2
921
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
=================
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
 Version format.
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
=================
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
     7
   :local:
921
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
     9
Feature set versioning.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    10
=======================
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    11
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    12
Feature set versioning pretend to show how serious changes made according to
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    13
feature availability and how compatible these versions.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    14
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    15
Marketing versioning.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    16
=====================
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    17
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    18
Marketing versioning schema used for marketing, advertising, branding purpose.
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    19
It is usually inconsistent and can changed over the time.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    20
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    21
Examples of marketing version schema:
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    22
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    23
* Years.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    24
* Ancient gods.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    25
* Star/satellite/galactic names.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    26
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    27
Look thread for GDB:
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    28
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    29
* http://www.cygwin.com/ml/gdb/2007-07/msg00061.html
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    30
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    31
There discussed:
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    32
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    33
* Is it essential to update major version if significant change made for
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    34
  licence? Answer: **NO**!
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    35
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    36
  GPLv3 is a big deal spread out over the whole GNU project, but not a big deal
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    37
  for GDB in particular.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    38
* Is it right follow date version schema regardless major changes? Answer:
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    39
  **NO**!
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    40
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    41
  Many OS distribution encode year in versions but versions does not present
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    42
  featureset but package set instead.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    43
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    44
Year as version name.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    45
---------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    46
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    47
If year used as version some people can decide that 2005 is too old and broken
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    48
if it used in 2007. So companies release product by leading year number. So in
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    49
2007 they release 2008 version.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    50
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    51
Version name components.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    52
========================
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    53
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    54
* major
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    55
* minor
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    56
* patch (patchlevel), micro
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    57
* rev (revision)
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    58
* build
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    59
* date
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    60
* hotfix, fix
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    61
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    62
Version components usually combined in such group::
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    63
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    64
  major.minor.build
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    65
  major.minor.date
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    66
  major.minor.hotfix
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    67
  major.minor.hotfix.build
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    68
  major.minor.rev
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    69
  major.minor.rev.build
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    70
  major.current.age
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    71
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    72
Its conventional to have at least a major and minor number.
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    73
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    74
Prefixing version with a "v" seems to be less common.
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
    75
1098
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    76
Version in package/release name.
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    77
================================
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    78
::
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    79
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    80
  PACKAGE-MAJ.MIN.FIX.tar.gz   (Common style)
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    81
  PACKAGE-MAJ.MIN.FIX.zip
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    82
  PACKAGE-MAJ.MIN.FIX-DISTROFIX.tar.gz  (Cygwin style)
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    83
  PACKAGE_EPOCH:MAJ.MIN.FIX-DISTROFIX_ARCH.deb (Debian style)
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    84
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    85
From "Debian Policy Manual"::
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    86
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    87
  Package names must consist only of lower case letters (`a-z'), digits
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    88
  (`0-9'), plus (`+') and minus (`-') signs, and periods (`.').  They
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    89
  must be at least two characters long and must start with an
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    90
  alphanumeric character.
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    91
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    92
If you look carefully there are no any ``_`` (underscore) chars!! Also ``-`` is
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    93
portable char in file name accoding to POSIX.
db420d971363 Version in package/release name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1097
diff changeset
    94
1057
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
    95
Versioning for libraries/modules/components.
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
    96
============================================
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
    97
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    98
Major version component.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
    99
------------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   100
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   101
Major number change means that fundamental change made in the architecture of
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   102
the system the new version is incompatible with the old one, upgrade between
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   103
versions is non-trivial, and any dependent of the prior version will require
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   104
code changes to upgrade to the new package.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   105
1004
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   106
Major number rare changed (this can take a lot of year).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   107
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   108
Minor version component.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   109
------------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   110
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   111
Minor number change means that the new version is backward compatible with the
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   112
previous version but has significant enhancements over the previous version
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   113
(like new functionality or changed UI).
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   114
1004
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   115
Functional enhancement releases. Contain new or significantly changed
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   116
functionality and/or layout.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   117
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   118
New releases are usually only published several times a year or less.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   119
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   120
Revision, micro, bugfix version component.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   121
------------------------------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   122
1007
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   123
Revision number is updated whenever a bugfix or security patche is applied to
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   124
the build such that it doesn't bring a compatibility change or introduce newer
f7a62b2027ea Version components usually combined in such group.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1004
diff changeset
   125
features.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   126
1004
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   127
Patches are released frequently (sometimes daily).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1003
diff changeset
   128
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   129
Milestone markers.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   130
------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   131
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   132
* a (alpha) means new development is complete and code checkins are frozen.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   133
  Alpha builds should work well enough to be testable.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   134
* b (beta) means most severe bugs are fixed and end users can start trying the
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   135
  release.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   136
* rc (release candidate) are believed to meet all of the criteria for release
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   137
  and can be installed on test instances of production systems.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   138
1107
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   139
Compatibility formula.
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   140
----------------------
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   141
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   142
Assume that app linked with new version of lib. Thus::
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   143
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   144
  is_compatible_with_old(old, new) {
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   145
    if (old.major != new.major) return 0;
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   146
    if (old.minor > new.minor) return 0;
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   147
    return 1;
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   148
  }
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   149
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   150
Assume that app linked with old version of lib. Thus::
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   151
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   152
  is_compatible_with_new(old, new) {
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   153
    if (old.major != new.major) return 0;
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   154
    return 1;
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   155
  }
4473feb406cf Move "Compatibility formula" to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1106
diff changeset
   156
1057
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   157
Versioning for products.
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   158
========================
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   159
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   160
Versioning for products differ from versioning for libraries.
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   161
1099
97e0815972e0 Switching from old to new require upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1098
diff changeset
   162
Product is a set of conponents that stalled to some versions. Components can be
1057
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   163
switches as written for library versioning:
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   164
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   165
* Any fix releases interchanged, greater version mean less bug count.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   166
* Any minor release interchanged with next minor releases.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   167
* Major release does not interchanged at all, switching from old to new require
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   168
  upgrade.
1057
8e946a8709e0 Versioning for products.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1042
diff changeset
   169
1058
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   170
Product update vs upgrade.
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   171
--------------------------
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   172
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   173
Product update involve:
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   174
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   175
* Replacing product executable files, resources files.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   176
* Config files and user data stay unchanged.
1058
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   177
1099
97e0815972e0 Switching from old to new require upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1098
diff changeset
   178
Product upgrade involve:
1058
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   179
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   180
* Replacing product executable files, resources files.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   181
* Config files and used data require modification and performed by upgrade
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   182
  scripts or manually by user (if this is ever possible).
1058
cd1062303157 Product update vs upgrade.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1057
diff changeset
   183
1100
b1bc3f723e14 Build data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1099
diff changeset
   184
Build data.
b1bc3f723e14 Build data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1099
diff changeset
   185
===========
947
1c8a139fc25d Release build version data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 921
diff changeset
   186
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   187
* Build number.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   188
* Build date.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   189
* VCS revision.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   190
* Branch-tag used.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   191
* Overnight build (Y/N).
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   192
* QA tested (Y/N).
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   193
* QA test results (Pass/Fail).
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   194
* Location of full build logs.
947
1c8a139fc25d Release build version data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 921
diff changeset
   195
1042
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   196
Stop your VCS hook to update version!
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   197
=====================================
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   198
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   199
Don't update version without human decision.
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   200
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   201
Why do not do this on success build:
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   202
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   203
* You can have several build machine which may concurrently update version.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   204
* There does not exist tools for easy querying for status of build by its
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   205
  number (as ok/fail, build configuration, date, coverage, lint checks status,
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   206
  etc).
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   207
* Some part of development team may not have permission for bumping version and
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   208
  they must revert some automatically updated files after build.
1042
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   209
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   210
Why do not do this from pre-/post-commit hooks:
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   211
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   212
* Some changes can only partially introduce feature/bugfix.
1042
dd197cbdaf21 Stop your VCS hook to update version!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   213
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   214
Version ordering formula.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   215
=========================
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   216
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   217
Strongly recommend:
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   218
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   219
* Numbers are not decimal fractions. They are integers separated by delimiters.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   220
* Only offically released versions of the program get version numbers.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   221
  Development snapshots don't. Nor do test releases.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   222
* If the last component is zero, it may be omitted. Do not distinguish version
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   223
  X.Y from version X.Y.0.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   224
* Avoid using anything other than numbers in version numbers.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   225
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   226
Debian version ordering formula.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   227
--------------------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   228
1104
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   229
The version number of a package.  The format is::
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   230
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   231
  [<epoch>`:']<upstream_version>[`-'<debian_revision>]
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   232
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   233
The three components here are:
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   234
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   235
``epoch``
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   236
     This is a single (generally small) unsigned integer.  It may be
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   237
     omitted, in which case zero is assumed.  If it is omitted then
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   238
     the <upstream_version> may not contain any colons.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   239
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   240
     It is provided to allow mistakes in the version numbers of older
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   241
     versions of a package, and also a package's previous version
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   242
     numbering schemes, to be left behind.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   243
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   244
``upstream_version``
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   245
     This is the main part of the version number.  It is usually the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   246
     version number of the original ("upstream") package from which
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   247
     the ``.deb`` file has been made, if this is applicable.  Usually
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   248
     this will be in the same format as that specified by the upstream
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   249
     author(s); however, it may need to be reformatted to fit into the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   250
     package management system's format and comparison scheme.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   251
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   252
     The comparison behavior of the package management system with
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   253
     respect to the <upstream_version> is described below.  The
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   254
     <upstream_version> portion of the version number is mandatory.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   255
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   256
     The <upstream_version> may contain only alphanumerics[1] and the characters
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   257
     ``.`` ``+`` ``-`` ``:`` ``~`` (full stop, plus, hyphen, colon, tilde) and
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   258
     should start with a digit. If there is no <debian_revision> then hyphens
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   259
     are not allowed; if there is no <epoch> then colons are not allowed.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   260
1106
24c790c45f8b Add a lot of Reference.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1104
diff changeset
   261
``debian_revision``
1104
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   262
     This part of the version number specifies the version of the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   263
     Debian package based on the upstream version.  It may contain
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   264
     only alphanumerics and the characters ``+`` ``.`` ``~`` (plus, full
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   265
     stop, tilde) and is compared in the same way as the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   266
     <upstream_version> is.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   267
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   268
     It is optional; if it isn't present then the <upstream_version>
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   269
     may not contain a hyphen.  This format represents the case where
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   270
     a piece of software was written specifically to be turned into a
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   271
     Debian package, and so there is only one "debianisation" of it
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   272
     and therefore no revision indication is required.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   273
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   274
     It is conventional to restart the <debian_revision> at ``1`` each
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   275
     time the <upstream_version> is increased.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   276
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   277
     The package management system will break the version number apart
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   278
     at the last hyphen in the string (if there is one) to determine
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   279
     the <upstream_version> and <debian_revision>.  The absence of a
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   280
     <debian_revision> compares earlier than the presence of one (but
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   281
     note that the <debian_revision> is the least significant part of
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   282
     the version number).
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   283
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   284
The <upstream_version> and <debian_revision> parts are compared by the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   285
package management system using the same algorithm:
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   286
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   287
The strings are compared from left to right.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   288
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   289
First the initial part of each string consisting entirely of non-digit
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   290
characters is determined.  These two parts (one of which may be empty)
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   291
are compared lexically.  If a difference is found it is returned.  The
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   292
lexical comparison is a comparison of ASCII values modified so that
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   293
all the letters sort earlier than all the non-letters and so that a
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   294
tilde sorts before anything, even the end of a part.  For example, the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   295
following parts are in sorted order from earliest to latest: ``~~``,
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   296
``~~a``, ``~``, the empty part, ``a``.[2]
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   297
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   298
Then the initial part of the remainder of each string which consists
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   299
entirely of digit characters is determined.  The numerical values of
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   300
these two parts are compared, and any difference found is returned as
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   301
the result of the comparison.  For these purposes an empty string
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   302
(which can only occur at the end of one or both version strings being
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   303
compared) counts as zero.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   304
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   305
These two steps (comparing and removing initial non-digit strings and
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   306
initial digit strings) are repeated until a difference is found or
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   307
both strings are exhausted.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   308
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   309
Note that the purpose of epochs is to allow us to leave behind
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   310
mistakes in version numbering, and to cope with situations where the
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   311
version numbering scheme changes.  It is _not_ intended to cope with
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   312
version numbers containing strings of letters which the package
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   313
management system cannot interpret (such as ``ALPHA`` or ``pre-``), or
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   314
with silly orderings (the author of this manual has heard of a package
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   315
whose versions went ``1.1``, ``1.2``, ``1.3``, ``1``, ``2.1``, ``2.2``,
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   316
``2`` and so forth).
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   317
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   318
[1]  Alphanumerics are ``A-Za-z0-9`` only.
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   319
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   320
[2]  One common use of ``~`` is for upstream pre-releases.  For example,
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   321
     ``1.0~beta1~svn1245`` sorts earlier than ``1.0~beta1``, which sorts
2b8f6be245c0 Debian version ordering formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1102
diff changeset
   322
     earlier than ``1.0``.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   323
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   324
Semver version ordering formula.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   325
--------------------------------
1059
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   326
::
948
23cb71bb2b5d Versioning formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 947
diff changeset
   327
1059
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   328
  if (A.major != B.major) return A.major > B.major;
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   329
  if (A.minor != B.minor) return A.minor > B.minor;
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   330
  if (A.patch != B.patch) return A.patch > B.patch;
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   331
  if (A.special == B.special) return 0;
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   332
  if (A.special == "") return 1;
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   333
  if (B.special == "") return -1;
d5b0b9cc4b49 Fix indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1058
diff changeset
   334
  return A.special > B.special;
948
23cb71bb2b5d Versioning formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 947
diff changeset
   335
949
57b995de80b5 Compatibility formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 948
diff changeset
   336
**NOTE** Accoding to this definition 1.0.1rc1 < 1.0.1rc10 < 1.0.1rc2 which is
57b995de80b5 Compatibility formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 948
diff changeset
   337
non meaningful.
57b995de80b5 Compatibility formula.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 948
diff changeset
   338
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   339
Odd/even numbering.
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   340
-------------------
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   341
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   342
Who uses: GLib, GTK+, Gimp, GNOME, Kaffe.
1003
4b8b3daac0db Feature set versioning. Marketing versioning. Year as version name. Version name components. Version
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 950
diff changeset
   343
1008
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   344
Forms of compatibility.
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   345
=======================
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   346
1113
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   347
Backward/forward compatibility.
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   348
-------------------------------
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   349
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   350
Backward compatibility for library, file format, protocol means that new version
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   351
of program can work with old library, file format, protocol.
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   352
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   353
Forward compatibility for library, file format, protocol means that old version
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   354
of program can work with new library, file format, protocol but without using
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   355
any benefits from new versions and more essentially without posibility damage
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   356
any user data.
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   357
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   358
Example of backward compatibility: adding to graphic library new image format
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   359
for reading/saving.
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   360
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   361
Example of forward compatibility: old browser ignore any new (unknown) HTML
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   362
tags.
c55780172a46 Backward/forward compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1112
diff changeset
   363
1112
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   364
Source/binary compatibility.
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   365
----------------------------
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   366
1108
60726f28b999 small fix
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1107
diff changeset
   367
Runtime or binary compatibility mean that binary can be swaped with another
60726f28b999 small fix
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1107
diff changeset
   368
version without breaking normal program work.
1008
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   369
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   370
Compile time or source compatibility mean that supplied header/interfaces allow
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   371
successful compiling/linking.
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   372
1009
be52d3742472 Protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1008
diff changeset
   373
Examples:
1008
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   374
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   375
* Change type of argument in method to more generic take source compatibility
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   376
  but break binary compatibility.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   377
* Adding new method to abstract class take binary compatibility but break
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   378
  compilation (unimplement method error).
1008
4ddb673763e6 Forms of compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1007
diff changeset
   379
1112
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   380
Format or protocol compatibility.
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   381
---------------------------------
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   382
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   383
File format or protocol backward compatibility mean that new program can use old
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   384
format or protocol.
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   385
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   386
In order to do that file format or protocol MUST store or provide some
91e7ec70a38e Format or protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1108
diff changeset
   387
versioning information. Usually this done by:
1009
be52d3742472 Protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1008
diff changeset
   388
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   389
* Separate versioning field in data.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   390
* New prefix or name in data.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   391
* List of feature requirements, supported algorighm, etc.
1009
be52d3742472 Protocol compatibility.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1008
diff changeset
   392
1114
9131b58f51c4 It is essential to make file format or protocol extensible.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1113
diff changeset
   393
It is essential to make code that detect unknown or possibly new format or
9131b58f51c4 It is essential to make file format or protocol extensible.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1113
diff changeset
   394
protocol and stop working with them to avoid user data corruption.
1108
60726f28b999 small fix
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1107
diff changeset
   395
1114
9131b58f51c4 It is essential to make file format or protocol extensible.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1113
diff changeset
   396
It is essential to make file format or protocol extensible. This can be achieved
9131b58f51c4 It is essential to make file format or protocol extensible.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1113
diff changeset
   397
by:
9131b58f51c4 It is essential to make file format or protocol extensible.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1113
diff changeset
   398
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   399
* Reserving some possible names/prefixes for future use.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   400
* Generalising file format or protocol to envelop more cases.
1108
60726f28b999 small fix
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1107
diff changeset
   401
1115
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   402
Extracting version from VCS.
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   403
============================
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   404
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   405
Including version in sources.
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   406
=============================
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   407
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   408
Don't use any ``$REVISION`` like keywords (usual practice in CVS, SVN)!
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   409
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   410
Use sed, awk, M4 or any other preprocessor for non-compiled or non-preprocessed
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   411
files (like .lisp, .py, .java files)::
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   412
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   413
  $ cat my-version.el.in
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   414
  (defvar my-major-version @VMAJOR@
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   415
    "Major version.")
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   416
  (defvar my-major-version @VMAJOR@
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   417
    "Major version.")
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   418
  (provide 'my-version)
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   419
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   420
  $ cat Makefile
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   421
  %: %.in
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   422
      sed -e 's|@VMAJOR@|$(VMAJOR)|' -e 's|@VMINOR@|$(VMINOR)|' <$< >$@
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   423
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   424
Pass version component to preprocessed file (like .c, .cxx files) through
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   425
preprocessor::
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   426
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   427
  $ cat my-version.c
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   428
  int get_major_version() { return VMAJOR; }
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   429
  int get_minor_version() { return VMINOR; }
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   430
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   431
  $ cat Makefile
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   432
  %.o: %.c
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   433
      $(CC) -DVMAJOR=$(VMAJOR) -DVMINOR=$(VMINOR) -o $@ $<
abbbaffa9c9f Including version in sources.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1114
diff changeset
   434
921
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   435
Reference.
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   436
==========
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   437
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   438
http://semver.org/
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   439
  Semantic Versioning
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   440
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   441
  Debian
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   442
http://www.openbsd.org/faq/ports/specialtopics.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   443
  OpenBSD
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   444
http://java.sun.com/j2se/versioning_naming.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   445
  Oracle
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   446
http://www.intel.com/support/graphics/sb/CS-020667.htm
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   447
  Intel
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   448
http://wiki.eclipse.org/index.php/Version_Numbering
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   449
  Eclipse
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   450
http://apr.apache.org/versioning.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   451
  Apache
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   452
http://www106.pair.com/rhp/parallel.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   453
  Conflict resolution
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   454
http://www.rpm.org/wiki/PackagerDocs/Dependencies
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   455
  RH
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   456
http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   457
  RH
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   458
http://fedoraproject.org/wiki/Packaging/NamingGuidelines
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   459
  RH
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   460
http://wikis.sun.com/display/IpsBestPractices/Packaging+Best+Practices+-+Versioning
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   461
  Oracle
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   462
http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   463
  Maven
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   464
http://docs.codehaus.org/display/MAVEN/Versioning
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   465
  Maven
921
c1264ffd1a37 Toolkit version format
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   466