News for hackers. Stuff that matters.
Re:El Capitan and Homebrew by pjmlp on Thursday October 01, 2015 @07:48AM (#10310476)
Never used Homebrew, but taking ownership of /user/local as I understand it does by default, certainly isn't a 'common unix standard'.
Re:El Capitan and Homebrew by sambe on Thursday October 01, 2015 @09:41AM (#10311011)
It doesn't take ownership by default IIRC - just recommends that you do so. It will work with sudo if you want to go that way.
Re:El Capitan and Homebrew by snowwrestler on Thursday October 01, 2015 @10:03AM (#10311183)
I run my Mac with a non-admin account. When I want to install or update Homebrew applications, I su to my admin account and use sudo. Just checked my /usr/local and it's owned by root. I've never had a problem running Homebrew apps from my non-admin account.
Re:El Capitan and Homebrew by mzs on Thursday October 01, 2015 @03:16PM (#10313864)
That's very clever. There is one problem though, now make clean all install is run as root (well maybe install stages now in homebrew). Imagine an env var not set (the way make vars interact give lots of way to shoot off a big toe here) and the wrong dir gets rm_-rf_-ed or it obliterates something in /bin instead.

If you don't run brew as root you at least protect places like /usr/lib, but you are protected from that and more with macports (where stages and uses nobody).

But for now your approach seems the best pragmatic course to take, thank you for the suggestion.

Re:El Capitan and Homebrew by OJFord on Thursday October 01, 2015 @12:08PM (#10312169)
This sounds like the best suggestion/solution in this thread. But if you run brew from admin, why can't admin take ownership , and run brew without sudo?
Re:El Capitan and Homebrew by snowwrestler on Thursday October 01, 2015 @02:04PM (#10313175)
So that Homebrew always requires my password to install an app, just like native OS X installs. It also preserves the default permissions. And it's not that hard to sudo.
Re:El Capitan and Homebrew by OJFord on Thursday October 01, 2015 @05:47PM (#10315000)

    > Homebrew always requires my password to install an app
But isn't that _less_ safe?

Instead of trusting Homebrew with /usr/local, you have to trust every formula with `sudo`? Or does it only use sudo for part of it, a `mv` or something?

Re:El Capitan and Homebrew by baldfat on Thursday October 01, 2015 @07:58AM (#10310529)
> certainly isn't a 'common unix standard'

Here I google.com it for you.

http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY

EDIT: Why is it okay to NOT look up a Standard and be uncertain in your comments when it can be found in 20 seconds tops on the Internet?

Re:El Capitan and Homebrew by pjmlp on Thursday October 01, 2015 @09:22AM (#10310904)
Filesystem Hierarchy Standard is a GNU/Linux standard.

'common unix standard' is whatever POSIX states as standard.

Re:El Capitan and Homebrew by dyladan on Thursday October 01, 2015 @08:16AM (#10310606)
I don't see anywhere in there where it says you should take ownership of /usr/local
Re:El Capitan and Homebrew by baldfat on Thursday October 01, 2015 @08:30AM (#10310657)
That is why I said I searched and got the standard for the person who said "certainly it isn't the standard." We have the ultimate resource to know the answer to any question that does have an answer.

I gave this down voted "I googled it for you" because people need to just look up what the Standard is and than speak from a position of knowledge and not some vague non-answer.

For the still lazy the Unix File Hierarchy Standard for /usr

/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.

Large software packages must not use a direct subdirectory under the /usr hierarchy.

Re:El Capitan and Homebrew by jrochkind1 on Thursday October 01, 2015 @02:59PM (#10313717)
Confusingly, it also says:

> The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

> Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.

http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHI...

It says "The /usr/local hierarchy is for use by the system administrator when installing software locally."

That seems to kind of conflict with what you quoted "Large software packages must not use a direct subdirectory under the /usr hierarchy.", unless they mean a vendor-specific directory rather than "/usr/local".

I dunno, all I can say is that in my experience on various unixes, it is a "common unix standard" to install software that is not controlled by the OS package manager to /usr/local. I don't interpret "common unix standard" as "FHS" though -- if you mean FHS, say FHS. To me "common unix standard" just means "something that is commonly done on unix". And installing locally-installed (not using OS distro) software to /usr/local is pretty commonly done, as many people can attest. That's why homebrew chose it, they didn't just make it up.

Re:El Capitan and Homebrew by pjmlp on Thursday October 01, 2015 @09:23AM (#10310915)
You are being downvoted because it is a GNU/Linux specific standard, not something that has been adopted by the UNIX standard, POSIX.

And no, I am not the one downvoting you.

Re:El Capitan and Homebrew by baldfat on Thursday October 01, 2015 @12:21PM (#10312275)
Well I feel like an idiot since I absolutely know that but when I was searching I was looking at Unix with no /usr and than went brain dead and thought it was showing /usr as a Linux issue with no standard for /usr. Thank you for correcting me..