694 Commits

Author SHA1 Message Date
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Douglas Eichelberger
e00d066d87 Replace Time refinement with Timer Util 2024-01-29 18:50:12 -08:00
Douglas Eichelberger
2e21efff46 Add ActiveSupport String#exclude? to extend/ 2024-01-19 13:35:34 -08:00
Douglas Eichelberger
08e12b2383 Remove ActiveSupport Array access core extensions 2024-01-19 13:34:52 -08:00
Bo Anderson
5aebde3ffd Add consistent path validation 2024-01-01 18:37:47 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Eric Knibbe
4562ab4299
download_strategy: support Mercurial tags/branches 2023-10-17 00:24:40 -04:00
Eric Knibbe
8646b2cf1f
api: ignore HTTPS errors if minimum curl version isn't installed 2023-10-04 22:24:57 -04:00
Bo Anderson
9c16089e95
download_strategy: fix mirrors not working 2023-10-04 14:28:52 +01:00
Mike McQuaid
f73607553c
Cleanup various TODOs
These were also easily fixed, already fixed or incorrect and
non-controversial.

Co-authored-by: Issy Long <issyl0@github.com>
2023-09-03 09:12:41 -04:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Bo Anderson
c969be340e
download_strategy: move HOMEBREW_ARTIFACT_DOMAIN hack 2023-06-27 14:33:23 +01:00
Bo Anderson
6d8b033eff
Significantly improve fetch speed of bottles 2023-06-22 15:08:16 +01:00
Harry Marr
d2b17e29ef
Check only_path is present before modifying it 2023-06-10 14:31:46 -04:00
Harry Marr
747d3aaaba
Apply review suggestions 2023-06-10 14:08:58 -04:00
Harry Marr
2cd2076186
Use "cone" mode for sparse checkouts 2023-06-09 22:58:00 -04:00
Markus Reiter
b05de929c6
Merge pull request #15351 from reitermarkus/livecheck-head
Use `curl_headers` and `curl_output` for `Livecheck` strategies.
2023-05-09 00:55:34 +02:00
Markus Reiter
498ce8d18f
Merge pull request #15243 from aacerox/hotfix/cask-auth-redirect 2023-05-08 07:56:02 +02:00
alejandro.alvarez.acero
555ce9a5b0
Merge URL :header with :headers. 2023-05-08 07:41:06 +02:00
Markus Reiter
353818f508
Rename curl_head to curl_headers. 2023-05-06 03:41:35 +02:00
Markus Reiter
545a332fef
Use curl_head and curl_output for Livecheck strategies. 2023-05-06 03:40:09 +02:00
Sam Ford
ec2a7121ab
BazaarDownloadStrategy: Replace in-place sub
livecheck's `Git` strategy uses `DownloadStrategyDetector#detect`
in its `#match?` method to check if a URL is a Git repository. This
has historically worked fine but I've recently seen a `can't modify
frozen String` error for a few formulae (percona-toolkit,
schroedinger, squid) in relation to the in-place `sub` call in
`BazaarDownloadStrategy`'s initializer.

Other download strategies use a `@url = @url.sub(...)` pattern to
avoid this issue, so this commit resolves the issue by using the same
approach in `BazaarDownloadStrategy`.
2023-05-01 10:45:13 -04:00
Ilya Kulakov
a63ccfa8ff download_strategy: Fix the timeout value. 2023-04-28 10:11:24 -07:00
Bob Lail
8847719b68 Install cached bottles if curl --head fails
Fixes #15302

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-04-25 07:35:27 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
f52cbbb9da
Vendor mechanize gem outside Gemfile
We only need a single file and it avoids pulling in e.g. `nokogiri`
which is vulnerable.

Allow updating it using `brew vendor-gems`.
2023-04-24 14:03:55 +01:00
Carlo Cabrera
35a8a5dd3d
download_strategy: disable Git fsmonitor
Enabling the fsmonitor isn't useful for these repositories. Moreover,
disabling them will get rid of the warning shown from trying to copy
sockets from a repo watched by the fsmonitor.
2023-04-23 16:42:58 +08:00
Bo Anderson
6cf18e3810
download_strategy: fix bad unescaping in basename parsing 2023-04-18 13:42:34 +01:00
Markus Reiter
fbf474a3fd
Add curl_head method. 2023-04-06 10:22:24 +02:00
Mike McQuaid
ec15acf7dc
Revert "Remove --request GET workaround for HEAD requests." 2023-03-31 09:07:02 +01:00
Markus Reiter
c876530eff
Remove --request GET workaround for HEAD requests. 2023-03-30 05:02:51 +02:00
Mike McQuaid
d3d372d6f5
download_strategy: use another blank. 2023-03-21 12:19:06 +00:00
Mike McQuaid
fd0b3e8035
download_strategy: use blank. 2023-03-21 12:18:17 +00:00
Bevan Kay
f197f164c8
download_strategy: fix case where filename cannot be parsed 2023-03-21 09:12:07 +11:00
Douglas Eichelberger
b8aa619f2f brew style --fix 2023-03-15 18:21:41 -07:00
Douglas Eichelberger
827fc87cde Enable more typing 2023-03-15 14:29:15 -07:00
Harry Marr
bd1d668e2e
Create .git/info dir if it doesn't exist 2023-03-13 09:22:09 -05:00
Mike McQuaid
97b66d3ae7
download_strategy: add another presence check. 2023-03-08 12:49:25 +00:00
Gibson Fahnestock
160e7da779
download_strategy: handle incorrectly quoted filename* headers
Some servers erroneously double-quote the filename in the filename*
header. This is (as far as I can tell from the spec) a bug in the
server, and should be fixed there.

In general though using `""` as the filename seems like behaviour worth
handling in brew anyway, as there may be other places where the parser
returns an empty string.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-03-08 01:28:39 +00:00
Markus Reiter
4f04e9e599
Add signatures for extraction functions. 2023-02-22 22:15:53 +01:00
Mike McQuaid
d292dbdc2b
Revert "Fix permissions before moving extracted files." 2023-02-20 17:20:57 +00:00
Markus Reiter
7c5b6fd10d
Add signatures for extraction methods. 2023-02-19 19:29:21 +01:00
Nanda H Krishna
75045e91f8
brew style --fix 2023-02-06 13:50:39 -05:00
Mike McQuaid
6a25229567
brew style --fix 2023-01-02 19:18:51 +00:00
Frederick Zhang
c27eed4606
Curl: Fix following redirections when base changes
Update base URL when there is an absolute location, so that following
relative locations are considered relative to the new base.

Consider below cURL output for https://example_one.com:

    HTTP/1.1 302 Moved Temporarily
    Location: https://example_two.com

    HTTP/1.1 302 Moved Temporarily
    Location: /foo/

    HTTP/1.1 200 OK

The final URL should be https://example_two.com/foo/ rather than
https://example_one.com/foo/.
2022-11-30 01:32:24 +11:00
hyuraku
43eca95ce4 reset require-utils/github location 2022-11-07 23:12:27 +09:00
hyuraku
80592f6013 move require-utils/github location 2022-11-06 23:32:46 +09:00
hyuraku
3f3a0b5469 move two methods from download_storategy to utils/github 2022-11-06 18:12:43 +09:00
Harry Marr
b11df3bef8
Singularise only_paths (now only_path) 2022-10-22 10:53:02 -04:00
Harry Marr
6219cd0a92
Use different cache tag for sparse checkouts 2022-10-20 15:47:26 -04:00