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

Include NOTICE+LICENSE in every jar #10331

Merged
merged 9 commits into from
Feb 5, 2025

Conversation

snazy
Copy link
Member

@snazy snazy commented Feb 3, 2025

Adds the contents of LICENSE and NOTICE to every jar using the following patterns:

  • META-INF/licenses/<maven-group-id>/<maven-artifact-id>-<version>/LICENSE
  • META-INF/licenses/<maven-group-id>/<maven-artifact-id>-<version>/NOTICE

Also explicitly clarifies where dependencies only licensed under "GNU General Public License, Version 2 with the GNU Classpath Exception" are used (included in binary executable and containers).

@snazy
Copy link
Member Author

snazy commented Feb 3, 2025

Review note: run ./gradlew pTML -PjarWithGitInfo

@snazy snazy force-pushed the license-notice-again branch from 4063298 to 0fa20eb Compare February 3, 2025 19:39
NOTICE Outdated Show resolved Hide resolved
@snazy snazy force-pushed the license-notice-again branch from 0fa20eb to 25a47d9 Compare February 3, 2025 20:11
LICENSE-BINARY-DIST Outdated Show resolved Hide resolved
NOTICE-BINARY-DIST Outdated Show resolved Hide resolved
Copy link

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

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

It's a way better change. For clarity, I would rename the LICENSE/NOTICE specific to docker (and runner fat jar). However:

  1. in NOTICE, I would remove the list of license for transitive deps. This NOTICE file is for source distribution, so dependencies don't matter here. Basically, I would remove this part:
This product has transitive dependencies to additional software licensed
under the terms of the following licenses:
* Apache Software License, Version 2.0
* Creative Commons 1.0 Universal
* Eclipse Distribution License, Version 1.0
* Eclipse Public License, Version 1.0
* Eclipse Public License, Version 2.0

See also the LICENSE file.

The Nessie web site provides aggregated license reports for recent Nessie
binary distributions, available at https://projectnessie.org/docs/ and
https://projectnessie.org/downloads/.

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
  1. The LICENSE-BINARY-DIST/NOTICE-BINARY-DIST is only valid for container images (not sure about the runner fat jar). It's not correct for jar files. I would rename to be explicit like LICENSE-CONTAINER-DIST.
  2. The distributed nessie jar files should include a clean META-INF/LICENSE/META-INF/NOTICE. Currently, the nessie jar files don't include LICENSE/NOTICE.

LICENSE Outdated Show resolved Hide resolved
LICENSE-BINARY-DIST Outdated Show resolved Hide resolved
NOTICE Outdated Show resolved Hide resolved
NOTICE Outdated Show resolved Hide resolved
NOTICE Outdated Show resolved Hide resolved
NOTICE Outdated Show resolved Hide resolved
snazy added 4 commits February 5, 2025 15:58
Adds the contents of `LICENSE` and `NOTICE` to every jar using the following patterns:
* `META-INF/licenses/<maven-group-id>/<maven-artifact-id>-<version>/LICENSE`
* `META-INF/licenses/<maven-group-id>/<maven-artifact-id>-<version>/NOTICE`

Also explicitly clarifies where dependencies only licensed under "GNU General Public
License, Version 2 with the GNU Classpath Exception" are used (included in binary executable
and containers).
@snazy snazy force-pushed the license-notice-again branch from e6f397a to 21b4d21 Compare February 5, 2025 15:00
@snazy snazy requested a review from jbonofre February 5, 2025 15:05
Copy link
Member

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

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

LGTM overall 👍

### Note

- This release has no code changes.
- NOTICE and LICENSE files clarifications, included in jars published to Maven Central.
Copy link
Member

Choose a reason for hiding this comment

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

nit: included in published jars... technically, they are included inside the jars, inside the docker images too.

Copy link
Member Author

Choose a reason for hiding this comment

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

This mention is (only) about /NOTICE + /LICENSE

gradle/built-uber-dists/NOTICE-BINARY-DIST Show resolved Hide resolved
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

---
Copy link
Member

Choose a reason for hiding this comment

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

Use the same separator and general text style as the root 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.

i'll leave something to follow-up :P

Copy link
Member

Choose a reason for hiding this comment

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

Nessie distributions contain some or all of the following dependencies (in the unchanged section) -- I believe the language has to be exact. We have to be sure what we include, otherwise how can claim that our license is correct? @jbonofre WDYT?

If we want to use the same text for all binary artifacts (each having a different sub-set of bundled dependendencies) how about this text:

Nessie distributions contain only dependencies licensed under the Apache License.
The following is the list of all redistributed dependencies unified across all published
Nessie artifacts. Each Nessie artifact bundles a sub-set of those dependencies.

WDYT?

Copy link

Choose a reason for hiding this comment

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

Yes, as showed in my "illustration PR", we should be explicit.
I think it's OK as a quick "fix" but that should be improved for sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

We need the list for the automatic license check

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I'm suggesting clarifying the text as it relates to what is possibly bundled.

Copy link
Member Author

Choose a reason for hiding this comment

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

in 9bc6280

tools/notice/build.gradle.kts Show resolved Hide resolved
@@ -36,6 +36,7 @@ dependencies {
compileOnly("org.apache.spark:spark-core_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
compileOnly("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
implementation(nessieClientForIceberg())
implementation(nessieProject("nessie-notice"))
Copy link
Member

Choose a reason for hiding this comment

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

LICENSE and NOTICE are included in the jar under /META-INF/resources/... why not directly under META-INF (e.g. Guava has it there)?

Copy link

Choose a reason for hiding this comment

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

The "regular" place is META-INF/LICENSE and META-INF/NOTICE (at least it's what some maven plugins like shade plugin are looking for).

Copy link
Member Author

Choose a reason for hiding this comment

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

META-INF/LICENSE and META-INF/NOTICE

Pretty bad for uber-jars - everything overwrites everything

Copy link
Member

Choose a reason for hiding this comment

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

true, but Nessie has a specific binary NOTICE for uber jars, right?

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 not what LICENSE + NOTICE are for.

Copy link
Member Author

Choose a reason for hiding this comment

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

The "binary uber/container/..." distributables get theirs in /META-INF/resources/LICENSE.txt (and NOTICE.txt)

@jbonofre
Copy link

jbonofre commented Feb 5, 2025

Which profile should be used to see META-INF/LICENSE and META-INF/NOTICE included in Nessie jar files ?

@snazy
Copy link
Member Author

snazy commented Feb 5, 2025

Which profile should be used to see META-INF/LICENSE and META-INF/NOTICE included in Nessie jar files ?

#10331 (comment)

Copy link

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@snazy snazy enabled auto-merge (squash) February 5, 2025 18:10
@snazy snazy merged commit b9c01ec into projectnessie:main Feb 5, 2025
16 checks passed
@snazy snazy deleted the license-notice-again branch February 5, 2025 18:16
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.

3 participants