14125 Commits

Author SHA1 Message Date
Claudia
3dbb735f3c
Fix PKG installer environment
This commit solves an issue where the environment handed to
`/usr/sbin/installer` is not the same as the environment used by the
graphical PKG installer.

This is evident in some post-install scripts, e. g. the
`component-10.pkg/Scripts/postinstall` script in the `dymo-label`
cask. The code says:

```
USER_ID=`id -u ${USER}`

launchctl bootstrap gui/$USER_ID /Library/LaunchAgents/com.dymo.dls.webservice.plist
```

The graphical installer will export e. g. `USER=alice`, and
everything works as intended.

However, `brew cask install` does not override `sudo`’s default,
which is `USER=ROOT`. This violates the assumptions in the script.

This commit fixes the issue by configuring `sudo` to override the
following environment variables with the proper user name:

- `LOGNAME`
- `USER`
- `USERNAME`
2018-07-06 09:38:00 +02:00
Mike McQuaid
9fff177844
Merge pull request #4430 from MikeMcQuaid/handle-build-dep-reqs
formula_installer: correctly handle build dep reqs.
2018-07-05 21:35:38 +01:00
Mike McQuaid
d9f90deb7c download_strategy: use tar xf.
The flags and separate `-` aren't required on 10.5 which is the oldest
version of macOS we support (and it looks nicer this way).
2018-07-05 20:58:35 +01:00
Mike McQuaid
139fef8e74 formula_installer: correctly handle build dep reqs.
When a build dependency has a requirement it should be ignored when
checking for valid requirements. This requires calculating the
dependencies for a formula again and checking them when calculating
which requirements should be pruned.
2018-07-05 20:51:44 +01:00
Mike McQuaid
adcef59bd9
Merge pull request #4428 from MikeMcQuaid/llvm-clang-cxx11
extend/ENV: support CX11 for LLVM Clang.
2018-07-05 20:31:26 +01:00
Mike McQuaid
14364bbaee extend/ENV: support CX11 for LLVM Clang.
Fix some checks for `:clang` which should match for either `:clang` or
`:llvm_clang`. Note that's not every check.
2018-07-05 20:15:57 +01:00
Markus Reiter
59b3c76ee6 Remove unneeded quiet_safe_system usage. 2018-07-05 11:54:33 +02:00
Markus Reiter
f8b8186fa7 Reorder downloader.cached_location assignment. 2018-07-05 11:54:32 +02:00
Markus Reiter
5e3bc85527 Remove unnecessary Pathname check. 2018-07-05 11:54:32 +02:00
Mike McQuaid
9530af4b57
Merge pull request #4422 from commitay/bottle-cop
bottle_block_cop: remove
2018-07-05 08:44:18 +01:00
Markus Reiter
abd855bdad Refactor staging step for download strategies. 2018-07-05 02:40:49 +02:00
commitay
44873fd4c8 bottle_block_cop: remove 2018-07-04 21:25:43 +10:00
Mike McQuaid
0c38ceb6f6
Merge pull request #4411 from commitay/versioned-no-head-spec
audit: disallow unstable specs for versioned formulae
2018-07-04 09:49:49 +01:00
Mike McQuaid
08cbbfab3e
Merge pull request #4418 from reitermarkus/vcs-strategies
Refactor and fix VCS download strategies.
2018-07-04 09:44:14 +01:00
ilovezfs
319baa751f
Merge pull request #4421 from MikeMcQuaid/set-homebrew-temp
config: handle HOMEBREW_TEMP being unset.
2018-07-04 07:34:18 +01:00
Mike McQuaid
77b429291a
Merge pull request #4417 from woodruffw/ruby-macho-2.0
vendor: ruby-macho 2.0
2018-07-04 07:16:10 +01:00
Mike McQuaid
1424b20a3d config: handle HOMEBREW_TEMP being unset.
This can happen when updating from a previous version of Homebrew.
2018-07-04 07:15:14 +01:00
commitay
a185f3272e audit: disallow unstable specs for versioned formulae 2018-07-04 11:39:11 +10:00
commitay
44a78a12a9
Merge pull request #4344 from commitay/cask-audit-all-appcasts
cask audit: check for devmate and hockeyapp appcasts
2018-07-04 11:13:40 +10:00
Markus Reiter
98bc356a59 Use Pathname#/. 2018-07-04 02:26:36 +02:00
Markus Reiter
6b078e5883 Update Gemfile.lock. 2018-07-04 02:26:36 +02:00
Markus Reiter
74ac070b5c Refactor and fix VCS download strategies. 2018-07-04 02:21:09 +02:00
William Woodruff
df4cf455cf
README: Update version 2018-07-03 12:15:51 -04:00
William Woodruff
bace3ac526
vendor: ruby-macho 2.0 2018-07-03 12:11:19 -04:00
Mike McQuaid
0dcf753666
Merge pull request #4415 from MikeMcQuaid/tmp-cleanup
Cleanup HOMEBREW_TEMP handling
2018-07-03 15:59:44 +01:00
Mike McQuaid
f46e4596c0 Cleanup HOMEBREW_TEMP handling
- Ensure that `HOMEBREW_TEMP` is only displayed in `brew config` when
  it's non-default.
- Attempt to create a missing `HOMEBREW_TEMP` directory rather than
  failing to `realpath`. Note this will still fail on permissions errors
  which is to be expected.
2018-07-03 15:41:33 +01:00
ilovezfs
4b97b618df audit: exact match throttled formula names 2018-07-03 01:14:12 -07:00
Mike McQuaid
09ee556833
Merge pull request #4397 from woodruffw/forbid-temp-prefix
brew.sh: Don't allow system tmp dirs as prefixes
2018-07-03 08:31:40 +01:00
Mike McQuaid
c81806543f
Merge pull request #4414 from commitay/stable-block
components_redundancy: audit `stable do` without a head or devel spec
2018-07-03 08:29:52 +01:00
Mike McQuaid
f63ea00c29
Merge pull request #4408 from commitay/dependency_order
audit: exempt versioned formulae from new formula audit
2018-07-03 08:28:02 +01:00
commitay
4dba9fddf1 components_redundancy: audit stable do without a head or devel spec 2018-07-03 11:56:31 +10:00
William Woodruff
fd014153e6
brew.sh: Upcase var, tweak error language 2018-07-02 19:34:19 -04:00
Markus Reiter
cbc3184436
Merge pull request #4357 from reitermarkus/tapped-cask-count
Show tapped casks.
2018-07-02 20:46:33 +02:00
Claudia
79682df8b6
Re-enable tests by removing a stray rspec :focus 2018-07-02 16:01:01 +02:00
commitay
6ca66d18e0 audit: exempt versioned formulae from new formula audit 2018-07-02 23:40:24 +10:00
Mike McQuaid
94409712fe install: don't exit on Homebrew.failed?
This will be set if e.g. pinned packages aren't being upgraded.

Fixes #4388.
2018-07-02 10:25:04 +01:00
dependabot[bot]
0bce59b510
Bump rubocop from 0.57.1 to 0.57.2 in /Library/Homebrew/test
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.57.1 to 0.57.2.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.57.1...v0.57.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-02 05:30:04 +00:00
William Woodruff
68d3dc1368
brew.sh: Only do tmpdir check on macOS 2018-07-01 19:21:50 -04:00
William Woodruff
bde7c6b82b
brew.sh: Use bashisms for default values 2018-07-01 19:19:55 -04:00
Markus Reiter
a15b016ea6 Use if for assignment. 2018-07-02 00:11:42 +02:00
William Woodruff
039a4ee4b3
brew.sh: Move HOMEBREW_TEMP declaration
Additionally, assign HOMEBREW_TEMP based on the host
system (/tmp for Linux, /private/tmp for macOS).
2018-07-01 12:58:32 -04:00
Markus Reiter
9d79cf1e9d Reference RuboCop issue. 2018-07-01 18:48:28 +02:00
Markus Reiter
71a79e7e04 Ignore false RuboCop positive. 2018-07-01 18:48:28 +02:00
Markus Reiter
c6c1eacc18 Rename enumeration to comma_and. 2018-07-01 18:48:28 +02:00
Markus Reiter
785750ee63 Add Tap#contents methods. 2018-07-01 18:48:28 +02:00
Markus Reiter
7671606ddc Add Formatter::enumeration. 2018-07-01 18:48:28 +02:00
Markus Reiter
2aa7597e70 Show tapped casks. 2018-07-01 18:48:28 +02:00
William Woodruff
72bc6b1927
config: Remove /tmp fallback
We provide a /private/tmp fallback in bin/brew, so
this is no longer necessary.
2018-07-01 12:33:14 -04:00
Mike McQuaid
61a8c4d1fb
Merge pull request #4300 from apjanke/new-rubocop-version
Upgrade to Rubocop 0.57.2
2018-07-01 09:08:16 +01:00
Markus Reiter
ad82cd888e Remove unneeded RuboCop comment. 2018-07-01 01:43:04 +02:00