2

I'm considering releasing the source code of an App as Copyleft, but would like some individual components (just not the core project) to be used under a more permissive MIT license.

How would this work? Can I have a top-level LICENSE file that's Copyleft, and then contain LICENSE files in sub-directories or at the top of files, and specifically state those directories (or particular files) are MIT licensed?

Would this cause issues for large organizations that scan for Copyleft software and prevent their developers from using it? I'd expect that, since it would be copied instead of downloaded through some package manager, it wouldn't be an issue for those developers, right?

Thanks in advance!

2
  • Have you looked at this answer? Commented Oct 13, 2022 at 7:18
  • Some companies have policies which prevent employees from using code under certain licenses, like this example. It is impossible to present a general behavior of 'large organizations', but usually they see code under permissive licenses much more favorable than code under copyleft licenses. Such companies might be using your code in the sub-directories under MIT license but ignore the top-level code under the copyleft license. Commented Oct 13, 2022 at 7:35

2 Answers 2

5

It's possible provided you're the sole rightsholder, but it's fairly pointless: anybody downstream who modifies the software will need to release it all under GPL, as per (eg) GPLv3 s5c.

What makes more sense is to release the whole of your app under GPLv3, but in addition package and release your libraries separately under MIT, so that people wishing to use just those libraries can come and get them from you on permissive terms. You might even want to put a note in your app's source that the libraries can be had directly from you on permissive terms.

If you follow this path, and your software becomes popular and you start to get contributions, note that you will need to take care handling contributions from people who send patches to the library. If they have the library as part of the whole app, those patches will be under GPL, and you have no power to vary that, and so cannot add them to your MIT-licensed version. This can be overcome by ensuring that all contributors to your library complete a CLA that explicitly permits release of their contributions under GPL and/or MIT, as you deem appropriate.

13
  • This seems strange to me. Plenty of software has sub-packages within their repo-- how is licensing a sub-folder of source not allowed, but having that same source in a separate repo with its own license (and importing it), any different? Seems like a package management/code organization question more than a licensing one. I read 5c and see how you could infer that, but I interpret it differently. To me, that's talking about the "viral" nature of GPL- if I use any GPL software, I need to license my whole work as GPL. But if I'm creating software from scratch, can't I license individual parts?
    – Nathan
    Commented Oct 13, 2022 at 19:24
  • 2
    @Nathan I agree, and I repeat: if you're the sole rightsholder (ie, you created the software from scratch), you absolutely can release under mixed licenses. But your downstream recipients can't, because they didn't create the work from scratch, and are therefore bound by the licences you've chosen - one of which says that when they modify and redistribute the work in turn, they must license the entire work under GPL to their downstream recipients. So although you can do that, there's not much point in so doing.
    – MadHatter
    Commented Oct 13, 2022 at 19:37
  • Ah, okay, I think we're on the same page. I would disagree about there not being much point though-- I want to prevent others from easily copying my overall app/making major closed source changes to it/etc. However, I also want it so that other programmers, creating different apps, can use some of the patterns/components I create in their own (unrelated) app. So e.g., a generic Modal component would be MIT, an algorithm that I use but could be useful for others could be MIT, etc. People could copy that code (in a directory or specific file) w/o making their whole project GPL, right?
    – Nathan
    Commented Oct 13, 2022 at 20:06
  • @Nathan licences do not inhere in code, but attach to recipients through the act of conveyance. If these people get the component directly from you, either from your direct distribution of that component, or from your release of the mixed-license Android app, then yes, they could use the component under MIT. But if they get the code from someone else's redistribution of your project, or from something based on that project, then no, they will get the component under GPL, and must then release any code incorporating it under GPL also.
    – MadHatter
    Commented Oct 13, 2022 at 20:15
  • 1
    @Nathan not easily, because at that point it's not GPL, it's modified GPL, which makes the entire package difficult to use (see eg this talk (full disclosure: I wrote the article) where a professional licence analyst says he spends at most five seconds trying to work out if the licence on a piece of code allows its internal use). Keep it simple. License your app under GPL, package the individual components separately and release them under MIT, and put pointers in the GPL source to the components for those that want them under a permissive licence.
    – MadHatter
    Commented Oct 13, 2022 at 20:30
0

Yes. It's possible.

For example, your overall software (assuming it's a standalone server process and not a library), can be licensed under GPLv2 or GPLv3, both strong copyleft licenses, but an accompanying library to communicate with your server software through sockets, can be licensed under the MIT license.

Another example, is that your overall software is a library licensed under LGPLv2.1, LGPLv3 or MPL2, which are all weak copyleft licenses, but you may include example code showing how to use your library, and this example code can be licensed under the MIT license.

1
  • 1
    Why the downvote? This seems a reasonable and correct answer.
    – parvus
    Commented Oct 21, 2022 at 5:50

Your Answer

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

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