OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Makes sure that all files contain proper licensing information.""" | 6 """Makes sure that all files contain proper licensing information.""" |
7 | 7 |
8 | 8 |
9 import optparse | 9 import optparse |
10 import os.path | 10 import os.path |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 'BSD (3 clause) ISC', | 43 'BSD (3 clause) ISC', |
44 'BSD (3 clause) LGPL (v2.1 or later)', | 44 'BSD (3 clause) LGPL (v2.1 or later)', |
45 'BSD (3 clause) MIT/X11 (BSD like)', | 45 'BSD (3 clause) MIT/X11 (BSD like)', |
46 'BSD (4 clause)', | 46 'BSD (4 clause)', |
47 'BSD-like', | 47 'BSD-like', |
48 | 48 |
49 # TODO(phajdan.jr): Make licensecheck not print BSD-like twice. | 49 # TODO(phajdan.jr): Make licensecheck not print BSD-like twice. |
50 'BSD-like MIT/X11 (BSD like)', | 50 'BSD-like MIT/X11 (BSD like)', |
51 | 51 |
52 'BSL (v1.0)', | 52 'BSL (v1.0)', |
53 # TODO(phajdan.jr): Make licensecheck not print the comma after 3.1. | |
54 'BSL (v1.0) GPL (v3.1,)', | |
55 'GPL (v2 or later) with Bison parser exception', | 53 'GPL (v2 or later) with Bison parser exception', |
56 'GPL (v2 or later) with libtool exception', | 54 'GPL (v2 or later) with libtool exception', |
57 'GPL (v3 or later) with Bison parser exception', | 55 'GPL (v3 or later) with Bison parser exception', |
58 'GPL with Bison parser exception', | 56 'GPL with Bison parser exception', |
59 'ISC', | 57 'ISC', |
60 'LGPL', | 58 'LGPL', |
61 'LGPL (v2)', | 59 'LGPL (v2)', |
62 'LGPL (v2 or later)', | 60 'LGPL (v2 or later)', |
63 'LGPL (v2.1)', | 61 'LGPL (v2.1)', |
64 'LGPL (v3 or later)', | 62 'LGPL (v3 or later)', |
65 | 63 |
66 # TODO(phajdan.jr): Make licensecheck convert that comma to a dot. | 64 # TODO(phajdan.jr): Make licensecheck convert that comma to a dot. |
67 'LGPL (v2,1 or later)', | 65 'LGPL (v2,1 or later)', |
68 | 66 |
69 'LGPL (v2.1 or later)', | 67 'LGPL (v2.1 or later)', |
70 'MPL (v1.0) LGPL (v2 or later)', | 68 'MPL (v1.0) LGPL (v2 or later)', |
71 'MPL (v1.1)', | 69 'MPL (v1.1)', |
72 'MPL (v1.1) BSD-like', | 70 'MPL (v1.1) BSD-like', |
73 'MPL (v1.1) BSD-like GPL (unversioned/unknown version)', | 71 'MPL (v1.1) BSD-like GPL (unversioned/unknown version)', |
74 'MPL (v1.1) GPL (unversioned/unknown version)', | 72 'MPL (v1.1) GPL (unversioned/unknown version)', |
75 | 73 |
76 # TODO(phajdan.jr): Make licensecheck not print the comma after 1.1. | 74 # TODO(phajdan.jr): Make licensecheck not print the comma after 1.1. |
77 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2 or later)', | 75 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2 or later)', |
78 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2.1 or later)', | 76 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2.1 or later)', |
79 | 77 |
80 'MIT/X11 (BSD like)', | 78 'MIT/X11 (BSD like)', |
81 'Ms-PL', | 79 'Ms-PL', |
82 'Public domain', | 80 'Public domain', |
| 81 'Public domain BSD', |
| 82 'Public domain BSD (3 clause)', |
| 83 'Public domain BSD-like', |
| 84 'Public domain LGPL (v2.1 or later)', |
83 'libpng', | 85 'libpng', |
84 'zlib/libpng', | 86 'zlib/libpng', |
85 'SGI Free Software License B', | 87 'SGI Free Software License B', |
86 'University of Illinois/NCSA Open Source License (BSD like)', | 88 'University of Illinois/NCSA Open Source License (BSD like)', |
87 ] | 89 ] |
88 | 90 |
89 | 91 |
90 PATH_SPECIFIC_WHITELISTED_LICENSES = { | 92 PATH_SPECIFIC_WHITELISTED_LICENSES = { |
91 'base/hash.cc': [ # http://crbug.com/98100 | 93 'base/hash.cc': [ # http://crbug.com/98100 |
92 'UNKNOWN', | 94 'UNKNOWN', |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ], | 126 ], |
125 | 127 |
126 'native_client': [ # http://crbug.com/98099 | 128 'native_client': [ # http://crbug.com/98099 |
127 'UNKNOWN', | 129 'UNKNOWN', |
128 ], | 130 ], |
129 'native_client/toolchain': [ | 131 'native_client/toolchain': [ |
130 'BSD GPL (v2 or later)', | 132 'BSD GPL (v2 or later)', |
131 'BSD (2 clause) GPL (v2 or later)', | 133 'BSD (2 clause) GPL (v2 or later)', |
132 'BSD (3 clause) GPL (v2 or later)', | 134 'BSD (3 clause) GPL (v2 or later)', |
133 'BSL (v1.0) GPL', | 135 'BSL (v1.0) GPL', |
| 136 'BSL (v1.0) GPL (v3.1)', |
134 'GPL', | 137 'GPL', |
135 'GPL (unversioned/unknown version)', | 138 'GPL (unversioned/unknown version)', |
136 'GPL (v2)', | 139 'GPL (v2)', |
137 | |
138 # TODO(phajdan.jr): Make licensecheck not print the comma after v2. | |
139 'GPL (v2,)', | |
140 | |
141 'GPL (v2 or later)', | 140 'GPL (v2 or later)', |
142 | 141 'GPL (v3.1)', |
143 # TODO(phajdan.jr): Make licensecheck not print the comma after 3.1. | |
144 'GPL (v3.1,)', | |
145 | |
146 'GPL (v3 or later)', | 142 'GPL (v3 or later)', |
147 ], | 143 ], |
148 'net/tools/spdyshark': [ | 144 'net/tools/spdyshark': [ |
149 'GPL (v2 or later)', | 145 'GPL (v2 or later)', |
150 'UNKNOWN', | 146 'UNKNOWN', |
151 ], | 147 ], |
152 | 148 |
153 # http://crbug.com/98107 | 149 # http://crbug.com/98107 |
154 'ppapi/c/documentation/check.sh': [ | 150 'ppapi/c/documentation/check.sh': [ |
155 'UNKNOWN', | 151 'UNKNOWN', |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 ], | 215 ], |
220 'third_party/gles2_conform/GTF_ES': [ # http://crbug.com/98131 | 216 'third_party/gles2_conform/GTF_ES': [ # http://crbug.com/98131 |
221 'UNKNOWN', | 217 'UNKNOWN', |
222 ], | 218 ], |
223 'third_party/harfbuzz': [ # http://crbug.com/98133 | 219 'third_party/harfbuzz': [ # http://crbug.com/98133 |
224 'UNKNOWN', | 220 'UNKNOWN', |
225 ], | 221 ], |
226 'third_party/hunspell': [ # http://crbug.com/98134 | 222 'third_party/hunspell': [ # http://crbug.com/98134 |
227 'UNKNOWN', | 223 'UNKNOWN', |
228 ], | 224 ], |
| 225 'third_party/hyphen/hyphen.tex': [ # http://crbug.com/157375 |
| 226 'UNKNOWN', |
| 227 ], |
229 'third_party/iccjpeg': [ # http://crbug.com/98137 | 228 'third_party/iccjpeg': [ # http://crbug.com/98137 |
230 'UNKNOWN', | 229 'UNKNOWN', |
231 ], | 230 ], |
232 'third_party/icu': [ # http://crbug.com/98301 | 231 'third_party/icu': [ # http://crbug.com/98301 |
233 'UNKNOWN', | 232 'UNKNOWN', |
234 ], | 233 ], |
235 'third_party/jemalloc': [ # http://crbug.com/98302 | 234 'third_party/jemalloc': [ # http://crbug.com/98302 |
236 'UNKNOWN', | 235 'UNKNOWN', |
237 ], | 236 ], |
238 'third_party/lcov': [ # http://crbug.com/98304 | 237 'third_party/lcov': [ # http://crbug.com/98304 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 ], | 307 ], |
309 'third_party/npapi/npspy/extern/java': [ | 308 'third_party/npapi/npspy/extern/java': [ |
310 'GPL (unversioned/unknown version)', | 309 'GPL (unversioned/unknown version)', |
311 ], | 310 ], |
312 'third_party/openssl': [ # http://crbug.com/98451 | 311 'third_party/openssl': [ # http://crbug.com/98451 |
313 'UNKNOWN', | 312 'UNKNOWN', |
314 ], | 313 ], |
315 'third_party/ots/tools/ttf-checksum.py': [ # http://code.google.com/p/ots/i
ssues/detail?id=2 | 314 'third_party/ots/tools/ttf-checksum.py': [ # http://code.google.com/p/ots/i
ssues/detail?id=2 |
316 'UNKNOWN', | 315 'UNKNOWN', |
317 ], | 316 ], |
318 'third_party/molokocacao/NSBezierPath+MCAdditions.h': [ # http://crbug.com/
98453 | 317 'third_party/molokocacao': [ # http://crbug.com/98453 |
319 'UNKNOWN', | 318 'UNKNOWN', |
320 ], | 319 ], |
321 'third_party/npapi/npspy': [ | 320 'third_party/npapi/npspy': [ |
322 'UNKNOWN', | 321 'UNKNOWN', |
323 ], | 322 ], |
324 'third_party/ocmock/OCMock': [ # http://crbug.com/98454 | 323 'third_party/ocmock/OCMock': [ # http://crbug.com/98454 |
325 'UNKNOWN', | 324 'UNKNOWN', |
326 ], | 325 ], |
327 'third_party/opus/src': [ # http://crbug.com/156738 | 326 'third_party/opus/src': [ # http://crbug.com/156738 |
328 'UNKNOWN', | 327 'UNKNOWN', |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 option_parser.add_option('--ignore-suppressions', | 528 option_parser.add_option('--ignore-suppressions', |
530 action='store_true', | 529 action='store_true', |
531 default=False, | 530 default=False, |
532 help='Ignore path-specific license whitelist.') | 531 help='Ignore path-specific license whitelist.') |
533 options, args = option_parser.parse_args() | 532 options, args = option_parser.parse_args() |
534 return check_licenses(options, args) | 533 return check_licenses(options, args) |
535 | 534 |
536 | 535 |
537 if '__main__' == __name__: | 536 if '__main__' == __name__: |
538 sys.exit(main()) | 537 sys.exit(main()) |
OLD | NEW |