I have developed a C++ tool and I am the full copyright owner of the code. However the tool is dynamically linked to a gpl library. The whole source code of the tool is hosted on a virtual machine. In the virtual machine there are two users: root-user and standard-user. The source code is located in the root user.

Now I would like to distribute the tool in a commercial way. The distribution model is the following: people can download the vm image for free, and use the tool in two ways:

if you don't pay the license fee you are a standard-user and you can execute the code but you can't see the source code of the tool.

if you pay the license fee, you are a root-user and hence you can read, execute, write, modify or recompile the code of the tool.

As as extra to the answers below, note also that if this was a Docker image rather than a VM, this would be exactly the same and the same licensing requirements would apply.
– Philippe OmbredanneSep 9 '16 at 16:59

2 Answers
2

Here is what I can say with absolute certainty: you must obey the terms of the GPL for the GPL library you are distributing (and for any other GPL code in your VM, e.g., any GPL-licensed GNU or Linux components of the VM's operating system). This means that you must offer to all recipients of your VM the source code of all GPL-licensed components. You are, of course, free to decide who is a recipient (e.g., you may limit it only to customers who pay you one thousand dollars), but as soon as you make a person a recipient, you have an obligation to offer them the source code of all GPL components.

The significant question here is whether the dynamic-link relationship between your tool and the GPL library imposes a requirement that your code also be distributed under the terms of the GPL. Dynamic linking has been legally murky territory for a long time due to an absence of case law. Is dynamic linking a case of two separate copyright works that programmatically inter-operate, or is it a single combined work under copyright? I am unaware of extant case law (but if you are, please commnent below!), but the FSF is unambiguous in their opinion on the matter:

Does the GPL have different requirements for statically vs dynamically linked modules with a covered work?

No. Linking a GPL covered work statically or dynamically with other modules is making a combined work based on the GPL covered work. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

If the FSF's opinion indeed holds up in court in your jurisdiction, then the copyleft provision of the GPL applies to your tool, due its combination with a GPL-licensed library. As such, you must license your tool-and-library combination under the GPL, which means you must offer the source code of your tool to everyone who receives a copy. You are not permitted to conditionally give the source to the recipient of a GPL-licensed work. Either offer them both the object and source code, or neither.

No, the GPL requires that you must make the sourcecode available to everyone who receives a copy of your program. The GPL defines sourcecode as "the preferred form of the work for making modifications to it". So providing it in a form the user can not access is not sufficient.

The virtual machine with the application preinstalled is a software product. When you give the VM image to someone, you are conveying the program. So you need to also provide the sourcecode. The GPLv2 says that you must offer the sourcecode "for a charge no more than your cost of physically performing source distribution". The GPLv3 even goes a step further and allows reimbursement only for physical products. When the software is downloaded, you must also provide a gratis download of the sourcecode to everyone who downloaded it.

Thank you for the quick answer. I would like to remark that in any case along with the vm I am distributing also the source code of the tool. However it can be accessed only by whom who buy the license, i.e., the root-user. Make sense for you?
– CyrSep 9 '16 at 13:07

@Cyr You aren't giving the user the sourcecode when you make it impossible to access it. Fact is, you are trying to get people to pay extra for sourcecode, which is against the GPL, both in spirit and in writing.
– PhilippSep 9 '16 at 13:08

2

@Cyr There is no limit for the price of the copy of the whole program. But after you sold (or gave away) a copy without the source, the price for the sourcecode must be "no more than your reasonable cost of physically performing this conveying of source". Also note that everyone you sell the copy of the program to has the right to also sell (or give away) copies of the sourcecode. Each of your customers can underbid you. So the pay-by-copy business model doesn't work well with the GPL.
– PhilippSep 9 '16 at 13:17

1

@Cyr You say "based on the license I linked you" -- exactly which components of the system to you image being under that license, and which under the GPL? (Also, this is probably better suited as a new question-post, since you are veering far away from the scope of this question.)
– apsillers♦Sep 9 '16 at 15:14

1

@Cyr Sorry, but we only answer questions about open source licenses on this website.
– PhilippSep 9 '16 at 15:15