Could the transactional mechanism that drives Canonical’s IoT-focused Snappy Ubuntu Core help unify Linux and save it from fragmentation?
This week, Canonical announced that the lightweight Snappy Ubuntu Core’s “snap” mechanism, which two months ago was extended to all Ubuntu users in Ubuntu 16.04, can also work with other Linux distributions. Snap could emerge as a universal Linux package format, enabling a single binary package “to work perfectly and securely on any Linux desktop, server, cloud or device,” says Canonical.
Installing the Calculator snap on Ubuntu
(click image to enlarge)
Snap works natively on Arch, Debian, and Fedora, in addition to Ubuntu-based distros like Kubuntu, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE, Ubuntu Unity, and Xubuntu. It is now being validated on CentOS, Elementary, Gentoo, Mint, openSUSE, RHEL, and OpenWrt.
Snap greatly simplifies third-party Linux app distribution, claims Canonical. ISVs can publish snaps rather than making tough decisions about which distros to support and then struggling to manage diverse package formats and security update mechanisms across multiple distributions.
Ubuntu’s snap app installer
(click image to enlarge)
The containerized snap technology offers better security than is available with typical package formats such as .deb, says Canonical. Snaps are isolated from one another to ensure security, and they can be updated or rolled back automatically. Each snap is confined using a range of tailored kernel isolation and security mechanisms and receives only the permissions it needs to operate.
Snaps sit alongside a Linux distro’s native packages and do not infringe on its own update mechanisms for those packages, says Canonical. The snap format is simpler than native internal package formats because it is focused only on applications rather than the core system. “Snaps are essentially self-contained zip files that can be executed very fast in place,” says the company. Stable releases, release candidates, beta versions, and daily builds of a snap can all be published simultaneously, supporting rolling releases.
Snapping up IoT
While the snap technology could help reduce desktop Linux app fragmentation, much of the focus is on the potentially much larger Internet of Things (IoT) market. Snap won’t solve all the interoperability challenges in Linux-based IoT, but it could go a long way toward unifying the upper application layer.
“We believe snaps address the security risks and manageability challenges associated with deploying and running multiple third party applications on a single IoT Gateway,” stated Jason Shepherd, Director, IoT Strategy and Partnerships, Dell.
Significantly, Samsung has endorsed the snap technology for its Artik embedded boards, which already support Fedora.
Snaps can be based on existing distribution packages, but “are more commonly built from source for optimization and size efficiency,” says Canonical. Snaps are based on snapd, a free software project on GitHub, and snap packages are built using a “snapcraft” tool. A snapcraft.io project site has been established with documentation and step-by-step guides.
Snapcraft greatly simplifies third-party Linux app distribution, says Canonical.
(click image to enlarge)
The press call was led by Ubuntu creator Mark Shuttleworth, and included reps from Samsung, Dell, and app vendor Mycroft, which is using snap for a voice-controlled smart-home IoT platform. Missing were leaders of other major Linux projects, but testimonials were provided by key contributors to distributions including Arch, Debian, and OpenWrt. There were other testimonials from ISVs such as Mozilla and the Krita Foundation, which is releasing Krita 3.0 in the snap format.
According to Shuttleworth, the “stunning” and “surprising” emergence of snap as a universal package format was not even on his roadmap a few months ago. He said that when he told ISVs that Canonical was extending snap to classic Ubuntu, the response was overwhelming.
Shuttleworth conceded that there are other universal open source packaging solutions available, such as AppImage and the newer Flatpak, but argued that most lack the security and/or transactional nature of snap. “The snap mechanism has sophisticated capabilities in the way it delivers updated versions,” he said. “Snaps are perfectly transactional.”
In response to questions, Shuttleworth said that he could see no reason why the snap mechanism could not be extended to Android. He also said that there was considerable interest among software defined radio (SDR) developers, following the lead of Lime Microsystem’s Snappy Ubuntu Core based LimeSDR. Other notable Ubuntu Snappy supporters have included Acer, GE, and Microsoft, to name a few.
This article is copyright © 2016 Linux.com and was originally published here. It has been reproduced by this site with the permission of its owner. Please visit Linux.com for up-to-date news and articles about Linux and open source.