11

My knowledge of licensing is somewhat fuzzy, it's something I wish I would have looked into more when I got into making open source projects...

That being stated, are there licenses that will ensure forks of my project will stay open source?

If someone takes my project(s), and adapts it or makes it better in some way, what licenses can I choose from that are already well designed that require they keep it open source, even with their edits.

3

Gaurav's answer above is incorrect. Viral licenses are called that for a reason: they are licenses that, like a virus, spread beyond the source of your project. It means that if my program has 99 features that I created myself, and 1 that requires a GPL library, the GPL "infects" my entire codebase and forces me to publish the entire thing under the GPL or a compatible license.

This is not what the question is asking for, and to put it bluntly, this is not suitable for the majority of open-source project development. The GPL is not a license so much as it is a political statement, declaring to the world that you believe non-"free" (as per the FSF definition) software to be inherently evil and something that must be fought against and eradicated.

If that's what you want, go ahead and use the GPL. But if you're looking for an open-source license that will ensure that modifications to your code must remain open and be published under the same license, (without limiting what the people who use your code in a wider project can do with it,) the license you're looking for is the Mozilla Public License, which requires exactly that.

  • 1
    You know, I don't mind if they want to make a "political" statement with the GPL -- but they should at least be honest that that's what they're doing. I remember arguing a long time ago with GPL supporters about this very issue and they said "No, it's protecting free code" or "keeping free code free". They seemed to not want to admit that it's "FORCING the release of NEW free code" even though it's plain as day that's what it does. – The_Sympathizer Mar 29 '16 at 18:55
16

The general term for this type of license is copyleft, share-alike or (pejoratively) viral licenses. The two best-known examples of such licenses are the GNU General Public License (for source code) and the Creative Commons ShareAlike licenses (for any creative content). Note that these licenses sometimes allow you to use an alternate, compatible license inside of the exact license you used.

  • 1
    If you are creating a library, the GPL goes far beyond ensuring that modifications must be published under the same licence as it extends to other software which uses your library as a component. – Ben Jul 22 '15 at 20:50
  • @Ben, go for the LGPL (or it's equivalent in GPLv3 terms) then. – vonbrand Jan 4 '16 at 2:00
  • @vonbrand, That is not an improvement if you have a code snippet, as if you include the snippet in a library the whole library must be released under the LGPL. – Ben Jan 4 '16 at 13:47
  • 1
    @Ben, a mere snippet won't have that effect. A more substantial part can be reverse engineered, not just copied and adapted. Besides, the answer considered using a library, not taking a piece of it to create a new one. – vonbrand Jan 4 '16 at 14:22
  • 1
    Please note that the Creative Commons licenses are designed for one-author type creative works that don't evolve (too much) in versions, not works like software that commonly has dozens, even many thousands, of coauthors and is constantly evolving. The CC licenses are explicitly not recommended for code. – vonbrand Feb 9 '16 at 0:43
4

This are copyleft-licenses. The most commonly used and known are GPL and AGPL. Also the Creative Commons Share Alike license works this way.

Your Answer

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