Can I use MIT along with GPL?

Asked

Viewed 316 times

16

There are several software licenses around the world, but I have come across a problem that may sometimes even reach the level legal. And that wouldn’t be very good for my project.

My software is licensed under the MIT license, so far so good, but I would like to include snippets (or whole parts) of software that are under the GPL license.

Under the GPL license:

You are allowed to sell copies of the modified program commercially, but only under the Terms of the GNU GPL. Thus, for instance, you must make the source code available to the users of the program as described in the GPL, and they must be allowed to redistribute and Modify it as described in the GPL.

These Requirements are the condition for including the GPL-covered code you Received in a program of your Own.

The excerpt says I need to include the code for users, which I already do, along with the MIT license.

But part of that code is under the GPL license, where should I say that such an excerpt is under GP` and that it is not originally mine? I can do this?

P.S: If possible a practical and simple example.

P.S 2: That goes for package manager also, I can include a GPL file through packages.json? (Poser, npm, etc)

  • 2

    That one reply of Soen can help.

  • @Guilhermenascimento I’m using GPL-licensed classes, which are being included with the repository to make life easier.

  • Yes I understand this Olimon, what I mean is that some classes you can write under one license and other classes under another license and the complete software that uses these classes (for example Helper class, Connection, Webservice, etc.) can be written in another license yet. Sorry if I didn’t make myself clear initially, I hope it helps.

  • @Guilhermenascimento that last comment was and made everything clearer, thank you very much :)

  • 1

    One thing, I don’t know what kind of software and language you are using, but I consist in C/C++ write the classes in separate files, for example helper.c and helper.h are written under the MIT license and are in a folder called for example "include", whereas the files that are written under the proprietary license (usually code that makes the company rules) I consist of putting in a folder called "model", in other words, try to avoid mixing different license codes in the same file :) Good luck Olimon

2 answers

8

Only a specialized lawyer can guide you properly. I can give you preliminary information.

If you described your situation correctly (it’s amazing how common it is for a person not to understand their own situation) it seems to me that it is okay to include GPL code in an MIT project as long as the sources that use GPL clearly contain information that that code is under GPL license. It needs to be clear that that chunk has more restrictions than the rest of the code and that it cannot be used in the same way.

You must include the copyright information, the copyright information and the text of the GPL license. This must be in all source files. Of course the full license text can be referenced to a file contained in the repository.

One suggestion is to contact the maintainer of the GPL project and ask if what you’re doing is okay for it. A lawyer will demand that this be in writing and that it be from someone who has proven authority to sign that. What’s really hard to get.

This is my understanding of the license but it may not be everyone’s. I’ve seen a lot of discussion about this. This is the problem of asking about legal issues in a website developmental.

So the ideal is to leave the part that is GPL well separated, even to facilitate who wants to replace this part. Preferably in another repository. If this is not possible, you may have problems (although I have never seen a GPL license infringement suit).

Just keep in mind that you cannot change the license of the GPL code and you cannot leave any door open for anyone who uses your code to get confused because of you and end up misusing the GPL part.

Looking on the other hand if your project is difficult to dissociate the GPL and MIT parts, in practice you have a GPL project. After all no one can use one part of the project one way and another part of another. GPL is viral, that is, it contaminates everything that is close to it.

Particularly I wouldn’t put GPL code on a project that I wish was MIT. I could use something GPL to make some component optional or that can be completely separated from the MIT part. So I guarantee that the MIT part can be used as MIT itself.

6


The MIT license is compatible with the GPL license, so there is no obstacle to having a system with some components under one of these licenses and others under the other. The question is what is the right way to graduate the final product, and in fact only a lawyer can tell you that.

According to the interpretation of the FSF, if A is under the GPL and B is under MIT, A+B is under the GPL. This is not necessarily the same interpretation as the justice I’d like to make that clear. Anyway, the components you developed - of which you are the author and the rights - can still be distributed freely under any GPL-compatible license.

That is, if anyone takes A+B, play A outside and want to incorporate B in a proprietary project, for example, it can - because B is under MIT, as per its own decision. However, if someone wants to incorporate A+B in a proprietary project, it cannot, because the component A - of which you is not author and therefore does not hold the rights - is still under the GPL, which does not allow this.

Note also that the restrictions imposed by the GPL refer only to redistribution: if you never distribute A+B for no one - install on a server and offer as a service, for example - so it doesn’t matter what license you are under B (incidentally, B may not be under none license, as you are not redistributing it...), you do not violate the GPL simply by use nor modify the component A.

In short, if you want to avoid problems, license your end product as GPL, and only the specific components of his authorship as MIT. If these conditions are not satisfactory, seek expert help.

  • Is the GPL license not viral? I mean if a software has a component under the GPL all the rest should be GPL?

  • 1

    @Ricardo No exactly, see the part I wrote that "if A is under the GPL and B is under the MIT, A+B is under the GPL". It is viral because the set has to respect the GPL, but the individual parts (if self-contained) may be in any GPL-compatible license.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.