Add Engine.get_source_info()
to help people comply with the MPL 2.0
#11064
Labels
Engine.get_source_info()
to help people comply with the MPL 2.0
#11064
Describe the project you are working on
A game about typing lyrics while listening to a song and a game about tying the titles of songs while listening to a medley
Describe the problem or limitation you are having in your project
Whenever you distribute a Godot game, you have to comply with the licenses for third-party components that are a part of Godot. The docs mention two different methods for how you can do this:
Engine.get_license_info()
andEngine.get_copyright_info()
.COPYRIGHT.txt
.I always use the first method because it’s automated. With the second method, you have to either remember to manually copy
COPYRIGHT.txt
into your game’s releases or create your own automation for it. This feature request applies to the first method. It doesn’t really affect the second method.One of Godot’s third-party components is
thirdparty/certs/ca-certificates.crt
.ca-certificates.crt
is available under the Mozilla Public License version 2.0. The MPL 2.0 says (emphasis added):In other words, whenever anyone distributes a copy of Godot, they need to also need to tell users where they can find the source code for
thirdparty/certs/ca-certificates.crt
. Godot binaries don’t tell users where they can find the source code forca-certificates.crt
. Fortunately, the Godot source code does tell users where they can find the source code forca-certificates.crt
.The easiest way to comply with the MPL 2.0 in this situation would be to tell users that they can get Godot’s source code from https://github.com/godotengine/godot. That way, users can open the link, find the tag for the specific version of Godot that they’re using, open
thirdparty/README.md
, find the repo URL and commit hash for ca-bundle, clone the ca-bundle repo and checkout the correct commit.You could also link directly to the right commit in the ca-bundle repository, but that requires more maintenance and you’re more likely to accidentally link to the wrong version. Additionally, you might have to add additional links in the future if new versions of Godot add any additional MPL 2.0–licensed components.
Here’s the problem: developers likely don’t know that they should include a link to Godot’s source code in their game. There’s probably many developers who are accidentally violating the MPL 2.0 because they didn’t realize that this was a requirement when distributing Godot games.
Additionally, there’s also a good chance that people distributing the Godot editor are accidentally violating this requirement. For example, take a look at these official Godot Editor download pages:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
We already have
Engine.get_license_info()
andEngine.get_copyright_info()
. Those functions give Godot projects access to data stored inCOPYRIGHT.txt
. I propose that we add a new function namedEngine.get_source_info()
.Engine.get_source_info()
would return aString
that contains the contents ofCOPYRIGHT.txt
’sSource
field. The description for that function could mention that it can be used to help ensure MPL 2.0 compliance.Specifically, it should return the contents of
COPYRIGHT.txt
’sSource
field in order to make things easier for downstream projects. That way if someone forks Godot, they’ll only need to editCOPYRIGHT.txt
. Games that switch from using the upstream version of Godot to the fork will automatically start using the fork’s URL.Technically, we could just update the documentation instead of adding a function, but adding a function will help spread awareness of this requirement. Specifically, it will spread awareness to developers who use or will use the
Engine.get_license_info()
,Engine.get_copyright_info()
andEngine.get_license_text()
functions. Also, functions are easier to notice than paragraphs explaining legal requirements.After that function gets added, we could do the following:
Engine.get_source_info()
. We could also update the rest of the page to explain why including a link to Godot’s source code is helpful for license compliance.Engine.get_source_info()
somehow. This way, anyone redistributing the Godot Editor will be automatically compliant with this aspect of the MPL 2.0.--about source
command-line option that will print the output ofEngine.get_source_info()
. That way, more games will automatically be compliant with this aspect of the MPL 2.0.Engine.get_source_info()
to the third-party notices screen. That way, more games will automatically be compliant with this aspect of the MPL 2.0.I’m willing to open a pull request that adds the
Engine.get_source_info()
function and open pull requests to make the above list of changes.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
I’m not sure whether or not this enhancement will be used often or not. Like I mentioned previously, there’s two different ways to make sure that you’re compliant with third-party licenses:
Engine.get_license_info()
andEngine.get_copyright_info()
.COPYRIGHT.txt
.If people rarely use the first method, then this feature will rarely be used. If people always use the first method, then this feature will be used very often.
It’s really easy to work around the lack of this feature:
That being said, the workaround is incomplete. That workaround could be added to the Godot Docs, but it wouldn’t do as good of a job at building awareness. Additionally, developers would have to remember to make that change manually if they switch to a fork of Godot.
Is there a reason why this should be core and not an add-on in the asset library?
Add-ons don’t have access to the
COPYRIGHT.txt
file that was used to compile the version of Godot that you’re currently using, so add-ons wouldn’t allow for automatic compliance if you started using a fork of Godot. Additionally, if this was implemented as an add-on, then it wouldn’t do as good of a job at building awareness of this requirement.The text was updated successfully, but these errors were encountered: