Skip to content
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: tweak tar and tar arguments. #11251

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Apr 26, 2021

Instead of using libarchive on macOS (which has a non-zero dependency tree) let's instead use gnu-tar because:

  • it has no dependencies
  • we're already using it on Linux

I tested this locally with ack (which was getting reproducible bottles with system and Homebrew libarchive) and saw a different checksum. A quick read of the gtar manpage indicated that it uses a GNU tar format by default which can be made consistent with BSD and GNU tar by using --format=ustar with both. Once this is done, the checksums are the same. This will hopefully ease the transition to having all: bottles be consistent on Linux, too, which will be useful when homebrew-core is fully merged/supporting Linux.

@MikeMcQuaid MikeMcQuaid added the critical Critical change which should be shipped as soon as possible. label Apr 26, 2021
@BrewTestBot
Copy link
Member

Review period skipped due to critical label.

BrewTestBot
BrewTestBot previously approved these changes Apr 26, 2021
Instead of using `libarchive` on macOS (which has a non-zero dependency
tree) let's instead use `gnu-tar` because:

- it has no dependencies
- we're already using it on Linux

I tested this locally with `ack` (which was getting reproducible bottles
with system and Homebrew `libarchive`) and saw a different checksum. A
quick read of the `gtar` manpage indicated that it uses a GNU tar format
by default which can be made consistent with BSD and GNU tar by using
`--format=ustar` with both. Once this is done, the checksums are the
same. This will hopefully ease the transition to having `all:` bottles
be consistent on Linux, too, which will be useful when homebrew-core is
fully merged/supporting Linux.
@MikeMcQuaid MikeMcQuaid merged commit c53ae54 into Homebrew:master Apr 26, 2021
@MikeMcQuaid MikeMcQuaid deleted the bottle_tar_args branch April 26, 2021 14:33
@Bo98
Copy link
Member

Bo98 commented Apr 26, 2021

If this sticks: we could potentially remove the sudo purge workaround, since I'm pretty sure that is specific to sparse files which ustar doesn't support.

@github-actions github-actions bot added the outdated PR was locked due to age label May 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants