Opened 3 years ago

Last modified 3 years ago

#162 new defect

Licensing problem

Reported by: spotrh@… Owned by: pulkomandy
Priority: major Milestone: 2.9
Component: GrafX2 Version: 2.7
Keywords: Cc:

Description

Hi GrafX2 folks, I'm the package maintainer for GrafX2 in Fedora. When I went to do the update to 2.7, I noticed that you had an added 3rd party dependency on https://github.com/redcode/6502/. This code is GPLv3 or later.

The problem is that the GrafX2 code is GPLv2 only (not GPLv2 or later), and you cannot mix code that is GPLv2 only and GPLv3. That combination results in a mix of licenses that cannot be complied with simultaneously.

See: https://www.gnu.org/licenses/gpl-faq.html#v2v3Compatibility

Note that this was not an issue before, because recoil (your other main 3rd party dependency) is GPLv2 or later (thus, compatible).

Technically, you also have some CeCILL v2 code in the mix as well (libraw2crtc.*), but since CeCILL v2 clause 5.3.4 says you can use it under the terms of any specific version of the GPL, it can adjust to be either GPLv2 or GPLv3 as needed.

Until the license compatibility issue is resolved, Fedora cannot update to the latest version.

There are a few ways you can resolve this licensing incompatibility:

  1. Relicense all of the GPLv2-only code files in GrafX2 to GPLv2 or later. The effective result of this is that you combine GrafX2 (GPLv2+) with recoil (GPLv2+) and 6502 (GPLv3) and the binary is effectively GPLv3. Since this is the case, you might consider instead ...
  2. Relicense all of the GPLv2-only code files in GrafX2 to GPLv3 (or GPLv3 or later if you want to try to future proof compatibility with a hypothetical GPLv4).
  3. Remove the GPLv3 code (6502), then the license compatibility issue goes away.
  4. Ask the 6052 upstream to relicense their code to either GPLv2 (or GPLv2 or later). I do not recommend this option, as it implies they are responsible for your license problem... but if they did this, your license compatibility issue would go away. :)

If any of this is unclear, please let me know. I have been doing FOSS licensing work for a very long time and I am happy to explain anything in more detail.

Attachments (1)

6502-RELICENSE (1.1 KB ) - added by Thomas Bernard 3 years ago.
the 6502 emulator granted us a specific license.

Download all attachments as: .zip

Change History (10)

comment:1 by PulkoMandy, 3 years ago

Hi,

Yes, this is a known issue.

We have been working to clarify the license on a few other parts as well, and get more formal permission from the authors of some bundled code for a less restrictive license (mainly for loader code that gets included into images exported to some formats).

It's unsure if we can contact all contributors from the last 15 years to get agreement to change to GPLv2+ or GPLv3.

I had intentionally decided to use GPLv2 (only) at the time because I feel I do not trust the (future) FSF enough to allow them to decide on any future license terms for my code.

Our other option is to find or write a 6502 emulator under a compatible license.

For libraw2crtc, note that upstream has since relicensed the code to WTFPL, so, we could update to a current version.

You can find a more complete analysis of the licensing status here:

https://gitlab.com/GrafX2/grafX2/-/blob/master/COPYRIGHT.txt

Another (much older) problem is the realpath.c file, which was imported from some support code for Amiga software. There is no clear license attached to that and I can't find an online source for it anymore. However, this file is not needed when building on Linux, because there is a native realpath implementation.

comment:2 by spotrh@…, 3 years ago

Regarding realpath.c: The core of this code came from the "GeekGadgets" project, which was intended to be a GNU standard environment for AmigaOS and BeOS.

You can see a copy of the original file thanks to the Internet Archive here:
https://web.archive.org/web/20060209043749/http://amiga.sourceforge.net/amigadevhelp/FUNCTIONS/GeekGadgets/realpath/ex02_realpath.c

Sadly, as was common in those days, there is no mention of license or even copyright holder in that file.

Digging deeper, there is an indication of who uploaded the code:
https://web.archive.org/web/20100601062739/http://amiga.sourceforge.net/amigadevhelp/phpwebdev.php?action=Search&funcgroup=GeekGadgets&keyword=realpath

At the bottom, we can see that "LouiSe_" uploaded example 2 on 20040301131355. Email for "LouiSe_" is louise@…, and more digging reveals that to be the handle for Lajos Nagy. I think this is Lajos: https://github.com/louisehu

Digging even deeper, Google has a cache of louise.hu from November 2020 and the Wayback Machine has several copies. I was able to connect with Lajos via Skype chat (from a contact on louise.hu) and he confirmed that while he was "LouiSe_" (and he ran the website where that code was posted), he does not remember whether he is the author for that code or not. After all, it was a long time ago.

Based on this, I think your best bet is either to drop that code or reimplement it. I'm not sure how important AmigaOS support is for you. There is some code in GNU coreutils that might work.

comment:3 by Thomas Bernard, 3 years ago

why don't you just remove realpath.c and all 6502* sources from the fedora project ?

I mean, wouldn't it allow you to update the fedora package before we get everything fixed on our side ?

about realpath.c, if there is no known author for the code despite your research, doesn't that mean the code is public domain ?

I have another question about ​https://github.com/redcode/6502/
Would making a library out of that code and link GrafX2 against it be allowed by the GPLv3 license ?

comment:4 by PulkoMandy, 3 years ago

about realpath.c, if there is no known author for the code despite your research, doesn't that mean the code is public domain ?

No, that makes the copyright unknown and no one is allowed to redistribute the code without agreement from the author in that case.

Would making a library out of that code and link GrafX2 against it be allowed by the GPLv3 license ?

No, that is the "viral" part of the GPL. The LGPL license is designed to avoid this, but not the GPL.

comment:5 by yrizoud@…, 3 years ago

Now this was some impressive detective work :)

The archived GeekGadget page presents a second implementation of realpath(), with a GPL2+ license and copyright 1993 Rick Sladkey
https://web.archive.org/web/20060209043834/http://amiga.sourceforge.net/amigadevhelp/syntax-hi/ex.php?examplefile=FUNCTIONS/GeekGadgets/realpath/ex01_realpath.c

It appears as well in rpm 5.2.1 (yes, the RedHat package manager), still with a single copyright holder
https://fossies.org/dox/rpm-5.2.1/realpath_8c_source.html
The two versions are extremely close, not sure which one evolved from the other.

If the (libc) dependencies are all available on the platforms where we need it, this could be a possible replacement.

why don't you just remove realpath.c and all 6502* sources from the fedora project ?

@Thomas, realpath may be easy to patch out because it's a block of code that compiled to nothing anyway on this platform, but for 6502 is not trivial. It's up to us to choose what happens when the library is not compiled, and provide an easy way to do it.

comment:6 by spotrh@…, 3 years ago

I had hoped it would have a happier ending. Usually, when I go on an author hunt (and they're still alive), they remember the code and are happy to resolve the licensing.

As for Fedora, I will hold on pushing an update until the issue is resolved. I'll watch this ticket. :)

by Thomas Bernard, 3 years ago

Attachment: 6502-RELICENSE added

the 6502 emulator granted us a specific license.

comment:7 by spotrh@…, 3 years ago

Nice work. With that relicensing (and replacing realpath.c with just the wrapper to the Linux realpath()), Fedora can make this update.

Thanks!

comment:9 by PulkoMandy, 3 years ago

Milestone: 2.82.9
Note: See TracTickets for help on using tickets.