864 Commits

Author SHA1 Message Date
Carlo Cabrera
57fae524de
extend/os/mac/keg_relocate: fix duplicate RPATH handling
ruby-macho chokes on changing duplicate RPATHs, so we need to strip the
duplicates before trying to relocate them.

This continues #11405. We need this to unblock
Homebrew/homebrew-core#91224.

While we're here, let's get rid of `HOMEBREW_RELOCATE_RPATHS`. We've
been using it for nearly a year with essentially no problems (barring
`pdnsrec`), so I think it is safe to do unconditionally.
2022-01-18 15:21:05 +08:00
Bob Lail
9b678c365b Add flag --overwrite to brew install to govern the keg-linking step
Allows you to avoid the `Keg::ConflictError` recommending that you invoke `brew link --overwrite` in scenarios when you know that that's how you'd proceed anyway.
2022-01-10 14:23:33 -06:00
Sean Molenaar
4cb8afeeef
service: add timer support for systemd 2021-11-30 11:05:11 +01:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
EricFromCanada
508b48d19e
formula_installer: preinstall any pre-fetch dependencies 2021-11-09 13:56:40 -05:00
fn ⌃ ⌥
aa6f10ff35 install, upgrade: fetch each formula only once 2021-10-31 10:52:40 -07:00
Rylan Polster
5f4d4fb3fb
Cleanup 2021-10-31 00:27:05 -04:00
Rylan Polster
ae457a8028
Fix loading formulae from core tap 2021-10-30 23:54:01 -04:00
Rylan Polster
268a32f0aa
Handle depends_on "homebrew/core/foo" for HOMEBREW_INSTALL_FROM_API 2021-10-29 14:03:24 -04:00
Rylan Polster
fa4bb7d74a
Refactor audit exception handling 2021-10-21 21:11:05 -04:00
Mike McQuaid
e1120549e5
Cleanup more linuxbrew-core code
- Add the same macOS `--build-from-source` default prefix behaviour
  now we have ~4000 linuxbrew-core bottles.
- Merge remaining useful linuxbrew-core-Maintainer-Guide into
  Homebrew-homebrew-core-Maintainer-Guide
