aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/license.conf
blob: 7116d7a1d5d0510ab5b0c10d0566d076f9d5007e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
LICENSE_EXPRESSION_IMPLICIT_OR=yes
LICENSE_EXPRESSION_IMPLICIT_AND=yes
LICENSE_EXPRESSION=
LICENSE_NAMES=

MODULE_LICENSES_RESTRICTIONS=
MODULE_LICENSES_RESTRICTION_EXCEPTIONS=
MODULE_LICENSES_RESTRICTION_TYPES=
DEFAULT_MODULE_LICENSE=YandexUncategorized
EXPLICIT_LICENSE_PREFIXES=

# List of license properties which can be used to restrict transitive dependencies. There are three variables checked for each
# property:
# * LICENSES_<PROP_NAME>_STATIC: list of licenses which propagates this property when linking with code published by one of
#                                them statically.
# * LICENSES_<PROP_NAME>_DYNAMIC: list of licenses which propagates this property when linking with code published by one of
#                                 them dyamically.
# * LICENSES_<PROP_NAME>: list of licenses which propagates this property regrdless of type of linking with code published by
#                         one of them. Putting some license into this list is equivalent to putting it into both
#                         LICENSES_<PROP_NAME>_STATIC and LICENSES_<PROP_NAME>_DYNAMIC lists.
LICENSE_PROPERTIES= \
    FORBIDDEN NDA REQUIRE_DISCLOSURE PERMISSIVE REQUIRE_CITATION SERVICE PROTESTWARE


