CC-Tweaked icon indicating copy to clipboard operation
CC-Tweaked copied to clipboard

Relicensing (bits of) CC: Tweaked

Open SquidDev opened this issue 2 years ago • 120 comments

I've been wanting to do this for years, and seriously considering it for about 4 months now, so might as well get the ball rolling somehow!

The Problem

When ComputerCraft was originally open sourced, it was released under the CCPL (ComputerCraft Public License), a derivative of the MMPL (Minecraft Mod Public License). Unfortunately, both the MMPL and CCPL have a couple of issues, which range from irritating to gaping holes:

  • It's not a standard OSI-approved license. While in some sense this is purely a cosmetic issue, it has stopped several people contributing, and also blocks us from participating in some initiatives such as Modtoberfest.

  • Code licensed under the CCPL can only be used in other Minecraft mods, and that code must be licensed under the CCPL. This means that any usage of the code in a non-mod project (including emulators or CC programs) violates the license.

    This is an incredibly restrictive clause, to the point that it's counterproductive. I can think of half a dozen (well meaning and useful!) projects off the top of my head which violate this clause.

  • All dependencies of ComputerCraft must be licensed under conditions comparable to the CCPL. We inherit this condition from the MMPL, and it's definitely a problematic one. While I do not believe it's the intention, the practical outcome is that all dependencies must be licensed under the CCPL. While there are exceptions for Minecraft and the mod loader (Forge/Fabric), there aren't any exceptions for other dependencies, such as the Java Standard Library or Netty.

    This suggests that even ComputerCraft itself violates its own license, a position which is clearly untenable!

The difficulty of relicensing

Given CC/CC:T's license is somewhere between awkward and untenable, I would like to relicense CC: Tweaked under something more standard and permissive.

Relicensing a project requires getting every single previous contributor to sign off on the new license. This is incredibly hard for a couple of reasons:

Firstly, CC: Tweaked has had 98 people contribute to it. While 20-30 of these people have only committed trivial changes, which don't require permission, this is still a lot of people and will be a slow process. I remember Forge's relicensing process took months, and I don't think BuildCraft ever managed to complete theirs!

Secondly, and perhaps more seriously, this list of people includes Dan. I have raised relicensing CC with Dan in the past, and while he's been receptive, as of writing nothing concrete has happened. I think we should assume that we will NOT be able to get Dan's permission to relicense his code.

Alternatives

While we cannot change the whole mod, I do think we should aim to relicense as much code as possible under something more permissive.

I'm proposing using the Mozilla Public License 2.0 (MPL 2.0) as the license of choice here. This is a weak copyleft license, which means that changes to the original code must be released (more or less forcing forks of the mod to remain open source) but unlike the GPL (or derivatives) is not viral, meaning it can be used in more permissively licenced projects.

In terms of actually handling the relicensing, I believe our best route here is to adapt the REUSE project's conventions: tracking copyright and licensing on a file-by-file basis, rather than a blanket license for the whole project.

I'm not entirely sure this is Correct(TM): if anyone in the UK knows a good source of legal advice for OS software licensing please do get in touch. However, I think it's a Best Effort given the current mess we're in.

In closing

I don't know if any of the above sounds remotely sensible. Would appreciate any and all feedback here!

I'm probably going to let this issue sit for a few weeks to gather some feedback, then will update this issue on whether I want to go ahead with this or not.

SquidDev avatar Feb 16 '23 19:02 SquidDev

a side note if you want to port the whole project to kotlin should allow you relicense with out needing to get permission

zarlo avatar Feb 18 '23 05:02 zarlo

While a rewrite would be possible (either to Kotlin or staying in Java), it's an incredibly large task. I don't have exact numbers here, but I'd estimate there's about 25k lines of Java and 10k lines of Lua[^1] where Dan still retains the copyright. While these things have been done in the past, I just don't think we've got enough people to do it!

