version-spec.txt 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. HOW TOR VERSION NUMBERS WORK
  2. 1. The Old Way
  3. Before 0.1.0, versions were of the format:
  4. MAJOR.MINOR.MICRO(status(PATCHLEVEL))?(-cvs)?
  5. where MAJOR, MINOR, MICRO, and PATCHLEVEL are numbers, status is one
  6. of "pre" (for an alpha release), "rc" (for a release candidate), or
  7. "." for a release. As a special case, "a.b.c" was equivalent to
  8. "a.b.c.0". We compare the elements in order (major, minor, micro,
  9. status, patchlevel, cvs), with "cvs" preceding non-cvs.
  10. We would start each development branch with a final version in mind:
  11. say, "0.0.8". Our first pre-release would be "0.0.8pre1", followed by
  12. (for example) "0.0.8pre2-cvs", "0.0.8pre2", "0.0.8pre3-cvs",
  13. "0.0.8rc1", "0.0.8rc2-cvs", and "0.0.8rc2". Finally, we'd release
  14. 0.0.8. The stable CVS branch would then be versioned "0.0.8.1-cvs",
  15. and any eventual bugfix release would be "0.0.8.1".
  16. 2. The New Way
  17. After 0.1.0, versions are of the format:
  18. MAJOR.MINOR.MICRO[.PATCHLEVEL][-STATUS_TAG][ (EXTRA_INFO)]*
  19. The stuff in parentheses is optional. As before, MAJOR, MINOR, MICRO,
  20. and PATCHLEVEL are numbers, with an absent number equivalent to 0.
  21. All versions should be distinguishable purely by those four
  22. numbers.
  23. The STATUS_TAG is purely informational, and lets you know how
  24. stable we think the release is: "alpha" is pretty unstable; "rc" is a
  25. release candidate; and no tag at all means that we have a final
  26. release. If the tag ends with "-cvs" or "-dev", you're looking at a
  27. development snapshot that came after a given release. If we *do*
  28. encounter two versions that differ only by status tag, we compare them
  29. lexically. The STATUS_TAG can't contain whitespace.
  30. The EXTRA_INFO is also purely informational, often containing information
  31. about the SCM commit this version came from. It is surrounded by parentheses
  32. and can't contain whitespace. Unlike the STATUS_TAG this never impacts the way
  33. that versions should be compared. EXTRA_INFO may appear any number of
  34. times. Tools should generally not parse EXTRA_INFO entries.
  35. Now, we start each development branch with (say) 0.1.1.1-alpha. The
  36. patchlevel increments consistently as the status tag changes, for
  37. example, as in: 0.1.1.2-alpha, 0.1.1.3-alpha, 0.1.1.4-rc, 0.1.1.5-rc.
  38. Eventually, we release 0.1.1.6. The next patch release is 0.1.1.7.
  39. Between these releases, CVS is versioned with a -cvs tag: after
  40. 0.1.1.1-alpha comes 0.1.1.1-alpha-cvs, and so on. But starting with
  41. 0.1.2.1-alpha-dev, we switched to SVN and started using the "-dev"
  42. suffix instead of the "-cvs" suffix.
  43. 3. Version status.
  44. Sometimes we need to determine whether a Tor version is obsolete,
  45. experimental, or neither, based on a list of recommended versions. The
  46. logic is as follows:
  47. * If a version is listed on the recommended list, then it is
  48. "recommended".
  49. * If a version is newer than every recommended version, that version
  50. is "experimental" or "new".
  51. * If a version is older than every recommended version, it is
  52. "obsolete" or "old".
  53. * The first three components (major,minor,micro) of a version number
  54. are its "release series". If a version has other recommended
  55. versions with the same release series, and the version is newer
  56. than all such recommended versions, but it is not newer than
  57. _every_ recommended version, then the version is "new in series".
  58. * Finally, if none of the above conditions hold, then the version is
  59. "un-recommended."