2473 Commits

Author SHA1 Message Date
Mike McQuaid
e75d54cbff
linux/development_tools: add undocumented environment variables.
This makes it easier to test the automatic installation of the libc and
compiler formulae without having to change the code.

This is particularly useful now we don't have any official Docker images
for this.
2025-07-25 15:56:33 +00:00
Mike McQuaid
e10d4c43c2
Optionally use DownloadQueue for reinstall, upgrade.
Follow up on `DownloadQueue` for download concurrency on `brew fetch`
and `brew install` to also add support for `brew reinstall` and
`brew upgrade`.

This required a fair bit of refactoring to make this work so I've also
made `install.rb`, `reinstall.rb` and `upgrade.rb` `typed: strict` to
add some extra guardrails from Sorbet here.

Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-07-24 15:41:03 +01:00
Adrian Ho
8a0a887056 env_script_all_files: don't overwrite existing stuff
Overwriting upstream content potentially causes major confusion at best, major breakage at worst.
2025-07-21 12:41:42 +08:00
Patrick Linnane
4513a43d53
Fix RuboCop failures.
Co-authored-by: Patrick Linnane <patrick@linnane.io>
Co-authored-by: Carlo Cabrera <github@carlo.cab>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-07-14 19:12:38 +01:00
Mike McQuaid
6a5a48de29
extend/kernel: fix failures with differing filenames. 2025-07-14 19:12:37 +01:00
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
Issy Long
990c1efc16
bundle: Rename "brews" to "formulae" for consistency
- Homebrew Bundle referred to formulae as "brews". But it referred to
  casks as "casks" and taps as "taps".
- Let's use the same terminology everywhere.
- (I know that `brew "hello"` is the formula syntax in the Brewfile, so
  I'm not changing that (though would be up for it, in a backwards
  compatible manner), just making the code more consistent.)
2025-07-04 21:08:37 +01:00
Issy Long
019a799fae
Merge pull request #20128 from Homebrew/some-bundle-files-werent-typed-at-all
Make the remaining `bundle` files `typed: true`
2025-06-29 23:10:59 +00:00
Douglas Eichelberger
004c0a2a6c
Refactor exec.rb type fixes 2025-06-29 09:02:24 -07:00
Branch Vincent
ba178a8f10
extend/ENV/super: set MATURIN_NO_INSTALL_RUST 2025-06-27 21:49:56 -07:00
Rylan Polster
f238d3b494
Merge pull request #20151 from Homebrew/fix-doctor-linux
Fix `brew doctor` cask handling on Linux
2025-06-22 10:10:28 +00:00
Rylan Polster
431d8f1ff7
Consistently use ClassMethods sub-module for prepending class methods 2025-06-21 21:40:57 -04:00
Rylan Polster
267afac198
Remove more monkey-patching in extend/os 2025-06-21 21:34:20 -04:00
Rylan Polster
508c8b606c
Fix DevelopmentTools::ld64_version on macOS 2025-06-21 21:13:38 -04:00
Rylan Polster
2a7fbd00a9
Fix Cask::Quarantine class methods on Linux 2025-06-21 21:07:08 -04:00
Rylan Polster
ff79015373
Fix Hardware::CPU::features on macOS 2025-06-21 21:01:44 -04:00
Rylan Polster
e1873d30d4
Run deprecated cask tap check on all systems 2025-06-21 13:59:58 -04:00
Rylan Polster
031160936f
Split out os-specific cask software version checks 2025-06-21 13:59:57 -04:00
Mike McQuaid
9ac306e464
Remove alias generic_* definitions in favour of using super
This is the pattern we've been adopting for a while and it's a bit
cleaner. Let's remove all of the existing usage of the existing pattern
to avoid confusion when adopting the new one.
2025-06-16 08:10:08 +00:00
Mike McQuaid
f234423913
dev-cmd/tests: fix require ordering.
This needs to happen after `setup_environment!` so that
`HOMEBREW_TEST_GENERIC_OS` is set and `OS.linux?` and `OS.mac?` both
`return false`.
2025-06-12 16:43:50 +01:00
Rylan Polster
ce72e34b19
Filter brew tests spec files appropriately for each OS 2025-06-11 15:59:21 -04:00
Mike McQuaid
dc71b7c8f6
Cleanup extend/ directory usage.
- move some things out of `extend` that don't really fit there e.g.
  `Module`s that are included but not doing any
  overriding/monkeypatching
- move some code into `extend/os` to fix all remaining
  `rubocop:todo Homebrew/MoveToExtendOS`s
- remove some unneeded `bundle` skipper code that doesn't really make
  sense given our current bottling strategy
- extract some `Pathname` extensions to `extend/pathname` for separate
  files
- move a `ENV` `Kernel` extension into `kernel.rb`
- `odeprecate` a seemingly unused backwards compatibility method
- move `readline_nonblock` from a monkeypatch to a
  `ReadlineNonblock.read` method as its only used in one place
- fix up a link in documentation
2025-06-09 19:06:16 +01:00
Mike McQuaid
cc03340af3
Reduce Homebrew/brew CI warnings
- Remove a bunch of non-actionable/unnecessary noise in GitHub Actions
  CI.
- Limit number of threads used to generate analytics API data to avoid
  reproducible failures producing errors and requiring retries.
- Move to Debian Old Stable for testing non-system `glibc`.
- Remove unneeded core taps/updates.
- Improve naming of CI jobs to clarify purpose i.e. we're testing
  things work on Linux, not Ubuntu specifically.
- Remove dedicated non-online/non-generic Linux `brew tests` jobs from
  3 to 1.

Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2025-06-09 12:47:22 +01:00
Rylan Polster
73b64390b3
Use existing Utils::Bottles::Collector#specification_for method 2025-06-05 12:38:15 -04:00
Rylan Polster
c03f70f1dc
Refactor OnSystem and SimulateSystem bottle tag handling 2025-06-03 11:57:17 -04:00
Mike McQuaid
1035024b83
Revert "feat: allow env for write_jar_script" 2025-05-26 17:19:48 +01:00
Sean Molenaar
81ea767ea3
Update Library/Homebrew/extend/pathname.rb 2025-05-26 21:17:05 +09:00
Sean Molenaar
ca911fb446
feat: allow env for write_jar_script 2025-05-14 11:56:31 +02:00
Patrick Linnane
c6a2fa335d
brew style --fix 2025-05-05 14:35:08 -07:00
Issy Long
6c11916cbc
Bump some files to Sorbet typed: strict 2025-04-27 22:45:44 +01:00
Mike McQuaid
c9a7b62b1d
Homebrew 4.5 deprecations/disables/removals
The usual cycle of deprecating, disabling, and removing things in
Homebrew major/minor releases.
2025-04-22 17:15:23 +01:00
Patrick Linnane
2c9b094bea
os/mac/diagnostic: set OCLP Support Tiers
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-12 17:03:54 -07:00
Patrick Linnane
997ea136b6
os/linux/development_tools: update cop namespace
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-03 19:43:31 -07:00
Mike McQuaid
e3137f192f
Merge pull request #19642 from Homebrew/linux_ci_gcc
Update Linux GCC code.
2025-04-03 15:25:43 +00:00
Mike McQuaid
2b4324af9b
Update Linux GCC code.
Update both the variables that dictate this and the documents that
explain our GCC/glibc policies.

These should ease a future migration to a newer GCC version.
2025-04-03 12:47:21 +01:00
Mike McQuaid
d899f00c4b
Link to Support Tiers in diagnostic/error messages
Now that we have this nice URL let's reference it to allow our other
messages to be a bit shorter/kinder.
2025-04-01 11:35:27 +01:00
Mike McQuaid
11875cde2f linux/bundle/skipper: fix skipper logic.
This should be reversed to work as expected on Linux.
2025-03-27 11:49:10 +00:00
Carlo Cabrera
d130b53394
extend/os/linux/cask/installer: make check_stanza_os_requirements non-private
The method it overrides is not `private`, so it doesn't seem like this
should be private. This causes errors when using `brew bundle` on Linux
with a `Brewfile` that contains `cask` entries.
2025-03-26 17:26:20 +08:00
Mike McQuaid
3b49babbfe
linux/bundle/skipper: add missing requires. 2025-03-25 19:11:19 +00:00
Mike McQuaid
08a9b44b72
linux/bundle/skipper: add support for Linux casks.
Don't unconditionally skip Linux casks but instead check if they are
supported on Linux.
2025-03-25 11:08:21 +00:00
Mike McQuaid
14fe53b9fd
Merge pull request #19521 from Homebrew/pac-bti
Use PAC+BTI where possible on arm64 Linux
2025-03-19 12:45:34 +00:00
Mike McQuaid
d240eda154
os/linux/extend/ENV/super: add comment. 2025-03-19 12:30:59 +00:00
Mike McQuaid
d84fac5af4
Look for VSCode variants
We've had requests for this in Homebrew/bundle a few times so let's
implement it both for there and for `brew edit`.

Tested on my machine with `cursor` and working as expected.
2025-03-19 11:42:37 +00:00
Mike McQuaid
bdeca530ff
Migrate Homebrew/bundle to Homebrew/brew
Co-authored-by: Bo Anderson <mail@boanderson.me>
2025-03-19 06:47:01 +00:00
Carlo Cabrera
49dac599da
Merge branch 'master' into pac-bti 2025-03-19 01:32:54 +08:00
Mike McQuaid
3f6d30f885
Merge pull request #19517 from botantony/brew-doctor
fix: ignore broken kegs during gcc linkage test
2025-03-18 11:50:21 +00:00
Adrian Ho
c180d636ef linux/hardware/cpu: fix amd_k12 reference
AMD K12 was an planned ARM microarchitecture that never existed.

Ref: https://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures#Nomenclature
2025-03-18 18:45:46 +08:00
botantony
4b62b9d2c5
fix: ignore broken kegs during gcc linkage test
Signed-off-by: botantony <antonsm21@gmail.com>
Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-03-18 11:00:14 +01:00
Bo Anderson
6fed6c10e2
Use PAC+BTI where possible on arm64 Linux 2025-03-18 06:14:16 +00:00
Carlo Cabrera
343eac915b
os/linux/diagnostic: skip error on arm64 when HOMEBREW_ARM64_TESTING is set
This[^1] will enable us to start testing arm64 bottle builds in
Homebrew/core when this environment variable is set.

[^1]: Along with some tweaks to the `dispatch-build-bottle` workflow.
2025-03-17 20:52:12 +08:00