1815 Commits

Author SHA1 Message Date
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
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