
GPL'd Source Code - ykristiawan
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?
======
gojomo
_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?

Secondly, I want to release the new source code as MIT license, is that
allowed?_

Your work is a derivative work of the original copyrighted source code.

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.

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).

(I am not a lawyer but this is pretty basic GPL interpretation.)

 _Edit: to clarify private use vs. 'distribution' distinction._

------
SwellJoe
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.

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.

------
mdasen
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.

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.

2\. You cannot relicense code under different licenses unless the license
explicitly says that you can. The GPL doesn't have such a provision.

------
ykristiawan
The second question should be clear, now: I should release the new source code
(the plugin, not the closed source) as GPL.

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?

~~~
dgl
Yes, the GPL requires the complete program to be available under the GPL (with
explicit exceptions for system libraries).

For example this is the case with MySQL, where the client library is licensed
under the GPL, therefore any client program linking to it has to be GPL
(unless you pay for a commercial license).

------
johnm
(A) Definitely read the GPL itself.

(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.

(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.

(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.

(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.

(F) IANAL. Seek competent, professional legal advice.

------
tlrobinson
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.

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 _would_ have to release the source code to the plugin, of course.

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)

~~~
cstejerean
If Adobe distributes Photoshop and the plugin together they will likely be
violating the GPL (see the GPL FAQ). I think it's only OK to use GPL plugins
in non-GPL software if the GPL plugins are distributed separately by a third
party (but then again I'm not a laywer).

~~~
tlrobinson
"plugin that's distributed separately"

"distributed it independently"

------
Harkins
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.

~~~
yawl
Right. There is no way you can relicense it. The derived code is still GPL.

------
twak
<shameless blog plug> "So is it fair that the GPL doesn't give back to the
proving ground of new ideas, the commercial world?"
<http://moviestorm.blogspot.com/2008/01/gpl-vs-startups.html>

------
angstrom
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.

Personally, I've always stuck to using LGPL, MIT, or BSD licensed code in
closed source products.

~~~
cstejerean
see <http://www.linux-watch.com/news/NS3973290690.html>

usually the FSF will send notices to people or companies violating the GPL, a
lawsuit is the last option.

------
xenoterracide
not a lawyer... not legal advice.

The first is (I think).

However if you want to share any GPL-ed Code it must be released as GPL. GPL
is viral like that.

~~~
Herring
GPL isn't any more viral than ordinary copyright. You can never distribute
copyrighted material except under terms that the author grants.

It's like saying the windows license (no unauthorized distribution) is viral
because if you got the windows source code & used bits in your program you
wouldn't be able to distribute the program at all without getting sued to
hell. Did the windows license spread to your program?

~~~
xenoterracide
yes, but it is more viral than an MIT or BSD license.

------
ubudesign
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.

for example.

package com.mycompany.lib

import org.someGPL.lib.A;

myClass B extends A {}

In this case you simply include the GPL lib as GPL and your Lib as any type of
license

in your class B you can override functions you don't like and add more of your
own functions.

Finally when you release your code you have to say that this code uses the
following GPL code...

~~~
dhouston
this is just wrong; if you're talking about LGPL code (not GPL), this is
correct

------
halo
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.

