8785 Commits

Author SHA1 Message Date
Elliot Saba
2ca6dbbe9d brew.rb: Don't ask xcrun for output if no CLT is installed (#334)
This avoids `xcrun` popups when installing Homebrew on a non-Xcode
non-CLT machine.
2016-06-08 14:53:10 +02:00
Xu Cheng
8d64b6a02d introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.

Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`.
2016-06-08 17:29:03 +08:00
ilovezfs
21ca138edf Resource.unpack: install invisible files and dirs
Since patches sometimes change .gitignore and .travis.yml, it's
desirable to install them along with everything else if a resource needs
patching. Also, for resources that are git respositories, this allows
install to interact with git objects other than the commit specifically
checked out. More generally, this may help to avoid subtle issues by
preserving the fidelity of resources in cases where invisible dot files
play a functional role.

Closes #329.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-07 12:16:43 -07:00
Martin Afanasjew
af42deca4a audit: detect more 'pkgshare' candidates (#328)
The new check also allows the `+` operator instead of our (still heavily
preferred) `/` operator for path concatenation and also triggers if the
operator is surrounded by whitespace.

Also recognizes single-quoted strings and uses a back reference to
match the closing quote for a slightly lower chance of false positives.

Closes #322.
2016-06-07 17:46:40 +02:00
ilovezfs
2cd81e5051 update: pop the stash more quietly
git stash pop -q will print "Already up-to-date!" if untracked changes
are being poppped. This quiets it down unless verbose is set.

Closes #320.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-05 07:55:35 -07:00
Mike McQuaid
14657443ce gist-logs: fix new-issue URL. 2016-06-05 12:40:26 +01:00
Martin Afanasjew
25baaa61ac formula_support: don't fail without CLT/Xcode
`Formula#keg_only?` could fail if it was invoked on a formula with a
`:provided_until_xcode43` or `:provided_until_xcode5` reason given to
`keg_only`, if neither the Command Line Tools nor Xcode was installed.
Check whether Xcode is installed before querying the Xcode version.

Closes #317.
2016-06-05 12:49:38 +02:00
Martin Afanasjew
656c713d6c bottle: use short formula name in bottle commit 2016-06-03 17:04:07 +02:00
Mike McQuaid
822b05c9c1 cmd/pull: fix HTTP header usage. 2016-06-03 15:32:11 +01:00
Mike McQuaid
8a217dd420 update: tweak stash/checkout behavior. (#312)
Always pop stashed changes for Homebrew developers and only checkout
original branches for them (to avoid users who don't understand Git
ending up "stuck" on branches).
2016-06-03 14:12:36 +01:00
Mike McQuaid
5e272257d2 download_strategy: add missing "time" require.
Closes https://github.com/Homebrew/homebrew-core/issues/1687.
2016-06-03 13:46:18 +01:00
Andrea Kao
5ac6eb434e tests: extend cmd/desc integration test (#314) 2016-06-03 13:10:38 +01:00
Mike McQuaid
8e0e1642ad Use curl for the GitHub API (#295)
* Move GitHub API module to utils/github.rb.

* Move curl method to utils/curl.rb.

* global: use long curl arguments and an array.

This makes the code more self-documenting.

* utils/curl: support reading curl's output.

* utils/github: use curl instead of open-uri.

It has far better proxy support.

* pull: set Homebrew user agent.

* gist-logs: remove trailing whitespace.

* gist-logs: use first instead of [0].

Easier to read.

* gist-logs: use curl-based GitHub.open method.
2016-06-03 13:05:18 +01:00
ilovezfs
b2c9625d78 formula_installer: accumulate inherited options
When a given dependency appears multiple times in a formula's dependency
tree, the inherited options for that dependency should accumulate rather
than being overwritten each time that dependency is considered by
expand_dependencies. In particular, this impacts "universal" since the
dependency should be built with universal unless all of its instances in
the dependency tree don't have "universal" as opposed to only if the last
instance considered has "universal."

Closes Homebrew/homebrew-core#1604.

Closes #308.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-02 02:19:58 -07:00
Martin Afanasjew
d2cdbcbb18 tests: add missing require
Amends e4d0187120e61bc80d31ebecc3b38f0740b20bb5. The `require` was
accidentally omitted causing the tests to fail very sporadically (or
always, when invoked as `brew tests --only=integration_cmds`).
2016-06-02 09:36:51 +02:00
Martin Afanasjew
1c00fed119 audit: check Maven Central URLs, prefer redirector (#311)
Should help with being more consistent and makes sure to suggest the
HTTPS redirector even if equally valid HTTP URLs for specific hosts or
`central.maven.org` are used.
2016-06-02 09:36:27 +02:00
Andrea Kao
e4d0187120 tests: extend cmd/home integration test (#305) 2016-06-02 01:26:32 +02:00
Mike McQuaid
4a8fcae3cc update-report: improve cache migration messaging. 2016-06-01 13:03:03 +01:00
Mike McQuaid
8108106cf9 update-report: recreate migration_attempted_file.
If the deletion of `HOMEBREW_CACHE` fails then the
`.migration_attempted` file will have still been deleted so ensure it is
recreated.
2016-06-01 12:47:56 +01:00
Mike McQuaid
9085e67e80 test-bot: set --local HOMEBREW_CACHE correctly.
It defaults to being in $HOME but we override this meaning that we would
destroy the cache every time.
2016-06-01 11:25:58 +01:00
Martin Afanasjew
4da713dd9a xquartz: expect 2.7.9 on 10.6-10.11 (#307) 2016-06-01 11:45:52 +02:00
Mike McQuaid
52ee7bf9e3 update-report: fix Mavericks check. 2016-06-01 09:49:50 +01:00
Mike McQuaid
a9abbab917 Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.

* config: move default HOMEBREW_CACHE to ~/Library.

* brew.1: document new default Homebrew cache.

* update-report: migrate legacy Homebrew cache.
2016-06-01 08:46:33 +01:00
Martin Afanasjew
8486f6e04d Prefer $stderr over STDERR for consistency (#304)
Prior to this change there were only 3 instances of `STD(IN|OUT|ERR)`
versus 74 instances of `$std(in|out|err)` in the Homebrew code base. The
latter variant is also strongly suggested by bbatsov's Ruby Style Guide.
2016-06-01 09:45:49 +02:00
Martin Afanasjew
8e728d6604 style: unify indentation in RuboCop configuration
Some elements already used two-space indentation and we also prefer two
spaces in our Ruby code.

Closes #306.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-01 09:34:58 +02:00
Martin Afanasjew
8b97a00036 style: use RuboCop 0.40 2016-06-01 09:34:58 +02:00
Martin Afanasjew
b9552a5fbf download_strategy: fix git submodule references (#303)
Some Git versions create absolute `gitdir:` pointers in a submodule's
`.git` file, which can be problematic once the resource is staged and
causes various Git operations for those submodules to fail. Work around
this issue by fixing the submodule `.git` files after submodule update.

See Homebrew/homebrew-core#1520 for details and an affected formula.
2016-05-31 17:11:57 +02:00
Dominyk Tiller
0a7fcf2979
audit: appease rubocop
Closes #302.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-05-31 13:33:09 +01:00
Dominyk Tiller
331fdba29d
audit: prefer https/s over ftp where known available
The FTP protocol is prone to getting firewalled to death in places, so where
we know we can avoid that by using either secure or more commonly accepted
protocols let's do so.

Examples of output:

```
* Stable: ftp://ftp.cpan.org/pub/CPAN/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz should be `http://search.cpan.org/CPAN/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz`
* Stable: Please use https:// for ftp://ftp.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.89.tar.bz2
```
2016-05-31 13:32:47 +01:00
Dominyk Tiller
92e35705f8
audit: update mirrorservice check
mirrorservice accepts `http://ftp.mirrorservice.org` as well, apparently.
2016-05-31 13:32:47 +01:00
Dominyk Tiller
eaae49608f
audit: check for insecure metacpan urls 2016-05-31 13:32:47 +01:00
Dominyk Tiller
ff0f394f2e
Revert "audit: tweak cpan secure urls"
This reverts commit 7bbcf9cacc18aabf78a21ec5cc5892d440631e08.
2016-05-31 13:32:47 +01:00
Dominyk Tiller
9b7604df69
Revert "audit: tweak cpan secure urls"
This reverts commit 146a16d66bc796f0c6a4c7e2b88f1b73fb0aaa4c.
2016-05-31 13:32:47 +01:00
Mike McQuaid
f12932cf31 test_integration_cmds: fix when not a developer. 2016-05-30 21:44:59 +01:00
Dominyk Tiller
a112627888
man: changes for 75ab94c 2016-05-30 17:06:23 +01:00
Mike McQuaid
d3ce497607 tap: default to full clones for developers. (#297)
You need a non-shallow clone to push branches upstream so if you often
tap and untap taps (e.g. `homebrew/boneyard`) then you need to remember
to manually `fetch -unshallow`.
2016-05-30 17:01:36 +01:00
Mike McQuaid
12da7d740d test-bot: tweak readall behaviour. (#300)
Check the syntax for Homebrew/brew and don't bother for taps.
2016-05-30 17:01:11 +01:00
Mike McQuaid
d20c1ed146 test-bot: move to dev-cmd. (#298)
This is not a command designed for end-users.
2016-05-30 11:17:52 +01:00
Mike McQuaid
0551471536 tests: no --only minimum coverage requirement. (#299)
This will almost certainly fail every time so let's disable this error.
2016-05-30 10:49:03 +01:00
ilovezfs
6f37394e53 bintray "package" should be name not full_name
Based on how it's used to construct URLs, the bintray "package" should
be the formula name not the formula full_name. For core formulae, there
is no difference, but that's not the case in other taps.

See https://github.com/Homebrew/homebrew-gui/pull/10

Closes #301.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-05-30 02:26:31 -07:00
Mike McQuaid
01b6787aa8 audit: make system check stricter with quotes.
As mentioned in:
https://github.com/Homebrew/homebrew-core/pull/1396#discussion_r64774080
2016-05-29 22:52:26 +01:00
Tomasz Pajor
146a16d66b audit: tweak cpan secure urls 2016-05-29 11:07:19 +02:00
Tomasz Pajor
7bbcf9cacc audit: tweak cpan secure urls 2016-05-29 11:03:50 +02:00
Mike McQuaid
adc293637f test-bot: don't brew tests for formula PRs. (#294)
This adds >1m to every build on every node and it can't actually be
affected/fixed by formula PRs.
2016-05-28 21:42:30 +01:00
Mike McQuaid
60cb841ddb pull: remove legacy retry block. 2016-05-28 20:12:00 +01:00
Mike McQuaid
7829af7508 bottle/test-bot: deep merge bottle JSON hashes. 2016-05-28 20:11:07 +01:00
Mike McQuaid
28d99940de pull: remove legacy-homebrew support. (#293)
There's no more pull requests left to pull on this repository.
2016-05-28 19:35:05 +01:00
Mike McQuaid
2f1be1f36f test-bot: only test --no-compat for Homebrew/brew. (#286)
This job takes almost a minute and it's not useful for all core taps
to run this.
2016-05-28 18:49:08 +01:00
Mike McQuaid
f946693b56 test-bot: remove support for legacy Homebrew repo. (#287)
We're not really getting any more PRs here and this code makes this file
harder to follow and refactor.
2016-05-28 18:48:51 +01:00
Mike McQuaid
9edb1a7a87 bottle: JSON-related tweaks/fixes. 2016-05-28 16:46:34 +01:00