6232 Commits

Author SHA1 Message Date
Mike McQuaid
0d4f3419ac
Merge pull request #20446 from Homebrew/copilot/fix-20427
Fix `brew upgrade` not linking newer versions when upgrade interrupted
2025-08-15 18:34:36 +00:00
copilot-swe-agent[bot]
42d4f3d8b9
Upgrade unlinked/unpinned kegs
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-15 19:18:52 +01:00
Mike McQuaid
523d743705
Merge pull request #20475 from Homebrew/better_formulary_debugging
formulary: provide ref and realpath when rejecting path.
2025-08-15 18:08:28 +00:00
Mike McQuaid
640f16860b
formulary: provide ref and realpath when rejecting path.
This should help further debugging.

Also, no need to formulae that aren't `*.rb` files as they'll be rejected
later anyway (and already were before we changed the
`Homebrew::EnvConfig.forbid_packages_from_paths?` defaults).
2025-08-15 17:52:56 +01:00
copilot-swe-agent[bot]
c3934c8d8b
Fix concurrent download error for duplicate URLs
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-15 17:13:30 +01:00
Ruoyu Zhong
b0b8e23856
Merge pull request #20463 from Homebrew/gnu-mirror-audit
Re-enable GNU mirror audit
2025-08-14 17:13:06 +00:00
Ruoyu Zhong
3f4d19e87b
Re-enable GNU mirror audit
Follow-up to Homebrew/brew#20461 and #233493.
2025-08-14 23:50:53 +08:00
Carlo Cabrera
5e17e569b3
Merge pull request #20462 from Homebrew/gnu-livecheck
livecheck/strategy/gnu: use `ftpmirror.gnu.org` too
2025-08-14 15:22:55 +00:00
Carlo Cabrera
635a36a879
livecheck/strategy/gnu: use ftpmirror.gnu.org too
Part of addressing #20456.

See also #20461 and Homebrew/homebrew-core#233493.
2025-08-14 23:07:04 +08:00
Ruoyu Zhong
da6619616b
rubocops/urls_spec: simplify 2025-08-14 22:26:02 +08:00
Ruoyu Zhong
049e8cc61c
Update and temporarily disable GNU mirror audit
Update the audit to prefer ftpmirror.gnu.org over ftp.gnu.org as
suggested by GNU [1]:

> We recommend using this generic ftpmirror.gnu.org address wherever
> possible in links, documentation, etc., to reduce load on the main GNU
> server.

The audit is temporarily disabled to allow migrating all homebrew/core
formulae first.

Should help to address #20456.

[1]: https://www.gnu.org/server/mirror.en.html
2025-08-14 22:03:13 +08:00
Mike McQuaid
7634fe375e
Merge pull request #20455 from Homebrew/copilot/fix-20454
Fix audit_signing to skip when quarantine attribute is missing
2025-08-14 09:45:36 +00:00
Mike McQuaid
5602f0e11e
Merge pull request #20451 from Homebrew/dependabot/all-dbdec0a9b9
Bump the "all" group with 2 updates across multiple ecosystems
2025-08-14 09:10:26 +00:00
copilot-swe-agent[bot]
d0ad96a9b3
Fix audit_signing to check quarantine availability and attributes
Co-authored-by: bevanjkay <40621599+bevanjkay@users.noreply.github.com>
2025-08-14 19:09:57 +10:00
Mike McQuaid
7dd47ca89a
Merge pull request #20421 from Homebrew/cask-rename-stanza
cask/dsl/rename: add new `rename` dsl
2025-08-14 08:51:45 +00:00
Patrick Linnane
2605529a90
brew style --fix 2025-08-13 12:23:12 -07:00
copilot-swe-agent[bot]
cfa7326620
Improve error message for local formula file installation attempts
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-13 17:29:43 +01:00
copilot-swe-agent[bot]
4ee43fbde1
Improve quarantine support error messages with specific CLT guidance
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-13 14:30:05 +01:00
HuaDeity
dd0e187eb5
Fix HEAD installations with HOMEBREW_FORBID_PACKAGES_FROM_PATHS
- Allow cache paths in FromPathLoader when HOMEBREW_FORBID_PACKAGES_FROM_PATHS is set
- Fixes issue where HEAD installations fail due to temporary source downloads
- Add test case to verify cache paths are allowed when path restrictions are enabled

The issue occurred because HEAD installations download formula sources to cache
directories, but HOMEBREW_FORBID_PACKAGES_FROM_PATHS only allowed paths from
HOMEBREW_CELLAR and HOMEBREW_LIBRARY/Taps, causing the installation to fail.

Closes: homebrew/brew#issue-number
2025-08-13 17:57:55 +08:00
copilot-swe-agent[bot]
4ad7d59a25
Implement pkg-config macOS SDK mismatch diagnostic check
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-13 09:03:26 +01:00
Issy Long
d7b59fdfe8
Merge pull request #20402 from Homebrew/head-url-must-always-specify-branch
Ensure that `head` Git URLs always specify a branch name
2025-08-13 07:47:21 +00:00
Mike McQuaid
20eb1e15b8
Merge pull request #20416 from Homebrew/copilot/fix-18036
Add brew doctor warning for symlinked /home directories on Linux
2025-08-12 17:57:27 +00:00
Mike McQuaid
96268175c5
Merge pull request #20417 from Homebrew/copilot/fix-16309
Fix cask installation conflicts with same-named formula binaries
2025-08-12 17:21:51 +00:00
Bevan Kay
9cb2b65319
cask/dsl/rename: add new rename dsl 2025-08-12 23:24:20 +10:00
copilot-swe-agent[bot]
d785e2024b
Add symlinked home detection to brew doctor on Linux
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-12 11:00:14 +01:00
copilot-swe-agent[bot]
cbe347782c
Implement formula conflict detection for cask binary artifacts
While we're at it, update copilot instructions.

Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-12 10:42:51 +01:00
copilot-swe-agent[bot]
e22af11388
Prevent installing formulae from paths without HOMEBREW_DEVELOPER
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-12 09:54:21 +01:00
Mike McQuaid
b8c82b44b8
Merge pull request #20425 from Homebrew/internal-api-helper
Create `Homebrew::API::Internal` for working with internal API
2025-08-12 07:32:18 +00:00
Rylan Polster
cf450d9948
Create Homebrew::API::Internal
Add type aliase and fix cask content issue
2025-08-12 02:40:48 -04:00
Rylan Polster
8aabee74a6
Store cask API data for use in to_hash_with_variations 2025-08-11 22:06:07 -04:00
Rylan Polster
8dccdd8e60
Store formula API data for use in to_hash_with_variations 2025-08-11 22:06:07 -04:00
Issy Long
d0e9a2d7d6
Always suggest a HEAD branch name if we can find one
- If a HEAD branch name isn't specified at all, then the user probably
  wants to shortcut adding one by being told what the default branch for
  the repo is. Otherwise they have to click the URL, look at the GitHub
  UI, then type the branch name into `branch: "foo"` syntax.
2025-08-11 13:46:49 +01:00
Issy Long
05b27aa847
Disallow head do blocks with only url and branch
- Since `head` must now specify a url and branch, the `head do` block
  with only these stanzas can be condensed to the single-line
  `head "url", branch: "branch"` format.
2025-08-10 20:52:58 +01:00
Thierry Moisan
9de0395c3b
patches audit: add tests for patches corrector 2025-08-10 15:33:35 -04:00
Issy Long
37eaed5bb7
Ensure that head Git URLs always specify a branch
- There's a TODO on the "someday" list [1] to ensure that `head` Git
  URLs always specify a branch.
- So I thought I'd automate this worry by adding an audit.
- Since `resource` block URLs tend to be pinned to SHAs, if indeed
  they are Git URLs, this audit only applies to `head` URLs.

