Commit Graph
1378 Commits
Author SHA1 Message Date
Mike McQuaid 47769f98f1 os/linux: add, use OS::Linux.os_version
Similar to MacOS.version. A bit cleaner for us here but also plan on
using this in Homebrew/homebrew-bundle.
2019-09-13 16:48:13 +01:00
Mike McQuaid b567ed738e Remove Azure Pipelines CI. 2019-08-20 08:48:32 +01:00
Mike McQuaid e1c00f2358 os/mac/diagnostic: allow use of GitHub Actions CI.
We will be migrating Homebrew/brew to use this in the near future.
2019-08-15 20:45:48 +01:00
Mike McQuaidandGitHub de72a23109 Merge pull request #6321 from zachauten/uninstall-suggestions
cask_reason will suggest `brew cask uninstall`
2019-08-02 06:52:31 +01:00
Zach Auten ecc7b9e174 cask_reason will suggest brew cask uninstall 2019-07-31 00:31:12 -04:00
Mike McQuaidandGitHub 86e64cbb4e Merge pull request #6303 from xu-cheng/rust-elf
keg_relocate: relocate the interpreter for elf files with INTERP header (Linux)
2019-07-28 15:43:48 +01:00
Cheng XU 2c82623318 keg_relocate: relocate the interpreter for elf files with INTERP header (Linux)
Some elf files (e.g. created by rust compiler) have INTERP header despite
their magic header denotes shared object instead of executable.

We should relocate the interpreter elf files as long as they have INTERP header.

This should fix the broken bottles for rust based formulae.
2019-07-18 15:22:43 +08:00
Cheng XU 66697d4290 ENV: add sensitive_environment function
ENV#sensitive_environment is used to list all sensitive environments.

Also refactor the code on determining whether an environment is sensitive.
2019-07-18 15:06:33 +08:00
Shaun Jackman 0ac5cbbda9 java_dep_if_needed: Install adoptopenjdk for Linux
Install adoptopenjdk rather than openjdk for Linux.
openjdk is superseded by adoptopenjdk.
2019-07-08 09:43:12 -07:00
Zach Auten 25e7eaee1f brew install will suggest brew cask install
If the user tries to install a cask using brew install
then brew will suggest the user tries 'brew cask install'

closes #6245
2019-06-22 14:21:56 -04: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
Shaun JackmanandGitHub 7c5f71e5ac Merge pull request #6162 from gkpacker/add_uses_from_macos
Add uses from macos
2019-06-05 08:23:17 -07:00
Gabriel 41f39939ca Extract linux spec cases & add hash support to default #uses_from_macos 2019-06-03 15:52:53 -03:00
Gabriel 77f2d01739 Add hash support 2019-06-03 15:52:53 -03:00
Gabriel aafe87524d Extends SoftwareSpec with #uses_from_macos 2019-06-03 15:52:53 -03:00
Gabriel 412f7d964f Removes formula class extension 2019-06-03 15:52:53 -03:00
Gabriel 22f765300e Lint os/mac/formula 2019-06-03 15:52:53 -03:00
Gabriel 848b3380e5 Increase readability with early returns 2019-06-03 15:52:53 -03:00
Gabriel a7e3304735 Extends Formula class with mac os #uses_from_macos 2019-06-03 15:52:52 -03:00
Isabell (Issy) Long 4a5b02661a [Linux] Don't prompt users to brew cask install
- I tried to install `keybase`, thinking I'd get the CLI. On Linux,
  casks don't work, yet I was still prompted to `brew cask install
  keybase`. When I tried that (just to make sure), I got the "casks are
  only supported on MacOS" error.
- This change makes it so we don't prompt people to install casks if
  they're on platforms other than MacOS.

Before:

```
╭─issyl0@grus /home/linuxbrew/.linuxbrew/Homebrew ‹master›
╰─ $ brew install keybase
Error: No available formula with the name "keybase"
Found a cask named "keybase" instead.
```

After:

```
Error: No available formula with the name "keybase"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
```
2019-05-25 15:44:46 +01:00
Izaak Beekman 0cf8ec7547 Allow Accelerate linkage, deny veclibfort & lapack
- Accelerate provides more than just BLAS and LAPACK functionality, see
   https://developer.apple.com/documentation/accelerate
 - Veclibfort exists only to wrap Accelerate's BLAS/LAPACK
 - LAPACK is a slow, seldom updated reference implementation
 - Encourage usage of OpenBLAS
 - Reverts PR #6130
2019-05-23 19:07:17 -04:00
Izaak Beekman 056a2d41fd Add exception for veclibfort linking to Accelerate
- veclibfort exists soley to wrap Apple's accelerate and provide BLAS/LAPACK
   access to Accelerate
 - Improve the help message for that audit to mention veclibfort
2019-05-14 12:04:04 -04:00
Jonathan Chang 35a271e99b audit: check Accelerate linkage for core formulae 2019-05-14 13:37:34 +10:00
dalance c6fd1ceaef Add HOMEBREW_ARCH 2019-05-06 17:36:13 +09:00
Mike McQuaid cd40af2c58 ARGV: fix build_head? call.
Fixes #6087.
2019-05-02 08:16:55 +01:00
Mike McQuaid c4f72312ce Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaidandGitHub bc3a4c1897 diagnostic: tweak frozen string handling. 2019-04-23 23:05:28 -07:00
followerandGitHub 2064b30fce Fix check_for_unsupported_macos() on outdated releases
Recent commit https://github.com/Homebrew/brew/commit/36dbad3922ad984f7c396a9757fe8ae9750c44b0 to default to frozen string literals (via `frozen_string_literal`) broke `check_for_unsupported_macos()` on outdated releases--due to attempted modification of a frozen string literal.

This breaks `install` and `doctor`.

It's like the change wasn't tested on an unsupported outdated release or something... :D

Adding a `+` prefix is apparently one way around this issue according to https://stackoverflow.com/questions/37799296/what-does-the-comment-frozen-string-literal-true-do#37799399. The change worked for me.
2019-04-24 15:02:13 +12:00
Mike McQuaid 36dbad3922 Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid d1ea6f38d3 Fix mutable constants violations. 2019-04-19 21:46:20 +09:00
Mike McQuaid 86f43f79ee Enable/fix optional Ruby frozen string literal usage
Combined with https://github.com/Homebrew/homebrew-test-bot/pull/247
this will test Homebrew's use of frozen strings in CI. After this we
will then enable it for Homebrew developers and eventually all Homebrew
users.
2019-04-19 10:30:41 +09:00
Mike McQuaid 18630c7032 extend/ARGV: remove unused methods. 2019-04-17 21:08:26 +09:00
Mike McQuaidandGitHub 356f72dcc6 Merge pull request #6012 from amyspark/hotpatch-fix-atomic_write
atomic_write: repair permissions after writing
2019-04-14 10:02:15 +01:00
EricFromCanada 89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada 15c38a2d8b formatting fixes 2019-04-13 21:29:32 -04:00
EricFromCanada fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
L. E. Segovia f9fcdec795 pathname.rb: style fixes 2019-04-13 17:18:14 +00:00
L. E. Segovia f706fffc6c atomic_write: repair permissions after writing
This restores the original file uid, gid and permissions separately.
(ActiveSupport does it in a single step - atomically. This is not
useful in our use case because it may lead to ACL changes.)

Fixes #5916
2019-04-12 18:46:57 +00:00
L. E. Segovia c6894a23c1 Only merge extended attributes if required 2019-04-09 21:45:35 +00:00
L. E. Segovia e09d4336a9 Unzip Casks w/ extended attributes with ditto
Fixes Homebrew/homebrew-cask#61386
2019-04-08 22:54:33 +00:00
Markus Reiter 62a0c2fed9 Retry with ditto when “End-of-central-directory signature not found.”. 2019-04-02 13:27:20 +02:00
Mike McQuaid 3bde17c9f9 Cleanup from dev-cmd test changes
- Remove added whitespace in `extend/os/linux/keg_relocate`
- Cleanup testball bottles
2019-03-27 10:31:26 +00:00
Mike McQuaid 59d680a626 dev-cmd: only one integration test per command.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00
Shaun Jackman 59ee097f8d fix_dynamic_linkage: Check HOMEBREW_RELOCATE_METAVARS
Only remove RPATH when HOMEBREW_RELOCATE_METAVARS is set.

See PR https://github.com/Homebrew/brew/pull/5413
2019-03-19 08:29:45 -07:00
Shaun Jackman 5cb458d687 install_symlink_p: Fix when dest includes a symlink
install_symlink_p does not work as intended when dst includes a symlink in its path.
relative_path_from requires that both src and dst be real paths without symlinks.

From https://ruby-doc.org/stdlib-2.3.7/libdoc/pathname/rdoc/Pathname.html#method-i-relative_path_from
This method doesn't access the filesystem. It assumes no symlinks.
2019-03-16 23:11:59 -07:00
William Woodruff 02216eedaf mac/keg_relocate: Don't relocate loader_paths 2019-03-11 20:59:11 -04:00
William Woodruff 82dd5011e2 mac/keg_relocate: Delete loader_paths
Fix the call to expand_rpath.
2019-03-10 21:29:59 -04:00
William WoodruffandWilliam Woodruff 54aca0d14f os/mac: Flush RPATHs from Mach-Os when possible 2019-03-10 21:07:04 -04:00
William Woodruff 2e2dea6131 mac/keg_relocate: Style nit 2019-03-10 21:07:04 -04:00
William Woodruff d2dc4e5599 mac/keg_relocate: Drop unnecessary parens 2019-03-10 21:07:04 -04:00