LICENSE handling code

Auke Kok sofar at foo-projects.org
Thu Oct 20 21:59:37 UTC 2005


I've just implemented a preliminary tool to handle licenses in theedge. 
It works as follows:

- lin and lget will refuse to download and install modules that do not 
have accepted licenses

This decision is based on a couple of things:

1. the LICENSE variable from a modules' DETAILS file

this needs to contain the name of the license of that module. If empty, 
something like OSI or GPL should be assumed

2. the contents of the global ACCEPTED_LICENSES variable

This can be a list of acceptable licenses, example:

lunar set ACCEPTED_LICENSES "gpl gplv2 osi bsd mozilla"

If the LICENSE is not listed in ACCEPTED_LICENSES, it is rejected.

If ACCEPTED_LICENSES is not set (empty), go to 3.

3. the contents of the global REJECTED_LICENSES variable

This variable may be empty, at which a pre-set default (unimplemented) 
takes course

If set, then the LICENSE is checked and rejected if listed in this variable.



what's next?

1. decide on what we will allow as correct LICENSE values, as well as a 
default value (probably best is osi).

2. decide whether we allow an "osi" alias to match gpl, gplv2 and all 
those names (lots of work but very correct)

3. decide how we handle the default uninitialized state, specifically, 
how we handle the fact that we want lunar to disallow non-free licenses 
by default. (if REJECTED_LICENSES != "the word none" then reject 
non-free ??? (and perhaps allow ACCEPTED_LICENSES="all" ... whatever))


Auke





More information about the Lunar mailing list