41103 Commits

Author SHA1 Message Date
Markus Reiter
27a70a40c2
Disallow nested ignore_interrupts. 2024-07-14 13:36:43 -04:00
William Woodruff
a6e6837077
Merge pull request #17724 from Homebrew/ww/fix-local-bottles 2024-07-14 13:32:36 -04:00
Ruoyu Zhong
770dec760e
Merge pull request #17733 from Homebrew/brew-repository-more-error-checking
cmd/--repository: improve tap name error checking
2024-07-14 13:31:58 -04:00
William Woodruff
fdabfd15dc
formula_auditor_spec: add wheel resource test
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-14 13:19:36 -04:00
Mike McQuaid
5e8665c00c
Merge pull request #17732 from Moisan/vendor_utils_git 2024-07-14 13:19:12 -04:00
Markus Reiter
3c8497647e
Fix unused argument. 2024-07-14 13:18:33 -04:00
Ruoyu Zhong
64838db963
cmd/--repository: improve tap name error checking
Before:

    $ brew --repo core
    /usr/local/Homebrew/Library/Taps/core/homebrew-core

After:

    $ brew --repo core
    Error: Invalid tap name: core
2024-07-14 13:17:26 -04:00
Mike McQuaid
2d345d89eb
utils/analytics: strip out more data.
We've filter this out in `brew formula-analytics` too but let's avoid
sending it here in the first place so we can delete the
formula-analytics filtering later.
2024-07-14 13:15:09 -04:00
Mike McQuaid
2b6b091dfc
Merge pull request #17730 from Homebrew/fix_os_which 2024-07-14 13:13:55 -04:00
Thierry Moisan
7b98a0e8c5
vendor_gems: require utils/git 2024-07-14 13:09:18 -04:00
William Woodruff
1ef8aeea49
resource_auditor: typechecking
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-14 13:04:06 -04:00
William Woodruff
bc7261c667
resource_auditor: fix wheel URL audit
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-14 13:01:05 -04:00
Mike McQuaid
c36a3f576d
global: fix require order.
Fixes https://github.com/Homebrew/brew/issues/17723
2024-07-14 13:00:46 -04:00
Mike McQuaid
2d26c89e81
Merge pull request #17726 from Homebrew/brew-repository-speedup 2024-07-14 12:57:52 -04:00
William Woodruff
e8ce1841d5
pypi: source wheel -> universal wheel
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-14 12:51:41 -04:00
Nanda H Krishna
562e151aca
Merge pull request #17725 from Homebrew/sponsors-maintainers-man-completions
Update manpage and completions.
2024-07-14 12:16:09 -04:00
Ruoyu Zhong
96cf5513c8
Port brew --repository to Bash
This provides a significant speedup:

    $ hyperfine 'git checkout master; brew --repo homebrew/core' 'git checkout brew-repository-speedup; brew --repo homebrew/core'
    Benchmark 1: git checkout master; brew --repo homebrew/core
      Time (mean ± σ):      1.737 s ±  0.388 s    [User: 0.743 s, System: 0.323 s]
      Range (min … max):    1.336 s …  2.438 s    10 runs

    Benchmark 2: git checkout brew-repository-speedup; brew --repo homebrew/core
      Time (mean ± σ):     459.1 ms ±  91.9 ms    [User: 100.5 ms, System: 142.1 ms]
      Range (min … max):   366.5 ms … 594.0 ms    10 runs

    Summary
      git checkout brew-repository-speedup; brew --repo homebrew/core ran
        3.78 ± 1.13 times faster than git checkout master; brew --repo homebrew/core
2024-07-14 12:07:11 -04:00
BrewTestBot
25364eb479
Update manpage and completions.
Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow.
2024-07-14 16:06:07 +00:00
Mike McQuaid
b33e28c95f
Merge pull request #17716 from Homebrew/attestations_wider_rollout 2024-07-14 12:05:23 -04:00
Mike McQuaid
a0ebf85c45
Merge pull request #17710 from Homebrew/help_bash 2024-07-14 12:04:58 -04:00
William Woodruff
547e33ccb7
pypi: allow source wheels as resources
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-14 11:58:36 -04:00
Mike McQuaid
4c012a41c6
Port brew help (without arguments) to Bash
This provides a decent speedup:
```
$ hyperfine 'git checkout master; brew help' 'git checkout help_bash; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     506.4 ms ±  50.9 ms    [User: 223.7 ms, System: 99.9 ms]
  Range (min … max):   454.6 ms … 634.1 ms    10 runs

Benchmark 2: git checkout help_bash; brew help
  Time (mean ± σ):     109.5 ms ±  57.1 ms    [User: 1
```

and compares favourably to `pip3 help`:
```
$ hyperfine 'brew help' 'pip3 help'
Benchmark 1: brew help
  Time (mean ± σ):      72.9 ms ±  15.9 ms    [User: 4.9 ms, System: 6.3 ms]
  Range (min … max):    53.6 ms … 126.6 ms    31 runs

Benchmark 2: pip3 help
  Time (mean ± σ):     171.5 ms ±   6.1 ms    [User: 131.6 ms, System: 24.7 ms]
  Range (min … max):   164.2 ms … 189.3 ms    15 runs

Summary
  brew help ran
    2.35 ± 0.52 times faster than pip3 help
```
2024-07-14 11:54:05 -04:00
Thierry Moisan
e351cf049c
Update Library/Homebrew/test/sandbox_spec.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-07-14 11:51:52 -04:00
Thierry Moisan
6995e955b5
Update Library/Homebrew/test/sandbox_spec.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-07-14 11:51:45 -04:00
Mike McQuaid
b8ff4b3d23
Widen attestation verification rollout
Take 2 of https://github.com/Homebrew/brew/pull/17692 but with:

- provide and document `HOMEBREW_NO_VERIFY_ATTESTATIONS`
- don't try to run unless there's GitHub credentials
- don't try to run unless `gh` is installed
- don't try to run in CI

While we're here:
- split out a `Homebrew::EnvConfig.devcmdrun?` helper method
- add some missing `Homebrew::EnvConfig.github_api_token` presence
  checks
2024-07-14 11:50:57 -04:00
Mike McQuaid
15f162c6ab
Output disable date for deprecated packages
Let's use the disable date, if provided, and use 1 year after the
deprecation date otherwise, to display a better message for the
various outputs of deprecated package messages.

Also, provide an internal API for this that can be used by
Homebrew/actions.
2024-07-14 11:49:44 -04:00
Markus Reiter
1b79e01c5b
Remove useless ignore_interrupts. 2024-07-14 11:43:20 -04:00
Markus Reiter
bcded854ce
Make ignore_interrupts thread-safe. 2024-07-14 11:43:14 -04:00
Thierry Moisan
66a479be82
sandbox: deny signal to other processes 2024-07-14 11:21:51 -04:00
Mike McQuaid
b9da669ef2
Merge pull request #17718 from Homebrew/vendor-gems-no-pull-request-target 2024-07-14 10:54:48 -04:00
Ruoyu Zhong
41c43dcd9f
workflows/vendor-gem: simplify condition 2024-07-14 10:44:43 -04:00
Mike McQuaid
652eafc966
workflows/vendor-gem: remove use of pull_request target.
Maintainers no longer need this run on their forks and maintainers can
manually run this from `workflow_dispatch` after reviewing the changes
if needed.
2024-07-14 10:38:31 -04:00
Mike McQuaid
320185aa9b
Merge pull request #17717 from samford/bump-add-repology-require 2024-07-14 10:21:59 -04:00
Sam Ford
ae06033afa
bump: add utils/repology require
A recent commit reworked `require`s to improve performance but this
led to an `uninitialized constant Homebrew::DevCmd::Bump::Repology`
error in `brew bump`. This adds a `utils/repology` `require` to
`dev-cmd/bump.rb` to resolve the error.
2024-07-14 10:08:55 -04:00
Mike McQuaid
7193dc0944
Merge pull request #17715 from Homebrew/remove_maintainer_json 2024-07-14 10:08:36 -04:00
Mike McQuaid
1f6b6060dd
Remove maintainers.json
This will no longer be needed or used after the merge of:
https://github.com/Homebrew/homebrew-test-bot/pull/1142
2024-07-14 09:03:18 -04:00
Mike McQuaid
001d318014
Merge pull request #17707 from Homebrew/optimise_requires 2024-07-14 09:01:42 -04:00
Mike McQuaid
c5dbd3ca24
Rearrange requires
This improves the load time of most brew commands. For an example of
one of the simplest commands this speeds up:

Without Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     525.0 ms ±  35.8 ms    [User: 229.9 ms, System: 113.1 ms]
  Range (min … max):   465.3 ms … 576.6 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     383.3 ms ±  25.1 ms    [User: 133.0 ms, System: 72.1 ms]
  Range (min … max):   353.0 ms … 443.6 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.37 ± 0.13 times faster than git checkout master; brew help
```

With Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     386.0 ms ±  30.9 ms    [User: 130.2 ms, System: 93.8 ms]
  Range (min … max):   359.5 ms … 469.3 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     330.2 ms ±  32.4 ms    [User: 93.4 ms, System: 73.0 ms]
  Range (min … max):   302.9 ms … 413.9 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.17 ± 0.15 times faster than git checkout master; brew help
```
2024-07-14 08:49:39 -04:00
Patrick Linnane
074a8e6a4b
Merge pull request #17714 from Homebrew/sorbet-files-update 2024-07-13 18:37:48 -07:00
BrewTestBot
456677a3f2
sorbet: Autobump sigils via Spoom
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2024-07-14 00:24:16 +00:00
BrewTestBot
2201332d4d
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2024-07-14 00:24:16 +00:00
Mike McQuaid
b86515bb75
Merge pull request #17713 from Homebrew/MikeMcQuaid-patch-1 2024-07-13 18:08:25 -04:00
Patrick Linnane
99b278b66b
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-07-13 14:58:07 -07:00
Mike McQuaid
5771c2f968
attestation: only enable for developers outside CI
Let's hold off on CI and devcmdrun for now.
2024-07-13 17:55:44 -04:00
Mike McQuaid
3ff8b65109
Merge pull request #17712 from Homebrew/homebrew_no_verify_attestations 2024-07-13 17:50:35 -04:00
Mike McQuaid
4366ade990
attestation: allow disabling verification.
Add the (for now undocumented) `HOMEBREW_NO_VERIFY_ATTESTATIONS` to
disable attestation verification if it's having issues or when doing
development.

While we're here, do a little style cleanup too.
2024-07-13 17:39:40 -04:00
Patrick Linnane
6b99ac5868
Merge pull request #17711 from Homebrew/dependabot/github_actions/github/codeql-action-4fa2a7953630fd2f3fb380f21be14ede0169dd4f 2024-07-13 14:28:28 -07:00
dependabot[bot]
95310d8c65
build(deps): bump github/codeql-action
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 319cdb9fa619417d07cc37a964f0502bfbc5e8a9 to 4fa2a7953630fd2f3fb380f21be14ede0169dd4f.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](319cdb9fa6...4fa2a79536)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-13 21:17:29 +00:00
Mike McQuaid
919530c154
Merge pull request #17709 from reitermarkus/from-bottle-loader-downloadable 2024-07-13 17:01:14 -04:00
Markus Reiter
ae6f43921a
Implement verify_download_integrity for bottle manifests. 2024-07-13 16:50:53 -04:00