4

I have a code project which I have released under the GPL3+, which you can see here. I would like to implement a section of code that would use the lmfit nonlinear fitting library, provided here. The lmfit library is licensed under the 2-clause BSD license, which appears to be compatible with the GPL3+. My question is how to bundle them together. I would like to include the lmfit source code inside my git repo. What is the proper way to handle the licensing? Do I simple leave the BSD license in the lmfit files that I use and leave the GPL clause in my own source code? Does the presence of the BSD license in the repo affect files that I have licensed under the GPL?

EDIT: on further reading, it seems that I can release FreeBSD software under the GPL. SO my question is about how to actually do this properly. Do I include both licenses in the source code? Obviously I have to keep the copyright and BSD licenses intact in those sections of the code, but do I also add the GPL so that the source for lmfit in my git repo would now have two licenses inside it? Do I add my own copyright like I have in my other source code (I am guessing no).

  • You wouldn't normally add the GPL to the BSD code, especially if you haven't modified it. See also Does the MIT license's right to “sublicense” allow me to change the license of someone else's work? – curiousdannii Jun 13 '16 at 23:47
  • So it's OK to mix the BSD and GPL between source files in the same project? – KBriggs Jun 14 '16 at 0:57
  • Yes if the combined work is GPL. That's what GPL compatibility means :) – curiousdannii Jun 14 '16 at 0:59
  • How would I indicate that the combined work is GPL? I have my source files with the GPL preamble in them, the lmfit files with the FreeBSD preamble, and then what? A LICENSE.txt file indicating that the whole thing is GPL? – KBriggs Jun 14 '16 at 1:01
  • Yeah that sounds like enough. – curiousdannii Jun 14 '16 at 1:01
1

As you found, you can indeed include BSD licensed code in a GPL project.

The usual way to do this is to:

  1. License your entire project under the GPL, with the LICENSE.txt reflecting this.
  2. Include the BSD licensed code within the repository, with the BSD license and original copyright notice intact within it.

This clearly indicates that, together, the entire project is GPL, but on its own this file can be taken out and used under its existing license.

You can of course only do this one-way: a GPL project couldn't be combined into a BSD project as you would be effectively re-licensing the GPL code under more permissive terms than it allows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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