Open Source licensing

open_source_initiative_modified.pngWhen you create a product that you want to release to the public, you can license it under any terms you wish. But we're not all lawyers, nor can we all afford lawyers to write the language that determines how our products can be used. This is where the myriad of pre-written open source licenses can help. But which license are we to use? What is the difference between the MIT (X11) license and the BSD license? (Not much.) What advantages do the LGPL provide over the GPL? (It depends on what the software will be used for.)

So: although I have no legal training, I have a fair bit of experience with each of these licenses, so I'm going to see if I can help you out.

Permissive licenses

The BSD and MIT/X11 licenses are examples of permissive licenses. Permissive licenses are designed to allow users to do anything they want with the software, and are even freer than any of the GNU licenses. If a user wants to modify the software, distribute a binary of the application, and withhold the modified source code, they are free to do so. By that same logic, if a user wants to reverse-engineer or reverse-compile that application and distribute the source, he is also free to do so. The main restriction is that the software must always be accompanied by the license, and must always be distributed under that same license.

Differences between popular permissive licenses

  • The original BSD license disallows using the software's creators' names in promotions of work derived from the original, and the MIT license has no such restriction. The OSI has approved a Simplified BSD license, commonly used by FreeBSD and others, that has no such restriction. There is virtually no difference between the Simplified BSD license and the MIT/X11 license.

Copyleft licenses

A "copyleft" license is a license that is designed to give users certain freedoms, and to ensure that these freedoms are extended to everybody, regardless of any changes that may have been made to the software. The most popular copyleft license is the GPL.

The GNU General Public License (GPL)

The GPL's version 2 and version 3 are the most commonly used copyleft licenses - 76,000 of the 165,000 projects hosted at SourceForge are licensed under the GPL. The main idea behind the GPL is to allow all users four specific freedoms: To run the program in any way (freedom 0), study the program and modify it (freedom 1), redistribute the program (freedom 2), and modify the program and distribute it to the community (freedom 3).

However, in order to make sure that all of the software's users are extended these freedoms, the GPL has to impose restrictions on users of the software. (Thus making it less "free" than the BSD or X11 licenses - but by removing certain freedoms, others are preserved. Makes sense, right? :) )

  • If you modify it and distribute it, you need to distribute the modified source code.
    • There is a common misconception that if you modify GPL-licensed code, you must distribute the modified source code. This is not the case. Only if you distribute the modifications in the first place must you distribute the modified source.
  • Additional restrictions may not be imposed on users of modified and re-released versions of the software.

Please note that this is by no means a comprehensive list of the conditions under which you may distribute GPL-licensed software. Please read the actual licenses for a complete (and very legal-ese) description of the conditions.

The controversial GPLv3

In 2006, the Free Software Foundation (the writers of the GPL) identified some new issues that they felt should be addressed in the GPL. GPLv3 introduced some major (and minor) changes, as well as a significant amount of controversy.

  • If you release code under the GPLv3, and someone uses your code to implement DRM (Digital Restrictions Management), it does not count as an effective protection measure. So any DRM implemented with GPLv3 code is free to be broken with impunity from the DMCA. This helps considerably to contribute to the controversy that has surrounded GPLv3.
  • If the software is distributed on a hardware device, you must provide users with the information they need to make modifications. This was prompted by TiVo's distribution of GPLv2 software without providing their users the mechanisms to actually modify the software, thus locking them out. Another highly controversial change.
  • If you distribute software licensed under GPLv3, you must extend to all users of the software any and all necessary licenses to use patented technology that may be use in the software. This was prompted by Microsoft's successful campaign to threaten GNU/Linux software distributors (Novell) into making patent immunity deals.

The deal with Linus Torvalds: The creator of Linux, the kernel used in most GNU operating systems, has declared that he will not be using GPLv3 any time soon, if at all. He has a few reasons for this, both practical and personal. His personal objections are, in my opinion, none of our business - feel free to read this article if you want to know more. He also has practical and legal reasons for staying with GPLv2 - it would take ages to get all of the Linux code license-compatible with GPLv3, and may not even be possible in some cases, due to the licensing on some of the code contributed.

(Just thought you might like to know why such an important leader in the GNU/Linux community was opposed to the new license. --ed.)

What is the LGPL?

There is one condition in the GPL that makes it very difficult for software creators to embed, link to, or otherwise use a GPL-licensed program in their non-GPL licensed application:

You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

The LGPL (Lesser General Public License) allows for the fact that some pieces of software do little good unless they can be used inside of another program, and that not every application that uses it is going to be licensed under the GPL. It still preserves the freedoms of the users of the LGPL'ed software, though - any distributed modified versions of the LGPL software must be accompanied with the modified source code.

  • Summary: Use the LGPL if you anticipate that your software may be used in non-GPL compatible applications.

Somewhere in the middle

Apache license

The Apache Software Foundation has written a free software license that falls neither in the category of permissive nor copyleft. Used by all applications under the wing of ASF (and many others that are not), this is one of the most popular free software licenses. The Apache license was designed with the intent that software using it could be used in closed-source and proprietary as well as free and open source applications; it doesn't even require that modified versions be licensed under the same license.

Software using the Apache license does, indeed, extend freedoms to its users, but only guarantees them to users one "level of distribution" away from the origin. That is, after the original distribution, anybody can make any modifications and release them (or not) under any terms they wish. The only restriction is that modified versions must be accompanied by a notice indicating that Apache-licensed software was used.

Multi-licensing

Under US Copyright Law, it's perfectly legal for a software program to be distributed under multiple licenses. For example, Mozilla Firefox is licensed under three software licenses (MPL, LGPL, and GPL) to ensure compatibility with the licenses of contributed code. It's also very common for applications (like TinyMCE) to be licensed under the GPL and the LGPL, which allows software developers to include TinyMCE in their non-GPL-compatible applications, and preserves the freedoms of the TinyMCE users.

This isn't all of them!

You should make sure to note that these are not the only open source licenses available for public use, nor is it impossible to write your own. (Difficult and time-consuming, yes. Impossible, no.) The Open Source Initiative has a massive list of open source licenses - some for public use, some not - and you may very well find a license that fits your needs better than one of the licenses I describe above.

IANAL

I am not a lawyer. :) I have also excluded several provisions and details from my descriptions of the various licenses, purely to save time and space. It's an excellent idea to hunt around on the official websites for a more thorough description, if you see one that catches your eye.

And if you have any questions about these licenses, I may be able to help (leave a comment with your question), or you can check at the Open Source Initiative. (A veritable treasure trove of all sorts of open source information.)