Copyleft Open Source License Comparison - GPL, AGPL, LGPL, MPL
Understanding Copyleft Licenses
Overview of Copyleft Licenses
Copyleft licenses, including GPL, AGPL, LGPL, and MPL, are popular open-source licenses that require derivative works to maintain the same licensing terms.
These licenses ensure that if code is used under a copyleft license, any distribution must also adhere to the same terms, promoting open access for developers.
General Public License (GPL)
The GPL is one of the most recognized copyleft licenses; it mandates that any software using GPL code must distribute its source code under the same license.
Version 3 of the GPL enhances international usability and clarifies patent licensing compared to version 2.
Affero General Public License (AGPL)
The AGPL addresses a loophole in the GPL known as the Application Service Provider loophole by considering network usage as distribution.
This means software-as-a-service providers cannot exploit this loophole without adhering to AGPL terms when running GPL code over a network.
Lesser General Public License (LGPL)
The LGPL is less restrictive than the GPL; it only requires sharing modifications made to LGPL components while allowing proprietary use of non-modified LGPL libraries.
If an author uses an LGPL library without modifying it, they are not obligated to make their entire software open source.
Mozilla Public License (MPL)
The MPL allows for compatibility with GPL but has less stringent requirements than both GPL and LGPL.
Video description
GPL, AGPL, LGPL, MPL are popular open source licenses, and they are all included in the copyleft license category. Copyleft licenses indicate that the same license terms must be preserved in derivative works. It means that if you are using some code released under a copyleft license, the distribution of your code must follow the same license terms to let other people use it. So, compared with permission licenses which do not have such a restriction, copyleft licenses are considered as restrictive although they can guarantee open access to developers.
In the copyleft group, one of the most famous licenses is the GNU General Public License, abbreviated as GPL. Since it is a copyleft license, any software that uses the whole or part of GPL code or links to the GPL library must distribute all its source code under the same license. This means if you are using some GPL libraries in your software, you have to use the same license when you distribute your software to let others use your code for free. There are several versions of GPL and version 3 is the latest one. Compared with GPL v2, GPL v3 facilitates international usage outside the United States and provides more clarity on patent licenses.
The Affero GPL, also called AGPL license, is very similar to the original GPL. The only difference between AGPL and GPL is that AGPL licenses consider the network usage as distribution, which closes the famous GPL's loophole called application service provider (ASP) loophole. Due to the existence of this loophole, for those software-as-a-service (SaaS) providers, since they didn’t technically distribute the GPL code in the traditional sense, they can legally run those code or program over a network to make money and are exempt from the terms of the GPL license at the same time. AGPL licensese close this loophole by defining network usage as the distribution as well.
The Lesser General Public License, which is referred to as LGPL license, offers less restrictive terms compared with GPL licenses. GPL requires developers to share all derivative work no matter what the usage is. In comparison, LGPL only requires authors to share work based on the LGPL licensed components. If the author only uses the LGPL components, for example, a LGPL library, then they don't need to make it open source. For example, if your software uses some LGPL source code, you must share your code as well as the original GPL licenses. However, if you are just using a LGPL library instead of the code snippets, you don't need to make your software open source.
The Mozilla Public License, which is referred to as MPL license, is compatible with GPL. It provides less restrictive requirements than GPL and LGPL. In GPL, as long as your project includes a piece of GPL code or links to a library, the whole project must be made open source as well. However, MPL licenses allow you to keep your own work as close source or proprietary as long as the MPL code you are using is kept in separate files. In short, MPL licenses require the files using MPL code to be kept as open source and, at the same time, enable you to keep your own files as proprietary. In comparison to the LGPL license which is based on per-library rule, MPL is based on a per-file copyleft rule, which means any file that does not include MPL material can be kept as close-source.
Attribution:
Image from Pixabay: https://pixabay.com/zh/photos/software-developer-web-developer-6521720/