Should I provide a LICENSE.txt or COPYING.txt file in my project? [closed]
Asked Answered
I

1

50

Does it matter? Should I use one or the other? Or both, even? Can the license file be any name? (With any extension?)

I'm sure there's a "best practices" guide that contains all this, but I'm not having any luck finding it.

Injurious answered 15/4, 2011 at 14:46 Comment(5)
The filename that contains the license seems to be mostly convention. GPL software does COPYING.txt while FreeBSD uses COPYRIGHT (no extension).Prune
@Sean: actually, GPL software uses COPYING with no extension too.Trope
Huh. Having a question whose answer I rely on be put "on hold" is affecting me way more than it should. Just wanted to share that, since it's so easy to flag (yet much more work to suggest an edit to improve it).Injurious
As we are talking about US-American based jurisdiction, question should rather be LICENSE.txt vs COPYING.txt ;)Roughandtumble
@VolkerE. Oh wow you're right! That has slipped by my radar for so long now. Thanks for pointing that out :-)Injurious
S
57

COPYING is standard in the GNU project. I think that either of COPYING or LICENSE would be understood. The FSF has a guide on how to use the GPL, which suggests COPYING, while the Producing Open Source Software book suggests either COPYING or LICENSE. The Apache License recommends a boilerplate that just points to the license online, though the Apache project seems to also include a LICENSE file in their code containing the relevant license or licenses.

It's up to you whether you want to add the .txt suffix; on Windows and Mac OS X it tends to be helpful for default file associations, while on Linux or most other Unix-type operating systems suffixes are optional and it's generally assumed that files are plain text.

Spatter answered 15/4, 2011 at 15:6 Comment(4)
Thanks, that's helpful. Do you know if it means anything legally, such as: "I legally allow you to use my source code"? How far does copyright law stretch for variations of the LICENSE.txt file?Injurious
What matters legally is that you prominently and clearly provide information on how your code is licensed. Practically, this means that you should provide copyright and license information in every file (so this information doesn't get lost if that file is separated from the rest of your source code). For short licenses, like the MIT license, just include them inline in the source. For longer licenses like GPL or Apache, include the standard boilerplate in each file, and distribute the license somewhere prominent in the project. Note: I am not a lawyer, and this is not legal advice.Spatter
That makes sense. Though I wonder, when a file does get separated and doesn't contain any license info, it's my current understanding that unlicensed work is automatically copyrighted. If so, it seems like since programmers hate seeing that boilerplate, the worst that can happen is a file gets separated and can no longer be copied. That seems fine, since it's not your intention to separate the file from the project. Well, unless you want to allow that level of granularity so that individual files can be used independently. -- Any thoughts? I'm just thinking out loud here.Injurious
@Injurious As I said, you generally want to include the boilerplate in each file that specifies what license the file is under. For instance, the GPL boilerplate references the GPL license, the Apache boilerplate references the Apache license, and both tell you where you can get the license if it didn't come with the code. It's generally not a good idea to strip it off just because people don't like seeing it; it will cause headaches in the future. For example, if you merge with another project under a different, but compatible, license, you need to track which file is under which license.Spatter

© 2022 - 2025 — McMap. All rights reserved.