0

If program B is licensed under GPL, can a programmer modify it to interact with his own proprietary program, A, such that both programs are separate processes, and then only release the modified source code only for program B?

I was thinking of program B being turned into a "black box" for program A, but instead of it being a function it's a completely separate program.

I'm not seeking legal advice, I'm trying to understand more about free software and its complications without being too technical. Unfortunately, the GPL faq talks about linked libraries and other things I haven't covered yet in school, so it is difficult for me to wrap my mind around the "general" case here.

  • see Can we take ideas from GPL programs in developing any commercial app "Ideas, yes. Source code, no..." – gnat May 20 '15 at 16:43
  • Short answer - yes. If B is modified in such a way that it meets the loopholes that the GPL provides, then A can remain proprietary and all that has to be released is the modifications to B. – user53019 May 20 '15 at 16:43
  • 1
  • 2
    Ready the entirety of this page: gnu.org/licenses/gpl-faq.html – whatsisname May 20 '15 at 16:49
  • 1
    While the FSF has their view (which it's probably safest to go by), the actual rules that would apply in court depend on local copyright law, and I'm not actually sure courts have ruled on how closely related the two have to be before A is a derivative work of B (if whatever you're doing wouldn't violate copyright even without any license, the GPL can't stop you from doing it). – cpast May 20 '15 at 21:12
1

First, it does not matter if you change B afterwards as long as you publish your modifications under GPL again. B could have been written (and published) that way by the original author, before you already started to create A.

So your situation is probably one of the two scenarios described in the GPL FAQ under

or

(pick your choice which one fits better to your case).

When you read the two sections, you see the critical point in both cases is if the communication between the free and the non-free program is done just by "fork and exec" (or whatever equivalent the OS you are using provides). If, however, the two pieces of software "make function calls to each other and share data structures", you are violating the GPL (that is actually how I would interpret the FAQ, but IANAL).

  • I thought of a good example. Let's assume there is a GPL game. I modify the game such that it checks for an expansion; if it exists, then it loads it, if it doesn't, then the GPL game behaves exactly as it was originally written. Is there no way to make a commercial expansion to the game, which includes original game source code with it, but not the expansion source? A game expansion would necessarily require sharing data structures. – temetvince May 20 '15 at 18:40
  • @temetvince: it depends, and I think the line is blurry. I can think of examples where the game just provides an input file and a path for an output file, and the expansion is called by fork/exec with nothing but two file names as parameter. For example, the GPL part maybe a chess playing frontend, and the closed source part is a separated backend - the frontend provides the current chess board + the information whose turn it is, and the backend calculates the next move. – Doc Brown May 20 '15 at 19:10
  • Doc Brown, thank you for continuing to clarify for me. Your last comment helps me understand this a bit more. What I'm wondering now, though, is that all data structures for any program could technically be handled though input/output files. How would the chess program example be any different from, say, modifying any GPL program to express it's behavior in terms of input/output files, and then bolting on a proprietary program through the file interface? – temetvince May 20 '15 at 19:29
  • @temetvince: well, this approach has limits. Using the chess example, it will become hard to provide a GPL compliant progress indicator by the backend to signal how long it will take until it finishes its calculation. You are technically forbidden to reuse the datastructures for the chess board implemented in the GPL part within the closed source part - you have to make a clean-room implementation for these. For other games, there maybe real time constraints which are hard to fulfill with the separate-file approach. – Doc Brown May 20 '15 at 19:39
0

You take GPL-licensed program B, modify it, and release the result under GPL. That's just what you should do. No matter what A does with B as long as A is in independent program.

The tricky question is what happens if your proprietary program doesn't do anything useful unless there is also B running and you write and distribute a wrapper (say, W) which makes it easier for the user to run A and B together. Than the entire A+B+W package could be considered a derived work and legal difficulties can arise. Possibly, the safest way would be to tell the user that they have to get B themselves and start it the right way so that A can run. If that's not practical it could (depending on the situation) indeed be necessary that A (or at least W) is also open-sourced or you find an alternative to B which does not have the license restriction.

  • 2
    "No matter what A does with B as long as A is in independent program.", this isn't necessarily true, see gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem – whatsisname May 20 '15 at 16:52
  • "Possibly, the safest way would be to tell the user that they have to get B themselves and start it the right way so that A can run." How is this different from creating a program that, once the user downloads B, the program runs through the B source and automatically adds your changes to B, then compiles it? It seems like this would not be allowed. – temetvince May 20 '15 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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