Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have you considered homebrew? #3

Closed
arronmabrey opened this issue Apr 4, 2017 · 9 comments
Closed

have you considered homebrew? #3

arronmabrey opened this issue Apr 4, 2017 · 9 comments

Comments

@arronmabrey
Copy link

Hello,

Thanks for putting this together!

I was reading through the readme-and-install.sh and noticed the use of macports? Is there a technical reason for this choice over homebrew? Or is it a personal choice?

In trying to understand some of the pros/cons of macports vs homebrew. One of the issues I found is it seems that macports requires the use of sudo, and homebrew does not.

It seems like homebrew could be considered marginally safer in that regard, do you have any thoughts on this?

Thanks,
-- Arron

@essandess
Copy link
Owner

Homebrew is great.

My personal preference is MacPorts because I prefer to run natively compiled binaries, especially for computationally intensive applications. I have observed significant performance differences between native and pre-built binaries, so I almost always go native.

But everything here will work with homebrew installs too.

My recommendation would be to choose the option that best suits your setup and stick with it. And if you have real concerns about sudo security, this would be a much bigger issue for you than homebrew versus macports.

@Moscarda
Copy link

Moscarda commented Jun 25, 2017

I wouldn't call myself a developer, but I do dabble enough to know about package managers and that I prefer Homebrew to MacPorts. I know you said that everything here will work with brew, but where in the installation process is it invoked and how?

@essandess
Copy link
Owner

essandess commented Jul 21, 2017

where in the installation process is it invoked and how?

readme-and-install.sh. I'm not a brew expert, but it's a simply a matter if replacing port install with brew install, and replacing the necessary install directories with the ones that brew install. Macports goes in /opt/local. Not sure about brew.

@savyajha
Copy link

savyajha commented Oct 3, 2017

Homebrew allows for local compilation as well. You can simply export HOMEBREW_BUILD_FROM_SOURCE (set it to any value).

@essandess
Copy link
Owner

Thanks.

It should not take much work or time to fork this repo and edit readme-and-install.sh to use brew rather than port.

The only reason I haven’t tackled this myself are that brew and port don’t play nicely together on the same box, and I’m not familiar with homebrew package install specifics.

All the work in this repo is in the configuration files, which will be the same for either package manager.

@ourway
Copy link

ourway commented Feb 16, 2018

Any updates for brew?

@noyannus
Copy link

noyannus commented May 16, 2018

Homebrew may not have the same tool versions, and some not at all. You can get the missing ones with pip3, but the version compatibility is unclear to me.

After getting the complete history for homebrew with ..

git -C "$(brew --repo homebrew/core)" fetch --unshallow

.. and searching homebrew for the tools to install in the script's line..

$SUDO $PORT install wget gnupg p7zip pcre squid3 privoxy nginx nmap python36 py36-scikit-learn py36-matplotlib py36-numpy

with

brew info wget gnupg p7zip pcre squid3 privoxy nginx nmap python36 py36-scikit-learn py36-matplotlib py36-numpy | grep Error

we find the missing:

Error: No available formula with the name "squid3"
Error: No previously deleted formula found.
Error: No available formula with the name "python36"
Error: No previously deleted formula found.
Error: No available formula with the name "py36-scikit-learn"
Error: No previously deleted formula found.
Error: No available formula with the name "py36-matplotlib"
Error: No previously deleted formula found.
Error: No available formula with the name "py36-numpy"
Error: No previously deleted formula found.

Disregarding versions, we can get from homebrew:

squid: stable 3.5.27
python: stable 3.6.5
numpy: stable 1.14.3

and from pip3:

scikit-learn (0.19.1)
matplotlib (2.2.2)

After replacing Macports with Homebrew and Pip3 we also need fixing the differing installation and symlink directories.

Who's gonna try?

@genevera
Copy link

@noyannus @essandess have a look at my PR (#6) - it should do the trick though tbh I don't have a VM to test this on.

@essandess
Copy link
Owner

I’ve looked more into Homebrew and see that its security model is incompatible with this repo. I cannot personally recommend Homebrew’s approach, especially for a repo that does its best to keep things locked down.

All of the tools in this repo should be installed and controlled securely at the system level with sudo. Homebrew avoids sudo by taking over permissions in /usr/local. This won’t work here.

For more details on the issues that can arise with Homebrew’s approach, I agree with much of the criticism in this post: https://saagarjha.com/blog/2019/04/26/thoughts-on-macos-package-managers/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants