866 Commits

Author SHA1 Message Date
Mike McQuaid
d57efd9ea2
Improve some Pathname instance variable handling
Will fix or at least partly address:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/elf.rb:225: warning: The class Pathname reached 8 shape variations, instance variables accesses will be slower and memory usage increased.
35
It is recommended to define instance variables in a consistent order, for instance by eagerly defining them all in the #initialize method.
```
2025-07-11 08:02:27 +00:00
Bo Anderson
b8e2cddbbd
Preliminary macOS 26 (Tahoe) support 2025-06-09 21:41:49 +01:00
Rylan Polster
da624601bb
os/mac/pkgconfig/15: update expat version 2025-06-04 15:46:41 -04:00
Sean Molenaar
32b9afd7cd feat: add linux tests 2025-01-19 12:32:55 +01:00
Sean Molenaar
c34b71655c feat: allow font install on linux
Apply suggestions from code review

Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>

feat: add linux appdir

Apply suggestions from code review

Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
2025-01-19 11:14:24 +01:00
Michael Cho
5722d3dc8f
os/mac/pkgconfig/15: update expat version for 15.2 2024-12-19 12:08:02 -05:00
Carlo Cabrera
09fc83667c
os/mac: prefer newest Xcode when searching using mdfind
We're currently returning the first match for `com.apple.dt.Xcode`,
which could be any version if a user has multiple installed.

Instead, let's try to find the newest if all our results have an
`Info.plist` that we can interrogate for the version.

Maybe resolves #18736?
2024-11-08 23:04:49 +08:00
Michael Cho
252678692f
os/mac/pkgconfig: add bzip2.pc for rust formulae 2024-10-11 14:55:37 -04:00
Douglas Eichelberger
d3d25beb35 Use requires_ancestor consistently 2024-10-06 09:25:57 -07:00
Douglas Eichelberger
eed660e784 Move remaining OS extensions to prepend 2024-10-05 12:18:29 -07:00
Bo Anderson
c76c902dbc
os/linux/elf: fix arch compat check on ppc 2024-10-01 05:32:58 +01:00
Carlo Cabrera
f0513c0d64
Merge pull request #18456 from Homebrew/skip-incompatible-arch 2024-09-30 22:54:50 +08:00
Carlo Cabrera
65731faf1d
os/linux/ld: handle nonexistent ld.so.conf more gracefully
Fixes #18458
2024-09-30 22:33:09 +08: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
9e00ebe320
os/mac: bump latest SDK version 2024-09-26 13:02:47 +01:00
Patrick Linnane
a7b316ea76
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-09-25 19:38:57 -07:00
BrewTestBot
6208436910
sorbet: Autobump sigils via Spoom
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2024-09-26 00:24:19 +00: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
d8fd19dde5
Merge pull request #18298 from Homebrew/curl-14.5
os/mac/pkgconfig/14: update libcurl for 14.5 SDK
2024-09-20 12:55:02 +01:00
Carlo Cabrera
1656d08629
os/linux/ld: drop retry logic
This is a hack, so let's see if we can get away with skipping it for
now.
2024-09-17 11:51:27 +08:00
Carlo Cabrera
70ab4932d3
Add link to issue with context 2024-09-17 01:03:34 +08:00
Carlo Cabrera
bb20b3c720
os/linux/ld: harden brewed_ld_so_diagnostics against TypeError
I think this is a bug in Ruby, but I've no idea how to track it down. I
can reproduce it intermittently in a codespace when `brew install`ing a
large number of formulae.

To work around this:
- cache the return value of `brewed_ld_so_diagnostics` so that we can
  limit the number of calls to `IO.popen`
- retry once when we see a `TypeError`

Closes #17828.
2024-09-16 20:26:35 +08:00
Bo Anderson
40c6f05a76
os/mac/pkgconfig/14: update libcurl for 14.5 SDK 2024-09-10 00:22:32 +01:00
Bo Anderson
fe1577dabf
os/mac/pkgconfig/15: drop NTLM_WB reference in libcurl 2024-09-10 00:16:15 +01: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
3627cca066
Remove some unnecessary include Kernel 2024-08-20 04:16:18 +01:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Bo Anderson
7da94a8f01
Preliminary macOS 15 (Sequoia) support 2024-06-11 02:59:31 +01:00
Mike McQuaid
4215603daf
os/mac: fix fetching Linux bottles on macOS
Closes #17375.
Closes #17376 (as it replaces it).
2024-05-31 09:25:42 +01:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Carlo Cabrera
5e027bffd6
Merge pull request #17149 from alebcay/elf-expand-origin
elf: expand $ORIGIN in RUNPATH/RPATH entries
2024-04-28 01:14:54 +08:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Caleb Xu
6ee34832d1
elf: expand $ORIGIN in RUNPATH/RPATH entries 2024-04-25 22:52:25 -04:00
Caleb Xu
100c7f36b1
os/linux/kernel: enable strict typing 2024-04-25 21:36:40 -04:00
Ruoyu Zhong
916b37388d
Revert "Revert "os/linux/elf: avoid using ldd for listing dynamic dependencies"" 2024-04-24 02:23:13 +08:00
Markus Reiter
4b432c7ea4
Explicitly mark non-private APIs. 2024-04-22 21:16:49 +02:00
Ruoyu Zhong
852c5acb65
Revert "os/linux/elf: avoid using ldd for listing dynamic dependencies" 2024-04-16 02:50:12 +08:00
Caleb Xu
a4e0ccc1f6
os/linux/elf: avoid using ldd for listing dynamic dependencies 2024-04-13 19:35:30 -04:00
Caleb Xu
c6b98d0b8c
os/linux/ld: add functions for querying dynamic linker 2024-04-13 19:35:29 -04:00
Douglas Eichelberger
c59d9fa833 Prefer numbered block params over proc conversion, cont'd 2024-04-08 09:47:27 -07:00
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
fe439e8320 Apply 'chmod -x' to executables without shebangs 2024-03-06 22:22:49 -08:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Bo Anderson
58874de60b
Generalise internal cross-image handling 2024-02-22 17:25:20 +00:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Bo Anderson
c51838fa1f os/mac/pkgconfig/14: update for 14.2 2024-01-01 16:33:25 +00:00