38364 Commits

Author SHA1 Message Date
Alexander Bayandin
27902f0284
Merge pull request #15948 from bayandin/shard-audit
audit_file: check formula path
2023-09-04 19:39:55 +01:00
Bo Anderson
5de703e784
Merge pull request #15951 from Homebrew/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2023-09-04 19:36:23 +01:00
Bo Anderson
7f877f1386
Merge pull request #15950 from Bo98/symlink-fix
vendor/gems: remove bad symlink
2023-09-04 19:27:24 +01:00
dependabot[bot]
39d07d2159
build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 18:22:16 +00:00
Bo Anderson
557245015c
vendor/gems: remove bad symlink 2023-09-04 19:04:45 +01:00
Mike McQuaid
bf52ef7099
Merge pull request #15949 from MikeMcQuaid/fetch_bottle_tab_error_handling
formula_installer: handle another exception in fetch_bottle_tab.
2023-09-04 12:49:39 -04:00
Mike McQuaid
3aba32a68b
formula_installer: handle another exception in fetch_bottle_tab.
Fix another way that fetching a bottle tab can fail. This pretty much
only happens in CI.

Addresses https://github.com/Homebrew/homebrew-core/pull/141362#issuecomment-1705327027
2023-09-04 12:33:21 -04:00
Alexander Bayandin
b7cb8356c1
audit_file: fix condition
Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-09-04 14:35:59 +01:00
Alexander Bayandin
de8eb35b73 audit_file: check formula path 2023-09-04 14:26:59 +01:00
Bo Anderson
66eb266038
Merge pull request #15947 from gibfahn/sorbet_cask_url
cask/url: accept Class for using in Cask::URL#initialize
4.1.8
2023-09-04 13:14:00 +01:00
Gibson Fahnestock
b4feaf27d9
cask/url: accept Class for using in Cask::URL#initialize
https://github.com/Homebrew/brew/pull/15754 fixed
`Cask::URL::DSL#initialize`, but we also need to fix
`Cask::URL#initialize` as that takes the same parameters.

Error:

```
Error: Cask 'mycask' definition is invalid: 'url' stanza failed
  with: Parameter 'using': Expected type T.nilable(Symbol), got type Class
  with value MyCustomDownloadStrategy
Caller:
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/sorbet-runtime-0.5.10461/lib/types/private/methods/call_validation.rb:113
```

Refs: https://github.com/Homebrew/brew/issues/15750
2023-09-04 08:46:22 +01:00
Sam Ford
88109b16c3
Livecheck#preprocess_url: compare with URI host
We now have a `gitea` formula in homebrew/core and its `stable` URL
uses a dl.gitea.com tarball. Since the URL's domain is gitea.com,
livecheck tries to preprocess the URL into a `.git` URL but the
resulting URL doesn't work because it's not a Git repository.

Gitea repositories use gitea.com (with no subdomain), so
`#preprocess_url` should be comparing the URI host (`dl.gitea.com`)
instead of the domain (`gitea.com`). This change allows gitea.com
repository URLs to continue to be preprocessed into a `.git` URL
while dl.gitea.com URLs are left untouched.

This makes the same change for the other domains, as they don't use
a subdomain either.
2023-09-04 00:49:23 -04:00
Mike McQuaid
b53508897b
Merge pull request #15927 from MikeMcQuaid/liberal_upgrade_bottle_version
Make formula upgrades more liberal based on bottle
2023-09-03 15:28:31 -04:00
Mike McQuaid
8a2a16d521
WIP 2023-09-03 15:07:48 -04:00
Mike McQuaid
9fcdaa2b85
Make formula upgrades more liberal based on bottle
When we're installing a formula from a bottle, we currently always
upgrade all dependencies in the dependency tree to be safe.

However, if we're installing a bottle and the `runtime_dependencies`
within that bottle's tab all have older or equal versions to those
already installed: we do not need to upgrade these dependencies.

This should help a lot of upgrading a lot of the time, at least for
users using bottles (which is the huge majority).

The only downside or other noticeable change is that this requires us
to download or attempt to download the bottle tab before we compute
the dependencies at installation time.

Co-authored-by: Kevin <apainintheneck@gmail.com>
2023-09-03 15:07:48 -04:00
Mike McQuaid
fc72dfc6ca
Merge pull request #15935 from MikeMcQuaid/api_curl_args
api: use `Utils::Curl.curl_args`
2023-09-03 09:31:49 -04:00
Mike McQuaid
4ad5321d03
Merge pull request #15937 from MikeMcQuaid/cleanup_todo
Cleanup various TODOs
2023-09-03 09:29:03 -04:00
Mike McQuaid
db1267bdff
Merge pull request #15943 from apainintheneck/handle-nil-urls-in-cask-installer
Handle nil cask urls caused by unsupported macOS version
2023-09-03 09:23:08 -04:00
Mike McQuaid
a1269fcbfc
Merge pull request #15941 from MikeMcQuaid/audit_gcc_dependency_not_strict
formula_auditor: make Linux-only GCC dep audit non-strict.
2023-09-03 09:13:58 -04:00
Mike McQuaid
f73607553c
Cleanup various TODOs
These were also easily fixed, already fixed or incorrect and
non-controversial.

Co-authored-by: Issy Long <issyl0@github.com>
2023-09-03 09:12:41 -04:00
Mike McQuaid
8ba389817f
api: retry manually without curl_args defaults.
Co-authored-by: Kevin <apainintheneck@gmail.com>
2023-09-03 09:10:25 -04:00
Mike McQuaid
dbc4406e02
Merge pull request #15938 from MikeMcQuaid/sonoma_rosetta_2_bottles
os/mac/hardware: remove TODO.
2023-09-03 09:09:56 -04:00
Mike McQuaid
daa175e760
cask/installer: remove outdated comment. 2023-09-03 09:09:14 -04:00
apainintheneck
8c2f101138 cmd/fetch: handle nil cask urls
These urls can be nil if there is an unsatisfied macos version
requirement. We check for false here because either the macos
requirement can be satisfied and return true or can not be
specified and return nil. If it's not specified, it means it
can run on any macos version.

The change in Cask::Download should provide better error messages
in Downloadable but honestly we're better off just checking for
the missing url higher up the call stack which is why I made
the changes in the fetch command. Either way it seemed like
a good idea while I'm here.
2023-09-02 20:56:55 -07:00
apainintheneck
51387287f7 Handle nil urls in cask installer and API cask loader
The goal here is to handle the case where a cask might have a nil
url stanza because that cask is not available on the current version
of macOS or the given architecture. This just moves those checks
from the end of the `Cask::Installer#fetch` method to the beginning
so that we don't try and download casks that are missing urls.

This will now provide a helpful error message like so:
```
Error: This software does not run on macOS versions older than Big Sur.
```

Beyond that it no longer tries to run the url stanza with a nil value
when loading casks from the API.
2023-09-02 20:56:36 -07:00
Mike McQuaid
b594e87a7f
formula_auditor: make Linux-only GCC dep audit non-strict.
Otherwise we have to run this separately in `brew test-bot` which is
slower and more confusing.
2023-09-02 21:39:16 -04:00
Mike McQuaid
f30788018c
os/mac/hardware: remove TODO.
As discussed in #15938, this TODO can pretty much never be done so
doesn't make sense to leave as-is.
2023-09-02 21:36:27 -04:00
Mike McQuaid
d5a1f3e02c
api: use Utils::Curl.curl_args
This sets user-agent nicely and avoids some duplication.
2023-09-02 21:31:01 -04:00
Issy Long
5d2ae98d0c
Add an audit for mismatched Python resource and PyPi package names
- Issue 14537.
- When people manually add or modify PyPI resources the `Resource#name`
  sometimes ends up out-of-sync with the PyPI package name.
2023-09-03 00:44:24 +01:00
Mike McQuaid
e7d0625776
Merge pull request #15939 from MikeMcQuaid/sorbet_dev_cmd 2023-09-02 18:29:22 -04:00
Mike McQuaid
8775465872
Enable Sorbet after running a developer command
We have no commands with Sorbet disabled and have had Sorbet enabled
for developers for a decent amount of time. As a result, we can enable
it for everyone who has run a developer command.

This also allows a bunch of `raise TypeError`s to be removed in favour
of relying on Sorbet here instead.
2023-09-02 08:39:28 -04:00
Mike McQuaid
9b76182c11
Merge pull request #15933 from EricFromCanada/docs-cask-cookbook-reorg
docs: rework Cask-Cookbook to match current practice
2023-09-02 08:06:31 -04:00
Mike McQuaid
f71e09251f
Merge pull request #15934 from hyuraku/remove-ARGV-from-Formula.all
remove `ARGV` from `Formula#all`
2023-09-02 08:05:34 -04:00
Mike McQuaid
9a6a3e888f
Merge pull request #15931 from Homebrew/sponsors-maintainers-man-completions 2023-09-02 12:02:20 +01:00
hyuraku
adc2a2fea1 remove ARGV from Formula#all 2023-09-02 19:35:22 +09:00
Eric Knibbe
4205cb495a
docs: rework Cask-Cookbook to match current practice
and migrate `livecheck` stanza documentation to Brew-Livecheck.md
2023-09-02 00:43:51 -04:00
BrewTestBot
26bdacee6a
Update sponsors.
Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow.
2023-09-02 00:05:26 +00:00
Issy Long
de50e84184
Merge pull request #15930 from issyl0/markdown-numbering
docs: Use Markdown automatic numbering in staging branch instructions
2023-09-02 00:51:10 +01:00
Issy Long
68bccb9bbb
docs: Use Markdown automatic numbering in staging branch instructions
- It's always a pain to re-number everything when adding or removing
  steps, so let's use the Markdown numbering trick.
- This does render correctly in HTML, I tested building the site.
2023-09-02 00:30:38 +01:00
Eric Knibbe
4b3cb6d2e7
Merge pull request #15929 from EricFromCanada/docs-bot-images
Docs: update test-bot images and description
2023-09-01 19:13:37 -04:00
Eric Knibbe
10b06d9826
Docs: update test-bot images and description 2023-09-01 13:24:12 -04:00
Mike McQuaid
ec9bb2fe68
Merge pull request #15926 from EricFromCanada/docs-faq-images
Docs: localize FAQ images
2023-09-01 08:59:33 +01:00
Eric Knibbe
217ebf88c7
remove OSDN link due to site unreliability 2023-09-01 00:27:05 -04:00
Eric Knibbe
23f656bf8c
docs: localize FAQ images 2023-09-01 00:21:44 -04:00
Issy Long
04ef90a59d
Merge pull request #15924 from issyl0/docs-ci-broken-links
workflows/docs: Check for broken links using the existing `rake test` task
2023-09-01 04:39:37 +01:00
Issy Long
210b678caf
The test task already runs build, so no need for it twice 2023-09-01 01:12:34 +01:00
Issy Long
1c91da27bb
The Python Setuptools docs have moved around too, the reference no longer exists 2023-09-01 01:02:05 +01:00
Issy Long
ee7ff97877
Fix link to renamed Cask Cookbook section 2023-09-01 01:02:04 +01:00
Issy Long
484c7e07d1
Cache the external links for an hour, and ignore GitHub.com 2023-09-01 01:02:03 +01:00
Issy Long
17de29e93d
Disable HTMLProofer's assume_extension option
- It reports a lot of broken internal links that do actually exist, it's
  just file extension inference weirdness.
2023-09-01 01:02:02 +01:00