科技和互联网

开源软件执照简介

大家都知道,基本上开源软件是免费的,可以被免费使用,有些允许修改,有些使用修改过程中需要注明版权所有。开源软件毕竟是人类劳动的成果,使用权,版权等遵从特定的协议,受法律保护。一般开源软件都会注明是遵从哪一个开源软件执照协议的,使用者在分发,修改,使用这些软件,必须遵守既定协议,否则就是触犯法律,亵渎他人的劳动成果而受到惩罚。

大体上开源软件有四种执照,其中要求最严格的执照是gpl,最宽松的是MIT。最近,Facebook著名的软件库React,从原来的BSD执照修改为了MIT,是件让所有的软件开发者大受鼓舞的事,毕竟是那么优秀的软件,如果因为软件执照的原因,让开发者缚手缚脚,失去市场份额,也是得不偿失。那么我们如何让自己开发的开源软件遵守某个执照呢?如果你是使用GITHUB的话,就可以简单地在软件执照的下拉菜单中,点击选择你希望的执照种类。

原文链接:https://medium.freecodecamp.org/
抄录:

How open source licenses work and how to add them to your projects

by Radu Raicea, medium.freecodecamp.org

October 16, 2017
Image credit: GitHub

Recently, there was some exciting news for developers around the world. Facebook changed the license of multiple libraries they develop. They switched from BSD-3+patents to a MIT.

That seems good, but what does it mean? What are the implications of different open source licenses?
This article will give you a quick understanding of the popular licenses. It will also teach you how to apply them to your open source projects on GitHub.
The Authority

The most popular open source licenses have an important aspect in common. The Open Source Initiative (OSI) has approved them.
OSI formed in 1998 with the goal of promoting open source software. It has created the Open Source Definition (OSD) to define what an open source software means.
This is how they describe themselves:
The Open Source Initiative (OSI) is a non-profit corporation with global scope formed to educate about and advocate for the benefits of open source and to build bridges among different constituencies in the open source community.

The Licenses

Most open source licenses include the following statements:
Software can be modified, used commercially, and distributed.

Software can be modified and used in private.

A license and copyright notice must be included in the software.

Software authors provide no warranty with the software and are not liable for anything.

We will go through the most popular licenses, in order from the most restrictive to the most permissive (from a user’s perspective).
GNU General Public License, version 3 (GPLv3)

GPLv3 is one of the most restrictive licenses. It offers high protection for the author of the software.
The source code must be made public whenever a distribution of the software is made.

Modifications of the software must be released under the same license.

Changes made to the source code must be documented.

If patented material was used in the creation of the software, it grants the right for users to use it. If the user sues anyone over the use of the patented material, they lose the right to use the software.

GPLv2 is also very popular. The main difference from GPLv3 is the clause on patent grants.
That clause was added in version 3 to prevent companies from charging users for the use of their patents.
Popular projects using GPLv3 are Bash and GIMP. Linux uses GPLv2.
Apache License 2.0

Apache License 2.0 offers more flexibility to the users.
The source code doesn’t need to be public when a distribution of the software is made.

Modifications to the software can be release under any license.

Changes made to the source code must be documented.

It offers the same patent usage protection as GPLv3.

It explicitly prohibits the use of trademarked names found in the project.

Popular projects using Apache License 2.0 are Android, Apache, and Swift.
Berkeley Software Distribution (BSD)

BSD has two main versions: 2-clause and 3-clause. They both offer more flexibility to the users than the Apache License 2.0.
The source code doesn’t need to be public when a distribution of the software is made.

Modifications to the software can be release under any license.

Changes made to the source code may not be documented.

It offers no explicit position on patent usage.

The license and copyright notice must be included in the documentation of the compiled version of the source code (as opposed to only in the source code).

The BSD 3-clause states that the names of the author and contributors can’t be used to promote products derived from the software without permission.

Popular projects using BSD license are Go (3-clause), Pure.css (3-clause), and Sentry (3-clause).
MIT License

MIT is one of the most permissive licenses. It is also the most popular one. It offers very low protection for the author of the software.
The source code doesn’t need to be public when a distribution of the software is made.

Modifications to the software can be release under any license.

Changes made to the source code may not be documented.

It offers no explicit position on patent usage.

Popular projects using MIT are Angular.js, jQuery, Rails, Bootstrap, and many more.
Facebook’s React.js had a BSD-3+patents license up until September 25th. It combined the BSD-3 license with an extra clause on patents usage.
In a nutshell, if you sue Facebook or any of its subsidiaries, you lose the right to use React (or any other software under the same license).
React is now MIT licensed. You are now able to sue Facebook and still use React. What a relief!
Applying a license to your open source projects

Licensing your projects is easy. You need to add a LICENSE, LICENSE.txt or LICENSE.md in the root directory of your repository.
GitHub makes it even easier:
Open your GitHub repository in a browser.

In the root directory, click on Create new file.

Name the file “LICENSE”.

Click on Choose a license template.

Pick one of the licenses (all the ones mentioned in this article are there).

Once chosen, click on Review and submit.

Commit the file.

In summary…

One of the most restrictive licenses is GPL.

One of the most permissive licenses is MIT.

Other popular licenses are Apache License 2.0 and BSD.

To apply a license on your GitHub project, you need to create a LICENSE file using GitHub’s license templates.

For more updates, follow me on Twitter.


Tagged ,

我忍不住要留言