Copilot commented on code in PR #4387:
URL: https://github.com/apache/texera/pull/4387#discussion_r3105942414
##########
licenses/LICENSE-EPL-2.0.txt:
##########
@@ -0,0 +1,12 @@
+Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+The full text of the Eclipse Public License, Version 2.0 is available at:
+
+ https://www.eclipse.org/legal/epl-2.0/
+
+A verbatim copy of the license terms is hereby incorporated by reference
+from that canonical URL.
Review Comment:
This EPL-2.0 file does not include the full license text; it only points to
the upstream URL and incorporates by reference. That appears to conflict with
the PR’s stated goal of shipping the full text for every referenced non-Apache
license under `licenses/` in binary artifacts.
##########
licenses/LICENSE-PSF.txt:
##########
@@ -0,0 +1,8 @@
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+
+The full text of the Python Software Foundation License is available at:
+
+ https://docs.python.org/3/license.html
+
+A verbatim copy of the license terms is hereby incorporated by reference
+from that canonical URL.
Review Comment:
This file does not include the full PSF-2.0 license text; it only links to
the canonical URL and claims incorporation by reference. That conflicts with
the PR description’s intent that `licenses/` contains the full text for each
non-ALv2 license shipped in binary artifacts. Either embed the full PSF license
text here or adjust the PR description/packaging approach accordingly.
##########
licenses/LICENSE-MPL-2.0.txt:
##########
@@ -0,0 +1,93 @@
+Mozilla Public License Version 2.0
+
+The full text of the Mozilla Public License, Version 2.0 is available at:
+
+ https://www.mozilla.org/en-US/MPL/2.0/
+
+A verbatim copy of the license terms is reproduced below.
+
+================================================================================
+Mozilla Public License Version 2.0
+================================================================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+[The full MPL-2.0 text continues at https://www.mozilla.org/en-US/MPL/2.0/.
+ Sections 2 through 10 of the MPL-2.0 are hereby incorporated by reference
+ from that canonical URL.]
Review Comment:
This MPL-2.0 file states “A verbatim copy of the license terms is reproduced
below,” but only a subset of sections is included and the remainder is
incorporated by reference. This conflicts with the PR description that
`licenses/` should ship full license texts, and the wording inside the file is
internally inconsistent. Consider including the complete MPL-2.0 text (or
revising the text so it accurately describes what is shipped).
##########
licenses/LICENSE-CDDL-1.1.txt:
##########
@@ -0,0 +1,9 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1
+
+The full text of the Common Development and Distribution License,
+Version 1.1 is available at:
+
+ https://oss.oracle.com/licenses/CDDL+GPL-1.1
+
+A verbatim copy of the license terms is hereby incorporated by reference
+from that canonical URL.
Review Comment:
This CDDL file does not include the full license text; it only links to an
external URL and incorporates by reference. That appears to conflict with the
PR description that binary artifacts ship the full texts of referenced
non-Apache licenses under `licenses/`. Consider embedding the full CDDL-1.1
text here or clarifying the intended distribution contents.
##########
licenses/LICENSE-EPL-1.0.txt:
##########
@@ -0,0 +1,12 @@
+Eclipse Public License - v 1.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+The full text of the Eclipse Public License, Version 1.0 is available at:
+
+ https://www.eclipse.org/legal/epl-v10.html
+
+A verbatim copy of the license terms is hereby incorporated by reference
+from that canonical URL.
Review Comment:
This EPL-1.0 file does not include the full license text; it only points to
the upstream URL and incorporates by reference. That appears to conflict with
the PR’s stated goal of shipping the full text for every referenced non-Apache
license under `licenses/` in binary artifacts.
##########
project/AddMetaInfLicenseFiles.scala:
##########
@@ -120,23 +120,24 @@ object AddMetaInfLicenseFiles {
}.taskValue
)
- /** Additional settings for dist-producing modules: places the same files
- * at the top level of the sbt-native-packager Universal zip so they
- * appear alongside lib/ and bin/ in the distribution. */
- lazy val distSettings: Seq[Setting[_]] = Seq(
- Universal / mappings := {
- val existing = (Universal / mappings).value
- val root = rootDir.value
- val licenseFile = root / "LICENSE"
- val noticeFile = root / "NOTICE"
- val disclaimerFile = root / "DISCLAIMER-WIP"
- val reserved = Set("LICENSE", "NOTICE", "DISCLAIMER-WIP")
- val filtered = existing.filterNot { case (_, path) =>
reserved.contains(path) }
- val extras = Seq(
- licenseFile -> "LICENSE",
- noticeFile -> "NOTICE"
- ) ++ (if (disclaimerFile.exists()) Seq(disclaimerFile ->
"DISCLAIMER-WIP") else Seq.empty)
- filtered ++ extras
+ /** Ships LICENSE-binary, NOTICE-binary, DISCLAIMER-WIP, and licenses/ at
the Universal zip's top level. */
+ def distMappings(existing: Seq[(File, String)], rootDir: File): Seq[(File,
String)] = {
+ val licenseBinary = rootDir / "LICENSE-binary"
+ val noticeBinary = rootDir / "NOTICE-binary"
+ val disclaimerFile = rootDir / "DISCLAIMER-WIP"
+ val licensesDir = rootDir / "licenses"
+
+ val reserved = Set("LICENSE", "NOTICE", "DISCLAIMER-WIP")
+ val filtered = existing.filterNot {
+ case (_, path) => reserved.contains(path) || path.startsWith("licenses/")
}
- )
+
+ val licenseTexts = (licensesDir ** "*.txt").get.map(f => f ->
s"licenses/${f.getName}")
+
+ filtered ++ Seq(
+ licenseBinary -> "LICENSE",
+ noticeBinary -> "NOTICE",
+ disclaimerFile -> "DISCLAIMER-WIP"
+ ) ++ licenseTexts
Review Comment:
`distMappings` always adds DISCLAIMER-WIP (and LICENSE-binary /
NOTICE-binary) to Universal mappings without checking that the files exist. The
earlier implementation treated DISCLAIMER-WIP as optional; if it’s missing (or
if a developer builds from a shallow/exported tree missing these root files),
packaging will fail with a low-signal error. Consider validating presence with
a clear `require(...)` message and/or keeping the previous `if
(disclaimerFile.exists()) ...` behavior for DISCLAIMER-WIP.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]