Make package archives reproducible with deterministic timestamps and entry ordering - #4885
Draft
mosuem wants to merge 1 commit into
Draft
Make package archives reproducible with deterministic timestamps and entry ordering#4885mosuem wants to merge 1 commit into
mosuem wants to merge 1 commit into
Conversation
mosuem
force-pushed
the
reproducible-package-archives
branch
16 times, most recently
from
August 25, 2026 09:53
46faa47 to
af477f7
Compare
mosuem
force-pushed
the
reproducible-package-archives
branch
from
August 25, 2026 15:44
af477f7 to
215f013
Compare
mosuem
force-pushed
the
reproducible-package-archives
branch
from
August 25, 2026 16:11
215f013 to
700a139
Compare
mosuem
force-pushed
the
reproducible-package-archives
branch
from
August 26, 2026 11:06
700a139 to
51fbcee
Compare
sigurdm
reviewed
Aug 27, 2026
| ByteStream createTarGz( | ||
| List<String> contents, { | ||
| required String baseDir, | ||
| bool reproducible = false, |
Contributor
There was a problem hiding this comment.
Perhaps we just always do this?
sigurdm
reviewed
Aug 27, 2026
| return ByteStream(stream); | ||
| } | ||
|
|
||
| /// Normalizes the GZIP header (RFC 1952) so that `.tar.gz` archives are |
Contributor
There was a problem hiding this comment.
I kind of remember we have something in our test setup that overwrites these headers. Perhaps that can be removed in this change?
mosuem
force-pushed
the
reproducible-package-archives
branch
3 times, most recently
from
August 27, 2026 09:12
a980816 to
72fd773
Compare
mosuem
force-pushed
the
reproducible-package-archives
branch
from
August 27, 2026 12:06
72fd773 to
783fbfe
Compare
mosuem
force-pushed
the
reproducible-package-archives
branch
from
August 27, 2026 12:21
783fbfe to
e8221b7
Compare
mosuem
force-pushed
the
reproducible-package-archives
branch
from
August 27, 2026 12:36
e8221b7 to
a19a61c
Compare
sigurdm
reviewed
Aug 27, 2026
| ); | ||
| } | ||
|
|
||
| DateTime _archiveEpoch() { |
Contributor
There was a problem hiding this comment.
I don't think we need this to be configurable via environment. Can't we always just use epoch?
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
Makes
dart pub publish --to-archivebit-for-bit deterministic and reproducible by:modified) to Unix Epoch 0 (DateTime.utc(1970)) orSOURCE_DATE_EPOCHif specified.