1

My project is licensed under GPLv3. However, I want some files to be dual licensed under GPL and Apache License 2.0.

What to write:

a. in the header comment of the file licensed under Apache License 2.0?

b. in the files (such as LICENSE) in the package source root directory?

  • What conditions determine which license is in effect? Who decides which license is enforced when the files are copied to another project? – sambler Nov 23 '17 at 0:31
  • 1
    @sambler Every user using this file decides which of two (or both) licenses he wants to use. The file can be copies into any either GPLv3 or AL2.0 project – porton Nov 23 '17 at 4:02
  • If your work is under GPL then it can be copied into a GPL project but not an Apache project, if your work is under Apache then it can be copied into an Apache or GPL project, your project doesn't have to apply both licenses to the same work. if it uses the less restrictive license then more people can use it. – sambler Nov 23 '17 at 22:46
2

You don't have to use the same license for every file in your project, but I would recommend not using two open licenses for the same file as it will only add confusion. That confusion will only prevent your code being used by others and be a place of contention with any legal proceedings related to the files in question.

If you want to keep your project as a GPL project but want a portion to be more freely available then you can make that portion available under the Apache license. The project as a whole will still be covered by the GPL but the portion of it covered by the Apache license can be extracted and used by another project. You can find a precedence of this in the blender project, where the code used for the cycles render engine was re-released under the Apache license while the project as a whole remains under the GPL.

For the files you want covered by the Apache license, you just need to have the Apache header info instead of the GPL header. Leave the projects COPYING/LICENSE file containing the GPL text.

You will find many large GPL projects contain files that have other licenses, often these are files extracted from other projects. Again the blender project can be an example of multiple licenses affecting different parts of a project, using it as an example, the extra license files are contained in the source tree and copied as part of the installation process.

Also note, that if you have any other contributors to the files in question, you will need to get their approval for the license change.

  • I want to specify for some source files explicitly that they are of both GPL and Apache license. I am also afraid to put LICENSE.Apache in the root of the project as this may create false impression that every file of the project is dual licensed. So, how to specify for a small subset of source files that they are licensed not only GPL but also AL? I want to be explicit about having both licenses. – porton Nov 30 '17 at 20:16

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.