I wanna use a GPL-2 software library which is distributed in two flavors: GPL-2 and a proprietary license. The proprietary license is very expensive though.

Currently, there are no real commercial alternatives on the market.

Only about 10% of my software will be based on GPL-2 code.


  1. Am I allowed to develop commercial software for which I sell a license for + service yearly (updated version) with the right for the customer to receive the code?

  2. What right does the customer has concerning the code? Can he recompile and extend my software and sell it as I am doing?

  3. Which part(s) of the software is affected by the obligation to publish or give the code to the customer (the whole software, only the parts that use the GPL-2 code etc.)?

1 Answer 1


The GPL is a copyleft open source license: it allows you to use and modify the GPL-covered software for any purpose. But when you create a modified version (such as by including GPL-covered code into a larger program), then you can only distribute that modified version under GPL terms, and all recipients/customers get the same freedom to use and modify that software for any purpose.

So the answer to question 1 is yes, you can sell software based on GPL-covered components. However, you must not only give your customers the corresponding source code, but also the right per the GPL license to use and modify that software for any purpose. So, the customers would legally be able to re-sell the GPL-covered software (potentially including some or all of your code).

This makes it difficult to "sell" GPL-covered software. The cost for the software itself tends towards zero. Instead, business models around GPL-covered software tend to involve:

  • selling support contracts – the RedHat model
  • consulting work to implement specific features
  • selling convenience, e.g. packaging binaries for easy installation
  • dual licensing – that's the model used by the library you'd like to use
  • open core (but for copyleft licenses that requires a kind of dual licensing)

Another possible solution lies in your question 3.

The GPL itself does not clearly explain the scope of its copyleft effect. Instead, this depends entirely on what copyright law in your applicable jurisdictions consider to be a derivative work. However, the general understanding in the open source community is that the GPL applies roughly on a per-process level. If a program is designed to link to a GPL-covered library (statically or dynamically), then the entire program would be GPL-covered – not just those specific components that interact directly with GPL-covered components. In particular, this means that you can't insulate a proprietary component from a GPL-covered component with a permissively licensed component in between.

But if the proprietary component and the GPL-covered components are in entirely separate programs, that would be fine. The GPL allows GPL-covered code to be distributed alongside proprietary software ("mere aggregation"). Thus, it might be possible to wrap the GPL-covered component with a generic command line interface or REST API, to publish that GPL-covered program, and to then interact with that separate program from your proprietary code. For example, you can write proprietary code that interacts with a copyleft-licensed database engine, as long as the database runs in a separate process and you only interact via the database's wire protocol.

  • 7
    The GPL very clearly explains the scope of its copyleft effect: if your work is, in copyright terms, a derivative of a work you received under GPL, then when you distribute your work, you must do so under GPL. What GPL doesn't have is any brightline tests for whether your work is or is not a derivative, but that's because copyright laws generally don't include such brightline tests - such as "80% rules of thumb", which I've certainly never heard of - and GPL (as a copyright licence) can only go where copyright goes.
    – MadHatter
    Apr 10, 2023 at 13:06
  • 2
    @MadHatter Excellent point, I added a sentence to explain that the GPL ultimately delegates to copyright law, which is jurisdiction-dependent.
    – amon
    Apr 10, 2023 at 15:02
  • Comments have been moved to chat; please do not continue the discussion here.
    – MadHatter
    Apr 11, 2023 at 5:58
  • 1
    The answer is incorrect that GPL applies on a per-process level. It's a very rough rule of thumb that works in some cases. The actual consensus is "arm's length communication"; two different processes may communicate at arm's length or not, and so may two different modules loaded into the same process. Calling on the GPL code as a completely separate program (e.g. ffmpeg to transcode a video file) is often a good way to do this, but it's neither sufficient nor necessary.
    – user253751
    Apr 11, 2023 at 17:50
  • also, two programs that interact in any way are not "merely aggregated".
    – user253751
    Apr 11, 2023 at 17:53

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.