Live data from Hacker News

El Capitan and Homebrew

github.com

41–50 of 298 posts

Re: El Capitan and Homebrew

#42
post #21
post #19

Earlier quoted context omitted.

Because it has never caused any trouble having it in /usr/local, and as another user said /usr/local/bin is part of the standard path. Other than this one-liner, which is done once, there really isn't any extra hassle with using the default. I'd be more interested in why you didn't want to install it there?

Actually it sounds like you will need to run this/restore permissions after every future OS X update.

Right. The OS X image now has to contain a /usr/local directory so that it exists unrestricted after you install the OS (otherwise you would be unable to create it yourself, because /usr is restricted). It has to ship with some permissions, so it rightly ships owned by root. The installer will apply these permissions each time it runs.

Aside: I really wish Homebrew didn't encourage having a single user own /usr/local. If they're going to insist on never needing sudo to install things, it should just default to installing in your home directory.

Re: El Capitan and Homebrew

#43
post #36
post #26

Earlier quoted context omitted.

Hmm, having been on El Capitan since the first beta, this hasn't happened. Do you have anywhere it states that?

https://github.com/Homebrew/homebrew/blob/master/share/doc/h... "Apple documentation hints that /usr/local will be returned to root:wheel restricted permissions on every OS X update; Homebrew will be adding a brew doctor check to warn you when this happens in the near future."

Perhaps they should consider adding an option to install something into launchd that just does this.

Re: El Capitan and Homebrew

#44
The first thing I did after the upgrade was disabling SIP. Now my system acts exactly the same way before with all the goodies (except rootless) el capitan has to offer.

Having root not able to write system stuff is good for people that like to blindly execute shell scripts from the internet but I think apple should add something that makes it easier for developers to disable it.

I don't know if there is a new method yet, but before you had to boot into recovery and execute `csrutil disable`. In the early days there was a boot flag you could set but that got removed quickly.

Re: El Capitan and Homebrew

#45
post #39

Is this also related to why you can't rename /usr/local to /usr/local.old? (To do a fresh install of homebrew into /usr/local.) $ sudo mv local local.old mv: rename local to local.old: Operation not permitted

mv /usr/local /tmp/local.old might work (or just somewhere outside of /usr)

Re: El Capitan and Homebrew

#46
This is one of the reasons I love HN: a grapevine of important things to help developers fix their dev environments, security things we need to be aware of for our servers, new APIs to take advantage of, and other important stuff.

Re: El Capitan and Homebrew

#48
To me, the fact that you are directed to install Homebrew to /usr/local is wrong since there's no guarantee how /usr/local is going to treated by Apple in the future and this is now an example of that. The only directory that Apple, probably, doesn't have control is your home directory.

I've been using homebrew for a long time without issues because, in my opinion, I installed it on ~/homebrew. I wonder why is that so difficult for others to use.

Re: El Capitan and Homebrew

#49

There hasn't been a clean upgrade in ages, yet developers eat that shit up and keep showing up with their shiny MacBooks in conferences. It must be great being a second class citizen.

Worst case is a half-day of cleanup once in a year to keep your computer secure and up to date.

Most years (like this one!) there's a one-liner for Homebrew upvoted to the top of HN, and that's it.

Re: El Capitan and Homebrew

#50
post #40

Couldn't all this be avoided if Homebrew installed itself in a sub-directory of /usr/local (e.g. /usr/local/homebrew) instead of /usr/local itself? Edit: For the avoidance of any doubt/confusion, this is what a virgin /usr/local/ looks like after Homebrew has been installed: $ ls -la /usr/local total 96 drwxrwxr-x 13 root admin 442 31 Aug 21:52 . drwxr-xr-x@ 12 root wheel 408 31 Aug 21:52 .. drwxr-xr-x 14 jgavigan ad…

That would break the unix convention they are trying to follow, so then they might as well put it anywhere else as well.

What unix convention are you referring to?
Post reply on HN