31656 Commits

Author SHA1 Message Date
Bo Anderson
c4ec5f13d7
Merge pull request #13305 from Bo98/exceptions-backslash
exceptions: handle backslash in args for BuildError
2022-05-20 19:10:30 +01:00
Bo Anderson
d0e4af8fb5
test/rubocops/patches: silence CodeQL alert 2022-05-20 01:44:05 +01:00
Bo Anderson
38ae98cbcd
livecheck: improve host checks to instead check domains 2022-05-20 01:43:00 +01:00
Bo Anderson
d47517f635
exceptions: handle backslash in args for BuildError 2022-05-20 01:41:26 +01:00
Bo Anderson
54b45c2c8b
Merge pull request #13304 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.11.1
build(deps): bump rubocop-rspec from 2.11.0 to 2.11.1 in /Library/Homebrew
2022-05-20 01:24:41 +01:00
Bo Anderson
186efb0a8b
Merge pull request #13303 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-static-and-runtime-0.5.10020
build(deps-dev): bump sorbet-static-and-runtime from 0.5.10016 to 0.5.10020 in /Library/Homebrew
2022-05-19 22:46:50 +01:00
BrewTestBot
adb6ce0aab
brew vendor-gems: commit updates. 2022-05-19 18:10:25 +00:00
BrewTestBot
6ba3358b64
brew vendor-gems: commit updates. 2022-05-19 18:06:57 +00:00
dependabot[bot]
e5176b4e68
build(deps): bump rubocop-rspec in /Library/Homebrew
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.11.0 to 2.11.1.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.11.0...v2.11.1)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 18:04:55 +00:00
dependabot[bot]
d1a8687c55
build(deps-dev): bump sorbet-static-and-runtime in /Library/Homebrew
Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) from 0.5.10016 to 0.5.10020.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 18:04:24 +00:00
Mike McQuaid
fb4c9353bb
Improve updating behaviour
- Rename use of "preinstall" to "auto update". The original "preinstall"
  naming came from the fact that we used to only auto-update before
  `brew install` but now that it's many commands: this is more confusing
  than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
  `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
  and the prior provides an opt-out for better output, performance and
  avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
  versions by default for better performance by default.

Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2022-05-19 11:04:20 -04:00
Sam Ford
5d4353f617
Merge pull request #13301 from samford/add-public_suffix-data-dir
Vendor public_suffix data dir
2022-05-18 21:10:49 -04:00
Sam Ford
e34cb92d13
Vendor public_suffix data dir
The `addressable` gem depends on the `public_suffix` gem but we also
need to vendor the `data` dir from `public_suffix` for `addressable`
to function correctly.
2022-05-18 20:40:42 -04:00
Sam Ford
de1c5e2ba8
Merge pull request #13300 from samford/livecheck/rework-use_homebrew_curl-2
Livecheck: Use Homebrew curl based on root domain
2022-05-18 20:14:32 -04:00
Sam Ford
2f0a53c0da
Livecheck: Use Homebrew curl based on root domain
At the moment, `#use_homebrew_curl?` can only be true for a
`homepage` or `stable`/cask `url` with `using: :homebrew_curl`. If
the checked URL differs from these URLs, livecheck won't use brewed
curl. This limitation prevents livecheck from using brewed curl for a
`livecheck` block URL that's a string literal (not a symbol for a
`#checkable_url` like `:stable`, `:head`, `:url`). `libzip` was the
original formula referenced in the related brew issue and it meets
this criterion, so it doesn't appear to be handled by the existing
`#use_homebrew_curl?` implementation.

Additionally, the existing behavior can cause livecheck to
unnecessarily use brewed curl for a completely different website
(e.g., `cubelib`, `otf2`). For example, if the `stable` URL has
`using: :homebrew_curl` and the `livecheck` block has `url
:homepage`, livecheck will use brewed curl when checking the
`homepage`. If these are completely different domains/servers, it's
unlikely that we would need to use brewed curl when checking the
`homepage`, so this particular behavior may not be beneficial.

This commit reimplements `use_homebrew_curl?` to apply brewed curl
when the checked URL's root domain is the same as the root domain of
an aforementioned formula/cask URL with `using: :homebrew_curl`. For
example, this looser approach would allow a `livecheck` block
checking `https://www.example.com/downloads/` to use brewed curl if
the `stable` URL was `https://downloads.example.com/example.zip` with
`using: :homebrew_curl`. These could be different servers but, based
on related formulae, this looseness is necessary for the moment.

This approach aims to resolve both issues, allowing brewed curl to be
applied to a slightly broader range of URLs (i.e., not limited to
just the `#checkable_urls`) while also helping to avoid unnecessarily
applying brewed curl when it's less likely to be useful (completely
different domains). Neither approach is perfect but this one may be
more useful in the interim time.

