Nanda H Krishna
45f853ef61
Merge pull request #17793 from Homebrew/fix-frozen-array-modification-errors
...
Avoid frozen array errors in `brew upgrade`
2024-07-19 09:58:57 -04:00
apainintheneck
5a37a77a7b
Add tests for new sort_formulae_for_install method
...
These are integration tests but they should complete relatively
quickly anyway since we're not installing anything.
2024-07-18 21:38:43 -07:00
Bo Anderson
16d547b030
attestation: handle bad configurations better
2024-07-18 16:11:25 +01:00
Kevin
4aae003a1a
Merge pull request #17766 from Homebrew/fix-formula-uri-loader
...
FormulaURILoader: use regex to validate refs before attempting to cast
2024-07-17 20:07:17 -07:00
Nanda H Krishna
6db608f43f
Ensure that the gh
formula is sufficiently new
2024-07-17 14:48:53 -04:00
Nanda H Krishna
8839ccfe72
Fix tests for attestations
2024-07-17 14:48:53 -04:00
Nanda H Krishna
802eb54e87
Fix tests for attestations
2024-07-17 14:48:50 -04:00
Bo Anderson
f40330c42d
attestation: avoid touching working directory
2024-07-17 19:18:09 +01:00
Bo Anderson
19617cb161
system_command: add reset_uid option
2024-07-17 06:33:03 +01:00
Rylan Polster
b563d9920b
FormulaURILoader: use regex to validate refs before attempting to cast
2024-07-15 14:07:55 -04:00
Rylan Polster
d4910cc490
Merge pull request #17757 from krehel/fix-cask-info
2024-07-15 14:07:25 -04:00
Rylan Polster
284f6b8829
Remove redundant context
block
2024-07-15 13:55:23 -04:00
Rylan Polster
9ff4bab171
Fix tab info test
2024-07-15 13:31:39 -04:00
Rylan Polster
7d16fd9186
Revert "sandbox: deny signal to other processes"
2024-07-15 12:22:02 -04:00
William Woodruff
ad1500ad60
Apply suggestions from code review
2024-07-14 16:30:12 -04:00
Nanda H Krishna
1ae21d2731
attestation: improve error message when gh
is too old
2024-07-14 16:12:56 -04:00
Mike McQuaid
4d1e601ecb
Merge pull request #17721 from Homebrew/deprecated_packages_disable_date
2024-07-14 14:15:05 -04:00
Rylan Polster
fea65f7603
Merge pull request #17719 from Moisan/sandbox_process_signals
2024-07-14 13:38:38 -04:00
William Woodruff
a6e6837077
Merge pull request #17724 from Homebrew/ww/fix-local-bottles
2024-07-14 13:32:36 -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
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
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
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
Thierry Moisan
66a479be82
sandbox: deny signal to other processes
2024-07-14 11:21:51 -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 require
s
...
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
William Woodruff
92ef6ef763
Merge pull request #17708 from Homebrew/sandbox-chmod
2024-07-13 16:38:44 -04:00
Rylan Polster
e054a3ccf6
Also restrict SUID/GSID writes in sandbox
2024-07-13 16:28:17 -04:00
Thierry Moisan
74bb9fb193
Add test
2024-07-13 16:14:12 -04:00
Mike McQuaid
0f9ca1d627
Merge pull request #17699 from Homebrew/ww/rm-marshal-from-spec
2024-07-13 15:53:00 -04:00
Mike McQuaid
2ee6f29934
Merge pull request #17700 from Homebrew/filter-special-chars-from-sandbox
2024-07-13 15:52:33 -04:00
William Woodruff
419d4f7ab6
curl_spec: use deep_dup
...
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-13 15:36:34 -04:00
William Woodruff
695f080ba8
Revert "curl_spec: remove no-op Marshal use"
...
This reverts commit f3847d263f69a9a36e004c75c4969f939a66de3b.
2024-07-13 15:33:16 -04:00
William Woodruff
6cfe118ae3
attestation: don't dupe stderr
...
Silences `system_command!`'s own stderr handling,
since we do it independently.
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-13 15:30:21 -04:00
Rylan Polster
f4e5e0c716
Don't allow special characters in sandbox rule paths
...
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
2024-07-13 14:41:05 -04:00
William Woodruff
f3847d263f
curl_spec: remove no-op Marshal use
...
Signed-off-by: William Woodruff <william@yossarian.net>
2024-07-13 14:38:57 -04:00
Rylan Polster
8b0a4a98bf
Restrict direct url installs to the file://
scheme
2024-07-13 13:30:36 -04:00
Mike McQuaid
f39b5c1426
Merge pull request #17554 from Homebrew/cask-install-receipt
2024-07-13 10:55:06 -04:00
Issy Long
868c3dc9cd
Merge pull request #17680 from Homebrew/building-bottles-needs-network-for-sboms
2024-07-12 17:28:37 +01:00
Bo Anderson
ae9d5f9f14
cli/named_args: raise priority of core casks
2024-07-12 05:27:57 +01:00
Issy Long
d7123d43c7
test/dev-cmd/bottle: Mark the bottling test as needs_network
...
- I was on a plane and this failed with:
```
expected block to not output to stderr, but output
"curl: (6) Could not resolve host: spdx.github.io\nWarning: Failed to fetch SBOM schema, cannot perform SBOM validation!
Warning: Could not fetch JSON schema to validate SBOM!\nWarning: SBOM is not valid, not writing to disk!"
```
2024-07-11 21:16:14 -04:00
Rylan Polster
fec84544a9
Remove arch
and macos
dependencies from cask tab
2024-07-10 11:25:05 -04:00
Rylan Polster
fbe422b768
Fix test
2024-07-09 20:01:43 -04:00
Rylan Polster
d17da89382
Include recursive dependencies in cask tabs
2024-07-09 15:25:57 -04:00
Rylan Polster
119e02ceb0
Cleanup tap_git_head
and uninstall_flight_blocks?
...
Co-authored-by: Kevin <apainintheneck@gmail.com>
2024-07-09 13:22:00 -04:00
Rylan Polster
dd510a5606
Improve test coverage
2024-07-05 10:47:05 -04:00
Rylan Polster
e176159b23
Fix test
2024-07-04 12:27:45 -04:00
Rylan Polster
46cb7f2847
Update tests
2024-07-04 01:47:14 -04:00
Rylan Polster
c16a9b33b2
Use cached json API file for formulae and cask specified paths
2024-07-03 13:41:52 -04:00