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