mom-ocean / MOM5

The Modular Ocean Model
https://mom-ocean.github.io/
GNU Lesser General Public License v3.0
82 stars 95 forks source link

License change/update #370

Closed aidanheerdegen closed 2 years ago

aidanheerdegen commented 2 years ago

The license was set to GNU GPLv2 by Tim Leslie in 20212:

https://github.com/mom-ocean/MOM5/commit/9ae02a3f0525ce78172d333712b60d8578494ade

MOM6 changed their license to GNU LGPLv3 to allow it to be used as part of a coupled modelling system:

https://github.com/mom-ocean/MOM6/issues/580

Should we make the same change to MOM5 as it is used in coupled models? I'm thinking particularly of the ACCESS models utilising the UM. In the case I don't think it is an issue as the model isn't distributed as such because of the UM license. Nonetheless it would be good to have the licence changed to better reflect how the code is used.

@StephenGriffies should have the final say.

Having said which, I have no idea how hard or easy that is. The MOM6 folks got the permission for all contributors. I'll ping all of them here and see who responds, and have a discussion.

@timleslie @marshallward @nichannah @russfiedler @aekiss @rmholmes @hailinyan @rfarneti @penguian @KateSnow @dhruvbhagtani @underwoo @zliang @adele157 @naught101 @castelao

aidanheerdegen commented 2 years ago

Ok, maybe this is a required change. We're using FMS via subtree, and FMS is LGPLv3 and that means it is explicitly incompatible with the current MOM5 license

https://www.gnu.org/licenses/rms-why-gplv3.en.html

because there is no clause to allow v2 or any later version.

It seems that a licence change isn't a massive deal.

http://www.catb.org/~esr/Licensing-HOWTO.html#changing

The previous licensed version is still available to anyone.

aekiss commented 2 years ago

I'm happy to change from GPLv2 to LGPLv3 or anything else that's compatible with the FMS license.

marshallward commented 2 years ago

Unlike GPLv3, LGPLv3 can be built with proprietary applications, so I think you are fine. I believe MOM6 was changed from GPL3 to LGPL3 in order to accommodate DoE projects like CICE or Icepack(?).

My personal opinion is to just keep GPLv2, the overall enforcement is simpler. But if you want to relicense, then I grant whatever permission you need from me to do it.

StephenGriffies commented 2 years ago

I also grant whatever permission you need to take whatever steps you see as best. Thanks @aidanheerdegen

aidanheerdegen commented 2 years ago

Unlike GPLv3, LGPLv3 can be built with proprietary applications, so I think you are fine. I believe MOM6 was changed from GPL3 to LGPL3 in order to accommodate DoE projects like CICE or Icepack(?).

My personal opinion is to just keep GPLv2, the overall enforcement is simpler. But if you want to relicense, then I grant whatever permission you need from me to do it.

Thanks for the feedback @marshallward. I am not a lawyer, nor do I play one on TV, so I have no idea.

However, this is a quote from the second link above:

When we say that GPLv2 and GPLv3 are incompatible, it means there is no legal way to combine code under GPLv2 with code under GPLv3 in a single program. This is because both GPLv2 and GPLv3 are copyleft licenses: each of them says, “If you include code under this license in a larger program, the larger program must be under this license too.” There is no way to make them compatible. We could add a GPLv2-compatibility clause to GPLv3, but it wouldn't do the job, because GPLv2 would need a similar clause.

Which is exactly the situation we have here. MOM5 is GPLv2 and FMS is LGPLv3.

marshallward commented 2 years ago

I'll try to check up later, but note that MOM6 and FMS are lesser GPL3 (LGPL3), not GPL3.

aidanheerdegen commented 2 years ago

I don't think it matters that it is LGPL3. From https://www.gnu.org/licenses/license-list.html#LGPLv3

Please note that LGPLv3 is not compatible with GPLv2 by itself. However, most software released under GPLv2 allows you to use the terms of later versions of the GPL as well. When this is the case, you can use the code under GPLv3 to make the desired combination. To learn more about compatibility between GNU licenses, please see our FAQ

There are explicit instructions in the licence file that show how to specify a version of the licence, or any later version, which would also work:

https://github.com/mom-ocean/MOM5/blob/master/LICENSE#L296-L299

There are no copyright statements in the code I believe. Would it be sufficient to add a COPYRIGHT file with the boilerplate copyright statement which includes the "or later version" wording?

Or add the copyright statement to the top of the LICENSE file (that seems to be standard too).

marshallward commented 2 years ago

Sorry, I was only speaking to the FMS issue rather than ACCESS, to which you might be referring and might benefit from LGPL3.

For what it's worth, here is my unprofessional take:

So I agree that MOM5 could benefit from a re-license to LGPL3, assuming you can get the consent from everyone, but GPL2 remains an option.


BTW a COPYRIGHT statement might create more problems than it solves since work from the US government must be in the public domain and cannot be under copyright. I'm guess that includes MOM5.

aidanheerdegen commented 2 years ago

Ok. I get it. It's complicated.

I think updating to LGPL3 is a good idea

I don't think there is a big deal in updating without getting consent from everyone, as it is not harming any other copyright holder: older versions of the code will still be available with the previous licence and the change is minor to allow more interoperability, not less.

The major contributor according to GitHub is @timleslie but we know that this was code written by Stephen Griffies and uploaded by Tim. The initial commit accounts for 956K of the 971K total changes he made.

micaeljtoliveira commented 2 years ago

As a complement to what I wrote here:

@marshallward Is correct, the LGPL of FMS is not an issue for MOM5 when used on its own. So this:

  • removes prohibition of including FMS within MOM5

is not true, as there is no prohibition here.

If ACCESS is still going the MPMD route with a separate MOM5 executable, then it probably does not matter, but I could see that changing in the future.

I would say that's not so clear, One could argue that because the components exchange complex data during execution, they form a combined work. See https://www.gnu.org/licenses/gpl-faq.html#MereAggregation for more details. But it's unlikely that someone would go down this path. In any case, better to change the license to avoid any possible problems.

aidanheerdegen commented 2 years ago

is not true, as there is no prohibition here.

If FMS were linked as library yes, but (and I've already shown I'm woefully ignorant so happy to be corrected) FMS is explicitly included in the source of MOM5 via subtree, so isn't exempt from the GPL requirements

https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Differences_from_the_GPL

Essentially, if it is a "work that uses the library", then it must be possible for the software to be linked with a newer version of the LGPL-covered program. The most commonly used method for doing so is to use "a suitable shared library mechanism for linking". Alternatively, a statically linked library is allowed if either source code or linkable object files are provided.[6]

castelao commented 2 years ago

I have nothing against changing the license.

Maybe useful: https://choosealicense.com/licenses/

@aidanheerdegen, thanks

aidanheerdegen commented 2 years ago

My preference is to make this change via a PR and get at least @marshallward and @StephenGriffies to review the PR and approve changes. I have tested and it seems to be sufficient to just change the file, and GitHub picks up the change.

As per https://choosealicense.com/licenses/lgpl-3.0/ the GNU preferred method is to have two files, COPYING and COPYING.LESSER, as the LGPL is merely a modification of the GPL it requires a full copy of the GPL also be included.

I tested this in a temporary repo and it seems to work, and the license is detected by GitHub, though as LGPL-3.0 + GPL-3.0.

https://github.com/aidanheerdegen/licencetest