What do I choose if I use the source code from a GPL2 project, and another source code from MIT?

softwareengineering.stackexchange https://softwareengineering.stackexchange.com/questions/301163

  •  20-10-2020
  •  | 
  •  

Question

Some scenarios:

  1. If I have a project that uses source code from a GPL 2 licensed project, and another set of source code from an MIT licensed project, what do I license my whole project as?
  2. What if I have a project with multiple modules where one module uses source code from a GPL2 project and another uses source code from MIT (or another license that states the whole project must be under the same license), but neither modules "interact" with one another?
  3. What should my project uses if I modify MIT licensed source code to use the source code of a GPL 2 licensed project (or let's say it's two licenses that state that both state the whole project must be under the same license)?
Was it helpful?

Solution

TLDR; assuming you are going to release it, you release your code under GPL.


When mixing licenses the first question is generally, are they compatible - in this case (IIRC), yes they are. So using code from MIT and GPL are allowed in the same project.

The second point is what duties do you have w.r.t. acknowledging the code being used - given the licenses in question, this is generally attribution and inclusion of the original license text.

The third issue is what license can be the code be released under. Given the GPL, the code needs to be release under the same GPL license. The GPL is pretty clear on this. I believe this was also one of the original intents of the GPL - make sure code using the GPL remains GPL.

OTHER TIPS

  1. If I have a project that uses source code from a GPL 2 licensed project, and another set of source code from an MIT licensed project, what do I license my whole project as?

Derived works from GPL code must be under GPL as well "as a whole". Adding MIT license code does not change this (what makes you believe it should)? MIT requires you to mention the original copyright and license text for the part you are reusing, which is not contradictory to the GPL.

  1. What if I have a project with multiple modules where one module uses source code from a GPL2 project and another uses source code from MIT (or another license that states the whole project must be under the same license), but neither modules "interact" with one another?

Module 1 must be under GPL as well, module 2 under any license you like as long as it is compatible with MIT. If those two modules are not linked together and do not interact, they are two separate products. Just putting them on the same data storage medium or selling them both together does not imply you need the GPL for both (as stated in the FSF's GPL FAQ). If you want, however, create a combined product which uses the two modules, and link them both, see 1.

  1. What should my project uses if I modify MIT licensed source code to use the source code of a GPL 2 licensed project (or let's say it's two licenses that state that both state the whole project must be under the same license)?

That depends on what you mean by "to use the source code of a GPL 2 licensed project". If you modify the MIT licensed source to link the GPL code together with it, allowing in-process communication, the combined work must be under GPL, same as in 1.

Please, before asking further question here on SO, read the license texts by yourself, and when anything is unclear, read the GPL FAQ. When there still remain questions, search here on Programmers first if someone has asked already a similar question in the past (I am sure we had dozens of very similar questions to yours). And only if you did not find an answer, ask a new question here.

Licensed under: CC-BY-SA with attribution
scroll top