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 ms5.migadu.com with LMTPS id 2GD1EqFwBWMVUgAAbAwnHQ (envelope-from ) for ; Wed, 24 Aug 2022 02:28:17 +0200 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 CMzNEqFwBWOOdgEAauVa8A (envelope-from ) for ; Wed, 24 Aug 2022 02:28:17 +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 C5F2A3C011 for ; Wed, 24 Aug 2022 02:28:16 +0200 (CEST) Received: from localhost ([::1]:60052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQeFj-0008WI-Qj for larch@yhetil.org; Tue, 23 Aug 2022 20:28:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQeFW-0008WA-LB for guix-patches@gnu.org; Tue, 23 Aug 2022 20:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQeFW-0003wc-CU for guix-patches@gnu.org; Tue, 23 Aug 2022 20:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQeFW-0007LI-4M for guix-patches@gnu.org; Tue, 23 Aug 2022 20:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v2 04/13] gnu: Add Zuo. Resent-From: "Philip McGrath" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Aug 2022 00:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Maxime Devos" , "Liliana Marie Prikler" , 57050@debbugs.gnu.org Cc: Liliana Marie Prikler , Efraim Flashner , Thiago Jung Bauermann Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166130087028207 (code B ref 57050); Wed, 24 Aug 2022 00:28:02 +0000 Received: (at 57050) by debbugs.gnu.org; 24 Aug 2022 00:27:50 +0000 Received: from localhost ([127.0.0.1]:45275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQeFK-0007Kt-Ak for submit@debbugs.gnu.org; Tue, 23 Aug 2022 20:27:50 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:55841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQeFC-0007KZ-B3 for 57050@debbugs.gnu.org; Tue, 23 Aug 2022 20:27:48 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F2BA95C011D; Tue, 23 Aug 2022 20:27:35 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute4.internal (MEProxy); Tue, 23 Aug 2022 20:27:35 -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=fm1; t=1661300855; x= 1661387255; bh=JtiThJJKYUErwJzY1SrnuTvLdZYHNH2vkpTJDs0wiHI=; b=n 97eNgrs4GdyMqccOPtKDa/Z9aJSUsw09TNjOViRA3OV15M8UWlfCbFgo5HD22BWp UzWkbahhfn5gBjf7nSVCXMZMi/qts4y0CoVsO0DWM6oykvb8qQc9Mh8flw7YeDcQ 4eJ8zc+Z9u17SwDuuPNCfNajHSKW3qfWxrgEGjvDnG79Bl57YtWKIhtUpssMMBVc VZfau3a9ouUiWNu6HHcWCGA9TIDGkK/vm+dtJUg2wlOZLB+KcKgcQCxvVWgfa9ZV nZrhn8cOMxiJ19Vx5MIrj0NH6RDCMSG+19DocSL/4rmqaL4Aq5cZGQiaGWhmOQbW FnqcU6ACKUZued0rpSjvA== 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= fm1; t=1661300855; x=1661387255; bh=JtiThJJKYUErwJzY1SrnuTvLdZYH NH2vkpTJDs0wiHI=; b=MO8n51VFoEbjx4lspqQ3n380dKCUH4oW3DOqjjvDHQGI R0zo61c7qMhUPPbvPxMGJupZc8d0+m10spZNogF/EDIcVMv6goRYf5PDyYvwBJOx VHs7/xPPU5hRqaJf1BIcrj6P+mSxEXPLIPByNVtoGx4P89CxQ9Bzn55eWquwoRbd ueHV0hKa0pytHY2GKanFcDfTytsTaqTKArPezvKktpNS1JCLDLoR3RKilRQGk9kq 0tp1n72w9EYmY31krVroIalP4rS2tpcinAKdNdcZRP6EPOIYlIzeId8R1iFRzJ2O ksuV5QIrV1lB6ec5gBc+PEKTXaDLpfrUDJ3dpnl8Zw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejtddgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedfrfhh ihhlihhpucfotgfirhgrthhhfdcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthh drtghomheqnecuggftrfgrthhtvghrnhepfefgjeehteelieelhefhjeffkedvueffkefh udfgteejveelgeeftdfhleegffelnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhhihhlihhpsehp hhhilhhiphhmtghgrhgrthhhrdgtohhm X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 348BFC6008B; Tue, 23 Aug 2022 20:27:35 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a Mime-Version: 1.0 Message-Id: In-Reply-To: <6fe5b257-8554-92ed-2449-40559b73133f@telenet.be> References: <285372112d70bcb4011d6c085592787df4f57d44.1660215295.git.philip@philipmcgrath.com> <4ae7af77-4ab6-4642-8c2f-854adec719c5@www.fastmail.com> <923c0709-4fe9-5f02-06a1-196095f5199e@telenet.be> <6fe5b257-8554-92ed-2449-40559b73133f@telenet.be> Date: Tue, 23 Aug 2022 20:27:15 -0400 From: "Philip McGrath" Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" 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=1661300897; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=JtiThJJKYUErwJzY1SrnuTvLdZYHNH2vkpTJDs0wiHI=; b=n3SMIj+Plj0WUeQpv6rQZvl/5CKilHr1a7CLqFG0ZXGMEceExOXw2032N2q3zBjuEGb4+y gVHvTn4qFz6ieunbA2qkokJy/BlGJUgQ9RABunYDNeYQ/vQn5xxiEVldVDIhjTWlpRvbAX V4BH79g9QfMBRY2k9zRm3IRBt8U4xaCy/drCd7TFJB5xKJNU+9YEUanKm8qm2X/Cui2V9x sX+uUOPeYw+7t7fG5DPEIxMIUf97Fj79F4Lb8Un5DCCw7rFdD629pUDOyqMyr7KguHts+y r74/F7LOamaIujEuIiSH3cZbzSBGyO8BxeFr57OPfclMthSm0d7w9QswLxcPMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661300897; a=rsa-sha256; cv=none; b=DBy4EI/ipUg4+DcJC0SI3FdBICm/cYrWptHM8kKIQOCFXpmxFpRfX/n9YwwuYnayunufOk 9O6ttNw/zDtLJ+Ah7RsSR+qEES5o1loa7fDj4/00BRT26TSzjCd6NXLWBPWvlHenvRqz0F PQ4ts0AwCf22M4lwIa+lV6MGDHRezaebbRoRVdAhttHyqvF0VBcMAgYo7gxPMbJAU2sj6q VCUEfr9hFdmdw//bf45RkMX7ZqFqLUogBYdAwHEHz3Pw4CJZ9AnXf99GV9k+5juZPdtH44 ksVbRWpQkz8KoXv//Sl7oxDWcZI2XHsJUmGl/xzb0S6gzd9vhvPudZaDPTBKPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="n 97eNgr"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=MO8n51VF; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="n 97eNgr"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=MO8n51VF; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C5F2A3C011 X-Spam-Score: 2.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: Y2n8NDAfE3fY On Tue, Aug 23, 2022, at 5:20 AM, Maxime Devos wrote: >> [...] >> I will use GUIX_SH in v3 of this series. >> >> My concern with it originally was that it's generic enough that it might be used in other ways elsewhere in Guix, but, since I'm hoping it's only going to be a medium-term solution, it seems good enough, and I haven't heard any objections to it. > _PATH_BSHELL seems better to me, as it is not Guix-specific and does not > require adding preprocessor arguments. Not needing preprocessor arguments would be a nice advantage. I will try _PATH_BSHELL. > Even simpler would be to > substitute* the /bin/sh to (search-input-file inputs "bin/sh") like done > for other packages. > Unfortunately, that doesn't work well here. We cannot refer to store paths in Racket or Chez source code (as opposed to C code) because the grafter cannot handle the format of compiled code: see . (I don't know about Zuo image dumps, but the binary format is unspecified, so it seems safer not to.) Also, especially for Racket, there are many entry points where "/bin/sh" might come from, including both functions like 'system' and also programs that explicitly use "/bin/sh" with functions like 'system*'. When I first wrote the current patch, maintaining Guix-specific patches for all of them seemed unsustainable, so I instead patched the low-level function for running subprocesses to interpose on any attempt to execute "/bin/sh", regardless of where it came from. If I addressed this upstream, I'd probably extend an existing function to support `(find-system-path 'shell)`, change `system` and friends to use it, and likewise change scripts that currently use "/bin/sh" explicitly. > On 23-08-2022 03:40, Philip McGrath wrote: >> First of all, I have found that there*is* another Unix-like system where "/bin/sh" doesn't exist: on Android, the POSIX shell is usually at "/system/bin/sh". Also, at least on some versions, _PATH_BSHELL isn't a compile-time constant. It is: >> >> #define _PATH_BSHELL __bionic_get_shell_path() > > Looking at the patch, it not being a compile-time constant does not > appear to be a problem to me. > It's not an issue with the current patch. It could be relevant for some ways of addressing this upstream. Mostly, it's part of my thinking that "where is the shell, if any?" is a question best answered at runtime rather than compile time. -Philip