Can I use MIT together with GPL?

16

There are a number of software licenses around the world, but I have come across a problem that can sometimes even reach the legal level. And that would not be very good for my project.

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

According to the GPL license:

  

You are allowed to sell copies of the modified program commercially, but only under the terms of the GNU GPL.

     

These requirements are the condition for including the GPL-covered code you received in a program of your own.

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

But part of this code is under the GPL license, where should I say that this is under GP 'and that it is not originally mine? Can I do this?

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

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

    
asked by anonymous 22.12.2014 / 19:46

2 answers

6

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

According to the FSF interpretation, if A is under LPG and B is under MIT, A+B is under the GPL. This is not necessarily the same interpretation as justice would give, let it be very clear. However, the components you have developed - of which you are the author and have the rights - can still be distributed freely under any GPL-compliant license.

That is, if someone takes A+B , play A off and wants to embed B in a proprietary project, for example, he can B is under MIT according to his own decision. However, if you want to embed A+B into a proprietary project, it can not, because the A component - of which you is not author and therefore does not rights - is still under the GPL, which does not allow this.

Also note that the constraints imposed by GPL apply only to redistribution : if you never distribute A+B to anyone - install on a server and offer as a service, for example - then it matters little what license is B (in fact, B may not be under any license since you are not redistributing it ...), you do not violate GPL simply by or modify the A component.

In summary, if you want to avoid problems, license your final product as a GPL, and only the specific components of your design as MIT. If these conditions are not satisfactory, seek expert help.

    
22.12.2014 / 20:51
8

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

If you have described your situation correctly (it is amazing how common it is that people do not understand their own situation), it seems to me that it is okay to include GPL code in an MIT project since sources using GPL clearly contain information that that code is under GPL license. It needs to be clear that that snippet has more restrictions than the rest of the code and that it can not be used in the same way.

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

One suggestion is to contact the maintainer of the GPL project and ask if what you are doing is ok for it. A lawyer will require this to be in writing and to be from someone who has been proven to have the authority to sign it. Which is very difficult to achieve.

This is my understanding of the license but 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 development site.

So the ideal is to leave well separated the part that is GPL, 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 process for GPL license violation).

Just keep in mind that you can not change the license of the GPL code and you can not leave any door open for anyone who uses your code to be confused for your cause and end up using the GPL part improperly.

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

Particularly I would not put GPL code in a project that I wish to be MIT. I could use something GPL to make some optional component or it can be completely separate from the MIT part. So I guarantee that the MIT part can be used as the same MIT.

    
22.12.2014 / 20:15