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 ms5.migadu.com with LMTPS id wKJaOApBS2OBCQAAbAwnHQ (envelope-from ) for ; Sun, 16 Oct 2022 01:23:54 +0200 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 IGh2OApBS2P+vwAA9RJhRA (envelope-from ) for ; Sun, 16 Oct 2022 01:23:54 +0200 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 9850494E6 for ; Sun, 16 Oct 2022 01:23:54 +0200 (CEST) Received: from localhost ([::1]:42192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojqVV-0005wm-Lb for larch@yhetil.org; Sat, 15 Oct 2022 19:23:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojqVJ-0005we-G8 for guix-devel@gnu.org; Sat, 15 Oct 2022 19:23:41 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojqVH-00017P-Am; Sat, 15 Oct 2022 19:23:41 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8BECE5C0081; Sat, 15 Oct 2022 19:23:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 15 Oct 2022 19:23:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1665876217; x= 1665962617; bh=0Embf86EN8snauXor/nQ5l6qOpR2UA5Ti35ja+0gWoo=; b=g Wppkh9jFVyQGqIRgLiAFOL+tIRrnmNlwpo5HKDfBdo8ps1mHZmYhaTENRZXqCx/1 U6OyZ2K5POmMEPWwEoDj1Tt0KfVh4HHbp6XrSspsA8eZ4TzaRvFv224FjPkcu2KU uZly3JaSFzyS9zLjZyYe8HxfOeqNrAL9dAlIJHDDrfUOwmAew8WcGTOKsNMiERuh AoOfGAwE3mQovOf/mEexatGl/weYPC9TSN0YYgaLgjm7f0dwyiaKFzIXjxYI7pgD I3+nJcjKo1eiT69W+Q8x1iRBkGz7cNBxPOanVsdzqH/JORJtSTi5JG3e0IC5JFLD D5phKGgYJx2gwpPGxANcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1665876217; x=1665962617; bh=0Embf86EN8snauXor/nQ5l6qOpR2 UA5Ti35ja+0gWoo=; b=XKlz0wq48+IuqUY2V08TFMe6FlcO2plC/41Lu6w2yN+/ UnBznIziU3QKlA/8hpbA0VkFQ2lYyeJ37oAyBbn47Qi9dMxFBImma19qhG/fXIsq +gcCJ+duxfeuZWmRu2GJKccDVCslQXuh7xWQB2ufXshJKK19q/5c4Oz/aqWsecbX nehFGc68Ir8jCX0ucrwHNSQMShC8hAqXxCxm7CbzP9O1f6z21Bn++fvAQw/vorXX agQJhx7uDeYR8QvzndLKgl3+UC7kux4DsW/0A/nDC6LRaehDI3z0XPq4YfYenuax TTES3PmE1nmi5N+LiYGYyTkNYF6CJAQX/yIUpjZyJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekhedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfgggtsehgtderredttdejnecuhfhrohhmpefrhhhilhhi phcuofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh eqnecuggftrfgrthhtvghrnhepgfffudekheeguefgveehgfegudegvddvhefhfedvheel heeguedugfdtleelgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhm X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Oct 2022 19:23:36 -0400 (EDT) From: Philip McGrath To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: guix , Maxime Devos , Liliana Marie Prikler , Liliana Marie Prikler Subject: Re: What 'sh' should 'system' use? Date: Sat, 15 Oct 2022 19:23:29 -0400 Message-ID: <4651725.rnE6jSC6OK@bastet> In-Reply-To: <87fsg7cwn0.fsf@gnu.org> References: <2284386.8hzESeGDPO@bastet> <87fsg7cwn0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4199420.mogB4TqSGs"; micalg="pgp-sha512"; protocol="application/pgp-signature" Received-SPF: pass client-ip=66.111.4.25; envelope-from=philip@philipmcgrath.com; 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.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665876234; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0Embf86EN8snauXor/nQ5l6qOpR2UA5Ti35ja+0gWoo=; b=GRtRDnCCcqH9cOduyvj3qPrK2YtfOM3BZVrWkn/Bkzd7x4A0BX4WDA0qPFpw2T3kJUGTSU aW4DBTNB7Rz8aAbS5CQBO6zWIKcB8Qmqe8e5J6gPqDzDTdWZYrBYc7mIDsj7pACv24guKm 1G1Sh7vg8BST85Ve1AtOq16vWLw/2xmozVVkbj9rw38HOMfF7b9KXcQJRJECLrUKQGubM9 c1FWJEI46XMwN8v/EOyMBuJ04emC0A6lXkpXZB97RLnJG7HdPhhmOZJBZU7M4S0ePF4vgy uqqb/tlJCGdn2weeCXowfxfqZVVk1ZBmeFzBXNWbOWAVEbMLJHJJQBprx09bXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665876234; a=rsa-sha256; cv=none; b=bCnn4TARDeLrvg87JPxlX5/jHrxFcigG6sRpHo6wrMOIJub3p5MXuItlJVkEI5tCrRpWkF QDIL3vNrBYzmlRAR56Ap3G/62gP5AgJ6W9LI4ZkchGE+xdjMmR4YeO/eq6VCjQl8+phPm5 GZaoyVI4/mtHI4tyA11zP1yHNI6uH773OW10u888bhvpS4vKBEr2pAPFaGDC3cZIUhobZT Tgei+3nTtVeKON/rpU9UmpJgfjN//i7aqvjO2YJMmHckwofwtvZvC4kZnptv3UbXAwQv0v Jj2TveroYGusFxL47LE1cvvRjAnW65bl3dnwAOJj5hQlXWfS92KNwgcO0U6XlQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm3 header.b="g Wppkh9"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=XKlz0wq4; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm3 header.b="g Wppkh9"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=XKlz0wq4; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9850494E6 X-Spam-Score: 2.10 X-Migadu-Scanner: scn1.migadu.com X-TUID: VGxQaezwjTzL --nextPart4199420.mogB4TqSGs Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Philip McGrath To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Subject: Re: What 'sh' should 'system' use? Date: Sat, 15 Oct 2022 19:23:29 -0400 Message-ID: <4651725.rnE6jSC6OK@bastet> In-Reply-To: <87fsg7cwn0.fsf@gnu.org> References: <2284386.8hzESeGDPO@bastet> <87fsg7cwn0.fsf@gnu.org> On Saturday, October 1, 2022 12:54:27 PM EDT Ludovic Court=C3=A8s wrote: > Hello! >=20 > Philip McGrath skribis: > > 1) If we want to continue to hard-code a specific shell into Glibc, I > > think we should document the decision (for example, why 'bash-static' v= s. > > 'bash- minimal'?) [=E2=80=A6] >=20 > The choice of =E2=80=98bash-static=E2=80=99 rather than =E2=80=98bash-min= imal=E2=80=99 is motivated by > the fact that, in (gnu packages commencement), we want to make sure > =E2=80=98glibc-final=E2=80=99 does not retain references to its build-tim= e environment. > See #:allowed-references in =E2=80=98glibc-final=E2=80=99. >=20 This makes sense as far as using 'bash-static' in Glibc. The aspects I'm un= sure of are: 1. If I'm packaging software that implements a function like 'system' (e.g. Racket, SML/NJ, Chez Scheme, etc.), should I use 'bash-minimal' or 'bash-static'? 2. Do we really need 'bash-minimal' at all? Why not just replace it with 'bash-static'? In particular, AFAICT, 'bash-minimal' currently has a reference to 'bash-static' via Glibc: =2D-8<---------------cut here---------------start------------->8--- $ guix size bash-minimal=20 store item total s= elf /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33 38.3 = 36.6 50.4% /gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib 71.7 = 33.4 45.9% /gnu/store/720rj90bch716isd8z7lcwrnvz28ap4y-bash-static-5.1.8 1.7 = 1.7 2.3% /gnu/store/chfwin3a4qp1znnpsjbmydr2jbzk0d6y-bash-minimal-5.1.8 72.7 = 1.0 1.4% total: 72.7 MiB =2D-8<---------------cut here---------------end--------------->8--- > > 2) If we want to make 'sh' a weak/dynamic reference, I think we should > > strongly consider arranging to make it available at '/bin/sh' when > > present. I expect this option would require less patching of other > > packages *by far* than any other approach. >=20 > This is not a viable option because build containers lack /bin/sh. >=20 Right, this option would depend on making /bin/sh exist in the build environment. I'd hoped this might be possible without having to change the daemon, but t= he ways I've tried so far haven't worked. I tried `(mkdir-p "/bin")`, but the build user apparently doesn't have sufficient permissions. Then I tried creating a nested container using `call-with-container` in which I could bind-mound the directory from 'bash-static' at '/bin', but I hit permissions errors that way, too. I also thought there might be a way to pass the daemon options like 'build-chroot-dirs' to have it set up /bin/sh before it drops privileges, but I couldn't figure out how to do that. > Overall, I think the current situation is a reasonable tradeoff. It > forces us to do some patching, indeed, but I think that=E2=80=99s accepta= ble: > we=E2=80=99re talking about a handful of packages. >=20 > WDYT? >=20 > Ludo=E2=80=99. The patching itself isn't so bad, and, as you say, it's limited to at least a relatively small number of packages. However, the fact that Glibc retains= a reference to 'bash-static' affects nearly every package. It doesn't affect = them very much, to be sure! But I think it does prevent using `guix shell --container` to create containers without a shell, and it likew= ise seems difficult to experiment with different shells. Or maybe it's really j= ust that it disturbs my sense of aesthetics. =2DPhilip --nextPart4199420.mogB4TqSGs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmNLQPEACgkQygNjjfo/ HHriAg/9Ftvy+z/bCdUmL/UvcgDao6rzt5KhvdFIvB1JDlAJcrjttDn44xCwnVdA UJ0V3Hqe5/gsDimeH6Up2E4ghOpKFdDeq4VqgicPj4RUX4DT8J8SIomUxCRC6XyT QWkUCG3mvY5cRz5PKNbLPQV3nlao5JFsbQuvxdE7EHzFzMNAd49cchsX1S6xfGbC HVdtOpF7mnrZmi+Q3eeMh+sMm6k/Ky/9VdVVCT+/5DI3cYSAsviw03juE+09wtxO IuJm03luVID4qd8eJm1WCmkGe5TC9oZWMnXuqLB5VUZCpnUEGL9rTd/vEuNg0DzW B3SMyHPAPjDRY2V6uXjpNWz4qgEqTy37yHsOVmVjljqoLw7RbY9Tt8vPT1svZrHG UGPGNiXOM/kxOxQALuJlU3dkU0KhV8WvANyj8arUcAriAUynEkeinRNnT/SGDMK2 TOtvEMWq2vRctTmuvRKW39aiiirLJyJInV1JNZwguoJggLyj9cUoz+b2TZRaNQAz yp5I/otDVgfb1ltXEsjEGODSt78WlsUDHqasdDi4TDEC6qE7d2ZdUdtQNECzd3aE YJYiXwBHu6LvU+iv5QSf8M5zUDRfmT3OuwOZ9sYf+/TGGYPElkfIpc2RVi4i7on/ tRIYBjn19mZvZ0Csx+QTbMDbHunhnyI0x+VTlFlnqXWdDFp3yPE= =lBp0 -----END PGP SIGNATURE----- --nextPart4199420.mogB4TqSGs--