This allows the correct bottling of `gnu-tar` dependencies (and
`gnu-tar` itself). It also installs `gnu-tar` at a more appropriate
time in the `brew bottle` command.
I noticed from
https://github.com/Homebrew/homebrew-core/actions/runs/5751070010 that
we're no longer creating reproducible bottles between macOS and Linux.
All macOS checksums have changed but Linux ones have not. The main
difference between the two platforms is the `gtar` version used so let's
always just use the formula on both platforms.
While we're here, clear up the ordering and comments a little on the
reproducible `tar` arguments so that it's easier to compare with the
reproducible builds archives documentation.
This commit includes `--no-mac-metadata` `--no-acls` and `--no-xattrs`
in `default_tar_args` for `brew bottle` command.
Although `default_tar_args` is only active when `--only-json-tab` is
not passed, in which case we don't require reproducible bottles, it is
nonetheless beneficial to "regularize" tarball creation. In
particular, this resolves a sporadic `brew tests
--only=dev-cmd/bottle:20` failure (see
https://github.com/orgs/Homebrew/discussions/4376 and
https://github.com/Homebrew/brew/pull/14997).
Furthermore, with `gnu tar`, `--no-acls` and `--no-xattrs` are default
flags. As for "mac metadata", although I couldn't find official
documentation, this post (https://superuser.com/a/61188) shares some
info:
- Resource forks (resource forks have been extended attributes since 10.4)
- Custom icons set in Finder and the images of Icon\r files
- Metadata in PSD files
- Objects stored in scpt files, AppleScript Editor window state, descriptions of scripts
- Information about aliases (aliases stop working if extended attributes are removed)
- Quarantine status or source URLs of files downloaded from the internet
- Spotlight comments
- Encoding of files saved with TextEdit
- Caret position of files opened with TextMate
- Skim notes
None of these is supposed to be in the bottle I believe.
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
questionable gain since the problem has been around so long.
- We're not going to make the really long things be any shorter any time soon.
- The instructions in issue 14685 say, pragmatically, "disable all the rubocop
rules we're never going to realistically fix e.g. Metrics/ClassLength". But
that felt like a slippery slope to more _really_ long modules/classes/blocks,
and the limits are here for a reason.
This allows us to remove all the manual timestamp fiddling and lets
`gnu-tar` handle it for us instead (as-per the most recent
recommendations on https://reproducible-builds.org/docs/archives/).
- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
checks to extend/os in the future
These can be changed on macOS but not on Linux so we need to make them
consistent in both places for `all:` bottles to have consistent
checksums.
I investigated adding to `cleaner.rb` to fix these symlink permissions
on installation but it seems it already happens by default when
extracting so there's no need.
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.
Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.