9434 Commits

Author SHA1 Message Date
Alex Wang
d09698f19f Add -DNDEBUG to std_cmake_args
CMake has -DNDEBUG and -O3 as its default flags for Release builds.
Homebrew clears out the default CMake flags, which is fine for
optimization because Homebrew passes its own optimization flag(s).
-DNDEBUG wasn't added back in, though.

This ensures -DNDEBUG is passed to CMake release builds by default,
instead of individual formulas having to add it explicitly.

This also removes explicit additions of -DNDEBUG from the formulae that
had them -- gflags, llvm, and taglib.

Closes Homebrew/homebrew#47378.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-26 21:50:51 +00:00
Stefano Pigozzi
e865cee3d3 Fix version parsing on URLs with no extensions 2015-12-26 21:47:14 +00:00
Cameron Sparr
30455d0fb5 Formula-Cookbook: recommend gdm for go resources
Closes Homebrew/homebrew#46889.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-12-26 20:18:44 +00:00
Xu Cheng
e27bddc82a IntegrationCommandTests: improve bottle test
Also let `cmd_output` capture `$stderr`

Closes Homebrew/homebrew#47383.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-26 18:08:45 +08:00
Xu Cheng
f37f8b5c7a bottle: prevent bottling formula outside core or taps
Closes Homebrew/homebrew#47233.
2015-12-26 18:08:44 +08:00
Joao Antunes
61a47a4c0f doctor: check_access_usr_local mention Cocktail.
Added mention to Cocktail app cleanup/repair/optimizations, that has
some features that when run they restore the /usr/local directory to
the original 'not writable' state in OS X 10.11 .

Closes Homebrew/homebrew#47379.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-26 07:37:44 +00:00
Xu Cheng
c318a9a03e tap: improve arguments resolution
* Use `ARGV.include?` instead of `ARGV.first ==`, so users can pass
  `-v`/`-d` before the function flags(i.e. `--list-pinned` etc)
* Restore the ability to call `brew tap --flags tap/name`.
2015-12-26 13:01:52 +08:00
Miëtek Bak
68361be36c Improve Haskell language support
Removes the need to call setup_ghc_compilers in every Haskell language
formula, by automatically calling fails_with.

Adds a :home option to the cabal_sandbox method.  This option allows a
specific temporary HOME to be used instead of the current working
directory, and in turn allows a single Cabal package database to be reused
between multiple calls to this method.

Avoids updating the Cabal package database more than once if cabal_sandbox
is called multiple times.

Removes the need to call cabal_clean_lib whenever cabal_sandbox is called,
by automatically cleaning the lib directory.

Adds a :keep_lib option to the cabal_sandbox method.  This option allows
opting out of the automatic cleaning.

Ensures build products are always removed from the current working
directory.

Removes a workaround for versions of cabal-install older than 1.20.0.0.

Adds a cabal_sandbox_add_source method.

Adds a :using option to the install_cabal_package method.  This option
allows specifying the Haskell language tools that are required to install
a particular formula, and in turn allows formulae to be simplified by
replacing calls to multiple methods with a single call to this method.

Allows customizing the call to install_cabal_package by giving a block.

Removes empty method shells.

Closes Homebrew/homebrew#47293.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-25 21:05:28 +00:00
Tomasz Pajor
0f86677ffc travis.yml: bump ulimit to 1024
Closes Homebrew/homebrew#43635.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-25 20:13:10 +00:00
Mike McQuaid
75ae0cfb3a tap: don't backtrace on invalid options.
Closes Homebrew/homebrew#47162.
2015-12-25 18:25:01 +00:00
Baptiste Fontaine
86bd9c9f39 tests: pass --trace and named args to rake
Closes Homebrew/homebrew#47279.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-23 12:33:32 +01:00
Baptiste Fontaine
755ca5da6c blacklist tests added
Closes Homebrew/homebrew#47280.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-23 12:33:30 +01:00
Martin Afanasjew
8d3f33de90 bin/brew: enforce UTF-8 locale
Everyone should be using a UTF-8 locale nowadays. Not using one causes
issues like `brew doctor` failing while checking symbolic links that
point at file names with non-ASCII characters, since OS X always uses
Unicode for the file system.

Rely on `locale charmap` to detect the currently selected encoding and
if that's not UTF-8, override the user's choice (if any) by setting
`LC_ALL` to `en_US.UTF-8`, the assumption being that every system has a
usable `en_US.UTF-8` locale installed.

Fixes Homebrew/homebrew#44744.
Closes Homebrew/homebrew#47247.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2015-12-23 06:54:11 +01:00
Martin Afanasjew
8e4fad8969 ENV: avoid misleading Fortran setup warnings
Fixes Homebrew/homebrew#31156.
Closes Homebrew/homebrew#47246.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2015-12-23 06:54:04 +01:00
Sebastian Staudt
f0a370ea12 Reimplement #pretty_duration
Also reuse this improved implementation in the GitHub rate limit errors.

Closes Homebrew/homebrew#44721.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-22 12:46:03 +01:00
Mike McQuaid
2392574a77 brew.rb: only print "Kernel.exit" on failures.
Also, print as a warning to STDERR and print a backtrace in debug mode.

Closes Homebrew/homebrew#47099.

Closes Homebrew/homebrew#47154.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-21 10:05:49 +00:00
Øyvind Ingebrigtsen Øvergaard
cf2bf08ec9 bottle: don't read mtime from nonexistant files
If the source contains a broken symlink, `brew bottle` would fail for no
good reason when trying to determine the most recently modified
file. To avoid this, we ignore any files for which stat(2) fails.

Closes Homebrew/homebrew#47111.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-21 07:54:30 +00:00
Xu Cheng
28776ee1c3 tests: add coveralls support
Closes Homebrew/homebrew#47185.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-21 12:14:49 +08:00
Xu Cheng
51efa46fcc test-bot: enable coverage on travis 2015-12-21 12:14:48 +08:00
Baptiste Fontaine
a6d2723ef5 more core unit tests
Closes Homebrew/homebrew#47182.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-20 12:11:40 +01:00
Xu Cheng
f258949816 add IntergrationCommandTests#test_tap
Closes Homebrew/homebrew#47177.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-19 22:05:31 +08:00
Xu Cheng
fe2bec5e8b add IntergrationCommandTests#test_readall 2015-12-19 22:05:30 +08:00
Xu Cheng
6bb341dc24 add test_tap 2015-12-19 22:05:30 +08:00
Xu Cheng
ef7a5cfa3a Tap#unlink_manpages: fix symlink path 2015-12-19 22:05:30 +08:00
Xu Cheng
7efae4635b Tap#unpin: remove PinnedTaps directory if it's empty 2015-12-19 22:05:30 +08:00
Xu Cheng
0f84b976ba move CoreFormulaRepository into separate file
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:

  Error: uninitialized constant Formulary::CoreFormulaRepository

This is caused by the same bug described in Homebrew/homebrew#42553.

This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.

Also cleanup legacy `require "cmd/tap"`.
2015-12-19 22:05:30 +08:00
Xu Cheng
f72d4f1722 readall: use Tap object to locate alias directory
Let's hide implementation detail on where to find alias directory.
This will benefit future core code and formulae separation.

Also let `brew readall` check aliases for all taps.
2015-12-19 22:05:30 +08:00
Xu Cheng
430cfbb557 readall: allow interrupt 2015-12-19 22:05:30 +08:00
Xu Cheng
82eb1a4c42 formulary: use CoreFormulaRepository
Let's hide implementation detail on where to find core formulae alias
directory. This will benefit future core code and formulae separation.
2015-12-19 22:05:30 +08:00
Xu Cheng
203000cee6 update-test: allow setting start commit
To use origin/master as start commit
  brew update-test

To use <sha1> as start commit
  brew update-test --commit=<sha1>

To use commit at <date> as start commit
  brew update-test --before=<date>

Also print start/end commit for debug purpose
2015-12-19 22:05:30 +08:00
Xu Cheng
0f60f76f26 lsyncd: use MACOS_FULL_VERSION
This commit partial reverts beed39e46fa021dd1c133c2c8eaaa81b524e68c7.

For users whose local brew is at around 2015-06-02 to 2015-06-11,
running `brew update` will emit following error:

  Error: undefined method 'full_version' for OS::Mac:Module

This is caused by the same bug described in Homebrew/homebrew#42553.

Let's use `MACOS_FULL_VERSION` for now to restore `brew update` compatibility
for these users.

TODO: revert this commit after core code and formulae separation.
2015-12-19 21:14:12 +08:00
Dominyk Tiller
e00216e4e5 cmd/cleanup: cleanup java_cache 2015-12-18 23:32:56 +00:00
Dominyk Tiller
b331e03c39 env: add java_cache env 2015-12-18 23:32:56 +00:00
Mike McQuaid
ca3952c500 Add some more integration command tests.
Add them for `install`, `bottle`, `uninstall`, `cleanup`.

Closes Homebrew/homebrew#47079.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-18 09:14:16 +00:00
Steven Willis
bab10696db mydumper: MySQL Data Dumper and Loader
* Include install option --without-docs to disable creation of docs
 * Include patch to successfully find osx dylibs and ignore glib static libs
 * Remove mydumper from tap_migrations.rb

Closes Homebrew/homebrew#45892.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2015-12-17 22:25:34 -05:00
Martin Afanasjew
ea4d137e87 dependency: fix merging tags in 'merge_repeats'
While it may suffice to merge string and non-reserved tags by forming a
union of all tags of dependencies of the same name, this approach fails
to work for the reserved tags. These are now merged such that the most
restrictive tag (meaning sometimes an empty tag) is preserved.

The previous behavior caused essential dependencies to be omitted and
builds to fail in response. E.g., multiple `:fortran` dependencies with
tags `[]`, `[:recommended]`, and `[:optional]` would have been expanded
and merged to `"gcc"` with tags `[:recommended, :optional]`, causing it
to be no longer seen as a required dependency.

Closes Homebrew/homebrew#47040.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2015-12-17 13:50:38 +01:00
Martin Afanasjew
0f9abe57ea tests: add (failing) tests for merging deps tags
The general idea is that merging multiple dependencies of the same name
should produce the strictest tag instead of a (meaningless) union of the
reserved tags. For example, if a dependency is both a `:recommended` and
an `:optional` dependency at different points in the dependency tree,
the resulting merged dependency should be tagged as `:recommended`.
Handle all other reserved tags in the same spirit.
2015-12-17 13:50:38 +01:00
Martin Afanasjew
10f066197e tests: rely on fewer implementation details
These tests were using too much semi-global state (instance variables)
and relied unnecessarily on the exact number of calls to `optional?` and
`recommended?` in the `Depedable` module.
2015-12-17 13:50:38 +01:00
Martin Afanasjew
6d802d8087 travis: use Xcode 7.2 on 10.11 and 7.1.1 on 10.10
Closes Homebrew/homebrew#47056.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2015-12-16 19:58:01 +01:00
Martin Afanasjew
02cd2c899a bottle: fix Ruby 1.8 breakage
`OpenStruct` (of which `Tab` is a subclass) doesn't support subscripting
with square brackets. Use normal dot notation to restore compatibility.
2015-12-16 02:12:50 +01:00
Mike McQuaid
b0e39203fe bottle: don't use empty tab. 2015-12-15 17:05:24 +00:00
Baptiste Fontaine
50f94e5233 audit: don't fail if there's no tap
Closes Homebrew/homebrew#47041.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-15 15:52:05 +01:00
Mike McQuaid
214c865167 bottle: make bottle checksums reproducible.
I've set all the variable data to versions that are dependent on the
latest source file date and various modification dates also to the
latest source file date. With this if you rerun `brew bottle`
multiple times in a row you will see the same checksum even if you have
`brew reinstall`ed (as long as upstream does not hardcode e.g. the
build date).

I debugged this with diffoscope and worked on this as part of the
Athens 2015 reproducible builds workshop:
https://reproducible-builds.org/events/athens2015/

Closes Homebrew/homebrew#46587.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-15 14:24:18 +00:00
Mike McQuaid
e5ba31fcdc Allow multiple option_names in dep/reqs.
This means that dependencies can be merged but still maintain all
their option names.

Closes Homebrew/homebrew#46916.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-15 08:37:16 +00:00
Mike McQuaid
484c70d19f test_dependency: add failing option names test.
This test will obviously fail but it does mark that the option names
are not being merged correctly.
2015-12-15 08:37:16 +00:00
Mike McQuaid
7095378b31 Add option_name tests. 2015-12-15 08:37:16 +00:00
Martin Afanasjew
a4a2b305f2 formula_installer: prefer 'Dependable#run?'
Both `req.tags.include?(:run)` and `req.run?` are currently equivalent,
but the latter relies less on implementation details.
2015-12-15 05:36:05 +01:00
Baptiste Fontaine
f1ac9b5776 pretty_duration: fixed for int arguments
Without this the returned string is not as accurate if the method is
called with an int larger than 120.

Closes Homebrew/homebrew#47002.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-14 16:34:12 +01:00
Baptiste Fontaine
9127ee1928 plural: tests added 2015-12-14 15:01:31 +01:00
Baptiste Fontaine
fedbb06278 os/mac: indent fixes 2015-12-14 13:50:00 +01:00