25256 Commits

Author SHA1 Message Date
Mike McQuaid
5280a38b1b
Merge pull request #13190 from Homebrew/dependabot/bundler/Library/Homebrew/regexp_parser-2.3.1
build(deps): bump regexp_parser from 2.3.0 to 2.3.1 in /Library/Homebrew
2022-04-26 10:33:23 +01:00
Sam Ford
d6202384d7
Curl: Remove guard from certain parsing logic
The `#curl_http_content_headers_and_checksum` method previously
parsed responses from `curl` output even if `status.success?` wasn't
`true`. A recent commit of mine moved the parsing logic behind this
guard but it's now leading to a "...is not reachable" error when a URL
involves a large download that takes longer than 25 seconds to finish
and hits the timeout.

This commit resolves the issue for the time being by moving related
logic back to its previous location, where it isn't guarded by
`status.success?`.
2022-04-26 01:22:20 -04:00
Bo Anderson
ea264344f3
Merge pull request #13191 from SMillerDev/fix/automerge/allow_workflow_selection
pr-automerge: allow users to specify a workflow for pr-publish
2022-04-25 20:19:39 +01:00
Sean Molenaar
05eafa5cac
pr-automerge: allow users to specify a workflow for pr-publish 2022-04-25 20:29:35 +02:00
Sam Ford
6bd2c831cd
Merge pull request #13181 from samford/livecheck/add-max-redirs-curl-arg
`Strategy`: Add `--max-redirs` to `DEFAULT_CURL_ARGS`
2022-04-25 14:25:36 -04:00
Sam Ford
51329d9392
Merge pull request #13179 from samford/curl-download-try_partial-false
`#curl_download`: default `try_partial` to `false`
2022-04-25 14:24:19 -04:00
BrewTestBot
2388551428
Update RBI files for regexp_parser. 2022-04-25 18:10:54 +00:00
BrewTestBot
2ba3b46c08
brew vendor-gems: commit updates. 2022-04-25 18:06:19 +00:00
dependabot[bot]
9a34f13d09
build(deps): bump regexp_parser from 2.3.0 to 2.3.1 in /Library/Homebrew
Bumps [regexp_parser](https://github.com/ammar/regexp_parser) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ammar/regexp_parser/releases)
- [Changelog](https://github.com/ammar/regexp_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ammar/regexp_parser/compare/v2.3.0...v2.3.1)

---
updated-dependencies:
- dependency-name: regexp_parser
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 18:03:52 +00:00
Bo Anderson
968366696b
Merge pull request #13183 from apainintheneck/fix-sorbet-type
cli/parser: Re-enable Sorbet Type Checking
2022-04-25 15:09:45 +01:00
apainintheneck
9c4402a049 Resolved Sorbet type bug
Related to sorbet/sorbet#498

Had to change the call to caller_locations to filter out
sorbet runtime checking.
2022-04-25 00:29:05 -07:00
Sam Ford
3f7d9f82fc
#curl_download: default try_partial to false
When its `try_partial` argument is `true`, `#curl_download` makes a
`HEAD` request before downloading the file using `#curl`. Currently
`try_partial` defaults to `true`, so any `#curl_download` call that
doesn't explicitly specify `try_partial: false` will make a `HEAD`
request first. This can potentially involve several requests if the
URL redirects, so it can be a bit of unnecessary overhead when a
partial download isn't needed.

Partial downloads are generally only useful when we're working with
larger files, however there's currently only one place in brew where
`#curl_download` is used and this is the case:
`CurlDownloadStrategy`. The other `#curl_download` calls are fetching
smaller [text] files and don't need to support partial downloads.

This commit changes the default `try_partial` value to `false`,
making partial downloads opt-in rather than opt-out.

We want `try_partial` to continue to default to `true` in
`CurlDownloadStrategy` and there are various ways to accomplish this.
In this commit, I've chosen to update its `#initialize` method to
accept a `try_partial` argument that defaults to `true`, as this
value can also be used in classes that inherit from
`CurlDownloadStrategy` (e.g., `HomebrewCurlDownloadStrategy`). This
instance variable is passed to `#curl_download` in related methods,
effectively maintaining the previous `try_partial: true` value, while
also allowing this value to be overridden when necessary.

Other uses of `#curl_download` in brew are
`Formulary::FromUrlLoader#load_file` and
`Cask::CaskLoader::FromURILoader#load`, which did not provide a
`try_partial` argument but should have been using
`try_partial: false`. With the `try_partial: false` default in this
commit, these calls are now fine without a `try_partial` argument.

The only other use of `#curl_download` in brew is
`SPDX#download_latest_license_data!`. These calls were previously
using `try_partial: false` but we can now omit this argument with
the new `false` default (aligning with the above).
2022-04-22 14:23:08 -04:00
Sam Ford
ef5d8ed8b0
Strategy: Add --max-redirs to DEFAULT_CURL_ARGS
The default redirection maximum for `curl` is 50 but we should use
something more reasonable in livecheck. It's rare but a misconfigured
server with an endless redirection loop will hit the 50 redirection
limit. Unfortunately, we've encountered this in the wild (e.g., the
server for `getmail` and `memtester` endlessly redirects), so it's
not an idle concern. This commit basically adds `--max-redirs 5` to
`Livecheck::Strategy::DEFAULT_CURL_ARGS` to enforce a more reasonable
redirection maximum.

To be clear, the `max_iterations` logic in `#parse_curl_output`
(which was previously found in `Strategy#page_content`) doesn't
restrict the number of redirections that `curl` follows. At the point
the `curl` output is being parsed, the requests have already been
made and `max_iterations` simply restricts the number of responses
`#parse_curl_output` is willing to parse. If we use `--max-redirs`
and properly set `max_iterations` to `max-redirs + 1`, we shouldn't
encounter the "Too many redirects" error in `#parse_curl_output`.
2022-04-22 13:39:02 -04:00
Sam Ford
2722fbe30e
#parse_curl_output: add max_iterations parameter
In cases where there may be more than five responses in `curl`
output to parse, we need to be able to control the `max_iterations`
of the `while` loop in `#parse_curl_output` to properly parse all
the responses.

For example, if we pass `--max-redirs 5` to `curl` and there are
exactly five redirections before the final response, the output would
contain a total of six responses and `#parse_curl_output` wouldn't
properly handle this (it would give a `Too many redirects` error).
`max_iterations` should be the maximum number of redirections + 1
(to account for any final response after the redirections), so we
need to be able to override this value when necessary.
2022-04-22 13:17:45 -04:00
Alexander Bayandin
3f95cdd80f
Merge pull request #13177 from bayandin/allow_underscore_in_cask_names
tap_constants: allow to use underscore in cask names
2022-04-22 14:28:06 +01:00
Mike McQuaid
add2991d4f
Merge pull request #13147 from pmrowla/update-python-resources-env
bump-formula-pr: expose update-python-resources CLI flags
2022-04-22 14:23:15 +01:00
Alexander Bayandin
8dbbb20f08
tap_constants: allow to use underscore in cask names 2022-04-22 12:24:31 +01:00
Bo Anderson
6db3ee6b0a
extend/os/linux/keg_relocate: restore checking only GCC major versions 2022-04-22 01:41:23 +01:00
Bo Anderson
b2a896eec6
Merge pull request #13065 from xxyzz/skip_build_deps
Skip build deps to avoid downloading bottles
2022-04-22 01:33:44 +01:00
Mike McQuaid
c1a9ce62aa
Merge pull request #13163 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.10.0
build(deps): bump rubocop-rspec from 2.9.0 to 2.10.0 in /Library/Homebrew
2022-04-21 15:33:54 +01:00
Peter Rowlands
e794b913c8 bump-formula-pr: expose update-python-resources CLI flags 2022-04-21 16:12:37 +09:00
Sam Ford
1c4faaa5d5
Strategy: Use Curl output parsing methods 2022-04-20 23:49:18 -04:00
Sam Ford
13e3f704c9
Cask::Audit: Account for nil appcast_contents 2022-04-20 23:47:51 -04:00
Sam Ford
9355da5291
DownloadStrategy: Use #curl_response_last_location 2022-04-20 23:47:51 -04:00
Sam Ford
c5eeff941e
Curl: Update to use response parsing methods 2022-04-20 23:47:51 -04:00
Sam Ford
9171eb2e16
Curl: Add methods to parse response 2022-04-20 23:47:51 -04:00
BrewTestBot
4ffc69764a
Update RBI files for rubocop-rspec. 2022-04-20 12:40:31 +00:00
BrewTestBot
5e64a50464
brew vendor-gems: commit updates. 2022-04-20 12:36:06 +00:00
dependabot[bot]
99af12597b
build(deps): bump rubocop-rspec in /Library/Homebrew
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.9.0 to 2.10.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.9.0...v2.10.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-04-20 12:33:30 +00:00
Mike McQuaid
2d9bfc62be
Merge pull request #13158 from apainintheneck/tests-changed-switch
Added --changed option to "brew tests" dev cmd
2022-04-19 19:11:51 +01:00
apainintheneck
b7d88225bb Added --changed option to "brew tests" dev cmd
This option allows the user to run tests on all
files that have been changed from the master
branch.
2022-04-19 09:53:45 -07:00
Issy Long
baceee9d24
Merge pull request #13149 from issyl0/add-code-scanning-workflow 2022-04-18 19:49:38 +01:00
Issy Long
94d8bd5d32
download_strategy: In regexps, only allow valid hostname characters
> This regular expression has an unrestricted wildcard '.+?' which may cause 'googlecode\.com/svn' to be matched anywhere in the URL, outside the hostname.
2022-04-15 16:45:42 +01:00
Issy Long
f8d9a5c2db
rubocops/urls: In regexps, only allow valid hostname characters
> This regular expression has an unrestricted wildcard '.*' which may cause 'googlecode\.com/files' to be matched anywhere in the URL, outside the hostname.
2022-04-15 16:45:41 +01:00
Issy Long
aa36b343ca
rubocops/urls: Escape .s in hostnames in regexps 2022-04-15 16:45:25 +01:00
Issy Long
ffe0c18b2a
rubocops/homepage: Escape .s in hostnames in regexps 2022-04-15 15:46:36 +01:00
Issy Long
63742cd480
dev-cmd/bump-formula-pr: Escape .s in hostnames in regexps
> This regular expression has an unescaped '.' before 'apache.org/dyn/closer', so it might match more hosts than expected.
2022-04-15 15:36:46 +01:00
Mike McQuaid
589c136f4c
Merge pull request #13144 from apainintheneck/update-msg
Display old and new version numbers when updating Homebrew
2022-04-15 15:11:55 +01:00
apainintheneck
f811774cab Display old and new version numbers when updating 2022-04-14 11:58:19 -07:00
BrewTestBot
61a7a51172
brew vendor-gems: commit updates. 2022-04-14 18:09:14 +00:00
dependabot[bot]
cedef2c4e8
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.9886 to 0.5.9889.
- [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-04-14 18:03:31 +00:00
Sean Molenaar
624ea2a98b
Merge pull request #12790 from SMillerDev/feature/service/socket_and_keepalive
service: add sockets and keepalive variants
2022-04-14 14:20:01 +02:00
Daniel Nachun
97b0162541
Merge pull request #13138 from danielnachun/patch_prefix3
Binary patching of build prefixes
2022-04-13 13:32:01 -07:00
BrewTestBot
dec1fbe92c
brew vendor-gems: commit updates. 2022-04-13 18:10:23 +00:00
dependabot[bot]
b83837f00c
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.9878 to 0.5.9886.
- [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-04-13 18:05:40 +00:00
Mike McQuaid
62fe3014e9
Merge pull request #13136 from EricFromCanada/reinstall-fixes
formula_installer: handle unexpected .brew presence/absence
2022-04-13 16:20:48 +01:00
EricFromCanada
774537d3c2
formula_installer: handle unexpected .brew presence/absence 2022-04-13 10:53:57 -04:00
EricFromCanada
8a7f082b30
list: output only if installed casks are passed
Fixes #13139.
2022-04-13 10:50:50 -04:00
EricFromCanada
fd79cfa38e
null.rb: alias outdated_release? to allow formulae usage 2022-04-13 07:54:54 -04:00
danielnachun
26791734c1
test/keg_relocate/binary_relocation_spec.rb: add new unit test 2022-04-12 15:53:04 -07:00