Let me describe the situation: there's an old piece of software (a game) with source code publically available. Source code was (officially, legally) released with following non-free license:

The source code to GAME NAME is copyright (c) YEAR-YEAR NAME and is provided as-is with no warranty for its suitability for use. You may not use this source code in full or in part for commercial purposes. Any use must include a clearly visible credit to NAME as the creators and owners, and reiteration of this license.

Since the initial release, several people/teams updated it, modified (substantially, e.g. by porting to SDL2) - but every fork eventually fizzled out and died (it's playable on modern Linux systems, but I haven't tried it myself yet).

I am thinking about picking up the fork and maintaining it, but I don't feel like working on non-free software (it would be pointless, IMHO). I was planning to dual-license all of my future changes under original license and GPLv3, and clearly indicate this in Git repo - e.g. by marking every change that modifies code (so every change sans formatting) as GPL-compatible. This way I was planning to gradually liberate the code, so eventually, when all lines would be covered by GPL, I could release it with GPLv3 being primary license. Maybe some older maintainers would agree to re-license their changes on GPL as well (that would speed up the process).

Is it legally defensible? Has there been any precedence for liberating source code this way? Is there some better license than GPLv3 to handle such a transition? (LGPL maybe?)

[edit] Clarifying question: what if the gradual rewrite was not line-by-line (commit-by-commit), but instead module-by-module (maybe even using completely different language linking to the original source code compiled as shared object). LGPL seems to be ideally suited for this purpose.

  • 2
    I am not a legal expert, but I would imagine that your new code could be said to be a derivative of the original code. Commented Aug 19, 2019 at 5:33
  • 1
    Such a strategy was used for one of the first open source projects ever: the gradual porting of Unix by the BSD project, until eventually no proprietary files were left.
    – amon
    Commented Aug 19, 2019 at 8:30
  • 1
    @amon Didn't gradual porting of Unix happen program-by-program (each program might've been a single source code file back then). Commented Aug 19, 2019 at 14:38
  • @PatrykObara That was GNU, not BSD. Unix was originally owned by Bell Labs, later AT&T. Source code was made available to recipients (at cost) for customization/porting. The Computer Systems Research Group at UC Berkeley acquired the source and made various adaptions both to user-space programs and the kernel which were widely shared. By '79 large parts of the kernel were already custom. In the late 80s Unix became unaffordable so there was a concerted effort to get rid of remaining AT&T parts. AT&T considered that infringement and sued in '92, but later settled with changes to 73/18000 files.
    – amon
    Commented Aug 19, 2019 at 15:09
  • I think your question is basically asking if you can rewrite a program piece by piece to avoid the license. The answer is No and is covered elsewhere on this site, e.g. Does rewriting a library in another language allow escaping GPL?
    – Brandin
    Commented Aug 20, 2019 at 8:30

2 Answers 2


The most obvious problem with this plan is that by including GPL-licensed code alongside code under a GPL-incompatible license, you might make it impossible for anyone else to distribute the software. As far as my legal knowledge extend, downstream recipients may only distribute a work that includes your GPL-licensed code if they distribute the overall work as a whole under the terms of the GPL (per GPLv3 sect. 5(c)). You could avoid this problem by employing a GPL exception. Supposing your game was called, say, Foos Versus Bar, you might draft an exception like

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with Foos Versus Bar (or a modified version of that program), containing parts covered by the terms of Foos Versus Bar, 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 Foos Versus Bar used as well as that of the covered work.

In this way, downstream distributors have permission to distribute the work notwithstanding the inability to distribute the whole work under GPL terms.

With that problem out of the way, there still remains these problems:

  • It isn't perfectly clear that this license allows modification at all (the only permission granted is a vague "use" which doesn't clearly correspond to any particular set of copyright rights). It clearly indicates what you may not do, and requirements for use, but does not make explicit what use is allowed.

  • Considering that developers doing internal modifications to files have definitely seen the original code, their code is very likely a derivative of the original code. Per the above issue, this license doesn't clearly license the right to prepare derivatives or, if it is allowed, under what terms they may be prepared. This means the derivative modifications may be disallowed entirety or may have to be made under the original non-commercial terms. If either of those cases applied, then even an all-at-once wholesale rewrite of the entire program could not be licensed under the GPL, unless you applied clean-room practices.

  • 1
    What's your take on using LGPL and rewriting the game module-by-module using interfaces from original headers, but without further changes to original code? Commented Aug 19, 2019 at 15:37
  • 1
    @PatrykObara Not the same person, but as far as I know, headers are still copyrighted. If you build a program using those headers then it may still be seen as including code from the original game. Commented Aug 21, 2019 at 3:25
  • 1
    Headers are copyrightable, but interfaces / ABIs are not AFAIK. Obviously, I couldn't use any code defined in header files, but declarations are ok. Commented Aug 21, 2019 at 6:05

No, your tactic is not legally defensible.

First of all, the GPL license requires that all code of the project/game is available under a GPL-compatible open-source license and the original game code isn't. This means that you can't use the GPL or a similar copyleft license.

Secondly, even if you would use a compatible license, you will run into Thesius' paradox. If you replace the existing code, it is unclear what would happen to the copyright of the original authors. The current safe assumption is that they can still claim copyright and must agree to a license change.

  • 2
    It is possible to add an exception to the GPL that allows linking with proprietary code, similar to the LGPL. To which degree Theseus' Ship poses a problem is jurisdiction-specific. In general, as long as the modifications have been made legally, it is possible that with sufficiently pervasive modifications the original author's copyright in the modified work fades away. Copyright protects creative expression, not some metaphysical concept of identity.
    – amon
    Commented Aug 19, 2019 at 8:39
  • 1
    @amon I don't disagree with you (though I don't entirely agree, either) but given that the OP is clearly desperate not to disclose the actual game in question (see italics supra) I don't see that we can give a clearer answer than Bart's.
    – MadHatter
    Commented Aug 19, 2019 at 11:39
  • @MadHatter oh, I am not desperate - just wanted to avoid the risk of discussion (here or somewhere else) degenerating into a rant about current IP owner. The game in question is Aliens versus Predator, the copyright owner Rebellion Developments. Commented Aug 19, 2019 at 14:14
  • @PatrykObara you want to edit that into the question, then?
    – MadHatter
    Commented Aug 19, 2019 at 14:21
  • No, I would prefer leaving this information out of question text; I already mentioned that source code was released officially and legally. What about LGPL? And what if rewrite was not line-by-line but module-by-module (maybe even in a different language dynamically linking to original source code in the interim period). Commented Aug 19, 2019 at 14:32

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.