7

Understanding the Common Licensing Models in Open Source Projects

 3 years ago
source link: https://blog.bitsrc.io/understanding-the-common-licensing-models-in-open-source-projects-e07375979c16
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Understanding the Common Licensing Models in Open Source Projects

Get to know copy-left and permissive licenses to find the right fit when choosing open-source libraries

Image for post
Image for post

As software developers, all of us are aware of the two types of licenses available for software. They are,

  1. Proprietary Licensing — A license for software by the copyright holder which has very specific conditions. Most of the time, you cannot modify or distribute this software without purchasing it (commercial software).
    E.g.:- Microsoft Windows OS
  2. Open Source Licensing — An open-source license makes it easier for anyone to contribute or use the software without seeking any special permission or purchasing the software. However, this protects the original creator through a credit-based system and prevents others from claiming the creator’s work as their own.

In this article, I’ll mainly focus on open-source licensing models and explore what they offer.

Types of main open-source licenses

  1. GNU General Public License (GPL)
  2. GNU Lesser General Public License (LGPL)
  3. Apache License
  4. BSD License
  5. MIT License

All of these licenses fall under two categories; Copyleft and Permissive. We’ll find out what each of these means and categorize them as we explore each of the licenses.

Let’s have a look at what each of these licenses offers.

1. GNU General Public License (GPL)

Image for post
Image for post
Source: Wikipedia

This particular license implements the concept: copyleft. As the name suggests, it is the opposite of copyright. When software is released under this license, the recipients are granted the following benefits.

  • Anyone can use the code anywhere.
  • Anyone can redistribute the code to anyone else given that the source code is included and the license remains as GPL.
  • Anyone can create derivated work from this source code given that the resulting source code is also available for redistribution and is under the GPL license.

This enables the collaborative development of software projects but offers high protection for the author of the software.

Even though this looks like a lot of freedom compared to copyrighted software, out of the open-source licenses set, this is one of the most restrictive licenses as it enforces the condition where a source code with GPL can only include a composition of GPL code.

The latest release of GPL is GPLv3, which includes patent indemnity, internationalization, and remedies for license infringement as upgrades from GPLv2.

Is GPL that awesome? Isn’t there a catch for all this freedom?

To use GPL, you have to include certain information in the source code and a copy of the license. The practical usage of this is not as easy as it sounds. If you want to know more about the practical usage of GPL, refer to this practical guide.

Further, if you release a source code under GPL, you cannot revoke this right you gave to the community. However, you can choose to redistribute it under a different license. But, even if you decide to change the type of license, other developers who already obtained your source code under this license can choose to continue distributing it under GPL.

Famous technologies and software that use GPL

  • MySQL — Uses a combination of GPL and commercial license
  • MariaDB — Uses GPL v2
  • Drupal — Uses GPL v2

Tip: Share your reusable components between projects using Bit (Github).

Bit makes it simple to share, document, and reuse independent components between projects. Use it to maximize code reuse, keep a consistent design, collaborate as a team, speed delivery, and build apps that scale.

Bit supports Node, TypeScript, React, Vue, Angular, and more.

Image for post
Image for post
Example: exploring reusable React components shared on Bit.dev

2. GNU Lesser General Public License (LGPL)

Image for post
Image for post
Source: Wikipedia

LGPL is another GNU license which grants fewer rights than GPL. It is suitable for software that requires linking from non-GPL and non-open-source software.

For example, if you are releasing a library which is meant to be used in many software, if you release it under GPL, the software which uses it is also required to be released under GPL. This is a massive problem as commercial software also use a lot of third-party libraries. Therefore, it is best to release a library under LGPL, which avoids the above problem. This is a weak copyleft license.

LGPL consists of the following conditions in comparison to GPL,

  • The work done under LGPL is suited for commercial use (as opposed to GPL).
  • You can modify the work, but the modified work should be released under the same license (same as GPL).
  • You can use the work and the derivative work does not need to have the same license (as opposed to GPL).

Famous technologies and software that use LGPL

  • WineHQ — Uses LGPL v2.1
  • GNU Aspell — Uses LGPL v2.1
  • OpenOffice.org 3 — Uses LGPL v3

3. Apache License

Image for post
Image for post
Source: Wikipedia

The Apache license is a permissive license. Unlike copyleft licenses, a permissive license does not require software applications that re-use code with Apache license to be released under the same terms.

It does not require any derivative work to be distributed under the same license. Therefore, non-copyleft.

Work under the Apache license has the following benefits.

  • Work can be used for commercial purposes.
  • Licensees are allowed to modify the work.
  • Licensees are allowed to redistribute the work under different licenses and terms.
  • Does not have to distribute the final source code along with the work.

The Spring Framework, the Android OS are some of the software and technologies that use the Apache License.

4. Berkeley Software Distribution (BSD) License

Image for post
Image for post
Source: Wikipedia

The BSD license has two main versions: 2-clause (Simplified BSD license) and 3-clause (New BSD license). This is a permissive license.

The benefits provided by them are as follows.

  • The work is suitable for commercial use.
  • The source code does not need to be public when distributing software under this license.
  • Licensees must provide proper attribution for the Work.
  • Derivatives and modifications can be under any license.
  • Changes to the source code not mandatory to be documented.

The primary difference between 2-clause and 3-clause is that 3-clause includes a specific rule about endorsements. It says that the names of the contributors cannot be used for endorsement without obtaining special permission.

Popular projects such as Redis, Ruby, Nginx use BSD licensing.

5. MIT License

Image for post
Image for post
Source: Wikipedia

The MIT license is the least restrictive permissive license out of the open-source licenses.

It says,

Anyone can do anything with the work as long as the license is included along with it.

The only restriction this has it to accompany the work with the MIT license. As long as that condition is met, you can use, copy, modify the software and distribute it for free or even sell it. There are no restrictions on distribution.

This license can be combined with any other license. Therefore, it is suitable for commercial purposes.

Popular projects under the MIT license

  • node.js
  • AngularJS
  • jQuery — Uses both MIT and GPL (dual-license)

Now that we’ve learnt about a few open-source licensing models, then comes the next question.

How can you choose the correct license for your project?

In order to understand the correct license to use, the following questions need to be answered by you.

  1. Do you want the license to be simple and permissive? If yes, the most permissive license to choose would be the MIT license.
  2. Do you want to develop a shareable library which can be used in any project? If yes, it is better to go for an LGPL.
  3. Do you want to release your software to the public with the highest restrictions? If yes, the best choice is the GPL.

Likewise, based on your requirements, the license you have to choose would differ. After some research about similar software to yours, you will be able to decide which license to go with. The insights provided in this article about each license will help you make that decision better.

Summary

Open-source licensing is a massive topic. In this article, I have discussed and compared a few but popular open-source licenses. But there are many more out there. Once you’ve decided on the best license for your open-source project you can add it to your GitHub repository using a LICENSE.txt file.

In order to summarize the permissions and conditions provided by open-source licenses, refer to the chart below.

Image for post
Image for post
Source: https://dwheeler.com/essays/floss-license-slide.html

Hope you got some insight about open-source licensing models and what they offer. Let me know if you need more information about how to choose a licensing model for your software too.

Thanks for reading!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK