1788 Commits

Author SHA1 Message Date
Bo Anderson
8dd11e4e4c
Set uses_from_macos_elements in all cases 2021-09-14 04:06:40 +01:00
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01:00
Bo Anderson
8076c9e569
os/mac/diagnostic: don't check for prerelease macOS in integration tests 2021-09-09 16:53:52 +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
Benjamin Bolton
dce6b77ad0
Modify syntax for readability / consistency
leverage map block and guard clause for readability thx @MikeMcQuaid
2021-09-07 10:10:26 -06:00
Benjamin Bolton
a83877660b
Revert "Accept @Rylan12 chained spacing conventions"
This reverts commit 538a5d9e698763e3dc6eeae46535f032a5ff316e.
2021-09-07 07:24:58 -06:00
Benjamin Bolton
538a5d9e69
Accept @Rylan12 chained spacing conventions
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2021-09-07 07:16:06 -06:00
Benjamin Bolton
0c6266ee60
Only wrap multi-word arguments, add comment 2021-09-02 09:26:13 -06:00
Benjamin Bolton
1532c081f2
Add space character in map (pacify brew style) 2021-09-01 11:46:57 -06:00
Benjamin Bolton
4acb9cf734
Wrap service command parameters in single quotes
Should resolve issues with multi-word arguments, eg:

> Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/nginx/bin/nginx -g daemon off;

fails, but 

> Or, if you don't want/need a background service you can just run:
  '/opt/homebrew/opt/nginx/bin/nginx' '-g' 'daemon off;'

succeeds
2021-09-01 11:40:54 -06:00
Mike McQuaid
7c37a34cca
Merge pull request #11927 from FnControlOption/fetch
fetch: fix `--bottle-tag` when unbottled on host system
2021-09-01 16:08:05 +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
Rylan Polster
5d536d66fc
Rename HOMEBREW_JSON_CORE to HOMEBREW_INSTALL_FROM_API 2021-08-27 00:24:15 -04:00
Rylan Polster
8690d661fd
Merge pull request #11859 from Rylan12/cask-json
Allow casks to be installed using the `cask-source` API
2021-08-26 23:58:51 -04:00
FnControlOption
b9fc4e36f0 fetch: fix --bottle-tag when unbottled on host system 2021-08-26 14:44:53 -07: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
Bo Anderson
8efce9a9d2
os/mac/diagnostic: check min CLT version on env setup 2021-08-17 18:36:27 +01:00
Rylan Polster
99635bf3ae
Remove need for homebrew/cask to be tapped 2021-08-14 16:17:26 -04:00
Bo Anderson
9686ebe355
os/mac/diagnostic: prevent some double diagostic failures 2021-08-11 14:19:22 +01:00
Mike McQuaid
3b13cf9797
Merge branch 'master' into dependabot/bundler/Library/Homebrew/sorbet-0.5.6519 2021-08-11 09:30:51 +01:00
Bo Anderson
07239d267c
Migrate from Sorbet DSL plugins to Parlour 2021-08-06 13:32:48 +01: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
Mike McQuaid
714bfee81f
extend/pathname: handle missing permissions on removal.
Fixes #11783
2021-07-28 15:40:23 +01:00
hyuraku
3ccb1f6328 search by desc with formula-cask option 2021-07-25 20:10:35 +09: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
Carlo Cabrera
2599cccc81
Add comment for in-source style exception 2021-07-08 19:16:39 +01:00
Carlo Cabrera
ebeb9e7e90
Define O1 and O0 methods separately 2021-07-08 10:56:36 +01:00
Carlo Cabrera
b37e574ad3
Fix typecheck error 2021-07-08 09:19:11 +01:00
Carlo Cabrera
b0b521001e
extend/ENV/super: allow O{1,0} to accept a block
This makes `ENV.O{1,0}` behave like `ENV.deparallelize`.

This should also allow us to build libgcrypt's jitter entropy collector,
which we currently disable because it interacts poorly with our compiler
shims. See #11201.
2021-07-08 08:59:47 +01:00
Carlo Cabrera
10edae9b94
Merge pull request #11644 from carlocab/cpuid-check
formula_cellar_checks: check for `cpuid` instruction when needed
2021-07-06 06:29:27 -07:00
Dawid Dziurla
8d5dc50b68
keg_relocate: swap env var 2021-07-04 15:02:39 +02:00
Carlo Cabrera
c59a42b24e
formula_cellar_checks: check for cpuid instruction when needed
This implements the second audit discussed in #11608.
2021-07-04 00:31:31 +01:00
Carlo Cabrera
0404da7ba7
superenv: handle formulae with runtime CPU detection
Some formulae are able to detect the features of the runtime CPU, and
execute code accordingly. This typically entails 1) the detection of
features of the build-time CPU in order to determine the targets that
the compiler can generate code for, and 2) generating code for the
targets that the compiler can support.

Our filtering of optimization flags can cause misdetection of compiler
features, leading to failed builds [1], and miscompilation even when the
build does not fail [2].

Let's try to fix this by allowing formulae to declare
`ENV.runtime_cpu_detection` which skips the filtering of `-march` and
related flags.

I've also skipped the filtering of the optimisation
level, since it seems to me that if upstream maintainers have gone to
the lengths of writing code that detects runtime hardware, they probably
also know better about appropriate `-O` flags to use.

This is a partial list of formulae that should make use of this feature:
1. apache-arrow
2. fftw
3. gromacs
4. open-mpi
5. openblas

Partially resolves Homebrew/homebrew-core#76537.

[1] open-mpi/ompi#8306 and linked issues/PRs
[2] Homebrew/homebrew-core#76537
2021-07-01 16:24:38 +01:00
Sam Ford
0752d25125
OS::Mac: Move version methods into ::Version 2021-06-23 09:03:46 -04:00
Mike McQuaid
72c59c816f
Merge pull request #11548 from MikeMcQuaid/3_2_deprecate_disable_remove
Deprecate, disable, delete code for Homebrew 3.2.0
2021-06-18 14:34:10 +01:00
Misty De Meo
c0a02442d9
Revert "language/java: use shortened brew paths"
This reverts commits 318175cfe2b23328f1b5f13812fd59cfd45fe1dc,
e7ab760392b9691a6c730b7e0d660b7874969e70 and
3b35af63f608438b1882756feca94a6ebdd0d6a3 (PR #11537).
2021-06-17 20:29:43 -07:00
Mike McQuaid
30a65342e8
Deprecate, disable, delete code for Homebrew 3.2.0
Do the usual deprecation, disable, delete dance for Homebrew 3.2.0.
2021-06-17 11:34:32 +01:00
Mike McQuaid
6a5891f1d8
Merge pull request #11537 from alebcay/short-brew-path
Utils: shortened brew paths
2021-06-16 11:13:59 +01:00
Caleb Xu
e7ab760392
extend/pathname: use shortened brew paths 2021-06-15 09:58:46 -04:00
Mike McQuaid
2395113154
diagnostic: hide some warnings on Apple Silicon.
We don't want to complain about either Intel or ARM installations of
Homebrew in `brew doctor` so check for/allow both.
2021-06-15 11:51:29 +01:00
Bo Anderson
095d5215f1
Merge pull request #11472 from Bo98/perl-all
os/mac/keg_relocate: add fallback to default Perl version when using tab
2021-06-09 13:59:35 +01:00
Daniel Nachun
273b06c822
Merge pull request #11459 from danielnachun/gcc_fix
super: fix GCC linkage issue in Linux
2021-06-02 20:23:53 -07:00
danielnachun
bd88f3d857 super: fix GCC issues 2021-05-31 11:17:00 -07:00
Bo Anderson
1fc39d2d0d
os/mac/keg_relocate: add fallback to default Perl version when using tab
While this should never be necessary for per-OS bottles, this could be useful for :all bottles where the OS it was built on uses a Perl version that doesn't exist on all macOS versions.
2021-05-31 16:31:26 +01:00
danielnachun
dc8568f541 linkage_checker: add libatomic 2021-05-31 00:40:19 -07:00
Carlo Cabrera
ada399c7db
Fix perl shebang rewriting for perl formula
See

    https://github.com/Homebrew/homebrew-core/issues/77797
    https://github.com/Homebrew/brew/issues/11275#issuecomment-846522409
2021-05-23 11:05:17 +01:00
Carlo Cabrera
e8b5eb7e42
extend/os/mac/keg_relocate: fix relocation of duplicate RPATHs
Homebrew/homebrew-core#77623 revealed two bugs. One in `ruby-macho`,
which turns out to be unable to delete duplicated `RPATH`s. This was
fixed with `ruby-macho` 2.5.1.

The second, which this commit fixes, is in our handling of duplicate
`RPATH`s. Since we iterate over each `RPATH`, attempting to relocate the
first duplicate fails since it will no longer exist after having
relocated the original.
2021-05-17 00:14:46 +01:00
Carlo Cabrera
d45832bbfc
Merge pull request #11382 from carlocab/build-rpaths
extend/os/mac/keg_relocate: remove `RPATH`s rooted in build directory
2021-05-15 01:04:25 +01:00
Carlo Cabrera
28c0caae4d
extend/os/mac/keg_relocate: remove RPATHs rooted in build directory
Keeping dangling `RPATH`s is a security risk, and is bad for build
reproducibility.
2021-05-14 01:07:14 +01:00