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

Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose in Nessie server, GC-tool, Admin-Tool and CLI/REPL #8498

Merged
merged 5 commits into from
May 11, 2024

Conversation

snazy
Copy link
Member

@snazy snazy commented May 10, 2024

Dependencies that are not Apache licensed but MIT/BSD/Go/UPL/ISC licensed must include an entry in the NOTICE file. This change verifies that an "entry" for those dependencies is present.

This change also allows "retrieving" the NOTICE via:

  • /NOTICE.txt from Nessie/Quarkus server
  • via HELP LICENSE in the CLI/REPL
  • via the new show-licenses command in the GC tool

Also:

  • Adds a new "global" convenience codeChecks task, that includes license-checks, spotless-check and checkstyle.
  • Adds MIT/BSD/ISC licenses from the Nessie web UI to the NOTICE file

@snazy snazy force-pushed the notice-file-checks branch 3 times, most recently from 97de015 to c65acfc Compare May 11, 2024 05:51
@@ -33,3 +33,15 @@ dependencies {
}

tasks.withType<Test>().configureEach { useJUnitPlatform() }

tasks.register("compileAll").configure {
Copy link
Member Author

Choose a reason for hiding this comment

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

Adding these two tasks here as well, as a convenience

@@ -219,3 +222,17 @@ class MemoizedGitInfo {
}
}
}

afterEvaluate {
tasks.register("codeChecks").configure {
Copy link
Member Author

Choose a reason for hiding this comment

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

Convenience task to run "all the code checks"

@@ -51,6 +51,7 @@ dependencies {
implementation(project(":nessie-rest-common"))
implementation(project(":nessie-rest-services"))
implementation(project(":nessie-versioned-spi"))
implementation(project(":nessie-notice"))
Copy link
Member Author

Choose a reason for hiding this comment

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

That's all what's needed to make curl http://127.0.0.1:19120/NOTICE.txt work

@snazy snazy marked this pull request as ready for review May 11, 2024 07:38
@snazy snazy changed the title Verify BSD+MIT license mentions in NOTICE file + expose it in Nessie server, GC-tool and CLI/REPL tools Verify BSD+MIT+Go license mentions in NOTICE file + expose it in Nessie server, GC-tool and CLI/REPL tools May 11, 2024
@snazy snazy changed the title Verify BSD+MIT+Go license mentions in NOTICE file + expose it in Nessie server, GC-tool and CLI/REPL tools Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose it in Nessie server, GC-tool and CLI/REPL tools May 11, 2024
@snazy snazy changed the title Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose it in Nessie server, GC-tool and CLI/REPL tools Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose it in Nessie server, GC-tool, Admin-Tool and CLI/REPL tools May 11, 2024
@snazy snazy changed the title Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose it in Nessie server, GC-tool, Admin-Tool and CLI/REPL tools Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose it in Nessie server, GC-tool, Admin-Tool and CLI/REPL May 11, 2024
@snazy snazy changed the title Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose it in Nessie server, GC-tool, Admin-Tool and CLI/REPL Verify BSD+MIT+Go+UPL+ISC license mentions in NOTICE file + expose in Nessie server, GC-tool, Admin-Tool and CLI/REPL May 11, 2024
mod.poms.flatMap { it.licenses }.map { it.name })
.distinct()

if (!licenses.any { needsNoNotice(it) } && licenses.any { needsNotice(it) }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose this is meant for dual licensing, maybe add a comment explaining the rationale?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct - it's for (most) dependencies that use more than one license.

@snazy snazy merged commit 23e7820 into projectnessie:main May 11, 2024
16 checks passed
@snazy snazy deleted the notice-file-checks branch May 11, 2024 16:55
snazy added a commit that referenced this pull request May 27, 2024
renovate bot added a commit that referenced this pull request May 27, 2024
* Update dependency com.github.jk1:gradle-license-report to v2.8

* Fix left-over from #8498

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Stupp <snazy@snazy.de>
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.

None yet

2 participants