181 Commits

Author SHA1 Message Date
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
Douglas Eichelberger
65f1766497 Remove unknown YARD tags 2021-11-30 08:01:20 -08: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
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
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
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
b55498269f
Revamp APIs around bottle specifications 2021-09-20 15:02:05 +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
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01:00
Mike McQuaid
2b6e580636
ENV/super: add shims_path helper method.
This allows us to stop repeatedly hardcoding this on macOS/Linux in
formulae.
2021-09-08 12:35:36 +01:00
Michka Popoff
4ef058412c
brew.sh: set HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX when core repo is homebrew-core
See https://github.com/Homebrew/install/pull/571

When the install script sets as https://github.com/Homebrew/homebrew-core,
we need to use the homebrew-core bottle domain, and correctly set
the HOMEBREW_CORE_DEFAULT_GIT_REMOTE below.

This also fixes the brew doctor issue for new homebrew-core Linux installations

Warning: Suspicious https://github.com/Homebrew/linuxbrew-core git origin remote found.
The current git origin is:
  https://github.com/Homebrew/homebrew-core

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
  git -C "/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/linuxbrew-core
2021-08-31 21:48:38 +02:00
Carlo Cabrera
0ae032ad2f
Merge pull request #11756 from carlocab/deuniversalize-machos
formula: add `deuniversalize_machos` method
2021-08-18 02:28:34 +08:00
Rylan Polster
f84265f9a2
Remove extra type signatures 2021-08-06 04:40:22 -04:00
Rylan Polster
737dd1654b
Refactor API methods 2021-08-06 04:31:27 -04:00
Carlo Cabrera
5e0b786da2
formula: add deuniversalize_machos method
This method takes an optional array of `Pathnames`s or `Strings`s and
extracts the native slice from the specified universal binary. If no
parameter is supplied, this is done on all compatible universal binaries
in a formula's keg.

`deuniversalize_machos` is a no-op on Linux.

I still need to look into a) error handling, and b) whether using this
method requires codesigning on ARM.

I've also added signatures to the methods in `extend/os/linux/formula`.
2021-07-22 01:24:56 +08:00
Dawid Dziurla
8d5dc50b68
keg_relocate: swap env var 2021-07-04 15:02:39 +02:00
danielnachun
dc8568f541 linkage_checker: add libatomic 2021-05-31 00:40:19 -07:00
Bo Anderson
ae49b06600
keg_relocate: replace Perl shebangs 2021-05-10 06:13:54 +01:00
Carlo Cabrera
309504a32c
formula: add rpath helper method
About 40 formulae set `CMAKE_INSTALL_RPATH` to `lib` or `opt_lib`, but
this breaks bottle relocatability.

The correct solution is to use `@loader_path/../lib`, but this is macOS
specific, so it requires some OS-specific logic. Rather than replicating
this logic over many formulae, we may as well define a helper method for
it.

See https://github.com/Homebrew/homebrew-core/issues/75458.
2021-04-19 09:23:33 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Shaun Jackman
31aa0375ca
build_info: Add oldest_cpu_family for Linux only 2021-04-02 18:42:53 -07:00
Shaun Jackman
95e7e010ee Add OS::Linux::Glibc.version 2021-04-01 22:16:33 -07:00
Shaun Jackman
0db0db9516
build_system_info: Use the host glibc version only
Use the host glibc version only to avoid errors with
brew tests --no-compat
2021-04-01 15:04:40 -07:00
Shaun Jackman
11bfba1762
build_info: Add glibc_version for Linux 2021-04-01 13:04:32 -07:00
Mike McQuaid
49642e4267
linux/keg_relocate: patchelf dependency is conditional.
This is only needed if we're not using `patchelf.rb`.

Partial fix for https://github.com/Homebrew/brew/issues/10784
2021-03-05 11:36:23 +00:00
Bo Anderson
65c03573c6
ENV: fix missing arg for generic OS and correct type sigs 2021-02-26 18:23:48 +00:00
Michka Popoff
0a292c7041
linux: use preferred_gcc instead of gcc 2021-02-09 21:48:48 +01:00
Michka Popoff
221983dbcf
compilers: prefer gcc 5 on linux
Fixes #10170 by preferring gcc@5 on linux
This makes sure ENV.cc and ENV.cxx is correctly set:

If a formula does not explicitely depend on a brewed gcc,
ENV.cc is set to gcc-5 (system gcc-5 or brewed gcc-5) with this change,
even if other gcc versions are installed on the system.
2021-02-08 13:26:50 +01:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
EricFromCanada
99ad3350ee use single quotes around stanza and parameter names 2021-01-26 16:19:47 -05:00
Seeker
0aa4259654 formula: include versioned *.so.* libs for shared_library("*") 2020-12-24 08:51:01 -08:00
Rylan Polster
af6be13e7c test: don't try to use Xcode SDK for build requirement 2020-12-21 09:25:29 -05:00
Mike McQuaid
87dd13aea6
Deprecate cask requirements.
This probably has to wait until 2.7.0 now and will require a bunch of
formula changes/deprecations but we should probably start moving in this
direction given we're not installing any of these on our CI any more.
2020-12-15 14:19:45 +00:00
Seeker
a2af19360b extend: add on_os (for on_macos/on_linux) 2020-12-07 10:36:51 -08:00
Mike McQuaid
1d5e354cc2
Merge pull request #9347 from maxim-belkin/amd_cpus
Identify AMD CPUs on Linux
2020-12-01 12:47:26 +00:00
Maxim Belkin
6eb49907f0 cpu.rb: apply Mike's suggestions
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-11-30 16:18:19 -06:00
Maxim Belkin
97c9a952d3 Recognize AMD CPUs on Linux 2020-11-30 16:18:19 -06:00
Maxim Belkin
8738ad324e cpu.rb: clean up the list of CPU instructions
Co-authored-by: Shaun Jackman <sjackman@gmail.com>
Co-authored-by: Markus Reiter <me@reitermark.us>
2020-11-30 16:17:00 -06:00
Markus Reiter
6e20d27582 Remove some unneeded requires. 2020-11-30 00:49:14 +01:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Michka Popoff
084f2e75eb
Merge pull request #8907 from iMichka/onlinux
formula: add on_linux and on_macos blocks
2020-11-03 23:30:37 +01:00