-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlicense_data.py
1030 lines (1026 loc) · 39.3 KB
/
license_data.py
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
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
###############################################################################
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
###############################################################################
###############################################################################
# Data format
#
# Blocks are identified by tags, which are equal to or begin with SPDX license
# identifiers (where they exist). If it's multi-licensed, the identifiers are
# pipe-separated ("|"). If there is additional data, it follows, separated by
# an underscore. Tags must be unique in the structure.
#
# For each block, 'match' is a regexp which identifies that license or
# license family uniquely, when matched against a large run-on string of the
# entire comment. 'subs' is a set of sub-flavours of that license. Once a type
# is detected, matches are run against the 'match' member of all the subs. If
# none are detected, you have the base flavour; otherwise you have the
# sub-flavour. This can happen recursively (see 'BSD-2-Clause').
#
# 'match' is designed to work with single-line strings of comment data
# where comment chars have been removed and whitespace has been collapsed.
# The matches are case-sensitive, so your regexps will need to accommodate
# that. The top-level ones are the most performance-critical, so do not use
# expensive regexp constructs.
#
# Once a block has been identified as containing a particular license, you
# search from the start for a line matching 'start', and from the end
# for a line matching 'end', and take all the text in between. These are
# matched against individual *unmodified* license lines. 'start' and 'end'
# are both inherited; if a license definition doesn't have them, the ones from
# the parent are used. At the top level, if there is no 'start' or 'end', the
# value of 'match' is used. These defaults attempt to avoid repetition and
# keep the structure simple.
#
# A 'maxlines' entry allows you to give the maximum length for the license
# text; this tries to avoid encompassing two much text when the end-detection
# line could be matched more than once (e.g. in files which have multiple
# license blocks in). If you find the detector is combining licenses, set a
# 'maxlines' value for the first of the two licenses.
#
# A 'cancel' entry allows you to eliminate false positives. If you match a tag
# T, then any tags listed in T's 'cancel' entry will be removed from the final
# set. So e.g. the MPL/LGPL/GPL tri-license is detected as itself, but also as
# the GPL and the LGPL. However, the MPL-1.1|GPL-2.0+|LGPL-2.1+ entry has a
# 'cancel' value of ['GPL-1.0+', 'LGPL-2.1'], so those other detections are
# cancelled, leaving the correct answer.
#
# An alternative way of cancelling a "detection" is to direct it into a path
# with a tag starting "Ignore_". This can be more convenient than the 'cancel'
# method in some circumstances. Tags starting "Ignore_" are simply removed
# from the returned results.
#
# The above algorithms are implemented by detector.py.
###############################################################################
license_data = {
###############################################################################
# MPL
###############################################################################
'MPL-1.1': {
'start': r"The contents of this (?:file|package) are subject to the",
'match': r"subject to the Mozilla Public License Version 1.1",
'end': r"Contributor|All Rights Reserved|Initial Developer",
'subs': {
'MPL-1.1|GPL-2.0+|LGPL-2.1+': { # Mozilla
'match': r"either the GNU General",
'end': r"terms of any one of the MPL, the GPL or the LGPL",
'cancel': ['GPL-1.0+', 'LGPL-2.1']
},
'MPL-1.1|GPL-2.0': {
'match': r"GNU(?: General)? Public License version 2 \(the \"GPL\"\), in",
'end': r"either the MPL or the GPL",
'cancel': ['GPL-1.0+_2', 'GPL-1.0+', 'GPL-2.0_ref_2']
},
}
},
'MPL-2.0': {
'start': r"Source Code Form [Ii]s subject to the terms of the Mozilla",
'match': r"Mozilla Public License,? (?:v\. |Version )2\.0",
'end': r"You can obtain one at http://mozilla\.org/MPL/2\.0/",
'subs': {
'MPL-2.0_full-text': {
'start': r"Mozilla Public License Version 2\.0",
'match': r"each individual or legal entity",
'end': r"by the Mozilla Public License, v\. 2\.0",
'cancel': ['MPL-2.0-no-copyleft-exception', 'LGPL-2.1', 'GPL-1.0+']
},
'MPL-2.0-no-copyleft-exception': {
'match': r"Incompatible With Secondary Licenses",
'end': r"by the Mozilla Public License, v\. 2\.0"
},
}
},
###############################################################################
# GPL
###############################################################################
'GPL-1.0+': {
'start': r"is free software" + \
r"|This software is licensed under the terms of the GNU" + \
r"|This program can be redistributed or modified",
'match': r"GNU General Public License",
'end': r"along with this program" + \
r"|gnu\.org/licenses/" + \
r"|021(?:10|11|39).*USA" + \
r"|for more details" + \
r"|any later version" + \
r"|Free Software Foundation",
'subs': {
'GPL-2.0': {
'match': r"Foundation; (?:either )?version 2",
'subs': {
'GPL-2.0+': {
'match': r"any later version",
'subs': {
'GPL-2.0+-with-libtool-exception': {
'match': r"GNU Libtool",
},
}
},
'GPL-2.0|GPL-3.0': {
'start': r"is free software[:;] you can redistribute it|This file is part of the",
'match': r"version 3(?:;| dated)",
'end': r"along with this program|gnu\.org/licenses/|0211[01].*USA"
},
'GPL-2.0-with-autoconf-exception_1': {
'match': r"configuration script generated by Autoconf",
'end': r"rest of that program"
},
'GPL-2.0-with-texinfo-exception': {
'match': r"when this file is read by TeX",
'end': r"Texinfo was invented"
},
'MIT|GPL-2.0': {
'start': r"is free software; you can redistribute it",
'match': r"Permission is hereby granted, free of charge",
'end': r"SOFTWARE"
},
},
},
'GPL-3.0': {
'start': r"is free software[:;] you can redistribute it",
'match': r"Foundation; either version 3",
'end': r"along with this program|gnu\.org/licenses/|0211[01].*USA",
'subs': {
'GPL-3.0-with-autoconf-exception_1': {
'match': r"the output of Autoconf when processing",
'end': r"modified version as well"
},
'GPL-3.0-with-autoconf-exception_2': {
'match': r"script generated by Autoconf",
'end': r"of the GNU General Public License, version 3"
},
'GPL-3.0-with-GCC-exception': {
'match': r"GCC Runtime Library Exception",
},
'GPL-3.0-with-libtool-exception': {
'match': r"GNU Libtool",
'end': r"021(?:10|11|39).*USA|for more details|any later version"
},
}
},
'GPL-2.0_3': {
'start': r"is free software; you can redistribute it",
'match': r"License \(?[vV](?:ersion)? ?2\)? as published by the Free",
'end': r"021(?:10|11|39).*USA|Free Software Foundation",
'subs': {
# Version of BSD license not specified
'BSD|GPL-2.0': {
'start': r"is free software; you can redistribute it",
'match': r"BSD license",
'end': r"See README and COPYING for more details|DAMAGE"
},
}
},
'GPL-2.0_4': {
'match': r"terms of version 2 of",
},
# Appears with XML tags in :-|
'OSL-1.1|GPL-2.0': {
'start': r"The contents of this file are subject",
'match': r"Open Software License version 1.1",
'end': r"the OSL or the GPL"
},
'GPL-1.0+_3': {
'start': r"This software may be used and distributed",
'match': r"the GNU General Public License, incorporated",
'end': r"reference"
},
'GPL-2.0_ref': {
'start': r"License terms: GNU General Public License \(GPL\) version 2",
'match': r"License terms: GNU General Public License \(GPL\) version 2",
'end': r"License terms: GNU General Public License \(GPL\) version 2"
},
'GPL-2.0_fileref_2': {
'start': r"This source code is licensed under the GNU General Public License",
'match': r"This source code is licensed under the GNU General Public License",
'end': r"See the file COPYING"
},
'GPL-2.0_fileref_3': {
'start': r"subject to the terms and conditions of the GNU General Public",
'match': r"subject to the terms and conditions of the GNU General Public",
'end': r"more details"
},
'GPL-2.0_fileref_6': {
'start': r"This program is distributed|The full GNU General Public License is included",
'match': r"The full GNU General Public License is included",
'end': r"file called LICENSE"
},
'GPL-2.0_urlref_2': {
'start': r"The code contained herein is licensed under the GNU General Public",
'match': r"The code contained herein is licensed under the GNU General Public",
'end': r"http://www\.gnu\.org/copyleft/gpl\.html"
},
# This is sometimes in a different comment
'GPL-1.0+-with-bison-exception': {
'start': r"As a special exception, you may",
'match': r"of the Bison parser skeleton",
'end': r"of Bison"
},
}
},
'GPL-1.0+_1': {
'match': r"[Ll]icen[cs]ed under the (?:GNU/)?GPL\.?\s*(?:[^-vV]|$)",
'subs': {
'GPL-1.0+_urlref': {
'match': r"Licensed under the GPL \(http://www\.gnu\.org/licenses/gpl.html\) license",
},
}
},
'GPL-1.0+_2': {
'start': r"This file may",
'match': r"under the terms of the GNU Public",
'end': r"License",
'subs': {
}
},
'GPL-1.0+_4': {
'match': r"Released under the General Public License \(GPL\).",
},
'GPL-1.0+-5': {
'match': r"under the terms of GPL \(General Public Licen[cs]e\)"
},
# Let's play: how many ways can kernel developers write "GPL v2"?
'GPL-2.0_2': {
'start': r"is free software; you can redistribute it|This software is licensed under the terms of the GNU",
'match': r"2 of the Licence",
'end': r"any later version",
},
'GPL-2.0_reiser': {
# a reference to reiserfs/README means "GPL"
'match': r"reiserfs/README",
},
'GPL-2.0_ref_2': {
'start': r"This software|License",
'match': r"(?:[Ss]ubject to|terms of) the (?:GNU|Gnu) (?:Public )?[Ll]icense,? (?:v\.|[vV]ersion )2",
'end': r"reference|License"
},
'GPL-2.0_ref_3': {
'match': r"[Rr]eleased under (?:the )?(?:terms of the GNU )?GPL\s?v2",
},
'GPL-2.0_ref_4': {
'match': r"Licensed under the GPL-2",
},
'GPL-2.0_ref_5': {
'match': r"\(As all part of the Linux kernel, this file is GPL\)",
},
'GPL-2.0_ref_6': {
'match': r"[Ll]icensed under GPLv2",
'subs': {
'GPL-2.0+_2': {
'match': "or later"
}
}
},
'GPL-2.0_ref_7': {
'match': r"under the terms of the GNUv2 General Public License",
},
'GPL-2.0_ref_8': {
'match': r"Use consistent with the GNU GPL is permitted",
'end': r"derived works"
},
'GPL-2.0_ref_9': {
'match': r"licensed under General Public License version 2"
},
'GPL-2.0_ref_10': {
'match': r"[Ll]icense is GPLv2"
},
'GPL-2.0_fileref': {
'match': r"This program can be distributed under the terms of the GNU GPL",
'end': r"See the file COPYING"
},
'GPL-2.0_fileref_4': {
'match': r"licensed under (?:the terms of )?the GNU GPL,? version 2",
'end': r"top-level directory"
},
'GPL-2.0_fileref_5': {
'match': r"GPL v2, can be found in COPYING.",
},
'GPL-2.0_fileref_7': {
'start': r"for Linux is distributed under the GNU GENERAL PUBLIC",
'match': r"GNU GENERAL PUBLIC LICENSE \(GPL\)",
'end': r"for more info"
},
'GPL-2.0_fileref_8': {
'match': r"This code is licenced under the GPL version 2.",
'end': r"COPYING"
},
'GPL-2.0_fileref_9': {
'match': r"For licensing details see kernel-base/COPYING",
},
# Various files in the kernel have other terms and then a "GPL Licensing Note"
# which explains why GPLing it is actually OK.
'GPL-2.0_umbrella': {
'match': r"GPL [Ll]icensing [Nn]ote",
},
# Yes, this is a "+" because the actual GPL boilerplate at the end says +.
'BSD-3-Clause|GPL-2.0+': {
'match': r"both the GPL version 2 and BSD licenses",
'end': r"end of this file",
},
'BSD|GPL-2.0_ADI': {
'match': r"Licensed under the ADI BSD license or the GPL-2 \(or later\)"
},
###############################################################################
# LGPL
###############################################################################
'LGPL-1.0+': {
'start': r"This file (?:may|can)|is free software; you can redistribute it",
'match': r"(?:Lesser|Library) General Public License|LESSER GENERAL PUBLIC",
'end': r"General Public License|021(?:10|11|39).*USA|lgpl\.html|Free Software Foundation|of the License",
'subs': {
'LGPL-2.1': {
'match': r"[Vv]ersion 2",
'subs': {
'LGPL-2.1_2': {
'match': r"2\.1 of the GNU Lesser General Public License",
'end': r"A PARTICULAR PURPOSE",
},
'LGPL-2.1_full': {
'start': r"GNU LESSER GENERAL PUBLIC LICENSE",
'match': r"designed to take away",
'end': r"That's all there is to it|DAMAGES",
'cancel': ['GPL-2.0+']
},
'LGPL-2.1+|MPL-1.1|GPL-2.0+': {
'match': r"Alternatively, the.*Mozilla Public License",
'end': r"\(at your option\) any later version",
'cancel': ['GPL-2.0+']
},
'LGPL-2.1|MPL-1.1': { # Cairo
'match': r"should have received a copy of the MPL along with",
'end': r"governing rights and limitations",
'cancel': ['MPL-1.1']
},
}
},
}
},
'LGPL-1.0+_ref': {
'match': r"This file is released under the LGPL\.?$",
},
'LGPL_glib_lookelsewhere': {
# glib license is LGPL
'match': r"This file is distributed under the same license as the glib package",
},
###############################################################################
# Apache
###############################################################################
'Apache-2.0_urlref': {
'match': r"http://www.apache.org/licenses/LICENSE-2\.0",
'subs': {
'Apache-2.0': {
'start': r"Licensed under the Apache License,? Version 2\.0" + \
r"|Licensed to the Apache Software Foundation \(ASF\)",
'match': r"under the Apache License,? Version 2\.0",
'end': r"the License\.?|licenses/LICENSE-2\.0",
'maxlines': 12
},
}
},
'Apache-2.0_fulltext': {
'start': r"Apache License",
'match': r"\"Legal Entity\" shall mean the union of the acting",
'end': r"warranty or additional liability",
'maxlines': 12
},
'Apache-2.0_fileref': {
'match': r"Use of this source code is governed by the Apache License, Version 2\.0",
'end': r"See the COPYING file for details"
},
###############################################################################
# HPND
###############################################################################
'HPND_no-repro-required': {
'start': r"[Pp]ermission to use, copy, modify",
'match': r"[Pp]ermission to use, copy, modify,?(?: and(?:/or)?)? distribute",
'end': r"SOFTWARE|express or implied|without fee|of any kind" + \
r"|written prior permission|supporting documentation" + \
r"|MODIFICATIONS|prior written authorization|DERIVATIVE WORK" + \
r"|implied warranty|is preserved",
'maxlines': 15,
'subs': {
'HPND': {
'match': r"all copies|notice is preserved",
'maxlines': 18
},
'HPND_SunRPCGSS': {
'start': r"Export of this software",
'match': r"WITHIN THAT CONSTRAINT, permission to use",
'end': r"A PARTICULAR PURPOSE"
},
'HPND_Coda': {
'match': r"CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM",
'end': r"DERIVATIVE WORK"
},
}
},
'HPND_3': {
'match': r"Permission to copy, use, modify, sell and distribute",
'end': r"suitability for any purpose",
},
'HPND_4': {
'start': r"Permission is granted to use, copy",
'match': r"create derivative works,? and redistribute",
'end': r"DAMAGES",
},
'HPND_Motorola': {
'start': r"THE SOFTWARE is provided",
'match': r"granted a copyright license to use, modify",
'end': r"of Motorola, Inc.",
},
###############################################################################
# MIT
###############################################################################
'MIT': {
'start': r"Permission is hereby granted, " + \
r"(?:free of charge|without written agreement)" + \
r"|licensed under the MIT",
'match': r"Permission is hereby granted, " + \
r"(?:free of charge|without written agreement)" + \
r"|licensed under the MIT",
'end': r"SOFTWARE|copyright holder|OR MODIFICATIONS|MATERIALS",
'subs': {
'MIT|GPL-2.0_urlref': { # jQuery
'start': r"Dual licensed under the MIT",
'match': r"Dual licensed under the MIT (?:and|or) GPL",
'end': r"jquery\.(?:com|org)/[Ll]icense|licenses\."
},
'MIT|GPL-2.0_fileref': { # jQuery
'start': r"Dual licensed under the MIT",
'match': r"Dual licensed under the MIT \(MIT-LICENSE.txt\) and GPL",
'end': r"licenses"
},
'MIT_BSD_hybrid': {
'match': r"Redistributions? in binary form",
},
'BSL-1.0': {
'start': r"Boost Software License",
'match': r"Boost Software License",
},
'proprietary_MIT_Crockford': {
'match': r"The Software shall be used for Good, not Evil",
},
'MIT_UIllinois': {
'start': r"This file is dual licensed",
'match': r"University of Illinois Open",
'end': r"for details",
'cancel': ['MIT_BSD_hybrid']
},
}
},
'MIT_fileref': {
'start': r"This is free software.*distribute,? or modify",
'match': r"terms of the MIT/X [lL]icense",
'end': r"terms of the MIT/X [lL]icense|with this distribution",
},
'MIT_urlref': {
'match': r"Some rights reserved: <?http://opensource.org/licenses/mit",
},
'MIT_urlref_2': {
'match': r"MIT License - http://opensource.org/licenses/mit-license\.php",
},
'MIT_ref': {
'match': r"under (?:an |the )?MIT license",
'end': r"http://opensource.org/licenses/MIT|under (?:an |the )?MIT license",
'maxlines': 5,
'subs': {
'MIT_Lodash_urlref': {
'start': r"Available under MIT license",
'match': r"lodash.com/license",
'end': r"Available under MIT license"
},
'MIT_codemirror_urlref': {
'match': r"codemirror\.net/LICENSE",
'end': r"LICENSE"
},
}
},
'MIT_ref2': {
'match': r"MIT Licensed",
},
'MIT|BSD-3-Clause_alameda': {
'match': r"Available via the MIT or new BSD license",
'end': r"http://github\.com/requirejs/alameda",
},
'BSL-1.0_urlref': {
'match': r"the Boost Software License, Version 1\.0",
'end': r"http://www\.boost\.org/LICENSE_1_0\.txt",
},
###############################################################################
# BSD
###############################################################################
'BSD-2-Clause': {
'match': r"Redistribution and use of this software" + \
r"|[Rr]edistribution and use in source (?:and|or)",
'end': r"DAMAGE|PURPOSE|warranty",
'subs': {
'BSD-3-Clause': {
'match': r"name.*(?:may|must) not be used to" + \
r"|Neither the (?:author|name).*may be used to" + \
r"|The name of the company nor the name of the author",
'subs': {
'BSD-4-Clause': {
'match': r"advertising materials",
'subs': {
# The 4th clause is not a problem for the next two
# entries because it has been waived permanently by
# the copyright holder/credit target.
'BSD-4-Clause_UC': {
'match': r"University of California",
'subs': {
# Not clear how much of a problem this is in
# practice...
'proprietary_BSD-4-Clause-like_no-mod': {
'match': r"^((?!modification).)*$"
}
}
},
'BSD-4-Clause_NetBSD': {
'match': r"The NetBSD Foundation",
},
# Waived for Mozilla code only
'BSD-4-Clause_RTFM': {
'match': r"RTFM, Inc",
},
}
},
'BSD|GPL-1.0+': {
'match': r"General Public License",
'end': r"DAMAGE|damage|IN ANY WAY",
'cancel': ['GPL-1.0+'],
'subs': {
'BSD|GPL-2.0_2': {
'match': r"version 2",
'cancel': ['GPL-1.0+']
}
}
},
'proprietary_Frauhofer_free-beer': {
'start': r"COPYRIGHT LICENSE",
'match': r"free of charge copies of the complete source code",
'end': r"such damage",
}
}
},
'BSD-4-Clause_SSLeay': {
'match': r"Eric Young|Tim Hudson",
},
'Permissive_6': {
'match': r"provided that redistributions of source",
'end': r"modification",
},
}
},
'BSD_fileref': {
'start': r"Use of this",
'match': r"source code is governed by a BSD-style",
'end': r"LICENSE|source tree|PATENTS"
},
'BSD_fileref2': {
'match': r"BSD, see LICENSE for details",
},
'BSD_fileref3': {
'match': r"This software may be distributed under the terms of the BSD license",
'end': r"See README for more details"
},
'BSD-3-Clause_fileref_xiph': {
'start': r"USE, DISTRIBUTION AND REPRODUCTION",
'match': r"BSD-STYLE SOURCE LICENSE INCLUDED WITH",
'end': r"TERMS BEFORE DISTRIBUTING"
},
'BSD-2-Clause_urlref': {
'match': r"The program is distributed under terms of BSD",
'end': r"licenses/bsd-license\.php"
},
'BSD-3-Clause_urlref': {
'match': r"Licensed under the New BSD license",
'end': r"licenses/BSD-3-Clause"
},
'BSD-3-Clause_urlref_yui': {
'start': r"Code licensed under the BSD License",
'match': r"http://developer\.yahoo\.com/yui/license\.html",
},
'BSD-3-Clause_urlref_paj': {
'start': r"Distributed under the BSD License",
'match': r"See http://pajhome\.org\.uk/crypt/md5 for",
'end': r"http://pajhome\.org\.uk/crypt/md5 for"
},
'BSD-3-Clause_urlref_voidspace': {
'start': r"This software is licensed under the terms of the BSD license",
'match': r"http://www\.voidspace\.org\.uk/python/license.shtml",
},
'BSD-3-Clause_EDL_urlref': {
'start': r"This program and the accompanying materials",
'match': r"http://www\.eclipse\.org/org/documents/edl-v10\.html",
},
'BSD-3-Clause_NetBSD_ref': {
'start': r"These changes are offered",
'match': r"same license as the original NetBSD file",
'end': r"unchanged above"
},
'BSD-Protection': {
'match': r"BSD PROTECTION LICENSE",
'end': r"OF SUCH DAMAGES"
},
'BSD-like_editline': {
'start': r"Permission is granted to anyone to use this",
'match': r"no matter how awful",
'end': r"removed or altered",
},
'BSD-like_Apple_no_patents': {
'start': r"This Apple software is supplied to you by",
'match': r"Apple herein, including but not limited to any patent rights",
'end': r"SUCH DAMAGE",
},
'BSD_ref': {
'match': r"licensed under the BSD licen[sc]e"
},
###############################################################################
# Generic filerefs (i.e. filename does not define license)
###############################################################################
'COPYING_fileref': {
'match': r"See the file COPYING for copying permission",
},
'COPYING_fileref2': {
'start': r"COPYING for licensing terms",
'match': r"See (?:\.\./)*COPYING for licensing terms",
'end': r"COPYING for licensing terms"
},
'COPYRIGHT_fileref': {
'match': r"See the accompanying file \"COPYRIGHT\" for",
'end': r"NO WARRANTY FOR THIS SOFTWARE"
},
'LICENSE_fileref': {
'match': r"See LICENSE for copying information",
},
'po_fileref': {
'match': r"This file is distributed under the same license as the .{0,20} package.",
},
'README_fileref': {
'start': r"For details on the license",
'match': r"file, README, in this same",
'end': r"file, README, in this same"
},
'LICENSE.txt_fileref': {
'match': r"See LICENSE.txt for license details"
},
###############################################################################
# Permissive
#
# "Permissive" licenses in this context are those which do not have text
# reproduction requirements
###############################################################################
'Permissive_GNU1': {
'match': r"Copying and distribution of this file, with or without",
'end': r"notice are preserved"
},
'Permissive_GNU2': {
'start': r"This (?:Makefile\.in|file) is free software",
'match': r"This (?:Makefile\.in|file) is free software.*with or without modifications",
'end': r"PARTICULAR PURPOSE|notice is preserved",
'maxlines': 10
},
'Permissive_1': {
'match': r"This software is provided \"as is\"; redistribution and",
'end': r"possibility of such damage"
},
'Permissive_2': {
'match': r"This material is provided \"as is\", with absolutely no",
'end': r"above copyright notice"
},
'Permissive_3': {
'start': r"You may redistribute unmodified or modified versions",
'match': r"I shall in no event be liable",
'end': r"using this software"
},
'Permissive_4': {
'start': r"You may use this program",
'match': r"as desired without restriction",
},
'Permissive_5': {
'start': r"You may use, copy, modify and distribute this code",
'match': r"use\) and without fee",
'end': r"this code"
},
'Permissive_ACE': {
'start': r"ACE\(TM\), TAO\(TM\), CIAO\(TM\)",
'match': r"built using DOC software",
'end': r"their names",
'cancel': ['Permissive_ACE_urlref']
},
'Permissive_ACE_urlref': {
'start': r"Use of this source code",
'match': r"http://www1\.cse\.wustl\.edu/~schmidt/ACE-copying\.html"
},
###############################################################################
# Other Copyleft
###############################################################################
'GFDL-1.2': {
'start': r"Permission is granted to copy, distribute",
'match': r"GNU Free Documentation License, Version 1\.2",
'end': r"Back-Cover Texts"
},
###############################################################################
# Other Non-Copyleft
###############################################################################
'AFL-2.1': {
'match': r"Licensed under the Academic Free License version 2.1",
},
'ICU': {
'start': r"This software is made|ICU License",
'match': r"ICU License --? ICU",
'end': r"respective owners|and later"
},
'BSD-3-Clause_JPNIC': {
'start': r"The following License Terms and Conditions apply",
'match': r"The name of JPNIC may not be used",
'end': r"POSSIBILITY OF SUCH DAMAGES"
},
'ISC_fileref': {
'match': r"This program is made available under an ISC-style license",
'end': r"file LICENSE for details"
},
'SGI-B-1.1': {
'start': r"License Applicability",
'match': r"SGI Free Software License B, Version 1.1",
'end': r"NON-INFRINGEMENT"
},
'SGI-B-2.0': {
'start': r"SGI Free Software B License",
'match': r"SGI Free Software B License Version 2\.0",
'end': r"oss\.sgi\.com/projects/FreeB/"
},
'NVidia': {
'match': r"NVIDIA Corporation\(\"NVIDIA\"\) supplies this software to you",
'end': r"OF SUCH DAMAGE"
},
'FTL': {
'start': r"This software, and all works of authorship",
'match': r"distributed under the FreeType Project License",
'end': r"and you accept them fully"
},
'FTL_fileref': {
'match': r"This file is part of the FreeType project" + \
r"|under the terms of the FreeType project license",
'end': r"fully"
},
'FTL_fulltext': {
'match': r"The FreeType Project LICENSE",
'end': r"http://www\.freetype\.org"
},
'W3C_urlref': {
'match': r"(?:program|work) is distributed under the W3C(?:'s|\(r\)) Software" + \
r"|The following software licensing rules apply",
'end': r"A PARTICULAR PURPOSE|for more details|copyright-software"
},
'WebM_urlref': {
'match': r"This code is licensed under the same terms as WebM",
'end': r"Additional IP Rights Grant|Software License Agreement"
},
'WHATWG': {
'start': r"You are granted a license to use",
'match': r"use, reproduce and create derivative works of",
'end': r"this document"
},
'Zlib_ref': {
'match': r"Licensed under the zlib/libpng license",
},
'Zlib_ref2': {
'start': r"See the accompanying file LICENSE",
'match': r"are also included in zip\.h",
'end': r"license\.html",
},
'Zlib_ref3': {
'match': r"Open source license information is in the zlib\.ads file.",
},
'Zlib_fileref': {
'start': r"For conditions of distribution and use, see copyright notice",
'match': r"distribution and use, see copyright notice in (?:zlib|blast|puff)\.h",
'end': r"notice in"
},
'bzip2-1.0.6_fileref': {
'start': r"This program is released under the terms",
'match': r"This program is released under the terms of the license contained in the file LICENSE.",
'end': r"the file LICENSE"
},
'jsimdext_fileref': {
'match': r"For conditions of distribution and use, see copyright notice in jsimdext\.inc",
},
'Python-2.0': {
'start': r"This module is free software, and you",
'match': r"same terms as Python itself",
'end': r"OR MODIFICATIONS"
},
'CDDL-1.0': {
'start': r"The contents of this file are subject",
'match': r"Common Development and Distribution License",
'end': r"under the License"
},
'Libpng': {
'match': r"The PNG Reference Library is supplied",
'end': r"appreciated"
},
'Libpng_fileref': {
'match': r"This (?:code|document) is released under the libpng license",
'end': r"under the libpng license|license in png.h"
},
'curl_urlref': {
'start': r"This software is licensed as described",
'match': r"http://curl\.haxx\.se/docs/copyright\.html",
'end': r"either express or implied"
},
'IJG_fileref': {
'match': r"part of the Independent JPEG Group's software",
'end': r"accompanying README file"
},
'IJG': {
'start': r"The authors make NO WARRANTY or representation",
'match': r"for the use of any IJG author's name",
'end': r"by the product vendor"
},
'Zlib': {
'start': r"This software is provided 'as-is'",
'match': r"use this software for any purpose, including commercial applications",
'end': r"any source distribution"
},
'MirOS': {
'start': r"Provided that these terms and disclaimer and all",
'match': r"immediate fault when using",
'end': r"using the work as intended"
},
'NAIST': {
'start': r"Use, reproduction, and distribution of this software",
'match': r"in no event shall NAIST be liable",
'end': r"program is concerned"
},
'Mozilla_lookelsewhere': {
'match': r"Please see the file toolkit/content/license\.html",
'end': r"name or logo|licensing\.html"
},
'Unicode-TOU_urlref': {
'match': r"For terms of use, see http://www\.unicode\.org/terms_of_use\.html",
},
'OpenSSL_ref': {
'start': r"Rights for redistribution|The OpenSSL Project",
'match': r"according to the OpenSSL license",
},
# This is a non-free license but it got changed by Sun:
# http://spot.livejournal.com/315383.html
'SunRPC': {
'start': r"Sun RPC is a product of Sun Microsystems, Inc",
'match': r"copy or modify Sun RPC without charge",
'end': r"possibility of such damages"
},
'gzlog.h_fileref': {
'match': r"For conditions of distribution and use, see copyright notice in gzlog\.h",
},
###############################################################################
# OFL
###############################################################################
'OFL-1.0': {
'start': r"This Font Software is licensed",
'match': r"SIL Open Font License, Version 1\.0",
'end': r"IN THE FONT SOFTWARE",
'cancel': ['MIT']
},
'OFL-1.1': {
'start': r"This Font Software is licensed",
'match': r"SIL Open Font License, Version 1\.1",
'end': r"IN THE FONT SOFTWARE",
'cancel': ['MIT']
},
'OFL-1.1_ref': {
'start': r"Licensed under the SIL",
'match': r"SIL Open Font License 1.1 \(see file",
'end': r"OFL.txt"
},
###############################################################################
# EPL
###############################################################################
'EPL-1.0': {
'match': r"Licensed under the Eclipse Public License, Version 1\.0",
'end': r"under the License"
},
'EPL-1.0_fulltext': {
'start': r"Eclipse Public License - v 1\.0",
'match': r"The Eclipse Foundation is the initial Agreement Steward",
'end': r"any resulting litigation"
},
###############################################################################
# CPL
###############################################################################
'CPL-1.0': {
'start': r"THE ACCOMPANYING PROGRAM|DEFINITIONS",
'match': r"COMMON PUBLIC LICENSE",
'end': r"any resulting litigation"
},
###############################################################################
# CC (could expand this to capture version)
###############################################################################
'CC-BY': {
'match': r"Creative Commons Attribution \d\.\d",
},
###############################################################################
# Public Domain
###############################################################################
'PD': {
'match': r"[Pp]ublic [Dd]omain|PUBLIC DOMAIN",
'end': r"[Pp]ublic [Dd]omain|PUBLIC DOMAIN|conceived",
'subs': {
'CC0-1.0': {
'start': r"Any copyright is dedicated to the Public Domain" + \
"|http://creativecommons\.org/(?:publicdomain/zero/1\.0|licenses/publicdomain)",
'match': r"Any copyright is dedicated to the Public Domain" + \
"|http://creativecommons\.org/(?:publicdomain/zero/1\.0|licenses/publicdomain)",
'end': r"http://creativecommons\.org/(?:publicdomain/zero/1\.0|licenses/publicdomain)"
},
'PD_Peslyak': {
'start': r"This software was written by Alexander",
'match': r"This software was written by Alexander Peslyak",
'end': r"express or implied"
}
}
},
'PD_no-copyrightable-info': {
'start': r"This header was automatically generated from",
'match': r"no copyrightable information",
},
'PD_not-copyrightable': {
'match': r"Not copyrightable",
},
'PD_sqlite-blessing': {
'start': r"The author disclaims copyright",
'match': r"In place of a legal notice, here is a blessing",
'end': r"taking more than you give"
},
'PD_explicitly-no-copyright': {
'match': r"Explicitly no copyright\.",
},
###############################################################################
# Proprietary
###############################################################################
'proprietary_RFC': {
'match': r"Permission is granted to copy and distribute this document",
'end': r"marked"
},
'proprietary_IBM': {
'start': r"International Business Machines",
'match': r"(?:International Business Machines|IBM) Corporation and others\.\s+All [Rr]ights [Rr]eserved",
},
'proprietary_IBM_purify': {
'start': r"IBM Corporation",
'match': r"All Rights Reserved. You may recompile and redistribute these definitions as required.",
'end': r"as required"
},
'proprietary_Unicode': {
'match': r"This source code is provided as is by Unicode, Inc",
'end': r"remains attached"
},
'proprietary_Microsoft': {
'start': r"This license governs use of code marked",
'match': r"Microsoft Windows operating system product",
'maxlines': 80
},
'proprietary_Microsoft_2': {
'match': r"MICROSOFT LIMITED PUBLIC LICENSE",
'end': r"http://msdn\.microsoft\.com/en-us/cc300389\.aspx#P"
},
'proprietary_Broadcom_2': {
'match': r"UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom",
'end': r"permission of Broadcom Corporation"
},
'proprietary_NC': {
'match': r"non-commercial",
'subs': {
'Ignore_commercial': {