5 ms·
What makes you think /usr/local isn't a 'common unix standard'?
by jrochkind1 11y ago
What makes you think /usr/local isn't a 'common unix standard'?
- pjmlp 11y agoNever used Homebrew, but taking ownership of /user/local as I understand it does by default, certainly isn't a 'common unix standard'.
- baldfat 11y ago> 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 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?
- dyladan 11y agoI don't see anywhere in there where it says you should take ownership of /usr/local
- baldfat 11y agoThat 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.
- pjmlp 11y agoYou 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.
- baldfat 11y agoWell 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..
- jrochkind1 11y agoConfusingly, 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#USRLOCALLOCALHIERARCHY 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.
- deleted 11y ago[deleted]
- pjmlp 11y agoFilesystem Hierarchy Standard is a GNU/Linux standard. 'common unix standard' is whatever POSIX states as standard.
- deleted 11y ago[deleted]
- sambe 11y agoIt 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.
- snowwrestler 11y agoI 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.
- OJFord 11y agoThis 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?
- snowwrestler 11y agoSo 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.
- OJFord 11y ago> 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?
- mzs 11y agoThat'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.
- iuguy 11y agoAs I can't edit the comment, I wasn't referring to the name /usr/local as much as the permissions. It'd make more sense to store systemwide hierarchy in /opt/homebrew/* and user-specific hierarchy in ~/.homebrew/* instead.
- jrochkind1 11y agoMany unix tools are written to build looking for dependencies on default paths including /usr/local. Putting packages installed in a custom /opt/homebrew location would make it harder to install and use software that often assumes a /usr/local possibility, but not an /opt/homebrew it's never heard of. It is in fact a pretty common place to put non-distro installed software. And was not (and still is not?) used by OSX out of the box. It made a lot of sense for homebrew to use it.