diff options
author | Vasilii Smirnov <vasilii.smirnov@mailbox.org> | 2025-01-05 22:03:00 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-01-12 18:50:52 +0100 |
commit | e42c9da557813ecc32982415b388321395184c8e (patch) | |
tree | 3839f3625cc193d7ecf7f975f9bbbfd075dd1c2c /gnu/packages/patches | |
parent | 59646be90383d275f47bcb8acdefe1ea9bdbb90a (diff) |
gnu: flatpak: Fix icon validation.
* 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.
Change-Id: I15dfdd0ecadc57ed383e2985c1c3caa36be4a1de
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/flatpak-fix-icon-validation.patch | 37 |
1 files changed, 37 insertions, 0 deletions
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..b67ff68929 --- /dev/null +++ b/gnu/packages/patches/flatpak-fix-icon-validation.patch @@ -0,0 +1,37 @@ +This fixes the "No such file or directory" error when invoking +flatpak-validate-icon with the --sandbox argument. + +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); |