Control: retitle 864028 unblock (pre-approval): flatpak/0.8.6-1
> On Sat, 03 Jun 2017 at 12:47:30 +0100, Simon McVittie wrote:
> > The upstream developer is planning to release 0.8.6 at some point in the
> > near future, but for now here is an unblock request for the patchset that
> > would be in 0.8.6 if it was released today.
0.8.6 has now been released. It is identical to my proposed 0.8.5-3, other
than release stuff (configure.ac, NEWS), generated files and translations.
I attach an updated debdiff, with most of the generated bits filtered.
I suspect you're probably not going to want this for r0 at this point,
so I'll upload to unstable shortly to give it more visibility, with a
view to asking for a stretch-pu upload before r1. There is no new
public API, so that should be unproblematic.
Regards,
S
diffstat for flatpak-0.8.5 flatpak-0.8.6
NEWS| 26 ++
common/flatpak-dir.c| 70 +
common/flatpak-run.c| 126
configure.ac|4 -
dbus-proxy/flatpak-proxy.c |2
debian/changelog| 27 ++
document-portal/xdp-dbus.c | 20 ++---
document-portal/xdp-dbus.h |2
lib/flatpak-version-macros.h|2
session-helper/flatpak-session-helper.c |2
tests/package_version.txt |2
11 files changed, 222 insertions(+), 61 deletions(-)
diff -Nru --exclude configure --exclude po --exclude html flatpak-0.8.5/common/flatpak-dir.c flatpak-0.8.6/common/flatpak-dir.c
--- flatpak-0.8.5/common/flatpak-dir.c 2017-04-03 12:44:28.0 +0100
+++ flatpak-0.8.6/common/flatpak-dir.c 2017-06-05 13:45:47.0 +0100
@@ -3113,6 +3113,9 @@
"X-Flatpak-Tags",
(const char * const *) tags, length);
}
+
+ /* Add a marker so consumers can easily find out that this launches a sandbox */
+ g_key_file_set_string (keyfile, "Desktop Entry", "X-Flatpak", app);
}
groups = g_key_file_get_groups (keyfile, NULL);
@@ -3408,21 +3411,33 @@
GCancellable *cancellable,
GError **error)
{
- gboolean ret = FALSE;
+ const char *exported_subdirs[] = {
+"share/applications", "../..",
+"share/icons", "../..",
+"share/dbus-1/services", "../../.."
+ };
+ int i;
- if (!flatpak_mkdir_p (destination, cancellable, error))
-goto out;
+ for (i = 0; i < G_N_ELEMENTS(exported_subdirs); i = i + 2)
+{
+ /* The fds are closed by this call */
+ g_autoptr(GFile) sub_source = g_file_resolve_relative_path (source, exported_subdirs[i]);
+ g_autoptr(GFile) sub_destination = g_file_resolve_relative_path (destination, exported_subdirs[i]);
+ g_autofree char *sub_symlink_prefix = g_build_filename (exported_subdirs[i+1], symlink_prefix, exported_subdirs[i], NULL);
- /* The fds are closed by this call */
- if (!export_dir (AT_FDCWD, flatpak_file_get_path_cached (source), symlink_prefix, "",
- AT_FDCWD, flatpak_file_get_path_cached (destination),
- cancellable, error))
-goto out;
+ if (!g_file_query_exists (sub_source, cancellable))
+continue;
- ret = TRUE;
+ if (!flatpak_mkdir_p (sub_destination, cancellable, error))
+return FALSE;
-out:
- return ret;
+ if (!export_dir (AT_FDCWD, flatpak_file_get_path_cached (sub_source), sub_symlink_prefix, "",
+ AT_FDCWD, flatpak_file_get_path_cached (sub_destination),
+ cancellable, error))
+return FALSE;
+}
+
+ return TRUE;
}
gboolean
@@ -7292,13 +7307,17 @@
flatpak_repo_set_* () family of functions) */
static const char *const supported_params[] = {
"xa.title",
-"xa.default-branch", NULL
+"xa.default-branch",
+"xa.gpg-keys",
+"xa.redirect-url",
+NULL
};
g_autoptr(GVariant) summary = NULL;
g_autoptr(GVariant) extensions = NULL;
g_autoptr(GPtrArray) updated_params = NULL;
GVariantIter iter;
+ g_autoptr(GBytes) gpg_keys = NULL;
updated_params = g_ptr_array_new_with_free_func (g_free);
summary = fetch_remote_summary_file (self, remote, cancellable, error);
@@ -7315,14 +7334,31 @@
while (g_variant_iter_next (, "{sv}", , _var))
{
- /* At the moment, every supported parameter are strings */
- if (g_strv_contains (supported_params, key) &&
- g_variant_get_type_string (value_var))
+ /* At the moment, every supported parameter except gpg-keys are strings */
+ if (strcmp (key, "xa.gpg-keys") == 0 &&
+ g_variant_is_of_type (value_var, G_VARIANT_TYPE_BYTESTRING))
+{
+ const guchar *gpg_data = g_variant_get_data