-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPL foo in files #107
Comments
can you advise me on how to best comply? I am a coder not a lawyer .. |
I linked to the "How to Apply These Terms to Your New Programs" section of the GPLv3. |
Basically, add the header described in that section to the beginning of your individual source code files. |
As far as I know you are not forced to put it on every file - this is
just advised - I prefer not to have this ugly legal blurb next to my code ..
|
From GNU.org: Why should I put a license notice in each source file? (#NoticeInSourceFile) You should put a notice at the start of each source file, stating what license it carries, in order to avoid risk of the code's getting disconnected from its license. If your repository's README says that source file is under the GNU GPL, what happens if someone copies that file to another program? That other context may not show what the file's license is. It may appear to have some other license, or no license at all (which would make the code nonfree). Adding a copyright notice and a license notice at the start of each source file is easy and makes such confusion unlikely. This has nothing to do with the specifics of the GNU GPL. It is true for any free license. Is it enough just to put a copy of the GNU GPL in my repository? (#LicenseCopyOnly) Just putting a copy of the GNU GPL in a file in your repository does not explicitly state that the code in the same repository may be used under the GNU GPL. Without such a statement, it's not entirely clear that the permissions in the license really apply to any particular source file. An explicit statement saying that eliminates all doubt. A file containing just a license, without a statement that certain other files are covered by that license, resembles a file containing just a subroutine which is never called from anywhere else. The resemblance is not perfect: lawyers and courts might apply common sense and conclude that you must have put the copy of the GNU GPL there because you wanted to license the code that way. Or they might not. Why leave an uncertainty? This statement should be in each source file. A clear statement in the program's README file is legally sufficient as long as that accompanies the code, but it is easy for them to get separated. Why take a risk of uncertainty about your code's license? This has nothing to do with the specifics of the GNU GPL. It is true for any free license. |
argh - why can't the world just be good and we get rid of such stupid
shit ..
Do you know of some tool that does that automatically?
|
For IntelliJ (and by extension Android Studio) there is a built-in tool: https://www.jetbrains.com/help/idea/2016.2/generating-and-updating-copyright-notice.html |
I don't usually add it to all my source files either. The important part is really just:
If the code does get separated from the license, e.g. by someone else including part of PassAndroid's code in their project without including the GPL license text, that is non-compliance by the other party and no fault of PassAndroid. (Not a lawyer, not your lawyer, &c. &c.) |
Thanks for the comment @Zegnat - was also thinking so - but I still leave the issue open - perhaps one day I might be bored and do this - or somebody steps in to do it .. |
Please see https://github.com/ligi/PassAndroid/blob/master/COPYING#L623
The text was updated successfully, but these errors were encountered: