Flatpak 为 Linux 带来了独立应用
Flatpak
![](/data/attachment/album/201608/11/160320hl4yrrb4ld7bwrwo.jpg)


[Flatpak](http://flatpak.org/) 的开发团队[宣布了](http://flatpak.org/press/2016-06-21-flatpak-released.html) Flatpak 桌面应用框架已经可用了。 Flatpak （以前在开发时名为 xdg-app）为应用提供了捆绑为一个 Flatpak 软件包的能力，可以让应用在很多 Linux 发行版上都以轻松而一致的体验来安装和运行。将应用程序捆绑成 Flatpak 为其提供了沙盒安全环境，可以将它们与操作系统和彼此之间相互隔离。查看 [Flatpak 网站](http://flatpak.org/)上的[发布公告](http://flatpak.org/press/2016-06-21-flatpak-released.html)来了解关于 Flatpak 框架技术的更多信息。


### 在 Fedora 中安装 Flatpak


如果用户想要运行以 Flatpak 格式打包的应用，在 Fedora 上安装是很容易的，Flatpak 格式已经可以在官方的 Fedora 23 和 Fedora 24 仓库中获得。Flatpak 网站上有[在 Fedora 上安装的完整细节](http://flatpak.org/getting.html)，同时也有如何在 Arch、 Debian、Mageia 和 Ubuntu 中安装的方法。[许多的应用](http://flatpak.org/apps.html)已经使用 Flatpak 打包构建了，这包括 LibreOffice、Inkscape 和 GIMP。


### 对应用开发者


如果你是一个应用开发者，Flatpak 网站也包含许多有关于[使用 Flatpak 打包和分发应用程序](http://flatpak.org/developer.html)的重要资料。这些资料中包括了使用 Flakpak SDK 构建独立的、沙盒化的 Flakpak 应用程序的信息。




---


via: <https://fedoramagazine.org/introducing-flatpak/>


作者：[Ryan Lerch](https://fedoramagazine.org/introducing-flatpak/) 译者：[zky001](https://github.com/zky001) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
The development team behind [Flatpak](http://flatpak.org/) has [just announced the general availability](http://flatpak.org/press/2016-06-21-flatpak-released.html) of the Flatpak desktop application framework. Flatpak (which was also known during development as xdg-app) provides the ability for an application — bundled as a Flatpak — to be installed and run easily and consistently on many different Linux distributions. Applications bundled as Flatpaks also have the ability to be sandboxed for security, isolating them from your operating system, and other applications. Check out the [Flatpak website](http://flatpak.org/), and [the press release](http://flatpak.org/press/2016-06-21-flatpak-released.html) for more information on the tech that makes up the Flatpak framework.

### Installing Flatpak on Fedora

For users wanting to run applications bundled as Flatpaks, installation on Fedora is easy, with Flatpak already available in the official Fedora 23 and Fedora 24 repositories. The Flatpak website has [full details on installation on Fedora](http://flatpak.org/getting.html), as well as how to install on Arch, Debian, Mageia, and Ubuntu. [Many applications](http://flatpak.org/apps.html) have builds already bundled with Flatpak — including LibreOffice, and nightly builds of popular graphics applications Inkscape and GIMP.

### For Application Developers

If you are an application developer, the Flatpak website also contains some great resources on getting started [bundling and distributing your applications with Flatpak](http://flatpak.org/developer.html). These resources contain information on using Flakpak SDKs to build standalone, sandboxed Flatpak applications.

## Sudhir Khanger

How different is Flatpak packaging compared to RPM packaging? Do they share same spec file syntax or are they different?

If anyone is looking to get into packaging should one learn Flatpak or RPM?

## Michal Srb

There are no spec files in Flatpak. This hello world tutorial should give you an insight on how the Flatpak packaging workflow looks like: http://flatpak.org/index.html#developers

As for your second question, it probably depends on what the person is trying to achieve. IMO, Flatpak is much better choice for ISVs who simply want their software to be available for various Linux distributions. But if the goal is to distribute your application for a specific RPM-based distro, then RPM would be more natural (at least nowadays).

## PP

Flatpak is the future, no need for sudo, apps are sandboxed, meaning apps can’t destroy your PC.

## Volodymyr M. Lisivka

Flatpack is the n-th reincarnation of idea of “static binary”: binary with all dependencies compiled-in. Static binaries were supported in version 0.0.1 of Linux. It is not a future.

## Jeremy

Nice article. I am going to be interested to see how Flatpak does in what will surely be a fight with Canonical based Snappy packages, now that those are available on non-Ubuntu based distributions.

## Naheem

Will flatpak packages be available via COPR?

## Kieron

Flatpak > Snappy

😀

## toñog

I prefer Snap,sorry

## Frederico Lima

Why?