456 points · by robin_reala · 3y ago · 388 comments
Excellent! Thanks to the brew team for this — it was always frustrating to install something and have to wait for a full, slow update first.
> curl -sI https://formulae.brew.sh/api/formula.json | grep content-length => 19898457 (~19.9MB)
> curl -sI https://formulae.brew.sh/api/cask.json | grep content-length => 4023930 (~4MB)
But the JSON API has been around for a while so brew 4.0 just makes use of it by default.
Brew 3.3 added an off-by-default HOMEBREW_INSTALL_FROM_API bool to let you install from brew's JSON-based API instead of checking out the large (and slow) homebrew/core and homebrew/taps repos: https://formulae.brew.sh/docs/api/
Brew 4 just makes that the default and deprecates the env var (you can use HOMEBREW_NO_INSTALL_FROM_API=1 if you still want to check out the git repos for some reason).
> curl -sI --compressed https://formulae.brew.sh/api/formula.json | grep content-length => 3482583 (~3.3MB)
> curl -sI --compressed https://formulae.brew.sh/api/cask.json | grep content-length => 722915 (~0.6MB)
I actually wanted to ask why they don't just prune the history of those repos to cut down on their clone size? OT1H, I could actually imagine some software historian being curious what flags were required to build sqlite 3.6.20 from 2009 (872f50ac61d7) but OTOH building a whole new distribution system instead of effectively git-squash feels weird
As someone who regularly patches those local repos to work around silliness, I was bitten by that newfound API business and I'm thankful that env-var exists.
As someone who's seen The New Homebrew Way, I dread the day my HOMEBREW_NO_INSTALL_FROM_API gets taken away :-(
Nice. Rust Cargo is also trialling out something similar.
maybe even just create an aliased sh function that just prepends that instead of typing it out each time.
I've been doing that forever. It really is incredibly annoying how it just keeps endlessly running without doing some gymnastics (yeah sure I could add that env var set to 1 in my zshrc but I mean its just a silly default behavior)
It’s only happened twice in more than a decade, but I still have the feeling that I was better off compiling stuff manually and cultivating a tidy /usr/local/bin like I did in early 2000s. But it’s probably rose-colored glasses and I’d definitively never take the time these days.
This has settled down a bit but the big HTTPS-everywhere push last decade flushed out a ton of things which had been quietly aging in place, unnoticed until someone started depending on SNI, newer crypto suites, actually disabling deprecated versions of SSL/TLS, etc.
thats exactly what homebrew does.
The Homebrew formulas' are what's used to produce those binaries, or - if there's no pre-compiled one available - that's when it's compiled live on your system.
Seems like a decent tradeoff, as otherwise installing (say) Qt could take an hour+, since that's a bit of a monster to compile. :)
When I do a yum install, 99% of the cases it just add the package I need. And won't mess with my dev tools.
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, sandboxing, developer effort), it is likely to have better security guarantees than Homebrew.
This is a genuine question: what is your threat model, and what security policies would you like to see? It's hard to imagine a threat model that assumes an "evil version of brew" that doesn't also prevent you from installing any third-party software on your machine. Malicious packages are always possible, but Homebrew's integrity checks do an adequate (but improvable!) job of making such attacks auditable; I'm not aware of any successful supply-chain attacks mounted against Homebrew users.
I have a lot of experience with various package managers, and Homebrew is not particularly out of band with its peers (which should be read, partially, as a general indictment of packaging practices).
However I don’t understand what makes Homebrew reliable. Homebrew is a non-profit project run entirely by unpaid volunteers.
I trust repositories controlled by corporations (RHEL, Ubuntu) or properly(?) governed non-profit organizations (Debian) more. Also I trust App Store more, because of sandboxing, static and dynamic analysis.
The App Store exists primarily to distribute proprietary applications. Homebrew exists primarily to distribute open source packages. Comparing the two (and Apple's justified focus on sandboxing, etc.) feels like a mismatch.
Homebrew specifically stops you from doing stuff as root. It asks for your password once at install time so it never has to do it again.
I've even considered donating a Mac mini or something - but not to the point that I've yet emailed the macports list to ask how I could do that...
Ed: see
A company like Apple could kick whatever money to an OSS project and write it off as charity for taxes, I think for that matter.
The alternative is to run VMs/containers/etc for each project. But at that point, it will the beginning of the end for Apple's software, cause you're esentially running linux and using macOS as a terminal/thin client.. (Unit) devtools is how they got big with OS/X, and I think they sometimes forget this.
It installs itself in /opt/local, it respects the Apple SIP.
Homebrew basically sucks, because it doesn't follow Unix conventions and it doesn't follow MacOS conventions.
Macports has both pre-compiled and build-from-source, supports current and past MacOS releases, uses xcode/clang for compilation, supports port variants and multiple versions installed in parallel (with "port select" to choose a default) etc etc.
Not sure why people use anything else.
I use a Macbook for work, and every day I go without having to create an AppleID is a good day.
What I want is a dang CLI package manager, and Homebrew is pretty alright at that. No, it's not perfect, but it's far better than anything Apple has done related to app stores.
I strongly disagree with this stance, and it's a very authoritarian one at that. The common people can't be trusted with freedom so we should give up that freedom and trust in <insert authority here>. I find this stance morally repugnant and entirely at odds with where the future of technology should be going.
Tl;Dr: Hard disagree. Some of us prefer to use our computers as general computing devices, as opposed to just being desk-driven iPhones.
Apple should close this gap and I am puzzled why they have not done that yet. Because even for iOS development people need things beyond the xcode toolcahin and they resort to either of the available options. Homebrew is just one of them.
Not only cli app store but the mac app store also badly needs some love.
In 2023 I want Apple to stay as far the hell away as possible from App and package management as possible on my Macintosh. I don’t have the same hang ups on my iPhone, but I don’t want a merger of policies and incentives between the two platforms either.
If you install untrusted code, it can do nefarious things.
No platform can save you from yourself.
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-quarantined. Just like .app bundles can “provide” file extension bindings that cause things to open in them. (And probably, just like with file extension bindings, you’d want to give the user the same “this is a program downloaded from the Internet…” Gatekeeper warning the first time a command-line invocation causes the user to end up running an executable from a given .app package, if the .app hasn’t yet been Gatekeeper-blessed.) Kind of surprised this hasn’t always been a thing since NeXTSTEP, actually.
(And, ideally, rather than needing to care about PATH ordering re: these applications’ exposed bin/ executables, instead make a generic system for interactively choosing preference-ordering, like Debian’s update-alternatives(1) but as a per-user runtime-bound preference.)
2. The App Store should allow at least apps that contain both GUI and CLI versions (e.g. gVim packaging its own command-line `vi`; or Sublime Text with its `subl` command) — where all the same capability-manifest sandboxing applies to the command-line executables that applies to the GUI app; and where the CLI version of the executable linker-loader is made slightly smarter re: auto-granting capabilities, such that if you e.g. pass a file or directory path as a command-line argument to a CLI program, then that CLI program should be auto-granted a capability on that file/directory during that run.
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.
Someone also did a video walkthrough of this material recently. I don't have the link, but it might be worth searching for.
The ticket was closed because the man-page has a technical description of what the command actually does, and people should just know how the command is supposed to work, even if the reference manual tells them otherwise.
Beginner-hostility appears to be baked into the ecosystem.
Mike, Max and the gang have materially improved my life at least, cheers! :D
There's so much thankless toil that goes into maintaining package infrastructure that we all just take for granted. Thank you!
[0]: https://github.com/search?q=repo%3AHomebrew%2Fhomebrew-core+...
I chose Homebrew some years ago when I was not as experienced a programmer, because it was more popular than MacPorts. When I revisited the choice last year, I chose MacPorts.
On Homebrew:
* It has a Frankenstein permissions model; for example "brew install" writes files into /usr/local/* with your regular user account as the owner of the files.
* The permissions model means that Homebrew-managed parts of the system become a single user system, as far as I know. Multiple user accounts on the same Mac can't easily use Homebrew, as far as I know, and I dislike software with such design choices.
* Noisy messages and undesired colors in the command line output.
These issues are absent in MacPorts. Overall, MacPorts appears more mature and more Unix-like than Homebrew.
The cons of the move are that not all the packages I want are available in MacPorts. However I have sufficient experience now to package crucial missing ones into MacPorts.
I think it's /opt/homebrew on M1.
https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-th...
> permissions model means that Homebrew-managed parts of the system become a single user system, as far as I know. Multiple user accounts on the same Mac can't easily use Homebrew
The single user thing is problematic in a corp env where you may have a mgmt admin user and a non-admin dev user.
Long story short, temporarily have the dev user be an admin, install brew, drop the admin priv. That works for cli tools (which is actually great), but may not work for /Applications unless you change its ownership. Used to be OSX effectively (not literally) merged ~/Applications and /Applications, but now in MacOS the security sandboxing and entitlements don't like that.
Homebrew has done a much better job of staying out of the way.
Moved back to Nix when it was ready for Apple Silicon, mainly for better isolation / reproducability, ephemeral environments, and parity with my other systems. But if I need something that's not in nixpkgs, I'll look at MacPorts first.
1. I have used Fink. And I have used MacPorts. Now I use Homebrew.
2. When I get super-annoyed with a system, perhaps because it has entered a state where it won't update, I do a web search to see if folks have jumped from that ship to another. If there is a consensus, I jump with crowd. If not, I try to clear the decks, e.g. reinstalling from scratch, to see if I can improve my situation.
3. I don't have a list for you on the pros and cons. There may be some merit in choosing a system that is widely used, because then others might be able to help you if you encounter problems. By that measure, I think Homebrew is the best choice at the moment. But I've no reason to think there won't be something else just around the corner. I wish Apple would get in this game, but after so many decades of Apple standing by without acting, I am not especially sanguine.
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)
https://pkgsrc.joyent.com/install-on-macos/
Anything that nix does better than pkgsrc?
Now I've moved partially to homebrew due to better community support - and lack of arm builds for macports.
While neither is great as a package manager, especiall with their dependency resolution, here are a few pros&cons:
Apps: ++ Brew has a much more up-to-date collection, also more non-source binaries.
App customization: + Port, Brew dropped support for custom install flags a while ago + Brew you can setup autoupdate for your personal customizations with github actions since the main repo is using them, Ports does it manually, so you can't copy&paste their action for your use (+ Brew allows you to install Mac .app bundles in a custom folder)
Security: + Ports has a slightly better security model (folder persmissions are better though I think it only matters for multi-user machines, so mostly no relevant; it also does some sandboxing on install via a specially created user), the downside is annoying sudo, but you can remove the need for sudo for some less sensitive ops like update/uninstall to cut down on the annoyance
Space: + Brew. Both waste it with their poor package repository architecture, but with Brew you can at least delete the repo after the first install and use their API to download updates. With Ports you can't do that, moreover it duplicates its registry (one for sync, uncompressed, another for local use)
Docs: + Brew, also random Google/SO answers are less likely to be outdated
UI: + Brew. Has more info (like size), better formatted
BTW, with this release the Homebrew uses the API by default and doesn't clone the repos unless necessary.
I like brew because it’s easier to audit, faster to fix issues, and tends to update first. Years ago, macports just had so much more, but that’s become less of an issue over the years, for me anyway. Getting away from sudo is always a plus. MacPorts probably(?) is still better for very old machines, though, both in terms of speed and availability.
Basically, Homebrew will completely crap out on you if you are ever more than two macOS versions out of date. The brew people simply don't keep the older bottles around for those versions of macOS. I think there's a grace period of like one extra version, but eventually they will delete it. Once that happens, your system is hosed if you ever need to install any new packages from Homebrew ever again. You will only be able to install from source, and it's a tossup if that will work.
This is a fairly controversial Homebrew policy and lots of people have complained about it, and there's lots of rhetoric on both sides. My stance: while it's a good idea in general to stay up to date, if you are the kind that likes to keep old legacy machines around to do a few things here and there, you should know your Homebrew installation will eventually break if you don't keep updating the OS. You will eventually not want to do when the system gets old enough, and at that point Homebrew will be a mess.
I'm not interested in the debate as I get both sides, particularly involving security concerns. My experience: simply put, Homebrew's policy will cause you to have to sideline your system, or at least work around this really tedious roadblock, while it still has a good amount of life in it. I wish they kept old bottles around a few years longer, because 2-3 years is not long enough.
So I said that on my current system, which I do keep current, I'm going to not use Homebrew at all. I figured I'd use Macports, since one of the big selling points is that it works on older versions, so I won't eventually run into this problem five years from now. So I did.
The main problem is that there just aren't anywhere near as many packages as there are on Homebrew. Homebrew has become a standard for all kinds of stuff, and if there's ever a package you want on Homebrew, and it's not on Macports, what do you do? You will run into this when using Macports all the time. I've also had issues using Macports with M1; I don't remember the details but there was some weirdness I ran into one point having to configure it to set the architecture correctly on some package I was trying to install. I'm not quite sure how that compares to brew, though, since I haven't tried brew on M1.
So the net result of all of this is, I have a bunch of installation setup scripts that I moved from Homebrew to Macports, and then half of the packages just weren't on Macports, so I had to write scripts to just download those things from elsewhere - GitHub, website installers, whatever.
So now I'm debating moving back to brew. On the one hand, it just has everything, and Macports doesn't. On the other hand, it will eventually break, and Macports isn't that bad - has basic terminal commands I need and so on. I'm on the fence. If there were some user-maintained repository of legacy bottles for brew I'd move back to that.
Portfiles are definitely a little more outré than brew's Ruby, but I've found it's not too hard to make one for a tool by starting from another similar existing port. You get the contents of the example one with `port cat $existing_tool`, tweak it, and then add it to a local port repo: https://guide.macports.org/chunked/development.local-reposit... And then you can just `sudo port install $new_tool`
I love it. I'm using a desktop, not a server. I specifically want my dependencies to be always up to date
> All I'm asking for is: if I have perfectly working Node 18 and I need to install fcking Shopify CLI, don't fcking install Node 19 and break my whole setup! Tf?!
Then install nvm. Nvm will always be latest, the Homebrew packages will always depend on the latest node version, and locally you'll depend on your own node version that you installed with nvm.
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.
This is how Brew has managed this problem for years: problematic dependencies that need to be pinned to specific versions are given specific packages.
Essentially it did all dependency resolution at build time (because brew used to have no prebuilt binaries and everyone’s workstation would spend 90 minutes compiling the same things over and over again). But when they added binary distribution they didn’t change the dependency resolution to work like eg deb’s or rpm’s do.
It used to be that if you told it to install from source it would thus be able to “detect” your local existing package that provides the dependency. It may just take a while depending on what you’re installing.
The default behaviour of using the latest in repo is correct and is how every package manager works. It’s the behaviour people expect and it’s the behaviour that is arguably more secure (the fact that homebrew is bleeding edge does create issues here but generally speaking my point stands).
I believe you pin using the @ symbol followed by a version number. Eg brew install awesome-project@13.0
Homebrew is way, way worse than any other package manager because it just breaks stuff all the time.
That said, the docs say that running "brew upgrade <package>" will only upgrade that specific package. Of course, if that package relies on new versions of dependencies, they will get updated too, and in turn this will update any packages that also depend on it, creating a chain of updates. But there's an option to see what will happen: "brew upgrade --dry-run <package>".
What you're arguing about now is just that Homebrew doesn't give you a prompt. Which is a fair criticism but it doesn't really change much because if you need that other package that depends on the latest version of node, then all the prompting in the world isn't going to change the fact that you are still going to need to install that updated version.
But, as I'd mentioned before, `brew` does let you install specific versions of software too. So it's a bit of a moot point about whether you get upgraded or not since, in this circumstance, you can have your proverbial cake and eat it (ie both versions installed).
> In addition, you have different branches where the debian stable branch is extremely well tested.
Debian isn't bleeding edge and nor is it rolling release. Arch is a better comparison and people frequently complain about updates breaking things on that too (even though that does have a testing branch). To be clear, I love Arch. It is by far and away my favourite Linux and a large part of that is because of it's package management. But no system is perfect.
> Homebrew is way, way worse than any other package manager because it just breaks stuff all the time.
I agree Homebrew has it's warts. I just disagree with this particular complaint. I think Homebrew is doing the right thing here.
If you want to complain about how it has to operate outside of the core OS because it's a 3rd party tool, or its overuse of beer jargon as cute substitutes for the more recognisable package management terminologies then I'm 100% behind you. But to complain that it's keeping your system up-to-date when you haven't asked for a package to be version pinned feels more than a little unfair.
If Debian stable updates their nodejs package to 19 and you install any package that depends on nodejs, expect to get the nodejs 19 update.
The difference here is that Debian pins versions of software per release so you won't run into these situations. That's fine if you're willing to deal with running older software maintained by Debian rather than the original developers, but that's just a choice.
From what I can tell, Homebrew acts more like pacman and friends; it expects you to stay up to date, and if you don't it's up to you to fix the problem.
This is exactly how Homebrew works, too. The difference is that Debian won’t ship a new version outside of a major release so if you started with Node 18 you won’t get 19 until next year.
Now, of course, developers usually don’t like that so there are non-core repositories which update more frequently … and you get exactly the behavior which Homebrew has. Being oriented at developers just means Homebrew does that by default.
I hear this a lot, but as a 12+ year user of Homebrew it simply does not match my experience, other than for Python which is in and of itself fundamentally broken regardless of where you get it from. Indeed, I’ve spent far longer screwing about trying to get up-to-date dependencies on recent Ubuntu releases than thinking about it.
Or you could release a new package manager which does provide support for that functionality, build out a team of maintainers, and stay on top of all the releases
So according to you nobody is allowed to criticise anything because “shut up and build it yourself if you dont like it”?
Sure, people don't pay for things like Homebrew (can they even?) - but this is no reason to extract resources from end users without their consent or agency.
I have to work very hard to get something like Homebrew installed and in-use in my organization - the IT guys detest it, since they don't have the wherewithal to understand it (or else they'd be higher-paid developers) so when I finally do get it installed and in use (because it is a very productive tool), having it phone home just makes the situation worse. IT guys have asked for my blood on more than one occasion, just because they see something 'uncontrollable' phoning home .. this does a lot more harm than good.
That said, homebrew has been absolutely responsible for making MacOS usable for development purposes in this ol' hackers lab, so I'll keep using it - but I sure do wish they'd care a little more about the position they put us in, having to justify the use of it to IT guys ..
EDIT: Thinking about it, I'm actually not averse to phoning-home, just the automatic/hidden nature of it. If brew asked me, every 5 or so times that I ran it, if I would like to participate in sending anonymized analytics to the brew devs, and showed me what was being sent (instead of obfuscating it), I'd be a lot more inclined to click "[Yes] - this one time" almost every single time ..
export HOMEBREW_NO_ANALYTICS=1
-or- brew analytics off
The installer gives a warning message before sending the first analytics, with a pointer to the above URL for how to disable analytics. From install.sh: ring_bell
# Use an extra newline and bold to avoid this being missed.
ohai "Homebrew has enabled anonymous aggregate formulae and cask analytics."
echo "$(
cat <<EOS
${tty_bold}Read the analytics documentation (and how to opt-out) here:
${tty_underline}https://docs.brew.sh/Analytics${tty_reset}
No analytics data has been sent yet (nor will any be during this ${tty_bold}install${tty_reset} run).
EOS
)
"
> and showed me what was being sent (instead of obfuscating it),According to that https://docs.brew.sh/Analytics page, to see what it sends:
You can also view all the information that is sent by Homebrew’s
analytics by setting HOMEBREW_ANALYTICS_DEBUG=1 in your environment.
Please note this will also stop any analytics from being sent.
I verified that using it dumps JSON analytics to the terminal, and it didn't seem that obfuscated, given the documentation in that Analytics page.There are no hints/tips about this produced to educate a new user - if it weren't for your help, I wouldn't have known.
The non-resource-using method I propose is that homebrew merely ask the user if its okay, after 5 or 10 runs, to send some info - and then shows me the info. No, I don't want to add resources to my environment to get this info - I want homebrew developers to be honest about it, up front, and overt.
They are being sly, using dark patterns to make it unfeasible to disable analytics, because they know this is an unpopular feature of their software.
This is a message which is printed with very clear instructions the first time you run any command. It’s a simple command and there’s no noticeable difference in resource usage compared to the actual package management system, which also needs environmental variables to be set.
The big thing you’re missing is that the Homebrew maintainers are freely giving you the product of many thousands of hours of skilled work, the kind of service developers used to pay money for. In exchange, they ask for some non-personal statistics to help them avoid mistakes which could cause problems for you. I don’t think it’s fair to act like they’re tricking you when you’re getting so much out of the deal and it’s all disclosed publicly. They could be tracking stats on the package distribution infrastructure without your knowledge at all but instead chose to be fully above board about what the system does and why, and offer a trivial opt-out mechanism.
FWIW, I use "brew analytics off", not an environment variable.
You can't install brew without adding resources to your system.
But I think your real complaint is not about resources, but that the default is "opt-in with a warning" rather than "opt-out then ask for permission".
Which I can understand and agree with.
What I disagree with is characterizing the process as "hidden or hard to opt-out."
> There are no hints/tips about this produced to educate a new user - if it weren't for your help, I wouldn't have known.
I don't understand how you can say this.
The hint/tip is produced in the installer output. I quoted it. It even uses a terminal bell and bold text.
I can understand that you might prefer, say entering "yes/no" to a "may we enable analytics?" question (though it's a bit more complicated as someone may be fine with the new EU-based InfluxDB analytics but not Google Analytics).
But that's not the same as saying there are "no hints/tips about this produced to educate a new user", when it's right there in the installation output.
> merely ask the user if its okay, after 5 or 10 runs
Tracking the number of runs since the previous report is also adding resources to your system, which makes it hard for me to understand how adding those resources to your system is fine but adding an on/off resource is not.
I agree it's a dark pattern which makes it less likely that people will opt-out.
But I also think "unfeasible" is not an good characterization of "read the installation output then run 'brew analytics off'".
I'd take a minute to rip the fckng line of code bugging me every 5 installs out of the code. Thing is, if you make telemetry opt-in, it's the same as just not adding it in the first place. Only a handful of users will opt in, rendering the data pretty much useless, especially as it's install and install-fail counts.
If they included any personal data, it'd be opt-in by law (at least here in EU). As they don't, they don't have to, and I'm fine with it.
They can and should! https://github.com/homebrew/brew#donations
seems like an unfair characterisation (having been both!)
Too many times IT has had authority over development to the detriment of the project. Developers must resist this.
/home/linuxbrew/.linuxbrew
makes you wonder how much of the developer's mind is "works for me" instead of following more common sense conventions like at least put them under /usr/local or /opt instead of some special user folder in /home.
Side question - what can we do about improving security? Of the possibility that packages are not poisoned? Some sort of central CA/GPG or similar requiring to sign the packages or there would always be some holes and it is a hard problem to solve?
"But they're not the same!"
I don't care.
> I don't care.
It doesn't change facts.
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.
> 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.
It's not supported officially (ie. if you have issues with a package you're on your own), but it works great. I've used Homebrew like this for a few years.
I've never gotten this complaint about Brew at all. It has never seemed notably slow to me.
> If you had previously set HOMEBREW_NO_ANALYTICS because you didn’t like Google Analytics and/or data being sent to the USA: please consider unsetting this and setting HOMEBREW_NO_GOOGLE_ANALYTICS instead, allowing analytics data to be sent to our new InfluxDB host.
My package manager was reporting my actions to Google and I didn’t even know about that. Great…
You can see exactly how Homebrew does analytics here[1], and you can see the sum total of the information collected here[2]. No identifiable information is collected or retained.
[1]: https://github.com/Homebrew/brew/blob/master/Library/Homebre...
If my computer is sending data to Google then Google has my IP address and can correlate that data however they want. You simply can not claim that identifiable information isn't collected or retained unless you work for Google.
I don't know if you work with Homebrew or not, but I would be much more comfortable if they used something like Plausible for analytics.
FTA:
> We expect to migrate entirely from Google Analytics to our self-hosted InfluxDB instance in ~90 days at which point we will remove all Google Analytics and destroy all existing data.
Their intent is to migrate entirely away from Google to the San Francisco based InfluxData, which I guess is marginally better in some ways but seems to entirely miss the point of people's objections in spirit. Other than people's personal subjective trust of one US company over another, there's no inherent difference between Alphabet & InfluxData from a technical standpoint.
InfluxData do collect IPs per https://www.influxdata.com/legal/privacy-policy/
A Homebrew analytics user ID, e.g. 1BAB65CC-FE7F-4D8C-AB45-B7DB5A6BA9CB. This is generated by uuidgen and stored in the repository-specific Git configuration variable homebrew.analyticsuuid within $(brew --repository)/.git/config. This does not allow us to track individual users, but does enable us to accurately measure user counts versus event counts. The ID is specific to the Homebrew package manager, and does not permit Homebrew maintainers to e.g. track you across websites you visit.
IANAL, but an UUID is definitely PID under the GDPR:
‘personal data’ means any information relating to an identified or identifiable natural person (‘data subject’); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological, genetic, mental, economic, cultural or social identity of that natural person;
Also see recital 30:
Natural persons may be associated with online identifiers provided by their devices, applications, tools and protocols, such as internet protocol addresses, cookie identifiers or other identifiers such as radio frequency identification tags. This may leave traces which, in particular when combined with unique identifiers and other information received by the servers, may be used to create profiles of the natural persons and identify them.
The GDPR doesn't only take into account whether an identifier can currently be used to identify a person, but also whether the data can be correlated in the future to do so (e.g. by correlating package installs with visiting project websites, thus deanonymizing the UUID).
The only safe way to abide by the GDPR is to avoid storing any non-essential data without consent.
I am pretty sure that Homebrew have been violating the GDPR for years by making analytics opt-out. Sadly, anyone who tries to warn them gets banned from their issue tracker.
We do not have the ability to correlate your package installs (again, we do not know what you install) with your browsing history, and we do not store any information that would allow us (or an adversary) to do so.
If you want usage statistics for packages just track how often individual packages are downloaded on the server side. A maintainer has no need to know who's installing what.
I guess they might send it over TOR to get around that.
I'll make it a goal to stop all their tracking on the level of my router.
https://consoledonottrack.com/
It doesn't look likely though. I don't think it looks good that comments pointing out that Homebrew's existing behaviour (collecting analytics without obtaining informed consent from users) violates the law have been classified as abuse and hidden!
No, rather something like TRACK_ME opt-in variable.
Opt-in by advance consent is the only way. Homebrew devs are unethical jerks.
Use nixpkgs and don't look back.
If you're not a website, and so your metrics are arbitrary events with metadata instead of page views, this tends to quickly run into awkward mess.
Self hosting an InfluxDB to capture core metrics seems like a good solution that avoids privacy concerns without being too complex imo.
> Homebrew gathers anonymous aggregate user behaviour analytics using Google Analytics (until our in-progress migration to our own InfluxDB). You will be notified the first time you run brew update or install Homebrew. Analytics are not enabled until after this notice is shown, to ensure that you can opt out without ever sending analytics data.
I think it’s not cool when orgs track telemetry with opt out. But it’s not cool like when you’re at a party and you go off and fart in the corner as no one’s there and then a few seconds later someone walks by and smells it.
Continuing the analogy, telemetry with no opt out is like farting silently amongst a group of people. And tracking identified user requests while selling data is like slapping each person at the party while farting in their face.
And I guess opt in telemetry is like holding in your fart and people notice and might feel some discomfort at your discomfort.
I tend and prefer to assume good-will WRT telemetry in well-known and independent opensource projects.
export HOMEBREW_NO_ANALYTICS=1
immediately!
This has been a known things for a long long time. That is on you for not knowing about it. And it isn't doing anything that you are trying to infer in your statement anyway.
What it doesn't tell you unless you read the URL, is all you have (had) to do is "brew analytics off".
https://ports.macports.org/statistics/faq/
I really do think that people who are concerned about telemetry should install Little Snitch and also look at each of these programs documentation. Telemetry is called out for most of them, as well as how to disable it. It’s also not inherently bad as it can be a valuable tool to improve their systems, though obviously could be abused too.
In 18 years of using MacPorts, it's never messed up my system, broken something that used to work or decided that I don't get to run commands right now, because it wants to run an upgrade. (It's also never spied on me.)
The price you pay for that is that more things are compiled from scratch, but hey - you only have to do that once, and it only takes like 20 minutes on a modern Mac. Upgrades are generally pretty fast.
I used pkgsrc on macOS for a while but ended up going back to Homebrew because it was easier and there were more packages relevant to my needs; I also found packages in pkgsrc wouldn’t play nicely with zsh or bash completion sometimes, I believe this was related to patches specifically required for macOS for these packages. The concept of casks is also very nice, as it means I can manage most packages using a single package manager instead of doing dmg->drag-n-drop installations or mucking around with install/uninstall scripts. Building and maintaining a dumb cask formula is also pretty easy for apps where there isn’t already an available cask.
I haven’t used Macports so couldn’t compare - can Macports install .app applications?
Yes, I have Emacs installed via MacPorts for example.
[0] https://devenv.sh [1] https://github.com/LnL7/nix-darwin
If you aren't using home-manager[4] yet, I strongly recommend taking a look at it.
nix-darwin significantly elevates the competency of MacOS.
[1]: https://gitlab.com/jcdickinson/nix/-/tree/darwin [2]: https://gitlab.com/jcdickinson/nix/-/blob/darwin/packages/ho... [3]: https://gitlab.com/jcdickinson/nix/-/blob/darwin/flake.nix#L... [4]: https://nix-community.github.io/home-manager/
Did you know you can even install Mac App Store apps?
Here are the relevant bits where my config does it: https://github.com/dustinlyons/nixos-config/blob/main/macos/...
And, as a counter to your experience of not having it mess up a machine, every time you upgrade macOS to the next major version you have to jump through some hoops to get it to play ball again. Painful.
At some point I gave up on the hoops and installed homebrew instead and haven't looked back.
I used macOS for a few years to try it out, and I found that Macports lacked many things I needed. Taking a quick look again, let's see...
* Oclgrind: No.
* Futhark: No.
* GHC: Yes! And updated to boot. (But I'd expect such major programs to be in any package system.)
* MLkit: No.
* hledger: Yes, although not the newest version.
* git-annex: Yes, but a rather old version.
* ispc: Yes, but again a rather old version.
The impression I got (which may be inaccurate) is that Macports has a long tail of older packages, but it does not have a lot of newer stuff. It is very easy and convenient to add packages to Homebrew (just a PR with a package definition in a Ruby DSL; most things are obvious), which I think is the main reason it has become successful.
Nowadays I suggest everyone just use Nix, of course. It's not as slick and has a tough barrier to entry, but it's built on fundamentally better principles than legacy package managers.
Is the Homebrew Ruby DSL much easier than the MacPorts Tcl DSL? I think the main reason Homebrew succeeded was it had binary packages before MacPorts. But a more familiar language helped probably.
Just like using any popular framework, the most popular one comes with plenty of benefits outside of the technical differences.
I just checked the Semgrep port and while technically it does have it, it is around 150 releases behind the version brew has.
While this would be a nuisance for me even today, I was only just starting to dip my toe into programming at that point which meant I lacked the technical knowledge to perform any changes more complicated than pasting in a single line somewhere, which meant it was often game over when a package was broken.
While Homebrew has its problems it’s easy to see how it became popular.
These days if you have an ugly website, and opaque syntax, you're considered to be an abandoned project. Agree with it or not, your website sends a signal to the user and MacPort's signal says "it'll work till it doesn't and that's fine"
So not only are people complaining about free software, they’re complaining because they don’t pay attention. It’s the “Everything someone else does is not as good as what I do” mentality
EDIT: Typo
Personally, I've moved on. MacPorts is great. More people should use it.
I guess to the hacker heads of HN, telemetry is as political as religion for regular people.
When you install brew you are giving hundreds of people (or anyone who has access to their Github accounts) full remote code execution on your machine.
Never ever use brew on a machine you use to access production.
This is incorrect: Homebrew pins bottle and source installs to digests, meaning that you do have a strong integrity check each time you install a package.
Homebrew does not currently do code signing, which is not particularly abnormal for non-Linux-distribution package managers (ask yourself when you last verified a PGP signature from PyPI). There are some plans in progress to remedy that but, in its absence, HTTPS and package digests are both reasonable and no worse than standard practice in packaging.
Other than that, your toolchain is what Apple gives you, and upgrades in ~parity with XCode.
If you're worried about it, compile your own builds.
You forgot an important part: If you're worried about it, compile your own builds, and read and fully audit all the code before compiling. Then upon every update, read and audit all the changes. I believe this is infeasible even for the tech giants.
Regarding his web3 stuff, the Homebrew developers learned about them at the same time as everyone else (there was a tweet from the official account at the time). There is no relation between both projects.
Max takes every chance he gets to mention Homebrew, so the confusion is understandable but unfortunate. Even in his web3 package manager he mentions Homebrew as if it’s the old stuff.
HOMEBREW_NO_GOOGLE_ANALYTICS
HOMEBREW_NO_ANALYTICS
I hate opt-outs.“Homebrew gathers anonymous aggregate user behaviour analytics using Google Analytics (until our in-progress migration to our own InfluxDB).
You will be notified the first time you run brew update or install Homebrew.
Analytics are not enabled until after this notice is shown, to ensure that you can opt out without ever sending analytics data.”
They're also claiming to log anonymous data while the data they collect is actually pseudonymous as its tied to your specific machine/user, which means it has a whole different status in different privacy jurisdictions. It seems like they could make the data collection anonymous relativelt easily if they just stop tracking individual user installs, though.
> It seems like they could make the data collection anonymous relatively easily if they just stop tracking individual user installs, though.
Doing that would skew the reports to more active users & automated scripts. If you’re asking questions like “how many people will notice if we deprecate this?” you don’t want to count the guy who hammers “brew update” every other command many times more than someone who updates weekly.
That does still make it opt-out, though, even if it's a friendly opt-out. Microsoft's dotnet tools do the same thing.
> Doing that would skew the reports to more active users & automated scripts. If you’re asking questions like “how many people will notice if we deprecate this?” you don’t want to count the guy who hammers “brew update” every other command many times more than someone who updates weekly.
I know why they're collecting personal identifiers and I completely understand their reasoning behind it. Every website and service does this in some fashion because most requests are automated. You should still ask before you submit any telemetry, though.