1838 Commits

Author SHA1 Message Date
Carlo Cabrera
ffb3c9cff9
Fuse the rpath loops.
We previously looped twice over the `rpath`s, but we actually only need
to do that once.
2022-01-18 19:29:58 +08:00
Carlo Cabrera
57fae524de
extend/os/mac/keg_relocate: fix duplicate RPATH handling
ruby-macho chokes on changing duplicate RPATHs, so we need to strip the
duplicates before trying to relocate them.

This continues #11405. We need this to unblock
Homebrew/homebrew-core#91224.

While we're here, let's get rid of `HOMEBREW_RELOCATE_RPATHS`. We've
been using it for nearly a year with essentially no problems (barring
`pdnsrec`), so I think it is safe to do unconditionally.
2022-01-18 15:21:05 +08:00
Carlo Cabrera
e4e3b8ad2d
Revert "extend/os/mac/keg_relocate: fix relocation of duplicate RPATHs"
Upon reflection, I realised that this is probably a bug in `ruby-macho`,
and should be fixed there instead.

Needs https://github.com/Homebrew/ruby-macho/pull/362.

This reverts commit e8b5eb7e42c925b7cc10c78a029b8c70e4d7965b.
2022-01-18 13:07:44 +08:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Mike McQuaid
cf0468c88f
Merge pull request #12661 from sjackman/sj/relocate_dynamic_linkage
Patch neither glibc nor glibc@* using patchelf
2022-01-03 13:08:42 +00:00
Shaun Jackman
06bf91fe0b
Use formula_optionally_versioned_regex
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-01-02 17:30:34 -08:00
Shaun Jackman
2ad3f0a089 Patch neither glibc nor glibc@* using patchelf
Patching the dynamic linker of glibc breaks it.
2022-01-02 13:44:13 -08:00
Shaun Jackman
4e68a7b5bc Allow linkage to libnss_files.so.2 on Linux
libnss_nis.so.2 in glibc@2.13 has linkage to libnss_files.so.2.
2021-12-31 16:17:36 -08:00
Rylan Polster
2e6b6ab3a2
Fix style 2021-12-24 21:15:21 -05:00
FX Coudert
56bc22c68a
Blizzard and Avalanche appear to be ARMv8.5-A 2021-12-22 16:31:30 +01:00
FX Coudert
405aeac2d8
Add latest CPUs 2021-12-18 22:39:57 +01:00
Douglas Eichelberger
65f1766497 Remove unknown YARD tags 2021-11-30 08:01:20 -08:00
Bo Anderson
6337dbfac9
ENV/super: enable deterministic archive generation 2021-11-26 13:04:33 +00:00
Evan Phoenix
b5ccf8aac2 Do not pass -Wl,-headerpad_max_install_names to b-linux-path
One of the more curious bugs, if you use
-Wl,-headerpad_max_install_names on linux, it tries to link a library
named "eaderpath_max_install_names" in, which causes all kinds of weird
havoc.

Most notably, gtester inside glib fails to run for bizarre reasons.
-Wl,-headerpad_max_install_names is not an option anywhere outside macos
anyway, so move it to macos only and avoid the heartache of extremely
weild bugs.
2021-11-09 20:38:26 -08:00
EricFromCanada
d0de6ac249
svn: always install brewed version on macOS if required
Stock SVN on macOS 10.14 and earlier now throws errors with some certificate providers.
2021-11-09 13:56:40 -05:00
Bo Anderson
d0f6f7d52b
Require Ruby 2.6.8 2021-11-08 18:39:21 +00:00
Bo Anderson
4836ea0ba2
Remove XQuartz handling 2021-11-05 12:40:22 +00:00
fn ⌃ ⌥
4c484ec6cb search: optimize cask search 2021-11-03 17:06:37 -07:00
Sean Molenaar
73bc934c85
Caveats: suggest brew services for linux 2021-10-30 18:18:25 +02:00
Carlo Cabrera
457de40117
Apply suggestions from code review
These are just a few style improvements.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-27 20:11:47 +08:00
Carlo Cabrera
91e425f7dd
keg_relocate: handle JAVA_HOME
Java-dependent formulae produce different bottles on macOS and Linux
because they have different values for `JAVA_HOME` (`opt_libexec` vs
`opt_libexec/"openjdk.jdk/Contents/Home"`).

Let's handle this difference by using the placeholder
`@@HOMEBREW_JAVA@@` in a bottle, like so:

    #!/bin/bash
    JAVA_HOME="${JAVA_HOME:-@@HOMEBREW_JAVA@@}" exec "@@HOMEBREW_CELLAR@@/clojure/1.10.3.998/libexec/bin/clojure"  "$@"
2021-10-27 20:11:46 +08:00
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Rylan Polster
fa4bb7d74a
Refactor audit exception handling 2021-10-21 21:11:05 -04:00
Mike McQuaid
4eb9ba038a
Merge pull request #12284 from MikeMcQuaid/linuxbrew_migration_bottle_domain_git_remote
update-report: better handle user set bottle domain, core git remote.
2021-10-21 15:49:02 +01:00
Mike McQuaid
0118e6ec41
Apply suggestions from code review
Co-authored-by: Xuehai Pan <XuehaiPan@outlook.com>
2021-10-21 15:10:17 +01:00
Mike McQuaid
eb1b244fd2
update-report: better handle user set bottle domain, core git remote.
Unset these variables and print a warning if they were set to
non-default values.
2021-10-21 15:01:58 +01:00
Carlo Cabrera
b0939478d1
extend/os/mac/diagnostic: fix unqualified macOS version reference
Currently, this says something like

    Ruby version 2.6.8 is unsupported on 12.

which is a little cryptic. Let's change that to say

    Ruby version 2.6.8 is unsupported on macOS 12.
2021-10-21 20:06:34 +08:00
Bo Anderson
943b79d2fb
os/mac/diagnostic: allow Ruby 2.6.8 2021-10-21 02:31:32 +01:00
Michka Popoff
1cc7ca33c0
update: migrate everyone from linuxbrew-core to homebrew-core
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-20 11:01:38 +01: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
Carlo Cabrera
e8eb781470
mac/formula_cellar_checks: apply suggestions from code review
- Fix missing space
- use `MachO::Utils.fat_magic?`
- call `#flag?` consistently.

Co-authored-by: Bo Anderson <mail@boanderson.me>
2021-10-13 16:54:02 +08:00
Carlo Cabrera
4fbe0a2b1b
Fix false positives in audit
There was a typo that made it so that all libraries were being included
in `flat_namespace_files`.
2021-10-12 15:35:46 +08:00
Carlo Cabrera
7223f8ef74
Fix universal binary handling in check_flat_namespace 2021-10-12 13:49:53 +08:00
Carlo Cabrera
0484bfe820
mac/formula_cellar_checks: check for flat namespace libraries
There are at least five instances where a formula has libraries compiled
with `-flat_namespace` due to a bug in detecting the macOS version (cf.
Homebrew/homebrew-core#87103, Homebrew/homebrew-core#85974,
Homebrew/homebrew-core#85973).

I think it makes sense to check for this more generally. It is
sometimes intentional, so I've added a check for an allowlist for
those instances. Running this on the current `util-linux` bottle
produces

    ❯ brew audit --strict util-linux
    util-linux:
      * Libraries were compiled with a flat namespace.
        This can cause linker errors due to name collisions, and
        is often due to a bug in detecting the macOS version.
          /usr/local/Cellar/util-linux/2.37.2/lib/libblkid.1.dylib
          /usr/local/Cellar/util-linux/2.37.2/lib/libfdisk.1.dylib
          /usr/local/Cellar/util-linux/2.37.2/lib/libsmartcols.1.dylib
          /usr/local/Cellar/util-linux/2.37.2/lib/libuuid.1.dylib
    Error: 1 problem in 1 formula detected

Some things that still need to be done here:
- fix this check for universal binaries
- check if we want to restrict this audit check to newer versions of macOS
- fix false positives (try `brew audit --strict llvm` and compare the
  output of `otool -hV` on the identified files)

While we're here, let's fix the formatting of the output of these other
audits (cf. #12217).
2021-10-12 13:11:23 +08:00
Michka Popoff
e8ee5b05f9
Migrate linuxbrew-core to homebrew-core on update.
- Only for HOMEBREW_DEVELOPER
- Except for HOMEBREW_CORE_MERGE_MAINTAINER
- Except for GitHub Actions CI

Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-11 21:04:58 +02:00
Carlo Cabrera
25fe428ed2
system_config: fix clang version output on Linux
If you have Homebrew LLVM installed, `brew config` will show

    Clang: 12.0.1 build (parse error)

because Homebrew LLVM does not give a build number. Some installations
from the system package manager do have this information, so let's show
it if it's available but skip complaining if not.

I've kept the original code for macOS because we always expect Apple's
build number to show there.
2021-10-07 11:24:20 +08:00
Bo Anderson
ebc0783c5f
Merge pull request #12167 from Bo98/brewed-curl-old-macos
Install and use Homebrew's `ca-certificates` on macOS <= 10.15.5
2021-10-04 05:29:57 +01:00
Bo Anderson
30b24cf4ad
Use HOMEBREW_CURL universally, including formulae 2021-10-04 02:03:04 +01:00
Bo Anderson
1952d27ba2
Install and use Homebrew's ca-certificates on macOS <= 10.15.5 2021-10-03 17:52:10 +01:00
Bo Anderson
24543c63e7
Merge pull request #12149 from FnControlOption/development_tools
development_tools: add type signatures
2021-09-30 12:59:51 +01:00
Mike McQuaid
41e94afda5
Fix brew style
Fixes for https://github.com/Homebrew/brew/pull/12152.

Extracted into a separate PR so this can be merged immediately.
2021-09-30 10:13:53 +01:00
fn ⌃ ⌥
9638e3e8c0 development_tools: update type signatures 2021-09-29 17:44:26 -07:00
fn ⌃ ⌥
61a7ffb999 development_tools: add type signatures 2021-09-29 15:12:53 -07:00
Bo Anderson
befaeba6c5
Merge pull request #12076 from Bo98/bottle-spec-update
Revamp APIs around bottle specifications
2021-09-20 15:22:35 +01:00
Bo Anderson
b55498269f
Revamp APIs around bottle specifications 2021-09-20 15:02:05 +01:00
Alexander Bayandin
fe9a039774
unpack_strategy: add zstd 2021-09-20 14:12:30 +01:00
danielnachun
83d1d6d564
missing_formula.rb: don't disable texlive 2021-09-17 11:16:27 -07:00
Bo Anderson
5e42c2eca8
Merge pull request #12079 from Bo98/xcode-min-version
os/mac/diagnostic: also check Xcode minimum version on env setup
2021-09-17 00:28:30 +01:00
Bo Anderson
acc20ef2c4
os/mac/diagnostic: also check Xcode minimum version on env setup 2021-09-17 00:03:44 +01:00
Carlo Cabrera
22db7aa516
superenv: set M4 on Linux when bison is a dependency
Bison no longer remembers the path to `m4` as of
Homebrew/homebrew-core#84931. Since superenv does not put runtime
dependencies of build dependences in `PATH`, we now need to help Bison
find `m4` by setting `M4` in the environment.

See also Homebrew/homebrew-core#85260.
2021-09-16 21:11:12 +08:00