Depending on how this looser approach works in practice, we may want
to consider returning to a stricter approach once we have something
like `using: :homebrew_curl` in `livecheck` blocks (this is
forthcoming). Being explicit in a `livecheck` block is the most
reliable approach (i.e., only use brewed curl when needed), so we
could favor that and pare down the automated approach to only what's
needed to support implicit checks (i.e., with no `livecheck` block).
Of course, it's also possible to drop the automated approach entirely
and simply require a `livecheck` block in this scenario but we can
decide on how to handle this when the time comes.
2022-05-18 18:48:17 -04:00
Sam Ford
d0961a4e3e
Add addressable to vendored gems 2022-05-18 18:48:16 -04:00
Mike McQuaid
f56cd09c91
Merge pull request #13295 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.11.0
build(deps): bump rubocop-rspec from 2.10.0 to 2.11.0 in /Library/Homebrew
2022-05-18 15:58:05 -04:00
Mike McQuaid
7321388287
brew style --fix 2022-05-18 15:37:23 -04:00
Mike McQuaid
7384a5ef6f
Merge pull request #13298 from Homebrew/revert-13292-livecheck/rework-use_homebrew_curl
Revert "Livecheck: Use Homebrew curl based on root domain"
2022-05-18 15:36:51 -04:00
Mike McQuaid
95213893a6
Revert "Livecheck: Use Homebrew curl based on root domain" 2022-05-18 15:36:12 -04:00
Mike McQuaid
e279c93c4b
Merge pull request #13275 from apainintheneck/upgrade-latest
Only upgrade :latest casks when --greedy and the cask has been updated
2022-05-18 14:43:50 -04:00
Mike McQuaid
bfe5bfd4e6
Merge pull request #13296 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-static-and-runtime-0.5.10016
build(deps-dev): bump sorbet-static-and-runtime from 0.5.10012 to 0.5.10016 in /Library/Homebrew
2022-05-18 14:38:23 -04:00
BrewTestBot
41d2e21f8e
Update RBI files for rubocop-rspec. 2022-05-18 18:10:48 +00:00
BrewTestBot
a4261c4aa8
brew vendor-gems: commit updates. 2022-05-18 18:10:22 +00:00
BrewTestBot
951a8f9377
brew vendor-gems: commit updates. 2022-05-18 18:06:56 +00:00
dependabot[bot]
d6e2c1921e
build(deps-dev): bump sorbet-static-and-runtime in /Library/Homebrew
Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) from 0.5.10012 to 0.5.10016.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 18:05:03 +00:00
dependabot[bot]
704162afcf
build(deps): bump rubocop-rspec in /Library/Homebrew
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 18:04:18 +00:00
Mike McQuaid
ae9d6cbffd
Merge pull request #13290 from Homebrew/style_shfmt
style: use long shfmt arguments.
2022-05-18 12:38:34 -04:00
apainintheneck
b85f407e95 Only upgrade :latest casks when --greedy and the cask has been updated
A sha256 hash of the previous download is stored and compared with
new downloads before updating :latest casks. This prevents unnecessary
reinstalls when the cask hasn't been updated.

Move download path to cask from installer to prevent unnecessary
redownloads of casks.
2022-05-17 16:15:05 -07:00
Sam Ford
34dd8e3057
Merge pull request #13292 from samford/livecheck/rework-use_homebrew_curl
Livecheck: Use Homebrew curl based on root domain
2022-05-17 16:35:59 -04:00
Mike McQuaid
b5f7e7ff11
Merge pull request #13289 from Homebrew/handle_broken_casks
Fix handling unreadable casks
2022-05-17 15:44:44 -04:00
Bo Anderson
b0f87b6b6f
Merge pull request #13294 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-static-and-runtime-0.5.10012
build(deps-dev): bump sorbet-static-and-runtime from 0.5.10010 to 0.5.10012 in /Library/Homebrew
2022-05-17 20:32:23 +01:00
Bo Anderson
00932556bf
workflow/vendor-gems: re-add erroneously removed output 2022-05-17 20:04:24 +01:00
BrewTestBot
1c20be6c85
Update RBI files for sorbet-static-and-runtime. 2022-05-17 20:04:00 +01:00
BrewTestBot
5888a782a9
brew vendor-gems: commit updates. 2022-05-17 18:54:37 +00:00
dependabot[bot]
ed8665c2af
build(deps-dev): bump sorbet-static-and-runtime in /Library/Homebrew
Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) from 0.5.10010 to 0.5.10012.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 18:52:14 +00:00
Bo Anderson
5b9730a56d
Merge pull request #13284 from Bo98/sdk-unversioned
os/mac/sdk: use unversioned SDK if matching version isn't found
2022-05-17 19:44:01 +01:00
Bo Anderson
faeb655a89
Merge pull request #13291 from Bo98/sorbet-static-and-runtime
Use sorbet-static-and-runtime gem
2022-05-17 19:43:10 +01:00
Sam Ford
fb8a4e5658
Livecheck: Use Homebrew curl based on root domain
At the moment, `#use_homebrew_curl?` can only be true for a
`homepage` or `stable`/cask `url` with `using: :homebrew_curl`. If
the checked URL differs from these URLs, livecheck won't use brewed
curl. This limitation prevents livecheck from using brewed curl for a
`livecheck` block URL that's a string literal (not a symbol for a
`#checkable_url` like `:stable`, `:head`, `:url`). `libzip` was the
original formula referenced in the related brew issue and it meets
this criterion, so it doesn't appear to be handled by the existing
`#use_homebrew_curl?` implementation.

Additionally, the existing behavior can cause livecheck to
unnecessarily use brewed curl for a completely different website
(e.g., `cubelib`, `otf2`). For example, if the `stable` URL has
`using: :homebrew_curl` and the `livecheck` block has `url
:homepage`, livecheck will use brewed curl when checking the
`homepage`. If these are completely different domains/servers, it's
unlikely that we would need to use brewed curl when checking the
`homepage`, so this particular behavior may not be beneficial.

This commit reimplements `use_homebrew_curl?` to apply brewed curl
when the checked URL's root domain is the same as the root domain of
an aforementioned formula/cask URL with `using: :homebrew_curl`. For
example, this looser approach would allow a `livecheck` block
checking `https://www.example.com/downloads/` to use brewed curl if
the `stable` URL was `https://downloads.example.com/example.zip` with
`using: :homebrew_curl`. These could be different servers but, based
on related formulae, this looseness is necessary for the moment.

This approach aims to resolve both issues, allowing brewed curl to be
applied to a slightly broader range of URLs (i.e., not limited to
just the `#checkable_urls`) while also helping to avoid unnecessarily
applying brewed curl when it's less likely to be useful (completely
different domains). Neither approach is perfect but this one may be
more useful in the interim time.

Depending on how this looser approach works in practice, we may want
to consider returning to a stricter approach once we have something
like `using: :homebrew_curl` in `livecheck` blocks (this is
forthcoming). Being explicit in a `livecheck` block is the most
reliable approach (i.e., only use brewed curl when needed), so we
could favor that and pare down the automated approach to only what's
needed to support implicit checks (i.e., with no `livecheck` block).
Of course, it's also possible to drop the automated approach entirely
and simply require a `livecheck` block in this scenario but we can
decide on how to handle this when the time comes.
2022-05-17 00:34:32 -04:00
Bo Anderson
c791922015
brew vendor-gems: commit updates. 2022-05-17 04:15:56 +01:00
Bo Anderson
7e07f66e47
Use sorbet-static-and-runtime 2022-05-17 04:15:50 +01:00
Mike McQuaid
94148c3bc8
Fix handling unreadable casks
When casks are unreadable (e.g. have invalid syntax, the cask file
cannot be found) then it's not been possible to uninstall them, list
them or perform any operation which iterates through all casks.

Handle these various cases by falling back to creating a `Cask::Cask`
object using just the name/token and latest installed version on disk.

This provides enough functionality to be able to verbosely list these
casks, not error on listing and, most importantly, uninstall/reinstall
them.

Fixes https://github.com/Homebrew/homebrew-cask/issues/62223
2022-05-16 17:27:13 -04:00
Mike McQuaid
bf34f21065
style: use long shfmt arguments.
This allows removing documentation explaining them.
2022-05-16 17:19:16 -04:00
Mike McQuaid
8a5f6645b8
Merge pull request #13283 from Bo98/ghp-comment
github_packages: add comment for image-spec pin
2022-05-16 21:26:41 +01:00
Mike McQuaid
0275b32905
Merge pull request #13286 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.10010
build(deps-dev): bump sorbet from 0.5.10004 to 0.5.10010 in /Library/Homebrew
2022-05-16 21:25:45 +01:00
BrewTestBot
70eb55b8d0
brew vendor-gems: commit updates. 2022-05-16 18:12:08 +00:00
dependabot[bot]
9cf25d5ede
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.10004 to 0.5.10010.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 18:05:46 +00:00
Bo Anderson
fb358071ce
os/mac/sdk: use unversioned SDK if matching version isn't found 2022-05-16 16:18:48 +01:00
Bo Anderson
ecc705803f
github_packages: add comment for image-spec pin 2022-05-16 16:15:17 +01:00
Nanda H Krishna
c20b3ab913
Merge pull request #13276 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-ast-1.18.0
build(deps): bump rubocop-ast from 1.17.0 to 1.18.0 in /Library/Homebrew
2022-05-13 16:26:25 -04:00