[1]: https://github.com/orgs/Homebrew/projects/5?pane=issue&itemId=98789749
2025-08-10 20:28:50 +01:00
Eric Knibbe
0675ddc876
download_queue: display hash of rejected download 2025-08-06 23:02:18 -04:00
Eric Knibbe
626b6aca2d
RubyDoc output fixes 2025-08-05 17:13:42 -04:00
Eric Knibbe
6255263b51
output: express environment variables consistently 2025-08-04 09:50:06 -04:00
Sam Ford
d06480aae1
SkipConditions: use versioned URLs in test casks
The `Cask::Cask` objects in the `SkipConditions` tests don't
interpolate `version` in the `url` strings, so these are technically
unversioned URLs as a result and would be skipped as unversioned. This
updates the URLs accordingly, so they won't trigger the unversioned
skip as a fallback (if the intended test doesn't work as expected).
This is something I discovered while writing a test for a cask that
shouldn't be skipped.
2025-08-03 15:03:26 -04:00
Sam Ford
ff2b1d6821
SkipConditions: special case unsigned deprecations
We've been adding `disable!` calls with a future date to casks using
an unsigned app. That implicitly deprecates the cask until it reaches
the disable date, so we've been having to add simple `livecheck`
blocks to casks that use a default check to ensure that livecheck
continues to check them. It was suggested that it would be simpler to
have livecheck not skip casks that have a `disable!` call with a
`because: :unsigned` argument and I agree, so this modifies
`SkipConditions` to add a special case for this scenario.
2025-08-03 15:03:25 -04:00
Carlo Cabrera
fd80dd9eef
Fix test failure 2025-08-02 04:46:48 +08:00
Carlo Cabrera
fb35add3b6
Replace ensure_formula_installed! with Formula#ensure_installed!
`ensure_formula_installed!` requires the `Formula` class to be loaded
before being called to work properly.

Let's guarantee that instead by implementing it as an instance method of
the `Formula` class.

See discussion at #20358.
2025-08-02 03:43:37 +08:00
Mike McQuaid
bafc57cfe1
Add Cask install/upgrade/reinstall support for download queue
This will allow installing/upgrading/reinstalling casks and all their
dependencies in parallel.
2025-07-30 08:18:35 +01:00
Douglas Eichelberger
0a4b064059
Fix specs 2025-07-28 21:14:23 -07:00
Mike McQuaid
0c969c2f82
Merge pull request #20311 from Homebrew/quieter_debug
Make `--debug` output a bit quieter by default
2025-07-25 16:28:33 +00:00
Mike McQuaid
312f046302
Make --debug output a bit quieter by default
The `Formulary` and `system_command` debug output is incredibly verbose
by default and this is pretty annoying when all you want is to get
better backtraces when there's an error.

Instead, let's require `--verbose` and `--debug` for the noisiest output
message types.
2025-07-25 17:14:46 +01:00
Bo Anderson
406b9c029b
Fix forbidding special license refs 2025-07-24 23:37:31 +01:00
Mike McQuaid
e10d4c43c2
Optionally use DownloadQueue for reinstall, upgrade.
Follow up on `DownloadQueue` for download concurrency on `brew fetch`
and `brew install` to also add support for `brew reinstall` and
`brew upgrade`.

This required a fair bit of refactoring to make this work so I've also
made `install.rb`, `reinstall.rb` and `upgrade.rb` `typed: strict` to
add some extra guardrails from Sorbet here.

Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-07-24 15:41:03 +01:00
Bo Anderson
b2ffe7b060
Fix handling of formula install blocks 2025-07-23 21:19:22 +01:00
Mike McQuaid
ed5805e50c
Add JSON API download strategy for download queue
This fixes the weird/broken existing behaviour which was incorrectly
creating symlinks at download time. It also defers much more logic to
the original code.

For clarity, rename the existing `API::Download` class to
`API::SourceDownload`.

While we're here:
- add a/improve the `download_type` method on all `Downloadable`
  subclasses to improve download queue output format
- move some logic to `RetryDownload`
2025-07-22 17:48:32 +01:00