[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47180: [PATCH] gnu: racket: Don't inject store paths into Racket fil
From: |
Ludovic Courtès |
Subject: |
bug#47180: [PATCH] gnu: racket: Don't inject store paths into Racket files. |
Date: |
Mon, 12 Apr 2021 18:48:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
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’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#47180: [PATCH] gnu: racket: Don't inject store paths into Racket files.,
Ludovic Courtès <=