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

install: default repo to /usr/local/Homebrew. #60

Merged
merged 1 commit into from Sep 9, 2016

Conversation

Projects
None yet
9 participants
@MikeMcQuaid
Member

MikeMcQuaid commented Sep 8, 2016

This means that we can move stuff around inside the repository without causing conflicts on update or dumping things in /usr/local but keep all our existing bottles working as-is.

CC @Homebrew/maintainers for thoughts because this is a pretty big change.

sudo "/bin/chmod", "g+rwx", HOMEBREW_PREFIX
# the group is set to wheel by default for some reason
sudo "/usr/sbin/chown", "#{ENV['USER']}:admin", HOMEBREW_PREFIX
sudo "/usr/sbin/chown", "root:wheel", HOMEBREW_PREFIX
end

This comment has been minimized.

@tdsmith

tdsmith Sep 8, 2016

Contributor

What's your thinking here?

@tdsmith

tdsmith Sep 8, 2016

Contributor

What's your thinking here?

This comment has been minimized.

@tdsmith
@tdsmith

tdsmith Sep 8, 2016

Contributor

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

@tdsmith Yep. Basically: that's the default permissions so if this directory doesn't exist, let's restore them to avoid any weird changes in future.

@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

@tdsmith Yep. Basically: that's the default permissions so if this directory doesn't exist, let's restore them to avoid any weird changes in future.

@tdsmith

This comment has been minimized.

Show comment
Hide comment
@tdsmith

tdsmith Sep 8, 2016

Contributor

I like this change. Can we think of any circumstances where someone is using $(brew --prefix) where it turns out they meant $(brew --repository) and this could cause trouble? git commands should fail benignly, which seems okay.

Contributor

tdsmith commented Sep 8, 2016

I like this change. Can we think of any circumstances where someone is using $(brew --prefix) where it turns out they meant $(brew --repository) and this could cause trouble? git commands should fail benignly, which seems okay.

@apjanke

This comment has been minimized.

Show comment
Hide comment
@apjanke

apjanke Sep 9, 2016

Seems like a good idea, especially with Apple moving to lock down /usr/local more. Keeps things cleaner. Will need a bit of time to think if there are repercussions to this, but don't see any off the bat.

apjanke commented Sep 9, 2016

Seems like a good idea, especially with Apple moving to lock down /usr/local more. Keeps things cleaner. Will need a bit of time to think if there are repercussions to this, but don't see any off the bat.

@DomT4

This comment has been minimized.

Show comment
Hide comment
@DomT4

DomT4 Sep 9, 2016

Contributor

👍 on the idea. Owning less of /usr/local is definitely a good step. Haven't tested the implementation yet, but the idea is a reasonable one.

Contributor

DomT4 commented Sep 9, 2016

👍 on the idea. Owning less of /usr/local is definitely a good step. Haven't tested the implementation yet, but the idea is a reasonable one.

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 9, 2016

ohai "This script will install:"
puts "#{HOMEBREW_PREFIX}/bin/brew"
puts "#{HOMEBREW_PREFIX}/share/doc/homebrew"
puts "#{HOMEBREW_PREFIX}/share/man/man1/brew.1"
puts "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_brew"
puts "#{HOMEBREW_PREFIX}/etc/bash_completion.d/brew"
puts "#{HOMEBREW_REPOSITORY}/Library/..."

We should be installing all these (except the last, which should probably be replaced with HOMEBREW_REPOSITORY alone), but I'm only seeing a ln -sf for bin/brew.

Also, after this change we're going to see weird paths like /usr/local/Homebrew/Library/Homebrew, right? Do we still need the Homebrew subdirectory in Library after this change? Of course migration might be an issue, but otherwise the subdirectory seems useless.

zmwangx commented Sep 9, 2016

ohai "This script will install:"
puts "#{HOMEBREW_PREFIX}/bin/brew"
puts "#{HOMEBREW_PREFIX}/share/doc/homebrew"
puts "#{HOMEBREW_PREFIX}/share/man/man1/brew.1"
puts "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_brew"
puts "#{HOMEBREW_PREFIX}/etc/bash_completion.d/brew"
puts "#{HOMEBREW_REPOSITORY}/Library/..."

We should be installing all these (except the last, which should probably be replaced with HOMEBREW_REPOSITORY alone), but I'm only seeing a ln -sf for bin/brew.

Also, after this change we're going to see weird paths like /usr/local/Homebrew/Library/Homebrew, right? Do we still need the Homebrew subdirectory in Library after this change? Of course migration might be an issue, but otherwise the subdirectory seems useless.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

Can we think of any circumstances where someone is using $(brew --prefix) where it turns out they meant $(brew --repository) and this could cause trouble? git commands should fail benignly, which seems okay.

Yeh, this is somewhat possible but unavoidable. Thankfully the case where they use $(brew --prefix) but meant $(brew --repo) means they'll be e.g. looking for core Homebrew files rather than e.g. the Cellar or installed files so it's a lot more "implementation-detaily" (even if those have been documented correctly for a long time).

Oh, also: well done @chdiza, you changed the Homebrew default 😀

Member

MikeMcQuaid commented Sep 9, 2016

Can we think of any circumstances where someone is using $(brew --prefix) where it turns out they meant $(brew --repository) and this could cause trouble? git commands should fail benignly, which seems okay.

Yeh, this is somewhat possible but unavoidable. Thankfully the case where they use $(brew --prefix) but meant $(brew --repo) means they'll be e.g. looking for core Homebrew files rather than e.g. the Cellar or installed files so it's a lot more "implementation-detaily" (even if those have been documented correctly for a long time).

Oh, also: well done @chdiza, you changed the Homebrew default 😀

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

We should be installing all these (except the last, which should probably be replaced with HOMEBREW_REPOSITORY alone), but I'm only seeing a ln -sf for bin/brew.

They are all installed by the later brew update. We could do that manually but I'm kinda meh on the code duplication and tying more installer code to locations in Homebrew's repository. Agreed about changing the last, will do that.

Also, after this change we're going to see weird paths like /usr/local/Homebrew/Library/Homebrew, right? Do we still need the Homebrew subdirectory in Library after this change? Of course migration might be an issue, but otherwise the subdirectory seems useless.

Yep. A bit part of the motivation for this change is being able to move around the contents of our repository without dumping crap in /usr/local's root any more. We may well be able to move all that stuff to lib or src or similar.

Member

MikeMcQuaid commented Sep 9, 2016

We should be installing all these (except the last, which should probably be replaced with HOMEBREW_REPOSITORY alone), but I'm only seeing a ln -sf for bin/brew.

They are all installed by the later brew update. We could do that manually but I'm kinda meh on the code duplication and tying more installer code to locations in Homebrew's repository. Agreed about changing the last, will do that.

Also, after this change we're going to see weird paths like /usr/local/Homebrew/Library/Homebrew, right? Do we still need the Homebrew subdirectory in Library after this change? Of course migration might be an issue, but otherwise the subdirectory seems useless.

Yep. A bit part of the motivation for this change is being able to move around the contents of our repository without dumping crap in /usr/local's root any more. We may well be able to move all that stuff to lib or src or similar.

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 9, 2016

They are all installed by the later brew update.

Oh, good to know, that's good enough.

zmwangx commented Sep 9, 2016

They are all installed by the later brew update.

Oh, good to know, that's good enough.

install: default repo to /usr/local/Homebrew.
This means that we can move stuff around inside the repository without
causing conflicts on `update` or dumping things in `/usr/local` but keep
all our existing bottles working as-is.
@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

@zmwangx Improved messaging in 2182f13

Member

MikeMcQuaid commented Sep 9, 2016

@zmwangx Improved messaging in 2182f13

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 9, 2016

Contributor

especially with Apple moving to lock down /usr/local more.

@apjanke what are you referring to here?

Contributor

ilovezfs commented Sep 9, 2016

especially with Apple moving to lock down /usr/local more.

@apjanke what are you referring to here?

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

@ilovezfs If nothing else: they reset permissions on every major OS upgrade which is a) annoying b) a bit of a sign that they don't consider our permission changes there to be desirable.

Member

MikeMcQuaid commented Sep 9, 2016

@ilovezfs If nothing else: they reset permissions on every major OS upgrade which is a) annoying b) a bit of a sign that they don't consider our permission changes there to be desirable.

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 9, 2016

Contributor

