Karachi   ->   Sweden   ->   Karachi, again   ->   Dubai   ->   Bahrain   ->   Karachi, once more   ->   London and Leeds

Monday, January 03, 2005

GPL, LGPL and MPL

Perhaps the most important of the open source related licenses are GPL (GNU General Public License), LGPL (GNU Lesser General Public License) and MPL (Mozilla Public License). I'd try to give an overview of the licenses for a developer who wants to use some source code under one of these libraries but isn't sure what his obligations are.

GPL is viral in nature. All binaries must have the source code with them (or at least should point to some place from where the source code can be obtained). Source code under GPL can only be linked with other GPL code. For example, if you find an open source GPL image scaling library that you want to use in some proprietary application, you can't. Any modifications done to GPL code must also be GPLed, which means that you can't improve some code for binary redistribution only - you have to contribute back to the wide spread open source code pool.

LGPL isn't that viral. It allows you to link proprietary code with LGPLed code. That is, if the library mentioned in the last example was protected by LGPL, you could use it for your proprietary application. However, if you make modifications to the library itself, they must also have an LGPL license.

MPL is getting more common, in my opinion. It's the license for Mozilla source code. It's based on the concept that the source code is contained in files, which can either be covered or non-covered. The covered files need to remain under MPL and any modifications made to these files will remain MPL. On the other hand, the user contributed code can be put in non-covered files which need not be MPL based. Thus, in a way MPL is like LGPL. Yet, it's very controversial.

There are many other licenses out there (Apache License, BSD, Artistic License, etc.) And perhaps, it's extremely difficult to get a clear idea of the rights/ limits of the code itself (except for some really simple ones like BSD and Public Domain). You'll also find many contradictory statements on the web which adds more to the mayhem out there.

I believe that developers should be as much aware of the licensing requirements of the code they use as much they worry about the compatibility of the code with their own. Most of the GPL-incompatible licensing somehow show that the initial contributor, in one way or the other, puts some clause that will allow him to reap the benefits when the software is widely adopted.

An interesting rant about Open Source Licenses is available here.

No comments:

Post a Comment