views:

178

answers:

1

I don't know much about the full GPL license other than that it's very restrictive to anyone wanting to use GPL anywhere near closed-source code. How does Apache 2.0 license compare with GPL and other license like LGPL, MIT, etc?

A: 

The Apache license is quite like the BSD license in its scope. It's pretty free and easy, you're not required to distribute the source code of a covered work, and you don't have to worry about it "infecting" a derived work; you just need to be sure to include their license.


The (full) GPL is often misunderstood; I've come across many misinterpretations of it. To properly understand it, you really have to read it and think about it (it's not all that long), but a couple of salient points:

  • If you link your code with GPL code, your code (in most if not all circumstances) is considered by copyright law to become a derivative work of that code. When that is the case, the GPL "infects" your code: if you ever want to distribute such a combined work, you must do so under the GPL or GPL-compatible licensing terms.
  • Distributing a work under the GPL has some quite specific rules associated with it. If you distribute GPL binaries, you must either distribute the source code along with them or allow the source code to be downloaded at the same time. Now, there's nothing stopping you from licensing your contribution under some other GPL-compatible license, but the combined (binary) work is considered to be covered by the GPL.
  • If you create a combined work out of separate parts with licenses which are incompatible with each other, you cannot legally distribute the combined work at all. (However, with care you can probably still distribute the disparate sources and have your users combine it themselves.)
  • You can charge money for distributing GPL-licensed code. There's nothing in the license that prevents this. However, what you can't do is prevent anybody from redistributing it. The net effect of this is that if you want to use GPL-licensed code in a commercial product, you have to be very careful how you do it; you can't keep your source code private, and you can't prevent the person who you charged money for a copy of your software from giving away further copies for free. (Of course, you can charge for support, and this is a feature of many business models in the free software world.)
  • If you never distribute your combined work - say you want to create an internal application for use only within your company - that's no problem, your company isn't distributing the work and so there is no problem combining code with incompatible licenses or whose source must be kept confidential.
  • There are other clauses covering automatic patent rights and tivoization.

For further reading you might want to read up on:

  • GPL library exception
  • How the LGPL differs from the GPL
crazyscot
The GNU page says GPL is compatible with Apache2.0... how can that be if Apache doesn't require source distribution?
John
It's all about conflict (or rather, not conflicting). A combined binary work which was "infected" by the GPL would require you to distribute the source. The APL doesn't require you to distribute the source to a binary work, but it doesn't prohibit you from doing so either... Now consider a combination of GPL+proprietary: you can't distribute the source to the proprietary part, so you couldn't distribute the source to the whole combined work, so you couldn't distribute the combined work at all.
crazyscot