3

I'm working on a project comprised of a small HTML page and a JavaScript script.

From the HTML page I include a library which is licensed under the GNU General Public License v3.0, and from my script I invoke some of its functions.

I would like to release the HTML page and the script file under the MIT License, but I'm not sure... Is it allowed?

I know MIT and GPL-3.0 code can be mixed, but in this case the GPL-3.0 code is a dependency of the would-be-MIT code.

I think I would be allowed to simply publish a code repository with my MIT code (without a copy of the GPL-3.0 library), and to publish the web page with a link to both my repository and the original repository of the library. Would I be correct? Would I also be required to host a copy of the source code of the library?

Thanks!

Fabio Iotti
  • 133
  • 4
  • Who is owning the copyright on the code? If you own it alone, you could dual license it. In principle, you need agreement of other contributors to change licenses. – Basile Starynkevitch May 12 '20 at 19:08

1 Answers1

4

No, you cannot distribute GPL-covered code in an MIT-licensed project. You have to use GPL (or a compatible license) for the project as a whole, if you include GPL-covered libraries.

I can also be argued that running a website is distributing the code, so even combining it on the front-end of a running web server is at least very fishy and must not be done; GPL very likely was chosen for that very reason.

Bart van Ingen Schenau
  • 29,549
  • 3
  • 46
  • 83
planetmaker
  • 11,042
  • 1
  • 28
  • 47
  • Running software on a server is absolutely not distribution/conveyance in the sense of the GPL. But including the software in the frontend absolutely is, and therefore implies responsibilities like providing a copy of the license and the corresponding source code to recipients (visitors of the website). – amon May 10 '20 at 14:17
  • @amon yes, thanks. When saying 'webserver' I meant to refer to the front-end part which is visible to outside users. I amended my text to reflect that. – planetmaker May 10 '20 at 14:29
  • Your first paragraph is contradictory. The MIT license is compatible with the GPL, so you are both saying that you can and cannot use the MIT license. – Bart van Ingen Schenau May 10 '20 at 17:28
  • @BartvanIngenSchenau I don't follow your argument. I say GPL in MIT: bad. (but MIT in GPL ok) – planetmaker May 10 '20 at 17:46
  • @planetmaker, and then you go on to say "Use GPL (or a compatible license)", but MIT falls under the parenthetical remark. What might be better o say is that the project as a whole needs to be distributed under the GPL (due to the GPL library), but all individual files, including those written by the OP, only need to be under a GPL-compatible license, for which the MIT qualifies as well. – Bart van Ingen Schenau May 10 '20 at 17:54
  • While I still fail to see the argument I don't mind to make it clearer. Better now? – planetmaker May 10 '20 at 18:03
  • I have made a small edit, as what you wrote didn't quite say what I think you meant. ("whole project" means "every single line in the project", whereas "project as a whole" means "looking at the project as a single entity"). – Bart van Ingen Schenau May 10 '20 at 18:28
  • I was reluctant to just release my code as GPL-3.0 because I don't understand all the implications, but if this is my only option, so be it. Thank you very much for helping me! – Fabio Iotti May 10 '20 at 18:28