I want to really opensource a project that did start as a personal hobby, but I’m an ignorant of licensing details.
This project, provides some libraries for a given $language, and some wrapper command line utilities for those libraries.
Those libraries, across many things, do generate more code in the same language, code which can be reused by the caller.
On my drafts, I always used a MIT style license for the sake of brevity, but it’s unreleased copies I’m reviewing right now to merge on a finally released version.
I would like to use GPL style policies for usage/contribution of my code (lets call it a framework).
But.
Could choosing GPLv2 (3?) for my project, limit the things that a given user can do with the code generated or managed by my libraries/utilities? (i.e. commercial profit of such generated code without release her improvements/changes to my code)
Is there something to consider (in a plain language) when licensing code that generates code ?
Update:
To try to answer some comments:
-
What do you wish to accomplish with your license?
The best goals for the project health (from the view point of a community-based opensource project). -
Who do you want to use your code?
Anybody -
What do you want to happen to changes?
To be back-ported to the project as much as possible. -
What do you want to happen to generated code?
To don’t be affected by my licensing choice. It belongs to the user who generated it. -
What about money – if the user makes money do you want that to affect the licensing?
If the user makes money from the generated code, great. If the user makes money modifying my code, I would like to force to publish the changes.
I did a group-therapy with those answers. Now, choosing GPL (2? 3?) I could be ok or not?
Update2
So they have to bundle/compile your library in with theirs when they deploy it, in order for it to run?
yes, the library needs to be installed previously, or bundled with the result (there is an option for this).
6
The main thing to consider when choosing the license for a code generator is how much of the code generator itself will wind up in its output. With most (all?) compilers, this is such a small portion that the compiler’s license is not considered to apply to the compiler’s output. This makes it possible to use GPL-licensed compilers to write closed-source software, because the end-product is not considered to be derived from the compiler’s source.
On the other hand, there are also tools like Bison, where a significant portion of the tool makes it into the output. As Bison is licensed with the GPL, this would normally mean that and software you generate with Bison would also be covered by the GPL, were it not that the Bison license has a special clause to allow its output to be used in (a limited set of) closed source projects.
As you do not wish to restrict the uses of the generated code, but you do want modifications to the generator and libraries to be made public, your best choice seems to to use LGPL or a permissive license for the libraries (provided they can be linked dynamically to the user’s project) and GPL (optionally with a Bison-like exception) or a permissive license for the code generator.
1
Disclaimer – IANAL and the following is not a legal advice. The exact detail may vary depending on your jurisdiction as well.
The interpretation of FSF, which tend to be the strictes, is that the generated code is not covered by license. So you can use gcc to compile a commercial project and distribute the binary. Similarly using a GPL implementation of System API is allowed. However the linking with library is prohibited. I know that not every layer agree with latter interpretation but I don’t know the details (the main point is what’s a ‘derived project’) – if you want to know the details you might want to consult a layer. In such case bundling library would move toward ‘derived project’ (again IANAL).
If you don’t want to limit in such way the general practice is use LGPL, GPL with linking exception or any other copyleft license. The latter is more liberal as the former require the third party to be able to relink with different version of library (again – if the clauses are enforceable is debated). In general I’d advice to stick to well know licenses such as (L)GPL, MIT/BSD3, Apache 2.0 etc.
However license is just giving permission. If you publish code on GPL you can republish it under different license as long as you are the copyright holder or have a license to do so (so, for example, if you take the contribution from third party you need to ask for permission). You can even sell a license to some company as was a monetization model of some FLOSS projects.
Final remainder – I am not a layer and this was not a legal advice.