35

I am considering the creation of a fork to a small project licensed under GPLv2, and I have some very specific questions I did not manage to answer in my research on various sites and forums.

When I fork the code, I am forced to release the new project under the same license (GPL) as I will do, but could I also decide to release it under a dual license, one of them commercial?

When forking the project, do I automatically own the copyright of the whole thing? This is relevant when, for example, deciding a future change in the license, or to be able to enforce the GPL license to a 3rd party

Visiedo
  • 459
  • 1
  • 4
  • 5
  • 11
    if this were possible, anyone could simply fork a GPL project and get the same software with a brand new license effectively removing any GPL-related limitations and nullify the GPL license with one simple move. – user2485710 Mar 29 '14 at 12:48
  • The GPL does allow commercial use! – feklee Aug 27 '18 at 09:16

3 Answers3

75

The short answer: When you fork an existing project, you generally do not have permission to change the license nor do you get copyright on the code you copied over.

You do have the copyright on any (nontrivial) modifications or additions that you make.


The long answer:

The only ways to get copyright on a piece of code is by writing it yourself or by contractually getting the copyright assigned to you. This means that forking an existing project doesn't change the copyrights on the code of either the original project or the fork.

The only people who can change a copyright license are the holders of that copyright. If there are multiple copyright holders to the code of a project, then all copyright holders must agree to a change in the copyright license. This means that you don't have permission to change the license of your fork (not even to dual license it), unless the existing copyright license explicitly gives you the right to sublicense the code.

