16

If I own a GPL-licensed software that is used as a component in other peoples user-facing software, can I issue a separate license so that my software can be used in a popular MIT licensed project?

In laymens terms, I don't want people to use my software commercially for free, but I want to be nice and allow a specific project that is MIT licensed to use and distribute my code.

To me this sounds like wanting to both eat the cake and keep it at the same time. Is this possible?

2
  • 3
    This is actually rather common, although not always visible. Companies release libraries under the GPL to encourage widespread adoption, and then sell non-GPL licences to people who want to use it in proprietary programs.
    – bta
    Mar 4 at 1:25
  • Just in passing, you know that the GPL permits "commercial use for free", right? If you wish to forbid commercial use, this is possible, but (a) the GPL won't do it, and (b) the question's off-topic for this site.
    – MadHatter
    Mar 13 at 8:14

4 Answers 4

35

If I own a GPL-licensed software that is used as a component in other peoples user-facing software, can I issue a separate license so that my software can be used in a popular MIT licensed project?

If you own all the copyrights in that software (i.e., you have not accepted any contributions from others), and if you don't use any libraries that are under the GPL license, then you are within your rights to offer different licenses to different users.

In laymens terms, I don't want people to use my software commercially for free, but I want to be nice and allow a specific project that is MIT licensed to use and distribute my code.

Once you have given that project an MIT-licensed version of your software, you can not prevent others from taking that project, making changes to it (including, replacing everything except your code) and using that changed version commercially and without disclosing the source code.

There you may indeed have a conflict in your desires.

2
  • There's nothing stopping him modifying the MIT license provided to this to prevent it from being transferable and require all other potential consumers to use the GPL version. That being said... It wouldn't be the MIT license then, but it would probably get the job done Mar 5 at 1:57
  • 15
    I would expect a MIT licensed project to reject the contribution of code under such a license. Mar 5 at 20:55
9

In order to keep the GPL restrictions on your software, while letting the MIT licensed project use it, you would have to give the project license terms that forbid including your software in their MIT licensed material.

There are technical ways to handle such a separation of part of their dependency code from the main project code, allowing them to use your library without applying their MIT license to it, but it would be a significant hassle for them to deal with, and would come with legal risks if they make any mistake in handling it appropriately.

You can try to offer such a license to them, but I would expect them to decline unless your software handles something critical to their project and has no meaningful competition that they could use instead.

In practice, if you want to let an MIT licensed project use your code, you will probably have to abandon any copyleft restrictions and just switch to the MIT license yourself.

6
  • 3
    Agree, except for the final paragraph: LGPL would probably suffice.
    – wizzwizz4
    Mar 5 at 19:46
  • @wizzwizz4 It does depend on the nature of the project. If it's feasible to convert it to a library, and use it as such, LGPL would suffice. But a sole developer may not be able to put in the work required, and switching licenses would be the only way for them to allow it.
    – anon
    Mar 6 at 0:34
  • 1
    @Nic For it to be a library, all you need to do is draw a line and say "verily, this is to be the inner part of the component, which must be LGPL'd, and this the outer, which may be MIT". Provided that the program is distributed in source form, so that users can swap out the LGPL'd component for another that provides the same interface, this is fine. (If somebody later wanted to make a proprietary version of the MIT'd code, and not provide the source, they might have to implement some manner of dynamic linking mechanism, but that's a different issue for another person at a later date.)
    – wizzwizz4
    Mar 6 at 1:25
  • @wizzwizz4 ...Yes? I don't see how that's a rebuttal of what I said. Being able to arbitrarily pick anywhere you want to be the dividing line doesn't magically make it easy to turn what may be quite complex code into a decent library. Consider an extreme example: You write a fifty-thousand-line main with no other functions. Sure, you can pick down to the individual character which parts are available under LGPL or MIT; that doesn't help someone use your code as a library, though.
    – anon
    Mar 6 at 5:10
  • The purpose of this question is "be nice and allow a specific project that is MIT licensed to use and distribute my code". It's rather less nice to go "here's a random jumble of code with the line drawn halfway through the middle of it, have fun figuring it out!" than it is to go "here's an LGPL-licensed library you can link to in your MIT code without fear of licensing issues!" -- but getting to that second thing isn't necessarily trivial. Even if you accept you'll have an idiosyncratic and underdocumented API.
    – anon
    Mar 6 at 5:12
2

Ask a legal expert if you can grant a free, "source-available," and irrevocable license to them. Also, one with a patent grant. Doing this isn't the same as using MIT license for that specific project because that would let people escape your copyleft. Instead, you're keeping your code copyleft while granting a separate, proprietary license which has some benefits of open-source code.

Since people worry about abuses, I advise anyone trying to get open-source projects to take non-open code to do one extra thing. Release your behavioral specs, the API, and the data formats under an open, permissible license with patent grant. As in, they can legally and easily swap your code out for something compatible with less likelihood of breaking changes. Call it future-proofing a little.

Here's an example for clarity. Let's say your code is a parser. You define its inputs, invariants, outputs, tests, and error-handling in open specs (and/or API code) others can use. The storage of the result is JSON with a published format. Then, your actual implementation is not open. If they decide to drop it, they can use the same API's, output a result in the same format, and so on. There's less risk in a port. They might be more likely to adopt your code.

3
  • 1
    They will want to distribute the code under an MIT license. If your license doesn't allow this, then they won't want it. If it does, anyone can use it under the MIT license. Mar 6 at 18:30
  • That will be true for most projects. Some projects allow mixed licensing. I've used public domain, BSD, copyleft, and proprietary all in the same design. Some projects allow optional, proprietary components for their benefits. While I mentioned source, some even have binary blobs to get their benefits (eg hardware). They mixed them to have a configuration with superior embedded support (QNX), desktop (Windows/Genera), testing (SQLite), fault-tolerance (FoundationDB), security (seL4), or compilers (Edison/CompCert) whose artifacts can be open-sourced. Each had proprietary/OSS mixed projects. Mar 10 at 1:59
  • If a project doesn't allow mixed licensing, this won't work, and if it does, the GPL grant is (as has been pointed out elsewhere) enough. Under no circumstances does this strike me as a good idea.
    – MadHatter
    Mar 13 at 8:13
0

I assume you are using the software under the GPL license but you are not the copyright holder.

In that case, you are only allowed to publish the software if you license it under the GPL license, which means anyone receiving it can only publish it under the GPL license and do on. There are some more conditions.

The worst thing you can do is publish it under a different license without telling anyone and creating an almighty legal mess for everyone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.