2

Homebrew vs MacPorts vs Pkgsrc

 1 year ago
source link: https://forums.macrumors.com/threads/homebrew-vs-macports-vs-pkgsrc.2149012/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Homebrew vs MacPorts vs Pkgsrc

knightjp

macrumors newbie

Original poster

Aug 20, 2015 Dubai
Has anyone used all 3 and which one is the best.. From my experience and by all the comments, MacPorts seems to be the most well known and the most safest in terms of security.
I don't like Homebrew because of this article I read online... https://applehelpwriter.com/2018/03/21/how-homebrew-invites-users-to-get-pwned/
It seems that Homebrew gets all the new stuff. So I'm sort of rethinking of trying it. But I do not know if I can remove all of the software if I want to later.

With Pkgsrc, there isn't much out there in terms of usage on MacOS, but it looks like it gets the vote over MacPorts on here:
https://www.slant.co/versus/1588/1591/~macports_vs_pkgsrc
If its popular, why aren't there any articles online about it?
Reactions: ArkSingularity

it wasnt me

macrumors member
Apr 18, 2019 the internet, mostly
Late to the question, but maybe some people are still curious:

Homebrew has addressed its most obvious flaws by now, e.g. it defaults to /opt/homebrew now (on Apple Silicon) instead of cluttering /usr/local. It still has a few advantages over other package managers; namely, it supports installing from .dmg images directly. As far as I know, no other package manager does that, they all require you to keep a parallel infrastructure instead of just integrating with your native libraries.

I spent some time with MacPorts, pkgsrc and Nix (all of which run on a Mac, non-Mac package managers are irrelevant for this discussion... ).
  • MacPorts was the first one I used. I stopped using MacPorts because of the same reasons why I don't use BSD ports anymore: I usually want to install a prebuilt software, not wait for its build process to finish. (I do build a few applications myself, but those are either mine or I'm curious for nightly builds.)
  • Nix demands to be installed into /nix, leading to quite a mess of system settings and security implications on macOS devices. It also would like to load some scripts into my shell profile, which is not quite good as I tend to use unsupported shells as my default interactive shell.
  • pkgsrc, the default package manager of NetBSD, is amazingly portable and has quite a lot of packages on macOS which are installed into a sane folder (/opt/pkg). In direct comparison to Homebrew and MacPorts, however, it is not optimized for macOS targets, so you'll basically install generic Unix-like software with it. Its prebuilt package installer pkgin is a joy to use though.
I went with pkgsrc a while ago. There are a few articles about it which also apply to pkgsrc on macOS, but I admit that it is mostly ignored by macOS users. The ownership change of the macOS infrastructure from Joyent to MNX did probably not help it either. If I had to start from scratch, I would probably go with Homebrew today.
Last edited: Today at 5:46 AM
Reactions: curnalpanic

posguy99

macrumors 68020
Nov 3, 2004 2,154 1,293
Homebrew has addressed its most obvious flaws by now, e.g. it defaults to /opt/homebrew now (on Apple Silicon) instead of cluttering /usr/local. It still has a few advantages over other package managers; namely, it supports installing from .dmg images directly. As far as I know, no other package manager does that, they all require you to keep a parallel infrastructure instead of just integrating with your native libraries.
What do you expect /usr/local to be "cluttered" with, if not locally-installed software? Homebrew's problem with that location was the arrogance that they believed they *owned* /usr/local, and could change things to suit themselves.

Homebrew installs their ARM builds in /opt/homebrew to allow for ARM and x86 to be installed in parallel.

I assume what you think you mean by "installing from .dmg images directly" is the cask infrastructure?
MacPorts was the first one I used. I stopped using MacPorts because of the same reasons why I don't use BSD ports anymore: I usually want to install a prebuilt software, not wait for its build process to finish. (I do build a few applications myself, but those are either mine or I'm curious for nightly builds.)
People keep coming up with this, and it's amusing, if inaccurate. MacPorts has distributed pre-built binaries for a long time now. Occasionally you hit one that their build server(s) don't have a binary for yet, but that's the exception, not the rile.
Reactions: it wasnt me

it wasnt me

macrumors member
Apr 18, 2019 the internet, mostly
What do you expect /usr/local to be "cluttered" with, if not locally-installed software?
Locally-installed software from a whole lot of different sources, all of which not taking other sources in mind, making maintenance hard and dependency tracking nearly impossible.
Homebrew installs their ARM builds in /opt/homebrew to allow for ARM and x86 to be installed in parallel.
I hope that they'll default to /opt/homebrew once macOS on x86 is considered deprecated by them.
I assume what you think you mean by "installing from .dmg images directly" is the cask infrastructure?
Yup.
Occasionally you hit one that their build server(s) don't have a binary for yet, but that's the exception, not the rile.
A few years ago, when I started using pkgsrc instead, there was not a single MacPort that came as a binary package on my MacBook (2019). If this situation has improved by now, that's good to know, at least. Combined with the statement from the project website, however ...
MacPorts.org said:
The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac operating system.
..., I did not assume that binary packages even were a thing there.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK