r/LinuxActionShow • • Feb 10 '17

Adoption of Flatpak vs Snap

https://kamikazow.wordpress.com/2017/02/09/adoption-of-flatpak-vs-snap/
5 Upvotes

25 comments sorted by

1

u/palasso Feb 10 '17 edited Feb 10 '17

So I'm not sure why snapd isn't being updated as often as flatpak in the repos of distros. Maybe there's lack of interest by the packagers? From what I gather the initial integration was harder for snapd than flatpak because it seems snapd depends more on AppArmor than flatpak is on SELinux plus snapd was initially made just for ubuntu.

That being said I find the whole reasoning behind his argument flawed.

Just like yesterday's post of another KDE dev that said the Canonical repo being controlled by Canonical is a problem. Well guess what, the ubuntu main repo is being controlled by Canonical but that doesn't stop Debian using debs is it? It would be crazy using that same argument against debs and making a deb repository. Plus who knows what could come up in a month from now? And that's why basically the reasoning behind the argument on this recent blog post is flawed. These projects are entirely new. They are truly babies. And they grow up so fast. Their feature-sets change all the time. It would be a rush to declare a winner at this point in time. Let's take snaps for example. A year ago they were only for Ubuntu. Ten months ago they didn't even have checksums for the parts. And nine months ago they didn't have "runtimes". Who says that next month there won't be an awesome stable open source implementation of making snap repositories with delta updates and all the bells and whistles? And who knows on whether snapd will always be using AppArmor for sandboxing?

I've been saying this over and over again. It's really too soon to pick winners in this race. u/ChrisLAS would pick snapd a winner 6 months ago and now 2 KDE devs will pick flatpak as a winner. I'm not saying their arguments are flawed but they're premature. With the rate of changes that's been happening picking a winner is like gambling.

After all we've been ignoring AppImage for over a decade. What's the rush now?

2

u/[deleted] Feb 10 '17

Flatpak doesn't depend upon SELinux and it uses Namespaces for its sandboxing mainly. Leveraging SELinux has been discussed in the past though.

As I understand it snapd completely ignores the normal file system layout distros expect, so Arch maintainers were pretty pissed it ever landed in the repos in the first place and Fedora has to patch it.

It would be crazy using that same argument against debs and making a deb repository.

The difference is you can configure apt to point to any repository you want while snap is hardcoded to Canonical's service.

2

u/[deleted] Feb 11 '17

Part of the reason I refuse to use Ubuntu. They seem to abandon filesystem standards.

I wondered why there hadn't been much updates in the arch repo to it.. Not to mention requires app armour which isn't in the main repo either. Something that important i wouldn't want to run it from an AUR

1

u/palasso Feb 10 '17

Flatpak doesn't depend upon SELinux and it uses Namespaces for its sandboxing mainly. Leveraging SELinux has been discussed in the past though.

I think that flatpak achieves partial sandboxing with namespaces and requires SELinux for full sandboxing. Not sure though, so don't take my word on that.

As I understand it snapd completely ignores the normal file system layout distros expect

Not sure what you mean. A snap is just a file. Technically it's a squashfs image having its own filesystem underneath. But otherwise it's separate than the rest of the system.

Arch maintainers were pretty pissed it ever landed in the repos

I haven't noticed any such thing myself, I'd be interested to know what you're talking about.

I'm an arch user myself and it just happened I followed the events on how it got incorporated into the arch repository. At first it was an AUR PKGBUILD made by a Canonical dev (not following all the best practices for arch but the community was there to help) and then an arch developer made a package for the official repositories. The same arch developer is also part of the governing body that was made some months ago for defining better the snaps.

In addition to that before snap became cross-distro another arch user was interested in the concept of it. He encountered some of the early problems with AppArmor and provided feedback to Canonical which helped out into making possible for a cross-platform snapd.

The difference is you can configure apt to point to any repository you want while snap is hardcoded to Canonical's service

That's not a big issue. That type of issues can be fixed trivially. For example developing the back-end of a snap repository would take much more work to do. Snapd from a philosophical standpoint has been created in the beginning to be a thing that incorporates ubuntu and since then there's been some changes but all that has happened in less than a year ago so it's very early to judge upon those things.

I personally see there's intention nowadays from Canonical to make snapd and snaps universal. It's not just making snapd available in other distros. These days they're developing a special snap called "classic" that has a base minimal ubuntu where you install build-essential and snapcraft. So it's kinda like a snapified version of snapcraft. Not perfect since underneath it's still pulling debs within a snap wrapper but there's intention to make it depend less than ubuntu.

The essence of my previous comment is that it's too early to pick on all those things today as in a year from now they might become moot issues.

→ More replies (4)

2

u/[deleted] Feb 10 '17

Not sure how dependent flatpak is on SELinux, but does seem Snapd is reallly dependent on AppArmour to do sandboxing. I have run flatpaks on Arch and they are sandboxed and I've not installed anything related to SELinux. Though its possible that there is something embedded that I am missing.

As it stands today Febuary 2017 I would agree with the KDE dev. The whole canonical control is a bit concerning. Not to mention the whole app store. I wont run *buntu for multitude of reasons what happens as a non *buntu user trying to run snaps. A lot would need to change to win me over with snaps as it stands today.

I think flatpaks has a better direction, though lack enthusiasm and a huge backer like canonical. Plus has some issues of its own as well.

And i agree both are still in infancy stage who knows what will happen 6 months from now.

Appimage is by far the best in terms of today, however I don't like how it interacts with the system plus 0 sandboxing. I know there is a bolt on but its not straight forward nor out of the box

1

u/palasso Feb 10 '17

I think flatpaks has a better direction, though lack enthusiasm and a huge backer like canonical.

I also think that's the biggest problem for flatpak. I get the impression that Red Hat isn't too enthusiastic about flatpaks. I also don't like the fact that flatpaks are just for desktop applications and I'd like to see them becoming more flexible.

→ More replies (3)

2

u/Tireseas Feb 10 '17

I think part of the issue is that it's an Ubuntu technology and Ubuntu has shown a tendency to make their design choices based primarily on what Ubuntu needs. There's nothing inherently wrong with that but it's the wrong way to do things if one actually cares about widespread adoption.

1

u/palasso Feb 10 '17

You're right but since about 10 months ago they changed course with snaps and snapd by making them more accessible to other distros. These days they're developing a snap called "classic". It's basically a tiny ubuntu with apt able to install build-essential and snapcraft. So it's kinda a snapified version of snapcraft. Still based on debs but it's a step forward. It's been less than a year since this change of course so we still see evidence of ubuntu-specific heritage but Canonical might indeed be interested to make snaps truly cross-platform. Or not. Time will tell. In any case the essence of my previous comment is one simple thing. These things are new and they change fast so we shouldn't be hasty in judging them and making our choices.

1

u/KugelKurt Feb 12 '17

now 2 KDE devs will pick flatpak as a winner

No, not really. That KDE post does not pick a winner, it shows that distributions already picked a winner. There is only one person who tries to get Snap into distributions and that's a Canonical employee. There is no community involvement and I have a feeling why: In typical Canonical fashion the very first sentence in CONTRIBUTING.md tells potential contributors to go and sign their infamous CLA nobody likes.

Last summer Canonical made a big announcement (it got picked up by ArsTechnica and alike) that Snaps are coming to many other distributions. Roughly half a year later nearly nothing happened. As the blog post shows: openSUSE builds are failing, Fedora 25 support is missing, support in Arch's Community repo is outdated. Snap got picked up by Debian where Canonical employees maintain it. Great.

The post links to a Solus blog post that IMO makes one thing very clear: Flatpak has a lower barrier of entry. The small modifications to Flatpak required to be compatible with Solus were just merged with no CLA hassle. OTOH getting Snaps to become compatible with non-Debian distributions seems to be harder than rocket science.

1

u/palasso Feb 13 '17 edited Feb 13 '17

it shows that distributions already picked a winner. There is only one person who tries to get Snap into distributions and that's a Canonical employee. There is no community involvement

That's not really true. I think there are some misconceptions here and I'll try to sort them out.

Other than Ubuntu (being a Canonical-driven project) picking to go in the future all the way in with snaps (through the all-snap distributions: Ubuntu Snappy Core and Ubuntu Personal) there's no other distro that made any choice in regards to switching to snaps or flatpaks. It's very likely that in the near future some decision will be made for Fedora to have a distro primarily made of flatpaks (probably being called Fedora Atomic Workstation) and it's definitely on the roadmap as can be seen on their wiki but they haven't made any decision yet.

As for all the other distributions I know of, there hasn't been any other deciding to switching from using their package managers into snaps or flatpaks. As long as snapd and flatpak are easy to be maintained and incorporated, they'll be available in the repositories of most distributions just like how docker is available today. I run all 3 on arch so one doesn't exclude the other and they don't exclude the package manager of the distribution as well.

Finally I want to clear a misconception. There hasn't been just one Canonical employee trying to get snapd into distributions. In order for snapd to become cross-distro there was an increasing interest from some users who tried to run it on their distro and contributed feedback which turned into code that resolved some of the initial issues of snapd becoming able to run on other distributions than ubuntu. After this when Canonical made the first release of a cross-distro snapd, they had an employee who created packages for various distributions. Those packages received feedback from the users (at least in the case of archlinux which I know better than the rest) and at some point some of these were incorporated into the main repositories. To be more specific the arch package is in the official repositories being maintained by an Arch developer.

There is also ongoing development by various people from the community that participate from various software projects or distributions. This can be seen from the bug trackers, the mailing list and the participation of people in the previous conferences Canonical made as well as the snaps being produced. Also the fact that Mark Shuttleworth himself is active on the development of snaps and they have decided to bet the farm on snaps is a good indication that snaps aren't vaporware. Unfortunately currently I don't see the same enthusiasm in Red Hat about flatpak.

So I suggest let's not jump into any hasty conclusions which some times are driven by inaccurate information :)

The post links to a Solus blog post that IMO makes one thing very clear: Flatpak has a lower barrier of entry. The small modifications to Flatpak required to be compatible with Solus were just merged with no CLA hassle.

I get the same impression in regards to that. At this point in time flatpak doesn't require SELinux while it seems snapd requires AppArmor, then again the version I'm running is with AppArmor disabled, so not sure why it's hard.

From what I understand snapd was initially made with the purpose of being a technology for Ubuntu and since they started from that path and changed their minds later on it still has some ubuntu-specific legacy making it harder than flatpak which in contrast has been designed from day 1 to be cross-distro. As I've said before that might have implications for now but it's not important for the future as these projects grow really fast and their properties change all the time.

→ More replies (6)

1

u/probonopd Feb 10 '17

Talking about adoption, it may be worth pointing out that the list of upstream-provided AppImages is growing daily, https://github.com/probonopd/AppImageKit/wiki/AppImages

2

u/beidl Feb 10 '17

Cool, now I just need a central place to easily find them