[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#857566: unblock (pre-approval): flatpak/0.8.4-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Hi,
I've uploaded flatpak's new upstream bug fix release 0.8.4 to
experimental for now, but I'd like it to be considered for stretch.
If necessary I'll talk to upstream about whether they can be more
conservative with their stable-branch / more thorough about documenting
the impact of bugs that are fixed.

I attach a debdiff between stretch and experimental, filtering out
translations and documentation (some documentation fixes are also
included, mainly adding options to the man pages that were previously
only in --help, but I assume you're less interested in reviewing those).
Please let me know if there's anything you want me to revert or raise
with upstream.

I expect that an 0.8.4-3 upload to unstable would differ only in the
changelog, and possibly the profile.d snippet (profile/flatpak.sh.in,
debian/patches/Improve-and-simplify-profile-snippet.patch) depending
on what the results are of upstreaming the current Debian patch.
If there are changes outside the changelog, I'll attach a debdiff
between 0.8.4-2 and 0.8.4-3 for RT approval.

Regards,
    S
diffstat for flatpak-0.8.3 flatpak-0.8.4

 NEWS                                                      |   27 ++
 app/flatpak-builtins-list-remotes.c                       |    7 
 app/flatpak-builtins-list.c                               |    7 
 app/flatpak-transaction.c                                 |   33 ++
 common/flatpak-dir.c                                      |  125 +++++++--
 common/flatpak-dir.h                                      |    2 
 common/flatpak-run.c                                      |   47 ++-
 common/flatpak-utils.c                                    |  181 +++++++-------
 configure.ac                                              |    4 
 debian/.gitignore                                         |    9 
 debian/changelog                                          |   43 +++
 debian/control                                            |    1 
 debian/patches/Improve-and-simplify-profile-snippet.patch |   45 +++
 debian/patches/series                                     |    1 
 document-portal/xdp-fuse.c                                |    2 
 lib/flatpak-installation.c                                |   72 ++++-
 lib/flatpak-version-macros.h                              |    2 
 profile/flatpak.sh.in                                     |    9 
 tests/package_version.txt                                 |    2 
 19 files changed, 470 insertions(+), 149 deletions(-)

diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/app/flatpak-builtins-list.c flatpak-0.8.4/app/flatpak-builtins-list.c
--- flatpak-0.8.3/app/flatpak-builtins-list.c	2017-02-14 10:13:28.000000000 +0000
+++ flatpak-0.8.4/app/flatpak-builtins-list.c	2017-03-10 09:17:20.000000000 +0000
@@ -325,13 +325,6 @@
               if (system_dir == NULL)
                 return FALSE;
 
-              if (system_dir == NULL)
-                {
-                  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
-                               "Can't find installation %s", installations[i]);
-                  return FALSE;
-                }
-
               if (!find_refs_for_dir (system_dir, app ? &installation_apps : NULL, runtime ? &installation_runtimes : NULL, cancellable, error))
                 return FALSE;
 
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/app/flatpak-builtins-list-remotes.c flatpak-0.8.4/app/flatpak-builtins-list-remotes.c
--- flatpak-0.8.3/app/flatpak-builtins-list-remotes.c	2017-02-14 10:13:28.000000000 +0000
+++ flatpak-0.8.4/app/flatpak-builtins-list-remotes.c	2017-03-10 09:17:20.000000000 +0000
@@ -138,9 +138,10 @@
               else
                 flatpak_table_printer_add_column (printer, "-");
 
-              ostree_repo_remote_get_url (flatpak_dir_get_repo (dir), remote_name, &remote_url, NULL);
-
-              flatpak_table_printer_add_column (printer, remote_url);
+              if (ostree_repo_remote_get_url (flatpak_dir_get_repo (dir), remote_name, &remote_url, NULL))
+                flatpak_table_printer_add_column (printer, remote_url);
+              else
+                flatpak_table_printer_add_column (printer, "-");
 
               prio = flatpak_dir_get_remote_prio (dir, remote_name);
               prio_as_string = g_strdup_printf ("%d", prio);
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/app/flatpak-transaction.c flatpak-0.8.4/app/flatpak-transaction.c
--- flatpak-0.8.3/app/flatpak-transaction.c	2017-02-14 09:49:43.000000000 +0000
+++ flatpak-0.8.4/app/flatpak-transaction.c	2017-03-10 09:17:20.000000000 +0000
@@ -106,7 +106,7 @@
 }
 
 static gboolean
-dir_ref_is_installed (FlatpakDir *dir, const char *ref, char **remote_out)
+dir_ref_is_installed (FlatpakDir *dir, const char *ref, char **remote_out, GVariant **deploy_data_out)
 {
   g_autoptr(GVariant) deploy_data = NULL;
 
@@ -116,6 +116,10 @@
 
   if (remote_out)
     *remote_out = g_strdup (flatpak_deploy_data_get_origin (deploy_data));
+
+  if (deploy_data_out)
+    *deploy_data_out = g_variant_ref (deploy_data);
+
   return TRUE;
 }
 
@@ -417,7 +421,7 @@
       else
         {
           /* Update if in same dir */
-          if (dir_ref_is_installed (self->dir, full_runtime_ref, &runtime_remote))
+          if (dir_ref_is_installed (self->dir, full_runtime_ref, &runtime_remote, NULL))
             {
               FlatpakTransactionOp *op;
               g_debug ("Updating dependent runtime %s", full_runtime_ref);
@@ -456,7 +460,7 @@
 
   if (kind == FLATPAK_TRANSACTION_OP_KIND_UPDATE)
     {
-      if (!dir_ref_is_installed (self->dir, ref, &origin))
+      if (!dir_ref_is_installed (self->dir, ref, &origin, NULL))
         {
           g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED,
                        _("%s not installed"), pref);
@@ -473,7 +477,7 @@
   else if (kind == FLATPAK_TRANSACTION_OP_KIND_INSTALL)
     {
       g_assert (remote != NULL);
-      if (dir_ref_is_installed (self->dir, ref, NULL))
+      if (dir_ref_is_installed (self->dir, ref, NULL, NULL))
         {
           g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_ALREADY_INSTALLED,
                        _("%s already installed"), pref);
@@ -671,8 +675,25 @@
       kind = op->kind;
       if (kind == FLATPAK_TRANSACTION_OP_KIND_INSTALL_OR_UPDATE)
         {
-          if (dir_ref_is_installed (self->dir, op->ref, NULL))
-            kind = FLATPAK_TRANSACTION_OP_KIND_UPDATE;
+          g_autoptr(GVariant) deploy_data = NULL;
+
+          if (dir_ref_is_installed (self->dir, op->ref, NULL, &deploy_data))
+            {
+              g_autofree const char **current_subpaths = NULL;
+
+              /* When we update a dependency, we always inherit the subpaths
+                 rather than use the default. */
+              g_strfreev (op->subpaths);
+              current_subpaths = flatpak_deploy_data_get_subpaths (deploy_data);
+              op->subpaths = g_strdupv ((char **)current_subpaths);
+
+              /* Don't use the remote from related ref on update, always use
+                 the current remote. */
+              g_free (op->remote);
+              op->remote = g_strdup (flatpak_deploy_data_get_origin (deploy_data));
+
+              kind = FLATPAK_TRANSACTION_OP_KIND_UPDATE;
+            }
           else
             kind = FLATPAK_TRANSACTION_OP_KIND_INSTALL;
         }
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/common/flatpak-dir.c flatpak-0.8.4/common/flatpak-dir.c
--- flatpak-0.8.3/common/flatpak-dir.c	2017-02-14 10:14:38.000000000 +0000
+++ flatpak-0.8.4/common/flatpak-dir.c	2017-03-10 09:20:21.000000000 +0000
@@ -354,8 +354,7 @@
 
   keyfile = g_key_file_new ();
 
-  g_key_file_load_from_file (keyfile, file_path, G_KEY_FILE_NONE, &my_error);
-  if (my_error != NULL)
+  if (!g_key_file_load_from_file (keyfile, file_path, G_KEY_FILE_NONE, &my_error))
     {
       g_debug ("Could not get list of system installations: %s\n", my_error->message);
       g_propagate_error (error, g_steal_pointer (&my_error));
@@ -1792,26 +1791,18 @@
 }
 
 static gboolean
-flatpak_dir_pull_extra_data (FlatpakDir          *self,
-                             OstreeRepo          *repo,
-                             const char          *repository,
-                             const char          *ref,
-                             const char          *rev,
-                             FlatpakPullFlags     flatpak_flags,
-                             OstreeAsyncProgress *progress,
-                             GCancellable        *cancellable,
-                             GError             **error)
+flatpak_dir_setup_extra_data (FlatpakDir           *self,
+                              OstreeRepo           *repo,
+                              const char           *rev,
+                              FlatpakPullFlags      flatpak_flags,
+                              OstreeAsyncProgress  *progress,
+                              GCancellable         *cancellable,
+                              GError              **error)
 {
   g_autoptr(GVariant) extra_data_sources = NULL;
-  g_autoptr(GVariant) detached_metadata = NULL;
-  g_auto(GVariantDict) new_metadata_dict = FLATPAK_VARIANT_DICT_INITIALIZER;
-  g_autoptr(GVariantBuilder) extra_data_builder = NULL;
-  g_autoptr(GVariant) new_detached_metadata = NULL;
-  g_autoptr(GVariant) extra_data = NULL;
   int i;
   gsize n_extra_data;
   guint64 total_download_size;
-  ExtraDataProgress extra_data_progress = { NULL };
 
   extra_data_sources = flatpak_repo_get_extra_data_sources (repo, rev, cancellable, NULL);
   if (extra_data_sources == NULL)
@@ -1824,8 +1815,6 @@
   if ((flatpak_flags & FLATPAK_PULL_FLAGS_DOWNLOAD_EXTRA_DATA) == 0)
     return flatpak_fail (error, "extra data not supported for non-gpg-verified local system installs");
 
-  extra_data_builder = g_variant_builder_new (G_VARIANT_TYPE ("a(ayay)"));
-
   total_download_size = 0;
   for (i = 0; i < n_extra_data; i++)
     {
@@ -1843,13 +1832,53 @@
 
   if (progress)
     {
-      ostree_async_progress_set_uint64 (progress, "start-time-extra-data", g_get_monotonic_time ());
       ostree_async_progress_set_uint (progress, "outstanding-extra-data", n_extra_data);
       ostree_async_progress_set_uint (progress, "total-extra-data", n_extra_data);
       ostree_async_progress_set_uint64 (progress, "total-extra-data-bytes", total_download_size);
       ostree_async_progress_set_uint64 (progress, "transferred-extra-data-bytes", 0);
     }
 
+  return TRUE;
+}
+
+static gboolean
+flatpak_dir_pull_extra_data (FlatpakDir          *self,
+                             OstreeRepo          *repo,
+                             const char          *repository,
+                             const char          *ref,
+                             const char          *rev,
+                             FlatpakPullFlags     flatpak_flags,
+                             OstreeAsyncProgress *progress,
+                             GCancellable        *cancellable,
+                             GError             **error)
+{
+  g_autoptr(GVariant) extra_data_sources = NULL;
+  g_autoptr(GVariant) detached_metadata = NULL;
+  g_auto(GVariantDict) new_metadata_dict = FLATPAK_VARIANT_DICT_INITIALIZER;
+  g_autoptr(GVariantBuilder) extra_data_builder = NULL;
+  g_autoptr(GVariant) new_detached_metadata = NULL;
+  g_autoptr(GVariant) extra_data = NULL;
+  int i;
+  gsize n_extra_data;
+  ExtraDataProgress extra_data_progress = { NULL };
+
+  extra_data_sources = flatpak_repo_get_extra_data_sources (repo, rev, cancellable, NULL);
+  if (extra_data_sources == NULL)
+    return TRUE;
+
+  n_extra_data = g_variant_n_children (extra_data_sources);
+  if (n_extra_data == 0)
+    return TRUE;
+
+  if ((flatpak_flags & FLATPAK_PULL_FLAGS_DOWNLOAD_EXTRA_DATA) == 0)
+    return flatpak_fail (error, "extra data not supported for non-gpg-verified local system installs");
+
+  extra_data_builder = g_variant_builder_new (G_VARIANT_TYPE ("a(ayay)"));
+
+  /* Other fields were already set in flatpak_dir_setup_extra_data() */
+  if (progress)
+    ostree_async_progress_set_uint64 (progress, "start-time-extra-data", g_get_monotonic_time ());
+
   extra_data_progress.progress = progress;
 
   for (i = 0; i < n_extra_data; i++)
@@ -2100,6 +2129,15 @@
   /* Past this we must use goto out, so we clean up console and
      abort the transaction on error */
 
+  /* Setup extra data information before starting to pull, so we can have precise
+   * progress reports */
+  if (!flatpak_dir_setup_extra_data (self, repo, rev,
+                                     flatpak_flags,
+                                     progress,
+                                     cancellable,
+                                     error))
+    goto out;
+
   if (subpaths != NULL && subpaths[0] != NULL)
     {
       subdirs_arg = g_ptr_array_new_with_free_func (g_free);
@@ -3638,24 +3676,31 @@
   if (runtime_ref_parts == NULL)
     return FALSE;
 
-  runtime_deploy = flatpak_find_deploy_for_ref (runtime_ref, cancellable, error);
-  if (runtime_deploy == NULL)
-    return FALSE;
+  if (!g_key_file_get_boolean (metakey, "Extra Data", "NoRuntime", NULL))
+    {
+      runtime_deploy = flatpak_find_deploy_for_ref (runtime_ref, cancellable, error);
+      if (runtime_deploy == NULL)
+        return FALSE;
+      runtime_files = flatpak_deploy_get_files (runtime_deploy);
+    }
 
   app_files = g_file_get_child (checkoutdir, "files");
   app_export_file = g_file_get_child (checkoutdir, "export");
   extra_files = g_file_get_child (app_files, "extra");
   extra_export_file = g_file_get_child (extra_files, "export");
-  runtime_files = flatpak_deploy_get_files (runtime_deploy);
 
   argv_array = g_ptr_array_new_with_free_func (g_free);
   fd_array = g_array_new (FALSE, TRUE, sizeof (int));
   g_array_set_clear_func (fd_array, clear_fd);
   g_ptr_array_add (argv_array, g_strdup (flatpak_get_bwrap ()));
 
-  add_args (argv_array,
-            "--ro-bind", flatpak_file_get_path_cached (runtime_files), "/usr",
+  if (runtime_files)
+    add_args (argv_array,
+              "--ro-bind", flatpak_file_get_path_cached (runtime_files), "/usr",
             "--lock-file", "/usr/.ref",
+              NULL);
+
+  add_args (argv_array,
             "--ro-bind", flatpak_file_get_path_cached (app_files), "/app",
             "--bind", flatpak_file_get_path_cached (extra_files), "/app/extra",
             "--chdir", "/app/extra",
@@ -4909,7 +4954,8 @@
 
   if (repository != NULL &&
       g_str_has_suffix (repository, "-origin") &&
-      flatpak_dir_get_remote_noenumerate (self, repository))
+      flatpak_dir_get_remote_noenumerate (self, repository) &&
+      !flatpak_dir_remote_has_deploys (self, repository))
     ostree_repo_remote_delete (self->repo, repository, NULL, NULL);
 
   if (!keep_ref)
@@ -6384,6 +6430,31 @@
     }
 
   return FALSE;
+}
+
+gboolean
+flatpak_dir_remote_has_deploys (FlatpakDir   *self,
+                                const char   *remote)
+{
+  g_autoptr(GHashTable) refs = NULL;
+  GHashTableIter hash_iter;
+  gpointer key;
+
+  refs = flatpak_dir_get_all_installed_refs (self, FLATPAK_KINDS_APP | FLATPAK_KINDS_RUNTIME, NULL);
+  if (refs == NULL)
+    return FALSE;
+
+  g_hash_table_iter_init (&hash_iter, refs);
+  while (g_hash_table_iter_next (&hash_iter, &key, NULL))
+    {
+      const char *ref = (const char *)key;
+      g_autofree char *origin = flatpak_dir_get_origin (self, ref, NULL, NULL);
+
+      if (strcmp (remote, origin) == 0)
+        return TRUE;
+    }
+
+  return FALSE;
 }
 
 gint
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/common/flatpak-dir.h flatpak-0.8.4/common/flatpak-dir.h
--- flatpak-0.8.3/common/flatpak-dir.h	2017-02-10 15:13:02.000000000 +0000
+++ flatpak-0.8.4/common/flatpak-dir.h	2017-03-10 09:17:20.000000000 +0000
@@ -451,6 +451,8 @@
                                                    GHashTable   *hash,
                                                    GCancellable *cancellable,
                                                    GError      **error);
+gboolean   flatpak_dir_remote_has_deploys (FlatpakDir   *self,
+                                           const char   *remote);
 char      *flatpak_dir_create_origin_remote (FlatpakDir   *self,
                                              const char   *url,
                                              const char   *id,
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/common/flatpak-run.c flatpak-0.8.4/common/flatpak-run.c
--- flatpak-0.8.3/common/flatpak-run.c	2017-02-14 10:13:28.000000000 +0000
+++ flatpak-0.8.4/common/flatpak-run.c	2017-03-10 09:17:20.000000000 +0000
@@ -1745,6 +1745,26 @@
   return au_len == strlen (str) && memcmp (str, au_str, au_len) == 0;
 }
 
+static gboolean
+xauth_entry_should_propagate (Xauth *xa,
+                              char  *hostname,
+                              char  *number)
+{
+  /* ensure entry isn't for remote access */
+  if (xa->family != FamilyLocal && xa->family != FamilyWild)
+    return FALSE;
+
+  /* ensure entry is for this machine */
+  if (xa->family == FamilyLocal && !auth_streq (hostname, xa->address, xa->address_length))
+    return FALSE;
+
+  /* ensure entry is for this session */
+  if (xa->number != NULL && !auth_streq (number, xa->number, xa->number_length))
+    return FALSE;
+
+  return TRUE;
+}
+
 static void
 write_xauth (char *number, FILE *output)
 {
@@ -1769,9 +1789,7 @@
       xa = XauReadAuth (f);
       if (xa == NULL)
         break;
-      if (xa->family == FamilyLocal &&
-          auth_streq (unames.nodename, xa->address, xa->address_length) &&
-          (xa->number == NULL || auth_streq (number, xa->number, xa->number_length)))
+      if (xauth_entry_should_propagate (xa, unames.nodename, number))
         {
           local_xa = *xa;
           if (local_xa.number)
@@ -2358,10 +2376,12 @@
           if (!path_is_visible (keys, n_keys, hash_table, path))
             {
               g_autofree char *resolved = flatpak_resolve_link (path, NULL);
-              g_autofree char *parent = g_path_get_dirname (path);
-              g_autofree char *relative = make_relative (parent, resolved);
               if (resolved)
-                add_args (argv_array, "--symlink", relative, path,  NULL);
+                {
+                  g_autofree char *parent = g_path_get_dirname (path);
+                  g_autofree char *relative = make_relative (parent, resolved);
+                  add_args (argv_array, "--symlink", relative, path,  NULL);
+                }
             }
         }
       else if (ep->mode == FAKE_MODE_HIDDEN)
@@ -3060,7 +3080,7 @@
 
   if (!g_file_test (path, G_FILE_TEST_EXISTS))
     return flatpak_fail (error,
-                         "No systemd user session available, sandboxing not available");
+                         "No systemd user session available, cgroups not available");
 
   main_context = g_main_context_new ();
   main_loop = g_main_loop_new (main_context, FALSE);
@@ -3940,18 +3960,21 @@
   else if (g_file_test ("/var/lib/dbus/machine-id", G_FILE_TEST_EXISTS))
     add_args (argv_array, "--ro-bind", "/var/lib/dbus/machine-id", "/etc/machine-id", NULL);
 
-  etc = g_file_get_child (runtime_files, "etc");
-  if ((flags & FLATPAK_RUN_FLAG_WRITABLE_ETC) == 0 &&
+  if (runtime_files)
+    etc = g_file_get_child (runtime_files, "etc");
+  if (etc != NULL &&
+      (flags & FLATPAK_RUN_FLAG_WRITABLE_ETC) == 0 &&
       g_file_query_exists (etc, NULL))
     {
       g_auto(GLnxDirFdIterator) dfd_iter = { 0, };
       struct dirent *dent;
       char path_buffer[PATH_MAX + 1];
       ssize_t symlink_size;
+      gboolean inited;
 
-      glnx_dirfd_iterator_init_at (AT_FDCWD, flatpak_file_get_path_cached (etc), FALSE, &dfd_iter, NULL);
+      inited = glnx_dirfd_iterator_init_at (AT_FDCWD, flatpak_file_get_path_cached (etc), FALSE, &dfd_iter, NULL);
 
-      while (TRUE)
+      while (inited)
         {
           g_autofree char *src = NULL;
           g_autofree char *dest = NULL;
@@ -4002,7 +4025,7 @@
                 NULL);
     }
 
-  for (i = 0; i < G_N_ELEMENTS (usr_links); i++)
+  for (i = 0; runtime_files != NULL && i < G_N_ELEMENTS (usr_links); i++)
     {
       const char *subdir = usr_links[i];
       g_autoptr(GFile) runtime_subdir = g_file_get_child (runtime_files, subdir);
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/common/flatpak-utils.c flatpak-0.8.4/common/flatpak-utils.c
--- flatpak-0.8.3/common/flatpak-utils.c	2017-02-14 10:14:41.000000000 +0000
+++ flatpak-0.8.4/common/flatpak-utils.c	2017-03-10 09:20:18.000000000 +0000
@@ -1058,8 +1058,6 @@
               /* Reference found in at least one of the system installations */
               break;
             }
-
-          goto out;
         }
     }
 
@@ -2129,10 +2127,11 @@
   if (S_ISDIR (stbuf.st_mode))
     {
       g_auto(GLnxDirFdIterator) dfd_iter = { 0, };
+      gboolean inited;
 
-      glnx_dirfd_iterator_init_at (parent_dfd, rel_path, FALSE, &dfd_iter, NULL);
+      inited = glnx_dirfd_iterator_init_at (parent_dfd, rel_path, FALSE, &dfd_iter, NULL);
 
-      while (TRUE)
+      while (inited)
         {
           struct dirent *dent;
 
@@ -2910,7 +2909,7 @@
 {
   g_autoptr(GVariant) dirmeta = NULL;
   g_autoptr(GFileInfo) file_info = g_file_info_new ();
-  g_autofree guchar *csum;
+  g_autofree guchar *csum = NULL;
   g_autofree char *checksum = NULL;
 
   g_file_info_set_name (file_info, "/");
@@ -2993,7 +2992,7 @@
   bundle->attribute_values[0] = g_strdup ("flatpak");
 
   i = 1;
-  if (runtime)
+  if (runtime && !g_str_has_prefix (runtime, "runtime/"))
     {
       bundle->attribute_names[i] = g_strdup ("runtime");
       bundle->attribute_values[i] = g_strdup (runtime);
@@ -3577,13 +3576,97 @@
   return FALSE;
 }
 
+static GList *
+add_extension (GKeyFile   *metakey,
+               const char *group,
+               const char *extension,
+               const char *arch,
+               const char *branch,
+               GList *res)
+{
+  FlatpakExtension *ext;
+  g_autofree char *directory = g_key_file_get_string (metakey, group, "directory", NULL);
+  g_autofree char *add_ld_path = g_key_file_get_string (metakey, group, "add-ld-path", NULL);
+  g_auto(GStrv) merge_dirs = g_key_file_get_string_list (metakey, group, "merge-dirs", NULL, NULL);
+  g_autofree char *enable_if = g_key_file_get_string (metakey, group, "enable-if", NULL);
+  g_autofree char *subdir_suffix = g_key_file_get_string (metakey, group, "subdirectory-suffix", NULL);
+  g_autofree char *ref = NULL;
+  gboolean is_unmaintained = FALSE;
+  g_autoptr(GFile) files = NULL;
+
+  if (directory == NULL)
+    return res;
+
+  ref = g_build_filename ("runtime", extension, arch, branch, NULL);
+
+  files = flatpak_find_unmaintained_extension_dir_if_exists (extension, arch, branch, NULL);
+
+  if (files == NULL)
+    files = flatpak_find_files_dir_for_ref (ref, NULL, NULL);
+  else
+    is_unmaintained = TRUE;
+
+  /* Prefer a full extension (org.freedesktop.Locale) over subdirectory ones (org.freedesktop.Locale.sv) */
+  if (files != NULL)
+    {
+      if (flatpak_extension_matches_reason (extension, enable_if, TRUE))
+        {
+          ext = flatpak_extension_new (extension, extension, ref, directory, add_ld_path, subdir_suffix, merge_dirs, files, is_unmaintained);
+          res = g_list_prepend (res, ext);
+        }
+    }
+  else if (g_key_file_get_boolean (metakey, group,
+                                   "subdirectories", NULL))
+    {
+      g_autofree char *prefix = g_strconcat (extension, ".", NULL);
+      g_auto(GStrv) refs = NULL;
+      g_auto(GStrv) unmaintained_refs = NULL;
+      int j;
+
+      refs = flatpak_list_deployed_refs ("runtime", prefix, arch, branch,
+                                         NULL, NULL);
+      for (j = 0; refs != NULL && refs[j] != NULL; j++)
+        {
+          g_autofree char *extended_dir = g_build_filename (directory, refs[j] + strlen (prefix), NULL);
+          g_autofree char *dir_ref = g_build_filename ("runtime", refs[j], arch, branch, NULL);
+          g_autoptr(GFile) subdir_files = flatpak_find_files_dir_for_ref (dir_ref, NULL, NULL);
+
+          if (subdir_files && flatpak_extension_matches_reason (refs[j], enable_if, TRUE))
+            {
+              ext = flatpak_extension_new (extension, refs[j], dir_ref, extended_dir, add_ld_path, subdir_suffix, merge_dirs, subdir_files, FALSE);
+              ext->needs_tmpfs = TRUE;
+              res = g_list_prepend (res, ext);
+            }
+        }
+
+      unmaintained_refs = flatpak_list_unmaintained_refs (prefix, arch, branch,
+                                                          NULL, NULL);
+      for (j = 0; unmaintained_refs != NULL && unmaintained_refs[j] != NULL; j++)
+        {
+          g_autofree char *extended_dir = g_build_filename (directory, unmaintained_refs[j] + strlen (prefix), NULL);
+          g_autofree char *dir_ref = g_build_filename ("runtime", unmaintained_refs[j], arch, branch, NULL);
+          g_autoptr(GFile) subdir_files = flatpak_find_unmaintained_extension_dir_if_exists (unmaintained_refs[j], arch, branch, NULL);
+
+          if (subdir_files && flatpak_extension_matches_reason (unmaintained_refs[j], enable_if, TRUE))
+            {
+              ext = flatpak_extension_new (extension, unmaintained_refs[j], dir_ref, extended_dir, add_ld_path, subdir_suffix, merge_dirs, subdir_files, TRUE);
+              ext->needs_tmpfs = TRUE;
+              res = g_list_prepend (res, ext);
+            }
+        }
+    }
+
+  return res;
+}
+
+
 GList *
 flatpak_list_extensions (GKeyFile   *metakey,
                          const char *arch,
                          const char *default_branch)
 {
   g_auto(GStrv) groups = NULL;
-  int i;
+  int i, j;
   GList *res;
 
   res = NULL;
@@ -3594,89 +3677,27 @@
   groups = g_key_file_get_groups (metakey, NULL);
   for (i = 0; groups[i] != NULL; i++)
     {
-      FlatpakExtension *ext;
       char *extension;
 
       if (g_str_has_prefix (groups[i], "Extension ") &&
           *(extension = (groups[i] + strlen ("Extension "))) != 0)
         {
-          g_autofree char *directory = g_key_file_get_string (metakey, groups[i], "directory", NULL);
           g_autofree char *version = g_key_file_get_string (metakey, groups[i], "version", NULL);
-          g_autofree char *add_ld_path = g_key_file_get_string (metakey, groups[i], "add-ld-path", NULL);
-          g_auto(GStrv) merge_dirs = g_key_file_get_string_list (metakey, groups[i], "merge-dirs", NULL, NULL);
-          g_autofree char *enable_if = g_key_file_get_string (metakey, groups[i], "enable-if", NULL);
-          g_autofree char *subdir_suffix = g_key_file_get_string (metakey, groups[i], "subdirectory-suffix", NULL);
-          g_autofree char *ref = NULL;
-          const char *branch;
-          gboolean is_unmaintained = FALSE;
-          g_autoptr(GFile) files = NULL;
-
-          if (directory == NULL)
-            continue;
+          g_auto(GStrv) versions = g_key_file_get_string_list (metakey, groups[i], "versions", NULL, NULL);
+          const char *default_branches[] = { default_branch, NULL};
+          const char **branches;
 
-          if (version)
-            branch = version;
+          if (versions)
+            branches = (const char **)versions;
           else
-            branch = default_branch;
-
-          ref = g_build_filename ("runtime", extension, arch, branch, NULL);
-
-          files = flatpak_find_unmaintained_extension_dir_if_exists (extension, arch, branch, NULL);
-
-          if (files == NULL)
-            files = flatpak_find_files_dir_for_ref (ref, NULL, NULL);
-          else
-            is_unmaintained = TRUE;
-
-          /* Prefer a full extension (org.freedesktop.Locale) over subdirectory ones (org.freedesktop.Locale.sv) */
-          if (files != NULL)
             {
-              if (flatpak_extension_matches_reason (extension, enable_if, TRUE))
-                {
-                  ext = flatpak_extension_new (extension, extension, ref, directory, add_ld_path, subdir_suffix, merge_dirs, files, is_unmaintained);
-                  res = g_list_prepend (res, ext);
-                }
+              if (version)
+                default_branches[0] = version;
+              branches = default_branches;
             }
-          else if (g_key_file_get_boolean (metakey, groups[i],
-                                           "subdirectories", NULL))
-            {
-              g_autofree char *prefix = g_strconcat (extension, ".", NULL);
-              g_auto(GStrv) refs = NULL;
-              g_auto(GStrv) unmaintained_refs = NULL;
-              int j;
-
-              refs = flatpak_list_deployed_refs ("runtime", prefix, arch, branch,
-                                                 NULL, NULL);
-              for (j = 0; refs != NULL && refs[j] != NULL; j++)
-                {
-                  g_autofree char *extended_dir = g_build_filename (directory, refs[j] + strlen (prefix), NULL);
-                  g_autofree char *dir_ref = g_build_filename ("runtime", refs[j], arch, branch, NULL);
-                  g_autoptr(GFile) subdir_files = flatpak_find_files_dir_for_ref (dir_ref, NULL, NULL);
-
-                  if (subdir_files && flatpak_extension_matches_reason (refs[j], enable_if, TRUE))
-                    {
-                      ext = flatpak_extension_new (extension, refs[j], dir_ref, extended_dir, add_ld_path, subdir_suffix, merge_dirs, subdir_files, FALSE);
-                      ext->needs_tmpfs = TRUE;
-                      res = g_list_prepend (res, ext);
-                    }
-                }
 
-              unmaintained_refs = flatpak_list_unmaintained_refs (prefix, arch, branch,
-                                                                  NULL, NULL);
-              for (j = 0; unmaintained_refs != NULL && unmaintained_refs[j] != NULL; j++)
-                {
-                  g_autofree char *extended_dir = g_build_filename (directory, unmaintained_refs[j] + strlen (prefix), NULL);
-                  g_autofree char *dir_ref = g_build_filename ("runtime", unmaintained_refs[j], arch, branch, NULL);
-                  g_autoptr(GFile) subdir_files = flatpak_find_unmaintained_extension_dir_if_exists (unmaintained_refs[j], arch, branch, NULL);
-
-                  if (subdir_files && flatpak_extension_matches_reason (unmaintained_refs[j], enable_if, TRUE))
-                    {
-                      ext = flatpak_extension_new (extension, unmaintained_refs[j], dir_ref, extended_dir, add_ld_path, subdir_suffix, merge_dirs, subdir_files, TRUE);
-                      ext->needs_tmpfs = TRUE;
-                      res = g_list_prepend (res, ext);
-                    }
-                }
-            }
+          for (j = 0; branches[j] != NULL; j++)
+            res = add_extension (metakey, groups[i], extension, arch, branches[j], res);
         }
     }
 
@@ -4076,7 +4097,7 @@
   if (app_metadata != NULL)
     {
       if (!g_variant_lookup (metadata, "metadata", "s", app_metadata))
-        *runtime_repo = NULL;
+        *app_metadata = NULL;
     }
 
   if (gpg_keys != NULL)
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/configure.ac flatpak-0.8.4/configure.ac
--- flatpak-0.8.3/configure.ac	2017-02-14 10:15:55.000000000 +0000
+++ flatpak-0.8.4/configure.ac	2017-03-10 09:43:27.000000000 +0000
@@ -15,8 +15,8 @@
 
 m4_define([flatpak_major_version], [0])
 m4_define([flatpak_minor_version], [8])
-m4_define([flatpak_micro_version], [3])
-m4_define([flatpak_interface_age], [3])
+m4_define([flatpak_micro_version], [4])
+m4_define([flatpak_interface_age], [4])
 m4_define([flatpak_binary_age],
           [m4_eval(10000 * flatpak_major_version + 100 * flatpak_minor_version + flatpak_micro_version)])
 m4_define([flatpak_version],
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/debian/changelog flatpak-0.8.4/debian/changelog
--- flatpak-0.8.3/debian/changelog	2017-02-14 14:14:45.000000000 +0000
+++ flatpak-0.8.4/debian/changelog	2017-03-12 13:59:18.000000000 +0000
@@ -1,3 +1,46 @@
+flatpak (0.8.4-2) experimental; urgency=medium
+
+  * Explicitly build-depend on automake. Otherwise, the aspcud resolver
+    used in experimental sometimes chooses automake1.11 as the best
+    solution to dh-autoreconf's dependency on automake | automaken,
+    causing FTBFS.
+    - Set the dependency to 1.14.1 since flatpak is known to build
+      successfully with that version in jessie-backports, whereas older
+      versions are not known to work.
+
+ -- Simon McVittie <smcv@debian.org>  Sun, 12 Mar 2017 13:59:18 +0000
+
+flatpak (0.8.4-1) experimental; urgency=medium
+
+  * New upstream bugfix release
+    - Don't add flatpak directories to XDG_DATA_DIRS if already present
+    - Do add flatpak directories to XDG_DATA_DIRS if it already has
+      a non-default value
+    - Improve progress estimates and reporting for UI frontends
+    - Fill in many missing options in man pages
+    - Support extensions that apply to multiple versions, particularly
+      useful for OpenGL drivers
+    - Support extensions that do not depend on any specific runtime,
+      particularly useful for proprietary OpenGL drivers packaged with
+      a static binary helper
+    - Various fixes for error checking and crashes
+    - Make flatpak_get_system_installations() return an array that owns
+      (takes responsibility for freeing) its contents. This is
+      technically an ABI break, but it makes this function consistent
+      with others that have a similar signature, and nothing in Debian
+      uses it yet.
+    - Disable spliced reads in the FUSE file system, which don't appear
+      to work
+    - Make FamilyWild xauth tokens available in the sandbox, not
+      just FamilyLocal
+    - Fix a misleading message on systems without systemd --user:
+      it now disables an optional feature without breaking sandboxing
+  * Add patch simplifying profile.d snippet
+  * Initially upload to experimental since this is relatively large
+    for a stable-branch release
+
+ -- Simon McVittie <smcv@debian.org>  Sat, 11 Mar 2017 13:00:05 +0000
+
 flatpak (0.8.3-1) unstable; urgency=medium
 
   * New upstream bugfix release
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/debian/control flatpak-0.8.4/debian/control
--- flatpak-0.8.3/debian/control	2017-02-14 14:14:45.000000000 +0000
+++ flatpak-0.8.4/debian/control	2017-03-12 13:59:18.000000000 +0000
@@ -7,6 +7,7 @@
  Simon McVittie <smcv@debian.org>,
 Build-Depends:
  attr,
+ automake (>= 1.14.1),
  bubblewrap (>= 0.1.5),
  ca-certificates,
  dbus,
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/debian/.gitignore flatpak-0.8.4/debian/.gitignore
--- flatpak-0.8.3/debian/.gitignore	1970-01-01 01:00:00.000000000 +0100
+++ flatpak-0.8.4/debian/.gitignore	2017-03-12 13:59:18.000000000 +0000
@@ -0,0 +1,9 @@
+/*.debhelper
+/*.substvars
+/flatpak-builder/
+/flatpak-tests/
+/flatpak/
+/gir1.2-flatpak-1.0/
+/libflatpak-dev/
+/libflatpak-doc/
+/libflatpak0/
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/debian/patches/Improve-and-simplify-profile-snippet.patch flatpak-0.8.4/debian/patches/Improve-and-simplify-profile-snippet.patch
--- flatpak-0.8.3/debian/patches/Improve-and-simplify-profile-snippet.patch	1970-01-01 01:00:00.000000000 +0100
+++ flatpak-0.8.4/debian/patches/Improve-and-simplify-profile-snippet.patch	2017-03-12 13:59:18.000000000 +0000
@@ -0,0 +1,45 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 10 Mar 2017 20:01:49 +0000
+Subject: Improve and simplify profile snippet
+
+Avoid setting a temporary variable flatpak_dirs which, while not
+exported to the environment, would still be defined as a
+shell "parameter" (variable) in the login shell itself.
+
+Consistently put the Flatpak directories before other XDG_DATA_DIRS,
+rather than putting them last if XDG_DATA_DIRS happens to be already
+set.
+
+Expand XDG_DATA_HOME if necessary, rather than assuming it will
+always be ~/.local/share.
+
+I don't know exactly which shells source profile.d, but it's possible
+that one of them might only implement POSIX test syntax, so prefer
+[ x = y ] over [ x == y ].
+
+Fix some insufficient quoting that could have gone wrong if
+XDG_DATA_DIRS somehow contained spaces.
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ profile/flatpak.sh.in | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/profile/flatpak.sh.in b/profile/flatpak.sh.in
+index cc9c342..8b350e8 100644
+--- a/profile/flatpak.sh.in
++++ b/profile/flatpak.sh.in
+@@ -1,11 +1,7 @@
+ # @sysconfdir@/profile.d/flatpak.sh - set XDG_DATA_DIRS
+ 
+-flatpak_dirs=$HOME/.local/share/flatpak/exports/share/:@localstatedir@/lib/flatpak/exports/share/
+-
+-if [ -z "${XDG_DATA_DIRS}" ]; then
+-    XDG_DATA_DIRS="$flatpak_dirs:/usr/local/share/:/usr/share/"
+-elif [ "${XDG_DATA_DIRS#*flatpak}" == ${XDG_DATA_DIRS} ]; then
+-    XDG_DATA_DIRS="$XDG_DATA_DIRS:$flatpak_dirs"
++if [ "${XDG_DATA_DIRS#*flatpak}" = "${XDG_DATA_DIRS}" ]; then
++    XDG_DATA_DIRS="${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak/exports/share:@localstatedir@/lib/flatpak/exports/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
+ fi
+ 
+ export XDG_DATA_DIRS
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/debian/patches/series flatpak-0.8.4/debian/patches/series
--- flatpak-0.8.3/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ flatpak-0.8.4/debian/patches/series	2017-03-12 13:59:18.000000000 +0000
@@ -0,0 +1 @@
+Improve-and-simplify-profile-snippet.patch
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/document-portal/xdp-fuse.c flatpak-0.8.4/document-portal/xdp-fuse.c
--- flatpak-0.8.3/document-portal/xdp-fuse.c	2017-02-14 10:14:44.000000000 +0000
+++ flatpak-0.8.4/document-portal/xdp-fuse.c	2017-02-27 10:44:44.000000000 +0000
@@ -2307,7 +2307,7 @@
 gboolean
 xdp_fuse_init (GError **error)
 {
-  char *argv[] = { "xdp-fuse", "-osplice_write,splice_move,splice_read" };
+  char *argv[] = { "xdp-fuse", "-osplice_write,splice_move", "-d" };
   struct fuse_args args = FUSE_ARGS_INIT (G_N_ELEMENTS (argv), argv);
   struct stat st;
   const char *path;
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/lib/flatpak-installation.c flatpak-0.8.4/lib/flatpak-installation.c
--- flatpak-0.8.3/lib/flatpak-installation.c	2017-02-14 10:14:38.000000000 +0000
+++ flatpak-0.8.4/lib/flatpak-installation.c	2017-03-10 09:20:27.000000000 +0000
@@ -182,7 +182,7 @@
  * Lists the system installations according to the current configuration and current
  * availability (e.g. doesn't return a configured installation if not reachable).
  *
- * Returns: (transfer full) (element-type FlatpakInstallation): an GPtrArray of
+ * Returns: (transfer container) (element-type FlatpakInstallation): an GPtrArray of
  *   #FlatpakInstallation instances
  *
  * Since: 0.8
@@ -200,7 +200,7 @@
   if (system_dirs == NULL)
     goto out;
 
-  installs = g_ptr_array_new ();
+  installs = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
   for (i = 0; i < system_dirs->len; i++)
     {
       g_autoptr(GError) local_error = NULL;
@@ -844,7 +844,7 @@
         }
       else
         {
-          g_debug ("Update: Failed to read remote %s: %s\n",
+          g_debug ("Update: Failed to read remote %s: %s",
                    flatpak_remote_get_name (remote),
                    local_error->message);
         }
@@ -1097,6 +1097,30 @@
   return metadata_contents;
 }
 
+static inline guint
+get_metadata_progress (guint metadata_fetched,
+                       guint outstanding_metadata_fetches)
+{
+  guint total_metadata = metadata_fetched + outstanding_metadata_fetches;
+
+  /* Defensive check */
+  if (total_metadata == 0)
+    return 1;
+
+  /* Below 5, there's still a high chance to overestimate the
+   * progress */
+  if (total_metadata < 5)
+    return 1;
+
+  return (guint) 10 * (metadata_fetched / (gdouble) total_metadata);
+}
+
+static inline guint
+get_write_progress (guint outstanding_writes)
+{
+  return (guint) (3 / (gdouble) outstanding_writes);
+}
+
 static void
 progress_cb (OstreeAsyncProgress *progress, gpointer user_data)
 {
@@ -1122,6 +1146,17 @@
   guint new_progress = 0;
   gboolean estimating = FALSE;
 
+  /* The heuristic here goes as follows:
+   *  - If we have delta files, grow up to 45%
+   *  - Else:
+   *     - While fetching metadata, grow up to 10%
+   *     - Then, while fetch the file objects, grow up to:
+   *        - 45% if we have extra data to download
+   *        - 90% otherwise
+   * - Writing the objects goes from 52% to 55%, or 97% to 100%
+   * - Extra data, if present, will go from 55% to 100%
+   */
+
   buf = g_string_new ("");
 
   status = ostree_async_progress_get_status (progress);
@@ -1144,6 +1179,9 @@
   if (status)
     {
       g_string_append (buf, status);
+
+      /* The status is sent on error or when the pull is finished */
+      new_progress = outstanding_extra_data ? 55 : 100;
     }
   else if (outstanding_fetches)
     {
@@ -1168,7 +1206,12 @@
                                   formatted_bytes_sec, formatted_bytes_transferred,
                                   formatted_total);
 
-          new_progress = (100 * bytes_transferred) / total_delta_part_size;
+
+          /* When we have delta files, no metadata is fetched */
+          if (outstanding_extra_data > 0)
+            new_progress = (52 * bytes_transferred) / total_delta_part_size;
+          else
+            new_progress = (97 * bytes_transferred) / total_delta_part_size;
         }
       else if (outstanding_metadata_fetches)
         {
@@ -1176,18 +1219,25 @@
            * Since its really hard to figure out early how much data there is we report 1% until
            * all objects are scanned. */
 
-          new_progress = 1;
           estimating = TRUE;
 
           g_string_append_printf (buf, "Receiving metadata objects: %u/(estimating) %s/s %s",
                                   metadata_fetched, formatted_bytes_sec, formatted_bytes_transferred);
+
+          /* Go up to 10% until the metadata is all fetched */
+          new_progress = get_metadata_progress (metadata_fetched, outstanding_metadata_fetches);
         }
       else
         {
-          new_progress = (100 * fetched) / requested;
           g_string_append_printf (buf, "Receiving objects: %u%% (%u/%u) %s/s %s",
                                   (guint) ((((double) fetched) / requested) * 100),
                                   fetched, requested, formatted_bytes_sec, formatted_bytes_transferred);
+
+
+          if (outstanding_extra_data)
+            new_progress = 10 + (42 * (double) fetched) / requested;
+          else
+            new_progress = 10 + (87 * (double) fetched) / requested;
         }
     }
   else if (outstanding_extra_data)
@@ -1204,14 +1254,20 @@
       else
         formatted_bytes_sec = g_format_size (bytes_sec);
 
-      new_progress = (100 * transferred_extra_data_bytes) / total_extra_data_bytes;
       g_string_append_printf (buf, "Downloading extra data: %u%% (%lu/%lu) %s/s %s",
                               (guint) ((((double) transferred_extra_data_bytes) / total_extra_data_bytes) * 100),
                               transferred_extra_data_bytes, total_extra_data_bytes, formatted_bytes_sec, formatted_bytes_transferred);
+
+      /* Once we reach here, at least 55% of the data was fetched */
+      new_progress = 55 + (guint) (45 * ((double) transferred_extra_data_bytes) / total_extra_data_bytes);
     }
   else if (outstanding_writes)
     {
       g_string_append_printf (buf, "Writing objects: %u", outstanding_writes);
+
+      /* Writing the objects advances 3% of progress */
+      new_progress = outstanding_extra_data ? 52 : 97;
+      new_progress += get_write_progress (outstanding_writes);
     }
   else
     {
@@ -1790,7 +1846,7 @@
     return flatpak_remote_ref_new (ref, checksum, remote_name);
 
   g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
-               "Reference %s doesn't exist in remote\n", ref);
+               "Reference %s doesn't exist in remote", ref);
   return NULL;
 }
 
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/lib/flatpak-version-macros.h flatpak-0.8.4/lib/flatpak-version-macros.h
--- flatpak-0.8.3/lib/flatpak-version-macros.h	2017-02-14 10:16:24.000000000 +0000
+++ flatpak-0.8.4/lib/flatpak-version-macros.h	2017-03-10 09:43:54.000000000 +0000
@@ -27,7 +27,7 @@
 
 #define FLATPAK_MAJOR_VERSION (0)
 #define FLATPAK_MINOR_VERSION (8)
-#define FLATPAK_MICRO_VERSION (3)
+#define FLATPAK_MICRO_VERSION (4)
 
 #define FLATPAK_CHECK_VERSION(major,minor,micro)        \
     (FLATPAK_MAJOR_VERSION > (major) || \
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/NEWS flatpak-0.8.4/NEWS
--- flatpak-0.8.3/NEWS	2017-02-14 10:15:18.000000000 +0000
+++ flatpak-0.8.4/NEWS	2017-03-10 09:35:30.000000000 +0000
@@ -1,3 +1,30 @@
+Major changes in 0.8.4
+======================
+
+In addition to the regular list of bugfixes this stable release
+include backports of one more feature required for making OpenGL work
+well. Now extra-data using extensions (such as the nvidia driver) can
+specify that it doesn't need a runtime to run its apply script. We use
+this in the nvidia driver by making the script a static binary, which
+lets us use the nvidia driver for multiple runtimes without requering
+that a particular one is installed. We also support an extension point
+supporting multiple versions, which will be use for sharing the
+nvidia driver between different runtime versions.
+
+Additional fixes:
+ * Documentation fixes
+ * Crash fixes
+ * Fix xauth propagation in some cases
+ * Don't remove origin remotes on uninstall if some other app
+   is installed from it.
+ * Don't reset what locales are installed when updating a locale
+   extension
+ * Disable splice for the documentation portal as it seems
+   to be broken in fuse
+ * Append, don't override XDG_DATA_DIRS in profile script
+ * Fix progress reporting in libflatpak to go from 0 to
+   100% once, merging the various phases.
+
 Major changes in 0.8.3
 ======================
 
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/profile/flatpak.sh.in flatpak-0.8.4/profile/flatpak.sh.in
--- flatpak-0.8.3/profile/flatpak.sh.in	2016-10-28 09:41:14.000000000 +0100
+++ flatpak-0.8.4/profile/flatpak.sh.in	2017-03-10 09:40:57.000000000 +0000
@@ -1,4 +1,11 @@
 # @sysconfdir@/profile.d/flatpak.sh - set XDG_DATA_DIRS
 
-XDG_DATA_DIRS="${XDG_DATA_DIRS:-$HOME/.local/share/flatpak/exports/share:@localstatedir@/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/}"
+flatpak_dirs=$HOME/.local/share/flatpak/exports/share/:@localstatedir@/lib/flatpak/exports/share/
+
+if [ -z "${XDG_DATA_DIRS}" ]; then
+    XDG_DATA_DIRS="$flatpak_dirs:/usr/local/share/:/usr/share/"
+elif [ "${XDG_DATA_DIRS#*flatpak}" == ${XDG_DATA_DIRS} ]; then
+    XDG_DATA_DIRS="$XDG_DATA_DIRS:$flatpak_dirs"
+fi
+
 export XDG_DATA_DIRS
diff -Nru --exclude po --exclude configure --exclude doc flatpak-0.8.3/tests/package_version.txt flatpak-0.8.4/tests/package_version.txt
--- flatpak-0.8.3/tests/package_version.txt	2017-02-14 10:16:26.000000000 +0000
+++ flatpak-0.8.4/tests/package_version.txt	2017-03-10 09:43:54.000000000 +0000
@@ -1 +1 @@
-0.8.3
+0.8.4

Reply to: