Snap (software)

From Wikipedia, the free encyclopedia

Template:Short description

Page Module:Infobox/styles.css has no content.

Snap
Template:Infobox software/simple
Written inGo, C, Shell script, Python, JavaScript, NASL[1]
Operating systemLinux
LicenseGNU GPLv3 (Client & Runtime), proprietary (Backend)[2]
WebsiteScript error: No such module "WikidataIB".

Script error: No such module "Check for conflicting parameters".

Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel and the systemd init system. The packages, called snaps, and the tool for using them, snapd, work across a range of Linux distributions[3] and allow upstream software developers to distribute their applications directly to users. Snaps are self-contained applications running in a sandbox with mediated access to the host system.

Functionality

Configurable sandbox

Applications in a Snap run in a container with limited access to the host system. Using Interfaces, users can give an application mediated access to additional features of the host such as recording audio, accessing USB devices and recording video.[4][5][6] These interfaces mediate regular Linux APIs so that applications can function in the sandbox without needing to be rewritten. Desktop applications can also use the XDG Desktop Portals, a standardized API originally created by the Flatpak project (originally called xdg-app) to give sandboxed desktop applications access to host resources.[7][8] These portals often provide a better user experience compared to the native Linux APIs because they prompt the user for permission to use resources such as a webcam at the time the application uses them. The downside is that applications and toolkits need to be rewritten in order to use these newer APIs.

The Snap sandbox also supports sharing data and Unix sockets between Snaps.[9] This is often used to share common libraries and application frameworks between Snaps to reduce the size of Snaps by avoiding duplication.[10][11]

The Snap sandbox heavily relies on the AppArmor Linux Security Module from the upstream Linux kernel. Because only one "major" Linux Security Module (LSM) can be active at the same time,[12] the Snap sandbox is much less secure when another major LSM is enabled. As a result, on distributions such as Fedora which enable SELinux by default, the Snap sandbox is heavily degraded. Although Canonical is working with many other developers and companies to make it possible for multiple LSMs to run at the same time, in 2020 this solution was still a long time away.[13][12][14]

Automatic and atomic updates

Multiple times a day, snapd checks for available updates of all Snaps and installs them in the background using an atomic operation. Updates can be reverted[15][16] and use delta encoding to reduce their download size.[17][18][19]

Publishers can release and update multiple versions of their software in parallel using channels. Each channel has a specific track and risk, which indicate the version and stability of the software released on that channel. When installing an application, Snap defaults to using the latest/stable channel, which will automatically update to new major releases of the software when they become available. Publishers can create additional channels to give users the possibility to stick to specific major releases of their software. For example, a 2.0/stable channel would allow users to stick to the 2.0 version of the software and only get minor updates without the risk of backwards incompatible changes. When the publisher releases a new major version in a new channel, users can manually update to the next version when they choose.[20][21][22][23]

The schedule, frequency and timing of automatic updates can be configured by users. Users can also pause automatic updates for a certain period of time, or indefinitely.[24][25][26] Updates are automatically paused on metered connections.[27][28]

Snapcraft

Page Module:Infobox/styles.css has no content.

Snapcraft
Template:Infobox software/simple
Written inPython, Shell script, C++, Go, Dart[29]
Operating systemLinux
WebsiteScript error: No such module "WikidataIB".
Repositorygithub.com/snapcore/snapcraft

Script error: No such module "Check for conflicting parameters".

Snapcraft is a tool for developers to package their programs in the Snap format.[30] It runs on any Linux distribution supported by Snap, macOS[31] and Microsoft Windows.[32] Snapcraft builds the packages in a Virtual Machine using Multipass,[33] in order to ensure the result of a build is the same, regardless of which distribution or operating system it is built on.[34] Snapcraft supports multiple build tools and programming languages, such as Go, Java, JavaScript, Python, C/C++ and Rust. It also allows importing application metadata from multiple sources such as AppStream, git, shell scripts and setup.py files.[31][35]

Snap Store

The Snap Store allows developers to publish their snap-packaged applications.[36] All apps uploaded to the Snap Store undergo automatic testing, including a malware scan. However, the scan does not catch all issues. In one case in May 2018, two applications by the same developer were found to contain a cryptocurrency miner which ran in the background during application execution. In 2024, fake cryptocurrency wallets were uploaded that would steal the user's funds, and then when taken down by Canonical, simply reuploaded by a new account.[37] Canonical recommends users only install Snaps from publishers trusted by the user.[38][39]

Support

Snaps are self-contained packages that work across a range of Linux distributions. This is unlike traditional Linux package management approaches, which require specifically adapted packages for each Linux distribution.[40][41]

File:Snap-list.png
The command snap list here shows that Skype and IntelliJ IDEA have been installed

The snap file format is a single compressed filesystem using the SquashFS format with the extension .snap. This filesystem contains the application, libraries it depends on, and declarative metadata. This metadata is interpreted by snapd to set up an appropriately shaped secure sandbox for that application. After installation, the snap is mounted by the host operating system and decompressed on the fly when the files are used.[42][23] Although this has the advantage that snaps use less disk space, it also means some large applications start more slowly.[43][44]

Snap supports any class of Linux application such as desktop applications, server tools, IoT apps and even system services such as the printer driver stack.[45][46] To ensure this, Snap relies on systemd for features such as running socket-activated system services in a Snap.[47] This causes Snap to work best only on distributions that can adopt that init system.[48]

Adoption

File:Spotify-EasyRPM installation process screenshot.webp
Screenshot of Spotify-EasyRPM installation script running on openSUSE Tumbleweed, the script downloaded the Spotify Linux Snap package from snapcraft.io, processed and converted the package into RPM, and installed the RPM into the system

Snap initially only supported the all-Snap Ubuntu Core distribution, but in June 2016, it was ported to a wide range of Linux distributions to become a format for universal Linux packages.[49] Snap requires Systemd which is available in most, but not all, Linux distributions. Other Unix-like systems (e.g. FreeBSD) are not supported.[50] ChromeOS does not support Snap directly, only through Linux distributions installed in it that support Snap, such as Gallium OS.[51]

Ubuntu and its official derivatives pre-install Snap by default, as well as other Ubuntu-based distributions such as KDE Neon, and Zorin OS.[52] Solus have currently planned to drop Snap, to reduce the burden of maintaining AppArmor patches needed for strict Snap confinement.[53] Zorin OS have removed Snap as a default package in the Zorin OS 17 release.[54] While other official Ubuntu derivatives such as Kubuntu, Xubuntu, and Ubuntu MATE have also shipped with the competing Flatpak as a complement, they will no longer do so beginning with Ubuntu 23.04, meaning that it must be installed manually by the user.[55]

A number of notable desktop software development companies publish their software in the Snap Store, including Google,[56] JetBrains,[57] KDE,[58] Microsoft (for Linux versions of e.g. .NET Core 3.1,[59] Visual Studio Code, Skype,[60] and PowerShell), Mozilla[61] and Spotify.[62] Snaps are also used in Internet-of-Things environments, ranging from consumer-facing products[63] to enterprise device management gateways[64] and satellite communication networks.[65][66] Finally, Snap is also used by developers of server applications such as InfluxDB,[67] Kata Containers,[68] Nextcloud[69] and Travis CI.[70]

Reception

Clément Lefèbvre, founder and project leader of Linux Mint, criticized Snap, arguing that Canonical controls the distribution of software and makes its store a requirement for Snap users. In 2020, the Linux Mint project announced that its releases would not ship with snap software and would not allow snap packages to be installed automatically via APT.[71][72]

On recent versions of Ubuntu, Canonical has migrated certain packages exclusively to Snap, such as Chromium and Firefox[73] web browsers.[74][36] The replacement of Firefox led to mixed reception from users due to performance issues with the Snap version, especially on startup.[73]

See also

Lua error in mw.title.lua at line 404: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

References

Page Template:Reflist/styles.css has no content.

  1. ^ Page Module:Citation/CS1/styles.css has no content."snapcore · GitHub". GitHub. Archived from the original on 2 April 2023. Retrieved 5 November 2022.
  2. ^ Page Module:Citation/CS1/styles.css has no content."What's The Deal With Snap Packages?". 24 June 2020. Archived from the original on 9 June 2023. Retrieved 13 February 2023.
  3. ^ Page Module:Citation/CS1/styles.css has no content."snapd package versions - Repology". Repology. Archived from the original on 19 May 2021. Retrieved 20 August 2021.
  4. ^ Page Module:Citation/CS1/styles.css has no content."Supported interfaces | Snapcraft documentation". Snapcraft. Archived from the original on 2020-08-03. Retrieved 2020-08-05.
  5. ^ Page Module:Citation/CS1/styles.css has no content."Snapcraft confinement & interfaces". ReadySpace China (in 中文(简体)). 2019-06-06. Archived from the original on 2020-11-25. Retrieved 2020-08-05.
  6. ^ Page Module:Citation/CS1/styles.css has no content."A guide to snap permissions and interfaces". ReadySpace Hong Kong. 2018-11-02. Archived from the original on 2020-03-19. Retrieved 2020-08-05.
  7. ^ Page Module:Citation/CS1/styles.css has no content."Flatpak's XDG-Desktop-Portal Adds Initial Support For Snaps - Phoronix". www.phoronix.com. Archived from the original on 2020-08-14. Retrieved 2020-08-05.
  8. ^ Page Module:Citation/CS1/styles.css has no content."Desktop Integration — Flatpak documentation". docs.flatpak.org. Retrieved 2020-08-05.
  9. ^ Page Module:Citation/CS1/styles.css has no content."The content interface". Snapcraft. Archived from the original on 2020-10-20. Retrieved 2020-04-29.
  10. ^ Page Module:Citation/CS1/styles.css has no content."Snappy Is Finally Doing Something About Super Large App Sizes". OMG! Ubuntu!. 2017-06-11. Archived from the original on 2020-08-14. Retrieved 2020-08-07.
  11. ^ Page Module:Citation/CS1/styles.css has no content."Bundling KDE". archive.fosdem.org. Archived from the original on 2021-06-28. Retrieved 2020-08-07.
  12. ^ a b Page Module:Citation/CS1/styles.css has no content.Edge, Jake (2019-11-20). "LSM stacking and the future". LWN.net. Archived from the original on 2020-08-14. Retrieved 2020-08-06.
  13. ^ Page Module:Citation/CS1/styles.css has no content."How Are SNAPS claiming to have no internet plug regulated?". snapcraft.io. 2020-07-11. Archived from the original on 2020-08-14. Retrieved 2020-08-06.
  14. ^ Page Module:Citation/CS1/styles.css has no content.Johansen, John (3 February 2019). "Containers with Different Security Modules". Archived from the original on 24 July 2021. Retrieved 6 August 2020.
  15. ^ Page Module:Citation/CS1/styles.css has no content."How to revert to a previous version of a snap package? wekan in this case". costales.github.io. 2017-03-08. Archived from the original on 2020-08-14. Retrieved 2020-08-05.
  16. ^ Page Module:Citation/CS1/styles.css has no content."A Beginners Guide to Snaps in Linux - Part 1". www.tecmint.com. 5 June 2020. Archived from the original on 2020-07-27. Retrieved 2020-08-05.
  17. ^ Page Module:Citation/CS1/styles.css has no content."Snapcraft - Snaps are universal Linux packages". Snapcraft. Archived from the original on 2020-04-17. Retrieved 2019-07-02.
  18. ^ Page Module:Citation/CS1/styles.css has no content.Willis, Nathan (28 January 2015). "Ubuntu Core and Snappy". Linux Weekly News. Archived from the original on 24 February 2015. Retrieved 7 November 2015.
  19. ^ Page Module:Citation/CS1/styles.css has no content.Vaughan-Nichols, Steven J. "Ubuntu Snap takes charge of Linux desktop and IoT software distribution". ZDNet. Archived from the original on 2018-02-26. Retrieved 2024-07-05.
  20. ^ Page Module:Citation/CS1/styles.css has no content."Controlling snap releases with channels, tracks and branches – Part 1". Ubuntu. Archived from the original on 2020-08-14. Retrieved 2020-08-07.
  21. ^ Page Module:Citation/CS1/styles.css has no content."Controlling snap releases with channels, tracks and branches – Part 2". Ubuntu. Retrieved 2020-08-07.
  22. ^ Page Module:Citation/CS1/styles.css has no content.Prakash, Abhishek (23 April 2016). "Using Snap Packages In Ubuntu & Other Linux [Complete Guide]". Retrieved 2020-08-07.
  23. ^ a b Page Module:Citation/CS1/styles.css has no content.McKay, Dave (18 March 2020). "How to Work with Snap Packages on Linux". How-To Geek. Retrieved 2020-08-05.
  24. ^ Page Module:Citation/CS1/styles.css has no content.Ljubuncic, Igor (2022-11-15). "Hold your horses, I mean snaps! New feature lets you stop snap updates, for as long as you need". Snapcraft. Archived from the original on 2022-12-02. Retrieved 2022-12-02.
  25. ^ Page Module:Citation/CS1/styles.css has no content."You can finally disable Snap updates". merlijn.sebrechts.be. 2022-11-10. Retrieved 2022-12-02.
  26. ^ Page Module:Citation/CS1/styles.css has no content."Ubuntu snap updates will soon be able to be held temporarily and indefinitely". Neowin. Retrieved 2022-12-02.
  27. ^ Page Module:Citation/CS1/styles.css has no content."How To Change Snap Refresh (Update) Schedule". Linux Uprising Blog. 17 July 2019. Archived from the original on 2020-08-14. Retrieved 2020-08-07.
  28. ^ Page Module:Citation/CS1/styles.css has no content.Pope, Alan (3 March 2020). "Controlling Snap Updates". YouTube.
  29. ^ Page Module:Citation/CS1/styles.css has no content."GitHub - snapcore/snapcraft: Package, distribute, and update any app for Linux and IoT". GitHub. Archived from the original on 5 November 2022. Retrieved 5 November 2022.
  30. ^ Page Module:Citation/CS1/styles.css has no content.Brodkin, Jon. "Adios apt and yum? Ubuntu's snap apps are coming to distros everywhere". Ars Technica. Archived from the original on 14 May 2019. Retrieved 13 August 2016.
  31. ^ a b Page Module:Citation/CS1/styles.css has no content.Nestor, Marius (30 January 2019). "Canonical Releases Snapcraft 3.1 Snap Creator Tool with Various Improvements". softpedia. Archived from the original on 2019-02-03. Retrieved 2020-08-05.
  32. ^ Page Module:Citation/CS1/styles.css has no content.Nestor, Marius (10 September 2019). "Ubuntu's Snapcraft Snap Creator Tool Will Soon Get a Windows Installer". softpedia. Archived from the original on 2019-12-27. Retrieved 2020-08-08.
  33. ^ Page Module:Citation/CS1/styles.css has no content."Build options | Snapcraft documentation". Archived from the original on 2020-05-27. Retrieved 2020-12-20.
  34. ^ Page Module:Citation/CS1/styles.css has no content."Make your snap development faster". ReadySpace China (in 中文(简体)). 2019-03-15. Archived from the original on 2021-06-28. Retrieved 2020-08-05.
  35. ^ Page Module:Citation/CS1/styles.css has no content."Using external metadata | Snapcraft documentation". Snapcraft. Archived from the original on 2020-08-13. Retrieved 2020-08-05.
  36. ^ a b Page Module:Citation/CS1/styles.css has no content.Sanders, James (August 6, 2019). "Why Canonical views the Snap ecosystem as a compelling distribution-agnostic solution". TechRepublic. Archived from the original on 2020-08-14. Retrieved 2020-08-05.
  37. ^ Page Module:Citation/CS1/styles.css has no content."Malware in the snap store (Again)". 21 March 2024.
  38. ^ Page Module:Citation/CS1/styles.css has no content."Packages for Ubuntu". Ubuntu. Archived from the original on 2020-08-06. Retrieved 2020-08-07.
  39. ^ Page Module:Citation/CS1/styles.css has no content."Bogus apps in store". snapcraft.io. 2018-03-27. Archived from the original on 2021-06-28. Retrieved 2020-08-07.
  40. ^ Page Module:Citation/CS1/styles.css has no content.Wallen, Jack (June 21, 2016). "Canonical changes the game by announcing universal snap packages". TechRepublic. Archived from the original on 2020-08-14. Retrieved 2020-08-08.
  41. ^ Page Module:Citation/CS1/styles.css has no content.Kepes, Ben (2016-06-14). "Snap! Do the Linux distros finally agree on something?". Computerworld. Archived from the original on 2020-09-21. Retrieved 2020-08-08.
  42. ^ Page Module:Citation/CS1/styles.css has no content."A technical comparison between the snap and the Flatpak formats". ReadySpace Indonesia. 2019-11-14. Retrieved 2020-08-05.[permanent dead link]
  43. ^ Page Module:Citation/CS1/styles.css has no content."Squashfs performance effect on snap startup time". snapcraft.io. 2019-10-29. Archived from the original on 2020-08-14. Retrieved 2020-08-05.
  44. ^ Page Module:Citation/CS1/styles.css has no content.McKay, Dave (30 April 2020). "What You Need to Know About Snaps on Ubuntu 20.04". How-To Geek. Archived from the original on 2021-07-28. Retrieved 2021-07-28.
  45. ^ Page Module:Citation/CS1/styles.css has no content."Call for testing: OpenPrinting's printing-stack-snap (Printing in a Snap)". snapcraft.io. 2018-03-09. Archived from the original on 2020-08-14. Retrieved 2020-08-05.
  46. ^ Page Module:Citation/CS1/styles.css has no content."Canonical unveils 6th LTS release of Ubuntu with 16.04". Ubuntu Insights. Canonical Ltd. Archived from the original on 3 November 2017. Retrieved 22 April 2016.
  47. ^ Page Module:Citation/CS1/styles.css has no content."Services and daemons". Archived from the original on 2020-08-13. Retrieved 2020-07-31.
  48. ^ Page Module:Citation/CS1/styles.css has no content."WSL2- Ubuntu 20.04 Snap store doesn't work due to systemd dependency · Issue #5126 · microsoft/WSL". GitHub. Archived from the original on 2020-11-01. Retrieved 2020-08-07.
  49. ^ Page Module:Citation/CS1/styles.css has no content.Lunden, Ingrid (14 June 2016). "Ubuntu's container-style Snap app packages now work on other Linux distributions". TechCrunch. Archived from the original on 2020-08-14. Retrieved 2020-08-08.
  50. ^ Page Module:Citation/CS1/styles.css has no content."Installing snapd | Snapcraft documentation". Snapcraft. Archived from the original on 2022-04-22. Retrieved 2022-04-25.
  51. ^ Page Module:Citation/CS1/styles.css has no content."Installing snap on GalliumOS | Snapcraft documentation". Snapcraft. Archived from the original on 2020-09-23. Retrieved 2020-08-18.
  52. ^ Page Module:Citation/CS1/styles.css has no content."Installing snapd | Snapcraft documentation". Snapcraft. Archived from the original on 2020-08-05. Retrieved 2020-08-05.
  53. ^ Page Module:Citation/CS1/styles.css has no content."Snap deprecation issue". GitHub. Archived from the original on 2023-11-04. Retrieved 2023-11-04.
  54. ^ Page Module:Citation/CS1/styles.css has no content."Zorin community manager express the plan to remove Snap as default package". Zorin Forum. 11 December 2023. Retrieved 2023-12-13.
  55. ^ Page Module:Citation/CS1/styles.css has no content."Ubuntu Flavors/Spins Will No Longer Be Able To Install Flatpak By Default". www.phoronix.com. Retrieved 2023-02-26.
  56. ^ Page Module:Citation/CS1/styles.css has no content."Google and Canonical bring Flutter apps to Linux and the Snap Store". VentureBeat. 2020-07-08. Archived from the original on 2020-08-11. Retrieved 2020-08-05.
  57. ^ Page Module:Citation/CS1/styles.css has no content."Install IntelliJ IDEA on Ubuntu with Snaps – IntelliJ IDEA Blog | JetBrains". JetBrains Blog. 16 November 2017. Archived from the original on 2020-09-29. Retrieved 2020-08-05.
  58. ^ Page Module:Citation/CS1/styles.css has no content."Month of KDE Applications Snaps – KDE neon Developers' Blog". 13 February 2019. Archived from the original on 2020-08-04. Retrieved 2020-08-05.
  59. ^ Page Module:Citation/CS1/styles.css has no content..NET Core 3.1.0 Preview 2, .NET Foundation, 2019-11-08, archived from the original on 2020-04-22, retrieved 2019-11-08
  60. ^ Page Module:Citation/CS1/styles.css has no content.Vaughan-Nichols, Steven J. "Use Ubuntu's snap to install Skype on any Linux desktop". ZDNet. Archived from the original on 2020-10-30. Retrieved 2020-08-08.
  61. ^ Page Module:Citation/CS1/styles.css has no content.Hoffman, Chris (2016-04-25). "Mozilla will provide Firefox as a Snap package for Ubuntu, cutting out the middleman". PCWorld. Retrieved 2020-08-05.
  62. ^ Page Module:Citation/CS1/styles.css has no content."Spotify Now Available as a Snap App on Ubuntu". OMG! Ubuntu!. 2017-12-30. Archived from the original on 2020-09-22. Retrieved 2020-08-05.
  63. ^ Page Module:Citation/CS1/styles.css has no content.Vaughan-Nichols, Stephen J. (11 May 2015). "Ubuntu jumps into Internet of Things with Acer, GE, and Microsoft". ZDNet. Archived from the original on 9 January 2017. Retrieved 7 November 2015.
  64. ^ Page Module:Citation/CS1/styles.css has no content.Sherman, Jordana. "Snappy Core unlocks IoT value within the Dell Edge Gateway 5000 Series". Ubuntu Insights. Canonical Ltd. Archived from the original on 31 July 2017. Retrieved 7 November 2015.
  65. ^ Page Module:Citation/CS1/styles.css has no content."LimeSDR Mini takes off in satellites". LinuxGizmos.com. 2018-03-14. Archived from the original on 2020-08-02. Retrieved 2020-08-05.
  66. ^ Page Module:Citation/CS1/styles.css has no content."Ubuntu Core 18 released for secure, reliable IoT devices". Ubuntu. Archived from the original on 2020-08-09. Retrieved 2020-08-05.
  67. ^ Page Module:Citation/CS1/styles.css has no content."Install influxdb for Linux using the Snap Store". Snapcraft. Archived from the original on 2020-08-05. Retrieved 2020-08-05.
  68. ^ Page Module:Citation/CS1/styles.css has no content.Nestor, Marius (27 July 2018). "You Can Now Install Kata Containers VM as a Snap on Ubuntu, Other Linux Distros". softpedia. Archived from the original on 2020-08-14. Retrieved 2020-08-05.
  69. ^ Page Module:Citation/CS1/styles.css has no content.Wallen, Jack (April 27, 2020). "How to install Nextcloud with SSL using snap". TechRepublic. Archived from the original on 2020-07-17. Retrieved 2020-08-08.
  70. ^ Page Module:Citation/CS1/styles.css has no content."Install travis-worker for Linux using the Snap Store". Snapcraft. Archived from the original on 2021-06-28. Retrieved 2020-08-05.
  71. ^ Page Module:Citation/CS1/styles.css has no content."Linux Mint dumps Ubuntu Snap". ZDNet. Retrieved 2022-12-03.
  72. ^ Page Module:Citation/CS1/styles.css has no content.Anderson, Tim (2 June 2020). "Snapping at Canonical's Snap: Linux Mint team says no to Ubuntu store 'backdoor'". The Register.
  73. ^ a b Page Module:Citation/CS1/styles.css has no content."Canonical Continues Working On Ubuntu's Firefox Snap Performance". www.phoronix.com. Archived from the original on 2023-02-26. Retrieved 2023-02-26.
  74. ^ Page Module:Citation/CS1/styles.css has no content.Vaughan-Nichols, Steven J. "Ubuntu opens the door to talking with Linux Mint about Snap". ZDNet. Archived from the original on 2020-08-14. Retrieved 2020-08-08.

Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.