3

I hope this is the right place to ask these questions. If not please help me find a place so I can safely ask these questions without simply getting a off-topic label. I will describe two situations:

  1. I have a Java application that I distribute. I wrote most of the code and used some BSD, MIT license, which don't require me to open source my software. Now I have another feature, and I found an open source solution which is GPL. I can't use it directly without making my software opensource GPL. But how about I convert this GPL Java code or C code to lua? and then my software includes LuaJ, which interpret the lua code. I can make the lua code GPL. The GNU GPL website did mention "compiler" in brackets. This lua code is controlled by the LuaJ which compiles it to byte code on user's computer and run it. I can also go to the extreme to make it so the user put the link to the lua code inside my software so it can download it? Or the software automatically download it after installed?

  2. I have a device which runs Windows and it needs to run my software which I wrote. It's not open source nor GPL. I need a certain functionality so I found a GPL source code for it. Can I put a Virtual Linux on the device so it will launch a virtual Linux and run this GPL software inside the virtual machine and then communicate with my proprietary Windows software? Is it still legal for me not to GPL my Windows software? The virtual machine, and the image is prebuilt and loaded on the device's storage, with my software binary for Windows.

4

The GPL is not specific to any technology like Java vs Lua, Windows vs Linux. To determine the scope of the GPL, we have but one question to consider: does this form a single program?

This question is not for the GPL to answer, it is a question for copyright law. However, the GPL authors have opinions on this question, which I regard as sufficiently authoritative in this matter.

To determine whether something forms a single copyright-covered work, the GPL authors suggest that a program forms a single work, including any files or libraries. Whether two processes that communicate with each other form a single program would depend on what/how they communicate. If they have deeply intertwined shared state, then that would point towards being a single program. An interpreter or compiler is a program that processes another program as data. The compiler and the program being compiled clearly do not form a single program. In the case of an interpreter, things can be more tricky since the interpreter may offer various libraries to the interpreted program.

In the following, I provide a brief analysis of your two scenarios. TL;DR:

  • You will not find a GPL loophole. The idea “user clicks a button to load GPL-covered Lua code” will not work.
  • You can use GPL software in a proprietary system if the two are clearly separate programs (think microservices).
  • You can run GPL-covered software on Windows. A Linux VM likely just complicates compliance.

Scenario 1: Using GPL-covered plugins in a proprietary application.

In your first scenario, you are proposing that a proprietary software adds a Lua-based plugin system, which would then be used to load GPL-covered plugins. Since the GPL is technology-neutral, it doesn't matter which language or system is used to load the plugins: Lua scripts, JAR files, or DLL files will all lead to the same conclusion. The GPL FAQ contains multiple entries relating to plugins:

  • When is a program and its plug-ins considered a single combined program?

    This would depend on how the plugin and the main program communicate. It is likely that the plugin and the host program would form a single program in your case, since your Lua runtime environment would likely allow the Lua code to call into your application and/or your application to call into the Lua code. In contrast, they would likely be separate programs if the Lua code is executed in a standalone process.

  • Can I apply the GPL when writing a plug-in for a nonfree program?

    If they would form a single program, then no. Slightly simplifying: The GPL requires that you make all dependencies of the GPL-covered program available. You are proposing to rewrite the GPL-covered code to fit your application's plugin system, which would make your application a dependency of the plugin.

    If you were the sole copyright holder of the plugin, you could add a GPL exception to allow this case. However, you are not the sole copyright holder since you are using existing GPL code, and therefore cannot grant such an exception.

  • Can I release a nonfree program that's designed to load a GPL-covered plug-in?

    This is not really different from the above cases. If your proprietary application is specifically designed to load a GPL-covered plugin, there's a good argument that it's derivative of this GPL-covered code.

    However, if your application merely has the ability to load plugins which could be GPL-covered, then the user would be able to create (but not necessarily distribute) a GPL-covered plugin.

    You propose that the user could trigger the loading of the plugin. I don't think this will change anything: if you provide an application with a plugin system, a matching GPL-covered plugin, and offer instructions for the user to load this plugin, there's a pretty good argument that your application would have to be available under GPL.

Scenario 2: Using GPL-covered software on Windows.

In your second scenario, you are concerned about running GPL-covered software on Windows. You are proposing to run this software in a Linux virtual machine, and then have your proprietary application communicate with the virtualized GPL-covered software.

First, it's perfectly acceptable to distribute proprietary and GPL-covered software side by side. This is sometimes called mere aggregation. You just have to make sure to comply with the GPL license for the GPL-covered parts, e.g. you must not make the use of the GPL parts conditional on accepting an EULA, and you must not prevent modifications to the GPL-covered components, and you must provide the corresponding source code.

Here, it seems that your proprietary software and the GPL-covered software may be communicating “at arms length” and therefore are two separate programs (compare the GPL FAQ). The GPL is technology neutral, so running the two programs in different processes vs running them in different virtual machines makes no difference.

Note that you are allowed to run GPL-covered software directly on Windows. While the GPL generally requires you to make all dependencies available under the GPL, the GPL-3.0 exempts “System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work”. For example, a GPL-covered program can use Windows System Libraries like the Win32 API. The GPL-covered software could also require gratis but generally available tools such as the proprietary Visual C++ compiler.

If you do distribute a virtual machine image, note that you must comply with the licenses for all of the software contained in that image. This can be rather tedious, as you'd have to consider all software including the Linux kernel and programs in the userland. Busybox provides a minimal userland which can simplify compliance, alternatively you might want to use a BSD userland instead of using GNU tools. Certain Linux distributions such as Debian are very good at managing licenses for software installed through Debian's main packages.

2
  • I guess it's case by case even with LuaJ. If my application doesn't rely on the lua script, then the application shouldn't need to be GPL. For example, I release an application to do animations, and those are instructed by lua code. User can download any lua code to run in my application which simply give them the ability to run, single step, debug the lua code. Let's say that's the function of my application and it's not GPL (could be MIT, or proprietary). User can use a GPL lua code to draw something but that shouldn't affect my applications' license.
    – Splash
    Feb 7 at 1:29
  • @Splash Yes, if you merely offer an application with a generic plugin or scripting interface, that would be fine. Things get questionable if you specifically design the interface to load GPL code. Regardless, you (or anyone else) will not be able to adapt existing GPL code to work under your proprietary application because you'd need a GPL license exception for that.
    – amon
    Feb 7 at 10:57
1

I would say that interpreter provides an isolation and would just give some examples:

If I distribute a program including LuaJ and some lua script, is that one program? I would say so. And if I publish the lua script I wrote for it to be GPL, does it mean that LuaJ is GPL? I hope we see the problem here. That should not change what license LuaJ is.

Also, Roblox application is one program, which has a lua interpreter which is tightly coupled with the application. If I release a part that uses GPL lua code (I wrote them and made them GPL), does it make roblox GPL?

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.