Rosalie241 / RMG

Rosalie's Mupen GUI
GNU General Public License v3.0
572 stars 50 forks source link

License Violation #215

Closed orbea closed 5 months ago

orbea commented 5 months ago

Hi,

You are violating the MAME license provided with mupen64plus-video-angrylion-plus.

The MAME license is strictly non-commercial:

https://github.com/Rosalie241/RMG/blob/d005e24f51a6410988dd639fe5296266d60c1e22/Source/3rdParty/mupen64plus-video-angrylion-plus/MAME%20License.txt#L6

https://github.com/Rosalie241/RMG/blob/d005e24f51a6410988dd639fe5296266d60c1e22/Source/3rdParty/mupen64plus-video-angrylion-plus/MAME%20License.txt#L19-L20

While the main GPLv3 license and the licenses provided with mupen64plus are strictly incompatible with non-commercial code, mupen64plus upstream avoids this by having a plugin system where angrylion is provided externally.

Rosalie241 commented 5 months ago

I'm not sure if that's correct.

1) RMG is not a commercial product so those points don't apply to RMG 2) RMG and most of it's components are GPL licensed, but all the plugins are still external libraries, not statically linked into 1 executable, so the GPL doesn't cover all components

though obviously I'm not a lawyer

orbea commented 5 months ago

RMG is not a commercial product so those points don't apply to RMG

The GPLv3 license allows other parties to use the code in a commercial product so it doesn't matter if you are personally doing so.

RMG and most of it's components are GPL licensed, but all the plugins are still external libraries, not statically linked into 1 executable, so the GPL doesn't cover all components

Regardless they can't be distributed together, but even in cases where they are not distributed together it can be problematic as explained by GNU.

Can I link a GPL program with a proprietary system library? (#SystemLibraryException)

Both versions of the GPL have an exception to their copyleft, commonly called the system library exception. If the GPL-incompatible libraries you want to use meet the criteria for a system library, then you don't have to do anything special to use them; the requirement to distribute source code for the whole program does not include those libraries, even if you distribute a linked executable containing them.

The criteria for what counts as a “system library” vary between different versions of the GPL. GPLv3 explicitly defines “System Libraries” in section 1, to exclude it from the definition of “Corresponding Source.” GPLv2 deals with this issue slightly differently, near the end of section 3.

https://www.gnu.org/licenses/gpl-faq.en.html#FSWithNFLibs

What legal issues come up if I use GPL-incompatible libraries with GPL software? (#GPLIncompatibleLibs)

If you want your program to link against a library not covered by the system library exception, you need to provide permission to do that. Below are two example license notices that you can use to do that; one for GPLv3, and the other for GPLv2. In either case, you should put this text in each file to which you are granting this permission.

Only the copyright holders for the program can legally release their software under these terms. If you wrote the whole program yourself, then assuming your employer or school does not claim the copyright, you are the copyright holder—so you can authorize the exception. But if you want to use parts of other GPL-covered programs by other authors in your code, you cannot authorize the exception for them. You have to get the approval of the copyright holders of those programs.

When other people modify the program, they do not have to make the same exception for their code—it is their choice whether to do so.

If the libraries you intend to link with are nonfree, please also see the section on writing Free Software which uses nonfree libraries.

If you're using GPLv3, you can accomplish this goal by granting an additional permission under section 7. The following license notice will do that. You must replace all the text in brackets with text that is appropriate for your program. If not everybody can distribute source for the libraries you intend to link with, you should remove the text in braces; otherwise, just remove the braces themselves.

Copyright (C) [years] [name of copyright holder]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see https://www.gnu.org/licenses.

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. {Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.}

If you're using GPLv2, you can provide your own exception to the license's terms. The following license notice will do that. Again, you must replace all the text in brackets with text that is appropriate for your program. If not everybody can distribute source for the libraries you intend to link with, you should remove the text in braces; otherwise, just remove the braces themselves.

Copyright (C) [years] [name of copyright holder]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see https://www.gnu.org/licenses.

Linking [name of your program] statically or dynamically with other modules is making a combined work based on [name of your program]. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

In addition, as a special exception, the copyright holders of [name of your program] give you permission to combine [name of your program] with free software programs or libraries that are released under the GNU LGPL and with code included in the standard release of [name of library] under the [name of library's license] (or modified versions of such code, with unchanged license). You may copy and distribute such a system following the terms of the GNU GPL for [name of your program] and the licenses of the other code concerned{, provided that you include the source code of that other code when and as the GNU GPL requires distribution of source code}.

Note that people who make modified versions of [name of your program] are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU General Public License gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.

https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs

Rosalie241 commented 5 months ago

The GPLv3 license allows other parties to use the code in a commercial product so it doesn't matter if you are personally doing so.

that's irrelevant because RMG has no commercial distribution, that'd only be relevant if someone would make a commercial distribution of RMG, but even then that'd only apply to them, which they could work around by not shipping angrylion-rdp-plus.

Regardless they can't be distributed together, but even in cases where they are not distributed together it can be problematic as explained by GNU.

that license snippet talks about linking against libraries, but RMG doesn't link against plugins so that's irrelevant license-wise, plugins just expose an API that RMG and mupen64plus use.

carmiker commented 5 months ago

In practice, nobody actually cares about this, and the author of the original angrylion code (and angrylion-rdp-plus) would need to enforce the copyright.

Why this is important to bring up at all is that someone wishing to redistribute the software is potentially violating the license. In order to make RMG redistributable by Linux distros or other third parties and still be completely in the clear, the question needs to be resolved. On the other hand, I do see some distros are redistributing this software, but perhaps without a robust legal analysis: https://repology.org/project/rmg/versions

My opinion (and I am not a lawyer either) is that there are two ways to resolve this question: never distribute angrylion with the rest of RMG (distribute separately), or somehow aim for a relicensing of the angrylion code. The second option would be nice, as it would become useful to far more people :).

That being said, this is a great project and it would be nice to see it more widely available. I believe that is the spirit behind the bug report, not GPL zealotry.

orbea commented 5 months ago

That being said, this is a great project and it would be nice to see it more widely available. I believe that is the spirit behind the bug report, not GPL zealotry.

Yes, I was considering packaging this for Gentoo, but I believe this issue would make that not acceptable.

Rosalie241 commented 5 months ago

Why this is important to bring up at all is that someone wishing to redistribute the software is potentially violating the license.

I disagree with the idea that RMG is potentionally violating the license with my points listed above though, and if this would be a concern for packagers who think it does then they can patch RMG easily so it doesn't build angrylion-rdp-plus.

My opinion (and I am not a lawyer either) is that there are two ways to resolve this question: never distribute angrylion with the rest of RMG (distribute separately), or somehow aim for a relicensing of the angrylion code. The second option would be nice, as it would become useful to far more people :).

I heavily doubt the code will ever be re-licensed and not shipping angrylion-rdp-plus isn't something I want to do on an allegation that RMG is violating the license, which in my opinion hasn't been proven.

Jj0YzL5nvJ commented 5 months ago

If I understand correctly, the problem is that the intention of GPL is the protection and free distribution of software without any limitations. Which invalidates the GPL license when including any other license that contains any other type of limitation, in this case a non-commercial license even if the final product is not commercial. It's the same situation why free FFmpeg library support sucks on Debian-based distributions.

From what I understand Mupen64Plus-Next core is GPLv2 on Steam? How does that work with angrylion-rdp-plus?

The following projects have been incorporated into this core:

mupen64plus GLideN64 cxd4 parallel-rsp angrylion-rdp-plus (Currently based on its ParaLLel variant)

Are they using "angrylion-rdp-plus" ambiguously when they actually mean "parallel-rdp"?

Edit:

In the worst case, downloading angrylion-rdp-plus directly from the nightly-build will be handled at the user's request, with angrylion-rdp-plus.tiger.txt you can validate the file size without hashdeep and use sha256 or sha512 to validate the download...

carmiker commented 5 months ago

@Jj0YzL5nvJ, the truth is that nobody really cares because the person who wrote the original angrylion code is not going to enforce the copyright, and there is more backstory to this that I won't get into here.

However, the fact remains that you can't distribute GPL and non-commercial software together without breaching the terms of the license. To work around this, optional non-FOSS components are often distributed separately, placing the burden on the user. The linkage issue has been interpreted in two ways -- either that "linking" means only static linking, or it means both static and dynamic linking. The dynamic linking theory has never been tested, and I am not sure it is very important anyway, since the user would have to report themselves for loading a non-FOSS library in a GPL program.

Ultimately, this is something that only matters to people who are repackaging or distributing the software. This does limit the potential reach of the software if there are concerns about licensing, especially in the case of more cautious distros like Debian and Gentoo. The solution is for the upstream project to make it easy to build the package without the non-FOSS components, or alleviate some of the burden of separating the components for separate distribution.

Rosalie241 commented 5 months ago

However, the fact remains that you can't distribute GPL and non-commercial software together without breaching the terms of the license.

@orbea didn't provide a snippet from the GPL which says this though, they provided snippets from the MAME license which don't apply to RMG and then a long snippet about linking libraries, which also doesn't apply because RMG does not link against any of it's plugins, it discovers them dynamically at runtime and then optionally uses them using dlopen, which is different from linking against a library. If they opened this issue with snippets saying exactly 'you cannot include non-commercial libraries which are optionally used at runtime using dlopen in a distribution where GPL software is used' then there would be no issue or discussion because then I'd just follow the license and remove it, but as it stands there hasn't been any solid proof that RMG is currently violating the license from what I've been told and shown in this issue.

Rosalie241 commented 5 months ago

I tried to notify upstream, but that didn't seem to go well...

@orbea saying this doesn't make you look good FYI, it's rather mean in my opinion, I've reacted based on your snippets with honesty and fact, and claiming RMG violates a license is a rather big claim which I'd like solid proof for which you haven't provided (see my comment above), and going after maintainers to inform them about this claim also isn't great.

carmiker commented 5 months ago

@orbea didn't provide a snippet from the GPL which says this though, they provided snippets from the MAME license which don't apply to RMG and then a long snippet about linking libraries, which also doesn't apply because RMG does not link against any of it's plugins, it discovers them dynamically at runtime and then optionally uses them using dlopen, which is different from linking against a library. If they opened this issue with snippets saying exactly 'you cannot include non-commercial libraries which are optionally used at runtime using dlopen in a distribution where GPL software is used' then there would be no issue or discussion because then I'd just follow the license and remove it, but as it stands there hasn't been any solid proof that RMG is currently violating the license from what I've been told and shown in this issue.

https://www.gnu.org/licenses/gpl-faq.html#MereAggregation GNU's interpretation suggests that dlopen would still qualify as "linking", which makes sense considering libdl is a "dynamic linking" library, it is in the name. This is what I was referring to in a previous post. I believe I was wrong on one point though -- that you can't distribute GPL and non-FOSS software together, because it looks like you can as long as the code doesn't combine to become one "program". In this case though, it does.

I would like to add that this is not nearly as big of a deal as it is being made out to be. It is very easy to violate GNU licenses, and it happens quite regularly. I have done it accidentally, and when informed I quickly resolved the problem (I had been distributing GPLv2-only as GPLv2+). Getting into compliance is usually very easy. I know it's annoying, and that's why when I write software I use the 3-Clause BSD license :).

Rosalie241 commented 5 months ago

well, I didn't know that but thank you for the explanation, but doesn't that also mean Project64 is also not GPL compliant due to it shipping nonfree plugins by default (jabo's video and jabo's audio plugin)?

carmiker commented 5 months ago

@Rosalie241, this is unfortunately the norm in the emulation scene. There is a lot of license violation going on, and though many people have good intentions, it complicates things when you look at adding emulation projects to Linux distros. Specifically, N64 emulation has always been a bit of a sore spot. I became intimately familiar with this issue with angrylion (including the backstory of how it was created... oh boy) as a result of doing preliminary research into writing my own N64 emulator, and wanting to have pure software rendering only -- now I think my only option will be ParaLLEl-RDP, which requires Vulkan-compute support. This is why I brought up the idea of somehow getting angrylion relicensed, if the person were willing to come forward and do so, even though I know this is a longshot.

Rosalie241 commented 5 months ago

That sucks, but wouldn't a compromise work, i.e disabling building angrylion-rdp-plus by default so linux distros will be safe but for the 'official' distributions (appimage, flatpak, AUR) I'd include it myself and be ''liable'' for any issues with those.

carmiker commented 5 months ago

That sucks, but wouldn't a compromise work, i.e disabling building angrylion-rdp-plus by default so linux distros will be safe but for the 'official' distributions (appimage, flatpak, AUR) I'd include it myself and be ''liable'' for any issues with those.

