0

This question already has an answer here:

I am going to continue a game engine project I didn't engage in for a long time.I amatourly writed some core libraries using OpenGL with C++. Because I am not that into programming in general, I am asking this silly question about software licensing. If I want to license my program ,for example, with zlib, is it enough just to include the formal manifesto(full text of the license) in source code itself or add it as a seperate text file on root folder and put on github? If no, should I additionally apply to any formal foundation etc.?

Edit : I have tried to make the question as clear as possible. If the question is still not clear or any grammatical mistake exists, warn me.

marked as duplicate by gnat, user53019, Bart van Ingen Schenau, user40980, Kilian Foth Feb 6 '15 at 12:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • On github you'll better have a COPYING or LICENSE file, and add a comment in every source file. The GPL license has a strict requirement about that. I don't know about the Zlib license. BTW you might look at other github hosted projects with the same license. – Basile Starynkevitch Feb 4 '15 at 21:11
  • Then if GPL is the way to go, all I need to do is add an information file into root folder and comments in source files for licesing? – newbie_developer93 Feb 4 '15 at 21:17
  • I did not say that the GPL license is preferable (even if I like it a lot): the choice is entirely yours (if you own all of your software). I just say that the GPL requires every source file (e.g. in C++) to contain a comment about the license. And I understand that github wants the license to be clearly stated in a LICENSE or COPYING file. I am not a lawyer! – Basile Starynkevitch Feb 4 '15 at 21:18
  • 1
    see also: How to properly license open source software – gnat Feb 4 '15 at 22:20
1

I am not a lawyer. You should get one, if you are concerned about possible legal issues.


You have to include a copyright notice (a ‘manifesto’, if you will) to each file that contains your work.

That ‘manifesto’ shall consist of:

  • A line Copyright © <years> <owner>.

    Where <years> are years when this very file was created and substantially modified; you’ve said that you did not work on the project for a long time, so it might look like 2008, 2015 for example; do not use range (2008–2015) unless the file was modified every year.

    <owner> is who holds exclusive rights on this very file. The authors are owners if they did not transfer rights to someone else. An employee typically transfer his copyright on the work his paid for to an employer by terms of contract or (in many countries) by the law. So if you was working on the project during your work hours, you would better check that your employer does not claim copyright on it.

  • Either ⓐ the full text of a license in the case of short permissive licenses, e. g.: BSD licenses (2 clause, 3 clause), X11, Expat, zlib licenses; or ⓑ something that refers to the full text: Apache License v2 (see under APPENDIX), GNU licenses (see under ‘How to apply...’ in the GNU GPL) and other long and well-written free/libre licenses; also WTFPL :-), which is a sort of parody on complicated copyright licenses.

    When ⓑ you have to put the full legal text of a license in the file COPYING or LICENSE in the root of code repository usually; when ⓐ this in optional and does not make any sense from a legal point of view, but often considered a good habit since it helps to detect the license automatically, especially when a code hosting service does not have, like GitHub, a field for license in project properties.

You probably would also want to mention copyright terms briefly in README file.

I also have to note with regret, that many amateur free software developers neglects these legal technicalities, please do not take them as an example.

  • Thanks for the answer. What I am trying to ask is : is it ok to add necessary information file also including copyright notice, to edit source files to include needed comments and put on ,for example, github. Will time stamp of github be enough to prove that it belongs to original author of the source code when necessary later? Do I need to do anything additionally? – newbie_developer93 Feb 4 '15 at 21:34
  • @newbie_developer93 Sorry, I could not understand the first sentence. As for whether it is enough, yes, the publication is the act of claiming copyright, and there is actually no much things else you could do. There are authorities in some countries that could deposit your ‘manuscript’ that you do not want to publish yet and then they can prove the date of creation in trials, but that does not make much sense if the work is published. – Dmitry Alexandrov Feb 4 '15 at 21:55
  • 1
    Factually incorrect; especially in light of the Berne Convention – user53019 Feb 5 '15 at 1:06
  • 1
    Votes are anonymous by design, and I have long since given up commenting on my voting behaviour. Look over the licensing tag and you'll find quite a few experts here on the site; many of them active down voters. Short version of my concerns: Your opening statement is factually incorrect. The points you then raise are based upon the incorrect statement and are also therefore incorrect. – user53019 Feb 5 '15 at 1:54
  • 2
    Thanks eveybody for all information up to this point. @GlenH7 can you say exactly which parts of Dmitry Alexandrov's opening statements are wrong and what you would conclude based on your preference of opening statements? – newbie_developer93 Feb 5 '15 at 9:31
1

The standard way to apply a license to a software is to put the full license text in a file called LICENSE or COPYING included with the source code and then put a short notice in a comment at the top of each source file (naming the copyright date, holder, license and saying where to find the full text of the license).

GPLv3 requires that if the program does terminal interaction, it also has to output a short notice like this when it starts in an interactive mode:

Copyright (C) <year> <name of author>

This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'show c' for details.

If the license you want to apply doesn't have specific instructions (e.g. zlib) OSI suggests to follow the Apache License / GPLv3 instructions.

According to Github a LICENSE file in the root of the repository is enough (see Where does the license live on my repository? and I already have a project with a license file, do I need to do anything?).

Further details:


This answer is for reference purposes only and it is not intended as nor does it constitute legal advice. The author is not an attorney and makes absolutely no claim to have any knowledge about legal matters beyond that of an informed layman.


  • 1
    According to Github a LICENSE file in the root of the repository is enough / Aha! That’s where this harmful belief is spread from. – Dmitry Alexandrov Feb 4 '15 at 22:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.