3 ms·
I mainly disagree with the Homebrew stance on sudo/root. They claim it's better to install everything under a user dir, but 10% of the time that doesn't work fo
by frollogaston 2y ago
I mainly disagree with the Homebrew stance on sudo/root. They claim it's better to install everything under a user dir, but 10% of the time that doesn't work for whatever reason, and tons of users have screwed up their permissions trying to fix it. No other package manager has this issue.
- selkin 2y agoI am not too fond of this design for reasons of privilege separation and FHS-alignment, but can accept it as most Homebrew users don't have their Macintosh computers used by multiple people.
- frollogaston 2y agoMy machine is single-user, problem is some things require root. Maybe they shouldn't according to Homebrew's stance on permissions, but idk, I'm working with what I've got.
- selkin 2y agoCan you give a concrete example? I know why certain software has be run with root privileges, but it's a bit hard for me to come with a reasonable scenario where a software would fail to run properly when installed to a directory that is owned by the same non-root user that launches that software.
- frollogaston 2y agoThe symptom was something like https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions https://stackoverflow.com/questions/16432071/how-to-fix-home... , which btw has a terrible accepted answer. I forget the root cause (no pun intended), possibly some bad interaction with stuff I installed outside of Homebrew. It's also possible I did something wrong, but even then there's something to be said about so many users having the same problem uniquely with Homebrew. Lemme try to repro again when I'm home.
- agos 2y agothis kind of errors are quite common with Homebrew in my experience. if you did anything "wrong", then it's something really easy to do wrong which lots of other (me included) have done wrong at some point, and that the software should help to prevent
- frollogaston 2y agoDigging through it more, it seems like Homebrew didn't play nice with anything else that used that dir. Maybe it's less of a problem now that it installs to /opt/homebrew, but I imagine there are still times Homebrew needs to place files in root-owned dirs or next to them. This issue is also brought up in the Github commit posted here: https://news.ycombinator.com/item?id=43766371 https://news.ycombinator.com/item?id=43766371 "I wouldn't worry about it not being root. We don't install anything base enough for it to be a concern (unlike MacPorts or Fink)."
- JimDabell 2y agoMy Macs aren’t used by multiple people but they are multi-user systems. At minimum I have work and personal accounts, often project-specific accounts too. Homebrew is really bad at this and I was hoping anything that came along to replace it would do better. All the similar tools like APT etc. can handle this, it’s such a pain that Homebrew makes it difficult.
- frollogaston 2y agoAnd it's multi-user in a way even if you only have one account, cause the other account is root, and some stuff besides Homebrew will install as root.
- mort96 2y agoI would've been alright if they actually installed stuff in a user dir under the user's home folder, but it's insane to have a system-wide /opt/homebrew owned by whatever user happened to run the installer. Very icky.
- selkin 2y agoIt is possible to install Homebrew itself and the software it packages under your home folder[0], though that configuration is not officially supported. This is how I install Homebrew when I have to, and so far the only issue I ran into is that binary packages are often tagged as installable only to Homebrew's default folder, so Homebrew had to built the to-be-installed software from source instead, resulting in it taking longer and the computer fans spinning louder. [0] https://docs.brew.sh/Installation#untar-anywhere-unsupported https://docs.brew.sh/Installation#untar-anywhere-unsupported