From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 20 Jan 2025 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by submit@debbugs.gnu.org id=B.173737450519604 (code B ref -1); Mon, 20 Jan 2025 12:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jan 2025 12:01:45 +0000 Received: from localhost ([127.0.0.1]:49221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZqTR-000567-AW for submit@debbugs.gnu.org; Mon, 20 Jan 2025 07:01:45 -0500 Received: from lists.gnu.org ([2001:470:142::17]:50802) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tZqTO-00055t-R4 for submit@debbugs.gnu.org; Mon, 20 Jan 2025 07:01:43 -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 1tZqTJ-0003dY-8e for guix-patches@gnu.org; Mon, 20 Jan 2025 07:01:37 -0500 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZqTH-0007VL-7h for guix-patches@gnu.org; Mon, 20 Jan 2025 07:01:36 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 34C6038A3E16; Mon, 20 Jan 2025 12:01:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Au3xbN3trl-X; Mon, 20 Jan 2025 12:01:26 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 20 Jan 2025 12:01:26 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id b0f51109; Mon, 20 Jan 2025 12:04:50 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 20 Jan 2025 20:04:37 +0800 Message-ID: X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: 0.9 (/) 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.1 (/) From: 宋文武 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: 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 First patch add GUIX_LIBRARY_PATH to the default search paths, like PATH. Second patch replace GDK_PIXBUF_MODULE_FILE with GUIX_LIBRARY_PATH. If this is fine, I could work on replace QT_PLUGIN_PATH, etc. later. What do you think? Thank you! Sou Bunnbu (宋文武) (2): profiles: Add $GUIX_LIBRARY_PATH to default search paths. gnu: gdk-pixbuf: Respect GUIX_LIBRARY_PATH. gnu/local.mk | 1 + gnu/packages/gtk.scm | 12 ++---- ...gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch | 42 +++++++++++++++++++ guix/build/profiles.scm | 1 + guix/profiles.scm | 8 ++-- guix/search-paths.scm | 10 +++++ 6 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch base-commit: c985075db3e6682d8a5a231c01c770aa5a147f72 -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 1/2] profiles: Add $GUIX_LIBRARY_PATH to default search paths. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Mon, 20 Jan 2025 12:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173737461419824 (code B ref 75688); Mon, 20 Jan 2025 12:04:01 +0000 Received: (at 75688) by debbugs.gnu.org; 20 Jan 2025 12:03:34 +0000 Received: from localhost ([127.0.0.1]:49228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZqVC-00059g-CX for submit@debbugs.gnu.org; Mon, 20 Jan 2025 07:03:34 -0500 Received: from mail.envs.net ([5.199.136.28]:60466) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tZqV9-00059W-CF for 75688@debbugs.gnu.org; Mon, 20 Jan 2025 07:03:32 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 84F7038A3E15; Mon, 20 Jan 2025 12:03:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M6w6s9B9-OsH; Mon, 20 Jan 2025 12:03:27 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 20 Jan 2025 12:03:26 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id acc2ad42; Mon, 20 Jan 2025 12:06:55 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 20 Jan 2025 20:06:50 +0800 Message-ID: <26c794d4f4f2d2d8a118e35b0509c190df21373d.1737374057.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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: -1.0 (-) From: 宋文武 * guix/search-paths.scm ($GUIX_LIBRARY_PATH): New search path. * guix/profiles.scm (manifest-search-paths): Add $GUIX_LIBRARY_PATH. * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Add $GUIX_LIBRARY_PATH. Change-Id: I9ff090552bb40df7b42aaec71d587d3db07b20ed --- guix/build/profiles.scm | 1 + guix/profiles.scm | 8 ++++---- guix/search-paths.scm | 10 ++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index b19d93f971..760b519bfa 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -180,6 +180,7 @@ (define (manifest-sexp->inputs+search-paths manifest) (values (reverse inputs) (delete-duplicates (cons* $PATH + $GUIX_LIBRARY_PATH $GUIX_EXTENSIONS_PATH (map sexp->search-path-specification (reverse search-paths))))))))))) diff --git a/guix/profiles.scm b/guix/profiles.scm index 87b9543ac0..f6ec51fe0b 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -742,11 +742,11 @@ (define (manifest-matching-entries manifest patterns) (define (manifest-search-paths manifest) "Return the list of search path specifications that apply to MANIFEST, -including the search path specification for $PATH." +including the search path specification for $PATH and $GUIX_LIBRARY_PATH." (delete-duplicates - (cons $PATH - (append-map manifest-entry-search-paths - (manifest-entries manifest))))) + (cons* $PATH $GUIX_LIBRARY_PATH + (append-map manifest-entry-search-paths + (manifest-entries manifest))))) (define* (manifest->code manifest #:key (entry-package-version (const ""))) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 27fcb78054..359ddc1750 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -40,6 +40,7 @@ (define-module (guix search-paths) $LIBRARY_PATH $GUIX_EXTENSIONS_PATH $PATH + $GUIX_LIBRARY_PATH $PKG_CONFIG_PATH $SSL_CERT_DIR $SSL_CERT_FILE @@ -128,6 +129,15 @@ (define $PATH (variable "PATH") (files '("bin" "sbin")))) +(define $GUIX_LIBRARY_PATH + ;; Set some environment variables can make a foreign system crash, eg: + ;; GDK_PIXBUF_MODULE_FILE + ;; QT_PLUGIN_PATH + ;; For those cases, we could patch softwares to use this special variable. + (search-path-specification + (variable "GUIX_LIBRARY_PATH") + (files '("lib")))) + (define $GUIX_EXTENSIONS_PATH ;; 'GUIX_EXTENSIONS_PATH' is used by Guix to locate extension commands. ;; Unlike 'PATH', it is attached to a package, Guix; however, it is -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 2/2] gnu: gdk-pixbuf: Respect GUIX_LIBRARY_PATH. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 20 Jan 2025 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173737462019842 (code B ref 75688); Mon, 20 Jan 2025 12:04:02 +0000 Received: (at 75688) by debbugs.gnu.org; 20 Jan 2025 12:03:40 +0000 Received: from localhost ([127.0.0.1]:49231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZqVI-00059x-0n for submit@debbugs.gnu.org; Mon, 20 Jan 2025 07:03:40 -0500 Received: from mail.envs.net ([5.199.136.28]:60472) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tZqVC-00059f-KQ for 75688@debbugs.gnu.org; Mon, 20 Jan 2025 07:03:35 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 8F36638A3E16; Mon, 20 Jan 2025 12:03:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AZOtMjSbeiNg; Mon, 20 Jan 2025 12:03:29 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 20 Jan 2025 12:03:28 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 7d02abf6; Mon, 20 Jan 2025 12:06:55 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 20 Jan 2025 20:06:51 +0800 Message-ID: <9596193713fcfc45725e0b1f0008bf0453d352f1.1737374057.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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: -1.0 (-) From: 宋文武 This fixes . * gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Apply patch. [native-search-paths]: Remove GDK_PIXBUF_MODULE_FILE. Change-Id: I109565e5f506b9335856143f68abe164aff3cd26 --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 12 ++---- ...gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch | 42 +++++++++++++++++++ 3 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch diff --git a/gnu/local.mk b/gnu/local.mk index e06a605712..133512d613 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1400,6 +1400,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gdb-hurd64.patch \ + %D%/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch \ %D%/packages/patches/gdm-default-session.patch \ %D%/packages/patches/gdm-elogind-support.patch \ %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 7ed7d7b7df..4a4069d495 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -726,7 +726,9 @@ (define-public gdk-pixbuf name "-" version ".tar.xz")) (sha256 (base32 - "0jz4kziz5lirnjjvbspbqzsigk8vnqknng1fga89d81vs5snr6zf")))) + "0jz4kziz5lirnjjvbspbqzsigk8vnqknng1fga89d81vs5snr6zf")) + (patches + (search-patches "gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch")))) (build-system meson-build-system) (outputs '("out" "debug")) (arguments @@ -773,14 +775,6 @@ (define-public gdk-pixbuf ;; For the documentation. gi-docgen python-docutils)) - (native-search-paths - ;; This file is produced by the gdk-pixbuf-loaders-cache-file - ;; profile hook. - (list (search-path-specification - (variable "GDK_PIXBUF_MODULE_FILE") - (files (list %gdk-pixbuf-loaders-cache-file)) - (separator #f) ;single valued - (file-type 'regular)))) (synopsis "Image loading library") (description "GdkPixbuf is a library that loads image data in various formats and stores it as linear buffers in memory. The buffers can then be diff --git a/gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch new file mode 100644 index 0000000000..3ec7bc28ab --- /dev/null +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch @@ -0,0 +1,42 @@ +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c +index e1df590..e553eba 100644 +--- a/gdk-pixbuf/gdk-pixbuf-io.c ++++ b/gdk-pixbuf/gdk-pixbuf-io.c +@@ -663,6 +663,19 @@ gdk_pixbuf_io_init_builtin (void) + #undef load_one_builtin_module + } + ++ ++static gchar ** ++build_guix_library_path (void) ++{ ++ gchar **dirs = NULL; ++ gchar *library_path = g_strdup (g_getenv ("GUIX_LIBRARY_PATH")); ++ if (!library_path || !library_path[0]) ++ library_path = g_build_filename (g_get_home_dir (), ".guix-profile", "lib", NULL); ++ dirs = g_strsplit (library_path, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_free (library_path); ++ return dirs; ++} ++ + static gboolean + gdk_pixbuf_io_init (void) + { +@@ -670,6 +683,17 @@ gdk_pixbuf_io_init (void) + gboolean ret; + + gdk_pixbuf_io_init_builtin (); ++ ++ /* Load loaders from GUIX_LIBRARY_PATH */ ++ gchar **guix_libdirs = build_guix_library_path (); ++ for (gsize i = 0; guix_libdirs[i] != NULL; i++) { ++ module_file = g_build_filename (guix_libdirs[i], "gdk-pixbuf-2.0", ++ GDK_PIXBUF_BINARY_VERSION, "loaders.cache", NULL); ++ gdk_pixbuf_io_init_modules (module_file, NULL); ++ g_free (module_file); ++ } ++ g_strfreev (guix_libdirs); ++ + #ifdef USE_GMODULE + module_file = gdk_pixbuf_get_module_file (); + #endif -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Jan 2025 14:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173738168721173 (code B ref 75688); Mon, 20 Jan 2025 14:02:01 +0000 Received: (at 75688) by debbugs.gnu.org; 20 Jan 2025 14:01:27 +0000 Received: from localhost ([127.0.0.1]:49438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZsLD-0005VN-Gj for submit@debbugs.gnu.org; Mon, 20 Jan 2025 09:01:27 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:52709) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tZsL6-0005Uz-MA for 75688@debbugs.gnu.org; Mon, 20 Jan 2025 09:01:20 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2ee51f8c47dso6104935a91.1 for <75688@debbugs.gnu.org>; Mon, 20 Jan 2025 06:01:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737381670; x=1737986470; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H75SBnxHgzIUyxRpWOiR2/eEZb1bdHENsIAYXTEaTaw=; b=B0u7z6AvGDSs5k+h8LlKft1GJWON4PP/89Rx3CS/Y2fsEuu71upkcKIJ5nGMOsfzRV IdwK7/bBkvasCFyPzZu2gyG/OJYrj2Ck0ZfgLTyKNMU65VnH0JrJej6RbBqa6xRQxm4t fwzka3sQ62CaSv3MFcTLKk8Za6H9cJHlZ8TXYylor2XtScZm2inNmaOgGpYqNl1ITjCd g0DEWp5Rw3/mOjI6VYv/lNkcLchLkUdUNtTd2MsyYtaEsW+uB5LwK0q968xU5SgDWohE TYNceToJq1fQs2Z4ekLphuPBg3zXnLY4gQb3hGCRTSZHlodc8u8r4pqxNfwPefNn2EuU hjWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737381670; x=1737986470; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=H75SBnxHgzIUyxRpWOiR2/eEZb1bdHENsIAYXTEaTaw=; b=sx57K8IIvPcHAenJJ/okYof8G1Lw2VY+yVf7QXbyPO0q7651sZ4r5/XfX5pd2Q3jW/ tPgpn2QVWQl4/WRf2ld07904mmDCaHXfs2LYq1pvFl+mvDxv0mzQk0xqCme6HkrkLhwd 02jZuubuFe35KOLImO8G7xGcwfthvuLu1TPe+CS8jAcmF4Z1qPK8hk/K8ya+O3e/x3mR aNNR5Cs5U4xVb2irAm7x2QQUkNbbK8b62D0n1jiEw6w7CCVIndUmzXJjdjsXOTkYcUUI kIRKXYf0xiT7Ow/GvY+52Vx7JWXBO7FpX29VtFwWHNxWDwVHBHG6NC3hyFj7RsV4XCMn Gzcw== X-Gm-Message-State: AOJu0YwaQPAUnyedJZBhjn/9ACjDdXP13eBINCFlM4aEGfhJLIz/W02+ gUVctu7fXa4fsWMW1Ps1338KEOXW3uwUHZkcHzdV8S/9HjT2jalS X-Gm-Gg: ASbGncut6BvA1i8lRjzJ88VGIpKsnCOcuIn39Keg/RKGzlPgZ6UgTrgWpUHiSWD6mnD oHgmrjySBJv6iClGqFscw7WSJ09rHd51prNGe2gWkE8tp3gyvX03VVcvFYyvOgrJNXNcXn7Z4b2 nVY24Wf2XM3/6oxZt16fnU1KdWBRveAEh+mWzVPlu0mdA2kOk2BTawADbjphFqNURmupCtydN/0 d2dB5FUsntkD4AVJQ1kltAsNaJPsQIZbkGE+PSUlPNB5lj/Yrz+vTfwaxGirzZUWsQ= X-Google-Smtp-Source: AGHT+IGkk5kF7Mh2TG1kZzG4JNrXFcapHvhDbb2wiLFQ+9zQPYC+ugyaCaP1gOkH1icGDjNpAXdMxA== X-Received: by 2002:a05:6a00:190c:b0:729:1b8f:9645 with SMTP id d2e1a72fcca58-72dafbd02ecmr22454257b3a.24.1737381670309; Mon, 20 Jan 2025 06:01:10 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dab7f3025sm7346151b3a.12.2025.01.20.06.01.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 06:01:09 -0800 (PST) From: Maxim Cournoyer In-Reply-To: (iyzsong@envs.net's message of "Mon, 20 Jan 2025 20:04:37 +0800") References: Date: Mon, 20 Jan 2025 23:00:57 +0900 Message-ID: <87msfld1pi.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hello, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > Hello, we currently set many environment variables from search-paths, som= e can be harmful for > foreign system, which leading crash, eg: GDK_PIXBUF_MODULE_FILE, QT_PLUGI= N_PATH, as reported in: > > > > > > 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 (defau= lt to ~/.guix-profile/lib), since the > problems mostly come from incompatible libraries ABI, so from "lib" const= ruct 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. --=20 Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 2/2] gnu: gdk-pixbuf: Respect GUIX_LIBRARY_PATH. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Jan 2025 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173738185721596 (code B ref 75688); Mon, 20 Jan 2025 14:05:02 +0000 Received: (at 75688) by debbugs.gnu.org; 20 Jan 2025 14:04:17 +0000 Received: from localhost ([127.0.0.1]:49442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZsO0-0005cG-LT for submit@debbugs.gnu.org; Mon, 20 Jan 2025 09:04:17 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:45344) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tZsNx-0005by-J5 for 75688@debbugs.gnu.org; Mon, 20 Jan 2025 09:04:14 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2164b1f05caso81875455ad.3 for <75688@debbugs.gnu.org>; Mon, 20 Jan 2025 06:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737381847; x=1737986647; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zSGCrFw0TobD81PPh+maaTLsjVNL3loOfihJWuYSQsk=; b=ViSxtDI/ZPoiV6/8/GjolL3sC2NAzYOFlEFRjpye47kZ28goC3OFN7un9tKzUg+YfC y+cQ544EYf0FmiOPo7yWMuzmkFsXovTSDJvavI9OCQtQ0gZCxEKmoKu9Pat/06UpwNMY Qtt+dnFEYbZs3FKluPirp5f6E5TgJc/lgHIaUpiFY9msYezrR/FLN6PtKQm/ANydlX79 /pbTsUPJcsu6IUCmj1t/2IN7bMTwX6+y3Vw9WQSDf6KxFy5/aec+Gj+WszO9xVet8l0P EsVLSba+27vPTsULArLs0jOX0urwS70ZL/8EiwmcnO1kMVzS2ZEBdjvMXfod77HEB6/R tihg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737381847; x=1737986647; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zSGCrFw0TobD81PPh+maaTLsjVNL3loOfihJWuYSQsk=; b=PfOjTtshtP3qE/qiKVMc+9TMyrqqZtAXZ+VY1JIquwfrkhY3bFUSBoaRodmnJB6l7q qy5evckvCO5Q5Ykqfcvn2GD5bVczCEXaKj+jHvHH45W8LU5QikTMzCvLslLro7fxbF4o Pep7IogYyxIG1cUNErOIAm4cxxKvVZMz686tb9JDGEQeI6yx3y2vrb6Lgcit6ElS4GF5 ylzTL8rcRywn6rY44eXMtdlQVUCN8IMyw9+jg+DOzgkegGXPl+Ciwqrdx5kWzdsmkb03 /zN2iYUJ7Z9GUtAWu0bLJdzH5hZ/79KkY7qBJiw3YASexmC9TnUHcgNTCu5z5EObDbJz KKUg== X-Gm-Message-State: AOJu0YxZsKNcQa42ZCuD5U+dlGUslqMPt3eD2802BJeXLfrwOaYVFQl5 V7Q1HQQLpa/RNSMxRPJx7bukHdVokL4DHMn4Mb6LV5/Olmd7XpcA X-Gm-Gg: ASbGnctCwVd/aRchj3pZ2J+Uei0QBCSi1B7nNWmaEmtpuzpJO1Xy5VAhxW8gRxxHwF9 iURtzL4AycEJwwJoIec5wvPeYFHQqkq9Ch4hm4ZRdmTMRYcIsduWdJTaKTbdVd749T/6y1XWiyC 2A7LSMgv6aUilbkMdcQ45fEnsnVwojKh5KOgyZ2lygmTDhJfebBsdbQfnLQPELSUTgsVJDW5aRr WiM5AsXdAYUb0DYIKNws5VNoF7lYaPcUFY9j+wkR2DKaUlwyRRJIjktNG2im+j8FlM= X-Google-Smtp-Source: AGHT+IHXyhBdbgfPURw5peCf2IECh8t4Khsm6qTYL8n4cvIX1sY+uxIgR3epiwvLIXwjbTmnTeiDKg== X-Received: by 2002:a17:903:1ce:b0:216:4a06:e87a with SMTP id d9443c01a7336-21c355dc64bmr202655915ad.40.1737381847474; Mon, 20 Jan 2025 06:04:07 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2ceb7476sm61957355ad.56.2025.01.20.06.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 06:04:06 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <9596193713fcfc45725e0b1f0008bf0453d352f1.1737374057.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Mon, 20 Jan 2025 20:06:51 +0800") References: <9596193713fcfc45725e0b1f0008bf0453d352f1.1737374057.git.iyzsong@member.fsf.org> Date: Mon, 20 Jan 2025 23:03:55 +0900 Message-ID: <87ikq9d1kk.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hi, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > This fixes . > > * gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch: New fi= le. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Apply patch. > [native-search-paths]: Remove GDK_PIXBUF_MODULE_FILE. [...] > diff --git a/gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.pa= tch b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch > new file mode 100644 > index 0000000000..3ec7bc28ab > --- /dev/null > +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_LIBRARY_PATH.patch > @@ -0,0 +1,42 @@ > +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c > +index e1df590..e553eba 100644 > +--- a/gdk-pixbuf/gdk-pixbuf-io.c > ++++ b/gdk-pixbuf/gdk-pixbuf-io.c > +@@ -663,6 +663,19 @@ gdk_pixbuf_io_init_builtin (void) > + #undef load_one_builtin_module > + } > +=20 > ++ > ++static gchar ** > ++build_guix_library_path (void) > ++{ > ++ gchar **dirs =3D NULL; > ++ gchar *library_path =3D g_strdup (g_getenv ("GUIX_LIBRARY_PATH"= )); > ++ if (!library_path || !library_path[0]) > ++ library_path =3D g_build_filename (g_get_home_dir (), ".gui= x-profile", "lib", NULL); > ++ dirs =3D g_strsplit (library_path, G_SEARCHPATH_SEPARATOR_S, 0); > ++ g_free (library_path); > ++ return dirs; > ++} > ++ > + static gboolean > + gdk_pixbuf_io_init (void) > + { > +@@ -670,6 +683,17 @@ gdk_pixbuf_io_init (void) > + gboolean ret; > +=20 > + gdk_pixbuf_io_init_builtin (); > ++ > ++ /* Load loaders from GUIX_LIBRARY_PATH */ > ++ gchar **guix_libdirs =3D build_guix_library_path (); > ++ for (gsize i =3D 0; guix_libdirs[i] !=3D NULL; i++) { > ++ module_file =3D g_build_filename (guix_libdirs[i], "gdk-pixbuf-2.0= ", > ++ GDK_PIXBUF_BINARY_VERSION, = "loaders.cache", NULL); > ++ gdk_pixbuf_io_init_modules (module_file, NULL); > ++ g_free (module_file); > ++ } > ++ g_strfreev (guix_libdirs); > ++ > + #ifdef USE_GMODULE > + module_file =3D gdk_pixbuf_get_module_file (); > + #endif As I mentioned in my previous reply, I think having a GDK_PIXBUF_MODULE_FILES environment variable using similar code as above would be a nicer solution, since it could probably be upstreamed and thus no custom patches to maintain on our side indefinitely (and useful functionality available to others -- a win/win situation) Do you agree that'd be nicer? --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jan 2025 04:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17374343391187 (code B ref 75688); Tue, 21 Jan 2025 04:39:02 +0000 Received: (at 75688) by debbugs.gnu.org; 21 Jan 2025 04:38:59 +0000 Received: from localhost ([127.0.0.1]:52894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ta62U-0000I9-2o for submit@debbugs.gnu.org; Mon, 20 Jan 2025 23:38:58 -0500 Received: from mail.envs.net ([5.199.136.28]:39806) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ta62Q-0000Hi-IU for 75688@debbugs.gnu.org; Mon, 20 Jan 2025 23:38:56 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 491E138A2BD2; Tue, 21 Jan 2025 04:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737434331; bh=zWM1uxQtKE6MJILwGeyze6m5oD76dmf/5qzWVWJbV5A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=h4YadWYQw4aC5hCl5qXIbZaCCTR98PmIwaFOKqjZGQi3CshJ6VRXvY5wkcZl1m+D2 SpCcfq4nICPvRCDBFl/4il9EgvyhD9upCUMJcKO659ihc+E6VqSqn7pP2bqVGRewVU ZBj4TjVupiYL93Ma6yRadxh0TqeKVXx1PIqItg5BTCKYU2eUySRykzThG4k4ohjhEb 132DXx/JmMmA3Yq2ZeDspPxD1LfaUTCeiAqrLMmOszqd/rpzpiljWn3Nd9eEdZgjHO BwUad4GRRydpz8a6Kn4Qme+lUXTt8VVkTfvjcPSxhCUHs039HkZ+txhEFyvTyo7P2d Lg+MtjCJFA2OvXWdrDILMnAkWXxjxPfH/FfPqyNuKdHTzh8SbNrkW8uVu2p5ahnp2b swLMjHFHS2tkoY0D/e5fLLO4vUaPq9m9qYAzk5lAQi6uoGXdm4sJuIwc3VhYzCYabQ N/4C2MAnrJIRcs1+F4jXjYabEQYOXvt6PmobyVJ2m0uGTXCI8gCextpx4EFBGd9KlC KD5vSlBBxIVkNJspyO9VTbEUlyLy6e+LvA/Tf2PWyTDvZFSi4Gh5dXz+9nV5DeJdCq zbOStoY10Ye2HJYewR6zhZ6WAV1MnjwKbeInvswAKl5/QUGRKXq0ggKQyXmFns5m/I o6h/bRewxhel7El1MFXx5l2o= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DwLAUvF1FbK0; Tue, 21 Jan 2025 04:38:43 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 21 Jan 2025 04:38:43 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 02636ea4; Tue, 21 Jan 2025 04:42:10 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87msfld1pi.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 20 Jan 2025 23:00:57 +0900") References: <87msfld1pi.fsf@gmail.com> Date: Tue, 21 Jan 2025 12:42:10 +0800 Message-ID: <877c6ord5p.fsf@envs.net> 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: 0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: > Hello, > > iyzsong@envs.net writes: > >> From: =E5=AE=8B=E6=96=87=E6=AD=A6 >> >> Hello, we currently set many environment variables from search-paths, so= me can be harmful for >> foreign system, which leading crash, eg: GDK_PIXBUF_MODULE_FILE, QT_PLUG= IN_PATH, as reported in: >> >> >> >> >> >> Instead of patch each software/library with its own environment variable= s (GUIX_GTK3_PATH, GUIX_QT_PLUGIN_PATH), >> we can try patch all to calculate their from one GUIX_LIBRARY_PATH (defa= ult to ~/.guix-profile/lib), since the >> problems mostly come from incompatible libraries ABI, so from "lib" cons= truct 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. Yes, that will also works. > >> 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. Sure, but using GDK_PIXBUF_MODULE_FILES after upstreamed would also cause problems for foreign system, since host programs will try to load plugins from guix packages, which may or may not work, even crash. > Alternatively we could use GUIX_GDK_PIXBUF_MODULE_FILE. Another alternative is to make softwares "relocatable" to profile directory, make them discovery plugins relative to their executables, gdk-pixbuf does have a "relocatable" build option, but it use "/proc/self/exe" which resolved to the final store path instead of profile level directory. Improve that likely could go upstreams, eg: by first add 'g_get_executable_path' for glib: https://gitlab.gnome.org/GNOME/glib/-/issues/31 It also open the chance to get rid of wrapper scripts (eg: by using a virtualenv'd python as interpreter instead of wrap executables with GUIX_PYTHONPATH), which I plan to play with later. But this "relocatable" way doesn't allow mix paths from differenet directories (system and user profiles), it's good as it reduce the risk of incompability, but not convenient. So using specified GUIX_* variables are a must to avoid influence host programs and use plugins from multiple profiles. > 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). Well, lesser variables give a "clean" feeling, it's mostly aesthetic, especially in GNOME and KDE, mixed with wrappers, there are a lot variables "noise" in the environment. Also think a litte more, as we need patching software anyway, I hope to modify the logic `guix_build_library_path` to also include paths from what wrappers currently provides, to drop wrappers. That logic should be simpler to implement in one place than for every specified variable. Note that even with GUIX_ specified variables, they're still problems since we have different profiles and problems built with different versions of libraries. Search "undefined symbol: __libc_pthread_init" in the list could find some reports. I think the final goal is: - profile only provides PATH, GUIX_LIBRARY_PATH (replace most if not all other "libs/.*" paths), XDG_DATA_DIRS, INFOPATH, and other shareable (usually for data files, under the "share" directory) environment variables. - no wrapper scripts for hardcoded plugins, so GUIX_LIBRARY_PATH only contains user, home, system profiles. - if incompability problems occurs, we can just unset one GUIX_LIBRARY_PATH to launch the influenced program without incompatible plugins from profiles. ofc this is temporary, you should not mix incompatible libraries (by update all packages in profile(s) at once), but handy for hurry adventurers. If this looks reasonable, then I'd work on patch gtk or qt to get rid of wrappers to justify this, how's this sound? > Thanks for the initiative! Let me know if I misunderstood something. There is no misunderstood, thank you to let me think and clarify more. From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jan 2025 10:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173745610510600 (code B ref 75688); Tue, 21 Jan 2025 10:42:02 +0000 Received: (at 75688) by debbugs.gnu.org; 21 Jan 2025 10:41:45 +0000 Received: from localhost ([127.0.0.1]:53385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taBhY-0002ks-Nk for submit@debbugs.gnu.org; Tue, 21 Jan 2025 05:41:45 -0500 Received: from mail.envs.net ([5.199.136.28]:42030) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taBhU-0002kb-69 for 75688@debbugs.gnu.org; Tue, 21 Jan 2025 05:41:43 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 73EDD38A2BE2; Tue, 21 Jan 2025 10:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737456097; bh=b1xbTaeuzzB262NpO4K0S3Vae0tm7xFUG5danU/3OFU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Z7pgIHhdyo0nhf7vMYWD60Qjyc1Cyeh2fjuAbB/LXCJ9zUD0azPWb7jR+6PPJONl1 EB1Tx83VVC6vP1WUFfZgo68SbWp4eEkHAFMX6kD9MPCNcarzo+bo1IKOpzC/y6kejG tpjXPLVUh8Z/ib8ecUuzEMweUyDThcYBPHQ+PUPBj5Y8X5gU9eqnXiI83EoSP61whr ExMsTXDJkjQGb88DPxxAER8v4KGEuLTwtA4fc8ZDrcovPHYhix3JM5v/S5Nfjugg8P PQuy2l1W6bQl5H6qR8oGtURdCRQLmY3cBpKoqqK1as6eAId2UeeMZHGmaUO0XR9EKK I3FL51LuakF24uDDo1EfT2iFSL/DxWM9dFgV8WXUWGra0hSkxsFXhNAQG9oMKxteOb lmldaoXZ9MkLMwKC4rusWkxjWgbzDZq/2mFUF1a1MzzSj74Y2Ib9hmsAQZ8LhTc32c WZNEDJUIUQXe7Xby3zTs74TEcJCfDLi+iznY2I10bokMV18ynvcyHGFszJLLokomuj g2Wp0rqczvj1MuW5RH+ShmnnweB/A8Np06za6BfhQBy2NADg/cS6dakuxm3Eb3JogD CfYZ7x5C0GI4fqupYnTuSzSZpKopVKb6x44EJhWOgbllBo5GOsHzmfgWOCdIOHQiZP vaFZ3zZyrAl0BB3AXpXAHKuc= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id u8NwooWvWhac; Tue, 21 Jan 2025 10:41:30 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 21 Jan 2025 10:41:30 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 9b294453; Tue, 21 Jan 2025 10:44:59 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <877c6ord5p.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 21 Jan 2025 12:42:10 +0800") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> Date: Tue, 21 Jan 2025 18:44:59 +0800 Message-ID: <87wmeophsk.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E5=AE=8B=E6=96=87=E6=AD=A6 writes: >> 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). > > Well, lesser variables give a "clean" feeling, it's mostly aesthetic, > especially in GNOME and KDE, mixed with wrappers, there are a lot > variables "noise" in the environment. > > Also think a litte more, as we need patching software anyway, I hope to > modify the logic `guix_build_library_path` to also include paths from > what wrappers currently provides, to drop wrappers. That logic should > be simpler to implement in one place than for every specified > variable. Okay, I changed the plan, since use only one env like GUIX_LIBRARY_PATH would lead to some form of 'stats storm', and the logic is not harder for patching different variables. If we get rid of wrapper scripts, the "noise" will only contains profile paths, so are acceptable.. Now I get this patch for glib: 1. add a `gchar **g_build_guix_search_path_dirs (const gchar *variable)` function to GLIB, which handle .VARIABLE file in addition to the env value. Those .VARIABLE files sit at the same directory of executable, would be used to replace wrapper script. As said early, wrapper scripts leaks environment variables could cause incompatable problems. 2. Use `g_build_guix_search_path_dirs` for GUIX_GIO_EXTRA_MODULES, GUIX_GSETTINGS_SCHEMA_DIR, and etc. (later). =20=20=20 3. (later) Modify wrap-program usages to use .VARIABLE files to get rid of environment variables leaks. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=glib-guix-search-paths.patch diff --git a/gio/giomodule.c b/gio/giomodule.c index 76c2028..49b02bb 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -1330,6 +1330,13 @@ _g_io_modules_ensure_loaded (void) g_io_modules_scan_all_in_directory_with_scope (module_dir, scope); g_free (module_dir); + /* GUIX: Load gio modules from GUIX_GIO_EXTRA_MODULES */ + gchar **guix_giomodule_dirs = g_build_guix_search_path_dirs ("GUIX_GIO_EXTRA_MODULES"); + for (int i = 0; guix_giomodule_dirs[i] != NULL; i++) { + g_io_modules_scan_all_in_directory_with_scope (guix_giomodule_dirs[i], scope); + } + g_strfreev (guix_giomodule_dirs); + g_io_module_scope_free (scope); /* Initialize types from built-in "modules" */ diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c index e8ccc8c..d7ff8f4 100644 --- a/gio/gsettingsschema.c +++ b/gio/gsettingsschema.c @@ -369,6 +369,13 @@ initialise_schema_sources (void) g_strfreev (extra_schema_dirs); } + /* GUIX: Load schemas from GUIX_GSETTINGS_SCHEMA_DIR. */ + char **guix_schema_dirs = g_build_guix_search_path_dirs ("GUIX_GSETTINGS_SCHEMA_DIR"); + i = g_strv_length(guix_schema_dirs); + while (i--) + try_prepend_dir (guix_schema_dirs[i]); + g_strfreev (guix_schema_dirs); + g_once_init_leave (&initialised, TRUE); } } diff --git a/glib/gutils.c b/glib/gutils.c index 8628a56..0139d42 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -2849,6 +2849,46 @@ g_get_system_config_dirs (void) return system_config_dirs; } +gchar ** +g_build_guix_search_path_dirs (const gchar *variable) +{ + gchar **dirs = NULL; + char *value = NULL; + GStrvBuilder *builder = g_strv_builder_new (); + +#if defined(__linux__) || defined(__gnu_hurd__) + /* First add paths from the .VARIABLE file, which can be used to replace wrapper script. */ + gchar *exe_path = g_file_read_link ("/proc/self/exe", NULL); + gchar *var_path = g_strjoin(NULL, exe_path, ".", variable, NULL); + if (g_file_get_contents (var_path, &value, NULL, NULL)) { + dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); + g_strv_builder_addv (builder, (const gchar **) dirs); + g_strfreev (dirs); + g_free (value); + } + g_free (exe_path); + g_free (var_path); +#endif + + /* Then add paths from the environment variable. */ + gboolean is_setuid = GLIB_PRIVATE_CALL (g_check_setuid) (); + if (is_setuid) /* we don't want to access arbitrary files when running as setuid. */ + value = NULL; + else + value = g_strdup (g_getenv (variable)); + + if (value && value[0]) { + dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); + g_strv_builder_addv (builder, (const gchar **) dirs); + g_strfreev (dirs); + } + g_free (value); + + dirs = g_strv_builder_end (builder); + g_strv_builder_unref (builder); + return dirs; +} + /** * g_nullify_pointer: * @nullify_location: (not nullable): the memory address of the pointer. diff --git a/glib/gutils.h b/glib/gutils.h index efc6914..710cf27 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -36,6 +36,9 @@ G_BEGIN_DECLS +GLIB_AVAILABLE_IN_ALL +gchar **g_build_guix_search_path_dirs (const gchar *variable); + GLIB_AVAILABLE_IN_ALL const gchar * g_get_user_name (void); GLIB_AVAILABLE_IN_ALL --=-=-= Content-Type: text/plain A similiar patch would needed for qtbase, or maybe I can use glib API directly from any Qt application? (haven't tried) Does this level of patching seems okay? Thanks! --=-=-=-- From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jan 2025 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173746532926716 (code B ref 75688); Tue, 21 Jan 2025 13:16:02 +0000 Received: (at 75688) by debbugs.gnu.org; 21 Jan 2025 13:15:29 +0000 Received: from localhost ([127.0.0.1]:53688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taE6K-0006wq-M6 for submit@debbugs.gnu.org; Tue, 21 Jan 2025 08:15:29 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:48320) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1taE6H-0006wO-NH for 75688@debbugs.gnu.org; Tue, 21 Jan 2025 08:15:26 -0500 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-216281bc30fso127406225ad.0 for <75688@debbugs.gnu.org>; Tue, 21 Jan 2025 05:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737465320; x=1738070120; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cHLZwdPiLuhpBphXq/mYblFaMMZ3533DaHTRtSlaFmY=; b=i0WXJPIewagfBNr+Xnmxg8Wilu86qY/6npk4628vqWTgiiZRJOOcDcivnfaoRvLQhy 8mHU1NEVCqHb+iFKWqHniiOPxnlqUxLs1PrY/HdKgbqA/yHPIryfIQsPOtNsL3PIBPcf KDNqX6pKMzZij7kaRpPRWL61gR0OVeBx/3wEIsbAHwx5tWyJ8Gxuxfq/i8YCZLm/sbS+ yTgTgIu7QfIIfihf28ihj6Bp/ndwNEwS47YV1Q7Pu4+1aob8qZEmuyxAb850g2AOWVeW 2p/Q4MiVDQ4SvaPQXyyZFB4enAbZfMapcQjOz3bfz62W+4SH+iAAqng0peMP6FZaj58R tJWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737465320; x=1738070120; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cHLZwdPiLuhpBphXq/mYblFaMMZ3533DaHTRtSlaFmY=; b=UFwqr8tmVWHAB1XMKLrVrrl4cvTFWrj2iQwcvHEOvFZM5IP6pMSxOiDXWCbBLUjVG/ RiBYn74o9mso1nXTxiiCkx6OpxWD3wcgI4g8XW5c3NigAHAoSU8Nn6lktaOb3KXT4Ssn V2I7/Aa725ie9Z4duK/twqylW3JQFDceklpQhZ3+uhGn7iHKGESUDFNI4vNKHfj3Td42 Roj8j9pHfKxPsYZODWNo7N1cdwhIdIB/AF2sT+KujDMf62XtRkW3FoivEb7oGPtlqpV2 ybFkGkXNI5xFGUz5K5+gIfnOW/5A2HsSabaWLSTiVkHGPXl40hIZuDHrlU+zZb03FYcL iVJg== X-Gm-Message-State: AOJu0YzRPfbLZY9Jc4Ifnawpx3/Hq4HuiRM4N4oGvEzeB3HfeZEdGp1K A/GXbbkJEOjJo6Cis9/xa3tWJ31lGUYsKxqwFMo2VeIfXBahbENw X-Gm-Gg: ASbGncuBdpNx+64mtxYhB/pWeXPoGaeJ2nQeKbCq3TEa6IcOn/sA6eQi9w9HVtgL/aG m+Yehw+dktSCFewZGqtkPiLbFmFWZFc8D5oQyQ3BSRHJo9O/XgDRLN8kZIiKLqFcEBjYFR/EQFO R/U2k4y29L86IoJioc9URVgdePu6hb6zYL99Y1Yed+uxsfs0n3HS+rw/m0OAUihrArX16Z2zOOO oGMeDGQqy1HYZjvRF5VNfU0flFbQej9tDHPd8xF5IxD5a3mc3x8MC21o2YMxHuMUiY= X-Google-Smtp-Source: AGHT+IHi0m10UNk47Z8sR5h5/a6xZyCgkGEFO7Woeg6Z47sR1hIiR7x4VkRla8vxDQH0rrCXr0rEIw== X-Received: by 2002:a05:6a20:1589:b0:1e1:ca25:8da3 with SMTP id adf61e73a8af0-1eb214de8e8mr27949629637.20.1737465318123; Tue, 21 Jan 2025 05:15:18 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dabacdc6csm8974622b3a.165.2025.01.21.05.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 05:15:17 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <877c6ord5p.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 21 Jan 2025 12:42:10 +0800") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> Date: Tue, 21 Jan 2025 22:15:06 +0900 Message-ID: <87sepcs3z9.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hi, =E5=AE=8B=E6=96=87=E6=AD=A6 writes: [...] > Sure, but using GDK_PIXBUF_MODULE_FILES after upstreamed would also > cause problems for foreign system, since host programs will try to load > plugins from guix packages, which may or may not work, even crash. Ah, I wasn't thinking about these being plugins depending on a specific ABI, likely incompatible. I see. >> Alternatively we could use GUIX_GDK_PIXBUF_MODULE_FILE. > > Another alternative is to make softwares "relocatable" to profile > directory, make them discovery plugins relative to their executables, > gdk-pixbuf does have a "relocatable" build option, but it use > "/proc/self/exe" which resolved to the final store path instead of > profile level directory. Improve that likely could go upstreams, eg: by > first add 'g_get_executable_path' for glib: > https://gitlab.gnome.org/GNOME/glib/-/issues/31 > > It also open the chance to get rid of wrapper scripts (eg: by using a > virtualenv'd python as interpreter instead of wrap executables with > GUIX_PYTHONPATH), which I plan to play with later. But this > "relocatable" way doesn't allow mix paths from differenet directories > (system and user profiles), it's good as it reduce the risk of > incompability, but not convenient. It sounds interesting, worth exploring. But being unable to compose multiple profile together easily defeats its purpose a bit (though the same would be true with single valued variable such as GDK_PIXBUF_MODULE_FILE: you can't honor the two profiles here, one has to win). > So using specified GUIX_* variables are a must to avoid influence host > programs and use plugins from multiple profiles. > > >> 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). > > Well, lesser variables give a "clean" feeling, it's mostly aesthetic, > especially in GNOME and KDE, mixed with wrappers, there are a lot > variables "noise" in the environment. While aesthetic is nice, I'd rather to keep the design stupid simple and rely on the search path mechanism; we can refine later. Having 10 or 20 environment variables in my profile doesn't appear to be that big of a deal to me. > Also think a litte more, as we need patching software anyway, I hope to > modify the logic `guix_build_library_path` to also include paths from > what wrappers currently provides, to drop wrappers. That logic should > be simpler to implement in one place than for every specified variable. Sorry, I've lost you; what is this `guix_build_library_path` variable? I'm not sure we'd be able to get rid of wrappers fully, as not everything would be relative to lib. I guess that's in the space to be explored :-). > Note that even with GUIX_ specified variables, they're still problems > since we have different profiles and problems built with different > versions of libraries. Search "undefined symbol: __libc_pthread_init" > in the list could find some reports. Right. It seems the responsibility of the user to avoid combining incompatible software from different profiles. > I think the final goal is: > > - profile only provides PATH, GUIX_LIBRARY_PATH (replace most if not all > other "libs/.*" paths), XDG_DATA_DIRS, INFOPATH, and other shareable > (usually for data files, under the "share" directory) environment > variables. > > - no wrapper scripts for hardcoded plugins, so GUIX_LIBRARY_PATH only > contains user, home, system profiles. > > - if incompability problems occurs, we can just unset one > GUIX_LIBRARY_PATH to launch the influenced program without > incompatible plugins from profiles. ofc this is temporary, you should > not mix incompatible libraries (by update all packages in profile(s) > at once), but handy for hurry adventurers. > > If this looks reasonable, then I'd work on patch gtk or qt to get rid of > wrappers to justify this, how's this sound? It's too early for me to say if it could really work, but I'll repeat that a priori I'm not too fond of GUIX_LIBRARY_PATH (just the name would clash with a GCC env var too) and custom logic that'd need to be maintained in the software (we'd need to patch the software to have GUIX_* variables anyway but the resulting patch would be trivial); I think I'd rather have multiple, explicit environment variables computed by search paths. Just to make sure, GUIX_* variables would be honored *on top* of their non GUIX_ prefixed (stock) variants, right? E.g. we wouldn't want GCC to stop honoring LIBRARY_PATH even if we add GUIX_LIBRARY_PATH, as that would confuse users. --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jan 2025 13:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173746561127815 (code B ref 75688); Tue, 21 Jan 2025 13:21:01 +0000 Received: (at 75688) by debbugs.gnu.org; 21 Jan 2025 13:20:11 +0000 Received: from localhost ([127.0.0.1]:53698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taEAs-0007EW-KQ for submit@debbugs.gnu.org; Tue, 21 Jan 2025 08:20:11 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:59737) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1taEAo-00079Z-9w for 75688@debbugs.gnu.org; Tue, 21 Jan 2025 08:20:08 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2166651f752so128469225ad.3 for <75688@debbugs.gnu.org>; Tue, 21 Jan 2025 05:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737465600; x=1738070400; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lxcLPMKGPFGmHgN45dRu22AxOfPXsxm32s4ScWNJxBI=; b=b4k3DF915T8t8FSyLkSviceDsbbIfhZCgsVyAgubfkVa+2g8LUyFdXQWk3uKg6cP7y D+HT0sNXHmxDRNvw3LVYD4WYrEXhJj4CdRS2vQaF+7KaP5BtUUlR3O41eVmbboHErVdz tYnrffTLAKCfNwvfZzQapMEkygGODjQ/6zfsHHtDKjEb9gj0K1JU/RP7YGydzj4diUk4 wIVH15t5TVFBCrEoRdp7VxVBo/Cp1JPHkD4de1/CxMHwc7Q1IxFnHRnMyHToiJ54IRoN SYeQsQgVq2wBEMOMl2K2drRzT6M0IpdvzuTdlDhfUKMJQg1W9uzTNHC4YqTQxGLALk4n 458Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737465600; x=1738070400; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lxcLPMKGPFGmHgN45dRu22AxOfPXsxm32s4ScWNJxBI=; b=M+SLx5U3x2gpkSH8/sCgx37C8MYflm4lDJHoeBlUd+xRFtZeM6dBXalLM5onV2uOnd BzJ6A8tiTkgDLJhszm/hl06MSJIAOK3/IWJP2YInBWo3ujuI9+Ou/uHj3eltqgchsdFq DMpDi+G68mbgrc1V/rp/TR6a9tVbf4qwu0+jl5rvSleQaln0LqImd0Z2JQIpVBQKxkFS tPuugBgleAcZ83FC+bx2CJNQJTO+9TqkpRSdHgc7Yv4qKWexEhfJLHsJ589zSnRGUIGh vwX9DJ4Vc1OdGo5ZbBRpfDWHM5GihxaPlLm42B0C4ICsFrrCkTT+YJaKF4lk/iHemm7N Gjpw== X-Gm-Message-State: AOJu0YxsitFy66q3uoDsRCQE6wJUreJJr2Qrsj7kW9kLngK3qpqMHQtW Gy04mse8MX5Ce6KFZRaQNBcYn6LF3W+bLJXXfc3xQ0xQkQkaTu2n X-Gm-Gg: ASbGncsiMHV3PNLov/GtYr33tn5MfLoxSDx/UohrcP106cucyDsrXMccRB1fBWuKRzr xQB3XlPVjizz7lxSzNCHxmC9cd0YEKAPHZGv8aoFOrJU5IiC12vHLJ6+Qn12Vvf744nwftxUmGv ScO+G/opTH2t1sMvs8m8sNoAF4M7esyRU3umLlLuXjOu+bM0hURFHBq/jgiU2lmBz0i9DN0PF9K N68GWtua9Q8q0cSoVR9lVVYpGLzK/FSdpdnzrN1N8gm+Kw0lq3EFvwOozIRgGaADks= X-Google-Smtp-Source: AGHT+IHCP3ifXrsbJIXAmrTz2sl1mBxPwbT0EKICb2uFyD3aBoErEg9WesobZu6MjYvq/tvhQCrNPw== X-Received: by 2002:a05:6a21:6da4:b0:1e0:cadd:f670 with SMTP id adf61e73a8af0-1eb2144d4fdmr24220398637.5.1737465600376; Tue, 21 Jan 2025 05:20:00 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-a9bca47e790sm8730922a12.2.2025.01.21.05.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 05:19:59 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87wmeophsk.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 21 Jan 2025 18:44:59 +0800") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> Date: Tue, 21 Jan 2025 22:19:49 +0900 Message-ID: <87o700s3re.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hello, =E5=AE=8B=E6=96=87=E6=AD=A6 writes: [...] > Okay, I changed the plan, since use only one env like GUIX_LIBRARY_PATH > would lead to some form of 'stats storm', and the logic is not harder > for patching different variables. If we get rid of wrapper scripts, the > "noise" will only contains profile paths, so are acceptable.. > > Now I get this patch for glib: > > 1. add a `gchar **g_build_guix_search_path_dirs (const gchar *variable)` > function to GLIB, which handle .VARIABLE file in addition to the env > value. Those .VARIABLE files sit at the same directory of > executable, would be used to replace wrapper script. As said early, > wrapper scripts leaks environment variables could cause incompatable > problems. > > 2. Use `g_build_guix_search_path_dirs` for GUIX_GIO_EXTRA_MODULES, > GUIX_GSETTINGS_SCHEMA_DIR, and etc. (later). >=20=20=20=20 > 3. (later) Modify wrap-program usages to use .VARIABLE files to get rid > of environment variables leaks. This reminds me of how Python virtualenv works, IIRC. What do you mean by "wrapper scripts leak environment variables and could cause incompatibility problems" ? Sure, if your term binary is wrapped, your shell will have these environment variables as its a child process inheriting its parent environment, but otherwise I'm not sure I understand the issue, especially how processing a .VARIABLE file instead would handle this better? Could yo give an example? --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Jan 2025 14:37:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173747018611446 (code B ref 75688); Tue, 21 Jan 2025 14:37:04 +0000 Received: (at 75688) by debbugs.gnu.org; 21 Jan 2025 14:36:26 +0000 Received: from localhost ([127.0.0.1]:53819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taFMg-0002yY-3y for submit@debbugs.gnu.org; Tue, 21 Jan 2025 09:36:26 -0500 Received: from mail.envs.net ([5.199.136.28]:37350) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taFMZ-0002yB-Mo for 75688@debbugs.gnu.org; Tue, 21 Jan 2025 09:36:20 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 93F8D38A3E42; Tue, 21 Jan 2025 14:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737470177; bh=Up21bLKmNyihsjtS/mePdyjWAe+YIjR5Pv2Q7HZUaeM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AI2kDPo0KDfXU30H315KtGkaptK6coXHSyzX0dhk/7bnYzD69sm9HWOj4ox5P2oEO k0nwDNICUEOwKVbjoH4BiVoZ76//YwjSPAu0iePjYqHqI1+FkoQMqm54sv0DwjygIe gblQPeN63UcN7kcZpXVc1a8ZXYgKC4gp7N8LQd9L5B+DEFkJPREXnYk8IWI0rbfqGu L4m5Yi7apYOdaM/aHx/JLmD00HcPBV02AArCW0eQZ16VVTTY/vmkQ2dmgC5hyPbs+6 UXeiWFb61h71nxwq094m8+jSbJp+NfciIE4pBAScuDIvdl+f8zUCfJwvZNKRmQytkt Qu55I5Q9ucZBRGKB7pQV26iq8KjGHxRHWkN970hfE3NyBpjvx9zVVkCoJhj7vpui5E toWfTtr7tj/iJSMiXAi6FkHF1EWFoDOQ0vrjUhNZvSfmLb4RJrEMsB3TTwTS97FoWM w388gF7tH1wUgTP9fU+0h6SiB1AlXpSiH9k9+JY06qXnuvriJOefcJ6oGiqSvmTm7p 5F1oTjN0UH/ocvqaRdMOEB83aAP2ovXJBBOk3+O1jLL8Ll68snmZEWDeNO9TTVjF4D EZlGhvqljmKXfvH23io0xKBRNvsv05CWCgMoWz+kAC/elMBoJiO9rhvB2fKAQYK0D+ EceR76sq6MT+VgPymVqL5Mwc= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Yd6tCLaaliLW; Tue, 21 Jan 2025 14:36:08 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 21 Jan 2025 14:36:08 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 5568a498; Tue, 21 Jan 2025 14:39:34 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87o700s3re.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 21 Jan 2025 22:19:49 +0900") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> <87o700s3re.fsf@gmail.com> Date: Tue, 21 Jan 2025 22:39:34 +0800 Message-ID: <87o700p6xl.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: >> Okay, I changed the plan, since use only one env like GUIX_LIBRARY_PATH >> would lead to some form of 'stats storm', and the logic is not harder >> for patching different variables. If we get rid of wrapper scripts, the >> "noise" will only contains profile paths, so are acceptable.. >> >> Now I get this patch for glib: >> >> 1. add a `gchar **g_build_guix_search_path_dirs (const gchar *variable)` >> function to GLIB, which handle .VARIABLE file in addition to the env >> value. Those .VARIABLE files sit at the same directory of >> executable, would be used to replace wrapper script. As said early, >> wrapper scripts leaks environment variables could cause incompatable >> problems. >> >> 2. Use `g_build_guix_search_path_dirs` for GUIX_GIO_EXTRA_MODULES, >> GUIX_GSETTINGS_SCHEMA_DIR, and etc. (later). >> >> 3. (later) Modify wrap-program usages to use .VARIABLE files to get rid >> of environment variables leaks. > > This reminds me of how Python virtualenv works, IIRC. What do you mean > by "wrapper scripts leak environment variables and could cause > incompatibility problems" ? Sure, if your term binary is wrapped, your > shell will have these environment variables as its a child process > inheriting its parent environment, but otherwise I'm not sure I > understand the issue, especially how processing a .VARIABLE file instead > would handle this better? Could yo give an example? A program try to load different versions of plugins via GIO_EXTRA_MODULES, QT_PLUGIN_PATHS could crash due to ABI incompatible, see: mix Qt 5.9.3 and 5.9.4: https://yhetil.org/guix/874jzl2n16.fsf@gmail.com/ mix GIO modules with different glibc: https://yhetil.org/guix/87r0rvasph.fsf@jpoiret.xyz/ In a desktop environment, with wrapper scripts you would get GIO_EXTRA_MODULES, GTK_PATH contains store paths: https://yhetil.org/guix/2c93c29e-032b-2b5e-6139-b28de456b47b@telenet.be/ GIO_EXTRA_MODULES=/gnu/store/8k9s3z2315p494fj937jyvc9v7gpbjr8-dconf-0.40.0/lib/gio/modules:/gnu/store/knm6b1dxg2j3vji4wrgngv99pvb6f5ff-glib-networking-2.70.0/lib/gio/modules::/run/current-system/profile/lib/gio/modules GTK_PATH=/gnu/store/kq72g9hjl1sj4c1qhw98m8rdw2ymmk7m-gtk+-3.24.30/lib/gtk-3.0:/gnu/store/fkl4fg06f538ryhiw4bs2iwwfs56g2k3-libcanberra-0.30/lib/gtk-3.0 Then when you try to run a incompatible program (eg: with a newer glibc or gtk), those variables leaks from wrapper scripts will make the program crash. By replace those variables via .VARIABLE file, those starts with '/gnu/store/' won't get exported to the shell and desktop sessions, since they're not in the environ, but read from file (any executable will read its unique set of .VARIABLE files) and used by executables directly. So it should reduce the chance of incompatible, also if we wrap programs need dconf/glib-networking with .VARIABLE file, there will be no need to install dconf/glib-networking in the system profile, reduce the risk more. '/run/current-system/' still could cause problems though, which user can update all packages sync or choose to not mix profiles. From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Jan 2025 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173750781413595 (code B ref 75688); Wed, 22 Jan 2025 01:04:02 +0000 Received: (at 75688) by debbugs.gnu.org; 22 Jan 2025 01:03:34 +0000 Received: from localhost ([127.0.0.1]:58381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taP9V-0003Wu-SY for submit@debbugs.gnu.org; Tue, 21 Jan 2025 20:03:34 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:54491) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1taP9T-0003Vy-6y for 75688@debbugs.gnu.org; Tue, 21 Jan 2025 20:03:28 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-21c2f1b610dso108814415ad.0 for <75688@debbugs.gnu.org>; Tue, 21 Jan 2025 17:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737507801; x=1738112601; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fPs91xsvnOYgtHNg4zoVOLHO9HWSkeRT8OKoAgLdSYc=; b=fkxUUNcTzsa9fy/BccVppafYhSq+nUos/Nm+N6TW28wZhlNvDEKVQ1YtWJn9jKCcvh FngwGrtjPTQSGkH1/4vbJqYTKbWu4GLhv8EbTYBEwwqu9w4UFSaL/VFMWza7hBRRLvE/ 5lQrM+hB+GxjW+ov7QaedXoivdGfSdOntq7tZDIcOZ342+gWi+a4kYf5WxYyQQ4K/7GF FUgb1ZS7X05SP3RhxwptFVs7O5pCPN7VqW7jF5oil54TcGE4Qfrp5wTje0POZ9nJrNJe HNPlN/NfgEhUPHxI+4zzF8iFWkvodjYw3zv+kz/cbtfeiRTlGjPJgNI5CU+GnbQejt53 JGbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737507801; x=1738112601; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fPs91xsvnOYgtHNg4zoVOLHO9HWSkeRT8OKoAgLdSYc=; b=bCi0kuoVLzPh5csK6rVflR/W1fe69kDAezEsjsY1ePTehcnaAYO/K+v5/PNgeR9LFS oJAkjvMMA0/l9JdzeFZBpaMXfdwYs1dyWfZNgJ9NwZibIQKQyThp6JtrzS28L/FiiQF3 P2Kf1DYbtbzaj3e671fm8Oe1QLyYSarRI5et41d8pq70S5wznyyzgx/W8Da94SAkw9uh Ra7BkN6ZHbfZfxwAYbtfo9nAtCwpVSupsc1Vm1+oMBzHvRKA+9a513bXqj1XwaISo8qk huQUyzlAKF8eXBcVgXbNev3p9MqEO8tAHSdvp7Bn7wiPMYOaJ9drOjb1x4oQXMjQJ9+5 TRCw== X-Gm-Message-State: AOJu0YzZ/f4zuOJBabWlRAJomhC23v4T7vT52N+xF6He6I3YacCZy4uG KiZPOmPJVyR+Ada3HswNHZxCMqqO9V8eDfHNR+6zMRZNCzWjlHg+ X-Gm-Gg: ASbGncuM1Q8rhBIUMeeEVdv6QWaCATRfK/v0fnZQmWuLkr/NzCd4XpMEDenAl3XluAR JZOq+iQfHkLe+ckrC5/dDiF4Paarwc10dyYRZtHYcUPuZ+cL1+EVblMOo2T+Xh8P5hSG9qlzylS +oMTDK7L2eono0PGlgZEbFoL/F5TdsyyvM81XBQbP5F9lqKxoCyLoTjBu+Q5URlIN7q0F3laS9K uhCTm+Dtv0sRKVErcqf2eYP3kpv7m3wrV/dqp+E0uT2JwKmYKLUcPIiAuK+zAvc3Fc= X-Google-Smtp-Source: AGHT+IG6dL3+eJy6pZiBI6D6l+cD9NkiQh0t9VcounNiFrVR+z4f5BazT0KAGjgQ0qGUU5ABC+fFGA== X-Received: by 2002:a17:902:d551:b0:216:2bd7:1c4a with SMTP id d9443c01a7336-21c35562974mr285151875ad.26.1737507800977; Tue, 21 Jan 2025 17:03:20 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2d3e8081sm84250025ad.185.2025.01.21.17.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 17:03:20 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87o700p6xl.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 21 Jan 2025 22:39:34 +0800") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> <87o700s3re.fsf@gmail.com> <87o700p6xl.fsf@envs.net> Date: Wed, 22 Jan 2025 10:03:09 +0900 Message-ID: <87tt9rr776.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hello, =E5=AE=8B=E6=96=87=E6=AD=A6 writes: [...] >> inheriting its parent environment, but otherwise I'm not sure I >> understand the issue, especially how processing a .VARIABLE file instead >> would handle this better? Could yo give an example? > > A program try to load different versions of plugins via > GIO_EXTRA_MODULES, QT_PLUGIN_PATHS could crash due to ABI incompatible, s= ee: > > mix Qt 5.9.3 and 5.9.4: https://yhetil.org/guix/874jzl2n16.fsf@gmail.com/ > mix GIO modules with different glibc: https://yhetil.org/guix/87r0rvasph.= fsf@jpoiret.xyz/ > > In a desktop environment, with wrapper scripts you would get > GIO_EXTRA_MODULES, GTK_PATH contains store paths: > > https://yhetil.org/guix/2c93c29e-032b-2b5e-6139-b28de456b47b@telenet.be/ > > GIO_EXTRA_MODULES=3D/gnu/store/8k9s3z2315p494fj937jyvc9v7gpbjr8-dconf-0.4= 0.0/lib/gio/modules:/gnu/store/knm6b1dxg2j3vji4wrgngv99pvb6f5ff-glib-networ= king-2.70.0/lib/gio/modules::/run/current-system/profile/lib/gio/modules > GTK_PATH=3D/gnu/store/kq72g9hjl1sj4c1qhw98m8rdw2ymmk7m-gtk+-3.24.30/lib/g= tk-3.0:/gnu/store/fkl4fg06f538ryhiw4bs2iwwfs56g2k3-libcanberra-0.30/lib/gtk= -3.0 I see; I agree that if the environment variables or not set by a search path and instead picked up by the binary from some file, then it solves this class of problem, but that seems equivalent to wrapping the binaries, no? You'd still have some glue code reading .VARIABLE and then doing a bunch of setenv before launching the actual program, no? That glue code is currently the shell or Guile script used to wrap the binaries. Unless we can fully eliminate search paths and propagation, we'll still have the issue of having environment variables being set, even with the use of .VARIABLE, as far s I understand. > Then when you try to run a incompatible program (eg: with a newer glibc > or gtk), those variables leaks from wrapper scripts will make the > program crash. > > By replace those variables via .VARIABLE file, those starts with nitpick: Perhaps it could be called .environment or .environment-variables, similarly named as in our failed Guix builds. [...] As you can see, perhaps I'm still missing pieces of your big picture. a RFC/GCD documenting the idea, or a demo implementation if that's easier/faster would help (code is often more succinct than text). --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Jan 2025 09:40:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173753877123298 (code B ref 75688); Wed, 22 Jan 2025 09:40:05 +0000 Received: (at 75688) by debbugs.gnu.org; 22 Jan 2025 09:39:31 +0000 Received: from localhost ([127.0.0.1]:59901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taXCs-00063i-LJ for submit@debbugs.gnu.org; Wed, 22 Jan 2025 04:39:31 -0500 Received: from mail.envs.net ([5.199.136.28]:37760) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taXCo-00063X-J5 for 75688@debbugs.gnu.org; Wed, 22 Jan 2025 04:39:27 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id B460A38A2BE6; Wed, 22 Jan 2025 09:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737538764; bh=SvdjhohUc3OnfPNz5T3iHjAy0xHpl25P8AqpMmSOguc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=efvPbUao+dSbq0yDlo25mZfrOBYdMB3h9s9CFAABU+0IBAgRRTkVwCqHrdVN4kkFr UCH7qSEgx3mpGS6L5kAmK/VNzniSCT5mqkEq33xVdTr/E8jyFzhGmhqP9UIuMYq4Z6 W/fmQDK9I9/gBaUdI58jQ+2cb57YuKeLBzfEX9U98XyJn8kYXhv38ncIJMCUj9wByQ 0xc80QR940MtLadaxQ1kFo5r2yuQiijftfDGxurE2iwAnKMwsKjWXv1h3y8ylR8/JD /dYM/g5gRfPYGko6+1pg0zIqcFRkfwNPHmbMHB3ymHi599OzEokhkV69RE4o57mtj/ 24ys1Yc4zHZopu+vENkdQE5UtFVxt2e4rqJX+QQpkAJyb0u8Ec99wBmY/8repp4NKs /n3MOz+4W6M9He2QPkO9JLgZVxXcCRHXejOVAoDbOvRxbZMPsNjHW08uvlN5fgItyu 2UpXy2BajkEwPGl5lZeMstZLHzQaCbztRnb82I5qeFoQG/aCYDZFTkAdRwTBC6Bla9 bGEY59p0L0f139AZnVX5d9pUXvYP+5ztR/2/NN6mINNyrY5v1isMTDZJjijXWAihvJ drWeQx5ii0wDhjICeS/gnjaVO37IeRWcdAI3AJNwIbXEM/yMtg6xU5bQV5bhbmaLT7 RU5w18QV9hTzgyxjLTvb+0CE= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NB4TQsb-Dvtu; Wed, 22 Jan 2025 09:39:17 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Wed, 22 Jan 2025 09:39:16 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 3cbcb7dd; Wed, 22 Jan 2025 09:42:44 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87tt9rr776.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 22 Jan 2025 10:03:09 +0900") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> <87o700s3re.fsf@gmail.com> <87o700p6xl.fsf@envs.net> <87tt9rr776.fsf@gmail.com> Date: Wed, 22 Jan 2025 17:42:44 +0800 Message-ID: <87r04vyyjv.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: > I see; I agree that if the environment variables or not set by a search > path and instead picked up by the binary from some file, then it solves > this class of problem, but that seems equivalent to wrapping the > binaries, no? Well, wrapping solve it in one way, since we use 'prefix' in wrapper, eg: konsole has: export QT_PLUGIN_PATH="/gnu/store/.../lib/qt6/plugins${QT_PLUGIN_PATH:+:}$QT_PLUGIN_PATH" which let konsole work in a environment which has an incompatible QT_PLUGIN_PATH, since the incompatible one load last and applications only load a named plugin once. It dosen't work other way, that in konsole when you run an another unwrapped application, can be influenced by QT_PLUGIN_PATH from konsole's wrapper script. > You'd still have some glue code reading .VARIABLE and > then doing a bunch of setenv before launching the actual program, no? > That glue code is currently the shell or Guile script used to wrap the > binaries. The point for those .VARIABLE files is without wrapper scripts there're no setenv call anymore, ensure that getenv only get profiles paths, in another words: reading from file and apply the values replaced setenv then getenv and apply the values. > > Unless we can fully eliminate search paths and propagation, we'll still > have the issue of having environment variables being set, even with the > use of .VARIABLE, as far s I understand. Well, we must have environment variables due to we want to mix profiles. Search paths can be applied without environment variables, by using .VARIABLE files for hardcoded dependencies; and by finding current profile path from executable (lookup argv[0] in PATH), from current profile path we can construct and apply search paths values. Use GUIX_* would solve problems for foreign programs, then reduce wrapper scripts would solve some problems for guix programs. Disallow load plugins from different profiles will solve more remaining problems, but this can be considered later if there are actually reports. >> Then when you try to run a incompatible program (eg: with a newer glibc >> or gtk), those variables leaks from wrapper scripts will make the >> program crash. >> >> By replace those variables via .VARIABLE file, those starts with > > nitpick: Perhaps it could be called .environment or > .environment-variables, similarly named as in our failed Guix builds. Those are not variables in the "environment", but search-path values hardcoded for the specified binary. Maybe I should use one set of files for all binaries in one output like 'etc/ld.so.cache' does tough. Compare with use one ".environment-variables" file, use different files for each variable value simplify the logic and be more efficiency. How about /etc/search-paths.d/VAR1, /etc/search-paths.d/VAR2? Need more logic to get "etc", and add it to %harmless-collisions for union-build though. > As you can see, perhaps I'm still missing pieces of your big picture. a > RFC/GCD documenting the idea, or a demo implementation if that's > easier/faster would help (code is often more succinct than text). Sure, I'll work on implementation this. Thank you! From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 22 05:19:39 2025 Received: (at control) by debbugs.gnu.org; 22 Jan 2025 10:19:39 +0000 Received: from localhost ([127.0.0.1]:60012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taXpi-0007vY-V1 for submit@debbugs.gnu.org; Wed, 22 Jan 2025 05:19:39 -0500 Received: from mail.envs.net ([5.199.136.28]:38310) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taXpf-0007vN-O1 for control@debbugs.gnu.org; Wed, 22 Jan 2025 05:19:36 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 1A50A38A2BE6 for ; Wed, 22 Jan 2025 10:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737541174; bh=HAmpM0Gd3p1hdwRmytnbGa9x3Bl9oNW93WDj2kI2aho=; h=Date:To:From:Subject:From; b=klV8ZEERjznhV6R6OUQXQeAZqQk2BXqwK1Hiajd+9JCxuxa+cFd9YjUT3hWImKC/R 1JOkd91/FtGRidquP7etVkwADEf3pzGs6PL1jFlMCnoM7JwF3iR6oNJ1kQdJySqwyZ +5jBDqIVywzh3wlE0IcMQcrE7wKbb48nUhiqBLbriV6jBM6CQtF4em+b5gsbPTsQ98 yB/fIKzHOtFsuTQKtU9A8gs33ZnY6tDbr7l3XICzFwCfb6Txeo01SXWcFE8cmOp7+1 0bYbIecCibIbvD+tN1X1WZ31WWp/UpxXiBRSxAltEHPzZ8O95BCDmPdg+hQDHAI9W1 LgUbZmojrXDB88R0nZ+nBYaluatlbFYK2+TWVyk/UpeHp6EqJsEvCJg9OxKp750Yml exDarC5HnCE6WTw3H1exxXuYNEjfyrMjVQUA4aos1GZyWlFngRBvrzUp4accpu//Yg 8+sDRJdkT6oOn7BlRulz7w83+lSE59+UtFDU4IYBsAELc3Sydlrl7t0JlPYrbE0V8c Uo9ayl61YJwBBTMQsw4dMecxNufYoPje6hLbr+gdNdM7ng4FTZ3jQxH8U4JzD7IBvT S7VnwUO0k/RNUKZXfjcgH0pZ6I4f/NM4tkbxh0Ugt1PvCboPXZky26EK3WAyeJ8+rx LXm/ybOxPj24Fj/YdoTufJoY= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ha2Vlyi7Nd9P for ; Wed, 22 Jan 2025 10:19:32 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA for ; Wed, 22 Jan 2025 10:19:32 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id bf1c17e2 for ; Wed, 22 Jan 2025 10:23:05 +0000 (UTC) Date: Wed, 22 Jan 2025 18:23:05 +0800 (CST) To: control@debbugs.gnu.org From: =?utf-8?B?5a6L5paH5q2m?= Subject: control message for bug #75688 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <6345ed72449589e2@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) retitle 75688 GUIX_ify harmful environment variables and replace wrapper scripts with search path value files quit From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 1/4] gnu: glib: Support load search paths from etc/search-paths.d files. References: In-Reply-To: Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761355828708 (code B ref 75688); Thu, 23 Jan 2025 06:26:01 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:25:58 +0000 Received: from localhost ([127.0.0.1]:38730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqf7-0007Sx-QA for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:25:58 -0500 Received: from mail.envs.net ([5.199.136.28]:58298) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqf4-0007Sa-5C for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:25:55 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id D3AD038A3E4C; Thu, 23 Jan 2025 06:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613551; bh=QFNSsGI4Gyi8bL0h5r+aVnoD9AEJ9qZBOp2tTDFpHk4=; h=From:To:Cc:Subject:Date:From; b=TKnGVNB3tuVHUhhHR3sXl1oQVW/g1aR8A3krFaqQv5S89Nczhx33YWRujupBghumm oj45xkX2IUKh+AI2YoZpDppHQV+DXDrKHzrCNHD/zN62Q17JitIV6Q+LjyiUF+ohnN 3P22cFlbD5uHcIfjHjYyjIsBnPKAU/4XYXNyOzeqei/JIchpCW+jezFTvaxy4qClVu E3hXvEf1AZBUMoY6R34a4wi7DTT19ZR+BzV/JBOWVxzYJIFLxy+9iNIGg+448fcmHb Lo02AVekcdqzB5zRVyElPR5K1Q2WmsE+X97u6dl4KtFZ/AdiqT32qc2944RKFpA2wr r7sYvRyQy4r3rjtbZab20LNBBTqD7755PJJZEIRno8BdzJhKMD1cPpXht3U2SCVRPV 4unkGJQW1cJGqjabjd/PiWVI7uQ8NQLccsUZDMljxAHiROLBjAYOPcT3JHxzmnWQC9 hlcXiXk+R7SDNrlxMi5cHa0UT6GHZpVvWgPH4eKPoWJnmIDK6lEVnQVxqCQnhO/tr4 w1jTN6B8mtPgmTfdPVrCm/fumKqXrD3JaKu172+O/eJ6rFQdHzafnCDSjEjUhS23aM cdCgOw15OxynEbNgD00/YbzcYUfDrlWSta98Mx4yzN8JBFF8olGVRByYXZrHL9Hd9e ay38bDw2pelbvyDWm66FfLvA= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6QagBnzDIC0r; Thu, 23 Jan 2025 06:25:48 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id e7e2719b; Thu, 23 Jan 2025 06:29:10 +0000 (UTC) From: iyzsong@envs.net Date: Thu, 23 Jan 2025 14:28:55 +0800 Message-ID: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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: -1.0 (-) From: 宋文武 Add a new function "g_build_guix_search_path_dirs" to GLIB, which in addition to environment variable, read search path values from etc/search-paths.d directory of the current executable. This can be used to replace wrapper scripts. Use it for GUIX_GSETTINGS_SCHEMA_DIR, GUIX_GIO_EXTRA_MODULES, GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS. * gnu/packages/patches/glib-guix-search-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/glib.scm (glib)[source]: Add patch. [native-search-paths]: Add GUIX_GSETTINGS_SCHEMA_DIR, Replace GIO_EXTRA_MODULES with GUIX_GIO_EXTRA_MODULES. Change-Id: I1d6d113fc38b20ebd4dce195f6d9c58ce85967e4 --- gnu/local.mk | 1 + gnu/packages/glib.scm | 9 +- .../patches/glib-guix-search-paths.patch | 158 ++++++++++++++++++ 3 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glib-guix-search-paths.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5091f93eb8..6bb3a35770 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1436,6 +1436,7 @@ dist_patch_DATA = \ %D%/packages/patches/git-filter-repo-generate-doc.patch \ %D%/packages/patches/gklib-suitesparse.patch \ %D%/packages/patches/glib-appinfo-watch.patch \ + %D%/packages/patches/glib-guix-search-paths.patch \ %D%/packages/patches/glib-skip-failing-test.patch \ %D%/packages/patches/glibc-2.33-riscv64-miscompilation.patch \ %D%/packages/patches/glibc-2.39-git-updates.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index e04eedb7ba..0704ba2c53 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -258,7 +258,8 @@ (define glib (base32 "0c3vagxl77wma85qinbj974jvw96n5bvch2m7hqcwxq8fa5spsj4")) (patches (search-patches "glib-appinfo-watch.patch" - "glib-skip-failing-test.patch")) + "glib-skip-failing-test.patch" + "glib-guix-search-paths.patch")) (modules '((guix build utils))) (snippet '(begin @@ -516,9 +517,13 @@ (define glib (search-path-specification (variable "XDG_DATA_DIRS") (files '("share"))) + ;; To load gsettings schemas from GTK, etc. + (search-path-specification + (variable "GUIX_GSETTINGS_SCHEMA_DIR") + (files '("share/glib-2.0/schemas"))) ;; To load extra gio modules from glib-networking, etc. (search-path-specification - (variable "GIO_EXTRA_MODULES") + (variable "GUIX_GIO_EXTRA_MODULES") (files '("lib/gio/modules"))))) (search-paths native-search-paths) (synopsis "Low-level core library for GNOME projects") diff --git a/gnu/packages/patches/glib-guix-search-paths.patch b/gnu/packages/patches/glib-guix-search-paths.patch new file mode 100644 index 0000000000..ebd57024dd --- /dev/null +++ b/gnu/packages/patches/glib-guix-search-paths.patch @@ -0,0 +1,158 @@ +diff --git a/gio/giomodule.c b/gio/giomodule.c +index 76c2028..49b02bb 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -1330,6 +1330,13 @@ _g_io_modules_ensure_loaded (void) + g_io_modules_scan_all_in_directory_with_scope (module_dir, scope); + g_free (module_dir); + ++ /* GUIX: Load gio modules from GUIX_GIO_EXTRA_MODULES */ ++ gchar **guix_giomodule_dirs = g_build_guix_search_path_dirs ("GUIX_GIO_EXTRA_MODULES"); ++ for (int i = 0; guix_giomodule_dirs[i] != NULL; i++) { ++ g_io_modules_scan_all_in_directory_with_scope (guix_giomodule_dirs[i], scope); ++ } ++ g_strfreev (guix_giomodule_dirs); ++ + g_io_module_scope_free (scope); + + /* Initialize types from built-in "modules" */ +diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c +index e8ccc8c..b8bae14 100644 +--- a/gio/gsettingsschema.c ++++ b/gio/gsettingsschema.c +@@ -354,6 +354,13 @@ initialise_schema_sources (void) + while (i--) + try_prepend_data_dir (dirs[i]); + ++ /* GUIX: Load schemas from GUIX_GSETTINGS_SCHEMA_DIR. */ ++ char **guix_schema_dirs = g_build_guix_search_path_dirs ("GUIX_GSETTINGS_SCHEMA_DIR"); ++ i = g_strv_length(guix_schema_dirs); ++ while (i--) ++ try_prepend_dir (guix_schema_dirs[i]); ++ g_strfreev (guix_schema_dirs); ++ + try_prepend_data_dir (g_get_user_data_dir ()); + + /* Disallow loading extra schemas if running as setuid, as that could +diff --git a/glib/gutils.c b/glib/gutils.c +index 8628a56..bc21efc 100644 +--- a/glib/gutils.c ++++ b/glib/gutils.c +@@ -2708,6 +2708,16 @@ g_build_system_data_dirs (void) + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif + ++ /* GUIX: Use data files from GUIX_XDG_DATA_DIRS. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) data_dir_vector); ++ g_strfreev (data_dir_vector); ++ data_dir_vector = g_build_guix_search_path_dirs ("GUIX_XDG_DATA_DIRS"); ++ g_strv_builder_addv (builder, (const gchar **) data_dir_vector); ++ g_strfreev (data_dir_vector); ++ data_dir_vector = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return g_steal_pointer (&data_dir_vector); + } + +@@ -2800,6 +2810,16 @@ g_build_system_config_dirs (void) + conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif + ++ /* GUIX: Use config files from GUIX_XDG_CONFIG_DIRS. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) conf_dir_vector); ++ g_strfreev (conf_dir_vector); ++ conf_dir_vector = g_build_guix_search_path_dirs ("GUIX_XDG_CONFIG_DIRS"); ++ g_strv_builder_addv (builder, (const gchar **) conf_dir_vector); ++ g_strfreev (conf_dir_vector); ++ conf_dir_vector = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return g_steal_pointer (&conf_dir_vector); + } + +@@ -2849,6 +2869,69 @@ g_get_system_config_dirs (void) + return system_config_dirs; + } + ++gchar ** ++g_build_guix_search_path_dirs (const gchar *variable) ++{ ++ gchar **dirs = NULL; ++ char *value = NULL; ++ GStrvBuilder *builder = g_strv_builder_new (); ++ ++#if defined(__linux__) || defined(__gnu_hurd__) ++ /* First add paths from the etc/search-paths.d, which can be used to replace wrapper script. */ ++ gchar *exe_path = g_file_read_link ("/proc/self/exe", NULL); ++ gchar *out_path = NULL; ++ gchar *search_paths_d = NULL; ++ ++ /* We install executables under "bin" or "libexec", can also be a subdirectory of "libexec". */ ++ if (exe_path && (g_str_match_string("/bin/", exe_path, FALSE) || ++ g_str_match_string("/libexec/", exe_path, FALSE))) { ++ /* Find output directory, which is the parent directory of "bin" or "libexec". */ ++ out_path = g_path_get_dirname (exe_path); ++ while (g_str_match_string("/bin/", out_path, FALSE) || ++ g_str_match_string("/libexec/", out_path, FALSE)) { ++ gchar *dir_path = out_path; ++ out_path = g_path_get_dirname (dir_path); ++ g_free (dir_path); ++ } ++ ++ /* Now add paths from etc/search-paths.d/VARIABLE file. */ ++ search_paths_d = g_build_filename (out_path, "etc", "search-paths.d", NULL); ++ if (g_file_test (search_paths_d, G_FILE_TEST_EXISTS)) { ++ gchar *var_path = g_build_filename (search_paths_d, variable, NULL); ++ if (g_file_get_contents (var_path, &value, NULL, NULL)) { ++ dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_strv_builder_addv (builder, (const gchar **) dirs); ++ g_strfreev (dirs); ++ g_free (value); ++ } ++ g_free (var_path); ++ } ++ } ++ ++ g_free (exe_path); ++ g_free (out_path); ++ g_free (search_paths_d); ++#endif ++ ++ /* Then add paths from the environment variable. */ ++ gboolean is_setuid = GLIB_PRIVATE_CALL (g_check_setuid) (); ++ if (is_setuid) /* we don't want to access arbitrary files when running as setuid. */ ++ value = NULL; ++ else ++ value = g_strdup (g_getenv (variable)); ++ ++ if (value && value[0]) { ++ dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_strv_builder_addv (builder, (const gchar **) dirs); ++ g_strfreev (dirs); ++ } ++ g_free (value); ++ ++ dirs = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ return dirs; ++} ++ + /** + * g_nullify_pointer: + * @nullify_location: (not nullable): the memory address of the pointer. +diff --git a/glib/gutils.h b/glib/gutils.h +index efc6914..710cf27 100644 +--- a/glib/gutils.h ++++ b/glib/gutils.h +@@ -36,6 +36,9 @@ + + G_BEGIN_DECLS + ++GLIB_AVAILABLE_IN_ALL ++gchar **g_build_guix_search_path_dirs (const gchar *variable); ++ + GLIB_AVAILABLE_IN_ALL + const gchar * g_get_user_name (void); + GLIB_AVAILABLE_IN_ALL base-commit: 7080aaf08102ec4c9c976582d6adfa0c14e6c640 -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 2/4] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761356428759 (code B ref 75688); Thu, 23 Jan 2025 06:27:02 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:26:04 +0000 Received: from localhost ([127.0.0.1]:38739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqfD-0007Tm-SY for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:04 -0500 Received: from mail.envs.net ([5.199.136.28]:52144) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqf5-0007Si-I0 for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:25:57 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id A687E38A3E50; Thu, 23 Jan 2025 06:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613554; bh=iW6DWUNIyYz7AiD8GJkZPx1WZkQvMslIC/UCNYZE1Ng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SdzJcvTNsYcU+vNQWblC8o9II4EAkgdy7hIEtKO62tDn0lsJQY9V8oyH/yEy08jz3 qFak4vzU6Os+gA48kiFqBGYPGpihZz/zBJ0h2Jw3/5ZXfojuQOkeEasszWv2suxjQK 9AmAm5+1+dYEidn8ZQr5ftQJI5yx5UP0T98HiXYRqihkV+SX/HQ3glcmvQxfuAmZZG rxO4ZWvq05aHEvYqpEygN2rSTfA+mXlVPObuoRWOZ2rvcbJkgt3YF8tXPs2bEt2LsX fr1rpnnVOpFLK3mBe2QBcY7ySzdzfhFwVRJVVkULUyDfbbyzLzYfIefSZBbjEj9ikK uenKqkMdZBbx1bbP67RSbhXmLo9CsTYjcNF0CkPRIKFDKUrfZQgkW/VGVex1OHSW2F s/UTSvAW/LUhjhe9LXLPfhLvo+lnCJxE5ESy32h6qL3NKEMH3TbY3AreunH/KCv3Ji m7qZrqTZO7TdR84FQ3zPtmCgzGGVe/IaYw6mEnQ8y9U0gqP8K1ya4ZiWBFIozwgJYm Zy2LXc+JIQ8TWmPbUIzbKhCY60IRFWmCxgXMi4y2cGYVNEDZwUbWDR/DdBKY4YogdM JNrh2xXtXIK1G2HepQyU2GoUo/WU+hEn97iNvd1UhVsxYVr8oq0BDn2BfpOJIC76Yc iv4IlnMcw2lEvgVzUN7X7SkQ= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KolnuEgFa8nR; Thu, 23 Jan 2025 06:25:51 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:51 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 8b562cf9; Thu, 23 Jan 2025 06:29:11 +0000 (UTC) From: iyzsong@envs.net Date: Thu, 23 Jan 2025 14:28:56 +0800 Message-ID: <96be080084ef425fb5d5a8ab920d30667dc68c99.1737613671.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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: -1.0 (-) From: 宋文武 This fixes . * gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch. [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES. Change-Id: I63ce8fa14799e04551522e6d27e89bf47b08043e --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 8 +++++--- ...-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6bb3a35770..4249476dfa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1400,6 +1400,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gdb-hurd64.patch \ + %D%/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch \ %D%/packages/patches/gdm-default-session.patch \ %D%/packages/patches/gdm-elogind-support.patch \ %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 7ed7d7b7df..392734a33c 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -726,7 +726,10 @@ (define-public gdk-pixbuf name "-" version ".tar.xz")) (sha256 (base32 - "0jz4kziz5lirnjjvbspbqzsigk8vnqknng1fga89d81vs5snr6zf")))) + "0jz4kziz5lirnjjvbspbqzsigk8vnqknng1fga89d81vs5snr6zf")) + (patches + (search-patches + "gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch")))) (build-system meson-build-system) (outputs '("out" "debug")) (arguments @@ -777,9 +780,8 @@ (define-public gdk-pixbuf ;; This file is produced by the gdk-pixbuf-loaders-cache-file ;; profile hook. (list (search-path-specification - (variable "GDK_PIXBUF_MODULE_FILE") + (variable "GUIX_GDK_PIXBUF_MODULE_FILES") (files (list %gdk-pixbuf-loaders-cache-file)) - (separator #f) ;single valued (file-type 'regular)))) (synopsis "Image loading library") (description "GdkPixbuf is a library that loads image data in various diff --git a/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch new file mode 100644 index 0000000000..eb22761403 --- /dev/null +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch @@ -0,0 +1,18 @@ +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c +index e1df590..ba24cf6 100644 +--- a/gdk-pixbuf/gdk-pixbuf-io.c ++++ b/gdk-pixbuf/gdk-pixbuf-io.c +@@ -670,6 +670,13 @@ gdk_pixbuf_io_init (void) + gboolean ret; + + gdk_pixbuf_io_init_builtin (); ++ ++ /* Load loaders from GUIX_GDK_PIXBUF_MODULE_FILES. */ ++ gchar **guix_module_files = g_build_guix_search_path_dirs ("GUIX_GDK_PIXBUF_MODULE_FILES"); ++ for (int i = 0; guix_module_files[i] != NULL; i++) ++ gdk_pixbuf_io_init_modules (guix_module_files[i], NULL); ++ g_strfreev (guix_module_files); ++ + #ifdef USE_GMODULE + module_file = gdk_pixbuf_get_module_file (); + #endif -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 3/4] gnu: gtk: Add search-paths.d support for GUIX_GTK{2, 3, 4}_PATH. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761356928780 (code B ref 75688); Thu, 23 Jan 2025 06:27:02 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:26:09 +0000 Received: from localhost ([127.0.0.1]:38741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqfI-0007U6-EK for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:09 -0500 Received: from mail.envs.net ([5.199.136.28]:52152) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqf7-0007Sq-KK for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:02 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id B792338A3E52; Thu, 23 Jan 2025 06:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613556; bh=zWu41/CBIoo2ICxmGaAKoDqJ5EwUYXH6Z0OSbiCeVzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QkRg2WXTCtRQ3jqLorYxZ3Yms/bCeCkLL2bzTVHuzWMg54JSdF+ykkMzB0Zos2xBP FIB4LrKs+S3PGdDovvGErJDkY0UZiOu586zdPtgZ0Kw45SSRz1kEjMkKwx+hz3WxKm JntaYxs0a6xdkQ+gPljmNg71xyEdGs3G6tWIe/LStLXO08cHvqfSbl9D8KNtdOJKu+ apCSWIB5BR1/ZTOY8f4/lsZiKWyIBM+1me235vnYCRaCxB8RwmdAkMwh9WII/Js1Rn cWEo6hMz20cfMDyOEU+zz7aMM/6cenkej5IBnFcFopkJhwrFllKcOHG4z0GGkw8pR6 soA+liZK/PZYxord0zfMYM9o/Ve+KVGnztHgwWpNTB1RcLu6oTi+0MV6GcdXVaGw2T QmY1lLPSzMPkAuVtSPPFCgyUaf019mLTL5+UwVa965U74mMW7fW8/dUq2gEtJcy5e0 C5O6wGh62sVf9++zHNK8UKsF4C/pKp3ssdsE5iY/YQXaG0gLiLWitosToBVZB/nhjV ENNwEjpr5N9eAvptBrscY82O7cfDIOMY5Ftfcz6gioRQARmDrGWc/itbrx0meV8pgS 17wFPb4H5y6EOuN/S11VmlUy0fmzb4LADoUrQiAaPOZTT3JtoQblGdJm8KxNCoE0Xq 6+93skZgMQgUeuofIKIDXXE4= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bMHQe3MqYrj5; Thu, 23 Jan 2025 06:25:53 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:52 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 19ba942d; Thu, 23 Jan 2025 06:29:11 +0000 (UTC) From: iyzsong@envs.net Date: Thu, 23 Jan 2025 14:28:57 +0800 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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: -1.0 (-) From: 宋文武 * gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch, gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch, gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: Rewrite in terms of 'g_build_guix_search_path_dirs'. Change-Id: Ib0748c39e56fd598f30f40b9ac3bb0f012f14c31 --- .../patches/gtk2-respect-GUIX_GTK2_PATH.patch | 64 ++++++------------- .../patches/gtk3-respect-GUIX_GTK3_PATH.patch | 55 ++++++---------- .../patches/gtk4-respect-GUIX_GTK4_PATH.patch | 62 +++++------------- 3 files changed, 54 insertions(+), 127 deletions(-) diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch index 93a8ddc242..fb6c7809f9 100644 --- a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch +++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch @@ -1,46 +1,20 @@ -This patch makes GTK+ look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK2_PATH". This can be used -instead of "GTK_PATH" to make GTK+ find modules that are incompatible with -other major versions of GTK+. +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index 50729b61a5..2d4c2c2a85 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -96,5 +96,15 @@ get_module_path (void) + result = pango_split_file_list (module_path); + g_free (module_path); ---- a/gtk/gtkmodules.c 2014-09-29 22:02:17.000000000 +0200 -+++ b/gtk/gtkmodules.c 2015-12-02 18:41:53.306396938 +0100 -@@ -55,6 +55,7 @@ - get_module_path (void) - { - const gchar *module_path_env; -+ const gchar *module_guix_gtk2_path_env; - const gchar *exe_prefix; - const gchar *home_dir; - gchar *home_gtk_dir = NULL; -@@ -70,6 +71,7 @@ - home_gtk_dir = g_build_filename (home_dir, ".gtk-2.0", NULL); - - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk2_path_env = g_getenv ("GUIX_GTK2_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); - - if (exe_prefix) -@@ -77,9 +79,21 @@ - else - default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL); - -- if (module_path_env && home_gtk_dir) -+ if (module_guix_gtk2_path_env && module_path_env && home_gtk_dir) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, module_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env && home_gtk_dir) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, module_path_env, default_dir, NULL); -+ else if (module_path_env && home_gtk_dir) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, default_dir, NULL); - else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); ++ /* GUIX: Load additional modules from GUIX_GTK2_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK2_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch index 66fd2fd1c4..28e232a812 100644 --- a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch +++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch @@ -1,38 +1,21 @@ -This patch makes GTK+ look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK3_PATH". This can be used -instead of "GTK_PATH" to make GTK+ find modules that are incompatible with -other major versions of GTK+. - ---- a/gtk/gtkmodules.c 2015-09-20 20:09:05.060590217 +0200 -+++ b/gtk/gtkmodules.c 2015-09-20 20:10:33.423124833 +0200 -@@ -52,6 +52,7 @@ - get_module_path (void) - { - const gchar *module_path_env; -+ const gchar *module_guix_gtk3_path_env; - const gchar *exe_prefix; - gchar *module_path; - gchar *default_dir; -@@ -61,6 +62,7 @@ - return result; +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index f93101c272..b57e1da802 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -81,6 +81,16 @@ get_module_path (void) + result = gtk_split_file_list (module_path); + g_free (module_path); - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk3_path_env = g_getenv ("GUIX_GTK3_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); ++ /* GUIX: Load additional modules from GUIX_GTK3_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK3_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } - if (exe_prefix) -@@ -68,7 +70,13 @@ - else - default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL); - -- if (module_path_env) -+ if (module_guix_gtk3_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk3_path_env, module_path_env, default_dir, NULL); -+ else if (module_guix_gtk3_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk3_path_env, default_dir, NULL); -+ else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); - else diff --git a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch index 4a60023bf7..56c202ecf4 100644 --- a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch +++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch @@ -1,51 +1,21 @@ -From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001 -From: Raghav Gururajan -Date: Tue, 18 May 2021 19:57:00 -0400 -Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH. - -This patch makes GTK look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK4_PATH". This can be used -instead of "GTK_PATH" to make GTK find modules that are incompatible with -other major versions of GTK. ---- - gtk/gtkmodules.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c -index aace5dcbc9..193b6a02e9 100644 +index 51b0916624..0cd6ee7e30 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c -@@ -105,6 +105,7 @@ static char ** - get_module_path (void) - { - const char *module_path_env; -+ const gchar *module_guix_gtk4_path_env; - const char *exe_prefix; - char *module_path; - char *default_dir; -@@ -114,6 +115,7 @@ get_module_path (void) - return result; +@@ -132,6 +132,16 @@ get_module_path (void) + result = split_file_list (module_path); + g_free (module_path); - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk4_path_env = g_getenv ("GUIX_GTK4_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); ++ /* GUIX: Load additional modules from GUIX_GTK4_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK4_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } - if (exe_prefix) -@@ -121,7 +123,13 @@ get_module_path (void) - else - default_dir = g_build_filename (_gtk_get_libdir (), "gtk-4.0", NULL); - -- if (module_path_env) -+ if (module_guix_gtk4_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk4_path_env, module_path_env, default_dir, NULL); -+ else if (module_guix_gtk4_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk4_path_env, default_dir, NULL); -+ else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); - else --- -2.31.1 - -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v2 4/4] build: glib-or-gtk-build-system: Replace wrapper scripts with 'search-paths.d'. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761357028789 (code B ref 75688); Thu, 23 Jan 2025 06:27:03 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:26:10 +0000 Received: from localhost ([127.0.0.1]:38743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqfJ-0007U9-4m for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:10 -0500 Received: from mail.envs.net ([5.199.136.28]:52166) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqfA-0007T8-Qi for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:26:02 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id E7F5B38A3E53; Thu, 23 Jan 2025 06:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737613559; bh=G7erAM1Py70vcrHfbE6aWiu2zVmRxzrQ+W5yk2hhb3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQULegF7dfeM9S21gazYBo5JPZoO+ODJg2IrdyMTQF9LB0sTScuIo3a168XlDe74V SOpmxlgiQ/79nLndmVd4tpZngRtCypCczPHLr8X5Tn0WxYDB+BSkyrKxpW4NiWAA4T IP51cnM2NtupktYdtMvGg7T5jvBqnJrCIXAC5JmIDSFcMMITkpvIADl4sGHjPjvDbK uTfuVabAN0fgWAW/SRbEoHsAKfYO4O1aB0Rh57XazZYp3O2Dsrm6Ub2qS3ic1ls9BI +l0n7di0DtWCHEVV7aX6ZXEo6w5itKQZ3MVniF9mPp4NwmTbUAnV4tYZYfUDoinhYe ut+b9xYIbCSh72JD2bEvw9McfnSRU++VT1ousFtWSPhmV8Q7LPdnDcsctpZ9pwOabM Mc4J+UUKmHATii0bFA/HY7AhVpQInI9/ZyfsQhVFJ+VOTEbE73TcsfNNRLJTyA+p9a 6wgcgOdjJbDtBGoMbAnRsO2QKZuSmItzK3Frz5KbsqFUy+ZaHPy9qXMLETe8d/l9uy dEWPm3umB70L3XNObPZQxUFdKj3xh7f7hIINEDhS/pXpl3Y9CGldqJpVUa5PjR9ixB O0Fm/siqf4WnIM136WMsq4uRJu5DMH0OZtI4CDEsIIhm61sH2wa4wa4X9qlzugTv79 g4tVKjtbr3RPLGDI/iqwHTsA= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UESCZvR8rFHt; Thu, 23 Jan 2025 06:25:56 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:25:55 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 55cbef31; Thu, 23 Jan 2025 06:29:11 +0000 (UTC) From: iyzsong@envs.net Date: Thu, 23 Jan 2025 14:28:58 +0800 Message-ID: <96b1c701576df682137650386544821196e2152d.1737613671.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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: -1.0 (-) From: 宋文武 * guix/build/glib-or-gtk-build-system.scm (write-search-path-file): New procedure. (gtk-module-directories): Add version to arguments. (gsettings-schema-directories): New procedure. (data-directories): Don't check for "/glib-2.0/schemas". (conf-directories): New procedure. (wrap-all-programs): Rewrite in terms of 'write-search-path-file'. Change-Id: I1c9e8d491b96e298d1568a5e29b04c762c26e4d1 --- guix/build/glib-or-gtk-build-system.scm | 165 ++++++++++++++---------- 1 file changed, 94 insertions(+), 71 deletions(-) diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm index 67a52ddad3..a04c1b0616 100644 --- a/guix/build/glib-or-gtk-build-system.scm +++ b/guix/build/glib-or-gtk-build-system.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2025 宋文武 ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,13 @@ (define-module (guix build glib-or-gtk-build-system) ;; ;; Code: +(define* (write-search-path-file output variable value) + "Write VALUE to @file{etc/search-paths.d/VARIABLE} under OUTPUT." + (let ((search-paths.d (string-append output "/etc/search-paths.d"))) + (mkdir-p search-paths.d) + (with-output-to-file (string-append search-paths.d "/" variable) + (lambda () (display variable))))) + (define (subdirectory-exists? parent sub-directory) (directory-exists? (string-append parent sub-directory))) @@ -47,32 +55,12 @@ (define (directory-included? directory directories-list) (fold (lambda (s p) (or (string-ci=? s directory) p)) #f directories-list)) -;; We do not include $HOME/.guix-profile/gtk-v.0 (v=2 or 3) because we do not -;; want to mix gtk+-2 and gtk+-3 modules. See -;; https://developer.gnome.org/gtk3/stable/gtk-running.html -(define (gtk-module-directories inputs) - "Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a list +;; We load GTK modules via the GUIX_GTK2_PATH, GUIX_GTK3_PATH and GUIX_GTK4_PATH +;; search paths. +(define (gtk-module-directories inputs version) + "Check for the existence of \"libdir/gtk-VERSION\" in INPUTS. Return a list with all found directories." - (let* ((version - (cond - ((string-match "gtk-4" - (or (assoc-ref inputs "gtk") - (assoc-ref inputs "source") - "")) - "4.0") - ((string-match "gtk\\+-3" - (or (assoc-ref inputs "gtk+") - (assoc-ref inputs "source") - "")) - "3.0") - ((string-match "gtk\\+-2" - (or (assoc-ref inputs "gtk+") - (assoc-ref inputs "source") - "")) - "2.0") - (else - "4.0"))) ; We default to version 4.0. - (gtk-module + (let ((gtk-module (lambda (input prev) (let* ((in (match input ((_ . dir) dir) @@ -85,27 +73,22 @@ (define (gtk-module-directories inputs) prev))))) (fold gtk-module '() inputs))) -;; See +;; XDG data files include themes, sounds, icons, etc. See: ;; http://www.freedesktop.org/wiki/DesktopThemeSpec ;; http://freedesktop.org/wiki/Specifications/sound-theme-spec ;; http://freedesktop.org/wiki/Specifications/icon-theme-spec ;; -;; Currently desktop themes are not well supported and do not honor -;; XDG_DATA_DIRS. One example is evince which only looks for desktop themes -;; in $HOME/.themes (for backward compatibility) and in XDG_DATA_HOME (which -;; defaults to $HOME/.local/share). One way to handle these applications -;; appears to be by making $HOME/.themes a symlink to -;; $HOME/.guix-profile/share/themes. +;; We load them via XDG_DATA_DIRS (from profile, has higher priority) and +;; GUIX_XDG_DATA_DIRS (application specified) search paths. (define (data-directories inputs) - "Check for the existence of \"$datadir/glib-2.0/schemas\" or XDG themes data -in INPUTS. Return a list with all found directories." + "Check for the existence of XDG data files in INPUTS. Return a list with all found +directories." (define (data-directory input previous) (let* ((in (match input ((_ . dir) dir) (_ ""))) (datadir (string-append in "/share"))) - (if (and (or (subdirectory-exists? datadir "/glib-2.0/schemas") - (subdirectory-exists? datadir "/sounds") + (if (and (or (subdirectory-exists? datadir "/sounds") (subdirectory-exists? datadir "/themes") (subdirectory-exists? datadir "/cursors") (subdirectory-exists? datadir "/wallpapers") @@ -117,15 +100,45 @@ (define (data-directories inputs) (fold data-directory '() inputs)) +;;; XDG configuration files are expected to be installed in etc/xdg directory. +;;; We load them via XDG_CONFIG_DIRS (from profile, has higher priority) and +;;; GUIX_XDG_CONFIG_DIRS (application specified) search paths. +(define (conf-directories inputs) + "Check for the existence of XDG configuration files in INPUTS. Return a list with +all found directories." + (define (conf-directory input previous) + (let* ((in (match input + ((_ . dir) dir) + (_ ""))) + (conf-dir (string-append in "etc/xdg"))) + (if (and (directory-exists? conf-dir) + (not (directory-included? conf-dir previous))) + (cons conf-dir previous) + previous))) + + (fold conf-directory '() inputs)) + +;;; GIO GSettings schemas are expected to be installed in $datadir/glib-2.0/schemas +;;; directory. We load them via the GUIX_GSETTINGS_SCHEMA_DIR search path. +(define (gsettings-schema-directories inputs) + "Check for the existence of \"$datadir/glib-2.0/schemas\" in INPUTS. +Return a list with all found directories." + (define (gsettings-schema-directory input previous) + (let* ((in (match input + ((_ . dir) dir) + (_ ""))) + (schema-dir (string-append in "/share/glib-2.0/schemas"))) + (if (and (directory-exists? schema-dir) + (not (directory-included? schema-dir previous))) + (cons schema-dir previous) + previous))) + + (fold gsettings-schema-directory '() inputs)) + ;; All GIO modules are expected to be installed in GLib's $libdir/gio/modules ;; directory. That directory has to include a file called giomodule.cache -;; listing all available modules. GIO can be made aware of modules in other -;; directories with the help of the environment variable GIO_EXTRA_MODULES. -;; The official GIO documentation states that this environment variable should -;; only be used for testing and not in a production environment. However, it -;; appears that there is no other way of specifying multiple modules -;; directories (NIXOS also does use this variable). See -;; https://developer.gnome.org/gio/stable/running-gio-apps.html +;; listing all available modules. We load them via the GUIX_GIO_EXTRA_MODULES +;; search path. (define (gio-module-directories inputs) "Check for the existence of \"$libdir/gio/modules\" in the INPUTS and returns a list with all found directories." @@ -141,50 +154,60 @@ (define (gio-module-directories inputs) (fold gio-module-directory '() inputs)) + (define* (wrap-all-programs #:key inputs outputs (glib-or-gtk-wrap-excluded-outputs '()) #:allow-other-keys) "Implement phase \"glib-or-gtk-wrap\": look for GSettings schemas and -gtk+-v.0 libraries and create wrappers with suitably set environment variables +GTK libraries and create etc/search-paths.d with suitably set of files if found. Wrapping is not applied to outputs whose name is listed in GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not to contain any GLib or GTK+ binaries, and where wrapping would gratuitously -add a dependency of that output on GLib and GTK+." - ;; Do not require bash to be present in the package inputs - ;; even when there is nothing to wrap. - ;; Also, calculate (sh) only once to prevent some I/O. - (define %sh (delay (search-input-file inputs "bin/bash"))) - (define (sh) (force %sh)) +add a dependency of that output on GLib and GTK." (define handle-output (match-lambda ((output . directory) (unless (member output glib-or-gtk-wrap-excluded-outputs) - (let* ((bindir (string-append directory "/bin")) - (libexecdir (string-append directory "/libexec")) - (bin-list (filter (negate wrapped-program?) - (append (find-files bindir ".*") - (find-files libexecdir ".*")))) - (datadirs (data-directories + (let* ((datadirs (data-directories (alist-cons output directory inputs))) - (gtk-mod-dirs (gtk-module-directories + (confdirs (conf-directories (alist-cons output directory inputs))) - (gio-mod-dirs (gio-module-directories + (schemadirs (gsettings-schema-directories (alist-cons output directory inputs))) - (env-vars `(,@(if (not (null? datadirs)) - (list `("XDG_DATA_DIRS" ":" prefix ,datadirs)) - '()) - ,@(if (not (null? gtk-mod-dirs)) - (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs)) - '()) - ,@(if (not (null? gio-mod-dirs)) - (list `("GIO_EXTRA_MODULES" ":" - prefix ,gio-mod-dirs)) - '())))) - (for-each (lambda (program) - (apply wrap-program program #:sh (sh) env-vars)) - bin-list)))))) + (gtk2-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "2.0")) + (gtk3-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "3.0")) + (gtk4-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "4.0")) + (gio-mod-dirs (gio-module-directories + (alist-cons output directory inputs)))) + (when (not (null? datadirs)) + (write-search-path-file output "GUIX_XDG_DATA_DIRS" + (string-join datadirs ":"))) + (when (not (null? confdirs)) + (write-search-path-file output "GUIX_XDG_CONFIG_DIRS" + (string-join confdirs ":"))) + (when (not (null? schemadirs)) + (write-search-path-file output "GUIX_GSETTINGS_SCHEMA_DIR" + (string-join schemadirs ":"))) + (when (not (null? gtk2-mod-dirs)) + (write-search-path-file output "GUIX_GTK2_PATH" + (string-join gtk2-mod-dirs ":"))) + (when (not (null? gtk3-mod-dirs)) + (write-search-path-file output "GUIX_GTK3_PATH" + (string-join gtk3-mod-dirs ":"))) + (when (not (null? gtk4-mod-dirs)) + (write-search-path-file output "GUIX_GTK4_PATH" + (string-join gtk4-mod-dirs ":"))) + (when (not (null? gio-mod-dirs)) + (write-search-path-file output "GUIX_GIO_EXTRA_MODULES" + (string-join gio-mod-dirs ":")))))))) (for-each handle-output outputs)) -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 06:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173761440031496 (code B ref 75688); Thu, 23 Jan 2025 06:40:02 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 06:40:00 +0000 Received: from localhost ([127.0.0.1]:38777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1taqsi-0008Bv-Fx for submit@debbugs.gnu.org; Thu, 23 Jan 2025 01:40:00 -0500 Received: from mail.envs.net ([5.199.136.28]:50332) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1taqsf-0008Bm-Tr for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 01:39:58 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 5B47638A2C5A; Thu, 23 Jan 2025 06:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737614396; bh=baq5j5LMUOfGwNlV+oEyT6ZbB3GpMSHvmlUZcGucNDg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=f1YFthJvyI/CNZ7dWQWUdkQZTIMD7dbOYRa7ZgG8BftrKit6goHhJ8NcHvU1YrYUn s3JZ0xEXjEf1M+UsVgFNaOLuwv/EctK53RrzA1ZYkWsvn087SGlBPNlPbILwqxK7nG vvV7bKbHIVabBxKCkNmYJz3liJgcIaps6/TXqoYNd62nhiY0W1L/Mqb/3WEExI6CQ8 ooGsmP/Cl3xBOfcuJVnisRtlhFM0VEUxuRTldfM+vAaS51LYTbK3wQ8n/bIvTJUmpy xrxq1YvSe2heKZVWGyhhnmFAKaGc4NfYOROpm7ufJDXkPrMbtFNXJqZ7XEpG9nUZL3 gaXKTOmG0E7IWhS4jauuKWMNoW7OoX8A1dUZqDJfgtakBKjU4uaNexpgNRTCHNHiGH 3DBvBChlafuivYnEDlxwBudyQM8XIv56KijCtAP6LZSUendMtPxfyzuhrTlvhIqwZy YjXsK4xHfW+CFR0Vr2Y5ae7dpczjXsZn9GRQw3WPdB00hiNcPL4rNpqSDCMXiObZn/ 3086+QNx3FYSkc/o04oPWQ/UzCjBMWHR48wPt7gP7qJPB0TLD3FfiV1pgSaxm8EB40 XwRpxJEK/M9IaU5C0+q5gEjQ0imkcuMRd3LKqeYgZKlMZrnpiCvmlkWzPA//EvXZo/ sXI7lKbhYNAivQ9rDin8fLYE= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DlhqRMHd6E5E; Thu, 23 Jan 2025 06:39:49 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 23 Jan 2025 06:39:49 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 7e9740c3; Thu, 23 Jan 2025 06:43:22 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87sepcs3z9.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 21 Jan 2025 22:15:06 +0900") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> Date: Thu, 23 Jan 2025 14:43:22 +0800 Message-ID: <87frla81yt.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: > It's too early for me to say if it could really work, but I'll repeat > that a priori I'm not too fond of GUIX_LIBRARY_PATH (just the name would > clash with a GCC env var too) and custom logic that'd need to be > maintained in the software (we'd need to patch the software to have > GUIX_* variables anyway but the resulting patch would be trivial); I > think I'd rather have multiple, explicit environment variables computed > by search paths. v2 patches sent to use multiple variables, replace the use of wrapper scripts in glib-or-gtk-build-system with 'search-paths.d' files. Patches for glib, gdk-pixbuf and gtk(s) while not trivial, seems reasonable to me.. > Just to make sure, GUIX_* variables would be honored *on top* of their > non GUIX_ prefixed (stock) variants, right? E.g. we wouldn't want GCC > to stop honoring LIBRARY_PATH even if we add GUIX_LIBRARY_PATH, as that > would confuse users. Yes, and non prefixed ones have higher priority than GUIX_ ones, to allow overrides. The patches require mass rebuilds due to glib-or-gtk-build-system -> meson/cmake/rust, etc. I haven't test them, but show be fine for review now, if it seems fine, I could work on qt. Also nix have the same issue, http://github.com/nixos/nixpkgs/issues/60260 Maybe we could share the maintaince of patches with them somehow. Thanks. From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173765573417137 (code B ref 75688); Thu, 23 Jan 2025 18:09:02 +0000 Received: (at 75688) by debbugs.gnu.org; 23 Jan 2025 18:08:54 +0000 Received: from localhost ([127.0.0.1]:42281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tb1dO-0004SL-4T for submit@debbugs.gnu.org; Thu, 23 Jan 2025 13:08:54 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:50182) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tb1dM-0004S7-Gb for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 13:08:53 -0500 Received: by mail-wm1-x343.google.com with SMTP id 5b1f17b1804b1-43690d4605dso8698585e9.0 for <75688@debbugs.gnu.org>; Thu, 23 Jan 2025 10:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737655726; x=1738260526; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=DrXN46W4TjLkexRl0Pd7lI+KF8JX4ZAnmhBLvt64QbE=; b=jLGyl2T7CVfxUholr9MrmzaI2WpFHjPvXpuf/s3iWmsG2CP0FiUFrfKKbM7hYGvx5p 4Y4qc6Rc1ska4Grtcb4QjcwoOxL/zNNbF5u5fMKrHVB2AOhX9wIdNrWt3//rcXJbf/+8 viNdQvcW55hmy6+47Ew6Ox+jrMJ5aXy32iQwItXsUcjLGqnd3DznikU8MsnDrl7eqffW VA7R9J8l/Pxovg8LUFHr7SCmDY2DWprl6LVtprkjUHQf8GI7MQESdN7zZxylvVHoyvvi hfvrLJP31bofS1aOTY+b9UdY7x6HxEN/GDWBxL39zg+NTzbePZcn/rImCpQVQ2LL7ZBx CDYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737655726; x=1738260526; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DrXN46W4TjLkexRl0Pd7lI+KF8JX4ZAnmhBLvt64QbE=; b=RpsaI10B3xjvObxWtMb61kxIlyWWbIBvbErt/hMXDRupSBy8WOZ0NKb96dKMMfLq28 RzxMB/Ax7NG/x+B6GIPnFwyk0fVGnvHK7vco8xURW50fq3AiGuBOCNzTxkIp4Jo5aFLK Oi6iwL9dh3JebhluL+qfB0Q5EpqIiZ8wlQkS61bpz1kxj5V6SBrIwwgWCQEi0e+7FrW/ 9HA/Daw6LKiS5wI1ykiQ57UgKds6sz23MkJYf+Y4LUdE/U2BoGt7yoagQMyBX6XAm+mC PusQjGYaRzxTBxXRzOJcPUfmFilunqvovJDdUrqa0kRK7QTVzWth9VUrK7a6um7/jIIK RvCg== X-Gm-Message-State: AOJu0Yz9zxb83a8eI8ermvzbhzIxsEMsUxZbBFQt65VEvE+S57R3Xi7L LyEt6Ott52i+tCMhb4IvsTSr7QmH3WTHP0QmUmHIoeb4OUpzHwosTk3kHZg7 X-Gm-Gg: ASbGncvdrSgV7Nf9/oQWFYW6n5lMkEiU7df2yqFOMJcXzLOWfoirwjWpjrUWylXP0Hc fmqHmO+0rSB9nD8dR6YMJ2fiJX8alKvZD+HleSJv+nsEGST6PZN0BrMe3damStH2JFr9vEJtFiP N2ktjRLcpvuiZoVdd3Gj/mpp+CbLuUEFgEUDN4JpyWA8XHz1SknJhZWGx8nhM4QS1bb2qNmqgOX Rw8JkHaYqVPJDmi3MrwpQk8dRaA9tap9Oi7/aVIToR1E0lo9f0Menx5jxCaq7vwqfcGUGIf6LId gcrOxmxvFKh9TFmmS5kIY4D/R2gdyHzFN+Bk6JAISLmlTZkJZqSuutpBQFdbg2LjYo0= X-Google-Smtp-Source: AGHT+IFsGC4VjVrOe89Hz7+Wfs3aB4wpME/ul8+CeKXndeSYE7xn3uUo0nls29xrObTnr3DTNNUVkg== X-Received: by 2002:a5d:47c4:0:b0:38c:1281:260d with SMTP id ffacd0b85a97d-38c12813249mr15148665f8f.31.1737655726058; Thu, 23 Jan 2025 10:08:46 -0800 (PST) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1bb040sm332803f8f.67.2025.01.23.10.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 10:08:45 -0800 (PST) Message-ID: <941dd634e317a301457a6803cc5389cebf869802.camel@gmail.com> From: Liliana Marie Prikler Date: Thu, 23 Jan 2025 19:08:54 +0100 In-Reply-To: <87r04vyyjv.fsf@envs.net> References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> <87o700s3re.fsf@gmail.com> <87o700p6xl.fsf@envs.net> <87tt9rr776.fsf@gmail.com> <87r04vyyjv.fsf@envs.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) 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: -1.0 (-) Am Mittwoch, dem 22.01.2025 um 17:42 +0800 schrieb =E5=AE=8B=E6=96=87=E6=AD= =A6: > > You'd still have some glue code reading .VARIABLE and > > then doing a bunch of setenv before launching the actual program, > > no? That glue code is currently the shell or Guile script used to > > wrap the binaries. >=20 > The point for those .VARIABLE files is without wrapper scripts > there're no setenv call anymore, ensure that getenv only get profiles > paths, in another words: reading from file and apply the values > replaced setenv then getenv and apply the values. I think this is too big a change to be sneakily added onto a replacement for an upstream environment variable with a GUIX_-prefixed one. I think this should be discussed more broadly, using a Guix Consensus Document for example. As for adding GUIX_GDK_PIXBUF_MODULE_FILES, I think this could safely be done on gnome-team. What do y'all think? From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jan 2025 02:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Maxim Cournoyer Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173768687613180 (code B ref 75688); Fri, 24 Jan 2025 02:48:02 +0000 Received: (at 75688) by debbugs.gnu.org; 24 Jan 2025 02:47:56 +0000 Received: from localhost ([127.0.0.1]:43027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tb9jg-0003QW-49 for submit@debbugs.gnu.org; Thu, 23 Jan 2025 21:47:56 -0500 Received: from mail.envs.net ([5.199.136.28]:49942) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tb9jb-0003QL-PU for 75688@debbugs.gnu.org; Thu, 23 Jan 2025 21:47:53 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 9EBA838A2BDE; Fri, 24 Jan 2025 02:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737686869; bh=sCWSCBm19BEB+miNorrkSsMmi3RDhfpE6LdhU9xS2rI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aNK+BzcL4jXXgMnW+Xp62POF9tZ3T6sbSwMrtIGhT/Ncg6/Nyck8pe/rM3Lh1VZj5 mGx+KKg2PJ3TYY/g+ST8JQVHv0c3sglr/jAMeRNEfLqDMKBo3nJQyUYH+jvqTHXsQo impk8IH8fF5O0F4Ykfii8yBGsAiNiQcscR8w6VTNlmzh8hNYCcaluyJCb/Hqma0PCg wFdA2/kRIGv4i2RkP1GlEvzQvGEJ0ZQtcSNFuB8wHnhJUhX8Wx8pkcqM/tMWq2yI/K mrQ2lObMtqpGelRUd0aX59kTL8VQ1aCuP48CtMkSRrbZuTDUjyhDxgb4P0mZZXxT4K Yz6dSffeU7SBtiCL9pG/6Y0PCbie+PjUeBkYgLPme/u8BLQsVE3BujEd48S2O9C2xu aHoOy/2rQb/bhsd1PYkoZPexlyInbDV6J1VWIM+h0pzNYnJq/PvIhusfkYdLfC7LpJ lsC3ElsqITaXbRvheWoBiNQvcQb5u8VTT79+aOwYvkQyXLuWjgLcfs+d/DIIiMogj/ d8Lsm3wUlBgYud7FpwO7slOWI+bms/p9X/R265/iDGbtMED74VBnIH58MTpvYkr/cs SY7LSDMPswVdqIzsJ6gO+9/H2TrKgnE0bgiCQ38pA9YwVkiaWJh1l8n99nwX4IIVPE +xV+byjQrW/DCKGm0/wrybEc= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id T9B_s0BC1iuJ; Fri, 24 Jan 2025 02:47:42 +0000 (UTC) Received: from localhost (unknown [112.44.100.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Fri, 24 Jan 2025 02:47:42 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f119b864; Fri, 24 Jan 2025 02:51:12 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <941dd634e317a301457a6803cc5389cebf869802.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 23 Jan 2025 19:08:54 +0100") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> <87o700s3re.fsf@gmail.com> <87o700p6xl.fsf@envs.net> <87tt9rr776.fsf@gmail.com> <87r04vyyjv.fsf@envs.net> <941dd634e317a301457a6803cc5389cebf869802.camel@gmail.com> Date: Fri, 24 Jan 2025 10:51:12 +0800 Message-ID: <87r04s6i1r.fsf@envs.net> 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: 0.0 (/) 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: -1.0 (-) Liliana Marie Prikler writes: > Am Mittwoch, dem 22.01.2025 um 17:42 +0800 schrieb =E5=AE=8B=E6=96=87=E6= =AD=A6: >> > You'd still have some glue code reading .VARIABLE and >> > then doing a bunch of setenv before launching the actual program, >> > no? That glue code is currently the shell or Guile script used to >> > wrap the binaries. >>=20 >> The point for those .VARIABLE files is without wrapper scripts >> there're no setenv call anymore, ensure that getenv only get profiles >> paths, in another words: reading from file and apply the values >> replaced setenv then getenv and apply the values. > I think this is too big a change to be sneakily added onto a > replacement for an upstream environment variable with a GUIX_-prefixed > one. I think this should be discussed more broadly, using a Guix > Consensus Document for example. Okay, I'll try a GCD later. > As for adding GUIX_GDK_PIXBUF_MODULE_FILES, I think this could safely > be done on gnome-team. > > What do y'all think? Sure, I'll send a patch for that later. Thanks. From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 01:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173794129523991 (code B ref 75688); Mon, 27 Jan 2025 01:29:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 01:28:15 +0000 Received: from localhost ([127.0.0.1]:58484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcDvC-0006Et-L4 for submit@debbugs.gnu.org; Sun, 26 Jan 2025 20:28:14 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:44263) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcDvA-0006Ed-Ue for 75688@debbugs.gnu.org; Sun, 26 Jan 2025 20:28:13 -0500 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2f44353649aso5132296a91.0 for <75688@debbugs.gnu.org>; Sun, 26 Jan 2025 17:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737941287; x=1738546087; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DAI5OgXNpdFzIkgHiyfT2SuSE4B8dFdEjTo8I4KAY5E=; b=JKzMzp7crviWKCXeCbTpNyODxkqnCHSgfvKLCulr7ucGsUFKxdyx2s/GAbWGvZRWR4 zN7xgWDhX4XqWP5F1K9XNbEjhvZVqQUE5AZshEMr7/BMiwyfGU6eSswCBIwPaNus3kRf 7Pr54FPOrddMtLQO7JEuxYGgabwBsH0BclHJ2RtgFzJ1jeXseJGgDuuK4gSvtajfNBIx bFBHdvkNjnXhyKUhLiT2rTUQcllTJ0ie93MbsFnMOdkbMyJI6fKgSVvEJ43YXT3vaSJ0 2lx1m6a7lXpBwj4QConCTImdjHspdDN/XWMEzHNidEpfMAc8ZuCbTs9vNbAR9v5hdNyo YLcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737941287; x=1738546087; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DAI5OgXNpdFzIkgHiyfT2SuSE4B8dFdEjTo8I4KAY5E=; b=SsZxrMHLA8YvEf49afDeGOF+89sdgjmyHanfbOQLE8msiyefXevAer5AbxQR1ITPOZ RnHZUvRe80ChdSSj3MHGDC9HMeql9UZyOVuviy4/+EhyPBjI577xK0rvbq750K6vqA96 rhxy+AyQlxEB7mYTbnHXa6uti/8NA1u5Oc7h9j2qijLQFB2rDMDsoyhD7fTzsw4PExkG +/IsUWqZ/mf0t6Op3JgiiqrY0C/4KcNmMdSd3UDMC61y8YttfFevgRW/Olqvjy5Elul0 7D5XYu4vtvRBh1D2oHCjf3kqvIuZFcPi4jFivx0qey1M6+1300shfxxAGPPQMjXos+4K QCYA== X-Forwarded-Encrypted: i=1; AJvYcCXxvUSp+0M+LeBNilYPKXO5s+/L9i9P2e1loaAuG4087yVhJ+vpYQpFyGU0dFWF7LE1BDNIOA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwQ+mRO8s1W9RFIErBrGFnvbXByFy8LQvYnBnlVbYDWbHfJOpSg PqrSgiyk9z9g8ZG7E7rn4ASBIL02+sGM/kR9ybgAJDk+rXIHjFQm X-Gm-Gg: ASbGncvLmOuVUNY9SpD4pj+atqftbk4Z+WFBR8B/EmRrA3RA8uxmI1dcfAw95+elcxz mCUE69FVRbckHY5iQrmEFX3USFMa/58myB+R7J96g6G12P857rQDe2SZuf9UnVRYt2Fu/OjArcF ZPSgJeqDfpWyATZuZBfi870IWmO2wkkDzmoxLXTLBA4BvWKcwMWNqL9IFk6RPPHBHaT7SEdLb+u M72CqZWxjHWJOpmds+xL3OCyWPuDwBFasAOZKhPc9NOni4i/EVTn6CARasFLP6zCm2W8zrHUe94 vg== X-Google-Smtp-Source: AGHT+IEaP42sK+ylVP8hPe/CgecYNrSm9tBsgo/UWVo10oUyoBBu/5BUdQKw2i2tv66fbUoq1n7Sfg== X-Received: by 2002:a17:90b:534c:b0:2f6:dcc9:38e0 with SMTP id 98e67ed59e1d1-2f782b01f69mr67553376a91.0.1737941286704; Sun, 26 Jan 2025 17:28:06 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7ffa6a725sm6508349a91.21.2025.01.26.17.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 17:28:06 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <941dd634e317a301457a6803cc5389cebf869802.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 23 Jan 2025 19:08:54 +0100") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87wmeophsk.fsf@envs.net> <87o700s3re.fsf@gmail.com> <87o700p6xl.fsf@envs.net> <87tt9rr776.fsf@gmail.com> <87r04vyyjv.fsf@envs.net> <941dd634e317a301457a6803cc5389cebf869802.camel@gmail.com> Date: Mon, 27 Jan 2025 10:27:54 +0900 Message-ID: <87ed0p59lx.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, Liliana Marie Prikler writes: > Am Mittwoch, dem 22.01.2025 um 17:42 +0800 schrieb =E5=AE=8B=E6=96=87=E6= =AD=A6: >> > You'd still have some glue code reading .VARIABLE and >> > then doing a bunch of setenv before launching the actual program, >> > no? That glue code is currently the shell or Guile script used to >> > wrap the binaries. >>=20 >> The point for those .VARIABLE files is without wrapper scripts >> there're no setenv call anymore, ensure that getenv only get profiles >> paths, in another words: reading from file and apply the values >> replaced setenv then getenv and apply the values. > I think this is too big a change to be sneakily added onto a > replacement for an upstream environment variable with a GUIX_-prefixed > one. I think this should be discussed more broadly, using a Guix > Consensus Document for example. I was thinking about the GCD too, it's a bit more work, but this solution appears novel and impacting enough to want to ensure all Guix participants are aware of it and discuss any shortcoming it might have in its current form. > As for adding GUIX_GDK_PIXBUF_MODULE_FILES, I think this could safely > be done on gnome-team. > > What do y'all think? I've posted some comments on the issue for the later. --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 03:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17379467658313 (code B ref 75688); Mon, 27 Jan 2025 03:00:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 02:59:25 +0000 Received: from localhost ([127.0.0.1]:58584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcFLR-0002A0-2X for submit@debbugs.gnu.org; Sun, 26 Jan 2025 21:59:25 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:45232) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcFLP-00029i-45 for 75688@debbugs.gnu.org; Sun, 26 Jan 2025 21:59:23 -0500 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2efd81c7ca4so5149127a91.2 for <75688@debbugs.gnu.org>; Sun, 26 Jan 2025 18:59:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737946757; x=1738551557; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QkH7iDuTTIXksPZJPtrpUHbXTXwCb9opq8LdeirMDUI=; b=V331iRm0xxhubtQ0wDaMUzJsdlAFW3SnZ17F4pXQuG+O21T9uvPRiTx6I9fE31kdgE ghDSqsoiAY8oWtN5dF82DPxLDUs1gSkPMZZKMWTAaBgxkkmkogxIUmB9QLmcnGcXp8g+ S2aX2Okqgu4+uD49tAzBE86wRrBtzd4BOu3/0N4qIfNza6kogyZA4MkDl0HDEXYsZNGv dwnG9oaMmtQYOgYZTO/pbMqyptSO7Yb3S5bGOvb5fyRXRa8rBeTrgfFNjBmqmWWEphNA h090aOATd5ljcJf+LPDp7EXV5vpPQIXWmwQ94fCo/6G38Ucqd5e4b+z9IQYa21HwNf+n j2mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737946757; x=1738551557; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QkH7iDuTTIXksPZJPtrpUHbXTXwCb9opq8LdeirMDUI=; b=UbNKtEvq9dEtN8dONpyFI2EsWVcIIUqnIsZmgYJW9jCN2UHqToGzEuI7K8f9DGeBn1 L37A2/+8fwta4+JyxcPP9FUtMG1cQ0qjIFMECwLJwiGS08OLG7//GySppNTbAGF5Bfru RNF4vNwfGoC4IqLc+epwFF+lNU02HSWG8sLpWcoblavMEgWQ3T9NrXCpZOGwsB/FDtlg oaRrml3VxmeaBV5diUPJV62Ws3X4zS3Jl1kXZCuZ1SgwVNDnCCqsjoNaGvrv/Ak5wns2 Duucd907lOj2f+LJiUn8KPEfLyvBUSM6a8r1reiQn4cmKj9XhfcTDpxDvu2Z5WnaJJM4 6qGw== X-Gm-Message-State: AOJu0YyBgER7+UKlmOnkXQY7fVpBeeoft4Gc4AXcbfQe2qH4fYMIhoeB EXuICnChBWaSkF/nK/MdW43Y+VmAFAQhypUQwhJstQrnpbn/BsnV X-Gm-Gg: ASbGnctFknPs5x6JVEZDaxvLXATwT5/Sj8Q9W6TY4gTtBDNBsOxzUzXr5zBDEbHuGYE SP71D7HCgKTZv7wgMR6UJB2DYvnVm0Q/j4kEme8St9ruRiokHQ1JG5ipL6T8LAE7CRqvshyLook Z9RpumHStdlOV5Xd47nGFnYnzijkHPGoXo7TqP35p53etVgjY5KOZ9FbOUcmxrcGzqlIsDlK/8V yxnuouYmv3NXKNKljo2vtS/KlXKJmcn9QKckDtYP7h1EGxE6N2HidpqlxM4YQslTngFcfMDvvyb Hw== X-Google-Smtp-Source: AGHT+IFxz/xSHDhLozo0VHSJ3L7e5v7gFXRPnTDrVIgK+WjcHpWS6JztuMzwmsCLJJUw3McNXNVM4g== X-Received: by 2002:a17:90b:534c:b0:2f6:dcc9:38e0 with SMTP id 98e67ed59e1d1-2f782b01f69mr67902032a91.0.1737946756871; Sun, 26 Jan 2025 18:59:16 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7ffa56fbbsm5945603a91.16.2025.01.26.18.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 18:59:16 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Thu, 23 Jan 2025 14:28:55 +0800") References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> Date: Mon, 27 Jan 2025 11:59:05 +0900 Message-ID: <877c6h55dy.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hello, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > Add a new function "g_build_guix_search_path_dirs" to GLIB, which in addi= tion > to environment variable, read search path values from etc/search-paths.d Some typo/grammar nitpicks: environment variableS, readS search path values from THE etc/search-paths.d ... > directory of the current executable. This can be used to replace wrapper > scripts. > > Use it for GUIX_GSETTINGS_SCHEMA_DIR, GUIX_GIO_EXTRA_MODULES, > GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS. > > * gnu/packages/patches/glib-guix-search-paths.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/glib.scm (glib)[source]: Add patch. > [native-search-paths]: Add GUIX_GSETTINGS_SCHEMA_DIR, Replace nitpick: I'd use a '. ' instead of ', ' above (two sentences). [...] > +++ b/gnu/packages/patches/glib-guix-search-paths.patch > @@ -0,0 +1,158 @@ I think it'd be nice to forward a subset of this patch that implements just the loading environment variable from a file, as that mechanism seems like it could be generally useful (and upstreaming it would lower the maintenance burden for us). > +diff --git a/gio/giomodule.c b/gio/giomodule.c > +index 76c2028..49b02bb 100644 > +--- a/gio/giomodule.c > ++++ b/gio/giomodule.c > +@@ -1330,6 +1330,13 @@ _g_io_modules_ensure_loaded (void) > + g_io_modules_scan_all_in_directory_with_scope (module_dir, scope); > + g_free (module_dir); > + > ++ /* GUIX: Load gio modules from GUIX_GIO_EXTRA_MODULES */ Let's not add credence to the Reddit's GUIX misspelling ;-). I'd drop 'GUIX: ' from the beginning of your comment, as it's already clear from the variable name. Please add a period to make it a complete sentence. [...] > +diff --git a/glib/gutils.c b/glib/gutils.c > +index 8628a56..bc21efc 100644 [...] > ++gchar ** > ++g_build_guix_search_path_dirs (const gchar *variable) > ++{ > ++ gchar **dirs =3D NULL; > ++ char *value =3D NULL; > ++ GStrvBuilder *builder =3D g_strv_builder_new (); > ++ > ++#if defined(__linux__) || defined(__gnu_hurd__) > ++ /* First add paths from the etc/search-paths.d, which can be used to = replace wrapper script. */ I'd ensure all lines wrapped around the 80 characters mark (here and everywhere else). > ++ gchar *exe_path =3D g_file_read_link ("/proc/self/exe", NULL); > ++ gchar *out_path =3D NULL; > ++ gchar *search_paths_d =3D NULL; > ++ > ++ /* We install executables under "bin" or "libexec", can also be a sub= directory of "libexec". */ > ++ if (exe_path && (g_str_match_string("/bin/", exe_path, FALSE) || > ++ g_str_match_string("/libexec/", exe_path, FALSE))) { Perhaps these 'bin' and 'libexec' hard-coded names should come from the build system of gdk-pixbuf, in case a distro uses different names across its package collection (to make it more general). > ++ /* Find output directory, which is the parent directory of "bin" or= "libexec". */ > ++ out_path =3D g_path_get_dirname (exe_path); > ++ while (g_str_match_string("/bin/", out_path, FALSE) || > ++ g_str_match_string("/libexec/", out_path, FALSE)) { > ++ gchar *dir_path =3D out_path; Is the intent above to *copy* out_path into dir_path? Currently that's not done; we just point another pointer to it. > ++ out_path =3D g_path_get_dirname (dir_path); If g_path_get_dirname mutates dir_path, than dir_path should be a string copy. Otherwise if it doesn't get mutated by the call, we should be able to use just: out_path =3D g_path_get_dirname (out_path); > ++ g_free (dir_path); > ++ } > ++ > ++ /* Now add paths from etc/search-paths.d/VARIABLE file. */ > ++ search_paths_d =3D g_build_filename (out_path, "etc", "search-paths= .d", NULL); > ++ if (g_file_test (search_paths_d, G_FILE_TEST_EXISTS)) { > ++ gchar *var_path =3D g_build_filename (search_paths_d, variable, N= ULL); > ++ if (g_file_get_contents (var_path, &value, NULL, NULL)) { > ++ dirs =3D g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); > ++ g_strv_builder_addv (builder, (const gchar **) dirs); > ++ g_strfreev (dirs); > ++ g_free (value); > ++ } > ++ g_free (var_path); > ++ } > ++ } > ++ > ++ g_free (exe_path); > ++ g_free (out_path); > ++ g_free (search_paths_d); > ++#endif > ++ > ++ /* Then add paths from the environment variable. */ > ++ gboolean is_setuid =3D GLIB_PRIVATE_CALL (g_check_setuid) (); > ++ if (is_setuid) /* we don't want to access arbitrary files when runnin= g as setuid. */ > ++ value =3D NULL; > ++ else > ++ value =3D g_strdup (g_getenv (variable)); > ++ > ++ if (value && value[0]) { > ++ dirs =3D g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); > ++ g_strv_builder_addv (builder, (const gchar **) dirs); > ++ g_strfreev (dirs); > ++ } > ++ g_free (value); > ++ > ++ dirs =3D g_strv_builder_end (builder); > ++ g_strv_builder_unref (builder); > ++ return dirs; > ++} Apart from my above comments, this looks good to me. I think I'd stress once more the value of upstreaming as much of this to ease maintenance in the future. Thanks for this novel idea/implementation! --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 03:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17379470469360 (code B ref 75688); Mon, 27 Jan 2025 03:05:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 03:04:06 +0000 Received: from localhost ([127.0.0.1]:58593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcFPx-0002Qq-FD for submit@debbugs.gnu.org; Sun, 26 Jan 2025 22:04:05 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:43261) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcFPu-0002QK-SA for 75688@debbugs.gnu.org; Sun, 26 Jan 2025 22:04:03 -0500 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2ee50ffcf14so7706495a91.0 for <75688@debbugs.gnu.org>; Sun, 26 Jan 2025 19:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737947037; x=1738551837; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ni6cO/3KsNK/x+55061zKxBYkaabR9Dw86RKqUEOXFE=; b=baTblD1DgBf9Yg/Q9AEH3pz1Ms0NvwApdIPm4mISa1VqFqwNtRnqZSr1nQmxuuivLB mI06dGSuEdhpp1QYoEq0cD9vOXRBdiuSQePBe0bq2qfypJT1AmG4pggldBXZTudcTbmv QBy9Kx8++wtKOqfjHUqzd8gbFMHKYOnwRES1xc7OdFcWDAnLfFfD5iCQr4mD07rZJsbp Vr1gHlySwP5qEdweOGk+tlOG4GudRzoHTAxVQbkEzpCmF3F6JHUoLJne6/0UEcQNO6vk KwSJ+bX8i1ltAzhr/9LGEI6qar6m/bZWcKZIfPxOGKCE+PbOTPG7/tdjy1KaowyijhgB 7acw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737947037; x=1738551837; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ni6cO/3KsNK/x+55061zKxBYkaabR9Dw86RKqUEOXFE=; b=mo02EnUURmMxyAoi33F6F0Nd8QZM46SlX1xd5GOcyILwkJIGDQwK87kSu9yqGlNBmK 8dP1sm2Q9/xv+8dAmERuLeFTmAB/6FtR4Sv4hNjWTpSV8k1KRZpNvK/Gqc0E731+yeDj mMSAF40+MlxT9Cq1TgXWGrVp2qutv95maCB0QN5VeToe01r72yRP/0qtfGwBqse7sYzm TjZiv9XTEYvB2VR2ChNPXD73DotKWzpKEMtIX8wgpnM/68Mfbe0Cz6KwSsHmijsvRko9 yGaAFfMbsTJXbdU53C7hiwiCqoth5GGWH0kzCaP2iQU2eqTCkKEFBcc7kP7K1G+IJK/c zziw== X-Gm-Message-State: AOJu0Yw3iQUD7UFn8//7G2RMBdJEPvc5wqGFBQzdOT93xx9/aM5lMXqG EFwZ8val0MPBtwdt6jk/An0n2bBrrLmjAa83Setr+y3DMEgaNNWuNrqVCjWqX6g= X-Gm-Gg: ASbGncvXwWqn5Qa2CAPk0ad1VigTPj9XJQxlS0dfzrajcSOLpp7QGQedXE/EkrExF4h PV2AomuZJ9Ndmj2HNTPKhm2c8bxJAXDKWdfGU4SNq9zOWxWub0/gaUCIlmQgUXsRUQkD7pEp/EK OwKZXeWbe0nFEqLRR9eDqy2PQwaAOa+xk9hrwCqhdKEbps8X4TpNcpxKs+aa92C+Hoj8RZF4BWb yC8iD4H48MhwQrGJjpx2GGBq4dtUI5poOsbrmxXIM2iYyWAs8N5/8U/24ClM4M1gucmMo3kLc6A jw== X-Google-Smtp-Source: AGHT+IHAPWq3CkTqb884aR/d8VurAELseRrmUvGdaB6/fMdCjUy6G/vrPGDzHX6uScNRdxLBnDQVgg== X-Received: by 2002:a05:6a00:66e7:b0:725:f1e9:5334 with SMTP id d2e1a72fcca58-72f8b3c78c9mr20113730b3a.8.1737947036813; Sun, 26 Jan 2025 19:03:56 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a69eb5esm5979397b3a.20.2025.01.26.19.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 19:03:56 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <96be080084ef425fb5d5a8ab920d30667dc68c99.1737613671.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Thu, 23 Jan 2025 14:28:56 +0800") References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> <96be080084ef425fb5d5a8ab920d30667dc68c99.1737613671.git.iyzsong@member.fsf.org> Date: Mon, 27 Jan 2025 12:03:44 +0900 Message-ID: <8734h55567.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > This fixes . > > * gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.pa= tch: nitpick: I'd name this patch gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch (s/respect/honor/). [...] > + (patches > + (search-patches > + "gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch")= ))) > (build-system meson-build-system) > (outputs '("out" "debug")) > (arguments > @@ -777,9 +780,8 @@ (define-public gdk-pixbuf > ;; This file is produced by the gdk-pixbuf-loaders-cache-file > ;; profile hook. > (list (search-path-specification > - (variable "GDK_PIXBUF_MODULE_FILE") > + (variable "GUIX_GDK_PIXBUF_MODULE_FILES") > (files (list %gdk-pixbuf-loaders-cache-file)) > - (separator #f) ;single valued > (file-type 'regular)))) > (synopsis "Image loading library") > (description "GdkPixbuf is a library that loads image data in various > diff --git a/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODU= LE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MO= DULE_FILES.patch > new file mode 100644 > index 0000000000..eb22761403 > --- /dev/null > +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILE= S.patch > @@ -0,0 +1,18 @@ > +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c > +index e1df590..ba24cf6 100644 > +--- a/gdk-pixbuf/gdk-pixbuf-io.c > ++++ b/gdk-pixbuf/gdk-pixbuf-io.c > +@@ -670,6 +670,13 @@ gdk_pixbuf_io_init (void) > + gboolean ret; > +=20 > + gdk_pixbuf_io_init_builtin (); > ++ > ++ /* Load loaders from GUIX_GDK_PIXBUF_MODULE_FILES. */ nitpick: "Load loaders" reads a bit loaded ;-). I'd write "Load modules [...]" instead. > ++ gchar **guix_module_files =3D g_build_guix_search_path_dirs ("GUIX_GDK= _PIXBUF_MODULE_FILES"); > ++ for (int i =3D 0; guix_module_files[i] !=3D NULL; i++) nitpick: I read a long time ago that ++i achieves the same and is more efficient, though I forgot the reasons. Probably doesn't matter here, but could be neater (here and elsewhere). Otherwise, for this commit alone, Reviewed-by: Maxim Cournoyer (You'll want to give this series plenty of time for others to chime in). --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 04:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173795166023732 (code B ref 75688); Mon, 27 Jan 2025 04:21:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 04:21:00 +0000 Received: from localhost ([127.0.0.1]:58723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcGcO-0006Ai-CN for submit@debbugs.gnu.org; Sun, 26 Jan 2025 23:21:00 -0500 Received: from mail.envs.net ([5.199.136.28]:49900) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcGcL-0006AW-Iz for 75688@debbugs.gnu.org; Sun, 26 Jan 2025 23:20:58 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4C6A138A2C0E; Mon, 27 Jan 2025 04:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737951655; bh=w/j6Ek6OF3nwHa+7CbyDut/5PDf+Z8nBR1DlQ3wN45s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UiaFfl2wlilpADDbRZqDCeliZ5IVA2Sqx1prmFSxCLyDpfP9kPlCLse1elQj7RRnD NLr6ZsT+dcsg8MaC6HLDLeRK60jNFgD49b+knnl6H8Bo1dd2+WZHeo35qXkwpTiOME ByBHGtmYsfs0NFM3iYrnrW1pTOgvIJk3QzIXTNSx3lKKIrYssjof6i+HZj4kK4GRVw fwX3yMKtwdlcKGuwbcXtr8tgINlDBp1jra97/06atG0WdURsT4t9tbHvF9PJ/i4XXt 2hlQQwkEOZ4WCZJcNo5VnlOwelrdmKnRHd3fpBBUC1E5ML/kqdbEAAwSTmjnOPa7Us rmjQUoon6tN5I56TUkc8IeJH5VRNPFn8QLRz2KoSXw+KlSfe77R29hDkdKbhyCefwX o3sFpknkbe8iG2nEsUN/HveYaBlWIeQyXU3xbvWdKI+7jyfRMIlWxucX9frXfcu5Ig 4ssHb0NGja8VuLWtPsOUflzxkB+e7w6u/hR/34uBFEvxiXaOO6I5oV8DLtg0NHSccW fvbXXY85DMOfEL7H0OUrWuVa3OD2hUiAjhLpWFe2e8pUjZsHTOFLx4p0YwpQ5+OII5 6LlT9l+Ok+nOr7CMrPWpVoUUVvz8l0fk0sLaN668MCa7O+5ZCQSHlXdayS9Yy1gK6X /uPNn29g4jTjkBG8dyjaK81M= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yseBOP5S1eHh; Mon, 27 Jan 2025 04:20:48 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 27 Jan 2025 04:20:47 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id e8a3dde6; Mon, 27 Jan 2025 04:24:24 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <8734h55567.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Mon, 27 Jan 2025 12:03:44 +0900") References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> <96be080084ef425fb5d5a8ab920d30667dc68c99.1737613671.git.iyzsong@member.fsf.org> <8734h55567.fsf_-_@gmail.com> Date: Mon, 27 Jan 2025 12:24:24 +0800 Message-ID: <87sep46g07.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: >> * gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch: > > nitpick: I'd name this patch > gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch (s/respect/honor/). > > [...] > > nitpick: "Load loaders" reads a bit loaded ;-). I'd write "Load modules > [...]" instead. > >> ++ gchar **guix_module_files = g_build_guix_search_path_dirs ("GUIX_GDK_PIXBUF_MODULE_FILES"); >> ++ for (int i = 0; guix_module_files[i] != NULL; i++) > > nitpick: I read a long time ago that ++i achieves the same and is more > efficient, though I forgot the reasons. Probably doesn't matter here, > but could be neater (here and elsewhere). Since it's not a big/hot loop, it doesn't matter here, and existed code use "i++", so I'd leave it. > > Otherwise, for this commit alone, > > Reviewed-by: Maxim Cournoyer > > (You'll want to give this series plenty of time for others to chime in). I had update gdk-pixbuf patch for https://issues.guix.gnu.org/75795 The "search-paths.d" part of this series surely need more work, I'll work on that later. Thank you! From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 05:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173795442432293 (code B ref 75688); Mon, 27 Jan 2025 05:08:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 05:07:04 +0000 Received: from localhost ([127.0.0.1]:58838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcHKx-0008On-LG for submit@debbugs.gnu.org; Mon, 27 Jan 2025 00:07:03 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:61554) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcHKu-0008OA-OF for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 00:07:01 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2166022c5caso60292775ad.2 for <75688@debbugs.gnu.org>; Sun, 26 Jan 2025 21:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737954415; x=1738559215; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KoyOy+nKhB5JJGeV3/AyF4NQg47A49IbGMshYRjDQ+0=; b=NEig9QXIvCCSS8GH8/zMudjC0NJbECntJCOJI9NGG4ZmL2H4hAGuTfMbzqK5IKEtCJ fEBNcY6CdYEDpJ5bQVc5u1ub4WvMu50v8/dqRA/RIT7fvpc6MVqh7LzfuFjbI0jXdg6n +84Yp/ZGFKUc9kJUdG5mBG/YZvj4G6+8oATNeC1Xab26/FcZ7EE3m9IkrPx9moOh89c8 TAEZIoruEmLQ0h35tAh8FDxl43LJePA8Xiy8BnRMpxv70gfjMmnbTriNxo7HIIuC0vXo ltr0nQOJwGXaQOSSZOR8mzapn11XoxuAWQSmQowa7Lqog3xNrDmMQSrSdK/Z9KrZiY13 nJhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737954415; x=1738559215; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KoyOy+nKhB5JJGeV3/AyF4NQg47A49IbGMshYRjDQ+0=; b=v8feouRZW1ljdBP4XDNp1KqSMWVCfaaqp0AHQ4VMDfT0/bdDb0LcSCrneNpvsHpn/3 ESDSqHpJYtWF1pKP2mjp73bMW6tXMgV91ZtjRbaSfGFZfZaumHv0aDFRZNSd9PYEiR1g 24NCXm3L7KcrKLVxZa+hAJmE5suyFJXPrFGl9/gjh25oVWLOfRkKaNjBYmIOoCjYvjt1 MWsZYouifiFlPoZX/1qmgGAwTuGHU1uslK3TRqRokGNmV6T1NWx8mFVbXnF5aD+SvvQZ TyvfGZpkgv5mrTtBOOphgsilLcwg0V7RgwGJD2eUUK9gDiN8ywy3m5E72iQ8qg53Ddsb pW1A== X-Gm-Message-State: AOJu0YycPDADUoI9zBmEaDw5vbCu9LEN2XNHu+Z5phCza27Wy555iI1h P+oO/9ob6MVhfxt7kO8bRt7/w+9dg5IQN5/tL/f9+p0GBi6Y1qvo X-Gm-Gg: ASbGnctCUHj4B9x0AV9WP1x/BXeDWlf68Lzxc50Jg21V2x/PNazlC++Fb55ra9d9Yg6 HfMrCpZKDMauZiQ6pZ+aSvHKgE2LUtqDlK6XLifYa0eBTWSBIfvkDi33Rj4Y7NhPzZcsgjl1uaV zSXCI4UPdEwyV94XOONl1w6eA+qJAJic3pT0s1Om1CSSOC3BI7h3Ot3cPtpv6e615tGB3H2o9Mu PL1MqlYH3DgopDCQnHJFIXMQoqxh387lPiuyfMT4DVMN8W988qPqjquM7BiCM76a8/7k57/7t03 ng== X-Google-Smtp-Source: AGHT+IHFEVCbhxHRIOd7ZkIIK2U+Icd5Zz5NuM6g2PD1YZHVzWVUddGcFgHcj0IYuKXfLWvqn/lPhw== X-Received: by 2002:a17:902:f54d:b0:218:a43c:571e with SMTP id d9443c01a7336-21c3555ce67mr623395005ad.28.1737954413893; Sun, 26 Jan 2025 21:06:53 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ac48fa81bf3sm5492457a12.24.2025.01.26.21.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2025 21:06:53 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87frla81yt.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Thu, 23 Jan 2025 14:43:22 +0800") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> <87frla81yt.fsf@envs.net> Date: Mon, 27 Jan 2025 14:06:41 +0900 Message-ID: <87tt9k4zha.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, =E5=AE=8B=E6=96=87=E6=AD=A6 writes: [...] > The patches require mass rebuilds due to glib-or-gtk-build-system -> > meson/cmake/rust, etc. I haven't test them, but show be fine for review > now, if it seems fine, I could work on qt. OK. It looks promising from what I've read thus far :-). > Also nix have the same issue, http://github.com/nixos/nixpkgs/issues/60260 > Maybe we could share the maintaince of patches with them somehow. That's a good idea. --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 05:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.1737954832992 (code B ref 75688); Mon, 27 Jan 2025 05:14:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 05:13:52 +0000 Received: from localhost ([127.0.0.1]:58870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcHRX-0000Ft-Cx for submit@debbugs.gnu.org; Mon, 27 Jan 2025 00:13:51 -0500 Received: from mail.envs.net ([5.199.136.28]:33604) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcHRU-0000Fd-9z for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 00:13:49 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id AE6C438A2C0E; Mon, 27 Jan 2025 05:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737954826; bh=Yl5AMycvLAwMTml6l7Jltt4fjY8NVppCOtVEdZO47sA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NMB7uvV8ag6Sx8P7zQx8FOzj68EZlUDekeQmctJr/+MxV6iTNWDxLGAOkAwzNgA9e otp2MrHQySdLLZjWva+4QqEMiK9bu9RaHdk/u4DwIgotnvPBtRU2DhBUqZGb5d4Gkp 4dYXfvO5sbuKwycpWsfR4BgLLR28ODEOnStCZGvFT1WmTefdKohkiRuHp0hkzF7twC XKcSsFN0za9+DYlZR1DN19Ftw6+vfXy5DthVMKB1mPPjqnYbks6cGzy/5G6WJTwEDQ Hjg9hYZB1WfohK2NKJ/mFEPLVE38vriY4xxlRF8CDU134kyEWbG3gBz1Wv2F24XVKX XL4jJ17hMmelWhSC0dBa3aCca53+oI+ZGcC1hdHQRAYMs4iyEjAd4Orqq5jgRFhdKw i6MqY3mQ6Z5gR3mApEEyA8axw2DuL6duP9qy7hHh5NGXnv54TfJ42/lrdPVXRcENse n5L36OAf7vApQQj478y4yDCm40Z7Jjc1ZyK+yl80RPop5hw1DhMo7KuGYwSaeIWT/1 ZmsWrI6S8gKNOLVfd/UbJTyzpyqfMmJFyN+yhgNGMPzSHai4fkLqDCUNOfIns68DLs l3n5Q1N7qN05SGggU+aeC0bmDFvu5ncfe5mGHMKEPU9wJ4o0Nq6LkmOxsita8klmEY 06e4IFBuocYK1x9jyxoEP3Hg= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9fAE5p5yRwpx; Mon, 27 Jan 2025 05:13:39 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 27 Jan 2025 05:13:39 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id db200d7f; Mon, 27 Jan 2025 05:17:14 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <877c6h55dy.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Mon, 27 Jan 2025 11:59:05 +0900") References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> <877c6h55dy.fsf_-_@gmail.com> Date: Mon, 27 Jan 2025 13:17:14 +0800 Message-ID: <87ed0o6dk5.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: >> +++ b/gnu/packages/patches/glib-guix-search-paths.patch >> @@ -0,0 +1,158 @@ > > I think it'd be nice to forward a subset of this patch that implements > just the loading environment variable from a file, as that mechanism > seems like it could be generally useful (and upstreaming it would lower > the maintenance burden for us). Okay, I could try. >> ++ gchar *exe_path = g_file_read_link ("/proc/self/exe", NULL); While, I just find that this "/proc/self/exe" alone only works for ELF executables, for interpreted scripts, we also need patch interpreters to set 2 environment variables, eg: GUIX_INTERPRETER_PATH and GUIX_MAIN_SCRIPT_PATH. And use GUIX_MAIN_SCRIPT_PATH when "/proc/self/exe" match GUIX_INTERPRETER_PATH... I'll send updated patches later. >> ++ gchar *out_path = NULL; >> ++ gchar *search_paths_d = NULL; >> ++ >> ++ /* We install executables under "bin" or "libexec", can also be a subdirectory of "libexec". */ >> ++ if (exe_path && (g_str_match_string("/bin/", exe_path, FALSE) || >> ++ g_str_match_string("/libexec/", exe_path, FALSE))) { > > Perhaps these 'bin' and 'libexec' hard-coded names should come from the > build system of gdk-pixbuf, in case a distro uses different names across > its package collection (to make it more general). Okay, I could do this when upstream. >> ++ /* Find output directory, which is the parent directory of "bin" or "libexec". */ >> ++ out_path = g_path_get_dirname (exe_path); >> ++ while (g_str_match_string("/bin/", out_path, FALSE) || >> ++ g_str_match_string("/libexec/", out_path, FALSE)) { >> ++ gchar *dir_path = out_path; > > Is the intent above to *copy* out_path into dir_path? Currently that's > not done; we just point another pointer to it. > >> ++ out_path = g_path_get_dirname (dir_path); > > If g_path_get_dirname mutates dir_path, than dir_path should be a string > copy. Otherwise if it doesn't get mutated by the call, we should be > able to use just: > > out_path = g_path_get_dirname (out_path); > >> ++ g_free (dir_path); That 'dir_path' is only maded to be freed here, since 'g_path_get_dirname' allocate a new array instead of modify existed one, so we need free the old out_path once we get a new one. > [...] > > Apart from my above comments, this looks good to me. I think I'd stress > once more the value of upstreaming as much of this to ease maintenance > in the future. > > Thanks for this novel idea/implementation! Sure, with additional interpreter patches which I haven't sent, to be honest I feel this more hacky than novel, hope upstream or other folks can give better ideas... Thank you! From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v3 1/4] gnu: glib: Support load search paths from etc/search-paths.d files. References: In-Reply-To: Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 13:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17379838949114 (code B ref 75688); Mon, 27 Jan 2025 13:19:01 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 13:18:14 +0000 Received: from localhost ([127.0.0.1]:59921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcP0I-0002Mu-1C for submit@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:14 -0500 Received: from mail.envs.net ([5.199.136.28]:51064) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcP07-0002MG-QJ for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:05 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4ABB538A3DBF; Mon, 27 Jan 2025 13:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737983882; bh=yokAar2H3c9cPLWaNK8YphafksKNhrv4hiwLY1Wy7F0=; h=From:To:Cc:Subject:Date:From; b=iUAD7Q2wZdw7aD7nrUDNeg1LQ0OalSEBoO8mtkfbDGPonL7KZL/fr2FwK/TN8W1MJ ew+nuX6ri7Te1BH/CNl/DEyrG33tgLO1OpwOiTTCy0EJPEVgTt0KzGZurXszmIUm1U v2ymzgH4jpnerKyjybyv6X7zeRVuCJWKhzFGctHcoN99aPkhbsuP/MsHupljtUQvn8 I/0gt125JXE7gix/6A0EOwKfrGsHqmyv6/dd3cgiL6KyInoa1qq7Ajf/bt+F+kx5M9 Dv/AHjXlQ/yLxyUZExsKne4/DOgUfilTefJdHYQVGOQRwd6DH8w7UiuSiaCg1Ky+AT R93UM3yWp4/FatS00zD3TzpCbpG7lCZ3d0vshScOmj98WJ7lzd7k3x5WQza12RQrT0 Aa7qZX5Tr6IB3wKkNBH3usesO0hkFIDyzr0pA336NTE0GyAaDc/KK7fB8xQIUqFNRx UnISSN9EoKNjX+lgvODWArnx5q3pNDRUBA1ZSMeS9NW5LHqcGpcXsE0lbYESX2/gNz aZVr0l7e0UCoJfZdYJo1hY8MttQazoDIvNrm5UqjnP8hqPN/+8KC2JDFUWIx5wsLxp pn2vwcQ/SIlRYksVtSv9zWe/dI/Hn+8yaBLPMAgfow/PIr58nOs/YGU4Uj3oJXPeWX fyJ1qVyeCX9d1oZSJxymgQOs= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PBqqLHXG40tn; Mon, 27 Jan 2025 13:17:58 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 27 Jan 2025 13:17:58 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id e247316f; Mon, 27 Jan 2025 13:21:33 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 27 Jan 2025 21:21:20 +0800 Message-ID: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) From: 宋文武 Add a new function "g_build_guix_search_path_dirs" to GLIB, which in addition to environment variables, reads search path values from the etc/search-paths.d directory of the current executable. This can be used to replace wrapper scripts. Use it for GUIX_GSETTINGS_SCHEMA_DIR, GUIX_GIO_EXTRA_MODULES, GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS. * gnu/packages/patches/glib-guix-search-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/glib.scm (glib)[source]: Add patch. [native-search-paths]: Add GUIX_GSETTINGS_SCHEMA_DIR. Replace GIO_EXTRA_MODULES with GUIX_GIO_EXTRA_MODULES. Change-Id: I1d6d113fc38b20ebd4dce195f6d9c58ce85967e4 --- gnu/local.mk | 1 + gnu/packages/glib.scm | 9 +- .../patches/glib-guix-search-paths.patch | 162 ++++++++++++++++++ 3 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glib-guix-search-paths.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6961b8816c..7ae66dd57d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1438,6 +1438,7 @@ dist_patch_DATA = \ %D%/packages/patches/git-filter-repo-generate-doc.patch \ %D%/packages/patches/gklib-suitesparse.patch \ %D%/packages/patches/glib-appinfo-watch.patch \ + %D%/packages/patches/glib-guix-search-paths.patch \ %D%/packages/patches/glib-skip-failing-test.patch \ %D%/packages/patches/glibc-2.33-riscv64-miscompilation.patch \ %D%/packages/patches/glibc-2.39-git-updates.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index e04eedb7ba..0704ba2c53 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -258,7 +258,8 @@ (define glib (base32 "0c3vagxl77wma85qinbj974jvw96n5bvch2m7hqcwxq8fa5spsj4")) (patches (search-patches "glib-appinfo-watch.patch" - "glib-skip-failing-test.patch")) + "glib-skip-failing-test.patch" + "glib-guix-search-paths.patch")) (modules '((guix build utils))) (snippet '(begin @@ -516,9 +517,13 @@ (define glib (search-path-specification (variable "XDG_DATA_DIRS") (files '("share"))) + ;; To load gsettings schemas from GTK, etc. + (search-path-specification + (variable "GUIX_GSETTINGS_SCHEMA_DIR") + (files '("share/glib-2.0/schemas"))) ;; To load extra gio modules from glib-networking, etc. (search-path-specification - (variable "GIO_EXTRA_MODULES") + (variable "GUIX_GIO_EXTRA_MODULES") (files '("lib/gio/modules"))))) (search-paths native-search-paths) (synopsis "Low-level core library for GNOME projects") diff --git a/gnu/packages/patches/glib-guix-search-paths.patch b/gnu/packages/patches/glib-guix-search-paths.patch new file mode 100644 index 0000000000..565c045a55 --- /dev/null +++ b/gnu/packages/patches/glib-guix-search-paths.patch @@ -0,0 +1,162 @@ +diff --git a/gio/giomodule.c b/gio/giomodule.c +index 76c2028..7afa8ef 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -1330,6 +1330,13 @@ _g_io_modules_ensure_loaded (void) + g_io_modules_scan_all_in_directory_with_scope (module_dir, scope); + g_free (module_dir); + ++ /* Load modules from GUIX_GIO_EXTRA_MODULES. */ ++ gchar **guix_giomodule_dirs = g_build_guix_search_path_dirs ("GUIX_GIO_EXTRA_MODULES"); ++ for (int i = 0; guix_giomodule_dirs[i] != NULL; i++) { ++ g_io_modules_scan_all_in_directory_with_scope (guix_giomodule_dirs[i], scope); ++ } ++ g_strfreev (guix_giomodule_dirs); ++ + g_io_module_scope_free (scope); + + /* Initialize types from built-in "modules" */ +diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c +index e8ccc8c..6ac0f32 100644 +--- a/gio/gsettingsschema.c ++++ b/gio/gsettingsschema.c +@@ -354,6 +354,13 @@ initialise_schema_sources (void) + while (i--) + try_prepend_data_dir (dirs[i]); + ++ /* Load schemas from GUIX_GSETTINGS_SCHEMA_DIR. */ ++ char **guix_schema_dirs = g_build_guix_search_path_dirs ("GUIX_GSETTINGS_SCHEMA_DIR"); ++ i = g_strv_length(guix_schema_dirs); ++ while (i--) ++ try_prepend_dir (guix_schema_dirs[i]); ++ g_strfreev (guix_schema_dirs); ++ + try_prepend_data_dir (g_get_user_data_dir ()); + + /* Disallow loading extra schemas if running as setuid, as that could +diff --git a/glib/gutils.c b/glib/gutils.c +index 8628a56..0f71890 100644 +--- a/glib/gutils.c ++++ b/glib/gutils.c +@@ -2708,6 +2708,16 @@ g_build_system_data_dirs (void) + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif + ++ /* Use data files from GUIX_XDG_DATA_DIRS. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) data_dir_vector); ++ g_strfreev (data_dir_vector); ++ data_dir_vector = g_build_guix_search_path_dirs ("GUIX_XDG_DATA_DIRS"); ++ g_strv_builder_addv (builder, (const gchar **) data_dir_vector); ++ g_strfreev (data_dir_vector); ++ data_dir_vector = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return g_steal_pointer (&data_dir_vector); + } + +@@ -2800,6 +2810,16 @@ g_build_system_config_dirs (void) + conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif + ++ /* Use config files from GUIX_XDG_CONFIG_DIRS. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) conf_dir_vector); ++ g_strfreev (conf_dir_vector); ++ conf_dir_vector = g_build_guix_search_path_dirs ("GUIX_XDG_CONFIG_DIRS"); ++ g_strv_builder_addv (builder, (const gchar **) conf_dir_vector); ++ g_strfreev (conf_dir_vector); ++ conf_dir_vector = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return g_steal_pointer (&conf_dir_vector); + } + +@@ -2849,6 +2869,73 @@ g_get_system_config_dirs (void) + return system_config_dirs; + } + ++gchar ** ++g_build_guix_search_path_dirs (const gchar *variable) ++{ ++ gchar **dirs = NULL; ++ char *value = NULL; ++ GStrvBuilder *builder = g_strv_builder_new (); ++ ++ /* First add paths from the etc/search-paths.d, which can be used to replace wrapper script. */ ++ gchar *out_path = NULL; ++ gchar *search_paths_d = NULL; ++ gchar *exe_path = g_file_read_link ("/proc/self/exe", NULL); ++ ++ /* For scripts, we use GUIX_MAIN_SCRIPT_PATH to find its location. */ ++ if (g_strcmp0 (exe_path, g_getenv ("GUIX_INTERPRETER_PATH")) == 0) { ++ g_free (exe_path); ++ exe_path = g_getenv ("GUIX_MAIN_SCRIPT_PATH"); ++ } ++ ++ /* We install executables under "bin" or "libexec", can also be a subdirectory of "libexec". */ ++ if (exe_path && (g_str_match_string("/bin/", exe_path, FALSE) || ++ g_str_match_string("/libexec/", exe_path, FALSE))) { ++ /* Find output directory, which is the parent directory of "bin" or "libexec". */ ++ out_path = g_path_get_dirname (exe_path); ++ while (g_str_match_string("/bin/", out_path, FALSE) || ++ g_str_match_string("/libexec/", out_path, FALSE)) { ++ gchar *dir_path = out_path; ++ out_path = g_path_get_dirname (dir_path); ++ g_free (dir_path); ++ } ++ ++ /* Now add paths from etc/search-paths.d/VARIABLE file. */ ++ search_paths_d = g_build_filename (out_path, "etc", "search-paths.d", NULL); ++ if (g_file_test (search_paths_d, G_FILE_TEST_EXISTS)) { ++ gchar *var_path = g_build_filename (search_paths_d, variable, NULL); ++ if (g_file_get_contents (var_path, &value, NULL, NULL)) { ++ dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_strv_builder_addv (builder, (const gchar **) dirs); ++ g_strfreev (dirs); ++ g_free (value); ++ } ++ g_free (var_path); ++ } ++ } ++ ++ free (exe_path); ++ g_free (out_path); ++ g_free (search_paths_d); ++ ++ /* Then add paths from the environment variable. */ ++ gboolean is_setuid = GLIB_PRIVATE_CALL (g_check_setuid) (); ++ if (is_setuid) /* we don't want to access arbitrary files when running as setuid. */ ++ value = NULL; ++ else ++ value = g_strdup (g_getenv (variable)); ++ ++ if (value && value[0]) { ++ dirs = g_strsplit (value, G_SEARCHPATH_SEPARATOR_S, 0); ++ g_strv_builder_addv (builder, (const gchar **) dirs); ++ g_strfreev (dirs); ++ } ++ g_free (value); ++ ++ dirs = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ return dirs; ++} ++ + /** + * g_nullify_pointer: + * @nullify_location: (not nullable): the memory address of the pointer. +diff --git a/glib/gutils.h b/glib/gutils.h +index efc6914..710cf27 100644 +--- a/glib/gutils.h ++++ b/glib/gutils.h +@@ -36,6 +36,9 @@ + + G_BEGIN_DECLS + ++GLIB_AVAILABLE_IN_ALL ++gchar **g_build_guix_search_path_dirs (const gchar *variable); ++ + GLIB_AVAILABLE_IN_ALL + const gchar * g_get_user_name (void); + GLIB_AVAILABLE_IN_ALL base-commit: 77603927fba0edc2c4d9de122aa132b968a051e5 -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v3 2/4] gnu: python: Set GUIX_INTERPRETER_PATH and GUIX_MAIN_SCRIPT_PATH. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, sharlatanus@gmail.com, tanguy@bioneland.org, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17379838959122 (code B ref 75688); Mon, 27 Jan 2025 13:19:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 13:18:15 +0000 Received: from localhost ([127.0.0.1]:59923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcP0I-0002Mx-Pc for submit@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:15 -0500 Received: from mail.envs.net ([5.199.136.28]:52478) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcP0B-0002MR-U1 for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:08 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 0E69938A2C3E; Mon, 27 Jan 2025 13:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737983887; bh=/KaaSOUKFB75BirDp0KvHjFv/N+Owkslf9p/0YF3b6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UV6lc+f5NMMUWyLEewpRoKvH9frRmuCHQpIZrogNzC+3rEBtjFNuxtn6xYe8C24pk bn620gJ2UKeHKmaeW9XqGvh1t815AkftpvmolHOfm0ZNGbgPuF9L20qzZSHfDTFKcn 7jWgiKqQb1Te1Pr40F+v4LzOYogTHf3nGimwRoZQlhypar1qU6ANKeyHElstkG0uE1 OzNcCg7PseArnEZcmO8jg4LpwxmJw/OEK7e/J7+NMEtGfBhmRUAkEfroRlhLIJ3m6B ycf0mvcC5lcSEO1wWTRWiJ3IbUL1Oyl+NWCSf8RaeYxf7fOBbGRUJ3EoRfjLbD9fkp mu7JDWJTPbsuJJPx7bCBXnXkF2nCcQ+aaLd1sn2ozfiNFeuVemRAhhRqZbYDexkpwn va9JKj+Xg5OdLr8wwnTbStb4U481qr7hO3pdSv/cEodJCoeVI1zS5Tj0ON0qq43+zH XJqBHULJAF4TuDoBDiOy4enOJRKLsy925DTnzcIf6KR/PmZoIlWLW12WRnp5wOusb5 2w7yJriiT/aOHcXxNBN/hEsUqKxFYf6ucEm0ciX3D/z2ZHoZuLEFf/Sr3UQkrsn1UM l+PePE/YShUSdrFy89wo7kN47hdzwmAhtfhnvX/BueZYmD5m6hATW5mwgrwomjohr+ Tede3l9S/OElHuPi+j8S5PNQ= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lw6k0LLY4GB6; Mon, 27 Jan 2025 13:18:03 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 27 Jan 2025 13:18:02 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id d692a47c; Mon, 27 Jan 2025 13:21:33 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 27 Jan 2025 21:21:21 +0800 Message-ID: <74079e8d389a7c278bdbbecac5075c4170446edf.1737983975.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) From: 宋文武 This is used by 'g_build_guix_search_path_dirs' in our patched GLIB. * gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/python.scm (python-3.10)[source]: Add it. Change-Id: I4588cbd087a783da1ad8c94fccda7ebf5e9f39ad --- gnu/local.mk | 1 + .../python-3-set-GUIX_INTERPRETER_PATH.patch | 28 +++++++++++++++++++ gnu/packages/python.scm | 3 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7ae66dd57d..ba355dabf8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2085,6 +2085,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-arm-alignment.patch \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ + %D%/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch \ %D%/packages/patches/python-3-fix-tests.patch \ %D%/packages/patches/python-3-hurd-configure.patch \ %D%/packages/patches/python-angr-check-exec-deps.patch \ diff --git a/gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch b/gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch new file mode 100644 index 0000000000..2f173c68c8 --- /dev/null +++ b/gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch @@ -0,0 +1,28 @@ +The 'g_build_guix_search_path_dirs' function in our patched GLIB requires +2 environment variables (GUIX_INTERPRETER_PATH and GUIX_MAIN_SCRIPT_PATH) to +check if the current executable is a script launched by an interpreter, and +find the script path if it is. +--- +diff --git a/Modules/main.c b/Modules/main.c +index 5bb1de2..83ada3d 100644 +--- a/Modules/main.c ++++ b/Modules/main.c +@@ -636,6 +636,18 @@ pymain_run_python(int *exitcode) + prepended to sys.path. + + Otherwise, main_importer_path is left unchanged. */ ++ ++ /* Set environment variables to support 'search-paths.d'. */ ++ char *exe_path = realpath("/proc/self/exe", NULL); ++ PyObject *filename = PyUnicode_FromWideChar(config->run_filename, -1); ++ const char *main_script_path = PyUnicode_AsUTF8(filename); ++ if (exe_path != NULL && main_script_path != NULL) { ++ setenv("GUIX_INTERPRETER_PATH", exe_path, 1); ++ setenv("GUIX_MAIN_SCRIPT_PATH", main_script_path, 1); ++ } ++ free(exe_path); ++ Py_DECREF(filename); ++ + if (pymain_get_importer(config->run_filename, &main_importer_path, + exitcode)) { + return; diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c5f98c3a46..7701d111c4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -463,7 +463,8 @@ (define-public python-3.10 "python-3-fix-tests.patch" "python-3-hurd-configure.patch" "python-3-reproducible-build.patch" - "python-3-search-paths.patch")) + "python-3-search-paths.patch" + "python-3-set-GUIX_INTERPRETER_PATH.patch")) (sha256 (base32 "0j6wvh2ad5jjq5n7sjmj1k66mh6lipabavchc3rb4vsinwaq9vbf")) -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v3 3/4] gnu: gtk: Add search-paths.d support for GUIX_GTK{2, 3, 4}_PATH. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17379838969128 (code B ref 75688); Mon, 27 Jan 2025 13:19:02 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 13:18:16 +0000 Received: from localhost ([127.0.0.1]:59925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcP0J-0002N4-7V for submit@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:15 -0500 Received: from mail.envs.net ([5.199.136.28]:52480) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcP0E-0002Mc-Qg for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:11 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id E877338A3DBF; Mon, 27 Jan 2025 13:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737983889; bh=zWu41/CBIoo2ICxmGaAKoDqJ5EwUYXH6Z0OSbiCeVzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mTr/tvoPCuk6YnoASk6pwbHEvqatDScjDtAa4ISjH1eUuMmEPd46TQVCWWqHNx7JY E8nUjz7/yJK9NVYNjPY42iOZpoxqJHPn0Mjx44XF3BVjsDwh72/2YCrKQlnFg4f6Wq FcmJuSSga1OUc602zL5+N6FJaeOmuZOBOs434UwfaQmgxbl/LganlMOBBmJdDW9FiT i9KGbSsel+T7E7oUty1ORsCIi8kpLahktRtWDk2YRsceutSTlRnWK3XYzxv72H7T0Z FF0zcEsGKkwJgkitUxxQ9m8af60GIxKUXVzfXTOO7zU/FFJsPy23/IdZsQxkDeoEG3 bQ3BJLF4EcCP+GN3YMrD7BDWaTZFLtgWouaCY2vKBmWmXUFwERIrvA26qpnMwzP8MP gf8uPuGYOuraMfPZl6xhL7TAVgBuL6g72LgV1z1XZyQVVxcavOWFoPCYYSxCxl6QDJ q06BDi3sS6jLXv8Lfp/IOjKqf4krq08/zrrfmTLGF34KClAb2YEQdSP5yIk45Ak4qY lj6GxT+PlydzYcVt3HwKfmBluyor7d9PLxgml6LGRK/qGxQhUY1KwiNt9WOEFFt54W loYfgTeew9akRpNtOwqDTR++E/85nJc7PhM1RxipX8xaaNjGGRdgwhC8EGqNQiRH81 r0PrQ0NG64wGAyYiHsPTKc2g= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id B5V5E7U3uvOA; Mon, 27 Jan 2025 13:18:06 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 27 Jan 2025 13:18:06 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id b482d01f; Mon, 27 Jan 2025 13:21:34 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 27 Jan 2025 21:21:22 +0800 Message-ID: <08a25b1c35ccc1fa3869bc1cdf3b6e8f883de4d6.1737983975.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) From: 宋文武 * gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch, gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch, gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: Rewrite in terms of 'g_build_guix_search_path_dirs'. Change-Id: Ib0748c39e56fd598f30f40b9ac3bb0f012f14c31 --- .../patches/gtk2-respect-GUIX_GTK2_PATH.patch | 64 ++++++------------- .../patches/gtk3-respect-GUIX_GTK3_PATH.patch | 55 ++++++---------- .../patches/gtk4-respect-GUIX_GTK4_PATH.patch | 62 +++++------------- 3 files changed, 54 insertions(+), 127 deletions(-) diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch index 93a8ddc242..fb6c7809f9 100644 --- a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch +++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch @@ -1,46 +1,20 @@ -This patch makes GTK+ look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK2_PATH". This can be used -instead of "GTK_PATH" to make GTK+ find modules that are incompatible with -other major versions of GTK+. +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index 50729b61a5..2d4c2c2a85 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -96,5 +96,15 @@ get_module_path (void) + result = pango_split_file_list (module_path); + g_free (module_path); ---- a/gtk/gtkmodules.c 2014-09-29 22:02:17.000000000 +0200 -+++ b/gtk/gtkmodules.c 2015-12-02 18:41:53.306396938 +0100 -@@ -55,6 +55,7 @@ - get_module_path (void) - { - const gchar *module_path_env; -+ const gchar *module_guix_gtk2_path_env; - const gchar *exe_prefix; - const gchar *home_dir; - gchar *home_gtk_dir = NULL; -@@ -70,6 +71,7 @@ - home_gtk_dir = g_build_filename (home_dir, ".gtk-2.0", NULL); - - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk2_path_env = g_getenv ("GUIX_GTK2_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); - - if (exe_prefix) -@@ -77,9 +79,21 @@ - else - default_dir = g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL); - -- if (module_path_env && home_gtk_dir) -+ if (module_guix_gtk2_path_env && module_path_env && home_gtk_dir) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, module_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env && home_gtk_dir) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, module_path_env, default_dir, NULL); -+ else if (module_path_env && home_gtk_dir) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, home_gtk_dir, default_dir, NULL); -+ else if (module_guix_gtk2_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk2_path_env, default_dir, NULL); - else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); ++ /* GUIX: Load additional modules from GUIX_GTK2_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK2_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch index 66fd2fd1c4..28e232a812 100644 --- a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch +++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch @@ -1,38 +1,21 @@ -This patch makes GTK+ look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK3_PATH". This can be used -instead of "GTK_PATH" to make GTK+ find modules that are incompatible with -other major versions of GTK+. - ---- a/gtk/gtkmodules.c 2015-09-20 20:09:05.060590217 +0200 -+++ b/gtk/gtkmodules.c 2015-09-20 20:10:33.423124833 +0200 -@@ -52,6 +52,7 @@ - get_module_path (void) - { - const gchar *module_path_env; -+ const gchar *module_guix_gtk3_path_env; - const gchar *exe_prefix; - gchar *module_path; - gchar *default_dir; -@@ -61,6 +62,7 @@ - return result; +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index f93101c272..b57e1da802 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -81,6 +81,16 @@ get_module_path (void) + result = gtk_split_file_list (module_path); + g_free (module_path); - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk3_path_env = g_getenv ("GUIX_GTK3_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); ++ /* GUIX: Load additional modules from GUIX_GTK3_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK3_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } - if (exe_prefix) -@@ -68,7 +70,13 @@ - else - default_dir = g_build_filename (_gtk_get_libdir (), "gtk-3.0", NULL); - -- if (module_path_env) -+ if (module_guix_gtk3_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk3_path_env, module_path_env, default_dir, NULL); -+ else if (module_guix_gtk3_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk3_path_env, default_dir, NULL); -+ else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); - else diff --git a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch index 4a60023bf7..56c202ecf4 100644 --- a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch +++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch @@ -1,51 +1,21 @@ -From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001 -From: Raghav Gururajan -Date: Tue, 18 May 2021 19:57:00 -0400 -Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH. - -This patch makes GTK look for additional modules in a list of directories -specified by the environment variable "GUIX_GTK4_PATH". This can be used -instead of "GTK_PATH" to make GTK find modules that are incompatible with -other major versions of GTK. ---- - gtk/gtkmodules.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c -index aace5dcbc9..193b6a02e9 100644 +index 51b0916624..0cd6ee7e30 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c -@@ -105,6 +105,7 @@ static char ** - get_module_path (void) - { - const char *module_path_env; -+ const gchar *module_guix_gtk4_path_env; - const char *exe_prefix; - char *module_path; - char *default_dir; -@@ -114,6 +115,7 @@ get_module_path (void) - return result; +@@ -132,6 +132,16 @@ get_module_path (void) + result = split_file_list (module_path); + g_free (module_path); - module_path_env = g_getenv ("GTK_PATH"); -+ module_guix_gtk4_path_env = g_getenv ("GUIX_GTK4_PATH"); - exe_prefix = g_getenv ("GTK_EXE_PREFIX"); ++ /* GUIX: Load additional modules from GUIX_GTK4_PATH. */ ++ GStrvBuilder *builder = g_strv_builder_new (); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_build_guix_search_path_dirs ("GUIX_GTK4_PATH"); ++ g_strv_builder_addv (builder, (const gchar **) result); ++ g_strfreev (result); ++ result = g_strv_builder_end (builder); ++ g_strv_builder_unref (builder); ++ + return result; + } - if (exe_prefix) -@@ -121,7 +123,13 @@ get_module_path (void) - else - default_dir = g_build_filename (_gtk_get_libdir (), "gtk-4.0", NULL); - -- if (module_path_env) -+ if (module_guix_gtk4_path_env && module_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk4_path_env, module_path_env, default_dir, NULL); -+ else if (module_guix_gtk4_path_env) -+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -+ module_guix_gtk4_path_env, default_dir, NULL); -+ else if (module_path_env) - module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - module_path_env, default_dir, NULL); - else --- -2.31.1 - -- 2.47.1 From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH v3 4/4] build: glib-or-gtk-build-system: Replace wrapper scripts with 'search-paths.d'. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 27 Jan 2025 13:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75688@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17379839019142 (code B ref 75688); Mon, 27 Jan 2025 13:19:03 +0000 Received: (at 75688) by debbugs.gnu.org; 27 Jan 2025 13:18:21 +0000 Received: from localhost ([127.0.0.1]:59927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcP0O-0002NM-4l for submit@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:21 -0500 Received: from mail.envs.net ([5.199.136.28]:52490) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcP0F-0002Me-Nh for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 08:18:13 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id D7B5338A3E6D; Mon, 27 Jan 2025 13:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737983890; bh=O+ThQ9+miYrsemYH2OfZGMrx0nUEjWKuB9zyO/EhGj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qjWU7a7eYC7iUkD35Uxnml9dsLlqT+LdwyBk/CCbyc89J+tIs5yTRaT+UYQzydaCS wxderqpiH4lYY1h/zw5I+nBwVAJQGFS/F5Pnb6Ejk9ZIkybeteM0tV+GwmtVd4JChK 0smEVnT3OQ0m1Sj/BopcLbluSvrTUl7LYjWpAXeYQPPqjC89URMkcEUHggtZ9KJ0Lh 8B3+3kJyyyHO6+OZSz1Xo0FzTn6E9evfJ34LyNORVtVJFM2kfdjANFHqJsP6MnAlOP d0ZkrHRJn2QfmrqV76PHdwKuxm2QgqUXONx173Hlm5XAjK7Wt2ADDUM5QFzP61LG1p WDDWh/IJPeAe9kb5gTghjiqsyK4VWmcbOZtONNUnr0ysqfMB8Y09FdTE+wJhDNi3U8 zjv7rMC30AkvHSZqXUjw4NxaAqSjgiB21hzKlELE0+/EAfjD4eNaPfC519F89pA7hF LvmcjY7VKFw16ZpSk1geE0/r9Xyvm50we3OO43JgO1bQ3sgVJtq4lNqzx30X/47AwR zBzBhDX5/hb5g+JIlE2v/V7QfWtEERIi+g/FrjjKnDw7RuRv7v7SBk2FdYUQ3S76WZ dL9PXTyvgGFIaivI68aTd+I1jvl0tRyK/f8rOsMizrKvxnJet7iUxdCQNzbXSjoUju aUK448Xsqeh5kd1NM1wUAlOw= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id u6efFIVEjPTx; Mon, 27 Jan 2025 13:18:07 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 27 Jan 2025 13:18:06 +0000 (UTC) Received: from localhost.localdomain (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 095c186e; Mon, 27 Jan 2025 13:21:34 +0000 (UTC) From: iyzsong@envs.net Date: Mon, 27 Jan 2025 21:21:23 +0800 Message-ID: <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) From: 宋文武 * guix/build/glib-or-gtk-build-system.scm (write-search-path-file): New procedure. (gtk-module-directories): Add version to arguments. (gsettings-schema-directories): New procedure. (data-directories): Don't check for "/glib-2.0/schemas". (conf-directories): New procedure. (wrap-all-programs): Rewrite in terms of 'write-search-path-file'. Change-Id: I1c9e8d491b96e298d1568a5e29b04c762c26e4d1 --- guix/build/glib-or-gtk-build-system.scm | 166 ++++++++++++++---------- 1 file changed, 95 insertions(+), 71 deletions(-) diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm index 67a52ddad3..335a856575 100644 --- a/guix/build/glib-or-gtk-build-system.scm +++ b/guix/build/glib-or-gtk-build-system.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2025 宋文武 ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,13 @@ (define-module (guix build glib-or-gtk-build-system) ;; ;; Code: +(define* (write-search-path-file output variable value) + "Write VALUE to @file{etc/search-paths.d/VARIABLE} under OUTPUT." + (let ((search-paths.d (string-append output "/etc/search-paths.d"))) + (mkdir-p search-paths.d) + (with-output-to-file (string-append search-paths.d "/" variable) + (lambda () (display value))))) + (define (subdirectory-exists? parent sub-directory) (directory-exists? (string-append parent sub-directory))) @@ -47,32 +55,12 @@ (define (directory-included? directory directories-list) (fold (lambda (s p) (or (string-ci=? s directory) p)) #f directories-list)) -;; We do not include $HOME/.guix-profile/gtk-v.0 (v=2 or 3) because we do not -;; want to mix gtk+-2 and gtk+-3 modules. See -;; https://developer.gnome.org/gtk3/stable/gtk-running.html -(define (gtk-module-directories inputs) - "Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a list +;; We load GTK modules via the GUIX_GTK2_PATH, GUIX_GTK3_PATH and GUIX_GTK4_PATH +;; search paths. +(define (gtk-module-directories inputs version) + "Check for the existence of \"libdir/gtk-VERSION\" in INPUTS. Return a list with all found directories." - (let* ((version - (cond - ((string-match "gtk-4" - (or (assoc-ref inputs "gtk") - (assoc-ref inputs "source") - "")) - "4.0") - ((string-match "gtk\\+-3" - (or (assoc-ref inputs "gtk+") - (assoc-ref inputs "source") - "")) - "3.0") - ((string-match "gtk\\+-2" - (or (assoc-ref inputs "gtk+") - (assoc-ref inputs "source") - "")) - "2.0") - (else - "4.0"))) ; We default to version 4.0. - (gtk-module + (let ((gtk-module (lambda (input prev) (let* ((in (match input ((_ . dir) dir) @@ -85,27 +73,22 @@ (define (gtk-module-directories inputs) prev))))) (fold gtk-module '() inputs))) -;; See +;; XDG data files include themes, sounds, icons, etc. See: ;; http://www.freedesktop.org/wiki/DesktopThemeSpec ;; http://freedesktop.org/wiki/Specifications/sound-theme-spec ;; http://freedesktop.org/wiki/Specifications/icon-theme-spec ;; -;; Currently desktop themes are not well supported and do not honor -;; XDG_DATA_DIRS. One example is evince which only looks for desktop themes -;; in $HOME/.themes (for backward compatibility) and in XDG_DATA_HOME (which -;; defaults to $HOME/.local/share). One way to handle these applications -;; appears to be by making $HOME/.themes a symlink to -;; $HOME/.guix-profile/share/themes. +;; We load them via XDG_DATA_DIRS (from profile, has higher priority) and +;; GUIX_XDG_DATA_DIRS (application specified) search paths. (define (data-directories inputs) - "Check for the existence of \"$datadir/glib-2.0/schemas\" or XDG themes data -in INPUTS. Return a list with all found directories." + "Check for the existence of XDG data files in INPUTS. Return a list with all found +directories." (define (data-directory input previous) (let* ((in (match input ((_ . dir) dir) (_ ""))) (datadir (string-append in "/share"))) - (if (and (or (subdirectory-exists? datadir "/glib-2.0/schemas") - (subdirectory-exists? datadir "/sounds") + (if (and (or (subdirectory-exists? datadir "/sounds") (subdirectory-exists? datadir "/themes") (subdirectory-exists? datadir "/cursors") (subdirectory-exists? datadir "/wallpapers") @@ -117,15 +100,45 @@ (define (data-directories inputs) (fold data-directory '() inputs)) +;;; XDG configuration files are expected to be installed in etc/xdg directory. +;;; We load them via XDG_CONFIG_DIRS (from profile, has higher priority) and +;;; GUIX_XDG_CONFIG_DIRS (application specified) search paths. +(define (conf-directories inputs) + "Check for the existence of XDG configuration files in INPUTS. Return a list with +all found directories." + (define (conf-directory input previous) + (let* ((in (match input + ((_ . dir) dir) + (_ ""))) + (conf-dir (string-append in "/etc/xdg"))) + (if (and (directory-exists? conf-dir) + (not (directory-included? conf-dir previous))) + (cons conf-dir previous) + previous))) + + (fold conf-directory '() inputs)) + +;;; GIO GSettings schemas are expected to be installed in $datadir/glib-2.0/schemas +;;; directory. We load them via the GUIX_GSETTINGS_SCHEMA_DIR search path. +(define (gsettings-schema-directories inputs) + "Check for the existence of \"$datadir/glib-2.0/schemas\" in INPUTS. +Return a list with all found directories." + (define (gsettings-schema-directory input previous) + (let* ((in (match input + ((_ . dir) dir) + (_ ""))) + (schema-dir (string-append in "/share/glib-2.0/schemas"))) + (if (and (directory-exists? schema-dir) + (not (directory-included? schema-dir previous))) + (cons schema-dir previous) + previous))) + + (fold gsettings-schema-directory '() inputs)) + ;; All GIO modules are expected to be installed in GLib's $libdir/gio/modules ;; directory. That directory has to include a file called giomodule.cache -;; listing all available modules. GIO can be made aware of modules in other -;; directories with the help of the environment variable GIO_EXTRA_MODULES. -;; The official GIO documentation states that this environment variable should -;; only be used for testing and not in a production environment. However, it -;; appears that there is no other way of specifying multiple modules -;; directories (NIXOS also does use this variable). See -;; https://developer.gnome.org/gio/stable/running-gio-apps.html +;; listing all available modules. We load them via the GUIX_GIO_EXTRA_MODULES +;; search path. (define (gio-module-directories inputs) "Check for the existence of \"$libdir/gio/modules\" in the INPUTS and returns a list with all found directories." @@ -141,50 +154,61 @@ (define (gio-module-directories inputs) (fold gio-module-directory '() inputs)) + +;;; XXX: Only works for ELF executables and python3 scripts. (define* (wrap-all-programs #:key inputs outputs (glib-or-gtk-wrap-excluded-outputs '()) #:allow-other-keys) "Implement phase \"glib-or-gtk-wrap\": look for GSettings schemas and -gtk+-v.0 libraries and create wrappers with suitably set environment variables +GTK libraries and create @file{etc/search-paths.d} with suitably set of files if found. Wrapping is not applied to outputs whose name is listed in GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not to contain any GLib or GTK+ binaries, and where wrapping would gratuitously -add a dependency of that output on GLib and GTK+." - ;; Do not require bash to be present in the package inputs - ;; even when there is nothing to wrap. - ;; Also, calculate (sh) only once to prevent some I/O. - (define %sh (delay (search-input-file inputs "bin/bash"))) - (define (sh) (force %sh)) +add a dependency of that output on GLib and GTK." (define handle-output (match-lambda ((output . directory) (unless (member output glib-or-gtk-wrap-excluded-outputs) - (let* ((bindir (string-append directory "/bin")) - (libexecdir (string-append directory "/libexec")) - (bin-list (filter (negate wrapped-program?) - (append (find-files bindir ".*") - (find-files libexecdir ".*")))) - (datadirs (data-directories + (let* ((datadirs (data-directories (alist-cons output directory inputs))) - (gtk-mod-dirs (gtk-module-directories + (confdirs (conf-directories (alist-cons output directory inputs))) - (gio-mod-dirs (gio-module-directories + (schemadirs (gsettings-schema-directories (alist-cons output directory inputs))) - (env-vars `(,@(if (not (null? datadirs)) - (list `("XDG_DATA_DIRS" ":" prefix ,datadirs)) - '()) - ,@(if (not (null? gtk-mod-dirs)) - (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs)) - '()) - ,@(if (not (null? gio-mod-dirs)) - (list `("GIO_EXTRA_MODULES" ":" - prefix ,gio-mod-dirs)) - '())))) - (for-each (lambda (program) - (apply wrap-program program #:sh (sh) env-vars)) - bin-list)))))) + (gtk2-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "2.0")) + (gtk3-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "3.0")) + (gtk4-mod-dirs (gtk-module-directories + (alist-cons output directory inputs) + "4.0")) + (gio-mod-dirs (gio-module-directories + (alist-cons output directory inputs)))) + (when (not (null? datadirs)) + (write-search-path-file directory "GUIX_XDG_DATA_DIRS" + (string-join datadirs ":"))) + (when (not (null? confdirs)) + (write-search-path-file directory "GUIX_XDG_CONFIG_DIRS" + (string-join confdirs ":"))) + (when (not (null? schemadirs)) + (write-search-path-file directory "GUIX_GSETTINGS_SCHEMA_DIR" + (string-join schemadirs ":"))) + (when (not (null? gtk2-mod-dirs)) + (write-search-path-file directory "GUIX_GTK2_PATH" + (string-join gtk2-mod-dirs ":"))) + (when (not (null? gtk3-mod-dirs)) + (write-search-path-file directory "GUIX_GTK3_PATH" + (string-join gtk3-mod-dirs ":"))) + (when (not (null? gtk4-mod-dirs)) + (write-search-path-file directory "GUIX_GTK4_PATH" + (string-join gtk4-mod-dirs ":"))) + (when (not (null? gio-mod-dirs)) + (write-search-path-file directory "GUIX_GIO_EXTRA_MODULES" + (string-join gio-mod-dirs ":")))))))) (for-each handle-output outputs)) -- 2.47.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 27 08:20:41 2025 Received: (at control) by debbugs.gnu.org; 27 Jan 2025 13:20:41 +0000 Received: from localhost ([127.0.0.1]:59948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcP2e-0002Xo-Rk for submit@debbugs.gnu.org; Mon, 27 Jan 2025 08:20:41 -0500 Received: from mail.envs.net ([5.199.136.28]:50410) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcP2d-0002Xe-5U for control@debbugs.gnu.org; Mon, 27 Jan 2025 08:20:39 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 404D438A2BE6 for ; Mon, 27 Jan 2025 13:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1737984038; bh=TTo7Rjd2+B4YqPDJ/e4473J2KdLSkbyf87h126z/YZ4=; h=From:To:Subject:Date:From; b=n8L8Fph3k6POF7RLexjZeiUi7ZtgaUr9PdxnW9kUFrvKRFtVYPAKTINqhoWg5WwKG PzqNpxf1faNyn1w67cTsWB4OA3YOommVFRK4OF3Z/geo2a9BlrWXie+4OnyxONLm1f X0r9tNx4ajrjVA1EdiaQdFudbHwM87F34lp3qq74WE8A+nBZ3UidG/wboqr1IBWWoe v2l9YNBJWchF8GZvb/4IIODDdJMSeHEDGEcrZ8qIdwZfvAj9JvoilyC+jzleXBSSsM e/yIe++gRPOr8gGU2zuBDxiGJJY3xJZhHI8QeoJauO50DRaXA6HI7tMNOkAD64O/G7 TFi+e+039hiQDlv5DvLkgw+wyqRLdMXg+KxPQ1jn69aZPx0xhjbmHE6Uj7xvpBsc+6 IwF3iVfn28OX+xcLkOM3iz+KWoH/6uUq/yeVoZc3nKZSV1i62VC45qcf+SnYDHpoyp LFM9sGUaVn1mKnAf80mbgMDYoOiiLOM0z3x8FZ+gZaCuPlljZyoMndZ4rrQEDebfmx eqgDePTGfqXiY9slkjI5SaJz9zZtpfBXA4JWYs2NRWENs2SqyeQQ/9JGNQ97etfYJ4 1Y4UM8IGIMG5fL0p2NQkPz+rT4U6w/cH6/1dhjs/k9S/XucdvPefHJWi0YIjSVEOPe sMenP1S/5Y88U5FsYAN7VRi0= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wAj2YEb8TgGF for ; Mon, 27 Jan 2025 13:20:36 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA for ; Mon, 27 Jan 2025 13:20:36 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id e19e872c for ; Mon, 27 Jan 2025 13:24:12 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: control@debbugs.gnu.org Subject: control message for bug #75688 Date: Mon, 27 Jan 2025 21:24:12 +0800 Message-ID: <87y0yw1jb7.fsf@envs.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) retitle 75688 Replace wrapper scripts with search path value files in search-paths.d quit From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Jan 2025 02:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17380321124608 (code B ref 75688); Tue, 28 Jan 2025 02:42:01 +0000 Received: (at 75688) by debbugs.gnu.org; 28 Jan 2025 02:41:52 +0000 Received: from localhost ([127.0.0.1]:35088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcbXz-0001CF-QV for submit@debbugs.gnu.org; Mon, 27 Jan 2025 21:41:52 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:55445) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcbXx-0001Bx-9F for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 21:41:50 -0500 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ee397a82f6so9014323a91.2 for <75688@debbugs.gnu.org>; Mon, 27 Jan 2025 18:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738032103; x=1738636903; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dh5gd2AiMRs/dNcw4oa5tNuSKiwCWejxyXOf8ntbR/A=; b=TKmEM8XN9fOBlLliZ0CMpcYo2tsLXVxxQR5yRF8gT+sY6WC3bZ3wQPqOD0Eq1Q7H1L KiFKWQroKn1SD0avrZCmRRXx6ph9mtHQd6uCgGlF4p4uQ5VBog/WPOguOH7pGpztOw+d u5FW6s/5Zn5zNnLKKoBHFl9Bzbe4mjMHv/GCS6ZdN+JsE7xAEXKLOXABSpa0XwWI3dAc yNzOiJU6M9hwq/zO/3VLOOWQqoV+0goLhbC1jv0pMl2DCANoFGSKPx5v0woOYrB6asEv BCtWAUBr6d0Y+GZBouzCHGXVY6wD2gwuwWNWqbqHZT5V/blaKvOlxsKL4iC4DCYKfQGR rnjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738032103; x=1738636903; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dh5gd2AiMRs/dNcw4oa5tNuSKiwCWejxyXOf8ntbR/A=; b=Lqkl7OJ/HbgQhKv2PtnDGVw7ntUNHyDLkYVQFT7KBY85UtlPpGRFk6CnQ390lT19Wf 3GsRzkH1oq6g87jTY1lCy3IYqQU8NaJBZl3n6BB2EX02cJ2aCkbH5X6ADYyjGXWFd7bC kMd6DQ1B8HnFJT0zn01yFPo8npnKilvr8zeS574ffyrjffcFQfcqnn+bBLxcdJH1Ne4y dZlbyTf345zPt8fNCYaNqDhFFcHTNSAjYHV9nMZx+DJe2dTikAleXhggj+LGISX/BnRY YSKI0VaHpaypHPFXm7jP0NQeYiDzyAkc9ovFznBR/sMHFegbmc1Vj4YY4gDAsWDr1SBV HS7A== X-Gm-Message-State: AOJu0YxR8Zgqv0zv1PVYIlYNutH0Ql0I3Wv8lopf5A4ixhJnzTLmx6Mu ABBgzAgaXeSzw5ItBv8JR0EW0ip5HLJsRK7k9281UG3aWz9n5ozS X-Gm-Gg: ASbGncuTTTc1s87JzJ7nRq8LBGPbwXzcboYM7G9pSdZsUWdygRef4fpbc9SRL7KGy9p 2aXjkEHZcfUY7d89vguTy3MKJe/ImIoNuR1Z90kGWCuWjVa661YTuXlg2wotlckoWKcbh3hP1WV EXien3W69tjC6GvADRnECPa8cIaQpog7YUoovTNzwvqAaBFCOvbQvxSuOv1frJXNHDXf/Dm54PU RwcGX2czyOcQ2fFE1D+aGzz1TJNpXoAeIRQ/i2Sew6b5MGiAwrstHURjYmns6OrUI3eifxSWZPu XAcM/buCUFPP X-Google-Smtp-Source: AGHT+IHQSivWqoXb1KHwzlUHA6W7mdoc9vG+5iogQWORA8RX0Pkpw8UcDwnId6xK/EOl6KWgx0FqMg== X-Received: by 2002:a05:6a00:b8b:b0:725:eacf:cfdb with SMTP id d2e1a72fcca58-72dafbd4fd1mr60952415b3a.24.1738032102886; Mon, 27 Jan 2025 18:41:42 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a77c846sm8108248b3a.148.2025.01.27.18.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 18:41:42 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Mon, 27 Jan 2025 21:21:20 +0800") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> Date: Tue, 28 Jan 2025 11:41:31 +0900 Message-ID: <87wmefu0bo.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, A few additional comments. iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > Add a new function "g_build_guix_search_path_dirs" to GLIB, which in addi= tion nitpick: It's spelled GLib, not GLIB. > to environment variables, reads search path values from the etc/search-pa= ths.d > directory of the current executable. This can be used to replace wrapper > scripts. > > Use it for GUIX_GSETTINGS_SCHEMA_DIR, GUIX_GIO_EXTRA_MODULES, > GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS. > > * gnu/packages/patches/glib-guix-search-paths.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/glib.scm (glib)[source]: Add patch. > [native-search-paths]: Add GUIX_GSETTINGS_SCHEMA_DIR. Replace > GIO_EXTRA_MODULES with GUIX_GIO_EXTRA_MODULES. Sounds good. [...] > ++gchar ** > ++g_build_guix_search_path_dirs (const gchar *variable) > ++{ > ++ gchar **dirs =3D NULL; > ++ char *value =3D NULL; > ++ GStrvBuilder *builder =3D g_strv_builder_new (); > ++ > ++ /* First add paths from the etc/search-paths.d, which can be used to = replace wrapper script. */ Please wrap at 80 chars width, here and elsewhere. > ++ gchar *out_path =3D NULL; > ++ gchar *search_paths_d =3D NULL; > ++ gchar *exe_path =3D g_file_read_link ("/proc/self/exe", NULL); > ++ > ++ /* For scripts, we use GUIX_MAIN_SCRIPT_PATH to find its location. */ > ++ if (g_strcmp0 (exe_path, g_getenv ("GUIX_INTERPRETER_PATH")) =3D=3D 0= ) { > ++ g_free (exe_path); > ++ exe_path =3D g_getenv ("GUIX_MAIN_SCRIPT_PATH"); > ++ } I don't have an opinion yet about GUIX_MAIN_SCRIPT_PATH and GUIX_INTERPRETER_PATH, defined in the next patch of this series. I'll comment there. > ++ /* We install executables under "bin" or "libexec", can also be a sub= directory of "libexec". */ nitpick: I'd reword to something like: Executables are installed under the bin or libexec prefix; they may also be found in a sub-directory of libexec. > ++ if (exe_path && (g_str_match_string("/bin/", exe_path, FALSE) || > ++ g_str_match_string("/libexec/", exe_path, FALSE))) { > ++ /* Find output directory, which is the parent directory of "bin" or= "libexec". */ nitpick: Find *the* output The rest still LGTM. Reviewed-by: Maxim Cournoyer --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Jan 2025 04:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Sharlatan Hellseher , Munyoki Kilyungi , 75688@debbugs.gnu.org, Lars-Dominik Braun , jgart , Marius Bakke , Tanguy Le Carrour Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173804012327232 (code B ref 75688); Tue, 28 Jan 2025 04:56:02 +0000 Received: (at 75688) by debbugs.gnu.org; 28 Jan 2025 04:55:23 +0000 Received: from localhost ([127.0.0.1]:35208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcddC-00075A-Qn for submit@debbugs.gnu.org; Mon, 27 Jan 2025 23:55:23 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:43107) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcdd9-00072d-KO for 75688@debbugs.gnu.org; Mon, 27 Jan 2025 23:55:20 -0500 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2ee50ffcf14so9694734a91.0 for <75688@debbugs.gnu.org>; Mon, 27 Jan 2025 20:55:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738040113; x=1738644913; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0uYq+QQeIFECBWtul2Uuilohq4+Bd38uP6FhBS+2YEk=; b=P5f73ysjZvd7cWNNR8f68DNQm8zxYRNVXF1okRhwCEu7kMKv1OvRrKQPaYAGhIm9o0 rxVL8uoFqaiJj+FU1cpz9BVigGM2Vf0RPuC2mI+ReIjH9PjCAz9yjTjGghBnAp2mMgMX 6SOi4V/i2HYXmIorHNuZIgxDkv5TuzG/3TjoS8EHSX5NjNbzj+V6MwSe+UI3RURSF1zF DghnxIUa6aoS6sGipSZaA5xpeqZ7qU1A6VfJ6QSrAJuPnZ1DOl24k6Eq18C2nnYUApfg 9/qoHdz9AoJtooFE8BiFRSgn2ohSv4nA5xau1Nb5m98ljcXeuHbAILC4b41wxPj6JqU8 HUug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738040113; x=1738644913; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0uYq+QQeIFECBWtul2Uuilohq4+Bd38uP6FhBS+2YEk=; b=OIC8yHzbbbcPDUO88TMVJm4efwv2u79tHD+SY6luOxP0gQFTWNXqT5oy6IERve/g6s OWIgqgipqw8nadulDt9Y8PpstNhs5zqazDSkRL6T1BB0QgGqU/fAMoDpsVqt6loOhCY5 kkA37a+Ie1YbV826NjYfdkKdsUExyPgb5X0M6Uj++C1F2QKe300Bm1V9C/781yA2bQCO t+SrYGQd3ys8GepTorbtM4jlrMYzHttxlLCi+qaSMzxK3SedCv/a4c13FICImWyk8vcF PuAQn7Ohh9ULAFVQ+sPG5oPA1EaOAWVzLZ5nduBLtHcVLsvpdup2aR+Eb7DFSr/WTC2B v0tw== X-Gm-Message-State: AOJu0YydL7tsFjkxdLAFWfgPSVDmYGU06ZXnmbqeCHZP/VjWVv6ItKHt PT8RF7phIuizPVvODLf/k+wy6BcwY5lHho6Q2ZDjKjzHbd5yK9cv X-Gm-Gg: ASbGncuyLVLezeFrNgMSMzFy482UAKCV6ekJUl9DFbHCNQPasRshPNhov7xDV0mTrCf YiRmHToM/K9omu18/IBOQYT8Rqap4RDG+AFQfxrzTrvgFnU7RknXfHsOUa9TeSBH4jSD5lFcFbS I8wjJEhNBmszRknripWW5pHXs2IspFVkFuCPnS5n2NIjvpJyELe6AwWIyuzV4PcNT1fXaO27bkt s2svDAWpfR21OdMlHG098hp6dCjzTq2vGC8vSLeCCsdz+1OAneUr2o2Dm3ByfWvVX/fkU0M5Asa Es4I/d6mzZWr X-Google-Smtp-Source: AGHT+IGS4nNAZy4mlpO+dWtD+7nsOZPcXrBnpilm+O0Wm9d9gd5BwB7nZaTikrauji6Oo81hmy17LQ== X-Received: by 2002:a17:90a:fd97:b0:2ee:7504:bb3d with SMTP id 98e67ed59e1d1-2f82be44dcemr3359444a91.0.1738040113427; Mon, 27 Jan 2025 20:55:13 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7ffa77043sm9129321a91.35.2025.01.27.20.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 20:55:12 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <74079e8d389a7c278bdbbecac5075c4170446edf.1737983975.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Mon, 27 Jan 2025 21:21:21 +0800") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <74079e8d389a7c278bdbbecac5075c4170446edf.1737983975.git.iyzsong@member.fsf.org> Date: Tue, 28 Jan 2025 13:55:00 +0900 Message-ID: <87o6zrtu57.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > This is used by 'g_build_guix_search_path_dirs' in our patched GLIB. > > * gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch: New patc= h. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/python.scm (python-3.10)[source]: Add it. [...] > diff --git a/gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patc= h b/gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch > new file mode 100644 > index 0000000000..2f173c68c8 > --- /dev/null > +++ b/gnu/packages/patches/python-3-set-GUIX_INTERPRETER_PATH.patch > @@ -0,0 +1,28 @@ > +The 'g_build_guix_search_path_dirs' function in our patched GLIB requires s/function/procedure/, s/GLIB/GLib/ > +2 environment variables (GUIX_INTERPRETER_PATH and > GUIX_MAIN_SCRIPT_PATH) to I'd reword this to 'the GUIX_INTERPRETER_FILE and GUIX_MAIN_SCRIPT_FILE environment variables to' > +check if the current executable is a script launched by an interpreter, = and > +find the script path if it is. I'd replace 'path' by 'file name' everywhere except perhaps in environment variables where I'd use just '_FILE' for brevitiy, as path conventionally implies multiple entries, and the GNU project prefers to call the path of files 'file names' (see info '(Standards) GNU Manuals', a manual from the autoconf package): --8<---------------cut here---------------start------------->8--- Please do not use the term "pathname" that is used in Unix documentation; use "file name" (two words) instead. We use the term "path" only for search paths, which are lists of directory names. --8<---------------cut here---------------end--------------->8--- > +--- > +diff --git a/Modules/main.c b/Modules/main.c > +index 5bb1de2..83ada3d 100644 > +--- a/Modules/main.c > ++++ b/Modules/main.c > +@@ -636,6 +636,18 @@ pymain_run_python(int *exitcode) > + prepended to sys.path. > + > + Otherwise, main_importer_path is left unchanged. */ > ++ > ++ /* Set environment variables to support 'search-paths.d'. */ > ++ char *exe_path =3D realpath("/proc/self/exe", NULL); > ++ PyObject *filename =3D PyUnicode_FromWideChar(config->run_filen= ame, -1); > ++ const char *main_script_path =3D PyUnicode_AsUTF8(filename); > ++ if (exe_path !=3D NULL && main_script_path !=3D NULL) { I assume the !=3D NULL guards to avoid the condition where allocating memory failed? Perhaps prefer to do something like: if (!(exe_path && main_script_path)) { printf("memory allocation failure, aborting\n"); exit(1); } > ++ setenv("GUIX_INTERPRETER_PATH", exe_path, 1); > ++ setenv("GUIX_MAIN_SCRIPT_PATH", main_script_path, 1); > ++ } > ++ free(exe_path); > ++ Py_DECREF(filename); > ++ I was wondering, if instead of having to patch every interpreter out there, would it be possible to infer this inside glib by having a list of interpreter base names? e.g. python, guile, etc., and when we find these in /proc/self/exe, we look at the /proc/self/comm and extract arg1 from there, which hopefully would be the script? But that'd be fragile given the script argument position is not guaranteed to come as arg1, it could come later, e.g. for some scripts launched via '#/usr/bin/env -S python3 --some-option ...'. Your solution should be more reliable for that reason, so perhaps it's necessary. --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Jan 2025 05:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173804081229184 (code B ref 75688); Tue, 28 Jan 2025 05:07:02 +0000 Received: (at 75688) by debbugs.gnu.org; 28 Jan 2025 05:06:52 +0000 Received: from localhost ([127.0.0.1]:35219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcdoK-0007ae-3B for submit@debbugs.gnu.org; Tue, 28 Jan 2025 00:06:52 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46122) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcdoH-0007aM-Tu for 75688@debbugs.gnu.org; Tue, 28 Jan 2025 00:06:50 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-219f8263ae0so95623375ad.0 for <75688@debbugs.gnu.org>; Mon, 27 Jan 2025 21:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738040803; x=1738645603; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2Pc/6d53UQcIauKH/UuvV74Kx+UVfTez24aGsnactYg=; b=J4xBcEaTcofZXUeR8di5ePMScbJiY2BYCJIIab2RqHfv+qDU3SLP/bBc1s5aeZvyv4 Veb/QMwCIlXPS9oVcxfRpB2fs1lXiw8x50wWVWD9Nb8AsXZ7qK6S8v0IqWRINxHxMHzR Kr7okK6xFYJ8k5ZFZ3auuhQIanSr+kaptwo1MX39DKRvzF+F/gYs1bEnTdsX9MOODclY 0gSZAnkV6VKhjym0DVuKHYTlnQcuPF0pIieb0bIEYqJ5dMdQ+LP1KNQJ8Pquqcyf5GM2 NYlVUEXkUxoFpN1/s9UpkqPGrL8B5GimQo9sfXFjBy+3WBrJU486Mf9X2hv/N1p13Wtu HT2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738040803; x=1738645603; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2Pc/6d53UQcIauKH/UuvV74Kx+UVfTez24aGsnactYg=; b=MYL1RP7qtxUixqGK1qy7I0Dn1WBzn1eHVlIi3NMNFu0dGBIELlqsbmJcZo48O4T36d XjM8qcROunpvF2fn7Kjt9+hLvMMXTzGpWYna2KdHpr0Y+CPIgPK1CK9G0DOZRgTZEP9o Bt2ypS98EDP2dK8u/hBFyxN9Q9dcGEC2XzV6M5rvA8peLAVILyUVI8caqs6i1Dv3ogrn Ux4djZ12Z5JmpIvoJso/WXwfJQ3hI8jdFRf/YwLuhwR8M2lJm5mpA6Y/9z4X0ed/nSwR Qn8OJ0o02txuTrZfYLGcoGuy1wXPy7B03qtuVgtvHsegaI9nvcL/944gVYRNC+hg5wU5 qNXA== X-Gm-Message-State: AOJu0YyufIuM4v2CvI8qvoBNJhDEqydHqGf4f1F2Q57TUvnsbLqbj5aK nDDB1yqNfUliHPG/yTkYSGMYWAKicqz7RrC+TU/rmzQI1QSvhmVSjg4ZIupz X-Gm-Gg: ASbGncvPFLFhC7cV1UzHaQcuGrdgkCsBduFm6ZmDetGCRhjLd9zBjAeekpXtme0xFDp vtEG2kn23xqx7u2L/6aOSP9Jql8UhPAi5fLVehPpTd7V14Uqq/5+VhulzTnj5s6PltnCj83QwOS DFD/+eN/yvEc3hByUuOxNfXivF1PqlRCeN0WEcXM/zWELI1jGdLv3lJW/9O4TH12l3JCS87OehB 3A9hMgsvYmbjfG4F6RvYlMYx8mdOHzUw252mxaLQKSVgXft+boh2M6Zo4b3/j5LId7g5ZPUABhe RbrMTMtbDeRi X-Google-Smtp-Source: AGHT+IEmZfOpZxeNs/jAKfhp8ImkO53ggi2FIS6gJtF1pBLrjqIKbUTw/8UwcToikE/AJSgq1W8EDA== X-Received: by 2002:a17:902:cf0e:b0:212:4c82:e3d4 with SMTP id d9443c01a7336-21c356093bcmr678450945ad.46.1738040803150; Mon, 27 Jan 2025 21:06:43 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da424d59dsm71630005ad.218.2025.01.27.21.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 21:06:42 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <08a25b1c35ccc1fa3869bc1cdf3b6e8f883de4d6.1737983975.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Mon, 27 Jan 2025 21:21:22 +0800") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <08a25b1c35ccc1fa3869bc1cdf3b6e8f883de4d6.1737983975.git.iyzsong@member.fsf.org> Date: Tue, 28 Jan 2025 14:06:32 +0900 Message-ID: <87jzafttlz.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > * gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch, > gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch, > gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch: Rewrite in terms > of 'g_build_guix_search_path_dirs'. Nitpick: not documented in info '(standards) Style of Change Logs', but I think you don't need to put commas after the file names above. It should rather look like below, I think: --8<---------------cut here---------------start------------->8--- * file_one * file_two * file_three: Rewrite in terms of ... --8<---------------cut here---------------end--------------->8--- [...] > diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch b/gnu= /packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch > index 93a8ddc242..fb6c7809f9 100644 > --- a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch > +++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch > @@ -1,46 +1,20 @@ > -This patch makes GTK+ look for additional modules in a list of directori= es > -specified by the environment variable "GUIX_GTK2_PATH". This can be used > -instead of "GTK_PATH" to make GTK+ find modules that are incompatible wi= th > -other major versions of GTK+. > +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c > +index 50729b61a5..2d4c2c2a85 100644 > +--- a/gtk/gtkmodules.c > ++++ b/gtk/gtkmodules.c > +@@ -96,5 +96,15 @@ get_module_path (void) > + result =3D pango_split_file_list (module_path); > + g_free (module_path); >=20=20 > ---- a/gtk/gtkmodules.c 2014-09-29 22:02:17.000000000 +0200 > -+++ b/gtk/gtkmodules.c 2015-12-02 18:41:53.306396938 +0100 > -@@ -55,6 +55,7 @@ > - get_module_path (void) > - { > - const gchar *module_path_env; > -+ const gchar *module_guix_gtk2_path_env; > - const gchar *exe_prefix; > - const gchar *home_dir; > - gchar *home_gtk_dir =3D NULL; > -@@ -70,6 +71,7 @@ > - home_gtk_dir =3D g_build_filename (home_dir, ".gtk-2.0", NULL); > -=20 > - module_path_env =3D g_getenv ("GTK_PATH"); > -+ module_guix_gtk2_path_env =3D g_getenv ("GUIX_GTK2_PATH"); > - exe_prefix =3D g_getenv ("GTK_EXE_PREFIX"); > -=20 > - if (exe_prefix) > -@@ -77,9 +79,21 @@ > - else > - default_dir =3D g_build_filename (GTK_LIBDIR, "gtk-2.0", NULL); > -=20 > -- if (module_path_env && home_gtk_dir) > > -+ if (module_guix_gtk2_path_env && module_path_env && home_gtk_dir) > -+ module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > -+ module_guix_gtk2_path_env, module_path_env, home_gtk_dir, default_d= ir, NULL); > -+ else if (module_guix_gtk2_path_env && home_gtk_dir) > -+ module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > -+ module_guix_gtk2_path_env, home_gtk_dir, default_dir, NULL); > -+ else if (module_guix_gtk2_path_env && module_path_env) > -+ module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > -+ module_guix_gtk2_path_env, module_path_env, default_dir, NULL); > -+ else if (module_path_env && home_gtk_dir) > - module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > - module_path_env, home_gtk_dir, default_dir, NULL); > -+ else if (module_guix_gtk2_path_env) > -+ module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > -+ module_guix_gtk2_path_env, default_dir, NULL); > - else if (module_path_env) > - module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > - module_path_env, default_dir, NULL); > ++ /* GUIX: Load additional modules from GUIX_GTK2_PATH. */ I'd drop 'GUIX: ' at the front of the above comment. > ++ GStrvBuilder *builder =3D g_strv_builder_new (); > ++ g_strv_builder_addv (builder, (const gchar **) result); > ++ g_strfreev (result); > ++ result =3D g_build_guix_search_path_dirs ("GUIX_GTK2_PATH"); > ++ g_strv_builder_addv (builder, (const gchar **) result); > ++ g_strfreev (result); > ++ result =3D g_strv_builder_end (builder); > ++ g_strv_builder_unref (builder); > ++ > + return result; > + } > > diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch b/gnu= /packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch > index 66fd2fd1c4..28e232a812 100644 > --- a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch > +++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch > @@ -1,38 +1,21 @@ > -This patch makes GTK+ look for additional modules in a list of directori= es > -specified by the environment variable "GUIX_GTK3_PATH". This can be used > -instead of "GTK_PATH" to make GTK+ find modules that are incompatible wi= th > -other major versions of GTK+. > - > ---- a/gtk/gtkmodules.c 2015-09-20 20:09:05.060590217 +0200 > -+++ b/gtk/gtkmodules.c 2015-09-20 20:10:33.423124833 +0200 > -@@ -52,6 +52,7 @@ > - get_module_path (void) > - { > - const gchar *module_path_env; > -+ const gchar *module_guix_gtk3_path_env; > - const gchar *exe_prefix; > - gchar *module_path; > - gchar *default_dir; > -@@ -61,6 +62,7 @@ > - return result; > +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c > +index f93101c272..b57e1da802 100644 > +--- a/gtk/gtkmodules.c > ++++ b/gtk/gtkmodules.c > +@@ -81,6 +81,16 @@ get_module_path (void) > + result =3D gtk_split_file_list (module_path); > + g_free (module_path); >=20=20=20 > - module_path_env =3D g_getenv ("GTK_PATH"); > -+ module_guix_gtk3_path_env =3D g_getenv ("GUIX_GTK3_PATH"); > - exe_prefix =3D g_getenv ("GTK_EXE_PREFIX"); > ++ /* GUIX: Load additional modules from GUIX_GTK3_PATH. */ > ++ GStrvBuilder *builder =3D g_strv_builder_new (); > ++ g_strv_builder_addv (builder, (const gchar **) result); > ++ g_strfreev (result); > ++ result =3D g_build_guix_search_path_dirs ("GUIX_GTK3_PATH"); > ++ g_strv_builder_addv (builder, (const gchar **) result); > ++ g_strfreev (result); > ++ result =3D g_strv_builder_end (builder); > ++ g_strv_builder_unref (builder); > ++ > + return result; > + } >=20=20=20 > - if (exe_prefix) > -@@ -68,7 +70,13 @@ > - else > - default_dir =3D g_build_filename (_gtk_get_libdir (), "gtk-3.0", NU= LL); > -=20 > -- if (module_path_env) > > -+ if (module_guix_gtk3_path_env && module_path_env) > -+ module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > -+ module_guix_gtk3_path_env, module_path_env, default_dir, NULL); > -+ else if (module_guix_gtk3_path_env) > -+ module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > -+ module_guix_gtk3_path_env, default_dir, NULL); > -+ else if (module_path_env) > - module_path =3D g_build_path (G_SEARCHPATH_SEPARATOR_S, > - module_path_env, default_dir, NULL); > - else > > diff --git a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch b/gnu= /packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch > index 4a60023bf7..56c202ecf4 100644 > --- a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch > +++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch > @@ -1,51 +1,21 @@ > -From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001 > -From: Raghav Gururajan > -Date: Tue, 18 May 2021 19:57:00 -0400 > -Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH. > - > -This patch makes GTK look for additional modules in a list of directories > -specified by the environment variable "GUIX_GTK4_PATH". This can be used > -instead of "GTK_PATH" to make GTK find modules that are incompatible with > -other major versions of GTK. > ---- > - gtk/gtkmodules.c | 10 +++++++++- > - 1 file changed, 9 insertions(+), 1 deletion(-) > - > diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c > -index aace5dcbc9..193b6a02e9 100644 > +index 51b0916624..0cd6ee7e30 100644 > --- a/gtk/gtkmodules.c > +++ b/gtk/gtkmodules.c > -@@ -105,6 +105,7 @@ static char ** > - get_module_path (void) > - { > - const char *module_path_env; > -+ const gchar *module_guix_gtk4_path_env; > - const char *exe_prefix; > - char *module_path; > - char *default_dir; > -@@ -114,6 +115,7 @@ get_module_path (void) > - return result; > +@@ -132,6 +132,16 @@ get_module_path (void) > + result =3D split_file_list (module_path); > + g_free (module_path); >=20=20=20 > - module_path_env =3D g_getenv ("GTK_PATH"); > -+ module_guix_gtk4_path_env =3D g_getenv ("GUIX_GTK4_PATH"); > - exe_prefix =3D g_getenv ("GTK_EXE_PREFIX"); > ++ /* GUIX: Load additional modules from GUIX_GTK4_PATH. */ > ++ GStrvBuilder *builder =3D g_strv_builder_new (); > ++ g_strv_builder_addv (builder, (const gchar **) result); > ++ g_strfreev (result); > ++ result =3D g_build_guix_search_path_dirs ("GUIX_GTK4_PATH"); > ++ g_strv_builder_addv (builder, (const gchar **) result); > ++ g_strfreev (result); > ++ result =3D g_strv_builder_end (builder); > ++ g_strv_builder_unref (builder); > ++ > + return result; > + } While I find it difficult to review a diff of a diff, the above looks reasonable to me. Reviewed-by: Maxim Cournoyer --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Jan 2025 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17380698737811 (code B ref 75688); Tue, 28 Jan 2025 13:12:02 +0000 Received: (at 75688) by debbugs.gnu.org; 28 Jan 2025 13:11:13 +0000 Received: from localhost ([127.0.0.1]:35914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tclN2-00021t-Hd for submit@debbugs.gnu.org; Tue, 28 Jan 2025 08:11:13 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46143) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tclMz-00021e-29 for 75688@debbugs.gnu.org; Tue, 28 Jan 2025 08:11:10 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-219f8263ae0so101790175ad.0 for <75688@debbugs.gnu.org>; Tue, 28 Jan 2025 05:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738069863; x=1738674663; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mdoxWNu93gx2+/Jw49HxP15IJa6Q2LQsxr+BfQXYbJU=; b=KEpfDeKR4czJikO5AywG+DvC1xgw8H0B/dEFfWQ8BK6pQBArbcQE2FgwnrgEv6mFOZ G+IWmsIdSvUdgTi4Rxdrwwo4bT0fac7dLDc2s9dyB5RikTsFvgQ2zPlQ9nhaLXEaNKy8 WRoqGdUz9MBqSGrRrmAzbZoofmZ2rR2j/Lc19C6DC+lhFvyUOP+/dEMNEnqR1nAN+iJb knTda/+W4HLIpSYUgSZ79Em8Dl/0wQDwLQxn+VqT4EmGs1U+7a17qQkHFqZSNnUfhpuO 6s9hA8+0CTk37kHU0BwCfGpGWBSalIIwJoHREJp4Ey3j9UZuK20rKKSBqTiUbuDnRszS 4yVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738069863; x=1738674663; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mdoxWNu93gx2+/Jw49HxP15IJa6Q2LQsxr+BfQXYbJU=; b=mYmWUAJ+phyiY76ahUhgzy5n4eUF/fcskdZdKGplxX0+ZYylNSZSaNLwYekVw5+I09 ffdHBMOFqEyabKbokH0BI8ZwB0Kdl+qQCSqGfxsgV/lqoRjwJjX1xbC5W6tapSsipunC hKonxiQ7d3yhC8Tsx/4yZ6NDwklIycvckmZbNSWUlq0gUGu/tpppMAcBnN6Vx3euHyAP 3rv11fIVAd2Xo7vVo9mRxYFXGN6XA0jIcgVaAo6AlpBM46H6u/XkBY8QetT1trBQTG0T g3/Jz5H7mHLB1bjo8zg/cneZiRm2VXd5DY/p9fzKlq4Zmzub8aLIrjILGZBrdb6k0ta9 OVaA== X-Gm-Message-State: AOJu0YwbgVcU61h3pNrWAYhv3HmV2wfJqpp8KLKqjEvvggclI9UWaVvx 7rRuGnsuL3Wp1r/oI2uYhqmJjtK6QdRKB/KRRp2EIUCCFUK+IWAg X-Gm-Gg: ASbGncvs7jNXZo9BpYw1kv3EUj7s/o5+QOM5+0Qpn9Yqn98igNyq/Fi8l1Qtz+XJpZC Dmh0vAaVkXfS3pZUd6TCJROalWxo/pCc6gCIN2DgnbvBGuf1tZLzZw+ly0RWLIqP96tC1i3mvWb 3pUcxRyyj0tkXF3D55h4bnz8xC7E+C+8ctypASUP2NvLoD5vLHo8ooE0NB209F2pFOU37qWr7ut 2+R/KMuymToDH1avSxaD1y82kx5d5Jx0kNlU7k6bnD4iJc7uvqx4tTlSQnECCnoKRXg+H+iJFjL 1WA5wah+7WNx X-Google-Smtp-Source: AGHT+IHkHdb6/hvnoH3ie2p5gS64P9tD0bNWLWy6mTNhGAeJlFMASzfrBDpzw4oR8jYWI6ufmah9MQ== X-Received: by 2002:a17:903:11c3:b0:215:af12:b61a with SMTP id d9443c01a7336-21c35629a68mr645795175ad.50.1738069862509; Tue, 28 Jan 2025 05:11:02 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da3d9c9f2sm80647265ad.42.2025.01.28.05.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 05:11:01 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> (iyzsong@envs.net's message of "Mon, 27 Jan 2025 21:21:23 +0800") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> Date: Tue, 28 Jan 2025 22:10:50 +0900 Message-ID: <87ed0nt76t.fsf_-_@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi, iyzsong@envs.net writes: > From: =E5=AE=8B=E6=96=87=E6=AD=A6 > > * guix/build/glib-or-gtk-build-system.scm (write-search-path-file): > New procedure. > > (gtk-module-directories): Add version to arguments. > (gsettings-schema-directories): New procedure. > (data-directories): Don't check for "/glib-2.0/schemas". Why not? Because it's handled by the new procedure above? > (conf-directories): New procedure. > (wrap-all-programs): Rewrite in terms of 'write-search-path-file'. OK! [...] > +++ b/guix/build/glib-or-gtk-build-system.scm > @@ -4,6 +4,7 @@ [...] > +(define* (write-search-path-file output variable value) > + "Write VALUE to @file{etc/search-paths.d/VARIABLE} under OUTPUT." > + (let ((search-paths.d (string-append output "/etc/search-paths.d"))) > + (mkdir-p search-paths.d) > + (with-output-to-file (string-append search-paths.d "/" variable) > + (lambda () (display value))))) I think (call-with-output-port (lambda (port) (format port "..."))) would be a bit cleaner (as in more explicit/less magical). > (define (subdirectory-exists? parent sub-directory) > (directory-exists? (string-append parent sub-directory))) > > @@ -47,32 +55,12 @@ (define (directory-included? directory directories-li= st) > (fold (lambda (s p) (or (string-ci=3D? s directory) p)) > #f directories-list)) > > -;; We do not include $HOME/.guix-profile/gtk-v.0 (v=3D2 or 3) because we= do not > -;; want to mix gtk+-2 and gtk+-3 modules. See > -;; https://developer.gnome.org/gtk3/stable/gtk-running.html > -(define (gtk-module-directories inputs) > - "Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a li= st > +;; We load GTK modules via the GUIX_GTK2_PATH, GUIX_GTK3_PATH and GUIX_G= TK4_PATH > +;; search paths. > +(define (gtk-module-directories inputs version) > + "Check for the existence of \"libdir/gtk-VERSION\" in INPUTS. Return = a list > with all found directories." > - (let* ((version > - (cond > - ((string-match "gtk-4" > - (or (assoc-ref inputs "gtk") > - (assoc-ref inputs "source") > - "")) > - "4.0") > - ((string-match "gtk\\+-3" > - (or (assoc-ref inputs "gtk+") > - (assoc-ref inputs "source") > - "")) > - "3.0") > - ((string-match "gtk\\+-2" > - (or (assoc-ref inputs "gtk+") > - (assoc-ref inputs "source") > - "")) > - "2.0") > - (else > - "4.0"))) ; We default to version 4.0. > - (gtk-module > + (let ((gtk-module > (lambda (input prev) > (let* ((in (match input > ((_ . dir) dir) > @@ -85,27 +73,22 @@ (define (gtk-module-directories inputs) > prev))))) > (fold gtk-module '() inputs))) > > -;; See > +;; XDG data files include themes, sounds, icons, etc. See: > ;; http://www.freedesktop.org/wiki/DesktopThemeSpec > ;; http://freedesktop.org/wiki/Specifications/sound-theme-spec > ;; http://freedesktop.org/wiki/Specifications/icon-theme-spec > ;; > -;; Currently desktop themes are not well supported and do not honor > -;; XDG_DATA_DIRS. One example is evince which only looks for desktop th= emes > -;; in $HOME/.themes (for backward compatibility) and in XDG_DATA_HOME (w= hich > -;; defaults to $HOME/.local/share). One way to handle these applications > -;; appears to be by making $HOME/.themes a symlink to > -;; $HOME/.guix-profile/share/themes. > +;; We load them via XDG_DATA_DIRS (from profile, has higher priority) and > +;; GUIX_XDG_DATA_DIRS (application specified) search paths. I'd reword to "The data files are searched from the XDG_DATA_DIRS and GUIX_XDG_DATA_DIRS search paths, with the former having precedence over the later. > (define (data-directories inputs) > - "Check for the existence of \"$datadir/glib-2.0/schemas\" or XDG theme= s data > -in INPUTS. Return a list with all found directories." > + "Check for the existence of XDG data files in INPUTS. Return a list w= ith all found > +directories." > (define (data-directory input previous) > (let* ((in (match input > ((_ . dir) dir) > (_ ""))) > (datadir (string-append in "/share"))) > - (if (and (or (subdirectory-exists? datadir "/glib-2.0/schemas") > - (subdirectory-exists? datadir "/sounds") OK, I see that's handled in gsettings-schema-directories below, as I expected. > + (if (and (or (subdirectory-exists? datadir "/sounds") > (subdirectory-exists? datadir "/themes") > (subdirectory-exists? datadir "/cursors") > (subdirectory-exists? datadir "/wallpapers") > @@ -117,15 +100,45 @@ (define (data-directories inputs) > > (fold data-directory '() inputs)) > > +;;; XDG configuration files are expected to be installed in etc/xdg dire= ctory. > +;;; We load them via XDG_CONFIG_DIRS (from profile, has higher priority)= and > +;;; GUIX_XDG_CONFIG_DIRS (application specified) search paths. Likewise, I'd use something like "The configuration files are searched from the XDG_CONFIG_DIRS and GUIX_XDG_CONFIG_DIRS search paths, with the former having precedence over the later." > +(define (conf-directories inputs) > + "Check for the existence of XDG configuration files in INPUTS. Return= a list with > +all found directories." 80 chars limit (sorry I sound like a broken record; maybe turn on auto-fill-mode with the fill-column variable set at 78 or the equivalent in your editor of choice :-)). > + (define (conf-directory input previous) > + (let* ((in (match input > + ((_ . dir) dir) > + (_ ""))) > + (conf-dir (string-append in "/etc/xdg"))) > + (if (and (directory-exists? conf-dir) > + (not (directory-included? conf-dir previous))) > + (cons conf-dir previous) > + previous))) > + > + (fold conf-directory '() inputs)) > + > +;;; GIO GSettings schemas are expected to be installed in $datadir/glib-= 2.0/schemas > +;;; directory. We load them via the GUIX_GSETTINGS_SCHEMA_DIR search pa= th. in *the* $datadir/glib-2.0/schemas directory Maybe reword to "The schemas are searched from the GSETTINGS_SCHEMA_DIR search path." > +(define (gsettings-schema-directories inputs) > + "Check for the existence of \"$datadir/glib-2.0/schemas\" in INPUTS. > +Return a list with all found directories." > + (define (gsettings-schema-directory input previous) > + (let* ((in (match input > + ((_ . dir) dir) > + (_ ""))) > + (schema-dir (string-append in "/share/glib-2.0/schemas"))) > + (if (and (directory-exists? schema-dir) > + (not (directory-included? schema-dir previous))) > + (cons schema-dir previous) > + previous))) > + > + (fold gsettings-schema-directory '() inputs)) I see most of the code of the above procedure gets repeated twice; you could extract some procedure this out with a prefix argument returning a specialized procedure. > ;; All GIO modules are expected to be installed in GLib's $libdir/gio/mo= dules > ;; directory. That directory has to include a file called giomodule.cac= he > -;; listing all available modules. GIO can be made aware of modules in o= ther > -;; directories with the help of the environment variable GIO_EXTRA_MODUL= ES. > -;; The official GIO documentation states that this environment variable = should > -;; only be used for testing and not in a production environment. Howeve= r, it > -;; appears that there is no other way of specifying multiple modules > -;; directories (NIXOS also does use this variable). See > -;; https://developer.gnome.org/gio/stable/running-gio-apps.html > +;; listing all available modules. We load them via the GUIX_GIO_EXTRA_M= ODULES > +;; search path. Is there a reason why GIO_EXTRA_MODULES (the natively supported environment variable) is not mentioned like in the other cases above? Now that I think about it, since it's not a Guix's responsibility to process these, perhaps we can simply avoid mentioning these native variants in the above comments as well. > (define (gio-module-directories inputs) > "Check for the existence of \"$libdir/gio/modules\" in the INPUTS and > returns a list with all found directories." > @@ -141,50 +154,61 @@ (define (gio-module-directories inputs) > > (fold gio-module-directory '() inputs)) > > + > +;;; XXX: Only works for ELF executables and python3 scripts. Could we fallback to what is currently done (classic wrapping) for the other cases? We would have to detect such situation and conditionalize what happens based on that. Or is the plan to extend to also other scripting languages and cover every known package from the start? That could work also, but it sounds a bit more tedious/risky. > (define* (wrap-all-programs #:key inputs outputs > (glib-or-gtk-wrap-excluded-outputs '()) > #:allow-other-keys) In its current form, this phase should be renamed 'write-search-path-files' or similar; we could introduce a deprecated symbol for wrap-all-programs for backward compatibility. > "Implement phase \"glib-or-gtk-wrap\": look for GSettings schemas and > -gtk+-v.0 libraries and create wrappers with suitably set environment var= iables > +GTK libraries and create @file{etc/search-paths.d} with suitably set of = files > if found. Maybe rewrite to: [...] create the @file{etc/search-paths.d} directory containing one file per search path variable for which there were matches found. > Wrapping is not applied to outputs whose name is listed in > GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is kno= wn not > to contain any GLib or GTK+ binaries, and where wrapping would gratuitou= sly > -add a dependency of that output on GLib and GTK+." > - ;; Do not require bash to be present in the package inputs > - ;; even when there is nothing to wrap. > - ;; Also, calculate (sh) only once to prevent some I/O. > - (define %sh (delay (search-input-file inputs "bin/bash"))) > - (define (sh) (force %sh)) > +add a dependency of that output on GLib and GTK." > (define handle-output > (match-lambda > ((output . directory) > (unless (member output glib-or-gtk-wrap-excluded-outputs) > - (let* ((bindir (string-append directory "/bin")) > - (libexecdir (string-append directory "/libexec")) > - (bin-list (filter (negate wrapped-program?) > - (append (find-files bindir ".*") > - (find-files libexecdir ".*")))) > - (datadirs (data-directories > + (let* ((datadirs (data-directories > (alist-cons output directory inputs))) > - (gtk-mod-dirs (gtk-module-directories > + (confdirs (conf-directories > (alist-cons output directory inputs))) > - (gio-mod-dirs (gio-module-directories > + (schemadirs (gsettings-schema-directories > (alist-cons output directory inputs))) > - (env-vars `(,@(if (not (null? datadirs)) > - (list `("XDG_DATA_DIRS" ":" prefix ,da= tadirs)) > - '()) > - ,@(if (not (null? gtk-mod-dirs)) > - (list `("GTK_PATH" ":" prefix ,gtk-mod= -dirs)) > - '()) > - ,@(if (not (null? gio-mod-dirs)) > - (list `("GIO_EXTRA_MODULES" ":" > - prefix ,gio-mod-dirs)) > - '())))) > - (for-each (lambda (program) > - (apply wrap-program program #:sh (sh) env-vars)) > - bin-list)))))) > + (gtk2-mod-dirs (gtk-module-directories > + (alist-cons output directory inputs) > + "2.0")) > + (gtk3-mod-dirs (gtk-module-directories > + (alist-cons output directory inputs) > + "3.0")) > + (gtk4-mod-dirs (gtk-module-directories > + (alist-cons output directory inputs) > + "4.0")) > + (gio-mod-dirs (gio-module-directories > + (alist-cons output directory inputs)))) > + (when (not (null? datadirs)) > + (write-search-path-file directory "GUIX_XDG_DATA_DIRS" > + (string-join datadirs ":"))) > + (when (not (null? confdirs)) > + (write-search-path-file directory "GUIX_XDG_CONFIG_DIRS" > + (string-join confdirs ":"))) > + (when (not (null? schemadirs)) > + (write-search-path-file directory "GUIX_GSETTINGS_SCHEMA_DI= R" > + (string-join schemadirs ":"))) > + (when (not (null? gtk2-mod-dirs)) > + (write-search-path-file directory "GUIX_GTK2_PATH" > + (string-join gtk2-mod-dirs ":"))) > + (when (not (null? gtk3-mod-dirs)) > + (write-search-path-file directory "GUIX_GTK3_PATH" > + (string-join gtk3-mod-dirs ":"))) > + (when (not (null? gtk4-mod-dirs)) > + (write-search-path-file directory "GUIX_GTK4_PATH" > + (string-join gtk4-mod-dirs ":"))) > + (when (not (null? gio-mod-dirs)) > + (write-search-path-file directory "GUIX_GIO_EXTRA_MODULES" > + (string-join gio-mod-dirs ":"))))))= )) Perhaps the check for null could be done in write-search-path-file to avoid the repetitive checks here. Also, instead of (when (not ...)) you can use (unless ...). Other than that, it looks reasonable to me; it'll need a feature branch; I'm not so sure it requires a GCD anymore since if it works correctly, it won't impact the API nor the usage of the system. What do you think, Liliana? --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Jan 2025 13:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17380701288665 (code B ref 75688); Tue, 28 Jan 2025 13:16:01 +0000 Received: (at 75688) by debbugs.gnu.org; 28 Jan 2025 13:15:28 +0000 Received: from localhost ([127.0.0.1]:35929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tclRA-0002Fg-66 for submit@debbugs.gnu.org; Tue, 28 Jan 2025 08:15:28 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:58785) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tclR7-0002FI-UK for 75688@debbugs.gnu.org; Tue, 28 Jan 2025 08:15:26 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2ee8aa26415so9531270a91.1 for <75688@debbugs.gnu.org>; Tue, 28 Jan 2025 05:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738070120; x=1738674920; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jY3YqQ9bG/UVDro7oLUumGzUib2Z74qba1bRlUP8L88=; b=OMyy0SbRXd5cOBjcKpTcuB8RjyexcSXR2anEeVOR4k49+hp83S7hsTMZdwc5GAJqCH iUkTda1grXQltpxkYC1U0x4rCiv/nAURpb041iWC+2pFua2V/aRMJHFhWijTzHaI8bGR s6AYHZwcI2jmd6qYQFXeQywVqrLgfB425V5V005EqcFafkiEV7U9r/pgr14WsIgf7MAf spHj98tBnjW8kQhKnaFuQtlD2mBMNrUGUAqBTfnmMlV6+8XFZKaUNYYgZ5Zyj2Ij2k0/ 71biglRaBj7xqeEA+g2BpfqPUmbkCcUkmqetPgwWzImZ4Kmrxh4x5RvNsjibd84A3fwE wKAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738070120; x=1738674920; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jY3YqQ9bG/UVDro7oLUumGzUib2Z74qba1bRlUP8L88=; b=clBexBM02rpCXTIdlyutk1q7Lsn/uIJZBM+0H1vASdoPNpcA71/m2xNj8dbtLLMMsr pQ2FQVfrhSnot3KNjG1gg2ZcEvdDVqQjLIIjkLMCpQGTRqmA/EwRY8efwbVB2i8kWvCi 33cIB3dL5pf7RZEnFM0/KrPBHljh57cgu5jVbj4WrjTOmK8IK29j/LvcZ3PEFoDFHwy6 ElciTjEBO0eamQPaseNUTusNS3N6tP0F9ELBlpFe6NwRRa4X9HcRLPJaVcwjJ/fV4PC0 /VqYuyOpvUIsTZVHbY1SW25QhFhCLfS7FAN2GZfP5tJ9cl1YynTE44Iq/y+5e9ktHde9 Uwjg== X-Gm-Message-State: AOJu0Yxb9W/iSP0RwI8JKhALBBxnxtZydqPgBnrFlLwpi4zZPs49qK4D S1mY+bst4+g19JQ7Avh8STHlDrR06/4U0v+lLDn7ppW5Dtt0fFwx X-Gm-Gg: ASbGncsmfRBu617mymllKXhC5ORm/5jEvPFuFYcDqxQWWxMUHZTuS1gXkhuxuh3vF0T gLdXcXPRbsRHQnpmVzMTHtsgOU0K6NRPyOF4bGAl/8IaCRF+74Mfy1ZmfzlVx1cZSphImuVtIo4 8yZTL3T9bbEXgr6PNhoM4PJoRfhtQWUVA0UQs2I3MowLxJTabaV8jptuXXgzBElw3tu+3AaVAqA 7KN083LER0uqrxXrVCsZx9p0u0D3r9BnM2tlPYHNAfwJwpIBf7zAai++ukkPJN23IzIhc1PFnAy gAeH50lXESfN X-Google-Smtp-Source: AGHT+IG4KSunbZedfKt0OxYIb8aJg3md6KDnpRi52NFUM8Ls/jPgN/8UM7G2KCHE1Ydil/YUnsU4ww== X-Received: by 2002:a05:6a00:2a03:b0:725:e499:5b86 with SMTP id d2e1a72fcca58-72dafbb5646mr68634286b3a.20.1738070119989; Tue, 28 Jan 2025 05:15:19 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a7606d7sm9128060b3a.114.2025.01.28.05.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 05:15:19 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87ed0o6dk5.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Mon, 27 Jan 2025 13:17:14 +0800") References: <916f2d3087c47d6212682656f47a2899ba795df1.1737613671.git.iyzsong@member.fsf.org> <877c6h55dy.fsf_-_@gmail.com> <87ed0o6dk5.fsf@envs.net> Date: Tue, 28 Jan 2025 22:15:07 +0900 Message-ID: <87a5bbt6zo.fsf@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hello, =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > Maxim Cournoyer writes: > >>> +++ b/gnu/packages/patches/glib-guix-search-paths.patch >>> @@ -0,0 +1,158 @@ >> >> I think it'd be nice to forward a subset of this patch that implements >> just the loading environment variable from a file, as that mechanism >> seems like it could be generally useful (and upstreaming it would lower >> the maintenance burden for us). > > Okay, I could try. Seems upstream prefer we open an issue to discuss the use case/feature request first. I've done so for the proposed GDK_PIXBUF_MODULE_FILES environment variable here [0]. [0] https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/247 [...] >>> ++ /* Find output directory, which is the parent directory of "bin" = or "libexec". */ >>> ++ out_path =3D g_path_get_dirname (exe_path); >>> ++ while (g_str_match_string("/bin/", out_path, FALSE) || >>> ++ g_str_match_string("/libexec/", out_path, FALSE)) { >>> ++ gchar *dir_path =3D out_path; >> >> Is the intent above to *copy* out_path into dir_path? Currently that's >> not done; we just point another pointer to it. >> >>> ++ out_path =3D g_path_get_dirname (dir_path); >> >> If g_path_get_dirname mutates dir_path, than dir_path should be a string >> copy. Otherwise if it doesn't get mutated by the call, we should be >> able to use just: >> >> out_path =3D g_path_get_dirname (out_path); >> >>> ++ g_free (dir_path); > > That 'dir_path' is only maded to be freed here, since > 'g_path_get_dirname' allocate a new array instead of modify existed one, > so we need free the old out_path once we get a new one. Thanks for the explanation. >> [...] >> >> Apart from my above comments, this looks good to me. I think I'd stress >> once more the value of upstreaming as much of this to ease maintenance >> in the future. >> >> Thanks for this novel idea/implementation! > > Sure, with additional interpreter patches which I haven't sent, to be > honest I feel this more hacky than novel, hope upstream or other folks > can give better ideas... It's indeed a bit hacky, but still an improvement over wrapping everything with leaky shell scripts in my opinion. -- Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Jan 2025 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , iyzsong@envs.net Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173808762124363 (code B ref 75688); Tue, 28 Jan 2025 18:07:01 +0000 Received: (at 75688) by debbugs.gnu.org; 28 Jan 2025 18:07:01 +0000 Received: from localhost ([127.0.0.1]:38444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcpzI-0006Ks-K6 for submit@debbugs.gnu.org; Tue, 28 Jan 2025 13:07:00 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:52720) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tcpzG-0006KV-Hl for 75688@debbugs.gnu.org; Tue, 28 Jan 2025 13:06:59 -0500 Received: by mail-wr1-x444.google.com with SMTP id ffacd0b85a97d-385d7b4da2bso5609630f8f.1 for <75688@debbugs.gnu.org>; Tue, 28 Jan 2025 10:06:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738087612; x=1738692412; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=QGV5qXYfO7cS3Y1uQezJBmrI7KqiJ/Yoi4SJZr0ieuU=; b=lsDmD25Zb9IL3BAjMwGrnN8G2T5w0hLcST4Z03oBx+tsGgajo+hwSoYLljTBe8iecE zRTBklz9rgyNjytq5yk7v7qRlnkOA5hHqiojtL3/hOqEKe3PxPW7Ng8yWtNbXN8iV0Ql DhkEMvokTZOaxqG3DIppiua/WTZCkAyIGwJ0HVi1WgHAf91SI1U7CaO0LafsWdBAqWHk zf0GJ6a/faxI4nClNJIxJcAQ1NeHRpiGMBRGgtBS5g8lfy93kYtKpCATczoSOP/W5jsm 2MyLglZFS1wWsNMx4zIjpoaIGEUNXpGLu8F8uvlmbBFfF8IWIHV5l0KvMNRdecXDAWzE 5ZmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738087612; x=1738692412; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QGV5qXYfO7cS3Y1uQezJBmrI7KqiJ/Yoi4SJZr0ieuU=; b=sJRvvIli9aknA+/L5hWq14jwMMAR3kE3GFUEbdD5fqhFpMZV1kWB016SrTPY7H03xx f4y9ZR4/i302C/wGnJo42QvCZ9NqOIBzIcR7LTCxbFk6rs70Ln3jJmadkHD0GtmUDtLl 7N49t5x1o0ou2n7ausSC0vTOkfWiQwKTklNbBMlErxKCtWOFaopRwORju2qnBwMGFESb Ft+iPPVLXDwQvSMiazaRm4VsJyX2AijgRrZnO0tQHib5oS2A66S9ageqKV9DJocIX6Jq +FGpDrQDSfdc51GDTvpNJ5wLahmADP9dqPWaKnlsP0L4rE4ixOJk+q1Y6+GTPE9DZAnB Z5qw== X-Gm-Message-State: AOJu0Yyv/m4U/F4oJEY+PIEXG90LTboVI+EW7+R93spSzK4fNM6cNDiI 6jaffR2ATSeoUeaaasDPpK0MfedKrLREZHKtCbyArUtyYyj0t3jX X-Gm-Gg: ASbGncsRrQ8CncMX5vCFxhv/sY/jYnz8+RM7CwBMq034s/7vttNGkuqLPIWI1w9VToK sqve/+Srf2IEYWGgRnFEA+aPgkAaTvHxOU68ABeiw+il2EneNMnqgXt+8VuXf/TN+ScxtzWAghj HYFfjrDALN6D3qhMC0svR2Vbu6hubbb8BACIDgv2568NiyWCnxW/oJ0ktQvFKIn1PEYo1WjOVl2 /rcLIYu0S3V9E/cOidkqFjsbT4qeWNhfZV7Iz5neQtUIIOuNZViYBLxggry/Sn1VonXShMEMF8Z EqDkR0Y5cd4EPl2mP/Bl6JvcYHFP5FIX+h1KcPU/763U+EX++RlBqJ651KQ0Nw4vpyo= X-Google-Smtp-Source: AGHT+IF3DP1N0Hnl3i0Tvr+uMM8aGJg/sojVFTL1Uk3R11jajDRVRsXjTmFnMD7HwTImcHx8FTSMxA== X-Received: by 2002:a05:6000:18a9:b0:385:f66a:4271 with SMTP id ffacd0b85a97d-38c519399bfmr41201f8f.4.1738087611861; Tue, 28 Jan 2025 10:06:51 -0800 (PST) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1bb057sm14968313f8f.62.2025.01.28.10.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 10:06:51 -0800 (PST) Message-ID: From: Liliana Marie Prikler Date: Tue, 28 Jan 2025 19:07:08 +0100 In-Reply-To: <87ed0nt76t.fsf_-_@gmail.com> References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) 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: -1.0 (-) Am Dienstag, dem 28.01.2025 um 22:10 +0900 schrieb Maxim Cournoyer: > Other than that, it looks reasonable to me; it'll need a feature > branch; I'm not so sure it requires a GCD anymore since if it works > correctly, it won't impact the API nor the usage of the system.=C2=A0 Wha= t > do you think, Liliana? I think it does deserve a GCD. I'm very much not interested in maintaining a specific search-pathesque feature on gnome-team only. In my opinion, there are several design decisions to discuss, e.g. file naming, content layout, =E2=80=A6, and if we do go that route, then IMHO we should also offer at least one =E2=80=94 nicer would be multiple =E2=80=94 = reference implementation(s) if not proper ready-to-use packages. I share both =E5=AE=8B=E6=96=87=E6=AD=A6's concern that this feels hacky an= d your concern that we ought to improve over environment variables. Now, they do say that too many cooks spoil the broth, but in my opinion cooking our own soup is ill-advised in this instance :) Cheers From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Jan 2025 04:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , iyzsong@envs.net Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173812551021518 (code B ref 75688); Wed, 29 Jan 2025 04:39:02 +0000 Received: (at 75688) by debbugs.gnu.org; 29 Jan 2025 04:38:30 +0000 Received: from localhost ([127.0.0.1]:39580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tczqP-0005b0-PC for submit@debbugs.gnu.org; Tue, 28 Jan 2025 23:38:30 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:50370) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tczqM-0005al-Ur for 75688@debbugs.gnu.org; Tue, 28 Jan 2025 23:38:27 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-216426b0865so106898335ad.0 for <75688@debbugs.gnu.org>; Tue, 28 Jan 2025 20:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738125501; x=1738730301; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AolvAUyWbSzY1UYUUo5eGnXxKYKC6YmG/au1bBjaHJk=; b=lby4Bc8UmVpKBJTj6rtafQpEJWGECfs8jWIG6ESS1qsgZubRfaxW4tgKxnQAZXFHTN SpjDnynw+B9IzDLVM3nALUW6uQBWGoyG7pCx6GNeHzu0p1QO+2Z7dAYhYMmRgEwpY84L RESrtCZ38llUAAB35oM3KtYzgs/E3rJBsPQqLlQfT8ysf+QXxnTUXjaKaE5F/76VE8Ns cb9wDL0jDIKhJFdNfBULX/LwcNhKFcC+LNhr2GM2BoWO8RWn9WhxBuebdImmSWQMQd9P torXamvR8d/ZFQM8u4ZM2A1LwpfCNcHyqNL6o3japaLRsB1arTb4pF5BCo1GvQERUg43 2czA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738125501; x=1738730301; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AolvAUyWbSzY1UYUUo5eGnXxKYKC6YmG/au1bBjaHJk=; b=p+6pr7B4ItB/bEIcAwk5d0hkCayKk+hzQZY42Nw4Esmf409BGXBB9GpA4knCmU1u8A +USQHRfSEpcL/tHf4ZiawLaa58LmEoho3HlknOsCRxewptKStJ/UcFarBo7/jfBNDKIc pfC43GxRg5ItmhkW8dFaeeJRe3pC6HT9NmgvttVo+0OCin6KV9PQN4j3F00yIng3sTup SEk9VlOLX2HO+d4eoairoR2eZ5HE4C+Ge8twmf2uJmmfeNUtMO1rENvN2lV+4YeRFWQP lO4AnhgQH64meLUYtrspFNz4QIHTvd/uBW59RdmRrRyDRfZaODZS/A3wLNk/2AcrV3Fo b0FA== X-Forwarded-Encrypted: i=1; AJvYcCWAy0bTjXm8uv0zVwq8UaSSrQgqXzNojw1eBG3GPBIZUQW36FsN2Roo5olkcKdrNR9b54yAbw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxgWQgmsDtz8slAa00ag5jh+/9EjcWRhhbJF4dvdYlk48tRJ9Tu o2i7HBmJewMY7j/ovNQSLctoYw8cCAnbk04L3rIO/2G06iYF2FdWYEO6t5kw X-Gm-Gg: ASbGnctsSK8cwlsTSRu74vg9Pf640H039F7i+OL56+LuFl7Nsy0iydDGLw/RH36wafx NDz6WQoo0hEoyUv7NkSGBffrEcGMnbzO7/BI1UaTCtVUhFoPihRvX8x70Un827+S5zsngNXlnQz GxrQgQ3fR816eToAunDHjUDPENWUuHXL/R1i+SXz7NDEc1BjPQz3SIewcWpBA0NDyFuBeVCzKpm KYB4qpk5LCD5EEZYUTAN7YwJ2lqWD5KMVQnNUf/ku+QsTenfNpx717I4+6/+lNNeRlq5yCOn70H iTN2/b6j6veL X-Google-Smtp-Source: AGHT+IGOJ4PZ+nTOwlQtsHkHwgiDhNPJ+6f+U45CJaiEIPPz2NKwkXKJ8W7li99+M9yMe8aq/f+L8w== X-Received: by 2002:a17:902:e84b:b0:215:b087:5d62 with SMTP id d9443c01a7336-21dd7deec73mr27449385ad.36.1738125500730; Tue, 28 Jan 2025 20:38:20 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-acd8ef50a21sm281479a12.47.2025.01.28.20.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 20:38:20 -0800 (PST) From: Maxim Cournoyer In-Reply-To: (Liliana Marie Prikler's message of "Tue, 28 Jan 2025 19:07:08 +0100") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> Date: Wed, 29 Jan 2025 13:38:08 +0900 Message-ID: <87ed0mqlov.fsf@gmail.com> 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: -0.0 (/) 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: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Am Dienstag, dem 28.01.2025 um 22:10 +0900 schrieb Maxim Cournoyer: >> Other than that, it looks reasonable to me; it'll need a feature >> branch; I'm not so sure it requires a GCD anymore since if it works >> correctly, it won't impact the API nor the usage of the system.=C2=A0 Wh= at >> do you think, Liliana? > I think it does deserve a GCD. I'm very much not interested in > maintaining a specific search-pathesque feature on gnome-team only. In > my opinion, there are several design decisions to discuss, e.g. file > naming, content layout, =E2=80=A6, and if we do go that route, then IMHO = we > should also offer at least one =E2=80=94 nicer would be multiple =E2=80= =94 reference > implementation(s) if not proper ready-to-use packages. > > I share both =E5=AE=8B=E6=96=87=E6=AD=A6's concern that this feels hacky = and your concern that > we ought to improve over environment variables. Now, they do say that > too many cooks spoil the broth, but in my opinion cooking our own soup > is ill-advised in this instance :) =E5=AE=8B=E6=96=87=E6=AD=A6, a GCD involves some writing and time to allow = for discussing, but if you have the will to drive it I'd be happy to sponsor it. --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Jan 2025 05:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.1738129772970 (code B ref 75688); Wed, 29 Jan 2025 05:50:02 +0000 Received: (at 75688) by debbugs.gnu.org; 29 Jan 2025 05:49:32 +0000 Received: from localhost ([127.0.0.1]:39638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1td0x9-0000FW-HV for submit@debbugs.gnu.org; Wed, 29 Jan 2025 00:49:31 -0500 Received: from mail.envs.net ([5.199.136.28]:45512) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1td0x2-0000FG-Jc for 75688@debbugs.gnu.org; Wed, 29 Jan 2025 00:49:29 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4FF9A38A3E72; Wed, 29 Jan 2025 05:49:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3zasGWgjIUvq; Wed, 29 Jan 2025 05:49:15 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Wed, 29 Jan 2025 05:49:15 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id af0f6d2a; Wed, 29 Jan 2025 05:52:50 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87ed0mqlov.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 29 Jan 2025 13:38:08 +0900") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> <87ed0mqlov.fsf@gmail.com> Date: Wed, 29 Jan 2025 13:52:50 +0800 Message-ID: <87jzaei2tp.fsf@envs.net> 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: -0.0 (/) 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: -1.0 (-) Maxim Cournoyer writes: > Hi Liliana, > > Liliana Marie Prikler writes: > >> Am Dienstag, dem 28.01.2025 um 22:10 +0900 schrieb Maxim Cournoyer: >>> Other than that, it looks reasonable to me; it'll need a feature >>> branch; I'm not so sure it requires a GCD anymore since if it works >>> correctly, it won't impact the API nor the usage of the system.=C2=A0 W= hat >>> do you think, Liliana? >> I think it does deserve a GCD. I'm very much not interested in >> maintaining a specific search-pathesque feature on gnome-team only. In >> my opinion, there are several design decisions to discuss, e.g. file >> naming, content layout, =E2=80=A6, and if we do go that route, then IMHO= we >> should also offer at least one =E2=80=94 nicer would be multiple =E2=80= =94 reference >> implementation(s) if not proper ready-to-use packages. Sure, the other target is qt-build-system and KDE, it's not GNOME only. >> >> I share both =E5=AE=8B=E6=96=87=E6=AD=A6's concern that this feels hacky= and your concern that >> we ought to improve over environment variables. Now, they do say that >> too many cooks spoil the broth, but in my opinion cooking our own soup >> is ill-advised in this instance :) > > =E5=AE=8B=E6=96=87=E6=AD=A6, a GCD involves some writing and time to allo= w for discussing, > but if you have the will to drive it I'd be happy to sponsor it. No problem, I'll write a GCD later. While I'm not optimistic about that we can upstream the patches we needed, but I think the maintaince burden is reasonable. Thank you! From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Jan 2025 05:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173821339924754 (code B ref 75688); Thu, 30 Jan 2025 05:04:01 +0000 Received: (at 75688) by debbugs.gnu.org; 30 Jan 2025 05:03:19 +0000 Received: from localhost ([127.0.0.1]:43887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tdMhy-0006RB-VB for submit@debbugs.gnu.org; Thu, 30 Jan 2025 00:03:19 -0500 Received: from mail.envs.net ([5.199.136.28]:46294) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tdMhx-0006R2-Bu for 75688@debbugs.gnu.org; Thu, 30 Jan 2025 00:03:18 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4B44938A3E58; Thu, 30 Jan 2025 05:03:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EN79nUkzEPIe; Thu, 30 Jan 2025 05:03:08 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 30 Jan 2025 05:03:08 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 0ffa66d0; Thu, 30 Jan 2025 05:06:43 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87ed0mqlov.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 29 Jan 2025 13:38:08 +0900") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> <87ed0mqlov.fsf@gmail.com> Date: Thu, 30 Jan 2025 13:06:43 +0800 Message-ID: <87cyg499gc.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) 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: -1.0 (-) --=-=-= Content-Type: text/plain Hello, I write a draft GCD as "Set search paths without program wrappers", need feedbacks and corrections. Maxim and Liliana, could I list you as sponsors and send it to guix-devel? Thank you! --=-=-= Content-Type: application/octet-stream Content-Disposition: inline; filename=003-set-search-paths-without-program-wrappers.md Content-Transfer-Encoding: base64 dGl0bGU6IFNldCBzZWFyY2ggcGF0aHMgd2l0aG91dCBwcm9ncmFtIHdyYXBwZXJzCmlkOiAwMDMK c3RhdHVzOiBkcmFmdApkaXNjdXNzaW9uOiBodHRwczovL2lzc3Vlcy5ndWl4LmdudS5vcmcvPG51 bWJlciBhc3NpZ25lZCBieSBpc3N1ZSB0cmFja2VyPgphdXRob3JzOiDlrovmlofmraYgPGl5enNv bmdAZW52cy5uZXQ+CnNwb25zb3JzOgpkYXRlLXN1Ym1pdHRlZDoKZGF0ZToKU1BEWC1MaWNlbnNl LUlkZW50aWZpZXI6IENDLUJZLVNBLTQuMCBPUiBHRkRMLTEuMy1uby1pbnZhcmlhbnRzLW9ubHkK LS0tCgojIFN1bW1hcnkKCkN1cnJlbnRseSBwcm9ncmFtIHdyYXBwZXJzIGFyZSB3aWRlbHkgdXNl ZCB0byBzZXQgc2VhcmNoIHBhdGhzIHZpYQplbnZpcm9ubWVudCB2YXJpYWJsZXMuICBUaG9zZSB3 cmFwcGVycyBoYXZlIHNvbWUgcHJvYmxlbXM6CgogIC0gZW52aXJvbm1lbnQgdmFyaWFibGVzIGxl YWthZ2UgZnJvbSBhIHByb2Nlc3MgdG8gaXRzIGNoaWxkCiAgICBwcm9jZXNzZXM7CiAgLSBkdXBs aWNhdGUgZW50cmllcyBpbiBlbnZpcm9ubWVudCB2YXJpYWJsZXM7CiAgLSBvYnNjdXJlZCBwcm9j ZXNzIG5hbWVzLgoKVG8gYWRkcmVzcyB0aG9zZSBwcm9ibGVtcywgd2UgcHJvcG9zZSBhIHdheSB0 byBzZXQgc2VhcmNoIHBhdGhzIHdpdGgKc29tZSBwZXItb3V0cHV0IGNvbmZpZ3VyYXRpb24gZmls ZXMsIHJlZHVjZSB0aGUgbmVlZCBvZiBjcmVhdGluZwpwcm9ncmFtIHdyYXBwZXJzLgoKCiMgTW90 aXZhdGlvbgoKVG8gbWFrZSBzdXJlIHByb2dyYW1zIHdvcmsgb3V0LW9mLXRoZS1ib3ggcmF0aGVy IHRoZW4gZGVwZW5kIG9uIHNvbWUKZXh0ZXJuYWwgc2V0dGluZ3MsIEd1aXggZW5jb3VyYWdlcyB0 aGUgdXNlIG9mIFtwcm9ncmFtIHdyYXBwZXJzXShodHRwczovL2d1aXguZ251Lm9yZy9tYW51YWwv ZW4vaHRtbF9ub2RlL0J1aWxkLVV0aWxpdGllcy5odG1sI1dyYXBwZXJzKQp3aGVuIGRlZmluZSBw YWNrYWdlcy4gIEluIHBhcnRpY3VsYXIsICBib3RoIGBnbGliLW9yLWd0ay1idWlsZC1zeXN0ZW1g CmFuZCBgcXQtYnVpbGQtc3lzdGVtYCBpbmNsdWRlcyBhIHdyYXAgcGhhc2UgdG8gbWFrZSBwcm9n cmFtIHdyYXBwZXJzIGZvciBldmVyeQpHTk9NRSBhbmQgS0RFIHByb2dyYW0uCgpUaG9zZSB3cmFw cGVycyBoYXZlIHNvbWUgdW5zb2x2ZWQgaXNzdWVzOgoKLSBbUHJvZ3JhbSBjcmFzaCBkdWUgdG8g bGVha2VkIGVudmlyb25tZW50IHZhcmlhYmxlc10oaHR0cHM6Ly9pc3N1ZXMuZ3VpeC5nbnUub3Jn LzYzMjAzKQotIFtEdXBsaWNhdGUgZW50cmllcyBpbiB2YXJpb3VzIGVudmlyb25tZW50IHZhcmlh Ymxlc10oaHR0cHM6Ly9pc3N1ZXMuZ3VpeC5nbnUub3JnLzIzMTE4KQotIFtBbnNpYmxlICYgb3Ro ZXJzJyBwcm9ibGVtcyB3aXRoIHdyYXBwZWQgJy5hbnNpYmxlLXJlYWwnIHNjcmlwdHNdKGh0dHBz Oi8vaXNzdWVzLmd1aXguZ251Lm9yZy8yNjc1MikKCklmIHdlIG1hbmFnZWQgdG8gZmluZCBhIHdh eSB0byBzZXQgc2VhcmNoIHBhdGhzIHdpdGhvdXQgdXNpbmcgcHJvZ3JhbQp3YXBwZXJzLCB0aGVu IHByb2dyYW1zIHdpbGwgYmUgbW9yZSByb2J1c3QuCgoKIyBEZXRhaWxlZCBEZXNpZ24KCkluIGFk ZGl0aW9uIHRvIGVudmlyb25tZW50IHZhcmlhYmxlcywgc29tZSBwcm9ncmFtcyBhbHNvIGFsbG93 IHRvIHNldCBzZWFyY2gKcGF0aHMgdmlhIGNvbmZpZ3VyYXRpb24gZmlsZXMsIGZvciBleGFtcGxl IHlvdSBjYW4gdXNlCltwYXRoIGNvbmZpZ3VyYXRpb24gZmlsZXNdKGh0dHBzOi8vZG9jcy5weXRo b24ub3JnLzMvbGlicmFyeS9zaXRlLmh0bWwpCnRvIHNldCBgc3lzLnBhdGhgIGZvciBQeXRob24s IGFuZCB3ZSBoYXZlIGEgcGVyLW91dHB1dCBbYGxkLnNvLmNhY2hlYF0oaHR0cHM6Ly9ndWl4Lmdu dS5vcmcvZW4vYmxvZy8yMDIxL3RhbWluZy10aGUtc3RhdC1zdG9ybS13aXRoLWEtbG9hZGVyLWNh Y2hlLykKdG8gbG9hZCBzaGFyZWQgbGlicmFyaWVzIGVmZmljaWVudGx5LiAgSW5zcGlyZWQgYnkg dGhlbSwgd2UgYXJlIGdvaW5nIHRvIHBhdGNoCnNvbWUgcHJvZ3JhbXMgYW5kIGxpYnJhcmllcywg c28gdGhhdCB3aGVuIHRoZXkgYnVpbGQgYSBzZWFyY2ggcGF0aCBmcm9tIGFuCmVudmlyb25tZW50 IHZhcmlhYmxlLCB3b3VsZCBhbHNvIGhvbm9yIGEgcGVyLW91dHB1dCBzZWFyY2ggcGF0aCBjb25m aWd1cmF0aW9uCmZpbGUuICBUaGUgZGV0YWlscyBhcmUgaG93IHRvIG1ha2UgdGhvc2Ugc2VhcmNo IHBhdGggY29uZmlndXJhdGlvbiBmaWxlcyBhbmQKaG93IHRvIGZpbmQgdGhlbSB3aGVuIGFuIGV4 ZWN1dGFibGUgaXMgcnVubmluZy4KCiMjIFNlYXJjaCBwYXRoIGNvbmZpZ3VyYXRpb24gZmlsZXMK CldlJ2xsIGNyZWF0ZSBzZWFyY2ggcGF0aCBjb25maWd1cmF0aW9uIGZpbGVzIHVuZGVyIHRoZSBg ZXRjL3NlYXJjaC1wYXRoLmRgCmRpcmVjdG9yeSBvZiBlYWNoIHBhY2thZ2Ugb3V0cHV0LCB3aXRo IGVhY2ggZmlsZSBzcGVjaWZ5IGEgc2VhcmNoIHBhdGguClRoZSBmaWxlIG5hbWUgYW5kIGl0cyBj b250ZW50IGFyZSBzYW1lIHRvIHRoZSBjb3JyZXNwb25kaW5nIGVudmlyb25tZW50CnZhcmlhYmxl LiAgRm9yIGV4YW1wbGUgdGhlIG91dHB1dCBvZiB0aGUgYGdub21lLWNvbnNvbGVgIHBhY2thZ2Ug d291bGQgaGF2ZToKCmBgYApiaW4KICBrZ3gKZXRjCiAgbGQuc28uY2FjaGUKICBzZWFyY2gtcGF0 aHMuZAogICAgR1VJWF9YREdfREFUQV9ESVJTCiAgICBHVUlYX0dJT19FWFRSQV9NT0RVTEVTCiAg ICBHVUlYX0dUSzRfUEFUSApsaWIKc2hhcmUKYGBgCgpUaGUgY29udGVudCBvZiBpdHMgYEdVSVhf WERHX0RBVEFfRElSU2AgZmlsZSB3b3VsZCBiZToKYGBgCmdudS9zdG9yZS9xZHJ4NDRoYm5uaGQ5 NzloaWdkanJtNG1pODdpcG45Zi1zaGFyZWQtbWltZS1pbmZvLTIuMy9zaGFyZTovZ251L3N0b3Jl LzIyNjZ3cXdpZ3htc20zdmg4dmpxaHFibXhkYWN5OWMwLWdsaWItMi43OC4wL3NoYXJlOi9nbnUv c3RvcmUvN2cyY3owcG5hOW5kdnh4NGQ4c204bG5reGp4ZzR2bnotZ3NldHRpbmdzLWRlc2t0b3At c2NoZW1hcy00NC4wL3NoYXJlOi9nbnUvc3RvcmUvbmFrMmN2N3Izcm1zbnFqenF5ODExNnhuNDNy dmg4YzAtbGliYWR3YWl0YS0xLjUuMi9zaGFyZTovZ251L3N0b3JlL3k5aWc3MGpxcjFqOTlxNjlh a3ZxaHYwaWo0NGhtZmlpLWd0ay00LjE0LjUvc2hhcmU6L2dudS9zdG9yZS83aDB4aDZyZDg4ZzM3 czEwZzY3Z3ltN2NkNWwwbGI3Ny1nbm9tZS1jb25zb2xlLTQ0LjQvc2hhcmUKYGBgCgpUaG9zZSBz ZWFyY2ggcGF0aCBjb25maWd1cmF0aW9uIGZpbGVzIHdvdWxkIGJlIGNyZWF0ZWQgYnkgdGhlIHBh Y2thZ2UgYnVpbGRlciwKYWZ0ZXIgdGhlIGBpbnN0YWxsYCBwaGFzZSwgcmVwbGFjZSB1c2FnZXMg b2YgYHdyYXAtcHJvZ3JhbWAgd2hlbiBwb3NzaWJsZS4KCgojIyBGaW5kIHRoZSBsb2NhdGlvbiBv ZiB0aGUgY3VycmVudCBleGVjdXRhYmxlCgpUbyBmaW5kIGl0cyBzZWFyY2ggcGF0aCBjb25maWd1 cmF0aW9uIGZpbGVzIHdoZW4gYW4gZXhlY3V0YWJsZSBpcyBydW5uaW5nLAp3ZSBjYW4gZmlyc3Qg ZmluZCB0aGUgbG9jYXRpb24gb2YgdGhlIGV4ZWN1dGFibGUuICBDb252ZW5pZW50bHksIExpbnV4 CnByb3ZpZGVzIGEgcHNldWRvLWZpbGUgYC9wcm9jL3NlbGYvZXhlYCBmb3IgdGhpcyBleGFjdCBw dXJwb3NlLCB3aGljaCB3b3Jrcwp3ZWxsIGZvciBFTEYgZXhlY3V0YWJsZXMuICAgQnV0IGZvciBh biBpbnRlcnByZXRlciBzY3JpcHQsIGAvcHJvYy9zZWxmL2V4ZWAKd291bGQgcmV0dXJuIHRoZSBm aWxlIG5hbWUgb2YgaXRzIGludGVycHJldGVyIGluc3RlYWQgb2YgdGhlIHNjcmlwdCwgc28Kd2Ug cGF0Y2ggaW50ZXJwcmV0ZXJzIHRvIHNldCAyIGVudmlyb25tZW50IHZhcmlhYmxlczoKCiAgLSBg R1VJWF9JTlRFUlBSRVRFUl9GSUxFYDogYWJzb2x1dGUgZmlsZSBuYW1lIG9mIHRoZSBpbnRlcnBy ZXRlcgogIC0gYEdVSVhfTUFJTl9TQ1JJUFRfRklMRWA6IGFic29sdXRlIGZpbGUgbmFtZSBvZiB0 aGUgc2NyaXB0CgpBbmQgd2hlbiB0aGUgZXhlY3V0YWJsZSdzIGAvcHJvYy9zZWxmL2V4ZWAgbWF0 Y2hlcyBgR1VJWF9JTlRFUlBSRVRFUl9GSUxFYCwKd2UgY2FuIGdldCB0aGUgc2NyaXB0IGZpbGUg bmFtZSBmcm9tIGBHVUlYX01BSU5fU0NSSVBUX0ZJTEVgLiAgQWx0ZXJuYXRpdmVseSwKd2UgY2Fu IHRyeSB0byBjb25zdHJ1Y3QgdGhlIHNjcmlwdCBmaWxlIG5hbWUgZnJvbSBjb21tYW5kIGxpbmUg YXJndW1lbnRzLCBidXQKdGhhdCB3b24ndCB3b3JrIHdoZW4geW91IHJ1biBhIHNjcmlwdCB1c2lu ZyBhIHJlbGF0aXZlIGZpbGUgbmFtZSBhbmQgaXRzCmN1cnJlbnQgd29ya2luZyBkaXJlY3Rvcnkg Y2hhbmdlZCBiZWZvcmUgd2UgZmlndXJlIG91dCB0aGUgc2NyaXB0IGZpbGUgbmFtZS4KCgojIyBJ bXBsZW1lbnRhdGlvbiBwbGFuCgpBIFdJUCBpbXBsZW1lbnRhdGlvbiBjYW4gYmUgZm91bmQgaW4g PGh0dHBzOi8vaXNzdWVzLmd1aXguZ251Lm9yZy83NTY4OD4uCgotIEFkZCBhIG5ldyBmdW5jdGlv biBgZ19ndWl4X2J1aWxkX3NlYXJjaF9wYXRoX2RpcnNgIHRvIEdMaWIsIHdoaWNoIHJldHVybnMg YQogIHNlYXJjaCBwYXRoIGFzIGEgbGlzdCBvZiBmaWxlIG9yIGRpcmVjdG9yeSBuYW1lcyBmcm9t IGEgc2VhcmNoIHBhdGgKICBjb25maWd1cmF0aW9uIGZpbGUgYW5kIGFuIGVudmlyb25tZW50IHZh cmlhYmxlLgotIFBhdGNoIEdMaWIgdG8gdXNlIGBnX2d1aXhfYnVpbGRfc2VhcmNoX3BhdGhfZGly c2AgZm9yIGBHVUlYX1hER19EQVRBX0RJUlNgLAogIGBHVUlYX1hER19DT05GSUdfRElSU2AsIGBH VUlYX0dJT19FWFRSQV9NT0RVTEVTYCBhbmQKICBgR1VJWF9HU0VUVElOR1NfU0NIRU1BX0RJUmAu Ci0gUGF0Y2ggUHl0aG9uIHRvIHNldCBgR1VJWF9JTlRFUlBSRVRFUl9GSUxFYCBhbmQgYEdVSVhf TUFJTl9TQ1JJUFRfRklMRWAuCi0gUGF0Y2ggUXQgdG8gdXNlIGBnX2d1aXhfYnVpbGRfc2VhcmNo X3BhdGhfZGlyc2AgZm9yIGBHVUlYX1hER19EQVRBX0RJUlNgLAogIGBHVUlYX1hER19DT05GSUdf RElSU2AsIGBHVUlYX1FUX1BMVUdJTl9QQVRIYCwgYEdVSVhfUU1MX0lNUE9SVF9QQVRIYCwKICBg R1VJWF9RTUwyX0lNUE9SVF9QQVRIYCwgYEdVSVhfUVRXRUJFTkdJTkVQUk9DRVNTX1BBVEhgLgot IE1vZGlmeSBgZ2xpYi1vci1ndGstYnVpbGQtc3lzdGVtYCB0byBnZXQgcmlkIG9mIGB3cmFwLXBy b2dyYW1gLgotIE1vZGlmeSBgcXQtYnVpbGQtc3lzdGVtYCB0byBnZXQgcmlkIG9mIGB3cmFwLXBy b2dyYW1gLgoKCiMgVGhlIENvc3QgT2YgUmV2ZXJ0aW5nCgpCeSBsaW1pdGluZyB0aGUgY3JlYXRp bmcgb2Ygc2VhcmNoIHBhdGggY29uZmlndXJhdGlvbiBmaWxlcyBpbiBidWlsZCBzeXN0ZW1zLAp3 ZSBjYW4gcmV2ZXJ0IHRvIHByb2dyYW0gd3JhcHBlcnMgYnkgc2V2ZXJhbCBjb21taXRzLgoKCiMg RHJhd2JhY2tzIG9yIE9wZW4gUXVlc3Rpb25zCgpUaGlzIHByb3Bvc2UgZm9jdXMgdG8gc29sdmUg cHJvYmxlbXMgY2F1c2VkIGJ5IHByb2dyYW0gd3JhcHBlcnMgaW4gZGVza3RvcAplbnZpcm9ubWVu dHMsIG5hbWVseSBHTk9NRSBhbmQgS0RFLCBpbmRpdmlkdWFsIGB3cmFwLXByb2dhbWAgdXNhZ2Vz IGFyZSBub3QKYWRkcmVzc2VkLiAgV2UgcGxhbiB0byBoYW5kbGUgdGhhdCBpbiBidWlsZCBzeXN0 ZW1zIGxhdGVyLCBmb3IgZXhhbXBsZXM6CgogIC0gSGFuZGxlIGBHVUlYX0dJX1RZUEVMSUJfUEFU SGAgYW5kIGBHVUlYX0dES19QSVhCVUZfTU9EVUxFX0ZJTEVTYCBpbgogICAgYGdsaWItb3ItZ3Rr LWJ1aWxkLXN5c3RlbWAuCiAgLSBIYW5kbGUgYEdVSVhfUFlUSE9OUEFUSGAgaW4gYHB5dGhvbi1i dWlsZC1zeXN0ZW1gLgoKClRoZXJlIGFyZSBzdGlsbCBBQkkgcHJvYmxlbXMgY2F1c2VkIGJ5IGVu dmlyb25tZW50IHZhcmlhYmxlcyBmcm9tCnByb2ZpbGVzLCB3aGljaCBtYXliZSBhZGRyZXNzZWQg bGF0ZXIgYXMgc3VnZ2VzdGVkIGJ5IE1heGltZSBEZXZvcyBpbgo8aHR0cHM6Ly9pc3N1ZXMuZ3Vp eC5nbnUub3JnLzYzMjAzIzU+Lgo= --=-=-=-- From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Jan 2025 05:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173821467328270 (code B ref 75688); Thu, 30 Jan 2025 05:25:02 +0000 Received: (at 75688) by debbugs.gnu.org; 30 Jan 2025 05:24:33 +0000 Received: from localhost ([127.0.0.1]:43904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tdN2W-0007Lu-MP for submit@debbugs.gnu.org; Thu, 30 Jan 2025 00:24:32 -0500 Received: from mail.envs.net ([5.199.136.28]:45180) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tdN2T-0007Lh-AA for 75688@debbugs.gnu.org; Thu, 30 Jan 2025 00:24:31 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id C231038A3E58; Thu, 30 Jan 2025 05:24:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gEflY-UOXyWj; Thu, 30 Jan 2025 05:24:21 +0000 (UTC) Received: from localhost (unknown [112.44.100.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 30 Jan 2025 05:24:20 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id ac878958; Thu, 30 Jan 2025 05:27:59 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87cyg499gc.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Thu, 30 Jan 2025 13:06:43 +0800") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> <87ed0mqlov.fsf@gmail.com> <87cyg499gc.fsf@envs.net> Date: Thu, 30 Jan 2025 13:27:59 +0800 Message-ID: <878qqs98gw.fsf@envs.net> 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: 0.0 (/) 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: -1.0 (-) =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > Hello, I write a draft GCD as "Set search paths without program wrappers", > need feedbacks and corrections. Add drawbacks to GCD below. > # Drawbacks or Open Questions If implemented, we would likely carry several custom patches for GLib, Qt, Python, etc. forever, and programs could fail in some subtle ways. > This propose focus to solve problems caused by program wrappers in desktop > environments, namely GNOME and KDE, individual `wrap-progam` usages are n= ot > addressed. We plan to handle that in build systems later, for examples: > [...] From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Feb 2025 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173842719719694 (code B ref 75688); Sat, 01 Feb 2025 16:27:02 +0000 Received: (at 75688) by debbugs.gnu.org; 1 Feb 2025 16:26:37 +0000 Received: from localhost ([127.0.0.1]:59745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1teGKL-00057a-12 for submit@debbugs.gnu.org; Sat, 01 Feb 2025 11:26:37 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:51696) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1teGKJ-00057K-5e for 75688@debbugs.gnu.org; Sat, 01 Feb 2025 11:26:35 -0500 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-216401de828so54529965ad.3 for <75688@debbugs.gnu.org>; Sat, 01 Feb 2025 08:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738427189; x=1739031989; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uueWNnBcq8H0bDOLDEyholh8sQRYxwKKxlo+9erDG5Y=; b=huuRMroG6p0v0wmJZa3EiVupVmBPPX6Vf8tWQOGPjg0Ibx9FguxRVjW5MzA0KSY2uM r88uxBsC4SEf0Nx3YpF06V86iuyOlJMCpaXpoakMsIvskwGigMKIAP11hh4UmIZY/kSy uZMjYClNY85DdH2dbvA0vk/Ey5rf9fOLurPca7rEBxsDv4PlUrFDB3lFDuz612DU8Tiz 3bdQDOJO6gb75yX13E+BGsIlChWmCDLE57orK0C52c+BR3g7L5E6szBcd5y7HmzCssk5 hnuidknTa4eu2Z8mnxW9DIdUKkGV6xgEHTg3lHEkcBeuoal5CcXAscRfoqSPRmpQO1mB Qnpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738427189; x=1739031989; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uueWNnBcq8H0bDOLDEyholh8sQRYxwKKxlo+9erDG5Y=; b=cj/vnHr6bG63NbMBUJSBGVZaJj6INpGzUcgif1T4Nlc8Wsr3KOWLifNEa2XnlGDI3f sRe2LBytNAr1bgpVRH5KP/qykIVvWVmB+UAt2ZKHWrlu2cm5DzO7Tza1ZWJjrq3lYDdW Pya45TtE860RaK8Dff74uxgftb22pFlIwrexGDMgk7wTHRN61cV39VPGX0cpRGzI39Nv /ElnNEYwtILuK8saHmHonoc4iu1kes7GSeX+Fggc0w9oLYSXpsWE3aUtmCaYIYoWseY6 XxyB5mzApvEhBMWyeh0xNoYBqv5mhmzvcBX1izJSu2sW7M1RN70OEHL6bO6axsrQG4HZ O7Ag== X-Forwarded-Encrypted: i=1; AJvYcCWFeP7peOCNy6gkzQ53ILxhfYO9iAwYhz5l16DXWt6P772n+lVZh3Sg7FWoZW0E0M66hTHowg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yw7KEDvi3wUz/dd10XYhiU9I9Bg0C3Hy2Q/NnpI0dJpcvlZJ5q3 zDzaAKmmq7+ZedOpQSuDQC34J+j/PDdQBrpjwy3so43ehS5Wr4Kr X-Gm-Gg: ASbGncuaA6C50OPCTwAZvgdeeeXlvVklh0btolSq1idn5+CjOPJPzWpQ2gaT3p/sSvs SqnFGJ1glbFYQk9bFstMlAB8ZhMWAN2xv4eCNDBzJe1+zeH03eholn/10twKf2tzgzc8XmLbknT 90yD5YmnopQb/3kVXTdBIHmifdVLpEAXuKo2SBw+Re1T0ZRyYLmgMKKeNAgo0OMeqIElKPIrmTA Ay4bH9/1DfjQYkPY3oPgKeNX/H5xsFQnhIGxtkZ1i8U5UngqiCMrTGecqglUm3pycT6X9hKuTDo VeAdW/sIVO27 X-Google-Smtp-Source: AGHT+IGwUVbtd0FfX29G9vWNh+0v86A0pecH4HnnpdxIiu0blI8Sus2+3onpJnnzi1gNQE9Z6nGaYA== X-Received: by 2002:a05:6a21:3a47:b0:1ed:aca6:82d with SMTP id adf61e73a8af0-1edaca60964mr4520782637.24.1738427189036; Sat, 01 Feb 2025 08:26:29 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72fe69bba15sm5331605b3a.101.2025.02.01.08.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Feb 2025 08:26:28 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87cyg499gc.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Thu, 30 Jan 2025 13:06:43 +0800") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> <87ed0mqlov.fsf@gmail.com> <87cyg499gc.fsf@envs.net> Date: Sun, 02 Feb 2025 01:26:16 +0900 Message-ID: <87y0ypk4wn.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hello! =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > Hello, I write a draft GCD as "Set search paths without program wrappers", > need feedbacks and corrections. > > Maxim and Liliana, could I list you as sponsors and send it to > guix-devel? Thank you! Yes from me! --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] Replace wrapper scripts with search path value files in search-paths.d Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Feb 2025 01:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.173845906130402 (code B ref 75688); Sun, 02 Feb 2025 01:18:02 +0000 Received: (at 75688) by debbugs.gnu.org; 2 Feb 2025 01:17:41 +0000 Received: from localhost ([127.0.0.1]:60548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1teOcG-0007uI-Tz for submit@debbugs.gnu.org; Sat, 01 Feb 2025 20:17:41 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:42388) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1teOcE-0007u2-Hq for 75688@debbugs.gnu.org; Sat, 01 Feb 2025 20:17:39 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2167141dfa1so56365815ad.1 for <75688@debbugs.gnu.org>; Sat, 01 Feb 2025 17:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738459052; x=1739063852; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z0goNNXE1Qyo+ZlF97yjqCWI/Ghhr2yKDeeszkC18Ow=; b=UsLiRsiZY2ivG4sMxbUlsSPqYj6igKUGYii00Ee7ik8fAgvR6RwGMY4HaW8Z4QwEI7 DAi3vDVufRHF09FDk5jNAfrnsN6oRQKKUq6yqDZTWklgVnBEIwBWN/DRHtRn50rzk15H NVpH7Ak9Xt1o4199iNWXPfkvKQ4OgD7V4PgtbVlgdlxrkR5dD2vsaJyqOr93qeyYGhAA Q6VUSQ9QHYQJkFA7OYhpACgDaCu797cqfb8aGbXNj3+1YXijpjG8QNAHyC320Mg3bJ6n 1pLRZmc7ic+m/qtsY2AlLAI0aZMTTMHEbKuoXQwBhkkFw6bKxdM1ZvqoJQxzpHRDDejN L/bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738459052; x=1739063852; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=z0goNNXE1Qyo+ZlF97yjqCWI/Ghhr2yKDeeszkC18Ow=; b=qvQRo3t5a1A8A+R7PcQoElcTTfFyTZfFS8tPrOUCo64v1mWbvt8us2rk+MxdMrfpTo GMKvcgQ97RPSVxtC0if2J3UbHpYuz08vUuawk7LoppI562ZBZtiRprdwUva8SiHco7kQ ZSAtvijeJo5O7VOVwHAeVYUfi+pp+qcFf6UBx+qTFAVE6ZY6UXhzqrflI2m92tg5qDmK Z+6pPzrSW8Z806F6Lbjx83ENi6ZyXhagVh0mCA8FAPl9F0bYQyMHf46hn02BmbGb6UEX ZqKvoseQiBwaSs1cjnt8gWEg6h0FChLUF88s1GDFtoiubniLdyncupRPz7ybQxinDQkM AUrQ== X-Gm-Message-State: AOJu0YwQ+mJKWKxgKZIV0jG6hCOifucru6ae2gapGiU1jnPrberb4hIL QRk6o38dC1Pv42KGKe1FHt453kai8cojmN8+UfxT8tog56xUgHSG X-Gm-Gg: ASbGncsVtMf2pTC1PZbbdLIJnjfBL2rUZ1Ezrce/pof9a1JT5BusUIhyobtzRj4OgXx gXYKXmh2IHApqf/Sk5hvRs3EM9hp1T83tgMCmZB05vNE6r4+TE1yJxiPPEg8ekVojyImn4PTMYE 0qXXc01ugLtzfvqrIT8QGxScqHsZFrbwWANfrQwBREdKp7FbZYoSs2X6OyTfYbegog2kM3Twu8k CPrnSorvZDt0XtFSLBG1S9k3HVHiLb6LY/xwctHFLRT0bbA1xoUTzHywZWug4RgVs/iEzhjDdkX BGholvQHUM9v X-Google-Smtp-Source: AGHT+IF9EHQYOJXT/FeoAnM7qONnJMM3GSxiMBoaS2T7fVJttMq9c+zOqoANXXvrYjpkaAoK99N8fA== X-Received: by 2002:a17:903:440f:b0:215:58be:3349 with SMTP id d9443c01a7336-21de1969daemr231764665ad.14.1738459052273; Sat, 01 Feb 2025 17:17:32 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21de31f7020sm50782135ad.76.2025.02.01.17.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Feb 2025 17:17:31 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87y0ypk4wn.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 02 Feb 2025 01:26:16 +0900") References: <1df5c051d9d5e61894a49761415f69f7503451d0.1737983975.git.iyzsong@member.fsf.org> <06a62fdc2853a732baf3f6396d38293f38c11860.1737983975.git.iyzsong@member.fsf.org> <87ed0nt76t.fsf_-_@gmail.com> <87ed0mqlov.fsf@gmail.com> <87cyg499gc.fsf@envs.net> <87y0ypk4wn.fsf@gmail.com> Date: Sun, 02 Feb 2025 10:17:18 +0900 Message-ID: <87tt9djgbl.fsf_-_@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hi, Maxim Cournoyer writes: > Hello! > > =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > >> Hello, I write a draft GCD as "Set search paths without program wrappers= ", >> need feedbacks and corrections. >> >> Maxim and Liliana, could I list you as sponsors and send it to >> guix-devel? Thank you! > > Yes from me! Some typos spot in the text: > # The Cost Of Reverting > By limiting the creating of search path configuration files in build syst= ems, s/creating/creation/ > we can revert to program wrappers by several commits. /by several commits/by manually adding wrap phases on a case by case basis, if needed/ > # Drawbacks or Open Questions > This propose focus to solve problems caused by program wrappers in desktop This proposal focuses solving problems [...] > environments, namely GNOME and KDE, individual `wrap-progam` usages are n= ot I'd put a full stop (period) after GNOME and KDE. Individual [...] > addressed. We plan to handle that in build systems later, for examples: s/for examples/for example/ > - Handle `GUIX_GI_TYPELIB_PATH` and `GUIX_GDK_PIXBUF_MODULE_FILES` in > `glib-or-gtk-build-system`. > - Handle `GUIX_PYTHONPATH` in `python-build-system`. > There are still ABI problems caused by environment variables from > profiles, which maybe addressed later as suggested by Maxime Devos in s/maybe/may be/ --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 24 Mar 2025 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17428056462821 (code B ref 75688); Mon, 24 Mar 2025 08:41:02 +0000 Received: (at 75688) by debbugs.gnu.org; 24 Mar 2025 08:40:46 +0000 Received: from localhost ([127.0.0.1]:54116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1twdMU-0000jR-Bv for submit@debbugs.gnu.org; Mon, 24 Mar 2025 04:40:46 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:52552) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1twdMR-0000jA-5e for 75688@debbugs.gnu.org; Mon, 24 Mar 2025 04:40:44 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 3C5A8686; Mon, 24 Mar 2025 09:40:36 +0100 (CET) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id 9P84RQChAJUx; Mon, 24 Mar 2025 09:40:35 +0100 (CET) Received: from ribbon (unknown [193.50.110.142]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 24FB365A; Mon, 24 Mar 2025 09:40:34 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87sepcs3z9.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 21 Jan 2025 22:15:06 +0900") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> Date: Mon, 24 Mar 2025 09:40:32 +0100 Message-ID: <87o6xqu8hr.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-Rspamd-Queue-Id: 3C5A8686 X-Spamd-Result: default: False [0.56 / 15.00]; SPAM_FLAG(5.00)[]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM(-2.84)[-0.946]; SUSPICIOUS_RECIPS(1.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_CC(0.00)[envs.net,debbugs.gnu.org,member.fsf.org,planete-kraus.eu,gmail.com]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Action: no action X-Spamd-Bar: / X-Rspamd-Server: hera X-Spam-Score: 1.0 (+) 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 (/) Hello, Maxim Cournoyer skribis: > Just to make sure, GUIX_* variables would be honored *on top* of their > non GUIX_ prefixed (stock) variants, right? E.g. we wouldn't want GCC > to stop honoring LIBRARY_PATH even if we add GUIX_LIBRARY_PATH, as that > would confuse users. Even, I would rather not change GCC and Binutils search paths at all: it=E2=80=99s all too risky (we=E2=80=99d have troubles understanding where = problems come from, given semantics even more complex than they already are=E2=80=94remem= ber the #include_next problems we=E2=80=99ve had?), and we=E2=80=99d diverge too significantly from upstream (search path issues would likely be =E2=80=9Cou= r=E2=80=9D problem, no way to report it upstream, etc.). Overall, I think we should be cautious about GUIX_-prefixing search path environment variables and be sure to weigh the pros and cons. Ludo=E2=80=99. From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Mar 2025 12:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler , Maxim Cournoyer Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.17429065914030 (code B ref 75688); Tue, 25 Mar 2025 12:44:02 +0000 Received: (at 75688) by debbugs.gnu.org; 25 Mar 2025 12:43:11 +0000 Received: from localhost ([127.0.0.1]:36801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tx3cd-00012w-EJ for submit@debbugs.gnu.org; Tue, 25 Mar 2025 08:43:11 -0400 Received: from mail.envs.net ([5.199.136.28]:33250) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tx3cX-00012f-C6 for 75688@debbugs.gnu.org; Tue, 25 Mar 2025 08:43:08 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id E6A9C38A4011; Tue, 25 Mar 2025 12:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1742906584; bh=TfXg7kL6Mljx1mHZ/es4GXXERHw3jtaOIphyuheJBao=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UX5Spk0BI25rKgKf8rUnmCFQ5I7U4y1XopjtYxV5c3d3eXJhacEh7tWVA9mKrUVbx 80r7WLu1NZKBvYwm1ZnxX4oJ9lr/zvLAtmONPBzzr4JSVNdDiHjC0rjsTpD19YQiMV SHP0OIX/6TatTmwU/5J+RFjUeKILSSru0i82rNSvnafEl2/nWwvJGFKakO1RFfZjTy ufntbVOJEDIJebLPBfwqL7kv95BWSw/Z1+C98zEjk+iJZy08oxEUhLT1wYiwn3jnhv Aj6vS756LwZYtji4oqAL1zAoVIU+FYmi5jDX/grmN+eNzxiwgqArB5xef4AGQG6z8r Id/0jDvWyGc11XNMs2DVC1lr4CiIdjIqKQGyhi9aFfeWeHbZ80sQLK4S6skiImrB3J AhUIoxK0TVLzm2D2zk5iqZR47Yc5RCvzxoxJzHdZBFi+lu3KMNr0srb5TunxzSHpL8 Qj3Uiqk1bTIP7eacGw2X1A7WF0CZ3l0lcRBqeYGvCKRSlNAffAuEGdLh2yFXDybQeW YOwZO8pIcCrxfyhhaTrWpb/pSJVA0LfEr3hUkZBy8gXnykhVQwwXl0tG7TucZJ3qLP +/fbyIqnNTxTVnN1HCQV4legdzbHO3sl3aU2dlRrxCQl3ZAhAgb+Ea10XWbnTOap1g Frq6pOTSztkhfQJ0aSe1XU5s= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xNv5laR5B-BG; Tue, 25 Mar 2025 12:42:54 +0000 (UTC) Received: from localhost (unknown [112.44.105.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 25 Mar 2025 12:42:54 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 68c82246; Tue, 25 Mar 2025 12:47:23 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87o6xqu8hr.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 24 Mar 2025 09:40:32 +0100") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> <87o6xqu8hr.fsf@gnu.org> Date: Tue, 25 Mar 2025 20:47:23 +0800 Message-ID: <877c4djmzo.fsf@envs.net> 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: 0.0 (/) 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: -1.0 (-) Ludovic Court=C3=A8s writes: > Even, I would rather not change GCC and Binutils search paths at all: > it=E2=80=99s all too risky (we=E2=80=99d have troubles understanding wher= e problems come > from, given semantics even more complex than they already are=E2=80=94rem= ember > the #include_next problems we=E2=80=99ve had?), and we=E2=80=99d diverge = too > significantly from upstream (search path issues would likely be =E2=80=9C= our=E2=80=9D > problem, no way to report it upstream, etc.). Sure. > Overall, I think we should be cautious about GUIX_-prefixing search path > environment variables and be sure to weigh the pros and cons. I think we'll only add them for desktop (GTK and QT) applications, which have issues reported (broke foreign system): GUIX_GDK_PIXBUF_MODULE_FILES (fixed) GUIX_GIO_EXTRA_MODULES (https://issues.guix.gnu.org/77057) GUIX_QT_PLUGIN_PATH (https://issues.guix.gnu.org/73897) GUIX_GTK{2,3,4}_PATH (patched) And maybe GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS, which have most of duplicated entries (https://issues.guix.gnu.org/23118) From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Apr 2025 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler , Maxim Cournoyer Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.174349252711145 (code B ref 75688); Tue, 01 Apr 2025 07:29:02 +0000 Received: (at 75688) by debbugs.gnu.org; 1 Apr 2025 07:28:47 +0000 Received: from localhost ([127.0.0.1]:44863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzW3D-0002te-6p for submit@debbugs.gnu.org; Tue, 01 Apr 2025 03:28:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42224) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzW39-0002sU-Kb for 75688@debbugs.gnu.org; Tue, 01 Apr 2025 03:28:44 -0400 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 1tzW31-00013g-M1; Tue, 01 Apr 2025 03:28:35 -0400 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=RMstEg7OGHvac3PJ1vOZDox6+51ogFKvSfk1D/kiiFU=; b=TIKnuEzI/HC/Y5THIJr4 LBjAbYG53Pjx56gkPDZzN7uuyflUlac2w3ePcNWfPDGxzksZQ9q+cpb1FNV9kE1uK2Pjz/8umptal pf+lpHfPNQjKh6RtwyRMpiubZZeGoXKmdtnz7LRloeTCRylcmprSG9KxD6jB8BvUZdEmZPtOsNNJm Ec2EdV2nVm0wuQ3FznhQubTpLCiRIAzNNhdrXg6kS6g99ohUQDtQhfAisi7EbSI2RbSXDIrthPTRX 3I33X/RWhtqyY5SoixZi7l6r6fFD0W6OWZO4oyptR/7JoPGTO093Y+/Y6zM6nJooxOfrSIxiytV6r bTaUK3tHkmD22A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <877c4djmzo.fsf@envs.net> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 25 Mar 2025 20:47:23 +0800") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> <87o6xqu8hr.fsf@gnu.org> <877c4djmzo.fsf@envs.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 12 Germinal an 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Charme X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 01 Apr 2025 09:28:04 +0200 Message-ID: <87plhwgx2z.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-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 (---) Hi, =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > I think we'll only add them for desktop (GTK and QT) applications, which > have issues reported (broke foreign system): > > GUIX_GDK_PIXBUF_MODULE_FILES (fixed) > GUIX_GIO_EXTRA_MODULES (https://issues.guix.gnu.org/77057) > GUIX_QT_PLUGIN_PATH (https://issues.guix.gnu.org/73897) > GUIX_GTK{2,3,4}_PATH (patched) OK. > And maybe GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS, which have most > of duplicated entries (https://issues.guix.gnu.org/23118) Problem is that XDG_ variables are very generic and used pretty much by everything, not just desktop applications; and it=E2=80=99s important IMO t= hat users be able to customize their code in the documented way: by setting XDG_*. Thanks, Ludo=E2=80=99. From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 08:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.174375518621136 (code B ref 75688); Fri, 04 Apr 2025 08:27:01 +0000 Received: (at 75688) by debbugs.gnu.org; 4 Apr 2025 08:26:26 +0000 Received: from localhost ([127.0.0.1]:37020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0cNd-0005Uq-JM for submit@debbugs.gnu.org; Fri, 04 Apr 2025 04:26:25 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:42454) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u0cNa-0005UZ-65 for 75688@debbugs.gnu.org; Fri, 04 Apr 2025 04:26:22 -0400 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-af908bb32fdso1510977a12.1 for <75688@debbugs.gnu.org>; Fri, 04 Apr 2025 01:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743755176; x=1744359976; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kKEZ6QjEJEUP7gEgRpd2W+CN4D6jzu8OidDlo2Hz23I=; b=SvHouAN4uz68/WmuKh4nV2SzsrhYbTSbtTY3OVPUlmBeiHBP6zKE27cxaxaD3Ov06a Q6H7Usaj2VXYy0ab733nGfHeyxWvRwiIn3suuM4bSIhC3Dv0imRNhyZzryIEqb6hIHP2 TYOdpvdcpnQ0tGmnWCTdccnkjIrE0EvB+3t+ukHzzHYyFCkdaIaXI5Q0DbuC/ADJtWwz Sr3KIAbCUr+DaSTVhUVkDCkPe1NbWGbT65RgWgiHmInuQotsacDbNIQxvN2s2Ul2bhMO 7iW70ZvUVn9/F56t7CTEVGOH9Pk2qhPKcKurSWd/OPGJpTo+3n+Wy9x/gHasRTfCKPzc RKiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743755176; x=1744359976; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kKEZ6QjEJEUP7gEgRpd2W+CN4D6jzu8OidDlo2Hz23I=; b=MBYrUVJyqmi7AhTDJQ5gjIWcUHuMyT4QxrKh/ImzXWs9MNkDfEimHS5B+dzaM1X/Bt OtbjORxha4BwBe/xKYEQ66DC3Y6X3rrndV+9GKcE478GlwJSmZnnTiDu5qsDqQquUBeE EauEpRwlzI3dFpdbGEffp/ixxHqV10qh27igyvMl0VnOqMdjzzDwGJIOaB0HcLhS2LNU /Z6YKjrRqqF4G3DbhV/65DclTM8qudCiK9FmdTVPFOoQpaXXtulkzty3C7kpsnD8jrmX tJHo+ZK6bLQ+9T64SvOlf+ohS8Vaj30uVR0W53r47Patt3L2nKOVyCWleRKOZpmvCyD3 +v+g== X-Forwarded-Encrypted: i=1; AJvYcCXQOMkvJQt6MQorx5bIaF7htAFLBPJ2Q0ruqYEmYv6wZ1ZffG3kvKLQ5T8aQV1sBSGQTzQNhA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxyP6gk+GBChYSLBDy04RVesqJgtdtQDe+/mNZYzQ/IPe8ulI4/ 5n1xUI0FUl8Zi+Xbr0uRf8oFm+RgADTc2jZrZBUJ3A69keP6kJU9 X-Gm-Gg: ASbGnctDA5Ov8b1DhaNIRr87ZcQ83qYE24WJct/1B9bmxEKehOSLw1HMGz+onwYtpwG 7ieibuJ7JZFDwcDVp8CYg3YN1ykIa3lQNIBwWlvWqPy1N7s04YqTch3/b0WFjo6GYMPRaXv14iC g0FINqqsrSSjsfTT//G/ee1bZIfDdRf3XzBhEO8hrPXh6SvaS6whb3gWjT71+QkNN5cixFed4Hy o6k4nuWmfRyvOkqJ45n0vTwiIBrsE4X4KXAV2Y/N1XiJXT49HONvLrIaiaD0Ro/nG+1PDHRq4g8 HJRcJOUjxWaEMfzM0yjYZz7grdEDzMWPp3R/MmTSoaU= X-Google-Smtp-Source: AGHT+IGvkO3NSzL/wxk47+JPhDBNz9r3tfOwzKU5DXfhnWRCgeckn/0YxKq/5Y02yO9wnfl9THsnTA== X-Received: by 2002:a17:90b:50cf:b0:2fa:603e:905c with SMTP id 98e67ed59e1d1-3057a59ea63mr9509665a91.2.1743755175558; Fri, 04 Apr 2025 01:26:15 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-305983b9d08sm2880810a91.35.2025.04.04.01.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Apr 2025 01:26:14 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: <87plhwgx2z.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 01 Apr 2025 09:28:04 +0200") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> <87o6xqu8hr.fsf@gnu.org> <877c4djmzo.fsf@envs.net> <87plhwgx2z.fsf@gnu.org> Date: Fri, 04 Apr 2025 17:25:56 +0900 Message-ID: <87jz80xrhn.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hi, Ludovic Court=C3=A8s writes: > Hi, > > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> I think we'll only add them for desktop (GTK and QT) applications, which >> have issues reported (broke foreign system): >> >> GUIX_GDK_PIXBUF_MODULE_FILES (fixed) >> GUIX_GIO_EXTRA_MODULES (https://issues.guix.gnu.org/77057) >> GUIX_QT_PLUGIN_PATH (https://issues.guix.gnu.org/73897) >> GUIX_GTK{2,3,4}_PATH (patched) > > OK. > >> And maybe GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS, which have most >> of duplicated entries (https://issues.guix.gnu.org/23118) > > Problem is that XDG_ variables are very generic and used pretty much by > everything, not just desktop applications; and it=E2=80=99s important IMO= that > users be able to customize their code in the documented way: by setting > XDG_*. There is no need to touch the original variables/behavior; we can add our Guix-specific ones on top. Like what we did for GUIX_PYTHONPATH; PYTHONPATH is still available for users. --=20 Thanks, Maxim From unknown Thu Jun 19 14:18:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75688] [PATCH 0/2] Introduce GUIX_LIBRARY_PATH to replace harmful environment variables Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Apr 2025 00:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 75688@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Vivien Kraus , Liliana Marie Prikler , Maxim Cournoyer Received: via spool by 75688-submit@debbugs.gnu.org id=B75688.174381423519185 (code B ref 75688); Sat, 05 Apr 2025 00:51:02 +0000 Received: (at 75688) by debbugs.gnu.org; 5 Apr 2025 00:50:35 +0000 Received: from localhost ([127.0.0.1]:40652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0rjz-0004z5-1Y for submit@debbugs.gnu.org; Fri, 04 Apr 2025 20:50:35 -0400 Received: from mail.envs.net ([5.199.136.28]:35872) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0rjw-0004yw-Jv for 75688@debbugs.gnu.org; Fri, 04 Apr 2025 20:50:29 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id A2B9038A405D; Sat, 5 Apr 2025 00:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1743814227; bh=l84UI4h2/Nr0ngVKqR014HIy2wcBywe0f5FyljG0ZJw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KeC8kyo3r3nb4vl5Mn2oZ+d0nQ/+edK8qR4+gSKvmMdjZSWAJDaWHlN7a1UJVAkv4 RvbPEbjuFAfKgGB3zSKX0k4YuItM6A67lxg+fp5tUagX72mRIdchou3NZ4iUTHiIOe 7FtyJJ3+eCanYgQEX7WSsWBpuTeAZfiNOGHl804nOIVQLkJ5xMtYKx6XoHBQtnOFCO gaZUDorfkacWz+ZkmK2AHjJgDh8CzEnl8R8Jw5aMpfPvCs+cuibMIvVYkT86bvEesM X0tatPT3fQmbcwr0t+qIXLSpdmSZ5T4I88w6LkWTi3zkimVoH2XzzZbNfcm6rGZl5t M+nfUxpHMF7iQP64bJGP457MQCG3+WBD4PRtm2wSXB7tr7BT+63W3HbYgSth36qX75 BhogAOjA937JKEFJ+Y6QKjxzZNMmRtilqxhgq5GNa7RfduYOPImlMN/HeGazRDZrRL ujGGqNMzh5rvtqiArPQbLeTrhKvc6dAtBTHmZdB5b+oXEl4y2+w8mnLwgSNI/m13rh EhT1xzmYL70vWbs9NL3BP1JwDiXlqHfBP4k4Oi9XwAOxNYbCwc48FJzm5NshSkaMod Zdkl5uuVFO+kirDz9AXK6F1AgFdBsPlcQ4Q+jphW9cYnyq0ecQKdQHQyqGSclCAVt7 RxS62Htl2rdhHTyHSLy1wpMo= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mCMRp5STGqcK; Sat, 5 Apr 2025 00:50:19 +0000 (UTC) Received: from localhost (unknown [112.44.105.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Sat, 5 Apr 2025 00:50:19 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f799e1c3; Sat, 5 Apr 2025 00:54:58 +0000 (UTC) From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= In-Reply-To: <87plhwgx2z.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 01 Apr 2025 09:28:04 +0200") References: <87msfld1pi.fsf@gmail.com> <877c6ord5p.fsf@envs.net> <87sepcs3z9.fsf@gmail.com> <87o6xqu8hr.fsf@gnu.org> <877c4djmzo.fsf@envs.net> <87plhwgx2z.fsf@gnu.org> Date: Sat, 05 Apr 2025 08:54:58 +0800 Message-ID: <87cydr4ecd.fsf@envs.net> 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: 0.0 (/) 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: -1.0 (-) Ludovic Court=C3=A8s writes: >> And maybe GUIX_XDG_DATA_DIRS and GUIX_XDG_CONFIG_DIRS, which have most >> of duplicated entries (https://issues.guix.gnu.org/23118) > > Problem is that XDG_ variables are very generic and used pretty much by > everything, not just desktop applications; and it=E2=80=99s important IMO= that > users be able to customize their code in the documented way: by setting > XDG_*. Yes, XDG_* are still going to be setup in 'etc/profile' by search-paths, and have higher priority than GUIX_XDG_* (and we won't set GUIX_XDG_* by profile), so that user can customize them.