Live data from Hacker News

El Capitan and Homebrew

github.com

181–190 of 298 posts

Re: El Capitan and Homebrew

#181

Earlier quoted context omitted.

FHS does not apply to OSX. Never has, never will.

He's asking because you brought FHS up.

Under B, as an example of standards by another vendor who would be pilloried if they allowed the same lackadaisical approach to preserving system permissions integrity. In response to the comment that Apple was being unreasonable.

Apologies if that was not clear.

Re: El Capitan and Homebrew

#182

Earlier quoted context omitted.

You might just as productively argue that there is no such thing as a modern single-user system, since Windows isn't that either. His point is pretty clear. OTOH: The debate here is a little confusing. What SIP is doing w/r/t/ /usr/local isn't unprecedented; securelevels and the immutable flag could have the same effect on OpenBSD all the way back in the 1990s.

> You might just as productively argue that there is no such thing as a modern single-user system, since Windows isn't that either. His point is pretty clear. Correct, and nonprivileged users can't install software globally on Windows either. Because it's now a modern OS, and that's how things are done. For very good reasons. His point, as far as I can tell, amounts to: applications should be able to trash permission…

He's arguing that users should be able to elevate their privileges by supplying root's credentials and then create a simple directory without having to reboot.

I more agree with you than with him, but his argument seems pretty straightforward.

Re: El Capitan and Homebrew

#183

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…

Yep, this is why I install brew into a subdirectory that I keep rsynced across computers.

    $ which brew
    /usr/local/brew/10.10/bin/brew
I'm thinking maybe its time to finish off ditching homebrew for nix.

Re: El Capitan and Homebrew

#184

Earlier quoted context omitted.

It's been a while since I looked into it, but I opted to stick with MacPorts rather than Homebrew in large part because I got the impression that Homebrew wanted to own /usr/local rather than sharing it with other software. (Maybe that's inaccurate?) I still occasionally compile software by hand rather than through a package manager, and /usr/local has been the default target for a system-wide install on every Unix-s…

It is possible to switch /usr/local according to [1], they state it's not recommended though. [1] https://github.com/Homebrew/homebrew/blob/master/share/doc/h...

I have used ~/.brew for years—it means that I have to do a slightly custom install every time I move to a new machine—but have never had a problem with it.

Re: El Capitan and Homebrew

#185
This didn't work for me. Upon 3rd bullet point 'Reboot back into OS X' my system kept showing me the apple logo, black background and status bar. When the status bar progressed ~30%, information about my system would popup and then stagnate/momentarily freeze. Then the system would go to black saying 'os had a problem, rebooting in a few seconds' then...it would repeat this process again and again, without any input from me.

I'm not sure what to do to fix this.

Re: El Capitan and Homebrew

#186

Macports, meanwhile, continues to work quite well because it 1. places packages in /opt and 2. has always installed via sudo. Macports just has a much more robust philosophy of building its own universe largely separate from OS X, and only rarely impacted by system updates. The downside is that it takes forever to install the first few packages. Homebrew offers a much faster initial install because it leans on OS X l…

The problem is even _root_ can't add the missing /usr/local, because SIP prevents even root from touching /usr. SIP doesn't block /opt; if it did, MacPorts would also have broken, sudo or no sudo.

SIP doesn't block /opt for the exact reason MacPorts relies on /opt: It's not part of the existing operating system. In other words, this situation isn't just good luck for MacPorts, it's a direct result of the design decisions behind MacPorts, and the design decisions behind homebrew.

Re: El Capitan and Homebrew

#187

Earlier quoted context omitted.

> You might just as productively argue that there is no such thing as a modern single-user system, since Windows isn't that either. His point is pretty clear. Correct, and nonprivileged users can't install software globally on Windows either. Because it's now a modern OS, and that's how things are done. For very good reasons. His point, as far as I can tell, amounts to: applications should be able to trash permission…

He's arguing that users should be able to elevate their privileges by supplying root's credentials and then create a simple directory without having to reboot. I more agree with you than with him, but his argument seems pretty straightforward.

Well, if you unwind far enough, I think the original discussion was about why Homebrew has trouble using /usr/local. Where "using" means "owning, adding git repos to, changing permissions on, etc".

OSX suggests /usr/local as a good location to install software, but insists that the directory itself be owned by root, and protects the parent directory /usr under SIP.

My assertion is that Homebrew is using /usr/local incorrectly (and in contravention to all expectation), and that blaming Apple for the problems thereby created is inappropriate.

I also think SIP is a good thing.

Re: El Capitan and Homebrew

#189

Macports, meanwhile, continues to work quite well because it 1. places packages in /opt and 2. has always installed via sudo. Macports just has a much more robust philosophy of building its own universe largely separate from OS X, and only rarely impacted by system updates. The downside is that it takes forever to install the first few packages. Homebrew offers a much faster initial install because it leans on OS X l…

The problem is even _root_ can't add the missing /usr/local, because SIP prevents even root from touching /usr. SIP doesn't block /opt; if it did, MacPorts would also have broken, sudo or no sudo.

> The problem is even _root_ can't add the missing /usr/local, because SIP prevents even root from touching /usr.

This goes against all that I have read and my own experiences with the betas. Maybe Apple changed something last minute. See here: http://www.macworld.com/article/2948140/os-x/private-i-el-ca...

The specifics of System Integrity Protection are that no user, application, or process will be able to write files or modify files in the root System folder or the /bin, /sbin, and /usr directories, which are hidden by default in OS X’s Finder. The /usr/local folder remains accessible, however; it’s a long-running convention in Unix and variants as a place to stash material and software that individual users rely on.

Re: El Capitan and Homebrew

#190
post #86

To be fair, homebrew shouldn't need to change perms, it should follow common unix standards or at least fit in with OSX rather than require a hack. For years I've felt homebrew should really use either /opt/ or ~/.homebrew/ by default.

I can't think of anything more standard than /usr/local/.

It is not standard for /usr/local to be writeable by users.
Post reply on HN