开源软件 OSS:数字经济的催化剂

Open Source Software Word Cloud

很难想象一个没有开源软件(Open Source Software,OSS)的世界。开源软件早已变得无处不在并成为互联网的基础设施。世界上几乎超过三分之二的网站运行在 Apache 、Tomcat和 Nginx(最受欢迎的Web 服务器)上。即使是财富 500 强公司也选择使用 Nginx。这些开源软件被大量使用的原因之一是有很多贡献者。来自世界任何地方的开发人员都可以将他们的想法和灵感带到软件中,使软件本身更有韧性更具活力,最终在全体开发人员的共同努力下稳定的迭代。

Free and open source software is a vital cog in the economy, much like interstate highways, the power grid, or the communications network.

By Hila Lifshitz-Assaf and Frank Nagle,“The Digital Economy Runs on Open Source. Here’s How to Protect It” published on Harvard Business Review

开源软件的简史

开源软件并非一直都存在。曾经有一段时间,程序员需要设计自己的编译器,甚至需要构建自己的操作系统。1953 年,A-2 System(相当于今天的编译器)与其源代码一起向社会发布,并要求客户将任何改进发送给 UNIVAC (the Universal Automatic Computer)。UNIVAC是美国早期的商用机器制造商雷明顿兰德公司(Remington Rand, Inc.)旗下的一个部门。在50年代后的十几年甚至是几十年,创建软件一直是一个昂贵且复杂的过程,并没有任何个人或团体推动开源软件的发展和免费使用。

到了1983年,理查德·斯托曼(Richard Stallman)开始从事GNU(GNU’s Not Unix)项目,重写经常使用的封闭软件,并在1984年创建了开源的GNU操作系统,率先向封闭系统发起挑战。1985 年,Stallman撰写了GNU宣言并创立了自由软件基金会 (Free Software Foundation,FSF),旨在促进计算机软件自由使用的非营利组织。到 1987 年,GNU操作系统大部分基本组件都已完成,包括汇编器、编辑器和各种 Unix 实用程序,如 grep 和 ls。Stallman 最终构建了GNU通用公共许可证(GPL)并将GNU 操作系统的所有组件以此许可证开源发布。到了90年代,开源软件以更加惊人的速度发展。举世闻名的Linux 操作系统创始人Linus Torvalds创建的Linux Kernel(GNU操作系统的内核)于1991年随着源代码一起向公众开源发布,进一步推动了开源软件和自由软体的进步。在往后的时间里,开源软件迅速发展陆续面世(Python Interpreter,1991;Apache HTTP Server,1995;Open Office, 2000;Mozilla Firefox,2002;Git,2005;Android mobile OS,2007;Node.js,2009;Nginx, 2011;Google Chrome,2011;Docker, 2013;Kubernetes,2014;Firefox Quantum, 2017)并成为了现代计算机科学领域不可缺少的部分。

Open Source Software Word Cloud

开源软件的意义和版权

从本质上讲,开源是一个围绕访问权限的概念。来自世界各地的软件工程师可以自由访问其他人或公司机构的源代码。根据实际的情况编译或更新,并随后向互联网分享新的版本。开源也可以被看作是一种国际化的自由软体运动。最初,开源是针对闭源(源代码由某个公司或组织“拥有”)的反叛。开发人员不想继续为不符合其用例的软件付费,这些软件存在的错误和安全问题难以实现有效的修复和迭代。

理想情况下,软件的作者是其所有者。然而,计算机软件经常有成千上万的作者,计算机软件工程的参与者逐渐选择从权利、知识产权或版权的角度来审视软件,这就是开源协议(License)发挥作用的地方。开源项目可以有不同级别的所有权(贡献者、维护者、提交者等)。所有这些级别都具有对代码库不同类型的访问。不同级别的参与者通过Peer Review的模式最终将共识代码更新合并至核心代码仓库,在一些情况下也会选择重新构建分支仓库与原型代码仓库区分,Linux开源操作系统事实上就有多种分支(DebianUbuntuRedhatFedoraCentOSOpenSUSE红旗 Red Flag Linux),每一个分支的代码仓库都有活跃的程序员社区贡献并推动迭代。

开源协议的特点与标准

流行的开源协议(License)有一个重要的共同点,受到开源促进会 (The Open Source Initiative,OSI) 的批准和授权。旨在推广开源软件的OSI成立于 1998 年,提出了开源定义 (Open Source Definition,OSD) 并确立开源软件的含义,OSD最早起源于Debian的自由软件指南 (Debian Free Software Guidelines,DFSG)。

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.

Mission of the Open Source Initiative

开源不仅仅意味着自由访问源代码。开源软件的分发条款必须符合以下标准:

1. Free Redistribution
The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.

2. Source Code
The program must include source code, and must allow distribution in source code as well as compiled form. Where some form of a product is not distributed with source code, there must be a well-publicized means of obtaining the source code for no more than a reasonable reproduction cost, preferably downloading via the Internet without charge. The source code must be the preferred form in which a programmer would modify the program. Deliberately obfuscated source code is not allowed. Intermediate forms such as the output of a preprocessor or translator are not allowed.

3. Derived Works
The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.

4. Integrity of The Author’s Source Code
The license may restrict source-code from being distributed in modified form only if the license allows the distribution of “patch files” with the source code for the purpose of modifying the program at build time. The license must explicitly permit distribution of software built from modified source code. The license may require derived works to carry a different name or version number from the original software.

5. No Discrimination Against Persons or Groups
The license must not discriminate against any person or group of persons.

6. No Discrimination Against Fields of Endeavor
The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

7. Distribution of License
The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties.

8. License Must Not Be Specific to a Product
The rights attached to the program must not depend on the program’s being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program’s license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution.

9. License Must Not Restrict Other Software
The license must not place restrictions on other software that is distributed along with the licensed software. For example, the license must not insist that all other programs distributed on the same medium must be open source software.

10. License Must Be Technology-Neutral
No provision of the license may be predicated on any individual technology or style of interface.

主流开源软件协议

目前主流的开源软件协议包括BSD(Berkeley Software Distribution)、MIT(Massachusetts Institute of Technology License)、Apache (Apache License 2.0)、GPL(General Public License)、LGPL(Lesser General Public License)、Mozilla (Mozilla Public License)等6种。大多数开源协议通常都包含以下声明:

1. Software can be modified, used commercially, and distributed.
2. Software can be modified and used in private.
3. A license and copyright notice must be included in the software.
4. Software authors provide no warranty with the software and are not liable for anything.

Consulted “Open Source Licenses and the Creative Commons Framework: License Selection and Comparison.” published on Journal of Information Science and Engineering in Jan 2006

  • 2024-02-26