You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/annexes/spdx-license-expressions.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## Overview
4
4
5
-
Often a single license can be used to represent the licensing terms of a source code or binary file, but there are situations where a single license identifier is not sufficient. A common example is when software is offered under a choice of one or more licenses (e.g., GPL-2.0-only OR BSD-3-Clause). Another example is when a set of licenses is needed to represent a binary program constructed by compiling and linking two (or more) different source files each governed by different licenses (e.g., LGPL-2.1-only AND BSD-3-Clause).
5
+
Often a single license can be used to represent the licensing terms of a source code or binary file, but there are situations where a single license identifier is not sufficient. A common example is when software is offered under a choice of one or more licenses (e.g., `GPL-2.0-only OR BSD-3-Clause`). Another example is when a set of licenses is needed to represent a binary program constructed by compiling and linking two (or more) different source files each governed by different licenses (e.g., `LGPL-2.1-only AND BSD-3-Clause`).
6
6
7
-
SPDX License Expressions provide a way for one to construct expressions that more accurately represent the licensing terms typically found in open source software source code. A license expression could be a single license identifier found on the SPDX License List; a user defined license reference denoted by the `LicenseRef-(idstring)`; a license identifier combined with an SPDX exception; or some combination of license identifiers, license references and exceptions constructed using a small set of defined operators (e.g., `AND`, `OR`, `WITH` and `+`). We provide the definition of what constitutes a valid SPDX License Expression in this section.
7
+
SPDX License Expressions provide a way for one to construct expressions that more accurately represent the licensing terms typically found in open source software source code. A license expression could be a single license identifier found on the SPDX License List; a user defined license reference denoted by the "LicenseRef-(idstring)"; a license identifier combined with an SPDX exception; or some combination of license identifiers, license references and exceptions constructed using a small set of defined operators (e.g., "AND", "OR", "WITH" and "+"). We provide the definition of what constitutes a valid SPDX License Expression in this section.
8
8
9
9
The general format of license expressions is described below in ABNF, as defined
10
10
in [RFC 5234](https://datatracker.ietf.org/doc/rfc5234/) and expanded
@@ -46,17 +46,17 @@ A valid `<license-expression>` string consists of either:
46
46
47
47
(ii) a more complex expression constructed by combining smaller valid expressions using Boolean license operators.
48
48
49
-
There shall not be any space between a license-id and any following `+`. This supports easy parsing and backwards compatibility.
49
+
There shall not be any space between a license-id and any following "+". This supports easy parsing and backwards compatibility.
50
50
51
-
There shall be at least one space on either side of the operators `AND`, `OR`, and "WITH".
51
+
There shall be at least one space on either side of the operators "AND", "OR", and "WITH".
52
52
53
53
A license expression shall be on a single line, and shall not include a line break in the middle of the expression.
54
54
55
55
## Case sensitivity
56
56
57
-
In SPDX-3, license expressions are completely *case-insensitive*.
57
+
In SPDX3, license expressions are completely *case-insensitive*.
58
58
59
-
That includes the operators (`AND`, `OR`, `WITH`), the special identifiers (`NONE` and `NOASSERTION`), as well as the license identifiers, including the user-defined ones.
59
+
That includes the operators ("AND", "OR", "WITH"), the special identifiers ("NONE" and "NOASSERTION"), as well as the license identifiers, including the user-defined ones.
60
60
61
61
For example, the expressions `MIT AND NOASSERTION AND (BSD-3-Clause OR LicenseRef-Name)` and `mit aNd NoaSSerTion AnD (bSd-3-clausE OR licenseref-NAME)` are equivalent.
62
62
@@ -111,7 +111,7 @@ An example representing a choice between three different licenses would be:
111
111
LGPL-2.1-only OR MIT OR BSD-3-Clause
112
112
```
113
113
114
-
The special identifiers "NONE" or "NOASSERTION" shall not be used with the OR operator.
114
+
The special identifiers "NONE" or "NOASSERTION" shall not be used with the "OR" operator.
115
115
116
116
### Conjunctive "AND" operator
117
117
@@ -153,7 +153,7 @@ GPL-2.0-or-later WITH Bison-exception-2.2
153
153
154
154
The current set of valid license exceptions identifiers can be found in [spdx.org/licenses](https://spdx.org/licenses).
155
155
156
-
The special identifiers "NONE" or "NOASSERTION" shall not be used with the WITH operator.
156
+
The special identifiers "NONE" or "NOASSERTION" shall not be used with the "WITH" operator.
157
157
158
158
### Order of precedence and parentheses
159
159
@@ -174,7 +174,7 @@ For example, the following expression:
174
174
LGPL-2.1-only OR BSD-3-Clause AND MIT
175
175
```
176
176
177
-
represents a license choice between either LGPL-2.1-only or the expression "BSD-3-Clause AND MIT" because the AND operator takes precedence over (is applied before) the OR operator.
177
+
represents a license choice between either LGPL-2.1-only or the expression "BSD-3-Clause AND MIT" because the "AND" operator takes precedence over (is applied before) the "OR" operator.
178
178
179
179
When required to express an order of precedence that is different from the default order a `<license-expression>` can be encapsulated in pairs of parentheses: ( ), to indicate that the operators found inside the parentheses takes precedence over operators outside. This is also similar to the use of parentheses in an algebraic expression e.g., (5+7)/2.
180
180
@@ -184,15 +184,15 @@ For instance, the following expression:
184
184
(LGPL-2.1-or-later OR BSD-3-Clause) AND MIT
185
185
```
186
186
187
-
states the OR operator should be applied before the AND operator. That is, one should first select between the LGPL-2.1-or-later or the BSD-3-Clause license before applying the MIT license.
187
+
states the "OR" operator should be applied before the "AND" operator. That is, one should first select between the LGPL-2.1-or-later or the BSD-3-Clause license before applying the MIT license.
0 commit comments