diff options
author | Christopher Baines <mail@cbaines.net> | 2024-04-15 10:57:23 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-04-15 10:57:31 +0100 |
commit | 953253eff32197863d223e5fece42b3c2440df01 (patch) | |
tree | eb85f6b719322174f5dc504cac9de9829e1651e2 /gnu/packages/patches | |
parent | 2718616f77aace28b3962fef29b4e38b87a512ce (diff) | |
parent | 8e3831eb126478cad50588a0f3474667981b11ec (diff) |
Merge remote-tracking branch 'savannah/master' into mesa-updates
Change-Id: I00980ec5dbd9d23ab076995bc79331d136424796
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/chez-scheme-backport-configure.patch | 463 | ||||
-rw-r--r-- | gnu/packages/patches/chez-scheme-bin-sh.patch | 37 | ||||
-rw-r--r-- | gnu/packages/patches/durden-shadow-arcan.patch | 42 | ||||
-rw-r--r-- | gnu/packages/patches/gcc-13-cross-system-header-dir.patch | 32 | ||||
-rw-r--r-- | gnu/packages/patches/racket-backport-8.11-layered-docs.patch | 36 | ||||
-rw-r--r-- | gnu/packages/patches/racket-backport-8.12-chez-configure.patch | 423 | ||||
-rw-r--r-- | gnu/packages/patches/racket-chez-scheme-bin-sh.patch | 21 | ||||
-rw-r--r-- | gnu/packages/patches/racket-rktio-bin-sh.patch | 17 | ||||
-rw-r--r-- | gnu/packages/patches/zuo-bin-sh.patch (renamed from gnu/packages/patches/racket-zuo-bin-sh.patch) | 33 |
9 files changed, 1024 insertions, 80 deletions
diff --git a/gnu/packages/patches/chez-scheme-backport-configure.patch b/gnu/packages/patches/chez-scheme-backport-configure.patch new file mode 100644 index 0000000000..584dcb3f0b --- /dev/null +++ b/gnu/packages/patches/chez-scheme-backport-configure.patch @@ -0,0 +1,463 @@ +From 24ab36374f2e366b6c939fffe8c129c8b0ae3b9c Mon Sep 17 00:00:00 2001 +From: Philip McGrath <philip@philipmcgrath.com> +Date: Wed, 28 Feb 2024 19:41:22 -0500 +Subject: [PATCH 1/2] Repairs and improvements for building with external + dependencies (#807) + +* configure: fix zlib and lz4 submodule checks + +Conditionals to skip the submodule checks were using the wrong +variable names, so the checks were always skipped. The correct +behavior is to perform the check unless given `ZLIB=<zlib>` or +`LZ4=<lz4>`, as applicable. + +* configure: support `ZUO=<zuo>` + +Supplying `ZUO=<zuo>` skips the submodule check in `configure` +and configures the generated makefile not to build or remove Zuo. + +* configure: support `STEXLIB=<stex>` + +For compatibility with older scripts, when not explicitly configured, +continue to honor the `STEXLIB` environment variable at build time. + +(cherry picked from commit b8838c3280ef10e115236d2f7ac9ae857f83e268) +--- + BUILDING | 5 +++-- + build.zuo | 13 +++++++++---- + configure | 40 +++++++++++++++++++++++++++++++++------- + makefiles/Makefile.in | 6 ++---- + 4 files changed, 47 insertions(+), 17 deletions(-) + +diff --git a/BUILDING b/BUILDING +index 7b3dc9c8..9e9a268b 100644 +--- a/BUILDING ++++ b/BUILDING +@@ -149,7 +149,8 @@ information on the supported options. + The generated makefile mostly just ensures that a `zuo` executable is + built in a `bin` directory, and then it defers the actual build work + to `zuo`, which uses the "main.zuo" file. If you have `zuo` installed, +-you can use `zuo` directly instead of `make`. In general, instead of ++you can use `zuo` directly instead of `make`: in that case, you may ++wish to use `./configure ZUO=<zuo>`. In general, instead of + the command `make X` to build target `X` as described below, you can + use `zuo . X` (or `bin/zuo . X` after `bin/zuo` is built). + +@@ -333,7 +334,7 @@ The makefile supports several targets: + * `make clean` + + Removes all built elements from the workarea, and then removes +- `bin/zuo`. ++ `bin/zuo` (unless configured with `ZUO=<zuo>`). + + + WINDOWS VIA COMMAND PROMPT +diff --git a/build.zuo b/build.zuo +index c21d2caa..c5896396 100644 +--- a/build.zuo ++++ b/build.zuo +@@ -224,10 +224,15 @@ + token)) + + (define stexlib +- (let ((found (assoc "STEXLIB" (hash-ref (runtime-env) 'env)))) +- (if found +- (cdr found) +- (at-source "stex")))) ++ (let ([configured (hash-ref config 'STEXLIB "")] ++ [env (assoc "STEXLIB" (hash-ref (runtime-env) 'env))]) ++ (cond ++ [(not (equal? "" configured)) ++ configured] ++ [env ++ (cdr env)] ++ [else ++ (at-source "stex")]))) + (define stex-sources + (source-tree stexlib)) + +diff --git a/configure b/configure +index 2b4b594e..782dd09b 100755 +--- a/configure ++++ b/configure +@@ -93,6 +93,7 @@ default_warning_flags="-Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough" + CFLAGS_ADD= + zlibLib= + LZ4Lib= ++STEXLIB= + Kernel=KernelLib + buildKernelOnly=no + enableFrompb=yes +@@ -103,6 +104,7 @@ moreBootFiles= + preloadBootFiles= + alwaysUseBootFile= + skipSubmoduleUpdate= ++zuoExternal= + + CONFIG_UNAME=`uname` + +@@ -446,6 +448,12 @@ while [ $# != 0 ] ; do + LZ4=*) + LZ4Lib=`echo $1 | sed -e 's/^LZ4=//'` + ;; ++ STEXLIB=*) ++ STEXLIB=`echo $1 | sed -e 's/^STEXLIB=//'` ++ ;; ++ ZUO=*) ++ zuoExternal=`echo $1 | sed -e 's/^ZUO=//'` ++ ;; + *) + echo "option '$1' unrecognized or missing an argument; try $0 --help" + exit 1 +@@ -672,6 +680,8 @@ if [ "$help" = "yes" ]; then + echo " STRIP=<strip> executable stripper" + echo " ZLIB=<lib> link to <lib> instead of own zlib" + echo " LZ4=<lib> link to <lib> instead of own LZ4" ++ echo " STEXLIB=<stex> build docs with <stex> instead of own stex" ++ echo " ZUO=<zuo> build with <zuo> instead of own Zuo" + echo "" + echo "Available machine types: $machs" + echo "" +@@ -889,28 +899,39 @@ submod_instructions () { + exit 1 + } + +-if [ ! -f "$srcdir"/zuo/configure ] ; then +- submod_instructions 'Source in "zuo" is missing' ++if [ "${zuoExternal}" = "" ] ; then ++ if [ ! -f "$srcdir"/zuo/configure ] ; then ++ submod_instructions 'Source in "zuo" is missing' ++ fi ++ ZUO="bin/zuo" ++ RM_ZUO="rm -f bin/zuo" ++ ZUO_TARGET="bin/zuo" ++else ++ ZUO="${zuoExternal}" ++ RM_ZUO="@echo 'Not cleaning external ${zuoExternal}'" ++ ZUO_TARGET="DoNotBuildZuo" + fi + + if [ ! -f "$srcdir"/nanopass/nanopass.ss ] ; then + submod_instructions 'Source in "nanopass" is missing' + fi + +-if [ "${zlibDep}" != "" ] ; then ++if [ "${zlibLib}" = "" ] ; then + if [ ! -f "$srcdir"/zlib/configure ] ; then + submod_instructions 'Source in "zlib" is missing' + fi + fi + +-if [ "${LZ4Dep}" != "" ] ; then ++if [ "${LZ4Lib}" = "" ] ; then + if [ ! -f "$srcdir"/lz4/lib/Makefile ] ; then + submod_instructions 'Source in "lz4" is missing' + fi + fi + +-if [ ! -f "$srcdir"/stex/Mf-stex ] ; then +- submod_instructions 'Source in "stex" is missing' ++if [ "${STEXLIB}" = "" ] ; then ++ if [ ! -f "$srcdir"/stex/Mf-stex ] ; then ++ submod_instructions 'Source in "stex" is missing' ++ fi + fi + + # more compile and link flags for c/Mf-unix and mats/Mf-unix +@@ -1083,7 +1104,7 @@ cp "$srcdir"/makefiles/buildmain.zuo main.zuo + # Some idea, but in the workarea, so it refers to "workarea.zuo" here: + cp "$srcdir"/makefiles/workmain.zuo $w/main.zuo + +-# The content of "$w/Makefile" records configuration decisions, ++# The content of "$w/Mf-config" records configuration decisions, + # and the Zuo build script takes it from there + cat > $w/Mf-config << END + srcdir=$srcdir +@@ -1119,6 +1140,7 @@ cursesLib=$cursesLib + ncursesLib=$ncursesLib + zlibLib=$zlibLib + LZ4Lib=$LZ4Lib ++STEXLIB=$STEXLIB + warningFlags=$warningFlags + Kernel=$Kernel + installscriptname=$installscriptname +@@ -1130,6 +1152,10 @@ preloadBootFiles=$preloadBootFiles + alwaysUseBootFile=$alwaysUseBootFile + relativeBootFiles=$relativeBootFiles + ++ZUO=$ZUO ++RM_ZUO=$RM_ZUO ++ZUO_TARGET=$ZUO_TARGET ++ + InstallBin=$installbin + InstallLib=$installlib + InstallMan=$installman/man1 +diff --git a/makefiles/Makefile.in b/makefiles/Makefile.in +index 3b95f065..0e3d307d 100644 +--- a/makefiles/Makefile.in ++++ b/makefiles/Makefile.in +@@ -3,8 +3,6 @@ workarea=$(w) + + include $(workarea)/Mf-config + +-ZUO=bin/zuo +- + .PHONY: build + build: $(ZUO) + + $(ZUO) $(workarea) MAKE="$(MAKE)" +@@ -144,9 +142,9 @@ pkg: $(ZUO) + .PHONY: clean + clean: $(ZUO) + + $(ZUO) $(workarea) clean MAKE="$(MAKE)" +- rm -f bin/zuo ++ $(RM_ZUO) + + # Using `+` here means that $(ZUO) gets built even if `-n`/`--dry-run` is provided to `make` +-$(ZUO): $(srcdir)/zuo/zuo.c ++$(ZUO_TARGET): $(srcdir)/zuo/zuo.c + + mkdir -p bin + + $(CC_FOR_BUILD) -DZUO_LIB_PATH='"'"../zuo/lib"'"' -o $(ZUO) $(srcdir)/zuo/zuo.c + +base-commit: 253230f7dfbb4fe777277d6bbf93f39f9567f086 +-- +2.41.0 + + +From 665bccc1c074131e790879adc1436f8059801171 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt <mflatt@racket-lang.org> +Date: Sun, 17 Mar 2024 09:06:30 -0600 +Subject: [PATCH 2/2] adjust `configure ZUO=<command>` support (#816) + +Continuing from b8838c3280, adjust the generated makefile so the +supplied `<command>` is not a makefile dependency. That way, `ZUO=zuo` +works if `zuo` is installed and the current build directory is not the +source directory. (The `zuo` executable is a dependency in a real and +relevant sense, but not in the sense of dependencies that we normally +track in makefiles.) + +Also adapt the makefile for the case that `ZUO=...` is not supplied +and the build directory is not the source directory, in which case +`ZUO_LIB_PATH` needs to be relative to the source directory. + +Using `make ZUO=zuo` can also work, but in that case, `bin/zuo` is +still built as a dependency. It's possible that some portable makefile +magic could overcome that limitation, but it doesn't seem important. + +(cherry picked from commit d327968f37cdf669d15a9ad6d356bbf92c502bb9) +--- + configure | 3 ++ + makefiles/Makefile.in | 66 +++++++++++++++++++++---------------------- + 2 files changed, 36 insertions(+), 33 deletions(-) + +diff --git a/configure b/configure +index 782dd09b..9adae37a 100755 +--- a/configure ++++ b/configure +@@ -904,10 +904,12 @@ if [ "${zuoExternal}" = "" ] ; then + submod_instructions 'Source in "zuo" is missing' + fi + ZUO="bin/zuo" ++ ZUO_DEP="${ZUO}" + RM_ZUO="rm -f bin/zuo" + ZUO_TARGET="bin/zuo" + else + ZUO="${zuoExternal}" ++ ZUO_DEP="" + RM_ZUO="@echo 'Not cleaning external ${zuoExternal}'" + ZUO_TARGET="DoNotBuildZuo" + fi +@@ -1153,6 +1155,7 @@ alwaysUseBootFile=$alwaysUseBootFile + relativeBootFiles=$relativeBootFiles + + ZUO=$ZUO ++ZUO_DEP=$ZUO_DEP + RM_ZUO=$RM_ZUO + ZUO_TARGET=$ZUO_TARGET + +diff --git a/makefiles/Makefile.in b/makefiles/Makefile.in +index 0e3d307d..fc8605a0 100644 +--- a/makefiles/Makefile.in ++++ b/makefiles/Makefile.in +@@ -4,55 +4,55 @@ workarea=$(w) + include $(workarea)/Mf-config + + .PHONY: build +-build: $(ZUO) ++build: $(ZUO_DEP) + + $(ZUO) $(workarea) MAKE="$(MAKE)" + + .PHONY: run +-run: $(ZUO) ++run: $(ZUO_DEP) + + $(ZUO) $(workarea) run + + .PHONY: kernel +-kernel: $(ZUO) ++kernel: $(ZUO_DEP) + + $(ZUO) $(workarea) kernel MAKE="$(MAKE)" + + .PHONY: install +-install: $(ZUO) ++install: $(ZUO_DEP) + $(ZUO) $(workarea) install MAKE="$(MAKE)" + + .PHONY: uninstall +-uninstall: $(ZUO) ++uninstall: $(ZUO_DEP) + + $(ZUO) $(workarea) uninstall MAKE="$(MAKE)" + + .PHONY: test-one +-test-one: $(ZUO) ++test-one: $(ZUO_DEP) + + $(ZUO) $(workarea) test-one MAKE="$(MAKE)" + + .PHONY: test-some-fast +-test-some-fast: $(ZUO) ++test-some-fast: $(ZUO_DEP) + + $(ZUO) $(workarea) test-some-fast MAKE="$(MAKE)" + + .PHONY: test-some +-test-some: $(ZUO) ++test-some: $(ZUO_DEP) + + $(ZUO) $(workarea) test-some MAKE="$(MAKE)" + + .PHONY: test +-test: $(ZUO) ++test: $(ZUO_DEP) + + $(ZUO) $(workarea) test MAKE="$(MAKE)" + + .PHONY: test-more +-test-more: $(ZUO) ++test-more: $(ZUO_DEP) + + $(ZUO) $(workarea) test-more MAKE="$(MAKE)" + + .PHONY: coverage +-coverage: $(ZUO) ++coverage: $(ZUO_DEP) + + $(ZUO) $(workarea) coverage MAKE="$(MAKE)" + + .PHONY: bootfiles +-bootfiles: $(ZUO) ++bootfiles: $(ZUO_DEP) + + $(ZUO) $(workarea) bootfiles MAKE="$(MAKE)" + + .PHONY: reset +-reset: $(ZUO) ++reset: $(ZUO_DEP) + + $(ZUO) $(workarea) reset MAKE="$(MAKE)" + + # Supply XM=<machine> to build boot files for <machine> +@@ -61,90 +61,90 @@ boot: + + $(ZUO) $(workarea) boot "$(XM)" MAKE="$(MAKE)" + + # `<machine>.boot` as alias for `boot XM=<machine>` +-%.boot: $(ZUO) ++%.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) boot $* MAKE="$(MAKE)" + + .PHONY: auto.boot +-auto.boot: $(ZUO) ++auto.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) boot MAKE="$(MAKE)" + + SCHEME=scheme + + .PHONY: cross.boot +-cross.boot: $(ZUO) ++cross.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) boot SCHEME="$(SCHEME)" MAKE="$(MAKE)" + + .PHONY: re.boot +-re.boot: $(ZUO) ++re.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) reboot SCHEME="$(SCHEME)" + + # Supply XM=<machine> to build boot files for <machine> + # with o=3 d=0 for the cross compiler, and only after + # building the kernel for the configured machine + .PHONY: bootquick +-bootquick: $(ZUO) ++bootquick: $(ZUO_DEP) + + $(ZUO) $(workarea) bootquick "$(XM)" MAKE="$(MAKE)" + + # `<machine>.bootquick` as alias for `boot XM=<machine>` +-%.bootquick: $(ZUO) ++%.bootquick: $(ZUO_DEP) + + $(ZUO) $(workarea) bootquick $* MAKE="$(MAKE)" + +-auto.bootquick: $(ZUO) ++auto.bootquick: $(ZUO_DEP) + + $(ZUO) $(workarea) bootquick MAKE="$(MAKE)" + + # Supply XM=<machine>-<tag>.bootpbchunk to repackage boot files for + # <machine> with pbchunk sources, including additional + # boot files + .PHONY: bootpbchunk +-bootpbchunk: $(ZUO) ++bootpbchunk: $(ZUO_DEP) + + $(ZUO) $(workarea) bootpbchunk "$(XM)" $(ARGS) MAKE="$(MAKE)" + + # `<machine>.bootpbchunk` as alias for `pbchunk XM=<machine>` +-%.bootpbchunk: $(ZUO) ++%.bootpbchunk: $(ZUO_DEP) + + $(ZUO) $(workarea) bootpbchunk $* $(ARGS) MAKE="$(MAKE)" + + .PHONY: docs +-docs: build $(ZUO) ++docs: build $(ZUO_DEP) + + $(ZUO) $(workarea) docs MAKE="$(MAKE)" + + .PHONY: csug +-csug: build $(ZUO) ++csug: build $(ZUO_DEP) + + $(ZUO) $(workarea) csug MAKE="$(MAKE)" + + .PHONY: release_notes +-release_notes: build $(ZUO) ++release_notes: build $(ZUO_DEP) + + $(ZUO) $(workarea) release_notes MAKE="$(MAKE)" + + .PHONY: install-docs +-install-docs: build $(ZUO) ++install-docs: build $(ZUO_DEP) + + $(ZUO) $(workarea) install-docs MAKE="$(MAKE)" + + .PHONY: install-csug +-install-csug: build $(ZUO) ++install-csug: build $(ZUO_DEP) + + $(ZUO) $(workarea) install-csug MAKE="$(MAKE)" + + .PHONY: install-release_notes +-install-release_notes: build $(ZUO) ++install-release_notes: build $(ZUO_DEP) + + $(ZUO) $(workarea) install-release_notes MAKE="$(MAKE)" + + .PHONY: bintar +-bintar: $(ZUO) ++bintar: $(ZUO_DEP) + + $(ZUO) $(workarea) bintar MAKE="$(MAKE)" + + .PHONY: rpm +-rpm: $(ZUO) ++rpm: $(ZUO_DEP) + + $(ZUO) $(workarea) rpm MAKE="$(MAKE)" + + .PHONY: pkg +-pkg: $(ZUO) ++pkg: $(ZUO_DEP) + + $(ZUO) $(workarea) pkg MAKE="$(MAKE)" + + .PHONY: clean +-clean: $(ZUO) ++clean: $(ZUO_DEP) + + $(ZUO) $(workarea) clean MAKE="$(MAKE)" + $(RM_ZUO) + + # Using `+` here means that $(ZUO) gets built even if `-n`/`--dry-run` is provided to `make` + $(ZUO_TARGET): $(srcdir)/zuo/zuo.c + + mkdir -p bin +- + $(CC_FOR_BUILD) -DZUO_LIB_PATH='"'"../zuo/lib"'"' -o $(ZUO) $(srcdir)/zuo/zuo.c ++ + $(CC_FOR_BUILD) -DZUO_LIB_PATH='"'"$(upsrcdir)/zuo/lib"'"' -o $(ZUO) $(srcdir)/zuo/zuo.c +-- +2.41.0 + diff --git a/gnu/packages/patches/chez-scheme-bin-sh.patch b/gnu/packages/patches/chez-scheme-bin-sh.patch index 7650914f01..c2a4b292f7 100644 --- a/gnu/packages/patches/chez-scheme-bin-sh.patch +++ b/gnu/packages/patches/chez-scheme-bin-sh.patch @@ -1,6 +1,6 @@ -From 3c838e6a0c3214d95bf02048cddccfd1b69a679f Mon Sep 17 00:00:00 2001 +From b8428ad25b437acf4bd8210b14db207b71fe44c3 Mon Sep 17 00:00:00 2001 From: Philip McGrath <philip@philipmcgrath.com> -Date: Thu, 19 May 2022 13:41:56 -0400 +Date: Wed, 24 Aug 2022 19:55:14 -0400 Subject: [PATCH] patch s_process for "/bin/sh" on Guix If: @@ -14,22 +14,27 @@ then `s_process` will call `execl` with the file specified by `_PATH_BSHELL` instead of "/bin/sh". Checking that the path specified by `_PATH_BSHELL` exists safeguards -against obscure errors if attempting to use stand-alone executables -built by the patched Racket in non-Guix envoronments. +against obscure errors if attempting to use the patched Chez Scheme +or executables it builds in non-Guix envoronments. This patch does not change the behavior of `s_system`, which relies on `system` from the C library. --- + +Notes: + See also racket-chez-scheme-bin-sh.patch, racket-rktio-bin-sh.patch, + and zuo-bin-sh.patch. + c/prim5.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/c/prim5.c b/c/prim5.c -index 5a07893..bc2736c 100644 +index 90b087f1..284f063f 100644 --- a/c/prim5.c +++ b/c/prim5.c -@@ -23,6 +23,12 @@ - #include <ctype.h> - #include <math.h> +@@ -27,6 +27,12 @@ + #include <sys/resource.h> + #endif +/* BEGIN PATCH for Guix */ +#ifndef WIN32 @@ -39,8 +44,8 @@ index 5a07893..bc2736c 100644 + /* locally defined functions */ static INT s_errno(void); - static iptr s_addr_in_heap(uptr x); -@@ -746,6 +752,17 @@ static ptr s_process(char *s, IBOOL stderrp) { + static IBOOL s_addr_in_heap(uptr x); +@@ -875,6 +881,17 @@ static ptr s_process(char *s, IBOOL stderrp) { INT tofds[2], fromfds[2], errfds[2]; struct sigaction act, oint_act; @@ -58,10 +63,10 @@ index 5a07893..bc2736c 100644 if (pipe(tofds)) S_error("process","cannot open pipes"); if (pipe(fromfds)) { -@@ -771,7 +788,9 @@ static ptr s_process(char *s, IBOOL stderrp) { - CLOSE(1); if (dup(fromfds[1]) != 1) _exit(1); - CLOSE(2); if (dup(stderrp ? errfds[1] : 1) != 2) _exit(1); - {INT i; for (i = 3; i < NOFILE; i++) (void)CLOSE(i);} +@@ -911,7 +928,9 @@ static ptr s_process(char *s, IBOOL stderrp) { + } + } + #endif /* __GNU__ Hurd */ - execl("/bin/sh", "/bin/sh", "-c", s, NULL); + /* BEGIN PATCH for Guix */ + execl(guix_sh, guix_sh, "-c", s, NULL); @@ -70,7 +75,7 @@ index 5a07893..bc2736c 100644 /*NOTREACHED*/ } else { -base-commit: 9df56e7b25bc523663eac3da24be33afc5f76c84 +base-commit: 253230f7dfbb4fe777277d6bbf93f39f9567f086 -- -2.32.0 +2.41.0 diff --git a/gnu/packages/patches/durden-shadow-arcan.patch b/gnu/packages/patches/durden-shadow-arcan.patch new file mode 100644 index 0000000000..b666a6d7e3 --- /dev/null +++ b/gnu/packages/patches/durden-shadow-arcan.patch @@ -0,0 +1,42 @@ +From 157524b7cb76c5044a27f4a9e373ee04a9da3c71 Mon Sep 17 00:00:00 2001 +From: Ahmad Draidi <a.r.draidi@redscript.org> +Date: Tue, 9 Apr 2024 18:26:52 +0400 +Subject: [PATCH] Use arcan from setuid-programs if available + +--- + distr/durden | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/distr/durden b/distr/durden +index ab431ce..8672556 100755 +--- a/distr/durden ++++ b/distr/durden +@@ -1,5 +1,11 @@ + #!/bin/sh + ++if [ -n "$(command -v /run/setuid-programs/arcan 2>/dev/null)" ]; then ++ ARCAN_CMD="/run/setuid-programs/arcan" ++else ++ ARCAN_CMD="@ARCAN_STORE_PATH@" ++fi ++ + arcan_base=${HOME}/.arcan + applname="$(basename $0)" + distargs="" +@@ -98,11 +104,11 @@ while true; do + starttime=$(date +%s) + + if [ -d "${arcan_logpath}" ]; then +- if arcan ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then ++ if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then + exit + fi + else +- if arcan ${distargs} -b "$applname" "$applname" "$@"; then ++ if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@"; then + exit + fi + fi +-- +2.41.0 + diff --git a/gnu/packages/patches/gcc-13-cross-system-header-dir.patch b/gnu/packages/patches/gcc-13-cross-system-header-dir.patch new file mode 100644 index 0000000000..75f80ea9d2 --- /dev/null +++ b/gnu/packages/patches/gcc-13-cross-system-header-dir.patch @@ -0,0 +1,32 @@ +From 8b001f38cc713190642194b55e02a56346f51494 Mon Sep 17 00:00:00 2001 +From: Jean-Pierre De Jesus DIAZ <jean@foundation.xyz> +Date: Fri, 12 Apr 2024 12:18:24 +0200 +Subject: [PATCH] Fix CROSS_SYSTEM_HEADER_DIR value for Guix. + +* gcc/Makefile.in (CROSS_SYSTEM_HEADER_DIR): Always use default value. +--- + gcc/Makefile.in | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 775aaa1b3c4..06d192fa9ed 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h + # Default native SYSTEM_HEADER_DIR, to be overridden by targets. + NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ + # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. +-ifeq (@includedir@,$(prefix)/include) +- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ +-else +- CROSS_SYSTEM_HEADER_DIR = @includedir@ +-endif ++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ + + # autoconf sets SYSTEM_HEADER_DIR to one of the above. + # Purge it of unnecessary internal relative paths + +base-commit: c891d8dc23e1a46ad9f3e757d09e57b500d40044 +-- +2.41.0 + diff --git a/gnu/packages/patches/racket-backport-8.11-layered-docs.patch b/gnu/packages/patches/racket-backport-8.11-layered-docs.patch deleted file mode 100644 index 07f105bb24..0000000000 --- a/gnu/packages/patches/racket-backport-8.11-layered-docs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1d8dbdf408db9e99f1382323477561d5148cd451 Mon Sep 17 00:00:00 2001 -From: Philip McGrath <philip@philipmcgrath.com> -Date: Fri, 20 Oct 2023 17:19:50 -0400 -Subject: [PATCH] racket-index: fix release.scrbl for layered installations -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Configure the release notes page to be rendered separately at every -installation layer. Otherwise, rendering documentation for packages -installed in a new layer might try to write to `release/in.sxref` -in the parent layer’s docs directory. - -Related to https://github.com/videolang/video/issues/67 -Related to https://issues.guix.gnu.org/56534 - -(cherry picked from commit 85f21854c0a41564b755fbe180fe6b85de6c4730) ---- - pkgs/racket-index/scribblings/main/info.rkt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkgs/racket-index/scribblings/main/info.rkt b/pkgs/racket-index/scribblings/main/info.rkt -index 75c507848a..a6a3798f7c 100644 ---- a/pkgs/racket-index/scribblings/main/info.rkt -+++ b/pkgs/racket-index/scribblings/main/info.rkt -@@ -6,4 +6,4 @@ - ("local-redirect.scrbl" (depends-all-main no-depend-on every-main-layer) (omit) "local-redirect" 1 10) - ("license.scrbl" () (omit)) - ("acks.scrbl" () (omit)) -- ("release.scrbl" (depends-all-main no-depend-on) (omit)))) -+ ("release.scrbl" (depends-all-main no-depend-on every-main-layer) (omit)))) - -base-commit: c3a502c0ae9f4d615bfd85fc7d88b781826bbb09 --- -2.41.0 - diff --git a/gnu/packages/patches/racket-backport-8.12-chez-configure.patch b/gnu/packages/patches/racket-backport-8.12-chez-configure.patch new file mode 100644 index 0000000000..483948fec9 --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.12-chez-configure.patch @@ -0,0 +1,423 @@ +From 82157f5b3fb9f71ad7fc978c428d423d06a4a0df Mon Sep 17 00:00:00 2001 +From: Philip McGrath <philip@philipmcgrath.com> +Date: Wed, 28 Feb 2024 19:41:22 -0500 +Subject: [PATCH 1/2] Chez Scheme: Repairs and improvements for building with + external dependencies + +* configure: support `ZUO=<zuo>` + +Supplying `ZUO=<zuo>` skips the submodule check in `configure` +and configures the generated makefile not to build or remove Zuo. + +* configure: support `STEXLIB=<stex>` + +For compatibility with older scripts, when not explicitly configured, +continue to honor the `STEXLIB` environment variable at build time. + +(cherry picked from commit 694fbd47a125c7fde10a328c6fda199dac19f802) +--- + racket/src/ChezScheme/BUILDING | 5 ++-- + racket/src/ChezScheme/build.zuo | 13 +++++++--- + racket/src/ChezScheme/configure | 27 ++++++++++++++++++++- + racket/src/ChezScheme/makefiles/Makefile.in | 6 ++--- + 4 files changed, 40 insertions(+), 11 deletions(-) + +diff --git a/racket/src/ChezScheme/BUILDING b/racket/src/ChezScheme/BUILDING +index 50fde27771..2df29b5bd8 100644 +--- a/racket/src/ChezScheme/BUILDING ++++ b/racket/src/ChezScheme/BUILDING +@@ -155,7 +155,8 @@ information on the supported options. + The generated makefile mostly just ensures that a `zuo` executable is + built in a `bin` directory, and then it defers the actual build work + to `zuo`, which uses the "main.zuo" file. If you have `zuo` installed, +-you can use `zuo` directly instead of `make`. In general, instead of ++you can use `zuo` directly instead of `make`: in that case, you may ++wish to use `./configure ZUO=<zuo>`. In general, instead of + the command `make X` to build target `X` as described below, you can + use `zuo . X` (or `bin/zuo . X` after `bin/zuo` is built). + +@@ -339,7 +340,7 @@ The makefile supports several targets: + * `make clean` + + Removes all built elements from the workarea, and then removes +- `bin/zuo`. ++ `bin/zuo` (unless configured with `ZUO=<zuo>`). + + + WINDOWS VIA COMMAND PROMPT +diff --git a/racket/src/ChezScheme/build.zuo b/racket/src/ChezScheme/build.zuo +index a211632a89..432cc6e5a1 100644 +--- a/racket/src/ChezScheme/build.zuo ++++ b/racket/src/ChezScheme/build.zuo +@@ -218,10 +218,15 @@ + token)) + + (define stexlib +- (let ((found (assoc "STEXLIB" (hash-ref (runtime-env) 'env)))) +- (if found +- (cdr found) +- (at-source "stex")))) ++ (let ([configured (hash-ref config 'STEXLIB "")] ++ [env (assoc "STEXLIB" (hash-ref (runtime-env) 'env))]) ++ (cond ++ [(not (equal? "" configured)) ++ configured] ++ [env ++ (cdr env)] ++ [else ++ (at-source "stex")]))) + (define stex-sources + (source-tree stexlib)) + +diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure +index 721d1d1335..f88c6f7625 100755 +--- a/racket/src/ChezScheme/configure ++++ b/racket/src/ChezScheme/configure +@@ -93,6 +93,7 @@ default_warning_flags="-Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough" + CFLAGS_ADD= + zlibLib= + LZ4Lib= ++STEXLIB= + Kernel=KernelLib + buildKernelOnly=no + enableFrompb=yes +@@ -102,6 +103,7 @@ empetite=no + moreBootFiles= + preloadBootFiles= + alwaysUseBootFile= ++zuoExternal= + + CONFIG_UNAME=`uname` + +@@ -442,6 +444,12 @@ while [ $# != 0 ] ; do + LZ4=*) + LZ4Lib=`echo $1 | sed -e 's/^LZ4=//'` + ;; ++ STEXLIB=*) ++ STEXLIB=`echo $1 | sed -e 's/^STEXLIB=//'` ++ ;; ++ ZUO=*) ++ zuoExternal=`echo $1 | sed -e 's/^ZUO=//'` ++ ;; + *) + echo "option '$1' unrecognized or missing an argument; try $0 --help" + exit 1 +@@ -667,6 +675,8 @@ if [ "$help" = "yes" ]; then + echo " STRIP=<strip> executable stripper" + echo " ZLIB=<lib> link to <lib> instead of own zlib" + echo " LZ4=<lib> link to <lib> instead of own LZ4" ++ echo " STEXLIB=<stex> build docs with <stex> instead of own stex" ++ echo " ZUO=<zuo> build with <zuo> instead of own Zuo" + echo "" + echo "Available machine types: $machs" + echo "" +@@ -869,6 +879,16 @@ if [ "$addflags" = "yes" ] ; then + fi + fi + ++if [ "${zuoExternal}" = "" ] ; then ++ ZUO="bin/zuo" ++ RM_ZUO="rm -f bin/zuo" ++ ZUO_TARGET="bin/zuo" ++else ++ ZUO="${zuoExternal}" ++ RM_ZUO="@echo 'Not cleaning external ${zuoExternal}'" ++ ZUO_TARGET="DoNotBuildZuo" ++fi ++ + # more compile and link flags for c/Mf-unix and mats/Mf-unix + mdinclude= + mdcppflags= +@@ -1039,7 +1059,7 @@ cp "$srcdir"/makefiles/buildmain.zuo main.zuo + # Some idea, but in the workarea, so it refers to "workarea.zuo" here: + cp "$srcdir"/makefiles/workmain.zuo $w/main.zuo + +-# The content of "$w/Makefile" records configuration decisions, ++# The content of "$w/Mf-config" records configuration decisions, + # and the Zuo build script takes it from there + cat > $w/Mf-config << END + srcdir=$srcdir +@@ -1075,6 +1095,7 @@ cursesLib=$cursesLib + ncursesLib=$ncursesLib + zlibLib=$zlibLib + LZ4Lib=$LZ4Lib ++STEXLIB=$STEXLIB + warningFlags=$warningFlags + Kernel=$Kernel + installscriptname=$installscriptname +@@ -1086,6 +1107,10 @@ preloadBootFiles=$preloadBootFiles + alwaysUseBootFile=$alwaysUseBootFile + relativeBootFiles=$relativeBootFiles + ++ZUO=$ZUO ++RM_ZUO=$RM_ZUO ++ZUO_TARGET=$ZUO_TARGET ++ + InstallBin=$installbin + InstallLib=$installlib + InstallMan=$installman/man1 +diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in +index cfdd0230a3..4865bf2e2f 100644 +--- a/racket/src/ChezScheme/makefiles/Makefile.in ++++ b/racket/src/ChezScheme/makefiles/Makefile.in +@@ -3,8 +3,6 @@ workarea=$(w) + + include $(workarea)/Mf-config + +-ZUO=bin/zuo +- + .PHONY: build + build: $(ZUO) + + $(ZUO) $(workarea) MAKE="$(MAKE)" +@@ -140,9 +138,9 @@ pkg: $(ZUO) + .PHONY: clean + clean: $(ZUO) + + $(ZUO) $(workarea) clean MAKE="$(MAKE)" +- rm -f bin/zuo ++ $(RM_ZUO) + + # Using `+` here means that $(ZUO) gets built even if `-n`/`--dry-run` is provided to `make` +-$(ZUO): $(srcdir)/../zuo/zuo.c ++$(ZUO_TARGET): $(srcdir)/../zuo/zuo.c + + mkdir -p bin + + $(CC_FOR_BUILD) -DZUO_LIB_PATH='"'"$(upsrcdir)/../zuo/lib"'"' -o $(ZUO) $(srcdir)/../zuo/zuo.c + +base-commit: 78fef00d4d16a79fdf6ab31924b3a80cadf4b368 +-- +2.41.0 + + +From e2bc69c5ce7437dd9a1b30ac1b12b3a56872c491 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt <mflatt@racket-lang.org> +Date: Sun, 10 Mar 2024 09:13:40 -0600 +Subject: [PATCH 2/2] Chez Scheme: adjust `configure ZUO=<command>` support + +Continuing from 694fbd47a1, adjust the generated makefile so the +supplied `<command>` is not a makefile dependency. That way, `ZUO=zuo` +works if `zuo` is installed and the current build directory is not the +source directory. (The `zuo` executable is a dependency in a real and +relevant sense, but not in the sense of dependencies that we normally +track in makefiles.) + +Also adapt the makefile for the case that `ZUO=...` is not supplied +and the build directory is not the source directory, in which case +`ZUO_LIB_PATH` needs to be relative to the source directory. + +Using `make ZUO=zuo` can also work, but in that case, `bin/zuo` is +still built as a dependency. It's possible that some portable makefile +magic could overcome that limitation, but it doesn't seem important. + +(cherry picked from commit 28157ba88d48fe645563f46f6c00d6626b3428fa) +--- + racket/src/ChezScheme/configure | 3 + + racket/src/ChezScheme/makefiles/Makefile.in | 70 +++++++++++---------- + 2 files changed, 40 insertions(+), 33 deletions(-) + +diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure +index f88c6f7625..201dbe580f 100755 +--- a/racket/src/ChezScheme/configure ++++ b/racket/src/ChezScheme/configure +@@ -881,10 +881,12 @@ fi + + if [ "${zuoExternal}" = "" ] ; then + ZUO="bin/zuo" ++ ZUO_DEP="${ZUO}" + RM_ZUO="rm -f bin/zuo" + ZUO_TARGET="bin/zuo" + else + ZUO="${zuoExternal}" ++ ZUO_DEP="" + RM_ZUO="@echo 'Not cleaning external ${zuoExternal}'" + ZUO_TARGET="DoNotBuildZuo" + fi +@@ -1108,6 +1110,7 @@ alwaysUseBootFile=$alwaysUseBootFile + relativeBootFiles=$relativeBootFiles + + ZUO=$ZUO ++ZUO_DEP=$ZUO_DEP + RM_ZUO=$RM_ZUO + ZUO_TARGET=$ZUO_TARGET + +diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in +index 4865bf2e2f..5ce237178e 100644 +--- a/racket/src/ChezScheme/makefiles/Makefile.in ++++ b/racket/src/ChezScheme/makefiles/Makefile.in +@@ -4,51 +4,55 @@ workarea=$(w) + include $(workarea)/Mf-config + + .PHONY: build +-build: $(ZUO) ++build: $(ZUO_DEP) + + $(ZUO) $(workarea) MAKE="$(MAKE)" + + .PHONY: run +-run: $(ZUO) ++run: $(ZUO_DEP) + + $(ZUO) $(workarea) run + + .PHONY: kernel +-kernel: $(ZUO) ++kernel: $(ZUO_DEP) + + $(ZUO) $(workarea) kernel MAKE="$(MAKE)" + + .PHONY: install +-install: $(ZUO) ++install: $(ZUO_DEP) + $(ZUO) $(workarea) install MAKE="$(MAKE)" + + .PHONY: uninstall +-uninstall: $(ZUO) ++uninstall: $(ZUO_DEP) + + $(ZUO) $(workarea) uninstall MAKE="$(MAKE)" + +-.PHONY: test +-test: $(ZUO) +- + $(ZUO) $(workarea) test MAKE="$(MAKE)" ++.PHONY: test-one ++test-one: $(ZUO_DEP) ++ + $(ZUO) $(workarea) test-one MAKE="$(MAKE)" + + .PHONY: test-some-fast +-test-some-fast: $(ZUO) ++test-some-fast: $(ZUO_DEP) + + $(ZUO) $(workarea) test-some-fast MAKE="$(MAKE)" + + .PHONY: test-some +-test-some: $(ZUO) ++test-some: $(ZUO_DEP) + + $(ZUO) $(workarea) test-some MAKE="$(MAKE)" + ++.PHONY: test ++test: $(ZUO_DEP) ++ + $(ZUO) $(workarea) test MAKE="$(MAKE)" ++ + .PHONY: test-more +-test-more: $(ZUO) ++test-more: $(ZUO_DEP) + + $(ZUO) $(workarea) test-more MAKE="$(MAKE)" + + .PHONY: coverage +-coverage: $(ZUO) ++coverage: $(ZUO_DEP) + + $(ZUO) $(workarea) coverage MAKE="$(MAKE)" + + .PHONY: bootfiles +-bootfiles: $(ZUO) ++bootfiles: $(ZUO_DEP) + + $(ZUO) $(workarea) bootfiles MAKE="$(MAKE)" + + .PHONY: reset +-reset: $(ZUO) ++reset: $(ZUO_DEP) + + $(ZUO) $(workarea) reset MAKE="$(MAKE)" + + # Supply XM=<machine> to build boot files for <machine> +@@ -57,86 +61,86 @@ boot: + + $(ZUO) $(workarea) boot "$(XM)" MAKE="$(MAKE)" + + # `<machine>.boot` as alias for `boot XM=<machine>` +-%.boot: $(ZUO) ++%.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) boot $* MAKE="$(MAKE)" + + .PHONY: auto.boot +-auto.boot: $(ZUO) ++auto.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) boot MAKE="$(MAKE)" + + SCHEME=scheme + + .PHONY: cross.boot +-cross.boot: $(ZUO) ++cross.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) boot SCHEME="$(SCHEME)" MAKE="$(MAKE)" + + .PHONY: re.boot +-re.boot: $(ZUO) ++re.boot: $(ZUO_DEP) + + $(ZUO) $(workarea) reboot SCHEME="$(SCHEME)" + + # Supply XM=<machine> to build boot files for <machine> + # with o=3 d=0 for the cross compiler, and only after + # building the kernel for the configured machine + .PHONY: bootquick +-bootquick: $(ZUO) ++bootquick: $(ZUO_DEP) + + $(ZUO) $(workarea) bootquick "$(XM)" MAKE="$(MAKE)" + + # `<machine>.bootquick` as alias for `boot XM=<machine>` +-%.bootquick: $(ZUO) ++%.bootquick: $(ZUO_DEP) + + $(ZUO) $(workarea) bootquick $* MAKE="$(MAKE)" + +-auto.bootquick: $(ZUO) ++auto.bootquick: $(ZUO_DEP) + + $(ZUO) $(workarea) bootquick MAKE="$(MAKE)" + + # Supply XM=<machine>-<tag>.bootpbchunk to repackage boot files for + # <machine> with pbchunk sources, including additional + # boot files + .PHONY: bootpbchunk +-bootpbchunk: $(ZUO) ++bootpbchunk: $(ZUO_DEP) + + $(ZUO) $(workarea) bootpbchunk "$(XM)" $(ARGS) MAKE="$(MAKE)" + + # `<machine>.bootpbchunk` as alias for `pbchunk XM=<machine>` +-%.bootpbchunk: $(ZUO) ++%.bootpbchunk: $(ZUO_DEP) + + $(ZUO) $(workarea) bootpbchunk $* $(ARGS) MAKE="$(MAKE)" + + .PHONY: docs +-docs: build $(ZUO) ++docs: build $(ZUO_DEP) + + $(ZUO) $(workarea) docs MAKE="$(MAKE)" + + .PHONY: csug +-csug: build $(ZUO) ++csug: build $(ZUO_DEP) + + $(ZUO) $(workarea) csug MAKE="$(MAKE)" + + .PHONY: release_notes +-release_notes: build $(ZUO) ++release_notes: build $(ZUO_DEP) + + $(ZUO) $(workarea) release_notes MAKE="$(MAKE)" + + .PHONY: install-docs +-install-docs: build $(ZUO) ++install-docs: build $(ZUO_DEP) + + $(ZUO) $(workarea) install-docs MAKE="$(MAKE)" + + .PHONY: install-csug +-install-csug: build $(ZUO) ++install-csug: build $(ZUO_DEP) + + $(ZUO) $(workarea) install-csug MAKE="$(MAKE)" + + .PHONY: install-release_notes +-install-release_notes: build $(ZUO) ++install-release_notes: build $(ZUO_DEP) + + $(ZUO) $(workarea) install-release_notes MAKE="$(MAKE)" + + .PHONY: bintar +-bintar: $(ZUO) ++bintar: $(ZUO_DEP) + + $(ZUO) $(workarea) bintar MAKE="$(MAKE)" + + .PHONY: rpm +-rpm: $(ZUO) ++rpm: $(ZUO_DEP) + + $(ZUO) $(workarea) rpm MAKE="$(MAKE)" + + .PHONY: pkg +-pkg: $(ZUO) ++pkg: $(ZUO_DEP) + + $(ZUO) $(workarea) pkg MAKE="$(MAKE)" + + .PHONY: clean +-clean: $(ZUO) ++clean: $(ZUO_DEP) + + $(ZUO) $(workarea) clean MAKE="$(MAKE)" + $(RM_ZUO) + +-- +2.41.0 + diff --git a/gnu/packages/patches/racket-chez-scheme-bin-sh.patch b/gnu/packages/patches/racket-chez-scheme-bin-sh.patch index 331b4f244b..e77c26f303 100644 --- a/gnu/packages/patches/racket-chez-scheme-bin-sh.patch +++ b/gnu/packages/patches/racket-chez-scheme-bin-sh.patch @@ -1,4 +1,4 @@ -From f86370295c5bb14d4bb93d0ccfa37a2b79f19f25 Mon Sep 17 00:00:00 2001 +From 5398e6d3305def343a009aba7c5f8915851c4115 Mon Sep 17 00:00:00 2001 From: Philip McGrath <philip@philipmcgrath.com> Date: Wed, 24 Aug 2022 19:55:14 -0400 Subject: [PATCH] Chez Scheme: patch s_process for "/bin/sh" on Guix @@ -14,17 +14,22 @@ then `s_process` will call `execl` with the file specified by `_PATH_BSHELL` instead of "/bin/sh". Checking that the path specified by `_PATH_BSHELL` exists safeguards -against obscure errors if attempting to use stand-alone executables -built by the patched Racket in non-Guix envoronments. +against obscure errors if attempting to use the patched Chez Scheme +or executables it builds in non-Guix envoronments. This patch does not change the behavior of `s_system`, which relies on `system` from the C library. --- + +Notes: + See also chez-scheme-bin-sh.patch, racket-rktio-bin-sh.patch, + and zuo-bin-sh.patch. + racket/src/ChezScheme/c/prim5.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/racket/src/ChezScheme/c/prim5.c b/racket/src/ChezScheme/c/prim5.c -index 82bbf8d687..be8f603447 100644 +index 90b087f125..284f063f8b 100644 --- a/racket/src/ChezScheme/c/prim5.c +++ b/racket/src/ChezScheme/c/prim5.c @@ -27,6 +27,12 @@ @@ -40,7 +45,7 @@ index 82bbf8d687..be8f603447 100644 /* locally defined functions */ static INT s_errno(void); static IBOOL s_addr_in_heap(uptr x); -@@ -861,6 +867,17 @@ static ptr s_process(char *s, IBOOL stderrp) { +@@ -875,6 +881,17 @@ static ptr s_process(char *s, IBOOL stderrp) { INT tofds[2], fromfds[2], errfds[2]; struct sigaction act, oint_act; @@ -58,7 +63,7 @@ index 82bbf8d687..be8f603447 100644 if (pipe(tofds)) S_error("process","cannot open pipes"); if (pipe(fromfds)) { -@@ -897,7 +914,9 @@ static ptr s_process(char *s, IBOOL stderrp) { +@@ -911,7 +928,9 @@ static ptr s_process(char *s, IBOOL stderrp) { } } #endif /* __GNU__ Hurd */ @@ -70,7 +75,7 @@ index 82bbf8d687..be8f603447 100644 /*NOTREACHED*/ } else { -base-commit: 87eee6e2adb8c6bc11e60619c706fa6295096085 +base-commit: 78fef00d4d16a79fdf6ab31924b3a80cadf4b368 -- -2.32.0 +2.41.0 diff --git a/gnu/packages/patches/racket-rktio-bin-sh.patch b/gnu/packages/patches/racket-rktio-bin-sh.patch index ec6f0d9c56..d777c0979a 100644 --- a/gnu/packages/patches/racket-rktio-bin-sh.patch +++ b/gnu/packages/patches/racket-rktio-bin-sh.patch @@ -1,4 +1,4 @@ -From 6a553f24439fe64fd3a2f0b5902f00590ca4241f Mon Sep 17 00:00:00 2001 +From 5e546a30789e5c9b3c94674b94cb63e16ee2e951 Mon Sep 17 00:00:00 2001 From: Philip McGrath <philip@philipmcgrath.com> Date: Thu, 4 Mar 2021 04:11:50 -0500 Subject: [PATCH] rktio: patch rktio_process for "/bin/sh" on Guix @@ -28,11 +28,16 @@ Checking that the path specified by `_PATH_BSHELL` exists safeguards against obscure errors if attempting to use stand-alone executables built by the patched Racket in non-Guix envoronments. --- + +Notes: + See also chez-scheme-bin-sh.patch, racket-chez-scheme-bin-sh.patch, + and zuo-bin-sh.patch. + racket/src/rktio/rktio_process.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/racket/src/rktio/rktio_process.c b/racket/src/rktio/rktio_process.c -index fafaf728c1..796ebc59ce 100644 +index 862850d93a..87daafef76 100644 --- a/racket/src/rktio/rktio_process.c +++ b/racket/src/rktio/rktio_process.c @@ -9,6 +9,7 @@ @@ -43,7 +48,7 @@ index fafaf728c1..796ebc59ce 100644 # ifdef USE_ULIMIT # include <ulimit.h> # endif -@@ -1301,12 +1302,14 @@ int rktio_process_allowed_flags(rktio_t *rktio) +@@ -1358,12 +1359,14 @@ int rktio_process_allowed_flags(rktio_t *rktio) /*========================================================================*/ rktio_process_result_t *rktio_process(rktio_t *rktio, @@ -59,7 +64,7 @@ index fafaf728c1..796ebc59ce 100644 rktio_process_result_t *result; intptr_t to_subprocess[2], from_subprocess[2], err_subprocess[2]; int pid; -@@ -1333,6 +1336,18 @@ rktio_process_result_t *rktio_process(rktio_t *rktio, +@@ -1390,6 +1393,18 @@ rktio_process_result_t *rktio_process(rktio_t *rktio, int i; #endif @@ -79,7 +84,7 @@ index fafaf728c1..796ebc59ce 100644 to_subprocess[0] = -1; to_subprocess[1] = -1; -base-commit: 9d228d16fb99c274c964e5bef93e97333888769f +base-commit: 78fef00d4d16a79fdf6ab31924b3a80cadf4b368 -- -2.32.0 +2.41.0 diff --git a/gnu/packages/patches/racket-zuo-bin-sh.patch b/gnu/packages/patches/zuo-bin-sh.patch index bcdcb8e963..92e3774424 100644 --- a/gnu/packages/patches/racket-zuo-bin-sh.patch +++ b/gnu/packages/patches/zuo-bin-sh.patch @@ -1,7 +1,7 @@ -From 73d9b77a11b4516905caf579abb559736f715ea6 Mon Sep 17 00:00:00 2001 +From cd6bed5d22ea9cb7bae2be134d5d04433fc8e313 Mon Sep 17 00:00:00 2001 From: Philip McGrath <philip@philipmcgrath.com> Date: Mon, 11 Apr 2022 20:43:18 -0400 -Subject: [PATCH] Zuo: patch zuo_process for "/bin/sh" on Guix +Subject: [PATCH] patch zuo_process for "/bin/sh" on Guix If: @@ -16,17 +16,22 @@ then `zuo_process` will execute the file specified by `_PATH_BSHELL` instead of "/bin/sh". Checking that the path specified by `_PATH_BSHELL` exists safeguards -against obscure errors if attempting to use stand-alone executables -built by the patched Racket in non-Guix envoronments. +against obscure errors if attempting to use the patched Zuo +or derived executables in non-Guix envoronments. --- - racket/src/zuo/zuo.c | 20 ++++++++++++++++++-- + +Notes: + See also chez-scheme-bin-sh.patch, racket-chez-scheme-bin-sh.patch, + racket-rktio-bin-sh.patch. + + zuo.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) -diff --git a/racket/src/zuo/zuo.c b/racket/src/zuo/zuo.c -index 17f161826d..c4fb3929bb 100644 ---- a/racket/src/zuo/zuo.c -+++ b/racket/src/zuo/zuo.c -@@ -15,6 +15,7 @@ +diff --git a/zuo.c b/zuo.c +index d4163eb..bfc5484 100644 +--- a/zuo.c ++++ b/zuo.c +@@ -16,6 +16,7 @@ #include <string.h> #include <ctype.h> #ifdef ZUO_UNIX @@ -34,7 +39,7 @@ index 17f161826d..c4fb3929bb 100644 # include <fcntl.h> # include <unistd.h> # include <errno.h> -@@ -5730,7 +5731,10 @@ static void zuo_pipe(zuo_raw_handle_t *_r, zuo_raw_handle_t *_w) +@@ -5949,7 +5950,10 @@ static void zuo_pipe(zuo_raw_handle_t *_r, zuo_raw_handle_t *_w) zuo_t *zuo_process(zuo_t *command_and_args) { const char *who = "process"; @@ -46,7 +51,7 @@ index 17f161826d..c4fb3929bb 100644 zuo_t *args = _zuo_cdr(command_and_args), *rev_args = z.o_null; zuo_t *options = z.o_empty_hash, *opt; zuo_t *dir, *l, *p_handle, *result; -@@ -5741,7 +5745,19 @@ zuo_t *zuo_process(zuo_t *command_and_args) +@@ -5960,7 +5964,19 @@ zuo_t *zuo_process(zuo_t *command_and_args) void *env; int as_child, exact_cmdline; @@ -68,7 +73,7 @@ index 17f161826d..c4fb3929bb 100644 zuo_t *a = _zuo_car(l); if (a == z.o_null) { -base-commit: 87eee6e2adb8c6bc11e60619c706fa6295096085 +base-commit: a0faa82c8383d206aa38d21462ca4ae699851a0b -- -2.32.0 +2.41.0 |