Giter Site home page Giter Site logo

foss-licenses's Introduction

foss-licenses's People

Contributors

dependabot[bot] avatar hesa avatar jeremiah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jeremiah

foss-licenses's Issues

Limited aliases output causes crash

$ flame aliases lists all aliases. To limit the alias output you can use the -l option. This option causes a crash, see below

$ flame aliases -l MIT
usage: flame [-h] [-fc FLAME_CONFIG] [-ld LICENSE_DIR] [-ald ADDITIONAL_LICENSE_DIR] [-lmf LICENSE_MATRIX_FILE] [-ndu] [-of OUTPUT_FORMAT] [-v] [-V] [-d] [-c]
             [--validate-spdx] [--validate-relaxed] [--validate-osadl]
             {license,license-full,compat,simplify,aliases,compats,operators,licenses,unknown} ...
flame: error: ambiguous option: -l could match -ld, -lmf

Link to disclaimer

Add disclaimer in repo
Add link to the disclaimer in license JSON files

Remove versioned licenses without version

Remove the aliases for an existing licenses that has a version (Apache 1, 2 | GPL 1, 2, 3 | MPL 1, 2 .... and so on) but the alias does not have one.

Example. "GNU General Public License" cannot be assumed to be any of the GPL versions. So all "unversioned" aliases like this need to be removed.

Add validation of license

When identifying compatibility_as, using flame compat <license>, you can validate:

  • --validate-spdx - Validate that the resulting license expression is valid according to SPDX syntax
  • --validate-relaxed - Validate that the resulting license expression is valid according to SPDX syntax, but allow non SPDX identifiers
  • --validate-osadl - Validate that the resulting licenses are supported by OSADL's compatibility matrix

It would be useful to have the same possibility when identifying license, using flame license <license>

Interpretation of variants

BSD-3-Clause has variants such Google and Facebook. Other examples

  • BSD-like

Adding a compatibility_as would be useful, but what is the most common practice in dealing with these licenses?

Remove multiple blanks from licenses

Apache License Version 2.0 is not the same string as
Apache License Version 2.0, but they refer to the same license.

Suggestion: remove multiple blank before find/replace

License alias order incorrect

License aliases are supposed to be replaced longest in size first.

Current solution (license_db.py):
for needle in reversed(collections.OrderedDict(sorted(needles.items()))):
does not do that. Replace the above with:
for needle in reversed(collections.OrderedDict(sorted(needles.items(), key = lambda x : len(x[0])))):

and things should be fine

Don't use scancode_key as aliases

Problem
Currently x11 gets normalized to ICU

$ flame --verbose license x11
ICU
 * "x11" -> "ICU via "scancode"

This is the case since the scancode_key is automatically added as an alias and for ICU the scancode_key is x11.

Solution
In Python: do not look for the scancode_key when identifying the license
in JSON license files: add relevant scancode_keys to alias list (e.g. not x11 for ICU)

Allow different quote signs

Treat the following the same: ', ", โ€œ

Suggestion: replace ',โ€œ with "
Perhaps match beginning and ending quote

add Apache-2.0 alias

Apache Software License (Apache-2.0)
Apache Software License (Apache License, Version 2.0)

Document problematic licenses/operators

Problematic names of licenses

  • MPL
  • EPL
  • GPL
  • LGPL
  • BSD License (BSD License)
  • BSD License (new BSD)
  • Apache Software License
  • OSI Approved :: Apache Software License
  • PSL (Python Software License)
  • PSL, PSF, PSFL, PSF License, PSF License Agreement, Python license, Python Software Foundation License
  • ASL
  • Public (is this "Public-Domain"?)

Complex license expression produces incorrect compat

The following command's output is incorrect:

$ flame compat "x11-keith-packard and Apache Software License, Ve rsion 2.0 | mit"
(LicenseRef-flame-x11-keith-packard AND Apache-2.0) OR MIT

should be:

$ flame compat "x11-keith-packard and Apache Software License, Ve rsion 2.0 | mit"
(HPND AND Apache-2.0) OR MIT

add BSD-* aliases

BSD 2-Clause "Simplified"

BSD-3-clause New
BSD 3-Clause "New"
BSD 3-Clause New

Ambiguity alias with "and" fails to identify the ambiguity

Common Development and Distribution License (CDDL) is an alias for the ambiguity Common Development and Distribution License. An ambiguity should create a warning for the user (about the ambiguity) but a parse exception is raised instead.

$ flame license "Common Development and Distribution License (CDDL)"
Error: Could not parse "Common Development  AND  Distribution License  ( CDDL )". Exception: Invalid expression nesting such as (AND xx) for token: "(" at position: 47

Preferably the exception should be caught and the user should be warned about both:

  • the license could not be parsed
  • the license has an ambiguity

Note: it is "and" that causes the problem in the above example since "and" is part of the license syntax (e.g. MIT AND BSD-3-Clause)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.