31667 Commits

Author SHA1 Message Date
Bo Anderson
1baa340158
Merge pull request #13186 from Homebrew/jammy
workflows/docker: add 22.04
2022-04-26 22:04:17 +01:00
Bo Anderson
ee4ef876c6
Merge pull request #13202 from samford/curl-increase-default-max-parse-iterations
`#parse_curl_output`: increase default `max_iterations`
2022-04-26 21:24:02 +01:00
Sam Ford
b7a4360433
#parse_curl_output: increase default max_iterations
The `max_iterations` value in `#parse_curl_output` is only intended
to prevent its `while` loop from potentially turning into an endless
loop. This should only come into play in exceptional circumstances
but the current default value (5) is low enough that we're seeing it
under normal circumstances.

`#parse_curl_output` isn't intended to restrict the number of
redirections (this should be done using the `--max-redirs` option in
`curl) but it's effectively doing this in rare cases due to the low
`max_iterations` default. This is a problem because `curl` can
successfully return a response only to have `#parse_curl_output`
error in relation to `max_iterations`.

Originally the code in `#parse_curl_output` was used in the context
of livecheck, where it's not a huge issue if a check fails. However,
now the `#parse_curl_output` method is used in important parts of
brew like `#curl_download`. We've received a report of a download
failing with the "Too many redirects (max = 5)` error, effectively
preventing the user from installing a formula [from a third-party
tap].

Until we can come up with a more adaptive way of bounding this
`while` loop, I think we should simply raise the default to something
that's less likely to be encountered under normal circumstances
(e.g., 25).
2022-04-26 15:49:02 -04:00
Mike McQuaid
b6e8097cf5
Merge pull request #13187 from maxim-belkin/creating-new-tap
update/update-reset: warn when no origin remote
2022-04-26 17:04:51 +01:00
Maxim Belkin
13735bc780
Apply Mike's suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-04-26 08:35:28 -07:00
Maxim Belkin
27a2dba340
update/update-reset: warn when no origin remote
Current situation with update.sh & update-reset.sh:

Upon creating a new tap and before adding remote 'origin' to it,
running `brew update` produces multiple cryptic error messages.
This change converts these cryptic Git messages into clear warnings
about absent remote 'origin'.

How to test:
1. Create a new tap using `brew tap-new`
2. Run `brew update`
2022-04-26 08:35:27 -07:00
Bo Anderson
0495735eec
Merge pull request #13189 from Homebrew/dependabot/github_actions/reitermarkus/rerun-workflow-1.2.1
build(deps): bump reitermarkus/rerun-workflow from 1.2.0 to 1.2.1
2022-04-26 14:31:00 +01:00
Mike McQuaid
3c73ac4035
Merge pull request #13198 from bayandin/fix-headers-check
utils/curl: fix headers check for protected urls
2022-04-26 13:58:39 +01:00
Alexander Bayandin
c726385035
utils/curl: fix headers check for protected urls 2022-04-26 13:27:42 +01:00
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
Mike McQuaid
048f849895
Merge pull request #13195 from samford/curl_http_content_headers_and_checksum-reinstate-old-return-behavior
Curl: Remove guard from certain parsing logic
2022-04-26 10:30:16 +01:00
Sean Molenaar
9a25a1d5e1
pr-pull: add checksum update clause 2022-04-26 08:57:29 +02: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
EricFromCanada
a4590f394e
search: drop Homebrew cask tap names from list
Results in searching a list of tokens from official Homebrew cask taps and fully-qualified tokens from other taps, matching the list when searching formulae.
2022-04-25 22:22:03 -04:00
Bo Anderson
96e87965b7
Merge pull request #13192 from Homebrew/update-man-completions
Update maintainers, manpage and completions.
2022-04-25 20:51:19 +01:00
BrewTestBot
3451cb6530
Update maintainers, manpage and completions.
Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/update-man-completions.yml) workflow.
2022-04-25 19:21:20 +00: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
dependabot[bot]
06b583142d
build(deps): bump reitermarkus/rerun-workflow from 1.2.0 to 1.2.1
Bumps [reitermarkus/rerun-workflow](https://github.com/reitermarkus/rerun-workflow) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/reitermarkus/rerun-workflow/releases)
- [Commits](1845d3165c...cd46218e13)

---
updated-dependencies:
- dependency-name: reitermarkus/rerun-workflow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 18:02:56 +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
Dawid Dziurla
1d04f44272
Dockerfile: it's gnupg not gpg on 16.04 2022-04-25 07:59:51 +02:00
Dawid Dziurla
6797cd3dcb
Dockerfile: leave gpg-agent installed 2022-04-25 07:56:36 +02:00
Dawid Dziurla
e75218c0e9
Dockerfile: yes apt 2022-04-24 23:31:03 +02:00
Dawid Dziurla
7d1a97f015
Dockerfile: purge unneeded packages 2022-04-24 23:25:30 +02:00
Dawid Dziurla
ac57c4bb89
Dockerfile: gpg-agent only 2022-04-24 23:05:46 +02:00
Dawid Dziurla
7972c332e8
Dockerfile: install gpg 2022-04-24 22:46:31 +02:00
Dawid Dziurla
7ffaaf8c9a
Dockerfile: install gpg agent 2022-04-24 22:43:09 +02:00
Dawid Dziurla
9fab6ae7d9
Dockerfile: install gnupg 2022-04-24 22:39:03 +02:00
Dawid Dziurla
3e88dcb7f7
workflows/docker: add 22.04 2022-04-24 22:33:47 +02: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
Mike McQuaid
c2eaeed0b5
Merge pull request #13167 from MikeMcQuaid/governance
docs/governance: import from homebrew-governance.
3.4.8
2022-04-22 17:18:21 +01:00
Mike McQuaid
a8f77b5638
docs/governance: import from homebrew-governance.
Saves us having Yet Another Public Repository.
2022-04-22 11:48:32 -04:00
Mike McQuaid
33398d7710
Merge pull request #13178 from Homebrew/update-man-completions
Update maintainers, manpage and completions.
2022-04-22 14:51:59 +01: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
BrewTestBot
2c46163414
Update maintainers, manpage and completions.
Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/update-man-completions.yml) workflow.
2022-04-22 13:24:57 +00: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
Mike McQuaid
aaa4f5ec7e
Merge pull request #13172 from Homebrew/dependabot/github_actions/codecov/codecov-action-3.1.0
build(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0
2022-04-22 14:17:45 +01:00
Alexander Bayandin
8dbbb20f08
tap_constants: allow to use underscore in cask names 2022-04-22 12:24:31 +01:00
Bo Anderson
a8bb0d6581
Merge pull request #13174 from Bo98/gcc-major
extend/os/linux/keg_relocate: restore checking only GCC major versions
2022-04-22 02:09:47 +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
dependabot[bot]
9a9704a96e
build(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](e3c560433a...81cd2dc814)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-21 18:04:00 +00:00