[^1]: Tokei reports 32k lines of Java and 13k lines of Lua, in projects/*/src/main (excluding comments and whitespace). I honestly don't know how much entirely new code has been added.

SquidDev avatar Feb 18 '23 08:02 SquidDev

i use the word port not rewrite as jet-brains has tools that automates the process to go from java to kotlin that would just leave the lua code

zarlo avatar Feb 18 '23 09:02 zarlo

Converting code to another language doesn't change the copyright. It's a bit like translating a book to another language - the original author still retains ownership!

SquidDev avatar Feb 18 '23 09:02 SquidDev

well i know that the Australian government begs to differ im guessing others do to

zarlo avatar Feb 18 '23 09:02 zarlo

For the record, I approve of any license changes to my contributions as long as the license is OSI-approved.

MCJack123 avatar Mar 01 '23 02:03 MCJack123

The initial relicensing work is now complete and merged. I'm going to start the process of reaching out to people, requesting permission to relicense their contributions. I'm planning to do this in batches, just to make my life a bit easier.

If you're in the list of people below (or have contributed to CC:T in the past and feel like getting ahead of things), would you be able to comment with the following message:

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

If you're not happy to relicense your contributions, please also let me know, so I know not to poke you further!

User Permission granted Contributions
@bradyakent :heavy_check_mark: 9ae0f4a993693ffc48ec8a4b5824c50f54026e0a
@emmachase :heavy_check_mark: Numerous
@JakobDev :heavy_check_mark: Numerous
@Lemmmy :heavy_check_mark: Numerous
@Lupus590 :heavy_check_mark: Numerous
@MAGGen-hub :heavy_check_mark: #918
@MCJack123 :heavy_check_mark: Numerous
@Merith-TK :heavy_check_mark: #817
@Naheulf :heavy_check_mark: #488
@ouroborus :heavy_check_mark: #1304
@plt-amy :heavy_check_mark: Numerous
@powerboat9 :heavy_check_mark: #274, #276
@Ronan-H :heavy_check_mark: #743, #740, #738
@SirEndii :heavy_check_mark: #1083
@toad-dev :heavy_check_mark: Numerous
@Wojbie :heavy_check_mark: Numerous

SquidDev avatar Mar 29 '23 09:03 SquidDev

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my project contributions to the CC: Tweaked project.

I am really liking the direction this re-licensing takes project in.

Wojbie avatar Mar 29 '23 09:03 Wojbie

Is there an option to transfer whatever copyrights I may hold on my contributions to the project, or such, rather than just licensing them?

ouroborus avatar Mar 29 '23 09:03 ouroborus

Yep, I'm happy to do that, though I think in that case I'd probably rather both? The legal complexities of copyright assignment are a bit more messy, so I'd like to CYA as much as possible!

I don't know if the following sounds reasonable?

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my contributions to the CC: Tweaked project.

SquidDev avatar Mar 29 '23 10:03 SquidDev

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my contributions to the CC: Tweaked project

SirEndii avatar Mar 29 '23 10:03 SirEndii

Works for me. I consider my contribution to be a donation to the project. My continuing to hold whatever copyright I might have goes against my intent with regards to my contribution to this project.


I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my CC: Tweaked project contributions to the CC: Tweaked project.

ouroborus avatar Mar 29 '23 10:03 ouroborus

You can changes / multi-license my past contributions in this project. As may times as you want as long as:

  • no one can claim ownership of that code
  • the code AND the changes MUST remain open sourced (Edit: to reuse the OSI definition: there must be a well-publicized means of obtaining the source code for no more than a reasonable reproduction cost)

Naheulf avatar Mar 29 '23 11:03 Naheulf

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my project contributions to the CC: Tweaked project.


Great to see this is finally happening, fantastic work on the relicensing effort so far!

Lemmmy avatar Mar 29 '23 12:03 Lemmmy

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Erb3 avatar Mar 29 '23 15:03 Erb3

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my project contributions to the CC: Tweaked project.

emmachase avatar Mar 29 '23 15:03 emmachase

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

I should note that there is at least one PR that has commits by me where I do not claim ownership of the code, instead, the code was copied from other changes that @SquidDev was making at the time. I will see if I can find the PR mentioned and link it.

Lupus590 avatar Mar 29 '23 15:03 Lupus590

@Lupus590 Thank you! Is that #603, or is there another one?

SquidDev avatar Mar 29 '23 15:03 SquidDev

@Lupus590 Thank you! Is that #603, or is there another one?

Yeah, that's it.

Lupus590 avatar Mar 29 '23 15:03 Lupus590

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my project contributions to the CC: Tweaked project.

plt-amy avatar Mar 29 '23 16:03 plt-amy

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

I kindly request that all of my past and future contributions made to the Computer Craft project be considered under the MPL-2.0 license, where applicable.

Merith-TK avatar Mar 29 '23 17:03 Merith-TK

What would happen to the code of people who do not agree?

And what will be the future license CC:T will use (did not saw it in the messages of squid)?

SirEndii avatar Mar 29 '23 17:03 SirEndii

@SirEndii

What would happen to the code of people who do not agree?

That code would remain under CCPL.

And what will be the future license CC:T will use (did not saw it in the messages of squid)?

MPL 2.0 is the goal, though it's highly likely that a portion is still CCPL, so it would be dual-license.

MCJack123 avatar Mar 29 '23 18:03 MCJack123

What would happen to the code of people who do not agree?

Currently, nothing. That code will remain in the mod and licenced under the CCPL.

If Dan ever agrees to relicense the original ComputerCraft code, then I would probably start looking into rewriting or removing that code, but I think that's pretty unlikely.

And what will be the future license CC:T will use

The main description goes into this in a bit more detail, but the general gist is that we're handling licensing on a per-file basis rather than a blanket project-wide license. New code will be under the MPL 2.0.

I guess for some additional context here on the choice of MPL 2.0, both Dan and I would prefer that CC remains under a copyleft license. I personally don't think GPL and LGPL are a great choice here, as part of the relicensing is to make it easier to reuse components of the mod (especially the ROM) in other projects, hence MPL 2.0 instead.

SquidDev avatar Mar 29 '23 18:03 SquidDev

Personally I would say the ROM can remain under CCPL, since not much has needed to be changed on that front over the years.

However the mod code has been changed alot, to the point where in modern versions I doubt much of the original code even exists outside of references to dan200 java classes.

Merith-TK avatar Mar 29 '23 18:03 Merith-TK

Thank you for everyone who has agreed so far! Just adding a couple of extra people that I'm afraid my script missed the first time round:


If you're in the list of people below, would you be able to comment with the following message:

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

If you're not happy to relicense your contributions, please also let me know, so I know not to poke you further!

User Permission granted Contributions
@Gegy :heavy_check_mark: dan200/ComputerCraft#237
@heap-underflow #1131
@itisluiz :heavy_check_mark: #1127
@Lignum :heavy_check_mark: Numerous
@lilyzeiset :heavy_check_mark: #749
@Restioson :heavy_check_mark: dan200/ComputerCraft#237

SquidDev avatar Mar 29 '23 18:03 SquidDev

I permit the license of my contributions to the CC: Tweaked project to be changed to the Mozilla Public License, v. 2.0.

Additionally, I assign copyright ownership of my contributions to the CC: Tweaked project.

toad-dev avatar Mar 29 '23 18:03 toad-dev

However the mod code has been changed a lot, to the point where in modern versions I doubt much of the original code even exists outside of references to dan200 java classes.

It's honestly still 50/50 Dan code (or at least something close enough to Dan's code) vs new code. I've got a script which plots a sunburst graph of file licenses, where red is CCPL and blue is MPL 2.0:

A sunburst graph of the the CC:T's source code, showing what files are CCPL and MPL. The centre circle is purple (representing an even split of MPL and CCPL code), but the leafe nodes are more starkly. Older packages like turtle are incredibly red, while newer ones like command and data are blue.

Bits like the turtle and peripheral code have changed a lot due to Minecraft updates, but still retain almost all original logic.

SquidDev avatar Mar 29 '23 18:03 SquidDev

Could I ask you how you made that graph?

SirEndii avatar Mar 29 '23 18:03 SirEndii

My guess is the script looks at the current code and git blame output, while checking an list of users that he inputs as MPL2

Merith-TK avatar Mar 29 '23 18:03 Merith-TK