說明:開放源代碼軟件

說明頁面

:何為「開放源代碼軟件」?

:簡而言之,「開放源代碼軟件」即符合美國開放源代碼促進會(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.

參見