chiark / gitweb /
lint: add more VCS HTTPS checks
[fdroidserver.git] / fdroidserver / lint.py
1 #!/usr/bin/env python3
2 #
3 # lint.py - part of the FDroid server tool
4 # Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See th
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public Licen
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 from argparse import ArgumentParser
20 import glob
21 import os
22 import re
23 import sys
24
25 from . import _
26 from . import common
27 from . import metadata
28 from . import rewritemeta
29
30 config = None
31 options = None
32
33
34 def enforce_https(domain):
35     return (re.compile(r'.*[^sS]://[^/]*' + re.escape(domain) + r'(/.*)?'),
36             domain + " URLs should always use https://")
37
38
39 https_enforcings = [
40     enforce_https('github.com'),
41     enforce_https('gitlab.com'),
42     enforce_https('bitbucket.org'),
43     enforce_https('apache.org'),
44     enforce_https('google.com'),
45     enforce_https('git.code.sf.net'),
46     enforce_https('svn.code.sf.net'),
47     enforce_https('anongit.kde.org'),
48     enforce_https('savannah.nongnu.org'),
49     enforce_https('git.savannah.nongnu.org'),
50     enforce_https('download.savannah.nongnu.org'),
51     enforce_https('savannah.gnu.org'),
52     enforce_https('git.savannah.gnu.org'),
53     enforce_https('download.savannah.gnu.org'),
54 ]
55
56
57 def forbid_shortener(domain):
58     return (re.compile(r'https?://[^/]*' + re.escape(domain) + r'/.*'),
59             _("URL shorteners should not be used"))
60
61
62 http_url_shorteners = [
63     forbid_shortener('goo.gl'),
64     forbid_shortener('t.co'),
65     forbid_shortener('ur1.ca'),
66     forbid_shortener('is.gd'),
67     forbid_shortener('bit.ly'),
68     forbid_shortener('tiny.cc'),
69     forbid_shortener('tinyurl.com'),
70 ]
71
72 http_checks = https_enforcings + http_url_shorteners + [
73     (re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
74      _("Appending .git is not necessary")),
75     (re.compile(r'.*://[^/]*(github|gitlab|bitbucket|rawgit)[^/]*/([^/]+/){1,3}master'),
76      _("Use /HEAD instead of /master to point at a file in the default branch")),
77 ]
78
79 regex_checks = {
80     'WebSite': http_checks,
81     'SourceCode': http_checks,
82     'Repo': https_enforcings,
83     'IssueTracker': http_checks + [
84         (re.compile(r'.*github\.com/[^/]+/[^/]+/*$'),
85          _("/issues is missing")),
86         (re.compile(r'.*gitlab\.com/[^/]+/[^/]+/*$'),
87          _("/issues is missing")),
88     ],
89     'Donate': http_checks + [
90         (re.compile(r'.*flattr\.com'),
91          _("Flattr donation methods belong in the FlattrID flag")),
92     ],
93     'Changelog': http_checks,
94     'Author Name': [
95         (re.compile(r'^\s'),
96          _("Unnecessary leading space")),
97         (re.compile(r'.*\s$'),
98          _("Unnecessary trailing space")),
99     ],
100     'Summary': [
101         (re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
102          _("No need to specify that the app is Free Software")),
103         (re.compile(r'.*((your|for).*android|android.*(app|device|client|port|version))', re.IGNORECASE),
104          _("No need to specify that the app is for Android")),
105         (re.compile(r'.*[a-z0-9][.!?]( |$)'),
106          _("Punctuation should be avoided")),
107         (re.compile(r'^\s'),
108          _("Unnecessary leading space")),
109         (re.compile(r'.*\s$'),
110          _("Unnecessary trailing space")),
111     ],
112     'Description': [
113         (re.compile(r'\s*[*#][^ .]'),
114          _("Invalid bulleted list")),
115         (re.compile(r'^\s'),
116          _("Unnecessary leading space")),
117         (re.compile(r'.*\s$'),
118          _("Unnecessary trailing space")),
119         (re.compile(r'.*([^[]|^)\[[^:[\]]+( |\]|$)'),
120          _("Invalid link - use [http://foo.bar Link title] or [http://foo.bar]")),
121         (re.compile(r'(^|.* )https?://[^ ]+'),
122          _("Unlinkified link - use [http://foo.bar Link title] or [http://foo.bar]")),
123     ],
124 }
125
126 locale_pattern = re.compile(r'^[a-z]{2,3}(-[A-Z][A-Z])?$')
127
128
129 def check_regexes(app):
130     for f, checks in regex_checks.items():
131         for m, r in checks:
132             v = app.get(f)
133             t = metadata.fieldtype(f)
134             if t == metadata.TYPE_MULTILINE:
135                 for l in v.splitlines():
136                     if m.match(l):
137                         yield "%s at line '%s': %s" % (f, l, r)
138             else:
139                 if v is None:
140                     continue
141                 if m.match(v):
142                     yield "%s '%s': %s" % (f, v, r)
143
144
145 def get_lastbuild(builds):
146     lowest_vercode = -1
147     lastbuild = None
148     for build in builds:
149         if not build.disable:
150             vercode = int(build.versionCode)
151             if lowest_vercode == -1 or vercode < lowest_vercode:
152                 lowest_vercode = vercode
153         if not lastbuild or int(build.versionCode) > int(lastbuild.versionCode):
154             lastbuild = build
155     return lastbuild
156
157
158 def check_ucm_tags(app):
159     lastbuild = get_lastbuild(app.builds)
160     if (lastbuild is not None
161             and lastbuild.commit
162             and app.UpdateCheckMode == 'RepoManifest'
163             and not lastbuild.commit.startswith('unknown')
164             and lastbuild.versionCode == app.CurrentVersionCode
165             and not lastbuild.forcevercode
166             and any(s in lastbuild.commit for s in '.,_-/')):
167         yield _("Last used commit '{commit}' looks like a tag, but Update Check Mode is '{ucm}'")\
168             .format(commit=lastbuild.commit, ucm=app.UpdateCheckMode)
169
170
171 def check_char_limits(app):
172     limits = config['char_limits']
173
174     if len(app.Summary) > limits['summary']:
175         yield _("Summary of length {length} is over the {limit} char limit")\
176             .format(length=len(app.Summary), limit=limits['summary'])
177
178     if len(app.Description) > limits['description']:
179         yield _("Description of length {length} is over the {limit} char limit")\
180             .format(length=len(app.Description), limit=limits['description'])
181
182
183 def check_old_links(app):
184     usual_sites = [
185         'github.com',
186         'gitlab.com',
187         'bitbucket.org',
188     ]
189     old_sites = [
190         'gitorious.org',
191         'code.google.com',
192     ]
193     if any(s in app.Repo for s in usual_sites):
194         for f in ['WebSite', 'SourceCode', 'IssueTracker', 'Changelog']:
195             v = app.get(f)
196             if any(s in v for s in old_sites):
197                 yield _("App is in '{repo}' but has a link to {url}")\
198                     .format(repo=app.Repo, url=v)
199
200
201 def check_useless_fields(app):
202     if app.UpdateCheckName == app.id:
203         yield _("Update Check Name is set to the known app id - it can be removed")
204
205
206 filling_ucms = re.compile(r'^(Tags.*|RepoManifest.*)')
207
208
209 def check_checkupdates_ran(app):
210     if filling_ucms.match(app.UpdateCheckMode):
211         if not app.AutoName and not app.CurrentVersion and app.CurrentVersionCode == '0':
212             yield _("UCM is set but it looks like checkupdates hasn't been run yet")
213
214
215 def check_empty_fields(app):
216     if not app.Categories:
217         yield _("Categories are not set")
218
219
220 all_categories = set([
221     "Connectivity",
222     "Development",
223     "Games",
224     "Graphics",
225     "Internet",
226     "Money",
227     "Multimedia",
228     "Navigation",
229     "Phone & SMS",
230     "Reading",
231     "Science & Education",
232     "Security",
233     "Sports & Health",
234     "System",
235     "Theming",
236     "Time",
237     "Writing",
238 ])
239
240
241 def check_categories(app):
242     for categ in app.Categories:
243         if categ not in all_categories:
244             yield _("Category '%s' is not valid" % categ)
245
246
247 def check_duplicates(app):
248     if app.Name and app.Name == app.AutoName:
249         yield _("Name '%s' is just the auto name - remove it") % app.Name
250
251     links_seen = set()
252     for f in ['Source Code', 'Web Site', 'Issue Tracker', 'Changelog']:
253         v = app.get(f)
254         if not v:
255             continue
256         v = v.lower()
257         if v in links_seen:
258             yield _("Duplicate link in '{field}': {url}").format(field=f, url=v)
259         else:
260             links_seen.add(v)
261
262     name = app.Name or app.AutoName
263     if app.Summary and name:
264         if app.Summary.lower() == name.lower():
265             yield _("Summary '%s' is just the app's name") % app.Summary
266
267     if app.Summary and app.Description and len(app.Description) == 1:
268         if app.Summary.lower() == app.Description[0].lower():
269             yield _("Description '%s' is just the app's summary") % app.Summary
270
271     seenlines = set()
272     for l in app.Description.splitlines():
273         if len(l) < 1:
274             continue
275         if l in seenlines:
276             yield _("Description has a duplicate line")
277         seenlines.add(l)
278
279
280 desc_url = re.compile(r'(^|[^[])\[([^ ]+)( |\]|$)')
281
282
283 def check_mediawiki_links(app):
284     wholedesc = ' '.join(app.Description)
285     for um in desc_url.finditer(wholedesc):
286         url = um.group(1)
287         for m, r in http_checks:
288             if m.match(url):
289                 yield _("URL {url} in Description: {error}").format(url=url, error=r)
290
291
292 def check_bulleted_lists(app):
293     validchars = ['*', '#']
294     lchar = ''
295     lcount = 0
296     for l in app.Description.splitlines():
297         if len(l) < 1:
298             lcount = 0
299             continue
300
301         if l[0] == lchar and l[1] == ' ':
302             lcount += 1
303             if lcount > 2 and lchar not in validchars:
304                 yield _("Description has a list (%s) but it isn't bulleted (*) nor numbered (#)") % lchar
305                 break
306         else:
307             lchar = l[0]
308             lcount = 1
309
310
311 def check_builds(app):
312     supported_flags = set(metadata.build_flags)
313     # needed for YAML and JSON
314     for build in app.builds:
315         if build.disable:
316             if build.disable.startswith('Generated by import.py'):
317                 yield _("Build generated by `fdroid import` - remove disable line once ready")
318             continue
319         for s in ['master', 'origin', 'HEAD', 'default', 'trunk']:
320             if build.commit and build.commit.startswith(s):
321                 yield _("Branch '{branch}' used as commit in build '{versionName}'")\
322                     .format(branch=s, versionName=build.versionName)
323             for srclib in build.srclibs:
324                 ref = srclib.split('@')[1].split('/')[0]
325                 if ref.startswith(s):
326                     yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
327                         .format(branch=s, srclib=srclib)
328         for key in build.keys():
329             if key not in supported_flags:
330                 yield _('%s is not an accepted build field') % key
331
332
333 def check_files_dir(app):
334     dir_path = os.path.join('metadata', app.id)
335     if not os.path.isdir(dir_path):
336         return
337     files = set()
338     for name in os.listdir(dir_path):
339         path = os.path.join(dir_path, name)
340         if not (os.path.isfile(path) or name == 'signatures' or locale_pattern.match(name)):
341             yield _("Found non-file at %s") % path
342             continue
343         files.add(name)
344
345     used = {'signatures', }
346     for build in app.builds:
347         for fname in build.patch:
348             if fname not in files:
349                 yield _("Unknown file '{filename}' in build '{versionName}'")\
350                     .format(filename=fname, versionName=build.versionName)
351             else:
352                 used.add(fname)
353
354     for name in files.difference(used):
355         if locale_pattern.match(name):
356             continue
357         yield _("Unused file at %s") % os.path.join(dir_path, name)
358
359
360 def check_format(app):
361     if options.format and not rewritemeta.proper_format(app):
362         yield _("Run rewritemeta to fix formatting")
363
364
365 def check_license_tag(app):
366     '''Ensure all license tags are in https://spdx.org/license-list'''
367     if app.License.rstrip('+') not in SPDX:
368         yield _('Invalid license tag "%s"! Use only tags from https://spdx.org/license-list') \
369             % (app.License)
370
371
372 def check_extlib_dir(apps):
373     dir_path = os.path.join('build', 'extlib')
374     unused_extlib_files = set()
375     for root, dirs, files in os.walk(dir_path):
376         for name in files:
377             unused_extlib_files.add(os.path.join(root, name)[len(dir_path) + 1:])
378
379     used = set()
380     for app in apps:
381         for build in app.builds:
382             for path in build.extlibs:
383                 if path not in unused_extlib_files:
384                     yield _("{appid}: Unknown extlib {path} in build '{versionName}'")\
385                         .format(appid=app.id, path=path, versionName=build.versionName)
386                 else:
387                     used.add(path)
388
389     for path in unused_extlib_files.difference(used):
390         if any(path.endswith(s) for s in [
391                 '.gitignore',
392                 'source.txt', 'origin.txt', 'md5.txt',
393                 'LICENSE', 'LICENSE.txt',
394                 'COPYING', 'COPYING.txt',
395                 'NOTICE', 'NOTICE.txt',
396                 ]):
397             continue
398         yield _("Unused extlib at %s") % os.path.join(dir_path, path)
399
400
401 def check_for_unsupported_metadata_files(basedir=""):
402     """Checks whether any non-metadata files are in metadata/"""
403
404     global config
405
406     return_value = False
407     formats = config['accepted_formats']
408     for f in glob.glob(basedir + 'metadata/*') + glob.glob(basedir + 'metadata/.*'):
409         if os.path.isdir(f):
410             exists = False
411             for t in formats:
412                 exists = exists or os.path.exists(f + '.' + t)
413             if not exists:
414                 print(_('"%s/" has no matching metadata file!') % f)
415                 return_value = True
416         elif not os.path.splitext(f)[1][1:] in formats:
417             print('"' + f.replace(basedir, '')
418                   + '" is not a supported file format: (' + ','.join(formats) + ')')
419             return_value = True
420
421     return return_value
422
423
424 def main():
425
426     global config, options
427
428     # Parse command line...
429     parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
430     common.setup_global_opts(parser)
431     parser.add_argument("-f", "--format", action="store_true", default=False,
432                         help=_("Also warn about formatting issues, like rewritemeta -l"))
433     parser.add_argument("appid", nargs='*', help=_("applicationId in the form APPID"))
434     metadata.add_metadata_arguments(parser)
435     options = parser.parse_args()
436     metadata.warnings_action = options.W
437
438     config = common.read_config(options)
439
440     # Get all apps...
441     allapps = metadata.read_metadata(xref=True)
442     apps = common.read_app_args(options.appid, allapps, False)
443
444     anywarns = check_for_unsupported_metadata_files()
445
446     apps_check_funcs = []
447     if len(options.appid) == 0:
448         # otherwise it finds tons of unused extlibs
449         apps_check_funcs.append(check_extlib_dir)
450     for check_func in apps_check_funcs:
451         for warn in check_func(apps.values()):
452             anywarns = True
453             print(warn)
454
455     for appid, app in apps.items():
456         if app.Disabled:
457             continue
458
459         app_check_funcs = [
460             check_regexes,
461             check_ucm_tags,
462             check_char_limits,
463             check_old_links,
464             check_checkupdates_ran,
465             check_useless_fields,
466             check_empty_fields,
467             check_categories,
468             check_duplicates,
469             check_mediawiki_links,
470             check_bulleted_lists,
471             check_builds,
472             check_files_dir,
473             check_format,
474             check_license_tag,
475         ]
476
477         for check_func in app_check_funcs:
478             for warn in check_func(app):
479                 anywarns = True
480                 print("%s: %s" % (appid, warn))
481
482     if anywarns:
483         sys.exit(1)
484
485
486 # A compiled, public domain list of official SPDX license tags from:
487 # https://github.com/sindresorhus/spdx-license-list/blob/v3.0.1/spdx-simple.json
488 # The deprecated license tags have been removed from the list, they are at the
489 # bottom, starting after the last license tags that start with Z.
490 # This is at the bottom, since its a long list of data
491 SPDX = [
492     "PublicDomain",  # an F-Droid addition, until we can enforce a better option
493     "Glide",
494     "Abstyles",
495     "AFL-1.1",
496     "AFL-1.2",
497     "AFL-2.0",
498     "AFL-2.1",
499     "AFL-3.0",
500     "AMPAS",
501     "APL-1.0",
502     "Adobe-Glyph",
503     "APAFML",
504     "Adobe-2006",
505     "AGPL-1.0",
506     "Afmparse",
507     "Aladdin",
508     "ADSL",
509     "AMDPLPA",
510     "ANTLR-PD",
511     "Apache-1.0",
512     "Apache-1.1",
513     "Apache-2.0",
514     "AML",
515     "APSL-1.0",
516     "APSL-1.1",
517     "APSL-1.2",
518     "APSL-2.0",
519     "Artistic-1.0",
520     "Artistic-1.0-Perl",
521     "Artistic-1.0-cl8",
522     "Artistic-2.0",
523     "AAL",
524     "Bahyph",
525     "Barr",
526     "Beerware",
527     "BitTorrent-1.0",
528     "BitTorrent-1.1",
529     "BSL-1.0",
530     "Borceux",
531     "BSD-2-Clause",
532     "BSD-2-Clause-FreeBSD",
533     "BSD-2-Clause-NetBSD",
534     "BSD-3-Clause",
535     "BSD-3-Clause-Clear",
536     "BSD-3-Clause-No-Nuclear-License",
537     "BSD-3-Clause-No-Nuclear-License-2014",
538     "BSD-3-Clause-No-Nuclear-Warranty",
539     "BSD-4-Clause",
540     "BSD-Protection",
541     "BSD-Source-Code",
542     "BSD-3-Clause-Attribution",
543     "0BSD",
544     "BSD-4-Clause-UC",
545     "bzip2-1.0.5",
546     "bzip2-1.0.6",
547     "Caldera",
548     "CECILL-1.0",
549     "CECILL-1.1",
550     "CECILL-2.0",
551     "CECILL-2.1",
552     "CECILL-B",
553     "CECILL-C",
554     "ClArtistic",
555     "MIT-CMU",
556     "CNRI-Jython",
557     "CNRI-Python",
558     "CNRI-Python-GPL-Compatible",
559     "CPOL-1.02",
560     "CDDL-1.0",
561     "CDDL-1.1",
562     "CPAL-1.0",
563     "CPL-1.0",
564     "CATOSL-1.1",
565     "Condor-1.1",
566     "CC-BY-1.0",
567     "CC-BY-2.0",
568     "CC-BY-2.5",
569     "CC-BY-3.0",
570     "CC-BY-4.0",
571     "CC-BY-ND-1.0",
572     "CC-BY-ND-2.0",
573     "CC-BY-ND-2.5",
574     "CC-BY-ND-3.0",
575     "CC-BY-ND-4.0",
576     "CC-BY-NC-1.0",
577     "CC-BY-NC-2.0",
578     "CC-BY-NC-2.5",
579     "CC-BY-NC-3.0",
580     "CC-BY-NC-4.0",
581     "CC-BY-NC-ND-1.0",
582     "CC-BY-NC-ND-2.0",
583     "CC-BY-NC-ND-2.5",
584     "CC-BY-NC-ND-3.0",
585     "CC-BY-NC-ND-4.0",
586     "CC-BY-NC-SA-1.0",
587     "CC-BY-NC-SA-2.0",
588     "CC-BY-NC-SA-2.5",
589     "CC-BY-NC-SA-3.0",
590     "CC-BY-NC-SA-4.0",
591     "CC-BY-SA-1.0",
592     "CC-BY-SA-2.0",
593     "CC-BY-SA-2.5",
594     "CC-BY-SA-3.0",
595     "CC-BY-SA-4.0",
596     "CC0-1.0",
597     "Crossword",
598     "CrystalStacker",
599     "CUA-OPL-1.0",
600     "Cube",
601     "curl",
602     "D-FSL-1.0",
603     "diffmark",
604     "WTFPL",
605     "DOC",
606     "Dotseqn",
607     "DSDP",
608     "dvipdfm",
609     "EPL-1.0",
610     "ECL-1.0",
611     "ECL-2.0",
612     "eGenix",
613     "EFL-1.0",
614     "EFL-2.0",
615     "MIT-advertising",
616     "MIT-enna",
617     "Entessa",
618     "ErlPL-1.1",
619     "EUDatagrid",
620     "EUPL-1.0",
621     "EUPL-1.1",
622     "Eurosym",
623     "Fair",
624     "MIT-feh",
625     "Frameworx-1.0",
626     "FreeImage",
627     "FTL",
628     "FSFAP",
629     "FSFUL",
630     "FSFULLR",
631     "Giftware",
632     "GL2PS",
633     "Glulxe",
634     "AGPL-3.0",
635     "GFDL-1.1",
636     "GFDL-1.2",
637     "GFDL-1.3",
638     "GPL-1.0",
639     "GPL-2.0",
640     "GPL-3.0",
641     "LGPL-2.1",
642     "LGPL-3.0",
643     "LGPL-2.0",
644     "gnuplot",
645     "gSOAP-1.3b",
646     "HaskellReport",
647     "HPND",
648     "IBM-pibs",
649     "IPL-1.0",
650     "ICU",
651     "ImageMagick",
652     "iMatix",
653     "Imlib2",
654     "IJG",
655     "Info-ZIP",
656     "Intel-ACPI",
657     "Intel",
658     "Interbase-1.0",
659     "IPA",
660     "ISC",
661     "JasPer-2.0",
662     "JSON",
663     "LPPL-1.0",
664     "LPPL-1.1",
665     "LPPL-1.2",
666     "LPPL-1.3a",
667     "LPPL-1.3c",
668     "Latex2e",
669     "BSD-3-Clause-LBNL",
670     "Leptonica",
671     "LGPLLR",
672     "Libpng",
673     "libtiff",
674     "LAL-1.2",
675     "LAL-1.3",
676     "LiLiQ-P-1.1",
677     "LiLiQ-Rplus-1.1",
678     "LiLiQ-R-1.1",
679     "LPL-1.02",
680     "LPL-1.0",
681     "MakeIndex",
682     "MTLL",
683     "MS-PL",
684     "MS-RL",
685     "MirOS",
686     "MITNFA",
687     "MIT",
688     "Motosoto",
689     "MPL-1.0",
690     "MPL-1.1",
691     "MPL-2.0",
692     "MPL-2.0-no-copyleft-exception",
693     "mpich2",
694     "Multics",
695     "Mup",
696     "NASA-1.3",
697     "Naumen",
698     "NBPL-1.0",
699     "Net-SNMP",
700     "NetCDF",
701     "NGPL",
702     "NOSL",
703     "NPL-1.0",
704     "NPL-1.1",
705     "Newsletr",
706     "NLPL",
707     "Nokia",
708     "NPOSL-3.0",
709     "NLOD-1.0",
710     "Noweb",
711     "NRL",
712     "NTP",
713     "Nunit",
714     "OCLC-2.0",
715     "ODbL-1.0",
716     "PDDL-1.0",
717     "OCCT-PL",
718     "OGTSL",
719     "OLDAP-2.2.2",
720     "OLDAP-1.1",
721     "OLDAP-1.2",
722     "OLDAP-1.3",
723     "OLDAP-1.4",
724     "OLDAP-2.0",
725     "OLDAP-2.0.1",
726     "OLDAP-2.1",
727     "OLDAP-2.2",
728     "OLDAP-2.2.1",
729     "OLDAP-2.3",
730     "OLDAP-2.4",
731     "OLDAP-2.5",
732     "OLDAP-2.6",
733     "OLDAP-2.7",
734     "OLDAP-2.8",
735     "OML",
736     "OPL-1.0",
737     "OSL-1.0",
738     "OSL-1.1",
739     "OSL-2.0",
740     "OSL-2.1",
741     "OSL-3.0",
742     "OpenSSL",
743     "OSET-PL-2.1",
744     "PHP-3.0",
745     "PHP-3.01",
746     "Plexus",
747     "PostgreSQL",
748     "psfrag",
749     "psutils",
750     "Python-2.0",
751     "QPL-1.0",
752     "Qhull",
753     "Rdisc",
754     "RPSL-1.0",
755     "RPL-1.1",
756     "RPL-1.5",
757     "RHeCos-1.1",
758     "RSCPL",
759     "RSA-MD",
760     "Ruby",
761     "SAX-PD",
762     "Saxpath",
763     "SCEA",
764     "SWL",
765     "SMPPL",
766     "Sendmail",
767     "SGI-B-1.0",
768     "SGI-B-1.1",
769     "SGI-B-2.0",
770     "OFL-1.0",
771     "OFL-1.1",
772     "SimPL-2.0",
773     "Sleepycat",
774     "SNIA",
775     "Spencer-86",
776     "Spencer-94",
777     "Spencer-99",
778     "SMLNJ",
779     "SugarCRM-1.1.3",
780     "SISSL",
781     "SISSL-1.2",
782     "SPL-1.0",
783     "Watcom-1.0",
784     "TCL",
785     "TCP-wrappers",
786     "Unlicense",
787     "TMate",
788     "TORQUE-1.1",
789     "TOSL",
790     "Unicode-DFS-2015",
791     "Unicode-DFS-2016",
792     "Unicode-TOU",
793     "UPL-1.0",
794     "NCSA",
795     "Vim",
796     "VOSTROM",
797     "VSL-1.0",
798     "W3C-20150513",
799     "W3C-19980720",
800     "W3C",
801     "Wsuipa",
802     "Xnet",
803     "X11",
804     "Xerox",
805     "XFree86-1.1",
806     "xinetd",
807     "xpp",
808     "XSkat",
809     "YPL-1.0",
810     "YPL-1.1",
811     "Zed",
812     "Zend-2.0",
813     "Zimbra-1.3",
814     "Zimbra-1.4",
815     "Zlib",
816     "zlib-acknowledgement",
817     "ZPL-1.1",
818     "ZPL-2.0",
819     "ZPL-2.1",
820 ]
821
822 if __name__ == "__main__":
823     main()