cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
882 stars 206 forks source link

Relicensing (bits of) CC: Tweaked #1339

Open SquidDev opened 1 year ago

SquidDev commented 1 year ago

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:

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.

zarlo commented 1 year ago

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

SquidDev commented 1 year ago

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.

zarlo commented 1 year ago

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

SquidDev commented 1 year ago

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!

zarlo commented 1 year ago

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

MCJack123 commented 1 year ago

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

SquidDev commented 1 year ago

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
Wojbie commented 1 year ago

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.

ouroborus commented 1 year ago

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

SquidDev commented 1 year ago

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.

SirEndii commented 1 year ago

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

ouroborus commented 1 year ago

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.

Naheulf commented 1 year ago

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

Lemmmy commented 1 year ago

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!

Erb3 commented 1 year ago

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

emmachase commented 1 year ago

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.

Lupus590 commented 1 year ago

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.

SquidDev commented 1 year ago

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

Lupus590 commented 1 year ago

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

Yeah, that's it.

plt-amy commented 1 year ago

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.

Merith-TK commented 1 year ago

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.

SirEndii commented 1 year ago

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)?

MCJack123 commented 1 year ago

@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.

SquidDev commented 1 year ago

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.

Merith-TK commented 1 year ago

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.

SquidDev commented 1 year ago

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
toad-dev commented 1 year ago

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 commented 1 year ago

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.

SirEndii commented 1 year ago

Could I ask you how you made that graph?

Merith-TK commented 1 year ago

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

Lignum commented 1 year ago

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

Gegy commented 1 year ago

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

SquidDev commented 1 year ago

Could I ask you how you made that graph?

@SirEndii

JakobDev commented 1 year ago

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

Looks like I'm still one of the top contributors even after all this time. The Project has changed a lot since then and it's nice to see it's still maintained by you. Maybe a could take a look at CC again.

Where did you know which one contributed which code? I had take a look at a few files and it looks like the files where moved so often, that even git is confused.

SquidDev commented 1 year ago

Amazing, thank you so much @JakobDev! You've made a lot of key contributions over the years, so great to have you on board!

Where did you know which one contributed which code? I had take a look at a few files and it looks like the files where moved so often, that even git is confused.

If you pass --follow to git log, it's a bit better at tracking renames. I'm using that to get an overview of who has contributed watch to each file, and then digging into individual commits when things are a bit more fuzzy (for instance Peripherals only has me in the git log, but the original code was written by Dan and then split out into a separate file).

lilyzeiset commented 1 year ago

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.

itisluiz commented 1 year ago

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.

Restioson commented 1 year ago

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.

powerboat9 commented 1 year ago

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

SirEndii commented 1 year ago

I love to see how good this works

vico93 commented 1 year ago

This is amazing

SammyForReal commented 1 year ago

I'm very excited for this! It would make me very happy if the mod that partly shaped me would finally get legally more accessable and under a OPL. It's amazing how far this already has come.

SquidDev commented 1 year ago

Thank you for everyone who has agreed so far! I'm continuing with the everyone else now, in (roughly) alphabetical order.


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
@absolument :heavy_check_mark:
@Ale32bit :heavy_check_mark:
@Angalexik
@AxelFontarive :heavy_check_mark:
@baebz :heavy_check_mark:
@bclindner :heavy_check_mark:
@BlackDragon-B :heavy_check_mark:
@Bluenaxela :heavy_check_mark:
@BombBloke :heavy_check_mark:
@boq :heavy_check_mark:
@chesiren :heavy_check_mark:
@ChickChicky
@ChristianLW :heavy_check_mark:
@coolsa :heavy_check_mark:
@CrazedProgrammer :heavy_check_mark:
@Cruor :heavy_check_mark:
@daelvn :heavy_check_mark:
@dmarcuse :heavy_check_mark:
@emiliskiskis
@Granddave :heavy_check_mark:
@LelouBil :heavy_check_mark:
@mindy15963
@signalhunter :heavy_check_mark:
@SirEdvin :heavy_check_mark:
@xAnavrins :heavy_check_mark:
BlackDragon-B commented 1 year ago

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

boq commented 1 year ago

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

ChristianLW commented 1 year ago

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 past contributions to the CC: Tweaked project.

I'm glad you're trying to solve this issue and that so many are happy to give the green light!

daelvn commented 1 year ago

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

  1. oh my god its been a long time hi squid
  2. i had no idea that i actually had significant contributions to cc:t thats insane
  3. good luck getting the relicense through!
Ale32bit commented 1 year ago

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

coolsa commented 1 year ago

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

Gotta make sure that one liner I did is licensed correctly, lol.

Thank you for your endless work!

bclindner commented 1 year ago

Oh cool, I was kind of hoping for a more standardized license.

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

Thanks folks!