From unknown Sun Jun 15 08:29:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#53447 <53447@debbugs.gnu.org> To: bug#53447 <53447@debbugs.gnu.org> Subject: Status: [PATCH] doc: Unset environment variables considered harmful Reply-To: bug#53447 <53447@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:29:46 +0000 retitle 53447 [PATCH] doc: Unset environment variables considered harmful reassign 53447 guix-patches submitter 53447 Liliana Marie Prikler severity 53447 normal tag 53447 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 22 09:16:59 2022 Received: (at submit) by debbugs.gnu.org; 22 Jan 2022 14:16:59 +0000 Received: from localhost ([127.0.0.1]:36055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBHCN-0003VP-5A for submit@debbugs.gnu.org; Sat, 22 Jan 2022 09:16:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:35382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBHCL-0003VI-Ov for submit@debbugs.gnu.org; Sat, 22 Jan 2022 09:16:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBHCK-0006DU-Uh for guix-patches@gnu.org; Sat, 22 Jan 2022 09:16:57 -0500 Received: from [2a00:1450:4864:20::443] (port=42882 helo=mail-wr1-x443.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBHCJ-0007te-Cn for guix-patches@gnu.org; Sat, 22 Jan 2022 09:16:56 -0500 Received: by mail-wr1-x443.google.com with SMTP id a13so5078067wrh.9 for ; Sat, 22 Jan 2022 06:16:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:content-transfer-encoding:message-id :mime-version; bh=nok2hJiP/4x23WJQTprT+KHLTN2O4FgLumAs1rSpdm4=; b=XwTuLxyQpM8M79GACRkEI09Z/DoRX4gLpgSXjbJS2vUsv8b00ah+Mhmb0aPeJCLSem Ctnlgs8kZgo9j132uoyZR6eU7nw8Sw0NG2maWOKBEqGIZubq315UgS8AcWoXOMuAn/nX 4elU2zFUBkkF4dbpasPes/2t7yFAsxP4BVr6F3B4Fj2ayeC9fakAVM7G1Ny82FggzDdO SI+H9/pk+xNnq6g+AhJagsnM97OGKVzs2OZvmRqCODJj9wyk8LJcjpH0eSYeRVm6EBIf KgCQ1HImBPEygdit/0CMRePeOzfAfHZJUvgU6Hp8d3fm7jUeAtP1YaTAqikA8AbDIKKe hc9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:content-transfer-encoding :message-id:mime-version; bh=nok2hJiP/4x23WJQTprT+KHLTN2O4FgLumAs1rSpdm4=; b=pr65wuwAkaTmar+ZLRK1tvFMa7rKDkDGaSzPGv5BeugT7lqrw+fqKnexqlMmKbrPuW TvBvT8WhjbgSyofKPHzArRW74ly1OEThdc2jBJmI8Jn+ehpJP2xnNz3Bi0UGpMH4Onyc 5MW7IsANeu6gT2jlYbc9QUVBMRJ51EYOWsazB+A5G8+wtllT+wn+5zCuGcDDNvZBfJmD P9ywQBOZh7XuldMpapKtiikGAJRqHIuwJE3j86KSzg9cFBF9EzEX6VRrfNtOqG8LNRlG 5kWNb24inC+gx4oW58zGxM9+l8zqo/0oPGFQqIZg5yBsotRf6BL3WXwFZgV3D7sGEe4f QUBw== X-Gm-Message-State: AOAM533SDbcYzWbwXvPP69dWFGvaZ5gUMVtW7R5Oq5wY6104a85GSMTF XsrYuK5GbID8ku/nyOoSvRtkZ/ciz6k= X-Google-Smtp-Source: ABdhPJzJEmvl8n4Qg7zrshbxDW8W2AHtABLJnPt+ZrB0H0xPC/JOXPkprF3KOcf5/uQR7RsFvANklg== X-Received: by 2002:adf:dec3:: with SMTP id i3mr1420349wrn.225.1642861010937; Sat, 22 Jan 2022 06:16:50 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z13sm10280551wrm.90.2022.01.22.06.16.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 06:16:50 -0800 (PST) From: Liliana Marie Prikler Date: Sat, 22 Jan 2022 15:13:20 +0100 Subject: [PATCH] doc: Unset environment variables considered harmful to: guix-patches@gnu.org Content-Transfer-Encoding: 7bit Message-ID: MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::443 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=liliana.prikler@gmail.com; helo=mail-wr1-x443.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Application Setup): Add subsection for implicit environment variables. --- doc/guix.texi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 912a8e3c5a..805e3b611f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2023, 6 +2023, 33 @@ want to avoid auto-loading the Emacs packages installed wi [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] 1.3 SPOOFED_FREEMAIL No description available. 1.5 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be... X-Debbugs-Envelope-To: submit 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: -2.3 (--) * doc/guix.texi (Application Setup): Add subsection for implicit environment variables. --- doc/guix.texi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 912a8e3c5a..805e3b611f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2023,6 +2023,33 @@ want to avoid auto-loading the Emacs packages installed with Guix, you can do so by running Emacs with the @option{--no-site-file} option (@pxref{Init File,,, emacs, The GNU Emacs Manual}). +@subsection Implicit Environment Variables + +Many environment variables are defined in a way that assumes a certain +default value, even if unset. For example, bash uses the current +working directory as @env{PATH} if unset, or @env{XDG_CONFIG_HOME} +expands to @file{$HOME/.config}. Some of these defaults remain the same +whether a package is used through Guix or not---however, environment +variables referring to @file{/etc} or @file{/usr} typically have their +meaning subtly changed in Guix. An application installed via Guix might +instead look up files in its own @file{etc} structure, or (if a +search-path was specified) even override the default for packages from +the foreign distro. + +In order to avoid problems coming from such implicitly defined +environment variables, it is best to explicitly define them somewhere. +Startup files like @file{~/.bash_profile} are usually a good location +to do so. However, not all setups treat them equally. While on Guix +System, the user's login shell is used to spawn a graphical session, +other distros may choose a different approach. For instance, systemd +is capable of spawning graphical applications in a clean environment, +but allows said environments to be modified through an +@file{override.conf} placed in the right directory. + +Regardless of which method is used to set such environment variables, +they typically should only be set once at login. Placing them in files +like @file{~/.bashrc} or similar has adverse effects on other commands +that want to create clean environments, such as @command{guix shell}. @node Upgrading Guix @section Upgrading Guix -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 22 11:04:34 2022 Received: (at 53447) by debbugs.gnu.org; 22 Jan 2022 16:04:34 +0000 Received: from localhost ([127.0.0.1]:37708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBIsU-0007HA-1Q for submit@debbugs.gnu.org; Sat, 22 Jan 2022 11:04:34 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:56152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBIsS-0007Gw-DM for 53447@debbugs.gnu.org; Sat, 22 Jan 2022 11:04:32 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 985C31D2; Sat, 22 Jan 2022 17:04:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09pawlt5pIzc; Sat, 22 Jan 2022 17:04:25 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 7CC201A0; Sat, 22 Jan 2022 17:04:25 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#53447: [PATCH] doc: Unset environment variables considered harmful References: Date: Sat, 22 Jan 2022 17:04:25 +0100 In-Reply-To: (Liliana Marie Prikler's message of "Sat, 22 Jan 2022 15:13:20 +0100") Message-ID: <875yqb21va.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 985C31D2 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Liliana, Liliana Marie Prikler skribis: > * doc/guix.texi (Application Setup): Add subsection for implicit environm= ent > variables. > --- > doc/guix.texi | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 912a8e3c5a..805e3b611f 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -2023,6 +2023,33 @@ want to avoid auto-loading the Emacs packages inst= alled with Guix, you > can do so by running Emacs with the @option{--no-site-file} option > (@pxref{Init File,,, emacs, The GNU Emacs Manual}). >=20=20 > +@subsection Implicit Environment Variables > + > +Many environment variables are defined in a way that assumes a certain > +default value, even if unset. For example, bash uses the current > +working directory as @env{PATH} if unset, or @env{XDG_CONFIG_HOME} > +expands to @file{$HOME/.config}. Some of these defaults remain the same > +whether a package is used through Guix or not---however, environment > +variables referring to @file{/etc} or @file{/usr} typically have their > +meaning subtly changed in Guix. An application installed via Guix might > +instead look up files in its own @file{etc} structure, or (if a > +search-path was specified) even override the default for packages from > +the foreign distro. I think I miss some context: what concrete problem is this trying to solve? What is it telling me to do? I wonder to what extent this is actionable for a user, due to wording that leaves it up to the reader to figure out how this applies to them: =E2=80=9CMany environment variables=E2=80=9D =E2=80=9Ca certain default value=E2=80=9D =E2=80=9CSome of these=E2=80=9D =E2=80=9CAn application installed via Guix might=E2=80=9D =E2=80=9Cproblems coming from such implicitly defined=E2=80=9D =E2=80=A6 I think the =E2=80=9CApplication Setup=E2=80=9D section should be as concre= te as possible, with clear instructions (=E2=80=9CIf X then type Y=E2=80=9D), pos= sibly followed by explanations that curious readers can read and that others can skip. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 22 12:53:13 2022 Received: (at 53447) by debbugs.gnu.org; 22 Jan 2022 17:53:13 +0000 Received: from localhost ([127.0.0.1]:37813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBKZd-0001lL-2A for submit@debbugs.gnu.org; Sat, 22 Jan 2022 12:53:13 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBKZb-0001l6-GJ for 53447@debbugs.gnu.org; Sat, 22 Jan 2022 12:53:12 -0500 Received: by mail-wr1-f66.google.com with SMTP id h29so3157484wrb.5 for <53447@debbugs.gnu.org>; Sat, 22 Jan 2022 09:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=KDtmAoLiyQMMflvd0yh+FNSBskw4I7RMeOClHkeP0Sg=; b=RgIQAsvcyHNrhyayaPAALtzkjxUb5RDunKOhDY9hv7NgdJ+pL8MnO+EH/ROTGJdSjb X8GA/e2zp7AfNrysJcpJYjCQREt6G9DdsM3gakGqg7Hq4em6TECwMZled2GqqDoScf0A 48Jrs9cGplmYfojnEKUpH2xxc1CJLPOlXVBft2fNUQZ3Iy7LW/yqOHilxEYQmt2sWhB/ DstAjesA/U5MkfZlJMA66/LuXNNpJpr5CKn5eCRyinEu7nkn7FkBfDI4SJMI3x20lJaK aF2Kperp1m6xXvoz5s/0YRRXLkFTqdAqsi+l98GKmWJzCWcFl/dWkT7swOz1aOPq3t6L w5Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=KDtmAoLiyQMMflvd0yh+FNSBskw4I7RMeOClHkeP0Sg=; b=hzjDTvG9CC5iGsAxjHXrdmE3Sdoh+zm9rJZXO2TcUhSLCMo5jQrq1Swkj95KUnf+Tn hhgpHXnKhGJ3c0suS9tzeM9Xb1WnqFu579aJyxR/F9hCZIoUPE4ZAZVgYiuz2IJRF9Se VbieldB0lMQbTb4B5zvaie8kcuiPRrdL6I7OtTGUkpqz9FGaywQ3YowpZ+icM+f1NrH4 b+BqT7Tn1jD0luiGLSyRhFLOIADwYZwTwnHqs/XqmSCcQK+yOMvclSDYWaTk6HK6t/uj Gk1J970hz9w0YoR8jp5lXhaQqd8JIwJ8nHDpBFSya0hnqa5x5u7LAwW3ySMVIeHNKr/L J8Gg== X-Gm-Message-State: AOAM530d2FoG9z2xyZkh9Y+ZePlygIspDA9d+Xxai3NYRUIDUOGaNNRg jigILyDl+kcK/k96MkBSIyE= X-Google-Smtp-Source: ABdhPJx8n3AUAmn6Vrl7xcwes1+GJKimvcachVMUWWOiAnlFnG53oQugJxiKD6H+LX2Cb3V2ZmT+Gg== X-Received: by 2002:a05:6000:1acb:: with SMTP id i11mr8610627wry.617.1642873985174; Sat, 22 Jan 2022 09:53:05 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i6sm5073202wrw.8.2022.01.22.09.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 09:53:04 -0800 (PST) Message-ID: <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> Subject: Re: bug#53447: [PATCH] doc: Unset environment variables considered harmful From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Sat, 22 Jan 2022 18:53:02 +0100 In-Reply-To: <875yqb21va.fsf@gnu.org> References: <875yqb21va.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, Am Samstag, dem 22.01.2022 um 17:04 +0100 schrieb Ludovic Courtès: > Hi Liliana, > > Liliana Marie Prikler skribis: > > > * doc/guix.texi (Application Setup): Add subsection for implicit > > environment variables. > > --- > >  doc/guix.texi | 27 +++++++++++++++++++++++++++ > >  1 file changed, 27 insertions(+) > > > > diff --git a/doc/guix.texi b/doc/guix.texi > > index 912a8e3c5a..805e3b611f 100644 > > --- a/doc/guix.texi > > +++ b/doc/guix.texi > > @@ -2023,6 +2023,33 @@ want to avoid auto-loading the Emacs > > packages installed with Guix, you > >  can do so by running Emacs with the @option{--no-site-file} option > >  (@pxref{Init File,,, emacs, The GNU Emacs Manual}). > >   > > +@subsection Implicit Environment Variables > > + > > +Many environment variables are defined in a way that assumes a > > certain > > +default value, even if unset.  For example, bash uses the current > > +working directory as @env{PATH} if unset, or @env{XDG_CONFIG_HOME} > > +expands to @file{$HOME/.config}.  Some of these defaults remain > > the same > > +whether a package is used through Guix or not---however, > > environment > > +variables referring to @file{/etc} or @file{/usr} typically have > > their > > +meaning subtly changed in Guix.  An application installed via Guix > > might > > +instead look up files in its own @file{etc} structure, or (if a > > +search-path was specified) even override the default for packages > > from > > +the foreign distro. > > I think I miss some context: what concrete problem is this trying to > solve?  What is it telling me to do? > > I wonder to what extent this is actionable for a user, due to wording > that leaves it up to the reader to figure out how this applies to > them: > >   “Many environment variables” >   “a certain default value” >   “Some of these” >   “An application installed via Guix might” >   “problems coming from such implicitly defined” >   … > > I think the “Application Setup” section should be as concrete as > possible, with clear instructions (“If X then type Y”), possibly > followed by explanations that curious readers can read and that > others can skip. > > WDYT? I think there are too many examples to exhaustively list them all, but to give an example, [1, 2, 3, 4] are all the same bug and in [2] Carlo said we should document this under "Application Setup". My personal stance is that the Guix behaviour is not a bug and other distros are weird for not explicitly binding it. I know my wording is not the best here, but "If X then Y" is a little too late when your session broke. But if your session broke and you read the manual saying "blah blah unset environment variables evil", you are more likely to suspect "hmm, maybe evil environment variables were evil". Fortunately, with distros trying out Flatpaks and Snaps, XDG_DATA_DIRS is less likely to break them, but still. We never know which variable will be the next to blow things up. Cheers [1] https://issues.guix.gnu.org/26202 [2] https://issues.guix.gnu.org/45360 [3] https://issues.guix.gnu.org/48300 [4] https://issues.guix.gnu.org/53379 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 24 17:27:10 2022 Received: (at 53447) by debbugs.gnu.org; 24 Jan 2022 22:27:10 +0000 Received: from localhost ([127.0.0.1]:46136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC7np-0000iV-I9 for submit@debbugs.gnu.org; Mon, 24 Jan 2022 17:27:09 -0500 Received: from mail-qt1-f170.google.com ([209.85.160.170]:34434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC7nn-0000iG-Dx for 53447@debbugs.gnu.org; Mon, 24 Jan 2022 17:27:07 -0500 Received: by mail-qt1-f170.google.com with SMTP id c15so8867520qtv.1 for <53447@debbugs.gnu.org>; Mon, 24 Jan 2022 14:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=iuTOWwsuYRY0+8jT4vahbzBYoagwr0gQ9GBLxy/K1VQ=; b=gEhG7drM54fKWHM+KR4866Rpj4TMpVVH+LmC3mOBrXR0JE6DMEGxMHCqr6Rmh3olij ZcCdzBBTb6xdOrTeBEGNvdwhvzaDIfugrMHI/juWDGJSWehLHynhzcykgd2LKjGe3BnQ UU0JAk1P/AYJPN0GwCLjLxwXp6ydcR1xHjbPHE6YZblPACvNhnF5+H/mECAN9fKIlMHc ebTaqTnMrgWKJcKJ1HcXqhp6dz+6Zt1VLN4N8ILEAmF+rv8JEwe1NwSbBqsrFE4Qqjq3 BAYrFgVio3rsvzC/18RjZQxd1jTmfM/IDn3yXhsY7bsMqt/i3JpW7DGNcZidegRpqCyp JbUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=iuTOWwsuYRY0+8jT4vahbzBYoagwr0gQ9GBLxy/K1VQ=; b=Nu8fg1ZO1Te8AWLGH+MUg/KQDZPIsDod6Ne6bdXhM+a1WzguXkcfvERp7FPppqp1Eh tToz7x9o2+MtpUGiFs8x5x9ao0rxGs1axvjZErfDjjgrB4ToNAVpUE7IJ2hqrR225OO1 a3lK0PA+dzs/Ff+EVxl9kbuucBxaT/YZhJP6iBOeCUd/wKB4Q5q7yZLrvEIFqLJ39oQ8 L1BDvnaRCAcdhZJuYWyD33J70EJOPvAVRqBQiyj6hTCvYN4Vtq6z6U8tH3lUncFVxrkJ Nmx8bo7Fjb5SMpOvfaxyZLCoRNUOLHrAs6sssxpb2cqqESUSDKHD86JEcbSk2L76SfKb ESaA== X-Gm-Message-State: AOAM530jg/MoFa0v2SyhvH2BgfAnHU5jVgmauig928+V1Bl4BdsJ6tf3 BQctIDdYAihMU80/4Cei/KZkw/6yOUg= X-Google-Smtp-Source: ABdhPJwALfaCpGBcASFNtw2LdKXNZIPb+G7mpu6R55i4KdrlwG6voFdD5gXrN7D3Cf6n5psIkMxBzQ== X-Received: by 2002:ac8:5993:: with SMTP id e19mr14488266qte.500.1643063221789; Mon, 24 Jan 2022 14:27:01 -0800 (PST) Received: from hurd (dsl-205-233-125-146.b2b2c.ca. [205.233.125.146]) by smtp.gmail.com with ESMTPSA id h12sm7876131qkp.129.2022.01.24.14.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 14:27:01 -0800 (PST) From: Maxim Cournoyer To: Liliana Marie Prikler Subject: Re: bug#53447: [PATCH] doc: Unset environment variables considered harmful References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> Date: Mon, 24 Jan 2022 17:27:00 -0500 In-Reply-To: <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> (Liliana Marie Prikler's message of "Sat, 22 Jan 2022 18:53:02 +0100") Message-ID: <87y2344vnv.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53447 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana and Ludo, Liliana Marie Prikler writes: > Hi Ludo, > > Am Samstag, dem 22.01.2022 um 17:04 +0100 schrieb Ludovic Court=C3=A8s: >> Hi Liliana, >>=20 >> Liliana Marie Prikler skribis: >>=20 >> > * doc/guix.texi (Application Setup): Add subsection for implicit >> > environment variables. >> > --- >> > =C2=A0doc/guix.texi | 27 +++++++++++++++++++++++++++ >> > =C2=A01 file changed, 27 insertions(+) >> >=20 >> > diff --git a/doc/guix.texi b/doc/guix.texi >> > index 912a8e3c5a..805e3b611f 100644 >> > --- a/doc/guix.texi >> > +++ b/doc/guix.texi >> > @@ -2023,6 +2023,33 @@ want to avoid auto-loading the Emacs >> > packages installed with Guix, you >> > =C2=A0can do so by running Emacs with the @option{--no-site-file} opti= on >> > =C2=A0(@pxref{Init File,,, emacs, The GNU Emacs Manual}). >> > =C2=A0 >> > +@subsection Implicit Environment Variables >> > + >> > +Many environment variables are defined in a way that assumes a >> > certain >> > +default value, even if unset.=C2=A0 For example, bash uses the current >> > +working directory as @env{PATH} if unset, or @env{XDG_CONFIG_HOME} >> > +expands to @file{$HOME/.config}.=C2=A0 Some of these defaults remain >> > the same >> > +whether a package is used through Guix or not---however, >> > environment >> > +variables referring to @file{/etc} or @file{/usr} typically have >> > their >> > +meaning subtly changed in Guix.=C2=A0 An application installed via Gu= ix >> > might >> > +instead look up files in its own @file{etc} structure, or (if a >> > +search-path was specified) even override the default for packages >> > from >> > +the foreign distro. >>=20 >> I think I miss some context: what concrete problem is this trying to >> solve?=C2=A0 What is it telling me to do? >>=20 >> I wonder to what extent this is actionable for a user, due to wording >> that leaves it up to the reader to figure out how this applies to >> them: >>=20 >> =C2=A0 =E2=80=9CMany environment variables=E2=80=9D >> =C2=A0 =E2=80=9Ca certain default value=E2=80=9D >> =C2=A0 =E2=80=9CSome of these=E2=80=9D >> =C2=A0 =E2=80=9CAn application installed via Guix might=E2=80=9D >> =C2=A0 =E2=80=9Cproblems coming from such implicitly defined=E2=80=9D >> =C2=A0 =E2=80=A6 >>=20 >> I think the =E2=80=9CApplication Setup=E2=80=9D section should be as con= crete as >> possible, with clear instructions (=E2=80=9CIf X then type Y=E2=80=9D), = possibly >> followed by explanations that curious readers can read and that >> others can skip. >>=20 >> WDYT? I initially thought it unnecessary and vague, but after reading the bug reports listed below, it seems to make sense to document it. And reading it now, that's probably the issue I encountered myself in https://issues.guix.gnu.org/53233. > I think there are too many examples to exhaustively list them all, but > to give an example, [1, 2, 3, 4] are all the same bug and in [2] Carlo > said we should document this under "Application Setup". My personal > stance is that the Guix behaviour is not a bug and other distros are > weird for not explicitly binding it. I like to see this as a bug, so I've opened one as 53514; Guix should strive to not mess with the host environment, and setting global variables used by both Guix and a potentially foreign host goes against this. The proper fix would be to patch all applications in Guix to use Guix-specific variables, such as GUIX_XDG_DATA_DIRS instead of XDG_DATA_DIRS. > I know my wording is not the best here, but "If X then Y" is a little > too late when your session broke. But if your session broke and you > read the manual saying "blah blah unset environment variables evil", > you are more likely to suspect "hmm, maybe evil environment variables > were evil". Fortunately, with distros trying out Flatpaks and Snaps, > XDG_DATA_DIRS is less likely to break them, but still. We never know > which variable will be the next to blow things up. Agreed that this is useful in the meantime. Perhaps add a TODO comment pointing to the bug I've opened. Thank you, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 25 02:39:42 2022 Received: (at 53447) by debbugs.gnu.org; 25 Jan 2022 07:39:42 +0000 Received: from localhost ([127.0.0.1]:46776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCGQX-0005LI-TY for submit@debbugs.gnu.org; Tue, 25 Jan 2022 02:39:42 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:45182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCGQU-0005L4-W9 for 53447@debbugs.gnu.org; Tue, 25 Jan 2022 02:39:41 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4F1F7188; Tue, 25 Jan 2022 08:39:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h59taH-J0KEp; Tue, 25 Jan 2022 08:39:31 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D98EC8B; Tue, 25 Jan 2022 08:39:30 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#53447: [PATCH] doc: Unset environment variables considered harmful References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= 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, 25 Jan 2022 08:39:29 +0100 In-Reply-To: <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> (Liliana Marie Prikler's message of "Sat, 22 Jan 2022 18:53:02 +0100") Message-ID: <875yq8qn66.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 4F1F7188 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Liliana Marie Prikler skribis: > I think there are too many examples to exhaustively list them all, but > to give an example, [1, 2, 3, 4] are all the same bug and in [2] Carlo > said we should document this under "Application Setup". My personal > stance is that the Guix behaviour is not a bug and other distros are > weird for not explicitly binding it. How about focusing specifically on XDG_DATA_DIRS, which is the root cause of the first two bugs you mention? We could say that installing certain packages will cause ~/.guix-profile/etc/profile to define XDG_DATA_DIRS, that this can interfere with software installed outside Guix, such as GNOME, and that we recommend unsetting XDG_DATA_DIRS (is that what we recommend? breaking Guix-installed packages instead of breaking distro-installed packages?)? Thanks, Ludo=E2=80=99. > [1] https://issues.guix.gnu.org/26202 > [2] https://issues.guix.gnu.org/45360 > [3] https://issues.guix.gnu.org/48300 > [4] https://issues.guix.gnu.org/53379 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 25 08:29:53 2022 Received: (at 53447) by debbugs.gnu.org; 25 Jan 2022 13:29:53 +0000 Received: from localhost ([127.0.0.1]:47422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCLtR-0000nA-MG for submit@debbugs.gnu.org; Tue, 25 Jan 2022 08:29:53 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:55936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCLtO-0000mw-E7 for 53447@debbugs.gnu.org; Tue, 25 Jan 2022 08:29:53 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id DA0905D0; Tue, 25 Jan 2022 14:29:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U4OmD4uBPcQ4; Tue, 25 Jan 2022 14:29:42 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 99C589D; Tue, 25 Jan 2022 14:29:42 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Introducing =?utf-8?Q?=E2=80=98GUIX=5F=E2=80=99-prefixed?= environment variables References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> <87y2344vnv.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= 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, 25 Jan 2022 14:29:41 +0100 In-Reply-To: <87y2344vnv.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Mon, 24 Jan 2022 17:27:00 -0500") Message-ID: <87lez4lz96.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: DA0905D0 X-Spamd-Result: default: False [0.61 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.71)[subject]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,debbugs.gnu.org] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org, Liliana Marie Prikler 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 (/) Hi, Maxim Cournoyer skribis: > I like to see this as a bug, so I've opened one as 53514; Guix should > strive to not mess with the host environment, and setting global > variables used by both Guix and a potentially foreign host goes against > this. The proper fix would be to patch all applications in Guix to use > Guix-specific variables, such as GUIX_XDG_DATA_DIRS instead of > XDG_DATA_DIRS. This approach has its appeal (like in the =E2=80=98GUIX_PYTHONPATH=E2=80=99= case), but there=E2=80=99s a tension with our other unwritten (?) guideline that we sh= ould modify packages as little as possible. Such wide-ranging changes would have the unfortunate effect that they=E2=80= =99d make Guix packages =E2=80=9Cspecial=E2=80=9D: documentation, bug reports, s= uggestions you=E2=80=99d find online would apply to the =E2=80=9Creal=E2=80=9D package= , but maybe not to the Guix one. That is a situation we=E2=80=99d rather avoid IMO. =E2=80=98XDG_DATA_DIRS=E2=80=99 is a real problem though. In large part th= at=E2=80=99s because its purpose is too broad=E2=80=94what =E2=80=9Cdata dirs=E2=80=9D are we ta= lking about? It would be ideal if we could progressively replace =E2=80=98XDG_DATA_DIRS=E2= =80=99 search path specifications with more specific environment variables, when they exist, or perhaps by using =E2=80=98wrap-program=E2=80=99 instead of having= search path specs. Right now there are 9 packages that have =E2=80=98XDG_DATA_DIRS=E2=80=99 as= their search path, including 4 Common Lisp packages. Of the remaining ones, I guess those we should first focus on are glib and qtbase. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 25 14:23:11 2022 Received: (at 53447) by debbugs.gnu.org; 25 Jan 2022 19:23:11 +0000 Received: from localhost ([127.0.0.1]:50163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCRPL-0001Fh-7F for submit@debbugs.gnu.org; Tue, 25 Jan 2022 14:23:11 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCRPI-0001En-E2 for 53447@debbugs.gnu.org; Tue, 25 Jan 2022 14:23:10 -0500 Received: by mail-wm1-f68.google.com with SMTP id l12-20020a7bc34c000000b003467c58cbdfso2324024wmj.2 for <53447@debbugs.gnu.org>; Tue, 25 Jan 2022 11:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=o6yad/WtSZkrTaXg1k4LiZzyQ91UTa+QLDfpiikRERg=; b=dPWYqWLANvUANDcHD4+Xj3RN3+ThM94bIzw5Sm3S1HpXKhshkqxzqc5jquDDCRJ6ON 1Epk1ZlaOqd04TTAt+OCpT5+D7hGrW4stQ9Gm9AnUDneLTDoXjeZl4g+AkJGIuTMo3vc zRKOQqHcFTynIR5fFT6ubS4XPSE6Xc2LkZjzJVlbop6Ib2MZFAC7wN0s5vAMsEgWO7VS YuVs0Wig8nZk0j3YKYxDRPSxD8oec1xY6O25g3n1nisjXqhZ3txE2+YNtc5lNE9uE+ic fO75hDjYvMi9AlurSWuFTnPDXTRg/HqymxIksS91tMFofDJ8tpe545OC/ATAc8fvkJ/b K9Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=o6yad/WtSZkrTaXg1k4LiZzyQ91UTa+QLDfpiikRERg=; b=QZXJBDLkzu4Nmzez/VlwXr74WamvW60Cs+l/qVmE4qGG84LCcoUYGwzp/9VMVFb6Aw mdyGei0OOQc9wyO9Q22X0QC+iXi9Pd6UOnAYxXcJCdiFbbzLDzwQkPXZjOUuIxDscgYz HPNePSZUXaXav4tRw8h2Av+XnA52N6C2TTpgLwyB+nFrCm2Czprl0lP6WvhTz552CbA1 /3d5R4Csjqea2frCYEDcwpFOhbs7a85ZFfDTvDAUZXG2rdMcfzTbF1ltKFPSHsM4JV+a DhwoVrX0ToqWt9XmwFp2GYoTyrwlFDe92O9C/bK/QyS3EB7URGaMA2UJi2zfgSxINgM3 +zKg== X-Gm-Message-State: AOAM533yPekrwU8mji85g+V6T1iEKx4NQYtafKq9BjEO3gEEkIRrqhDJ 1bAWrHXUx8DKK0qAEswr8UQ= X-Google-Smtp-Source: ABdhPJzXx66Vu0nVgcGDztt9AR5o14sAO/JPuT40lTVWZUVcFp65AoFJbh3gYIJXQna6ohlh3UMD+A== X-Received: by 2002:a05:600c:500b:: with SMTP id n11mr4318953wmr.24.1643138582527; Tue, 25 Jan 2022 11:23:02 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d200sm1115477wmd.28.2022.01.25.11.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 11:22:25 -0800 (PST) Message-ID: Subject: Re: bug#53447: [PATCH] doc: Unset environment variables considered harmful From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Tue, 25 Jan 2022 20:21:56 +0100 In-Reply-To: <875yq8qn66.fsf@gnu.org> References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> <875yq8qn66.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Am Dienstag, dem 25.01.2022 um 08:39 +0100 schrieb Ludovic Courtès: > We could say that installing certain packages will cause > ~/.guix-profile/etc/profile to define XDG_DATA_DIRS, that this can > i [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [209.85.128.68 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.68 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.68 listed in list.dnswl.org] X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Hi, Am Dienstag, dem 25.01.2022 um 08:39 +0100 schrieb Ludovic Courtès: > We could say that installing certain packages will cause > ~/.guix-profile/etc/profile to define XDG_DATA_DIRS, that this can > interfere with software installed outside Guix, such as GNOME, and > that we recommend unsetting XDG_DATA_DIRS (is that what we recommend? > breaking Guix-installed packages instead of breaking distro-installed > packages?)? XDG_DATA_DIRS can be concatenated just like PATH. The recommendation is to explicitly set it before sourcing Guix profiles. "Unset environment variables considered harmful" should be read as "It's harmful not to set these variables", not "those variables are harmful, don't set them". As for the GUIX_XDG_DATA_DIRS thing discussed elsewhere, I'd like to raise the following: do we need GUIX_PATH to not let packages installed with Guix shadow PATH? Cheers From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 25 20:56:51 2022 Received: (at 53447) by debbugs.gnu.org; 26 Jan 2022 01:56:51 +0000 Received: from localhost ([127.0.0.1]:50590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCXYI-0001Y5-VT for submit@debbugs.gnu.org; Tue, 25 Jan 2022 20:56:51 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:35622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCXYG-0001Xo-Ht for 53447@debbugs.gnu.org; Tue, 25 Jan 2022 20:56:49 -0500 Received: by mail-qv1-f49.google.com with SMTP id d8so6726270qvv.2 for <53447@debbugs.gnu.org>; Tue, 25 Jan 2022 17:56:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=YzWKCo0Q8zJOb/rHyWxy/MkURg7jbwbaf9XztyH6b14=; b=FkxWkjgDNV03Vp54tbetkmKmTUAQ6DVcCtqOXi8Pvc841/5v023WYEYs95PsT8K3+I S/z6lOfuN5E74rVpQUCIWu4lSxcWGGAKI/uu25gZ8DH+QCdELTYsMDL00VgTLSI5txR/ YpOCS2uXc2oqGU7n9u6q60+5xwnPpkv6cJicKBWOIVncnEi37l7Wk0pjgsoda39vYu0x BEWUsn6P0eoa6+60VIR5mKO+BeIhXCkYbG992oaCo48QS7XC/SDRBqy6N4poZC8YsIW3 GR8O9fONDEZUhDZhaye6q2Uv84QNdE7Wel5gB9us2k5tdptVo4H+AcQXQBy/8Xv5d3y4 GYPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=YzWKCo0Q8zJOb/rHyWxy/MkURg7jbwbaf9XztyH6b14=; b=5wL/0XW5rAfGpORwtxqpSDG0XRGK7AVP5680unOALCTCKhSuiNkmiq68fPPKD7kjvp 2ZjKrwkzWQAWElDvCXXYLPNZSNwzBGya7saIR+xBtvO/Y0tKCfnsRjGJ8UPzB4Tn3vvE inBcfy6BgoHe8YpQ1doh7T1G+LFRL3sbU81WBfxalKHl1tynarxmwrOunOXCSifRRYPN JLnyMoa3RLvz9r5j629izQ9C3jKNEQqXACozVN0ZyVk5vLXqdkWKuTgQOpnq1qg2jQQY 5zQaqq+D4XZSChJqBr5fAhdvyRfIrGvTA/O0Ac+UTX03dZhtzDgBh+zjQOSSyvsTaS4L b4vg== X-Gm-Message-State: AOAM530nHjahlIbj3Gs55+l8nM8ILskLlOqhNQj1FWRrZCpFEsK+ae7+ 2wpNALQY65l/4QjPvTXgYc6lCDXEs+Q0pA== X-Google-Smtp-Source: ABdhPJzCVwLe4j681eKIkFWK+7BvLUnjUxJg1ZEL/iVCyTPxnTI6LBrcgPHIcYjbIGHM7P+PwMr2bQ== X-Received: by 2002:a05:6214:2a4b:: with SMTP id jf11mr13584474qvb.102.1643162202744; Tue, 25 Jan 2022 17:56:42 -0800 (PST) Received: from hurd (dsl-205-233-124-191.b2b2c.ca. [205.233.124.191]) by smtp.gmail.com with ESMTPSA id u9sm5733013qkp.37.2022.01.25.17.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 17:56:42 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Introducing =?utf-8?Q?=E2=80=98GUIX=5F=E2=80=99-prefixed?= environment variables References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> <87y2344vnv.fsf_-_@gmail.com> <87lez4lz96.fsf_-_@gnu.org> Date: Tue, 25 Jan 2022 20:56:41 -0500 In-Reply-To: <87lez4lz96.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 25 Jan 2022 14:29:41 +0100") Message-ID: <87wnin2rae.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org, Liliana Marie Prikler 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, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> I like to see this as a bug, so I've opened one as 53514; Guix should >> strive to not mess with the host environment, and setting global >> variables used by both Guix and a potentially foreign host goes against >> this. The proper fix would be to patch all applications in Guix to use >> Guix-specific variables, such as GUIX_XDG_DATA_DIRS instead of >> XDG_DATA_DIRS. > > This approach has its appeal (like in the =E2=80=98GUIX_PYTHONPATH=E2=80= =99 case), but > there=E2=80=99s a tension with our other unwritten (?) guideline that we = should > modify packages as little as possible. > > Such wide-ranging changes would have the unfortunate effect that they=E2= =80=99d > make Guix packages =E2=80=9Cspecial=E2=80=9D: documentation, bug reports,= suggestions > you=E2=80=99d find online would apply to the =E2=80=9Creal=E2=80=9D packa= ge, but maybe not to > the Guix one. That is a situation we=E2=80=99d rather avoid IMO. True; but after people would get a hang that in Guix most environment variables would be prefixed with 'GUIX_', I don't think it'd be that big of an issue. Maintaining the patches would be where the burden would lie, in my opinion. > =E2=80=98XDG_DATA_DIRS=E2=80=99 is a real problem though. In large part = that=E2=80=99s because > its purpose is too broad=E2=80=94what =E2=80=9Cdata dirs=E2=80=9D are we = talking about? It > would be ideal if we could progressively replace =E2=80=98XDG_DATA_DIRS= =E2=80=99 search > path specifications with more specific environment variables, when they > exist, or perhaps by using =E2=80=98wrap-program=E2=80=99 instead of havi= ng search path > specs. Are there any more specific environment variables that exist that can replace XDG_DATA_DIRS? I'm not too knowledgeable about the freedesktop specs, but I'm somewhat skeptical? If they don't yet exist, that makes this idea much less actionable. Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 26 07:05:18 2022 Received: (at 53447) by debbugs.gnu.org; 26 Jan 2022 12:05:18 +0000 Received: from localhost ([127.0.0.1]:51118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCh38-0004o8-8g for submit@debbugs.gnu.org; Wed, 26 Jan 2022 07:05:18 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:36890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCh35-0004nt-Q2 for 53447@debbugs.gnu.org; Wed, 26 Jan 2022 07:05:16 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6536F482; Wed, 26 Jan 2022 13:05:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kB268u-Xfrj2; Wed, 26 Jan 2022 13:05:08 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D46EC233; Wed, 26 Jan 2022 13:05:07 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: Introducing =?utf-8?Q?=E2=80=98GUIX=5F=E2=80=99-prefixed?= environment variables References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> <87y2344vnv.fsf_-_@gmail.com> <87lez4lz96.fsf_-_@gnu.org> <87wnin2rae.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 7 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= 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: Wed, 26 Jan 2022 13:05:07 +0100 In-Reply-To: <87wnin2rae.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 25 Jan 2022 20:56:41 -0500") Message-ID: <878rv2itxo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 6536F482 X-Spamd-Result: default: False [0.53 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.63)[subject]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,debbugs.gnu.org] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org, Liliana Marie Prikler 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 (/) Hi, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: > >> Hi, >> >> Maxim Cournoyer skribis: >> >>> I like to see this as a bug, so I've opened one as 53514; Guix should >>> strive to not mess with the host environment, and setting global >>> variables used by both Guix and a potentially foreign host goes against >>> this. The proper fix would be to patch all applications in Guix to use >>> Guix-specific variables, such as GUIX_XDG_DATA_DIRS instead of >>> XDG_DATA_DIRS. >> >> This approach has its appeal (like in the =E2=80=98GUIX_PYTHONPATH=E2=80= =99 case), but >> there=E2=80=99s a tension with our other unwritten (?) guideline that we= should >> modify packages as little as possible. >> >> Such wide-ranging changes would have the unfortunate effect that they=E2= =80=99d >> make Guix packages =E2=80=9Cspecial=E2=80=9D: documentation, bug reports= , suggestions >> you=E2=80=99d find online would apply to the =E2=80=9Creal=E2=80=9D pack= age, but maybe not to >> the Guix one. That is a situation we=E2=80=99d rather avoid IMO. > > True; but after people would get a hang that in Guix most environment > variables would be prefixed with 'GUIX_', I don't think it'd be that big > of an issue. Maintaining the patches would be where the burden would > lie, in my opinion. There are environment variables everywhere; are you suggesting to GUIX_-prefix them en masse? That seems neither viable nor desirable to me. And, as Liliana put it, when will we have GUIX_PATH? :-) >> =E2=80=98XDG_DATA_DIRS=E2=80=99 is a real problem though. In large part= that=E2=80=99s because >> its purpose is too broad=E2=80=94what =E2=80=9Cdata dirs=E2=80=9D are we= talking about? It >> would be ideal if we could progressively replace =E2=80=98XDG_DATA_DIRS= =E2=80=99 search >> path specifications with more specific environment variables, when they >> exist, or perhaps by using =E2=80=98wrap-program=E2=80=99 instead of hav= ing search path >> specs. > > Are there any more specific environment variables that exist that can > replace XDG_DATA_DIRS? I'm not too knowledgeable about the freedesktop > specs, but I'm somewhat skeptical? If they don't yet exist, that makes > this idea much less actionable. I don=E2=80=99t know. Like I wrote, the two main cases are glib and qt. W= hy do we have them use XDG_DATA_DIRS for? This is what we need to investigate. I would be less reluctant to patches that add an extra variable in these two packages (which could be submitted upstream) than GUIX_-prefixing it. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 26 15:03:18 2022 Received: (at 53447) by debbugs.gnu.org; 26 Jan 2022 20:03:18 +0000 Received: from localhost ([127.0.0.1]:53635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCoVi-0002lg-05 for submit@debbugs.gnu.org; Wed, 26 Jan 2022 15:03:18 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCoVg-0002lQ-Gs for 53447@debbugs.gnu.org; Wed, 26 Jan 2022 15:03:17 -0500 Received: by mail-wm1-f65.google.com with SMTP id r7so403839wmq.5 for <53447@debbugs.gnu.org>; Wed, 26 Jan 2022 12:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=UHo/GPQcr2HqTLzzwAUJcFK6/XJM/sKqVAT3wQvuSc0=; b=WJxXQ7qNOdlrbdoWP+6vbzfg4Nn5XfmMW28IJ4O3gFP7cQ90tjdL4Z9LXunKsLnwY/ po+4FXJFFIS157yNzUsJRCSWlti4hYtBkRo/BLH1MFCkUgFbRSYrzLibdF7if9f8UqrI gTslTT2eaKv6f+V+uRy02LDTVaz1IUdg1JKNL2vEufGA0yVv9U8wSw1HUikdGVinfyN8 YNdQB7iC64RodHzvH0PCzQKYUHLwviA+NdiRZkijHwKOpLeKzkRtAS9aS/FnaODBcRRN xaB1BgiQDAaaJTVpqa9gFeUao7YmP2LI5XkJsoDS8aH4BrTw7N2xLl6eLxBFNSJoqlPx rmgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=UHo/GPQcr2HqTLzzwAUJcFK6/XJM/sKqVAT3wQvuSc0=; b=bgmc5xMpM+9z0zvewMfBLgI78ZG3doZQbIo/XjHuulFnERUlTFp0RSaRsaeubzkm/s 9EdozGQ+9eOSQ98ywigLkBdqapZFZitQFKiYVQx29bqRgtfyQD1U0UsYpAwdJMPAE4Ip M3grIYOwcH9hG4SRWtJ5ijpYFtLsgDeGSUnEODZFH2TTfdygyx2DZz1Vbv3OdBqejuCR 9wLBGlkX4jv44/OPdPwjKngubLjCNLbAlpqG2XF97wWSB6oiBYIRYwBWtqOp3ZpfUaJ4 izx3IQR8PF0N+PRVBiLN+NFwqnY6xKbErcInVuQLekq+a0nalt6nGJniKpkt7BalSWqg aiag== X-Gm-Message-State: AOAM5315vsannMD6YTEFKV4Jm1eRa9qYjDNSB5Mf9972wOsCibc0KavI d7htdnXuEozUAOdF1BrI2sQ= X-Google-Smtp-Source: ABdhPJxkZpEslEIzVaXCFE8+IZFSh2wCX4gGZi3dumQP72XVriuQ6k+j8Hc0l+wtSOzwYgX5zN+ekw== X-Received: by 2002:a05:600c:281:: with SMTP id 1mr283227wmk.134.1643227390466; Wed, 26 Jan 2022 12:03:10 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id a24sm3921493wmm.31.2022.01.26.12.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 12:03:09 -0800 (PST) Message-ID: Subject: Re: Introducing =?UTF-8?Q?=E2=80=98GUIX=5F=E2=80=99-prefixed?= environment variables From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Maxim Cournoyer Date: Wed, 26 Jan 2022 21:03:05 +0100 In-Reply-To: <878rv2itxo.fsf@gnu.org> References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> <87y2344vnv.fsf_-_@gmail.com> <87lez4lz96.fsf_-_@gnu.org> <87wnin2rae.fsf@gmail.com> <878rv2itxo.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53447 Cc: 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Mittwoch, dem 26.01.2022 um 13:05 +0100 schrieb Ludovic Courtès: > > Are there any more specific environment variables that exist that can > > replace XDG_DATA_DIRS?  I'm not too knowledgeable about the > > freedesktop specs, but I'm somewhat skeptical?  If they don't yet > > exist, that makes this idea much less actionable. > > I don’t know.  Like I wrote, the two main cases are glib and qt.  Why > do we have them use XDG_DATA_DIRS for?  This is what we need to > investigate. Applications based on GLib or Qt usually put their configuration in XDG_CONFIG_HOME/XDG_CONFIG_DIRS and their data into XDG_DATA_HOME/XDG_DATA_DIRS.  Yes, it's that broad, XDG wants it to be that way :P There are additional environment variables for some things – one example would be GSETTINGS_SCHEMA_DIR – but many things are simply put in those XDG directories. For example, gio, which is part of GLib, uses it to look up MIME stuff [1]. Icons and themes follow a similar trend as far as I can see. Note that according to the freedesktop specs, these directories are ordered by preference, so Guix prepending stuff might not always be what was asked for. However, I'd also argue that if users wanted their distro stuff to shadow what Guix has, they could first clear the variable, then load the Guix stuff and finally prepend the distro stuff. And arguably if you spawn a `guix shell' you probably want that shell to have effect over everything else in your system (or you add a hack to your rc files to make it not so). In any case, I'd find it hard to argue that users have no choice here. It's their shell, they can source profiles in any order they wish. WDYT? [1] https://developer-old.gnome.org/gio/stable/running-gio-apps.html [2] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 26 23:53:12 2022 Received: (at 53447) by debbugs.gnu.org; 27 Jan 2022 04:53:12 +0000 Received: from localhost ([127.0.0.1]:54051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCwmW-0001gE-3b for submit@debbugs.gnu.org; Wed, 26 Jan 2022 23:53:12 -0500 Received: from mail-qk1-f182.google.com ([209.85.222.182]:37431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCwmU-0001g2-1E for 53447@debbugs.gnu.org; Wed, 26 Jan 2022 23:53:10 -0500 Received: by mail-qk1-f182.google.com with SMTP id 71so1629123qkf.4 for <53447@debbugs.gnu.org>; Wed, 26 Jan 2022 20:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=PrtVxj8Gtlg/cpJTAkpVZ4HHJCuE0n2tStmoysypVHo=; b=CvveszUlKnjTxmQ35wQdTUghOhptFaCjOGrDvPa+PCkx8Rz/YCpjWXxM/L3u538bTD X/Syx/QUPSLDhn6BxR3Oa6AOakIz7SnZ1msEDB8Ebsew5+W/JV6X07KFeuJ2MbbZJAgo peH7EKqXv2uqk6BVcE3xlqm7D9k7UYHgvuB1kBphe9I0qW4/EEBqVeGfu03LhIE9XHQW R6uQOciieOTt/R0IFK+OlCmTd/8CoNtEekLYYMdDsxzcwP6V3KUgM+rYfyNW6IHztK0R 6rmh1ZHCPyimZC/kEMrtB8AoNMZufSQ6mxM+7Dfgi26UwexMnCzUJ8qmxcIG+maZyCuc KnSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=PrtVxj8Gtlg/cpJTAkpVZ4HHJCuE0n2tStmoysypVHo=; b=htVBBXe4U8MTC0PpkJHp4qN0nQ5yQSk4DOeblC3PHGkFqrbHJAkvbkdHabhMV2f5Iq 8moJYYQgpU7rHTkDmzvh8GVeVXmUUQNdUK43gkpBMMipta7ykEaY40gKOmyxY8gMc622 c+kXkmrr1Fp23u0Gpma3uofcFnqEqXnrj28YzZe3m5nXHzvAeQPvgC42vEKADND3z8nQ rsYFXPGFZ/9vBpyjF6Ry829qo1pxq5FA70yUWUEyYzYhmyHW3vEdzG+nxPjPMekrn5Fw QmJP46YKbtIkyzpT6WZTeACprw3Br/w/NGRlcM+1cwlqirUenhH/NBLlWptv1wJ+/Mdc QYjg== X-Gm-Message-State: AOAM532W9MzeOZWqKF8xEXcjTdNjDYVlZUf/NQrWZtfc2YcB/eQn7R1Y /7skyeDaNZRm2xhKWxRR6Ja7JZCRc04= X-Google-Smtp-Source: ABdhPJzXgbjrPHJGT3pPcbemhQ/A3D2WzPT356JeiC433OZJhmRt+194/1iV69OVxXZPTlsyUznq7g== X-Received: by 2002:a05:620a:d95:: with SMTP id q21mr1509797qkl.384.1643259184198; Wed, 26 Jan 2022 20:53:04 -0800 (PST) Received: from hurd (dsl-152-51.b2b2c.ca. [66.158.152.51]) by smtp.gmail.com with ESMTPSA id u9sm858234qko.110.2022.01.26.20.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 20:53:03 -0800 (PST) From: Maxim Cournoyer To: Liliana Marie Prikler Subject: Re: Introducing =?utf-8?Q?=E2=80=98GUIX=5F=E2=80=99-prefixed?= environment variables References: <875yqb21va.fsf@gnu.org> <19bb45159c0934e8d84035abdcfb00d8202233dd.camel@gmail.com> <87y2344vnv.fsf_-_@gmail.com> <87lez4lz96.fsf_-_@gnu.org> <87wnin2rae.fsf@gmail.com> <878rv2itxo.fsf@gnu.org> Date: Wed, 26 Jan 2022 23:53:02 -0500 In-Reply-To: (Liliana Marie Prikler's message of "Wed, 26 Jan 2022 21:03:05 +0100") Message-ID: <87k0el230x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53447 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 53447@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Liliana Marie Prikler writes: > Hi, > > Am Mittwoch, dem 26.01.2022 um 13:05 +0100 schrieb Ludovic Court=C3=A8s: >> > Are there any more specific environment variables that exist that can >> > replace XDG_DATA_DIRS?=C2=A0 I'm not too knowledgeable about the >> > freedesktop specs, but I'm somewhat skeptical?=C2=A0 If they don't yet >> > exist, that makes this idea much less actionable. >>=20 >> I don=E2=80=99t know.=C2=A0 Like I wrote, the two main cases are glib an= d qt.=C2=A0 Why >> do we have them use XDG_DATA_DIRS for?=C2=A0 This is what we need to >> investigate. > Applications based on GLib or Qt usually put their configuration in > XDG_CONFIG_HOME/XDG_CONFIG_DIRS and their data into > XDG_DATA_HOME/XDG_DATA_DIRS. =C2=A0Yes, it's that broad, XDG wants it to = be > that way :P > There are additional environment variables for some things =E2=80=93 one > example would be GSETTINGS_SCHEMA_DIR =E2=80=93 but many things are simpl= y put > in those XDG directories. For example, gio, which is part of GLib, > uses it to look up MIME stuff [1]. Icons and themes follow a similar > trend as far as I can see. This is what I perceive too; XDG variables are broad by design, and there aren't more finer grain alternatives that currently exist. The main problem to solve in my opinion is to not break the users environment on foreign distribution. Plugins for example probably ought to be searched by GUIX_ prefixed environment variables rather than their stock versions, else users may find binary incompatible versions to crash their host-provided application, for example. I don't really mind how to solve it, but using a prefix seems a relatively straight forward, bullet proof way to isolate the host from potentially undesirable effects of installing Guix components. Imagine if Guix-provided Emacs was to use GUIX_EMACSLOADPATH instead of EMACSLOADPATH. This would have the benefit that users could continue using their host provided Emacs (without having it see potentially incompatible byte compiled .elc packages) in parallel to the one installed with Guix. Thanks, Maxim