帮助:开放源代码软件

帮助页面

:何为“开放源代码软件”?

:简而言之,“开放源代码软件”即符合美国开放源代码促进会(Open Source Initiative)所称“开放源代码定义”的软件,符合相关定义的软件,在开放源代码及授予用户以学习、使用、分享、改造相关软件的自由,并符合一些其他要求。通常而言,符合“自由软件”定义的软件均符合“开放源代码定义”。“开放源代码”运动分裂自以GNU计划为代表的“自由软件”运动,在很大程度上源于价值观区别。

历史背景

GNU系统难产,Linux横空出世

1991年,GNU操作系统计划的大部分组件已经近乎完成,但缺少了最后一块拼图——操作系统内核。原定用于GNU操作系统的内核被称为GNU Hurd,开发进展缓慢,且该内核迄今未能发布正式版本。1992年,尚在芬兰读大学的林纳斯·托瓦兹(Linus Torvalds)发布了Linux操作系统内核的0.12版本,自该版本开始,Linux内核采用GNU GPL v2.0许可证,开启了Linux在开源软件世界的传奇。Linux内核的出现,被普遍视为在相当程度上补上了GNU计划的拼图。但GNU项目负责人理查德·斯托曼(Richard Stallman)坚持将使用Linux内核的操作系统称为GNU/Linux,将Linux与GNU关联在一起。斯托曼等人给出的理由在于,Linux内核必须与操作系统框架搭配才能成为可用的发行版本,而GNU操作系统计划所开发的一系列套件成为了各种Linux发行版本的框架基础。这种操作在一定程度上引发了部分软件社区的不满。

大教堂与集市

1997年5月,前GNU Hurd计划参与者埃里克·史蒂文·雷蒙多(Eric Steven Raymond)发布了《大教堂与集市》(The Cathedral and the Bazaar)一文。通过该文,雷蒙多试图反思GNU Hurd计划的失败,并试图解释以Linux系统为代表的软件开发和运作模式的成功。雷蒙多将当时常见的社区化软件开发模式分为两种,即以GNU计划为代表的“大教堂模式”、以Linux内核为代表的“集市模式”。“大教堂模式”将开发过程集中在一个特定的小组中,开发过程的代码不对外可见,仅展示成品及其源代码;而“集市模式”通过互联网将开发过程面向大众,让所有人都参与进来,极大地促进了软件的开发过程。雷蒙多将Linux的成功总结为一条所谓的“林纳斯定律”(Linus's law):“关注者足够多,缺陷无所遁形。”("given enough eyeballs, all bugs are shallow".)

Debian自由软件指导方针

1997年6月,伊安·舒斯勒(Ean Schuessler)等人为Debian系统社区制定了一份《Debian社群契约》,该契约包含布鲁斯·佩伦斯(Bruce Perens)等撰写的《Debian自由软件指导方针》(Debian Free Software Guidelines,DFSG)。根据指导方针定义,Debian系统所包含的软件通常应为自由软件,而这些自由软件应符合下列条件:

  1. Free Redistribution
    The license of a Debian component may 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 may 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.
  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. (This is a compromise. The Debian group encourages all authors not to restrict any files, source or binary, from being modified.)
  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 Debian
    The rights attached to the program must not depend on the program's being part of a Debian system. If the program is extracted from Debian and used or distributed without Debian but otherwise 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 Debian system.
  9. License Must Not Contaminate 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 free software.
  10. Example Licenses
    The GPL, BSD, and Artistic licenses are examples of licenses that we consider free.

翻译:

  1. 自由再发行:Debian组件的许可证不得限制任何一方将此软件作为含有若干不同来源的程序的一套软件集合中的一个组件用于销售或者捐赠。该许可证不得向诸如此类销售行为的销售方索取专利费或者其它费用。
  2. 源代码:程序必须包括源代码,而且必须允许以源代码以及预先编译好的形式发行。
  3. 衍生作品:许可证必须允许对其所属作品的修改以及衍生,而且必须允许这些作品在原始软件的许可证条款下发行。
  4. 作者源代码的完整性:许可证只有在允许“补丁文件”随其所属作品的源代码一同发行,以便在编译时修改程序的情况之下,方可限制对其所属作品的源代码在发行时的修改行为。 许可证必须清楚表明用已修改的源代码编译而成的软件,是允许发行的。许可证可要求衍生软件使用有别于原来软件的名称或者版本号(这是一种妥协,Debian 组织鼓励所有作者不要限制任何源代码文件或者二进制文件的修改)。
  5. 禁止歧视人士或者组织:许可证不能歧视任何人士或者由多人组成的组织。
  6. 禁止歧视用途:许可证不能歧视程序可以被用于的任何特定领域。例如,许可证不得限制程序用于商业或者基因研究。
  7. 许可证的发行:程序附带的权利必须适用于程序再次发行的每一个受众,无需他们再执行一个附加的许可证。
  8. 许可证不能特定于Debian:程序附带的权利不能由该程序是否为Debian的一部分来决定。如果这个程序从Debian中摘取出来,即使在Debian之外但仍然在该程序的许可证条款下使用或者发行,那么它再次发行的每一个受众都将拥有和那些在该程序与Debian系统结合时被授予的完全相同的权利。
  9. 许可证的规定不得污染其他软件:许可证不得对其他与此软件一同分发的软件作出任何限制的规定。例如,许可证不得要求所有与它在同一媒体中一同分发的软件都是自由软件。
  10. 许可证示例:“GPL”“BSD”和“Artistic”均是我们视为“自由”的许可证的示例。

https://www.debian.org/social_contract#guidelines

“开源”一词的诞生

1998年1月22日,美国在线(AOL)公司宣布,停止网景通讯套件(Netscape Communicator)开发。受到《大教堂与集市》的影响,美国在线一并宣布,将开放网景通讯套件的相关源代码。此后,谋智(Mozilla)计划诞生了,这一计划包括著名的谋智火狐浏览器(Mozilla Firefox)。同年2月3日,埃里克·史蒂文·雷蒙多(Eric Steven Raymond)邀请一批软件社区领袖在美国加利福尼亚州芒廷维尤(Mountain View)参加了一场小型聚会。这次聚会正式提出了以“开源”(Open source)一词替代“自由软件”概念的想法。Linux项目领导人林纳斯·托瓦兹(Linus Torvalds)没有参与聚会,但事后亦认同相关提议。此后,Debian项目参与者布鲁斯·佩伦斯(Bruce Perens)迅速通过Debian的运作机构“软件符合公共利益有限公司”(Software in the Public Interest, Inc.)注册“open source”一词为商标,注册了opensource.org域名,并提议基于《Debian自由软件指导方针》制定新的开源软件标准,即后来的《开放源代码定义》。

“自由”含义混淆,价值观的冲突

在《再见,“自由软件”;你好,“开源”》(Goodbye, "free software"; hello, "open source")一文中,埃里克·雷蒙多冠冕堂皇地宣称:

After the Netscape announcement broke in January I did a lot of thinking about the next phase -- the serious push to get "free software" accepted in the mainstream corporate world. And I realized we have a serious problem with "free software" itself.

Specifically, we have a problem with the term "free software", itself, not the concept. I've become convinced that the term has to go.

The problem with it is twofold. First, it's confusing; the term "free" is very ambiguous (something the Free Software Foundation's propaganda has to wrestle with constantly). Does "free" mean "no money charged?" or does it mean "free to be modified by anyone", or something else?

Second, the term makes a lot of corporate types nervous. While this does not intrinsically bother me in the least, we now have a pragmatic interest in converting these people rather than thumbing our noses at them. There's now a chance we can make serious gains in the mainstream business world without compromising our ideals and commitment to technical excellence -- so it's time to reposition. We need a new and better label.

I brainstormed this with some Silicon Valley fans of Linux (including Larry Augustin of the Linux International board of directors) the day after my meeting with Netscape (Feb 5th). We kicked around and discarded several alternatives, and we came up with a replacement label we all liked: "open source".

