bobbai00 opened a new pull request, #4449:
URL: https://github.com/apache/texera/pull/4449

   ### What changes were proposed in this PR?
   
   The `sbt dist` zips currently ship the source-tree `LICENSE` and `NOTICE` at 
the top level. An Apache binary distribution needs the binary-specific files: 
`LICENSE-binary` (which enumerates every bundled third-party dependency) as 
`LICENSE`, `NOTICE-binary` as `NOTICE`, and the full text of every 
non-Apache-2.0 license bundled in, under a top-level `licenses/` directory.
   
   Plumb those files through sbt-native-packager's Universal mappings:
   
   - **`project/AddMetaInfLicenseFiles.scala`**: replace the old `distSettings` 
(which copied the source-tree LICENSE/NOTICE) with a new 
`distMappings(existing, rootDir)` helper. It maps `LICENSE-binary` -> 
`LICENSE`, `NOTICE-binary` -> `NOTICE`, `DISCLAIMER-WIP` -> `DISCLAIMER-WIP` 
(optional, removed at graduation), and every file under `licenses/*.txt` into a 
top-level `licenses/` directory of the zip. It also filters out any 
pre-existing mappings that would conflict, and fails the build early via 
`require(...)` if any compliance file is missing at the repo root.
   
   - **Root `build.sbt`**: drop the `asfDistLicensingSettings` shortcut and the 
`.settings(asfDistLicensingSettings)` attached to each dist-producing project. 
Each module now invokes `distMappings` inline.
   
   - **Per-module `build.sbt` × 6** (access-control-service, amber, 
config-service, computing-unit-managing-service, file-service, 
workflow-compiling-service): add, right after `enablePlugins(JavaAppPackaging)`:
     ```scala
     Universal / mappings := AddMetaInfLicenseFiles.distMappings(
       (Universal / mappings).value,
       (ThisBuild / baseDirectory).value
     )
     ```
   
   - **Stub `LICENSE-binary` and `NOTICE-binary`** at the repo root, with a 
clear placeholder note. These exist purely so the new `require(...)` checks 
pass; the real content is follow-up work tracked in #4131.
   
   ### Any related issues, documentation, discussions?
   
   Closes #4448. Related to #4131.
   
   A follow-up PR will replace the stub `LICENSE-binary` / `NOTICE-binary` with 
the real third-party manifest, add additional license texts under `licenses/`, 
and add a CI workflow that validates the manifest against actually-bundled 
dependencies. That work is intentionally out of scope here to keep this PR 
small and mechanical.
   
   ### How was this PR tested?
   
   - `sbt 'ConfigService/dist; AccessControlService/dist; FileService/dist; 
ComputingUnitManagingService/dist; WorkflowCompilingService/dist; 
WorkflowExecutionService/dist'` succeeds.
   - Unzipping each produced zip and checking the top level shows `LICENSE` (= 
stub LICENSE-binary contents), `NOTICE` (= stub NOTICE-binary contents), and a 
`licenses/` directory containing `LICENSE-MIT.txt`.
   - Temporarily removing `LICENSE-binary` and re-running `sbt dist` fails with 
the `require(...)` message as expected.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.7)


-- 
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]

Reply via email to