From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kGUdEDykm2NHjAAAbAwnHQ (envelope-from ) for ; Thu, 15 Dec 2022 23:48:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UG8xDzykm2OGJwEAG6o9tA (envelope-from ) for ; Thu, 15 Dec 2022 23:48:28 +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 2850BB3A6 for ; Thu, 15 Dec 2022 23:48:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5x1I-0005ia-LL; Thu, 15 Dec 2022 17:48:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5x1G-0005g9-TV for bug-guix@gnu.org; Thu, 15 Dec 2022 17:48:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5x1G-0001O8-L4 for bug-guix@gnu.org; Thu, 15 Dec 2022 17:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5x1G-0004r9-6m for bug-guix@gnu.org; Thu, 15 Dec 2022 17:48:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60106: [Shepherd 0.9.3] =?UTF-8?Q?=E2=80=98system*=E2=80=99?= replacement cannot be passed environment variables Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 15 Dec 2022 22:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60106 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 60106@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167114445218493 (code B ref -1); Thu, 15 Dec 2022 22:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Dec 2022 22:47:32 +0000 Received: from localhost ([127.0.0.1]:45373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5x0l-0004oB-PF for submit@debbugs.gnu.org; Thu, 15 Dec 2022 17:47:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:58646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5x0i-0004o1-8G for submit@debbugs.gnu.org; Thu, 15 Dec 2022 17:47:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5x0f-0005IW-60 for bug-guix@gnu.org; Thu, 15 Dec 2022 17:47:28 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5x0b-0001Ld-Q7 for bug-guix@gnu.org; Thu, 15 Dec 2022 17:47:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=CyqfCTA1RwJJKuHIUhkF2KmdCA17/xprZjyWwO/whmw=; b=Xtf1Cv4jzIZTwXN1VxFFC5mvLsxHnTOQXn+KmON+5GmWrvgFfLEYmJRn cc8B4rVvuUWqd1HJpCeV69lCN4z7x0dVMI2ydZFfFEDz1qMNW7idR3djH FIHvVrxJveaRAMKdYYvpl9fNzN+YY2+nBw/1LWwLAfGypakeSgfD/q3+h c=; X-IronPort-AV: E=Sophos;i="5.96,248,1665439200"; d="scan'208";a="42796942" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 23:47:17 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Frimaire an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour du Grillon 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: Thu, 15 Dec 2022 23:47:15 +0100 Message-ID: <87pmckl1xo.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=Xtf1Cv4j; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671144507; a=rsa-sha256; cv=none; b=IEciolKRQouwAAlV5Ozd5NtD4dXk7HlD9GKwqKiivL5grkdMM4iOshc52ydt/25kNmkysF cvG6bNRHvlTtUhbD8UyljrK2UfHg3QIHl439A0yXEq+gydd9oDgTa15ihe2Fwipac0sHmY N9KuUmjEpZ9Hazjn0oGkRyL8UX+XSMzpD1LQtezwH5HyR8+HsvzpbtTKmgL58jzCBDOLNf soQLPmcXqhOjSQqQHqi6ly2IzphTduuummxZxC6ojARoGVTrQ+e5A9ov5kUEB/taJEnkBM aYYBkn0J8MXJ7az3ykuvijqt3xJyxmqjTIW+vA3yburIQ1pEwCKiZSTQoa6eSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671144507; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=CyqfCTA1RwJJKuHIUhkF2KmdCA17/xprZjyWwO/whmw=; b=GL1Jvvif5XnR11jyXfRkHiSvWiH+6uUz10BogwgSWP5RoDYwSVUHkhDRvMgKp5/Lw6nYRG Ox56xjLuddHn1wOJfqZ7s8GwoREqe5WGxkwpsRUciHm26DgNsQst27Axnv7f5AkcKiMuZU tV4koSKfb145nBxUreC5I5ayfrHP73YCh9HTkmNFjilEpRQ8thJQiOXEXYwjQh4QlbwEBR eUuCirHgvjEIWdQnRd2EsS2fzYDIuOWNQB9ovcpv2vbZk/U1nuJsXL4arfQFqGv+neDZ1u 2rP1dawA8ngn/RvtSB2BQ3BZ4hS6rWeW1hl/p/9AO5+9oaD/jaJmcyM7E494NQ== X-Migadu-Spam-Score: 6.72 X-Spam-Score: 6.72 X-Migadu-Queue-Id: 2850BB3A6 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=Xtf1Cv4j; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none) X-Migadu-Scanner: scn0.migadu.com X-TUID: 9s2rCUnHCx+Q As we found out while debugging , the Shepherd 0.9.3, with its =E2=80=98system*=E2=80=99 replacement (aka. =E2=80= =98spawn-command=E2=80=99), makes it very hard to spawn a command with different environment variables. The following options don=E2=80=99t work: =E2=80=A2 Changing shepherd=E2=80=99s own environment variables with =E2= =80=98setenv=E2=80=99 for instance: =E2=80=98spawn-command=E2=80=99 calls =E2=80=98fork+exec-comm= and=E2=80=99, whose default #:environment-variables is provided by the =E2=80=98default-environment-variables=E2=80=99 parameter, which gets i= ts default value at when shepherd starts. There=E2=80=99s no environment variable inheritance, contrary to the real =E2=80=98system*=E2=80=99. =E2=80=A2 Parameterizing =E2=80=98default-environment-variables=E2=80=99: (parameterize ((default-environment-variables =E2=80=A6)) (system* =E2=80=A6)) That won=E2=80=99t work because =E2=80=98spawn-command=E2=80=99 delegat= es to the process monitoring fiber, which has a different dynamic state and thus doesn=E2=80=99t see this change. =E2=80=A2 Even a plain (set! default-environment-variables =E2=80=A6) won= =E2=80=99t work, probably due to inlining within (shepherd services). I think we=E2=80=99ll have to add a parameter to =E2=80=98spawn-command=E2= =80=99 to specify environment variables. Ludo=E2=80=99.