GNU bug report logs - #75688
Replace wrapper scripts with search path value files in search-paths.d

Previous Next

Package: guix-patches;

Reported by: iyzsong <at> envs.net

Date: Mon, 20 Jan 2025 12:02:02 UTC

Severity: normal

Tags: patch

Full log


Message #14 received at 75688 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: iyzsong <at> envs.net
Cc: 75688 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> member.fsf.org>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace
 harmful environment variables
Date: Mon, 20 Jan 2025 23:00:57 +0900
Hello,

iyzsong <at> envs.net writes:

> From: 宋文武 <iyzsong <at> member.fsf.org>
>
> Hello, we currently set many environment variables from search-paths, some can be harmful for
> foreign system, which leading crash, eg: GDK_PIXBUF_MODULE_FILE, QT_PLUGIN_PATH, as reported in:
>
>  <https://issues.guix.gnu.org/53514>
>  <https://issues.guix.gnu.org/75523>
>  <https://issues.guix.gnu.org/73897>
>
> Instead of patch each software/library with its own environment variables (GUIX_GTK3_PATH, GUIX_QT_PLUGIN_PATH),
> we can try patch all to calculate their from one GUIX_LIBRARY_PATH (default to ~/.guix-profile/lib), since the
> problems mostly come from incompatible libraries ABI, so from "lib" construct its subdirectories should be enough.
> eg:
>   GTK3_PATH use: lib/gtk-3.0
>   FCITX_ADDONS_DIRS use: lib/fcitx5

Instead of reconstructing the paths from something like the suggested
new GUIX_LIBRARY_PATH, I think it'd be nice if additionally to the stock
environment variables supported by each software, we introduced GUIX_
prefixed variants such as GUIX_GTK3_PATH and GUIX_QT_PLUGIN_PATH which
would be used by the Guix search paths specifications defined on these
packages.

> First patch add GUIX_LIBRARY_PATH to the default search paths, like PATH.
> Second patch replace GDK_PIXBUF_MODULE_FILE with GUIX_LIBRARY_PATH.

For the GDK_PIXBUF_MODULE_FILE special case, the problem is foremost
that it's a single entry value; as mentioned previously it'd be nice if
we could contribute a true multi-items variant named
GDK_PIXBUF_MODULE_FILES that could point to more than one file.
Alternatively we could use GUIX_GDK_PIXBUF_MODULE_FILE.  But I don't see
why we should use an intermetate GUIX_LIBRARY_PATH to compute all the
other correct paths; this should be left to the search paths, in my
opinion (as it's simpler, cleaner).

Thanks for the initiative!  Let me know if I misunderstood something.

-- 
Maxim




This bug report was last modified 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.