53361 Commits
Author SHA1 Message Date
Mike McQuaid a59d9fc5f8 Merge pull request #24368 from Homebrew/issue_24364_reset_core_git_remote
Allow resetting Git remotes to their defaults
2026-10-27 14:39:25 +00:00
Bevan Kay fa08d98821 Merge pull request #24369 from Homebrew/add_rubocop_zap
Replace `# No zap stanza required` comments
2026-10-27 13:33:33 +00:00
Bevan Kay 38514bf787 Replace # No zap stanza required comments
- `zap :not_required` declares that a cask has nothing to zap in a way
  that can be audited, unlike the comment that ~2,900 casks use.
- Add `Cask/ZapNotRequired` to autocorrect the comment so taps can
  migrate with `brew style --fix`.
- Leave comments that give a reason, as autocorrecting would lose it,
  and comments after code, as the stanza can't go on that line.
2026-10-27 23:36:11 +11:00
Mike McQuaid 20e162d4e8 Merge pull request #24361 from Homebrew/as-brew-user-cask-sudo
Preserve sudo routing when switching users
2026-10-27 09:29:52 +00:00
Mike McQuaid 745e907e11 Allow resetting Git remotes to their defaults
- Preserve mirror remotes unless users explicitly select defaults.

Fixes #24364
2026-10-27 09:16:33 +00:00
Mike McQuaid 31af0b9ae6 Preserve sudo routing when switching users
- Keep `HOMEBREW_SUDO_THROUGH_SUDO_USER` and the original caller
  available after the wrappers clear their environment.
- Let `as-brew-user` and `as-console-user` use existing sudoers policy
  for privileged cask operations.
- Handle same-user routing without changing normal service domains.
- Document that the setting does not change sudo's authentication
  requirements.

Fixes #24358
2026-10-27 09:13:41 +00:00
Mike McQuaid 9999947f71 Merge pull request #24343 from syntactic-spice/appimage-desktop-entries
Add desktop entries for AppImage casks
2026-10-27 09:00:40 +00:00
Mike McQuaid b80081950a Merge pull request #24366 from abitrolly/quiet-search
search: Suppress headers in quiet mode
2026-10-27 08:59:40 +00:00
Mike McQuaid 4a2b2f264a Merge pull request #24363 from edel67/uv-inventory-failures
bundle: reject failed uv inventories
2026-10-27 08:58:18 +00:00
Mike McQuaid 57c486f02e Merge pull request #24360 from Homebrew/as-brew-user-relative-brewfile
Preserve working directories when switching users
2026-10-27 08:53:40 +00:00
Anatoli Babenia 67c2e68aca search: Suppress headers in quiet mode
If search output is piped to another command, the headers are
suppressed and each package name is printed on a separate line.

As a user, I had no idea that the headers were suppressed until
I looked through the code, so I enabled --quiet flag to force
the same behavior.
2026-10-27 08:08:13 +03:00
edel67 70c9348cd0 bundle: reject failed uv inventories 2026-10-27 00:42:48 -04:00
Mike McQuaid 615a49c602 Preserve working directories when switching users
- Changing directory inside `as-brew-user` and `as-console-user` makes
  relative paths resolve against the target user's home, breaking
  `bundle --file` and local `Brewfile` discovery.
- Setting `HOME` is enough to use the target user's configuration
  and caches. Keeping the caller's directory fixes relative paths for
  every command without duplicating argument parsing in the wrappers.

Fixes #24359
2026-10-26 17:44:30 +00:00
syntactic-spice 18960f37de Add desktop entries for AppImage casks
- To make AppImage casks on Linux appear in the desktop application
  menu, install each root-level embedded desktop entry into
  `${HOMEBREW_XDG_DATA_HOME:-~/.local/share}/applications`.
- Keep the entry's filename so URL handlers, dock pins and notifications
  that look up the app's desktop ID keep working.
- Add `Cask::DesktopFileParser` to parse and manipulate desktop files.
- Point every `Exec` at the AppImage through `env DESKTOPINTEGRATION=1`,
  keeping its variables and arguments.
- Point `Icon` at the named icon copied into the versioned Caskroom,
  falling back to `.DirIcon`.
