Live data from Hacker News

Homebrew 4.0.0

brew.sh

351–360 of 403 posts

Re: Homebrew 4.0.0

#351
post #151
post #41

I wonder how many more major versions until "brew update" and "brew upgrade" finally just do the same thing. "But they're not the same!" I don't care.

That makes no sense. They're NOT the same. > I don't care. It doesn't change facts.

This is a lesson about mental models.

From the brew devs' point of view it doesn't make sense because they are different commands.

From the end user's point of view it makes perfect sense because brew is just a tool to install shit with and they do not wish to expend any brain cycles on it. That includes remembering whether this particular tool calls it update or upgrade.

You know the second point of view is right because if you type one without arguments, it asks you whether you meant to type the other one.

But they're too autistic to realize what that means and actually fix the interface.

    brew update - update brew
    brew update thing - update thing
Done.

Similarly, as someone who only rarely uses it, a huge frustration is that when I do, it invariably wants to update 100+ packages. I never asked for it to do that and I was happy with whatever was installed right before it decided to do that and block my system for 20 minutes.

Again, brew devs do not understand their audience.

Re: Homebrew 4.0.0

#352
post #288

Earlier quoted context omitted.

Yes. If you install untrusted code, it can do nefarious things. No platform can save you from yourself.

I think the idea is that there should be an option to have Apple-App-Store-audited capability-manifest-sandboxed CLI apps with auto-updates, as well as untrusted, non-sandboxed CLI apps. Specifically, I would expect two things: 1. In general, macOS .app bundles should be able to “provide” a bin/ directory that gets added (appended, not prepended!) to your PATH while you have the package available on disk + non-quaran…

Most packages that Homebrew install just wouldn't fit nearly into the kind of sandbox model that you suggested. Just think about command-line applications that can take in any file as input and process them, e.g. Git, ffmpeg, etc. Or like a compiler like clang. Even for GUI apps most Mac applications do not use sandbox / App Store because it's actually quite difficult to work within that framework for a lot of types of applications.

macOS also doesn't have a way to tag a command line application to have sandboxing, as sandboxing only works for an "app" bundle, not random executables.

This isn't really a Homebrew problem anyway. If there is this magical sandboxing capability that works, nothing stops a Homebrew package from using it.

Re: Homebrew 4.0.0

#353

Earlier quoted context omitted.

Several years ago, when the read-only-system OS changes happened, they switched to /opt/homebrew.

By default, Homebrew requires world-writeable location in the PATH (doesn't matter if it's /opt/homebrew or /usr/local). In my opinion, this isn't a sensible choice. Homebrew, as the name implies, was built for hobbists with little regards for security. Not a problem for many, but it does make it incompatible with a corporate environment.

It does matter though? /opt/homebrew is specifically used by Homebrew, whereas /usr/local is kind of a more shared location that old Homebrew hijacked.

Either way, I think bad default folders is better than bad default security practices. Most package manager forces you to use sudo to run them as root, and I think that's much much worse in terms of security practices and encourages the wrong behaviors and potentially allowing build/install scripts to wreck havoc on your system. (Note that /opt/homebrew is not world writable as you suggested. It's only writable by the user)

