-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Clarification of license for site using web assembly + static linking? #6467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact 8000 its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Disclaimer: I'm not a maintainer of this project. Libgit2 is licensed under GPLv2, not LGPLv2. However, As I see it, sending a binary to clients (browsers) is distribution. But if I were you, I'd also look at how this is handled by existing projects. I think there are already other users of libgit2 in some web assembly application. |
@neithernut thank you for the clarification re LGPLv2 vs this library's license. I've updated the OP to reflect that.
How would that would help? Just the fact that other projects did something does not mean it was permissible. Unless you're suggesting that they asked the same question and someone from the libgit2 project answered, which would definitely help. |
If they considered running the application in browsers is a form of distribution, they would (hopefully) adhere to the demands the GPL makes. That is, their application should include licensing information and a link to the libgit2 source code somewhere in the user interface. That is, if their project isn't licensed under GPL itself (in that case they may "only" include a link to their own source code). And if it were me, I'd document why the information is there at least in the commit message introducing that element. If not they should at least have discussed that amongst themselves, and documented that somewhere. And be it in some github-issue. But maybe I'm too optimistic and people don't really care about licensing conditions in OS projects (any more). |
IANAL, and I am not your lawyer, in particular. 😁 But:
My opinion is that this is distribution, and that there's little ambiguity there.
The linking exception for libgit2 states:
I note that it doesn't say dynamically link or statically link. Just link. I can only give you my opinion on this, which is: as an author, I'm happy for you to use my code that's in libgit2. My interpretation of the license is that libgit2 is covered under the GPL. So if you change libgit2 itself, I would expect you to contribute those changes back or otherwise make them available under the GPL. But your code is your code, and I don't care how you link to libgit2, your code is covered under the linking exception. But again, IANAL. I hope that you enjoy libgit2 and keep using it. 🚢 |
@neithernut, @ethomson : thank you for your responses. In hindsight I should have read the COPYING text more closely instead of incorrectly thinking it was the same as LGPLv2 before posting this issue-- so apologies for wasting anyone's tiem on this-- but your added color is appreciated and helpful nonetheless! |
Hi, I'm reopening this to ask for further clarification given a further question that has been brought to my attention. The COPYING exception in this library appears to allow static linking of the unmodified library. It is not clear that it allows static linking of a modified version of this library. Further, arguably, it is not possible to compile the library to web assembly without modifying the library as is done in https://github.com/petersalomonsen/wasm-git. So the original question of whether a site can run a version compiled to web assembly with static linking seems to remain; in particular:
|
I’m not sure that I agree. Any modifications to this library are also covered by its own license. If you make some work that modifies libgit2 (libgit3!) then it will still have this license. A modified version of libgit2 cannot remove the rights granted under the license. Someone could make a work that combines libgit2 - modified or not - with another piece of independent code, and that independent code could be under a different license. But modifying libgit2 - for better or worse - still just gives you libgit2. 😅 Is there verbiage in the license that you interpret differently? |
Thank you @ethomson, I'm very glad to hear that! The "LINKING EXCEPTION" does not appear to explicitly say that modified versions are covered, but the README says (emphasis mine):
One might argue that the parenthetical clarifies the linking exception to only apply to unmodified versions (or further argue that "This" is referring solely to the default GPLv2 license terms, and not to the Linking Exception). If that is not the case, and the exception is intended to include modified or unmodified version, would it be possible to update the README to reflect that e.g. "unmodified or modified" (or perhaps something more narrow such as "unmodified, or modified to the extent needed to implement the Language Bindings listed below")? |
Typical caveats apply -- the license is the binding document, not the README -- but of course IANA and, IANYL, |
@ethomson thank you! |
Hi,
Thank you for this awesome project. We are big fans and would like to use it more, but have a license question.
In particular, we'd like to build a website that loads web assembly into its page (compiled from closed source) and makes use of libgit2. Seems straightforward enough.
Ideally, we'd simply develop a proprietary binary that dynamically links to libgit2, and distribute them both together without the requirement of disclosing proprietary source code: a clear-cut case that would appear to squarely fall within the bounds of permissibility as described in COPYING. And to make it easier, others have already compiled libgit2 to wasm so we know that's feasible.
Alas, there is no simply way to load dynamic libraries, this due to issues such as this 4kb limit one. Maybe there is some undocumented workaround-- many have been suggested-- but by far the easiest solution would be to statically link.
So the question is, would that be permissible? I suppose the first question to answer that is: if I host a website that loads web assembly into a user's browser, is that the same as "distribution" (i.e. analogous to distributing a .exe file that is run locally on a PC)? Our understanding is that the whole purpose of the license is to allow distribution so long as the shared library can be swapped out. However, in the context of user accessing the software through a browser, the user cannot make such a swap (since the user cannot control over the execution environment), so the use case would seem to be more analogous to a user who SSHs into a server that contains a single version of a proprietary combined work, which the user can execute (e.g. "/opt/bin/combinedwork") but not modify and is not authorized to copy, which is a use case that would seem to squarely fit in the "not a distribution" category.
Just to clarify, I'm not asking this question for all licenses similar to this library's (though it very well might be applicable). Rather, I'm just asking what the intent is, by the original authors who wrote the code and chose the license, for this particular project. That said, I would still be interested to hear any feedback anyone may have.
The text was updated successfully, but these errors were encountered: