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

installing to ~/.homebrew (or anywhere) should be 100% supported as a goal #974

Closed
timotheecour opened this issue Sep 16, 2016 · 3 comments

Comments

@timotheecour
Copy link
Contributor

timotheecour commented Sep 16, 2016

I've always installed homebrew in a custom location and I don't remember running into issues because of that (obviously I haven't installed all packages however).

The docs however recommend against it: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Installation.md
but without showing evidence as to when things can break because of that.

Eg: http://superuser.com/a/1025497/295075 shows:

I can confirm that several packages worked (seqtk, pear) while others failed (wget, homebrew/science/blast, jags). I am also unable to change the ownership of my /usr/local directory, so I'm back to compiling those packages manually

However I just tried, and those packages seem to install just fine on non-standard homebrew location.

I think we should:

  • at very least try to support installing to elsewhere than /usr/local/ and remove the paragraph in docs that says it's dangerous
  • specifically track bugs related to this issue should they arise
  • (stretch goal) make ~/.homebrew the new default instead of /usr/local (linuxbrew got this right with ~/.linuxbrew)

Rationale:

@zmwangx
Copy link
Contributor

zmwangx commented Sep 16, 2016

Disclaimer. I only speak for myself and the reply does not reflect the opinions of the Homebrew team.


I've always installed homebrew in a custom location and I don't remember running into issues because of that

Good for you.

at very least try to support installing to elsewhere than /usr/local/ and remove the paragraph in docs that says it's dangerous

We do "support" it, there's practically nothing in your way, but it is dangerous because it untested by us and most of our users. I don't see this warning removed any time soon.

I'm probably not in the position to say this, but testing anything other than /usr/local requires extra code, extra manpower, extra CI infrastructure, and extra _ (fill in blank here). I don't think it's feasible, at least not at the moment.

specifically track bugs related to this issue should they arise

You can report them. We'll try to squash bugs if we can, of course.

make ~/.homebrew the new default instead of /usr/local (linuxbrew got this right with ~/.linuxbrew)

I don't see this happening. Linuxbrew didn't get it right, it's just an unfortunate workaround on multiuser systems for users who are not sudoers and who cannot (or don't bother to) convince their sysadmins to install the software they need. Having a gigantic ~/.linuxbrew in every user's home is ridiculous, and sysadmins hate it.

By the way, this is very very clearly rejected in https://github.com/Homebrew/brew-evolution/blob/master/commonly_rejected_proposals.md.

concurrent homebrew installs

That's possible today. I do it, many maintainers do it. Just don't expect bottles in many/most cases, and don't expect official support (but let me repeat myself, we do try to help when we can).

/usr/local actually can interfere with other packages installed on mac, eg when user does make && make install it'll install there.

Pick a different prefix ahead of time when you install random things (and keep in mind that they can still write to wherever they want even if you tell them to write to a certain prefix — which is why we enabled sandboxing). You don't complain about apt, rpm or yum installing to /usr because they own /usr. We can't own /usr, so we instead own /usr/local. This stuff is all in FAQ. If you disagree, you should probably choose a different package manager, like MacPorts.

/usr/local often require special privileges

Install to somewhere else then. Again, it's been possible for a long time.


Overall, we're a very small team, and we have enough things on our hands already, so sorry. What you're proposing here is a gazillion times easier said than done. Not saying it's impossible to happen at some point in the future, but don't anticipate it.

@apjanke
Copy link
Contributor

apjanke commented Sep 16, 2016

Hey @zmwangx, be nice.

Generally, what zmwangx said. We do support Homebrew in other locations (and are actually working on making that more flexible), but for technical reasons and resource limitations, getting that to "100% support" is infeasible.

The core code is written to support "prefixes" at arbitrary locations. I and other maintainers do run Homebrew at non-default installation locations. And your rationale makes sense, especially for concurrent Homebrew installs.

If you run in to bugs when running Homebrew at a non-default location, go ahead and report them. They will be tracked and handled as first-class bugs (though some might be un-fixable).

But there's no way we can get the quality of installations at non-default locations to the same level as the default location. That's what's actually tested in our testing infrastructure, and is used by probably the vast majority of our users, so it has a lot more eyes on it. (And some packages have dependencies specifically on /usr/local, unfortunately. We try to eliminate those when we find them.)

Conservative users who want to minimize their risk of breakage, or who want to maximize the benefit of bottles, will want to stick with the default installation location. And we want to make that clear in our documentation. So I think the warning will remain.

I wouldn't recommend installing under a user's home directory by default. Homebrew on OS X expects and intends to be a system-level package manager.

Overall: We basically want what you want, it's mostly supported, but we can't get 100% there, and want to make that very clear to users who might care.

@MikeMcQuaid
Copy link
Member

(stretch goal) make ~/.homebrew the new default instead of /usr/local (linuxbrew got this right with ~/.linuxbrew)

This is impossible for Homebrew if we want to continue to distribute binary packages. ~/.homebrew is not a path; it expands to /Users/mike/.homebrew for me and something else for you. As a result, any binary packages that hard-code locations inside them (rather a lot, unfortunately) need a hard-coded location.

/usr/local actually can interfere with other packages installed on mac, eg when user does make && make install it'll install there. Seperating out what's from homebrew vs not in that folder can be a pain, if not impossible when some files are overwritten (eg: http://blog.mact.me/2015/05/15/so-you-want-to-move-your-homebrew-folder)

This blog post is inaccurate if you use the current installer: https://github.com/homebrew/install

The new default location is /usr/local/Homebrew for the Homebrew repository (e.g. the source code, taps, README.md, etc.and/usr/localfor the Homebrew prefix (e.g. where the symlinks are made, where theCellaris). People with a/usr/local` prefix will be migrated to this format as-of #963.

/usr/local often require special privileges (eg http://superuser.com/questions/986338/change-install-location-and-prefix-of-homebrew-packages)

Again, as-of #963 and the current installer at https://github.com/homebrew/install you no longer need to take ownership of /usr/local but instead just various top-level directories in /usr/local.

@Homebrew Homebrew deleted a comment from groundswel Apr 1, 2018
@Homebrew Homebrew locked and limited conversation to collaborators Apr 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants