diff --git a/.gitignore b/.gitignore index 258f846..dc64915 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ /flatpak-1.10.0.tar.xz /flatpak-1.10.1.tar.xz /flatpak-1.10.2.tar.xz +/flatpak-1.10.3.tar.xz diff --git a/flatpak-1.10.2-system-helper-fix.patch b/flatpak-1.10.2-system-helper-fix.patch deleted file mode 100644 index 37ac4f6..0000000 --- a/flatpak-1.10.2-system-helper-fix.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 49e8bfcea516e96eb950109d0fa45811a352a517 Mon Sep 17 00:00:00 2001 -From: Alexander Larsson -Date: Wed, 17 Mar 2021 17:12:32 +0100 -Subject: [PATCH] system-helper: Fix deploys of local remotes - -For updates in remotes with a local (file:) uri we just do a deploy -with a LOCAL_PULL flag set and an empty arg_repo_path. However, our -arg_repo_path checking at some point seemed to stop properly handling -the case where it is empty. I got it to report "No such file" wich -broke the tests. ---- - system-helper/flatpak-system-helper.c | 89 ++++++++++++++------------- - 1 file changed, 46 insertions(+), 43 deletions(-) - -diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c -index b202c94105..adcfe61a86 100644 ---- a/system-helper/flatpak-system-helper.c -+++ b/system-helper/flatpak-system-helper.c -@@ -410,61 +410,64 @@ handle_deploy (FlatpakSystemHelper *object, - return G_DBUS_METHOD_INVOCATION_HANDLED; - } - -- src_dir = g_path_get_dirname (arg_repo_path); -- ongoing_pull = take_ongoing_pull_by_dir (src_dir); -- if (ongoing_pull != NULL) -+ if ((arg_flags & ~FLATPAK_HELPER_DEPLOY_FLAGS_ALL) != 0) - { -- g_autoptr(GError) local_error = NULL; -- uid_t uid; -+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, -+ "Unsupported flags enabled: 0x%x", (arg_flags & ~FLATPAK_HELPER_DEPLOY_FLAGS_ALL)); -+ return G_DBUS_METHOD_INVOCATION_HANDLED; -+ } - -- /* Ensure that pull's uid is same as the caller's uid */ -- if (!get_connection_uid (invocation, &uid, &local_error)) -+ if (strlen (arg_repo_path) > 0) -+ { -+ if (!g_file_query_exists (repo_file, NULL)) - { -- g_dbus_method_invocation_return_gerror (invocation, local_error); -+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, -+ "Path does not exist"); - return G_DBUS_METHOD_INVOCATION_HANDLED; - } -- else -+ -+ src_dir = g_path_get_dirname (arg_repo_path); -+ ongoing_pull = take_ongoing_pull_by_dir (src_dir); -+ if (ongoing_pull != NULL) - { -- if (ongoing_pull->uid != uid) -+ g_autoptr(GError) local_error = NULL; -+ uid_t uid; -+ -+ /* Ensure that pull's uid is same as the caller's uid */ -+ if (!get_connection_uid (invocation, &uid, &local_error)) - { -- g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, -- "Ongoing pull's uid(%d) does not match with peer uid(%d)", -- ongoing_pull->uid, uid); -+ g_dbus_method_invocation_return_gerror (invocation, local_error); - return G_DBUS_METHOD_INVOCATION_HANDLED; - } -- } -- -- terminate_revokefs_backend (ongoing_pull); -- -- if (!flatpak_canonicalize_permissions (AT_FDCWD, -- arg_repo_path, -- getuid() == 0 ? 0 : -1, -- getuid() == 0 ? 0 : -1, -- &local_error)) -- { -- g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, -- "Failed to canonicalize permissions of repo %s: %s", -- arg_repo_path, local_error->message); -- return G_DBUS_METHOD_INVOCATION_HANDLED; -- } -+ else -+ { -+ if (ongoing_pull->uid != uid) -+ { -+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, -+ "Ongoing pull's uid(%d) does not match with peer uid(%d)", -+ ongoing_pull->uid, uid); -+ return G_DBUS_METHOD_INVOCATION_HANDLED; -+ } -+ } - -- /* At this point, the cache-dir's repo is owned by root. Hence, any failure -- * from here on, should always cleanup the cache-dir and not preserve it to be re-used. */ -- ongoing_pull->preserve_pull = FALSE; -- } -+ terminate_revokefs_backend (ongoing_pull); - -- if ((arg_flags & ~FLATPAK_HELPER_DEPLOY_FLAGS_ALL) != 0) -- { -- g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, -- "Unsupported flags enabled: 0x%x", (arg_flags & ~FLATPAK_HELPER_DEPLOY_FLAGS_ALL)); -- return G_DBUS_METHOD_INVOCATION_HANDLED; -- } -+ if (!flatpak_canonicalize_permissions (AT_FDCWD, -+ arg_repo_path, -+ getuid() == 0 ? 0 : -1, -+ getuid() == 0 ? 0 : -1, -+ &local_error)) -+ { -+ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, -+ "Failed to canonicalize permissions of repo %s: %s", -+ arg_repo_path, local_error->message); -+ return G_DBUS_METHOD_INVOCATION_HANDLED; -+ } - -- if (!g_file_query_exists (repo_file, NULL)) -- { -- g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, -- "Path does not exist"); -- return G_DBUS_METHOD_INVOCATION_HANDLED; -+ /* At this point, the cache-dir's repo is owned by root. Hence, any failure -+ * from here on, should always cleanup the cache-dir and not preserve it to be re-used. */ -+ ongoing_pull->preserve_pull = FALSE; -+ } - } - - ref = flatpak_decomposed_new_from_ref (arg_ref, &error); diff --git a/flatpak.spec b/flatpak.spec index 4ef09ec..f055a1e 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -2,8 +2,8 @@ %global ostree_version 2020.8 Name: flatpak -Version: 1.10.2 -Release: 6%{?dist} +Version: 1.10.3 +Release: 1%{?dist} Summary: Application deployment framework for desktop apps License: LGPLv2+ @@ -15,8 +15,6 @@ Source1: flatpak-add-fedora-repos.service # https://github.com/flatpak/flatpak/pull/4210 # https://pagure.io/fedora-infrastructure/issue/9840 Patch0: 0001-OCI-Switch-to-pax-format-for-tar-archives.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1982304 -Patch1: flatpak-1.10.2-system-helper-fix.patch BuildRequires: pkgconfig(appstream-glib) BuildRequires: pkgconfig(dconf) @@ -270,6 +268,10 @@ fi %changelog +* Wed Sep 22 2021 Debarshi Ray - 1.10.3-1 +- Update to 1.10.3 +Resolves: #2006554 + * Sat Aug 28 2021 Debarshi Ray - 1.10.2-6 - Fix local deploys using system helper Resolves: #1982304 diff --git a/sources b/sources index 9a57174..8723024 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (flatpak-1.10.2.tar.xz) = c932b9aa2803aa5b453917174bf282d82924aca7341d72555e2557fc588ccefa0eaf32b956f75752c17cd8f73b687d4a688ebd64df36680b80b5ff5750468597 +SHA512 (flatpak-1.10.3.tar.xz) = ff51383d4ead0f39926125eec706e5a4d38a739874a9d499adf432cfa05685643cfa411f7a247c8512ec10af8440deda0be06f4cc0808e8ba80941b07e49b633