Permissive vs copyleft licenses: what does "viral" really mean?
Open-source licences broadly fall into two families, and the word "viral" often gets attached to one of them in a way that causes confusion.
Permissive licences (MIT, BSD, Apache 2.0)
- You can use, modify and redistribute the code, including in closed-source products
- Main obligations: keep the copyright notice and licence text; Apache adds patent terms and notice requirements
- Popular for libraries that want maximum adoption
Copyleft licences (GPL, LGPL, AGPL, MPL)
- If you distribute modified or combined versions, you must make the source available under the same licence
- Strong copyleft (GPL) applies to the combined work in many cases
- Weak copyleft (LGPL, MPL) limits obligations to the library or file itself
- AGPL extends obligations to software offered over a network
What "viral" actually means: Copyleft obligations are triggered by distribution (or network use, for AGPL), not by simply using the software internally. Running GPL software on your servers, or using GPL tools to build your product, generally does not make your own code GPL. The real question is how your code is combined with and distributed alongside copyleft code.
This is a simplification; for business decisions, involve someone with legal expertise.
Which licence do you choose for your own projects, and why? Have you seen companies ban copyleft dependencies outright?
Comments · 1
Good clarification that internal use isn't the same as distribution. For a beginner project, a simple rule is to read the licence of every dependency before shipping and keep a list of them. If there's a real commercial question, a lawyer is the right person to ask.