Yes, this is exactly what I would suggest doing to rectify the issue.

Rosalie241 commented 5 months ago

pushed a commit to github which adds the USE_ANGRYLION option which is disabled by default: https://github.com/Rosalie241/RMG/commit/559cb6ba37f22b11ca2ca944c1db3d46faed97a5, it'll be included in the next release which might take a little while because I don't work on RMG a lot lately, but this patch can easily be backported by distros.

Rosalie241 commented 5 months ago

@orbea I'd also like to apologize for my behavior, license stuff really is just annoying and I've been having a bad time lately which doesn't help, I'll try to be nicer next time, thank you for bringing it to my attention and @carmiker thank you for explaining things to me which helped clear things up :heart:

loganmc10 commented 5 months ago

I just want to say that in the future @Rosalie241 you should just ignore this kind of thing. Harassing well-meaning open source developers who are distributing their work for free is an odd hobby that some people take up... Especially when it's not even coming from the author of the work in question.

Just tell them to pound sand next time...

orbea commented 5 months ago

@loganmc10 Because @Rosalie241 kindly helped out here I was able to create an ebuild for RMG. I considered doing this for Simple64 too, but you didn't seem interested. :shrug:

loganmc10 commented 5 months ago

I don't think that was ever a problem, AdvanceMAME is already distributed by Gentoo, with the same license:

https://packages.gentoo.org/packages/games-emulation/advancemame

https://github.com/amadvance/advancemame/blob/master/COPYING

Dual licensed using the XMAME and GPL-2 license, clearly stated on the Gentoo website.

This was all just creating problems where none existed...

orbea commented 5 months ago

With the XMAME license code enabled Gentoo will mask the package by default.

!!! All ebuilds that could satisfy "rmg" have been masked.
!!! One of the following masked packages is required to complete your request:
- games-emulation/rmg-9999::9stoats (masked by: XMAME license(s), missing keyword)
A copy of the 'XMAME' license is located at '/var/db/repos/gentoo/licenses/XMAME'.

- games-emulation/rmg-0.5.7::gentoo (masked by: XMAME license(s))

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

This requires the user to unmask the package manually and this can be problematic based on their preferences and / or use case, but I don't control the advancemame package anyways. I think the resolution for this issue was beneficial as it allows even stricter distros to ship RMG without such issues.

Additionally as already alluded here earlier the angrylion code may have deeper problems than being XMAME and the final ebuild may not provide it all depending on decisions made by the Gentoo devs which are beyond my control.

loganmc10 commented 5 months ago

You didn't open the issue as "can't distribute via Gentoo without masking", it was "License Violation"

Regardless they can't be distributed together

Why this is important to bring up at all is that someone wishing to redistribute the software is potentially violating the license.

However, the fact remains that you can't distribute GPL and non-commercial software together without breaching the terms of the license.

etc...etc..etc... This is all armchair lawyer stuff that should just be ignored (IMHO).

carmiker commented 5 months ago

@loganmc10 we are all fans of the N64 here, and everyone who has commented here has done so in the spirit of improving a program they like to use. Sometimes communication problems happen, as not everyone speaks English as their first language, and some people are not neurotypical, so it is best to give the benefit of the doubt and not assume hostility. This issue was resolved amicably, and I believe it is now time to leave it to rest.

Rosalie241 commented 5 months ago

I agree we should leave it to rest, so I'll lock this issue to prevent others from jumping in and causing further hostility, if anyone wants to discuss this further they can contact me privately either through my e-mail or on discord.