35 Commits

Author SHA1 Message Date
Bo Anderson
fed5321969
Rename aarch64_linux tag to arm64_linux 2025-02-01 13:03:58 +01:00
Markus Reiter
e3a102efd4
Make Tap::new private. 2024-03-06 15:10:14 +01:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Arian Faurtosh
9088cf9be0 Fixes openjdk_dep_name_if_applicable when not using CurlGitHubPackagesDownloadStrategy
When installing a formula, `FormulaInstaller` calls `#pour`, which in turn calls:

6f20c0300a/Library/Homebrew/formula_installer.rb (L1260)

This `tab` is expected to have `#runtime_dependencies`, and it typically will because most packages come from http://ghcr.io

6f20c0300a/Library/Homebrew/utils/bottles.rb (L111)

Any `DownloadStrategy` that does not match `CurlGitHubPackagesDownloadStrategy` will lead here:
6f20c0300a/Library/Homebrew/software_spec.rb (L463)

Causing this branch to be executed for creating the `tab`:
6f20c0300a/Library/Homebrew/utils/bottles.rb (L119)

This causes a slight issue because `openjdk_dep_name_if_applicable` calls `keg.runtime_dependencies` when it's still `nil`.

6f20c0300a/Library/Homebrew/keg_relocate.rb (L134-L140)

And if it's blank, it won't do the regex replacement on `@@HOMEBREW_JAVA@@`, resulting in the following error when running `Kafka`:

```console
$ tail -f /opt/homebrew/var/log/kafka/kafka_output.log
/opt/homebrew/Cellar/kafka/3.6.0/libexec/bin/kafka-run-class.sh: line 346: /opt/homebrew/@@HOMEBREW_JAVA@@/bin/java: No such file or directory
/opt/homebrew/Cellar/kafka/3.6.0/libexec/bin/kafka-run-class.sh: line 346: exec: /opt/homebrew/@@HOMEBREW_JAVA@@/bin/java: cannot execute: No such file or directory
```

As mentioned by: https://github.com/orgs/Homebrew/discussions/2530#discussioncomment-2002374

> Installing Java-dependent formulae from bottle mirrors doesn't work properly at the moment. The issue is that brew needs the manifest in order to correctly replace @@HOMEBREW_JAVA@@ but brew only knows how to fetch manifests from ghcr.io.
> Pull requests to fix this welcome.

This should fix this issue, by getting the `runtime_dependencies` directly from the formula for those cases that it can't get it from https://ghcr.io or tabfile

```ruby
f_runtime_deps = formula.runtime_dependencies(read_from_tab: false)
tab.runtime_dependencies = Tab.runtime_deps_hash(formula, f_runtime_deps)
```
2024-01-29 15:57:55 -08:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
Markus Reiter
4c3e8255cf
Compare Tag using standardized_arch. 2023-05-13 22:19:35 +02:00
Markus Reiter
8274920217
Rename OS::Mac::Version to MacOSVersion. 2023-05-09 05:08:38 +02:00
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
Rylan Polster
6c35317732
Add and update tests 2022-07-21 16:41:23 +02:00
Rylan Polster
eab3d077bc
Improvements 2022-07-21 15:32:51 +02:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
Bo Anderson
b55498269f
Revamp APIs around bottle specifications 2021-09-20 15:02:05 +01:00
Sam Ford
0752d25125
OS::Mac: Move version methods into ::Version 2021-06-23 09:03:46 -04:00
Mike McQuaid
b914411ac8
Delete Bintray code
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.

Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
2021-05-12 13:37:18 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Michka Popoff
3eea1434cc bottle: tag specific cellars 2021-01-19 10:14:25 +01:00
Seeker
022bcbb269 test/utils/*: use described_class or named subject 2021-01-11 12:31:39 -08:00
Seeker
24636d8bea utils/ast: cleanup
- move `add_bottle_stanza!` from `Utils::Bottles` to `Utils::AST`
- add `replace_bottle_stanza!`
- simplify parameters
2020-12-29 03:40:39 -08:00
Seeker
cdb07d89ae integration_test: fix indentation for test formulae 2020-12-21 16:17:39 -08:00
Seeker
b8aa67be5b bottle: add bottle stanza by traversing AST 2020-12-10 13:38:57 -08:00
Francois-Xavier Coudert
6b0e26102a Fix test for ARM 2020-11-06 14:50:43 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
b58fa4ebb1
Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.

Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
2020-06-10 10:06:46 +01:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Misty De Meo
5ab34abd17
Bottles: allow skipping or_later tags
This is a developer-only feature, so it's gated via `HOMEBREW_DEVELOPER`.
This is intended to enable testing of macOS 10.15; users building software
manually to test compatibility of early betas need to be able to build
software from source instead of via pouring 10.14 bottles. This isn't
intended to be a general-purpose `HOMEBREW_BUILD_FROM_SOURCE` replacement,
and has no effect on released versions of macOS.
2019-06-06 10:14:10 -07:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
1aa8ad09e2
Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaid
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Markus Reiter
dd99d656a3 Convert Utils::Bottles test to spec. 2017-02-21 21:45:34 +01:00
Markus Reiter
7d855a539d Merge pull request #2037 from reitermarkus/spec-utils
Convert Utils test to spec.
2017-02-20 19:57:15 +01:00
Markus Reiter
6dfbf7066b Convert Utils::Bottles::Collector test to spec. 2017-02-19 23:55:12 +01:00
Markus Reiter
05a98f24c4 Convert Utils test to spec. 2017-02-19 18:41:53 +01:00
Markus Reiter
1cbec60829 Convert Utils::Bottles::Collector test to spec. 2017-02-12 21:37:46 +01:00