From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MOdkAbB1UWCHEQAA0tVLHw (envelope-from ) for ; Wed, 17 Mar 2021 03:21:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iFPDOK91UWABFAAAB5/wlQ (envelope-from ) for ; Wed, 17 Mar 2021 03:21:19 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 305FC17E9A for ; Wed, 17 Mar 2021 04:21:19 +0100 (CET) Received: from localhost ([::1]:34022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMkI-0004gd-0y for larch@yhetil.org; Tue, 16 Mar 2021 23:21:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMk2-0004f2-RW for guix-patches@gnu.org; Tue, 16 Mar 2021 23:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMMk2-0008LL-Jt for guix-patches@gnu.org; Tue, 16 Mar 2021 23:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMMk2-00047I-G4 for guix-patches@gnu.org; Tue, 16 Mar 2021 23:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47180] [PATCH] gnu: racket: Don't inject store paths into Racket files. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Mar 2021 03:21:02 +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: Philip McGrath Cc: 47180@debbugs.gnu.org Received: via spool by 47180-submit@debbugs.gnu.org id=B47180.161595124915785 (code B ref 47180); Wed, 17 Mar 2021 03:21:02 +0000 Received: (at 47180) by debbugs.gnu.org; 17 Mar 2021 03:20:49 +0000 Received: from localhost ([127.0.0.1]:41604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMMjo-00046X-Om for submit@debbugs.gnu.org; Tue, 16 Mar 2021 23:20:49 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:41140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMMjn-00046I-4w for 47180@debbugs.gnu.org; Tue, 16 Mar 2021 23:20:47 -0400 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMMjh-0001uv-PQ; Tue, 16 Mar 2021 23:20:41 -0400 Date: Tue, 16 Mar 2021 23:20:41 -0400 (EDT) From: Jack Hill X-X-Sender: jackhill@marsh.hcoop.net In-Reply-To: Message-ID: References: <20210316025632.9767-1-philip@philipmcgrath.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="925712948-543446750-1615950726=:8138" Content-ID: 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=1615951279; 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; bh=HX6HoQYgO3WolKwakrKVMIRO8lIfMxiy00HvztC0l5M=; b=QKGDo+wjIpL7ndepQgiD5092xBavh3D4Rt3xdNMLBseoUTlXPuuAd1Ux8EbZ4JhMQLEkrT wwdEPJhWt0AI3y0TdKf0sC5+4fZ4/fk9MXC9UmsR+IBkqkbx2KtGRFy6Jv2PTR7LU1UKJ6 Zx7pfo8n/o6IDo2CG/PQl7KtFQgF44/sE3ynJxjpnjCG/r9DkHLAexGf86H9Xe5G/F05v7 L/Uc0cSg3pi2tg31fgaoB6J9rZuX59HAfIB41RvqD/z/S19aCMzxb8mobcNq2huCWMYZ6u Q7DArGOoBTEfBcH7cyUY3zNJ5o04xuzRZFmO+m0Npc1dl/5YJgOvCgRIoFWNvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615951279; a=rsa-sha256; cv=none; b=tqYy59+4mSXp/S3GeNe5d5PULxVV2mczR0Uexsezy0jXjhMuC+MkBMXCP97wsm0gTdU1md qbju8hbn26I/QP3+A9870hf0h7bJ03ZIGRAzbhx6owL5x5Hw731HVyPW+fHQJTJjPphy85 4nvzcOcdWfhPLohKa4ZpW4Iy8lblunbkTjH6i4OePBiRIpoDKe5vVVGLUmr4cype2LZi57 9dpWttXo6DBlv6srSBaqMNWoYT75Rv2XbLjTXE3Z7jOxzYd3uyd2QEaIuR+xDY5S8GjQRa 7ijAkAfYIHm30bE6OoITdEl1QX3RU27qgNdo8Lc2KrLdpUl1wkgfovvY+eSQ5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.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: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.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: 305FC17E9A X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: 11Z8ynKRkppA This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --925712948-543446750-1615950726=:8138 Content-Type: text/plain; CHARSET=UTF-8; FORMAT=flowed Content-Transfer-Encoding: 8BIT Content-ID: On Tue, 16 Mar 2021, Philip McGrath wrote: > 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. I've opened #47204 for the fonts issue. I haven't done any investigation yet, and racket certainly wouldn't be the only package to run across fonts issues with Guix :) [0] https://issues.guix.gnu.org/47204 I'm happy to help test things, that's what's nice about working on a community project. > 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. Indeed, and many more reasons. >> `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. I had assumed it was actually a problem with adding inadvertent whitespace to the patch rather than how it was sent. However, since I couldn't actually find the extra spaces anywhere, I'm not too worried about it. Other than the warnings it applied cleanly. >>> +    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)) I hadn't considered raco distribute (I guess I'm spoiled by `guix pack`). Your proposed change addresses my concern. Thanks! Jack --925712948-543446750-1615950726=:8138--