当前位置: 首页>>技术教程>>正文


Snap包装格式是什么?

, ,

问题描述

我对’Snap包装格式’知之甚少。我所知道的是’Snap’是.deb之类的替代打包格式。

我不知道的是

  • Canonical为什么选择它?

  • ‘Snap’相对于.deb的主要优点是什么?

  • .deb将被放弃,还是已经被放弃?

最佳回答

Canonical为什么选择按扣?

引用Ubuntu website

We originally created the snappy technology and application confinement system to ensure a carrier-grade update experience for Ubuntu mobile users and set a new standard for application security in the mobile era.

基本思想是修复两个.deb软件包中都存在的问题,并提供用于更新软件包的新方法(所谓的事务更新,与android应用程序的更新非常相似)。正如Mark Shuttleworth解释的那样:

Whenever we make a fix to packages in Ubuntu, we’ll publish the same fix to Ubuntu Core, and systems can get that fix transactionally. In fact, updates to Ubuntu Core are even smaller than package updates because we only need to send the precise difference between the old and new versions, not the whole package.

.snap软件包比.deb软件包的主要优点是什么?

最大的优点是提高了安全性。 PPA和.deb软件包通常与root privillege一起安装,这会带来安全隐患。

Snappy应用程序是孤立的,这意味着如果某些应用程序中断了,则不会破坏您的系统。引用马克·沙特尔沃思:

Snappy packages are automatically confined to ensure that a bug in one app doesn’t put your data elsewhere at risk

.deb会被放弃吗?

从Ubuntu 16.04 LTS开始,这两种方法都可供用户使用。

引用OMG! Ubuntu!

Canonical also say that “…the tens of thousands of applications and packages in .deb format will continue to be supported in 16.04 and beyond, and deb archives in particular will continue to be available for all to use and distribute software.”

次佳回答

作为一个概述,据我了解,快照:

  • 快照更加安全。在自己的”containers”中运行。

  • 使用快照比使用deb软件包要容易得多。

  • 将来,快照将成为移动设备,物联网和台式机的包装格式。

  • .deb被放弃还是将会被放弃? Canonical说,将来也会有支持deb软件包。

但是有一个名为snapcraft的工具。使用此工具,很容易将deb软件包转换为snap软件包。

单击此链接以获取更多信息。也许对您有帮助。 https://insights.ubuntu.com/2016/04/13/snaps-for-classic-ubuntu

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/9193.html,未经允许,请勿转载。