译文:在网景公司一月份宣布这一消息后,我对下一阶段做了很多思考——大力推动“自由软件”在主流企业界被接受。我意识到“自由软件”本身存在严重问题。 具体来说,我们对“自由软件”这个词本身有问题,而不是这个概念。我已经确信这个词必须去掉。

它的问题有两个方面。首先,它令人困惑;“免费”一词非常含糊(这是自由软件基金会的宣传部门不得不不断努力解决的问题)。“免费”是指“不收费”,还是指“任何人都可以免费修改”,或者其他什么?

其次,这个词让很多企业类型感到紧张。虽然这在本质上一点也不困扰我,但我们现在有一个务实的兴趣,那就是改变这些人的信仰,而不是对他们嗤之以鼻。现在,我们有机会在不损害我们的理想和对卓越技术的承诺的情况下,在主流商业世界中取得重大进展——所以是时候重新定位了。我们需要一个新的更好的标签。

在我与网景公司(2月5日)会面的第二天,我与一些硅谷的Linux粉丝(包括Linux国际董事会的拉里·奥古斯丁)进行了头脑风暴。我们四处寻找,放弃了几个替代方案,我们想出了一个我们都喜欢的替代标签:“开源”。 http://www.catb.org/~esr/open-source.html

显而易见的是,无论是英文“Free”一词容易引发混淆,还是“Free”一词天然商业不友好,都并非是必须把“Free”替换成“Open source”的最主要的原因。更深层次的原因在于,与其他开放源代码软件组织相比,自由软件基金会(FSF)显然更加具有政治立场,这种立场与当时软件社区中与FSF存在政治立场差异或不愿卷入政治者存在冲突,这些社区参与者不愿被FSF的立场所绑架。林纳斯·托瓦兹(Linus Torvalds)曾在回应GNU计划某软件许可证版本更新的相关问题时称:

The whole "Open Source" renaming was done largely exactly because people wanted to distance themselves from the FSF. The fact that the FSF and it's followers refused to accept the name "Open Source", and continued to call Linux "Free Software" is not our fault.

译文:整个“开放源代码”的更名很大程度上正是因为人们想与FSF保持距离。FSF及其追随者拒绝接受“开放源代码”的名称,并继续称Linux为“自由软件”,这不是我们的错。

https://lkml.org/lkml/2006/9/25/161

而林纳斯在回忆Liunx开发初期所采用许可证时也提及:

Linux from the very beginning was not about the FSF ideals, but about "Full source must be available". It also talked about "Free", but that very much was "Free as in beer, not as in freedom", and I decided to drop that later on.

翻译:Linux从一开始就与FSF的理想无关,重点关于“必须提供完整的源代码”。(Linux开发初期所采用许可证)也提及了“free”一词,但很大程度上是“‘(免费)啤酒’中的Free,而不是‘自由’的Free”,我后来决定放弃(“free”)这一点。

https://lkml.org/lkml/2006/9/25/161

此后,1999年,埃里克·史蒂文·雷蒙多、布鲁斯·佩伦斯等人在美国设立了开放源代码促进会(Open Source Initiative)。基于《Debian自由软件指导方针》的最初版本,布鲁斯·佩伦斯撰写了《开放源代码定义》(The Open Source Definition)。该定义对原文做了微调,去除了中提及Debian的部分,并更换了其第十条定义。此后,该定义多次修改,最后一次修改于2007年完成。

对于“开放源代码”运动分裂“自由软件”运动一事,理查德·斯托曼(Richard Stallman)回应称:

“Free software.” “Open source.” If it's the same software (or nearly so), does it matter which name you use? Yes, because different words convey different ideas. While a free program by any other name would give you the same freedom today, establishing freedom in a lasting way depends above all on teaching people to value freedom. If you want to help do this, it is essential to speak of “free software.”

We in the free software movement don't think of the open source camp as an enemy; the enemy is proprietary (nonfree) software. But we want people to know we stand for freedom, so we do not accept being mislabeled as open source supporters. What we advocate is not “open source,” and what we oppose is not “closed source.” To make this clear, we avoid using those terms.

