From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aDLvJYX2UGAGEQAA0tVLHw (envelope-from ) for ; Tue, 16 Mar 2021 18:18:45 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EBTJIYX2UGCaeQAA1q6Kng (envelope-from ) for ; Tue, 16 Mar 2021 18:18:45 +0000 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 aspmx2.migadu.com (Postfix) with ESMTPS id 12DBE10B73 for ; Tue, 16 Mar 2021 19:18:44 +0100 (CET) Received: from localhost ([::1]:48100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMEHD-0002zm-La for larch@yhetil.org; Tue, 16 Mar 2021 14:18:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMDdq-0003JU-9e for guix-patches@gnu.org; Tue, 16 Mar 2021 13:38:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMDdq-0006YM-0t for guix-patches@gnu.org; Tue, 16 Mar 2021 13:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMDdp-0004t7-SO for guix-patches@gnu.org; Tue, 16 Mar 2021 13:38:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47180] [PATCH] gnu: racket: Don't inject store paths into Racket files. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Mar 2021 17:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47180 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jack Hill Cc: 47180@debbugs.gnu.org Received: via spool by 47180-submit@debbugs.gnu.org id=B47180.161591625518752 (code B ref 47180); Tue, 16 Mar 2021 17:38:01 +0000 Received: (at 47180) by debbugs.gnu.org; 16 Mar 2021 17:37:35 +0000 Received: from localhost ([127.0.0.1]:40942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMDdO-0004sO-ID for submit@debbugs.gnu.org; Tue, 16 Mar 2021 13:37:34 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:39756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMDdM-0004s9-P4 for 47180@debbugs.gnu.org; Tue, 16 Mar 2021 13:37:33 -0400 Received: by mail-qk1-f175.google.com with SMTP id g185so36075130qkf.6 for <47180@debbugs.gnu.org>; Tue, 16 Mar 2021 10:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TIyW1TywtabgKqwrYD2lZH/hZz237gwlp4ZGTyex1tE=; b=YzlFTOX5YwId4sOaQP4Zkcj4oEA5PCLb7M5IsDDNne+nSmi+Po/39El6P9AYsfT23o a7C0/kEIH673Y1Vk0LSEyL8M7K2gP1FhxdEAG2UzSa4McUGR1/+DSkiUY345BZjfSvsB NY8u28Zdr8FKKmOB55qbNz/1nfp+QgH9Cl10A6XJvpNhebd+k9y8bF70a7yBaRpXCJql Vgl/0gWDGgnYDVFhrjYcdqW8zwr2MG2yXb3FfXQSk/LrFI6pD6I4TxKvWomyfLkLDdok qTr3Mt7zpNJ9YkbA5XEoppNzlrvlHZ83OUrFOrOnyqdQSay3YT8pdJoW0Y6q6jY9YDTG f7Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TIyW1TywtabgKqwrYD2lZH/hZz237gwlp4ZGTyex1tE=; b=nHBbxTYYWNOf2/5tAum8dxECbNTi0nAw1D8I30yxpy8GRL9UUjzIa+URKLpR8pemxn eBYC12pIFaJTRQNpzqWpPDH5zHWJhF4RTIu8qgJefXH7znUixB3Te1vajYUVmm7OpxPf ECu//VsstzHXukxYQJNPbIXva9/P1rkWLZ7q4GmIlP8QjdHDQAjGbFoeiwuC7DurXwFw 8VW6Aez3sh8/lELx+nlCJxH4vvBxyBc2yYrUAOKqb/PjkPE3sgPN+w6cUCIfyplgwwrp USlxdy0OUInLNBDVJyiVL9CybsXn5tYgbDsaQGzINDvyYf6qiuuoWmNpqkT14jwU0IeP nWKw== X-Gm-Message-State: AOAM531TW06RwDb81GMBW4xtr7A57ybuXoOjHG/ebOApwyKpbryBh5ok uxQVOMQWw3kAMYGNu85hr9xjphdyyRYduDj/plc= X-Google-Smtp-Source: ABdhPJyEqNDykhzjKrY1uoq7sxRs34YCqGFlicSokj8Uz1QI9gfpMSgosxmD1nYbgClLkOWxtwztHw== X-Received: by 2002:a37:6104:: with SMTP id v4mr108922qkb.429.1615916246941; Tue, 16 Mar 2021 10:37:26 -0700 (PDT) Received: from Sapientia.local (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id p8sm14061072qtu.8.2021.03.16.10.37.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Mar 2021 10:37:26 -0700 (PDT) References: <20210316025632.9767-1-philip@philipmcgrath.com> From: Philip McGrath Message-ID: Date: Tue, 16 Mar 2021 13:37:25 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615918725; 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: content-transfer-encoding:content-transfer-encoding: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=TIyW1TywtabgKqwrYD2lZH/hZz237gwlp4ZGTyex1tE=; b=h795UNBq3wiEvow84L746mHTPS2E1gqMoVzBosHDsMjgozNBiuQ5mHVxH426NXrpWgcSXL YpMxrPe0rYKd+RDZqYIYV0n2bOjhr6j+KvD9iYTxK5o1Wuse2BILbHEzuvuuyS7ayXUIPD B+ndI7xHbOrNAFvXlBHvWI4f/merDnKr3fbuXtpSOA904hVKxwlgxmjC1auWs4JcjCRAEt rZIyzKzYvxHql/H5V2DLB2NfavCLGqWFEHkGjwVOni5D1tYwZyMd4p3lwUhfb3epviTba4 +gbmHAoZve4j+tZFKgvKgw1H/BKgDMgvdd9N196hADjeERSWS10O+5SxRn1/zA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615918725; a=rsa-sha256; cv=none; b=mGWibeSJBf2lH78HOO1jWqaeXdHP+c60j7ix4Niu0u3K2loiqMRPLgKjugWW5tINoHFS/i yeUudO93W1rRBw7vIIq3JCNEEAJjYlPGusU/3p9O22l9HTUYzaOMs/X8s6guLd7rJ+wiH6 tD4sIO2cSGUG4yiSBtgV7jZC5z8P0XPhDJCrnzFUW8Je+hONLph7V42qo9+JCXmSQ0g2nl QhwyKGr50PHtmqTPHFgjLCK/yXCT3RleUk9zrQq2U9iH8YfaizlVzzjAotYkmZJAMXwtHH Xvi+vI8NEJfhrjQah1ry5sAOrED4iBAFpKxzLauDvJrqVdRbnCz2fEkbWJP2Fg== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=YzlFTOX5; dmarc=none; spf=pass (aspmx2.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.40 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=YzlFTOX5; dmarc=none; spf=pass (aspmx2.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 12DBE10B73 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8SamtFO/L6Zy Hi, On 3/16/21 1:43 AM, Jack Hill wrote: > I've tested applying and building this patch and it works! Glad to hear it! > (Now that DrRacket starts it appears that I may have a font issue with > it. I'll investigate more an open a separate bug if so.) I realized to my chagrin when I saw your report that I hadn't actually used any graphical programs via Guix, which of course would be an important thing to test! I'll experiment, too, but yes, please do look for further issues. A good motivation for `guix import racket` is that we'll be able to run the test suite, which lives in the `racket-test` package. > `git am` complained about the following, but I can't spot them looking > at the patch. I'm not sure what's up there … I generated it with `git send-email`. But I'm not very familiar with this workflow, so it's quite possible there's something I should have done/be doing differently. >> +    3. "/bin/sh" does not exist (if it does, we don't want to change >> +       the expected behavior); and > > Do we really want #3? That would have a different effect than the > current patching behavior intends. /bin/sh is present by default on Guix > System, and likely to be present of foreign distros. I think in > generally we like to avoid this dynamic binding and instead use the sh > that was included as a package input. That's a very good question. The non-obvious scenario I've been considering is that DrRacket's `Racket|Create Executable…`, `raco distribute`, or the function `assemble-distribution` from the `compiler/distribute` library can compile your Racket program and bundle it with its runtime support into a tarball, which is intended to be portable enough that you can email it to your friend running some other GNU/Linux distribution and they can run it, too. One implication of this feature is that a well-behaved Racket library should cooperate with the compilation manager to register any foreign shared libraries it may want to bring along. I don't use this feature much and it would take further testing before I'd be confident that works properly on Guix, but it was definitely broken with the old/current way of patching Racket source files with paths to foreign libraries on the store. Configuring the `lib-search-dirs` is at least a step closer to The Right Thing. This patch doesn't try to bring along "sh", and I don't think it should: the relevant consideration here is that `librktio` will be bundled (IIRC as part of `libracketcs.a`), so whatever version of `rktio_process` we compile ought to work without Guix. That said, I think you may be right that, on Guix, using the sh that was a package input may be less surprising than considering "/bin/sh" if it exists. (I also think it's pretty unreasonable to put something other than a POSIX-compatable shell at "/bin/sh" and expect any good to come of it.) All the Racket docs[1] promise is that the relevant function "executes a shell command asynchronously (using sh on Unix and Mac OS, cmd on Windows)", which I take to mean that our obligation is to provide a sh, not for it to be any particular sh or a user-configurable sh. (It does not consult SHELL, for example.) So, if this still seems right to you, I propose to revise the patch by dropping condition #3: then we'll still fall back to "/bin/sh" if the built-in path doesn't exist, as presumably will be the case if we're being executed in a non-Guix environment, but we'll unconditionally use the sh that was a package input on Guix. Thanks for looking over this thoughtfully! -Philip [1]: https://docs.racket-lang.org/reference/subprocess.html#(def._((lib._racket%2Fsystem..rkt)._process))