14741 Commits

Author SHA1 Message Date
Chongyu Zhu
93cac4ccee
utils/analytics: make curl respect HOMEBREW_CURLRC 2018-09-14 18:50:03 +08:00
Mike McQuaid
1b45666518
Merge pull request #4891 from zgracem/add-commas-to-analytics
use 'number_readable' when displaying analytics
2018-09-13 14:30:15 +01:00
Mike McQuaid
7c056124e5
Merge pull request #4767 from amyspark/upgrade-relink
Upgrade: implement linkage repair
2018-09-13 14:29:58 +01:00
Mike McQuaid
f3ea2a85da
Merge pull request #4890 from sjackman/elide-root-url
Elide default root_url in the bottle block
2018-09-13 14:29:45 +01:00
Mike McQuaid
44bcf69d1f
cmd/shellenv: use Bash.
This speeds up execution by 3x on my machine and the script is simple
enough to warrant this.
2018-09-13 09:27:44 +01:00
Mike McQuaid
be983cfcdf
info: also make verbose output readable. 2018-09-13 09:07:43 +01:00
Mike McQuaid
73e8bf68c7
Merge pull request #4892 from scpeters/bottle_keep-old_root-url
dev-cmd/bottle: fix --keep-old with --root-url
2018-09-13 08:57:26 +01:00
Markus Reiter
705f8b7616
Merge pull request #4873 from reitermarkus/pax
Fix extracting `.pax` archives.
2018-09-13 05:21:44 +02:00
Markus Reiter
1130e1d24e
Merge pull request #4812 from alecclarke/increase-messages-unit-test-coverage
Increase the unit test coverage of messages.rb
2018-09-13 05:20:30 +02:00
Steven Peters
c4ba06c9fc dev-cmd/bottle: fix --keep-old with --root-url
Don't strip the : from root_url when using --keep-old.
Closes #4554.
2018-09-12 14:48:43 -07:00
Z. Grace Moreau
0aadc1e4e6 use 'number_readable' when displaying analytics 2018-09-12 14:47:40 -06:00
Shaun Jackman
e4f4e0f98b Elide default root_url in the bottle block 2018-09-12 13:10:46 -07:00
L. E. Segovia
d442905719
Upgrade: implement linkage repair
After upgrading existing kegs, we now search and upgrade their
dependents as well. If any are detected that have broken linkage, they
are reinstalled from source.

If there are any formulae in the dependents tree that are pinned, they
are only reinstalled if they're not outdated; in all cases, a suitable
message is printed detailing the kegs that will be acted upon.
2018-09-12 19:28:02 +00:00
Shaun Jackman
a37d46f195
Merge pull request #4772 from alebcay/linuxbrew-merge
Set HOMEBREW_BOTTLE_DEFAULT_DOMAIN based on operating system
2018-09-12 11:11:13 -07:00
Alec Clarke
e6409f6a09 Increase the unit test coverage of messages.rb
This increases the messages.rb unit test coverage to 100%.
2018-09-12 06:11:38 -07:00
Markus Reiter
375088c97c
Merge pull request #4872 from reitermarkus/cleanup-resolve-formulae
Resolve formulae in `brew cleanup`.
2018-09-12 12:48:34 +02:00
Mike McQuaid
23da378dd8
Merge pull request #4882 from Homebrew/dependabot/bundler/Library/Homebrew/test/parser-2.5.1.2
Bump parser from 2.5.1.0 to 2.5.1.2 in /Library/Homebrew/test
2018-09-12 08:31:37 +01:00
Mike McQuaid
3983db700f
Merge pull request #4881 from Homebrew/dependabot/bundler/Library/Homebrew/test/rspec-expectations-3.8.1
Bump rspec-expectations from 3.8.0 to 3.8.1 in /Library/Homebrew/test
2018-09-12 08:31:23 +01:00
Mike McQuaid
9e9845a5d4
Merge pull request #4879 from Homebrew/dependabot/bundler/Library/Homebrew/test/docile-1.3.1
Bump docile from 1.3.0 to 1.3.1 in /Library/Homebrew/test
2018-09-12 08:30:57 +01:00
dependabot[bot]
727b1e5ec8
Bump ruby-progressbar from 1.9.0 to 1.10.0 in /Library/Homebrew/test
Bumps [ruby-progressbar](https://github.com/jfelchner/ruby-progressbar) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/jfelchner/ruby-progressbar/releases)
- [Changelog](https://github.com/jfelchner/ruby-progressbar/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jfelchner/ruby-progressbar/compare/releases/v1.9.0...releases/v1.10.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-12 05:26:09 +00:00
dependabot[bot]
1ce9c3841c
Bump parser from 2.5.1.0 to 2.5.1.2 in /Library/Homebrew/test
Bumps [parser](https://github.com/whitequark/parser) from 2.5.1.0 to 2.5.1.2.
- [Release notes](https://github.com/whitequark/parser/releases)
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v2.5.1.0...v2.5.1.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-12 05:26:07 +00:00
dependabot[bot]
e75ed35a44
Bump rspec-expectations from 3.8.0 to 3.8.1 in /Library/Homebrew/test
Bumps [rspec-expectations](https://github.com/rspec/rspec-expectations) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/rspec/rspec-expectations/releases)
- [Changelog](https://github.com/rspec/rspec-expectations/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-12 05:26:05 +00:00
dependabot[bot]
0c1fea35ff
Bump docile from 1.3.0 to 1.3.1 in /Library/Homebrew/test
Bumps [docile](https://github.com/ms-ati/docile) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/ms-ati/docile/releases)
- [Changelog](https://github.com/ms-ati/docile/blob/master/HISTORY.md)
- [Commits](https://github.com/ms-ati/docile/compare/v1.3.0...v1.3.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-12 05:25:41 +00:00
Shaun Jackman
3c4f9c746e Elide prefix "/usr/local" in bottle block
brew test-bot --ci-upload is run on a Linux machine.
The macOS bottles have a prefix of "/usr/local".
The default prefix on Linux is /home/linuxbrew/.linuxbrew.
Elide prefix "/usr/local" in the bottle block, even it does not match
the default prefix. Ditto for cellar.
2018-09-11 14:21:33 -07:00
Markus Reiter
06549c751b Fix extracting .pax archives. 2018-09-11 19:22:19 +02:00
Shaun Jackman
f6093961ef Add Homebrew::DEFAULT_PREFIX for Linux
The default prefix is /usr/local on macOS
and /home/linuxbrew/.linuxbrew on Linux.
2018-09-11 09:57:08 -07:00
Markus Reiter
769d89dead Resolve formulae in brew cleanup. 2018-09-11 17:44:39 +02:00
Markus Reiter
5cff91ac75 Don’t add error when changing checksum to :no_check. 2018-09-11 14:02:53 +02:00
Mike McQuaid
88e69f5a88
Merge pull request #4868 from MikeMcQuaid/update-follow-redirect
cmd/update: follow GitHub API redirects.
2018-09-10 14:56:13 +01:00
Caleb Xu
25817d3589 Set HOMEBREW_BOTTLE_DEFAULT_DOMAIN based on operating system 2018-09-09 15:29:27 -04:00
Vítor Galvão
80fb4d8374
Merge pull request #4865 from ericmarkmartin/upgrade-dispay-prev-vsn
Cask: show previous verison in cask upgrade
2018-09-09 19:21:31 +01:00
Eric Mark Martin
c62d2e6918 Cask: rename block argument f -> cask 2018-09-09 13:37:42 -04:00
Mike McQuaid
dc7b73171c
cmd/update: follow GitHub API redirects.
Fixes #4867
2018-09-09 17:55:09 +01:00
Mike McQuaid
1fe8cf7079
Merge pull request #4858 from cblecker/bump-pr-protocol
Determine remote_url using git config
2018-09-09 15:18:49 +01:00
Eric Mark Martin
28061369dc Cask: show previous verison in cask upgrade 2018-09-09 00:47:31 -04:00
Claudia
45bbf043c3
Merge pull request #4852 from amyspark/quarantine-per-install
Cask: fixes for quarantining
2018-09-08 22:47:50 +02:00
L. E. Segovia
124a8109ce
Cask: rename no-translocation-bit changer function 2018-09-08 20:20:55 +00:00
L. E. Segovia
c7c14e1333
Cask: split quarantine/release functions 2018-09-08 14:00:44 +00:00
Markus Reiter
7bb35e1683
Merge pull request #4847 from reitermarkus/range-support
Check for range support instead of rescuing error.
2018-09-08 15:50:03 +02:00
Shaun Jackman
922843f047
Merge pull request #4849 from jamescostian/shellenv
Add brew shellenv - see #4780
2018-09-07 13:28:42 -07:00
Christoph Blecker
5f18f0bb03
Determine remote_url using git config 2018-09-07 11:08:35 -07:00
L. E. Segovia
53b95c6260
Cask: use native chmod to set write permissions
Ruby chmod follows symlinks, which can point to non-existent files. This
should fix quarantining Casks e.g. disk-inventory-x.
2018-09-07 16:57:00 +00:00
James Costian
18d38d7b76
Add brew shellenv - see #4780 2018-09-07 11:37:14 -05:00
L. E. Segovia
ab31af2b4b
Cask: fixes for quarantining
Gatekeeper's Path Randomization is currently making automated
installation a nightmare. Let's manually toggle the (undocumented) app
translocation bit in the `com.apple.quarantine` extended attribute.

While we're at it, let's also toss in some fixes:

- zip downloads with improper permissions that prevent us from
quarantining
- quarantine/release/skip downloads as requested by the user
2018-09-07 15:37:31 +00:00
Mike McQuaid
2d71299675
keg: don't require Caskroom to be writable.
This isn't the case on our CI for now.
2018-09-07 09:39:32 +01:00
Mike McQuaid
a2f5355ca8
Merge pull request #4844 from MikeMcQuaid/improve-writable-directory-handling
Improve writable directory handling
2018-09-07 08:28:42 +01:00
Mike McQuaid
7615d3a812
Improve writable directory handling
Consolidate the handling of which directories need to exist and which
need to be writable. Additionally, add a fatal check for formula
installations to ensure that any directories that need to be writable
are so before attempting an installation.

Fixes #4626.
2018-09-06 18:38:43 +01:00
Mike McQuaid
8778cc308a
Merge pull request #4832 from sjackman/linkage-checker
LinkageChecker: Report linkage of unwanted system libraries [Linux]
2018-09-06 16:44:56 +01:00
Markus Reiter
072127197a Check for range support instead of rescuing error. 2018-09-06 16:25:22 +02:00
Mike McQuaid
c60fe60377
cmd/info: display analytics data.
When users don't have `HOMEBREW_NO_ANALYTICS` or
`HOMEBREW_NO_GITHUB_API` set let's display some analytics data in
`brew info`. This should be useful for both maintainers and for users of
Homebrew.

Note this by default combines all installs across options for a single
number; for formulae with lots of options it's a bit overwhelming to
print the installs per-option. However, for `HOMEBREW_DEVELOPER`s print
the full output.

Sample non-developer output:

```console
$ brew info wget
wget: stable 1.19.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
/usr/local/Cellar/wget/1.19.5 (49 files, 3.7MB) *
  Built from source on 2018-09-03 at 20:46:32
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
==> Dependencies
Build: pkg-config ✔
Required: libidn2 ✔, openssl ✔
Optional: pcre ✔, libmetalink ✘, gpgme ✘
==> Options
--with-debug
	Build with debug support
--with-gpgme
	Build with gpgme support
--with-libmetalink
	Build with libmetalink support
--with-pcre
	Build with pcre support
--HEAD
	Install HEAD version
==> Analytics
install: 84638 (30d), 353800 (90d), 1372775 (365d)
install_on_request: 77926 (30d), 291305 (90d), 1044898 (365d)
build_error: 11 (30d)
```

Sample developer output:
```console
$ brew info wget
wget: stable 1.19.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
/usr/local/Cellar/wget/1.19.5 (49 files, 3.7MB) *
  Built from source on 2018-09-03 at 20:46:32
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
==> Dependencies
Build: pkg-config ✔
Required: libidn2 ✔, openssl ✔
Optional: pcre ✔, libmetalink ✘, gpgme ✘
==> Options
--with-debug
	Build with debug support
--with-gpgme
	Build with gpgme support
--with-libmetalink
	Build with libmetalink support
--with-pcre
	Build with pcre support
--HEAD
	Install HEAD version
==> Analytics
==> install (30d)
wget: 84516
wget --with-debug: 51
wget --with-libressl: 16
wget --with-pcre: 14
wget --with-pcre --with-libmetalink --with-gpgme: 12
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 8
wget --HEAD: 3
wget --HEAD --with-debug --with-libmetalink --with-gpgme: 3
wget --with-gpgme: 3
wget --with-libmetalink: 3
wget --with-pcre --with-libmetalink: 3
wget --with-debug --with-pcre: 2
wget --with-libmetalink --with-gpgme: 2
wget --with-pcre --with-gpgme: 2
==> install (90d)
wget: 353131
wget --with-debug: 188
wget --with-pcre: 138
wget --with-pcre --with-libmetalink --with-gpgme: 118
wget --with-libressl: 81
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 47
wget --with-pcre --with-libmetalink: 31
wget --HEAD: 13
wget --with-pcre --with-gpgme: 12
wget --with-gpgme: 11
wget --with-debug --with-pcre: 10
wget --with-libmetalink: 8
wget --HEAD --with-pcre --with-libmetalink --with-gpgme: 4
wget --with-debug --with-pcre --with-libmetalink: 4
wget --with-libmetalink --with-gpgme: 4
==> install (365d)
wget: 1369530
wget --with-pcre: 810
wget --with-debug: 649
wget --with-pcre --with-libmetalink --with-gpgme: 554
wget --with-libressl: 479
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 235
wget --with-pcre --with-libmetalink: 184
wget --with-gpgme: 67
wget --with-pcre --with-gpgme: 67
wget --with-debug --with-pcre: 65
wget --HEAD: 54
wget --with-libmetalink: 30
wget --with-libmetalink --with-gpgme: 27
wget --with-debug --with-pcre --with-libmetalink: 24
==> install_on_request (30d)
wget: 77827
wget --with-debug: 48
wget --with-pcre: 12
wget --with-pcre --with-libmetalink --with-gpgme: 11
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 8
wget --HEAD: 3
wget --HEAD --with-debug --with-libmetalink --with-gpgme: 3
wget --with-gpgme: 3
wget --with-libmetalink: 3
wget --with-debug --with-pcre: 2
wget --with-libmetalink --with-gpgme: 2
wget --with-pcre --with-gpgme: 2
wget --with-pcre --with-libmetalink: 2
==> install_on_request (90d)
wget: 290818
wget --with-debug: 157
wget --with-pcre --with-libmetalink --with-gpgme: 101
wget --with-pcre: 100
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 42
wget --with-pcre --with-libmetalink: 30
wget --HEAD: 13
wget --with-pcre --with-gpgme: 11
wget --with-gpgme: 10
wget --with-debug --with-pcre: 8
wget --with-libmetalink: 7
wget --HEAD --with-pcre --with-libmetalink --with-gpgme: 4
wget --with-debug --with-pcre --with-libmetalink: 4
==> install_on_request (365d)
wget: 1042845
wget --with-pcre: 504
wget --with-debug: 458
wget --with-pcre --with-libmetalink --with-gpgme: 432
wget --with-debug --with-pcre --with-libmetalink --with-gpgme: 201
wget --with-pcre --with-libmetalink: 158
wget --with-gpgme: 61
wget --HEAD: 54
wget --with-pcre --with-gpgme: 49
wget --with-debug --with-pcre: 47
wget --with-debug --with-pcre --with-libmetalink: 24
wget --with-libressl: 23
wget --with-libmetalink: 22
wget --with-libmetalink --with-gpgme: 20
==> build_error (30d)
wget: 9
wget --HEAD: 1
wget --with-debug: 1
```
2018-09-06 14:18:30 +01:00