Support for macOS

I am new to the Linux community (recent macOS convert) and was wondering if anyone thinks it could be possible to have snap support on macOS?

It could be an alternative to Homebrew with confinement being a huge plus. In my ideal world we would have a big chunk macOS Homebrew formula maintainers working on crossplatform CLI type snaps! Reality is probably slightly different but it would be huge, wouldn’t it?

Given my limited technical understanding I suppose the host OS needs LXD support which macOS doesn’t have, correct?

4 Likes

LXD isn’t used by snapd. However, snapd does leverage a lot of Linux-specific container functionality, which simply doesn’t exist in any other operating system. So making it available on another OS would require at least offering a build of user-mode Linux that operates on top of that operating system. More realistically, virtualization technology would probably be used to support it.

But ultimately, Linux needs to run somehow to make snaps work.

Snappy requires features offered by the Linux kernel. The best bet for running universal applications is to use the hypervisor framework to create a virtual environment.

1 Like

Docker works on Darwin, isn’t there a way?

I remember a guy on irc offering to get it to work on bsd and mac but kyrofa had to refuse because there was a lot of other things happening atm.

Well if they were able to do it without snappy devs’ help then that wouldn’t be an issue? :slight_smile: Or if they were a snappy dev themselves then I guess it would’ve been decided as too low a priority… if you could persuade people to Like these posts then that might show more support for the idea?

Do you know of one? :stuck_out_tongue: Actually, that does seem to use a hypervisor framework as zyga said

1 Like

I think you all might be conflating having snapcraft work on a platform, and having snapd working on a platform.

I don’t think we are? I know snapcraft runs on macOS, I think the somewhat-moonshot idea here is for snaps (ones that could, in theory, run on macOS) to run on macOS.

the “kyrofa had to refuse” line has me thinking at least some people are :slight_smile:

Ah, that might be @KristijanZic who’s thinking that then, were you Kristijan? Were you thinking of snaps running on macOS or the possibility of snapcrafting (making snaps) on macOS? Kyrofa is a snapcraft developer, not a snapd developer, so if he refused then it’s likely he was talking about the latter (which would be strange because snapcraft does indeed run on macOS, maybe Kyrofa was simply talking outside his area of expertise, as it were)? Can you link to the particular IRC log (navigate to the date and search for #snappy)?

snapcraft runs on macOS, but only to perform store related operations, it does not build snaps there (you can point it to a remote LXD instance to get that going with cleanbuild). It is also not provided as a snap, but as a brew install.

2 Likes

I was talking about snapd I don’t think snapcraft was even a thing when we had that discussion like maybe 2 years ago it was just snappy as I remember it back then. @chipaca I also don’t think the teams were structured like that back then? I remember kyrofa telling us the team was working on Ubuntu Touch support for snapd so they didn’t want to need to maintain someone elses osx support code or something like that. Some folk from the FreeBSD community were interested in it. I think AppArmor/SElinux not available on osx was a problem at that time and snappy was hard dependant or something.

Well, the main issue is that MacOS doesn’t run Linux apps. The lack of AppArmor is really not an issue compared to that. The only possible way to support snaps on MacOS would by via a hypervisor framework that essentially runs all snaps in a Linux VM.

Docker works on macOS but inside a VM! This makes some conventions that require Linux completely blow up (like global uid/gids)

Docker treats macOS and Window alike–second class citizens. Snap seems to follow the same route.

Hi,
I think it would be interesting to have a snapcraft store for macOS native snaps (not to run linux snaps on macOS) for open source projects (it would be some kind of brew evolution, the “open source cross-platform store” for mac OS).
Maybe it is this kind of support some people talk about in this thread ?
And even if macOS doesn’t provide a “containerized” ability, it doesn’t prevent to have a store with bundled apps separately from Apple payed managed store, specifically for free open-source applications ?

Use SIGNAL crosspatch from the Authors Snap- crafters. source KDE/Dolfin. Even desktop. Have a nice texting #Snappy :slight_smile: