33976 Commits

Author SHA1 Message Date
Bo Anderson
ccdf39ff4e
dev-cmd/tap-new: improve handling of multi-user setups 2024-12-10 05:24:10 +00:00
Mike McQuaid
ad356d3658
Merge pull request #18903 from Homebrew/livecheck/pypi-handle-regex
Pypi: Restore regex support
2024-12-09 09:11:29 +00:00
apainintheneck
ebede56314 cask/artifact/abstract_uninstall: handle sudo trashed paths correctly
This showed a confusing message when the trash path was able to be
deleted using sudo since the untrashable array was updated but
the check was higher up for returning early.

```
==> Trashing files:
/Users/Shared/Maxon
/Users/Shared/Red Giant
~/Library/Application Support/Maxon
~/Library/Application Support/Red Giant
~/Library/Caches/net.maxon.app-manager
~/Library/Preferences/Maxon
~/Library/Preferences/net.maxon.app-manager.plist
~/Library/Saved Application State/net.maxon.app-manager.savedState
==> Using sudo to gain ownership of path '/Users/Shared/Maxon'
==> Using sudo to gain ownership of path '/Users/Shared/Red Giant'
Warning: The following files could not be trashed, please do so manually:
==> Removing all staged versions of Cask 'maxon'
```

The warning about files not getting trashed should only be shown if
some files didn't get trashed.

Fixes https://github.com/Homebrew/brew/issues/18901
2024-12-08 15:53:59 -08:00
Sam Ford
270313f649
Pypi: Restore regex support
We recently updated the `Pypi` strategy to use the PyPI JSON API and
the default strategy behavior no longer relies on a regex, so the initial implementation didn't include regex handling. This restores
support for a `livecheck` block regex by updating the `DEFAULT_BLOCK`
logic to handle an optional regex. This allows us to use a regex to
omit parts of the `info.version` value without having to duplicate
the default block logic in a `strategy` block only to use a regex.

This isn't currently necessary for any existing formulae using the
`Pypi` strategy but we have a few that needed a custom regex with
the previous strategy approach, so they may need this functionality
in the future. Besides that, restoring regex support to `Pypi`
ensures that `livecheck`/`strategy` blocks work in a fairly
consistent manner across strategies.
2024-12-08 14:29:44 -05:00
Sam Ford
08c927b6a1
Json: Allow nil regex block argument
This updates the block-handling logic in `Json::versions_from_content`
to naively pass the regex value when the block has two parameters. Up
to now, we have been ensuring that `regex` is not `nil` and this
makes sense with existing usage (the `Crate` strategy's default
block, formulae/cask `strategy` blocks). However, we need to allow a
`nil` `regex` value to make it possible to add an optional `regex`
parameter in the `Pypi::DEFAULT_BLOCK` Proc. This is necessary to
allow the `Pypi` strategy to work with an optional regex from a
`livecheck` block again [without creating an additional
`DEFAULT_BLOCK` variant with a regex parameter].
2024-12-08 14:29:44 -05:00
Douglas Eichelberger
8fa9b72a96
Merge pull request #18902 from Homebrew/cli-cleanup 2024-12-08 08:40:04 -08:00
Sam Ford
b13a4c5dbb
Merge pull request #18895 from chenrui333/update-to-use-json-endpoint
fix(livecheck/pypi): update to use json endpoint to query version
2024-12-07 23:23:01 -05:00
Sam Ford
ac4854ef9e
Pypi: Expand test coverage
Among other things, the previous commit added a `provided_content`
paramter to `Pypi::find_versions`, so this takes advantage of that to
expand `Pypi` test coverage to 100%.
2024-12-07 20:44:56 -05:00
Sam Ford
935eb89eca
Pypi: Rework to use Json::find_versions
This reworks the new `Pypi` JSON API implementation to use
`Json::find_versions` in `Pypi::find_versions`, borrowing some of the
approach from the `Crate` strategy.

Besides that, this pares down the fields in the
`::generate_input_values` return hash to only `:url`, as we're not
using a generated regex to match version information in this setup.

