18

Suppose that I distribute my own code with a GPL license, even though the code use just external MIT or Apache code. In particular, no preexisting GPL code is in it.

Can I later relicense it under MIT or Apache?

curiousdannii
  • 7,768
  • 1
  • 27
  • 51
Rexcirus
  • 307
  • 2
  • 7

2 Answers2

24

As the copyright holder you are in no way bound by any open source license you choose to distribute your own work under.

While you cannot retroactively change the license terms of a particular distribution of your software for those who have already obtained it, you can permit use and re-distribution under the terms of a more permissive license of any distribution of your software however and whenever you like.

Mans Gunnarsson
  • 2,426
  • 10
  • 19
  • 3
    The last paragraph is not quite true. For example, the GPL specifically states (section 10 of version 2) that recipients of the code automatically receive GPL licenses from the original licensor by the operation of the license itself. So you can add another license, but you can't stop people who receive the code (whether from you or from someone else) from receiving a GPL license from you. You can add another license if you want, but everyone you give the code to will also receive a GPL license. – David Schwartz Oct 25 '18 at 21:49
  • 1
    @DavidSchwartz That would be a license for the old version, wouldn't it? And only if they get the old version from someone who's received it under the GPL. – user253751 Oct 26 '18 at 00:11
  • 2
    @immibis That would be a license for the old version, yes (including any elements in the new version also in the old version). But it would not matter who they got it from or how they got it. The GPL would be a lot less useful if you had to prove aspects of how you got the work in order to take advantage of it and the GPL specifically has a clause to avoid this (the "recipient automatically receives a license from the original licensor" clause). When you place a work under the GPL, you are agreeing to give everyone who receives the work lawfully a license, forever. – David Schwartz Oct 26 '18 at 00:39
  • 2
    Which is why the last paragraph says you cannot retroactively change its license terms. – user253751 Oct 26 '18 at 00:54
  • 2
    @David I find "you can't stop people who receive the code (whether from you or from someone else) from receiving a GPL license from you" to be very suspect (though I realize these are comments, not full answers). If I give exactly one copy of new software to MegaCorp under the GPL and MegaCorp never gives it to anyone else (they have some business interest in withholding it), no one else gets a GPL grant from me if I later distribute the software to the public under a different license, right? (Or are you in fact claiming otherwise, or else have I misunderstood you entirely?) – apsillers Oct 26 '18 at 01:36
  • @apsillers I am claiming otherwise. By offering a work under the GPL to one person, you are agreeing that anyone who ever lawfully receives the work also receives a GPL license from you. That's what the GPL says, it's enforceable in the US, and it makes sense. It would be very annoying if you had to worry that you received a work from the wrong person and thus didn't have the license everyone else has. – David Schwartz Oct 26 '18 at 01:43
  • @apsillers Imagine if this were not so. You get a copy of Linux on a CD with a magazine. Do you have a GPL license to it? To know, you'd have to track the provenance of every element in the kernel covered by the GPL and track it from the author to your copy to ensure that nobody in those paths got the code subject to some other license. That would be absurdly impractical and annoying, so the GPL says that the license is automatic from the author to every lawful recipient. (This is also about the only way it can work under US law, but that takes more space to explain.) – David Schwartz Oct 26 '18 at 03:05
  • It might be clearer in the last paragraph to say "you can change the license of any future version however and whenever you like." If the version under the new license is actually not trivially different from the GPL version that you previously released, then your new version could no longer be redistributed by others under the GPL, although the old version probably still could be because it is already "out in the wild". – Brandin Oct 26 '18 at 05:01
  • 2
    @DavidSchwartz, even if you are correct (and I think you probably are) you can wake up one day and decide that from today, anybody who obtains your work from you is allowed to use and re-distribute it under the Apache terms instead of the GPL terms. That's the question I was answering. – Mans Gunnarsson Oct 26 '18 at 06:41
  • The way I read the question, it's not at all about the rights of those who have already obtained the software under the GPL but rather entirely about the rights and obligations of the copyright holder. You can't do anything about software already out in the wild, and recipients of your software might always have the right to use it under the GPL terms regardless of where they got it from, but nothing is preventing you from making distributions of the exact same software version with a different license. – Mans Gunnarsson Oct 26 '18 at 06:55
  • @MansGunnarsson Except you can't re-distribute under "the Apache terms instead of the GPL terms". You can re-distribute it under the Apache terms in addition to the GPL terms. Once you license something under the GPL, you have committed to automatically granting a GPL license to everyone who lawfully receives the work. You don't have to inform people that they have a GPL license from you, but they do. And they don't have to prove they received the work any particular way (other than lawfully, of course) to have a license. – David Schwartz Oct 26 '18 at 15:24
  • @DavidSchwartz Granting a license and distributing the software are two different things. While a user could possibly decide that they can use your software under the GPL terms as well as whatever you have decided to switch to, you don't even have to mention the GPL in your distribution any longer. That's what I mean by switch, and I think that's what the question was about. – Mans Gunnarsson Oct 26 '18 at 15:30
  • @MansGunnarsson My original point (we've drifted in the comments) was simply that this statement is misleading, "you can change the license of any future distribution however and whenever you like". It could make someone think (and this is a very popular GPL misconception) that some recipients of the same work might have a GPL license and some might not. (And, arguably, other statements in the answer are misleading too. Consider a work formerly with no license but now placed under the GPL. That does change the license of prior distributions.) – David Schwartz Oct 26 '18 at 15:32
  • 1
    @DavidSchwartz I tried to make the answer less ambiguous without complicating it, please have a look – Mans Gunnarsson Oct 26 '18 at 15:57
14

If you hold the copyright to some code (usually, because you are the author), you may license that code however you please, and you may issue different licenses at any time. The matter of revoking previously-issued licenses is much trickier and may not be possible. If you have previously issued permission to modify/distribute your code under some version of the GNU GPL, nothing stops you from also issuing permission to modify/distribute the code under a different license like the Apache License.

Note that if you have accepted contributions from any other person, those contributions may be under your original license, licensed to you by that other contributor. You may not re-license another person's code, unless they allow you do so, either by your asking nicely or via a previous agreement like a Contributor License Agreement.

In practice, your code is usually as permissively available as your most permissive license grant. If you had the reverse situation -- your code was under Apache and you want to re-license it under the GPL -- you could issue a GPL grant, but you could not take away the more permissive license grant you already made to any recipients who already downloaded it. People might be more likely to get the permissively-licensed version from someone else than use your more restrictively-licensed version. However, you could issue new code under the GPL only, making users choose between the old permissively-licensed code and the newer version with copyleft-licensed code.

apsillers
  • 35,995
  • 4
  • 94
  • 131