859 points · by blucell · 5y ago · 490 comments
As much as I sympathize (deeply) with all the criticism of Homebrew here on this thread -- I used to use MacPorts religiously and love it -- I don't think Homebrew took the field purely through sneaky marketing or n00b decisions alone. They leveraged the momentum of a lot of new devs coming to OS X and provided an easier path for people wanting to help out.
I hate to say it, but if this was a race (?), Homebrew won. Thankfully we all still have the choice to use MacPorts if we want, but there's no point in being mean about Homebrew at this point either.
> I wrote a simple package manager. Anyone could write one. And in fact mine is pretty bad. It doesn't do dependency management properly. It doesn’t handle edge case behavior well. It isn’t well tested. It’s shit frankly. > Is it any surprise I couldn’t answer their heavily computer-science questions well? > On the other hand, my software was insanely successful. Why is that? Well the answer is not in the realm of computer science. I have always had a user-experience focus to my software. Homebrew cares about the user.
Yes, Homebrew's approach on package management is a bad smell to me. It gets broken by every other major OS update, it messes up your Python PATH for no good reason, it forces a lot of opinionated decisions on users if the maintainers think it benefits the majority(and ignores voice from minority)... But Homwbrew still wins because users really like it. It is that simple. With its popularity and the strong community, it will continue to be the top choice for most of the mac users. Max Howell may not be a rock star programmer in my mind, but I have no doubt that he could've been a very successful product manager.
Personally I don't plan to switch from macports to homebrew any time soon, but I stopped grumbling about how bad it is years ago.
1. https://www.quora.com/Whats-the-logic-behind-Google-rejectin...
1. My hardware?
2. My OS?
3. My web browser?
4. My browser extensions?
5. Websites?
6. The chat app I keep open in the background?
7. The Electron settings app for my RGB Keyboard?
8. My internet connection?
9. A virus?
10. "Technology", presumably alongside some wistful thoughts of "the good old days"?
Most users, even non-technical ones, are going to blame one of these things. And, more often than not, their conclusions will have more to do with marketing and happenstance than the actual cause
All of which is to say, that quote kind of bothers me. You cannot actually be focused on user experience while skimping on technical details. You may have created an experience in which users feel inclined to blame someone else, but that's not the same thing. You are the knowledgable developer, and your users are not.
More seriously, though, this is why I hate people who use software like Electron and claim their users can't notice: of course they can, they just complain that their computer is slow because they can't pinpoint it on your app. As a developer who knows better, your entire charade depends on ignorant users being unable to point the blame at you for what you have done to them. Combine this with the lock-in typical of today where users are resigned to use your software even if they don't particularly want to and now the people who do know what you're doing can't do anything about it either.
MacPorts these days behaves similar to Homebrew by installing from binary archives by default and only build from source when binary archive is not available. This vastly improved the experience, but the old impression remains for those who got burned (literally for some) by MacPorts. 10 years is a long time, and MacPorts has improved a lot since then.
Also, ports for older/ancient versions of OS X are frequently source-only, but since Homebrew doesn’t support such systems at all, it's not really a fair comparison.
(As an aside, MacPorts must have the most incredible legacy support of any Mac project, ever. They had ARM working within a week of the M1’s release, largely because all of the infrastructure for multi-arch was already in place—to support users on PowerPC!)
On an old, unsupported, system homebrew drops down to compiling. just the other day it compiled for four hours just to update one program. kinda infuriating really since there are downloads for those packages still.
Homebrew not only installed from source for a long time, when they implemented installing prebuilt binaries, they half-assed the dependency resolution of it, so the binary version of a package would always end up requiring the binary version of the first of any alternate dependencies (ie if A requires B or C, binary pkg A will always require binary package B, and won’t accept C).
I used to use Fink and MacPorts for MacOS package management, but brew was so easy to use that it won me over.
All the other languages I use support binary libraries on their package managers.
Unfortunately, most Mac users have never even heard of it and it doesn't really have the momentum or mindshare necessary to have a complete, up-to-date list of packages.
I hate Linuxbrew when it tries to install stuff in a weird place that is /home/linuxbrew/.linuxbrew/ and as soon as you try to change the installation path, half of your packages starts compiling and since it's not the major way to do things, it often breaks and can't even compile.
I don't like scaring other users on the same server creating stuff at some bizarre location.
No idea how they didn't just settle in /use/local/ as it does on Mac or just use /opt/brew/ like a sane choice would be.
Otherwise you’re using the somewhat cumbersome process of backing out a package based on the receipt. It’s doable, but mostly requires some googling to find the correct incantation.
Definitely, plus there's also Nix and pkgsrc now, it's not like there's no alternative. And that's one race I lost trying to take the matter in my own hands with ArchMac[0] out of frustration with the limitations I faced with MacPorts and Fink, then Homebrew, so I pulled the plug[1] and trim the bills.
If anyone wants to take over just reach out.
[1]: https://lna7n.org/2020/01/06/pulling-the-plug-on-archmac.htm...
I could tell that you poured a lot into this project, and I feel a surprising degree of wistfulness over your decision to abandon it.
I hope whatever you're working on now is as fulfilling as you wanted Arch Mac to be.
Almost every Ruby on Rails tutorial I've seen in the last decade used Homebrew over MacPorts.
I found MacPorts just before Homebrew was a thing. I figure since Mac OS was BSD based, why not go with the traditional portage way.
I preferred my optional packages to be installed in /opt. I preferred MacPorts.
Sadly, in the last 3-4 years, Homebrew has been leading the charge, adding more bleeding edge package versions and just doing a better job of maintaining the formulas for install.
Happy to see it. I think for python/go/ruby devs they will continue to prefer Homebrew simply because the tutorials they learned from prefer it. It's a feedback loop.
If Mac Ports requires that level of knowledge to be user friendly it’s no surprise they lost.
Most people will never need Gentoo or want to use it, but for those with either a need or a desire for a meta-distribution, Gentoo does a pretty good job. I don't think calling it "user hostile" is quite right.
I think it's been partially supplanted by other package managers now like Nix/NixOS and even (IMO) XBPS/Void, but Portage does an alright job.
It was a great learning experience nearly 20 years ago.
It's just not for you.
And although I’m not arguing Homebrew is above reproach or critique, some of the criticism here seems both a little unfounded and a little bit ignorant (either willfully or because people just don’t know/remember) about the state of package managers BEFORE Homebrew. Like you, I used MacPorts/Darwinports and Fink for years before Homebrew was a thing and have immense respect for all three of those projects (even though DP merged with MP over a decade ago, my mind still sees them as separate things) and the massive role they played in my own life and development as a developer, but Homebrew didn’t just pop-up and supplant the existing options and through nefarious means.
At the time that it came to existence, despite the very good existing options, those communities and their progress had stagnated — at least from the perspective of the end user. There was a wealth of older packages, but newer stuff wasn’t there. And the death of PPC with Snow Leopard hit subsets of that community hard. It wasn’t just that Homebrew was easier to use and install (though it was, a bit), it was that it had more modern and more frequently updated packages.
I distinctly remember when Homebrew first arrived, my initial reaction was, “why do I need this, I already have MacPorts?” But then I used it and found that people were bottling up newer stuff at a much more rapid pace and the tools embraced by that community were modern and frankly, to an outsider, much more accessible. As you said, choosing GitHub over MacForge or whatever was a great choice too.
MP has had a renaissance of sorts over the years which has been amazing to see. I think having options is awesome. But Homebrew was very much filling a void for some beloved projects that had fallen behind. It’s hard to win that momentum back, once the community (including a whole generation of new users) goes to the new thing.
We’ve seen that with Mac text editors too. TextMate, to me, is still one of the best editors I’ve ever used and I would argue is one of the most influential software applications of the aughts. But as it faced all of its challenges to move to 2.0 (the feature creep, the technical challenges, the scope changes), it created a window for Sublime to come in and take the the extension community (which was really pioneered in the way that it worked by TextMate), and thus the userbase with it. And when Sublime faced similar challenges in its own troubled releases (for some of the same but also different reasons that TextMate had), we again saw momentum shift to VS Code.
The Homebrew team was using a lot of FUD regarding MacPorts when Homebrew started. It's actually funny because they were criticizing some of MacPorts decisions which they then had to implement when they finally realized they were the correct engineering decisions years later.
one simple effing thing: thank you! For all the hard work and the sheer pleasure Homebrew adds to the experience of developing software on a Mac.
Macports has always seemed to me to be a more "unix-y" way of doing that, and it works politely with Apple's ways on top of the Unix core (eg locking down the system volume).
It also has a very nice "select" and "variants" system that allows you to have multiple versions of a package as well as packages with more or less functionality (eg integrating with the MacOS keychain etc).
When I first got into Macs (only around 5 years ago), I looked at both homebrew and macports and as soon as I saw homebrew blasting stuff into /usr/local while macports neatly put everything in /opt, I was convinced to go with macports. I also had previous experience with the BSD's port systems, which helped push me towards macports.
But I'm open to being convinced about homebrew, although I've never needed something that it had that macports didnt.
Edit: They use /opt if you're on Apple Silicon https://github.com/Homebrew/brew/blob/master/docs/Installati...
I think my mistake was treating it like any other unix-y [multi-user] system, because I installed everything with one account, then created a dedicated 'build' account for the agent to run as -- exactly as our linux (and even, ahem, Windows) agents were setup. This caused all kinds of failures for the 'build' user as everything was owned by and had permissions setup for the first user.
I came away kind of disgusted at the horrible patterns in use. Windows has spent two decades cleaning up that mistake, and here's a comparably new system making the same, awful mistakes?
User-writable/owned stuff goes in ~. Period.
Then GNU took over and made some opinionated choices about how those subdirectories were to be used, which is fine.
However, because /usr/local is under /usr, it meant that it was more difficult to mount /usr as read-only or shared. There is also the issue of whether files under /usr/local should be owned by non-system users.
A while back, the creation of /opt and /opt/{some-app} (and /var/opt/{some-app} became a way to avoid writing into /usr and also made it possible to mount applications with their code as read only with writable locations under /var.
So I've taken writing to /usr/local as a packaging smell these days, purely to avoid writing into /usr.
I use Linux at home and package managers like AUR are great, but macOS is where the users are.
Two things for your consideration:
1. It's uniquely visible among system package managers. When people have problems with a package in `apt` or `dnf`, they find a community or third-party repository for the package or bug the upstream directly. By contrast, Homebrew has always been visible on GitHub, does not require a special login to a bugtracker on some random domain, and thus receives direct community support volume that we need to address.
2. Homebrew is not an official system package manager. We operate at Apple's whim, which generally ranges between neutral disinterest and actively trying to remove parts of the macOS userspace that we rely on. Many of our changes over the last decade (installing our own Ruby, rolling back custom source options) can be directly traced back to changes that Apple imposes that produce disproportionately greater maintenance effort from us.
<sigh> I know you're not unique in this assessment or consequence, and that's truly a shame.
MacPorts hasn't had as many of these issues over the years, and I suspect that's largely down to mindset. Broadly speaking, MacPorts seems to have "first, do no harm" approach to almost everything. They don't install files in directories they didn't create, and they avoid depending on systems which are out of their control.
I get it, it's all made by volunteers, but I wish there was a package manager for macOS that was focused on professional users.
I wonder if the decision process in Homebrew has relied perhaps too much on analytics data leading to the dismissal/ignorance of features used primarily by users who have disabled analytics via the HOMEBREW_NO_ANALYTICS environment flag.
I've also seen examples of where Homebrew is basically dictating on how to release your software as well. There was that one case where they decided to delete the formula for mpv since mpv didn't have a recent enough of a tagged release.
https://github.com/danielbair/homebrew-core/commit/b18f104f1...
There was also an instance with mpv where Homebrew devs got pissy about mpv not supporting Lua 5.3 and mpv devs got angry at Homebrew devs for asking to break existing user scripts to appease one package manager.
Isn't that generally the point, for Apple consumers? At HN we have a skewed sample but I imagine for a lot of users (myself included), having an easy solution with configurations set for you is exactly what they want.
Also brew does not stop you from installing a piece of software literally any other way you prefer if for some reason you don't like what the brew formula is doing, including just creating your own tap.
Brew has lowered the bar enough that lots of folks simply don't have a clue how to deploy anything and worse, don't have a clue how to troubleshoot when something goes wrong in production.
Obviously it's a double-edged sword. It's good to not waste time configuring your workstation, but ultimately I'd argue in brew's case too good to be true.
MacPorts and fink existed before homebrew took over, and they weren't better. That's why homebrew took over.
They both work well (we can and do quibble about the internal mechanics of each), and appeal to different groups of people.
My theory is that Homebrew was announced at exactly the right time in the MacOS adoption curve. A huge number of new users arrived with no existing knowledge of MacPorts or Fink. Most of them didn't know they needed a package manager at first, but when the momentum picked up, Homebrew was the new option with a better web page, a more collaborative working model, and hosted at GitHub (also ascendant).
I'd also argue that similar factors were involved in Linux's popularity over BSD in the 1990s.
Timing, environment, adequacy, and luck. All are required. Superiority is not.
What prevents you to do it better then? What prevent you from forking it? Sharing improvement ideas? Contributing to the project?
"It sucks" doesn't help anyone understand your frustrations and does not serve the message you're trying to share (let this one be valid or not).
Also, as everything that is open-source/free: if you hate it, don't use it, that's it. And let the people who appreciate it be productive and build awesome tools with it.
I get the analogy, but being a package manager, but was it really that bad to use 'brew install', 'brew update', and 'brew upgrade' for everything?
And it's true that it is a little frustrating at times when you don't use it for a while, you 'brew install xx' and wait 4 minutes until "Updating homebrew" finished with its dozens loops between shells, ruby etc doing its stuff (which I assume is refetching repos, but couldn't know it from the output)
I use it because it's the most common thing for mac, but I miss APT and DNF everytime I use it, not going to lie
I think ~everything he stated is generally assumed true. I use Brew installed software every single day, and appreciate it. That doesn't put it above criticism though.
The mindshare of nearly the entire community that develops software for the Mac. Homebrew, the tool, is inferior to several other options, but developers of software treat it as the one true package manager on Mac. It's so frustrating to see projects offer it as the only supported way to install their software on Mac apart from building it from source.
Your question reads like "What prevents you from building a better social network than Facebook?" response to criticisms of that platform. And the answer is that in a tool like Facebook or Homebrew, all the value is in the ecosystem. Building a better tool is useless until everyone is using it. And no one will use it until everyone else is using it. It's a classic network effect, and it inhibits viable competition.
Time?
> Also, as everything that is open-source/free: if you hate it, don't use it, that's it. And let the people who appreciate it be productive and build awesome tools with it.
This is such an unhealthy attitude. Just because something is free doesn't make it above criticism. Also doesn't mean that the maintainers don't benefit from their projects even if there isn't direct compensation (more career opportunities, visibility, etc.) This idea that we need to walk on eggshells around anyone that does any volunteer work is kinda absurd.
You may be interested in trying out nix for package management [1], or even for configurations and providing development environments (see my other comment [2]).
export HOMEBREW_NO_AUTO_UPDATE=1The newest version of X introduces a feature which has a need of Y library (dependency) >= n+1, where n is your already installed version. It just so happens that Y is shared between 3 applications; so if you upgrade Y to satisfy X, you now have to recompile/upgrade (depending on details) A, B and C as well to use the newly updated version of Y.
Arch (and other rolling releases) do/does this every day, it's just that the work is offloaded to upstream packagers. Brew is more "AUR-like" where it's all down downstream on your own system, so you get to deal with the work and churn through the recompiles yourself.
EDIT: whoops, that was incorrect. It's actually `brew update` that is run automatically, which updates Homebrew itself plus all of its formulae. However, I think often the effect can't be similar. If formulae are updated, and the new package you're trying to install shares a dependency with other packages, the dependency will be automatically updated as part of the install process. I'm not sure if this can also trigger an update of an existing leaf package though.
Entirely likely it's user error on my part; but also problem I haven't really had with other 'nix package managers.
The had also apple silicon support for many things more than a month ago.
If you are not happy with open source, you have a couple of options:
- build your own brew
- brew is open source, so you can make contributions to improve
- pay for something like brew (though probably not an option for brew)
Have you done any of the above before complaining? I am guessing - no. Otherwise, say "thank you" and move on, my friend.
What a waste of bytes and bandwidth. "[homebrew] It’s the worst package manager I’ve used" is true for all users that have only used one package manager. The opposite claim ("it's the best I've used") would simultaneously be true.
You could at least have mentioned _why_ and that could have kickstarted a meaningful discussion, but instead your comment is the equivalent on a thumbs down in a youtube video.
https://news.ycombinator.com/item?id=26037357
> volta83 1 hour ago | parent [–] | on: Homebrew 3.0
> I used MacPorts before hombrew. Homebrew "just worked", MacPorts sucked.
> Maybe I was too dumb to use MacPorts, but all other MacPort used I knew back then all moved to homebrew very quickly.
> reply
This intrepid band of volunteers are adding huge value to one of the largest corporations on earth. I appreciate the DIY effort of anyone who volunteers, though I see the donate tab on their website and sigh a little.
I can understand them not wanting to do it themselves. I don't think they want to take on the responsibility for maintaining all those packages (for legal reasons or otherwise). Because it's a "not officially Apple" thing, Homebrew can probably get away with a "no warranty" sticker that an official Apple project couldn't.
What Apple should do, however, is ship a DUMP TRUCK OF MONEY to every Homebrew maintainer on a regular basis. That project is crucial to basically every Apple developer, and it massively enriches macOS as a general purpose development platform. Apple would be fools to not support it financially.
Meanwhile providing money for no reason to Homebrew wouldn't make business sense. As far Apple is concerned, Homebrew works, and providing financial support wouldn't make it work better.
Xcode / swifts build speed is still pretty bad, xcode still chokes on large projects, codesign is an eternal flaky nightmare, they still don't have first class command line support for many things, they don't have network indexing & build caching like bazel does, it's worse than android for maintaining a device lab for testing (adb vs... `instruments` kind of) and on and on it goes.
Since people are already doing an excellent job for free, why would they start paying them? Clearly the lack of Apple funding has not hurt the project thus far.
That's not how a package manager works. The people responsible for APT/AUR do not maintain all the packages within the repositories themselves. This even applies to the App Store. Apple does not maintain the apps there themselves, it's up to the people publishing the apps. So there really isn't any reasons except they can't make money on it, hence it doesn't exist as an officially sanctioned way of pulling down programs.
That said, it remains disappointing to me that unless you're producing content with Apple's hardware or building apps for the Stores, they don't really do much to help you.
For example, if you're writing client or server-side web code, they will acknowledge your existence, and are more than willing to sell you a Mac, but that's about it.
^ This doesn't even get into the concerns around all of the supporting pieces that go along with this code - e.g, documentation, training materials, and outreach - the tooling for this part of the process is voluminous in its own right.
https://en.wikipedia.org/wiki/Comparison_of_documentation_ge...
Nowadays they don’t want to touch anything GPL so that might be it
If Apple did it, HN would be awash in "Walled garden!" and "Monopoly!" hysteria.
Meanwhile, Apple is now engaging in anticompetitive behavior that I find frustrating. (App Store stuff.) Things have turned on their head.
What was Apple's first product? A computer. A computer meant for people not having a CS background. The Apple II kicked off the home computing revolution, i.e. bringing computing to the masses. The Mac was the computer "for the rest of us" and was aimed squarely at graphic artists, desktop publishers, musicians, and the like.
So yes, Microsoft has always been developer and business focused whereas Apple has always been the computer "for the rest of us."
Apple is more allergic to the GPL than any other company on Earth. They would never do something official that would even put GPL software in their orbit.
For sure Apple employees are using lots of homebrew every day :)
There is no money to get from it. And developers are not the "end user" for Apple anymore. I don't see why Apple should even care about Homebrew.
For the interested, search for some variants of “homebrew home-manager nix”, and you may find lots of resources [2][3][4].
[1]: https://lucperkins.dev/blog/home-manager/
[2]: https://www.softinio.com/post/moving-from-homebrew-to-nix-pa...
[3]: https://wickedchicken.github.io/post/macos-nix-setup/
[4]: https://dev.to/louy2/use-nix-on-macos-as-a-homebrew-user-22d
While it takes some learning to leverage the full capability of Home manager, it’s also easy to get started. People new to Nix can start out with a basic configuration specifying a list of packages to install and then gradually move to a more capable configuration as they learn more.
[1]: https://www.quora.com/Whats-the-logic-behind-Google-rejectin...
Actually, no. There's no level of rockstarness that excuses being a dick and difficult to work with. That kind of attitude can turn a whole team's culture sour and result in way more damage than any one person can make up for through their individual contributions.
It's clear from reading his thoughts on the matter why Google didn't hire him, and it's also clear he still doesn't understand why either.
It was Google. Because he didn't know what a binary tree was or something similar during the infamous Whiteboard test.
But I mean it make perfect sense. Google is all about building AI, ML, Algorithm, K8S etc. Complexity is their KPI, usefulness is not.
So may be it isn't so much a bad thing after all. He wouldn't have fit in.
Edit: I guess the tone didn't shine through. The "all about" is a figure of speech. A more accurate wording would be, in my opinion Google doesn't know how to built great "user" Product.
And I may also include some of the Google hiring practice [1] that were brought to twitter.
[1] https://twitter.com/shaft/status/1355696154990628864?s=20
The main problem is that he went through the standard interview process. To prevent bias you need to maintain a consistent interview process and bar. All interviewers in big tech have annual trainings about this. If someone underperforms it's considered bad judgment to be inclined based on who the person is or their past experience. This is to prevent cases like "he didn't do well but we should hire him anyway because he graduated from Stanford".
When you have someone who is an exception you shouldn't hire them via the standard interview process. Maybe Google didn't think he's an exception. But the reality is, the vast majority of Google engineers wouldn't be able to build something as successful from scratch like he did. It requires more skills than just being a good engineer. They could've found him a role that fits his skills. When FB hired Yann Lecun I'm sure they didn't ask him how SVMs work. (not saying they are on the same level, clearly not, just an extreme example)
Another possible option is that he came across too arrogant in more than one interview and the hiring committee was worried he wouldn't be a good fit culturally.
No, no big companies are "all about" anything, there is so many different areas of work, that rejecting a person because the company is "all about" X, doesn't really apply. If they wanted to work with him, they would have made it work. But they didn't, so they didn't.
Some things are not in google's DNA.
Honestly I can't imagine using my mac without Brew.
Thanks to Mike McQuaid (et al) for the last 10!
Pacman, erm what? Arc is a niche of a niche. I'd bet Alpine's package manager sees more action than that - let alone yum/rpm.
I think creative people are getting the shaft from apple.
"Here's to the crazy ones" went out the window, maybe with the end of the Steve era. If you don't do it the apple way, apple doesn't care.
I mean, they support the xcode factory workers with apple languages. It's the apple equivalent of visual studio. But its sort of monochrome (like the 1984 ad)
I truly believe apple itself should have more direct/overt support for other software on their platform in a macports/homebrew way. (scripting languages?)
xquartz is sort of an example of this "forgotten lawn furniture left out in the rain". It's critical to a lot of mac users, but they distance themselves from it. Gah, at least bring it indoors when there's snow on the ground.
Unfortunately after a dozen or so years as sole maintainer and user I dropped it a month ago[1].
If anyone wants to take over just reach out.
(not in the post but I had to pull the DO storage because I was severely out of cash, I still have the packages locally)
[1]: https://lna7n.org/2020/01/06/pulling-the-plug-on-archmac.htm...
[1] Max Howell, https://www.quora.com/Whats-the-logic-behind-Google-rejectin...
Lucky for you those are both fully supported out-of-the-box, and have been for a couple of decades. Sounds like your IT team is forcing the right solution down your throats.
Windows is where the users are, and apt-get works just as well on WSL2 as natively.
Should I upgrade right away or hold off for a while? Which is least likely to interupt my workflow in which I count on brew just working?
They mention that ["various methods have been deprecated, disabled and removed"][0] but its hard to read from that PR exactly which commands no longer work.
Thanks for all the great work on homebrew!
Since Homebrew threw a warning at me with my old install in /usr/local, I completely uninstalled and reinstalled Homebrew 3.0.
I guess I was sort of expecting some migration instructions with the release notes...
MacPorts has its own way of dealing with dev tools and framework versioning. E.g. you can have multiple versions of complex products like PHP or MySQL at once. You can even have a GCC package for a specific target arch as a separate ports package. Does Homebrew allow these things?
MacPorts wants to have its own thing over in /opt where it has its own toolchain independent from the system tool chain.
This means that all users on the system share the same MacPorts software. This has an additional impact that it means that it requires privilege to install software there.
Homebrew, on the other hand, uses the system toolchain and tries to avoid using root.
In today's world, the "multiple versions of complex products like PHP or MySQL at once" isn't a compelling argument for me as I use docker to solve that problem.
> Homebrew, on the other hand, uses the system toolchain and tries to avoid using root.
What? Homebrew wants you to change ownership of /usr/local to your individual user and refuses to run without doing so. How is that any different as far "as all users on the system share the same software?"
If I read homebrew's install.sh correctly, it changes ownership of a few directories under /usr/local, not /usr/local itself (on x86, on ARM it follows a different path). This matches how my current Mac, which has brew, is currently setup as well.
# Required installation paths. To install elsewhere (which is unsupported)
# you can untar https://github.com/Homebrew/brew/tarball/master
# anywhere you like.
...
# On Intel macOS, this script installs to /usr/local only
HOMEBREW_PREFIX="/usr/local"
...
directories=(bin etc include lib sbin share opt var
Frameworks
etc/bash_completion.d lib/pkgconfig
share/aclocal share/doc share/info share/locale share/man
share/man/man1 share/man/man2 share/man/man3 share/man/man4
share/man/man5 share/man/man6 share/man/man7 share/man/man8
var/log var/homebrew var/homebrew/linked
bin/brew)
group_chmods=()
for dir in "${directories[@]}"; do
if exists_but_not_writable "${HOMEBREW_PREFIX}/${dir}"; then
group_chmods+=("${HOMEBREW_PREFIX}/${dir}")
fi
done
... and further on, after some checks, group_chmods turns into chowns ...
if [[ "${#chowns[@]}" -gt 0 ]]; then
ohai "The following existing directories will have their owner set to ${tty_underline}${USER}${tty_reset}:"
printf "%s\n" "${chowns[@]}"
fi'ls -l /usr' reveals that /usr/local is root:wheel just like all other folders under /usr. How exactly is homebrew changing ownership?
The spot where this becomes an issue would be say... (making up a story here) there's a vulnerability found in Ruby which is part of the toolchain for the system and in MacPorts toolchain. Apple pushes out a security update that updates the system toolchain... but the issue in the MacPorts toolchain remains until that is updated.
I had an issue with MacPorts many years ago when I was trying to install a python library via MacPorts (I forget exactly why) but wasn't being found with python on the command line (which was using the system toolchain) and then when I resolved the "I'm using the MacPorts version on the command line" other issues with software that was expecting the system toolchain version started cropping up.
That's a "my experience" story and isn't meant to be defining.
I believe that both Homebrew and MacPorts have made design choices that reflect how they want to take their respective projects and I respect those design choices. They solve problems in different ways and have different repercussions for how users use them.
For me, on my systems, I've found that I tend to prefer to fix the problems that Homebrew causes than the problems that MacPorts causes. The big thing that made that preferable is that the services (databases and such) are not run on the bare machine but rather in containers.
https://google.com/?q=nix+on+mac+os+x
Nix has more packages than MacPorts - 60k vs 37.6k - though that's not necessarily a guarantee the ones you need are there.
And like MacPorts it doesn't do weird, non-Unix-y ownership changes of system directories like Homebrew does.
Homebrew excels as a mechanism to install the latest software, if you don't care about breaking things. However, traditionally a package manager's job is to ensure that if you've installed something, it'll continue to run.
If you've ever updated readline via Homebrew, you can pretty much just watch everything burn.
If you've ever tried to use an old version of Postgres, good luck. Particularly if you're wanting to mix and match versions of PostGIS.
If you're running an old version of macOS, you're out in the cold. Although, I must admit, recently this seems to be handled much better.
If you like treating your Mac like a very MacMacMac pet, a pm designed for Mac is probably better.
If you'd like to treat your Mac like UnixMac livestock, you probably want a cross-platform pm.
Using Nix means the core of my dev needs are met by config shared between my NixOS and macOS systems, with some idiomatic unshareable bits around the edges.
(I don't want to trivialize the gaps or over-sell Nix here. Nix forms a foundation for accomplishing this, but I do still have non-trivial bootstrap scripts for macOS.)
That said, I think most people want darwin failures to be able to block, so it's mostly about getting on top of them to the point where it's practical to keep them triaged. Domen is working on getting a part-time position funded to work on issues here (https://opencollective.com/nix-macos), though individual package breaks are probably down the list.
I feel things have stabilized significantly in recent days, though. I haven’t had a single Darwin breakage on the unstable channel since the release of 20.09. Perhaps the Zero Hydra Failures effort[1] helped.
In my limited experience, I’ve tried homebrew a few times, but found it a bit cumbersome with the “no sudo” requirement.
[1]: https://saagarjha.com/blog/2019/04/26/thoughts-on-macos-pack...
For Google, it's likely the former is more important than the latter for a lot of their projects. An architecture that doesn't scale or doesn't always do the right thing or sometimes messes up data, can be catastrophic at the scale of Google.
This is the sort of myths we hold about interviews. That the company is doing such deep dive on us that they are reading our Github commits and considering the trade-offs of MacPorts vs. Homebrew architecture.
There isn’t, Homebrew is far superior in my opinion, and everyone I know using a Mac. We all left MacPorts ages ago.
It’s safe to say that has nothing to do with him not getting the job.
This is one of the few features I do love about Homebrew. Does MacPorts have a "no sudo" mode or does it just let all packages run rampant on your system?
Relevant: https://xkcd.com/1200/
And getting the tools team at work to vend both brew and macports seems malicious so I just suck it up there.
[1] https://github.com/Homebrew/homebrew-core/blob/master/Formul...
On the other hand, what I will say in favour of Homebrew is that its popularity does make life much easier as there's so much software available on it. Even very small / niche / new projects will often have a Homebrew package.
The former is more popular and easier to get started with and bigger community, but the latter is higher quality and better designed.
Macports is also good about naming different versions, so you can have python-34, python-37, and python-29 installed together.
“it doesnt deal well with multiple versions at the same time”
Also what system/os are you comparing to?
Macports never did this and kept libraries side by side cleanly.
Now, this is from the point of view of a software developer with a specific niche requirement. For normal users, from a security standpoint, it would most likely make sense to remove old versions of openssl.
So quite limited in scope and not much configurable options and if you say that you need some features, they'll tell you you're doing it wrong.
It is quite easy to install though and has a lot of packages but if you have specific needs that are unmet, you are on your own.
It's more of a update manager than a true package manager.
The last years have shown clearly that Apple doesn’t go out of their way to make things easy for devs if it doesn’t helps their main client group.
Always nice to know Brew will always have the latest version around. The only problem with that ends up being that if you use brew for development dependencies like Node or Python you can’t manage multiple versions. Nix being the most powerful in this area.
Luckily this is much less of an issue on my NixOS desktop or EC2 instances.
Please.
Thank you again!
Asynchronous formula updates would IMO save the most Mac man-years of almost any macOS tool.
When is this really a problem, anyway? You should probably not have something like 'brew update' scheduled to run periodically, as then a broken package could break something unexpectedly. It should really only be run when you're ready to check for broken things, which means you can also schedule it to run when you can deal with waiting for the process to complete.
(You also may be confused between `brew update` and `brew upgrade`. I know I often am!)
echo export HOMEBREW_NO_AUTO_UPDATE=1 >> $HOME/.zshrc
I do not think it was a wise decision to enable auto update on `brew install` as long time users expect `brew update` and `brew install` to be two separate steps (as it was for years) and because Homebrew no longer operates like `apt` and other package managers.
Looks like it was changed in 2016: https://github.com/Homebrew/brew/issues/288
> If set, do not automatically update before running brew install, brew upgrade or brew tap.
Don't do this if you're attached to specific versions of any formulae you have installed. You can try `brew pin`ning them though.
MacPorts has a "patch it to work with macOS" mentality that seemed much more needed in the early 00's when PowerPC/big-endian and other Mac or BSD specific differences were more common, whereas Homebrew tends to want everything to come unpatched from upstream, which does seem a bit cleaner.
I think I'm getting thrown off by stories like https://news.ycombinator.com/item?id=26017852 and horror stories about upgrades or migrations - I've been doing a 'port list requested > file', copying that file around, then 'port install `cat file`' to get the same setup on a new machine for quite a while.
Note: I am not affiliated with the project in anyway other than being a backer and a user.
I'm not complaining, but as a Linux user who uses dnf/yum for everything there, but also has some needs for things that either aren't packaged at all, or are but move too slowly and break often (youtube-dl) I use brew. I love that it installs in my home directory. Linux Brew is awesome to have for that.
I don't expect Linux will ever be a prime focus, but I do wish it would be easier for packages to support Linux. Many times it doesn't require any actual formula changes beyond trivial.
Note: If you are on Arch, AUR is often better than home brew. I don't use Arch on my daily drivers/work machines anymore but deeply miss the AUR :-)
Very nice.. Can't wait to do the numbers on this!
I love it.
My only complaint is that I never remember 'brew upgrade' from my 'brew update'. which is which.
[Un]fortunately, I've stopped looking at MacOS in this way. I now look at MacOS as the better version of ChromeOS that runs on non-shit hardware (two time PixelBook owner, both of them had serious hardware issues, and getting support from Google for what they view as throwaway devices is not at the same level as the Apple Store/Genius Bar experience).
Taking the view that MacOS is a fat client for apps and browser use, that is capable of also running [Uni|linu]x VMs, and pushing myself to adopt the "local editor, remote runtime" working model, has been really liberating.
I now no longer look at Homebrew as necessary. Instead, I can use package managers built for operating systems that are intended to work with package managers and that whole ecosystem, rather than fighting against Apple's efforts to improve the local security environment.
In many ways, I feel like I've come full circle to where I was at in the mid-00's, working in a SaaS/enterprise environment developing on Windows using VMs for actual dev work so as to keep my local machine safe, healthy, and productive.
Rather than dealing with the annoyance of Docker for Mac, I can instead just work in a VM running normal docker, or one of the competing solutions, and this translates very closely to what I run if I'm working against a VM.
And if you are doing anything "serverless" or "server-light", it's even less helpful to try and continue working with the MacOS terminal userland.
So, hats off to homebrew for all they do, but I really think the puck is moving elsewhere and that's where I'm headed instead.
I use homebrew on my personal machine mostly to get more modern versions of the terribly outdated commands that Apple ships but that's .. a small surface. I don't use it for anything really appropriate and would not.
Professionally - for people who build locally on the mac - the sheer awkwardness of pinning specific versions so all developers have a common environment regardless of install order or timeframe is quite painful with homebrew vs. apt.
- When you say "local editor, remote runtime", are you referring specifically to VS Code's remote development features?
- Is the remote runtime a Linux VM on the same machine, or running on another machine?
- Do you run git locally?
- Do tests run locally?
- Do you have a link to an article detailing this workflow?
The remote runtime can be either a local Linux VM or a remote VM. That's kind of the beauty of this approach. You can generate a machine image and have a consistent environment either locally or remote, depending on your current needs. Obviously, when working with a local VM, you can use host mounted directories using one of the various tools for doing so, in a much more efficient manner.
I tend to not run git locally, but prefer to run it on my source on the remote environment. This is mostly because I'm not wanting to use the native Mac OS userland.
I do not run tests locally, that's very much the intention.
I don't have a link to an article handy. You already seem familiar with the VS Code tooling, so it's a good place to start.
I'm not a pedant about this. There are some rough edges, especially in the file sync'ing for the local editor, and integration with IDEs. But you can get most of the way there and be pretty happy.
edit...
When I was working on ChromeOS, the actual workflow was more like "host OS" -> "local VM" -> "remote VM". The Crostini environment itself runs in a local VM and container. So you would essentially be running an editor inside that local VM (I ran VSCode this way for a hot minute), and I was working with an sshfs mounted src directory from a remote VM. This was mostly because I was doing work against a dev environment that relied on a number of hosted services that were only accessible to the remote VM. The hoops we sometimes have to jump through...
So lord help you if the app you want to delete isn't a single .app file in /Applications
brew uninstall --zap --force CASKNAME
Has anyone else had that problem or found a solution?
I’ve taken notes of my workaround, if it helps: https://gist.github.com/claui/ada85e696029cfa8cba9b91723ce2e...
Not a Homebrew maintainer, just a satisfied user.
If you can live with that, you should be fine though.
I know it’s a bit far fetched but if my package manager could replace say, pyenv, by just making it easier to install several different versions and then letting me pick the default symlink, that would be so helpful (or even just not removing python2...).
I first used it 10 years ago when I was doing Rails development. It was kind of a pain to get everything setup on our development machines, installing new bits and making sure other bits were up to date.
After using brew it made our lives much easier. Combined with Rubygems it made every other platform and language look silly.
Jokes aside, I've loved it for many years now. Thanks!
There are enough tools to work efficiently on a remote server and you can easily access what you do there from another machine.
I'm sure this is splendid
Is it the kind of thing I could use to manage packages in my own directory as a non-root user (on Linux)?
If so, will it be able to base itself on what my distribution offers, or will it build things up from scratch with its own toolchain packages?
Yes, exactly.
Not sure what exactly you mean with your second question though.
> Homebrew does not use any libraries provided by your host system, except glibc and gcc if they are new enough.
BTW, I periodically check in Activity Monitor to see if any Intel binaries are running. The only one ever running for me so far is Signal. There is no reason to avoid Rosetta though. It is already installed and works pretty seamlessly and effectively.
But I'm sure MacPorts is fine still. Why are people so strongly opinionated about this, particularly on the pro-MacPorts side? Nothing I've seen in the comments so far jumps out as an obvious source of the passion.
Love that i can install/update the packages i might need and get on with my day.
For reference, I use MacPorts. I often tell new users to just use Homebrew. It really just doesn't matter.