Jump to content

KSP's API is NOT compatible with the GPL. Here's a guide to help if you are in violation.


RandyTheDev

Recommended Posts

5 hours ago, Kerbal101 said:

 

AFAIK, RMS was always on user/code hacker side and GPL was designed to protect work designed under free model from being exploited (in all possible ways) by the proprietary model. Like  import of open code into closed code or closed devices.

I don't remember any case the other way around-, where somebody would write a plugin for proprietary software, license it under GPL and then demand the proprietary piece to open up.
Probably, because the plugin is not essential part of the distribution.

You should also not forget that unless the author specifically relinquishes their rights to the code, simply licensing software under GPL does not mean the FSF is about to sue anybody on anybody's behalf.

Quote

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

It's right there in Line 2 of the boilerplate. COPYRIGHT NAME OF AUTHOR.

You still own the copyright to work you license under the GPL. You as the author decide if you're going to go after someone for violations. The FSF are not going to assume ownership over your copyrighted work, even if you use a copy of the license they made up.

While your plugin may or may not work without KSP, KSP will certainly continue to tick along happily without your plugin.

The ban against reverse engineering has been in there since the earliest versions of KSP, way before T2 were involved. Can we put that bit of the EULA-rage to bed now, please?

And if you really want to be paranoid about it, then you can do Nvidia's trick that they use for putting a proprietary blob into the Linux kernel. Include a LGPL interface layer that references Assembly-CSharp and whatever other DLLs you're going to need. In the LGPL code, you do this:

Quote

type safe_thing(param_type whatevs)

{

 return thing(whatevs);

}

That's assuming any of this shenaniganry is necessary at all. I'm no lawyer, but I don't think it is. As the OP says himself, GPL is one of the most popular licenses for KSP mods. Nobody has been sued. In fact, while I've put the odd couple of modlets I've made out under mostly the MIT license, I'm thinking that any future little one and two-liners are going to be released under some version of the GPL, just to make a point. Copyright Me, of course.

Link to comment
Share on other sites

12 hours ago, RandyTheDev said:

At the end of the day, this is just the GPL working "as intended". Their aim is to encourage people to release software under the GPL, in this case, they are encouraging the development of a libre space simulator.

Hmm, if that's true, then why does the System Libraries exemption exist? Surely one of the FSF's major goals/triumphs has been libre operating system software?

Link to comment
Share on other sites

6 minutes ago, HebaruSan said:

Hmm, if that's true, then why does the System Libraries exemption exist? Surely one of the FSF's major goals/triumphs has been libre operating system software?

This. So much this.

Link to comment
Share on other sites

At the end of the day there IS an issue, as spelled out here

https://www.gnu.org/licenses/gpl-faq.en.html#GPLPluginsInNF

But the recommended solution is a simple exception addition to allow linking against KSP.  How the GPL is intended to work is that in an exception case the licence is invalidated and the copyright owner is the only person who retains rights to the work.  They would be free to release it under the GPL + exception at will though.

Link to comment
Share on other sites

21 minutes ago, devoid said:

At the end of the day there IS an issue, as spelled out here

https://www.gnu.org/licenses/gpl-faq.en.html#GPLPluginsInNF

AFAIK "single combined program" means distribution. For example, if Squad sells KSP with plugin for money and this plugin is non-optional part = > plugin is part of distribution, then GPL would enforce.
If plugin for the proprietary core is from 3rd party, then there is no way that its part of the distribution, thus it does not apply.

This is originates from the background, that GPL was designed to protect freedoms of original code and carry them downwards the distribution; a plugin is definitely not "core" of the project, its"optional".
Also, if this happens, nothing prevents "core" from adding the clause, that revokes all the rights for specific violators. The "core" boots first, so its rules take priority.

Link to comment
Share on other sites

28 minutes ago, devoid said:

At the end of the day there IS an issue, as spelled out here

https://www.gnu.org/licenses/gpl-faq.en.html#GPLPluginsInNF

But the recommended solution is a simple exception addition to allow linking against KSP.  How the GPL is intended to work is that in an exception case the licence is invalidated and the copyright owner is the only person who retains rights to the work.  They would be free to release it under the GPL + exception at will though.

Still up for debate... all of the various loopholes are a veritable minefield.

Quote

Can I release a nonfree program that's designed to load a GPL-covered plug-in? (#NFUseGPLPlugins)

Please see this question for determining when plug-ins and a main program are considered a single combined program and when they are considered separate programs.

If they form a single combined program then the main program must be released under the GPL or a GPL-compatible free software license, and the terms of the GPL must be followed when the main program is distributed for use with these plug-ins.