# NB: Licenses lists below are sorted case-insensitively. Please, keep the list sorted.
LICENSES_UNATTRIBUTED= \
    AFL-2.0 \
    Amazon-SL \
    AML \
    APSL-1.0 \
    Artistic-1.0-Perl \
    Artistic-2.0 \
    ASM-BSD-3-Clause \
    BCL \
    Bison-Exception \
    Bison-exception-2.2 \
    BouncyCastle-MIT \
    BSD-3-Clause-Clear \
    BSD-3-Clause-Open-MPI \
    BSD-4-Clause-Shortened \
    Bsd-New-Tcpdump \
    Bsd-Original-Uc-1986 \
    BSLA \
    Carnegie-Mellon \
    Carnegie-Mellon-Contributors \
    CC-BY-1.0 \
    CC-BY-2.0 \
    CC-BY-2.5 \
    CC-BY-3.0 \
    CC-BY-4.0 \
    CC-BY-NC-1.0 \
    CC-BY-NC-2.0 \
    CC-BY-NC-2.5 \
    CC-BY-NC-3.0 \
    CC-BY-NC-ND-1.0 \
    CC-BY-NC-ND-2.0 \
    CC-BY-NC-ND-2.5 \
    CC-BY-NC-ND-3.0 \
    CC-BY-NC-SA-1.0 \
    CC-BY-NC-SA-2.0 \
    CC-BY-NC-SA-2.5 \
    CC-BY-NC-SA-3.0 \
    CC-BY-ND-1.0 \
    CC-BY-ND-2.0 \
    CC-BY-ND-2.5 \
    CC-BY-ND-3.0 \
    CC-BY-SA-1.0 \
    CC-BY-SA-2.0 \
    CC-BY-SA-2.5 \
    CC-BY-SA-3.0 \
    CC-BY-SA-4.0 \
    CDDL \
    CECILL-B \
    ClArtistic \
    Custom-fft2d \
    DOC \
    DSO-1.1 \
    Elastic-License-2.0 \
    Fftpack-2004 \
    FSFUL \
    FSFULLR \
    GCC-exception-3.1 \
    GDAL \
    GFDL-1.1-or-later \
    Go-License \
    Google-Patent-License-Webm \
    Google-Patent-License-Webrtc \
    GPL-2.0 WITH Classpath-exception-2.0 \
    GPL-2.0 WITH FOSS-exception \
    GPL-2.0-only WITH freertos-exception-2.0 \
    GPL-2.0-only WITH Mysql-Linking-Exception-2018 \
    GPL-2.0-only WITH Universal-FOSS-exception-1.0 \
    GPL-2.0-or-later WITH Avisynth-C-Interface-Exception \
    GPL-2.0-or-later WITH Bison-Exception-2.0 \
    GPL-2.0-or-later WITH Bison-exception-2.2 \
    GPL-2.0-or-later WITH C-Interface-Exception \
    GPL-2.0-or-later WITH freertos-exception-2.0 \
    GPL-2.0-or-later WITH Libtool-exception \
    GPL-2.0-or-later WITH mif-exception \
    GWT-Terms \
    Hdf5 \
    HPND \
    HPND-sell-variant \
    HPND-sell-variant \
    HSQLDB-BSD-3-Clause \
    Ibm-Dhcp \
    Ietf-trust \
    ImageMagick \
    Info-Zip \
    Intel-Material \
    IPL-1.0 \
    JAMon-BSD-3-Clause \
    jQuery-MIT \
    LGPL-2.0-or-later WITH Sdbus-C++-LGPL-exception-1.1 \
    LGPL-3.0-or-later WITH ZeroMQ-Exception \
    LicenseRef-scancode-afpl-9.0 \
    LicenseRef-scancode-amd-historical \
    LicenseRef-scancode-anu-license \
    LicenseRef-scancode-bsd-3-clause-jtag \
    LicenseRef-scancode-bsd-axis-nomod \
    LicenseRef-scancode-bsd-new-nomod \
    LicenseRef-scancode-bsd-no-disclaimer \
    LicenseRef-scancode-bsd-x11 \
    LicenseRef-scancode-bsla-no-advert \
    LicenseRef-scancode-cavium-malloc \
    LicenseRef-scancode-cc-by-2.0-uk \
    LicenseRef-scancode-cc-devnations-2.0 \
    LicenseRef-scancode-cc-sampling-1.0 \
    LicenseRef-scancode-cmu-simple \
    LicenseRef-scancode-commercial-license \
    LicenseRef-scancode-commons-clause \
    LicenseRef-scancode-delorie-historical \
    LicenseRef-scancode-flex-2.5 \
    LicenseRef-scancode-free-unknown \
    LicenseRef-scancode-gary-s-brown \
    LicenseRef-scancode-generic-cla \
    LicenseRef-scancode-generic-exception \
    LicenseRef-scancode-intel-osl-1993 \
    LicenseRef-scancode-jdom \
    LicenseRef-scancode-mit-xfig \
    LicenseRef-scancode-newlib-historical \
    LicenseRef-scancode-nilsson-historical \
    LicenseRef-scancode-openssl \
    LicenseRef-scancode-openssl-exception-lgpl-3.0-plus \
    LicenseRef-scancode-openssl-nokia-psk-contribution \
    LicenseRef-scancode-osf-1990 \
    LicenseRef-scancode-other-copyleft \
    LicenseRef-scancode-other-permissive \
    LicenseRef-scancode-paul-mackerras \
    LicenseRef-scancode-paul-mackerras-binary \
    LicenseRef-scancode-paul-mackerras-new \
    LicenseRef-scancode-pcre \
    LicenseRef-scancode-ppp \
    LicenseRef-scancode-proprietary-license \
    LicenseRef-scancode-secret-labs-2011 \
    LicenseRef-scancode-ssleay-windows \
    LicenseRef-scancode-sun-source \
    LicenseRef-scancode-swig \
    LicenseRef-scancode-unknown \
    LicenseRef-scancode-unknown-license-reference \
    LicenseRef-scancode-unknown-spdx \
    LicenseRef-scancode-warranty-disclaimer \
    LicenseRef-scancode-xfree86-1.0 \
    LPL-1.02 \
    MirOS \
    Mit-Xfig \
    Mozilla-GC \
    NAIST-2003 \
    Nvidia-Gov \
    OFL-1.1 \
    Oracle \
    Oracle-technology \
    PSF-3.7.2 \
    Qhull \
    Quicklz \
    Ruby \
    Sendmail \
    Softsurfer \
    Spencer-99 \
    SSPL-1.0 \
    Stlport-4.5 \
    SZIP \
    TCL \
    TU-Berlin-1.0 \
    Unicode-TOU \
    Universal-FOSS-exception-1.0 \
    Unknown \
    Vcalendar \
    Vim \
    X11-Adobe-Dec \
    X11-Hanson \
    Xfree86-1.0 \
    Xnet

LICENSES_PATCHES_FORBIDDEN= \
    Unicode

LICENSES_FORBIDDEN= \
    AGPL-3.0-only \
    AGPL-3.0-or-later \
    Artistic-1.0 \
    Musl-Exception \
    confluent-community-1.0 \
    ${LICENSES_UNATTRIBUTED}

# Group for proprietary code licenses
LICENSES_NDA= \
    Intel-NDA \
    mimepp \
    OracleOebs \
    YandexUncategorized \
    YandexNDA

# These licenses allow use with opensource code only
LICENSES_REQUIRE_DISCLOSURE= \
    CDDL-1.0 \
    CDDL-1.1 \
    CECILL-2.0 \
    CPL-1.0 \
    EPL-1.0 \
    EPL-2.0 \
    GPL \
    GPL-1.0-only \
    GPL-1.0-or-later \
    GPL-1.0-or-later WITH Linux-syscall-note \
    GPL-1.1 \
    GPL-2.0 \
    GPL-2.0-only \
    GPL-2.0-only WITH GCC-exception-2.0 \
    GPL-2.0-only WITH Linux-syscall-note \
    GPL-2.0-or-later \
    GPL-2.0-or-later WITH GCC-exception-2.0 \
    GPL-2.0-or-later WITH Linux-syscall-note \
    GPL-3.0-only \
    GPL-3.0-only WITH Bison-exception-2.2 \
    GPL-3.0-or-later \
    GPL-3.0-or-later WITH Bison-exception-2.2 \
    GPLv2+

LICENSES_REQUIRE_DISCLOSURE_STATIC= \
    LGPL \
    LGPL-1.0-or-later \
    LGPL-2.0-only \
    LGPL-2.0-or-later \
    LGPL-2.0-or-later WITH Libtool-exception \
    LGPL-2.0-or-later WITH Linux-syscall-note \
    LGPL-2.1-only \
    LGPL-2.1-only WITH Linux-syscall-note \
    LGPL-2.1-or-later \
    LGPL-2.1-or-later WITH Linux-syscall-note \
    LGPL-3.0-only \
    LGPL-3.0-or-later

