什么是开源软件?
自LinusTorvalds创建Linux以来,开源思想在软件界可谓盛极一时。那么,什么是开源呢 ?简单来说,"开源软件"就是源代码开放的软件。对普通用户来说,开不开源其实意义不是很大,他们更在乎收不收费,由于开源软件大多都是免费下载的,所以一提起开源软件,很多人的第一反应就是免费软件,对一般用户这么说也未尝不可。不过对于商业用户来说,开源的意义就不一样了,首先它可以减少开发周期,因为源代码开放了,只需要稍做修改就可以嵌入到产品中去;其次,它可以降低成本,免费午餐不一定就不好吃(也有些开源软件需要收费,但价格都比较低廉)。源代码开放是信息技术发展引发网络革命所带来的面向未来以开放创新、共同创新为特点的、以人为本的创新2.0模式在软件行业的典型体现和生动注解。
1997春天,自由软件社团的一些领导者聚集到加利福尼亚州。这个社团包括EricRaymond,TimO’Rerlly,VA Research的总裁Larry Augustin等人,他们所关心的是一种寻找方式,来向以前躲避自由软件思想的人们推广这种思想。他们担心,自由软件基金会的反商业信条会让人们对自由软件敬而远之。
在Eric Raymond的坚持下,这群人同意他们所缺乏的是市场营销活动,这个活动的目的是赢得思想,而不仅仅是市场份额。最后讨论的结果产生了一个新的术语来描述他们所推进的软件:Open Source(开源软件)。他们制定了一系列的指导原则,用来描述哪些软件可以有资格被称为开源软件。
Bruce Perens 为制定开源软件的定义做了很多基础性的工作。GNU工程的正式目标之一就是创造一个自由可用的操作系统,以作为平台来运行GNU软件。从软件引导(softwera boottstrapping)的传统观点来看,Linux已经成为那个平台,Linux是在GNU工具的帮助下创造出来的。Perens曾经是Debian工程的领导者,它所管理的Linux发行版本,只包括那些符合GNU精神的软件。Perens已经在“Debian社会契约”(Debian Social Contract)中明确地阐明了这一立场。开源软件的定义是“Debian社会契约”的直接产物,因此开源软件是与GNU的精神一脉相承的。
与GPL相比,开源软件的定义允许更大授权自由。特别是当软件中混合了专有软件和开源软件时,开源软件的定义允许在它们的基础上生成更大的混合。
结果是,开源软件许可证能令人信服地允许使用和再分开开源软件,而不必考虑补偿或者信用问题。举例来讲,你可以得到伟大的Netscape浏览器的源代码,并且把它作为连同另一个软件(可能是专有软件)一起发布出去,而用不着去通知网景(Netscape)公司。网景为什么会希望如此呢?原因很多,最引人注目的是,这样做可以为他们的客户端代码赢得更大的市场份额。这些代码与他们的商业软件一起工作得的非常好。从这个角度来说,奉送源代码是建立平台的一个很好的方式。这也是网景的人不使用GPL的原因之一。
这在社团中可不是小事一桩。1998年下半年,曾经有一场重要的争论对Linux威胁极大,几乎Linux社团破裂。裂痕是因出现了两个软件系统GNOME和KDE而引发的,它们两者都试图建立一个面向对象的桌面界面。一方面,KDE利用了Troll Technology公司的Qt库,其中的一部分属于专有代码,但是很稳定、很成熟。另一方面,GNOME决定使用GTK+库,尽管它不如Qt成熟,但是它是完全自由的库。
过去,Troll Technology不得不在使用GPL和维持他们的专有软件立场之间进行选择。GNOME和KDE的裂痕本来会持续下去。然而,在开源软件出现后,虽然Troll仍然控制他们想要的技术,但是Troll可以为希望Qt符合开源软件定义的人改变他们的许可证。Linux社团两个重要部分的裂痕看来要弥合了。
开源LINUX 成就新软件时代
从linux兴起到开源软件的广泛运用,过去Windows(微软)的辉煌已经不再,一个新软件时代已经来临。开源软件将使全球软件工程师和软件开发爱好者在开放源代码的环境中,以较低的开发成本,为用户提供大量更为安全、稳定的高品质软件,以满足新软件时代人类对软件极其丰富的应用要求。了解及掌握以linux为代表的开发源代码技术,将是所有IT从业人员在已经到来的新软件时代中生存和发展的必要手段。
附:开源软件官方定义
英文原文:
The Open Source Definition
Version 1.9
The indented, italicized sections below appear as annotations to the Open Source Definition (OSD) and are not a part of the OSD.
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:
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.
1. Free Redistribution
Rationale: By constraining the license to require free redistribution, we eliminate the temptation to throw away many long-term gains in order to make a few short-term sales dollars. If we didn't do this, there would be lots of pressure for cooperators to defect.
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.
Rationale: We require access to un-obfuscated source code because you can't evolve programs without modifying them. Since our purpose is to make evolution easy, we require that modification be made easy.
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.
Rationale: The mere ability to read source isn't enough to support independent peer review and rapid evolutionary selection. For rapid evolution to happen, people need to be able to experiment with and redistribute modifications.
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.
Rationale: Encouraging lots of improvement is a good thing, but users have a right to know who is responsible for the software they are using. Authors and maintainers have reciprocal right to know what they're being asked to support and protect their reputations.
Accordingly, an open-source license must guarantee that source be readily available, but may require that it be distributed as pristine base sources plus patches. In this way, "unofficial" changes can be made available but readily distinguished from the base source.
5. No Discrimination Against Persons or Groups
The license must not discriminate against any person or group of persons.
Rationale: In order to get the maximum benefit from the process, the maximum diversity of persons and groups should be equally eligible to contribute to open sources. Therefore we forbid any open-source license from locking anybody out of the process.
Some countries, including the United States, have export restrictions for certain types of software. An OSD-conformant license may warn licensees of applicable restrictions and remind them that they are obliged to obey the law; however, it may not incorporate such restrictions itself.
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.
Rationale: The major intention of this clause is to prohibit license traps that prevent open source from being used commercially. We want commercial users to join our community, not feel excluded from it.
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.
Rationale: This clause is intended to forbid closing up software by indirect means such as requiring a non-disclosure agreement.
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.
Rationale: This clause forecloses yet another class of license traps.
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.
Rationale: Distributors of open-source software have the right to make their own choices about their own software.
Yes, the GPL is conformant with this requirement. Software linked with GPLed libraries only inherits the GPL if it forms a single work, not any software with which they are merely distributed.
10. License Must Be Technology-Neutral
No provision of the license may be predicated on any individual technology or style of interface.
Rationale: This provision is aimed specifically aimed at licenses which require an explicit gesture of assent in order to establish a contract between licensor and licensee. Provisions mandating so-called "click-wrap" may conflict with important methods of software distribution such as FTP download, CD-ROM anthologies, and web mirroring; such provisions may also hinder code re-use. Conformant licenses must allow for the possibility that (a) redistribution of the software will take place over non-Web channels that do not support click-wrapping of the download, and that (b) the covered code (or re-used portions of covered code) may run in a non-GUI environment that cannot support popup dialogues.
中文译文:
开源不仅仅表示开放程序源代码。从发行角度定义的开源软件必须符合如下条件:
1、自由再发行
许可证不能限制任何团体销售活赠送软件,软件可以是几个不同来源的程序集成后的软件发行版中的其中一个原件。许可证不能要求对这样的销售收取许可证费或其他费用。
2、程序源代码
程序必须包含源代码。必须允许发行版在包含编译形式的同时也包含程序源代码。当产品以某种形式发行时没有包含源代码,必须非常醒目的告知用户,如何通过 Internet免费的下载源代码。源代码必须是以当程序员修改程序时优先选用的形式提供。故意地扰乱源代码是不允许的。以预处理程序或翻译器这样的中间形式作为源代码也是不允许的。
3、派生程序
许可证必须允许更改或派生程序。必须允许这些程序按与初始软件相同的许可证发行。
4、作者源代码的完整性
只有当许可证允许在程序开发阶段,为了调整程序的目的将“修补文件”的发行版与源代码一起发行时,许可证才能限制源代码以更改后的形式发行。许可证必须明确地允许按更改后的源代码所建立的程序发行。许可证可以要求派生的程序使用与初始软件不同的名称或版本号。
5、无个人或团体歧视
许可证不能都有针对任何个人或团体制在专门奋斗领域内的任何人使用该程序。例如不能限制程序应用于商业领域,或者应用于遗传研究。
7、许可证发行
伴随程序所具有权力必须适用于所有的程序分销商,而不需要这些团体之间再附加许可证签字盖章。
8、许可证不能特制某个产品
如果程序是某个特殊的软件发行版中的一部分,伴随该程序所具有的权力不能只以来于这一发行版。如果程序是从那一发行版中摘录出来的,使用或发行时用的都是那个程序的许可证,分销程序的所有团体都应拥有与初始软件版所允许的所有权力。
9、许可证不能排斥其他软件
许可证不能限制随该许可证软件一起发行的其他软件。例如,许可证不能要求所有与之一起发行的其他软件都是开源软件。
10、许可证实例
GNU GPL、BSD、X Consortiun和Artistic许可证都是我们认为符合开源软件定义的许可证。MPL也是一样。
相关资料
开源创新与创新2.0 http://www.mgov.cn/seminar/08chen.pdf
葛林.穆迪(Glyn Moody)著,杜默译,Linux传奇:让比尔盖茨坐立难安的天才,时报文化2001年台北,ISBN 9571333628