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

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.

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
  • 188
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
  • 49,096