GNU bug report logs - #54469
home-environment-variables-service-type does not quote things

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; Severity: important; Reported by: Maxime Devos <maximedevos@HIDDEN>; dated Sat, 19 Mar 2022 21:06:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> Full text available.

Message received at submit <at>

Received: (at submit) by; 19 Mar 2022 21:05:12 +0000
From debbugs-submit-bounces <at> Sat Mar 19 17:05:12 2022
Received: from localhost ([]:60677
	by with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1nVgG8-0004Sj-5o
	for submit <at>; Sat, 19 Mar 2022 17:05:12 -0400
Received: from ([]:46492)
 by with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1nVgG7-0004Sc-CE
 for submit <at>; Sat, 19 Mar 2022 17:05:11 -0400
Received: from ([]:41700)
 by with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maximedevos@HIDDEN>)
 id 1nVgG7-0006f3-59
 for bug-guix@HIDDEN; Sat, 19 Mar 2022 17:05:11 -0400
Received: from [2a02:1800:110:4::f00:1a] (port=47120
 by with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maximedevos@HIDDEN>)
 id 1nVgG4-0003C4-J8
 for bug-guix@HIDDEN; Sat, 19 Mar 2022 17:05:10 -0400
Received: from
 by with bizsmtp
 id 8M542700K4UW6Th06M54tY; Sat, 19 Mar 2022 22:05:05 +0100
Message-ID: <8edc244df527278786d4d0e1dfb33afce441546d.camel@HIDDEN>
Subject: home-environment-variables-service-type does not quote things
From: Maxime Devos <maximedevos@HIDDEN>
To: bug-guix@HIDDEN
Date: Sat, 19 Mar 2022 22:04:59 +0100
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-oPSniVpxcEMRLCfbX3Qg"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=r22;
 t=1647723905; bh=YJpE491H9Wz3XN+sEuruFijPNI5QxnP7GiJEUqRc/Cc=;
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:110:4::f00:1a
Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a;
X-Spam_score_int: -19
X-Spam_score: -2.0
X-Spam_bar: --
X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -2.3 (--)

Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi guix,

Consider the following home configuration:

(use-modules (gnu home) (gnu packages) (gnu home services)
             (gnu services) (guix gexp) (gnu home services shells))

(define formula-of-the-day
   ;; TODO: add some more formulae, randomise
   "$US dollar/=E2=82=ACeuro =3D 1.11")

  (packages '())
    (list (simple-service 'extra-environment-variables
                        `(("formula of the (reconfiguration) day" . ,formul=

Now start a container with this configuration with "guix home container":

$ guix home container home-configuration.scm

[start output block]
WARNING: (guile-user): imported module (guix build utils) overrides
core binding `delete'
/gnu/store/[...]/setup-environment: line 33: syntax error near
unexpected token `('
/gnu/store/[...]/setup-environment: line 33: `export formula of the
(reconfiguration) day=3D$US dollar/=E2=82=ACeuro =3D 1.11'
In ice-9/boot-9.scm:
  1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          10 (apply-smob/0 #<thunk 7f8d3bd36f40>)
In ice-9/boot-9.scm:
    724:2  9 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8  8 (_ #(#(#<directory (guile-user) 7f8d3bd30c80>)))
In ice-9/command-line.scm:
   185:18  7 (_ #<input: string 7f8d3bd29850>)
In unknown file:
           6 (eval (begin (use-modules (guix build utils) (# ?) ?) ?)
In ice-9/eval.scm:
    619:8  5 (_ #f)
In unknown file:
           4 (primitive-load "/gnu/store/6xn1fyljn05cjgx3sakhmds88sc?")
In ice-9/eval.scm:
   293:34  3 (_ #(#(#(#(#(#(#(#(#<directory ?> ?) ?) ?) ?) ?) ?) ?) ?))
    159:9  2 (_ #(#(#(#(#(#(#(#(#<directory ?> ?) ?) ?) ?) ?) ?) ?) ?))
    159:9  1 (_ #(#(#(#(#(#(#(#(#<directory ?> ?) ?) ?) ?) ?) ?) ?) ?))
In unknown file:
           0 (string-split #<eof> #\nul)

ERROR: In procedure string-split:
In procedure string-split: Wrong type argument in position 1 (expecting
string): #<eof>
[end output block]

To investigate, I took a look at 'setup-environment':

   [lots of exports]
   export formula of the (reconfiguration) day=3D$US dollar/=E2=82=ACeuro =
=3D 1.11

There are at least two issues here:

  * The variable 'formula of the (reconfiguration) day' was not quoted.

    I don't know how to do this in bash though, if it is even possible
    at all.  If it turns out not to be possible, I'd prefer that to
    be mentioned by a nice error message, e.g. "environment variable
    names may not contain FOOs" or "environment variable names must
    consist of BARs".

  * The value '$US dollar/=E2=82=ACeuro' was not quoted, so bash would
    expand $US (to the empty string, since $US is not defined).


Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit




Acknowledgement sent to Maxime Devos <maximedevos@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#54469; Package guix. 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: Thu, 7 Apr 2022 17:00:02 UTC

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