- Run managed commands as the prefix owner without a console login.
- Share account switching with `as-console-user`.
- Allow package deployment without Xcode or Command Line Tools.
- Bootstrap missing Git without invoking Apple's installer stubs.
- Test package deployment and bottle use with a non-admin account.
- Document MDM provisioning, central policy and vulnerability updates.
- Detect unavailable sudo conservatively and honour `HOMEBREW_NO_SUDO`.
- Retry optional filesystem operations only when elevation is needed.
- Reject casks requiring privileged installers before installation.
- Protect non-admin `staff` installations from other users' writes.
- Preserve stricter umasks in Homebrew and installer subprocesses.
- Let root switch users without sudo and preserve command failures.
- Skip optional system service probes when sudo is disabled.
- Document sudo-free operation and its limits.
- Run repository Git commands and any programs they launch as the
selected installation user.
- Set ownership before Git runs and require a non-root account.
- Use a system `PATH` and omit the user's global Git configuration.
- Check command dispatch and root user rejection in tests.
- Document installation ownership and when packages need `sudo`.
- Intel macOS is a Tier 3 configuration without new bottles, so stop
shipping and testing the `.pkg` installer there.
- `hostArchitectures="arm64"` makes Installer refuse to run on Intel
Macs rather than warn, leaving the `/usr/local` relocation in
`postinstall`, the Intel welcome and conclusion text and the
`macos-15-intel` test runner as dead code.
- clear `.gitconfig` and `.config/git` alongside `.git/hooks` before
privileged installer `git` operations, for both the prefix and
`/usr/local/Homebrew`
- fail `release.yml` if a future installer `git` change clears hooks
without also clearing both config paths
- Support MDM/Munki/Jamf runs where the parent process is root but
Homebrew must execute as the logged-in macOS console user.
- Keep the nested operation constrained to `HOMEBREW_BREW_FILE` so this
helper cannot become a general-purpose root command launcher.
- Share `macos_user.sh` with installer scripts so no-user and package
plist fallback behaviour cannot drift between install paths.
- Stage `macos_user.sh` for `pkgbuild` because `preinstall` needs the
resolver before the Homebrew payload has been installed.
- Restore regular API cache files during package builds until
`internal` API installs are the default.
- Merge packaged API cache contents so existing `api/internal`
directories do not break package reinstalls.
- clear `.git/hooks` before privileged installer `git` operations
- run repository `git` calls through `git_no_hooks` to ignore
`core.hooksPath`
- fail `release.yml` if future installer `git` calls skip that
wrapper
- remove local Git hooks and `.gitconfig` during `.pkg` installs
- warn in `brew doctor` when the `Homebrew/brew` repo contains them
- avoid local Git customisations breaking installs or updates
In this attempt we pretend that the "global" configs are in the
repository itself.
$ XDG_CONFIG_HOME= HOME=$PWD git config --global section.key value
$ XDG_CONFIG_HOME= HOME=$PWD git config --global section.key
value
$ git config --global section.key
$ cat $PWD/.gitconfig
[section]
key = value
The existing instructions is perhaps not clear enough:
To add Homebrew to your `PATH` run `brew shellenv` in your shell
profile (e.g. `~/.bash_profile` or `~/.zprofile`)
Fixes#16803.
- Allow specifying user through `/var/tmp/.homebrew_pkg_user.plist`
- Improve permission handling
- Correctly write API cache
- Add `preinstall` script to fail if we can't get a valid user
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
- test on more macOS versions and improve the test names
- add a more resilient and less disruptive version of changing `git`'s
`safe.directory` configuration
- split jobs into build/test/deploy
- test package on both macOS Intel and Apple Silicon
- cleanup some argument handling
- use `HOMEBREW_MACOS_OLDEST_SUPPORTED` naming to be consistent with
`brew.sh`
- note in `brew.sh` that `Distribution.xml` also needs updated (and do
so)
- various other little bits of style cleanup
- use the system font instead of Helvetica
- cleanup font definitions
- add extra newline to `CONCLUSION.rtf` to next steps not showing up
without a click
- add actual hyperlinks to `CONCLUSION.rtf`
Fixes#15793
- This should help avoid this regressing
- Remove existing Homebrew installation(s)
- Install it twice to ensure that installing over the top of an existing
installation works as expected
- Remove existing API cache to ensure we have the freshest files from
the API in our package
Continuing with the goals of making the installer:
- more useful
- entirely offline
Let's pre-download the API data from a `brew update` run and install it
into the logged-in user's home directory.
While we're here, in the `postinstall` script:
- use longer arguments for various commands
- fix an issue with symlinking on Intel if `/usr/local/bin` doesn't
already exist
- unset `bash -x` and use `-v` on more commands instead
- don't include GitHub Actions credentials
- generate and include RTF version of Homebrew BSD license
- create nicer installer with `productbuild`
- customise welcome/conclusion messages
- add Homebrew logo as a background image
- remove unnecessary `preinstall` script
- cleanup `postinstall` script to pass `brew doctor`
- use `Distribution.xml` for a nicer installer
- require CLT or Xcode rather than using our hacks to try and install
CLT during installation