6060 Commits

Author SHA1 Message Date
Carlo Cabrera
c51bb196d1
tests: update determine-test-runners tests
We've decoupled the macOS versions there from
`MacOSVersion#supported_release?`, so these tests need updating.
2024-09-11 20:20:08 +08:00
Rylan Polster
b1db0ee290
Rename load method when preferring installed casks 2024-09-10 13:54:12 -04:00
Rylan Polster
8cb62b1398
Set correct tap when loading installed casks 2024-09-10 13:34:40 -04:00
Mike McQuaid
c8e8aa5600
Merge pull request #17756 from reitermarkus/concurrent-downloads
Implement concurrent downloads in `brew fetch`.
2024-09-09 08:41:11 +01:00
Douglas Eichelberger
fedb868a8b Remove failing tests due to lack of needs_generic 2024-09-06 14:16:40 -07:00
Douglas Eichelberger
5d5daaa09f Use FormulaInstaller OS extensions 2024-09-06 13:58:32 -07:00
Markus Reiter
b297be77a1
Implement concurrent downloads. 2024-09-04 22:54:20 +02:00
Michael Cho
a618512d7a
formula_auditor: make deprecate license check non-strict in core
Also add some more incompatible licenses. These are all not allowed by
Fedora and have are classified as not OSI and FSF approved on SPDX.
2024-09-04 13:21:40 -04:00
Bo Anderson
d9a339b231
list.sh: improve arg parsing, support brew ls 2024-09-03 15:13:15 +01:00
Michael Cho
a548a81040
docs: remove references to deprecated/disabled GCC formulae 2024-09-02 12:03:06 -04:00
Mike McQuaid
638a3dc3a3
Merge pull request #18167 from Homebrew/fix-cask-formula-file-validation-v2 2024-08-29 08:50:44 +01:00
Michael Cho
06fc2247c7
Merge pull request #18178 from cho-m/github-tag
utils/shared_audits: GitHub urls can have '.' in repo and '/' in tag
2024-08-28 21:55:29 -04:00
Bo Anderson
6a0db5035f
Fix misuse of fork in sandbox causing crashes 2024-08-28 13:53:01 +01:00
Michael Cho
d1dc3b2206
utils/shared_audits: GitHub urls can have '.' in repo and '/' in tag 2024-08-27 11:39:50 -04:00
Mike McQuaid
81d26f8059
Merge pull request #18169 from cho-m/spdx-case-sensitive 2024-08-27 09:28:55 +01:00
apainintheneck
62a4734c90 tap: add tests for formula_file? and cask_file? 2024-08-27 00:36:23 -07:00
Michael Cho
cccab0d9a9
utils/shared_audits: allow subgroups in gitlab url 2024-08-26 23:07:31 -04:00
Michael Cho
82fbbcc88b
utils/spdx: fix invalid SPDX syntax for symbols
Also use more common uppercase operators for backwards compatibility
2024-08-26 13:55:37 -04:00
apainintheneck
cd430c4d34 cmd/update-report: improve formula file validation
Currently, ruby files that are not in the Cask directory are
considered to be formulae if a Formula or HomebrewFormula directory
doesn't exist  which doesn't make sense. We know that these should
only be in a few directories so we can check for that explicitly.

Beyond that the `Tap#cask_file?` and `Tap.formula_file?` methods
were only used inside update-report so it doesn't make sense to
turn them into pathnames and expand things when we know that
each string will be a relative path from a tap that we can just
check with a regex.

This change will stop other tap changes like new commands or
changes to other directories like lib/ from showing up as new formulae.

I tried opening a PR for this a long time ago but I got busy
with other things and it got closed by the stale bot.

- https://github.com/Homebrew/brew/pull/15489
2024-08-25 18:32:04 -07:00
Mike McQuaid
9ee471d42c
Merge pull request #18133 from FnControlOption/ls 2024-08-23 08:06:49 +01:00
fn ⌃ ⌥
9c79f2cc5c Fix test 2024-08-22 21:48:12 -07:00
Bo Anderson
f877fc5058
livecheck: remove module_function 2024-08-23 04:57:28 +01:00
Douglas Eichelberger
f4e04c8951 Make Cask::Artifact::Installer typesafe 2024-08-18 16:10:35 -07:00
Mike McQuaid
f719090446
Add a bunch more UNDEFINED_CONSTANTS for startup.
This should avoid these getting included globally in future.

