Matthew Leeds 013263fcc0 dir: Support finding related refs offline
Currently when you try to do an offline app install from a USB drive,
the install succeeds but without installing any of the related refs,
even if they're available on the USB. This means you end up with a
broken install that's missing locale extensions, content, etc. depending
on what the related refs provide.

The related ref information is already gleaned from the xa.cache data
which is available offline via ostree-metadata refs that should be
provided by peer sources (and available in summary files as well). In
the near future this will be changed so that we use commit metadata
instead of xa.cache (see https://github.com/flatpak/flatpak/issues/1592)
but for now it at least allows offline installs to work. So the only
remaining step is to remove a dependency on the remote summary when
checking for the related ref in the remote in
flatpak_dir_find_remote_related(). This is accomplished by reworking
flatpak_remote_state_lookup_ref() so that it falls back to using the
xa.cache data when the summary isn't available. One effect of this is
that we no longer necessarily have the checksum for the ref, since
checksums aren't present in xa.cache data. As far as I can tell, none of
the consumers of this API have a hard dependency on the checksum
information (I checked GNOME Software too).

This is a partial fix for https://github.com/flatpak/flatpak/issues/1583

Closes: #1673
Approved by: pwithnall
2018-05-17 16:48:17 +00:00
2018-04-03 10:08:35 +02:00
2018-04-27 11:03:34 +00:00
2018-05-03 16:59:04 -07:00
2018-04-26 14:31:47 +02:00
2018-05-03 08:37:39 +02:00
2017-05-02 15:01:19 +02:00
2016-04-29 15:38:20 +02:00
2016-07-15 11:58:46 -04:00
2018-02-05 15:21:40 +00:00
2018-05-14 15:58:45 +02:00
2015-03-31 15:36:29 +01:00
2016-08-22 16:00:33 +02:00
2016-06-02 18:05:22 -04:00
2018-05-03 08:25:54 +02:00
2018-04-06 12:09:31 -05:00
2016-05-06 15:27:19 +02:00
2016-05-06 15:27:19 +02:00

Flatpak icon

Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux.

See https://flatpak.org/ for more information.

Community discussion happens in #flatpak on Freenode and on the mailing list.

Read documentation for the flatpak commandline tools and for the libflatpak library API.

Contributing

Flatpak welcomes contributions from anyone! Here are some ways you can help:

Hacking

Flatpak uses a traditional autoconf-style build mechanism. To build just do

 ./configure [args]
 make
 make install

Most configure arguments are documented in ./configure --help. However, there are some options that are a bit more complicated.

Flatpak relies on a project called Bubblewrap for the low-level sandboxing. By default, an in-tree copy of this is built (distributed in the tarball or using git submodules in the git tree). This will build a helper called flatpak-bwrap. If your system has a recent enough version of Bubblewrap already, you can use --with-system-bubblewrap to use that instead.

Bubblewrap can run in two modes, either using unprivileged user namespaces or setuid mode. This requires that the kernel supports this, which some distributions disable. For instance, Debian and Arch (linux kernel v4.14.5 or later), support user namespaces with the kernel.unprivileged_userns_clone sysctl enabled.

If unprivileged user namespaces are not available, then Bubblewrap must be built as setuid root. This is believed to be safe, as it is designed to do this. Any build of Bubblewrap supports both unprivileged and setuid mode, you just need to set the setuid bit for it to change mode.

However, this does complicate the installation a bit. If you pass --with-priv-mode=setuid to configure (of Flatpak or Bubblewrap) then make install will try to set the setuid bit. However that means you have to run make install as root. Alternatively, you can pass --enable-sudo to configure and it will call sudo when setting the setuid bit. Alternatively you can enable setuid completely outside of the installation, which is common for example when packaging Bubblewrap in a .deb or .rpm.

There are some complications when building Flatpak to a different prefix than the system-installed version. First of all, the newly built Flatpak will look for system-installed flatpaks in $PREFIX/var/lib/flatpak, which will not match existing installed flatpaks. You can use --with-system-install-dir=/var/lib/flatpak to make both installations use the same location.

Secondly, Flatpak ships with a root-privileged policykit helper for system-installation, called flatpak-system-helper. This is dbus activated (on the system-bus) and if you install in a non-standard location it is likely that this will not be found by dbus and policykit. However, if the system installation is synchronized, you can often use the system installed helper instead - at least if the two versions are close in versions.

Description
No description provided
Readme 105 MiB
Languages
C 90.8%
Shell 5.3%
Python 1.9%
Meson 1.1%
Yacc 0.8%