From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
To: Philip McGrath <philip@philipmcgrath.com>, 57050@debbugs.gnu.org
Subject: [bug#57050] [PATCH 3/6] gnu: chez-scheme: Fix use of "/bin/sh".
Date: Mon, 08 Aug 2022 10:53:42 +0200 [thread overview]
Message-ID: <77d198cb202f2fa77ec8b54bc26a3d2e3836792c.camel@ist.tugraz.at> (raw)
In-Reply-To: <5e5e8f491c7cbee3ef7a21437a52675dd47d186e.1659936550.git.philip@philipmcgrath.com>
Am Montag, dem 08.08.2022 um 02:10 -0400 schrieb Philip McGrath:
> The unsuccessful attempt to execute "/bin/sh" by Chez Scheme's
> 'process'
> function seems to have caused parts of the Chez Scheme test suite to
> have been silently skipped. The issue was exposed by the upcoming
> changes to Racket's build system.
>
> * gnu/packages/patches/chez-scheme-bin-sh.patch,
> gnu/packages/patches/racket-chez-scheme-bin-sh.patch: New patches.
> * gnu/packages/patches/racket-minimal-sh-via-rktio.patch: Rename to
> ...
> * gnu/packages/patches/racket-rktio-bin-sh.patch: ... this, refresh
> with
> upstream, and shorten the macro name.
> * gnu/local.mk (dist_patch_DATA): Update accordingly.
> * gnu/packages/racket.scm (%racket-origin)[patches]: Likewise.
> (racket-vm-common-configure-flags): Likewise.
> * gnu/packages/chez.scm (chez-scheme)[origin]<patches>: Likewise.
> [inputs]: Add bash-minimal.
> [arguments]<#:configure-flags>: Set CPPFLAGS to enable new patches.
> ---
> gnu/local.mk | 4 +-
> gnu/packages/chez.scm | 5 ++
> gnu/packages/patches/chez-scheme-bin-sh.patch | 66
> +++++++++++++++++++
> .../patches/racket-chez-scheme-bin-sh.patch | 66
> +++++++++++++++++++
> ...-rktio.patch => racket-rktio-bin-sh.patch} | 28 ++++----
> gnu/packages/racket.scm | 5 +-
> 6 files changed, 158 insertions(+), 16 deletions(-)
> create mode 100644 gnu/packages/patches/chez-scheme-bin-sh.patch
> create mode 100644 gnu/packages/patches/racket-chez-scheme-bin-
> sh.patch
> rename gnu/packages/patches/{racket-minimal-sh-via-rktio.patch =>
> racket-rktio-bin-sh.patch} (79%)
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 234f21ad33..e827feed36 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -940,6 +940,7 @@ dist_patch_DATA
> = \
> %D%/packages/patches/ceph-boost-compat.patch \
> %D%/packages/patches/ceph-rocksdb-compat.patch \
> %D%/packages/patches/cheese-vala-
> update.patch \
> + %D%/packages/patches/chez-scheme-bin-
> sh.patch \
> %D%/packages/patches/chmlib-inttypes.patch \
> %D%/packages/patches/cl-asdf-config-
> directories.patch \
> %D%/packages/patches/clamav-config-llvm-libs.patch \
> @@ -1769,7 +1770,8 @@ dist_patch_DATA
> = \
> %D%/packages/patches/ripperx-missing-file.patch \
> %D%/packages/patches/rpcbind-CVE-2017-8779.patch \
> %D%/packages/patches/rtags-separate-
> rct.patch \
> - %D%/packages/patches/racket-minimal-sh-via-rktio.patch \
> + %D%/packages/patches/racket-chez-scheme-bin-sh.patch \
> + %D%/packages/patches/racket-rktio-bin-sh.patch \
> %D%/packages/patches/remake-impure-
> dirs.patch \
> %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \
> %D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch \
> diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
> index 4c253effa0..66098c7a24 100644
> --- a/gnu/packages/chez.scm
> +++ b/gnu/packages/chez.scm
> @@ -34,6 +34,7 @@ (define-module (gnu packages chez)
> #:use-module (guix build-system copy)
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system copy)
> + #:use-module (gnu packages bash)
> #:use-module (gnu packages compression)
> #:use-module (gnu packages ncurses)
> #:use-module (gnu packages ghostscript)
> @@ -269,6 +270,7 @@ (define-public chez-scheme
> (base32
>
> "0xchqq8cm0ka5wgpn18sjs0hh15rc3nb7xrjqbbc9al3asq0d7gc"))
> (file-name (git-file-name name version))
> + (patches (search-patches "chez-scheme-bin-sh.patch"))
> (snippet #~(begin
> (use-modules (guix build utils))
> ;; TODO: consider putting this in a (guix
> ...) or
> @@ -287,6 +289,7 @@ (define-public chez-scheme
> `(,util-linux "lib") ;<-- libuuid
> zlib
> lz4
> + bash-minimal ;<-- for process
> ncurses ;<-- for expeditor
> ;; for X11 clipboard support in expeditor:
> ;;
> https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232
> @@ -313,6 +316,8 @@ (define-public chez-scheme
> (cut memq 'threads <>))
> #~("--threads")
> #~())
> + ,(string-append "CPPFLAGS=-DGUIX_RKTIO_BIN_SH="
> + #$(file-append bash-minimal "/bin/sh"))
> "ZLIB=-lz"
> "LZ4=-llz4"
> "--libkernel"
> diff --git a/gnu/packages/patches/chez-scheme-bin-sh.patch
> b/gnu/packages/patches/chez-scheme-bin-sh.patch
> new file mode 100644
> index 0000000000..e6228e3264
> --- /dev/null
> +++ b/gnu/packages/patches/chez-scheme-bin-sh.patch
> @@ -0,0 +1,66 @@
> +From c170f0f3a326f293ee1f460a70303382966ca41b Mon Sep 17 00:00:00
> 2001
> +From: Philip McGrath <philip@philipmcgrath.com>
> +Date: Thu, 19 May 2022 13:41:56 -0400
> +Subject: [PATCH] patch s_process for "/bin/sh" on Guix
> +
> +This patch reuses the C preprocessor macro `GUIX_RKTIO_BIN_SH`
> +from a previous patch.
> +
> +If:
> +
> + 1. The `GUIX_RKTIO_BIN_SH` macro is defined; and
> +
> + 2. The path specified by `GUIX_RKTIO_BIN_SH` exists;
> +
> +then `s_process` will call `execl` with the file specified by
> +`GUIX_RKTIO_BIN_SH` instead of "/bin/sh".
> +
> +This patch does not change the behavior of `s_system`, which relies
> +on `system` from the C library.
> +---
> + c/prim5.c | 20 +++++++++++++++++++-
> + 1 file changed, 19 insertions(+), 1 deletion(-)
> +
> +diff --git a/c/prim5.c b/c/prim5.c
> +index 5a07893..926d68d 100644
> +--- a/c/prim5.c
> ++++ b/c/prim5.c
> +@@ -746,6 +746,22 @@ static ptr s_process(char *s, IBOOL stderrp) {
> +
> + INT tofds[2], fromfds[2], errfds[2];
> + struct sigaction act, oint_act;
> ++ /* BEGIN PATCH for Guix */
> ++#if defined(GUIX_RKTIO_BIN_SH)
> ++# define GUIX_AS_a_STR_HELPER(x) #x
> ++# define GUIX_AS_a_STR(x) GUIX_AS_a_STR_HELPER(x)
> ++ /* A level of indirection makes `#` work as needed: */
> ++ struct stat guix_stat_buf;
> ++ char *guix_sh =
> ++ (0 == stat(GUIX_AS_a_STR(GUIX_RKTIO_BIN_SH), &guix_stat_buf))
> ++ ? GUIX_AS_a_STR(GUIX_RKTIO_BIN_SH)
> ++ : "/bin/sh";
> ++# undef GUIX_AS_a_STR
> ++# undef GUIX_AS_a_STR_HELPER
> ++#else /* GUIX_RKTIO_BIN_SH */
> ++ char *guix_sh = "/bin/sh";
> ++#endif
> ++ /* END PATCH for Guix */
/* BEGIN PATCH for Guix */ and /* END PATCH for Guix */ is in my humble
opinion superfluous (though apparently also present in the already
exsting patch, whose author might disagree).
Also, I think this could easily be submitted upstream if you named it
RKTIO_SHELL and rktio_shell respectively, with the default to
"/bin/sh". Then, we'd simply have to -DRKTIO_SHELL=/path/to/bin/sh in
our #:make-flags.
> ++ /* BEGIN PATCH for Guix */
> ++ execl(guix_sh, guix_sh, "-c", s, NULL);
> ++ /* END PATCH for Guix */
Likewise.
As for absorbing racket-specific patches into chez-scheme itself, I'm
not too sure if I agree with that approach. Maybe a different prefix
rather than RKTIO should be used here – one that fits chez.
Cheers
next prev parent reply other threads:[~2022-08-08 8:54 UTC|newest]
Thread overview: 122+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 6:06 [bug#57050] [PATCH 0/6] gnu: Update Racket to 8.6. Add Zuo Philip McGrath
2022-08-08 6:10 ` [bug#57050] [PATCH 1/6] gnu: stex: Update to 1.2.2-2.afa6075 Philip McGrath
2022-08-08 6:10 ` [bug#57050] [PATCH 2/6] gnu: stex: Fix read-only gifs and math directories Philip McGrath
2022-08-08 6:10 ` [bug#57050] [PATCH 3/6] gnu: chez-scheme: Fix use of "/bin/sh" Philip McGrath
2022-08-08 8:53 ` Liliana Marie Prikler [this message]
2022-08-09 20:25 ` Philip McGrath
2022-08-09 21:24 ` Maxime Devos
2022-08-09 21:38 ` ( via Guix-patches via
2022-08-09 21:58 ` Philip McGrath
2022-08-09 22:09 ` ( via Guix-patches via
2022-08-10 11:46 ` Maxime Devos
2022-08-08 6:10 ` [bug#57050] [PATCH 4/6] gnu: Update Racket to 8.6. Add Zuo Philip McGrath
2022-08-08 9:01 ` Liliana Marie Prikler
2022-08-09 20:56 ` Philip McGrath
2022-08-10 7:34 ` Liliana Marie Prikler
2022-08-08 6:10 ` [bug#57050] [PATCH 5/6] gnu: racket: Use Racket CS on all systems Philip McGrath
2022-08-08 9:10 ` Liliana Marie Prikler
2022-08-08 6:10 ` [bug#57050] [PATCH 6/6] gnu: chez-scheme-for-racket: Suport " Philip McGrath
2022-08-08 9:15 ` Liliana Marie Prikler
2022-08-10 15:30 ` [bug#57050] [PATCH 0/6] gnu: Update Racket to 8.6. Add Zuo Thiago Jung Bauermann via Guix-patches via
2022-08-11 4:00 ` Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 00/13] " Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 01/13] gnu: stex: Update to 1.2.2-2.afa6075 Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 02/13] gnu: stex: Fix read-only gifs and math directories Philip McGrath
2022-08-11 11:13 ` Liliana Marie Prikler
2022-08-11 11:08 ` [bug#57050] [PATCH v2 03/13] gnu: chez-scheme: Fix use of "/bin/sh" Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 04/13] gnu: Add Zuo Philip McGrath
2022-08-11 11:31 ` Liliana Marie Prikler
2022-08-11 14:00 ` Philip McGrath
2022-08-11 15:34 ` Liliana Marie Prikler
2022-08-11 23:32 ` Philip McGrath
2022-08-16 14:47 ` Maxime Devos
2022-08-23 1:40 ` Philip McGrath
2022-08-23 9:11 ` Maxime Devos
2022-08-23 23:24 ` Philip McGrath
2022-08-23 9:20 ` Maxime Devos
2022-08-24 0:27 ` Philip McGrath
2022-08-24 5:42 ` Liliana Marie Prikler
2022-08-24 5:47 ` Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 00/14] gnu: Update Racket to 8.6. " Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 01/14] gnu: stex: Update to 1.2.2-2.afa6075 Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 02/14] gnu: stex: Fix read-only gifs and math directories Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 03/14] etc: teams: Add racket team Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 04/14] etc: teams: Add entry for Philip McGrath Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 05/14] gnu: racket: Adjust patch for "/bin/sh" in rktio Philip McGrath
2022-08-25 9:09 ` Liliana Marie Prikler
2022-08-25 19:16 ` Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 06/14] gnu: chez-scheme: Fix use of "/bin/sh" Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 07/14] gnu: Add Zuo Philip McGrath
2022-08-25 9:12 ` Liliana Marie Prikler
2022-08-25 10:30 ` Efraim Flashner
2022-08-25 20:04 ` Philip McGrath
2022-08-26 12:01 ` Liliana Marie Prikler
2022-08-27 18:08 ` Philip McGrath
2022-08-27 18:58 ` Liliana Marie Prikler
2022-08-27 19:54 ` Philip McGrath
2022-08-27 21:18 ` Liliana Marie Prikler
2022-08-27 21:28 ` Philip McGrath
2022-08-27 22:26 ` Liliana Marie Prikler
2022-08-25 8:54 ` [bug#57050] [PATCH v3 08/14] gnu: racket: Update to 8.6 Philip McGrath
2022-08-25 9:14 ` Liliana Marie Prikler
2022-08-25 10:39 ` Efraim Flashner
2022-08-25 8:54 ` [bug#57050] [PATCH v3 09/14] gnu: chez-scheme: Make bootfiles regular inputs Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 10/14] gnu: chez-scheme-for-racket: Support cross-compilation Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 11/14] gnu: racket: Support cross-compiling the VM packages Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 12/14] gnu: chez-scheme-for-racket: Suport all systems Philip McGrath
2022-08-25 9:24 ` Liliana Marie Prikler
2022-08-25 10:50 ` Efraim Flashner
2022-08-25 20:17 ` Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 13/14] gnu: racket-vm-bc: Add workaround for ppc64le Philip McGrath
2022-08-25 8:54 ` [bug#57050] [PATCH v3 14/14] gnu: racket: Use Racket CS on all systems Philip McGrath
2022-08-25 9:17 ` Liliana Marie Prikler
2022-08-26 21:15 ` [bug#57050] [PATCH v3 00/14] gnu: Update Racket to 8.6. Add Zuo Thiago Jung Bauermann via Guix-patches via
2022-08-27 18:55 ` [bug#57050] [PATCH v4 " Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 01/14] gnu: stex: Update to 1.2.2-2.afa6075 Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 02/14] gnu: stex: Fix read-only gifs and math directories Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 03/14] etc: teams: Add racket team Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 04/14] etc: teams: Add entry for Philip McGrath Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 05/14] gnu: racket: Adjust patch for "/bin/sh" in rktio Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 06/14] gnu: chez-scheme: Fix use of "/bin/sh" Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 07/14] gnu: Add Zuo Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 08/14] gnu: racket: Update to 8.6 Philip McGrath
2022-08-27 19:21 ` Liliana Marie Prikler
2022-08-27 20:30 ` Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 09/14] gnu: chez-scheme: Make bootfiles regular inputs Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 10/14] gnu: chez-scheme-for-racket: Support cross-compilation Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 11/14] gnu: racket: Support cross-compiling the VM packages Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 12/14] gnu: chez-scheme-for-racket: Support all systems Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 13/14] gnu: racket-vm-bc: Add workaround for ppc64le Philip McGrath
2022-08-27 18:55 ` [bug#57050] [PATCH v4 14/14] gnu: racket: Use Racket CS on all systems Philip McGrath
2022-09-04 20:53 ` bug#57050: [PATCH 0/6] gnu: Update Racket to 8.6. Add Zuo Ludovic Courtès
2022-08-11 11:08 ` [bug#57050] [PATCH v2 05/13] gnu: racket: Update to 8.6 Philip McGrath
2022-08-11 11:44 ` Liliana Marie Prikler
2022-08-11 22:40 ` Philip McGrath
2022-08-12 6:34 ` Liliana Marie Prikler
2022-08-22 8:41 ` Efraim Flashner
2022-08-22 18:56 ` Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 06/13] gnu: chez-scheme: Bootfiles should not be native inputs Philip McGrath
2022-08-11 11:47 ` Liliana Marie Prikler
2022-08-11 22:45 ` Philip McGrath
2022-08-12 4:21 ` Liliana Marie Prikler
2022-08-11 11:08 ` [bug#57050] [PATCH v2 07/13] gnu: chez-scheme-for-racket: Support cross-compilation Philip McGrath
2022-08-11 11:56 ` Liliana Marie Prikler
2022-08-11 22:49 ` Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 08/13] gnu: racket: Support cross-compiling the VM packages Philip McGrath
2022-08-11 11:58 ` Liliana Marie Prikler
2022-08-11 23:23 ` Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 09/13] gnu: chez-scheme-for-racket: Suport all systems Philip McGrath
2022-08-11 12:02 ` Liliana Marie Prikler
2022-08-11 23:25 ` Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 10/13] gnu: racket-vm-bc: Add workaround for ppc64le Philip McGrath
2022-08-11 11:08 ` [bug#57050] [PATCH v2 11/13] gnu: racket: Use Racket CS on all systems Philip McGrath
2022-08-11 12:03 ` Liliana Marie Prikler
2022-08-11 11:08 ` [bug#57050] [PATCH v2 12/13] etc: teams: Add racket team Philip McGrath
2022-08-11 12:11 ` Liliana Marie Prikler
2022-08-11 11:08 ` [bug#57050] [PATCH v2 13/13] etc: teams: Add entry for Philip McGrath Philip McGrath
2022-08-13 17:43 ` [bug#57050] [PATCH v2 00/13] gnu: Update Racket to 8.6. Add Zuo Thiago Jung Bauermann via Guix-patches via
2022-08-15 5:47 ` [bug#57050] [RFC PATCH] gnu: racket-vm-cs: Avoid 'configure' bug with '--enable-racket' Philip McGrath
2022-08-15 6:12 ` Philip McGrath
2022-08-15 19:54 ` [bug#57050] [RFC PATCH v2] gnu: racket: Backport fix for powerpc64le Philip McGrath
2022-08-19 0:51 ` Thiago Jung Bauermann via Guix-patches via
2022-08-19 10:10 ` Maxime Devos
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=77d198cb202f2fa77ec8b54bc26a3d2e3836792c.camel@ist.tugraz.at \
--to=liliana.prikler@ist.tugraz.at \
--cc=57050@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).