LICENSES: drop SPDX tag 'GPL-2.0' and use 'GPL-2.0-only'
[openocd.git] / LICENSES / license-rules.txt
1 # SPDX-License-Identifier: GPL-2.0-or-later OR GFDL-1.2-no-invariants-or-later
2
3 OpenOCD licensing rules
4 =======================
5
6 The OpenOCD source code is provided under the terms of the GNU General
7 Public License version 2 or later (GPL-2.0-or-later), as provided in
8 LICENSES/preferred/GPL-2.0.
9
10 The OpenOCD documentation is provided under the terms of the GNU Free
11 Documentation License version 1.2 or later without Invariant Sections
12 (GFDL-1.2-no-invariants-or-later).
13
14 Few stand-alone applications coexist in the same code tree of OpenOCD
15 and are provided under the terms of the GNU General Public License
16 version 3 (GPL-3.0), as provided in LICENSES/stand-alone/GPL-3.0.
17
18 This documentation file provides a description of how each source file
19 should be annotated to make its license clear and unambiguous.
20 It doesn't replace the OpenOCD's license.
21
22 The license described in the COPYING file applies to the OpenOCD source
23 as a whole, though individual source files can have a different license
24 which is required to be compatible with the GPL-2.0:
25
26 GPL-1.0-or-later : GNU General Public License v1.0 or later
27 GPL-2.0-or-later : GNU General Public License v2.0 or later
28 LGPL-2.0 : GNU Library General Public License v2 only
29 LGPL-2.0-or-later : GNU Library General Public License v2 or later
30 LGPL-2.1 : GNU Lesser General Public License v2.1 only
31 LGPL-2.1-or-later : GNU Lesser General Public License v2.1 or later
32
33 Aside from that, individual files can be provided under a dual license,
34 e.g. one of the compatible GPL variants and alternatively under a
35 permissive license like BSD, MIT etc.
36
37 The common way of expressing the license of a source file is to add the
38 matching boilerplate text into the top comment of the file. Due to
39 formatting, typos etc. these "boilerplates" are hard to validate for
40 tools which are used in the context of license compliance.
41
42 An alternative to boilerplate text is the use of Software Package Data
43 Exchange (SPDX) license identifiers in each source file. SPDX license
44 identifiers are machine parsable and precise shorthands for the license
45 under which the content of the file is contributed. SPDX license
46 identifiers are managed by the SPDX Workgroup at the Linux Foundation and
47 have been agreed on by partners throughout the industry, tool vendors, and
48 legal teams. For further information see https://spdx.org/
49
50 OpenOCD requires the precise SPDX identifier in all source files.
51 The valid identifiers used in OpenOCD are explained in the section
52 `License identifiers` and have been retrieved from the official SPDX
53 license list at https://spdx.org/licenses/ along with the license texts.
54
55 License identifier syntax
56 -------------------------
57
58 1. Placement:
59
60 The SPDX license identifier in OpenOCD files shall be added at the
61 first possible line in a file which can contain a comment. For the
62 majority of files this is the first line, except for scripts which
63 require the '#!PATH_TO_INTERPRETER' in the first line. For those
64 scripts the SPDX identifier goes into the second line.
65
66 2. Style:
67
68 The SPDX license identifier is added in form of a comment. The comment
69 style depends on the file type::
70
71 C source: // SPDX-License-Identifier: <SPDX License Expression>
72 C header: /* SPDX-License-Identifier: <SPDX License Expression> */
73 ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
74 makefiles: # SPDX-License-Identifier: <SPDX License Expression>
75 scripts: # SPDX-License-Identifier: <SPDX License Expression>
76 texinfo: @c SPDX-License-Identifier: <SPDX License Expression>
77 text: # SPDX-License-Identifier: <SPDX License Expression>
78
79 If a specific tool cannot handle the standard comment style, then the
80 appropriate comment mechanism which the tool accepts shall be used. This
81 is the reason for having the "/\* \*/" style comment in C header
82 files. There was build breakage observed with generated .lds files where
83 'ld' failed to parse the C++ comment. This has been fixed by now, but
84 there are still older assembler tools which cannot handle C++ style
85 comments.
86
87 3. Syntax:
88
89 A <SPDX License Expression> is either an SPDX short form license
90 identifier found on the SPDX License List, or the combination of two
91 SPDX short form license identifiers separated by "WITH" when a license
92 exception applies. When multiple licenses apply, an expression consists
93 of keywords "AND", "OR" separating sub-expressions and surrounded by
94 "(", ")" .
95
96 License identifiers for licenses like [L]GPL with the 'or later' option
97 are constructed by using a "-or-later":
98
99 // SPDX-License-Identifier: GPL-2.0-or-later
100 // SPDX-License-Identifier: LGPL-2.1-or-later
101
102 WITH should be used when there is a modifier to a license needed.
103 Exceptions can only be used with particular License identifiers. The
104 valid License identifiers are listed in the tags of the exception text
105 file.
106
107 OR should be used if the file is dual licensed and only one license is
108 to be selected. For example, some source files are available under dual
109 licenses:
110
111 // SPDX-License-Identifier: GPL-2.0-or-later OR BSD-1-Clause
112 // SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
113 // SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
114
115 AND should be used if the file has multiple licenses whose terms all
116 apply to use the file. For example, if code is inherited from another
117 project and permission has been given to put it in OpenOCD, but the
118 original license terms need to remain in effect::
119
120 // SPDX-License-Identifier: GPL-2.0-or-later AND MIT
121
122 License identifiers
123 -------------------
124
125 The licenses currently used, as well as the licenses for code added to
126 OpenOCD, can be broken down into:
127
128 1. `Preferred licenses`:
129
130 Whenever possible these licenses should be used as they are known to be
131 fully compatible and widely used. These licenses are available from the
132 directory:
133
134 LICENSES/preferred/
135
136 in the OpenOCD source tree.
137
138 The files in this directory contain the full license text and
139 `Metatags`. The file names are identical to the SPDX license
140 identifier which shall be used for the license in source files.
141
142 Examples:
143
144 LICENSES/preferred/GPL-2.0
145
146 Contains the GPL version 2 license text and the required metatags.
147
148 `Metatags`:
149
150 The following meta tags must be available in a license file:
151
152 - Valid-License-Identifier:
153
154 One or more lines which declare which License Identifiers are valid
155 inside the project to reference this particular license text. Usually
156 this is a single valid identifier, but e.g. for licenses with the 'or
157 later' options two identifiers are valid.
158
159 - SPDX-URL:
160
161 The URL of the SPDX page which contains additional information related
162 to the license.
163
164 - Usage-Guidance:
165
166 Freeform text for usage advice. The text must include correct examples
167 for the SPDX license identifiers as they should be put into source
168 files according to the `License identifier syntax` guidelines.
169
170 - License-Text:
171
172 All text after this tag is treated as the original license text
173
174 File format examples::
175
176 Valid-License-Identifier: GPL-2.0-only
177 Valid-License-Identifier: GPL-2.0-or-later
178 SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
179 Usage-Guide:
180 To use this license in source code, put one of the following SPDX
181 tag/value pairs into a comment according to the placement
182 guidelines in the licensing rules documentation.
183 For 'GNU General Public License (GPL) version 2 only' use:
184 SPDX-License-Identifier: GPL-2.0-only
185 For 'GNU General Public License (GPL) version 2 or any later version' use:
186 SPDX-License-Identifier: GPL-2.0-or-later
187 License-Text:
188 Full license text
189
190 2. Exceptions:
191
192 Some licenses can be amended with exceptions which grant certain rights
193 which the original license does not. These exceptions are available
194 from the directory::
195
196 LICENSES/exceptions/
197
198 in the OpenOCD source tree. The files in this directory contain the full
199 exception text and the required `Exception Metatags`_.
200
201 Examples::
202
203 LICENSES/exceptions/eCos-exception-2.0
204
205 Exception Metatags:
206
207 The following meta tags must be available in an exception file:
208
209 - SPDX-Exception-Identifier:
210
211 One exception identifier which can be used with SPDX license
212 identifiers.
213
214 - SPDX-URL:
215
216 The URL of the SPDX page which contains additional information related
217 to the exception.
218
219 - SPDX-Licenses:
220
221 A comma separated list of SPDX license identifiers for which the
222 exception can be used.
223
224 - Usage-Guidance:
225
226 Freeform text for usage advice. The text must be followed by correct
227 examples for the SPDX license identifiers as they should be put into
228 source files according to the `License identifier syntax`_ guidelines.
229
230 - Exception-Text:
231
232 All text after this tag is treated as the original exception text
233
234 File format examples::
235
236 SPDX-Exception-Identifier: eCos-exception-2.0
237 SPDX-URL: https://spdx.org/licenses/eCos-exception-2.0.html
238 SPDX-Licenses: GPL-2.0-only, GPL-2.0-or-later
239 Usage-Guide:
240 This exception is used together with one of the above SPDX-Licenses.
241 To use this exception add it with the keyword WITH to one of the
242 identifiers in the SPDX-Licenses tag:
243 SPDX-License-Identifier: <SPDX-License> WITH eCos-exception-2.0
244 License-Text:
245 Full license text
246
247 3. Stand-alone licenses:
248
249 These licenses should only be used for stand-alone applications that are
250 distributed with OpenOCD but are not included in the OpenOCD binary.
251 These licenses are available from the directory:
252
253 LICENSES/stand-alone/
254
255 in the OpenOCD source tree.
256
257 Examples:
258
259 SPDX-License-Identifier: GPL-3.0
260
261 The format and requirements of the license files in the other sub-directories
262 of directory
263
264 LICENSES
265
266 have to follow the same format and requirements of the `Preferred licenses`.
267
268 All SPDX license identifiers and exceptions must have a corresponding file
269 in the LICENSES subdirectories. This is required to allow tool
270 verification (e.g. checkpatch.pl) and to have the licenses ready to read
271 and extract right from the source, which is recommended by various FOSS
272 organizations, e.g. the `FSFE REUSE initiative <https://reuse.software/>`.

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)