3

As the author of a codebase, I understand that I have the right to decide how to license my code.

If I write a library of code and release it under the pure GPL, that means that anyone else using my library of code must release their entire project under the GPL (the LGPL would prevent that requirement, but for this argument I'm using the normal GPL).

What if I then use that same library of code in a closed-source, proprietary program that I am selling commercially? Naturally, I would not include any mention of the fact that the code is otherwise released under the GPL.

Naturally, for anyone else, doing that would be against the GPL, but since it's my code, can I legally do it? My immediate assumption would be yes, since it's my own code, but would like to hear if there's any comments on that scenario.

A similar example that I believe I've actually seen done in practice is "community vs. commercial" versions of the same program, with the community version being released as open source and the commercial version being proprietary. However I can't immediately say I've seen this in a situation where the community version is GPL licensed. (It's usually MIT or something similar, which already permits use in closed-source proprietary software.)

3
  • 3
    If you are the only relevant copyright holder then yes you can use your code for both a GPL release and as part of your proprietary project. However, if anyone else contributes to your GPL release and you accept their additions with GPL duties on them, then you mustn't use any of this combined code in a proprietary application. This can be worked around by requiring copyright assignment to you, which allows you to wield sole copyright over things you didn't write yourself.
    – ecm
    May 3 at 22:55
  • Can a GPL project actually require contributions to have their copyright assigned to you? I suppose you could require that anyone who doesn't want to assign copyright of contributions to you must fork the project (can you legally make it part of the pull-request process, e.g. "by submitting a pull request you hereby transfer all rights to the code to the copyright holder", and then you would have no rights to use the forked versions in your proprietary project?
    – fdmillion
    May 4 at 3:16
  • 1
    @ecm please write that as an answer.comments are meant to seek clarification May 4 at 4:18

1 Answer 1

4

If you are the only relevant copyright holder then yes you can use your code for both a GPL release and as part of your proprietary project. However, if anyone else contributes to your GPL release and you accept their additions with GPL duties on them, then you mustn't use any of this combined code in a proprietary application.

This can be worked around by requiring copyright assignment to you, which allows you to wield sole copyright over things you didn't write yourself. Such assignment is considered a more severe undertaking than simply releasing code under some particular usage conditions. For example, the FSF does ask for copyright assignment for some of its GNU projects, and they have some forms prepared which you and your employer are supposed to print out, sign, and send them by post. Here's an example of such forms.

Can a GPL project actually require contributions to have their copyright assigned to you? I suppose you could require that anyone who doesn't want to assign copyright of contributions to you must fork the project

Yes and yes. You are not required to accept any contributions if you don't like or don't want them, whatever the reason. And yes, people can fork your GPL releases.

(can you legally make it part of the pull-request process, e.g. "by submitting a pull request you hereby transfer all rights to the code to the copyright holder",

Agreeing to release something under the license already used by the project, especially if it is a copyleft license, is a much less severe action than assigning copyright. You probably would want something in writing at least, that specifically lists the assignment.

Alternatively you can ask contributors to license their additions to you under more permissive usage conditions or even to release them to the public domain. Such contributions could be included in your proprietary release too (honoring all the attribution requirements).

and then you would have no rights to use the forked versions in your proprietary project?

If the additions in a fork are available to you only under the GPL then, yes, you are not allowed to use them in your proprietary project.

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