6002 Commits

Author SHA1 Message Date
apainintheneck
7aee21ca8b Fix RuboCop::Cop::FormulaAudit::ShellVariables autocorrect
It used to leave out the parenthesis which could result in invalid
Ruby syntax. Now it always parenthesis here.
2024-10-17 23:46:40 -07:00
Douglas Eichelberger
ced4a3a91f Migrate Parlour extensions to Tapioca compilers 2024-10-14 19:50:09 -07:00
Ruoyu Zhong
5a6203a285
test/utils/github_spec: fix artifact URL test
This does the same as dcba7f356d (#15619) and unblocks CI.
2024-10-15 03:01:45 +08:00
Mike McQuaid
a25a541d26
Merge pull request #18438 from bevanjkay/extract_plist_url_fix
cask/cask: pass args when initalising methods
2024-10-13 17:32:01 +01:00
Michael Cho
252678692f
os/mac/pkgconfig: add bzip2.pc for rust formulae 2024-10-11 14:55:37 -04:00
Bevan Kay
8b33aa048a
test/fixtures: add app binary with valid info.plist file 2024-10-10 10:41:09 +11:00
Bevan Kay
8852f024a6
test/fixtures: add livecheck-extract-plist cask 2024-10-10 10:41:09 +11:00
Bevan Kay
0211a23c1f
test/livecheck: add extract_plist livecheck url test 2024-10-10 10:36:45 +11:00
Michael Cho
a3d8f4e0e4
Merge pull request #18508 from Homebrew/curl-skip-get
utils/curl: workaround curl bug for `--head --request GET`
2024-10-08 08:44:05 -04:00
Douglas Eichelberger
2d16333bbc Replace removable constants with overridable methods 2024-10-07 18:33:03 -07:00
Michael Cho
43ee408793
utils/curl: workaround curl bug for --head --request GET
The `curl --head --request GET` causes a full download to happen on
`curl` from 8.7.0 to 8.9.1[^1] which causes poor UX due to slow
Cask downloads that can take almost twice as long as they should.

[^1]: https://github.com/Homebrew/brew/issues/18213
2024-10-05 14:05:59 -04:00
Carlo Cabrera
4671af4bb9
Merge pull request #18485 from Homebrew/non-fatal-invalid-attestations 2024-10-04 16:09:47 +08:00
Carlo Cabrera
7b74bf07fd
Fix attestation test failures 2024-10-04 16:00:29 +08:00
Michael Cho
cfb8ebb5d8
unpack_strategy/directory: try preserving hardlinks
Try running `cp -al` to preserve hardlinks on both macOS and Linux.

If that fails, fall back on `cp -a` which can preserve hardlinks on
Linux (but not macOS) assuming target filesystem supports them.
2024-10-03 20:30:41 -04:00
Patrick Linnane
c2e2b23c50
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-10-02 10:03:12 -07:00
Bevan Kay
1c5bfa3d80
test/formula_auditor_spec: audit deprecate/disable reasons 2024-09-30 23:11:44 +10:00
Bevan Kay
5a39e1f238
test/cask/audit_spec: audit deprecate/disable reasons 2024-09-30 23:11:44 +10:00
Mike McQuaid
490a553fec
Merge pull request #18455 from samford/livecheck/move-preprocess-url-into-strategies
livecheck: move `#preprocess_url` into strategies
2024-09-30 08:53:13 +01:00
Sam Ford
9e47fc9f31
livecheck: move #preprocess_url into strategies
`Livecheck#preprocess_url` only contains logic for rewriting Git URLs,
so it makes more sense for this code to be part of the `Git` strategy
instead. Outside of better code organization, this saves us from
having to maintain the list of strategies to skip processing (which
is sometimes forgotten when a new strategy is added) and makes it
easier to do something similar in other strategies as needed.

One thing to note is that `Livecheck#preprocess_url` was previously
called on the URL before each strategy's `#match?` method was called.
To maintain the existing behavior, this calls `Git#preprocess_url` in
`Git#match?`. However, we need the processed URL when we use the `Git`
strategy, so we have to call `Git#preprocess_url` again. To avoid
duplicating effort, I've added a `@processed_urls` hash to the `Git`
strategy and have set up `Git#preprocess_url` to cache processed
URLs, so we only do the work once. There may be a better way of
handling it but this seems to work as expected.
2024-09-28 11:29:07 -04:00
Michael Cho
112c692a53
test/spec_helper: require standalone before warnings 2024-09-27 12:48:27 -04:00
Mike McQuaid
a6954f26a5
Merge pull request #18435 from Homebrew/temp-symlink-test-fix
test/cask/utils_spec: fix test failure when HOMEBREW_TEMP is a symlink
2024-09-27 08:42:11 +01:00
Mike McQuaid
b38cbbc085
Merge pull request #18434 from Homebrew/unix-socket
Allow sockets to use longer paths on macOS
2024-09-27 08:07:58 +01:00
Carlo Cabrera
fe1f330e60
Revert "Deprecate installing casks/formulae from paths." 2024-09-27 10:17:04 +08:00
Bo Anderson
fe0505d492
test/cask/utils_spec: fix test failure when HOMEBREW_TEMP is a symlink 2024-09-27 03:02:26 +01:00
Bo Anderson
326a71712f
Revert "Shorten brew tests temporary paths."
This reverts commit 27fb07c0fc622d3e010a8a9f6e0056fd09dc5b1f.
2024-09-27 01:55:26 +01:00
Mike McQuaid
bbdea29a0f
Deprecate installing casks/formulae from paths.
We've already disabled installing casks/formulae from URLs and we
regularly tell people not to install from paths so let's just deprecate
this behaviour entirely.

Even Homebrew developers do not need to work this way.
2024-09-26 20:25:07 +01:00
Mike McQuaid
f0653348c4
Merge pull request #18407 from Homebrew/deprecate_cask_url_block
cask/url: deprecate `url do` blocks.
2024-09-26 16:16:40 +01:00
Mike McQuaid
5b46ec70e9
cask/url: deprecate url do blocks.
We're removing these in
https://github.com/Homebrew/homebrew-cask/pull/186501
so let's deprecate them too.
2024-09-26 14:05:25 +01:00
Case Taintor
31c560e578 Improve cask --adopt to only care about the installed version if auto_update is false 2024-09-26 11:59:40 +02:00
Patrick Linnane
d7e0c8f0c0
Merge branch 'master' into forbid-url-do-homebrew-cask 2024-09-25 10:35:21 -07:00
Mike McQuaid
2f2ca82035
Merge pull request #18413 from Homebrew/more-random-temp-dir
tests: add an extra byte of randomness
2024-09-25 16:01:49 +01:00
Carlo Cabrera
e03a9fd0be
tests: add an extra byte of randomness
Two bytes should hopefully be plenty.
2024-09-25 22:32:51 +08:00
Carlo Cabrera
7d23111608
Merge pull request #18408 from Homebrew/falsy-env_config 2024-09-25 21:28:11 +08:00
Carlo Cabrera
78065c5781
env_config: deprecate setting boolean vars to falsy values
The way we handle boolean environment variables is a bit unfortunate.
For example, setting `HOMEBREW_EVAL_ALL=false` actually enables
`HOMEBREW_EVAL_ALL`.

Let's fix this by deprecating setting boolean environment variables to
common false-y values (`false`, `0`, `nil`, `no`, and `off`) so that we
can later ignore these false-y values when reading boolean environment
variables.
2024-09-25 21:15:53 +08:00
Mike McQuaid
d3cc0c3f22
Merge pull request #18388 from Homebrew/odeprecated_odisabled_remove
Add new odeprecated, odisabled, remove disabled code.
2024-09-25 09:54:46 +01:00
Rylan Polster
18147a6a1e
style: forbid url do blocks in homebrew/cask 2024-09-24 22:45:00 -04:00
Mike McQuaid
27fb07c0fc
Shorten brew tests temporary paths.
If you have `HOMEBREW_TEMP` set to a longer path (e.g. the user's
private temporary directory rather than `/private/tmp`), Sequoia will
error out on some tests when forking because the path is too long
(> 104 bytes).

To improve this situation let's:
- use a shorter path for `HOMEBREW_TEMP` by appending `/brew-tests` to
  the existing `HOMEBREW_TEMP` used outside of tests rather than
  creating nested temporary directories
- use the minimal amount of randomness to avoid collisions while
  allowing parallel tests
- use `squeeze` to remove any double slashes in the temporary path
2024-09-24 10:28:18 +01:00
Mike McQuaid
94416e82f0
Add new odeprecated, odisabled, remove disabled code.
Prepare the usual deprecation cycle for Homebrew 4.4.0.
2024-09-24 10:15:34 +01:00
Daeho Ro
47e70ab3ea allow @ and + characters for search 2024-09-17 12:43:28 +09:00
Bo Anderson
eb93d844d8
Fix NoSuchKegFromTapError handling 2024-09-16 05:46:14 +01:00
Carlo Cabrera
51c4421409
Change default Homebrew/core CI runners
We will now build on Ventura (macOS 13) to Sequoia (macOS 15).

Runners for macOS 15-x86_64 will not be allocated by default due to a
lack of appropriate hardware.
2024-09-12 22:06:10 +08:00
Mike McQuaid
b29549eaed
Merge pull request #18296 from fxcoudert/sequoia_rc
Make Sequoia supported
2024-09-11 13:31:36 +01:00
Carlo Cabrera
c51bb196d1
tests: update determine-test-runners tests
We've decoupled the macOS versions there from
`MacOSVersion#supported_release?`, so these tests need updating.
2024-09-11 20:20:08 +08:00
Rylan Polster
b1db0ee290
Rename load method when preferring installed casks 2024-09-10 13:54:12 -04:00
Rylan Polster
8cb62b1398
Set correct tap when loading installed casks 2024-09-10 13:34:40 -04:00
Mike McQuaid
c8e8aa5600
Merge pull request #17756 from reitermarkus/concurrent-downloads
Implement concurrent downloads in `brew fetch`.
2024-09-09 08:41:11 +01:00
Douglas Eichelberger
fedb868a8b Remove failing tests due to lack of needs_generic 2024-09-06 14:16:40 -07:00
Douglas Eichelberger
5d5daaa09f Use FormulaInstaller OS extensions 2024-09-06 13:58:32 -07:00
Markus Reiter
b297be77a1
Implement concurrent downloads. 2024-09-04 22:54:20 +02:00
Michael Cho
a618512d7a
formula_auditor: make deprecate license check non-strict in core
Also add some more incompatible licenses. These are all not allowed by
Fedora and have are classified as not OSI and FSF approved on SPDX.
2024-09-04 13:21:40 -04:00