This adds a `provided_content` parameter to `::find_versions` as part
of this process and I will expand the `Pypi` tests to increase
coverage (like the `Crates` tests) in a later PR. 75% of `Pypi` checks
are failing at the moment (with some returning inaccurate version
information), so the current priority is getting this fix merged in
the short-term.
2024-12-07 20:40:55 -05:00
Ruoyu Zhong
8896086cb1
Merge pull request #18897 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11690
build(deps-dev): bump sorbet from 0.5.11685 to 0.5.11690 in /Library/Homebrew
2024-12-08 03:19:28 +08:00
BrewTestBot
103e371fec
brew vendor-gems: commit updates. 2024-12-07 19:09:57 +00:00
apainintheneck
9567d57e39 Add missing utils/service require
This was originally added in https://github.com/Homebrew/brew/pull/18865.

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
/usr/local/Homebrew/Library/Homebrew/service.rb:458:in `block in to_systemd_unit': uninitialized constant Utils::Service (NameError)
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `map'
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `to_systemd_unit'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `bind_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `validate_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
        from -e:1:in `<main>'
```

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
"[Unit]\nDescription=Homebrew generated unit for activemq\n\n[Install]\nWantedBy=default.target\n\n[Service]\nType=simple\nExecStart=\"/usr/local/opt/activemq/bin/activemq\" \"console\"\nWorkingDirectory=/usr/local/opt/activemq/libexec\n"
```
2024-12-07 10:35:33 -08:00
dependabot[bot]
895f130c2d
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11685 to 0.5.11690.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 17:17:01 +00:00
Douglas Eichelberger
06aaeafa4f Minor CLI code improvements 2024-12-07 08:09:15 -08:00
Rui Chen
d49e01b82b
fix(livecheck/pypi): update to use json endpoint to query version
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-12-07 02:00:18 -05:00
Ruoyu Zhong
405cedad23
Merge pull request #18893 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11685
build(deps-dev): bump sorbet from 0.5.11681 to 0.5.11685 in /Library/Homebrew
2024-12-07 10:35:36 +08:00
BrewTestBot
d341e71977
brew vendor-gems: commit updates. 2024-12-06 20:43:08 +00:00
dependabot[bot]
a3ab824e84
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11681 to 0.5.11685.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 20:35:34 +00:00
Douglas Eichelberger
e2d10337f3 Fix alias_name logic 2024-12-06 11:25:51 -08:00
Douglas Eichelberger
9a2b386a52 Remove unsafe references from CLI and Formulary code 2024-12-06 11:06:27 -08:00
Eric Knibbe
a5c0b44c68
update-maintainers: ignore accents when sorting names 2024-12-06 09:22:05 -05:00
Ruoyu Zhong
64edbe6b79
os/mac/hardware/cpu: add M4 Pro/Max
Sources:
- https://github.com/AsahiLinux/docs/wiki/Codenames
- MacOSX15.2.sdk from Xcode 15.2 RC
2024-12-06 16:06:09 +08:00
William Woodruff
057a6c5f9b
add multi subject test
Signed-off-by: William Woodruff <william@yossarian.net>
2024-12-05 14:26:30 -05:00
William Woodruff
9e82563a3a
document the version that causes problems here
Signed-off-by: William Woodruff <william@yossarian.net>
2024-12-05 14:16:30 -05:00
William Woodruff
e5d47f85c9
attestation: handle multiple subjects
This should fix the behavior observed in
https://github.com/Homebrew/homebrew-core/issues/177384#issuecomment-2521141910
and below.

Signed-off-by: William Woodruff <william@yossarian.net>
2024-12-05 14:11:00 -05:00
Patrick Linnane
eb2350901d
Merge pull request #18880 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11681
build(deps-dev): bump sorbet from 0.5.11678 to 0.5.11681 in /Library/Homebrew
2024-12-05 10:54:46 -08:00
BrewTestBot
2bebe8da80
brew vendor-gems: commit updates. 2024-12-05 18:39:45 +00:00
BrewTestBot
10aa6bc977
Update RBI files for rbs.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-05 18:38:11 +00:00
BrewTestBot
41e2daad8e
brew vendor-gems: commit updates. 2024-12-05 18:38:01 +00:00
dependabot[bot]
d476033f09
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11678 to 0.5.11681.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-05 18:37:34 +00:00
dependabot[bot]
291e02bf9e
build(deps-dev): bump rbs from 3.6.1 to 3.7.0 in /Library/Homebrew
Bumps [rbs](https://github.com/ruby/rbs) from 3.6.1 to 3.7.0.
- [Release notes](https://github.com/ruby/rbs/releases)
- [Changelog](https://github.com/ruby/rbs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby/rbs/compare/v3.6.1...v3.7.0)

---
updated-dependencies:
- dependency-name: rbs
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-05 18:36:50 +00:00
Mike McQuaid
84225d0120
pkg_version: make typed: strict
This required:
- adding signatures/types where missing
- ensuring that we respect the signature of `Version.new`
- remove some non-Sorbet type checks
- fixing the exception in tests
- removing some tests now caught by Sorbet
- fixing `Formula#prefix` so it works as intended with correct type
  usage
2024-12-05 14:01:37 +00:00
Patrick Linnane
2ee13fa122
Merge pull request #18872 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11678
build(deps-dev): bump sorbet from 0.5.11672 to 0.5.11678 in /Library/Homebrew
2024-12-04 08:54:23 -08:00
Patrick Linnane
7d703b706b
Merge pull request #18870 from Homebrew/dependabot/bundler/Library/Homebrew/minitest-5.25.4
build(deps-dev): bump minitest from 5.25.2 to 5.25.4 in /Library/Homebrew
2024-12-04 08:51:40 -08:00
Douglas Eichelberger
ad70bcbbe0
Merge pull request #18867 from Homebrew/typed-named-args
Enable strict typing in NamedArgs
2024-12-04 08:49:46 -08:00
BrewTestBot
214d363c48
brew vendor-gems: commit updates. 2024-12-04 16:41:53 +00:00
BrewTestBot
96e36b177e
Update RBI files for minitest.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-04 16:40:37 +00:00
BrewTestBot
b95fe2bc6e
brew vendor-gems: commit updates. 2024-12-04 16:40:30 +00:00
dependabot[bot]
99b46bc38a
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11672 to 0.5.11678.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-04 16:39:56 +00:00
dependabot[bot]
811536aac7
build(deps-dev): bump minitest in /Library/Homebrew
Bumps [minitest](https://github.com/minitest/minitest) from 5.25.2 to 5.25.4.
- [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc)
- [Commits](https://github.com/minitest/minitest/compare/v5.25.2...v5.25.4)

---
updated-dependencies:
- dependency-name: minitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-04 16:39:12 +00:00
Douglas Eichelberger
90d066c7b8 Tidy up layout 2024-12-04 08:00:32 -08:00
Ruoyu Zhong
36d06c5075
Merge remote-tracking branch 'origin/master' into systemd-quote 2024-12-04 18:01:10 +08:00
Mike McQuaid
8b7c074b6b
Merge pull request #18864 from Homebrew/systemd-new-line
service: end systemd configs with a new line
2024-12-04 09:24:09 +00:00
George L. Yermulnik
75b37366d3 feat: Add Bash completion for Homebrew aliases
Add Bash completion support for Homebrew aliases:
https://github.com/Homebrew/homebrew-aliases

Unfortunately I'm not familiar enough neither with Ruby, nor with Fish/Zsh 🤷🏻

Fixes https://github.com/Homebrew/homebrew-aliases/issues/91
2024-12-03 23:48:50 -05:00
Douglas Eichelberger
e1fdd2eda4 Enable strict typing in NamedArgs 2024-12-03 17:43:22 -08:00
Ruoyu Zhong
4f03c10fa3
Merge pull request #18859 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.69.1
build(deps-dev): bump rubocop from 1.69.0 to 1.69.1 in /Library/Homebrew
2024-12-04 03:25:10 +08:00
Ruoyu Zhong
ff822bfab5
Merge pull request #18861 from Homebrew/dependabot/bundler/Library/Homebrew/rspec-support-3.13.2
build(deps-dev): bump rspec-support from 3.13.1 to 3.13.2 in /Library/Homebrew
2024-12-04 03:22:15 +08:00
Ruoyu Zhong
109356a692
Merge pull request #18860 from Homebrew/dependabot/bundler/Library/Homebrew/json-2.9.0
build(deps-dev): bump json from 2.8.2 to 2.9.0 in /Library/Homebrew
2024-12-04 03:21:05 +08:00
Ruoyu Zhong
a8a6a5bdb7
utils/service: simplify 2024-12-04 03:09:11 +08:00
BrewTestBot
1597e027e4
Update RBI files for rspec-support.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-03 19:04:50 +00:00