Recently, the company fully embraced open source, and encountered some problems in the selection of open source protocol. I have consulted a lot of materials, and hereby summarize ~

preface

If you are careful enough, you can easily notice that even for a small piece of code, the best authors attach a notice of copyright at the beginning of the file, such as Licensed under the MIT License. At the same time, some blogs will say “this article is CC BY 4.0CN”.

If we copy other people’s code or articles without paying attention to copyright issues, in the foreign environment with strong legal awareness (domestic copyright awareness is also gradually strengthened), then our works will violate the law because of violating other people’s rights and interests. Even the most open source licenses require that the author’s claim to the code be preserved, so open source does not mean free, nor does it mean unconstrained.

What is a LICENCE?

A LICENCE is a license for software. It specifies the rights you have after obtaining the code. What operations are allowed and what are prohibited. Software can be licensed in many ways, but this article is limited to the Open Source License.

For most people, there is no need to spend a lot of time to write a license agreement, choose a popular open source agreement is enough, save time and effort, easier to spread their work, and benefit both others and themselves.

PS:

As an aside, many foreign developers do A good job of respecting the work of others. If A’s work is Inspired by B’s work, A doesn’t even use A single line of B’s code, but A will indicate that it was Inspired by B in his work: http://www.xxxx.com.

Select open source agreements quickly

If you don’t want to know too much and just want a straight answer, the following tips may be for you. This section about the protocol address comes from GitHub Choosealicence.

Simple, loose agreements:

Well, if you just want a simpler deal without the hassle.

The MIT protocol is relatively lenient. It allows others to use your code in any way and name the original author, but the original author bears no risk for the use of the code and certainly no obligation for technical support.

Consider the case of patents:

If your work is patent-related.

The Apache protocol is also a relatively loose protocol, similar to MIT, but it specifies some authorship of the user’s patent (my understanding is that the software work contains the patent, but it grants you free access to it).

Promote code sharing:

If you care about the distribution of your work and the modification of others, expect others to share it under the same agreement.

The GPL (V2 or V3) protocol is “contagious” because it requires that the code distributor or derivative work based on that code be distributed under the same license and open source.

Ukrainian programmer Paul Bagwell has drawn an analysis diagram showing how to choose. In just two minutes, you can figure out the biggest differences between the six open source protocols.

Domestic god Ruan Yifeng Chinese version:

Mainstream Open Source License

There are about hundreds of Open Source licenses in the world. Common Open Source software licenses are as follows:

  • GPL
  • LGPL
  • BSD
  • MIT
  • Mozilla
  • Apache

In order from loose to tight, common open source protocols are:

  1. MIT
  2. BSD
  3. Apache
  4. LGPL
  5. GPL

Main differences:

  • The MIT and BSD open source protocols are both derived from universities and embody the characteristics of simplicity, openness and inclusiveness.
  • MIT, BSD, and Apache all support closed source follow-on development.
  • GPL, LGPL infectious open source, compiled code used here code, must be open source.

MIT

From the university, the MIT Open Source Agreement is one of the most concise and generous open source agreements in history. The author only wants to retain the copyright without any other restrictions. That is, you must include a declaration of the original license in your distribution, whether you distribute it in binary or in source.

Features:

  • Users can do whatever they want with your code.
  • Users should include copyright notices and license notices in project copies.
  • You are not liable for anything.

Representative Works:

  • jQuery
  • Rails, etc.

BSD

  • BSD-2-Clause
  • BSD-3-Clause

BSD certificates also come from universities, much like MIT, and are very simple and generous.

The BSD open source protocol is a protocol that gives users a lot of freedom. Basically, users are free to use and modify the source code as they wish, or to redistribute the modified code as open source or proprietary software. The premise is that when you publish code using the BSD protocol, or develop your own products based on THE BSD protocol code, three conditions must be met:

  1. If the source code is included in the redistributed product, the source code must carry the BSD protocol from the original code.
  2. If only the binary class library/software is distributed again, the BSD protocol in the original code needs to be included in the documentation and copyright notice of the class library/software.
  3. Do not use the open source author/organization name and the name of the original product for marketing.