- Don't special-case linuxbrew-core any more in docs
2021-10-21 09:00:22 +01:00
Bo Anderson
5a5a8d58b5
Merge pull request #12275 from Bo98/curl-capath
shims/shared/curl: pass both `--cafile` and `--capath` to override default
2021-10-20 16:28:15 +01:00
Bo Anderson
865c31a166
Set GIT_SSL_CAPATH to override default 2021-10-20 16:01:42 +01:00
Bo Anderson
86b01acd97
formula_installer: don't install bottle deps for all bottles 2021-10-19 16:31:08 +01:00
Bo Anderson
1952d27ba2
Install and use Homebrew's ca-certificates on macOS <= 10.15.5 2021-10-03 17:52:10 +01:00
Bo Anderson
f1e4add444
formula_installer: fix installation of local bottles 2021-09-22 19:36:53 +01:00
Bo Anderson
59dc0ed652
formula_installer: fix error if a compatible bottle was not found 2021-09-20 20:57:39 +01:00
Bo Anderson
b55498269f
Revamp APIs around bottle specifications 2021-09-20 15:02:05 +01:00
fn ⌃ ⌥
0c3afa5837 install, upgrade: run formula installer prelude before fetching 2021-09-10 06:15:55 -07:00
fn ⌃ ⌥
06041f7228 install, upgrade: recompute dependencies before installation 2021-09-08 08:48:21 -07:00
Mike McQuaid
faa56d2118
Merge pull request #11966 from FnControlOption/caveats
messages: record cask installations
2021-09-06 12:33:37 +01:00
EricFromCanada
a0080aa688
formula_installer: update syntax of maximum macOS check 2021-09-03 11:01:21 -04:00
FnControlOption
eb16e10902 messages: record cask installations.
This is used to record installation times and also to determine
whether to display caveats.
2021-09-02 08:44:00 -07:00
Sean Molenaar
391b02f870
formula_installer: install service after linking 2021-07-26 21:13:53 +02:00
Carlo Cabrera
78ad5a870c
formula_installer: add tap_audit_exception stub
`FormulaInstaller` calls `audit_installed` at install time, which
invokes methods in `FormulaCellarChecks`. One of these methods makes a
call to `tap_audit_exception` (cf. #11750), but this method isn't
visible in `FormulaInstaller`.

Instead of trying to replicate the logic of `tap_audit_exception` in
`FormulaAuditor` (or trying to initialise an instance of one to make the
call to `FormulaAuditor`'s implementation of it), let's just implement a
stub that assumes an exception always exists.

I'll need to think a bit about whether this is the right fix for this,
but currently the missing method error is blocking PRs in Homebrew/core,
so let's go with this for now. [1]

[1] e.g. Homebrew/homebrew-core#81388, Homebrew/homebrew-core#81582
2021-07-21 15:46:04 +08:00
Sam Ford
0752d25125
OS::Mac: Move version methods into ::Version 2021-06-23 09:03:46 -04:00
Nanda H Krishna
35e5c8a612
formula_installer: add fallback to use tap formula
The keg formula isn't present in some old bottles. Use the tap
formula as a fallback when this is the case.
2021-06-18 14:25:34 +05:30
Mike McQuaid
01cd65d09b
Merge pull request #11525 from cnnrmnn/install-upgrade-outdated
Automatically upgrade installed but out of date formulae with `brew install`
2021-06-16 11:18:22 +01:00
Connor Mann
79f9a9aac6
Move install-specific code to install.rb 2021-06-15 15:59:00 -04:00
Nanda H Krishna
c70bcd53f7
formula_installer: minor refactoring 2021-06-15 17:30:38 +05:30
Nanda H Krishna
b9d64fed4d
formula_installer: restrict use of Formula from Keg 2021-06-15 03:19:24 +05:30
Connor Mann
4b59636ae8
Merge branch 'master' into install-upgrade-outdated 2021-06-14 11:16:20 -04:00
Nanda H Krishna
a0dfe4aa18
formula_installer: use formula from Keg for local bottle installs
Use the formula file from the Keg if `local_bottle_install` is set,
which means that the formula file from the tap is used for `-s`,
`--HEAD` and normal installs but the formula file present within
formula.prefix/".brew" is used for local bottle installs.
2021-06-11 20:57:51 +05:30
Nanda H Krishna
e6dd13d04e
Revert renaming of tap_git_head 2021-06-11 20:02:31 +05:30
Nanda H Krishna
0735eba995
formula_installer: improve support for local bottle installs 2021-06-11 20:02:30 +05:30
Connor Mann
b6cb3d2b6a
Add HOMEBREW_NO_INSTALL_UPGRADE 2021-06-10 15:06:12 -04:00
Connor Mann
56e6710064
Upgrade outdated formulae with brew install 2021-06-10 12:53:25 -04:00
Issy Long
155feba8e0
cask/installer: Add Cask caveats to the end-of-operation summary
- Both formulae and casks can have caveats, but only formulae caveats
  were shown at the end of a bulk install/upgrade/reinstall operation
  via `Homebrew.messages.record_caveats`. This fixes that to show Cask
  caveats too, for consistency (scrolling up all of the
  multi-formulae-and-casks output to see caveats is time-consuming and
  users might miss them).
- In doing this I had to change how `Messages#record_caveats` works
  since the cask name is just a string, not an object.
2021-06-09 12:11:51 +01:00
Connor Mann
e75a10fafd
Fix style 2021-06-02 11:21:44 -04:00
Connor Mann
cb78499cd4
Install build deps for --HEAD 2021-06-02 11:13:12 -04:00
Mike McQuaid
6764329684
formula_installer: don't output caveats for dependencies.
If a formula is installed as a dependency (or not on request) then don't
output its caveats.

Inspired by conversation in https://github.com/Homebrew/brew/pull/11367.
Closes https://github.com/Homebrew/brew/pull/11367
2021-05-19 12:11:01 +01:00
Bo Anderson
33e1255f65
formula_installer: write tab when pouring local --only-json-tab bottles 2021-05-11 14:28:12 +01:00
Carlo Cabrera
734defb1a9
Merge pull request #11352 from carlocab/custom-arch
extend/ENV/super: allow bottles with custom architectures
2021-05-10 14:30:41 +01:00
Bo Anderson
a5cb621fb8
tab: add declared_directly field for runtime deps 2021-05-10 05:50:08 +01:00
Carlo Cabrera
e893f16727
extend/ENV/super: allow bottles with custom architectures
Currently, Homebrew recognises only the architectures listed in
`hardware.rb`. [1] Attempting to pass an unrecognised architecture to
`--bottle-arch` while building a bottle returns an error.

Let's change that by passing unrecognised bottle arches to the compiler
instead of immediately failing with a `CannotInstallFormulaError`.

Partially resolves #5815.

[1] 64b6846d60/Library/Homebrew/hardware.rb (L28-L42)
2021-05-09 11:01:48 +01:00
Carlo Cabrera
bf4ad449bb
formula_installer: set HOMEBREW_RELOCATE_RPATHS
This enables `RPATH` relocation upon pouring bottles.

Part of #11329.
2021-05-07 19:40:40 +01:00
Sean Molenaar
157fed329c
service: install linux service file 2021-05-04 16:22:28 +02:00
Mike McQuaid
670bea02c1
formula_installer: don't require unpinning build deps when pouring.
Fixes #11294
2021-04-30 12:17:05 +01:00
Bo Anderson
627381e949
formula_installer: fix version scheme not being set in the tab 2021-04-12 15:48:13 +01:00
Sean Molenaar
4427fa283f
formula: allow plists to be generated 2021-04-08 10:16:57 +02:00