Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all] Clean licenses #139

Merged
merged 10 commits into from
Feb 15, 2017
Merged

Conversation

guparan
Copy link
Contributor

@guparan guparan commented Jan 19, 2017

This PR is big but should finally clean all licenses in SOFA.

Here is what I did:

  • Fix the licenseUpdater script
  • Fix wrong or missing LGPL headers in modules
  • Fix wrong or missing LGPL headers in SofaKernel
    WARNING: I found a contaminating paste of GPL code in LCPcalc.cpp:501 (lcp_lexicolemke function). Since I didn't found any usage of this function in SOFA (including plugins), I removed it.
    Please tell me if this is OK. Otherwise, we will have to discuss about GPL contamination.
  • Fix wrong or missing GPL headers in applications/projects
  • Fix wrong or missing LGPL headers in applications/plugins (commits removed)
  • Fix wrong or missing GPL headers in applications/plugins: OptiTrackNatNet, SofaPML and SofaVRPNClient (commits removed)
  • Fix wrong license in SofaHAPI/initSofaHAPI:58 (should be LGPL) (commits removed)
  • Optimize organization of LICENSE files in SOFA

This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings nor unit test failures.
  • does not break existing scenes.
  • does not break API compatibility.
  • has been reviewed and agreed to be transitional.
  • is more than 1 week old.

Reviewers will merge only if all this checks are true.

@guparan guparan added the enhancement About a possible enhancement label Jan 19, 2017
@damienmarchal
Copy link
Contributor

damienmarchal commented Jan 19, 2017

Hi,

Thanks for this PR and nice work.

This PR:

  • succeed to be compiled on each configuration on the CI.
  • does not generates new warnings or test failure.
  • does not break existing scenes.
  • does not break API compatibility.
  • is now 1 week old.

Once the CI will confirm nothing is broken and upon @matthieu-nesme agreement I suggest we merge this PR without waiting 1 week :)

@matthieu-nesme
Copy link
Member

Warning, you did change headers in extlibs (at least CImg).

@damienmarchal
Copy link
Contributor

GG mathieu

@guparan
Copy link
Contributor Author

guparan commented Jan 20, 2017

Thanks Matthieu !
To keep this PR clean, I edited the commit [applications/plugins] FIX missing licenses and rewrote my branch.

@damienmarchal
Copy link
Contributor

[ci-build]

@kislinsk
Copy link

From the forum (https://www.sofa-framework.org/community/forum/topic/still-license-issues-with-sofa-plugins/):

I noticed that there was a pull request targeting license stuff not long ago (v16.12), which is nice, but I still found some delicate license issues, which potentially can cause trouble for users of SOFA and the SOFA-devs. Just from a first look into the plugin folder for all plugins, that do NOT contain the string “LGPL”, I found conflicting license information. I didn’t yet check the “LGPL”-plugins or SOFA in general for potential transitive license issues (conflicting with licenses of third-party dependencies). It’s also hard to make a pull request for this issues as it is something that the SOFA devs have to decide.

  1. BulletCollisionDetection
    – getModuleLicence() returns “Private”
    – text file with information “LICENCE: Private”
    – initBulletCollisionDetection.cpp has LGPL 2.1 header
    – other source files don’t have a license header
    – depends on BulletPhysics, which is licensed under zlib (with exceptions!)

  2. ExternalBehaviorModel
    – getModuleLicence() returns “???”
    – source files have LGPL 2.1 header

  3. Haption
    – getModuleLicence() not defined
    – text file with information “LICENCE: None”
    – source files have LGPL 2.1 header

  4. ManifoldTopologies
    – getModuleLicence() returns “?”
    – text file with information “LICENCE: ??”

  5. OpenCTMPlugin
    – getModuleLicence() returns “Licence ZLIB”
    – text file with information “LICENCE: OpenCTM library is an Open source, with a very liberal license (zlib/libpng license).”
    – source files have LGPL 2.1 header

  6. Registration
    – getModuleLicence() returns “QPL”
    – has a file LICENCE.txt (should be LICENSE.txt), which states QPL
    – Source files have LGPL 2.1 header

  7. SofaHAPI
    – getModuleLicence() returns “GPL”
    – text file with information “LICENCE: GPL”
    – source files have LGPL 2.1 header

  8. SofaPML
    – getModuleLicence() returns empty string
    – no text file with license information
    – source files have both (!) LGPL 2.1 and GPL 2 headers each

General notes:
– I would expect that every plugin provides a getModuleLicense() function and that this function returns a non-empty string with a valid license
– I would expect getModuleLicense() to return the license version as well if it applies (e.g. LGPL, GPL)
– I would expect getModuleLicense() to follow a common scheme, e.g., the official license title like “zlib” instead of “License ZLIB”
– Search/replace “licence/Licence/LICENCE” to “license/License/LICENSE” would help searching for license information (including filenames and file contents)

@matthieu-nesme
Copy link
Member

for the plugins I know:
BulletCollisionDetection: LGPL
ExternalBehaviorModel: LGPL
Registration: QPL
SofaPML: obsolete, PML is GPL

regarding the versions of LGPL and GPL pick the ones you prefer :p I've got no idea of their subtle differences.

+1 for license (vs licence)!

@kislinsk
Copy link

:-) The differences between LGPL and GPL are everything but subtle. It has a huge impact for the users. For example: GPL requires in general, that someone who uses the code, has to make the own code GPL as well and hence it must be open source, too. This is not acceptable for many organizations and companies. And this is why the two licenses are not compatible at all. :/ Unfortunately, it is very easy to "poison" own code this way without even noticing by having a dependency that has a minor GPL part.

@matthieu-nesme
Copy link
Member

The subtle point is not LGPL vs GPL but GPLv1 vs GPLv2 vs GPLv2.1 vs GPLv3...

@kislinsk
Copy link

I see. :) What do you guys think about a CMake option for explicitly allowing to include non-LGPL parts in the SOFA build (default ON to stay compatible, and maybe even tag it as advanced option)? The idea is that if this switch is off, all the non-LGPL parts (or non-compatible parts) like the applications and a few plugins don't even show up for configuration anymore (technically the add_directory() call into these directories is never made in that case). Currently I have to bundle our own SOFA tarball for the purpose of getting rid of the non-LGPL parts and patch the build system a little bit to, in a nutshell, accept that parts are missing. I can continue to do so, but I'm also interested in contributing something like that.

I imagine to follow the license rule mentioned in the top-level readme file: Exclude a few directories in principle and dynamically lookup the plugins if they are LGPL or not. This way, plugin developers wouldn't need to add a list entry somewhere depending on the license. They would just need to follow a convention in order to make the license determinable by the script. Could be as simple as a LICENSE.txt file or even the implementation of the getModuleLicense() function, which should be easy to parse (and is only missing in a single plugin at the moment).

Opinions?

@damienmarchal
Copy link
Contributor

damienmarchal commented Jan 27, 2017

@kislinsk I really like the idea of having CMake options to be aware and control the build according to the license requirement. On my side I have no time nore experience to do that so I cannot help on that.

EDIT1: This discussion can probably be continued in the "Issues".
EDIT2: so what is the status of this PR ? Do we merge it and improve or do we close it to make a new one on which everyone agree ?
@guparan , @matthieu-nesme

@guparan
Copy link
Contributor Author

guparan commented Jan 30, 2017

I will add a few commits to clean the points showed by @kislinsk like the getModuleLicense() functions. After that, yes, I think this PR should be merged as a first step towards a clean license handling in SOFA.

Licenses organization is now specified in the main README file.
Default license is LGPL as specified by LICENSE.LGPL.txt at root.
Everything is LGPL except directories (and their content recursively) with a license file specifying a different license.
@guparan
Copy link
Contributor Author

guparan commented Feb 9, 2017

As plugins are not really part of SOFA (and are going to move to their own repository soon), I finally think we should not add the SOFA license header to them.

Still, I suggest to have some license template for plugins. Something like this:

/******************************************************************************
*                                                                             *
*                       ComplexMathematicalStuff plugin                       *
*                            (c) 2015-2017 Someone                            *
*                                                                             *
*******************************************************************************
* The plugin license comes here.                                              *
*******************************************************************************
*            made for SOFA, Simulation Open-Framework Architecture            *
*                (c) 2006-YYYY INRIA, USTL, UJF, CNRS, MGH                    *
******************************************************************************/

I will remove all plugins-concerned commits from this PR and create a new one for them.

What do you guys think?

@guparan
Copy link
Contributor Author

guparan commented Feb 10, 2017

I just removed all plugin-concerned commits. They are still available on guparan/sofa:clean_licenses_pr_139.
This PR should now be simple to review :)

@damienmarchal damienmarchal merged commit ee1502f into sofa-framework:master Feb 15, 2017
@guparan guparan mentioned this pull request Feb 16, 2017
epernod added a commit to epernod/sofa that referenced this pull request Mar 6, 2017
…cence.txt into license.LGPL.txt. This changed has not been propagated in the cpack config.
@epernod epernod mentioned this pull request Mar 6, 2017
6 tasks
@guparan guparan added the pr: clean Cleaning the code label Jun 29, 2017
@guparan guparan added this to the v17.06 milestone Jun 29, 2017
@guparan guparan deleted the clean_licenses branch February 19, 2018 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: clean Cleaning the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants