18

Prompted by https://opensource.stackexchange.com/questions/304/can-i-take-bsd-licensed-code-and-distribute-it-under-gpl.

The OP asks:

Can I take code which is licensed under a permissive open source license (like the BSD license) and distribute it under a copyleft free software license (like the GPL)?

Specifically, quoting the following from Wikipedia:

In addition, the permissive nature of the BSD license has allowed many other operating systems, both free and proprietary, to incorporate BSD code. For example, Microsoft Windows has used BSD-derived code in its implementation of TCP/IP and bundles recompiled versions of BSD's command-line networking tools since Windows 2000. Also Darwin, the system on which Apple's Mac OS X is built, is a derivative of 4.4BSD-Lite2 and FreeBSD. Various commercial Unix operating systems, such as Solaris, also contain varying amounts of BSD code.

And OpenBSD Journal:

KernelTrap has an interesting article in which Theo de Raadt discusses the legal implications of the recent relicensing of OpenBSD's BSD licensed Atheros driver under the GPL. De Raadt says, "it has been like pulling teeth since (most) Linux wireless guys and the SFLC do not wish to admit fault. I think that the Linux wireless guys should really think hard about this problem, how they look, and the legal risks they place upon the future of their source code bodies." He stressed that the theory that BSD code can simply be relicensed to the GPL without making significant changes to the code is false, adding, "'in their zeal to get the code under their own license, some of these Linux wireless developers have broken copyright law repeatedly. But to even get to the point where they broke copyright law, they had to bypass a whole series of ethical considerations too."

Specifically at stake is the question of whether or not is it legal to take a file or files licensed under a BSD licence, affix a GPL header at the top of such files without making any other changes to the content, place the GPL licence in the root and mention it in README, and distribute the results.

If such licence amendment to include GPL (in addition to the BSD licence) is not legal, then why Microsoft's and Apple's practice is.

7 Answers 7

16

Yes, you can.

To be precise, I claim that one can take BSD-licensed code and distribute it under the combined terms of both the BSD and the GPL licences.

We know that, if I receive someone else's code under a BSD licence, I may redistribute it to you under those same terms. This is common practice, and not (I hope) in any way contentious.

