4

I wrote a library that is indeed a subclass of QTreeView. So I can easily attach it to any Qt application that uses QTreeView.

I want to patch a GPL application (GPL_APP) in a way that it searches for my library and if it exists then loads it, but if it is not found, GPL_APP will continue to work without it.

I will publish them separately, GPL_APP will be released with its full source-code, but library will be closed source.

The library is in theory usable with other applications, but as there is no other application with compatible interface to load my library, GPL_APP is the only application that can use it, and therefore I know in first place that users will combine them.

Is this violating GPL?

  • Do you own the GPL application or is that written by someone else? – Bart van Ingen Schenau Sep 16 '18 at 15:29
  • No. GPL_APP is written by someone else and also uses codes from some other GPLed applications by other developers. – user13113 Sep 16 '18 at 17:30
  • 1
  • Yeah, thanks for link. Well, indeed I want to know the last statement in that page A main program that is separate from its plug-ins makes no requirements for the plug-ins. is applicable when I release them separately and application can work separately, while my goal is that users download and combine them? – user13113 Sep 17 '18 at 7:46
  • 1
    @user13113 According to GNU project, linking a plug-in using dynamic linking makes that plug-in an extension of the main program. In other words, they would not be considered separate programs in that case. – Brandin Sep 18 '18 at 12:13
3

TL;DR: Keeping your library closed source will violate the GPL.

As already mentioned in the comments, your question is answered by the FAQ:

If the main program and the plugins are a single combined program then this means you must license the plug-in under the GPL or a GPL-compatible free software license and distribute it with source code in a GPL-compliant way. A main program that is separate from its plug-ins makes no requirements for the plug-ins.

Regarding your follow up question, it does not suffice to release the software separately, specifically your part of the question:

but as there is no other application with compatible interface to load my library

is a signal that you are doing derivative work from the GPL. See When is a program and its plug-ins considered a single combined program?:

If the main program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single combined program, which must be treated as an extension of both the main program and the plug-ins.

  1. You want to change the GPL App to specifically look for your module and load it.
  2. You rely on the QTreeView interface which is a complex data structure.

This means you have to conform to the GPL.

  • Which part violates the GPL? – Brandin Jan 29 at 14:02
0

Your question implies four things that you want to do. I will list each one you want to do and analyze whether they are allowed by the license(s):

  1. Release GPL_APP with full source-code.

This is completely in accordance with the GPL.

  1. Patch GPL_APP to look for a proprietary library and use it if available.

This is possibly allowed. See the GPL FAQ "Can I release a program under the GPL which I developed using nonfree tools?"

if you link nonfree libraries with the [GPL program], that would be an issue you need to deal with. It does not preclude releasing the source code under the GPL, but if the libraries don't fit under the “system library” exception, you should affix an explicit notice giving permission to link your program with them

If you are the author of the complete GPL_APP, then it will basically be allowed because you can always choose to attach the permission if you desire. If you are not the author of all of the GPL_APP code, then you seem to have two possible options to overcome this: (a) You need to get permission from the contributors to GPL_APP to add such a permission to the license. (b) You need to develop and distribute your own Operating System under which your library qualifies as a "system library" according to the GPL.

  1. Write a library (let's call it TREEVIEW_LIB) that is a subclass of QTreeView, and release that library as closed source.

Qt is available as LGPL and under a commercial license. If you use the LGPL version of Qt, then your library will be considered as a modification or derivative work of Qt, so you will need to release the TREEVIEW_LIB source code to comply with the LGPL. If you get a suitable Commercial license from the Qt company, and their Commercial license allows it, then in principle you could release TREEVIEW_LIB without releasing the source code. Essentially your TREEVIEW_LIB would be seen as a modified version of Qt. Note that whether releasing TREEVIEW_LIB would actually comply with the Qt Company's commercial license agreement is a closed source licensing question that you would have to discuss with the Qt Company.

  1. "I know in first place that users will combine [GPL_APP and TREEVIEW_LIB]."

If you do choose to release TREEVIEW_LIB as closed source (e.g. by purchasing a suitable commercial license from Qt, or by releasing closed source code derived from an LGPL version and possibly violating the LGPL outright), then the situation will be that users will be allowed to combine them on their own machine by running GPL_APP with your TREEVIEW_LIB library (See GPLv2 Term 0), but the combination itself that is installed on their machine will no longer be GPL. I.e. a user combining your TREEVIEW_LIB library with a GPL program will "taint" the GPL program and so the user will no longer be allowed to redistribute that combination according to the GPL (See GPLv2 Term 1).

Note that this opinion seems to be at odds with the GPL FAQ "If I write a plug-in to use with a GPL-covered program, what requirements does that impose on the licenses I can use for distributing my plug-in?" (https://www.gnu.org/licenses/gpl-faq.en.html#GPLAndPlugins):

If the main program and the plugins are a single combined program then this means you must license the plug-in under the GPL or a GPL-compatible free software license and distribute it with source code in a GPL-compliant way.

According to the GPL FAQ, the above quotation seems to mean that you must license TREEVIEW_LIB in a GPL-compatible way, because of the technical way that a library will combine with another program while running ('dynamic linking' as opposed to 'fork and exec'). However, this Answer in the FAQ is an opinion and should not be seen as the final arbiter of what you are allowed to do. Your actual permissions under law and the licenses are determined by relevant Copyright Law and the license(s) of the software you are actually distributing (e.g. TREEVIEW_LIB).

If you distribute TREEVIEW_LIB only, and if that TREEVIEW_LIB distribution does not include any LGPL licensed code (e.g. because you used the commercial version of Qt instead of the LGPL version), then the GPL cannot pose any requirements on how your distribute TREEVIEW_LIB, since that software does not include anyone's ((L)GPL) licensed code. The Free Software Foundation may disapprove, and the decision arguably violates the 'spirit' of the GPL, but in the end, only the copyright holders of the software that you are deriving from (e.g. Qt) can legally complain about how you distribute their software.

  • Having a business risk that is mitigated by an assumption that the official website for GPL has an FAQ that has opinions not guidelines is a recipe for failure. But as always in such cases I am not a lawyer and YMMV. – PsiX Jan 29 at 14:51
  • @PsiX You're right, you should not make business risks based on this. In fact it sounds quite suspect. All I mean is that when you agree to (say) the GPL, you are only agreeing to what is in the GPL. You aren't required to agree with what the GPL FAQ says in order to accept the GPL. And if you aren't distributing GPL software, you aren't required to accept the GPL at all. – Brandin Jan 29 at 21:37

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.