译文:“自由软件”,“开源软件”,既然都指的是同类软件(或基本是同类软件),那何必在名字上这么较真呢?有这个必要的。因为不同的词汇传递着不同的思维。尽管现在看来,用另一个名字称呼自由软件可以给你同等的自由,但若要长期维护用户的自由,则必须让人们意识到自由的价值。倘若你想帮助人们做到这点,那么使用“自由软件”这一称呼则尤为重要。

作为自由软件运动的成员,我们并不将开源阵营视为敌人。我们的敌人是专有(非自由)软件。但我们希望人们至少应该知道,我们所捍卫的是用户的自由。所以我们不愿被开源支持者们贴错标签。我们倡导的并不是 “开源”,我们反对的也不是 “闭源”。为了清楚起见,我们要避免使用这些词汇。 https://www.gnu.org/philosophy/open-source-misses-the-point.en.html

“开放源代码”、“自由软件”与用户权利

“开放源代码”这一称呼的本质是去对“自由软件”一词的去意识形态化。但是,无论是“自由软件”,还是“开放源代码”,这两个概念的核心都强调用户应具有自由使用、学习、分发、改造、汇编某一软件及其源代码的权利。这与一般意义上的“源代码可访问”存在本质区别,后者仅涉及将源代码开放出来供公众审视,但用户对软件的权利极度有限。读者必须留意区分。

开放源代码定义

《开放源代码定义》如此定义“开放源代码”:

Introduction

Open source doesn’t just mean access to the source code. The distribution terms of open-source software must comply with the following criteria:
  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.

翻译:

引言:开放源代码不仅意味着源代码可访问;开放源代码软件的分发条款必须符合以下标准:
  1. 自由再分发:许可证不应限制任何一方出售或赠送软件,作为包含来自多个不同来源的程序的聚合软件分发的组成部分。许可证不得要求此类销售收取特许权使用费或其他费用。
  2. 源代码:程序必须包括源代码,并且必须允许以源代码和编译形式分发。如果某种形式的产品没有与源代码一起分发,则必须有一种公开的方法来获得源代码,但不超过合理的复制成本,最好是通过互联网免费下载。源代码必须是程序员修改程序的首选形式。不允许故意混淆源代码。不允许使用中间形式,如预处理器或翻译器的输出。
  3. 衍生作品:许可证必须允许修改和衍生作品,并且必须允许它们按照与原始软件许可证相同的条款进行分发。
  4. 作者源代码的完整性:只有当许可证允许分发带有源代码的“补丁文件”以在构建时修改程序时,许可证才能限制源代码以修改后的形式分发。许可证必须明确允许分发由修改后的源代码构建的软件。许可证可能要求衍生作品带有与原始软件不同的名称或版本号。
  5. 不歧视个人或群体:许可证不得歧视任何人或群体。
  6. 不歧视用途:许可证不得限制任何人在特定领域使用该程序。例如,它可能不会限制该程序在企业中使用,或用于基因研究。
  7. 许可证的发放:程序附带的权利必须适用于程序重新分发给的所有人,而无需这些人执行额外的许可证。
  8. 许可证不得特定于产品:附加到程序的权限不得依赖于程序是否是特定软件分发的一部分。如果程序是从该分发中提取的,并在程序许可证的条款范围内使用或分发,则程序被分发给的所有各方都应享有与原始软件分发相关的权利。
  9. 许可不得限制其他软件:许可证不得限制与许可软件一起分发的其他软件。例如,许可证不得坚持要求在同一介质上分发的所有其他程序必须是开放源代码软件。
  10. 许可证必须是技术中立的:许可证的提供不得以任何单独的技术或接口风格为前提。

https://opensource.org/osd/

参考资料

  • Raymond E S, 卫剑帆(译). 大教堂与集市(The Cathedral and the Bazzar). 北京: 机械工业出版社. 2014. ISBN 978-7-111-45247-8.

参见