Instead, Homebrew prefers to run in a user account, default to yours. If you have a multi-user computer, you can install Homebrew to a local user folder to have isolation and not using a global location like /opt/homebrew, or you can make a special Homebrew user account (rather than using root), which is what the docs suggest (https://docs.brew.sh/FAQ#why-does-homebrew-say-sudo-is-bad).

I don't think the current solution is perfect, but I do think the motivation to prevent usage of sudo is correct in terms of security. In fact, I would argue that the other package managers that use sudo are taking the easy way out (albeit insecure).

Re: Homebrew 4.0.0

#354
post #31

On macOS, has anyone moved from/to MacPorts to/from Homebrew? Why did you move? What are the pros and cons of each system?

Moved a long time ago, mostly because MacPorts installed their whole own world of dependencies, while Homebrew used system libraries where possible.

Homebrew gave up using OS libraries a long time ago.

Re: Homebrew 4.0.0

#355

[flagged]

Does "nazi" even mean anything anymore, or do we just use it to describe things we don't like? Does nobody care about Godwin's law?

In what world does it mean “something you dont like”? It means “overzealous” and has been used in that way in recent times. Ever heard of the word “grammar-nazi”?

So im getting flagged here for using a word as it is supposed to be.

Way to go for censorship and suppressing opinions then, since i am pointing out a valid criticism of the homebrew project.

Re: Homebrew 4.0.0

#356
post #136

While I use Homebrew on my Mac — it is a major risk. I am afraid that the project is not following strict security policies and will be compromised at some point. Evil package or evil version of brew can steal or modify my data. I think this will also hurt the Mac platform. I wish Apple would invest some effort into building an App Store for cli programs. While it may be complicated for the community(require signing,…

The Mac App Store is pretty terrible. I wouldn’t trust them to do a better job with CLI programs than they currently are with desktop ones.

Apparently they have a malware problem too: https://lifehacker.com/great-now-the-apple-app-store-has-mal...

Re: Homebrew 4.0.0

#357

Earlier quoted context omitted.

I use Little Snitch to alert on any outbound connections and make a decision. The google stuff immediately got a permanent blackhole for Homebrew. Anything I'm uncertain of I'll give a short-term approval (30mins) to not break anything. After a couple of rounds of execution (and sometimes some trial & error) you can usually work out which requests are essential and which are some notifications/tracking thing.

So you didn't see the notice brew(1) gives you on first run?

I can't recall, though this approach isn't specific to homebrew. I block it permanently at a network/process level rather than having to remember to set a ENV var.

Re: Homebrew 4.0.0

#358

On macOS, has anyone moved from/to MacPorts to/from Homebrew? Why did you move? What are the pros and cons of each system?

Macports to Homebrew back in uh, 2013ish, maybe?

Macports had broken multiple times in a year, under totally ordinary operation (nothing weird, just installing and uninstalling packages without doing anything that ought to be risky). A couple times I'd decided it was easier to just delete its entire directory and start over. Big rpm-hell vibes from the bad old days.

Switched to Homebrew. It's broken a couple times in a decade or so, only on OS upgrades. Easy fixes. I like the sudo-free package management. I like that it lets me manage a lot more of my software than Macports did (bigger selection, and "casks" for commercial software, which are now integrated into the main UI so that's not even some extra thing to learn anymore—it feels like being back on Gentoo with a good binary package cache)

Re: Homebrew 4.0.0

#359

I despise, despise, Homebrew's "we know better than you" approach to always installing the latest versions of every dependency. How tf is this fine? They don't even offer alternative. They just say "we can't test all of the packages installed and all version combinations, so this is the best we can do". Well, no one asked you to test my exact setup. All I'm asking for is: if I have perfectly working Node 18 and I nee…

If you have project dependencies, Homebrew's not a good fit for that—but, crucially, that's far from just being a problem with Homebrew, it's true of most (not all, but most) system package managers.

Using a tool-specific system (e.g. nvm), or Docker, or a VM, is far better for reproducibility. Homebrew's better for installing things you're going to use directly, yourself. Like, don't use it to install Postgres system-wide if you need it for some rails "app"—you'll just run into pain the first time you have to git-bisect or go back and fix some older deployed branch and that version was running on some earlier version of Postgres, or the first time you want to work on a second project that relies on a different version.

That's not just a Homebrew thing, the same problem applies, to, say, Debian and dpkg—don't use those to install project deps, unless you're very sure those deps will always be "whatever's available from Debian today".

Homebrew's great for installing your tools. It's not good for project deps. Again, that's far from being just a Homebrew problem.

Re: Homebrew 4.0.0

#360
post #151

Earlier quoted context omitted.

That makes no sense. They're NOT the same. > I don't care. It doesn't change facts.

This is a lesson about mental models. From the brew devs' point of view it doesn't make sense because they are different commands. From the end user's point of view it makes perfect sense because brew is just a tool to install shit with and they do not wish to expend any brain cycles on it. That includes remembering whether this particular tool calls it update or upgrade. You know the second point of view is right be…

Disagree. I've been a user for a lot of years and prefer the apt-like distinction between the commands. They do different things.

> Similarly, as someone who only rarely uses it, a huge frustration is that when I do, it invariably wants to update 100+ packages. I never asked for it to do that and I was happy with whatever was installed right before it decided to do that and block my system for 20 minutes.

There's a setting for that, no need for it to keep being a huge frustration.

Post reply on HN