Pretty sure that's basically unintentional since /usr/local doesn't even exist in the default installation.

In any case, I'm not sure what's been achieved with respect to /usr/local unless the actual default non-relocatable bottle installation path changes. But increasing encapsulation of the brew repo is a sufficient reason even if I see nothing else being achieved.

Contributor

ilovezfs commented Sep 9, 2016

Pretty sure that's basically unintentional since /usr/local doesn't even exist in the default installation.

In any case, I'm not sure what's been achieved with respect to /usr/local unless the actual default non-relocatable bottle installation path changes. But increasing encapsulation of the brew repo is a sufficient reason even if I see nothing else being achieved.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

In any case, I'm not sure what's been achieved with respect to /usr/local unless the actual default non-relocatable bottle installation path changes.

Yep, we're not changing the default there so there will still be /usr/local/Cellar and respective symlinks in /usr/local/bin but we just punt the repo elsewhere.

Member

MikeMcQuaid commented Sep 9, 2016

In any case, I'm not sure what's been achieved with respect to /usr/local unless the actual default non-relocatable bottle installation path changes.

Yep, we're not changing the default there so there will still be /usr/local/Cellar and respective symlinks in /usr/local/bin but we just punt the repo elsewhere.

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 9, 2016

they don't consider our permission changes there to be desirable.

Well of course, and I believe that's for good reasons. /usr/local/bin is in /etc/paths right before /usr/bin and /bin, so if /usr/local/bin is owned by johnappleseed, any program running as johnappleseed can write to /usr/local/bin and mask basic utilities in /usr/bin and /bin, which is a security threat. If I see a system with /usr/local owned by johnappleseed and I don't know John installed Homebrew, I would presume it's done by an attacker.

I might be wrong but I think even repairing disk permissions will restore ownership of /usr/local.

zmwangx commented Sep 9, 2016

they don't consider our permission changes there to be desirable.

Well of course, and I believe that's for good reasons. /usr/local/bin is in /etc/paths right before /usr/bin and /bin, so if /usr/local/bin is owned by johnappleseed, any program running as johnappleseed can write to /usr/local/bin and mask basic utilities in /usr/bin and /bin, which is a security threat. If I see a system with /usr/local owned by johnappleseed and I don't know John installed Homebrew, I would presume it's done by an attacker.

I might be wrong but I think even repairing disk permissions will restore ownership of /usr/local.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

any program running as johnappleseed can write to /usr/local/bin

This will remain.

Member

MikeMcQuaid commented Sep 9, 2016

any program running as johnappleseed can write to /usr/local/bin

This will remain.

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 9, 2016

This will remain.

I'm not talking about changing Homebrew's default. Just saying from Apple's point of view it's certainly not desirable.

zmwangx commented Sep 9, 2016

This will remain.

I'm not talking about changing Homebrew's default. Just saying from Apple's point of view it's certainly not desirable.

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 9, 2016

Contributor

Yep, we're not changing the default there so there will still be /usr/local/Cellar and respective symlinks in /usr/local/bin but we just punt the repo elsewhere.

FWIW, I think it would be good to start making a list somewhere of potential new locations so people can start cogitating on what actually is going to work best.

Contributor

ilovezfs commented Sep 9, 2016

Yep, we're not changing the default there so there will still be /usr/local/Cellar and respective symlinks in /usr/local/bin but we just punt the repo elsewhere.

FWIW, I think it would be good to start making a list somewhere of potential new locations so people can start cogitating on what actually is going to work best.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

FWIW, I think it would be good to start making a list somewhere of potential new locations so people can start cogitating on what actually is going to work best.

I don't think that's going to change any time soon (perhaps ever) because it'd require rebuilding all our bottles and then remove us from the default search path from many other tools.

Member

MikeMcQuaid commented Sep 9, 2016

FWIW, I think it would be good to start making a list somewhere of potential new locations so people can start cogitating on what actually is going to work best.

I don't think that's going to change any time soon (perhaps ever) because it'd require rebuilding all our bottles and then remove us from the default search path from many other tools.

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 9, 2016

Contributor

I don't think that's going to change any time soon (perhaps ever)

I bet this "suddenly" becomes a priority for some unexpected reason. 🔮

Contributor

ilovezfs commented Sep 9, 2016

