Raised This Month: $51 Target: $400
 12% 

Solved SourcePawn samples and GPL


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nosoop
Veteran Member
Join Date: Aug 2014
Old 12-11-2016 , 12:33   SourcePawn samples and GPL
Reply With Quote #1

Not fluent in source code legalese, so I could use some advice.

Context: I'm currently attempting to get SourcePawn correctly classified in Github's Linguist project. The license for the project is MIT.

SourceMod's license states that derivative works must be licensed under GNU GPLv3 (with an exception to allow GPLv2 compatibility).

As far as I can tell, including GNU GPL code in a project implicitly makes the entire project GNU GPL.

The questions I have:
  • Is there any way to contribute SourcePawn samples to Linguist while allowing their project to remain licensed under the MIT license?
  • Do I have the option of licensing my SourcePawn code as MIT, seeing as MIT-licensed files are compatible with the GNU GPL?
  • If so, am I allowed to distribute binaries under the GNU GPL while still allowing the source files to be MIT-licensed? Are my licensing options restricted to a subset of code (e.g., ones that don't reference GPL-licensed include files)?
  • At what point is code licensed under the GNU GPL?
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 12-12-2016 at 06:12.
nosoop is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 12-11-2016 , 22:23   Re: SourcePawn samples and GPL
Reply With Quote #2

Quote:
Originally Posted by nosoop View Post
Is there any way to contribute SourcePawn samples to Linguist while allowing their project to remain licensed under the MIT license?
If your samples use any of the SM headers, your work is derivative and you have to use the GPL. The headers were written by us and are GPL.

According to the FSF, plugins are derivative work (or combined, I forget which) if there's more communication between the plugin and parent than just starting the plugin. I would maybe guess that source code that doesn't use our headers wouldn't count as a plugin since it's not a binary.

I don't know if SP code without use of SM's headers is useful for Linguist.

Quote:
Originally Posted by nosoop View Post
Do I have the option of licensing my SourcePawn code as MIT, seeing as MIT-licensed files are compatible with the GNU GPL?
"Compatibility" is only a question of whether things can be combined. It doesn't mean you get to freely pick any of the original licenses. You can combine an MIT-licensed work with a GPL-licensed work, but the result will have to be GPL-licensed because you can't remove GPL's restrictions if you're not in total control of the GPL'd work.

Quote:
Originally Posted by nosoop View Post
If so, am I allowed to distribute binaries under the GNU GPL while still allowing the source files to be MIT-licensed? Are my licensing options restricted to a subset of code (e.g., ones that don't reference GPL-licensed include files)?
If your code is derivative of SM (e.g. if it uses our headers), you're restricted to following the GPL. If you had copyright control over the code, then you could use any licenses you wanted, even if incompatible.

Quote:
Originally Posted by nosoop View Post
At what point is code licensed under the GNU GPL?
If your work is derivative of SM's, always.
Fyren is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 12-12-2016 , 01:58   Re: SourcePawn samples and GPL
Reply With Quote #3

Excellent and informative response; thanks Fyren. If I'm understanding it correctly, just having #include <sourcemod> makes the source code a derivative work, and therefore is GPL-licensed.

Regarding compatibility, I did want to clarify that I did see that MIT-licensed code can be merged into projects containing GPL-licensed code, or vice-versa, and the resulting work must be GPL. Though since SourceMod plugins are derivative works, the point is moot since it has to be GPL-licensed in the first place (I wanted to see if I could release the source material to the Linguist projects as MIT as an exception for their use case while applying the GPL for all other purposes).

Quote:
Originally Posted by Fyren View Post
I don't know if SP code without use of SM's headers is useful for Linguist.
Source files are only used to train Linguist's Bayesian classifier, so whether or not the headers are referenced shouldn't matter significantly for the training set (not like they'd be bundled along with the sample in any case). Though that raises a few more questions. Provided I wrote the plugin code myself:
  • If I removed / replaced the #include references to all (GPL-licensed) libraries, could I then license the remaining uncompileable file under MIT? Would I also have to replace function / forward names?
  • Provided I referred to dummy header files that I wrote myself (or added the declarations inline) to implement a small subset of natives / forwards, could that resulting work be licensed under MIT?
    • Are the declarations allowed to use names found in the SourceMod API?
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 12-12-2016 at 05:14.
nosoop is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 12-12-2016 , 06:00   Re: SourcePawn samples and GPL
Reply With Quote #4

I don't know if you're going to get an answer to those questions. The binary that's produced definitely depends on the headers. The source you'd write for Linguist wouldn't exist the way it does without our headers and functions being named how we named them, but whether that meets the bar for being a derivative work according to copyright law or not, I can't say.

Speaking unofficially (since I happen to be a SM dev, though not an active one; also obviously not a laywer), I would say it's not derivative.
Fyren is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 12-12-2016 , 06:39   Re: SourcePawn samples and GPL
Reply With Quote #5

I suppose I'll just have to check in with the FSF and get their input.

Appreciate the replies; though it's not a concrete answer to work with in this particular situation, it does provide a better understanding to source code licensing.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-12-2016 , 15:53   Re: SourcePawn samples and GPL
Reply With Quote #6

Quote:
Originally Posted by nosoop View Post
I suppose I'll just have to check in with the FSF and get their input.

Appreciate the replies; though it's not a concrete answer to work with in this particular situation, it does provide a better understanding to source code licensing.
There's an explicit `#include <sourcemod>` specified by the compiler which makes all compiled works part of the GPL as these headers are included. Similar position as Fyren; though.
KyleS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode