Support for macOS


#1

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?


#2

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.


#3

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.


#4

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


#5

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.


#6

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?


#7

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


#8

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


#9

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.


#10

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


#11

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


#12

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.


#13

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.


#14

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.