From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SJEvGvNFNmLimAAAgWs5BA (envelope-from ) for ; Sat, 19 Mar 2022 22:06:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2EWdF/NFNmKKWwEA9RJhRA (envelope-from ) for ; Sat, 19 Mar 2022 22:06:59 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 206D525CD3 for ; Sat, 19 Mar 2022 22:06:59 +0100 (CET) Received: from localhost ([::1]:40830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVgHp-0006iD-Io for larch@yhetil.org; Sat, 19 Mar 2022 17:06:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVgGw-0006i4-Mr for bug-guix@gnu.org; Sat, 19 Mar 2022 17:06:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVgGw-0003G9-ED for bug-guix@gnu.org; Sat, 19 Mar 2022 17:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVgGw-0004Ty-1g for bug-guix@gnu.org; Sat, 19 Mar 2022 17:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#54469: home-environment-variables-service-type does not quote things Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 19 Mar 2022 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54469 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 54469@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164772391217161 (code B ref -1); Sat, 19 Mar 2022 21:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Mar 2022 21:05:12 +0000 Received: from localhost ([127.0.0.1]:60677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVgG8-0004Sj-5o for submit@debbugs.gnu.org; Sat, 19 Mar 2022 17:05:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:46492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVgG7-0004Sc-CE for submit@debbugs.gnu.org; Sat, 19 Mar 2022 17:05:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVgG7-0006f3-59 for bug-guix@gnu.org; Sat, 19 Mar 2022 17:05:11 -0400 Received: from [2a02:1800:110:4::f00:1a] (port=47120 helo=albert.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVgG4-0003C4-J8 for bug-guix@gnu.org; Sat, 19 Mar 2022 17:05:10 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id 8M542700K4UW6Th06M54tY; Sat, 19 Mar 2022 22:05:05 +0100 Message-ID: <8edc244df527278786d4d0e1dfb33afce441546d.camel@telenet.be> From: Maxime Devos 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; d=telenet.be; s=r22; t=1647723905; bh=YJpE491H9Wz3XN+sEuruFijPNI5QxnP7GiJEUqRc/Cc=; h=Subject:From:To:Date; b=JTYYV6IcS1A+mpK5El21dcM7ZkGMEZQtdQAYUL2uDGKyKjIi5cil6Ya/h2mseeW1F Uj/P8j350zf5Xj7PQZ1XhU9XFLyp8vriJ6UiBmOZ0X3nb9vtPOR1R1Koi1JwByLyjV CvdWZ0IaTnMaIf4Z003uSeQ7B0KBjIghRknmDbpiH7v0Yce3gZiKXxA5TW577ijbOW aMKGkqNqrFZ6BSMsPKvW5c10avO3UuATsAhYX50X0ri9sgkuY4RCKOQK0RkAPacCn1 Vxhde+5Lab6388bgOt9qCXmIlAKcXs1tK2Lg54L7pXnNryLF7c8TodzviPI7QbP0YT c0U5jvTm6XFLQ== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:110:4::f00:1a (failed) Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be 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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647724019; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=YJpE491H9Wz3XN+sEuruFijPNI5QxnP7GiJEUqRc/Cc=; b=X3PL7bK2N7p8a1PrU10V8L7m0UBM85/8kIGe2Thijls95gskTUq74oAZsSt1xiW1gP2ZXh 8gaqzGPr8BMX9wm3hm948qT+JRu8qXDL3AYxnP3kquOS6qRRx5PzhaK5mu4w41VPpmfk5A +upz1QIUMWrBAWlDYgIniBkDKBjG9FlT8Lpdr0BM0VKNsLzxNhldTw3wwsl2bhWR3c07SO V/7YYqG4hjCi8ATvIdxjrdbPmpu0MPU+71vM7aVIVc0nLut8+Z4+RVXWeG1+7DdizefhjN bMJZFIl2vYG1iaO0SPSIlkGkuytIZhvyF+JhUqkp8Yg0tqro02W4QJSXZWLxjw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647724019; a=rsa-sha256; cv=none; b=J+OK6YHshFdh+C4BNQkoyWzhmxluy17pyIan30kX4a7C8k9b0u4M4g3sIBRluARs5ivpWQ wZFKlXc5OOft2l6VEP3yREpOShNC1oR2rwMd27XfkO0zfO+JvHzZQCCznr263dwwo3PG+d bXJlZfWsufjhECcYipggf34/jGkYFYTKGhVzcj3pKemgyGzis+F6XYUHM3fSNm9BixNH0o 1xtn4l6xp0qSBGfRDgA/u5cKJRNtK0d7yqDSzB24phAymPtqEj1u+rxoOBwQdzNb6AI6FK Mk7GDMRbH/7NhmZBphfkfZvjIzLx50l+T8FhWzV2UJEOZJkIcIPIMLyvzJMpjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=JTYYV6Ic; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=JTYYV6Ic; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 206D525CD3 X-Spam-Score: 2.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: OBeuGP3fyvnM --=-oPSniVpxcEMRLCfbX3Qg 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") (home-environment (packages '()) (services (list (simple-service 'extra-environment-variables home-environment-variables-service-type `(("formula of the (reconfiguration) day" . ,formul= a-of-the-day)))))) 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' Backtrace: In ice-9/boot-9.scm: 1752:10 11 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 10 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 9 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 8 (_ #(#(#))) In ice-9/command-line.scm: 185:18 7 (_ #) 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 (_ #(#(#(#(#(#(#(#(# ?) ?) ?) ?) ?) ?) ?) ?)) 159:9 2 (_ #(#(#(#(#(#(#(#(# ?) ?) ?) ?) ?) ?) ?) ?)) 159:9 1 (_ #(#(#(#(#(#(#(#(# ?) ?) ?) ?) ?) ?) ?) ?)) In unknown file: 0 (string-split # #\nul) ERROR: In procedure string-split: In procedure string-split: Wrong type argument in position 1 (expecting string): # [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). Greetings, Maxime. --=-oPSniVpxcEMRLCfbX3Qg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjZFfBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iDtAP4qk6u/F3zjHt7YxwfdZtiw8JMo SdL/cgOOSXil9GyOZwEA/fCRGd+rZcCj/ic3zS/+ETcnDCdtyjUDUeHWVmpsEwA= =7A3p -----END PGP SIGNATURE----- --=-oPSniVpxcEMRLCfbX3Qg--