17311 Commits

Author SHA1 Message Date
Mike McQuaid
0eff14db55
Merge pull request #7323 from Bo98/std-pc
Revert "ENV/std: withdraw support for Homebrew supplied *.pc files"
2020-04-11 13:12:58 +01:00
Mike McQuaid
73df5891ef
Merge pull request #7283 from claui/fix-make-tmpfile
Ensure TMPDIR is set for Xcode’s `make`
2020-04-11 13:11:30 +01:00
Jonathan Chang
f575eecabc pr-pull: don't try to fetch unneeded artifacts 2020-04-11 19:37:43 +10:00
Jonathan Chang
e974dce16e pr-pull: don't pass dry_run everywhere 2020-04-11 19:26:32 +10:00
Claudia
29538c89cd
Set TMPDIR for Xcode’s make
This fixes an issue where at least in Xcode 11.0, `make` uses
`/var/tmp` as a fallback for temporary files unless `TMPDIR` is set:

```
$ strings "$(xcrun -f make)" | grep -B 3 fopen
TMPDIR
/var/tmp/
GmXXXXXX
fopen (temporary file)
```

Given that Homebrew filtered `TMPDIR`, and the `/var/tmp` directory may
not be writable for non-root users, this would cause Homebrew’s
build environment to error out:

```
$ brew ruby -e 'puts ENV["TMPDIR"]; puts `: | make -f -`'
```

```
Ignoring bigdecimal-2.0.0 because its extensions are not built. Try: gem pristine bigdecimal --version 2.0.0
[…]
Ignoring zlib-1.1.0 because its extensions are not built. Try: gem pristine zlib --version 1.1.0
make: *** fopen (temporary file): Permission denied.  Stop.
```

In practice, this would break `brew audit`, `brew style`, and other
commands, which would run `make` to build native gem extensions.

This commit sets `TMPDIR` to `${HOMEBREW_TEMP}` in the gem environment, which
mirrors the behaviour we already have in other places.
We choose `HOMEBREW_TEMP` because that’s user-controlled but also falls
back to `/tmp` in case `TMPDIR` is not set in the user’s environment.

Thanks to Bo Anderson for helping find the bug.

CC: Bo Anderson <mail@boanderson.me>
2020-04-11 08:01:05 +02:00
Jonathan Chang
945fb11d51 tap: default to --shallow on CI 2020-04-11 13:12:09 +10:00
Markus Reiter
30c313b7b9 Refactor cask command parsing logic. 2020-04-11 01:29:44 +02:00
Bo Anderson
8900e852d6 Revert "ENV/std: withdraw support for Homebrew supplied *.pc files"
This reverts commit fa3591681800f9da06cd2d0179a5ef9e63b10729.
2020-04-10 21:47:54 +01:00
Markus Reiter
5b775afedd
Merge pull request #7322 from reitermarkus/spec-helper
Improve spec helper.
2020-04-10 20:44:06 +02:00
Markus Reiter
a6be0e62af Improve spec helper. 2020-04-10 19:39:43 +02:00
Bo Anderson
e8e6592701 ENV/super: don't set PKG_CONFIG 2020-04-10 18:36:18 +01:00
Jonathan Chang
740e0242fa
Merge pull request #7312 from jonchang/environment-working
env_config: standardize wording, fix some typos
2020-04-10 01:52:00 +10:00
Alexander Bayandin
7a4c1cc8ac bump-revision: fix handling formula with stable block 2020-04-09 16:12:14 +01:00
Mike McQuaid
c3dc8862c1
os/mac/xcode: better document upgrade.
Explain when these various versions should (and should not) be bumped
and provide a method to avoid people having to schlep through the Apple
Developer site unless they really want to.

Also, while we're here, DRY things up and reorder to "newest first".
2020-04-09 14:27:39 +01:00
Jonathan Chang
620dae3680 env_config: standardize and correct wording 2020-04-09 22:45:43 +10:00
Jonathan Chang
2acb4771fe tap: permit creating shallow taps for CI 2020-04-09 18:46:47 +10:00
Mike McQuaid
147294b1ed
Revert "Set HOMEBREW_GITHUB_API_TOKEN from GITHUB_TOKEN." 2020-04-09 09:29:50 +01:00
Mike McQuaid
3146258b60
Merge pull request #7307 from Bo98/make_jobs
ENV/std: restore original make_jobs return type
2020-04-09 08:45:41 +01:00
Bo Anderson
7787dde7b7 dev-cmd/pr-publish: fix undefined method error on invalid input 2020-04-09 01:36:49 +01:00
Bo Anderson
757cc24f7e ENV/std: restore original make_jobs return type 2020-04-08 20:31:04 +01:00
Sean Molenaar
84181f2068
Audit: allow make check for nettle 2020-04-08 19:08:15 +02:00
Bo Anderson
8f12a34ce0 shims/mac/super/xcrun: unset rather than emptying DEVELOPER_DIR 2020-04-08 09:32:29 +01:00
Bo Anderson
2ae26808a6
Merge pull request #7301 from Bo98/cmake-sdkroot
formula: make CMake SDK root choice consistent with superenv (+ SDK root refactoring)
2020-04-07 19:22:04 +01:00
Bo Anderson
811b177cf8 formula: make CMake SDK root choice consistent with superenv 2020-04-07 17:22:16 +01:00
Bo Anderson
e60f071c50 ENV/super: refactor SDK root selection 2020-04-07 17:22:16 +01:00
Bo Anderson
1fe0212ff2 os/mac: add sdk_root_needed? and sdk_for_formula 2020-04-07 17:22:13 +01:00
Bo Anderson
bb33a59c7b os/mac/sdk: add SDK source attribute 2020-04-07 16:43:32 +01:00
Mike McQuaid
6e3a293ed2
Merge pull request #7300 from bayandin/patch-1
Library/Homebrew/rubocops/uses_from_macos: add ssh-copy-id
2020-04-07 16:27:06 +01:00
EricFromCanada
634e30994e bump-formula-pr: use Homebrew::EnvConfig 2020-04-07 10:25:43 -04:00
Alexander Bayandin
1b18a01779
Library/Homebrew/rubocops/uses_from_macos: add ssh-copy-id 2020-04-07 15:04:23 +01:00
Mike McQuaid
bd082011c2
Merge pull request #7280 from issyl0/audit-uses-from-macos
audit: Check if `uses_from_macos` usage is correct
2020-04-07 12:47:30 +01:00
Mike McQuaid
4dd70048d6
rubocops/uses_from_macos: tweak whitelist. 2020-04-07 12:16:17 +01:00
Mike McQuaid
0c78d65b3c
Merge pull request #7275 from MikeMcQuaid/github_token
Set HOMEBREW_GITHUB_API_TOKEN from GITHUB_TOKEN.
2020-04-07 11:14:31 +01:00
Mike McQuaid
147bca8ddd
Merge pull request #7298 from MikeMcQuaid/remove-old-pkgconfig
Remove old pkgconfig files.
2020-04-07 10:51:10 +01:00
Mike McQuaid
64fdf02f07
Merge pull request #7297 from Bo98/pc
os/mac/pkgconfig: supply default homebrew_sdkroot
2020-04-07 10:44:58 +01:00
Mike McQuaid
4e07d7b9f4
Set HOMEBREW_GITHUB_API_TOKEN from GITHUB_TOKEN.
If `HOMEBREW_GITHUB_API_TOKEN` is not set and `GITHUB_TOKEN` is: let's
use it. `GITHUB_TOKEN` is a somewhat standard env var to set for
GitHub authentication tokens (e.g. used by `hub`).
2020-04-07 10:37:58 +01:00
Mike McQuaid
6cfd8065fc
Remove old pkgconfig files.
Homebrew no longer runs on these macOS versions.
2020-04-07 10:17:50 +01:00
Bo Anderson
56dc568fef os/mac/pkgconfig: supply default homebrew_sdkroot 2020-04-07 10:14:38 +01:00
Mike McQuaid
33816131a8
Homebrew::EnvConfig: add tests. 2020-04-07 10:00:32 +01:00
Mike McQuaid
ad75e40ce7
man: generate from Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
fb0052068f
env_config: unify environment variables.
cli/parser but for environment variables. This makes it easier to set,
check, document and set defaults for environment variables in a single
location that can be used for query and documentation generation.
2020-04-07 09:42:18 +01:00
Dario Vladovic
d12784533b
Update options spec 2020-04-06 15:24:15 +02:00
Dario Vladovic
3a21ca8956
Implement mdimporter cask stanza 2020-04-06 15:24:14 +02:00
Issy Long
857393ccfb
Audit correct uses_from_macos usage with RuboCop
- This builds on @jonchang's work that started in #6265.
- We now use `uses_from_macos` to declare dependencies that are implicit
  on macOS because they ship with macOS, but they're needed on Linux. We
  have to be sure that the dependencies people specify as
  `uses_from_macos` are actually shipped with macOS. So, we maintain a
  safelist of those dependencies and check against it.
- Also add more legitimate `uses_from_macos` dependencies to the list.
- This is runnable with `brew audit --only-cops=FormulaAudit/UsesFromMacos`.
- It produces different number of failures on macOS vs. Linux, because
  apparently we've not synced Homebrew/linuxbrew-core upstream thoroughly
  enough yet.
- Originally this was designed as a `--strict` audit, but we flipped it
  to be a normal audit because - to quote Mike - this is "sufficiently
  robust" now.
2020-04-06 13:42:27 +01:00
Dawid Dziurla
842d92a6c5
Merge pull request #7293 from dawidd6/unlink-lock-file
download_strategy: unlink the lock file after unlocking it
2020-04-06 10:29:25 +02:00
Dawid Dziurla
37dcbbaf65
download_strategy: unlink the lock file after unlocking it 2020-04-06 09:56:56 +02:00
Bo Anderson
692b3e5a7b shims/mac/super/pkg-config: fix macOS <=10.13 compatibility
Fixes #7290.
2020-04-05 22:11:31 +01:00
Gautham Goli
ad7e1d48a5
Revert "ARGV: Deprecate ARGV.build_formula_from_source? and ARGV.build_from_source?" 2020-04-05 23:01:57 +05:30
Mike McQuaid
6f50801b37
Merge pull request #7287 from rwhogg/system_command_spec-more-specific-error-message
system_command_spec: Make part of bash error regex optional
2020-04-05 16:39:44 +01:00