unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: "51100@debbugs.gnu.org" <51100@debbugs.gnu.org>
Subject: [bug#51100] [PATCH 7/8] Update and fix Flatpak and portals
Date: Fri, 08 Oct 2021 20:05:07 +0000	[thread overview]
Message-ID: <4w_JOSutZ906ZwzxqKXIEyt-8CTrHzBH2DxhPj6FcUWF0ndHpVfkf0qpD2WuAX6kLqCPEh1v5C8-d82Z11D2quaWhdhHlH7Rf02gC4Twj00=@protonmail.com> (raw)
In-Reply-To: <kK9H3ftVx0f0w0yDP5e4Pz9XlWw9CSCNiZq46TrogS05C9HMYNVm8tsQoP1vEZqgjRtxOkYydcCI61tnwOATNGjKYimeM1PcQI29KfWlOlI=@protonmail.com>

From afc1ec0d1f5449de87c081f9947700de4ddb91aa Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Fri, 8 Oct 2021 15:07:57 -0400
Subject: [PATCH 7/8] gnu: flatpak: Add patch to fix paths.

* gnu/packages/package-management.scm (flatpak)[source]: Add patch.
---
 gnu/packages/package-management.scm         |  3 ++-
 gnu/packages/patches/flatpak-fix-path.patch | 29 +++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/flatpak-fix-path.patch

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 589d3b0311..0ee4a0202b 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1530,7 +1530,8 @@ the boot loader configuration.")
      (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
                          version "/flatpak-" version ".tar.xz"))
      (sha256
-      (base32 "0my82ijg1ipa4lwrvh88jlrxbabfqfz2ssfb8cn6k0pfgz53p293"))))
+      (base32 "0my82ijg1ipa4lwrvh88jlrxbabfqfz2ssfb8cn6k0pfgz53p293"))
+     (patches (search-patches "flatpak-fix-path.patch"))))

    ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
    ;; find the TLS backend in glib-networking.
diff --git a/gnu/packages/patches/flatpak-fix-path.patch b/gnu/packages/patches/flatpak-fix-path.patch
new file mode 100644
index 0000000000..cfb71dbb2f
--- /dev/null
+++ b/gnu/packages/patches/flatpak-fix-path.patch
@@ -0,0 +1,29 @@
+Flatpak writes files for installed applications with the full Flatpak (store) path. This patch makes it write just "flatpak", using Flatpak from PATH. This is similar to the NixOS [0] patch, updated for Flatpak 1.12.1
+
+[0] https://github.com/NixOS/nixpkgs/blob/bf4167861d0f864b0fc457778d54feb4a2675ea2/pkgs/development/libraries/flatpak/use-flatpak-from-path.patch
+
+diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
+index 80ff5e5f..0c111c31 100644
+--- a/common/flatpak-dir.c
++++ b/common/flatpak-dir.c
+@@ -7134,8 +7134,7 @@ export_desktop_file (const char         *app,
+         flatpak = FLATPAK_BINDIR "/flatpak";
+
+       g_string_append_printf (new_exec,
+-                              "%s run --branch=%s --arch=%s",
+-                              flatpak,
++                              "flatpak run --branch=%s --arch=%s",
+                               escaped_branch,
+                               escaped_arch);
+
+@@ -8467,8 +8466,8 @@ flatpak_dir_deploy (FlatpakDir          *self,
+       if ((flatpak = g_getenv ("FLATPAK_BINARY")) == NULL)
+         flatpak = FLATPAK_BINDIR "/flatpak";
+
+-      bin_data = g_strdup_printf ("#!/bin/sh\nexec %s run --branch=%s --arch=%s %s \"$@\"\n",
+-                                  flatpak, escaped_branch, escaped_arch, escaped_app);
++      bin_data = g_strdup_printf ("#!/bin/sh\nexec flatpak run --branch=%s --arch=%s %s \"$@\"\n",
++                                  escaped_branch, escaped_arch, escaped_app);
+       if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE,
+                                     G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error))
+         return FALSE;
--
2.33.0




  reply	other threads:[~2021-10-08 20:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 19:52 [bug#51100] [PATCH 0/8] Update and fix Flatpak and portals John Kehayias via Guix-patches via
2021-10-08 20:00 ` [bug#51100] [PATCH 1/8] " John Kehayias via Guix-patches via
2021-10-08 20:02 ` [bug#51100] [PATCH 2/8] " John Kehayias via Guix-patches via
2021-10-08 20:02 ` [bug#51100] [PATCH 3/8] " John Kehayias via Guix-patches via
2021-10-08 20:03   ` [bug#51100] [PATCH 4/8] " John Kehayias via Guix-patches via
2021-10-08 20:04     ` [bug#51100] [PATCH 5/8] " John Kehayias via Guix-patches via
2021-10-08 20:04       ` [bug#51100] [PATCH 6/8] " John Kehayias via Guix-patches via
2021-10-08 20:05         ` John Kehayias via Guix-patches via [this message]
2021-10-08 20:05           ` [bug#51100] [PATCH 8/8] " John Kehayias via Guix-patches via
2021-10-25 19:15             ` bug#51100: [PATCH 0/8] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='4w_JOSutZ906ZwzxqKXIEyt-8CTrHzBH2DxhPj6FcUWF0ndHpVfkf0qpD2WuAX6kLqCPEh1v5C8-d82Z11D2quaWhdhHlH7Rf02gC4Twj00=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=51100@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).