10

I am now working with some ~2005 C CLI code, licensed as GPLv2-only. I hope to do the following things:

  1. Port the code to a more recent environment (e.g. port to Ubuntu 22.04) (I only do this to try to get it running on a modern machine for doing the following steps)
  2. Write a library in a different language (e.g. C#) based on findings made when doing (1) with the functionality of (1) (Note: not porting, but coding the same features with (possibly) entirely different code, without looking at the original code or (1))
  3. Port (2) back to C
  4. Build CLIs for both (2) and (3) in their respective languages (i.e. C & C#)

For (1) I'm certain I need to license it as GPLv2-only, but for the others I'm uncertain, and my goal is make my software available under the MIT/Expat License. Am I required to make them all GPLv2-only?

8
  • 1
    Note that in step 1 you don't have to publish the ported code if you only use it yourself. If you share the ported program, e.g. in compiled format, then the receivers have the rights to get the source code for that and GPLv2 also applies to that code.
    – md2perpe
    Commented May 14, 2023 at 12:34
  • 1
    How are you going to do 1 without looking at the code?
    – Barmar
    Commented May 15, 2023 at 14:38
  • 2
    To summarize some long comment threads: The plan is fine, as long as you have different people doing #1 and #2, and the "findings made when doing (1)" passed between them are highly abstracted
    – Ben Voigt
    Commented May 15, 2023 at 14:46
  • 1
    Since this is a CLI (command-line interface) app, another option is to have someone (or yourself) write up a specification without even looking at the code. That is, list out what each argument does (in abstract terms, without copying the precise wording). Give some example inputs outputs (arguments supplied vs. output or actions performed), etc. Then implement that specification in your "step 2" without needing to look too much at the code as you've proposed in "step 1".
    – Brandin
    Commented May 16, 2023 at 8:44
  • 1
    Also it's really your title that gives away the problem -- "reimplementing" is the wrong word to think about if you want to make your own version of a program that does X. Solving the same problem in your program doesn't make your program derivative of an older program that solves the same problem. Offering the same command-line options does not make it derivative either. "Reimplementing" the same code, or a translation of that code, however, would make it derivative.
    – Brandin
    Commented May 16, 2023 at 8:52

1 Answer 1

14

Yes. A derivative is a derivative. Porting existing code to another language also counts as making a modification.

NOT a derivative is a so-called blackbox implementation. That is the case when you look only at the behaviour of the library WITHOUT looking at the code and re-implement that; this might be argued still to some degree if you take the interface definition but not the implementation and implement the code without resorting to looking at the implementation at all (this was important in the quarrels between google and oracle).

Prominent example very similar to your question is where this became an issue was within the mercurial ecosystem. There the developers cracked down on re-implementations in other languages which their authors wanted to distribute under a permissive license without the original mercurial developers consent. Some original discussion from 15 years back is here.

3
  • Then can I upgrade them to GPLv3?
    – ZP-ZPanda
    Commented May 13, 2023 at 12:06
  • 3
    @ZP-ZPanda If the version is specifically stated as "GNU GPL v2" or even more explicitly as "v2-only", and without an "at your option any later version", then you cannot upgrade to v3 no. (However, you. can license any additions you do as GNU GPL v2-or-later in which case it is valid to combine with v2-only things. The combined work is then only applicable as v2.)
    – ecm
    Commented May 13, 2023 at 19:00
  • Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on Open Source Meta, or in Open Source Chat. Comments continuing discussion may be removed.
    – MadHatter
    Commented May 16, 2023 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.