Recently I took GPL'd source code, simplify them, remove few functions that I don't need, add new functions, and use them in my closed source program as plug-in. Is that legally allowed?<p>Secondly, I want to release the new source code as MIT license, is that allowed?
<i>Recently I took GPL'd source code, simplify them, remove few functions that I don't need, add new functions, and use them in my closed source program as plug-in. Is that legally allowed?<p>Secondly, I want to release the new source code as MIT license, is that allowed?</i><p>Your work is a derivative work of the original copyrighted source code.<p>The GPL only gives permission for you to distribute such a derivative work if it is also GPL'd. Thus, if you're only using your code privately, you should be OK. If you actually distribute your closed-source derivative work to others, then you have reused the original copyrighted source code in a manner not approved by the rightsholder's license. You are then violating someone else's copyright.<p>This applies whether you distribute your derivative code in a closed-source product, or under a non-GPL open-source license (like the MIT license).<p>(I am not a lawyer but this is pretty basic GPL interpretation.)<p><i>Edit: to clarify private use vs. 'distribution' distinction.</i>
Have you actually read the GPL? It is not that complicated of a document...and it's quite clear that neither of your desires would be legitimate uses of code licensed under the GPL.<p>I can't understand how so many people manage to misunderstand the license in so many ways. Read the license, and if you don't understand it, read the FAQ. Every question you can possibly come up with will be answered by one or both of them.
1. You are allowed to use GPL code in a closed source application. If you distribute that application, you must release the source code to the entire application under the GPL.<p>How is that different? If you're making something for internal use at your company, it means that you don't have to give back. If you are distributing it to users that are not yourself (or your company), you must make it GPL.<p>2. You cannot relicense code under different licenses unless the license explicitly says that you can. The GPL doesn't have such a provision.
The second question should be clear, now: I should release the new source code (the plugin, not the closed source) as GPL.<p>Still not sure about the first question. This is not my case, but just to clarify: if somebody writing a closed-source program and sell it, and that program is using GPL'd DLL, is that violating the GPL license?
(A) Definitely read the GPL itself.<p>(B) There are a couple of books about open source license that explain the various bits pretty well -- you might want to read them, too.<p>(C) On your first question, no that's not allowed by the GPL. You've created a derivative work and it must remain GPL'd.<p>(D) Your "new functions", if they are truly your own independent creations can potentially be separated out into their own e.g., library and you can release just that under whatever license you like.<p>(E) In terms of your second question, that depends on what you mean by "new source code". If you mean "only the completely new source code that you've written independently" then yes as long as you don't include that code as an integral part of GPL'd code in creating a derivative work. The other cases have been covered above.<p>(F) IANAL. Seek competent, professional legal advice.
If it's a plugin that's distributed separately from the base application I suspect you would only have to release the source to the actual plugin.<p>Look at it this way: Photoshop is a proprietary application, but anyone can write a plugin. If someone wrote a Photoshop plugin using GPL'd software and distributed it independently, Adobe would not have to GPL all of Photoshop. They <i>would</i> have to release the source code to the plugin, of course.<p>That said, if the only reason the piece of software is written as a plugin is to circumvent the GPL, you'll piss off a lot of people. (e.x. the Acquisition LimeWire client for OS X)
If you started from GPL code, what you produce is a derivative work and must always stay GPL. It does not matter how much you simplify, change, fix, improve, or extend: if you start from GPL you have to stay GPL.
<shameless blog plug>
"So is it fair that the GPL doesn't give back to the proving ground of new ideas, the commercial world?" <a href="http://moviestorm.blogspot.com/2008/01/gpl-vs-startups.html" rel="nofollow">http://moviestorm.blogspot.com/2008/01/gpl-vs-startups.html</a>
My guess is no. But on the flip side I've never heard of a legal case involving open source code outside the SCO lawsuit and that was more like extortion.<p>Personally, I've always stuck to using LGPL, MIT, or BSD licensed code in closed source products.
not a lawyer... not legal advice.<p>The first is (I think).<p>However if you want to share any GPL-ed Code it must be released as GPL. GPL is viral like that.
if you can separate your code from the GPL in such a way that the GPL version becomes only a lib (unmodified), then you can close or do any licensing you like.<p>for example.<p>package com.mycompany.lib<p>import org.someGPL.lib.A;<p>myClass B extends A {}<p>In this case you simply include the GPL lib as GPL and your Lib as any type of license<p>in your class B you can override functions you don't like and add more of your own functions.<p>Finally when you release your code you have to say that this code uses the following GPL code...
Contrary to the replies in this thread, I'm pretty sure you can put "All modifications are dual-licensed under the GPL and MIT license" on your own original code and people can take and reuse the MIT licensed parts under that license - you can't relicense the already-GPLed parts though.