为库选择开源许可证

发布于 2024-10-09 17:22:54 字数 1455 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水溶 2024-10-16 17:22:54

嗯,我立刻注意到了一些事情。

首先,您谈到需要能够使用自己的代码做事。如果您是版权所有者,您几乎可以用自己的代码做任何您喜欢的事情。该许可证适用于其他人,而不适用于您。

此外,对代码可能对其他人造成的影响不承担任何责任几乎是任何许可证的样板。

话虽这么说,我发现在工作中我只需使用 3 种不同类型的许可证就可以了,具体取决于我的需要。

充分享受 GPL 的

好处:

  • 没有人可以取得任何专有代码(无需向我索取许可)。他们仍然可以使用它并向人们收费,但由于他们必须获得 GPL 许可,所以这不是特别实用。原因是他们的任何用户都可以赠送他们喜欢的所有免费副本。
  • 任何人都可以贡献这些资源,因此我可能不必自己查找并修复每个该死的错误并编写每个新功能。

缺点:

  • 所有代码都不能在专有应用程序中使用,

我通常将其用于独立应用程序。

具有链接例外的 GPL

这基本上就是它所说的; GPL,但有一个例外,即仅仅链接(或#include)代码不会呈现整个结果 GPL。这是来自类路径库的示例

好处:

  • 没有人可以将代码本身视为专有的。
  • 代码可以在专有产品中使用,而无需将整个闭源产品开源。只有 GPL 许可的东西才必须保持 GPL。

缺点:

  • 该设施本身永远无法扩展为专有设施。在我的书中通常是一个优点,但它确实阻止了一些人使用它。

我通常将其用于辅助工具和 API 。

公共领域

这意味着任何人都可以使用此代码做任何他们喜欢的事情,包括进行微小的调整、在其上加上自己的版权并称其为自己的。

优点:

  • 任何人都可以随意使用它。

缺点:

  • 无法防止代码被专有软件销售商“窃取”。
  • 在许多司法管辖区不可能做到这一点(据我所知,宽松的 BSD 可能是一个不错的选择)。

当我发布一些不完整的东西并且我确实希望其他人接管时,或者当发布一些应该是标准库的参考实现的东西时,我会使用它。

现在,在像您这样的情况下,我会做的是:

  • 使用 GPL 和库的链接例外。这将允许每个人(包括您)在专有应用程序中使用该库,但该库本身将始终保持免费。
  • 使用 GPL,并坚持将其他人的贡献的版权分配给您。这允许您完全有权使用其他人的贡献来制作自己的专有应用程序,并且不允许其他任何人(包括那些贡献者)拥有同样的权利。在我的书中有点俗气,并且可能会阻止外部贡献者。然而,无论如何,只有最成功的自由软件项目才能获得外部贡献者。所以损失可能不会那么大。

最近我注意到 Bruce Perens(OSI 的创始人之一)实际上在一年前发表了一篇博客文章,使得 完全相同的一点。不过,他为后两个选择了与我不同的两个许可证。他选择 LGPL 作为中间许可证,我认为这是他的一个错误。但是,他为后一个许可证选择了 Apache License 2.0,我认为他可能有关于这一点的一点。与直接公共领域相比,使用 Apache 的好处是可以更好地保护您免受专利诉讼。这并不是我可怜的小孩子真正需要担心的事情,但你的公司就完全是另一回事了。

Well, there are a couple of things I notice right off the bat here.

First off, you talk about needing to be able to do things with your own code. If you are the copyright holder, you can do pretty much anything you damn well please with your own code. The license is for other people, not for you.

Also, disclaiming any responsibility for what the code may do to other folks is pretty much boilerplate with any license.

That being said, I've found in my work I can get by with the use of only 3 different kinds of licenses, depending on my needs.

Full on GPL

Benifits:

  • Nobody can ever take any of the code propreitary (without coming to me for a relicense). They can still use it and charge people, but since they'd have to license the result GPL, that wouldn't be particularly practical. The reason is that any of their users could give away all the free copies they like.
  • The sources are avilable for anybody to contribute to, so I might not have to find and fix every damn bug and write every new feature myself.

Drawbacks:

  • None of the code is usable in a properitary app

I use this typically for stand-alone apps.

GPL with linking exceptions

This is basically what it says; GPL with an exception that meerly linking against (or #including) the code does not render the entire result GPL. Here's an example from the Classpath library.

Benifits:

  • Nobody can ever take the code itself proprietary.
  • The code can be used in a proprietary product without making the whole closed-source product open-source. Only the GPL-licensed stuff has to stay GPL.

Drawbacks:

  • The facility itself can never be expanded into a proprietary facility. Generally a plus in my book, but it does deter some people from using it.

I use this typically for helper facilities and API's .

Public Domain

This means anyone can do anything they like with this code, including making a tiny tweak, slapping their own copyright on it and calling it theirs.

Benifits:

  • Anybody can feel free to use it however they like.

Drawbacks:

  • No protection from the code getting "stolen" by a proprietary software seller.
  • Impossible to do in may jurisdictions (a permissive BSD I understand can be a good alternative there).

I use this when I'm publishing something incomplete that I really want someone else to take over, or when publishing something that is supposed to be a reference implementation for a standard library.

Now in a case like yours what I would do is either:

  • Use GPL with the linking exceptions for the library. That will allow everyone (including you) to use the library in a proprietary application, but the library itself will always stay Free.
  • Use GPL, and insist that contributions from others have their copyrights assigned back to you. This allows you full rights to make your own proprietary app using other people's contributions, and doesn't allow anyone else (including those contributors) that same right. Kinda cheesy in my book, and will probably discourage outside contributors. However, only the most successful Free Software projects get any outside contributors anyway. So it may not be that much of a loss.

It came to my attention recently that Bruce Perens (one of the founders of OSI) actually made a blog post a year earlier that made the exact same point. He picked two different licenses than I did for the latter two though. He picked LGPL for the intermediate license, which I think is a mistake on his part. However, he picked the Apache License 2.0 for the latter license, and I think he may have a point on that one. The benefit you get from using Apache over straight Public Domain is that you are better protected from patent lawsuits. That isn't something poor little me really has to worry about, but your company is a different matter entirely.

大海や 2024-10-16 17:22:54

这是不可能的。你说你想要一个禁止赚钱的开源许可证。然而,成为开源许可证的关键要求之一是不对商业化做出任何限制。

因此,像您所描述的那样的许可证不可能存在。


标准答案在这里:StackOverflow 是一个解决编程问题的网站。我们是程序员。你的问题是一个法律问题。这意味着所有答案(包括我的答案)根据定义都是垃圾,因为我们不知道我们在谈论什么。

对于法律问题,请咨询律师。

This impossible. You say you want an open source license that prohibits making money. However, one of the key requirements for being an open source license is not making any restrictions with respect to commercialization.

Ergo, a license like you describe it cannot possibly exist.


And here the standard answer: StackOverflow is a site for programming questions. We are programmers. Your question is a legal question. This means that all answers (including mine) will be, by definition, crap, since we don't know WTF we're talking about.

For legal questions, ask a lawyer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文