binaries are useable from
/opt/local/bin/, i.e. for
bin$ which tesseract /opt/local/bin/tesseract bin$ ls /opt/local/bin/tesseract -rwxr-xr-x 1 root admin 28120 15 Sep 2016 /opt/local/bin/tesseract bin$ ls /opt/local/ | grep bin drwxr-xr-x 719 root admin 24446 6 Aug 19:55 bin
install requires sudo
sudo port install tesseract
bin$ which packer /usr/local/bin/packer bin$ ls /usr/local/bin/packer lrwxr-xr-x 1 myuser admin 33 7 Aug 14:28 /usr/local/bin/packer -> ../Cellar/packer/1.2.5/bin/packer bin$ ls /usr/local | grep bin drwxrwxr-x 41 myuser admin 1394 7 Aug 14:28 bin
- install does not require sudo
brew install packer
trimming out other software, this is my $PATH order:
/opt/local/bin #macports /usr/local/bin #homebrew /usr/bin #Apple binaries
I believe, from https://apple.stackexchange.com/a/261710, that
/usr/local/bin, before homebrew, starts out as root-writeable only:
drwxr-xr-x 26 root wheel - 884 Oct 17 03:36 bin
Is there a real difference between those 2 approaches? What happens if either
brew itself has been hacked? What if the package you're installing has been hacked?
I realize that installing hacked stuff is going to end badly regardless, so, assuming
brew/port are OK and the installed package isn't corrupted either, what about the implications of either approach when it comes to other malware trying to alter your system?
Looks to me as if
/usr/local/bin is wide open and the binaries there can in effect take the place of any Apple programs. Should I be concerned?