Menu

#1940 [SimGear] GPL and LGPL

2016.4
Started
nobody
Low
2024-10-25
2017-01-24
No

The ReadMe and COPYING says that SimGear is licensed under the LGPL-2+ but following files contain GPL headers so they seem to be licensed under the GPL.

  • timing/timestamp.cxx
  • timing/timestamp.hxx
  • magvar/magvar.hxx
  • magvar/magvar.cxx
  • screen/colors.hxx
  • io/sg_socket.hxx
  • io/sg_socket_udp.cxx
  • io/sg_socket_udp.hxx
  • io/sg_socket.cxx
  • io/iochannel.hxx
  • io/sg_file.cxx
  • io/HTTPRepository.hxx
  • io/HTTPRepository.cxx
  • io/iochannel.cxx
  • io/sg_serial.hxx
  • io/sg_serial.cxx
  • scene/material/matlib.hxx
  • scene/material/EffectCullVisitor.cxx
  • scene/material/mat.cxx
  • scene/material/matmodel.hxx
  • scene/material/Technique.hxx
  • scene/material/Pass.hxx
  • scene/material/matlib.cxx
  • scene/material/EffectCullVisitor.hxx
  • scene/material/EffectData.hxx
  • scene/material/matmodel.cxx
  • scene/material/mat.hxx
  • scene/material/EffectElementBuilder.hxx
  • scene/material/EffectElement.hxx
  • scene/material/EffectGeode.cxx
  • scene/material/EffectGeode.hxx
  • scene/util/SGTextureStateAttributeVisitor.hxx
  • scene/util/SGReaderWriterOptions.hxx
  • scene/util/VectorArrayAdapter.hxx
  • scene/util/OptionsReadFileCallback.cxx
  • scene/util/SGTextureStateAttributeVisitor.cxx
  • scene/util/SGSceneFeatures.hxx
  • scene/util/NodeAndDrawableVisitor.cxx
  • scene/util/PrimitiveUtils.hxx
  • scene/util/SGDebugDrawCallback.hxx
  • scene/util/QuadTreeBuilder.cxx
  • scene/util/SGEnlargeBoundingBox.cxx
  • scene/util/StateAttributeFactory.cxx
  • scene/util/SGSceneUserData.hxx
  • scene/util/QuadTreeBuilder.hxx
  • scene/util/SGStateAttributeVisitor.hxx
  • scene/util/NodeAndDrawableVisitor.hxx
  • scene/util/SGPickCallback.hxx
  • scene/util/RenderConstants.hxx
  • scene/util/PrimitiveUtils.cxx
  • scene/util/SGSceneUserData.cxx
  • scene/util/SGReaderWriterOptions.cxx
  • scene/util/SGUpdateVisitor.hxx
  • scene/util/SGNodeMasks.hxx
  • scene/util/SGSceneFeatures.cxx
  • scene/util/OptionsReadFileCallback.hxx
  • scene/util/SGStateAttributeVisitor.cxx
  • scene/util/SGEnlargeBoundingBox.hxx
  • scene/util/StateAttributeFactory.hxx
  • scene/model/SGScaleTransform.hxx
  • scene/model/modellib.hxx
  • scene/model/SGRotateTransform.cxx
  • scene/model/modellib.cxx
  • scene/model/particles.hxx
  • scene/model/CheckSceneryVisitor.cxx
  • scene/model/ModelRegistry.cxx
  • scene/model/SGOffsetTransform.cxx
  • scene/model/SGRotateTransform.hxx
  • scene/model/SGReaderWriterXML.hxx
  • scene/model/shadanim.cxx
  • scene/model/SGClipGroup.cxx
  • scene/model/SGTranslateTransform.hxx
  • scene/model/SGText.cxx
  • scene/model/SGPickAnimation.cxx
  • scene/model/particles.cxx
  • scene/model/CheckSceneryVisitor.hxx
  • scene/model/SGTranslateTransform.cxx
  • scene/model/SGOffsetTransform.hxx
  • scene/model/ModelRegistry.hxx
  • scene/model/SGText.hxx
  • scene/model/SGPickAnimation.hxx
  • scene/model/SGReaderWriterXML.cxx
  • scene/model/SGClipGroup.hxx
  • scene/model/SGScaleTransform.cxx
  • scene/tgdb/GroundLightManager.hxx
  • scene/tgdb/SGOceanTile.hxx
  • scene/tgdb/SGVasiDrawable.cxx
  • scene/tgdb/TreeBin.hxx
  • scene/tgdb/SGTileDetailsCallback.hxx
  • scene/tgdb/obj.cxx
  • scene/tgdb/SGReaderWriterBTG.cxx
  • scene/tgdb/obj.hxx
  • scene/tgdb/SGOceanTile.cxx
  • scene/tgdb/ReaderWriterSPT.hxx
  • scene/tgdb/SGBuildingBin.hxx
  • scene/tgdb/SGModelBin.hxx
  • scene/tgdb/SGTriangleBin.hxx
  • scene/tgdb/ReaderWriterSPT.cxx
  • scene/tgdb/SGReaderWriterBTG.hxx
  • scene/tgdb/SGVertexArrayBin.hxx
  • scene/tgdb/BucketBoxTest.cxx
  • scene/tgdb/SGVasiDrawable.hxx
  • scene/tgdb/userdata.cxx
  • scene/tgdb/userdata.hxx
  • scene/tgdb/pt_lights.hxx
  • scene/tgdb/ShaderGeometry.hxx
  • scene/tgdb/ReaderWriterSTG.hxx
  • scene/tgdb/apt_signs.cxx
  • scene/tgdb/BucketBox.hxx
  • scene/tgdb/pt_lights.cxx
  • scene/tgdb/ShaderGeometry.cxx
  • scene/tgdb/SGBuildingBin.cxx
  • scene/tgdb/apt_signs.hxx
  • scene/tgdb/SGTexturedTriangleBin.hxx
  • scene/tgdb/SGDirectionalLightBin.hxx
  • scene/tgdb/SGLightBin.hxx
  • scene/tgdb/TreeBin.cxx
  • scene/tgdb/ReaderWriterSTG.cxx
  • scene/sky/cloudfield.cxx
  • scene/sky/CloudShaderGeometry.hxx
  • scene/sky/CloudShaderGeometry.cxx
  • scene/sky/newcloud.cxx
  • scene/sky/newcloud.hxx
  • scene/sky/cloudfield.hxx
  • scene/tsync/terrasync.cxx
  • scene/tsync/terrasync.hxx
  • props/tiedpropertylist.hxx
  • environment/precipitation.hxx
  • environment/metar.hxx
  • environment/precipitation.cxx
  • environment/visual_enviro.hxx
  • environment/metar.cxx
  • environment/visual_enviro.cxx
  • sound/sample_group.cxx
  • sound/soundmgr_openal.cxx
  • sound/soundmgr_aeonwave.cxx
  • sound/sample.cxx
  • sound/sample.hxx
  • sound/soundmgr_openal_private.hxx
  • sound/xmlsound.cxx
  • structure/SGReferenced.hxx
  • structure/SGPerfMon.cxx
  • structure/SGExpression.cxx
  • structure/callback.hxx
  • structure/SGAtomic.cxx
  • structure/StateMachine.hxx
  • structure/SGAtomic.hxx
  • structure/subsystem_mgr.hxx
  • structure/StateMachine.cxx
  • structure/SGExpression.hxx
  • structure/SGPerfMon.hxx
  • structure/subsystem_mgr.cxx
  • threads/SGThread.hxx
  • threads/SGThread.cxx
  • math/beziercurve.hxx

