Can I Re-license a Library Released Under GPL2 to MIT for My Project?
Interoperability of open source software and licenses can sometimes present challenges, especially when trying to re-license a specific piece of software to a more permissive one, like the MIT License. This article delves into the legal implications and provides insights based on general understanding and expert advice.
Understanding the GPL2 License
The GNU General Public License (GPL), specifically version 2 (GPL2), is a widely used open source license that requires any work derived from the licensed code to also be released under the GPL. This is often referred to as copyleft. The core principle of the GPL is to ensure that software remains free and open to modification and distribution. This makes compatibility with other open source licenses a topic of frequent debate.
Can You Re-license a GPL2 Library to MIT?
Re-licensing a library developed under the GPL2 to the MIT License, especially for use in your own project, can be tricky. Generally, you have two options:
Obtain Copyright Ownership: If you own the copyright to the code you want to re-license, you can freely re-license it. However, this is not a common scenario. Get Permission from Current Copyright Holders: More commonly, you need to seek permission from the individuals or entities who hold the copyright to the original GPL2 code. Without their explicit permission, you cannot legally change the license.If you are unable to re-license the library, or if you have the necessary permissions, the library remains bound by the GPL2 terms. This means your project incorporating the library would also have to be released under the GPL2 unless you can create a separate, derivative work that meets the requirements as described below.
Derivative Works and Licensing
A derivative work, in legal terms, includes any new code or modifications made to an existing work. Any code you write based on the GPL2 library and your modifications must also be under the GPL2 license. Simply renaming or re-distributing the library under a different license is not enough; it is still considered a derivative work of the original GPL2 code.
Creating a Separate Project
To achieve a more permissive license for your project, a viable approach is to create a separate project that is based on the functionality of the GPL2 library but does not include the original GPL2 code. This separate project, containing only your own derived work, can be released under the MIT license. However, the original GPL2 library itself cannot be re-licensed in this way.
To illustrate, if you are developing a new library that requires the functionalities provided by the GPL2 library, you can write additional tests or complementary code that uses the GPL2 library (but does not include it directly). These tests or additional code can then be released under the MIT license. The core module that is derived from the GPL2 code would remain under the GPL2.
Practical Example
Suppose you are developing a testing framework for your project, and it depends on HBUnit (a GPL2 library). You can write tests for your testing framework under the MIT license, but you cannot re-license HBUnit itself. Your framework, including the tests, can be released under the MIT, but HBUnit must remain under the GPL2. This way, you can leverage the functionalities of HBUnit while achieving a more permissive license for your own development.
Conclusion
The re-licensing of a library from GPL2 to MIT is a complex issue that requires careful consideration and often explicit permission from the original copyright holders. While separation of core functionality and tests can be a solution, it is essential to adhere to the legal requirements of each license to avoid potential legal issues and to ensure the integrity and compliance of your projects.