News for hackers. Stuff that matters.
Re:Brew Is a Bad Neighbor by amelius on Saturday September 03, 2022 @03:06PM (#32705007)
IT seems to be stuck in an endless loop of package management/versioning/install problems.
Re:Brew Is a Bad Neighbor by armchairhacker on Saturday September 03, 2022 @03:51PM (#32705458)
I wish there was one universal package manager which provides binaries for all platforms, stable/beta/nightly, unverified and verified

No more “apt get”, “pacman -S”, “brew install”, etc. you just run “pkg add <package>” and it will a) actually have the package and b) download or build it whether you’re on debian, arch, macos, openBSD, etc.

You can configure to use the stable or nightly packages, you can add custom package repos including an AUR-equivalent “unverified” repo (and remove the default “verified but not securely audited” repo), you can configure to build everything manually if you want or only download prebuilt binaries, or download source code, or documentation. And you can do this globally, for users, for groups of packages, or for individual packages. You can patch local packages, you can define a buildscript and publish your own packages from their git repos, etc. You can even use a stable version of one package and force it to have nightly dependencies (or vice versa), probably not a good idea but you do you.

Honestly it sounds so simple but it isn’t implemented. Instead we have Debian for stable packages, Arch for nightly packages and AUR, macOS has homebrew with all its criticisms or MacPorts, and BSD has 3 different package managers all with their own flaws. And languages have their own package managers, which is fine (bc you’re not going to use one language’s package manager for another) but it would be nice to get that unified as well and have superior dependency resolution, workspaces, etc. for every language.