I don't think that's going to change any time soon (perhaps ever)

I bet this "suddenly" becomes a priority for some unexpected reason. 🔮

@MikeMcQuaid MikeMcQuaid merged commit c172826 into Homebrew:master Sep 9, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:usr-local-homebrew branch Sep 9, 2016

MikeMcQuaid added a commit to MikeMcQuaid/strap that referenced this pull request Sep 9, 2016

Change default HOMEBREW_REPOSITORY location.
This matches the upstream Homebrew installer changes doing the same
(Homebrew/install#60). Don't move people's
Homebrew installations around, though; respect their previous location
and leave any migration to `brew update`.
@chdiza

This comment has been minimized.

Show comment
Hide comment
@chdiza

chdiza Sep 9, 2016

Contributor

Sweet!

I guess I would like it to be /usr/local/homebrew and not with a capital "H". Seeing things starting with capitals in /usr/local is really weird-looking. E.g., the capital "L" in /usr/local/Library has always bugged me. Other software stays lowercase when they dive into /usr/local, e.g., /usr/local/ssl.

Contributor

chdiza commented Sep 9, 2016

Sweet!

I guess I would like it to be /usr/local/homebrew and not with a capital "H". Seeing things starting with capitals in /usr/local is really weird-looking. E.g., the capital "L" in /usr/local/Library has always bugged me. Other software stays lowercase when they dive into /usr/local, e.g., /usr/local/ssl.

@DomT4

This comment has been minimized.

Show comment
Hide comment
@DomT4

DomT4 Sep 9, 2016

Contributor

because it'd require rebuilding all our bottles

If we had the resources I'd like to bottle/test two default prefixes where the bottle wasn't cellar :any but realistically implementing that with the current CI is just a path to pain.

E.g., the capital "L" in /usr/local/Library has always bugged me.

/usr/local/Frameworks goes in with a capital as well. There's also /usr/local/Caskroom if your Homebrew repo == Homebrew prefix.

Contributor

DomT4 commented Sep 9, 2016

because it'd require rebuilding all our bottles

If we had the resources I'd like to bottle/test two default prefixes where the bottle wasn't cellar :any but realistically implementing that with the current CI is just a path to pain.

E.g., the capital "L" in /usr/local/Library has always bugged me.

/usr/local/Frameworks goes in with a capital as well. There's also /usr/local/Caskroom if your Homebrew repo == Homebrew prefix.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 9, 2016

Member

Homebrew is less likely to clash with existing locations, in my experience. Regardless: it's done now 😀

the capital "L" in /usr/local/Library has always bugged me

It'll likely change in future but the previous reasoning was because you have ~/Library

Member

MikeMcQuaid commented Sep 9, 2016

Homebrew is less likely to clash with existing locations, in my experience. Regardless: it's done now 😀

the capital "L" in /usr/local/Library has always bugged me

It'll likely change in future but the previous reasoning was because you have ~/Library

@chdiza

This comment has been minimized.

Show comment
Hide comment
@chdiza

chdiza Sep 9, 2016

Contributor

/usr/local/Frameworks goes in with a capital as well. There's also /usr/local/Caskroom if your Homebrew repo == Homebrew prefix.

Frameworks at least has an excuse for the capitalization (to be consistent with /Library/Frameworks and /System/Library/Frameworks, and probably some software is expecting a capital). But Homebrew, Library, Caskroom, Cellar have no such excuse. (Library should never have been used in the first place, upper or lowercase, since it's HB-specific and not some general dumping ground for pieces of many programs. I think HB invented that location.)

Homebrew is less likely to clash with existing locations, in my experience

What would already exist in /usr/local/homebrew, that /usr/local/Homebrew would avoid clashing with?

Contributor

chdiza commented Sep 9, 2016

/usr/local/Frameworks goes in with a capital as well. There's also /usr/local/Caskroom if your Homebrew repo == Homebrew prefix.

Frameworks at least has an excuse for the capitalization (to be consistent with /Library/Frameworks and /System/Library/Frameworks, and probably some software is expecting a capital). But Homebrew, Library, Caskroom, Cellar have no such excuse. (Library should never have been used in the first place, upper or lowercase, since it's HB-specific and not some general dumping ground for pieces of many programs. I think HB invented that location.)

Homebrew is less likely to clash with existing locations, in my experience

What would already exist in /usr/local/homebrew, that /usr/local/Homebrew would avoid clashing with?

@chdiza

This comment has been minimized.

Show comment
Hide comment
@chdiza

chdiza Sep 9, 2016

Contributor

In any case (heh heh), this is a nice change! 😄

Contributor

chdiza commented Sep 9, 2016

In any case (heh heh), this is a nice change! 😄

@apjanke

This comment has been minimized.

Show comment
Hide comment
@apjanke

apjanke Sep 9, 2016

especially with Apple moving to lock down /usr/local more.

@apjanke what are you referring to here?

I just meant the SIP introduced with El Capitan. Nothing new in Sierra AFAIK.

apjanke commented Sep 9, 2016

especially with Apple moving to lock down /usr/local more.

@apjanke what are you referring to here?

I just meant the SIP introduced with El Capitan. Nothing new in Sierra AFAIK.

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 10, 2016

Contributor

@MikeMcQuaid does this PR have any consequences for what should/shouldn't be in https://github.com/Homebrew/brew/blob/master/.gitignore ?

Contributor

ilovezfs commented Sep 10, 2016

@MikeMcQuaid does this PR have any consequences for what should/shouldn't be in https://github.com/Homebrew/brew/blob/master/.gitignore ?

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 10, 2016

Member

@ilovezfs Unfortunately not until at least after we do the migration and possibly never if we allow people to also keep HOMEBREW_PREFIX and HOMEBREW_REPOSITORY the same. I hate that .gitignore with the 🔥 of a thousand ☀️.

Member

MikeMcQuaid commented Sep 10, 2016

@ilovezfs Unfortunately not until at least after we do the migration and possibly never if we allow people to also keep HOMEBREW_PREFIX and HOMEBREW_REPOSITORY the same. I hate that .gitignore with the 🔥 of a thousand ☀️.

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 10, 2016

Contributor

Yeah that .gitignore freaks me out every time I look at it.

Contributor

ilovezfs commented Sep 10, 2016

Yeah that .gitignore freaks me out every time I look at it.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 10, 2016

Member

@ilovezfs The best/worst thing is that libgit2 doesn't consistently support it meaning many other Git utilities don't support it.

Member

MikeMcQuaid commented Sep 10, 2016

@ilovezfs The best/worst thing is that libgit2 doesn't consistently support it meaning many other Git utilities don't support it.

@ilovezfs

This comment has been minimized.

Show comment
Hide comment
@ilovezfs

ilovezfs Sep 10, 2016

Contributor

Oh that's just stellar.

Contributor

ilovezfs commented Sep 10, 2016

Oh that's just stellar.

@DomT4

This comment has been minimized.

Show comment
Hide comment
@DomT4

DomT4 Sep 10, 2016

Contributor

Unfortunately not until at least after we do the migration and possibly never if we allow people to also keep HOMEBREW_PREFIX and HOMEBREW_REPOSITORY the same.

Personal temptation is for us to do a hard migration without an opt-out.

Contributor

DomT4 commented Sep 10, 2016

Unfortunately not until at least after we do the migration and possibly never if we allow people to also keep HOMEBREW_PREFIX and HOMEBREW_REPOSITORY the same.

Personal temptation is for us to do a hard migration without an opt-out.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 10, 2016

Member

@DomT4 Sorry, I mean for people installed in non-/usr/local locations unless we want to start having "HOMEBREW_REPOSITORY is always in a HOMEBREW_PREFIX subdirectory"?

Member

MikeMcQuaid commented Sep 10, 2016

@DomT4 Sorry, I mean for people installed in non-/usr/local locations unless we want to start having "HOMEBREW_REPOSITORY is always in a HOMEBREW_PREFIX subdirectory"?

sbesson added a commit to sbesson/omero-install that referenced this pull request Sep 12, 2016

@sbesson sbesson referenced this pull request Sep 12, 2016

Merged

Homebrew repo #119

@sandstrom

This comment has been minimized.

Show comment
Hide comment
@sandstrom

sandstrom Sep 21, 2016

This is great but why not use /usr/local/homebrew? (lowercase)

sandstrom commented Sep 21, 2016

This is great but why not use /usr/local/homebrew? (lowercase)

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 21, 2016

Member

@sandstrom Personal preference and to match Cellar (which we can't change).

Member

MikeMcQuaid commented Sep 21, 2016

@sandstrom Personal preference and to match Cellar (which we can't change).

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 21, 2016

Also, look at the name of the organization ;)

zmwangx commented Sep 21, 2016

Also, look at the name of the organization ;)

@sandstrom

This comment has been minimized.

Show comment
Hide comment
@sandstrom

sandstrom Sep 21, 2016

Homebrew is awesome so I won't argue (even though I disagree 😃 ).

Is it configurable?

sandstrom commented Sep 21, 2016

Homebrew is awesome so I won't argue (even though I disagree 😃 ).

Is it configurable?

@the-real-tokai

This comment has been minimized.

Show comment
Hide comment
@the-real-tokai

the-real-tokai Sep 21, 2016

I'm also in favour of a small letter 'homebrew', in fact I use it like that since the very beginning:

$ brew config
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
...
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/homebrew
HOMEBREW_CELLAR: /usr/local/homebrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
...
$ cd /usr/local/
/usr/local $ ls -la
total 8
drwxr-xr-x   16 root  wheel    544 Apr 24 19:00 .
drwxr-xr-x@  11 root  wheel    374 Dec 16  2015 ..
drwxr-xr-x  769 root  wheel  26146 Aug 31 21:11 bin
drwxr-xr-x   23 root  wheel    782 Aug 20 18:59 etc
drwxrwxr-x   15 root  wheel    510 Sep 10 16:29 homebrew
...

/usr/local $ ls -la
total 56
drwxrwxr-x   15 root  wheel   510 Sep 10 16:29 .
drwxr-xr-x   16 root  wheel   544 Apr 24 19:00 ..
drwxr-xr-x   16 root  wheel   544 Sep 10 16:29 .git
drwxr-xr-x    5 root  wheel   170 Sep 10 16:29 .github
-rw-r--r--    1 root  wheel  1141 Aug 20 18:15 .gitignore
-rw-r--r--    1 root  wheel   253 Jul 31 02:34 .travis.yml
-rw-r--r--    1 root  wheel   291 Aug 29  2015 .yardopts
-rw-r--r--    1 root  wheel  3161 Apr  9 18:20 CODEOFCONDUCT.md
drwsr-sr-x  133 root  wheel  4522 Aug 31 21:11 Cellar
-rw-r--r--    1 root  wheel  1241 Dec 31  2015 LICENSE.txt
drwxr-xr-x    8 root  wheel   272 Aug 26 09:32 Library
-rw-r--r--    1 root  wheel  5673 Sep 10 16:29 README.md
drwxr-xr-x    3 root  wheel   102 Aug 26 09:32 bin
drwxr-xr-x    3 root  wheel   102 Apr  9 18:20 etc
drwxr-xr-x    5 root  wheel   170 Apr  9 18:20 share

I'm very happy with that setup (keeps things nice and clean and clearly separated), so I'm rather afraid to brew update...

Will it break/ mess up things? The to-be-killed root "support" is dangling like a Damocles sword too (but no way in hell I'll ever have any user owned files in /usr/local/ on a machine that is shared by multiple accounts) 😱

the-real-tokai commented Sep 21, 2016

I'm also in favour of a small letter 'homebrew', in fact I use it like that since the very beginning:

$ brew config
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
...
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/homebrew
HOMEBREW_CELLAR: /usr/local/homebrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
...
$ cd /usr/local/
/usr/local $ ls -la
total 8
drwxr-xr-x   16 root  wheel    544 Apr 24 19:00 .
drwxr-xr-x@  11 root  wheel    374 Dec 16  2015 ..
drwxr-xr-x  769 root  wheel  26146 Aug 31 21:11 bin
drwxr-xr-x   23 root  wheel    782 Aug 20 18:59 etc
drwxrwxr-x   15 root  wheel    510 Sep 10 16:29 homebrew
...

/usr/local $ ls -la
total 56
drwxrwxr-x   15 root  wheel   510 Sep 10 16:29 .
drwxr-xr-x   16 root  wheel   544 Apr 24 19:00 ..
drwxr-xr-x   16 root  wheel   544 Sep 10 16:29 .git
drwxr-xr-x    5 root  wheel   170 Sep 10 16:29 .github
-rw-r--r--    1 root  wheel  1141 Aug 20 18:15 .gitignore
-rw-r--r--    1 root  wheel   253 Jul 31 02:34 .travis.yml
-rw-r--r--    1 root  wheel   291 Aug 29  2015 .yardopts
-rw-r--r--    1 root  wheel  3161 Apr  9 18:20 CODEOFCONDUCT.md
drwsr-sr-x  133 root  wheel  4522 Aug 31 21:11 Cellar
-rw-r--r--    1 root  wheel  1241 Dec 31  2015 LICENSE.txt
drwxr-xr-x    8 root  wheel   272 Aug 26 09:32 Library
-rw-r--r--    1 root  wheel  5673 Sep 10 16:29 README.md
drwxr-xr-x    3 root  wheel   102 Aug 26 09:32 bin
drwxr-xr-x    3 root  wheel   102 Apr  9 18:20 etc
drwxr-xr-x    5 root  wheel   170 Apr  9 18:20 share

I'm very happy with that setup (keeps things nice and clean and clearly separated), so I'm rather afraid to brew update...

Will it break/ mess up things? The to-be-killed root "support" is dangling like a Damocles sword too (but no way in hell I'll ever have any user owned files in /usr/local/ on a machine that is shared by multiple accounts) 😱

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 21, 2016

@sandstrom

Is it configurable?

On a case-sensitive filesystem:

> sudo mv /usr/local/Homebrew /usr/local/homebrew
> ln -sf /usr/local/Homebrew/bin/brew /usr/local/bin/brew
> brew update --force

On a case-insensitive but case-preserving filesystem:

> sudo mv /usr/local/Homebrew /usr/local/Homebrew.bak
> sudo mv /usr/local/Homebrew.bak /usr/local/homebrew

On a case-insensitive and case non-preserving filesystem:

Excuse me?

zmwangx commented Sep 21, 2016

@sandstrom

Is it configurable?

On a case-sensitive filesystem:

> sudo mv /usr/local/Homebrew /usr/local/homebrew
> ln -sf /usr/local/Homebrew/bin/brew /usr/local/bin/brew
> brew update --force

On a case-insensitive but case-preserving filesystem:

> sudo mv /usr/local/Homebrew /usr/local/Homebrew.bak
> sudo mv /usr/local/Homebrew.bak /usr/local/homebrew

On a case-insensitive and case non-preserving filesystem:

Excuse me?

@sandstrom

This comment has been minimized.

Show comment
Hide comment
@sandstrom

sandstrom Sep 21, 2016

@zmwangx thanks! I was thinking more of an install flag/option, a prompt when installing or a cli message upon install pointing to docs/info on how to modify.

sandstrom commented Sep 21, 2016

@zmwangx thanks! I was thinking more of an install flag/option, a prompt when installing or a cli message upon install pointing to docs/info on how to modify.

@zmwangx

This comment has been minimized.

Show comment
Hide comment
@zmwangx

zmwangx Sep 21, 2016

@sandstrom We surely won't recommend that so putting it in the install script is out of question. We do link to https://github.com/Homebrew/brew/blob/master/docs/Installation.md#installation from http://brew.sh which gives alternative installation instructions, including installing to custom locations. Now /usr/local/homebrew isn't really a custom location (it could be when APFS ships, we don't know if it will be case-insensitive by default just yet), but still, cloning the git repo will always work.

zmwangx commented Sep 21, 2016

@sandstrom We surely won't recommend that so putting it in the install script is out of question. We do link to https://github.com/Homebrew/brew/blob/master/docs/Installation.md#installation from http://brew.sh which gives alternative installation instructions, including installing to custom locations. Now /usr/local/homebrew isn't really a custom location (it could be when APFS ships, we don't know if it will be case-insensitive by default just yet), but still, cloning the git repo will always work.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Sep 21, 2016

Member

You can install Homebrew wherever you like but the defaults will stay as-is, thanks!

Member

MikeMcQuaid commented Sep 21, 2016

You can install Homebrew wherever you like but the defaults will stay as-is, thanks!

@Homebrew Homebrew locked and limited conversation to collaborators Sep 21, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.