46395 Commits

Author SHA1 Message Date
Rylan Polster
00f960174f
Download new API files once per Homebrew instance 2025-09-03 15:30:31 -04:00
Mike McQuaid
bd57ad891d
Merge pull request #20629 from Homebrew/cask/audit-fix-key-not-found-error
Cask::Audit: fix `key not found: :latest` error
2025-09-03 18:07:17 +00:00
Sam Ford
dce220e518
Cask::Audit: fix key not found: :latest error
`Cask::Audit.audit_livecheck_version` can raise a `key not found:
:latest` error when a hash from livecheck's `latest_version` method
doesn't have a `:latest` value. This error means that livecheck was
unable to identify the latest upstream version but it can only be
understood if the reader knows how this audit is implemented (and it
may also depend on knowing the structure of livecheck's
`latest_version` hash). Without that knowledge, the error doesn't
make it clear which audit is failing and why.

This addresses the issue by using `nil` as the default value for this
`fetch` call and accounting for a `nil` `latest_version` value. This
allows the audit to surface the usual "Version '1.2.3' differs from
'' retrieved by livecheck" failure, which makes it more clear that
livecheck isn't returning a version.
2025-09-03 12:34:06 -04:00
Mike McQuaid
4343324468
Merge pull request #20623 from Homebrew/livecheck/support-trailing-comments-in-watchlist
livecheck: support trailing comments in watchlist
2025-09-03 15:35:15 +00:00
Sam Ford
31cf8b43a9
livecheck: support trailing comments in watchlist
I ran `brew livecheck` today to check the packages in my watchlist
and realized that it wasn't checking one package because I had added
a trailing comment after the name (and `package # Comment` isn't a
valid package name). I thought we had added support for trailing
comments when we originally added comment support years back but I
must have been mistaken.

This adds support for trailing comments in livecheck watchlist files
as part of refactoring the watchlist line parsing logic to only use
one pass (instead of multiple `#map` and `#reject` calls). This
maintains the existing behavior, where blank lines and lines starting
with `#` are skipped, but does so in a more flexible manner. For
example, the existing logic wouldn't skip a comment line that has one
or more spaces before the `#` character but this new logic will
correctly skip it.
2025-09-03 09:10:58 -04:00
Mike McQuaid
6c98d2bf1b
Merge pull request #20625 from osalbahr/config-prioritize-pretty-name
config: Remove use of `/etc/redhat-release`
2025-09-03 11:07:03 +00:00
Osama Albahrani
de8ff312e6 config: Remove use of /etc/redhat-release 2025-09-02 23:24:07 +03:00
Osama Albahrani
ce8ae46054 config: prioritize ::OS_VERSION
On the [beta Bluefin LTS](https://docs.projectbluefin.io/lts), `brew config` reports:

```console
OS: CentOS Stream release 10 (Coughlan)
```

This is due to the `/etc/redhat-release` file being prioritized over `::OS_VERSION` (`PRETTY_NAME` from `/etc/os-release`).

On Bluefin LTS, `PRETTY_NAME` is `Bluefin LTS`.

This commit reverses the order so `brew config` has better detection:

```
OS: Bluefin LTS
```

I tested on RHEL 10 and the OS line only changed in that the word
"release" was omitted:

```
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 10.0 (Coughlan)
$ grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Red Hat Enterprise Linux 10.0 (Coughlan)"
```

- This is an improvement on my previous PR https://github.com/Homebrew/brew/pull/15788
2025-09-02 22:50:36 +03:00
Mike McQuaid
ab980dc3b7
Merge pull request #20624 from Homebrew/later_pathname_prepend
Make `Pathname.prepend WriteMkpathExtension` as late as possible.
2025-09-02 16:19:44 +00:00
Mike McQuaid
89f3c76cd7
Merge pull request #20622 from Homebrew/livecheck/SkipConditions-check-disabled-before-deprecated
SkipConditions: check disabled before deprecated
2025-09-02 16:02:40 +00:00
Mike McQuaid
e28fe444a5
Make Pathname.prepend WriteMkpathExtension as late as possible.
Let's avoid weirdness in other parts of Homebrew by moving this prepend
to be as late as possible.
2025-09-02 17:00:34 +01:00
Sam Ford
45a642c363
SkipConditions: check disabled before deprecated
We have some formulae and casks that contain both `deprecate!` and
`disable!` calls, presumably as a way of controlling the deprecation
behavior before the disable date is reached. However, once the disable
date has been reached, `Livecheck::SkipConditions` continues to skip
the package as deprecated instead of disabled. This isn't a functional
issue as the package is still skipped but it isn't accurate because
it's not being skipped as disabled.

This reorders `FORMULA_CHECKS` and `CASK_CHECKS` to run the disabled
check before the deprecated check, so the disable date will take
precedence when it's been reached.
2025-09-02 11:32:22 -04:00
Sam Ford
75350b48a3
Merge pull request #20615 from Homebrew/remove-lsr-special-case
Remove temporary audit exception for lsr
2025-09-02 14:23:48 +00:00
Mike McQuaid
bfb0a55347
Merge pull request #20621 from Homebrew/audit-container-deps
cask/audit: fix install of container deps
2025-09-02 13:09:17 +00:00
Bevan Kay
9da27e1ac2
Merge pull request #20620 from Homebrew/sponsors-maintainers-man-completions
Update manpage and completions.
4.6.8
2025-09-02 08:50:23 +00:00
BrewTestBot
aa40480c46
Update manpage and completions.
Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow.
2025-09-02 08:34:29 +00:00
Bevan Kay
dc28719c8e
cask/audit: fix install of container deps 2025-09-02 16:33:04 +08:00
Patrick Linnane
48170b8957
Merge pull request #20601 from Homebrew/copilot/fix-20600
Add cask support to `brew unpack` command
2025-09-02 08:13:29 +00:00
Bevan Kay
25ed81f14b
test/dev-cmd/unpack_spec: fix test 2025-09-02 15:55:09 +08:00
Bevan Kay
12ea343c9f
fix brew typecheck 2025-09-02 15:55:09 +08:00
Patrick Linnane
a8b4d115f2
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
f973bea35c
Remove obvious comments as requested in review
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
ac6f770cdc
Address review feedback: fix description, use if/else, enable quarantine, improve fetch efficiency, and use local test cask
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:08 +08:00
Patrick Linnane
45a2ef9159
unpack_spec: final newlines are hard for AI 2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
6be546a5bc
Skip git logic for casks as they don't need it for patch creation
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
88b7d2900a
Address fetching consistency concern and fix cask path handling
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:07 +08:00
copilot-swe-agent[bot]
a9cd0c4b5d
Add cask support to brew unpack command
Co-authored-by: p-linnane <105994585+p-linnane@users.noreply.github.com>
2025-09-02 15:55:07 +08:00
copilot-swe-agent[bot]
63fee348f7
Initial plan 2025-09-02 15:55:07 +08:00
Rylan Polster
e6711c5b5f
Merge pull request #20618 from Homebrew/unlink-old-names-and-aliases-files
Unlink old `*_names.txt` and `*_aliases.txt` files before overwriting
2025-09-01 20:48:31 +00:00
Rylan Polster
244c3e0e71
Don't remove files unless they exist 2025-09-01 16:32:48 -04:00
Rylan Polster
58e1f13842
Unlink old *_names.txt and *_aliases.txt files before overwriting 2025-09-01 14:49:21 -04:00
Mike McQuaid
47e07fb269
Merge pull request #20607 from Homebrew/fortran-replace-ohai
Fix undefined method 'ohai'
2025-09-01 14:51:29 +00:00
Michael Cho
12920cf96c
Fix undefined method 'ohai' 2025-09-01 15:36:04 +01:00
Mike McQuaid
06f875c2a7
Merge pull request #20593 from ivy/ivy/mcp-server-docs
Document MCP server capabilities
2025-09-01 14:19:06 +00:00
Sam Ford
3eb57bc41d
Remove temporary audit exception for lsr
This removes the temporary `audit_download_strategy` exception for
the `lsr` formula. This was necessary to be able to merge support for
tangled.sh Git URLs, as it made the `using: :git` argument in the
`lsr` formula redundant and caused the "formula audit" check to fail
in brew CI.
2025-09-01 09:50:10 -04:00
Mike McQuaid
9903f0c1f2
Merge pull request #20608 from botantony/typed-strict
lock_file simulate_system: `typed: strict`
2025-09-01 13:18:24 +00:00
Mike McQuaid
d9718cec92
Merge pull request #20612 from Homebrew/dug/simplify-affix-checks
Avoid repeated calls to affix checks
2025-09-01 13:13:37 +00:00
botantony
5b854fa25a
lock_file/simulate_system: typed: strict
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-09-01 13:59:07 +01:00
Mike McQuaid
15f093c32b
Merge pull request #20599 from Homebrew/download_strategy-handle-tangled.sh-git
DownloadStrategyDetector: handle tangled.sh Git URLs
2025-09-01 12:41:37 +00:00
Sam Ford
46d4af6031
Temporarily skip audit_download_strategy for lsr
This is a temporary workaround to allow us to merge support for
tangled.sh Git URLs in `DownloadStrategyDetector`, as it makes the
`using: :git` argument in the `lsr` formula redundant and causes brew
CI to fail. We can't remove that argument from the formula until the
brew change is merged, so this allows us to do so. This should be
removed after the brew change is available in a release.

Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-09-01 08:22:40 -04:00
Sam Ford
d4b7cc14f1
DownloadStrategyDetector: handle tangled.sh Git URLs
We have one formula (`lsr`) that uses a tangled.sh URL but they don't
support a .git extension, so it isn't detected as a Git URL by
`DownloadStrategyDetector`. We can use `using: :git` with the `stable`
URL but livecheck can't use the `Git` strategy for tangled.sh URLs
because its `match` method depends on `DownloadStrategyDetector`
detecting the URL as a `GitDownloadStrategy`.

This adds support for tangled.sh URLs to `DownloadStrategyDetector`
to address this issue. This will also allow us to remove/omit the
`using: :git` argument from related URLs.
2025-09-01 08:12:37 -04:00
Mike McQuaid
0dfd80dd55
Merge pull request #20611 from Homebrew/private-taps
tap: actively check repo visibility
2025-09-01 10:43:01 +00:00
Douglas Eichelberger
240fd71e6f
Avoid repeated calls to affix checks 2025-08-31 11:11:41 -07:00
Ruoyu Zhong
78227dc924
tap: actively check repo visibility
We shouldn't assume that the visibility of a tap keeps unchanged by
storing it into `TapConfig`. Instead, let's actively check that to avoid
e.g. collecting unwanted analytics.

Also, speed up the check for known official public taps so that we don't
waste our GitHub API token limit in CI.
2025-08-31 22:59:21 +08:00
Ivy Evans
6f6af2347c remove trailing newline 2025-08-29 22:08:32 -07:00
Ivy Evans
d4cda43b71
Apply suggestion from @MikeMcQuaid
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-08-29 22:05:41 -07:00
Rylan Polster
9219495eb0
Merge pull request #20604 from Homebrew/revert-20535-use-rubocop-internal-formatter
Revert "Use `rubocop_internal` formatter for Ruby LSP"
2025-08-29 09:52:27 +00:00
Rylan Polster
0619fe3eb3
Revert "Use rubocop_internal formatter for Ruby LSP" 2025-08-29 05:32:27 -04:00
Ruoyu Zhong
e10038bcdb
Merge pull request #20602 from Homebrew/dependabot/all-b88d22238a
Bump the "all" group with 3 updates across multiple ecosystems
2025-08-29 08:51:40 +00:00
BrewTestBot
5256b2467c
Update RBI files for all.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2025-08-29 08:33:40 +00:00