10

I want to create a dynamically loadable module (.dll or .so) for a closed source program, but I would like to make the source code of this module available, and I'd like it to be (A)GPL licensed, so others could use my module, but I also want to make sure their code would also be open sourced.

My questions are:

  • Since the whole project would be one executable at the end would the closed source program count as "derivative work", thereby it would need to be GPL as well?
  • If yes, can I add some kind of additional permission to the GPL licence of my code to explicitly allow this linkage to occur, so it could actually be distributed with the app?
  • If yes, where and how should I put these additional permissions in the licence file?
  • Would this modified licence still be GPL (compatible)? What kind of open source code could I use within my module?
  • If the resulting licence would not be GPL compatible are there any other licences that are better sutied for this situation, but are still similar in essence to GPL (e.g. reusing the code is only possible in case it's source is also released)?
  • 1
    Are you the author of both the module and the larger closed-source program? – apsillers Jun 24 '15 at 17:55
  • @apsillers if you mean whether it's possible to get the larger program to be open sourced: no, it has it's own closed licence. – SztupY Jun 24 '15 at 18:06
  • Some examples I can think of includes: a compiled extension for Internet Explorer or a plugin for Total Commander – SztupY Jun 24 '15 at 18:08
  • 2
  • @SztupY I think apsillers wants to know because if you're the author, you can do as you like. The license doesn't apply to the copyright owner. – ArtOfCode Jun 24 '15 at 20:44
4

Since the whole project would be one executable at the end would the closed source program count as "derivative work", thereby it would need to be GPL as well?

The basic understanding of the GPL and it's intention saying: yes, the program must be GPL too, as through the linking you create a derivative work. That is the position of the FSF. But it is not shared by everyone. Some interpretations say, only static linking make it a derived work, not dynamic linking (which it would be, you saying it is a DLL). There are even angles, that differ even more. Lawrence Rosen (from the OSI) says:

The primary indication of whether a new program is a derivative work is whether the source code of the original program was used [in a copy-paste sense], modified, translated or otherwise changed in any way to create the new program. If not, then I would argue that it is not a derivative work

So, there are different interpretations. As far as I know this dispute wasn't put to test in the courts yet. The GPL was enforced multiple times in courts, but as far as I know it was always about violations in using the GPL-program, not because of linking.

If yes, can I add some kind of additional permission to the GPL licence of my code to explicitly allow this linkage to occur, so it could actually be distributed with the app?

Yes. Many projects use a linking exception to the GPL.

If yes, where and how should I put these additional permissions in the licence file?

I found no clear guidance of this, but in my understanding it must be clear that an exception is applied and which part is the original GPL. So I would have the copyright statement saying it is GPL with your exception and put both in the license file, but with clear distinction (new header or so).

Would this modified licence still be GPL (compatible)? What kind of open source code could I use within my module?

As far as I understand, the code of your module can be used in other GPL-projects, but different GPL-code cannot be used in your module without the author consenting to your exception. Other than that, more permissive licenses still should work, as long as they are conforming with the terms of the GPL and your exception.

If the resulting licence would not be GPL compatible are there any other licences that are better sutied for this situation, but are still similar in essence to GPL (e.g. reusing the code is only possible in case it's source is also released)?

The LGPL doesn't count linking as creating a derived work, but still applies copyleft to the code of your module. That would imply your module can be linked to different programs without making them Open Source, but modifying your module still demands making that changes LGPL.

  • 2
    Note that to use a dynamically linked library from C, you'll usually have to include headers provided as part of the library. This makes your compiled binary a derivative work of the headers, even if it's not a derived work of the library's binary by Lawrence Rosen's criteria. – Ben Aug 24 '15 at 3:07
6

If you're the owner of both sets of code, you can do as you wish with it.

That includes licensing the code to others as you wish, meaning you can license the module and not the program itself. You have all the rights relating to the code; the purpose of a license is to grant others some of those rights, according to specific conditions.

You can use this fact to add a GPL license to the module and not the program. You should not need to grant extra permissions, since the DLL is a separate entity. Even if you want to incorporate the code into the executable, you can apply a "visible source" principle and only release some of the code under GPL.

  • 1
    'you're the energy'? – Mnementh Jun 26 '15 at 10:29
  • 1
    @Mnementh I blame autocorrect. – ArtOfCode Jun 26 '15 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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