From unknown Sun Jun 22 17:11:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#75396 <75396@debbugs.gnu.org> To: bug#75396 <75396@debbugs.gnu.org> Subject: Status: [PATCH] gnu: flatpak: Fix icon validation Reply-To: bug#75396 <75396@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:11:06 +0000 retitle 75396 [PATCH] gnu: flatpak: Fix icon validation reassign 75396 guix-patches submitter 75396 vasilii.smirnov@mailbox.org severity 75396 normal tag 75396 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 04:08:40 2025 Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 09:08:40 +0000 Received: from localhost ([127.0.0.1]:36631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUj6D-0007ju-RV for submit@debbugs.gnu.org; Mon, 06 Jan 2025 04:08:40 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37166) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUXnu-0001wX-OQ for submit@debbugs.gnu.org; Sun, 05 Jan 2025 16:04:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUXnn-0000AZ-MZ for guix-patches@gnu.org; Sun, 05 Jan 2025 16:04:52 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tUXnl-0004VU-0L for guix-patches@gnu.org; Sun, 05 Jan 2025 16:04:51 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4YR8vM3j2Mz9v92 for ; Sun, 5 Jan 2025 22:04:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1736111083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zIP2QFE5UW5ncwDBaRaQYxqEwQeBvPGWIdVSCh7JRdo=; b=P5Owit/Qiz+fy90zmHW5aXp7gSdwYO/dkw3a2PJERSgda3xPXRIVhwY3UulXy8WhxrUZYB 2P2tgaB33fYCTW1EGz8rxfuw0nzksjt24o1RzGnrv58BYpj7au29rXvgRDWCiBmMo4w5H6 7THumFN0hjh88OId0ZDNYYuiYPGe4e2tRy5m+ckbPF2AcKC99SVjkkFGfXTK5tAYKBBLo3 wVYyhbeV4D+ueQmMTujdbLxlJPHPbIiDTco1ahvMXJuk4Iapttk9WigpPlZcf4/+ODwh0z 8CNxTAdhSQhXWrCbCg0HZT8WhVSYo6ybniFk5oKOefoY8Mqe0us/XdpGEoUHtg== From: vasilii.smirnov@mailbox.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1736111069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zIP2QFE5UW5ncwDBaRaQYxqEwQeBvPGWIdVSCh7JRdo=; b=UM8ttE+4lcpcvkqdDjXfmq+X1obRNGnvIJ1o7VWIJl1K8rNCGGc2oHXdkKwKmzMpQyT3eA AxQ9hm/PuMIu8Pmy+dm0npcU1rSQLkAFuMmsaIprAuw2S3FcVjo/UmTT7qHlfJE6cKMoPr DNNHjBAfOTvc3BRTlb5sKOj8664AZ4nXg/sZQn0wv0V+HSlgSZADdBtwMJxzeCpqMNMEuo mfn2AdO6ue3fo5c+pDK20lDYSDgG2euRuwvLq3jftxLbYB6BoGyN+MlvpVKzWlUIhbeauj 6cJjncPivFapnmUIGmNVRkJ3NkyG9FmMdO9oaza5G5C+KOx2KubVV6MUsQfrpw== To: guix-patches@gnu.org Subject: [PATCH] gnu: flatpak: Fix icon validation Date: Sun, 5 Jan 2025 22:03:00 +0100 Message-ID: <7a4075b102949dc42d2acff1e4a948fe9a795cff.1736110687.git.vasilii.smirnov@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-META: tnik43ouwothtifpisea9en9o9a4csx1 X-MBO-RS-ID: 0947e20b998564cf77c Received-SPF: pass client-ip=80.241.56.152; envelope-from=vasilii.smirnov@mailbox.org; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 06 Jan 2025 04:08:32 -0500 Cc: Vasilii Smirnov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) From: Vasilii Smirnov * gnu/packages/package-management.scm (flatpak): Substitute a marker in icon-validator/validate-icon.c for the store location. * gnu/packages/patches/flatpak-fix-icon-validation.patch: Bind the guix store during flatpak-validate-icon invocation in sandbox mode, along with a few environment variables necessary for image format detection. This fixes the "No such file or directory" error when invoking flatpak-validate-icon with the --sandbox argument. Change-Id: I15dfdd0ecadc57ed383e2985c1c3caa36be4a1de --- gnu/packages/package-management.scm | 7 ++++ .../patches/flatpak-fix-icon-validation.patch | 34 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 gnu/packages/patches/flatpak-fix-icon-validation.patch diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index a8b95f450a..663965367c 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -2032,6 +2032,7 @@ (define-public flatpak (patches (search-patches "flatpak-fix-fonts-icons.patch" "flatpak-fix-path.patch" + "flatpak-fix-icon-validation.patch" "flatpak-unset-gdk-pixbuf-for-sandbox.patch")))) ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to @@ -2078,6 +2079,12 @@ (define-public flatpak (("if \\(g_find_program_in_path \\(\"p11-kit\"\\)\\)") (string-append "if (g_find_program_in_path (\"" p11-path "\"))")))))) + (add-after 'unpack 'fix-icon-validation + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (store (dirname out))) + (substitute* "icon-validator/validate-icon.c" + (("@storeDir@") store))))) ;; Many tests fail for unknown reasons, so we just run a few basic ;; tests. (replace 'check diff --git a/gnu/packages/patches/flatpak-fix-icon-validation.patch b/gnu/packages/patches/flatpak-fix-icon-validation.patch new file mode 100644 index 0000000000..f55f43cf81 --- /dev/null +++ b/gnu/packages/patches/flatpak-fix-icon-validation.patch @@ -0,0 +1,34 @@ +diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c +index 6c3d152..0d70e55 100644 +--- a/icon-validator/validate-icon.c ++++ b/icon-validator/validate-icon.c +@@ -163,7 +163,7 @@ rerun_in_sandbox (const char *arg_width, + const char *arg_height, + const char *filename) + { +- const char * const usrmerged_dirs[] = { "bin", "lib32", "lib64", "lib", "sbin" }; ++ const char * const usrmerged_dirs[] = { }; + int i; + g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free); + char validate_icon[PATH_MAX + 1]; +@@ -183,8 +183,7 @@ rerun_in_sandbox (const char *arg_width, + "--unshare-ipc", + "--unshare-net", + "--unshare-pid", +- "--ro-bind", "/usr", "/usr", +- "--ro-bind-try", "/etc/ld.so.cache", "/etc/ld.so.cache", ++ "--ro-bind", "@storeDir@", "@storeDir@", + "--ro-bind", validate_icon, validate_icon, + NULL); + +@@ -227,6 +226,10 @@ rerun_in_sandbox (const char *arg_width, + add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL); + if (g_getenv ("G_MESSAGES_PREFIXED")) + add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL); ++ if (g_getenv ("GDK_PIXBUF_MODULE_FILE")) ++ add_args (args, "--setenv", "GDK_PIXBUF_MODULE_FILE", g_getenv ("GDK_PIXBUF_MODULE_FILE"), NULL); ++ if (g_getenv ("XDG_DATA_DIRS")) ++ add_args (args, "--setenv", "XDG_DATA_DIRS", g_getenv ("XDG_DATA_DIRS"), NULL); + + add_args (args, validate_icon, arg_width, arg_height, filename, NULL); + g_ptr_array_add (args, NULL); base-commit: b8858d8b1344525d0d7ac78d8fb9dc1a577b85d3 -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 12 12:52:05 2025 Received: (at 75396-done) by debbugs.gnu.org; 12 Jan 2025 17:52:05 +0000 Received: from localhost ([127.0.0.1]:48979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tX285-00022k-CK for submit@debbugs.gnu.org; Sun, 12 Jan 2025 12:52:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46262) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tX283-000222-2K for 75396-done@debbugs.gnu.org; Sun, 12 Jan 2025 12:52:03 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tX27w-0002E8-Gu; Sun, 12 Jan 2025 12:51:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=V3vrsp+ESWM/IEt6x1BgN1wUnvMv5kc1ZXgkgvhlfM8=; b=jsSDWSh3EM438NjLIFIc Sjm75h5JQa7P4m3rw6H1jad6PRqJ7E+GuEhT0qCqSDu5VW1N21guMYu6lJFl1/dbVj5hFbPOxL7B/ cLVw2gkdZYENiFeaEIHbUhTUF0eQg7zl1xqolWkjVdhLm011ZhTDnncTzFxQWG+F7xGivyXLuPk3Z 4pvR0b2MtByu/+Gwb/aK/BT4G2V57IQXGZGD015gwbSqwJJPfmILOyTDBvOoGBr9qdjHlUjdy4laA 9M3KCx/6ojmEyhHgiOLHkaJv9nbuTQbA6c6Q6+HSez++pVWXYHLJAmrHvo5qnKYCCnZtWN77tuA3/ pk7qww+gkpC+7A==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: vasilii.smirnov@mailbox.org Subject: Re: [bug#75396] [PATCH] gnu: flatpak: Fix icon validation In-Reply-To: <7a4075b102949dc42d2acff1e4a948fe9a795cff.1736110687.git.vasilii.smirnov@mailbox.org> (vasilii smirnov's message of "Sun, 5 Jan 2025 22:03:00 +0100") References: <7a4075b102949dc42d2acff1e4a948fe9a795cff.1736110687.git.vasilii.smirnov@mailbox.org> Date: Sun, 12 Jan 2025 18:51:46 +0100 Message-ID: <87wmezj4y5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75396-done Cc: 75396-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) vasilii.smirnov@mailbox.org skribis: > From: Vasilii Smirnov > > * gnu/packages/package-management.scm (flatpak): Substitute a marker in > icon-validator/validate-icon.c for the store location. > * gnu/packages/patches/flatpak-fix-icon-validation.patch: Bind the guix > store during flatpak-validate-icon invocation in sandbox mode, along > with a few environment variables necessary for image format detection. > > This fixes the "No such file or directory" error when invoking > flatpak-validate-icon with the --sandbox argument. > > Change-Id: I15dfdd0ecadc57ed383e2985c1c3caa36be4a1de I moved the comment to the top of the patch, as suggested by =E2=80=98guix lint=E2=80=99. I also added the patch to =E2=80=98gnu/local.mk=E2=80=99. Now applied, thanks! Ludo=E2=80=99. From unknown Sun Jun 22 17:11:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 10 Feb 2025 12:24:15 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator