Popular and free open source licenses

Popular and free open source licenses

"'Free software' is a matter of liberty, not price. To understand the concept, you should think of 'free' as in 'free speech,' not as in 'free beer'."
—Richard M. Stallman

It is important to understand the difference between owning the copyright and licensing the code. Copyright is the set of exclusive rights granted to the author or creator of an original work, including the right to copy, distribute and adapt the work. A license defines the rights and privileges the copyright holder grants to the others; how the work can be used, modified and redistributed.

A license is a contract. This contract can define rights, obligations and restrictions. Since business and people are difficult, there appears to be a need for a multitude of different licenses.

In practice, code (or content) can not be used, unless license is known. A snippet of few statements copied from a web forum might not be an issue, but Oracle famously did sue Google over 9 lines of code. Fortunately they did not win.

Copyleft licenses require that the original license is applied to the modified work, to ensure that the software remains free. Permissive licenses (or non-copyleft licenses) allow distributors to add restrictions, go proprietary with their derived work, or even with the original work.

You don’t need to know about them all - there is a lot of information that you can look up when needed. However, to be able to navigate, it is important to know the basics.

The licenses we have picked are the ones with the widest adoption. For some of them there are older relevant versions, in which case the difference to the latest is briefly described. If you are selecting a license for your work, there is also a separate chapter dedicated for that.

There are of course other considerations. Free Software Foundation (FSF) maintains a list of licenses that they consider as free. They also list GPL compatible licenses. Using these you can combine code released under the other license with code released under the GNU GPL, in one larger program.

Further reading:

GNU General Public License, version 2.0 (GPLv2)

The GNU General Public License is the most widely used free software license.

You may copy, distribute and modify the software as long as you track changes in source files and keep all modifications under GPL. You can distribute your application using a GPL library commercially, but you must also provide the source code. GPL license has an optional “any later version” clause that can be omitted, but allows users to choose whether the original license terms apply, or new terms, as updated by FSF.

The GPL was written by Richard Stallman in 1989 for use with programs released as part of the GNU project. The goal was to produce one license that could be used for any project, thus making it possible for many projects to share code. It is believed that the copyleft provided by the GPL was crucial to the success of Linux-based systems. The major change in GPLv2 was that if somebody has restrictions imposed that prevent him or her from distributing GPL-covered software in a way that respects other users’ freedom (for example, if a legal ruling states that he or she can only distribute the software in binary form), he or she cannot distribute it at all.

Examples of notable projects that have chosen GPLv2:

Further reading:

GNU General Public License, version 3.0 (GPLv3)

The third version of the license (GNU GPLv3) was released to address some perceived problems with the second version (GNU GPLv2). GPLv3 was written by Richard Stallman with legal counsel.

You may copy, distribute and modify the software as long as you track changes/dates of in source files and keep modifications under GPL. You can distribute your application using a GPL library commercially, but you must also provide the source code. To keep the license up to date the GPL license includes an optional “any later version” clause, allowing users to choose between the original terms or the terms in new versions as updated by the FSF.

One of the goals of GPL Version 3 is to prevent Tivoization; the creation of a system that incorporates software under the terms of a copyleft software license, but uses hardware restrictions to prevent users from running modified versions of the software on that hardware.

Other changes relate to internationalization, how license violations are handled, and how additional permissions can be granted by the copyright holder.

Projects that have chosen GPLv3:

Further reading:

GNU Lesser General Public License, version 2.1 (LGPL-2.1)

The LGPL is a compromise between the strong copyleft of GPL and permissive licenses such as the BSD and MIT. It is primarily used for software libraries, although it is also used by some stand-alone applications. Developers and companies can use and integrate LGPL software into their own (even proprietary) software without being required to release the source code of their own parts.

The LGPL 2.1 was designed to be a license written largely in plain English that would give programmers guidance on what they could do with the software.

The main difference between the GPL and the LGPL is that the latter allows the work to be linked with or used by any program, free or proprietary. The program can then be distributed under any terms if it is not a derivative work; a work based upon one or more preexisting works. If it is a derivative work, then the program’s terms must allow for “modification for the customer’s own use and reverse engineering for debugging such modifications.”

Whether a work that uses an LGPL program is a derivative work or not is a legal issue. A standalone executable that dynamically links to a library is generally accepted as not being a derivative work. It would fall under the definition of a “work that uses the Library”.

Projects that have chosen LGPL-2.1:

Further reading:

GNU Lesser General Public License, version 3.0 (LGPL-3.0)

You may copy, distribute and modify the software provided that modifications are open source. However, software that includes the license may release under a different license.

Version 3 of the LGPL was published in 2007. It seeks to provide guidance for lawyers rather than programmers. It incorporates (inherits) the terms and conditions of GPLv3, supplemented by additional permissions. This is a clear difference to LGPL-2.1, which is more of a standalone license.

Further reading:

Apache License (2.0)

The Apache License is a free software license written by the Apache Software Foundation (ASF). The Apache License requires preservation of the copyright notice and disclaimer.

A popular license that allows you much freedom with the software, including an explicit right to a patent. “State changes” means that you have to include a notice in each file you modified.

Unlike copyleft licenses, the Apache License does not require a derivative work of the software, or modifications to the original, to be distributed using the same license.

It still requires application of the same license to all unmodified parts and, in every licensed file, any original copyright, patent, trademark, and attribution notices in redistributed code must be preserved (excluding notices that do not pertain to any part of the derivative works); and, in every licensed file changed, a notification must be added stating that changes have been made to that file.

Code under GPL version 3 and Apache License 2.0 can be combined, as long as the resulting software is licensed under the GPL version 3.

Projects that have chosen Apache License 2.0:

Further reading:

MIT License

The MIT License is a free software license originating at the Massachusetts Institute of Technology (MIT). It is a permissive free software license, meaning that it permits reuse within proprietary software provided all copies of the licensed software include a copy of the MIT License terms. Such proprietary software retains its proprietary nature even though it incorporates software under the MIT License. The license is also GPL-compatible, meaning that the GPL permits combination and redistribution with software that uses the MIT License.

This means that you can do whatever you want as long as you include the original copyright.

According to FSF, MIT License is not ambiguous, since it can refer to their Expat License or their X11 License. The license published by OSI is the Expat License. The difference is a single clause; X11 forbids using the copyright holder in advertising, promotion or any other dealings without a prior written authorization.

Projects that have chosen MIT:

Further reading:

BSD 3-Clause and 2-Clause

BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the redistribution of covered software.

The BSD 3-clause license allows you almost unlimited freedom with the software so long as you include the BSD copyright notice. You cannot use the names of the original company or its members to endorse derived products. 2-clause, or simplified BSD, permits endorsement to derived works.

The original license used on BSD Unix had four clauses. The advertising clause (the third of four clauses) required you to acknowledge use of U.C. Berkeley code in your advertising of any product using that code. It was officially done away with on July 22nd, 1999. The four clause license has not been approved by OSI.

Projects that have chosen BSD 3-Clause or BSD 2-Clause:

Further reading:

Mozilla Public License 2.0 (MPL-2)

This is a lenient license used by the Mozilla Corporation that allows you a variety of explicit freedoms with the software so long as you keep it open source, under this license. It is a good midway license; it isn’t very strict and has only straightforward requirements.

The MPL has been approved as both a free software license by the Free Software Foundation and an open-source software license by the Open Source Initiative. The MPL allows covered source code to be mixed with other files under a different, even proprietary license. However, code files licensed under the MPL must remain under the MPL and freely available in source form.

Unlike strong copyleft licenses, code under the MPL may be combined with files under any license in a larger work, as long as conditions for the MPL are met for MPL covered components. The MPL treats the source code file as the boundary between MPL-licensed and proprietary parts, meaning that all or none of the code in a given source file falls under the MPL.

Projects that have chosen Mozilla Public License 2.0 (MPL-2):

Further reading: