Friday 7 September 2012

open source license types in simple English

I found 2 articles with simple english explanation of the license types:

part 1 http://www.zdnet.com/blog/burnette/howto-pick-an-open-source-license-part-1/130[^],
part 2 http://www.zdnet.com/blog/burnette/how-to-pick-an-open-source-license-part-2/131[^]

They are a bit old (since 2006) but these things don't change much over time. Just in case the original articles get lost, I am making a copy here, but for the interested reader, I suggest to read the originals cause they contain useful comments from other readers, and they are the intellectual property of the original author Ed Brunette:


Part 1:


Summary: If you write some code keep in mind that it's yours and you get to decide if, how, or under what circumstances, other people can use it. Let's say you've made the decision to release your code as "open source". What does that mean, what is an open source license, and how do you pick the right one? This question comes up all the time so I thought I'd write up a simple decision tree to try to explain the choices.

You've made the decision to release your code as "open source". Ok, what does that mean, what is an open source license, and how do you pick the right one? This question comes up all the time so I thought I'd write up a simple decision tree to try to explain the choices.Many people use GPL without realizing the implications or understanding the other options. This isn't legal advice, and I'm not a lawyer, and I'm probably over-simplifying some of the points, but I hope you find it helpful.
First of all, if you write some code, it's your code and you get to decide how other people can use it. Period. Nobody but you can say how your code can be used, either by putting restrictions on it or taking them off, without your permission. That's a very important point to keep in mind while reading this article.
The second point to keep in mind is that nobody but you can even use your code unless you explicitly give them permission. Another way of saying this is that all source code is closed and proprietary and off limits until you, the author, open it.
Note: The text of all the licenses mentioned here can be found at opensource.org.
Decision 1: Do you want to relinquish any control over how your code is used and distributed?
If yes, then don't copyright it, and don't license it. Put it in the public domain, and you're done. This is a good choice for examples, templates, and other illustrative code where the whole point is that you want everybody to feel free to use what you've written. [Alert readers pointed out that "public domain" is is not a good choice because in many jurisdictions you can't give up your copyright. Use a liberal license like MIT/BSD instead. -22jun/ebb]  Example: code listings in a book or article.

If no, then Copyright the code (paste copyright notices all over it) and continue with decision 2. 

Hint: Just to make sure your intent is clear, either put in explicit copyright notices, or put in explicit notices that the code is in the public domain. Copyright is how you retain control. Without a copyright, there is no control. [Technically the notices might not be necessary but they don't hurt and are still recommended. -22jun/ebb]
Decision 2: Do you want to allow people to use your code in non open-source programs?
If yes, then continue to decision 3.
If no, then release your code under the GPL, a restrictive "free (libre) software" license that actively promotes user choice at the expense of direct commercial interests. For the most part, GPL'd code can only be used with other GPL'd code, and in fact if you start using [and distributing -22jun/ebb] some GPL code in a program you wrote then you either have to release your program under GPL as well or quit using that code. This is why GPL is sometimes described as "viral". Examples: Emacs,  Linux kernel.
Hint: Don't take this choice unless you really mean it. Many people use GPL without realizing the implications or understanding the other options, and thus lock the code away from a whole segment of potential users, so please read the rest of the choices first.
Decision 3: If somebody uses your code in their program and sells their program for money, do you want some of that money?

If yes, then you have two choices. The first choice (3a) is not to release it as open source at all, i.e., use closed source and you're done. This would preclude anyone from using your code in free (no cost) packages. And it would only allow people to use your code in commercial programs if they came to your first and worked out a deal for a commercial license. Note that even if the source is "closed" you can give permission if you like for certain people to have access to the source and use it in limited ways. Example: Microsoft Windows, Sun Java (sort of).

The second choice (3b) is dual license. I'll talk about licenses more in a moment, but dual license just means you give permission for people to use your code under two or more licenses. You pick one license (probably GPL) for free (no cost) programs, and one for commercial ($$$) programs. This is a good choice if you're trying to make a living off licensing fees for the code itself. Examples: MySQL, JBoss, SleepyCat. Continue to decision 4.

If no, then give permission for others to use your code under one or more "commercial friendly" licenses. This is a good choice if you want your code to get into as many hands as possible and either you don't care about the money or you plan to make money in other ways, for example by selling your own programs that use the code or from consulting or support. Examples: Apache HTTPD, Eclipse, Firefox. Continue to decision 4.

Decision 4:  If somebody uses [and distributes -22jun/ebb] your code and improves it (fixes bugs or adds features) do you want to make them give you the improvements back so you can use them too?
If yes, then use a "reciprocal" license. Any modifications to your code need to be made available under the same licensing terms as your original code. This is useful if you're worried somebody will take your code and go off on their own private "fork". Examples: Eclipse (EPL), Solaris (CDDL), and Firefox (MPL). Done.
If no, then use a non-reciprocal license. Often times the people using your code will send back improvements anyway, especially if you have a history of frequent releases and they get tired of having to re-merge in their changes every time. This is the most wide open type of license so it will get you the most exposure and users, but it can also relegate the original writer(s) to the sidelines. Example: FreeBSD (BSD).  Done.

Part 2:

Public domain 
Description: This isn't really a license at all, but rather a renouncing of any rights you might have under copyright law. The idea is simple to understand but gets a little hairy legally. Some say it's not possible to renounce these rights, some say it depends on the country, some say that once renounced you can un-renounce them later, and some say it's perfectly fine.  After reading about it some more, my advice is to punt and and use a BSD/MIT license instead.
Code is protected by copyright? No
Code can be used in closed source projects? Yes
Program that uses (incorporates) the software can be sold commercially? Yes
Source to bug fixes and modifications must be released? No
Provides explicit patent license? No

BSD/MIT
Description: The BSD and MIT licenses are two of the oldest and most liberal licenses available. They basically put no restrictions on how the software can be used. These licenses are used by a wide variety of projects including FreeBSD.
Code is protected by copyright? Yes
Code can be used in closed source projects? Yes
Program that uses (incorporates) the software can be sold commercially? Yes
Source to bug fixes and modifications must be released? No
Provides explicit patent license? No

ASLv2 (Apache)
Description: The Apache license is only slightly more restrictive than the BSD/MIT licenses. The main thing it adds is some clauses about patent licensing and termination. You should carefully read all the patent clauses in the licenses that have them because they all have subtle differences. All the Apache.org projects use ASL but it's also in wide use outside Apache (for example Google uses it for GWT).
Code is protected by copyright? Yes
Code can be used in closed source projects? Yes
Program that uses (incorporates) the software can be sold commercially? Yes
Source to bug fixes and modifications must be released? No
Provides explicit patent license? Yes

GPL (v2)
Description: This is a very common license that allows people to freely use your software as long as they don't charge for it and use the same license for parts of the program that they wrote themselves. The copyright holder is not subject to these restrictions. Widely used, but largely misunderstood. The canonical examples are Linux and MySQL.
Code is protected by copyright? Yes
Code can be used in closed source projects? No* (except by copyright holder)
[*Note: If GPL code is only used in-house, then the answer is Yes. But if someone uses the GPL code in a derived work, and distributes the work, then the answer is No. I'm assuming distribution for this article. -22jun/ebb]
Program that uses (incorporates) the software can be sold commercially? No** (except by copyright holder)
[**Note: If you take "sold" to mean charge for distributing, charge for bundling and packaging, charge for reproducing, charge for support, and charge for indemnification, then the answer is Yes. This is the Linux distributor model. However if by "sold" you mean "paid a fee for a license to use" then the answer is No. Working at a commercial software developer that does charge such fees, the latter definition is most natural to me, so it's the meaning I'm using for this article. -22jun/ebb]
Source to bug fixes and modifications must be released? Yes [if distributed, see above]
Provides explicit patent license? No (but v3 is supposed to address this)

LGPL
Description: A derivative of GPL, LGPL includes an exception that is intended to allow code that is released under other licenses to co-exist with and call the LGPL code. However this exception is a bit fuzzy legally as it's currently written, so some businesses shun it. The author of the license encourages people not to use it. Personally I think LGPL is a much better choice than GPL for most software, but that a more modern license like EPL is often even better.
Code is protected by copyright? Yes
Code can be used in closed source projects? Yes (maybe)
Program that uses (incorporates) the software can be sold commercially? Yes (maybe)
Source to bug fixes and modifications must be released? Yes [if distributed; see notes under GPL]
Provides explicit patent license? No

MPL/CDDL
Description: MPL is used by Mozilla, Firefox, and many other projects. CDDL is based on MPL with a few minor tweaks to make it more applicable outside of Mozilla. CDDL is used by many Sun products such as Solaris. It's expected that Java will be open sourced either under the CDDL or (L)GPL. Note that the patent clauses are not palatable to some businesses, so you may want to consider EPL instead.
Code is protected by copyright? Yes
Code can be used in closed source projects? Yes
Program that uses (incorporates) the software can be sold commercially? Yes
Source to bug fixes and modifications must be released? Yes [if distributed]
Provides explicit patent license? Yes

CPL/EPL
Description: CPL was derived from the old IBM Public License and was also influenced by MPL. CPL was originally used by Eclipse, but that project switched to EPL. CPL is also used by some Microsoft open source projects on SourceForge. EPL is a newer version of CPL with some improvements in its patent language to make it more acceptable to businesses. For example if there's a patent dispute it will only affect the part of the software covered by the patent and not the whole thing.
Code is protected by copyright? Yes
Code can be used in closed source projects? Yes
Program that uses (incorporates) the software can be sold commercially? Yes
Source to bug fixes and modifications must be released? Yes [if distributed]
Provides explicit patent license? Yes
Dual license
Description: This isn't really a license, it just means making your software available under two or more different licenses. This is useful in two circumstances:
  1. The license you originally picked isn't compatible with the license somebody else uses and they want to use your code (or vice-versa). This is how you get things like "GPL/LGPL/MPL/EPL" licenses (a quad-license). Then there's no question that your code can be used in programs that use any of the licenses you mention.
  2. You want to make your software available without charge in other free programs, but if somebody is going to make money off of it then you want a share. The typical example is MySQL. It's licensed under GPL, but if a different company wants to embed it in their commercial program then they have to get a different, commercial license. The copyright holder, of course, can use their own software however they like. It's this situation that earned GPL the nickname of "The Greedy Programmer's License". See also this slashdot thread. Of course, one could argue other licenses like BSD, MIT, and Apache, are "greedy vendors' licenses". That's one reason I like the pragmatic, middle-of-the-road licenses like EPL.
Note: Normally, only the copyright holder can re-license the software (for example to issue commercial licenses). So if multiple people contribute to your project, you may need to get them to sign some kind of contributor's agreement that spells out who owns the copyright and what kinds of activities are allowed. For this you definitely need a lawyer.
Final notes
Several people noted the "anti-GPL slant" of the previous article. I admit I'm not too fond of the GPL. If people pick GPL on purpose, with full knowledge of its restrictions and philosophy, that's fine. I just see too many people pick it when they don't really need to. As one responder to my original article wrote:
If you think using GPL'ed software in commercial software is "smooth sailing" you don't understand the license. There are safe situations, but in everything except the very straightforward cases, you have to understand more about contract and copyright law that most developers do to know what is safe and what isn't.
Pick what you want, but pick it for the right reasons. And consult a lawyer if you need to cover your assets.


No comments: