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.
ClosesHomebrew/homebrew#43276.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
link_overwrite "bin/foo", "lib/bar"
link_overwrite "share/man/man1/baz-*"
During FormulaInstaller#link, the whitelist conflict files will be
backup into HOMEBREW_CACHE/Backup
add guard in Formula#file_modified? to prevent git popup
add guard in Superenv.bin before calling MacOS::Xcode.version
add guard against missing Xcode/CLT in Xcode.uncached_version
return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior
checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well
needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation
MacOS.can_build? becomes MacOS.has_apple_developer_tools?
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check
Check @@attempted for cctools so that we only attempt the relocation
install once, skip cxxstdlib check in cctools to prevent otool
execution prior to installation, skip fixing install names if
relocation is not required
Install it as a dependency unless already satisfied by Xcode.
require cctools_requirement
cctools_requirement should be satisfied by cctools present in opt
add build_env => false to the satify block options in CctoolsRequirement
When running brew -v install, long post_install output from the formula,
presumably from upstream, may hide the important instructions in the
caveats and confuse the user. For example, postgresql runs initdb which
prints its own instructions for running the database, making the caveats
scroll off screen.
Per xu-cheng's instructions in Homebrew/homebrew#42565 :
Remove the explicit call to caveats from the install, reinstall, and
upgrade commands, as well as the dependency installer code in
FormulaInstaller#install_dependency , and call caveats right before the
summary code in FormulaInstaller#finish .
ClosesHomebrew/homebrew#42565.
Signed-off-by: Xu Cheng <xucheng@me.com>
This defaults to the value that's in the bottle but that isn't
necessarily correct. For example, some Boxen modules will reuse our
old bottles and so if they are installed from there we should be sure
to set the tab's tap to the tap we've installed from rather than the one
set inside the bottle's tarball.
ClosesHomebrew/homebrew#40096.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This is a more standard way to pass fd in UNIX world.
At the same time, it helps to remove a few hacks and
simplifies the code in the sandbox.
ClosesHomebrew/homebrew#38434.
Signed-off-by: Xu Cheng <xucheng@me.com>