Skip to content

Conversation

@kaechele
Copy link
Contributor

@kaechele kaechele commented Dec 7, 2025

License headers contain the old FSF address, replace them with SPDX headers.

The SPDX License Identifier headers provide a compact and unambiguous way to identify the license applicable to each file.

I also updated the LICENSE file with the latest version available from https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
Copilot AI review requested due to automatic review settings December 7, 2025 00:07

This comment was marked as spam.

Copy link
Contributor

@Rito13 Rito13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NML is part of OpenTTD project, please make sure that your PR does not violate the CONTRIBUTING.md. It would be a shame, if it did.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
<signature of Moe Ghoul>, 1 April 1989
Moe Ghoul, President of Vice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example signature the name Ty Coon is more appropriate fo OTTD.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

I simply used the unaltered license text straight from the FSF, which explains this change. But it can be changed back if there is a preference for this name.

nml/_lz77.c Outdated
* with NML; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
// SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not match CODINGSTYLE.md from OpenTTD.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a fix. Thanks for catching that.

You should have received a copy of the GNU General Public License along
with NML; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."""
# SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that violate the license?

attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year>  <name of author>

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, see <https://www.gnu.org/licenses/>.

NML contains the first two lines in the third one:

NML is free software; you can redistribute it and/or modify

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not violate the license. Your quote above is missing some context, namely a line that's a few lines up:

END OF TERMS AND CONDITIONS

The part you quoted is not part of the license, so not following it to the letter does not violate said license.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just don't see the point of using SPDX-License-Identifier.
With the old solution the main part license was accessible through the python embedded help method, which is very helpful in interactive python. With your suggestion it just states which license is used.
Also for python I would opt for using """ ... """ instead of # ... as it makes it more clear that it is a description and not simple comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately, it's a matter of preference. I'm happy to provide a PR that just changes the address, if that is what maintainers prefer.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
@kaechele
Copy link
Contributor Author

kaechele commented Dec 7, 2025

Thanks for your review and comments, @Rito13.

Just to add, I can attest that this PR is in compliance with the contribution guidelines. I appreciate the spirit of the AI rule and also personally agree with it.

In full transparency:
I did use ChatGPT to help formulate a sed command that would facilitate the replacement of the license headers with the SPDX ID recursively. I ran the sed command by hand after copying and pasting it out of ChatGPT and modifying it slightly to fit the exact requirements.

The Copilot Code Review was obviously AI generated, but this must be some new default setting that I didn't call for. I'll see to fix that.
EDIT: I fixed this setting. It was indeed something that's automatically enabled if you have GitHub Copilot enabled for your account. Annoying.

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.
with this program; if not, see <https://www.gnu.org/licenses/>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to alter the FSF's suggestion on how to apply the license to new works, unless you want to suggest that the OpenTTD project should take a stance in suggesting to other people how they should apply the GPL license to their works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants