Thanks for that explanation, @rikudou@lemmings.world!
Comment on What are the main differences between GPLv2, GPLv3, AGPL, and LGPL?
rikudou@lemmings.world 5 days ago
GPL = whenever you distribute software which contains GPL code or libraries, your code must also be distributed as GPL or compatible. V2 vs v3 differences are mostly in v3 clearing up some ambiguities.
AGPL = same as GPL, except it applies even if you simply provide your code as a network service
LGPL = same as GPL except it makes it possible to distribute closed source components (or with incompatible license) as long as the user is able to replace the LGPL libraries.
MIT = you can do whatever with the code
So, GPL only concerns you if you distribute your application as a binary to users, think like Photoshop or Microsoft Office. Your code is effectively GPL even if you don’t distribute it, but there’s no requirement to make the source available to everyone, only to those who you distribute the software to.
With AGPL even having the application accessible over the network is considered as distribution to users. You basically cannot have an effectively closed source application with AGPL.
LGPL is usually used with dynamically linked libraries where you can distribute your application easily as long as user can replace those. For example Qt is LGPL and you can sell your app without providing source code as long as the user can replace the Qt framework dll/so libraries.
And with MIT anything goes, you can use it in a closed source product, in fact of those four it’s the only one that allows you to have a truly closed source codebase.
As for how they’re compatible, the most strict license usually applies. All of these four are compatible to some degree, but you can’t simply take a GPL code into a MIT codebase and make it more permissive suddenly.
Your code can be MIT, but the original still is GPL. Meaning that when you distribute the application, it’s effectively GPL. Same with all license combinations.
As for why would you choose one or the other, it’s pretty much about how much you want your users to give back.
With GPL, you want any modifications to be able to be included in your project. With LGPL as well, but you’re not forcing people to open source their whole app, only direct modifications to your code. With AGPL you’re basically forcing everyone to open source their app if they use your project at all. With MIT you don’t care at all, you just give your code to the humanity to do whatever with it.
mike_wooskey@lemmy.thewooskeys.com 5 days ago
sbeak@sopuli.xyz 5 days ago
Thanks for the thorough explanation, that was really helpful! So AGPL would be better suited for things like self-hosted services where you don’t want a closed-source hosting service to use your project, while GPL and AGPL are effectively the same for standard desktop apps.
Interesting that the LGPL licensed parts of a project have to be “replaceable” (meaning updatable with a new version or fork? or does it mean something else?), even if the project in question is closed-source.
And projects that include GPL code must be GPL licensed themselves or have a compatible license (like AGPL?). But what if you want to both use this set of GPL code but with a different license (either a permissive license like MIT or a different, non-GPL copyleft license), that would mean that you wouldn’t be able to use the code. I guess that’s the tradeoff between copyleft and permissive licenses.
rikudou@lemmings.world 5 days ago
For your first paragraph: yes, exactly. For software you distribute in binary form to customers, GPL and AGPL are effectively the same thing. For SaaS you can easily use GPL and not share your source code. Though beware if your ever need to deploy your SaaS on the customer’s premises.
The point of these licenses is to not restrict user’s rights, so LGPL doesn’t want you to use their code and not let the user do whatever they want with it according to LGPL. So if I create an app and decide to not maintain it, you’re still able to pull bug fixes etc. even without my involvement.
Yes, GPL effectively makes your binary GPL as well. And if you provide a library for others using GPL code, projects using your library must be GPL-compatible as well.
But the point is that you cannot restrict the user’s rights, so if you distribute the source code you can choose a more permissive license (like MIT) for your code. That could in theory mean that if someone finds a replacement for your GPL dependency and remove it, they could release it under any MIT-compatible license (which is just about anything).
GPL dependencies are often avoided in companies because of its spreading nature where it makes everything it touches effectively GPL. And even if you write SaaS, if you’re B2B you’ll eventually land a bigger customer with strict software policies and you’ll have to deploy on customer’s servers, thus having to legally distribute the source code as well.
sbeak@sopuli.xyz 4 days ago
Ah okay, that makes sense. So “replacing” parts of a project would mean switching dependencies from something that’s GPL to something else (e.g. one that is MIT licensed).
rikudou@lemmings.world 4 days ago
Yep.