Re:Brew Is a Bad Neighbor by Beltalowda on Saturday September 03, 2022 @04:39PM (#32705855)
There are cross-platform package managers: pkgsrc and nix for example, and I believe HomeBrew runs on Linux too.

It's not that simple though as certain choices are fundamentally incompatible. In Debian packagers are expected to take "ownership" of the package, backport fixes, apply patches or fixes to integrate better with the Debian system, etc.

On Arch Linux, it will ship the latest stable version from upstream with as little modifications as possible.

You can go with one approach or you can go with the other, but you can't really do both at the same time.

Then there's the design of the tooling itself: apt behaves fundamentally different from pacman.

Some things can probably be unified here and there, but I don't think it's quite that simple.

Re:Brew Is a Bad Neighbor by joe_guy on Saturday September 03, 2022 @04:01PM (#32705534)
The tooling side isn't the tricky part, it's the insane amount of work that is required to create and maintain each package. You need massive community buy in. Because of this, unfortunately, the best package managers aren't the most sound, the best are the most popular.
Re:Brew Is a Bad Neighbor by encryptluks2 on Saturday September 03, 2022 @04:24PM (#32705716)
Arch doesn't use nightly packages. They use stable and Debian often use several releases behind. Your statement is like saying that using the latest official stable version of Nginx is the same as nightly and doesn't instill a lot of confidence in whatever point you're trying to make.
Re:Brew Is a Bad Neighbor by dima55 on Saturday September 03, 2022 @03:26PM (#32705207)
If you use an OS that doesn't do package management, maybe. Linux distros work just fine.
Re:Brew Is a Bad Neighbor by rstat1 on Saturday September 03, 2022 @03:33PM (#32705278)
Except for when they don't. Which is more often than it should be.

If I had a dime for every hour of my life wasted by distro package managers (or really any package manager) breaking when I try to do some basic operation, I'd be a very rich person.

Re:Brew Is a Bad Neighbor by ravenstine on Saturday September 03, 2022 @03:51PM (#32705452)
It's been a long while since I've used Linux for anything but servers, but I have to agree. Not just with package management but pretty much anything in Linux outside the server domain. I used to waste so much time dealing with conflicts between packages, but also on weird bugs with graphics and audio, xorg.conf, etc., just to get things to work as expected. This comment kinda just turned into a rant about Linux in general. Unless things have changed, I wouldn't recommend Linux as a desktop to anyone but masochists. It's definitely a good thing that Linux distros have package management built-in, but that doesn't mean there aren't significant drawbacks to the way the Linux community approaches it. In contrast, I rarely have issues when I run `brew install`. My memories of Aptitude aren't particularly fond.
Re:Brew Is a Bad Neighbor by still_grokking on Saturday September 03, 2022 @05:08PM (#32706087)
Honest question: Why are you talking about something you haven't seen for more than at least 20 years?

Linux is the desktop with the least amount of WTFs. With a big margin!

All other OSes break with every update.

Even the perpetual "beta"-system Debian Testing is much more robust in day to day use than things like macOS or Windows (and that holds even while installing whatever daily Debian updates come along without thinking)..

On a (semi-stable) Linux (like Testing) there are never "conflicts between packages", btw. This can only happen if you make a mess and mix up different distros…

Please don't spread FUD in the future if you don't know what you're talking about. Thanks.

Re:Brew Is a Bad Neighbor by ravenstine on Sunday September 04, 2022 @11:28AM (#32714058)
Where did I say 20 years? The last time I was using Linux (Debian mostly, Ubuntu, Mint, Crunch and) full time was back in 2016. Occasionally I've had to interact with them and their respective DEs over the years since, but I've been using macOS full time to this day. So 20 years? Not really, actually. More like 6 or 7.

> Even the perpetual "beta"-system Debian Testing is much more robust in day to day use than things like macOS or Windows (and that holds even while installing whatever daily Debian updates come along without thinking)..

I don't care how "robust" Linux is. Can a distro do everything I want without some caveat like horizontal tearing, weird audio incompatibilities, weird graphics driver issues, booting to black after updates, difficulty reconciling managed packages, files mysteriously being deleted from common file systems, or basic features disappearing from foundational apps like the file manager? If such a distro exists, I'd like to see it, because I've never installed any variety of Linux that didn't have annoyances not present on commercial operating systems. And yes, that includes any version of Debian.

Sorry Linux desktops, time is up. I spent ~13 years trying to love you, but you always have baggage. Maybe you don't anymore (I highly doubt that), but it's too late. And I'm not an outlier; your countless ex boyfriends and girlfriends agree with me.

> On a (semi-stable) Linux (like Testing) there are never "conflicts between packages", btw. This can only happen if you make a mess and mix up different distros…

Yeah right... no one ever has to install a version of software that's newer than what's in the distros respective repos. Those people all go through the trouble to guess what dependencies some source code relies and compiles everything by hand just to avoid pissing off Aptitude. /s

The real world doesn't work like that. Having package management be locked to the repo for the particular distro version is great for Linux as a server. It sucks ass if you're an everyday person just trying to do things other than fiddle with their OS. Ideally, the user should be hardly aware of their OS.

Sure, there's also this "Snaps" thing now, which I don't have experience with, but apparently there's something about it that pisses off a large amount of the Linux crowd.

And are you telling me you've never done anything custom to your Linux installations? Because that's one of the key features these distros sell themselves on. You can make Linux "your own." That sounds great, but what that means is even so much as changing which file manager you use can lead to disaster when you perform an update, even after doing all the allegedly right things.

Regardless, the way that distros manage packages can only serve to get in the way of users who aren't OS nerds. Any gain in stability comes at the potential cost of time wasted which does not exist nearly to the same extent on commercial operating systems.

The Linux crowd reminds me a lot of the amateur radio crowd. Just as Linux people say that their distros are now very stable and easy to use, the Hams think that it's worth the time of casually interested people to get a fully featured Ham radio setup with all the bells and whistles and to take the "easy" FCC license exam. Anyone who thinks radio is cool but isn't interested in studying and spending lots of time with electronics in their basement "doesn't know what they are talking about." In reality, a GMRS radio is probably better for most people in almost every case, just as most people should avoid Linux and use macOS or Windows instead. Linux DEs will never be popular with non-nerds unless their community stops acting like Hams, but that probably won't happen because Linux had been like Ham since I started using it. The community was saying exactly what you are saying today back in 2005.

> Please don't spread FUD in the future if you don't know what you're talking about.

That is a terrific piece of advice that anyone making an argument should take.

Re:Brew Is a Bad Neighbor by rstat1 on Saturday September 03, 2022 @05:29PM (#32706300)
>All other OSes break with every update.

I've never had a Windows install break because of a dodgy update. Not saying it doesn't happen but its never happened to me, whereas when it has happened, its always been some Linux distro. Doesn't matter which because I've seen it happen on all the major ones (Ubuntu, Fedora, etc..)

In fact I have a Linux VM right now, pegging the host's CPU to 100% because of a broken update.

Honestly you should probably take your own advice re: not know what you're talking about.

>>Linux is the desktop with the most amount of WTFs. With a big margin!

FTFY

Re:Brew Is a Bad Neighbor by still_grokking on Saturday September 03, 2022 @05:41PM (#32706394)
> I've never had a Windows install break because of a dodgy update.

Now you're obviously trolling.

Re:Brew Is a Bad Neighbor by rstat1 on Sunday September 04, 2022 @02:15PM (#32715961)
What? No I'm not. There's zero reason for me to be dishonest about that.
Re:Brew Is a Bad Neighbor by blep_ on Saturday September 03, 2022 @04:14PM (#32705639)
xorg.conf doesn't even exist anymore on most systems. The others have been improved quite a bit since "a long while" ago.

That doesn't mean you have to try it again to update your opinions, if you have something else you're happy with now, but it does mean you should consider not spreading nonsense about things you haven't used.

Re:Brew Is a Bad Neighbor by Beltalowda on Saturday September 03, 2022 @04:44PM (#32705899)
I can't even remember the last time I had to look at an xorg configuration file. I think it must have been a decade; maybe longer.

Back in the XFree86 and early Xorg days it could be a pain though, but that was a long time ago. "X -configure" asking you about monitor refresh rates that I never knew the answer to ... ah, old times.

Re:Brew Is a Bad Neighbor by howinteresting on Saturday September 03, 2022 @04:27PM (#32705745)
I'm not a masochist. I want tools to get out of my way. I happily use Linux because it is the only OS with decent tiling window managers.

macOS and Windows feel like toys in comparison to Linux which is an actual productivity tool.

Re:Brew Is a Bad Neighbor by pessimizer on Saturday September 03, 2022 @05:41PM (#32706396)
> Which is more often than it should be.

How did you calibrate this? I've certainly had no more (far less) trouble with apt-get over the past decade than I have with any commercial OS package installation. What standard is Linux package management being measured against that currently exists? Package management is a dream on Linux compared to wrangling Windows software.

Re:Brew Is a Bad Neighbor by kitsunesoba on Saturday September 03, 2022 @04:58PM (#32706014)
All of the common Linux package managers make it really easy to accidentally shoot yourself in the foot in my experience. apt and yum/dnf are the most frequent offenders in my case, but I've managed to do it with pacman and portage too.
Re:Brew Is a Bad Neighbor by still_grokking on Saturday September 03, 2022 @05:13PM (#32706138)
How can you "accidentally shoot yourself in the foot" with a Linux package manager?

Would be curious to know what's the point as this never happened to me. In almost 25 years of Linux usage.

Re:Brew Is a Bad Neighbor by kitsunesoba on Saturday September 03, 2022 @05:23PM (#32706250)
Most commonly, dependency conflicts. Probably the most well known example of this was Linus of the Linus Tech Tips YouTube channel accidentally rendering his Pop!OS install unusable by installing Steam.

The second most common way is installing random packages from the internet in attempt to get something working. This is one I ran into years ago trying to get audio working under Fedora on some random laptop.

Re:Brew Is a Bad Neighbor by still_grokking on Saturday September 03, 2022 @05:39PM (#32706376)
What are "dependency conflicts"?

Something like that could probably only happen on a broken OS, I guess.

Pop!OS? Isn't that a FrankenDebian in the first place, so all bets are off anyway?

https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_Frank...

> The second most common way is installing random packages from the internet […]

How any package manager on any OS could prevent breakage when the user tries hard to break the system at will?

Now I'm a little bit confused.

Re:Brew Is a Bad Neighbor by bzxcvbn on Saturday September 03, 2022 @03:33PM (#32705277)
The existence of nix, nvm, conda, venv... or even docker suggests otherwise.
Re:Brew Is a Bad Neighbor by oneplane on Saturday September 03, 2022 @03:44PM (#32705372)
Out of that list, only nix is a system package manager. The rest are developer tools and runtime configurations.
Re:Brew Is a Bad Neighbor by bscphil on Saturday September 03, 2022 @05:20PM (#32706214)
> The rest are developer tools and runtime configurations.

I wish people understood this, but sadly they seem to be more and more common as primary modes for software distribution.

Re:Brew Is a Bad Neighbor by aprdm on Saturday September 03, 2022 @05:14PM (#32706149)
How is conda different than nix in this regard?
Re:Brew Is a Bad Neighbor by oneplane on Saturday September 03, 2022 @05:19PM (#32706206)
Conda is a subset of Nix in this regard.
Re:Brew Is a Bad Neighbor by IshKebab on Saturday September 03, 2022 @03:33PM (#32705264)
As long as you only ever use packages from your distro's packaging system.
Re:Brew Is a Bad Neighbor by dmitriid on Saturday September 03, 2022 @04:03PM (#32705549)
Which one of the distros with which flavor of a package manager do you suggest?

And have those package managers manage to work without sudo in 2022?

Re:Brew Is a Bad Neighbor by pxc on Saturday September 03, 2022 @04:40PM (#32705868)
Nix, Guix, and Flatpak all work fine without root privileges.

But why is that a requirement? Homebrew doesn't work without root; it only pretends to.

Re:Brew Is a Bad Neighbor by dmitriid on Saturday September 03, 2022 @04:53PM (#32705976)
> Nix, Guix, and Flatpak

How many of those are "built in into OS unlike the other OSes"?

> But why is that a requirement? Homebrew doesn't work without root; it only pretends to.

Can't remember when I last needed to run sudo with brew. Whereas I've yet to see a Linux distribution able to install anything per user.

Re:Brew Is a Bad Neighbor by pxc on Sunday September 04, 2022 @12:13AM (#32709758)
> How many of those are "built in into OS unlike the other OSes"?

There are distros where each of the three is shipped with the OS and used to distribute applications that are installed by default, but Flatpak isn't a 'system package manager' in that it doesn't supply things like the libc that lives in /usr/lib or equivalent.

All three are also portable and hermetic enough, though, that they can safely be used on other operating systems without interfering with the base system.

> Whereas I've yet to see a Linux distribution able to install anything per user.

This is the norm on NixOS and GuixSD, the distros based on the Nix and Guix package managers, respectively. That kind of thing is still fairly marginal in the overall Linux landscape. It's also feasible with container-based package managers, which are growing in adoption, Flatpak chief among them.

Both NixOS and GuixSD have their own issues and can present special challenges to users, but the per-user package management functionality works well and is cool to see in action. They're definitely worth playing with in VMs if you haven't used them.

---------

Homebrew has been useful to many people for a long time, and it absolutely excels in UX. But the fundamentals are lacking and it's hard for third-party package managers to cope with Apple's changes on major macOS releases. There are definitely things that could improve for developers with a first-party offering. I get the defensiveness and I understand that Homebrew has strengths, but imo the standard critique along the lines of the OP is essentially correct.

Re:Brew Is a Bad Neighbor by dmitriid on Sunday September 04, 2022 @02:41AM (#32710485)
> There are distros where each of the three is shipped with the OS

> All three are also portable and hermetic enough, though, that they can safely be used on other operating systems

The original statement was: "If you use an OS that doesn't do package management, maybe. Linux distros work just fine."

So, some distros.

> That kind of thing [installing without requiring sudo] is still fairly marginal in the overall Linux landscape.

Indeed.

> Both NixOS and GuixSD have their own issues and can present special challenges to users

Indeed.

> Homebrew has been useful to many people for a long time, and it absolutely excels in UX. But the fundamentals are lacking

Key being: it has been both useful, and it excels in UX. "Lacking in fundamentals" is important to a vanishingly small number of people who care about a random set of preferences they define as "fundamentals" (and probably don't even agree on this set).

> I get the defensiveness and I understand that Homebrew has strengths, but imo the standard critique along the lines of the OP is essentially correct.

There's no defensiveness around "you claim X, but if you dig not even that deep you find that your claims are misleading at best".

Re:Brew Is a Bad Neighbor by adhesive_wombat on Saturday September 03, 2022 @03:33PM (#32705267)
Until you have something that uses conda.
Re:Brew Is a Bad Neighbor by riolu on Saturday September 03, 2022 @05:00PM (#32706033)
Rather than trying to force macOS to support package management, developers should be containerizing their environments where possible with docker/podman.

The best package manager for macOS is Docker with an Alpine container. Not ruby scripts with git as a backend and questionable permissions.

Re:Brew Is a Bad Neighbor by amelius on Saturday September 03, 2022 @05:23PM (#32706241)
Does that work well for libraries that you use during software development? Or do you develop inside the container? What if you use two libraries and each has to live in its own container?