GNU bug report logs - #45785
[PATCH 2/4] guix: qt-utils: Wrapped executables honor user's envvars.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Hartmut Goebel <h.goebel@HIDDEN>; Keywords: patch; merged with #45784, #45786, #45787; dated Mon, 11 Jan 2021 14:43:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Merged 45784 45785 45786 45787. Request was from Hartmut Goebel <h.goebel@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Jan 2021 14:42:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 11 09:42:31 2021
Received: from localhost ([127.0.0.1]:56251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kyyOt-0003hn-6P
	for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 09:42:31 -0500
Received: from lists.gnu.org ([209.51.188.17]:38474)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <h.goebel@HIDDEN>) id 1kyyOh-0003hH-5H
 for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 09:42:20 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39768)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <h.goebel@HIDDEN>)
 id 1kyyOg-000533-R4
 for guix-patches@HIDDEN; Mon, 11 Jan 2021 09:42:18 -0500
Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:41595)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <h.goebel@HIDDEN>)
 id 1kyyON-0007G1-RB
 for guix-patches@HIDDEN; Mon, 11 Jan 2021 09:42:11 -0500
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4DDxHR1xNFz1s0fq;
 Mon, 11 Jan 2021 15:41:54 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 4DDxHQ6nyzz1sWcT;
 Mon, 11 Jan 2021 15:41:54 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024)
 with ESMTP id Q-yJ1aUqLzQC; Mon, 11 Jan 2021 15:41:54 +0100 (CET)
Received: from hermia.goebel-consult.de
 (ppp-188-174-55-154.dynamic.mnet-online.de [188.174.55.154])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPS;
 Mon, 11 Jan 2021 15:41:54 +0100 (CET)
Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2])
 by hermia.goebel-consult.de (Postfix) with ESMTP id 8C48760378;
 Mon, 11 Jan 2021 15:41:44 +0100 (CET)
From: Hartmut Goebel <h.goebel@HIDDEN>
To: 45193 <at> debbugs.gnu.org,
	guix-patches@HIDDEN
Subject: [PATCH 2/4] guix: qt-utils: Wrapped executables honor user's envvars.
Date: Mon, 11 Jan 2021 15:41:42 +0100
Message-Id: <ceef8786cf0bf12fcec3fcce066d7f82f4bb746d.1610376081.git.h.goebel@HIDDEN>
X-Mailer: git-send-email 2.21.3
In-Reply-To: <e8cfff4ab1dd7f0c39875d22057e4ef45a10cc7b.1610376081.git.h.goebel@HIDDEN>
References: <e8cfff4ab1dd7f0c39875d22057e4ef45a10cc7b.1610376081.git.h.goebel@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: none client-ip=2001:a60:0:28:0:1:25:1;
 envelope-from=h.goebel@HIDDEN; helo=mail-out.m-online.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Prior to this change, wrappers did set the specified environment variables to
a fixed value, overwriting any user settings. This inhibited propagating
e.g. XDG_DATA_DIRS from a profile to the application.

Now user environment variables are prefixed (if the variable defines some
"binary" search path, e.g. QT_PLUGIN_PATH) or suffixed (if the variable
defines some config or data search path, e.g. XDG_DATA_DIRS). The code could
also allow to overwrite, anyhow currently no variable is defined like this.

* guix/build/qt-utils.scm (variables-for-wrapping): For each env-var to
  be wrapped, specify whether it should prefix, suffix or overwrite the
  user's variable.
---
 guix/build/qt-utils.scm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
index 3fbdb6be61..030059522d 100644
--- a/guix/build/qt-utils.scm
+++ b/guix/build/qt-utils.scm
@@ -39,14 +39,15 @@
    (lambda (var-to-wrap) (not (null? (last var-to-wrap))))
    (map
     (lambda (var-spec)
-      `(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec))))
+      (list (first var-spec) (second var-spec)
+            (collect-sub-dirs base-directories (third var-spec))))
     (list
      ;; these shall match the search-path-specification for Qt and KDE
      ;; libraries
-     '("XDG_DATA_DIRS" "/share")
-     '("XDG_CONFIG_DIRS" "/etc/xdg")
-     '("QT_PLUGIN_PATH" "/lib/qt5/plugins")
-     '("QML2_IMPORT_PATH" "/lib/qt5/qml")))))
+     '("XDG_DATA_DIRS" suffix "/share")
+     '("XDG_CONFIG_DIRS" suffix "/etc/xdg")
+     '("QT_PLUGIN_PATH" prefix "/lib/qt5/plugins")
+     '("QML2_IMPORT_PATH" prefix "/lib/qt5/qml")))))
 
 
 (define* (wrap-qt-program* program #:key inputs output-dir)
-- 
2.21.3





Acknowledgement sent to Hartmut Goebel <h.goebel@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#45785; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 11 Jan 2021 16:00:02 UTC

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