Restore a vendor file whose SHA-256 differs from the source ZIP member
Section titled “Restore a vendor file whose SHA-256 differs from the source ZIP member”- Status: current
- Engine: ue6-main
61e2877e10, Linux x86_64 - Context: Vendor provenance for a standalone UE6 project, checked on the host
- Prerequisites: The source ZIP, a provenance manifest,
sha256sum,unzipand Git
Symptom
Section titled “Symptom”In Coop Zero Step 15c, sha256sum reported a LICENSE.txt hash starting with f2720411, while the manifest recorded the ZIP member’s hash starting with fb8e4817. The stored copy had lost CRLF and other original whitespace.
Smallest example / reproduction
Section titled “Smallest example / reproduction”From the project checkout, let archive name the retained ZIP and vendor_file name the project’s LICENSE.txt. Run sha256sum "$vendor_file" and unzip -p "$archive" License.txt | sha256sum and compare the two hashes.
Solution
Section titled “Solution”Verify the full ZIP against the manifest’s archive SHA-256 with sha256sum -c before restoring the member. Extract the original bytes with unzip -p "$archive" License.txt > "$vendor_file". Add -text to the exact path in .gitattributes. Coop Zero also used -whitespace on that path to preserve upstream whitespace through the project’s diff check.
Why it works
Section titled “Why it works”ZIP member extraction writes the original byte sequence. Git’s -text attribute disables line-ending conversion for that file on checkout and add. The file can retain the archive member’s checksum even when other files use automatic conversion.
Verified
Section titled “Verified”- Evidence level: No Unreal run. Host-side byte verification.
- How:
sha256sum -cprintedSource/ThirdParty/cc0/kenney-fantasy-town/LICENSE.txt: OKin a fresh checkout withcore.autocrlf=true.git add --renormalizeleft the file unchanged, and a byte comparison matched the checkout, commit and ZIP member. Coop Zero commit8159320records the full hashes. - Date / by: 2026-11-25, Coop Zero Step 15c review
Limits and assumptions
Section titled “Limits and assumptions”The checksum establishes byte identity with the archive recorded in the manifest. It does not independently establish the archive’s origin or licensing terms.