Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

tsaarni
Copy link
Contributor

@tsaarni tsaarni commented Jul 31, 2024

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.

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.

This update ensures that module documentation is displayed correctly on
pkg.go.dev and resolves issues with various tools showing incorrect license
information for the sub-modules.

Signed-off-by: Tero Saarni <[email protected]>
@tsaarni
Copy link
Contributor Author

tsaarni commented Aug 15, 2024

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

@tsaarni
Copy link
Contributor Author

tsaarni commented Sep 5, 2024

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

@VioletHynes
Copy link
Contributor

VioletHynes commented Sep 20, 2024

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.

Copy link
Contributor

@VioletHynes VioletHynes left a comment

Choose a reason for hiding this comment

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

Hi there! Thanks for this. Ran this by legal just to make sure I wasn't missing anything dumb, and got the all clear.

Super appreciate the clear description and references provided. Thanks a tonne for the contribution!

@VioletHynes VioletHynes merged commit 6f13aec into hashicorp:main Sep 23, 2024
71 of 72 checks passed
@tsaarni
Copy link
Contributor Author

tsaarni commented Sep 23, 2024

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

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

Successfully merging this pull request may close these issues.

Go docs for MPL-2.0-licensed packages not displaying on https://pkg.go.dev
3 participants