1309 Commits

Author SHA1 Message Date
Markus Reiter
071108b868 Fix atomic_write inside non-sticky directory. 2018-10-02 15:58:34 +02:00
Shaun Jackman
447baab9a0 DevelopmentTools::locate: Prefer brewed tools [Linux] 2018-10-01 15:34:47 -07:00
Markus Reiter
bec5272c77
Merge pull request #5000 from reitermarkus/7z
Don’t treat `.7z` as part of a version.
2018-10-01 10:25:41 +02:00
Shaun Jackman
1cdc34eec3 Default compiler is gcc on Linux 2018-09-30 11:20:35 -07:00
Mike McQuaid
1ee8c60834
Merge pull request #4994 from MikeMcQuaid/config-hide-optional
config: hide optional system packages.
2018-09-30 12:49:23 +01:00
Mike McQuaid
566b5b45ef
os/mac/diagnostic: don't complain about Xcode version on Azure.
It hasn't been updated yet and we want to be able to update the Xcode
versions for everyone else.
2018-09-30 11:10:19 +01:00
Mike McQuaid
78ddc34847
config: hide optional system packages.
Java, XQuartz and the CLT separate header package aren't required for
everyone's Homebrew usage or a default macOS development install.

As a result, only show then in `brew config` when they are actually
installed.
2018-09-30 10:50:37 +01:00
Markus Reiter
c430baaee8 Don’t treat .7z as part of a version. 2018-09-29 10:32:18 +02:00
Shaun Jackman
c0f07db656 Symlink ld.so [Linux] 2018-09-28 14:01:09 -07:00
Mike McQuaid
59c858a8e8
Cleanup Travis and CI configuration.
Use the environment variables set by `brew test-bot`. Eventually we'll
disable Travis CI running CodeCov so move `TRAVIS` references to
`HOMEBREW_TRAVIS_CI` so it doesn't need whitelisted.

Also, fix `azure-pipelines.yml` so it's testing the correct version of
Homebrew/brew (the one checked out in the `pwd`).
2018-09-19 15:01:33 +01:00
Mike McQuaid
ead23d1f4c
Use ActiveSupport File.atomic_write
nd delete our own implementation.
2018-09-18 09:20:40 +01:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
3a0a9f9073 Add String#delete_prefix backport. 2018-09-16 20:07:34 +02:00
Mike McQuaid
955214abc0
Use ActiveSupport Object#blank? and #present? 2018-09-14 17:02:19 +01:00
Mike McQuaid
d7eca0b57c
Use Bundler to manage vendor directory
Rather than having to manually keep track of what version each thing in
here is and copy files around by hand on update let's use Bundler's
standalone mode and careful use of `.gitignore` to help us do it.

This means a `bundle update --standalone` will allow us to update all
gems in vendor.

We could consider vendoring other gems this way in future but I'd
suggest only doing this for gems with no dependencies or at least gems
with no native extensions. The only gem this applies to that we
currently use is `ruby-prof` and I'm not convinced it's widely used
enough to warrant vendoring for everyone. Perhaps that's another
criteria: it should be functionality that's used by non-developer
commands and/or normal Homebrew usage.
2018-09-13 15:24:18 +01: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
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
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
Mike McQuaid
a2febc8971
Revert "std: use HOMEBREW_ARCH env var on Linux" 2018-09-06 09:16:13 +01:00
Mike McQuaid
132aa14320
Merge pull request #4838 from reitermarkus/cask-module
Rename `Hbc` module to `Cask`.
2018-09-06 09:15:44 +01:00
Markus Reiter
a84a1c63db Rename Hbc module to Cask. 2018-09-06 09:30:52 +02:00
Shaun Jackman
5cbddd2aca LinkageChecker: Report linkage of unwanted system libraries [Linux]
gcc and glibc are implicit dependencies on Linux.
No other linkage to system libraries is expected or desired.
2018-09-05 15:32:06 -07:00
Caleb Xu
90c25bf913 std: use HOMEBREW_ARCH env var on Linux
Unlike macOS, Linux installations can be installed/deployed on a
variety of hardware. The HOMEBREW_ARCH environment variable
allows the end user to set a custom -march=... option for the
compiler. If the variable is not set, it defaults to "native".

This only applies on Linux; on macOS, behavior remains unchanged.
2018-09-05 16:06:11 -04:00
Mike McQuaid
e06f8a8beb
Rename Homebrew-Cask to Homebrew Cask. 2018-09-04 09:56:57 +01:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00
Markus Reiter
32ad22395b Remove some #popen_reads. 2018-09-04 05:16:59 +02:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
2018-09-02 16:15:09 +01:00
Markus Reiter
fbcaa8c85a Resolve URL to get real file extension. 2018-08-31 16:51:23 +02:00
Michka Popoff
b7b5fb930d superenv: Use 02 optimization flag for Linux builds
`-Os` produces sometimes bigger binaries on Linux.
Also, llvm built with `-Os` is really slow at runtime for Linux.

Using `-02` aligns us with what Debian does, and as we are compiling most of our stuff with gcc (and not clang), it makes sense to use `-02` on Linux.
`-Os` does probably slightly different things when used on mac with llvm, compared to when it is used with gcc on Linux.
2018-08-29 13:40:39 +02:00
Maxim Belkin
4f166ce021
formula_cellar_checks: .dylib and .framework are macOS-specific 2018-08-22 21:25:00 -05:00
Shaun Jackman
0fcf8abf32
Merge pull request #4696 from sjackman/any-skip-relocation
BottleSpecification: Do not skip bottle relocation on Linux
2018-08-15 11:42:20 -07:00
Shaun Jackman
294db31849 BottleSpecification: Do not skip bottle relocation on Linux
Bottles must be relocated on Linux to find the brewed glibc and gcc.
2018-08-15 10:23:55 -07:00
Shaun Jackman
8a1fa28f9c KegOnlyReason: Reasons related to macOS valid only on macOS 2018-08-15 10:14:17 -07:00
Shaun Jackman
27fb8befd0 check_non_libraries: *.so.* is valid on Linux 2018-08-14 14:50:10 -07:00
Shaun Jackman
9039e41ebe
Merge pull request #4684 from sjackman/check-tmpdir-executable
Check that HOMEBREW_TEMP permits executing programs
2018-08-14 12:22:35 -07:00
Shaun Jackman
4adbfa3fcf Check that HOMEBREW_TEMP permits executing programs 2018-08-14 11:51:18 -07:00
Shaun Jackman
e752e583d6 Add LD_* environment variables to SANITIZED_VARS
Sanitize the Linux environment variables
LD_LIBRARY_PATH LD_PRELOAD LD_RUN_PATH
2018-08-14 11:45:40 -07:00
Markus Reiter
8b5fa6824b Fix brew cleanup. 2018-08-11 18:03:49 +02:00
Misty De Meo
6361aa72ae
ENV: use sdk_path_if_needed 2018-08-08 10:45:48 -07:00
Misty De Meo
32678276c7
superenv: do not set SDKROOT 2018-08-08 10:45:48 -07:00
Misty De Meo
0cd8427405
Diagnostic: remove need for headers on 10.14 2018-08-08 10:45:48 -07:00
Misty De Meo
160534983f
Allow setting sysroots to a CLT SDK 2018-08-08 10:45:48 -07:00
Markus Reiter
da34d85ddc Only use ditto to extract skipped volumes. 2018-08-06 22:59:02 +02:00
Markus Reiter
2e48373305 Use ditto instead of unzip. 2018-08-01 07:50:15 +02:00
Mike McQuaid
6417332a3a Change Mojave bottle behaviour
Rather than relying on a `HOMEBREW_FORCE_BOTTLE` variable (which ends
up doing silly things like forcing bottle usage even when options are
provided) instead handle this at the `or_later` bottle detection
level so on prerelease versions of macOS any bottle looks like an
`or_later` bottle (unless various environment variables are set).

Fixes issues noted in:
https://github.com/Homebrew/brew/pull/4520#issuecomment-407229605
2018-07-24 09:25:32 +01:00
Markus Reiter
7ad999f5f8
Merge pull request #4488 from reitermarkus/system-command
Refactor `Hbc::SystemCommand`.
2018-07-20 17:51:10 +02:00
Mike McQuaid
3e93d4c6cf Add HOMEBREW_FORCE_BOTTLE variable
This does the equivalent of always passing `--force-bottle`. This will
be enabled by default on Mojave to allow people to avoid building
everything from source until our porting and bottling is a bit further
along.
2018-07-20 14:28:14 +01:00
Markus Reiter
2712fcaa67 Use interleaved output for ErrorDuringExecution. 2018-07-19 16:53:11 +02:00