3

Take for example the GPL-3.0 license.

Near the end it states:

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs
...

So I though that the "correct" way is to use the instructions there and use the small excerpt they provided:

<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 http://www.gnu.org/licenses/.

Replace <year> etc and paste those in a LICENSE file. (but not on top of each file or 80% of my code would be licensing stuff...)

When looking at famous projects however, they seem to have just put the entire license in there with the "HOW TO APPLY..." still added and without even replacing <year>, <name of author> etc.

So I'm starting to wonder: if I remove everything after END OF TERMS AND CONDITIONS or if I actually follow the instructions, is it still the same license...

3

No, the LICENSE file needs to contain the entire GPL. The excerpt provided goes in every single source code file; while you might or might not technically need it, it's best by far to put in every single file a) a copyright notice and b) a statement that the program is under the GPL. That isn't GPL-specific, it just adds significant legal clarity (it makes it explicit that each and every file is licensed under the GPL and puts everyone on notice that each and every file is copyrighted).

In the LICENSE file (where you have the actual terms and conditions), you cannot leave out any part of the GPL, including the "how to apply this to your own program." If you remove the "how to use this license," the result is no longer the GPL; you cannot integrate any code under the GPL with your project under the not-the-GPL (since you can only distribute code under the GPL if you include a full copy of the GPL). Also, the actual GPL is copyrighted and is licensed under restrictive terms allowing only verbatim copying, and you may be violating the copyright if you distribute a modified version.

Here's the correct way to apply the license:

  1. In every source code file, insert the following in a comment (fill in *program name* and *your name* and *years*):

    This file is part of *program name*.
    Copyright (C) *years* *your name*
    
    *program name* 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 <http://www.gnu.org/licenses/>.
    
  2. Put a file called LICENSING or COPYING or something like that in the root of the project folder. Put the entire GPL (here is the official text) in that file. The file must contain the verbatim GPL; do not change it in any way.

  • Is the same true for for example the MIT license: The MIT License (MIT) Copyright (c) <year> <copyright holders>? Do you actually have to keep the <year> there aswell? – Laoujin May 4 '15 at 23:06
  • @Laoujin I think you're still confused. There are two parts to applying the GPL. First, you want to post copyright notices and the like in every source code file in your program. In those notices, you do fill in the blanks. Then, you include the actual GPL alongside your program. The GPL's text you quoted isn't a copyright notice: it's a template for other people to use as copyright notices in their own code, and that is why you don't fill in the blanks. The MIT license doesn't have a template as part of the license; the GPL does. So, for the MIT license you always fill in the blanks. – cpast May 4 '15 at 23:27
3

If I remove everything after END OF TERMS AND CONDITIONS, is it still the same license?

No.

The complete text of the actual GNU GPL license can be found here:

http://www.gnu.org/licenses/gpl.txt

This is the "copy" that the "notice" refers to when it says:

You should have received a copy of the GNU General Public License along with this program.

As you can see, the license includes all three sections: the Preamble, the Terms and Conditions, and How to Apply These Terms to Your New Programs. It is exactly the same text that is included on the page you linked, excluding the website header and footer.

You should provide this copy, unaltered, in a file called LICENSE.TXT (by convention) at the root folder of your distribution, and then follow the "How to Apply These Terms" instructions for each of your source files.

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.