# These licenses allows any kind of linkage with proprietary code
LICENSES_PERMISSIVE= \
    0BSD \
    Apache-1.0 \
    Apache-1.1 \
    Apache-2.0 \
    Apache-2.0 WITH LLVM-exception \
    APSL-2.0 \
    Beerware \
    blessing \
    BSD \
    BSD-1-Clause \
    BSD-2-Clause \
    BSD-2-Clause-Patent \
    BSD-2-Clause-Views \
    BSD-3-Clause \
    BSD-4-Clause \
    BSD-4-Clause-UC \
    BSD-derived \
    BSD-ORIGINAL-UC-1986 \
    Bsd-Simplified-Darwin \
    BSD-Source-Code \
    Bsd-Unchanged \
    Bsd-Unmodified \
    BSL-1.0 \
    bzip2-1.0.6 \
    CC-PDDC \
    CC0-1.0 \
    Cmu-Computing-Services \
    CUP-Parser \
    curl \
    Custom-punycode \
    Custom-wcwidth \
    EDL-1.0 \
    Facebook-SDK \
    FDK \
    FSFAP \
    FTL \
    H2 \
    IBM-pibs \
    ICU \
    Ietf \
    IJG \
    Intel-LLVM-SGA \
    Intel-Simplified \
    ISC \
    JSON \
    Khronos \
    Libpbm \
    Libpng \
    libpng-2.0 \
    libtiff \
    LicenseRef-scancode-ams-fonts \
    LicenseRef-scancode-bitstream \
    Linux-OpenIB \
    Martin-Birgmeier \
    Minpack \
    MIT \
    MIT-0 \
    MIT-CMU \
    MIT-Modern-Variant \
    MIT-Nagy \
    Mit-Old-Style \
    MIT-open-group \
    Mit-Veillard-Variant \
    MPL-1.0 \
    MPL-1.1 \
    MPL-2.0 \
    NCSA \
    Not-Applicable \
    NTP \
    Nvidia \
    OGC-1.0 \
    OLDAP-2.8 \
    OML \
    OpenSSL \
    PayPal-SDK \
    PCRE \
    PD \
    PHP-3.01 \
    PIL \
    Plexus \
    PostgreSQL \
    Protobuf-License \
    PSF \
    PSF-2.0 \
    Public-Domain \
    Public-Domain-US-Govt \
    Python-2.0 \
    Qhull \
    Red-Hat-Attribution \
    Repoze-public \
    RSA-1990 \
    RSA-MD \
    RSA-MD4 \
    SGI-B-2.0 \
    Sleepycat \
    SMLNJ \
    Snprintf \
    SSH-short \
    SSLeay \
    Sunpro \
    Unicode-DFS-2016 \
    Unicode-Icu-58 \
    Unicode-Mappings \
    Unlicense \
    Unrar \
    UPL-1.0 \
    Vertica \
    W3C \
    WTFPL \
    X11 \
    X11-Lucent \
    X11-XConsortium-Veillard \
    YandexOpen \
    Zlib \
    zlib-acknowledgement \
    ZPL-2.1 \
    ${CUSTOM_LICENSE_LINUX_SYSCALL_NOTE} \
    ${CUSTOM_LICENSE_MUSL_EXCEPTION} \
    ${LICENSES_PATCHES_FORBIDDEN}

LICENSES_PERMISSIVE_DYNAMIC= \
    LGPL \
    LGPL-2.0-only \
    LGPL-2.0-or-later \
    LGPL-2.1-only \
    LGPL-2.1-or-later \
    LGPL-3.0-only \
    LGPL-3.0-or-later

# https://st.yandex-team.ru/ARCADIAWGSUP-34
CUSTOM_LICENSE_LIBSSH2_AGENT_WIN=Libssh2-Agent-Win
# Permissive if the code is used to declare and invoke syscalls
CUSTOM_LICENSE_LINUX_SYSCALL_NOTE=Linux-syscall-note-in-syscall-glue
# Permissive only in musllib
CUSTOM_LICENSE_MUSL_EXCEPTION=Musl-Exception-in-Musllib

# TODO: this list is almost empty. needed for DEVRULES-151
LICENSES_REQUIRE_CITATION= \
    Apache-2.0 \
    Brian-Gladman-3-Clause \
    Cmu-Computing-Services \
    Custom-Oasis-Pkcs11 \
    EDL-1.0 \
    OpenSSL \
    Spencer-94 \
    NetCDF \
    ${CUSTOM_LICENSE_LIBSSH2_AGENT_WIN}

LICENSES_SERVICE= \
    Service-Dll-Harness \
    Service-Prebuilt-Tool \
    Service-Py23-Proxy

LICENSES_PROTESTWARE= \
    Protestware

macro _REQUIRE_EXPLICIT_LICENSE(Prefix...) {
    SET(EXPLICIT_LICENSE_PREFIXES ${Prefix})
}

### @usage: LICENSE(licenses...)
###
### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this
### library satisfying all conditions of any of the listed licenses.
###
### A license must be prescribed for contribs
macro LICENSE(Flags...) {
    SET(LICENSE_EXPRESSION $Flags)
    SET(LICENSE_NAMES $Flags)
}

### @usage RESTRICT_LICENSES(ALLOW_ONLY|DENY LicenseProperty...)
###
### Restrict licenses of direct and indirect module dependencies.
###
### ALLOW_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions
### list.
###
### DENY restriction type forbids dependency on module with no license without any listed propery from the list.
###
### Note: Can be used multiple times on the same module all specified constraints will be checked.
### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
macro RESTRICT_LICENSES(TYPE, EXCEPT[], RESTRICTIONS...) {
    SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE)
    SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS)
    SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT)
}