News for hackers. Stuff that matters.
Re:Homebrew 3.0 by mojuba on Friday February 05, 2021 @08:37AM (#26036127)
Been a MacPorts user for years and I know nothing about Homebrew. To those who tried both: should a software engineer switch to Homebrew?

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?

Re:Homebrew 3.0 by shagie on Friday February 05, 2021 @10:01AM (#26036996)
MacPorts and Homebrew have a different philosophy of software installation.

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.

Re:Homebrew 3.0 by loeg on Friday February 05, 2021 @10:40AM (#26037479)
> 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.

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?"

Re:Homebrew 3.0 by banana_giraffe on Friday February 05, 2021 @12:41PM (#26038943)
> Homebrew wants you to change ownership of /usr/local to your individual user

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
Re:Homebrew 3.0 by anaerobicover on Friday February 05, 2021 @01:35PM (#26039647)
Parent's information is outdated, but originally/historically Homebrew did want you to chown /usr/local
Re:Homebrew 3.0 by anaerobicover on Friday February 05, 2021 @04:28PM (#26041448)
Actually (I can't edit the original comment anymore) it looks like they were still recommending this as recently as last year?? https://discourse.brew.sh/t/permission-problems/3011/29

Haven't used Homebrew in quite a time, so I'm not sure.

Re:Homebrew 3.0 by loeg on Saturday February 06, 2021 @12:49PM (#26048287)
As recently as like, 1-3 months ago, yeah? I would have tried to install homebrew for the first time sometime December 2020 or later.
Re:Homebrew 3.0 by dylan604 on Friday February 05, 2021 @11:12AM (#26037838)
Huh? I'm on Big Sur running homebrew.

'ls -l /usr' reveals that /usr/local is root:wheel just like all other folders under /usr. How exactly is homebrew changing ownership?

Re:Homebrew 3.0 by loeg on Friday February 05, 2021 @11:23AM (#26037961)
Any chance you're on Apple Silicon? For some reason homebrew uses /usr/local on Intel macs and /opt/homebrew on ARM macs.

Anyway, this requirement is well documented and not new:

https://github.com/Homebrew/brew/issues?q=is%3Aissue+%2Fusr%...

http://github.com/Homebrew/brew/blob/master/docs/Installatio...

Homebrew asks users (on Intel macs) to change the ownership of /usr/local to their local user. And it refuses to run under sudo.

Re:Homebrew 3.0 by djrogers on Friday February 05, 2021 @12:16PM (#26038618)
> Homebrew asks users (on Intel macs) to change the ownership of /usr/local to their local user.

Nope - intel Mac on Big Sur:

drogers@SJCMACJDYMD6M ~ % ls -l /usr

[snip]

drwxr-xr-x 15 root wheel 480 Dec 14 20:10 local

[end snip]

And for the record, neither of your links support your claim.

Re:Homebrew 3.0 by anaerobicover on Friday February 05, 2021 @12:56PM (#26039164)
This changed in the last few years (I don't recall the exact date), but it absolutely was the way that brew operated for many years.

https://apple.stackexchange.com/questions/1393/are-my-permis...

https://superuser.com/questions/1264673/chown-usr-local-oper...

Re:Homebrew 3.0 by dylan604 on Friday February 05, 2021 @11:38AM (#26038158)
>Any chance you're on Apple Silicon?

No, I'm on an Intel chip, not M1.

>Homebrew asks users (on Intel macs) to change the ownership of /usr/local to their local user. And it refuses to run under sudo.

Again, no, not on my machine it doesn't. /usr/local is root:wheel. This is a newish (to me) machine that I gave first birthday to beginning of December 2020. The first thing I did was installed brew and started installing the things that makes my computer useful to me. No permissions were asked to be changed.

Re:Homebrew 3.0 by Redoubts on Friday February 05, 2021 @12:55PM (#26039146)
https://stackoverflow.com/questions/16432071/how-to-fix-home...

Dunno if it needs this now anymore -- i think they moved to /usr/local/Homebrew some time ago -- but this was a big deal for a few years

Re:Homebrew 3.0 by ashtonkem on Friday February 05, 2021 @10:30AM (#26037363)
Given the moving nature of the OSX toolchain and directory structure, having your third party package manager integrated into the system toolchain increasingly feels like a bad idea.
Re:Homebrew 3.0 by shagie on Friday February 05, 2021 @01:33PM (#26039620)
The flip side of that is "do you want to have two scripting and compiler toolchains installed on the machine - one that gets updates from the vendor and one that gets updates from volunteers?"

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.

Re:Homebrew 3.0 by mojuba on Friday February 05, 2021 @10:18AM (#26037208)
Containers cover some use cases but not all. Experimentation for one, also if you need specific compiler toolchains that you occasionally use on your sources. You don't create a Docker image each time you need a specific toolchain. MacPorts definitely shines here but it's probably not a great option for non-technical users.
Re:Homebrew 3.0 by SkyMarshal on Friday February 05, 2021 @09:16AM (#26036520)
Fwiw you can use the Nix package manager (https://nixos.org/) on OS X to accomplish those same things. Lots of discussion about that the past few years:

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.

Re:Homebrew 3.0 by cutler on Friday February 05, 2021 @09:19AM (#26036549)
How is that better than a pm specifically designed for Mac?
Re:Homebrew 3.0 by Benjamin_Dobell on Friday February 05, 2021 @09:29AM (#26036644)
I use Homebrew, and am genuinely appreciative of the amount of effort all the contributors have put in. However, as far as package managers go, it's kind of awful.

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.

Re:Homebrew 3.0 by faitswulff on Friday February 05, 2021 @09:56AM (#26036926)
Also any random operation can take 20 minutes to complete if you haven't used brew in a while.
Re:Homebrew 3.0 by upbeat_general on Friday February 05, 2021 @12:34PM (#26038835)
You can disable this but I agree, I hate it.

This comment actually just spurred me to find this (https://gist.github.com/jb510/99f12b1ac70f1cf8b780) which may fix the issue of forgetting to manually update.

Re:Homebrew 3.0 by indemnity on Friday February 05, 2021 @03:14PM (#26040647)
I understand why they did it, but it’s super annoying.

Given the intervals between running Homebrew, you just know it’s going to spin for a minute or two updating every damn time you try to use it, usually when you want something installed fast.

Re:Homebrew 3.0 by cutler on Saturday February 06, 2021 @08:34AM (#26046387)
Have you tried MacPorts?
Re:Homebrew 3.0 by Benjamin_Dobell on Saturday February 06, 2021 @08:39AM (#26046409)
Not in about 8 years. I do most of my development in Docker these days so tend to make use of Linux package managers.
Re:Homebrew 3.0 by cutler on Tuesday February 09, 2021 @12:52PM (#26080485)
MacPorts has been virtually flawless for me in the last 16 years. Worth a try.
Re:Homebrew 3.0 by abathur on Friday February 05, 2021 @12:51PM (#26039107)
It probably depends on what you want?

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.)

Re:Homebrew 3.0 by SkyMarshal on Friday February 05, 2021 @10:03AM (#26037025)
Are you talking about Homerew or MacPorts?
Re:Homebrew 3.0 by sirn on Friday February 05, 2021 @10:43AM (#26037516)
Unfortunately, Nixpkg doesn't check buildability on Darwin when merging PRs, so things can break quite often on the nixpkgs-unstable channel (compared to nixpkgs-unstable on Linux). It's not hard to rollback, though, but it does makes me never want to ever run `nix-channel --update`.
Re:Homebrew 3.0 by abathur on Friday February 05, 2021 @12:35PM (#26038846)
I feel similarly and am a little careful about when I choose to take an update.

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.

Re:Homebrew 3.0 by soraminazuki on Friday February 05, 2021 @01:28PM (#26039562)
nixpkgs CI does check for buildability on Darwin, which can be confirmed by looking at any of their PRs. However, packages do tend to be get marked as broken on Darwin if it doesn’t build and the packager doesn’t own a Mac.

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.

[1]: https://github.com/NixOS/nixpkgs/issues/97479

Re:Homebrew 3.0 by sirn on Friday February 05, 2021 @01:42PM (#26039720)
I think what I meant was darwin failure doesn't block.

Recently I had nomad breakage on -unstable caused by nvml support, which pulls in nvidia_x11, which pulls in linux_5_4, which of course not installable on darwin[1]. The maintainer fixed it very quickly (thank you!) but I still need to wait few more days for it to be included in -unstable.

[1]: https://github.com/NixOS/nixpkgs/issues/108603

Re:Homebrew 3.0 by Ericson2314 on Friday February 05, 2021 @11:09AM (#26037804)
Use one of the Darwin channels, that won't advance unless Darwin things are not too broken.
Re:Homebrew 3.0 by newscracker on Friday February 05, 2021 @08:46AM (#26036213)
Here’s a blog post from April 2019 on package managers on macOS. [1] The author, saagarjha (who also comments here regularly), switched from homebrew to MacPorts. A more current update to this post would probably be more helpful.

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...

Re:Homebrew 3.0 by jimbokun on Friday February 05, 2021 @10:10AM (#26037119)
This is very interesting, and maybe sheds light on why Google decided not to hire Max. There seems to be some consensus that MacPorts has the better architecture, while Homebrew has been better at responding to users, even according to Max himself.

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.

Re:Homebrew 3.0 by hombre_fatal on Friday February 05, 2021 @11:42AM (#26038203)
> maybe sheds light on why Google decided not to hire Max.

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.

Re:Homebrew 3.0 by jgwil2 on Saturday February 06, 2021 @12:01PM (#26047819)
I promise you that Homebrew is operating "at scale." Considering that Google hires many kids straight out of school who have never built any significant real-world software at all, I think this hypothesis is highly unlikely.
Re:Homebrew 3.0 by lawnchair_larry on Friday February 05, 2021 @10:33PM (#26043880)
> There seems to be some consensus that MacPorts has the better 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.

Re:Homebrew 3.0 by lucideer on Friday February 05, 2021 @09:29AM (#26036643)
> found it a bit cumbersome with the “no sudo” requirement

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?

Re:Homebrew 3.0 by mikepurvis on Friday February 05, 2021 @09:47AM (#26036816)
My understanding is that the whole reason for running the outer commands as sudo is so that the inner build/install commands can be run in a far more restricted environment. Because brew runs as your own user, every build has access to your entire home directory, the whole homebrew folder, etc. It's nice in principle to not have to "trust" any of homebrew with sudo, but in reality, the trust surface area is far larger. With MacPorts, you only have to trust the tooling, not the individual package definitions (though obviously the calculus does change slightly when bottles are in the picture, since then the build/install is happening elsewhere).

Relevant: https://xkcd.com/1200/

Re:Homebrew 3.0 by optimuspaul on Friday February 05, 2021 @12:09PM (#26038525)
I am confused by this. sudo seems like a far larger surface area than running as me. If it's just me then it's just me, but if it's sudo, then it's the entire box.
Re:Homebrew 3.0 by mikepurvis on Friday February 05, 2021 @12:27PM (#26038744)
It depends whether you trust the tool maintainers more than the package definition maintainers. I certainly would. But don't take my word for it— here's a MacPorts developer explaining the sandboxing of builds:

https://apple.stackexchange.com/a/106942

Re:Homebrew 3.0 by Wowfunhappy on Friday February 05, 2021 @01:29PM (#26039569)
> Directories listed in multiple users' $PATH that are writable without superuser privileges can be used for attacks (e.g., by placing a sudo binary that will log the password there). The same can be done by malicious software running as your user in order to get your password

Yikes. That particular attack did not occur to me.

Re:Homebrew 3.0 by lucideer on Friday February 05, 2021 @03:17PM (#26040683)
Thank you for this link. This is the first robust argument for running as root that I've seen, and completely upends my assumptions.

I'd been considering trying macports but this has convinced me.

Re:Homebrew 3.0 by brigandish on Friday February 05, 2021 @10:12AM (#26037141)
> inner build/install commands can be run in a far more restricted environment

As I seem to remember it, homebrew rankles if you use sudo but also complains if you’re not an admin account, which struck me as ironic and irritating all at once, and means that xkcd isn’t quite as relevant.

Re:Homebrew 3.0 by lucideer on Friday February 05, 2021 @11:12AM (#26037832)
> every build has access to your entire home directory, the whole homebrew folder, etc.

Isn't this just whataboutism though? Yes that's potentially a problem but it's an orthogonal one. So not really relevant to this discussion.

A hypothetical solution to the problem in the linked XKCD would be to somehow prevent an attacker accessing your bank, it would not be to allow an attacker to install drivers without your permission.

> With MacPorts, you only have to trust the tooling, not the individual package definitions (though obviously the calculus does change slightly when bottles are in the picture, since then the build/install is happening elsewhere).

This calculus change is basically my primary concern.

Of course it's not ideal that Homebrew apps have access to everything in my Home, but that's still better than them having access to everything on my system.

Re:Homebrew 3.0 by mikepurvis on Friday February 05, 2021 @11:18AM (#26037913)
The point is that they wouldn't. Only the core brew utility would, because in almost all cases, it would be immediately downgrading itself to either a dedicated homebrew user, or in the case of builds, to a nobody user who does its work in /tmp and only has write access to the one install path it has been allocated (which is then chowned to the brew user afterward).

The fundamental issue is that the POSIX user model has no concept of one user being strictly less privileged than another, and therefore all impersonations require root.

And note that the situation on Debian and Ubuntu is much worse than either of these models, because every package has an opportunity to run arbitrary commands as root as part of the postinstall and at various other times during the package lifecycle. So basically you've owned yourself the first time you add some user's random PPA and run `apt dist-upgrade` to pull new versions from it.

Re:Homebrew 3.0 by Wowfunhappy on Friday February 05, 2021 @09:44AM (#26036779)
The problem is that the way they do it breaks the UNIX model. /usr/local is common to all users, but Homebrew gives it the current user's permissions. This consequently creates weirdness if you actually use multiple user accounts.
Re:Homebrew 3.0 by lucideer on Friday February 05, 2021 @11:15AM (#26037882)
Exactly why I prefixed my comment with "this is one of the FEW features I do love". The exact technical approach Hombrew ends up taking to a lot of problems always seems not quite right whenever I've dug a little deeper.
Re:Homebrew 3.0 by kstrauser on Friday February 05, 2021 @01:13PM (#26039371)
Fair point, but I bet the number of Macs in the wild shared by multiple people who would want to run Homebrew are vanishingly small.
Re:Homebrew 3.0 by Wowfunhappy on Friday February 05, 2021 @01:42PM (#26039714)
Sure, but it's a native feature built into the Mac platform. If software is going to prevent that from working properly, then that should be communicated very clearly.
Re:Homebrew 3.0 by kstrauser on Friday February 05, 2021 @02:16PM (#26040088)
Is this an issue in practice in more than a rounding error number of Macs? I'd bet lots of money that the vast majority of developers (that is, people likely to be installing Homebrew in the first place) are using effectively single-user systems.
Re:Homebrew 3.0 by nrclark on Friday February 05, 2021 @09:47AM (#26036807)
I'm not sure about unprivileged installs, but MacPorts is very good about sticking to /opt/local. It doesn't ever place anything (including config files) outside of /opt/local. So you get pretty good assurance that it won't trash your system too badly.
Re:Homebrew 3.0 by Wowfunhappy on Friday February 05, 2021 @10:52AM (#26037605)
And, they actually enforce this with a specially provisioned MacPorts user. So although it requires sudo, MacPorts installs don’t actually run as root.
Re:Homebrew 3.0 by saagarjha on Friday February 05, 2021 @06:10PM (#26042389)
Yes, it does; you can just configure it with --prefix (to move it out of /opt/local) and --with-no-root-privileges. The downside is that you won't be able to use the binary packages anymore, but I think that is true for Homebrew as well.
Re:Homebrew 3.0 by blandflakes on Friday February 05, 2021 @08:59AM (#26036355)
I find that MacPorts is a better citizen of my laptop, but the mindshare of homebrew means that brew will have both more packages and more up to date packages.

And getting the tools team at work to vend both brew and macports seems malicious so I just suck it up there.

Re:Homebrew 3.0 by brigandish on Friday February 05, 2021 @10:03AM (#26037013)
I don’t use homebrew (for many of the reasons found in the comments here and more) but this is why I do visit their repo[1] for a “formula” whenever I need something macports or pkgsrc can’t supply me.

[1] https://github.com/Homebrew/homebrew-core/blob/master/Formul...

Re:Homebrew 3.0 by protomyth on Friday February 05, 2021 @09:29AM (#26036641)
I think that's the key, MacPorts stays in its lane. I also like the variant mechanism. It makes it easy (much like OpenBSD flavors) to get what I want out of it.
Re:Homebrew 3.0 by lucideer on Friday February 05, 2021 @09:09AM (#26036453)
Have never used MacPorts, but based on your comment, and a few of the replies, I may give it a try. Homebrew is quite painful in many ways, particularly when managing multiple versions of a package (MySQL & PostgreSQL especially has had a lot of issues for me).

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.

Re:Homebrew 3.0 by jimbokun on Friday February 05, 2021 @10:14AM (#26037160)
This Homebrew MacPorts discussion is giving me a MySQL Postgres vibe.

The former is more popular and easier to get started with and bigger community, but the latter is higher quality and better designed.

Re:Homebrew 3.0 by zymhan on Friday February 05, 2021 @12:29PM (#26038779)
You would probably enjoy the `port select` command in Macports to pick the version you want to launch when invoking, say, "python".

Macports is also good about naming different versions, so you can have python-34, python-37, and python-29 installed together.

Re:Homebrew 3.0 by nicolas_t on Friday February 05, 2021 @08:41AM (#26036167)
My experience with homebrew is that it doesn't deal well with multiple version of packages at the same time. For example, it doesn't like to keep outdated openssl in parallel, which is good from a security standpoint but can make it difficult if your job involves a lot of looking at antique codebases and help with updating them... It's why I switched back to macports after briefly testing it
Re:Homebrew 3.0 by awakeasleep on Friday February 05, 2021 @08:54AM (#26036295)
Can you explain exactly what you are describing:

“it doesnt deal well with multiple versions at the same time”

Also what system/os are you comparing to?

Re:Homebrew 3.0 by nicolas_t on Friday February 05, 2021 @09:17AM (#26036528)
I'm comparing to macports. I remember a brew update that removed an old version of openssl causing all of my older ruby packages to fail. Now I would definitely not use ruby 1.9.x in production but I sometimes do have to be able to run locally antique codebases that haven't been used in a long time. I was caught off guard because a simple install of an unrelated application with homebrew destroyed a big part of my work flow.

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.

Re:Homebrew 3.0 by cutler on Friday February 05, 2021 @09:26AM (#26036608)
Why not just use rbenv with a $HOME/.gem directory. Much simpler as Ruby versions come with their own openssl.
Re:Homebrew 3.0 by nicolas_t on Friday February 05, 2021 @09:55AM (#26036924)
I was using rbenv, but try installing an ancient version of ruby through rbenv, I have never been able to get it to work without having the existing openssl library in my system (not an issue with newer versions)
Re:Homebrew 3.0 by cutler on Tuesday February 09, 2021 @12:50PM (#26080464)
I think that's because rbenv only introduced bundling openssl libs at a certain point in its history so, yes, if you're going for a really old version fair point.
Re:Homebrew 3.0 by capableweb on Friday February 05, 2021 @09:00AM (#26036377)
Don't have a ton of experience with either macports or homebrew but pretty much any package manager deals with running multiple different versions at the same time, or projects using different versions of the same dependency, without getting in your way. Biggest/most famous example I guess would be javascript/npm/npm inc registry.
Re:Homebrew 3.0 by masklinn on Friday February 05, 2021 @10:17AM (#26037195)
Nope, completely different “package manager”. Homebrew and Mac ports are more similar to apt or yum or Pacman, and those often do not provide for running multiples of the same software except in specific edge cases where sauf software can be argued to be different from itself e.g. python2/3, they sort of things.
Re:Homebrew 3.0 by ragnese on Friday February 05, 2021 @09:15AM (#26036505)
Probably comparing it to MacPorts, which does allow multiple versions of the same packages to be installed simultaneously.
Re:Homebrew 3.0 by cies on Friday February 05, 2021 @08:56AM (#26036324)
Nix(OS)?
Re:Homebrew 3.0 by my123 on Friday February 05, 2021 @09:00AM (#26036375)
No. MacPorts is so much better nowadays.
Re:Homebrew 3.0 by dewey on Friday February 05, 2021 @09:28AM (#26036631)
In what way?
Re:Homebrew 3.0 by my123 on Friday February 05, 2021 @09:49AM (#26036838)
Dependency management in Homebrew is nothing short of primitive or broken...
Re:Homebrew 3.0 by somehnguy on Friday February 05, 2021 @10:07AM (#26037078)
Not to mention that the recommended way of installing certain packages changes seemingly randomly sometimes. Python, PHP, OpenJDK are ones that I've specifically had issues with. It starts with finding some random blog post on Google that differs from every other blog post on Google about how to accomplish the install. Then you spend a bit looking for other references to see if the one you're following is the new way or the old way that won't work right anymore.

I also very rarely update my Homebrew packages because there is no telling what will break half the time due to this.

And the fact that simply installing a package force updates every other package by default! I needed a single tiny utility while on a screen share recently, I `brew install` it. 15 minutes later Brew was still figuring the world out and it ended up being faster to just find the utility on Github and download it manually to use while letting Brew do its thing in the background. Still no idea if it ever ended up installing...

Don't get me wrong, I still think brew has been handy for me over the years. But I breathe a sigh of relief whenever I `apt-get` something on a Debian box and it behaves in a sane manner.

Re:Homebrew 3.0 by bhaak on Friday February 05, 2021 @09:04AM (#26036411)
Homebrew is what a package manager would look like if Apple was doing it.

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.

Re:Homebrew 3.0 by bacon_blood on Friday February 05, 2021 @09:16AM (#26036516)
I disagree. Apple would spend the time to make universal binaries work (unlike homebrew, who has stated they won't support them). Not installing universal binaries has some bad implications for Rosetta for developers. Having mixed single processor binaries in PATH can cause architectures to switch unexpectedly for subprocess chains (like when running a build tool), or even get "bad CPU type" errors in some contexts if the wrong arch is first in PATH.
Re:Homebrew 3.0 by bhaak on Friday February 05, 2021 @01:28PM (#26039561)
Universal binaries matter most for closed source. With Homebrew being used for Open Source software it’s by far not a priority for the generic user.

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.

Re:Homebrew 3.0 by bacon_blood on Friday February 05, 2021 @04:48PM (#26041652)
No. This isn't fixed by open source. Open source projects also do binary releases (see brew cask), and those need to be universal as well. Someone needs to build those universal binaries, and homebrew has decided to be incapable as a platform to do that by refusing to ship universal binaries.

It is kinda mitigated for end users if you only run an x86 homebrew for the foreseeable future and never compile any software outside of homebrew, but that's a crappy answer.

Universal means you can seamlessly switch between architectures as necessary. Split arch homebrew, however, means you should probably keep one of them entirely out of your path until you need it, as your arch will silently change if you have the wrong arch bin in path (I encountered this in the wild). Having the wrong arch bin first in your path will also result in a bad cpu type error if you force arch on any parent process e.g. with arch -x86_64 (I encountered this in the wild).

Also, users expecting that their build tools will be x86 also results in hacks like checking the cpu type sysctl and forcing ARM, which in any build tool is likely to break the ability to build x86 binaries (I encountered this in the wild in several projects).

I've seen all of this in multiple open source projects. I had to stop using homebrew entirely for build tools as a result.

Re:Homebrew 3.0 by bhaak on Saturday February 06, 2021 @08:20AM (#26046314)
Cross-compiling is a need that almost no user ever has.

The only legit need on macOS was for a long time iOS only and now, the two supported CPU architectures. But that is covered by using XCode.

There would be now need for a Apple Homebrew to use or provide universal binaries.

Homebrew's design is for providing tools for the need of the single user of the system (it doesn't even work well in a multi-user environment) with the tools he needs on this system. Switching CPU architecture would be solved with reinstalling Homebrew on the new system (like it is now).

Re:Homebrew 3.0 by bacon_blood on Saturday February 06, 2021 @12:03PM (#26047836)
I just checked your profile and it seems like you're a command line software developer for Linux. I'm not sure why you're telling a Mac developer what Mac developers do and don't need, or what use cases are "legitimate".

I'm speaking from personal experience about what is broken about homebrew's developer tools for a software developer building and using lots of existing open source software for Mac. Please don't respond further unless you are absolutely confident your position is in good faith and supported by personal relevant experience.

Re:Homebrew 3.0 by bhaak on Saturday February 06, 2021 @01:18PM (#26048541)
Do you think command line software developing for Linux is a paid full time job? My day job is on macOS where I've been using Homebrew for about 7 years.

I know its warts. I don't say that it isn't broken for the usecase you are describing. I'm saying that like the Homebrew developers, if Apple were in charge of Homebrew, they wouldn't care about such a use case because it would only affect a tiny percentage of their user base.

If you don't believe that just look how old the user base command line tools are that are installed by default on macOS.

For example bash is "GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17), Copyright (C) 2007 Free Software Foundation, Inc." That's 14 years ago.

Re:Homebrew 3.0 by bacon_blood on Saturday February 06, 2021 @02:10PM (#26048989)
This is a software supply chain issue, but it likely doesn't interest Intel Mac users who are still using x86 homebrew and who can't empathize with the experience of the upstream developers for all the Mac software they use.
Re:Homebrew 3.0 by my123 on Friday February 05, 2021 @09:23AM (#26036582)
And MacPorts is what had/has Apple involvement actually.
Re:Homebrew 3.0 by Wowfunhappy on Friday February 05, 2021 @09:45AM (#26036787)
And, it does in fact support universal binaries.
Re:Homebrew 3.0 by cutler on Friday February 05, 2021 @09:17AM (#26036536)
Seconded, port select is great as is port variant.
Re:Homebrew 3.0 by lawnchair_larry on Friday February 05, 2021 @08:45AM (#26036201)
Yes