rp2040-project-template icon indicating copy to clipboard operation
rp2040-project-template copied to clipboard

Rename license files to standardised names

Open moritztim opened this issue 1 year ago • 8 comments

Summary of all my comments: Saving the licenses in files named MIT and APACHE2.0[^1] (which is not a valid identifier anyway) prevents tools like VSCode and GitHub (see GitHub docs) as well as users to recognize them as a license file at a glance. The convention is to name them LICENSE, or in the case of multiple files, LICENSE-<name>[^2]. There's also a standardized notation for the case of choice between multiple licenses.[^3]

[^1]: See https://github.com/rp-rs/rp2040-project-template/pull/89#issuecomment-2471463168 [^2]: See https://github.com/rp-rs/rp2040-project-template/pull/89/commits/08978253530ed005f7890dc60551f8d5c6e5a712 [^3]: See https://github.com/rp-rs/rp2040-project-template/pull/89#issuecomment-2471480496

moritztim avatar Nov 12 '24 19:11 moritztim

I just realised that this is licensed under both the MIT and the Apache 2.0 license... I guess this complicates things a bit. Maybe there should be a third file LICENSE with the license that the actual code here is under, as opposed to the possible licenses that could be chosen for any projects using this template.

moritztim avatar Nov 12 '24 20:11 moritztim

According to the SPDX specification on composite license expressions you just have to put an "OR" keyword between the license options.

moritztim avatar Nov 12 '24 20:11 moritztim

The "License" tab shows up with this change. Unfortunately, it doesn't show both licenses in full. The "License" tab on my fork's GitHub page

moritztim avatar Nov 12 '24 20:11 moritztim

This almost works. Unfortunately GitHub doesn't recognize the apache license because it has another dot in its name. "License" tab "MIT License" tab

moritztim avatar Nov 12 '24 20:11 moritztim

Now it's getting correctly displayed by GitHub. License tabs on my fork You might not want to have a third LICENSE file with the standardized expression, since it might be confusing to have three files. Sidebar Sorry for the back and forth, it's probably best to squash this.

moritztim avatar Nov 12 '24 20:11 moritztim

The README.md refers to these files as well. ("See MIT or APACHE2.0 for more information on each specific licence.") That should probably be updated to point to the renamed files.

jannic avatar Nov 12 '24 21:11 jannic

Right, I'll do that

moritztim avatar Nov 12 '24 21:11 moritztim

FYI our main repo uses the same licences and GitHub detects them correctly. We should have it done consistently. rp-rs/rp-hal

Yeah, since the readme mentions the dual license with a proper OR clause, I think the LICENSE file might not be needed. I'll remove it and the reference to it if you want.

moritztim avatar Nov 12 '24 21:11 moritztim

Yes please.

ithinuel avatar Apr 05 '25 18:04 ithinuel

It's been a while, can you remind me what I need to remove exactly?

moritztim avatar Apr 06 '25 05:04 moritztim

@moritztim you need to remove the thing you said you would remove, exactly 1 post above ithinuel's reply:

I think the LICENSE file might not be needed.

which is the only file you added in this PR, the other changes were 2 file renames and updating the readme to point to those files.

9names avatar May 03 '25 06:05 9names

Fixed and tested on GitHub.

moritztim avatar May 04 '25 06:05 moritztim