-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
dev-cmd/bottle: use gnu-tar universally, sort entries & use PAX #11253
Conversation
Review period skipped due to |
@Bo98 Can you elaborate on this? What's failing as-is without it? What about e.g. checking for path lengths and using
How? Why prefer If/when this is merged: can the various |
Potentially, but I'm not sure I see much benefit of this - unless you want to avoid changing any bottle checksums already produced?
Traverse the directory ourselves, sort it and feed it into
GNU tar actually plans to change to
This might work if we apply external sorting as mentioned above. I'll need to investigate |
Biggest issue I've had with retaining compatibility between
The only way to strip This is annoying, and when looking at upstream for guidance I came across a note, in the commit which contained the most recent change to the
We can of course follow that suggestion without too much issue. A native gem which interfaces with In the end, there's even subtle differences between |
Ubuntu 16.04 -> knowing that we will migrate to Ubuntu 18.04 one day, so everything might change again. |
Yeh, I'm hoping to do this. If we do, though, let's rebuild the various
Definitely not.
I don't think so. When we find and can demonstrate differences: we can fix them when it's possible/worthwhile to do so. |
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.
I'm fine with either this (if we rebottle existing all:
bottles using ustar
), using the pax
/ustar
switching logic I mentioned, using system BSD tar
on newer macOS versions (unless we already have examples of where it differs) provided the (legit) macOS test failures are fixed.
Note, it's also probably worth adjusting this logic so that it's only going to install/use gnu-tar
on macOS when using --only-json-tab
because reproducibility is guaranteed to fail otherwise.
Library/Homebrew/dev-cmd/bottle.rb
Outdated
# Ensure tar is set up for reproducibility. | ||
# https://reproducible-builds.org/docs/archives/ | ||
safe_system tar, "--create", "--numeric-owner", "--format", "pax", | ||
"--owner", "0", "--group", "0", "--sort", "name", |
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.
Can't rely on --owner
and --group
here as this may not be gnu-tar
if the formula isn't present. I'd suggest continuing to return arguments from setup_tar_and_args!
.
I tested this again and ruled it out, it's not an option that can be done consistently. |
Let's go with this. It's the simplest option at this point and only requires a small amount of short-term pain with rebottling. |
Great work @Bo98! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?ustar
is too restrictive on file path lengths - we need PAX.gnu-tar
provides a--sort
option to solve this (libarchive
does not but can be worked around)--pax-option
to deal with this.System
libarchive
bsdtar could potentially be retained, but it'll need more testing.