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