Skip to main content

FOSS License Additional Metadata

Project description

FOSS Licenses

A database with meta data for FOSS licenses adding useful information to existing licenses aiming at simplifying compliance work. The meta data consists of:

  • other names or aliases for licenses (e.g. "GNU GPL v. 2" is replaced by "GPL-2.0-only")

  • fixes for compound license written as one single license or using faulty syntax (e.g. "GPL-2.0-with-classpath-exception" -> "GPL-2.0-only WITH Classpath-exception-2.0")

  • other names for operators (e.g. "||" is replaced by "OR")

  • translation of license with dual license features to a compound license expression (e.g. "GPL-2.0-or-later" -> "GPL-2.0-only OR GPL-3.0-only")

  • compatibility as another license (e.g. "X11-Style (Keith Packard)" is compatibility wise the same as "HPND")

  • license text

Background

There are lots of software licenses out there (e.g. see ScanCode LicenseDB), some of them are FOSS and some not. In this project we primarily focus on FOSS licenses.

License name proliferation

When you're working with compliance you are used to liceses called differently in source code or by tools (e.g. GPLv2, GPL (v2) and GNU General Public License Version 2) when all you really want too see is the SPDX identifier GPL-2.0-only. A seasoned compliance engineer or lawyer knows this already, but we need this information machine readable.

License proliferation

Another problem you face when working with compliance is the need to check whether the licenses in a combined work are compatible. One example is the X11-Style (Keith Packard) license, which really is the same license as the Historical Permission Notice and Disclaimer - sell variant. X11-Style (Keith Packard) is not supported in for example the OSADL matrix, but HPND-sell-variant is. Again, a seasoned license engineer or lawyer knows which licenses are compatible and not, but we need to make it possible for a machine to assist us.

About

This projet aims at providing a database with:

  • "all" different names for a license in a database

  • mappings from one license to another license which is supported by the OSADL matrix

and, to make the database easier to use:

  • a Python API

  • command line tool

Database

The data can be found in the var directory. Each license has a JSON file with meta information and a LICENSE file with the license text.

Tools and APIs

Contributions

You are more than welcome to contribute:

  • create an issue

  • create PR

We do not have a CLA or similar, but we assume your contributions are made under our license (for the code and data).

Related tools and projects

Acknowledgements

Technical notes

Normalizing license expressions

We fix your license expressions with the following methods (listed in order)

Normalize aliases

With our database we can replace a license like "GPLv2+" to the SPDX identifier "GPL-2.0-or-later". We do this by searching for needles and replace them. To search for needles, in our case license expressions, (e.g. "BSD 0-Clause") to replace (with e.g. "0BSD") we use the following strategy:

  • list all needles in order of length, longest first

  • for each needle find and replace

This is a naive approach but given the limited data at hand it should work.

Normalize compound license expressions

Some compound licenses (e.g. "GPL-2.0-only WITH Classpath-exception-2.0") are stated incorrectly (e.g. "GPL-2.0-only AND Classpath-exception-2.0") or as a singe license (""GPL-2.0-with-classpath-exception). The license expression is scanned for licenses as listed in var/compounds.json and replaced accordingly.

Normalize operators

The license expression is scanned for operators as listed in var/operators.json and replaced accordingly (e.g. "||" is replaced by "OR").

Normalize dual licenses

Some licenses have a built in dual license feature (e.g. "GPL-2.0-or-later"). We replace such licenses with the corresponding dual licenses.

As an example: "GPL-2.0-or-later" is replacde by "(GPL-2.0-only OR GPL-3.0-only")

Insert same compatibility as another license

Some licenses are not supported by the OSADL license matrix (e.g. "X11-Style (Keith Packard)") but the license is very similar and has the same compatibility towards other licenses as another license (e.g. "HPND").

To allow for tools (e.g. flict) to check compatibility of an inbound license expression against an outbound license expression we replace the unknown license with the known and with same compatibility.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foss-flame-0.19.6.tar.gz (241.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foss_flame-0.19.6-py2.py3-none-any.whl (368.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file foss-flame-0.19.6.tar.gz.

File metadata

  • Download URL: foss-flame-0.19.6.tar.gz
  • Upload date:
  • Size: 241.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for foss-flame-0.19.6.tar.gz
Algorithm Hash digest
SHA256 9a73a4995a9e27c9f4f493f4777f655cd97f3df59713ef0f1187e3783b689095
MD5 b16fcd93bf7b704e0dd544bed50b0397
BLAKE2b-256 dde7a38b96eb970daff0c9aba4d7c461e3cd63ef9a0ca6ceae3be83d996d7c05

See more details on using hashes here.

File details

Details for the file foss_flame-0.19.6-py2.py3-none-any.whl.

File metadata

  • Download URL: foss_flame-0.19.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 368.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for foss_flame-0.19.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 024fd811eee3043a1a36460bd9f1a80772c130092d25c45211566763d3409ac3
MD5 41fb6817d7e672c378b13dca7580a21c
BLAKE2b-256 5c07244579ce0e7549f26ae059a37a686b279ac171a305c85e6b6cf13eafa386

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page