From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qNtyNqyHD2TPZQEASxT56A (envelope-from ) for ; Mon, 13 Mar 2023 21:29:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gL5xNqyHD2SQ1AAAauVa8A (envelope-from ) for ; Mon, 13 Mar 2023 21:29:32 +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 9A7661B2D7 for ; Mon, 13 Mar 2023 21:29:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbon8-0004I3-Ai; Mon, 13 Mar 2023 16:29:10 -0400 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 1pbobV-0000XP-2e for help-guix@gnu.org; Mon, 13 Mar 2023 16:17:09 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbobQ-00073A-Mt for help-guix@gnu.org; Mon, 13 Mar 2023 16:17:08 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C72745C0164 for ; Mon, 13 Mar 2023 16:17:01 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Mon, 13 Mar 2023 16:17:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1678738621; x=1678825021; bh=a0Y2/6yWjh77ra3QNUOFPUCGq 8dQapwOIzv5aC/Q3h8=; b=NkhVAvJSuyCsvuoT7o5ZB/I6xT2rW4uh7QO1sAHJT +fPX1mxWfGXQkEPHBJUg9eNKisC7Qi3s5bf6q5XUnbBldQAJ2ORslFFhG1trjHRZ jR+GD5X7pYQWFCN/nLQvTQdZmbq+jw0zJE/c/jzNjWEqn38Y//8y+vspH9ea5bZm La5XERuJ6a0e2ATuy05WFd3HOYsNT4hWRV0UPf455/nOwgf2IP5nSlbuEquqPbk/ xYFvmBgK03RIUy12PN1r9yjHS5e4Ep/ci1sqyWUNxtL635ST92wXTCK9mMlsQzRm T4Jj0YtwNlyaeA/8JT8ooS+IBItR4/bnGHuMJ6BBVFG3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1678738621; x=1678825021; bh=a0Y2/6yWjh77ra3QNUOFPUCGq8dQapwOIzv 5aC/Q3h8=; b=sVnhEvAmSJHg4aeokyypGq8nWSwqTE9SW5/ruSVGyxVN74F5xqe 5pjdSIC7zXI/oYL1le14w/A5Xr5DFIMuEOleSZwOJ7XEnFcqy8pwfbDt74vw1iUt C/sCj+3Yt9eRI9qGIaLASsRk9gQrLSM4uDvV4psr0ChEPIvfZ64MdjqBf/fMVo0L /vBGjwvkfmRVxpAq98A/ISKIqVMtQ7jwp6IguzB2NOWTnQxqm/ZJEXkrpKHM1grv YhBi7Yt1OyxCgBS03uZDwadiRJqCVtYLhQ4Cf4aCvUNlsxDWk2dARXaxoVndp0VT Rw8AE5wj5sB+GRvKDSpZ4IlxqnLAXlIwFcg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvgedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtre dtreertdenucfhrhhomhepfdgkrggtkhcuhggvihhnsggvrhhgfdcuoeiirggtkhesohif lhhfohhlihhordhorhhgqeenucggtffrrghtthgvrhhnpefgleejudduudetffetfeeufe ehffeufeejgefhtdevkefhgeelteevuefgjefhffenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpeiirggtkhesohiflhhfohhlihhordhorhhg X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7EDFF272007B; Mon, 13 Mar 2023 16:17:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-221-gec32977366-fm-20230306.001-gec329773 Mime-Version: 1.0 Message-Id: <87ac5c3b-d275-496a-a84d-dcda520a6499@app.fastmail.com> Date: Mon, 13 Mar 2023 16:16:41 -0400 From: "Zack Weinberg" To: help-guix@gnu.org Subject: Is there any way to change what /bin/sh is inside `guix shell [--container]` ? Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.25; envelope-from=zack@owlfolio.org; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 13 Mar 2023 16:29:08 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=owlfolio.org header.s=fm1 header.b=NkhVAvJS; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=sVnhEvAm; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=owlfolio.org (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678739372; a=rsa-sha256; cv=none; b=LI52FwyTkQrvqqAFp5fAzKRSTqCa1tDsovH61v/FIZS6HnXoL/1QLVb2t7Ai+YH9rQwEW1 n9FWXgic++7Z1EPtXSIIXbh7X5mwRM0V+XcwQGQK2OBEoR+qCaBdTmomxibTfDBEU7gNDY rXbkZGigFpy7c9RDxGdLxyZB5a36Q6WCBB/NRvfR+0dwAaBOTvqP7ZgpD7JsQjy3t/4KyV dp2n8hsmkix3RkqrOotPxRo/AAVpZqlAdcnXBtBlNa4JiflhaUNBbVXkBs8QPr7J+n8wNP TbkDN/sRZJugRBsru7f8PPFq8Q8P8KfocUOsrZ3AdsGDEoFpjf0nZWaxf3b6Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678739372; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=a0Y2/6yWjh77ra3QNUOFPUCGq8dQapwOIzv5aC/Q3h8=; b=fjh8Hq2xFG2YQXvZtgpvDSTo+JEgQgtMmIs5HTaNMaX2k4chM13ODYvNzdUdXLguYb+XF8 uPQiuVIOxiBIUhxNJaaRj1ysSaEoGoZoEbnyl/llMh1/T0GdIm177FWLNdGKgfdrCu0Tpw HVxPMhUly7Ze6bdUilK3K3Rngwx50FLUMdNtqV3nKUQ6solp0f38m7wq1q60ahEDMdMLps Ahzt8G7CSZzVrsxl4E7+Ktazd7yYzqZUsd0Qu4Zib+GF93nlLVH5Eq2m6tSb+9Jp2xy/Np v0xuEqeNdCLMSEA5QvqFHbrwq5pqCKfUoyPNEvVQUwdv7FaDqbG1dPQ4MF3Mtw== X-Migadu-Spam-Score: -0.51 X-Spam-Score: -0.51 X-Migadu-Queue-Id: 9A7661B2D7 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=owlfolio.org header.s=fm1 header.b=NkhVAvJS; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=sVnhEvAm; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=owlfolio.org (policy=none) X-TUID: 0gaJFdbZ+ACm I'm doing experiments with using `guix shell --container` for isolated, reproducible build environments. I've noticed that no matter how I set up the container, `/bin/sh` points to a full-fat bash, even if the full bash package was not included in the container profile. For instance ``` guix shell --container bash-minimal coreutils -- sh -c 'ls -l $(command -v sh) /bin/sh' lrwxrwxrwx 1 zack users 61 Mar 13 20:07 /bin/sh -> /gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/sh lrwxrwxrwx 1 65534 overflow 69 Jan 1 1970 /gnu/store/jc86p6d0i5b3aly5lx5lhb1xa35f2xk8-profile/bin/sh -> /gnu/store/chfwin3a4qp1znnpsjbmydr2jbzk0d6y-bash-minimal-5.1.8/bin/sh $ guix shell --container busybox -- sh -c 'ls -l $(command -v sh) /bin/sh' lrwxrwxrwx 1 65534 overflow 7 Jan 1 1970 /gnu/store/96l76flyg617l23c5p32ysjbc72ywjgd-profile/bin/sh -> busybox lrwxrwxrwx 1 zack users 61 Mar 13 20:05 /bin/sh -> /gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/sh ``` Is there any way to change or override this behavior? What I want is for /bin/sh inside the container to be the same as $GUIX_ENVIRONMENT/bin/sh inside the container. (If you're about to ask me, "but what if the container profile doesn't include a shell at all?", my response will be "in that case /bin/sh should not exist!" I can think of several reasons why I might do that on purpose. Yes, I realize that system(3) won't work in such an environment -- that may in fact be (one of the) goals.) zw