From: "Ludovic Courtès" <ludo@gnu.org>
To: Philip McGrath <philip@philipmcgrath.com>
Cc: 47180-done@debbugs.gnu.org
Subject: bug#47180: [PATCH] gnu: racket: Don't inject store paths into Racket files.
Date: Mon, 12 Apr 2021 18:48:50 +0200 [thread overview]
Message-ID: <87eeffo3d9.fsf_-_@gnu.org> (raw)
In-Reply-To: <20210319023451.3405-1-philip@philipmcgrath.com> (Philip McGrath's message of "Thu, 18 Mar 2021 22:34:51 -0400")
Philip McGrath <philip@philipmcgrath.com> skribis:
> Apparently, during grafting, Guix can somehow mangle compiled
> Racket CS files (.zo) such that Racket will refuse to load them.
> (Maybe it has something to do with compression?)
> So, we stop patching Racket sources with absolute paths to store
> files (i.e. for foreign libraries to dlopen).
> Instead, we put them in a data file that doesn't get compiled or,
> in one case, embed it in C.
>
> Fixes https://issues.guix.gnu.org/47064
>
> * gnu/packages/patches/racket-sh-via-rktio.patch: New file.
> Adds a special case at the C level, controlled by a preprocessor macro,
> to handle attempts to execute "/bin/sh".
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/scheme.scm (racket)[source](patches): Apply it.
> (racket)[arguments](#:configure-flags): Add the CPP flag to enable it.
> (racket)[arguments](#:modules): Use srfi-1.
> (racket)[arguments](#:phases): Remove 'patch-/bin/sh and 'pre-configure.
> Change 'pre-configure-minimal to just change directory.
> Add 'patch-config.rktd-lib-search-dirs after 'build and before 'install
> to configure Racket's "lib-search-dirs".
> (racket, racket-minimal)[inputs]: Add bash-minimal as an explicit input.
> (racket-minimal)[source]: Adjust to inherit patches from racket.
> (racket-minimal)[arguments]: Inherit from racket: changes no longer needed.
> ---
> gnu/local.mk | 2 +
> .../patches/racket-sh-via-rktio.patch | 87 ++++++++
> gnu/packages/scheme.scm | 191 ++++++++----------
> 3 files changed, 176 insertions(+), 104 deletions(-)
> create mode 100644 gnu/packages/patches/racket-sh-via-rktio.patch
Pushed as 834aa48504a24f0c79e858fc295edbf63815a408.
Thanks!
Ludo’.
next prev parent reply other threads:[~2021-04-12 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 2:56 [bug#47180] [PATCH] gnu: racket: Don't inject store paths into Racket files Philip McGrath
2021-03-16 5:43 ` Jack Hill
2021-03-16 17:37 ` Philip McGrath
2021-03-17 3:20 ` Jack Hill
2021-03-19 2:34 ` [bug#47180] [PATCH v2] " Philip McGrath
2021-04-12 16:48 ` Ludovic Courtès [this message]
2021-04-10 20:59 ` [bug#47180] [PATCH] " Ludovic Courtès
2021-04-12 3:40 ` Philip McGrath
2021-04-12 12:55 ` Ludovic Courtès
2021-04-12 12:55 ` Ludovic Courtès
2021-04-16 20:16 ` Philip McGrath
2021-04-17 10:12 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeffo3d9.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=47180-done@debbugs.gnu.org \
--cc=philip@philipmcgrath.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).