make .tar.gz file metadata reproducible#6701
Merged
neilalexander merged 1 commit intomainfrom Apr 7, 2025
Merged
Conversation
Signed-off-by: Alex Bozhenko <alexbozhenko@gmail.com>
Member
Author
|
@neilalexander could you please review when you get a chance? |
neilalexander
added a commit
that referenced
this pull request
Sep 16, 2025
Follow-up to #6359 and #6701 Since 2.11.2 version of goreleaser, it is allowed to set buildhost for RPMs https://github.com/orgs/goreleaser/discussions/5662 I believe with this all the rpms, debs and tars will be reproducible(the binaries have been reproducible for long time) ## Test plan: ``` # go clean -cache && goreleaser release --skip=announce,publish,validate --clean -f .goreleaser.yml ``` ``` # rpm -qip nats-server-v2.12.0-RC.3-s390x.rpm | grep -i 'Build Host' Build Host : synadia.com ``` [skip ci] Signed-off-by: Alex Bozhenko <alexbozhenko@gmail.com>
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.
Make contents of the archive to be owned by root, so archives have same shasum, no matter which user runs the build.
https://www.gnu.org/software/tar/manual/html_node/Reproducibility.html
Test plan
Before
Built 2.11.0 tag locally with:
# go clean -cache && goreleaser release --skip=announce,publish,validate --clean -f .goreleaser.ymlFile permissions in the archive are different, reported by https://diffoscope.org/:
After:

Tar content owned by root:root
Signed-off-by: Alex Bozhenko alex@synadia.com