I found this list from a combination of
https://github.com/Homebrew/brew/pull/17707/files, looking at the
Gemfile and just looking around myself.
2024-08-16 12:33:26 +01:00
apainintheneck
f6a6979711 Verify more constants are not loaded at startup
Loading different constants can be tricky with all the requires in
Homebrew so we want to strengthen the existing checks to make
sure that things are not getting required when there is a performance
penalty. This expands the existing check to include more constants
beyond `Formula` that we don't expect to be defined and that pull
in a lot of other dependencies.
2024-08-14 19:08:31 -07:00
Mike McQuaid
02d414d79b
Merge pull request #18008 from Homebrew/deprecate-old-style-cmds 2024-08-14 07:45:13 +01:00
Bevan Kay
dcce0584bd
Revert "Make Cask::Artifact::Installer typesafe" 2024-08-13 08:24:20 +10:00
Douglas Eichelberger
32107f2cb3
Merge pull request #18020 from Homebrew/installer-safety
Make Cask::Artifact::Installer typesafe
2024-08-12 13:35:21 -07:00
William Woodruff
09c12d817e
Revert "attestation: specialize error when gh is old" 2024-08-12 15:53:17 -04:00
William Woodruff
aafa81b3d9
Merge pull request #17926 from Homebrew/ww/gh-too-old 2024-08-12 15:28:36 -04:00
William Woodruff
be8ee6ea22
fixup attestation_spec
Signed-off-by: William Woodruff <william@yossarian.net>
2024-08-12 15:10:18 -04:00
Douglas Eichelberger
52b25d71f5 Make Cask::Artifact::Installer typesafe 2024-08-11 16:56:20 -07:00
apainintheneck
1fe16a5e35 Address feedback
- Move HOMEBREW_TAP_DIRECTORY to startup/config.rb because this file
holds more of the directory constants
- Rename `Commands.cmd_directories` to `Commands.tap_cmd_directories`
to better express that the commands come from taps

This file has the directory constants while the other one has regexes.
Just better organization.
2024-08-10 17:52:26 -07:00
apainintheneck
a3e917afe1 Refactor method to remove extra tap requires
We were selectively requiring the tap.rb file in a few places for
performance reasons. The main method we were referencing was the
`Tap.cmd_directories` method which uses `Pathname` and the `TAP_DIRECTORY`
constant internally. `Tap.cmd_directories` is mostly used in the `Commands`
module and that is loaded very early on in the program so it made sense
to move that command to that module. To facilitate that I moved the
`TAP_DIRECTORY` constant to the top-level and renamed it to
`HOMEBREW_TAP_DIRECTORY`. It now lies in the tap_constants.rb file.

A nice bonus of this refactor is that it speeds up loading external
commands since the tap.rb file is no longer required by default in
those cases.
2024-08-10 13:49:10 -07:00
Douglas Eichelberger
cefae82307 Fix tests 2024-08-10 11:20:53 -07:00
Markus Reiter
8e08a698d1
Merge pull request #17562 from reitermarkus/token-auditor
Share code between cask token and formula name audits.
2024-08-10 19:46:32 +02:00
Mike McQuaid
42a6b59de5
sbom: fix errors, improve reproducibility, tests.
- Remove/change data from bottle SBOM to avoid harming reproduciblity
- Add `schema_validation_errors` method to provide nicer test failures
- Add tests more tests for SBOM when bottling
- Cleanup SBOM tests to use more typical RSpec form and be DRYer
2024-08-08 09:34:32 +01:00
Bo Anderson
6b186f9874
Fix SBOM schema validation 2024-08-08 02:30:42 +01:00
Bo Anderson
040372fafa
Vendor SBOM schema 2024-08-07 18:00:53 +01:00
Patrick Linnane
5b8568defa
system_command_spec: specify exception
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-08-05 09:17:23 -07:00
Mike McQuaid
87fec6ca69
Merge pull request #17940 from HaraldNordgren/cask_deps 2024-08-05 13:53:04 +01:00
Mike McQuaid
1e560120a6
Merge pull request #17867 from branchvincent/std_npm_args 2024-08-05 08:52:07 +01:00
Issy Long
cb8769c2a0
rubocops/text: Allow bin interpolation inside word arrays
- We discovered that the following syntax in the formula `sqlsmith`
  should actually be OK because the `\n` is like whitespace.

```ruby
cmd = %W[
  #{bin}/sqlsmith
  --threads=4
  --timeout=10
]
shell_output(cmd)
```
2024-08-04 23:45:34 +01:00
Branch Vincent
1771bf1bbb
rubocops/lines: audit std_npm_args usage 2024-08-03 20:28:38 -07:00
Harald Nordgren
7cf5c2cdd9 Show dependencies for casks 2024-08-03 20:25:13 +02:00
Issy Long
7bf7030db8
Add autocorrection for the interpolated bin audit
- I got bored doing them manually.
- Also now more people can help with letters of the alphabet using `brew style --only=FormulaAuditStrict/Text --fix homebrew/core`.
2024-08-01 22:41:04 +01:00
Issy Long
0872966c27
Avoid double parentheses for eg. (path/here/).rmtree corrections 2024-08-01 18:28:01 +01:00
Issy Long
7404735654
rubocops/no_fileutils_rmrf: Fix rmtree on a method returning Pathname
- Tidy up the node matchers. Either `FileUtils.rm_rf` or `rm_rf` on a
  `Pathname` instance or `self`.
2024-08-01 18:28:01 +01:00
Issy Long
83e21fba11
rubocop/no_fileutils_rmrf: Handle rmtree as an instance method 2024-08-01 18:28:00 +01:00
Issy Long
0889df837a
Casks use FileUtils.rm_rf & Pathname.rmtree still 2024-08-01 18:28:00 +01:00