自 12 年到北京做程序员, 貌似从未关心过项目中使用的 "轮子" 涉及到了哪些开源协议. 版权保护方面, 虽然相关法规尚有待完善, 但在研发商用软件过程中, 作为软件开发者还是很有必要了解一下, 我们平时使用的开源组件 / 框架都涉及到了哪些开源协议, 以避免今后的法律风险.
现在市面上的开源协议至少有上百种, 经过开源促进会 (Open Source Initiative) 认可的开源协议也多达 70 多种.
这里标题叫常见开源协议详解, 因此我们只介绍常见的 6 中开源协议.
- BSD(Berkeley Software Distribution license)
- MIT(Massachusetts Institute of Technology)
- Apache Licence 2.0
- GPL(General Public License)
- LGPL(Lesser General Public License)
- Mozilla(Mozilla Public License)
借用以下分析图 (该图乌克兰程序员 PaulBagwell 原创, 阮一峰翻译) 展示一下常用的开源协议:
一, BSD (Berkeley Software Distribution license)
BSD 源自加州大学伯克利分校, 是自由软件中使用最广泛的许可协议之一, 其给于使用者很大自由的协议.
使用者可以自由的使用, 修改源代码, 也可以将修改后的代码开源或闭源, 甚至作为商业软件再发布. 前提是发布的源代码, 二进制可执行文件相关文档中需包含 BSD 许可协议声明, 并且不能使用开源机构名字做产品的市场推广.
使用 BSD 前提条件:
当你发布使用了 BSD 协议的代码, 或以 BSD 协议代码为基础做二次开发时, 需要满足以下三个条件:
如果再发布的产品中包含源代码, 则在源代码中必须带有原来代码中的 BSD 协议;
- Copyright (C) <year> <copyright holders>
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
- Copyright [yyyy] [name of copyright owner]
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- Copyright (C) <year> <name of author>
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- Copyright (C) year name of author
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
来源: https://www.cnblogs.com/xiaxveliang/p/12893660.html