fix: normalize line endings before checksum generation in release archives#4457
Open
rebel117 wants to merge 1 commit into
Open
fix: normalize line endings before checksum generation in release archives#4457rebel117 wants to merge 1 commit into
rebel117 wants to merge 1 commit into
Conversation
…hives Reproducible builds were breaking because release archives picked up platform-specific CRLF endings when built on Windows runners. This made checksums differ between Linux, macOS, and Windows builds. - Add .gitattributes declaring LF line ending policy for all text files - Add scripts/normalize-and-checksum.sh that extracts, normalizes CRLF to LF, sets deterministic mtimes, and rebuilds archives with sorted file lists and gzip -n for timestamp-free compression - Include release workflow example in docs/ (multi-platform build with checksum verification across ubuntu, macos, windows runners) - Add Makefile targets: make release, make checksum - Add test suite covering CRLF normalization, LF passthrough, checksum generation, cross-run stability, and .gitattributes policy Closes orchestration-agent#4445
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.
Problem
Release archives built on different OS runners (Linux, macOS, Windows) produced different checksums because generated text files kept platform-specific line endings (CRLF on Windows vs LF on Linux/macOS).
This made reproducibility checks fail intermittently and made it harder to validate official packages.
Solution
Three-pronged fix:
.gitattributes— Declares the LF line ending policy for all text files in the repository, ensuring consistent checkout behavior across platforms.scripts/normalize-and-checksum.sh— A build step that:dist/directorygzip -n(no timestamp header)checksums.sha256with sorted entriesdocs/release-workflow.yml— A CI workflow example that builds on all three platforms, runs the normalization script, and verifies checksums match across runners before publishing.Test plan
All 5 tests pass. Existing test suite shows no regressions.
Closes #4445