Bart van Ingen Schenau
  • 71,712
  • 20
  • 110
  • 179
  • 2
    Good explanation of the copyright issues. – Rory Hunter Mar 28 '14 at 09:25
  • How about just the changes I make? If I fork a GPL project and make some changes, can I make _my changes_ specifically AGPL? – Sled Mar 28 '14 at 15:29
  • @ArtB You may not, unless your "changes" involve adding separate modular components that interact with, but are not part of, the GPL code. This is how, for instance, Apple is able to avoid licensing OS X under the GPL or BSD licenses, since it only includes GNU and BSD software as part of the entire software package instead of using said software in order to function. – 2rs2ts Mar 28 '14 at 15:50
  • 2
    @ArtB, not sure about GPL -> AGPL, but the LGPL specifically allows you to release a modified version under GPL ([see article 2](https://www.gnu.org/licenses/lgpl.html)). What you're allowed to do really depends on what the initial licence is. – Bruno Mar 28 '14 at 16:28
  • 3
    @2rs2ts not sure what you say is true (see [section 13](http://www.gnu.org/licenses/gpl.html) of the GPLv3... of course it depends if we're talking GPLv2 or GPLv3). In addition, your changes are generally always yours. If you add a magic widget to GPL project A, you may indeed have to redistribute the lot under GPL, but if you add the same magic widget to BSD project B, you could re-licence *your stuff* (and not stuff from project A) any way you'd like (compatible with project B's licence). (As always, get legal advice if you want to be sure. This is not it.) – Bruno Mar 28 '14 at 16:35
  • @Bruno Maybe. It depends on if you are modifying the original program or if you are writing a program that interacts with it, I suppose what I said about using it in order to function is not necessarily correct even for the GPL, which is relatively aggressive as far as "free" licenses go. You aren't required to release Makefiles that invoke `gcc` under the GPL, for instance... – 2rs2ts Mar 28 '14 at 17:26
  • 1
    Keep in mind that AFAIK (but IANAL) _your_ code is yours no matter what, i.e. you could release a patch under any license you like, regardless of the license of the target project. – o0'. Mar 28 '14 at 23:38
  • 4
    @Lohoris: You are right that you could release patches you write with whatever license you want. But if careless selection of that license can make the patched code non-distributable because it would be impossible to meet all license requirements. – Bart van Ingen Schenau Mar 29 '14 at 08:10
  • @BartvanIngenSchenau sure, but sometimes workarounds can be built, such as a program which downloads both the original and the patch, and applies the patch. Obviously not practical and annoying to use, but in rare occasions it could make sense. – o0'. Mar 29 '14 at 10:06
  • 1
    @Lohoris what if you release a modified version (not a separated patch) of a GLP software and say that the modifications have commercial license? (and refuse to release the modified version source code) It seems that GNU tries to block you from doing this, but some companies does (e.g. Android with Linux Kernel code), I really don't get it. – random_user Mar 29 '14 at 21:30
  • 1
    @random_user If you see someone doing that, please inform the copyright owner of the GPL software (and maybe CC the FSF). The way I understand the GPL, by doing so, the company forfeited their license to use the software at all – though the usual and practical reaction seems to be to reinstantiate the license once the violation is dealt with. – Christopher Creutzig Mar 29 '14 at 22:26
  • @random_user obviously you can't do it, it's the whole point of the GPL. – o0'. Mar 29 '14 at 23:30
24

Your forked project is a derivative of the original project's code. In other words, your project is using the original project, and thus you are bound by its license. If this were not true, a license would have no point at all.

So, no, you can't release code under a proprietary license if it is derived from code that doesn't allow that.

bignose
  • 191
  • 9
  • Bart's answer implies stricter conditions than yours on licensing requirements of forked code - which one is accurate in the general case? – Thomas Mar 28 '14 at 14:19
  • Your answer makes a forked project derived work, which makes it possible to relicense if the original code was under a license which allows relicensing derived works. Bart's answer says you can **never** relicense forked code unless you acquire copyright, no matter what the original license says. Are these equivalent? – Thomas Mar 28 '14 at 14:25
  • 4
    @Thomas Dan's are correct, if the original license allows for relicensing then you can relicense the new project. I am not convinced that Bart's answer states what you interpret it to. OP talks about code licensed under GPL so the two are equivalent in this case. – Taemyr Mar 28 '14 at 14:30
  • 5
    @Thomas, I don't think there is a conflict there. The point of both of our answers is that you *continue to be bound by the license of the code you forked from*. However, you can do whatever that code's license permits you to do. Bart notes that, if the original work's license gives you permission, you can issue your work under another license. –  Mar 28 '14 at 14:30
  • @Taemyr Yes, I guess I was confused as to whether Bart's answer applied to all licenses (as the writing suggests) or only to GPL (as this question suggests). – Thomas Mar 28 '14 at 14:33
  • I appreciate poiting out that **of course** you are bound to the license, otherwise there would be no point in having a license in the first place. This is a very bad question because of that. – o0'. Mar 28 '14 at 23:39
  • I’d like to add that just forking does not create a “derivative work” as the term is used in copyright law. You have to do something with/to the code that is in itself creative enough to be considered worth protecting. Not that the bar is all that high for software. – Christopher Creutzig Mar 29 '14 at 22:30
17

Forget about the GPL for a moment, and look at copyright. When you fork a project, all code that was present in the original project is copyright of whoever wrote that code in the original project. All code that you write afterwards is your copyright. So unless you re-write all the code from the original project, that code isn't yours and you have no legal rights.

Next you look at the GPL license, and check what rights it gives you beyond the rights of copyright law. It allows you to create derivative works which makes the whole forking business legal in the first place - with plain copyright law, you wouldn't be allowed to create a derivative work. Next, it allows you to use the code as long as you don't distribute it. So as long as nobody else can lay their hands on the forked code, GPL allows you to do what you want with it.

However, if you distribute the forked code, including someone else's copyrighted code, you only have the permission of the copyright holder if you follow their rules. One rule is that you must license the whole code under the GPL (including your own). Another rule is that you must give the source code to others; check the GPL for details.

Changing the license would be difficult, as long as any of the original code is still there. You cannot license your code in a way that prevents the next guy from using the code in the way that GPL allowed, you also can't allow them to do things with the code that GPL doesn't allow.

gnasher729
  • 42,090
  • 4
  • 59
  • 119
  • 1
    I generally agree with you answer, but I think you might want to rephrase this sentence: "with plain copyright law, you wouldn't be allowed to create a derivative work." As a generally rule, it's probably enough to pretend that is accurate, but there are exceptions. (Lapsed copyrights, parody, etc) Though, I admit that most are not applicable to the GPL. – Patrick M Mar 29 '14 at 05:55