10755 Commits

Author SHA1 Message Date
Mike McQuaid
dffd556220 Merge pull request #704 from eirinikos/add-cmd-audit-unit-tests
tests: add cmd/audit unit tests
2016-08-16 10:40:36 +01:00
Mike McQuaid
87173cb7cd Merge pull request #710 from MikeMcQuaid/list-manpage-tweaks
list: note that `ls` command is used.
2016-08-16 10:25:53 +01:00
Mike McQuaid
8a24d5f942 Merge pull request #513 from MikeMcQuaid/enable-vendor-ruby
Enable vendored Ruby 2.0.
2016-08-16 10:16:49 +01:00
Andrea Kao
5a965d3006 tests: add cmd/audit unit tests (caveats, desc, homepage) 2016-08-15 15:28:06 -07:00
Mike McQuaid
c6151951d6 cmd/postinstall: use Sandbox.formula? method. 2016-08-15 08:33:59 +01:00
Mike McQuaid
6375adc0ff formula_installer: use Sandbox.formula? method. 2016-08-15 08:33:59 +01:00
Mike McQuaid
6e887fbf5a sandbox: add formula? method and sandbox core.
Add a new `Sandbox.formula?` method to see if a given formula should be
sandboxed. Use the formula to check its tap against a list of
pre-approved taps where we know every formula builds under the sandbox
(currently just homebrew/core).
2016-08-15 08:33:58 +01:00
Mike McQuaid
ca3e4fcc1d cmd/test: use Sandbox.test? 2016-08-15 08:33:58 +01:00
Mike McQuaid
fed96385ac sandbox: add test? method.
Simplify checking if we’re going to sandbox a test with `Sandbox.test?`.
2016-08-15 08:33:58 +01:00
Mike McQuaid
b630ab3d17 Merge pull request #421 from apjanke/sanitize-bash_env
brew: sanitize BASH_ENV
2016-08-15 08:04:33 +01:00
Andrew Janke
d57800c45b brew: sanitize BASH_ENV 2016-08-14 17:20:29 -04:00
Tim D. Smith
4309a19a7c Test that sandbox complains correctly
Test that sandbox does not complain about bogus .pyc errors and does
complain about other failures.

Closes #684.
2016-08-14 12:23:17 -07:00
Tim D. Smith
2aad3e052a Don't report .pyc file writes in sandbox logs
These are never fatal and often confusing.

Fixes #683.
2016-08-14 12:21:50 -07:00
Mike McQuaid
4111d29c81 Merge pull request #711 from MikeMcQuaid/update-test-tweak
update-test: tweak master not updated check.
2016-08-14 13:13:50 +01:00
Mike McQuaid
28fe84e5db pull: loosen Jenkins Testing URL. 2016-08-14 12:06:37 +01:00
Mike McQuaid
65164cb386 update-test: tweak master not updated check.
Loosen this a bit; we don't necessarily expect the end commit is the one
we're looking for, just that it has changed from the start commit (i.e.
some sort of update has occurred).

Addresses some false negatives on `master` branch merges that weren't
present on the PR commits.
2016-08-14 11:52:22 +01:00
Mike McQuaid
0695edafa1 list: note that ls command is used.
And arguments can be passed through to it.

