fix(package): ship THIRD_PARTY_NOTICES.txt in the release bundle - #283
Open
rominf wants to merge 1 commit into
Open
fix(package): ship THIRD_PARTY_NOTICES.txt in the release bundle#283rominf wants to merge 1 commit into
rominf wants to merge 1 commit into
Conversation
The release archive contained README.md, LICENSE.TXT, the binaries and the platform installer, but not the third-party attribution file. The bundled binaries statically link the crates that file attributes, and most of those licenses — MIT, BSD, Apache-2.0 — require their notice text to accompany the distributed binary. Keeping the notices current in the repository does not discharge that obligation when the artifact users actually download omits them. Add it to the shared top-level file set so it travels with every archive on both platforms, and assert its presence in the staging round-trip test. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
r0x0r
approved these changes
Aug 20, 2026
r0x0r
left a comment
Collaborator
There was a problem hiding this comment.
Correct, minimal, well-tested fix. The statically-linked MIT/BSD/Apache-2.0 crates require their notice text to travel with the distributed binary, and the bundle currently ships only README.md and LICENSE.TXT. Adding the entry to SHARED_TOP_LEVEL_FILES fixes this at the right layer, and copy_required already fails loudly if the source is missing, so a packaging run can't silently omit it.
What's good
- Root-cause fix in the shared copy list that both platforms consume.
- Regression test genuinely covers the fix: it writes the file into the fake workspace and asserts it lands in the staged bundle. Reverting only the const change leaves the source unstaged and fails the assertion; the test-only revert would make
copy_requiredbail on the missing source. Both directions are consistent. - Module header and constant doc comment both updated, so the docs don't drift from behavior.
- Honest scope note is accurate:
release.ymlcallscargo xtask packagebut neither regenerates nor verifiesTHIRD_PARTY_NOTICES.txt, relying on the PR-time staleness gate inci.yml. Leaving that follow-up out of this PR is the right call.
Minor, non-blocking
- The round-trip test asserts the file is staged but not that it appears inside the archive. Acceptable, since staging is the direct input to
archive()and archive nesting is covered bytargz_bundle_produces_expected_layout. A one-line assertion on the archive entry would make it airtight if you want belt-and-suspenders. - No platform gating needed — the file is legally required on Windows and Linux alike, and the shared list applies to both.
LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The release archive ships
bin/rocm,bin/rocmd,README.md,LICENSE.TXTand the platform installer — but notTHIRD_PARTY_NOTICES.txt.Those binaries statically link the crates that file attributes, and most of the licenses involved (MIT, BSD-2/3-Clause, Apache-2.0) require the notice text to accompany the distributed binary. Keeping the notices current in the repository — which CI already enforces byte-for-byte — does not discharge that obligation when the artifact users download omits them entirely.
THIRD_PARTY_NOTICES.txttoSHARED_TOP_LEVEL_FILES, so it lands at the bundle top level next toLICENSE.TXTon both platforms.Found while tracing why generated-manifest staleness caused so many CI failures: the file is gated hard on every PR, yet never actually shipped. The enforcement and the purpose had drifted apart.
Risk: low. One entry in an existing copy list;
copy_requiredalready fails loudly if a listed file is missing, so a packaging run cannot silently omit it.Scope note: this fixes what the bundle contains. Whether the notices are regenerated at release time is a separate gap —
release.ymlneither regenerates nor verifies them today, relying entirely on the PR-time gate. Worth addressing, but not bundled here.Test plan
stage_then_checksum_and_sign_round_tripsnow asserts the file is staged. Verified it genuinely covers the fix: reverting only theSHARED_TOP_LEVEL_FILESchange makes it fail withassertion failed: ...THIRD_PARTY_NOTICES.txt.is_file(), and it passes with the change in place.cargo test -p xtask— all package tests pass (11 run).cargo fmt --all --checkandcargo clippy --locked -p xtask --all-targets -- -D warningsclean.