54 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
d785e2024b
Add symlinked home detection to brew doctor on Linux
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-12 11:00:14 +01:00
Douglas Eichelberger
5d5daaa09f Use FormulaInstaller OS extensions 2024-09-06 13:58:32 -07:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Caleb Xu
6ee34832d1
elf: expand $ORIGIN in RUNPATH/RPATH entries 2024-04-25 22:52:25 -04:00
Ruoyu Zhong
916b37388d
Revert "Revert "os/linux/elf: avoid using ldd for listing dynamic dependencies"" 2024-04-24 02:23:13 +08:00
Ruoyu Zhong
852c5acb65
Revert "os/linux/elf: avoid using ldd for listing dynamic dependencies" 2024-04-16 02:50:12 +08:00
Caleb Xu
c6b98d0b8c
os/linux/ld: add functions for querying dynamic linker 2024-04-13 19:35:29 -04:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Bo Anderson
71d51faa55
Introduce tag for implicit dependencies 2023-07-04 13:40:58 +01: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
Issy Long
cb2a09e65e
Fix (auto-correct) more RSpec/BeNil offenses
- The `RSpec/BeEq` auto-corrections made more `RSpec/BeNil` offenses, so another go of `brew style --only=RSpec/BeNil --fix\` is needed.
2022-03-01 00:36:37 +00:00
Issy Long
72e48024f0
Fix (auto-correct) RuboCop Rspec/BeEq offenses 2022-03-01 00:10:14 +00:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
Mike McQuaid
0cda6a0657
Only use patchelf.rb
Remove support for using the `patchelf` formula for writing as it's been
off by default for a long time now.
2021-10-19 15:15:56 +01:00
Issy Long
ead84825a6
test: Fix all RSpec/RepeatedExampleGroupDescription offenses 2021-02-21 14:06:24 +00:00
Rylan Polster
af40e072b0
style: remove RSpec/NamedSubject violations 2021-02-01 20:30:51 -05:00
Seeker
1d710047a5 formula: add more tests for shared_library 2020-12-24 09:05:46 -08:00
Mike McQuaid
0f9bad0052
Fix bottle prefix and repository handling
We were previously only looking at the `cellar` value when pouring
bottles and ignoring the `prefix` and (implicit) `repository`.

Actually look at these values and set the defaults for each platform.

Also, when we're relocating to create or pour bottles when `prefix`
and `repository` are equal then skip relocating the `repository` and
always use references to the `prefix` instead.

Fixes #9453
2020-12-09 13:53:10 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
rmnull
7863cc6f80
remove {rust,cpp,go}.elf fixutres. 2020-09-02 18:58:36 +05:30
rmnull
f5ca649e1d
new elf fixtures, and basic tests for Pathname#rpath(=), and Pathname#interpreter(=). 2020-09-02 18:58:36 +05:30
rmnull
043719383b
remove code using patchelf, remove HOMEBREW_PATCHELF_RB var 2020-08-08 06:48:31 +05:30
rmnull
0bf981f010
skip tests when HOMEBREW_PATCHELF_RB is not set. 2020-07-25 01:41:20 +05:30
rmnull
06a4a78b99
simple rpath, interpreter tests for existing fixtures. 2020-07-25 01:25:08 +05:30
Michka Popoff
955bca6574 formule: add generic shared-lib methods
We have strings containing hardcoded ".dylib" extensions in homebrew-core.
To be able to bring linuxbrew-core and homebrew-core closer together,
I am introducing a new generic attribute that can be used in formulae.
2020-06-20 23:14:18 +02:00
Michka Popoff
3ad9009937 on_os block: test support for patches 2020-06-10 19:29:52 +02:00
Michka Popoff
2a50ef045f on_os blocks: remove url tests
This is not allowed by the style audit, and we do not want
to allow different source url's depending on the os.
2020-06-10 19:29:52 +02:00
Michka Popoff
1f8ebf5d20 resource: allow on_os blocks 2020-06-10 19:29:04 +02:00
Bo Anderson
eb303dd654 software_spec: add uses_from_macos since bound 2020-04-28 16:45:32 +01:00
Michka Popoff
c7927f5af5 formula: add linux and macos only function blocks 2020-04-12 23:51:41 +02:00
Jonathan Chang
57109a175a diagnostic: add doctor check for CPU arch on Linux
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-03-13 11:39:27 +11:00
Dawid Dziurla
59ce122e90
dependency_collector: make resource dep available at test-time too
There are formulae that use resource blocks for stuff that is needed in
test blocks. If a resource is a `.zip` archive, one needs `unzip`
utility in `PATH` to extract it, but its only available at build-time,
so one observes an error like that for example:

```
==> brew test psftools --verbose
Testing psftools
==> Downloading https://www.zone38.net/font/pc8x8.zip
Already downloaded: /github/home/.cache/Homebrew/downloads/ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip
==> Verifying ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip checksum
unzip -o /github/home/.cache/Homebrew/downloads/ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip -d /tmp/d20200304-21389-ui0wr0
Error: psftools: failed
undefined method `shelljoin' for nil:NilClass
```

Of course this issue affects Linux the most, because of higher
probability that the system lacks `unzip` for example.

With this commit, all resource guessed dependencies should be available
at build and test time.
2020-03-04 22:49:54 +01:00
Mike McQuaid
0c1b556196
uses_from_macos: remove before/after.
We're not actually using this anywhere and it makes the code
more complicated.

Relatedly, this PR fixes the issue where
`uses_from_macos "python@2" => :build` was valid on macOS but not
on Linux.
2019-12-19 14:36:33 +00:00
Mike McQuaid
22795d7e30
spec_helper: do cache clearing in single location. 2019-11-06 10:20:57 +00:00
Gabriel
b2969e6063 Add needs_linux tag to specs that fails on MacOS 2019-06-03 15:52:53 -03:00
Gabriel
41f39939ca Extract linux spec cases & add hash support to default #uses_from_macos 2019-06-03 15:52:53 -03:00
Gabriel
01c5bc48d2 Create extended os formula specs 2019-06-03 15:52:53 -03:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Jonathan Chang
76d7b586ce diagnostic: check kernel, glibc versions [Linux] 2019-01-01 16:10:43 -08:00
Claudia
5be80a78f6
Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00
Reto Kromer
456571b15d fix more insecure protocols 2018-08-06 16:50:42 +02:00
Markus Reiter
5e2d4d52ba Refactor OsxfuseRequirement spec. 2018-04-20 19:11:22 +02:00
Mike McQuaid
5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Shaun Jackman
5500c3b25e unzip_dep_if_needed: Needs unzip not zip [Linux] (#632) 2018-03-05 11:51:08 -08:00
Maxim Belkin
c83dd0d04b brew style: replace tabs with spaces 2018-02-21 13:44:51 +00:00
Maxim Belkin
14d7a7a08c Code refactoring 4.0 2018-02-20 21:33:38 +00:00
Maxim Belkin
c6dac68d8b Code refactoring v3.0 2018-02-19 10:21:01 +00:00