乘风破浪,遇见最美Windows 11之现代Windows桌面应用开发 - 微软公共许可证(MS-PL)及其开源许可证竞争者

关于开源许可证

image

开源许可证(Open Source Licenses)是软件组件(Software Component)的作者与用户之间的具有法律约束力的合同(Legal and Binding Contracts),声明该软件可以在指定条件下(Under Specified Conditions)用于商业应用(Be used in Commercial Applications)。许可证使得代码变为开源组件。没有开源许可证,便无法将该软件组件给他人使用,即便该组件公开发布于GitHub。

主要类别

开源许可证分类两大类:CopyleftPermissive,该划分基于许可证对于用户的要求与限制(Requirements and Restrictions)。

版权(Copyright)是一种法律,它赋予了版权所有者限制他人使用、修改与共享创意作品的权利,使用者要使用、修改或共享创意作品,便需要版权所有者的许可。诸如音乐、电影等,都是它们的创作者的知识产权。当作者以Copyleft许可证发布程序时,他们主张对该作品的版权(Make a claim on the copyright of the work),并声明只要保持权利对等(Reciprocity of the obligation),其他人便有权使用、修改和共享该作品。简而言之,如果他们使用具有这种类型开源许可证的组件,那么他们也必须开放其代码以供他人使用

宽松开源许可证(Permissive open source licenses)是一种非版权保留(Non-Copyleft)的开源许可证,可以保证使用、修改、重新分发的自由,同时还允许用于具有专利的派生作品之中。宽松开源许可证被亲切地称为「Anything Goes」(为所欲为),对他人如何使用开源代码组件设置了最小的限制(Place minimal restrictions)。这意味着这种许可证允许自由地使用、修改和重新分发开源代码,允许用于专利作品中,并对此不求回报

GNU通用公共许可证(GPL)

GNU通用公共许可证(The GNU's General Public License)是最受欢迎的开源许可证。理查德·斯托曼(Richard Stallman)创建了GPL,以保护GNU软件免于被申请专利,这是他对「Copyleft」概念的理解和实现。

GPL是Copyleft许可证,这意味着任何基于GPL组件编写的任何软件都必须开源发布。其结果是任何使用GPL开源组件(无论其在整个代码中占比多少)的任何软件都必须释出(Release)其完整的源代码,以及修改和分发整个代码的所有权利

关于什么构成「某作品基于另一作品」一直存在这混淆,因为这会触发GPL的对等义务。自由软件基金会(FSF)试图通过GPLv3使「何时会触发对等义务」变得更清晰。基金会甚至为此编写了新的GPL许可证——Affero许可证——以解决被称作「ASP loophole」的特定混乱。

此外,自由软件基金会还试图增加GPLv3许可证与其他许可证的兼容性。只要两个程序都允许,就可以把这两块代码组合成一个更大的作品。如果两个程序的许可证都授予了此类权利,则它们是兼容的。通过使GPLv3变得更兼容,自由软件基金会扩展了开发选项。

第三个区别是GPLv3的目的是提高全球的使用率。与GPLv2所使用的语言是以美国为中心的不同,GPLv3改进了用于描述许可的语言,以确保国际法律能理解自由软件基金会的目的。此外,GPLv3还允许开发人员添加本地免责声明(Local Disclaimers),这有助于增加其在美国以外的国家和地区使用

使用指南

在开源项目根目录添加名为LICENSE.txt的文件即可,里面的内容参考如下:

示例:https://github.com/NickeManarin/ScreenToGif-Website/blob/master/LICENSE.txt

Apache许可证

Apache许可证是由Apache软件基金会(ASF)发布的开源软件许可证。这是一个背靠强大社区的、流行的、广泛部署的开源许可证。Apache许可证允许你自由使用、修改和分发任何使用了Apache许可证的产品,但当你这么做时必须遵守Apache许可证的条款

Apache Group(后改名为Apache软件基金会)在1995年发布了其许可证的第一个版本,但很少能遇到仍然使用该许可证的软件组件。

在2000年,当伯克利(Berkeley)接受自由软件基金会(Free Software Foundation)提出的观点,并从BSD许可证中移除广告条款形成修改的BSD许可证(或称The 3-Clause BSD License)时,Apache也这么做了,并创建了Apache许可证1.1版本

移除广告条款,意味着当你使用了基于Apache许可证开源的软件组件时,你的作品的推广信息中不需要包含Apache许可证署名——只需要将他们包含在文档中即可

2004年ASF决定彻底摆脱BSD模式,通过授予专利权(Patents Rights)及对「Solid Definitions」概念的定义,使其变得更清晰有条理,由此产生了Apache License 2.0

BSD开源协议(伯克利软件套件)

BSD许可证或原始BSD许可证(The Original BSD License)及其两个变体——修改的BSD许可证(又称The 3-clause BSD License)和简化的BSD许可证/FreeBSD许可证(又称BSD 2-Clause "Simplified" License)是许可的自由软件许可证系列。

只要你保留版权声明、条件清单(List of Conditions)和免责声明(Disclaimer)的副本,BSD许可证就可以让你自由地以源代码或二进制格式修改和分发软件代码

原始BSD许可证(或称The 4-Clause BSD License)还包含广告条款(Advertising Clause)和非认可条款(Non-Endorsement Clause)(在以下问题中提供了关于这些条款的详细说明)。修改的BSD许可证(或称The 3-Clause BSD License)是通过从原始BSD许可证中移除了广告条款而形成的。此外,通过从修改的BSD许可证中移除非认可条款后,形成了简化BSD许可证/FreeBSD许可证(或称The 2-Clause BSD License)。

通用开源和发行许可证(CDDL)

通用开源和发行许可证(CDDL)是由太阳微系统公司(Sun Microsystems)发行的开源许可证,旨在用于替换Sun公共许可证(SPL,Sun Public License)。CDDL许可证被Sun公司(现在已被甲骨文公司收购)视作SPL的第二版本,此外CDDL许可证受到了Mozilla公共许可证(MPL,Mozilla Public License)的启发。Sun公司一直以来都使用SPL许可证发行它的自由软件(Free Software)/开源项目,直到2004年才切换到使用CDDL许可证。CDDL许可证通常被称作MPL的清洁版本(Cleaned Up Version),旨在促进可重用性(Reusability)

你可以自由地复制(再制造)和分发CDDL下软件的任何原始或衍生作品,但你不得删除或修改软件中所包含的任何版权、专利或商标声明。你还必须保留所有许可证声明和属于所有贡献者与初始开发者的描述性信息。

当你以可执行形式(除源码外的其他任何形式)分发软件时,你需要将源代码也置于CDDL之下。可执行形式可以以CDDL或任何与CDDL兼容的许可证发布。

源码中必须包括你的贡献(对原始软件的既有文件和新添文件的内容的增加、修改和删除)。这意味着,如果添加的内容在不包含原始代码的独立文件之中,那么就不必将之置于CDDL下进行发布。如果你愿意,你可以放入CDDL下,但这不属于你的义务。

此外,不管你分发什么源代码都必须包含CDDL的副本。对于你所做的每一个修改(Modification),你都必须在所修改的文件内写明自己是修改者,以告知他人

Eclipse公共许可证(EPL)

Eclipse公共许可证(EPL,Eclipse Public License)是由Eclipse基金会(Eclipse Foundation)开发的开源许可证,它源自通用公共许可证(CPL,Common Public License)。现在使用EPL许可证的Eclipse codebase以前都是用CPL许可证。

EPL许可证是Copyleft许可证。如果你修改了基于EPL的组件并将其作为程序的一部分、并以源码的形式分发,则需要在EPL许可证下公开修改后的代码。如果你以目标代码(Object Code)的形式发布,则必须声明可根据需要将源码提供给接收者,同时你也必须共享请求源码的方法。

Eclipse基金会(Eclipse Foundation)明确指出,在他们看来,与Eclipse插件「仅交互或互操作」是不会导致你的代码变为该插件的衍生作品(Derivative Work)的。

如果你重新分发(Redistribute)带有EPL组件的程序,就必须包含完整的许可证文本和版权信息

如果有企业在其商业产品中使用了TA的组件,那么EPL许可证可以保护作者免受潜在的诉讼和损失。此外,EPL许可还提供了专利授权

MIT许可证

MIT是最宽松的自由软件许可证之一。基本上,你只需要添加原始MIT许可证和版权声明副本(Copy of the original MIT license and copyright notice),就可以自由使用基于MIT许可证的软件组件了。它的简单性使其在开发这中间得以广泛采用

微软公共许可证(MS-PL)

https://opensource.org/licenses/MS-PL

微软公共许可证(Microsoft Public License, MS-PL)是微软为释出开源项目而编写和发布的免费开源软件许可证。如果你用.NET开发,你会经常碰见MS-PL。在微软的自由开源项目托管地Codeplex(已寿终正寝,微软已战略转进至GitHub)上也有不少基于MS-PL的项目。

原文解读

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

此许可针对与其匹配的软件的使用。如果你使用了此软件,你接受了此许可,如果你不接受此许可,不要使用此软件。

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor’s patent claims that read directly on its contribution.

1、定义

条款中"复制","复制品","衍生作品"和"发行"的用词与美国版权法的意义一样。

"著作品"指代原软件和任何与此软件相关的附属品和变更。

"著作人"指代任何在此许可条款下发行了其著作品的人。

"专利许可"指代著作人对其著作品相关的直接可读的专利声明。

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

2、授权条款

(A) 版权授权 - 受此许可条款许可,包括此条款第三部分的许可条件和限制,著作人授予你无排他性的,世界范围的,免版税的版权来复制其著作品,开发其著作品的衍生作品和发行其著作品或任何你所制作的衍生作品。

(B) 专利授权 - 在其专利许可之下,受此许可条款许可,包括此条款第三部分的许可条件和限制,著作人授予你无排他性的,世界范围的,免版税的许可来制作,制成,使用,销售,预约销售,导入,并且/或以其他方式处置此软件或者此软件的衍生作品中其著作品的部分。

3. Conditions and Limitations

(A) No Trademark License - This license does not grant you rights to use any contributors’ name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

3、条件和限制

(A) 无商标许可 - 此许可不授予你任何权利来使用任何著作人的姓名、标志或商标。

(B) 如果你提出的专利申请与任何著作人的任何专利相左而导致你的申请被此软件侵权,你从此著作人得到的关于此软件的任何专利许可将自动终止。

(C) 如果你发行了此软件的任意部分,你必须保留此软件所呈现或包含的任何关于此软件的版权,专利,商标和归属提示。

(D) 如果你以源码的形式发行了此软件的任意部分,你仅能在此许可条款下以包含了此许可的完整拷贝的许可来从事你的发行。如果你以编译过的或对象的形式,你仅能在一个与此许可相符合的许可下从事你的发行。

(E) 此软件在原态状态下许可,你可能遭遇使用风险。著作人不会提供任何特约条款,保证或条件的表述。此许可无法改变任何在当地法律条件下你可能拥有的附加消费权利。对于在当地法律下的扩展许可,著作人排除相对应的,准确的特约条款,以保证对特殊目的和非侵权的适用。

使用指南

在开源项目根目录添加名为LICENSE.txt的文件即可,里面的内容参考如下:

Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

参考

posted @ 2022-07-14 17:06  TaylorShi  阅读(579)  评论(0编辑  收藏  举报