- Track ownership with Caskroom symlinks, fail on an existing entry
  unless `--force` or `--adopt`, and rewrite it on upgrade.
2026-10-26 13:30:28 -04:00
Mike McQuaid c6069d2a94 Merge pull request #24355 from Homebrew/homebrew-enterprise-guides
Document Homebrew and MDM administration
7.0.11
2026-10-26 07:44:47 +00:00
Mike McQuaid 40d40f5505 Document Homebrew and MDM administration
- Explain shared Brewfiles for teams without device management.
- Connect existing commands to MDM deployment and reporting.
- Document provisioning prerequisites, package policies and scan coverage.
- Link administration workflows from the Mac administrator guide.
2026-10-25 19:27:32 +00:00
Mike McQuaid 8d799352d3 Merge pull request #24354 from Homebrew/sorbet-files-update
sorbet: Update RBI files.
2026-10-25 13:24:54 +00:00
Mike McQuaid 496a6490d3 Merge pull request #24353 from Homebrew/resource-error-naming
download_queue: name the download in checksum mismatch errors
2026-10-25 13:18:06 +00:00
BrewTestBot 2cf4e1a2f1 sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sorbet.yml) workflow.
2026-10-25 00:44:23 +00:00
Thierry Moisan 27ec67782d download_queue: name the download in checksum mismatch errors 2026-10-24 20:22:13 -04:00
Mike McQuaid c5b9f65d0b Merge pull request #24352 from Homebrew/item-trust-commands
Limit implicit item trust to install commands
2026-10-24 20:08:56 +00:00
Mike McQuaid 51da7f234a Merge pull request #24351 from Homebrew/sandbox-temporary-directory-read-access
Allow reading private sandbox temporary files
2026-10-24 18:08:15 +00:00
Mike McQuaid b51000cdef Merge pull request #24350 from Homebrew/analytics-query-refactor
Share analytics queries and package downloads
2026-10-24 18:07:45 +00:00
Mike McQuaid 271fe96061 Limit implicit item trust to install commands
- Match implicit trust to the documented installation behaviour.
  Other commands require existing trust for the tap or item.
- Retain the dispatched name in `Homebrew.running_command` and limit
  `ARGV` allowances to `install`, `reinstall` and `upgrade`, which
  announce and persist item trust.
- Preserve early formula loading for command-specific options before
  `trust_fully_qualified_items!` runs.
- Cover formula and cask loads, both `--tap` forms and existing alias,
  rename and external command behaviour.
2026-10-24 18:58:00 +01:00
Mike McQuaid 9e05a54e67 Allow reading private sandbox temporary files
- Let archive tools read files in the sandbox's temporary directory
  without granting read access to its parent.
- Exercise temporary-file reads and denied parent access in the sandbox.

Fixes #24348
2026-10-24 18:57:28 +01:00
Mike McQuaid d4412a6a12 Merge pull request #24346 from Homebrew/prefer-reliable-download-tools
Prefer reliable installed download tools
2026-10-24 17:53:03 +00:00
Mike McQuaid e92663d173 Merge pull request #24349 from Homebrew/elf-utf8-relocation-paths
Preserve UTF-8 paths in ELF loader strings
2026-10-24 16:31:14 +00:00
Mike McQuaid d8fcbd424a Share analytics queries and package downloads
- Extract InfluxDB queries so API generators can call Ruby directly.
- Share cached package totals between `brew info` and API generation.
- Keep query formatting and reader tests with their implementations.
2026-10-24 17:30:25 +01:00
Mike McQuaid 68cd1d8861 Prefer reliable installed download tools
- Prefer newer working Homebrew or system Git and curl before a path
  suggestion, so overrides cannot displace suitable defaults. Share
  selection with Subversion when it is invoked.
- Cache probes against executable metadata and selection inputs to
  avoid repeated version checks. Read cache data without sourcing shell
  code and pass Bash's known curl version and path to Ruby for reuse.
- Preserve system curl suitability across cached and forced selections
  so legacy remote updates and certificate checks remain correct.
  Keep TLS verification enabled when a suitable custom curl is selected.
- Check Git and curl in `brew doctor`. Invalidate failed cached
  selections and reselect for one retry, refreshing Ruby's cached data
  so subsequent checks use the working replacement.
- Limit invalidation for command failures to explicit version checks.
  Refresh after installation and preserve ordinary download errors
  without retrying downloads or wrapping every invocation.
- Attempt installation when Git/curl are unsuitable or explicitly
  forced. Prevent recursive startup and recheck the result before
  reporting the minimum, observed versions and executable paths.
- Retain version floors and document paths as suggestions without
  promising a fixed selection order, allowing policy to evolve.
2026-10-24 17:20:37 +01:00
Andrew Nesbitt 39b07ff349 Merge pull request #24321 from Homebrew/strings-c-locale
keg_relocate: strip high bytes before matched paths
2026-10-24 15:53:08 +00:00
Andrew Nesbitt f975977b22 Preserve UTF-8 paths in ELF loader strings
- Validate ELF loader strings as UTF-8 before checking paths, so
  valid non-ASCII references reach bottle relocation detection.
- Keep rejecting invalid byte sequences and cover loader paths
  and the binary relocation metadata produced by `brew bottle`.
2026-10-24 16:46:52 +01:00
Andrew Nesbitt 0235bb5551 keg_relocate: strip high bytes before matched paths
- Apple's `strings` under brew's UTF-8 locale can report a high byte
  just before an embedded path as part of the same run.
- `text_matches_in_file` then fails `File.exist?` on the joined string
  and drops the match, so `brew bottle` can mark a keg that embeds its
  Cellar path as `cellar: :any`.
- Strip those bytes rather than running `strings` with `LC_ALL=C`,
  which would split prefixes containing non-ASCII characters.
- Pass `-e S` to GNU `strings` on Linux, which otherwise splits
  those prefixes and misses them in text files.
2026-10-24 16:33:29 +01:00
Mike McQuaid 13bc9549b4 Merge pull request #24332 from Homebrew/faster-keg-link-unlink
Speed up linking and unlinking kegs
2026-10-24 13:22:49 +00:00
Justin Krehel cbdfb03ce7 Speed up linking and unlinking kegs
- `Keg#link_dir` and `Keg#unlink` called `relative_path_from` on every
  path `find` yielded and `make_relative_symlink` once more per link.
  Ruby's method cleans both paths and walks them a component at a time,
  which made it a large part of linking and unlinking big kegs.
- Add `Utils::Path.relative_path_from` for these calls. For clean
  absolute paths it slices the base off a path below it and compares
  components otherwise, leaving anything else to Ruby's method.
- `Keg#unlink` checks `symlink?` before `directory?`, so each linked
  file takes one `lstat` rather than an `lstat` and a `stat`.
2026-10-24 08:42:26 -04:00
Mike McQuaid 7c5b6053d5 Merge pull request #24345 from aktanazat/list-uninstalled-cask-non-tty
list: fail clearly for uninstalled casks when piped
2026-10-24 08:58:10 +00:00
Aktan Azat e753987daf list: fail clearly for uninstalled casks when piped
When stdout is not a TTY (or with `--verbose`), `brew list --cask NAME`
ran `find` on the Caskroom path even if the cask was not installed, so
it failed with a `find` execution error instead of the
"Cask 'NAME' is not installed." error the TTY path gives.

Raise `CaskNotInstalledError` before running `find`, as
`Cask::List.list_casks` does.
2026-10-24 00:12:22 -07:00
Mike McQuaid d4c23f217b Merge pull request #24344 from Homebrew/brew_gktool_progress
cask/audit: strip gktool progress from errors
2026-10-24 06:55:11 +00:00
Mike McQuaid e936c31af5 Merge pull request #24342 from xucian/systemd-restart-on-failed-exit
Restart systemd services on unsuccessful exit
2026-10-24 06:55:00 +00:00
Bevan Kay 98609dcbb6 cask/audit: strip gktool progress from errors
- `gktool scan` prints `\r`-separated `Progress:` counters before its
  verdict, so for large bundles the signing failure message is almost
  all progress
- GitHub truncates annotations at 4096 characters, so CI never showed
  why Gatekeeper rejected the cask