We also know that I may not redistribute it to you without the conditions that the BSD licence imposes; that is, I may not place less onerous conditions on you than BSD requires (that is, requiring the inclusion of the original copyright notice, the disclaimer, this list of conditions, and a prohibition on claiming the original author's endorsement on any modified version).

So the question becomes whether I can distribute that code whilst adding more onerous terms than the BSD licence itself imposes.

It is clear that I can. As the question notes, Microsoft is known to have taken code which it received under a BSD licence and used it in proprietary products. These come with very onerous conditions on the the use, modification, and redistribution of the derived code (usually, they permit one instance of it to be run, and no modifications nor redistributions of any kind).

For clarity: if I were to seek from Microsoft permission to modify and/or redistribute the derived code, and they were to grant it, they would not be able to free me from the BSD requirements as they applied to the derived code; I would still need to comply with those. But they are perfectly capable of applying new, onerous requirements of their own.

The GPL imposes conditions on redistribution that are more onerous than BSD's, but less onerous than those of most proprietary licences.

I am therefore perfectly entitled to receive code under a BSD licence, and - with or without making modifications of my own - redistribute it, adding in the GPL's requirements, if I choose to.

If I haven't modified the code, those added requirements are probably pointless; if you don't wish to be bound by them, you will go and get the code from the original author, who presumably will happily distribute it to you under the BSD licence.

But if I have modified the code, and you wish to use those modifications, then you will need to abide by the requirements of both the BSD and the GPL licences, since both will apply to this new, combined work (the original code + my changes).

6
  • 2
    I'm finding it very hard to believe that you can take my copyright that I've shared with you under a contract and simply give it to other people under a different contract.
    – user900
    Oct 3, 2015 at 7:15
  • 4
    That is exactly what Microsoft is doing in the case above, and it's permissible because you shared your code with me on terms that didn't prohibit me from adding more conditions (which licence was not, incidentally, a contract). I may not fail to do what you've required me to do, but I may of my own volition do more. If you wanted to prevent that, you should have shared your code with me on terms that prohibited me from doing that (examples include, but are not limited to, the provisions of licences like GPLv3 that explicitly forbid adding additional restrictions).
    – MadHatter
    Oct 3, 2015 at 12:13
  • You might want to clarify how "distribute under the combined terms" is different from "dual licensing" where the end user can select one or the other at their choice.
    – Ben Voigt
    Oct 3, 2015 at 20:16
  • 1
    It is the difference between A and B and A or B.
    – MadHatter
    Oct 3, 2015 at 23:42
  • It is not clear that you can. The license says that when you redistribute, you must include the license text; and with that inclusion, you allow use under the BSD conditions: "redistribution and use ... are permitted provided that XYZ". That sentence doesn't only define necessary conditions, it defines sufficient conditions. So textually, you can't impose additional conditions on people you distribute to. Either MS is not doing exactly what you said it does, or it is violating the terms.
    – einpoklum
    May 1, 2021 at 9:15
5

No, you cannot.

A licence is a way for a copyright holder to grant certain rights to others that are otherwise reserved. You don't own any copyrights to any stuff you just download from the internet, unless someone specifically transfers their copyright to you (e.g., what IEEE requires for scientific papers in order to publish them -- the authors must assign their copyright to IEEE).

If you make sufficient changes to the code, then you might be able to choose a different licence for your changes. But should you? The issue with the BSD/Linux controversy in regards to Atheros comes down to the ethical considerations -- the GPL advocates claim that BSD licence allows companies to not release the source code (even though a lot of companies do, since it's cheaper that way, and a lot of diffs get incorporated into all BSDs that originate from these companies like Netflix, Apple and even Oracle), yet instead of playing nice with the BSD guys themselves, Linux guys do the exact opposite than what all of those commercial companies are actually doing -- they (re)licence their changes to GPL, making sure that all such changes are forever barred from going back to the BSD projects. (Specifically, the conflict was fuelled by the fact that such re-licensing has occurred when only trivial and non-copyrightable changes have been performed on the existing code, yet copyright claims were nonetheless made and asserted under the GPL.)

5
  • opensource.stackexchange.com/a/892/193
    – cnst
    Oct 1, 2015 at 12:08
  • 4
    You do not need to be the copyright holder to make copies, you only need permission from the copyright holder. The BSD license gives that permission.
    – Ben Voigt
    Oct 1, 2015 at 23:20
  • @BenVoigt, but whilst making copies, you can't just magically "corrupt" only certain bits. I don't see how it wouldn't be deceptive and fraudulent to claim a different licence on someone else's piece of work.
    – cnst
    Oct 3, 2015 at 9:32
  • 3
    You're right, except that the BSD license also includes explicit permissions concerning derivative works. Now, deriving a new work by making changes only to the code comments may be unethical, but the BSD license appears to allow removing or modifying the permission to make copies, as long as the list and disclaimer are kept, so it's pointless to argue that it is illegal. (That is, if the BSD license can't grant permission to do so, the whole license is invalid)
    – Ben Voigt
    Oct 3, 2015 at 20:04
  • 1
    Free Software Foundation website lists BSD license as compatible with GPL 3.0, so the answer is yes you can mix the two. Link: gnu.org/licenses/license-list.en.html
    – markspace
    May 25, 2017 at 0:14
4

Yes you can.

The Free Software Foundation website lists licenses that are compatible with their GPL 3.0 license. Included in the compatible licenses are the 3-Clause BSD (but not the original BSD), as well as Apache 2.0, Artistic License 2.0, and Creative Commons Zero (CC0).

Linkage: https://www.gnu.org/licenses/license-list.en.html

Their License FAQ defines what they mean by "compatible:"

https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean

What does it mean to say a license is “compatible with the GPL?” (#WhatDoesCompatMean)

It means that the other license and the GNU GPL are compatible; you can combine code released under the other license with code released under the GNU GPL in one larger program.

All GNU GPL versions permit such combinations privately; they also permit distribution of such combinations provided the combination is released under the same GNU GPL version. The other license is compatible with the GPL if it permits this too.

GPLv3 is compatible with more licenses than GPLv2: it allows you to make combinations with code that has specific kinds of additional requirements that are not in GPLv3 itself. Section 7 has more information about this, including the list of additional requirements that are permitted.

The FSF further defines "compatible" later in this part of their FAQ.

What does it mean to say a license is “compatible with the GPL”. It means that the other license and the GNU GPL are compatible; you can combine code released under the other license with code released under the GNU GPL in one larger program.

The GPL permits such a combination provided it is released under the GNU GPL. The other license is compatible with the GPL if it permits this too.

So mixing code with different licenses is permitted if the licenses are "compatible", and release under GPL is required for code which contains GPL code. I think that covers the case where you want to include BDS/public domain code in a GPL work.

There's some other stuff in that FAQ related to public domain. For example they claim all code written by the government employees is public domain, which is compatible with the GPL, so government employees can release their work under GPL too (they claim).

Interestingly, a related question is also answered in their FAQ:

If a program combines public-domain code with GPL-covered code, can I take the public-domain part and use it as public domain code?

You can do that, if you can figure out which part is the public domain part and separate it from the rest. If code was put in the public domain by its developer, it is in the public domain no matter where it has been

Again this supports the idea that mixing GPL code and public domain code is allowed.

4
  • I think you're answering an entirely different (and much more trivial) question here than the one being posed. Noone is concerned whether or not the licences are compatible.
    – cnst
    May 25, 2017 at 22:03
  • I appreciate the input, and perhaps I am mistaken, but "[re]distribute it under a copyleft free software license" I think is exactly what compatible means.
    – markspace
    May 26, 2017 at 3:55
  • No; compatible means that it is OK to combine software, nothing more; it's a very bad style to make it appear that an authoritative source confirms your judgement on the matter, when in fact it's entirely unrelated to the question at stake.
    – cnst
    May 27, 2017 at 9:57
  • 1
    No, compatible in this sense means that it's OK to combine it with GPL software and release the resulting combination, which carries the requirement that the combination be licensed in its entirety under the GPL. The GNU project knows this well; indeed, they say as much above. If they're claiming it's OK to combine the software, it would be very odd if they hadn't thought through the full implications of that. They might be wrong when they say it, but I don't think you can claim they answered in ignorance of what their own licence implied for their answer.
    – MadHatter
    Feb 7, 2019 at 8:24
3

Sort of

The common way to mark a file as covered by GPL is to add text like this (from https://www.gnu.org/licenses/gpl.html):

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year>  <name of author>

You cannot lawfully make a false claim of copyright on a work that you haven't authored/modified. So exclude that and continue with,

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 is a true statement, if something is BSD-licensed then you can redistribute and/or modify it under the terms of the GPL. That fact is what makes the BSD license compatible with the GPL.

So you can say this, but in doing so you very much haven't said that the recipient can't redistribute and/or modify it under the terms of the BSD license. Which (under the BSD terms) must also remain attached to the source which (under the GPL terms) distributors must make available. So you're unlikely to give anyone who looks closely, the impression that they cannot distribute it under the BSD terms unless you do something dishonest (such as making it unclear what parts of the file the BSD terms relate to, when in the original it was clear). And if they choose to distribute it under the BSD terms then they can of course first remove your added GPL rubric since the BSD license doesn't mention that GPL rubric or require it to be retained.

It might not be completely clear to them that they can do all this, unless they have separately obtained a copy of the original BSD-licensed code to check that they really aren't including any changes made by you (which in fact they aren't, since you didn't make any). Again, if you've made it clear what the extent is of the BSD license then they will know this, and if you haven't then they might not.

I don't know how difficult you can make it to figure out what the BSD license applies to, before you're at risk of being held in breach of the BSD license. Confusion as to the scope of a license can happen by accident, but it's between you, your lawyer, and the court, what happens if you do it on purpose in order to "trick" people into thinking they have to abide by GPL when they don't.

What de Raadt is objecting to is what he refers to as "relicensing". The point of legal contention (I think) is whether recipients of BSD code can make trivial changes, claim copyright on the result, and then forbid the trivially-changed version from being distributed under the BSD license. Fortunately that's not the question you asked, because I don't know the answer to it ;-) I think de Raadt also objects ethically to any misdirection as to the applicability of the BSD license, and I can't tell whether he objects legally to misdirection.

1
  • "[the BSD license] which (under the BSD terms) must also remain attached to the source" Incorrect. The BSD license requires preserving some pieces of the license: the inclusion of the original copyright notice, the disclaimer, its self-referential list of conditions, and a prohibition on claiming the original author's endorsement on any modified version. The BSD license does not require preserving some other portions of the license, and it particular it does not require including the clause that gives the right to redistribute.
    – Ben Voigt
    Mar 27, 2019 at 21:55
2

You cannot, because every kind of use is prohibited by Copyright law unless there is an explicit permission for the specific use case.

The BSD license permits to re-publish source and binary versions of the code and permits changes. This makes it very universally usable.

The BSD license however does not give permission to re-license or sub-license, so the final user always gets his permissions directly from the original author that did not give a written permission for such a change.

As there is neither a permission to change license nor a permission to re-license/sub-license, there is even no implicit permission for changing the license.

The BSD license would allow you to add code and do this under a different license. You however need to clearly mark such additions in a way that allows to identify the code under a different license.

Given that the GPL only permits to put a whole work under GPL, it is the GPL that disallows even marked pieces of code to appear in a BSD licensed work.

12
  • 1
    "The BSD license however does not give permission to re-license or sub-license" -- citation required
    – Ben Voigt
    Oct 1, 2015 at 23:18
  • 1
    @BenVoigt - it's notoriously difficult to provide a citation for something asserted to not exist. Can you provide evidence that refutes the assertion? Given how short the BSD licenses are if it's in there it shouldn't be hard to fit in a comment ;)
    – feetwet
    Oct 1, 2015 at 23:36
  • 3
    @feetwet: Well, there's the wording "Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer" ... which covers the entire license except the permission to redistribute. Thus allowing the redistributing party to redistribute without that permission. And the "retain this list of conditions" only makes sense if it envisions giving permission to redistribute further under a different agreement.
    – Ben Voigt
    Oct 1, 2015 at 23:40
  • 1
    @ben I have to agree here - you don't have a right to relicense someone else's work unless it's granted to you. Redistribution is distinct from relicensing. And this list of conditions entrenches the redistribution requirements (i.e. it includes itself), so a redistribution must include redistribution requirements.
    – jimsug
    Oct 2, 2015 at 2:47
  • 1
    @Ben The Copyright law forbids anything except it is explicitly permitted by the owner. If you believe that the BSD license permits re-licensing and sub-licensing, you should be able to point us to the part of the BSD license that explicitly gives that permission.
    – schily
    Oct 2, 2015 at 10:07
1

The phrase "take BSD-license code and distribute it under GPL" is ambiguous. If one interprets it as "swapping the license from BSD to GPL with your name attached as its licenser, even if no code has been changed", it makes little sense, and it's likely invalid.

However, according to the legal experts at Software Freedom Law Center: If one makes a copyrightable change to the original software, or if one incorporates 2-clause or 3-clause BSD-licensed code (4-clause is GPL-incompatible due to the "advertising clause") into another copyrightable software - then yes. In these cases, the end result can be redistributed under GPL as a whole.

But it's worth noting that it's a result caused by the additional changes under GPL, and it's not a property of the original code under BSD. The copyright status of the end result would be a combination of "unmodified parts are still licensed under BSD by its original authors, and the modified parts are licensed under GPL by the new authors."

Since this is the opinion held by Eben Moglen and Mishi Choudhary, I'd consider it highly trustworthy (Eben Moglen was the lawyer-in-chief at FSF).

In the article Maintaining Permissive-Licensed Files in a GPL-Licensed Project: Guidelines for Developers, Software Freedom Law Center also gives explicit instructions for redistributing BSD-licensed code under GPL.

Including unmodified permissive-licensed files

First, SFLC states that, if the original work is not modified, its rights are reserved solely to its original copyright holders, and the original BSD-license must be preserved and followed exactly.

The simplest case of notice preservation is unmodified incorporation of a permissive-licensed file from an external project into a GPL’d project without making changes to the code in the file itself. Here the developer should simply leave the file with all notices intact. If the external project uses the single COPYRIGHT file method, the developer should copy the names of all the copyright holders from that file and place them, along with any copyright, permission, and warranty disclaimer notices required by the permissive license, at the top of the incorporated source file. This may require the developer to list a large number of copyright holders, but it is always best to err on the side of inclusion of each person who might have a copyright claim.

The top of the incorpoated file should look something like this:

/* Copyright (c) YEARS_LIST, Permissive Project Contributor1   
** Copyright (c) YEARS_LIST, Permissive Project Contributor2   
** ...  
**  
** Permission to use, copy, modify, and/or distribute this software for  
** any purpose with or without fee is hereby granted, provided that the  
** above copyright notice and this permission notice appear in all copies.  
**  
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL  
** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED  
** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR  
** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES  
** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,  
** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,  
** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS  
** SOFTWARE.  
*/

Adding GPL’d modifications to permissive-licensed files

If copyrightable modifications have been made to the original BSD-licensed code, these modifications can be licensed under GPL. In this sense, end result would be covered by GPL as a whole.

But the BSD-license in the unmodified part of the code is still under its original license, thus the original license must still be preserved and followed exactly. The modified end result under GPL is a superset of the original in the sense of both its code and its license.

A more complicated case occurs when a developer makes copyrightable changes to a permissive-licensed file that the developer is incorporating into a GPL’d program. Developers in this situation typically apply the GPL to their modifications. (However, it is possible for the developer instead to contribute new code under permissive terms, such as the permissive license that governs the unmodified file. We discuss that case in § 2.3.)

Even though the permissive license of the external project grants legal permission to incorporate code from that project into a GPL’d project, the developer of the GPL’d project must nonetheless comply with the notice preservation requirement in the permissive license. In a project that uses the file-by-file method, a developer who makes copyrightable modifications to a permissive-licensed file should place a new copyright notice and permission notice above the existing one and should make clear that the developer has modified the file. The top of the file will then appear as follows:

/*  
 * Copyright (c) 2007  GPL Project Developer Who Made Changes   
 *  
 *  This file is free software: you may copy, redistribute and/or modify it  
 *  under the terms of the GNU General Public License as published by the  
 *  Free Software Foundation, either version 2 of the License, or (at your  
 *  option) any later version.  
 *  
 *  This file 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 .  
 *  
 * This file incorporates work covered by the following copyright and  
 * permission notice:  
 *  
 *     Copyright (c) YEARS_LIST, Permissive Contributor1   
 *     Copyright (c) YEARS_LIST, Permissive Contributor2   
 *  
 *     Permission to use, copy, modify, and/or distribute this software  
 *     for any purpose with or without fee is hereby granted, provided  
 *     that the above copyright notice and this permission notice appear  
 *     in all copies.  
 *  
 *     THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL  
 *     WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED  
 *     WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE  
 *     AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR  
 *     CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS  
 *     OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,  
 *     NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN  
 *     CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  
 */

It is very important that the developer preserve the entire copyright notice, permission notice, and warranty disclaimer as they appeared in the original code, as required by the permissive license. We sometimes see GPL notices mixed in with permissive license notices—a confusing practice that obscures both the provenance of the code and the precise permissions that were granted by the various copyright holders listed in the notices.

-2

Can I take code which is licensed under a permissive open source license (like the BSD license) and distribute it under a copyleft free software license (like the GPL)?

(I'm assuming US law where it matters.)

No. The original authors did not license the code under the GPL. You can only place code under a license if you are actually the copyright holder or an assignee. Neither the BSD nor the GPL make you an assignee, just a licensee, so you cannot relicense or change the license on anyone else's works or the elements thereof in your own works.

When you take code that you received under the BSD license and you distribute it, the recipients automatically receive a BSD license from the original authors of that code. You cannot stop or change this. You cannot give them any other license to that code and without it, they cannot modify it or distribute it.

You can take code you received under the BSD license, modify it and add other things to it, and distribute the result. No matter what you say or do, all the protectable elements of the original code are still under the BSD license and no other license. Any protectable expression you added is offered under only the GPL. The licenses are compatible, so this usually presents no problem.

Specifically at stake is the question of whether or not is it legal to take a file or files licensed under a BSD licence, affix a GPL header at the top of such files without making any other changes to the content, place the GPL licence in the root and mention it in README, and distribute the results.

As I read the BSD license, you would be required to include the copyright notice required by the BSD license. Otherwise, there should be no issues. Again, no matter what the licenses say, everyone who receives your work receives a BSD license to all the protectable elements in it that were offered under the BSD license by their authors and without that license, there is no way they could modify or distribute the work under the GPL.

However, you are kind of lying to people. They are getting a BSD license and no other license, and you are not telling them this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .