- The "formula/cask uses a release asset" condition read as permission
to use `GithubLatest` for any GitHub release asset, which wasn't the
intent; replace it with the cases where `Git` isn't adequate.
- State in both Cookbooks that a `livecheck` block can be omitted when
a strategy already provides correct versions.
- Replace the `calibre` example's `github_latest` with the cask's
current `header_match` check so the cookbook doesn't model it.
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
- A build dependency that is only run, like `llvm` used as a compiler,
isn't built against, so its `compatibility_version` doesn't matter.
Requiring a match makes e.g. `ccache` on Xcode 14 rebuild `llvm` 23
even though the installed `llvm` 22 can compile it.
- Let formulae tag such build dependencies `:no_linkage`, which
already means the formula doesn't link against them, and keep them
when outdated. The dependencies they were built against are still
checked.
- `Formula#to_hash` dropped `:no_linkage`, so formulae loaded from the
API lost the linkage expectations `brew linkage` relies on.
- Emit a `no_linkage_dependencies` name list beside the existing string
arrays and overlay it when loading, keeping older readers working.
- Reject conflicting `:no_linkage` declarations for one dependency
within a spec and platform at load time, since the overlay is by name.
Signed-off-by: Patrick Linnane <patrick@linnane.io>
- Move `desc` guidance into a shared `Description-Guidelines` page so
formulae and casks follow one set of expectations.
- Keep the principle (describe, don't sell) and replace the rigid
cask-only dos and don'ts with a short list of what to leave out:
marketing language, feature lists, comparisons with other projects
and addressing the reader.
- Leave the name and platform rules to `brew style`, which already
enforces them, so the page only documents what needs judgement.
- Point both cookbooks and the `desc` DSL docs at the new page.
- Enforce prefetchable test resources during ordinary core style
checks so fixtures work with test network restrictions.
- Keep this audit scoped to core and land after its resource
migration; dynamic declarations still need manual changes.
- Fetch test fixtures before sandboxing and stop if any fail so
dependent tests can run without network access.
- Fetch each tested formula's fixtures alongside its source or bottle
without fetching fixtures for untested dependencies.
- Offer static resource migration through a strict cop so existing
taps keep passing ordinary style checks.
- Leave declarations using runtime values for manual migration.
- Refactor `Cachable` module and filenames to `Cacheable`.
- Fix typos and indefinite articles across docs and tests.
- Update UK English spellings in documentation and descriptions.
- Regenerate shell completions and manpages.
- Nesting build directories under the sandbox directory in #23940 pushed
gpgme's `gpg-agent` socket path to 112 bytes, beyond libassuan's
102-byte limit on macOS, so its `make` fails.
- Name sandbox directories `s-` plus eight random characters, which
brings that path to 93 bytes.
Signed-off-by: Patrick Linnane <patrick@linnane.io>
- Reuse each sandbox's private directory for temporary files and local
task-host sockets across fetch, build, test and install operations.
- Share phase environments, cleanup and retention while preserving
offline restrictions and the existing options for debugging failures.
- Forward retention and debugging options through the Linux wrapper
so dependency postinstall hooks can start on both platforms.
- Cover private Unix socket communication online and offline and
private GnuPG agents without requiring a .NET SDK for the tests.
- Keep shared temporary-directory tests independent of platform TTY
setup and within generic Unix socket path limits.
- Handle absent Java cache options and retain debugging files for
ordinary errors and interrupts without catching fatal exceptions.
- Preserve parent failures during error-pipe cleanup and synchronise
the regression check with child readiness.
Fixes#23934
- Restore discovery of installed Metal toolchains and process listing
by allowing the required MobileAsset and sysmond services.
- Check that `brew test` completes without sysmon or pgrep warnings,
including diagnostics forwarded to stdout during child cleanup.
- Keep local endpoint access explicit while retaining DNS and
Homebrew's per-run communication channel, including offline runs.
- Prepare each formula's private `testpath` before configuring the
sandbox so its tests can start and use their own local services.
- Keep cleanup with the parent that creates the test directory while
preserving retention and leaving borrowed directories intact and
quiet, including failures before the test starts.
- Use relative socket paths in fixtures to accommodate longer test
directories, and cover cleanup failures and generated-path retention.
- Cover uncached Metal discovery, child-process discovery, private
services, HTTP over Unix sockets and install-hook operations.
Fixes#23919
By default, `cargo fetch` downloads packages for all targets but most
formulae only need native packages so this results in unnecessary
network and file I/O operations.
Arch Linux also runs the same updated command:
- https://wiki.archlinux.org/title/Rust_package_guidelines#Prepare
- Cargo, Go, npm and Bundler formulae download dependencies inside
`install`, so around 2,700 homebrew-core builds need network access
and cannot be reproduced offline.
- `def fetch` runs first with network access and writable package
manager caches; when it is defined, `install` then runs offline in
the same unpacked source with the rest of `HOMEBREW_CACHE` read-only.
- A sandbox cannot be tightened mid-process, so the phases are separate
`build.rb` runs sharing one staging directory created by the parent.
- `brew fetch --build-from-source` runs `fetch` too so a later
`brew install` can be fully offline.
- reject mixing formula install hooks in every tap
- autocorrect legacy step methods and keywords
- retain stable serialised API values for compatibility
- document canonical Formula and Cask step authoring
- remove the resolved Cask sandbox deprecation reminder
- Discover CPython wheels already packaged in each keg.
- Expand PyPy bootstrap archives packaged in `libexec`.
- Resolve dependency paths without loading formula source.
- Validate helper executables before attempting to run them.
- Enforce source independence with RuboCop and API-loaded tests.
- Keep the internal JSON API unchanged and minimal.
- Run each complete cask step block in one isolated subprocess and all
generated completions in another phase-scoped sandbox.
- Share sandbox selection, fork fallback, install-hook rules and child
error reporting with formula build, post-install and test processes.
- Restrict home, network and filesystem access while preserving `brew`
and supporting explicit command write paths.
- Keep JSON payloads compact and independent of cask Ruby files.
- Remove the completed official-tap migration plan.
- Stop documenting the temporary implicit `var` base for formula steps.
- Update examples to specify their intended path base.
- Record the official-tap migration, RuboCop enforcement and runtime
default removal as separate follow-up changes.
Formula and cask authors need one current reference while released
aliases remain an implementation-only compatibility bridge.
- document shared names, defaults, guards, tokens and command behaviour
- remove compatibility-only methods and values from the cookbooks
- explain ordered coexistence with legacy hooks during tap migration
Five CPython and PyPy formulae share packaging bootstrap work that
depends on resources and implementation-specific install layouts.
- rebuild CPython site-packages, pip and wheel links from resources
- safely replace pre-existing Cellar site-packages directories
- preserve writable CPython venv activation templates
- preserve the Python 3.9 compatibility configuration
- stage PyPy resources and links for the required ABI
Five PHP formulae share PEAR, PECL and versioned extension configuration
that must be rebuilt after installation.
- preserve PEAR directory traversal and repair stale PECL links
- create the common PECL extension layout from `php-config`
- rewrite versioned opcache paths without changing commented settings
- cover the shared filesystem and command behaviour end to end
- Add a generic Formula helper and serialised install step for changing
one Mach-O dynamic library ID.
- Require complete source and ID paths while allowing callers to resolve
a source symlink explicitly.
- Preserve file permissions and codesign modified libraries on Apple
Silicon.
- Document and audit both public interfaces.
Four LLVM and Clang formulae share macOS target configuration generation
for the active SDK and kernel versions.
- skip non-macOS installs and generated native configurations
- select the current or versioned Command Line Tools SDK
- emit compatible arm64, aarch64 and x86_64 target files
Annotate every method in the Formula Cookbook's "Service block methods"
table as `@api public` in `Service`, with documentation matching the
cookbook's descriptions, and add the missing `stop_timeout` row to the table.
Enforce a 1:1 correspondence between the table and the `service.rb`
annotations in the `Homebrew/PublicApiCookbook` cop, backed by a new
`SERVICE_COOKBOOK_METHODS` list, so the two cannot drift.
Claude-Session: https://claude.ai/code/session_011BgWRBydtdkvt8ocqH4nj9
Three glibc-family formulae share locale generation and timezone-link
setup with different rules for the legacy variants.
- derive requested locales while always providing the UTF-8 default
- invoke the installed `localedef` with normalised charmaps
- preserve host timezone links when their sources exist
Several binary formulae ship a gzipped executable that needs the same
guarded post-install expansion and mode handling.
- resolve serialised source and destination path bases
- skip absent payloads and replace stale expanded sources
- install each executable with an explicit literal permission mode
Eight GCC formulae share the same Linux runtime-link and specs
generation algorithm after installation.
- probe the active GCC and glibc runtime locations
- generate family-appropriate library, linker and header search paths
- keep the repeated algorithm behind one literal formula step
Some formula hooks only warn when a persistent path needs user attention
and do not need arbitrary post-install code.
- add a literal warning step shared with cask flight phases
- compose warnings with path guards instead of embedded conditions
- expand fixed context tokens in warning messages
Flight hooks repeatedly stop applications or helpers before mutating
their installed state.
- select processes by exact name or full command line
- serialise attempts, privilege and required-success policies
- preserve fixed user notices and final failure warnings