Mike McQuaid
2b547583a3
postinstall: don't allow writes to prefix itself.
...
Only the top-level directories inside it. We don't want formulae writing
random junk in e.g. `/usr/local` even in `postinstall`.
2016-12-13 00:13:20 +00:00
Mike McQuaid
58d998e208
postinstall: allow write access to cellars in repository.
...
If HOMEBREW_CELLAR (or HOMEBREW_PREFIX) are children of
HOMEBREW_REPOSITORY it’s important to deny write to the repository and
enable write to the Cellar/prefix afterwards.
2016-10-11 09:36:20 +01:00
Markus Reiter
0ab750bf24
Use module_function
for commands.
2016-10-02 00:24:47 +02:00
Mike McQuaid
536c48e804
sandbox: tweak HOMEBREW_REPOSITORY handling.
...
If we have a HOMEBREW_REPOSITORY and HOMEBREW_PREFIX mismatch (now the
default) then we can block access to the whole of HOMEBREW_REPOSITORY
rather than just the HOMEBREW_LIBRARY and `.git`.
2016-09-23 08:29:05 +01:00
Mike McQuaid
ebdb879fe4
Add --help
to all developer commands.
...
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00
Andrew Janke
954445634c
separate build and test logs
2016-08-19 01:04:32 -04:00
Mike McQuaid
c6151951d6
cmd/postinstall: use Sandbox.formula? method.
2016-08-15 08:33:59 +01:00
Andrew Janke
acc9a7ca85
brew test, install, update-test: add --keep-tmp option
...
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes #66 .
Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 12:23:08 -04:00
Xu Cheng
52de8d9373
postinstall: sanitize ARGV options
2015-10-10 11:19:22 +08:00
Dominyk Tiller
98499d1d29
sandbox: permit /var/tmp & DerivedData
...
Long term it would be nice to sandbox everything that writes to DerivedData
but it is essentially a cache directory of sorts.
The downside of allowing stuff to write there particularly is that DerivedData
is notoriously bad at getting cleaned up, so if you do a lot of Xcode-using
installations very quickly, you can chew your disk space up.
Closes Homebrew/homebrew#43276 .
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-25 22:01:24 +01:00
Baptiste Fontaine
8ba0fb9fcf
unnecessary calls to .select simplified
...
These are minor perf optimizations.
Closes Homebrew/homebrew#43028 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
Xu Cheng
e60dc64828
only run post_install if it's defined
...
Closes Homebrew/homebrew#42593 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-08 17:50:49 +08:00
Xu Cheng
2ebd1c974b
print sandbox message
...
Closes Homebrew/homebrew#42293 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-31 19:52:36 +08:00
Xu Cheng
8cebb64eec
auto disable sandbox for interactive shell
...
Closes Homebrew/homebrew#38792 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-22 15:12:15 +08:00
Xu Cheng
437a3182b0
postinstall: use ARGV.resolved_formulae
2015-05-27 13:53:41 +08:00
Jack Nagel
2ca8172fe9
Let the test environment inject its own load path
2015-04-29 19:15:11 -04:00
Jack Nagel
16dfe3dd40
Add Formula#logs
2015-04-25 23:14:05 -04:00
Xu Cheng
fbc47d86ad
sandbox: add deny_write_homebrew_library method
2015-04-23 12:33:54 +08:00
Xu Cheng
adedbb86f1
sandbox: record log
...
Closes Homebrew/homebrew#38711 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-17 14:09:24 +08:00
Xu Cheng
d1617e86d0
sandbox postinstall
...
Closes Homebrew/homebrew#38479 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-15 19:51:54 +08:00
Jack Nagel
cd522b1719
Always respect build options when invoking post_install
...
Fixes Homebrew/homebrew#36335 .
2015-02-07 11:02:35 -05:00
Jack Nagel
83b9043c8e
Remove more unused requires
2014-06-19 19:15:35 -05:00
Jack Nagel
10a1952d2c
Only "extend self" once on the Homebrew module
2014-06-19 13:10:36 -05:00
Mike McQuaid
626b56f9f6
brew-postinstall: add new command.
...
Runs post-install jobs in case they failed or need rerun for any reason.
2013-09-01 13:57:40 +01:00