Discussion

  • ranguli

    ranguli - 2024-10-21

    @jmturner This might be something of interesting, specifically with relevance to the work regarding SPDX in CI. SimGear appears to be LGPL licensed but has a mix of GPL and LGPL code. I think this would probably get flagged by the SPDX checker whenever someone makes a commit that changes one of the LGPL source files.

    Besides that, I think intermixing GPL and LGPL may defeat the purpose of the entire project being LGPL (if I can remember my licensing rules correctly).

    I guess since everything else in FlightGear is GPL, it would seem like the straight forward option would be to formally codify SimGear as GPL. Given that the LGPL is more permissive, this shouldn't be a problem as far as licensing legality goes.

     

    Last edit: ranguli 2024-10-21
  • James Turner

    James Turner - 2024-10-22

    The problem is the original author of FG wanted to use some parts of the code in other projects, and we wanted the option for those to be private. So SG was created by pulling code out of FG.

    Becuase Simgear has been LGPL for its entire lifetime, I think it's safe to assume any code in SG is LGPL, if the license is clearly 'from an old FG file' and says GPL.

     
  • ranguli

    ranguli - 2024-10-22

    @jmturner Ah that's some very useful historical context, thank you. Good to know. Based on that, it seems like it would be safe to convert the headers of all GPL files into LGPL files. Would you like me to do that, as well as update the copy of the license text? The "L" in LGPL used to stand for Library but now stands for Lesser. I can also swap the license out for a markdown version as those as a bit easier on the eyes when viewing in web UIs.

    If the change involved mass modification of SLOC it would be a mess for git history, but where all the change are contained to the header portion, we could perhaps get away with anywhere from one to a few commits and not make a mess of things?

     
  • James Turner

    James Turner - 2024-10-22

    So there's some additonal changes coming, which might impact this: we are probably going to roll SImGear back into FlightGear, but only on 'next', and in doing that we will sacrifice the Simgear commit history anyway.

    We don't want to re-write the FG repo history, and the SG history is much less interesting for 'git bisect', so the proposal is just to 'git add' the SG sources into the FG repo. Becuase that's low impact for existing checkouts of FG, especially.

    Given this idea (which is still under disucssion), it's more important that the license in the SG files is correct (and is LGPL), but the history is less critical.

    However, if you're touching the licenses in files, you should definitiely switch to using SPDX to avoid boilerplate: longer term we want to use have a valid SPDX license field on every file.

    (Assuming we do the merge, it will still be possible to build+install SimGear standalone, as LGPL, from the FG repo, so we still need to get the licences in order, regardless of where the code lives)

     
  • ranguli

    ranguli - 2024-10-22

    Oh, interesting! Good to know. It will certainly be more convenient for developers to have one less repo to clone and manage, so that's nice.

    I can definitely do the switchover to SPDX, that will certainly help with the eventual CI stuff and larger goal of SPDX in every file (and is just an all-around good practice).

    Before I go ahead and touch anything I want to make sure I make the changes correctly. Taking the first file mentioned in this issue (simgear/timing/timestamp.cxx) as an example, the current header is:

    /**
    
     * \file timestamp.cxx
     * Provides a class for managing a timestamp (seconds & milliseconds.)
     */
    
    // Written by Curtis Olson, started December 1998.
    //
    // Copyright (C) 1998  Curtis L. Olson  - http://www.flightgear.org/~curt
    //
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License as
    // published by the Free Software Foundation; either version 2 of the
    // License, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful, but
    // WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    // General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    //
    // $Id$
    

    Am I correct in thinking that the new header should:

    1. Contain a line with the contents "SPDX-License-Identifier: LGPL-2.1-or-later"
    2. Change the license preamble to that of the LGPL instead of GPL (or do we want to remove it given that the SPDX identifier kind of takes care of that?)

    For bonus points, I would also like to suggest the following:

    1. Remove $Id$, which Google tells me is a holdover from the SVN days
    2. References to the author, date as well as the brief description at the top get the corresponding doxygen tag (@author, @date, @brief) etc. Could be done at another time, but I'm going to be combing through headers anyways.

    The new header would then tentatively look something like this (depending on what we do and don't want changed):

    /**
    
     * @file timestamp.cxx
     * @brief Provides a class for managing a timestamp (seconds & milliseconds.)
     * @author Curtis Olson - http://www.flightgear.org/~curt <- ***this is a dead link, what to do?***
     * @date 1998
     * SPDX-License-Identifier: LGPL-2.1-or-later
     */
    

    The result in Doxygen is attached as an image.

    Let me know your thoughts. Cheers,
    Joshua

     
  • James Turner

    James Turner - 2024-10-22

    There's actually SPDX tags for brief, file and author. See eg:
    https://gitlab.com/flightgear/simgear/-/blob/next/simgear/debug/debug_types.h?ref_type=heads

    So my suggestion would be: use SPDX for all those attributes, and remove the $Id$ cruft as well.

    And yes remove the preamble, the whole point of SPDX is not to copy that into each file, but to only have something machine readable (or event, machine updateable....)

    We have been doing this incrementally when touching files for other reasons, but nothing consistent yet.

     
  • ranguli

    ranguli - 2024-10-22

    Excellent, that makes it much more straight forward. I'll get cracking.

     
  • ranguli

    ranguli - 2024-10-22

    @jmturner This is what I've done so far: https://gitlab.com/ranguli/simgear/-/commit/62a15f3417ae07ada52fa71884622ee2e5298c95

    I just did the files under simgear/timing/ as a test run. If everything looks good I will continue. Probably one directory per commit.

    How would you like this packaged when the time comes for a merge request? I can do one per directory, or one big one, or something else. Whatever you prefer.

     
  • James Turner

    James Turner - 2024-10-22

    That looks great. Commented on the GitLab version. I've got no strong feelings on how you package it, since the history is probably going to go away anyway :)

     
  • Gijs

    Gijs - 2024-10-25
    • status: New --> Started
     

Log in to post a comment.

MongoDB Logo MongoDB