-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tar: Make all gzip compression hermetic #75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hm, I thought that the aspect build tar would support this universally? |
08cf7ce
to
3e3b5ed
Compare
Ok, tests pass now. While running I realized a lot more than flatten was not hermetic, so I fixed those as well. Please let me know if you'd like a different approach. I also updated the commit message with the motivations. |
I'd love to get this merged, I'm also using |
@DolceTriade could you rebase and solve the merge conflicts? there are also some buildifier issues it seems |
We weren't passing the flag to make gzip hermetic. Without the flag to ignore timestamp, the shasum will differ based on the system time. Also, DEFAULT_ARGS contained "--options=gzip:...", which is invalid when using any other compression scheme. Therefore, remove that option from DEFAULT_ARGS and provide an alternate function called `add_default_compression_args` to add per-compression type default arguments which can do things like make the compression more hermetic.
3e3b5ed
to
da5be94
Compare
Done. @thesayyn PTAL, thanks! |
I'm guessing the buildifier failures are due to differing versions of buildifier... |
Hm, nvm, I didn't even modify the file in question? |
Yeah, the buildifier errors are due to other PRs, I've fixed it in #108 |
We weren't passing the flag to make gzip hermetic. Without the flag to
ignore timestamp, the shasum will differ based on the system time.
Also, DEFAULT_ARGS contained "--options=gzip:...", which is invalid when
using any other compression scheme. Therefore, remove that option from
DEFAULT_ARGS and provide an alternate function called
add_default_compression_args
to add per-compression type defaultarguments which can do things like make the compression more hermetic.
Repro instructions:
Before, the above test would fail with sha256sum mismatches. With this patch, all shasums match.