vault icon indicating copy to clipboard operation
vault copied to clipboard

core/api: Add missing LICENSE files to sub-modules

Open tsaarni opened this issue 1 year ago • 1 comments

This change copies ./api/LICENSE to each sub-module ./api/auth/*

Fixes #27775

Description

Go module tooling mandates that each sub-module contains its own LICENSE file. If absent, it defaults to the LICENSE file in the root of the git repository. This resulted in the api/auth/* modules erroneously inheriting the BUSL license instead of the correct MPL license, as indicated by the SPDX info in the actual API code.

See https://go.dev/ref/mod#vcs-license

When the go command creates a .zip file for a module that is not in the repository root directory, if the module does not have a file named LICENSE in its root directory (alongside go.mod), the go command will copy the file named LICENSE from the repository root directory if it is present in the same revision.

Adding the LICENSE files to each module ensures that module documentation is displayed correctly on pkg.go.dev and resolves issues with various tools, such as go-licenses, showing incorrect license information for the sub-modules.

tsaarni avatar Jul 31 '24 08:07 tsaarni

Just a friendly nudge to see if you've had a chance to take a look this PR yet?

tsaarni avatar Aug 15 '24 04:08 tsaarni

Sorry to bother again, but wanted to check if this could be merged? 🙏

tsaarni avatar Sep 05 '24 13:09 tsaarni

Hey there! Thanks for this. I'm going to look into this and try and get this over the finish line as this makes sense to me and seems to be well-considered but I want to triple check everything first considering it's legal/copyright-related.

VioletHynes avatar Sep 20 '24 19:09 VioletHynes

@VioletHynes Great news! Thank you for your effort as well, greatly appreciated!

tsaarni avatar Sep 23 '24 18:09 tsaarni