The BSD open source license encourages code sharing but respects the copyright of the code author. The BSD Open Source protocol allows users to modify and redistribute code, as well as to use or develop commercial software for distribution and sale on BSD code. It is a business-integration friendly protocol. Therefore, many companies prefer the BSD protocol when choosing open source products.

Apache Licence

  • The Apache License, Version 2.0
  • The Apache License, Version 1.1
  • The Apache License, Version 1.0

It’s from Apache, it’s like MIT open source, but it focuses on patents.

Apache Licence is a protocol adopted by Apache, a well-known non-profit open source organization. It is similar to BSD in that it encourages code sharing and respect for the copyright of the original author. It also allows code to be modified and redistributed (as open source or commercial software). The conditions to be met are similar to those for BSD:

  1. An Apache Licence needs to be provided to the user using the code.
  2. If you change the code, you need to explain it in the modified file.
  3. In extended code (modified and derived from the source code), agreements, trademarks, patent claims, and other instructions from the original code need to be included.
  4. If the next product release contains oneNoticeThe Notice file must contain the Apache License. You can be inNoticeAdd your own license to the Apache Licence, but do not make changes to the Apache Licence.

Apache Licence is also a business-friendly Licence that allows users to modify the code as needed and distribute/sell it as an open source or commercial product.

Representative Works:

  • echarts
  • superset
  • dubbo
  • spark

LGPL

LGPL (GNU LESSER GENERAL PUBLIC LICENSE) comes from the Free Software Alliance GNU and can be translated as the more relaxed GPL protocol. It is also a contagious open source protocol.

LGPL is an open source protocol of the GPL designed primarily for use by class libraries. Unlike the GPL, which requires that any software that uses/modifies/derivatives of the GPL libraries be under the GPL, the LGPL allows commercial software to use the LGPL libraries through library references without requiring open source commercial software code. This allows open source code under the LGPL protocol to be referenced, distributed and sold by commercial software as a class library.

However, if you modify LGPL code or derivative code, then all modified code, additional code and derivative code must adopt the LGPL. Therefore, the LGPL open source code is suitable for reference by commercial software as a third-party library, but not suitable for commercial software that wants to be based on LGPL code. Commercial software used for secondary development through modification and derivation.

The GPL/LGPL protects the intellectual property rights of the original authors, preventing anyone from using open source code to copy and develop similar products.

GPL

The GNU GENERAL PUBLIC LICENSE (GPL) is derived from the GNU Free Software Alliance. The GPL/LGPL focuses on open source and free use of codes and derived codes.

The main content of the GPL is that whenever a product under the GPL is used in a piece of software (” use “means a library reference, modified code, or derived code), that product must also be under the GPL, and must be open source and free. This is called “contagion”.

Because the GPL strictly requires software products using the GPL class library to use the GPL, commercial software or departments that have confidentiality requirements for code using the GPL open source code are not suitable for integration/adoption as a basis for class libraries and secondary development.

Linux, with which we are familiar, uses the GPL. The GPL is very different from the BSD, Apache Licence and other licenses that encourage code reuse. The GPL’s intent is to make code open source/free to use/reference/modify and derived code open source/free to use, but does not permit the distribution and sale of modified and derived code as closed source commercial software.

Other details are similar to protocols such as BSD/Apache.

Representative Works:

  • Linux

More open source protocol comparisons

Explanations of the words used in the table below:

  • License and Copyright Notice: Retain the License and copyright information provided by the author in the code.
  • State Changes: Declare significant Changes or Changes to the original code in the code.
  • Open Source (Disclose Source) : The code must be public.
  • Library Usage: This Library can be used in commercial software.
  • The author of the code is Liable to assume the risks and consequences of its use. If prohibited, then the author will not be liable, can be understood as a waiver clause.
  • Use Trademark: You can Use the author’s name, Logo, or Trademark of the work.
  • Sublicensing: allows the distribution of software to be added to the original agreement terms, etc.
agreement describe requirements allow ban
Apache A more loosely and concisely stated patent licensing agreement. 1.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}


2.
Statement of changes \color{#0000FF}{declaration change}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
Patent license \color{#00EE00}{patent license}


5.
private Private} \ color # 00 ee00} {{


6.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}
(Author disclaimer)

2.
A trademark used Color {#FF3030}{trademark use}
GPL The most widely used open source license with strong copyleft requirements.

The distribution of derived code is open source and subject to this agreement.

There are many variations of this agreement, each with slightly different requirements.
1.
Open source Color {#0000FF}{open source}


2.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}


3.
Statement of changes \color{#0000FF}{declaration change}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
Patent license \color{#00EE00}{patent license}


5.
private Private} \ color # 00 ee00} {{
1.
responsibility \color{#FF3030}{responsibility}


2.
Additional agreement \color{#FF3030}{additional protocol}
MIT The agreement is easy and simple. It allows you to use the code in any way, with proper attribution and disclaimers. 1.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
private Private} \ color # 00 ee00} {{


5.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}
Artistic This protocol is most beloved by the Perl community. The modified software cannot affect the use of the original software. 1.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}


2.
Statement of changes \color{#0000FF}{declaration change}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
private Private} \ color # 00 ee00} {{


5.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}


2.
A trademark used Color {#FF3030}{trademark use}
BSD There are two variants of the looser agreementBSD 2-ClauseBSD 3-ClauseBoth have only minor differences from the MIT protocol. 1.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
private Private} \ color # 00 ee00} {{


5.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}
Eclipse A very business-friendly agreement that can be used for commercial licensing of software. Includes elegant licensing of patents and the ability to apply commercial agreements to related code. 1.
Open source Color {#0000FF}{open source}


2.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
Patent license \color{#00EE00}{patent license}


5.
private Private} \ color # 00 ee00} {{


6.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}
LGPL Mainly used in some code libraries. Derivative code may be distributed under this agreement (or any other agreement), but the code associated with this agreement must comply with this agreement. 1.
Open source Color {#0000FF}{open source}


2.
Library reference \color{#0000FF}{library reference}


3.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
Patent license \color{#00EE00}{patent license}


5.
private Private} \ color # 00 ee00} {{


6.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}
Mozilla The Mozilla Public License(MPL 2.0) was created and maintained by the Mozilla Foundation to find a compromise between the more relaxed BSD protocol and the more reciprocal GPL protocol. 1.
Open source Color {#0000FF}{open source}


2.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
Patent license \color{#00EE00}{patent license}


5.
private Private} \ color # 00 ee00} {{


6.
Additional agreement \color{#00EE00}{additional protocol}
1.
responsibility \color{#FF3030}{responsibility}


2.
A trademark used Color {#FF3030}{trademark use}
No license The author reserves all rights and does not allow others to distribute, reproduce or create derivatives.

When you publish code on a website, you are subject to the site’s agreement, which may include some licensing of your work. For example, to publish code to GitHub, you have to give permission for others to view and fork.
1.
Agreement and copyright information \color{#0000FF}{Protocol and copyright information}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
private Private} \ color # 00 ee00} {{
1.
distribution \ color # FF3030} {} {distribution


2.
Modify the \ color # FF3030} {{modify}


3.
Additional agreement \color{#FF3030}{additional protocol}
Public domain dedication In many countries copyright is automatically owned by the author by default, soUnlicenseProtocols provide a common template.

This agreement indicates that the author waives copyright and contributes the fruits of his labor unselfiedly and forfeits all rights to the work, including unsecured rights as defined in MIT/X11.
1.
N / A \color{#0000FF}{N/A}
1.
commercial Commercial} \ color # 00 ee00} {{


2.
distribution \ color # 00 ee00} {} {distribution


3.
Modify the \ color # 00 ee00} {{modify}


4.
private Private} \ color # 00 ee00} {{
1.
responsibility \color{#FF3030}{responsibility}

Refer to the link

  • Github.com/github/choo…
  • opensource.org/licenses
  • www.cnblogs.com/Wayou/p/how…
  • zhuanlan.zhihu.com/p/87855729

Welcome to follow my wechat public number [database kernel] : share mainstream open source database and storage engine related technology.

The title The url
GitHub dbkernel.github.io
zhihu www.zhihu.com/people/dbke…
SegmentFault segmentfault.com/u/dbkernel
The Denver nuggets Juejin. Im/user / 5 e9d3e…
OsChina my.oschina.net/dbkernel
CNBlogs www.cnblogs.com/dbkernel