However, if they are separate works then the license of the plug-in makes no requirements about the main program.

Emphasis added on the last sentence is mine.  A KSP plugin is (al)most certainly a 'separate work'.

Definition of a 'combined program' is also a bit debatable:

Quote

A main program that uses simple fork and exec to invoke plug-ins and does not establish intimate communication between them results in the plug-ins being a separate program.

In the case of KSP addons -- I would say that it is not the main program that is establishing 'intimate communications', but rather it is the plugin itself that does the (majority of) communication.

Of course, most of that covers how KSP would be effected by GPL'd plugins.

 

 

In the end though; I don't really care.  I release my source code under GPL license, and will continue to do so.  This is to allow others to use, modify, and redistribute the source-code, under the terms of the license, and really doesn't have any impact on what I do with my own source.

Link to comment
Share on other sites

1 hour ago, Kerbal101 said:

AFAIK "single combined program" means distribution. For example, if Squad sells KSP with plugin for money and this plugin is non-optional part = > plugin is part of distribution, then GPL would enforce.
If plugin for the proprietary core is from 3rd party, then there is no way that its part of the distribution, thus it does not apply.

This is originates from the background, that GPL was designed to protect freedoms of original code and carry them downwards the distribution; a plugin is definitely not "core" of the project, its"optional".
Also, if this happens, nothing prevents "core" from adding the clause, that revokes all the rights for specific violators. The "core" boots first, so its rules take priority.

Actually follow the link it has nothing to do with distribution and they define "single combined program".  But read the bottom for how I really feel about all this nonsense.

