From patchwork Fri Mar 29 05:18:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 62348 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8197D27BBEA; Fri, 29 Mar 2024 05:20:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 86D1827BBE2 for ; Fri, 29 Mar 2024 05:20:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rq4ev-0003Jf-6w; Fri, 29 Mar 2024 01:20:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rq4en-0003IQ-Rz for guix-patches@gnu.org; Fri, 29 Mar 2024 01:20:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rq4en-00066N-HQ for guix-patches@gnu.org; Fri, 29 Mar 2024 01:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rq4eo-0004zI-99; Fri, 29 Mar 2024 01:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70065] [PATCH 1/6] gnu: zuo: Update to 1.9. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Fri, 29 Mar 2024 05:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70065 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70065@debbugs.gnu.org Cc: Philip McGrath X-Debbugs-Original-Xcc: Philip McGrath Received: via spool by 70065-submit@debbugs.gnu.org id=B70065.171168955419045 (code B ref 70065); Fri, 29 Mar 2024 05:20:02 +0000 Received: (at 70065) by debbugs.gnu.org; 29 Mar 2024 05:19:14 +0000 Received: from localhost ([127.0.0.1]:41475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rq4dz-0004ws-7t for submit@debbugs.gnu.org; Fri, 29 Mar 2024 01:19:13 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:56749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rq4dv-0004wS-DZ for 70065@debbugs.gnu.org; Fri, 29 Mar 2024 01:19:09 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 582F93200488 for <70065@debbugs.gnu.org>; Fri, 29 Mar 2024 01:19:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 29 Mar 2024 01:19:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1711689539; x=1711775939; bh=mr+5j6eHQoU8P/DNDo4dg 2o9zytkAnUvN1VhQ9t7qu8=; b=QhjlPDttJBj8EhDKMFOIdqo9UIgynBoAPLm6I Tlby2nqcIktQWgJhBQZ935tPGrxs4RFsvbK7ug5A8w8VDGrbuu1OlGBxXYCPwJjB D1+0DcScQcfsAp3lEZdpxv61KxiQscQkPFUkrEMKWIsAQKGpi/hHQUuHfrOHV3r5 FrJbmJJS0tDhoR3szKfivSIBAWANe9BIqSNchsVM05iSJWiVgIyzUk1lBsE2PX37 Jt500Me9zS+xJzaEYCGqAKyNk3YTFASrwBUQT26y+VmpexSRPTvQuahwfzTnPSm2 idBZs7sRapon43qks5xvHadmgLTK0BYotEQJyIq/JYj7Es8bA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711689539; x= 1711775939; bh=mr+5j6eHQoU8P/DNDo4dg2o9zytkAnUvN1VhQ9t7qu8=; b=i odlFSG8hNKx0m4Ik9hR7rDkROf0t+QDYjspdaRRsQpZ/xzfVOe0lJbHzO5WGdlX9 dCUXcvuuJc5WR+Zp/7852cfD8qbLBuNnBxvgV7YZEd1aCzXwQtWq25zXeFLl2u7E dJtqi2m8Zpv+HoobWgsKGFmuGwPaOeBj4tAyiYjypT0HRTWVGgpPbeVInHCZW1h/ ui1GuDXAHUm95lAw3/zYkBQw6N5qu82J7igCTKF0yPxvf8d4ACq6NjL3rzNt/FQd oOD7vEslYnDvxfdmb0ZjeMPnEw0RvyNyGOk8iLdTT7WAWFKCeg3QkfAstxj/uuN/ wnBzmQU/lXwHmgV/+rC4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvtddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdludegmdenucfjughrpefhvf fufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefrhhhilhhiphcuofgtifhr rghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomheqnecuggftrf grthhtvghrnhepgeeggeetgfejtedugeegteegleekvedtudevjeelhfeijeefhefhffel tdffffehnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhlihhpmhgt ghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <70065@debbugs.gnu.org>; Fri, 29 Mar 2024 01:18:59 -0400 (EDT) From: Philip McGrath Date: Fri, 29 Mar 2024 01:18:50 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Zuo now has tagged releases independent of the Racket release cycle. * gnu/packages/patches/racket-zuo-bin-sh.patch: Move to ... * gnu/packages/patches/zuo-bin-sh.patch: ... this file, and refresh it. * gnu/local.mk (dist_patch_DATA): Update accordingly. * gnu/packages/racket/scm (%racket-origin)[patches]: Likewise. * gnu/packages/patches/racket-chez-scheme-bin-sh.patch: Refresh patch. * gnu/packages/patches/racket-rktio-bin-sh.patch: Likewise. * gnu/packages/racket/scm (%zuo-version): Move to ... (zuo)[version]: ... this field, and update to 1.9. [source]: Change to the repository where Zuo releases are tagged. [arguments]: Stop supplying '#:phases'. Change-Id: Ia82c0f7a8e4696ae08e30965e3f4ec85673b86e5 --- gnu/local.mk | 4 +- .../patches/racket-chez-scheme-bin-sh.patch | 21 +++++--- .../patches/racket-rktio-bin-sh.patch | 17 +++--- ...cket-zuo-bin-sh.patch => zuo-bin-sh.patch} | 33 +++++++----- gnu/packages/racket.scm | 54 +++++++++---------- 5 files changed, 70 insertions(+), 59 deletions(-) rename gnu/packages/patches/{racket-zuo-bin-sh.patch => zuo-bin-sh.patch} (72%) diff --git a/gnu/local.mk b/gnu/local.mk index 5429dc498c..a025276390 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1984,7 +1984,6 @@ dist_patch_DATA = \ %D%/packages/patches/racket-chez-scheme-bin-sh.patch \ %D%/packages/patches/racket-backport-8.11-layered-docs.patch \ %D%/packages/patches/racket-rktio-bin-sh.patch \ - %D%/packages/patches/racket-zuo-bin-sh.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/restartd-update-robust.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ @@ -2225,7 +2224,8 @@ dist_patch_DATA = \ %D%/packages/patches/zig-do-not-link-against-librt.patch \ %D%/packages/patches/zig-use-baseline-cpu-by-default.patch \ %D%/packages/patches/zig-use-system-paths.patch \ - %D%/packages/patches/zsh-egrep-failing-test.patch + %D%/packages/patches/zsh-egrep-failing-test.patch \ + %D%/packages/patches/zuo-bin-sh.patch MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in 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 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 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 # 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 similarity index 72% rename from gnu/packages/patches/racket-zuo-bin-sh.patch rename to 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 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 #include #ifdef ZUO_UNIX @@ -34,7 +39,7 @@ index 17f161826d..c4fb3929bb 100644 # include # include # include -@@ -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 diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 5c863f1afd..6e19be1da3 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013-2016, 2018, 2020-2022 Ludovic Courtès ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Pierre Neidhardt -;;; Copyright © 2021, 2022, 2023 Philip McGrath +;;; Copyright © 2021-2024 Philip McGrath ;;; Copyright © 2021 jgart ;;; ;;; This file is part of GNU Guix. @@ -192,7 +192,6 @@ (define-module (gnu packages racket) ;; CODE: (define %racket-version "8.11.1") ; Remember to update chez-scheme-for-racket! -(define %zuo-version "1.7") ; defined in racket/src/zuo/zuo.c (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin @@ -206,8 +205,7 @@ (define %racket-origin (file-name (git-file-name "racket" %racket-version)) (patches (search-patches "racket-chez-scheme-bin-sh.patch" "racket-backport-8.11-layered-docs.patch" - "racket-rktio-bin-sh.patch" - "racket-zuo-bin-sh.patch")) + "racket-rktio-bin-sh.patch")) (modules '((guix build utils))) (snippet #~(begin @@ -229,30 +227,28 @@ (define %racket-origin (define-public zuo - (let ((revision #f)) - (package - (name "zuo") - (version (string-append %zuo-version - "-racket" - %racket-version - (if revision "-guix" "") - (or revision ""))) - (source %racket-origin) - (outputs '("out" "debug")) - (build-system gnu-build-system) - (arguments - (list - #:out-of-source? #t - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda args - (chdir "racket/src/zuo")))))) - (home-page "https://github.com/racket/zuo") - ;; ^ This is downstream of https://github.com/racket/racket, - ;; but it's designed to be a friendly landing place - (synopsis "Tiny Racket for build scripts") - (description "Zuo is a tiny Racket with primitives for dealing + (package + (name "zuo") + (version "1.9") ; defined in racket/src/zuo/zuo.c or the following + #;(displayln (~a (hash-ref (runtime-env) 'version) "." + (hash-ref (runtime-env) 'minor-version))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/zuo") + (commit (string-append "v" version)))) + (sha256 + (base32 "0zasir33nx1qi1ciz9dn6h8k39i443lr6apw5d1i6mjmhpzxmdhp")) + (file-name (git-file-name name version)) + (patches (search-patches "zuo-bin-sh.patch")))) + (outputs '("out" "debug")) + (build-system gnu-build-system) + (arguments + (list + #:out-of-source? #t)) + (home-page "https://github.com/racket/zuo") + (synopsis "Tiny Racket for build scripts") + (description "Zuo is a tiny Racket with primitives for dealing with files and running processes. It comes with a @command{make}-like embedded DSL, which is used to build Racket itself. @@ -261,7 +257,7 @@ (define-public zuo and expansion of the file content. That's how the @command{make}-like DSL is defined, and even the base Zuo language is defined by layers of @code{#lang}s. One of the early layers implements macros.") - (license (list license:asl2.0 license:expat))))) + (license (list license:asl2.0 license:expat)))) (define racket-vm-common-configure-flags