I have scientific software that I would like to release under the BSD 3-clause licence, but it includes some old code that was released under GPL.
Can I still package it all and release as BSD?
Open Source Stack Exchange is a question and answer site for people organizing, marketing or licensing open source development projects. It only takes a minute to sign up.
Sign up to join this communityI have scientific software that I would like to release under the BSD 3-clause licence, but it includes some old code that was released under GPL.
Can I still package it all and release as BSD?
Not with the license as it is. You will need to contact all the licensors of the GPL code, and request that they release it to you in a license that is compatible with the BSD license.
Alternatively, you can release your code as GPL too.
No, you cannot. By including GPL-code, you are including a dependency of GPL-protected code, and therefore your code is only derived work from it. The terms of GPL requires that derived work is also published under GPL.
From the GPL faq:
If a library is released under the GPL (not the LGPL), does that mean that any program which uses it has to be under the GPL?
Yes, because the program as it is actually run includes the library.
If you wrote the code yourself, then you're the licensor and can use the code as you see fit, however:
You (very obviously) can't 'pinch' code from somewhere and then re-license it (as your own creation).
If you wrote the code, you can do whatever you want with it. You own the code, you own the copyright. A license is you granting others certain rights, but as the author you have not given up any of your own.
What you (probably) can't do is then turn around and take legal action against someone who's still using your code under the terms of the old license (though this hardly matters as you're going to a more permissive license). They'd probably be "grandfathered in".
If you don't own all the code, you can not relicense code that others wrote (obviously). It was hard to tell from your question if you owned everything or not; if you're talking about bundling libraries with it that are GPL licensed (and not written by you), you may be in violation of the GPL if you distribute them (and you certainly can't re-license them). This would require a lot more information, however, and is probably deserving of its own question.
TL;DR — If you're the copyright holder, you determine the license and can do whatever you want.