Tweak produced out of conversation in
https://github.com/Homebrew/brew-evolution/pull/8.
2016-08-14 10:38:34 +01:00
Mike McQuaid
d5005f4d8b Merge pull request #679 from MikeMcQuaid/ship-auto-update
Ship Homebrew auto-update support.
2016-08-14 10:07:28 +01:00
Mike McQuaid
dd94aca9eb Merge pull request #703 from MikeMcQuaid/search-remove-cache
search: remove thread-unsafe Hash cache.
2016-08-14 10:00:18 +01:00
Mike McQuaid
aa435825d2 Merge pull request #702 from MikeMcQuaid/silence-audit-revisions
Silence auditing formula revisions deprecations
2016-08-14 10:00:13 +01:00
Mike McQuaid
611ba62a24 Merge pull request #689 from MikeMcQuaid/update-force
update: add --force argument.
2016-08-14 10:00:06 +01:00
Mike McQuaid
fcb0b33f16 Merge pull request #682 from eirinikos/extend-cmd-audit-tests
tests: refactor FormulaTextTests in test_cmd_audit, add assertion to test_simple_valid_formula
2016-08-14 09:44:54 +01:00
Mike McQuaid
c008797ffe Merge pull request #677 from sjackman/print-dependencies
install_dependencies: Do not truncate dependencies
2016-08-14 09:44:07 +01:00
Mike McQuaid
5b9fd5c82c Merge pull request #707 from ilovezfs/pull-testing-job-non-core
pull: non-core tap support for Homebrew Testing jobs
2016-08-14 09:43:24 +01:00
Uladzislau Shablinski
b40b072ed8 tab: fix Tab.for_formula versions (#687)
versions should be initialized even if formula is not installed
2016-08-13 21:26:21 +08:00
ilovezfs
7c807d347e pull: non-core tap support for Homebrew Testing jobs
`test-bot --ci-testing` supports a `--tap` option for non-core taps, so
`brew pull` should too when pulling Homebrew Testing jobs.
2016-08-13 02:28:33 -07:00
Mike McQuaid
1e76a207b5 Tell people about update bug in README/issue template. 2016-08-13 08:45:36 +01:00
Dominyk Tiller
36b0666f25
test_gpg: tweak rmtree usage
Swats away this annoying warning when the test is skipped due to GPG being
unavailable:

```
  1) Skipped:
GpgTest#test_create_test_key:
GPG Unavailable

Error:
GpgTest#test_create_test_key:
NoMethodError: undefined method `rmtree' for nil:NilClass
    /usr/local/Library/Homebrew/test/test_gpg.rb:11:in `teardown'
```

Closes #675.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-13 03:33:34 +01:00
Dominyk Tiller
13dcdb3098
test_gpg2_requirement: add satisfied test 2016-08-13 03:33:33 +01:00
Dominyk Tiller
e02ad2242a
gpg_requirement: rename to gpg2_requirement 2016-08-13 03:33:33 +01:00
Dominyk Tiller
e62fc26b9c
gpg_requirement: centralise logic in Gpg class
Removes the detection logic from the Requirement in favour of it living inside
the Gpg class & us calling it from there. It's a bit nicer & avoids us calling
Requirement code from outside of direct requirement handling & fulfillment.
2016-08-13 03:33:33 +01:00
Dominyk Tiller
1591633888
gpg_requirement: add standalone requirement
GPG 1.x has stopped receiving new features, some of which we may well want to
take advantage of sooner or later in Homebrew. Upstream has also been attempting
to work out for a while how well used it still is which suggests it may "go away"
at some point in the future.

Debian is also in the process of migrating GnuPG 1.x to a `gpg1` executable
whilst GnuPG 2.1.x assumes the `gpg` executable. There's a detailed video
discussion of this from DebConf 2015 at:
http://meetings-archive.debian.net/pub/debian-meetings/2015/debconf15/GnuPG_in_Debian_report.webm

It's unsafe to assume every `gpg` executable is going to forever equal 1.x and
every `gpg2` executable is going to forever equal 2.x. MacGPG2 has been symlinking
2.x as a vanilla `gpg` for a while, for example, and we will be soon as well.

You'll still be able to plonk the `libexec/bin` path of `gpg` in your PATH to
access a vanilla `gpg` 1.x executable if you want to, but we're not going to
actively keep adding gpg1 support to formulae going forwards. There's really no
reason why 99.9% of projects should not or cannot use `gpg2` these days.

This uses detection methods to determine regardless of what the executable
is called we're always hitting a 2.0 GnuPG or nothing.
2016-08-13 03:33:33 +01:00
Dominyk Tiller
9515e95ae7
requirements: split out gpg 2016-08-13 03:33:33 +01:00
Shaun Jackman
da52fb67f0 install_dependencies: Do not truncate dependencies
See Homebrew/legacy-homebrew#48449
2016-08-12 20:54:18 -04:00
Shaun Jackman
2b847959f0 oh1: Add a truncate option 2016-08-12 20:54:18 -04:00
Dominyk Tiller
2776f08fa0
gpg: simplify available check
which_all already runs some checks to see if the file is a file & is executable.
Our usage here inside `self.available?` is mostly a smoke test.

Closes #676.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-12 23:46:43 +01:00
Dominyk Tiller
3005582f15
gpg: combine detection logic 2016-08-12 23:46:42 +01:00
Dominyk Tiller
2c81083f3c
test_gpg: add initial tests 2016-08-12 23:46:42 +01:00
Dominyk Tiller
92a6a557f5
gpg: add initial bare-bones wrapper 2016-08-12 23:46:42 +01:00
Andrea Kao
91b67bd41d tests: add assertion to test_simple_valid_formula 2016-08-12 15:21:27 -07:00
Andrea Kao
967a7a1862 tests: refactor FormulaTextTests in test_cmd_audit 2016-08-12 15:20:22 -07:00
Mike McQuaid
b9efa6336e search: remove thread-unsafe Hash cache.
Doesn't appear to affect the speed of `brew search`.

Fixes #415.
2016-08-12 21:29:49 +01:00
Mike McQuaid
e0c8c00e87 formula_versions: set/unset raise_deprecation_exceptions. 2016-08-12 21:07:03 +01:00
Mike McQuaid
c56625f8b7 utils: check raise deprecation exceptions value. 2016-08-12 21:06:41 +01:00
Mike McQuaid
e091e74c0c global: add Homebrew.raise_deprecation_exceptions 2016-08-12 21:06:00 +01:00
Mike McQuaid
b3ea5c2595 Merge pull request #686 from vladshablinsky/completions
Add completions for --fetch-HEAD flag
2016-08-12 20:25:10 +01:00
Mike McQuaid
24fb0068e7 update: add --force argument.
Add a `brew update --force` to side-step all of the clever optimisations
we have to detect if an update is unnecessary. That means if those
optimisations go wrong in future we can tell people just to run this
single command.

This would have been a useful workaround for the issue fixed in 985c672.
2016-08-12 14:22:00 +01:00
Mike McQuaid
58ffe34bc9 Merge pull request #699 from MikeMcQuaid/update-upstream-branch
update.sh: prevent overwriting UPSTREAM_BRANCH.
2016-08-12 10:24:39 +01:00
William Woodruff
97a66aa513 os/mac: Update ruby-macho calls for compatibility with 0.2.5.
Closes #656.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-08-11 22:34:49 +02:00
William Woodruff
5caa812e2c vendor: Update vendored ruby-macho to 0.2.5. 2016-08-11 22:34:49 +02:00