Ruby用实际行动向GPLv3吐槽,Ruby 1.9.3将改用 BSD 许可证发布
Ruby 从下一个版本,也就是1.9.3开始,从原先的GPLv2许可证换成了2-clause BSD许可证(大体上相当于MIT许可证)。
早期Ruby采用的是自由软件基金会推荐的GPLv2 or later许可证方式。在实际操作中这种许可方式十分常见,这种许可证方式包含两层意思:
- 软件本身以GPLv2许可证发布
- 当自由软件基金会修订GPL并发布新版GPL时,授权一方同意受权人以新的GPL条款来发布软件 (*)
这其中 (*) 的部分实际上是开给自由软件基金会的一张空白支票,并且可能导致各式各样的法律问题。据我个人的了解,湾区企业的法务部门通常不允许公司以这种方式发布软件,因而,商业公司在使用GPLv2 or later许可证的软件时,通常会在发布代码的同时明确说明自己在使用这个软件时只遵循某个特定版本的GPL,以规避潜在的法律风险:
| |
然而,实际上这样使用代码也是有风险的。例如,如此这家厂商便无法同时使用GPLv3许可证的代码。因为GPLv2中规定:
- You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
同时,GPLv2中也规定:
- Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients’ exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
简而言之,GPLv2 only的代码和GPLv3许可证的代码是不能一起redistribute的,原因是GPLv3中增加了包含对硬件和软件专利等问题而增加的一系列限制自由的条款(违反第6条),而另一方面,自由软件基金会又认为Ruby License是非自由软件授权,因此,GPLv3许可证的软件又不能与Ruby以Ruby License联编,因为这样做违反GPLv3第10条的内容:
10. Automatic Licensing of Downstream Recipients.
[…] You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
由于Ruby只以两种许可证之一发布,因此,发布联编的可执行文件要么违反GPLv2,要么违反GPLv3,因此再发布的结果只能以源代码的形式提供,而不允许再发布其二进制文件。
自由软件基金会从6.0版开始,将readline库改为GPLv3 or later,这样一来,GPLv2 only的Ruby便不能发布联入了readline的可执行文件了。
为了因应自由软件基金会改换授权可能给最终用户带来的困扰,去年9月,Ruby Changeset r29262将Ruby中的GPLv2许可证完全删除,并改换为基于FreeBSD许可证的2-clause BSD许可证,从而赋予了用户选择的权利。
感谢Richard Stallman和自由软件基金会使更多的人选择了BSD许可证。