Live data from Hacker News

How to Distribute Binaries for OS X Using Homebrew

octavore.com

41–50 of 84 posts

Re: How to Distribute Binaries for OS X Using Homebrew

#41
post #19

Earlier quoted context omitted.

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

> 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. I don't see how it'd solve the primary MAS woes of horrible contributor/developer experience, uncaring maintainership and inflexible sandboxing.

> horrible contributor/developer experience, uncaring maintainership

I was imagining a package manager with the standard kind of "add whatever sources to your sources list you like" model, as most Linux distros have. If the MAS was rebuilt in terms of this, then presumably adding a custom package source would make custom apps (which, after all, are just packages) show up in the MAS app for selection as well, just as they'd show up in e.g. Ubuntu Software Center. Apple would only control their app/package source.

The interesting question is whether someone would be able to list an app in their third-party source as costing money—and, if so, how that would work, and where payment would go. Maybe each "source" could come with a payment processor token for the MAS client to interact with, additional APIs to let the MAS app grab payment receipts from your source server, etc. In other words, you'd be hosting less of a "package management repo" and more of a "store server with built-in package CDN"—but that's not too big of a change.

Now, I wouldn't expect Apple to actually go this far, but it'd be in line with their current philosophy on enterprise app distribution. Apple really really dislike third-party "app store" apps, third-party "updater" daemon apps, etc.; they would much rather build infrastructure to obviate your enterprise's horrible custom solution than try to have their CSRs understand and support it for you. I could see them building this thing if Microsoft, Adobe, etc. all bugged them to for long enough. And then you as an indie developer could take advantage of it by setting up a PPA-alike (and someone could create the equivalent of Launchpad to host yours and everyone else's.)

Re: How to Distribute Binaries for OS X Using Homebrew

#42
You don’t even need to check the SHA256 by hand, just use `brew create `. It’ll create a formula with a sensible name, fetch its URL, populate the SHA256, and open the file in your editor. However note it’ll create it in the core formula directory instead of your tap; you’ll need to move it yourself.

Re: How to Distribute Binaries for OS X Using Homebrew

#43
post #26

Earlier quoted context omitted.

I heard people mentioning that (for 10.11 btw, not 10.10), but I never saw anyone give any reason for believing that that's what the installer was doing. Furthermore, I had a pretty extensive /usr/local Homebrew installation and my update to 10.11 completed in the expected time. Besides, even if the installer did do that, the resulting updated OS still had all the same contents in /usr/local. As far as I'm aware, the…

> I heard people mentioning that (for 10.11 btw, not 10.10), but I never saw anyone give any reason for believing that that's what the installer was doing. because that's exactly what the logs showed it doing: https://discussions.apple.com/message/26856483#26856483 and because the preemptive fix (if you hadn't started the update yet) was moving /usr/local's content elsewhere: https://jimlindley.com/blog/yosemite-upgr…

Huh, I only ever heard people mentioning this issue for 10.11. Never heard about it at all when 10.10 came out. I bet that's why I never saw any explanation for this reason, because people who had heard about this with 10.10 were just assuming that's what was going on.

Incidentally, I had no idea about ⌘L to show logs during OS update.

In any case, even if the OS update takes a long time, the end result is you still have the same /usr/local you did before.

Also, FWIW, the discussion you linked to references TeXLive, as does the blog post you linked. I wonder if the issue here is not in fact having anything in /usr/local, but rather having used a package installer to install something into /usr/local (which I assume TeXLive does). It doesn't make much sense to me for the OS updater to move everything out of /usr/local and then back in one-by-one under normal conditions. But if you used a package installer to install into /usr/local, then it would make more sense for it to do something like that (which is to say, it may have special behavior around things covered by package receipts).

Edit: Well, under normal conditions, it might still move the folder away and back, but I'd expect it to just move all the top-level items from the folder back, instead of manually copying all of the nested files).

Re: How to Distribute Binaries for OS X Using Homebrew

#44

> At least on OS X, things are a little easier with Homebrew. Absolutely. I adore Homebrew and it's ecosystem. Cask, in particular, is quite satisfying; gotta love installing a swath of neccessary fonts from the terminal. And, fwiw, the project is about to be on Homebrew, with no tap required: https://github.com/Homebrew/homebrew/pull/49040 Though getting it up was not quite as pain-free than our initial publishes to…

Linux Homebrew[0] can cover it for linux. Just need Windows Homebrew.

[0]: https://github.com/Linuxbrew/linuxbrew

Re: How to Distribute Binaries for OS X Using Homebrew

#45

> At least on OS X, things are a little easier with Homebrew. Absolutely. I adore Homebrew and it's ecosystem. Cask, in particular, is quite satisfying; gotta love installing a swath of neccessary fonts from the terminal. And, fwiw, the project is about to be on Homebrew, with no tap required: https://github.com/Homebrew/homebrew/pull/49040 Though getting it up was not quite as pain-free than our initial publishes to…

This only makes sense if you believe all Homebrew packages are written in JavaScript... which they aren't. Also I've been using Homebrew for about 4x as long as NPM and I have about 1/10th of the issues, so I'll just stick to the package manager that works.

Re: How to Distribute Binaries for OS X Using Homebrew

#46
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 problem I'm seeing is that what OS X has isn't a unified system, and what Apple promotes isn't want developers want to/can use. So you see time and effort going into tools like this that only last a few years. It results in more fracturing in the end.

In this popular diagram, https://upload.wikimedia.org/wikipedia/commons/7/77/Unix_his..., NeXTSTEP was originally forked in 1988, before Linux really had package management put together. Darwin is from 2001.

Is 14 years not enough time to establish a proprietor supported unified package management system?

My expectations may just be set too high.

Re: How to Distribute Binaries for OS X Using Homebrew

#48

> At least on OS X, things are a little easier with Homebrew. Absolutely. I adore Homebrew and it's ecosystem. Cask, in particular, is quite satisfying; gotta love installing a swath of neccessary fonts from the terminal. And, fwiw, the project is about to be on Homebrew, with no tap required: https://github.com/Homebrew/homebrew/pull/49040 Though getting it up was not quite as pain-free than our initial publishes to…

Linux Homebrew[0] can cover it for linux. Just need Windows Homebrew. [0]: https://github.com/Linuxbrew/linuxbrew

Wait, what problem is this solving?

Re: How to Distribute Binaries for OS X Using Homebrew

#49

> At least on OS X, things are a little easier with Homebrew. Absolutely. I adore Homebrew and it's ecosystem. Cask, in particular, is quite satisfying; gotta love installing a swath of neccessary fonts from the terminal. And, fwiw, the project is about to be on Homebrew, with no tap required: https://github.com/Homebrew/homebrew/pull/49040 Though getting it up was not quite as pain-free than our initial publishes to…

This only makes sense if you believe all Homebrew packages are written in JavaScript... which they aren't. Also I've been using Homebrew for about 4x as long as NPM and I have about 1/10th of the issues, so I'll just stick to the package manager that works.

You can use npm to distribute binaries.

Re: How to Distribute Binaries for OS X Using Homebrew

#50

> At least on OS X, things are a little easier with Homebrew. Absolutely. I adore Homebrew and it's ecosystem. Cask, in particular, is quite satisfying; gotta love installing a swath of neccessary fonts from the terminal. And, fwiw, the project is about to be on Homebrew, with no tap required: https://github.com/Homebrew/homebrew/pull/49040 Though getting it up was not quite as pain-free than our initial publishes to…

Using npm to distribute a shell script, seriously? That's not such a good idea. I think what you want is something like the Autotools so your software may be installed with the standard './configure && make && make install'. This way, you make it easy for upstream distributions to package your software.
Post reply on HN