When is a program and its plug-ins considered a single combined program? (#GPLPlugins)

It depends on how the main program invokes its plug-ins. If the main program uses fork and exec to invoke plug-ins, and they establish intimate communication by sharing complex data structures, or shipping complex data structures back and forth, that can make them one single combined program. A main program that uses simple fork and exec to invoke plug-ins and does not establish intimate communication between them results in the plug-ins being a separate 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. If the main program dynamically links plug-ins, but the communication between them is limited to invoking the ‘main’ function of the plug-in with some options and waiting for it to return, that is a borderline case.

Using shared memory to communicate with complex data structures is pretty much equivalent to dynamic linking.

1 hour ago, Shadowmage said:

Still up for debate... all of the various loopholes are a veritable minefield.

Emphasis added on the last sentence is mine.  A KSP plugin is (al)most certainly a 'separate work'.

Definition of a 'combined program' is also a bit debatable:

In the case of KSP addons -- I would say that it is not the main program that is establishing 'intimate communications', but rather it is the plugin itself that does the (majority of) communication.

Of course, most of that covers how KSP would be effected by GPL'd plugins.

 

 

In the end though; I don't really care.  I release my source code under GPL license, and will continue to do so.  This is to allow others to use, modify, and redistribute the source-code, under the terms of the license, and really doesn't have any impact on what I do with my own source.

I actually agree with both of you on intent.  I've written GPL code and also have released things that would be a called a plug-in, and both mine and your intents are the same  "This is to allow others to use, modify, and redistribute the source-code, under the terms of the license, and really doesn't have any impact on what I do with my own source." 

At the same time I understand the licensing speech and interpretation that is causing the discussion, but in the end the fail closed nature of the GPL protects us here.  Either the licence is valid and we all move along happy, or it's invalid and the creator still has all rights, and is free to do what they will with it. 

I'd recommend moving on as you suggested and just continue as before.  If ever challenged in a more  serious way, just re licence with an exception. 

Edited by devoid
Link to comment
Share on other sites

@devoid Oh yes, this case, I agree. So here GPL FAQ tries to stress out the difference about how much of logic independence, is there, is this really a plugin or piece of code that directly touches process memory of the "core" binary ("Using shared memory to communicate with complex data structures", "they make function calls to each other and share data structures") but calls that "plugin"(purposely quoted).
AFAIK KSP exposes an API specifically created for plugins, attaches those at run-time as modules and talks through the API (not directly), so its as optional as it can get for a userspace program.

My original response was about when the condition above is valid, yet the "core" is completely dependent and shipped with the "plugin" (purposely quoted).

Link to comment
Share on other sites

I think I've figured out the root cause of the confusion that sparked this thread. The problem arose with Eclipse plugins. Eclipse too is a "free" program and thus others may distribute it (pristine or modified). The problem is that Eclipse's license and the GPL conflict in a certain area thus making it so distributing Eclipse with GPL plugins violates the GPL. The exception clause is to allow Eclipse to be distributed with those GPL pllugins. It has nothing to do with the plugins themselves.

KSP is very definitely not free: we users are most definitely not allowed to distribute it (only Take-Two and selected resellers (Steam etc) may do so).

Thus we have two completely different situations. In the first case, it's a free but incompatibly licensed program being distributed with GPL plugins. In the second, we have a non-free program that is distributed by one party, and GPL plugins that are distributed by completely independent parties. There is no conflict. Users may not distribute KSP, but don't need to. Users may distribute GPL plugins for KSP if they so choose, pristine or modified (though distributing modified versions incurs additional responsibilities).

So, in the end, nothing to see here, back to business as usual with no changes to our licenses.

Edited by taniwha
Link to comment
Share on other sites

Oy vey. 

The GPL gives you additional rights that you do not have due to copyright laws.

The whole linking-or-not with KSP is spurious unless you want to distribute  (convey, make available, …) a GPLed work as an integral part (linked, deeply interacting, not just using config files and command line arguments) of some not-GPL work.

Since only T2 may allow any distribution of KSP, a discussion about distributing KSP and a GPLed mod together is moot — we are not allowed to distribute KSP in first place!

Now, 2 mods that interact deeply — sorry, MM does not need to apply here, it just reads it’s instructions and does it’s thing — with one of them GPL (and not solely yours[1]) and a not-GPL compatible mod, say ARR, that you cannot distribute that way. If your, say, ARR mod depends on/needs the GPLed mod which has no ecxption for your ARR mod, you cannot distribute the ARR mod.

 

[1] you can trivially add another license to a mod where you have all copyrights, just ask youself “May I distribute it as ARR, too” and answer yourself with a “Yes, sure, no problem” …

Link to comment
Share on other sites

9 hours ago, Kerbal101 said:

AFAIK KSP exposes an API specifically created for plugins, attaches those at run-time as modules and talks through the API (not directly), so its as optional as it can get for a userspace program.

KSP exposes everything. Plugin assembly is loaded into game's address space and is given complete control when they receive CPU time during special callbacks. All KSP classes that are written for KSP are visible and available for any intent and purpose, even if they are not supposed to be used by any kind of mod. It's a big stretch to call this thing API. It is as deeply interlinked as it is possible for a userspace program. When modded KSP has booted to the main menu, it is pretty much one united pile of tightly-coupled classes.

 

4 hours ago, taniwha said:

So, in the end, nothing to see here, back to business as usual with no changes to our licenses.

"...The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code...

For example, Corresponding Source includes ... the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work."
 

Literally what most GPL-ed KSP plugins do, while being distributed without any way to download KSP source, wich they are specifically designed to require.

Link to comment
Share on other sites

1 hour ago, Boris-Barboris said:

Literally what most GPL-ed KSP plugins do, while being distributed without any way to download KSP source, wich they are specifically designed to require.

This is no different to GPL programs running on a closed operating system (windows, solaris, etc (is any closed OS but windows still alive?). There are GPL programs that run only on windows, and the GPL FAQ mentions this, acknowledges the legitimacy, but frowns on it.

So, once again, a mountain out of a molehill.

Edited by taniwha
Link to comment
Share on other sites

 

1 hour ago, taniwha said:

KSP is the "operating system". Regardless, I doubt anybody will bother putting in an exception clause. I know that I will not.

KSP is not an operating system. The fact that the GPL added the system libraries clause in the first place should be reason enough to believe that any similar situation that arose would need a similar exception issued. Knowingly issuing your work under a void license is dangerous, it waives your limited liability and warranty disclaimers. The GPL (to the chagrin of the EFF) is legally considered to be a contract, and because of this, you are also liable to breach of contract.

Edited by RandyTheDev
Link to comment
Share on other sites

How are any of these "violations" relevant?

Who is perpetrating the violations?

  • Does the author violate the GPL by writing GPL code?
  • Does Squad/T2  violate the GPL because users are taking their KSP copy and "linking" it against a GPL mod,without Squad/T2's consent or knowledge?
  • Do Users violate the GPL by linking it to their KSP copy in the privacy of their homes?

I don't think so. Distribution is key here. GPL only matters when you distribute. If you "violate" it internally in your company or at home and don't distribute your nonfree programs/modules, nobody cares. 

Modders distribute their GPL modules, but they ship the code along with it. No violation there.

Squad doesn't distribute the Mods, no violation there.

Users don't distribute the Mods, no violation there.

 

I really don't think this is a problem.

Edited by Kobymaru
Link to comment
Share on other sites

3 minutes ago, taniwha said:

Your text is not readable, do not colorize your text.

Not everyone uses the default theme.

Sorry, used cut/paste in the editor window

2 minutes ago, Kobymaru said:

How is are any of these "violations" relevant?

Who is perpetrating the violations?

  • Does the author violate the GPL by writing GPL code?
  • Does Squad/T2  violate the GPL because users are taking their KSP copy and "linking" it against a GPL mod?
  • Do Users violate the GPL by linking it to their KSP copy in the privacy of their homes?

I don't think so. Distribution is key here. GPL only matters when you distribute. If you "violate" it internally in your company or at home and don't distribute your nonfree programs/modules, nobody cares. 

Modders distribute their GPL modules, but they ship the code along with it. No violation there.

Squad doesn't distribute the Mods, no violation there.

Users don't distribute the Mods, no violation there.

 

I really don't think this is a problem.

Modders very rarely only ship the source code, it’s much more common for them to release a folder that can directly be placed in GameData. This triggers the requirement to release all Corresponding Source upon request from a user.

Link to comment
Share on other sites

5 minutes ago, RandyTheDev said:

Modders very rarely only ship the source code, it’s much more common for them to release a folder that can directly be placed in GameData.

It's 2018, GitHub exists. That counts as shipping the source code. If it's not on GitHub, the source is usually within the archive along with the binaries.

Quote

This triggers the requirement to release all Corresponding Source upon request from a user.

Yes. All code that is licensed under the GPL. Which is the Mod's code, and not KSP's code.

Edited by Kobymaru
Link to comment
Share on other sites

5 minutes ago, Kobymaru said:

It's 2018, GitHub exists. That counts as shipping the source code. If it's not, the source is usually within the archive along with the binaries.

Yes. All code that is licensed under the GPL. Which is the Mod's code, and not KSP's code.

And all code required to run the licensed source code.

The requirement to convey all corresponding source is triggered by releasing the compiled binary, regardless of whether or not the source  (but not the source of non-free dependencies) was released alongside it. 

Edited by RandyTheDev
Link to comment
Share on other sites

Just now, RandyTheDev said:

Sorry, used cut/paste in the editor window

Yeah, one of the things I hate about this forum software.

 

1 minute ago, RandyTheDev said:

Modders very rarely only ship the source code, it’s much more common for them to release a folder that can directly be placed in GameData. This triggers the requirement to release all Corresponding Source upon request from a user.

And the user will receive a zip with the source, or a link to the github repository, or whatnot. However, only the source to the mod is required. Modders would not be required to give the source to KSP as KSP does not form a part of the mod in the same way Photoshop and its dlls do not form a part of any GPL plugin written for Photoshop. Of course, those plugins may not be distributed with Photoshop, but that's hardly a problem, and nobody would expect the plugin's author to provide the source for Photoshop.

One thing that IS required, however, is complete build scripts (many mods fail here), which is one reason I use make and Makefiles to get from git repository to distributable zip for all my mods (other than Kethane, but it's not GPL anyway, not originally mine either, but I still use make to install it).

2 minutes ago, RandyTheDev said:

And all code required to run the licensed source code.

Actually, everything required to BUILD the licensed "program" (the mod) such that it can be run on the "system" (KSP).

Link to comment
Share on other sites

Just now, RandyTheDev said:

And all code required to run the licensed source code.

But neither the Mod author nor the User have access to this code. Who is hurt by this "violation"? What's the damage?

I find discussions about the ideal and perfect lawfulness of an act ("but technically, it's ... ") pretty boring, I care about real life.

So my question in practice, in reality, in this universe (that's a physical, not a legal universe), what is the problem, really? Who is gonna sue who? Who has the damage, who got hurt?

Is Squad/T2 gonna sue me for writing GPL code that interfaces with their non-gpl code? Am I gonna sue Squad/T2 for release of their source code cuz I wrote something that could be used to link against their code? Is Squad/T2 gonna sue their customers? Is the FSF gonna Sue all of us for the fun of it, and because they like creating legal problems in situations with no victims?=

 

Why are we getting so upset about this, again?

Link to comment
Share on other sites

2 minutes ago, RandyTheDev said:

KSP is not the system, Windows/Linux/macOS is.

There are very few mods that care (beyond knowing which asset bundle to load) what the underlying operating system is, so for all intents and purposes, KSP is the system.

Link to comment
Share on other sites

@Kobymaru If the claims from RandyTheDev prove to be true its the users of the mods that can sue the mod creators because they are not getting what the license implies (being able to build the mod without KSP, or getting the source code of KSP). Still this seems to be veeeery unlikely.

On the other hand companies have been sued because they did not explicidly state that fresh coffee is hot...never undererstimate the greed of ppl.

Edited by Nils277
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...