2026-10-24 12:40:11 +11:00
Mike McQuaid 7a056ffd71 Merge pull request #24341 from Homebrew/git-download-keychain-token
Allow Keychain tokens for Git downloads
2026-10-23 20:15:43 +00:00
Mike McQuaid 701d9eb77e Merge pull request #24338 from mxtymoshyk/download-progress-resize
Re-read terminal size on resize during downloads
2026-10-23 20:15:19 +00:00
Maksym Tymoshyk cc00b39928 Re-read terminal size on resize during downloads
- `Tty.size`, `Tty.width` and `Tty.height` cache the first terminal
  size they read, so shrinking the window mid-download left progress
  lines padded to the old width. They then wrapped and every redraw
  started lower than the last, leaving stale frames behind.
- Mark the cached size as stale on `SIGWINCH` and drop it on the next
  read, so a resize that lands during a read isn't lost.
- Retry a failed terminal size probe rather than caching `nil`.
- When the width changes, clear below the frame top on the next
  redraw to remove rows left when the terminal rewraps the old frame.

Fixes #24333
2026-10-23 22:26:30 +03:00
xucian 4aafc7444c Restart systemd services on unsuccessful exit
- `keep_alive successful_exit: false` makes launchd restart a service
  that exits unsuccessfully, but `to_systemd_unit` only handled `true`
  values so these units had no `Restart=` line at all.
- Map it to `Restart=on-failure`, the inverse of `on-success`, using
  the same `key?(:successful_exit)` check as `to_plist`.
2026-10-23 21:40:38 +03:00
Mike McQuaid 6071b1f1bb Merge pull request #24331 from QuillVot/codex/dmg-desktop-metadata
dmg: skip legacy desktop metadata
2026-10-23 18:14:55 +00:00
Mike McQuaid a48f3f21ac Allow Keychain tokens for Git downloads
- Sandboxed private source downloads cannot read tokens stored by `gh`
  in the macOS Keychain. Allowing Keychain access would also expose
  unrelated credentials, so retain the existing sandbox restrictions.
- Reuse `GitHub::API.github_cli_token` outside the sandbox for built-in
  Git strategies when the rewritten URL uses HTTPS on `github.com`
  and a credential helper is configured. Bound the lookup and keep
  configured helpers inside the sandbox, including wrappers of `gh`.
- Pass the result as `GH_TOKEN` only to top-level clones, fetches and
  remote branch discovery. Register it for log redaction without
  setting the parent environment or populating the API credential
  cache, avoiding exposure through formula environment variables.
- Disable implicit submodule recursion even when Git configuration
  enables it, so child downloads cannot inherit the top-level token.
  Fetch submodules separately without it. Checkouts, resets and local
  inspections also receive no injected token. Share the recursion flag,
  working-directory selection and timeout conversion across callers.
- Explain why tap operations can use Keychain helpers while source
  downloads cannot, and document the remaining authentication limits
  for private submodules and partial clones that fetch during checkout.

Fixes #24339
2026-10-23 17:41:03 +01:00
Mike McQuaid 7685477141 Merge pull request #24340 from Homebrew/dependabot/uv/Library/Homebrew/formula-analytics/certifi-2026.10.19
build(deps): bump certifi from 2026.7.22 to 2026.10.19 in /Library/Homebrew/formula-analytics
2026-10-23 15:51:10 +00:00
dependabot[bot] a93fe97e6f build(deps): bump certifi in /Library/Homebrew/formula-analytics
Bumps [certifi](https://github.com/certifi/python-certifi) from 2026.7.22 to 2026.10.19.
- [Commits](https://github.com/certifi/python-certifi/compare/2026.07.22...2026.10.19)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.10.19
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-23 15:36:42 +00:00
Mike McQuaid 04b3f1b580 Merge pull request #24328 from Homebrew/curl-env-vars
Honour curl environment options consistently
2026-10-23 14:48:50 +00:00
Mike McQuaid 7a06d66f0b Merge pull request #24336 from Homebrew/dependabot/bundler/Library/Homebrew/bundler-6583559b8a
build(deps): bump the bundler group across 2 directories with 10 updates
2026-10-23 12:27:19 +00:00
Mike McQuaid 42c9ca67e6 brew style --fix 2026-10-23 13:12:06 +01:00