3

I am using the GPLv3 license for a tool that embeds files into source code. However as part of it's operation it copies a portion of it's own source into projects that use it (as a library to allow files to be read). I don't want this file, nor the files generated by the execution of the program to be licensed under the GPL.

I am using the standard GPLv3 header in all my files:

// <one line to give the program's name and a brief idea of what it does.>
// Copyright (C) <year>  <name of author>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

However I am not sure what to do about the file that gets copied in, nor the files generated by the program as it runs - is there a specific header I should use, or should I merely have a small header indicating that it was generated by my program and is exempt from the licensing my program is under?

I have currently just used the existing GPLv3 header in my files, with a small addition to indicate the different licensing:

// As an exception, you may distribute programs that contain code generated
// with or copied into by this program under terms of your choice.
2

There are a few options you can use for code of your program that gets copied into the output:

  1. You can license that code under a different, GPL-compatible, license. This would then typically be a more permissive license and it would allow using that code also in a closed-source competitor application.

    If you choose this, you need to mark clearly in your source code which portions of the code are differently licensed and which license applies to them. The license information should also be copied into the output.

  2. You can take the route that GNU Bison uses: Give an additional permission on top of the GPL to use the output under terms of the user's choice.

    If you use this option, you should make sure the special permission is present in the output you generate. It might be useful to mention it also in the documentation.

    As an example, GNU Bison uses this special permission

    As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception.

    This special exception was added by the Free Software Foundation in version 2.2 of Bison.

    Note that the exception explicitly excludes competitor products from being exempted from the GPL license.

  • Thank you for clearing this up! For those reading this answer later on - I went with the second option. – JordanOcokoljic Apr 19 '20 at 22:59

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.