If you're writing open-source software, please do yourself and other software developers a favor and familiarize yourself with how software licensing works. As an Ubuntu Developer, much of my work involves auditing the source code licensing of various applications. Most of these applications have miserably complicated licensing situations, sometimes with licensing violations involved. I also occasionally run into licensing or copyright terms that an author probably didn't intend to specify, but that they did specify unambiguously nonetheless.
For instance, did you know that if you state that a file is "under the GPL license" without specifying what version, that means that the user of your file can use it under *any* version of the GPL they want to? Look at GPLv1 Section 7, GPLv2 Section 9, and GPLv3 Section 14 if you don't believe me. I found a file written in 2017 with these licensing terms. Did the author *mean* to do this? Probably not, they probably wanted to use GPLv3 (or maybe GPLv2). But since they didn't specify a version, I'm within my legal right to use this code under GPLv1's terms if I care to. I'm not going to do that since I have no interest in using this file for anything, but it goes to show you how a slip-up in your licensing specification can cause people to have rights or be free of restrictions you didn't want to give them or let them be free from.
Another (very very common) slip-up is for most of the source code in a repository to have license headers specifying GPLv2 *or later*, but with no repository-wide license specified in an AUTHORS or README file, and with a GPLv2 license in a LICENSE or COPYING file. What you probably *think* this does is license your program under GPLv2 or later, but what it *actually* does is give you a messy mixed-licensing situation with some files licensed GPLv2 only and some files licensed GPLv2 or later. Why? Because the default repository-wide license is GPLv2 as set by the LICENSE or COPYING file, and all of the headers that specify GPLv2 or later are overriding that default license.
You may think, "Why can't someone just infer that because most of the files are GPLv2 or later, that all of them are?" Great question! There's two answers. One, if you unambiguously specify something you didn't mean to specify, whatever you specified is what's legally binding. There's not room for "well that's what I said, but what I meant was..." in licensing. Secondly, many projects *actually use multiple licenses in one project* (for instance you'll have GPL, BSD-2-Clause, BSD-3-Clause, and MIT licenses all in one application). So how does one know if you just "accidentally" specified the wrong license, or if you meant to make a mixed-license application? They can't determine your intent with 100% certainty, so they have to obey what you said, *not* what you meant to say.
I am not a lawyer and this is not legal advice. This is just advice on how to help keep software developers from having headaches and problems reusing code.
#opensource #software #licensing #linux #gpl #bsdlicense #mitlicense #bsd #mit #foss