|
| 1 | +# GNU Radio Versioning |
| 2 | + |
| 3 | +For the 3.8 Release and going on, the following versioning scheme is to be used. |
| 4 | +For 3.7 and earlier, other schemes apply. |
| 5 | + |
| 6 | +GNU Radio versioning is based on [Semantic Versioning](https://semver.org). |
| 7 | + |
| 8 | +## GNU Radio Versioning in 60s or less |
| 9 | + |
| 10 | +If in doubt, the formal definition below applies. However, to ease use of this |
| 11 | +versioning scheme, an abridged, specified conclusion is given in this section. |
| 12 | + |
| 13 | +GNU Radio uses a four-number versioning: |
| 14 | + |
| 15 | +``` |
| 16 | +A.B.C.D |
| 17 | +``` |
| 18 | + |
| 19 | +* A is the paradigm version. This has been '3' for more than a decade, meaning: |
| 20 | + |
| 21 | +> GNU Radio is a block-based flow graph framework that uses classes to represent |
| 22 | +> blocks whose main feature is a `work()` function taking input samples from |
| 23 | +> quasi-circular buffers and putting results in quasi-circular output buffers. |
| 24 | + |
| 25 | + It's encouraged that in the future, relevant modifications and extensions of |
| 26 | + that model will lead to changes to the paradigm version number. |
| 27 | +* A.B is the public API version. We'll only accept patches that don't change the |
| 28 | + public API on a `maint-A.B` branch. GNU Radio users need not change their code |
| 29 | + to stay compatible with any future A.B.x.x version (barring bugs), but might |
| 30 | + have to recompile. |
| 31 | + Forward-going development should happen on the A.(B+1) branch, once A.B is |
| 32 | + released. |
| 33 | +* A.B.C is the ABI version. This includes C/C++, Python bindings and the |
| 34 | + interfaces of GRC blocks. Programmers need not recompile their code if A.B.C |
| 35 | + stays unchanged. |
| 36 | +* A.B.C.D is the patch level. Versions A.B.C.D and A.B.C.D' are compatible with |
| 37 | + one another, both binary and in API, although one versions might have fixed |
| 38 | + bugs that the other has not. |
| 39 | + |
| 40 | +### Formal Definition of GNU Radio's Semantic Versioning |
| 41 | + |
| 42 | +The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, |
| 43 | +“SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this |
| 44 | +document are to be interpreted as described in [*RFC |
| 45 | +2119*](http://tools.ietf.org/html/rfc2119). |
| 46 | + |
| 47 | +1. Software using Semantic Versioning MUST declare a public API. This |
| 48 | + API could be declared in the code itself or exist strictly |
| 49 | + in documentation. However it is done, it should be precise |
| 50 | + and comprehensive. |
| 51 | + |
| 52 | +2. A normal version number MUST take the form W.X.Y.Z where W, X, Y, |
| 53 | + and Z are non-negative integers, and MUST NOT contain |
| 54 | + leading zeroes. W is the major version, X is the API version, Y |
| 55 | + is the ABI version, and Z is the patch version. Each element |
| 56 | + MUST increase numerically. For instance: 3.1.9.0 -> 3.1.10.0 |
| 57 | + -> 3.1.11.0. |
| 58 | + |
| 59 | +3. Once a versioned package has been released, the contents of that |
| 60 | + version MUST NOT be modified. Any modifications MUST be released |
| 61 | + as a new version. |
| 62 | + |
| 63 | +4. Patch version Z (w.x.y.Z) MUST be incremented if only backwards |
| 64 | + API-compatible & ABI-compatible changes are introduced. |
| 65 | + |
| 66 | +5. ABI version Y (w.x.Y.z) MUST be incremented if changes break ABI |
| 67 | + compatibility with the previous release. |
| 68 | + |
| 69 | +6. API version X (w.X.y.z) MUST be incremented if changes break public |
| 70 | + API compatibility with the previous release. It MAY include ABI |
| 71 | + and patch level changes. It MAY be incremented if substantial new |
| 72 | + functionality or improvements are introduced within private code. |
| 73 | + ABI and PATCH version MUST be reset to 0 when API version |
| 74 | + is incremented. An API breakage is defined as the case where |
| 75 | + recompiling software against GNU Radio without modifications may yield |
| 76 | + different results. The following cases, for example, are typically |
| 77 | + not API-breaking, but are ABI-breaking: adding new public methods, |
| 78 | + adding new default parameters to public methods if the default |
| 79 | + case is identical to the previous case. |
| 80 | + |
| 81 | +7. MAJOR version W (W.x.y.z) MAY be incremented if significant |
| 82 | + architectural or technological changes are made that warrant |
| 83 | + identifying the software as a new generation of product. |
| 84 | + |
| 85 | +8. A pre-release version MAY be denoted by appending a hyphen and a |
| 86 | + series of dot separated identifiers immediately following the |
| 87 | + patch version. Identifiers MUST comprise only ASCII alphanumerics |
| 88 | + and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric |
| 89 | + identifiers MUST NOT include leading zeroes. Pre-release versions |
| 90 | + have a lower precedence than the associated normal version. A |
| 91 | + pre-release version indicates that the version is unstable and |
| 92 | + might not satisfy the intended compatibility requirements as |
| 93 | + denoted by its associated normal version. Examples: 3.1.0.0-alpha, |
| 94 | + 3.1.0.0-alpha.1, 3.1.0.0-0.3.7, 3.1.0.0-x.7.z.92. |
| 95 | + |
| 96 | +9. Build metadata MAY be denoted by appending a plus sign and a series |
| 97 | + of dot separated identifiers immediately following the patch or |
| 98 | + pre-release version. Identifiers MUST comprise only ASCII |
| 99 | + alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT |
| 100 | + be empty. Build metadata SHOULD be ignored when determining |
| 101 | + version precedence. Thus two versions that differ only in the |
| 102 | + build metadata, have the same precedence. Examples: |
| 103 | + 3.1.0.0-alpha+001, 3.1.0.0+20130313144700, 3.1.0.0-beta+exp.sha.5114f85. |
| 104 | + |
| 105 | +10. Precedence refers to how versions are compared to each other |
| 106 | + when ordered. Precedence MUST be calculated by separating the |
| 107 | + version into major, API, ABI, patch and pre-release |
| 108 | + identifiers in that order (Build metadata does not figure |
| 109 | + into precedence). Precedence is determined by the first difference |
| 110 | + when comparing each of these identifiers from left to right as |
| 111 | + follows: Major, API, ABI, and patch versions are always |
| 112 | + compared numerically. Example: 3.1.0.0 < 3.2.0.0 < 3.2.1.0 |
| 113 | + < 3.2.1.1. When major, API, ABI, and patch are equal, a |
| 114 | + pre-release version has lower precedence than a normal version. |
| 115 | + Example: 3.1.0.0-alpha < 3.1.0.0. Precedence for two |
| 116 | + pre-release versions with the same major, API ABI, and patch |
| 117 | + version MUST be determined by comparing each dot separated |
| 118 | + identifier from left to right until a difference is found as |
| 119 | + follows: identifiers consisting of only digits are compared |
| 120 | + numerically and identifiers with letters or hyphens are compared |
| 121 | + lexically in ASCII sort order. Numeric identifiers always have |
| 122 | + lower precedence than non-numeric identifiers. A larger set of |
| 123 | + pre-release fields has a higher precedence than a smaller set, if |
| 124 | + all of the preceding identifiers are equal. Example: 3.1.0.0-alpha |
| 125 | + < 3.1.0.0-alpha.1 < 3.1.0.0-alpha.beta < 3.1.0.0-beta |
| 126 | + < 4.1.0.0-beta.2 < 3.1.0.0-beta.11 < 3.1.0.0-rc.1 < 3.1.0.0. |
| 127 | + |
| 128 | +#### License of this Document |
| 129 | + |
| 130 | +The versioning scheme is based on [*SemVer 2.0.0*](http://semver.org/); it's |
| 131 | +licensed under |
| 132 | +[*Creative Commons - CC BY 3.0*](http://creativecommons.org/licenses/by/3.0/) |
0 commit comments