
Loading…
I am looking into using boxen, however, I would aslo like to have homebrew install in /usr/local to avoid any weirdness down the line. I took a quick glance at the homebrew module and it looks like it is fairly simple to fork it and change the homebrew paths in config.pp. I need to do some more testing to ensure there is no other places where it expects boxen path to homebrew.
The one other thing I can think of is the suffix -boxen# to the homebrew package versions. Will need to look for that in other modules to see if that suffix is being appended on brew packages.
Has there been any change in this? An idea for this is to check if there already is an homebrew installation and/or ask the user if boxen should take precedence.
Boxen seems quite limited without this.
I was able to hack this in my own fork but unfortunately it required changing both puppet-boxen and puppet-homebrew.
None of the comments give us a good reason to support this.
Could you please give us advantages for using /usr/local?
(not giving
or
here, just want to understand why this should be supported, personal preference is not a good reason)
@rafaelfranca The biggest benefit for me was that I already had an existing homebrew install with a fair number of packages in it that I did not want to have to reinstall.
@rafaelfranca Also, on their site the homebrew project explains why they recommend installing to /usr/local: https://github.com/mxcl/homebrew/wiki/FAQ#why-does-homebrew-insist-i-install-to-usrlocal-with-such-vehemence
If the universe of boxen homebrew is smaller than that of homebrew there will be packages that I could use out of the box except I can't, so I have to do my own building of them. I will either have to do it manually, or figure out how to set it up in Boxen.
For example I'm trying to install py2cairo, it should be trivial, but it's not finding the right locations. No amount of searching will tell me what is wrong so I have to make guesses. So far 3 evenings with no luck. And I have to resolve it. Soon this one problem will have taken me longer than setting up boxen, so at this rate I will go back to vanilla homebrew no matter what. I think boxen is great though so I would like to keep it.
And since you expressly warn against having a parallel homebrew install, I'm looking for an alternative that allows me to install this stuff without making up my own distribution (which I will have to maintain) for all the modules I'm going to use.
Perhaps I should just bite the bullet and develop on a Linux VM, but that seems stupid to me when Macs are such a solid system.
I faced similar problems with GHC and Haskell platform, it just didn't want to work. In the end I installed it using the installer from haskell.org instead.
@rafaelfranca Related to boxen/puppet-homebrew#8, installing outside of /usr/local completely prevents nearly all official Bottled packages from installing. This forces many enormous packages (like GHC/Haskell-Platform) to unnecessarily build from source, and radically extends install time (as in, minutes to quite a few hours for a common setup on a MacBook Air which includes a number of major binary packages). Boxen is useful for administering small numbers of individual machines, not just for large corporate environments. In small environments or for individuals, it is infeasible to build and host custom binary images for everything.
In short: Bottles are a major usability improvement for Homebrew, and installing outside of /usr/local largely precludes their use.
I don't mind installing homebrew outside /user/local but it displays a warning saying some packages won't be able to build.
I'm having Python issues I suspect might be related to this. Both meld and pip used to work for me until I started using boxen's homebrew location (on a fresh laptop). Had a very similar experience to what @thepian describes above, and the only thing that seems to be amiss with my config is this output from brew doctor:
% brew doctor
Warning: Your Homebrew is not installed to /usr/local
You can install Homebrew anywhere you want, but some brews may only build
correctly if you install in /usr/local. Sorry!
@haf Here are my two forks that I made to make it happen:
https://github.com/ssgelm/puppet-homebrew/compare
https://github.com/ssgelm/puppet-boxen/compare
Are there any news on this homebrew location topic? I understand, that github internally it makes sense to have everything under /opt/boxen. As you utilize your own homebrew bottles you have a very clean and isolated structure as well as all benefits of installing precompiled packages. Most other people don't have those resources (the custom build server), therefore it would be great if at least it was possible to easily switch the homebrew location to /usr/local in order to utilize bottles.
The default could still remain to have everything under /opt/boxen but it would be possible to easily switch over if wanted/needed. What do you think?
+1 - plus one!
It is already possible since puppet-homebrew 1.2.0 using hiera.
You only need to put in your hiera data:
"homebrew::installdir": "/usr/local"
What about the other changes like ssgelm/puppet-homebrew@boxen:master...master#diff-60ae41fd0a31977447947f59940ee9a4R28?
This can live in your own boxen repository. You can either extract a class or put in your site.pp. Maybe is worth to add support to this in puppet-homebrew but it have to be optional.
I meant: what do you say about its functionality? Is it needed? Seems to initialise things.
It seems to be needed if you want to install in /usr/local
I did some hacks on this, unfortunately with no success so far. Would be awesome to get this working some day..
https://github.com/Intelliplan/puppet-boxen/commits/homebrew_in_usrlocal
https://github.com/Intelliplan/puppet-homebrew/commits/homebrew_in_usrlocal
https://github.com/molst/our-boxen/blob/baec1b92a48eedd12fd2c74a9bb8a703e8c7b36c/hiera/common.yaml
A grep -rn . -e '.*homebrew.*' in our-boxen shows there are more hardcoded paths to be fixed.
I just submitted a pull request to puppet-homebrew (boxen/puppet-homebrew#51) that allows a custom fact to be set to make boxen not use its custom bottles and to make it put the install in /usr/local.
(Not sure which repo to make this issue in. It seems hardcoded in this modules so I hope this is right)
It'd be nice to be able to run homebrew out of it's default location of
/usr/local. Right now, as I understand the code, it looks pretty hardcoded:$homebrewdir = "${home}/homebrew". I understand wanting to not overtake an existing homebrew install (from reading through boxen/puppet-homebrew#8) but it seems like there are a lot of hoops to jump through as a result.Regardless, are there any plans for this?