Live data from Hacker News

How to Distribute Binaries for OS X Using Homebrew

octavore.com

11–20 of 84 posts

Re: How to Distribute Binaries for OS X Using Homebrew

#11
post #8

I find OS X's package/dependency management system to be as cobbled together as Windows'. Linux got it right: https://en.wikipedia.org/wiki/Package_manager It drives me crazy that Apple removed one the most amazing features of *nix systems: a unified software repository. Brew/brew cask doesn't come close to AUR.

> It drives me crazy that Apple removed one the most amazing features of *nix systems: a unified software repository.

It's not a feature of unices, it's a feature of _Linux_ (Ian Murdoch called it "the single biggest advancement Linux has brought to the industry"[0]).

The vast majority of unices never had a "unified software repository", and BSDs (probably the least indirect ancestor of OSX) have port trees, which at the time OSX was born (ignoring the NeXTSTEP ancestry which predates "modern" BSDs and builds directly from 4.3BSD) were a very different beast and not something suitable proprietary unices (because Apple wasn't going to give the OSX commit bit to randos).

And hell, both apt and rpm were busy _being born_, the premier package managers at the time were raw dpkg and pms(1). And pkgtool[1] I guess?

[0] http://ianmurdock.com/solaris/how-package-management-changed...

[1] http://www.slackware.com/config/packages.php

Re: How to Distribute Binaries for OS X Using Homebrew

#12
This is still quite a bit more work than publishing to npm:

1. Jump to separate repository

2. Create a .tar.gz with sensitive filename

3. "upload somewhere"

4. Manually update formula, sha, version

4. Push

Versus:

1. npm bump && npm publish

I ended up automating the formula updating after getting tired of doing that every other day, for a private tap.

Re: How to Distribute Binaries for OS X Using Homebrew

#13
I've been forcefully switched to OS X recently because work, and overall it's been pretty great (I view it as a well-integrated UI over FreeBSD). A couple of things drive me nuts though:

* (the window manager sucks, but that's not the topic. I had to get it out)

* it needs a good package manager

For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim AND emacs! However, these tools are hopelessly outdated: Despite OS X 10.11 "El Capitan" coming out last fall, Vim is still 7.3 (that's from August 2010. 2010!), and Emacs 22 (2007. That's right.)

So some enterprising folk come to the rescue: Fink, Homebrew, Macports...

Homebrew installs over /usr, so come the next OS update, all that gets squashed. Macports installs into /opt/local, but somehow doesn't survive an OS update. Also, when I tried installing SciPy it went and recompiled GCC4 from source. Guys, the 90s called, and it's been shown that recompiling from source for each user isn't worth the effort.

Apple gave MacPorts some support in the form of equipment, so there's some hints of their preferred method. But the core WTF is this: why doesn't OSX integrate a package manager for its unixy side?

Re: How to Distribute Binaries for OS X Using Homebrew

#14

You don't even need to maintain a separate custom tap repo. Keep the formula in the same repo in a Formula directory, and include the repo URL when tapping (gets rid of the homebrew- restriction) The brew command for users would be: brew tap octavore/delta https://github.com/octavore/delta.git brew install delta --- Example above of course doesn't currently work because the formula is not there (I successfully use it…

I find the method described in the post to be cleaner UX. Sure, it requires a little extra work on your part to setup, but running a single `brew install octavore/tools/delta` is much nicer and easier to remember than

brew tap octavore/delta https://github.com/octavore/delta.git brew install delta

Re: How to Distribute Binaries for OS X Using Homebrew

#15

I've been forcefully switched to OS X recently because work, and overall it's been pretty great (I view it as a well-integrated UI over FreeBSD). A couple of things drive me nuts though: * (the window manager sucks, but that's not the topic. I had to get it out) * it needs a good package manager For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim…

Given both the outdated vim/emacs/etc. releases and they've handled the Mac App Store, would you want Apple to be running the platform's main package manager?

Do I wish the 3rd party ones could be better integrated with the OS? Sure. But I'm definitely thankful it isn't Apple calling the shots (or more likely, releasing it and then refusing to call any shots at all for 8 years).

Re: How to Distribute Binaries for OS X Using Homebrew

#16

I've been forcefully switched to OS X recently because work, and overall it's been pretty great (I view it as a well-integrated UI over FreeBSD). A couple of things drive me nuts though: * (the window manager sucks, but that's not the topic. I had to get it out) * it needs a good package manager For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim…

They've actually separated out usr/local from all the security stuff leaving Homebrew free and clear for the next OS update

Re: How to Distribute Binaries for OS X Using Homebrew

#17

I've been forcefully switched to OS X recently because work, and overall it's been pretty great (I view it as a well-integrated UI over FreeBSD). A couple of things drive me nuts though: * (the window manager sucks, but that's not the topic. I had to get it out) * it needs a good package manager For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim…

> For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim AND emacs! However, these tools are hopelessly outdated: Despite OS X 10.11 "El Capitan" coming out last fall, Vim is still 7.3 (that's from August 2010. 2010!), and Emacs 22 (2007. That's right.)

And that's way more up to date than it used to be.

> Apple gave MacPorts some support in the form of equipment, so there's some hints of their preferred method. But the core WTF is this: why doesn't OSX integrate a package manager for its unixy side?

Yeah who hasn't dreamt of a package manager handled like MAS.

I'd be happy if Apple helped package managers more, contributed (financially) to them and better took them in account or discussed stuff with them wrt major releases (see: Yosemite homebew woes), but I'm really quite glad the community is completely in charge of macports or homebrew or nix.

Re: How to Distribute Binaries for OS X Using Homebrew

#18

I've been forcefully switched to OS X recently because work, and overall it's been pretty great (I view it as a well-integrated UI over FreeBSD). A couple of things drive me nuts though: * (the window manager sucks, but that's not the topic. I had to get it out) * it needs a good package manager For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim…

Homebrew installs in /usr/local, not in /usr, and OS updates never touch /usr/local. And if you're paranoid, you can instruct Homebrew to install somewhere else instead.

Re: How to Distribute Binaries for OS X Using Homebrew

#19

I've been forcefully switched to OS X recently because work, and overall it's been pretty great (I view it as a well-integrated UI over FreeBSD). A couple of things drive me nuts though: * (the window manager sucks, but that's not the topic. I had to get it out) * it needs a good package manager For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim…

> For us ol' bearded folk (at least spiritually), OS X comes with a slew of unix tools we love. It already includes both vim AND emacs! However, these tools are hopelessly outdated: Despite OS X 10.11 "El Capitan" coming out last fall, Vim is still 7.3 (that's from August 2010. 2010!), and Emacs 22 (2007. That's right.) And that's way more up to date than it used to be. > Apple gave MacPorts some support in the form…

What'd be really interesting is if MAS was rebuilt on top of a package manager. That'd solve both the lack of package management, and most of the MAS's woes. (In that you could probably just install MAS apps from the command line, and if nothing else, you could just build an alternate GUI around that.)

Re: How to Distribute Binaries for OS X Using Homebrew

#20

You don't even need to maintain a separate custom tap repo. Keep the formula in the same repo in a Formula directory, and include the repo URL when tapping (gets rid of the homebrew- restriction) The brew command for users would be: brew tap octavore/delta https://github.com/octavore/delta.git brew install delta --- Example above of course doesn't currently work because the formula is not there (I successfully use it…

I find the method described in the post to be cleaner UX. Sure, it requires a little extra work on your part to setup, but running a single `brew install octavore/tools/delta` is much nicer and easier to remember than brew tap octavore/delta https://github.com/octavore/delta.git brew install delta

You're definitely right, just wanted to provide an alternative I found useful. 95% of the time I copy & paste brew commands for custom taps from the repo, I wouldn't remember the 3-part path anyway.

This is probably asking for a PR to hombrew, the ideal command would be

brew install delta https://github.com/octavore/delta.git

Post reply on HN