29091 Commits

Author SHA1 Message Date
Valentin Kulesh
06155ff6e0
Work around recent Akamai/Microsoft issues
At the moment, Microsoft Office and related casks fail audit due to
failure to fetch a product homepage from the main Microsoft site
(https://www.microsoft.com/) served by Akamai CDN.
The failure is severe and weird: no status code is received as the
connection is reset.
The analysis revealed the issue is linked to `User-Agent` and
`Accept-Language` headers parsing. Homebrew uses involved user agent
strings and has language hardcoded as `en`.
The simplest workaround is to use a simple user agent string when checking
homepage availability if the cask is in an audit exceptions list.

Merging this would fix Microsoft Office updates (including
https://github.com/Homebrew/homebrew-cask/pull/162671)
2023-12-16 22:20:17 +03:00
Sam Ford
4a4f8cb2d2
FormulaAuditor: Add #committed_version_info method
The `#audit_stable_version` check was previously part of
`#audit_revision_and_version_scheme` and duplicates some of the
logic to identify previous version information. To avoid the
duplication, this extracts the logic into a `#committed_version_info`
method that can be called in both audits. The method stores the
information in instance variables, so we don't repeat the collection
process if it has already run.
2023-12-15 17:29:32 -05:00
Sam Ford
ccbde5952d
FormulaAuditor: Separate stable version audit
The "stable version should not decrease" formula audit currently
prevents us from being able to create bottles when downgrading a
formula version. We previously worked around this by bumping
`version_scheme` but this wasn't an intended use case and we now
avoid using it for this purpose.

We can handle simple formula downgrades by reverting changes in a
syntax-only PR but that isn't sufficient when we need new bottles
(i.e., if additional changes have been made to the formula in the
interim time). In the latter case, the only available solution may be
to revert all changes made after the previous version using a
syntax-only PR and then create another PR to reintroduce the other
changes and create new bottles.

To avoid the aforementioned approach, this splits the stable version
audit into a separate method, so we can use `brew audit
--except=stable_version` to selectively skip it.
2023-12-15 17:27:01 -05:00
Bo Anderson
93865bf53e
Gemfile: remove ruby-prof bound 2023-12-15 19:24:05 +00:00
BrewTestBot
f555f1ec21
Update RBI files for ruby-prof.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-12-15 19:00:10 +00:00
BrewTestBot
d3d46a57e6
brew vendor-gems: commit updates. 2023-12-15 18:54:36 +00:00
dependabot[bot]
a94fcd4923
build(deps-dev): bump ruby-prof from 1.4.3 to 1.6.3 in /Library/Homebrew
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.3 to 1.6.3.
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.4.3...1.6.3)

---
updated-dependencies:
- dependency-name: ruby-prof
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 18:51:14 +00:00
Bo Anderson
89531e9ff3
Update all dependencies 2023-12-15 16:24:46 +00:00
Issy Long
de592af20b
rubocop: Set TargetRubyVersion to 3.1 & disable all cops that fail
- As discussed in
  https://github.com/Homebrew/brew/pull/16337#issuecomment-1855668516,
  then we won't have the chicken/egg problem of fixing cops for syntax
  that's unsupported on Ruby 2.6 _before_ we set the TargetRubyVersion
  to 3.1, but if we set it too early then all the taps will fail.
2023-12-14 23:19:43 +00:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
Mike McQuaid
fbd3d4e48a
cmd/untap: be more careful about formula tap.
`Formula#any_version_installed?` doesn't consider taps so we need to
manually check the tabs from the kegs instead.

See https://github.com/Homebrew/brew/pull/16330#issuecomment-1854007492
onwards for relevant discussion.
2023-12-13 15:24:37 +00:00
Mike McQuaid
bd378a7b25
Merge pull request #16330 from MikeMcQuaid/untap_exceptions
cmd/untap: fix untapping syntax failure.
2023-12-13 14:09:44 +00:00
Mike McQuaid
beb9799265
cmd/untap: fix untapping syntax failure.
If an installed cask is invalid on attempting an untap: it will
prevent untapping that cask.

Fix this in two ways: one more specific to `untap` and one more
generally to other commands too:
- specific: only read the actual formulae/casks from the tap we're
  untapping instead of all of those that are installed
- general: rescue more exceptions in `Cask::Caskroom.casks` (like we
  already do for `Formula.installed`
2023-12-13 13:54:37 +00:00
Mike McQuaid
79a6091d08
Cask#full_name: properly output Homebrew org names
This was not returning the full name correctly for e.g. anything in
Homebrew/homebrew-fonts.

While we're here, fix up a few other places where `tap.core_cask_tap?`
can be used more appropriately.
2023-12-13 13:17:12 +00:00
Mike McQuaid
cd8a9c02cb
Merge pull request #16301 from apainintheneck/update-pinned-formula-messaging
cmd/pin: Update pinned formula messaging
2023-12-13 12:17:21 +00:00
Mike McQuaid
d0da6bdf7c
cmd/upgrade: deprecate --ignore-pinned. 2023-12-13 12:03:54 +00:00
apainintheneck
9a00f2795d cmd/upgrade: Error when attempting to explicitly upgrade a pinned pkg
The idea here is that it should be expected that `brew upgrade` will
not upgrade pinned packages but will attempt to upgrade everything else.
For that reason, it will only show a warning about pinned packages
in that case.

If, on the other hand, you pass the name of a pinned package explicitly
to the upgrade command, like in `brew upgrade PINNED`, we want to show
an error since we cannot upgrade that package until it gets unpinned.
2023-12-13 00:15:00 -08:00
BrewTestBot
4d1322ad72
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-12-13 00:30:39 +00:00
Douglas Eichelberger
4c96eaf56f
Update gems.rb 2023-12-12 13:39:29 -08:00
Douglas Eichelberger
0ce84387fd Also remove Hash#slice! 2023-12-12 10:41:47 -08:00
Douglas Eichelberger
4a062b117c Rename block var 2023-12-12 10:19:58 -08:00
Douglas Eichelberger
7ebee52614 Remove monkey-patched Hash#except 2023-12-12 10:12:01 -08:00
Douglas Eichelberger
e8d87fe256 Strict type livecheck/livecheck 2023-12-12 10:10:18 -08:00
Douglas Eichelberger
c75fc63d61 refactor out except! calls 2023-12-12 10:09:49 -08:00
Bo Anderson
b3064d16c1
Merge pull request #16311 from Homebrew/dependabot/bundler/Library/Homebrew/addressable-2.8.6
build(deps): bump addressable from 2.8.5 to 2.8.6 in /Library/Homebrew
2023-12-12 16:41:22 +00:00
Bo Anderson
6938fb7781
Merge pull request #16316 from Bo98/goodbye-ruby-2.6
Sayonara Ruby 2.6
2023-12-12 16:15:27 +00:00
Bo Anderson
cd4a2862de
Merge pull request #16313 from Bo98/goodbye-2.6-gems
Remove vendored Ruby 2.6 gems
2023-12-12 16:14:04 +00:00
Ryuhei Yoshida
64fc295e38 :completions: Add brew-bundle-list 2023-12-12 16:07:37 +09:00
Ryuhei Yoshida
1029549b6a :completions: Add brew-bundle-install 2023-12-12 16:07:37 +09:00
Bo Anderson
688d87e839
Remove Ruby 2.6 & macOS system Ruby support code 2023-12-12 03:44:31 +00:00
BrewTestBot
73788ddab0
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-12-12 00:31:36 +00:00
Eric Knibbe
77c23df526
dependency: disable renamed formula warning 2023-12-11 14:14:52 -05:00
Bo Anderson
0bc2028c44
Remove vendored Ruby 2.6 gems 2023-12-11 16:30:01 +00:00
Bo Anderson
5ee6e967da
Merge pull request #16306 from Bo98/4.2.0-deprecations
Deprecate, disable & delete code for Homebrew 4.2.0
2023-12-11 15:44:00 +00:00
Bo Anderson
df979295a9
Merge pull request #16294 from Bo98/ruby-3.1-minimum
Require Ruby 3.1
2023-12-11 15:42:29 +00:00
Mike McQuaid
cf8681247f
Merge pull request #16307 from Bo98/no-stderr-silence
cmd/vendor-install: don't silence stderr
2023-12-11 15:32:07 +00:00
BrewTestBot
738839cf1b
Update RBI files for addressable.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-12-10 17:57:45 +00:00
BrewTestBot
ce78f52163
brew vendor-gems: commit updates. 2023-12-10 17:51:03 +00:00
dependabot[bot]
e7eb1858a9
build(deps): bump addressable from 2.8.5 to 2.8.6 in /Library/Homebrew
---
updated-dependencies:
- dependency-name: addressable
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-10 17:48:15 +00:00
apainintheneck
b3a6e59f96 cmd/pin: Update pinned formula messaging
The hope is that this will be clearer and less annoying for users.

A user came to us a couple weeks ago stating that it was confusing
that the `brew upgrade` command printed an error when a pinned
formula had a new version available and didn't get upgraded.

This PR changes that message to a warning from an error. While looking
into this we found that there is another message that gets printed
when a package dependency doesn't get upgraded because it is pinned
and that got turned into a warning from a normal message. Honestly,
that should be more worrying for the user anyway; it could lead to
a program not working correctly in the worst case.

I also added a message to the `brew pin` command warning about
potential unintended behavior if a dependency gets pinned and another
package requires a newer version of it.

Lastly, I added a commented out deprecation notice for the
`brew upgrade --ignore-pinned` command since it's now the default.
2023-12-07 23:43:02 -08:00
Bo Anderson
7ba5480dff
cmd/vendor-install: don't silence stderr 2023-12-08 00:10:56 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Bo Anderson
03b6a83135
utils/service: assume no service system during generic OS tests 2023-12-07 20:58:01 +00:00
Mike McQuaid
8b984114b1
Merge pull request #16305 from Bo98/pour_bottle-api
Partially support `pour_bottle?` in API
2023-12-07 15:36:00 -05:00
Mike McQuaid
cd6f3fe56d
Merge pull request #16303 from Bo98/test-fixes
test: fix a couple failures on certain systems
2023-12-07 15:34:49 -05:00
Bo Anderson
fe011ca0f9
Partially support pour_bottle? in API 2023-12-07 18:05:41 +00:00
Bo Anderson
246a73b644
test: fix a couple failures on certain systems 2023-12-07 03:12:22 +00:00
Mike McQuaid
ecb302c618
Merge pull request #16297 from reitermarkus/deprecate-new-formula-new-cask
Deprecate `--new-formula`/`--new-cask` options.
2023-12-06 15:27:14 -05:00
Markus Reiter
0a4d10ba89
Deprecate --new-formula/--new-cask options. 2023-12-06 16:18:26 +01:00
Bo Anderson
a92a36d027
Lazy load Debrew
Fixes terminfo error on some environments
2023-12-06 00:01:25 +00:00