7

I am using a helpful project that is licensed under the LGPL3.

I have taken some of the useful code out of it and refactored it into a wrapper class and would like to add it to an upstream project.

As I understand it, my refactored code would count as a derivative work.

However, the upstream project is licensed under Apache 2.0.

Does the LGPL license from the original project mean that I can't contribute the refactored code to the upstream project?

1
  • 2
    Amon does an excellent job analysing the legalities of this. I would only add that the project may well have an opinion on whether they want non-Apache-licenced code to be part of their project, so I would also try to take their views on the subject before committing it. Some projects that use permissive free licences can get quite militant about having their code remain permissively-free in its entirety.
    – MadHatter
    Sep 13, 2019 at 6:20

1 Answer 1

8

Since your code is derived from the LGPLv3 code you are bound by that license – it is a copyleft license like the GPLv3, just with a linking exception. You do not have the right to license this code under the Apache 2 license.

While Apache 2 and LGPLv3 are compatible, license compatibility is a one-way street: you can include Apache 2 licensed code in a LGPLv3 project, but not LGPLv3 licensed code in a Apache 2 project.

But the LGPLv3 offers a linking exception: the license of linked code doesn't matter if the relevant LGPL terms are still complied with. For example, the Apache 2 licensed project could use your software as a dynamically linked library without any impact on licensing. However, when binaries of the Apache 2 licensed project are distributed it would have to be accompanied by the source code of your software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.