2535 Commits

Author SHA1 Message Date
Ruoyu Zhong
d0418add45
os/mac/diagnostic: improve OpenCore check
This is based on [1].

[1]: https://github.com/Homebrew/brew/pull/18765#issuecomment-2474056438
2024-11-14 00:55:49 +08:00
Mike McQuaid
5a2c264d19
Merge pull request #18759 from alebcay/restrict-native-optflags
shared: only fall back to -march=native on supported architectures
2024-11-13 16:45:26 +00:00
Ruoyu Zhong
a525ce0ad8
Apply suggestions from code review
Co-authored-by: Eric Knibbe <enk3@outlook.com>
2024-11-13 23:43:24 +08:00
Ruoyu Zhong
13265ca170
os/mac/diagnostic: skip OpenCore check in CI 2024-11-13 23:11:16 +08:00
Ruoyu Zhong
dee399c27d
os/mac/diagnostic: display OpenCore version 2024-11-13 23:01:29 +08:00
Ruoyu Zhong
854fc16889
os/mac/diagnostic: fix OpenCore check
Fixes #18763.
2024-11-13 22:48:51 +08:00
Carlo Cabrera
2c20e3b8de
os/mac/diagnostic: check for OpenCore
This configuration is not supported. Let's make `brew doctor` complain
about it.
2024-11-13 09:43:16 +08:00
Caleb Xu
a70d15c80d
shared: only fall back to -march=native on supported architectures 2024-11-12 11:34:40 -05:00
Caleb Xu
33a9d24111
linux/hardware/cpu: add some missing AMD CPUs 2024-11-09 21:54:05 -05:00
Carlo Cabrera
017c8d05dc
linux/hardware/cpu: add some missing Intel CPUs
Information taken from 1bf385f102/llvm/lib/TargetParser/Host.cpp
2024-11-09 11:45:23 +08:00
Mike McQuaid
f5b211efaa
os/linux/diagnostic: remove XDG_DATA_DIRS. 2024-10-31 12:43:36 +00:00
Bo Anderson
b34e6ee20e
Merge pull request #18638 from Homebrew/keg_relocate-type-fix
keg_relocate: fix error when dylib_id doesn't need changing
2024-10-26 06:45:57 +01:00
Bo Anderson
28f19878e3
keg_relocate: fix error when dylib_id doesn't need changing 2024-10-26 06:31:05 +01:00
Bo Anderson
529eadd6cc
os/mac/keg_relocate: don't change Swift stdlib dylib IDs 2024-10-25 20:55:21 +01:00
apainintheneck
ab5f0c0fa5 brew style --fix 2024-10-17 23:45:25 -07:00
Bo Anderson
aff41779c4
extend/kernel: fix error on early deprecations 2024-10-16 03:58:05 +01:00
Carlo Cabrera
7a8f9fa489
extend/kernel: fix duplicate messages in GitHub Actions
Calls to `opoo` and `onoe` produce duplicate `Warning:` and `Error:`
messages in CI logs because we print something to stdout and print an
annotation. Annotations also produce `Error:` and `Warning:` lines in
the log.

Let's fix this by skipping printing the message if we've already printed
an annotation.
2024-10-14 12:15:24 +08:00
Mike McQuaid
d1e539cb84
Merge pull request #18547 from Homebrew/cask-formula-dep-preinstall
Perform preinstall checks when a formula is installed via a cask
2024-10-13 17:40:59 +01:00
Michael Cho
89fe201ad9
extend/ENV/super: use brew libs for some Python packages
This avoids using bundled libraries for:

* `hidapi`[^1]
* `pynacl`[^2]
* `pyzmq`[^3]

The build should now fail if dependency is missing.

Essentially reverses default so now that using bundled copy is now
opt-in via `ENV` modification, e.g. `ENV.delete "SODIUM_INSTALL"`

[^1]: https://github.com/trezor/cython-hidapi/blob/0.14.0.post2/setup.py#L229
[^2]: https://github.com/pyca/pynacl/blob/1.5.0/setup.py#L71-L73
[^3]: https://github.com/zeromq/pyzmq/blob/v26.2.0/CMakeLists.txt#L41-L43
2024-10-12 18:23:18 -04:00
Bo Anderson
97866f8adf
Perform preinstall checks when a formula is installed via a cask 2024-10-11 16:57:47 +01:00
Douglas Eichelberger
ed4129b580 Remove removable constants 2024-10-07 19:45:48 -07:00
Douglas Eichelberger
8033fcf4a6 Fix brew style docs 2024-10-07 18:59:27 -07:00
Douglas Eichelberger
2d16333bbc Replace removable constants with overridable methods 2024-10-07 18:33:03 -07:00
Douglas Eichelberger
d3d25beb35 Use requires_ancestor consistently 2024-10-06 09:25:57 -07:00
Douglas Eichelberger
0855d7c9e0 Revert ENV changes 2024-10-05 12:35:28 -07:00
Douglas Eichelberger
f4a6dce64a Fix ENV 2024-10-05 12:18:29 -07:00
Douglas Eichelberger
0d5b56aa6a Fix tests 2024-10-05 12:18:29 -07:00
Douglas Eichelberger
eed660e784 Move remaining OS extensions to prepend 2024-10-05 12:18:29 -07:00
Patrick Linnane
ada5e2d219
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-10-02 10:03:48 -07:00
Patrick Linnane
c2e2b23c50
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-10-02 10:03:12 -07:00
Carlo Cabrera
6329db9065
Remove macOS implementation of #arch_compatible?
We don't really need this.
2024-09-30 22:29:03 +08:00
Carlo Cabrera
861d7b9087
linkage_checker: skip files with incompatible architectures
Some formulae include these files, and they can't always be removed.
However, they can cause spurious linkage failures, so let's skip them
when checking for linkage. See, for example, faust at
Homebrew/homebrew-core#191308.
2024-09-29 05:15:36 +08:00
Bo Anderson
567f5eb4be
Allow sockets to use longer paths on macOS 2024-09-27 04:37:03 +01:00
Mike McQuaid
94416e82f0
Add new odeprecated, odisabled, remove disabled code.
Prepare the usual deprecation cycle for Homebrew 4.4.0.
2024-09-24 10:15:34 +01:00
Mike McQuaid
eab322946a
formula: fix alias/generic/prepend std_cmake_args issue.
Seen in:
https://github.com/Homebrew/homebrew-core/pull/191090#issuecomment-2363215204

There's a missing signature issue here due to the `generic_*` aliasing
we're doing. With prepend, though: this is no longer needed and we can
use `super` instead which is more idiomatic and nicer overall.

This pattern should probably be applied in other places but: let's try
this targetting fix for here first.
2024-09-20 13:01:42 +01:00
Douglas Eichelberger
125ced9cf8 Fix formatting 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
61985bc7f3 Use top-level OS instead 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
bb80f063dc Fix namespacing 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
7cd329c116 Makes args readable 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
27e951c408 Replace undef with prepended modules 2024-09-19 10:58:53 -07:00
Mike McQuaid
1c390093f8
Revert "Limit usage of GitHub Actions Annotations" 2024-09-16 16:52:03 +01:00
Carlo Cabrera
c6e2cd9037
Limit usage of GitHub Actions Annotations
- only use annotations for `opoo` and `onoe` if
  `HOMEBREW_GITHUB_ACTIONS` is set. This will make using `brew` less
  noisy in GitHub Actions for third parties. See
  Homebrew/discussions#5602.
- if we've already called `puts_annotation_if_env_set`, then we no
  longer need to print the message to `$stderr`. The message from the
  annotation already show up in the GitHub Actions log, so printing to
  `$stderr` just leads to duplicate messages in the log.

While we're here, let's make sure to forward the `file:` and `line:`
kwargs of `puts_annotation_if_env_set` to the `Annotation` constructor.
2024-09-15 11:31:54 +08:00
Michael Cho
99d81b4717
ENV/super: replace m4 shim with M4 variable
The problem is the shim can end up getting baked into formula binaries
(e.g. `flex`) or cause odd issues when mixed up with brew `m4`, e.g.
https://github.com/Homebrew/homebrew-core/issues/180040
2024-09-11 11:33:44 -04:00
Carlo Cabrera
66ba1f10c7
shims/super/ninja: respect Homebrew parallelism
`ninja` currently doesn't respect `HOMEBREW_MAKE_JOBS` or
`ENV.deparallelize`. This change fixes that.
2024-09-09 10:50:52 +08:00
Mike McQuaid
dc9618457d
Improve brew doctor output on prerelease macOS
- Avoid near duplicate messages
- Provide correct CLT download instructions

Before:
```
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 16.0.

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 16.0.

Warning: Your Xcode (15.4) at /Applications/Xcode.app is too outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

Warning: Your Xcode (15.4) is outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

If 16.0 is installed, you may need to:
  sudo xcode-select --switch /Applications/Xcode.app
Current developer directory is:
  /Applications/Xcode.app/Contents/Developer

```

After:
```console
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Install the Command Line Tools for Xcode 16 from:
  https://developer.apple.com/download/all/

Warning: Your Xcode (15.4) at /Applications/Xcode.app is too outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

```
2024-09-06 17:38:25 +01:00
Bo Anderson
98fb5f9dea
Don't assume ENV is a superenv in RBI 2024-08-23 05:59:00 +01:00
Bo Anderson
d24686ac50
extend/ENV: remove fake EnvMethods from RBI 2024-08-23 05:28:52 +01:00
Carlo Cabrera
5316627621
extend/ENV/super: set GOTOOLCHAIN
This will prevent Go from automatically downloading a newer toolchain
when one is requested by a `go.mod` file. See:
- https://tip.golang.org/doc/toolchain
- https://kokada.capivaras.dev/blog/quick-bits-go-automatically-downloads-a-newer-toolchain-if-needed/
2024-08-20 21:50:37 +08:00
Michael Cho
1dbedddc58
diagnostic: check for strings in XDG_DATA_DIRS 2024-08-17 21:59:49 -04:00
Douglas Eichelberger
df2fcfdfb0 Add missing sigs 2024-08-15 09:21:43 -07:00