From patchwork Sat Aug 27 18:55:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41999 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 3687227BBEA; Sat, 27 Aug 2022 19:57:47 +0100 (BST) 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=unavailable 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 E7C7F27BBE9 for ; Sat, 27 Aug 2022 19:57:46 +0100 (BST) Received: from localhost ([::1]:44292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS106-00039n-1E for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:57:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS0zP-00035g-Bf for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS0zO-0001Vl-Vv for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS0zO-0008FF-SO for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 01/14] gnu: stex: Update to 1.2.2-2.afa6075. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162659631577 (code B ref 57050); Sat, 27 Aug 2022 18:57:02 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:56:36 +0000 Received: from localhost ([127.0.0.1]:57037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0yx-0008DE-LU for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:35 -0400 Received: from mail-ua1-f41.google.com ([209.85.222.41]:41698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0yo-0008Ca-Si for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:29 -0400 Received: by mail-ua1-f41.google.com with SMTP id cd25so1687115uab.8 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=T6gG0upqRvGYsYUd7HyRCudJf0QW/TkeNmZoflcoPII=; b=MLGw/O8RjYlYca4l0qTzludTOYxLj8YbN+AHJ2TBeZSkwrNZ5+wtA6ZA3t3ubQ4M7/ Hxk6QpB4bDJphmEdnNNXmZd5rUbBXAkVtP7/p8TJhQtpNTTPpAbCDwk4kN+p/3g62KSM A/J84ziFUMeWwmVaTlD1UIYI0V2G9il2mTGoLlBcjNsCF4V844wppYIUx1T1cQhhMNOw yleJnlEHHz8/KiWV4ECBy+/VyAv6u2BaxnLv0piQ/qbWgyXi710DxEb64+KVx46fAZv2 RBRHbH1eOIBx7+93TQ/u+aa2nPNocmbZ9sGs4OJMx8TRp5950HenRWcYMrmVoa8cwCi8 E6bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=T6gG0upqRvGYsYUd7HyRCudJf0QW/TkeNmZoflcoPII=; b=XYQzm06IXA9Y04C62PT3Pe14pBwXFAuSwkdGCk0HPBjY4PE9AjgWyrEzGp7FuwYNSU 6iCHGABjaPEDzkNnazpY0mwPMGUyENdQVzuyCgk2AQSADOZ5cJDI0HuFJ4qgQgGHhBuM iqUXC9jWOuUxClbH4MckdyCJcom4AnCCies3n68xSzpbjXzJs/L+pA19rQuxZwG8IWO7 HzCMxN7rn8V7wuqBi99Br0Uf20BZhV2W/vjEsPRtWqMl/U3LqDi86fgijZ/b2qboLJNQ Sg2B2Q9cK688qW+Oyt97y/jKm1zfYqTx5WLeVkJJy3npPUtjUGXxMI+lgyZRXYnYxIQA Z4jw== X-Gm-Message-State: ACgBeo03GEsprF//v3oBJghzwwvKshwt0+JaDkGYpX76pjBJEK+zii8r iNUQsS5BI18kMoyeO3jvwDF5Th6Wcs6mt/NE X-Google-Smtp-Source: AA6agR5ZXqKmBAzQC9nlQxPQL9tEyk4NHP+WWNVfQkGwdC1BTFr/kJ4ZLZPn6vnA72jg+eRgsrWSVw== X-Received: by 2002:a05:6130:1102:b0:38c:49b4:bbc3 with SMTP id ce2-20020a056130110200b0038c49b4bbc3mr1621441uab.107.1661626581306; Sat, 27 Aug 2022 11:56:21 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id i186-20020a1f6dc3000000b0038cef2eed8esm735145vkc.22.2022.08.27.11.56.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:21 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:41 -0400 Message-Id: <17a6fbf231448ebf8edeb69a0f2ee6a75934ac7a.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (stex-bootstrap): Update to 1.2.2-2.afa6075. --- gnu/packages/chez.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index b037efe8d4..043f2ae47a 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -594,8 +594,8 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (define-public stex-bootstrap ;; This commit includes a fix which we would otherwise want to use as ;; patch. Let's revert to tagged releases as soon as one becomes available. - (let ((commit "54051494434a197772bf6ca5b4e6cf6be55f39a5") - (revision "1")) + (let ((commit "afa607564a5662ffd748e824801277a6b5a3d11c") + (revision "2")) (hidden-package (package (name "stex") @@ -611,7 +611,7 @@ (define-public stex-bootstrap (url "https://github.com/dybvig/stex") (commit commit))) (sha256 - (base32 "01jnvw8qw33gnpzwrakwhsr05h6b609lm180jnspcrb7lds2p23d")) + (base32 "0n6dryv5j7cw2qmsj55wqb0ph901h83a2hl4j891ppxp0xx18nkp")) (file-name (git-file-name name version)) (snippet #~(for-each delete-file From patchwork Sat Aug 27 18:55:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41998 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 01C3627BBEB; Sat, 27 Aug 2022 19:57:42 +0100 (BST) 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=unavailable 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 272F527BBEA for ; Sat, 27 Aug 2022 19:57:41 +0100 (BST) Received: from localhost ([::1]:55142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS100-00037L-8D for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:57:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS0zP-00035k-LE for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS0zP-0001Vu-DP for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS0zP-0008FN-9o for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 02/14] gnu: stex: Fix read-only gifs and math directories. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162659631585 (code B ref 57050); Sat, 27 Aug 2022 18:57:03 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:56:36 +0000 Received: from localhost ([127.0.0.1]:57039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0yx-0008DG-VV for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:36 -0400 Received: from mail-vs1-f44.google.com ([209.85.217.44]:40777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0yt-0008Cm-Ez for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:32 -0400 Received: by mail-vs1-f44.google.com with SMTP id 190so4676417vsz.7 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Y3+vNJPpga1Q1V+rF5NtVFTZ7yIvUQWMYLczF9BwSFU=; b=MtW2/J+BRaZLz9j1LtVr4Ne+TKVSaARDmNvQfkvwBqpc8p54LQ0OlMZ/B53OJ1cdHN avcZbKIqU6B90Xks++NEuTtC6RtSLrejYi5WOSfFutcUQdHDTPaymLvJl5uhwigF2Npj 28oTj8IqEfyOHgCNrdzOLlMpcpTYhPtSfU6B4uwY9P6EJAiPte4mUyRk6Ykm5+jJJaLP lyK6krqq9osrIAKxt2wZII3Ml0vzHWaP68OVrw+3bYimUEnpwxi3lJoMRCOQkKQBK5kr uEPJOorLDlitv8bcwKLhG8u8k4dpGswF0FGDK0H7SdHinqfHWa9GoRfNWPi4sr7pky1g GLww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Y3+vNJPpga1Q1V+rF5NtVFTZ7yIvUQWMYLczF9BwSFU=; b=0p0YphIRO2Aq6gtEAaNoUPov3KAs5+JxSB7hZHpQoGh8yr/h67F7sOV6d3oFf56UQ2 G3hTwRpwczsnha0IGMoWYjOXj2OMup0xsWIBrmSX9l2PJ6Zc5NCehWJZqajIcVatfZgR 1mB8KCuY5+NArSHbwtQ8caNsZN8sGSDZ5Xm2YOvnwDYxjLvwOKWtNeM1j73d3dXLlhkw s7Hf8ozODvXTxmk/lccMRK7AsYSQIHBYT7IfaKLgku9fwZFz4i+7Um96NtHqpr2yVwjB EzuGVSuf36bcusNJuEYbJq7W9uiAdaYMDiJYRdFBTFVbLrlEpweKhTFMr7qJ/qN53J2d 8EPg== X-Gm-Message-State: ACgBeo1lY08WsDa0ypjuwvmK2/Cj61LUt49omUaBcirJ4ytyni5Ch0wu FfIPQ4slm3SGmvapN2/e5PI0JLfmVG7Gv0xl X-Google-Smtp-Source: AA6agR7m0qfBi7t8yncqjsa6Qpl5mk/UqtBukjHj1t2so2uBCYbnOVR8BSLUFRn1jWJRRxWQZmOvWA== X-Received: by 2002:a05:6102:5094:b0:388:c1dd:1f24 with SMTP id bl20-20020a056102509400b00388c1dd1f24mr1602942vsb.44.1661626586032; Sat, 27 Aug 2022 11:56:26 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id a125-20020a671a83000000b003903bddc3e4sm601863vsa.9.2022.08.27.11.56.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:25 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:42 -0400 Message-Id: <9c0d1272c936807806d05b5dfdd33403f9e7f336.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches Excplicitly set the user write bit when initializing the gifs or math directories from the skeletons installed in the store. See also upstream discussion at . This problem would be exposed by the upcoming changes to Racket's build system. * gnu/packages/patches/stex-copy-from-immutable-store.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/chez.scm (stex-bootstrap)[patches]: Use it. --- gnu/local.mk | 1 + gnu/packages/chez.scm | 3 ++ .../stex-copy-from-immutable-store.patch | 41 +++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 gnu/packages/patches/stex-copy-from-immutable-store.patch diff --git a/gnu/local.mk b/gnu/local.mk index 26dfb6afe2..558fed8a0d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1821,6 +1821,7 @@ dist_patch_DATA = \ %D%/packages/patches/slim-reset.patch \ %D%/packages/patches/slim-login.patch \ %D%/packages/patches/slim-display.patch \ + %D%/packages/patches/stex-copy-from-immutable-store.patch \ %D%/packages/patches/syslinux-gcc10.patch \ %D%/packages/patches/syslinux-strip-gnu-property.patch \ %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 043f2ae47a..812d41fc5b 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -613,6 +613,9 @@ (define-public stex-bootstrap (sha256 (base32 "0n6dryv5j7cw2qmsj55wqb0ph901h83a2hl4j891ppxp0xx18nkp")) (file-name (git-file-name name version)) + (patches + ;; submitted upstream in https://github.com/dybvig/stex/pull/6 + (search-patches "stex-copy-from-immutable-store.patch")) (snippet #~(for-each delete-file '("sbin/install" "doc/stex.pdf" "doc/stex.html"))))) diff --git a/gnu/packages/patches/stex-copy-from-immutable-store.patch b/gnu/packages/patches/stex-copy-from-immutable-store.patch new file mode 100644 index 0000000000..4562e431c1 --- /dev/null +++ b/gnu/packages/patches/stex-copy-from-immutable-store.patch @@ -0,0 +1,41 @@ +From 9434b4a36646c036db8de326158056aa3293fb82 Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Thu, 28 Apr 2022 22:56:20 -0400 +Subject: [PATCH] fix read-only gifs and math directories + +An installed copy of stex might have all write permission bits removed, +even for the owner of the installed files: this is the case with Guix +package of stex, for example. If such an installation is used to +initialize the gifs or math directories (e.g. for an out-of-source +build), tar likewise creates them without write permissions, preventing +subdirectories from being created later. Set the user write bit +explicitly to avoid this problem. + Mf-stex + +Related to https://github.com/racket/racket/pull/4203 +--- + +Submitted upstream in https://github.com/dybvig/stex/pull/6 + + Mf-stex | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Mf-stex b/Mf-stex +index 09ec6f3..11fb214 100644 +--- a/Mf-stex ++++ b/Mf-stex +@@ -112,9 +112,11 @@ $(x).mathrun: gifs $(mathfiles) + + gifs: + (cd $(STEXLIB); tar -cf - gifs) | tar -xpf - ++ chmod u+w gifs + + math: + (cd $(STEXLIB); tar -cf - math) | tar -xpf - ++ chmod u+w math + + $(mathfiles): $(x).hthirdrun $(figps) + echo -n gifs= > $(mathfiles) +-- +2.32.0 + From patchwork Sat Aug 27 18:55:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42004 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 7CA9D27BBEC; Sat, 27 Aug 2022 19:58:35 +0100 (BST) 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=unavailable 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 ACD4727BBE9 for ; Sat, 27 Aug 2022 19:58:31 +0100 (BST) Received: from localhost ([::1]:41790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS10o-0004W3-SB for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS0zQ-00035l-0k for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS0zP-0001Vz-P7 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS0zP-0008FV-Lf for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 03/14] etc: teams: Add racket team. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162661331635 (code B ref 57050); Sat, 27 Aug 2022 18:57:03 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:56:53 +0000 Received: from localhost ([127.0.0.1]:57045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zE-0008EA-JH for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:52 -0400 Received: from mail-ua1-f48.google.com ([209.85.222.48]:37689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0yy-0008D2-0w for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:37 -0400 Received: by mail-ua1-f48.google.com with SMTP id e3so1682942uax.4 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=nX8b0wPN+u0l/GepPJg+/mKbwBeLMJ6Tlrf8OY2HN1w=; b=X34ncOut+xO+Ak1lEH7SpWZHte9YA7DPeX4u50OV6R8vCHtAL7+qLPtqiU684vfrFm 0QikYxnqK3hO3u7gHeK71CzzTBQsRM/rjCORiPxtLY9fQE+N6HaoG/NiZun4U0D+e3/m kL+rSipYtX/YwkAAQg0vhcjuJf0NSk0QVl1i+vJ6scufsKwyXiSiZCnamF44P5YHZzk/ 9ab6Z2Hh41sysq323Q5tJ1sikRanZWOyU1/BnwjsDylORcnn5mOOZQr1docJHdLWi9bP KpE/OydUN3+ylpiZfxbBTAHcfUYOtpPHtcRv7jsSx1NlljgrO2ha1DY91CuzE99vR7pl r2eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=nX8b0wPN+u0l/GepPJg+/mKbwBeLMJ6Tlrf8OY2HN1w=; b=n0zuyU9LHl1vanaWxOdd2/2/5ywsHCZJHJfYp1cKZtVwNKBC31T7D62BIaVN+AhLNa frJXP4F72IgRs6w/S4eaRiNeqwayrJi61DVzKQIk5V1KojT6LEGUVZsxboxrUZv3I1GF 2GtNjGhi0vJreSJ9IzQeBzVBH8tsDLTYnxf6GnVPx+3AaRxq+ZhfzyXaGBPTEaOYD2AL ZwqDT3Spm/zyqmmipw6PaQfPVy+ByfPezjQNP7LAPRlnBV3tI6vpfznVLbOdzN2OpvMn sGpiElFEf4/NJ76wwZwUxQFi7JWrfPS+/CxwsQsS8brdMf3XZHIV5bezeUDFZFbR8psd 1RUQ== X-Gm-Message-State: ACgBeo1932eteo5mGvT09gq0mK1ylwJtS2mJ7M2tKU6L10kag6Q2MeFb ur/fw3Hcg63zkf4QwIPCaNvorzbF3oTGuW/E X-Google-Smtp-Source: AA6agR5F0RJedhaJomIkhnuDHwuMJcwycq4Nu0fQzo0GSazp6fDx9Mfw478RzWDvetBNbzMyEyvlSQ== X-Received: by 2002:ab0:2684:0:b0:38d:25e:9444 with SMTP id t4-20020ab02684000000b0038d025e9444mr1443888uao.92.1661626590514; Sat, 27 Aug 2022 11:56:30 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id d190-20020a1fe6c7000000b003854855392bsm731450vkh.30.2022.08.27.11.56.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:30 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:43 -0400 Message-Id: <55e51008769c8622525f4a935ccc5d75885b5245.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches * etc/teams.scm.in (racket): New team. --- etc/teams.scm.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/teams.scm.in b/etc/teams.scm.in index c99d794697..e2eb5048f6 100644 --- a/etc/teams.scm.in +++ b/etc/teams.scm.in @@ -185,6 +185,14 @@ (define-team mozilla "Taking care about Icecat and Icedove, built from Mozilla Firefox and Thunderbird.")) +(define-team racket + (team 'racket + #:name "Racket team" + #:description + "The Racket language and Racket-based languages, Racket packages, +Racket's variant of Chez Scheme, and development of a Racket build system and +importer.")) + (define-member (person "Thiago Jung Bauermann" "bauermann@kolabnow.com") From patchwork Sat Aug 27 18:55:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42002 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 7D26527BBEA; Sat, 27 Aug 2022 19:58:03 +0100 (BST) 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=unavailable 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 0C94F27BBEB for ; Sat, 27 Aug 2022 19:57:59 +0100 (BST) Received: from localhost ([::1]:55598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS10I-0003tG-7t for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:57:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS0zQ-00035s-TA for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS0zQ-0001W9-KF for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS0zQ-0008Fk-G4 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 04/14] etc: teams: Add entry for Philip McGrath. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:57:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162661431651 (code B ref 57050); Sat, 27 Aug 2022 18:57:04 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:56:54 +0000 Received: from localhost ([127.0.0.1]:57050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zF-0008EK-M1 for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:54 -0400 Received: from mail-vs1-f43.google.com ([209.85.217.43]:46994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0z2-0008DC-7r for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:46 -0400 Received: by mail-vs1-f43.google.com with SMTP id d126so4664958vsd.13 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=4F621n76sskPxin487rlQnOvILrXbSQuRKsoo6z/anA=; b=ccv6r2RpRLgQUUu4KFugiAwWFEm58N/Yt1qPRVBBQjBc/cS+l8JhUyhdH5itAoxDZ4 lKicnbVNktNFdA+rdmR7Yaa6oyOIsj+xzhiUYgDkg05ULq7C14N9aHIayivA0xEQ1I/c Hw2FyZ2s6Xzi7SXil+98C1TO2mX/1GbgLM+q2PW8StKPtacueRSA6ZAENszacnmCgaUY DQ9yzqf5YscaKRZLTu5T1dWEimcdzEVn9M+HimntDri3/dk9mgEUTq9iiyv3k7ndQS8Q qRv77yPiQzimYwqxvoyYEUPT1RhgH02XNki4hg19kUwLvOUWzUne1sQW48pqeNfbnRvU oI/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=4F621n76sskPxin487rlQnOvILrXbSQuRKsoo6z/anA=; b=RmcT67vciMFXfs6mH8IP824Ae1BYmc6VOWvHSJMguitXWszUut4PuolLyf6VVPHFQp 4umBisv1xgnkcyHH9Fmme9MQWk9isJUaUFp4+0hSH/gOI7su+VnmfxbJ2jodH56Ro4ZB 7qMRz6fQE5K3ZArC+/AJokBd4iyMR+hr1X0DMMnmUjX0rK3aWXkB9wji52qXQP/cUoGl V4xVH5BUTttSCqDaKddfCM9uRMTEtqzpKWprZlEOZzZAA577apiR3gQsehSYwyBzR0e3 9+XGgN0MoUfDCiRv24Dv5i0EqtCm1vtiOqF8RJsoH+aYKCnK0+SMprFcUAIr3c5rGWxE KWjg== X-Gm-Message-State: ACgBeo1VtktLcp//TDupZtAzsdLhrlryl8wNNNRsqbNauC58wcHPae7O /lBXV0OFmSeuOq/Vo4rwaR3SRnxxlTH3NdsN X-Google-Smtp-Source: AA6agR6ycXIKh3Mcph0Wgl7VvOO9QlG0LlBpvOxjQVehEJ7NHo9uJ9WC7bEQEnqgnUn9n/XpfJSjig== X-Received: by 2002:a05:6102:e07:b0:388:43ae:cb33 with SMTP id o7-20020a0561020e0700b0038843aecb33mr1487506vst.38.1661626594734; Sat, 27 Aug 2022 11:56:34 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id s15-20020a1f900f000000b0038cecab7424sm722009vkd.56.2022.08.27.11.56.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:34 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:44 -0400 Message-Id: X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches * etc/teams.scm.in ("Philip McGrath"): New member. --- etc/teams.scm.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/teams.scm.in b/etc/teams.scm.in index e2eb5048f6..38b7ab8e1d 100644 --- a/etc/teams.scm.in +++ b/etc/teams.scm.in @@ -238,6 +238,10 @@ (define-member (person "Julien Lepiller" "julien@lepiller.eu") java ocaml translations) +(define-member (person "Philip McGrath" + "philip@philipmcgrath.com") + racket) + (define-member (person "Mathieu Othacehe" "othacehe@gnu.org") core installer mentors) From patchwork Sat Aug 27 18:55:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42001 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 4FB6327BBEC; Sat, 27 Aug 2022 19:57:59 +0100 (BST) 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=unavailable 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 6BD5827BBE9 for ; Sat, 27 Aug 2022 19:57:58 +0100 (BST) Received: from localhost ([::1]:39796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS10H-0003qF-K8 for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:57:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS0zQ-00035q-ED for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS0zQ-0001W4-60 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS0zQ-0008Fc-2W for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 05/14] gnu: racket: Adjust patch for "/bin/sh" in rktio. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:57:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162661331643 (code B ref 57050); Sat, 27 Aug 2022 18:57:04 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:56:53 +0000 Received: from localhost ([127.0.0.1]:57047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zE-0008EC-Ur for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:53 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:41734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0z6-0008Df-PH for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:45 -0400 Received: by mail-vs1-f41.google.com with SMTP id k2so4666157vsk.8 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=zh/Tp+3ORrasgKkcLxEkrCSbNxjvWOrzb6PDcb/hl00=; b=TFOuidhqSEjQkF/FuFihcDBSio1v1ujz+CokH8johPugipJVY91O2NgzSwZDeOJbQ5 QYQpTCH1Sxlout2JZ4jmWEX3xwE0/gRSl3hK+6p6IRlP1QKGnjZzNV/TO38fp9/pqs7A AO9rdnutgocZXC/J4c54HnrGourMN2fR0lGVuOXBrj6LUfIJY+4maPssOvewVNJiU4z4 yrse4/wNP2RUOtpfFKKuiyJ18W1kldWT01wf8/VRL+r50VYO0QMPnJTDzt3yjUtfR+cH 8+A/B7mF1dxJgrQD1ydTSpcgGskuyYlkn76FYrj9Wk8b5hhVD9DtsH4ZKmYFd6XfF7dj PVeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=zh/Tp+3ORrasgKkcLxEkrCSbNxjvWOrzb6PDcb/hl00=; b=ACROYwtongjrEYR5PXvRSfprgtpnQIhD5ssfs4m6xq6kjJjNS9OxP8OCRjbWl8lEyC Z5pkyo5PFTF5RDOc1BJ9bg9zE5BD7ErUTowPp75pPosjSyUzIbZAE37Ql55WmpAMqeFO pUz9CCoyuO15v9ZGfDZqQwZOS1A6JqgrSG9xUjTJpyn3k62UOabFbiR+VPHemAC6gfTq D7+7V5vdakHQeSI9tGyKGj/FC63Y5eYcrrLd5tHaas6Ys3xs/4vTUrdTH4aUPTepsZ1e 72Ff0gv/NCs4s9sXyGD3gDypsB0o/3vmxKOULG47SbSymLxMym+AdtASAujitqk5sW7r 0nRg== X-Gm-Message-State: ACgBeo0Om5s9cW8pHsknb/Htj/B1EH8Y0yzzHuo5TfFDEQM1mT1CPF07 qPQNQFtmFTbHEk3ib4ssrJjFtopXsPJz0+S/ X-Google-Smtp-Source: AA6agR5dnQjJ4lY+9tKUW7VpZbC4YEuNOr47EaQsc3c5vJB3+2OrOL0fJg3uqSygXlCrx+q0L9m+1g== X-Received: by 2002:a67:1ac6:0:b0:38c:95f2:c141 with SMTP id a189-20020a671ac6000000b0038c95f2c141mr1514463vsa.77.1661626599064; Sat, 27 Aug 2022 11:56:39 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id x2-20020a67fc82000000b00385d88375f4sm700321vsp.32.2022.08.27.11.56.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:38 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:45 -0400 Message-Id: <05bbd3ccda12d47c22c6df15b505ba76e7facebd.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches Use '_PATH_BSHELL' instead of a custom preprocessor macro. This may not be The Right Thing in the long term, but it at least avoids a proliferation of 'CPPFLAGS'. * gnu/packages/patches/racket-minimal-sh-via-rktio.patch: Rename to ... * gnu/packages/patches/racket-rktio-bin-sh.patch: ... this, and change to use '_PATH_BSHELL'. * gnu/local.mk (dist_patch_DATA): Update accordingly. * gnu/packages/racket.scm (%racket-origin)[patches]: Likewise. (racket-vm-common-configure-flags): Stop setting 'CPPFLAGS'. Change to a constant instead of a function, since we no longer need the delay. (racket-vm-cgc, racket-vm-bc, racket-vm-cs)[arguments]<#:configure-flags>: Update accordingly. [inputs]: Remove 'bash-minimal'. --- gnu/local.mk | 2 +- ...-rktio.patch => racket-rktio-bin-sh.patch} | 60 +++++++++---------- gnu/packages/racket.scm | 15 ++--- 3 files changed, 35 insertions(+), 42 deletions(-) rename gnu/packages/patches/{racket-minimal-sh-via-rktio.patch => racket-rktio-bin-sh.patch} (54%) diff --git a/gnu/local.mk b/gnu/local.mk index 558fed8a0d..fae32a11e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1768,7 +1768,7 @@ 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-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/patches/racket-minimal-sh-via-rktio.patch b/gnu/packages/patches/racket-rktio-bin-sh.patch similarity index 54% rename from gnu/packages/patches/racket-minimal-sh-via-rktio.patch rename to gnu/packages/patches/racket-rktio-bin-sh.patch index 6bc2ee8331..ec6f0d9c56 100644 --- a/gnu/packages/patches/racket-minimal-sh-via-rktio.patch +++ b/gnu/packages/patches/racket-rktio-bin-sh.patch @@ -1,7 +1,7 @@ -From 3574b567c486d264d680a37586436c3b5a8cb978 Mon Sep 17 00:00:00 2001 +From 6a553f24439fe64fd3a2f0b5902f00590ca4241f Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Thu, 4 Mar 2021 04:11:50 -0500 -Subject: [PATCH] patch rktio_process for "/bin/sh" on Guix +Subject: [PATCH] rktio: patch rktio_process for "/bin/sh" on Guix Racket provides the functions `system` and `process`, which execute shell commands using `sh` (or `cmd` on Windows). @@ -12,37 +12,38 @@ This patch adds a special case for "/bin/sh" to `rktio_process`, the C function that implements the core of `system`, `process`, and related Racket functions. -Guix should enable the special case by defining the C preprocessor -macro `GUIX_RKTIO_PATCH_BIN_SH` with the path to `sh` in the store. If: - 1. The `GUIX_RKTIO_PATCH_BIN_SH` macro is defined; and + 1. The nonstandard but ubiquitous macro `_PATH_BSHELL` from + is defined; and 2. `rktio_process` is called with the exact path "/bin/sh"; and - 3. The path specified by `GUIX_RKTIO_PATCH_BIN_SH` does exists; + 3. The file specified by `_PATH_BSHELL` exists; -then `rktio_process` will execute the file specified -by `GUIX_RKTIO_PATCH_BIN_SH` instead of "/bin/sh". +then `rktio_process` will execute the file specified by `_PATH_BSHELL` +instead of "/bin/sh". -Compared to previous attempts to patch the Racket sources, -making this change at the C level is both: - - - More comprehensive: it catches all attempts to execute "/bin/sh", - without having to track down the source of every occurance; and - - - Less intrusive: by guarding the special case with a C preprocessor - conditional and a runtime check that the file in the store exists, - we make it much less likely that it will "leak" out of Guix. +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. --- - racket/src/rktio/rktio_process.c | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) + 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 89202436c0..465ebdd5c5 100644 +index fafaf728c1..796ebc59ce 100644 --- a/racket/src/rktio/rktio_process.c +++ b/racket/src/rktio/rktio_process.c -@@ -1224,12 +1224,14 @@ int rktio_process_allowed_flags(rktio_t *rktio) +@@ -9,6 +9,7 @@ + # include + # include + # include ++# include /* PATCHED for Guix */ + # ifdef USE_ULIMIT + # include + # endif +@@ -1301,12 +1302,14 @@ int rktio_process_allowed_flags(rktio_t *rktio) /*========================================================================*/ rktio_process_result_t *rktio_process(rktio_t *rktio, @@ -58,22 +59,17 @@ index 89202436c0..465ebdd5c5 100644 rktio_process_result_t *result; intptr_t to_subprocess[2], from_subprocess[2], err_subprocess[2]; int pid; -@@ -1255,6 +1257,23 @@ rktio_process_result_t *rktio_process(rktio_t *rktio, +@@ -1333,6 +1336,18 @@ rktio_process_result_t *rktio_process(rktio_t *rktio, int i; #endif +/* BEGIN PATCH for Guix */ -+#if defined(GUIX_RKTIO_PATCH_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: */ ++#if defined(_PATH_BSHELL) + command = + ((0 == strcmp(_guix_orig_command, "/bin/sh")) -+ && rktio_file_exists(rktio, GUIX_AS_a_STR(GUIX_RKTIO_PATCH_BIN_SH))) -+ ? GUIX_AS_a_STR(GUIX_RKTIO_PATCH_BIN_SH) ++ && rktio_file_exists(rktio, _PATH_BSHELL)) ++ ? _PATH_BSHELL + : _guix_orig_command; -+# undef GUIX_AS_a_STR -+# undef GUIX_AS_a_STR_HELPER +#else + command = _guix_orig_command; +#endif @@ -82,6 +78,8 @@ index 89202436c0..465ebdd5c5 100644 /* avoid compiler warnings: */ to_subprocess[0] = -1; to_subprocess[1] = -1; + +base-commit: 9d228d16fb99c274c964e5bef93e97333888769f -- -2.21.1 (Apple Git-122.3) +2.32.0 diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 3399bcc3fe..319f63f9d2 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -36,7 +36,6 @@ (define-module (gnu packages racket) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module (gnu packages autotools) - #:use-module (gnu packages bash) #:use-module (gnu packages chez) #:use-module (gnu packages compression) #:use-module (gnu packages databases) @@ -212,7 +211,7 @@ (define %racket-origin (sha256 (base32 "0f9zyhdvbh4xsndrqjzl85j5ziz0rmqi676g9s1lw3h3skq2636h")) (file-name (git-file-name "racket" %racket-version)) - (patches (search-patches "racket-minimal-sh-via-rktio.patch")) + (patches (search-patches "racket-rktio-bin-sh.patch")) (modules '((guix build utils))) (snippet #~(begin @@ -232,8 +231,7 @@ (define %racket-origin ;; Unbundle libffi. (delete-file-recursively "racket/src/bc/foreign/libffi"))))) -(define (racket-vm-common-configure-flags) - ;; under a lambda abstraction to avoid evaluating bash-minimal too early. +(define racket-vm-common-configure-flags #~`(,@(cond ((false-if-exception (search-input-file %build-inputs "/bin/libtool")) @@ -248,8 +246,6 @@ (define (racket-vm-common-configure-flags) (list (string-append "--enable-racket=" racket)))) (else '())) - ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" - #$(file-append bash-minimal "/bin/sh")) "--disable-strip" ;; Using --enable-origtree lets us distinguish the VM from subsequent ;; layers and produces a build with the shape expected by tools such as @@ -267,7 +263,6 @@ (define-public racket-vm-cgc (version %racket-version) (source %racket-origin) (inputs (list ncurses ;; <- common to all variants (for #%terminal) - bash-minimal ;; <- common to all variants (for `system`) libffi)) ;; <- only for BC variants (native-inputs (list libtool)) ;; <- only for BC variants (outputs '("out" "debug")) @@ -276,7 +271,7 @@ (define-public racket-vm-cgc (list #:configure-flags #~(cons "--enable-cgcdefault" - #$(racket-vm-common-configure-flags)) + #$racket-vm-common-configure-flags) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main ;; distribution. @@ -359,7 +354,7 @@ (define-public racket-vm-bc (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" - #$(racket-vm-common-configure-flags))))) + #$racket-vm-common-configure-flags)))) (synopsis "Racket BC [3M] implementation") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written @@ -405,7 +400,7 @@ (define-public racket-vm-cs #$(this-package-native-input "chez-scheme-for-racket") "/bin/scheme") - #$(racket-vm-common-configure-flags))))) + #$racket-vm-common-configure-flags)))) (synopsis "Racket CS implementation") (description "The Racket CS implementation, which uses ``Chez Scheme'' as its core compiler and runtime system, has been the default Racket VM From patchwork Sat Aug 27 18:55:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42000 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 AF16F27BBEA; Sat, 27 Aug 2022 19:57:49 +0100 (BST) 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=unavailable 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 D088F27BBE9 for ; Sat, 27 Aug 2022 19:57:48 +0100 (BST) Received: from localhost ([::1]:44294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS108-00039o-1P for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:57:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS0zR-00036i-9V for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS0zQ-0001WE-WD for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS0zQ-0008Fr-SD for guix-patches@gnu.org; Sat, 27 Aug 2022 14:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 06/14] gnu: chez-scheme: Fix use of "/bin/sh". Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:57:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162661531660 (code B ref 57050); Sat, 27 Aug 2022 18:57:04 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:56:55 +0000 Received: from localhost ([127.0.0.1]:57053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zG-0008ES-7s for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:55 -0400 Received: from mail-vs1-f51.google.com ([209.85.217.51]:46077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zB-0008Dk-6B for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:49 -0400 Received: by mail-vs1-f51.google.com with SMTP id m66so4660213vsm.12 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=fyJnmMnKmtISB2rntIQ/ske5rbxAqlvQx/iOqGlMAvs=; b=dJI6fk9RqryTNn5lfjE7pTEzYy1ORH46eDs3uobnoT9FKy/+J+1l0mzVcPGnWEFyuG 4jfSnMkgFltJonyWEqRZ1nMa1Q4VWXPv53tunKfdUTIqWWQepFTX9vdkyVvVTzsPuacZ 6aem9rrsWQ/qg+Ee5pzNqFRCYzVr0FWHJEtJMeOAlzxiuUQsZMCcFkXrnhmPAO2oRl3x H7ufkgGPLz097qlPlYCONKbsfModFMZKaxfqbus9UBkjJYVMTaAT8yAOJV/BffAc6CT7 PSBRXWPCiCoFE843eE+na4ZCRFKNdaBx+4prWtTHPUPukwXYK5M4qMHZ8/dUBoPPnzte Y37Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=fyJnmMnKmtISB2rntIQ/ske5rbxAqlvQx/iOqGlMAvs=; b=hob1DT67U4h2jDfdnraJUI2RnWBtNjG2Tfy7XudyhUbnAL7OGXV+PcYc13rCU3Fgbt bzgrvs8H7/sGozyq8TiMCYOAbQTo5/lz8Pv5L0NAagDmjtith02x6yAcwmsyDUmP27Tb ut7y+ed+eFexRdqyEj2ff2D6Z1YT/aWBIZZQix8jP23EYPi9155MWuKssMHKtFXRKzRu d7pimTxb9DgHvOvt3knF2ghxds+vuP2UzXCET/JVagb3cX/VD+HwcfbVcrk1tmSTmeoI x2psAHaNpTaMtVWQ+q8oOjA4pucnnYRk1WEY/FR24AoE79c++v6d3pbtlencQ9i6lzLv Xsjg== X-Gm-Message-State: ACgBeo3PpxiiBG3aAfiSl5pOI0SgN0mYERYNybjbsgjUfZXHhQVmN/ii McfzNWuf6lmQ7BMWaNeJGnGmDpbIxlqD91g7 X-Google-Smtp-Source: AA6agR4Ax9N52lK3ntJS2LzK8OHCrGNJAuBIkVt/0opJhvWTK3gbO99o/3SA5o/AdaOlr1aVFRK3vQ== X-Received: by 2002:a67:e1cc:0:b0:390:8df1:e013 with SMTP id p12-20020a67e1cc000000b003908df1e013mr1478574vsl.19.1661626603495; Sat, 27 Aug 2022 11:56:43 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id k143-20020a1fa195000000b0038030db4c79sm861725vke.54.2022.08.27.11.56.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:43 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:46 -0400 Message-Id: X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches 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/local.mk (dist_patch_DATA): Add them. * gnu/packages/racket.scm (%racket-origin)[patches]: Update accordingly. * gnu/packages/chez.scm (chez-scheme)[origin]: Likewise. --- gnu/local.mk | 2 + gnu/packages/chez.scm | 1 + gnu/packages/patches/chez-scheme-bin-sh.patch | 76 +++++++++++++++++++ .../patches/racket-chez-scheme-bin-sh.patch | 76 +++++++++++++++++++ gnu/packages/racket.scm | 3 +- 5 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/chez-scheme-bin-sh.patch create mode 100644 gnu/packages/patches/racket-chez-scheme-bin-sh.patch diff --git a/gnu/local.mk b/gnu/local.mk index fae32a11e5..babd54c8c6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -941,6 +941,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 \ @@ -1768,6 +1769,7 @@ 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-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 \ diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 812d41fc5b..c627c4d842 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -269,6 +269,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 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..7650914f01 --- /dev/null +++ b/gnu/packages/patches/chez-scheme-bin-sh.patch @@ -0,0 +1,76 @@ +From 3c838e6a0c3214d95bf02048cddccfd1b69a679f Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Thu, 19 May 2022 13:41:56 -0400 +Subject: [PATCH] patch s_process for "/bin/sh" on Guix + +If: + + 1. The nonstandard but ubiquitous macro `_PATH_BSHELL` from + is defined; and + + 2. The path specified by `_PATH_BSHELL` exists; + +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. + +This patch does not change the behavior of `s_system`, which relies +on `system` from the C library. +--- + 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 +--- a/c/prim5.c ++++ b/c/prim5.c +@@ -23,6 +23,12 @@ + #include + #include + ++/* BEGIN PATCH for Guix */ ++#ifndef WIN32 ++# include ++#endif ++/* END PATCH for Guix */ ++ + /* 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) { + + INT tofds[2], fromfds[2], errfds[2]; + struct sigaction act, oint_act; ++ /* BEGIN PATCH for Guix */ ++#if defined(_PATH_BSHELL) ++ struct stat guix_stat_buf; ++ char *guix_sh = ++ (0 == stat(_PATH_BSHELL, &guix_stat_buf)) ++ ? _PATH_BSHELL ++ : "/bin/sh"; ++#else /* _PATH_BSHELL */ ++ char *guix_sh = "/bin/sh"; ++#endif ++ /* END PATCH for Guix */ + + 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);} +- execl("/bin/sh", "/bin/sh", "-c", s, NULL); ++ /* BEGIN PATCH for Guix */ ++ execl(guix_sh, guix_sh, "-c", s, NULL); ++ /* END PATCH for Guix */ + _exit(1) /* only if execl fails */; + /*NOTREACHED*/ + } else { + +base-commit: 9df56e7b25bc523663eac3da24be33afc5f76c84 +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-chez-scheme-bin-sh.patch b/gnu/packages/patches/racket-chez-scheme-bin-sh.patch new file mode 100644 index 0000000000..65cf2f99f3 --- /dev/null +++ b/gnu/packages/patches/racket-chez-scheme-bin-sh.patch @@ -0,0 +1,76 @@ +From e982b6687494bf071386c67be74e57a29cf4ce00 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 + +If: + + 1. The nonstandard but ubiquitous macro `_PATH_BSHELL` from + is defined; and + + 2. The path specified by `_PATH_BSHELL` exists; + +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. + +This patch does not change the behavior of `s_system`, which relies +on `system` from the C library. +--- + 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 f5e3e345be..922421ca75 100644 +--- a/racket/src/ChezScheme/c/prim5.c ++++ b/racket/src/ChezScheme/c/prim5.c +@@ -22,6 +22,12 @@ + #include + #include + ++/* BEGIN PATCH for Guix */ ++#ifndef WIN32 ++# include ++#endif ++/* END PATCH for Guix */ ++ + /* locally defined functions */ + static INT s_errno PROTO((void)); + static IBOOL s_addr_in_heap PROTO((uptr x)); +@@ -856,6 +862,17 @@ static ptr s_process(s, stderrp) char *s; IBOOL stderrp; { + + INT tofds[2], fromfds[2], errfds[2]; + struct sigaction act, oint_act; ++ /* BEGIN PATCH for Guix */ ++#if defined(_PATH_BSHELL) ++ struct stat guix_stat_buf; ++ char *guix_sh = ++ (0 == stat(_PATH_BSHELL, &guix_stat_buf)) ++ ? _PATH_BSHELL ++ : "/bin/sh"; ++#else /* _PATH_BSHELL */ ++ char *guix_sh = "/bin/sh"; ++#endif ++ /* END PATCH for Guix */ + + if (pipe(tofds)) S_error("process","cannot open pipes"); + if (pipe(fromfds)) { +@@ -881,7 +898,9 @@ static ptr s_process(s, stderrp) 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);} +- execl("/bin/sh", "/bin/sh", "-c", s, NULL); ++ /* BEGIN PATCH for Guix */ ++ execl(guix_sh, guix_sh, "-c", s, NULL); ++ /* END PATCH for Guix */ + _exit(1) /* only if execl fails */; + /*NOTREACHED*/ + } else { + +base-commit: 9d228d16fb99c274c964e5bef93e97333888769f +-- +2.32.0 + diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 319f63f9d2..0f766e7850 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -211,7 +211,8 @@ (define %racket-origin (sha256 (base32 "0f9zyhdvbh4xsndrqjzl85j5ziz0rmqi676g9s1lw3h3skq2636h")) (file-name (git-file-name "racket" %racket-version)) - (patches (search-patches "racket-rktio-bin-sh.patch")) + (patches (search-patches "racket-chez-scheme-bin-sh.patch" + "racket-rktio-bin-sh.patch")) (modules '((guix build utils))) (snippet #~(begin From patchwork Sat Aug 27 18:55:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42003 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 6F2F827BBEC; Sat, 27 Aug 2022 19:58:34 +0100 (BST) 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=unavailable 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 DDEE627BBEB for ; Sat, 27 Aug 2022 19:58:29 +0100 (BST) Received: from localhost ([::1]:53648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS10n-0004Ls-0f for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10N-0004Iu-EV for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10N-0001hn-5f for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10N-0008J2-2P for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 07/14] gnu: Add Zuo. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665231830 (code B ref 57050); Sat, 27 Aug 2022 18:58:03 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:32 +0000 Received: from localhost ([127.0.0.1]:57071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zr-0008HC-4b for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:32 -0400 Received: from mail-vk1-f179.google.com ([209.85.221.179]:42571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zF-0008E0-Vs for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:57 -0400 Received: by mail-vk1-f179.google.com with SMTP id q14so2099604vke.9 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=fYenKD6+Navuzfet9Ne3Uc/jx6iZdsbGbfleVobTXpw=; b=eh0v5tXW6pqm3DalGtvQrZtM88MnC8vXetfTPq5ovU7fYA4VgaP5NE4SbImNuNpuSt k6E/IwpVMx6tJ9NmXIjorBSFvMfsWea+aOCT8Vw4EPifDBLSZObzCTEKqoFojtdTiGMj HDglJJSfmh6/IeaW0MmLxtFaTSb7yU8Xb+Lj3ChpwNxtdewpbA4qfzT7NE5ZOTeRRawP 1+jZ4hXcXEjUBGOoRdyh579UrMThQtBv/LHcQLmJWV0twDoW2uMSAAWgWEtbShcxQmKI dEetSfhZg5oW3emP/JbL0mLCuS4thwZh1boJPqzj/9lv6gez3TkOOtjSvYE1PhFki3bI FmxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=fYenKD6+Navuzfet9Ne3Uc/jx6iZdsbGbfleVobTXpw=; b=B3ig8PTxgRhE7A5NK+c43YljipdxrTZeB6Mwt+EjsgfbTdqpVZdp4eJacBvJPvXRLS o+FE43ArdxbLaautLUi6A34qumPG83SK6V6yeAQOBY5xxTivAX06P4Tds3xcIFeq09hF Cpw8CPQmesbJrObjLdjArM810M1u0d027FwHwihL3mphzImTmGVGTjlL9Ao5l6l9FEf3 d57S26T4gAYznH0NmJxwWDCPDBPyYSSu6Ol0P5LjVWScDWG0W2svXSgy+KwOCNQSN23n 96bPtY7zPvxcIIfOoLTLlF0H1QVgdv4qmB7JmEBwh6CppNwidRjYqkz2j9el/CBJ9xLa KJWQ== X-Gm-Message-State: ACgBeo1RNHtMbhHuc+9EHqz9JAtf7+770Y9NK+MmQXVKBdgN2NAXDImz jr9wZRcUEFtoKJRztbajfEzX09GZgQbQ0YcS X-Google-Smtp-Source: AA6agR5i3ExUhDVcp4b2xaZ6HynjqU6xBHR2CNfz1Qis/g8YL/uj3vM/nItbwM3Nqcg9KuJLWDjijQ== X-Received: by 2002:a1f:9002:0:b0:377:1433:93e9 with SMTP id s2-20020a1f9002000000b00377143393e9mr1482486vkd.28.1661626608009; Sat, 27 Aug 2022 11:56:48 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id b20-20020a67fe94000000b003905cc8b952sm590836vsr.17.2022.08.27.11.56.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:47 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:47 -0400 Message-Id: X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/racket-backport-8.6-zuo.patch, gnu/packages/patches/racket-zuo-bin-sh.patch: New patches. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/racket.scm (%zuo-version): New variable. (zuo): New variable. --- gnu/local.mk | 2 + .../patches/racket-backport-8.6-zuo.patch | 481 ++++++++++++++++++ gnu/packages/patches/racket-zuo-bin-sh.patch | 74 +++ gnu/packages/racket.scm | 49 ++ 4 files changed, 606 insertions(+) create mode 100644 gnu/packages/patches/racket-backport-8.6-zuo.patch create mode 100644 gnu/packages/patches/racket-zuo-bin-sh.patch diff --git a/gnu/local.mk b/gnu/local.mk index babd54c8c6..c9c3061b33 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1769,8 +1769,10 @@ 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-backport-8.6-zuo.patch \ %D%/packages/patches/racket-chez-scheme-bin-sh.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/restic-0.9.6-fix-tests-for-go1.15.patch \ %D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch \ diff --git a/gnu/packages/patches/racket-backport-8.6-zuo.patch b/gnu/packages/patches/racket-backport-8.6-zuo.patch new file mode 100644 index 0000000000..b86679b7ec --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.6-zuo.patch @@ -0,0 +1,481 @@ +From 8761fc06b188b9ca2f4b7f2b7d1235075c44a321 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sat, 23 Jul 2022 17:10:58 -0600 +Subject: [PATCH 1/4] Zuo: support cross compilation via `configure` and + `CC_FOR_BUILD` + +(cherry picked from commit 798a989ba6d1a30c491a3120b2c2f1570ecab911) +--- + racket/src/zuo/Makefile.in | 7 ++++++- + racket/src/zuo/README.md | 10 ++++++++++ + racket/src/zuo/configure | 15 +++++++++++++++ + racket/src/zuo/configure.ac | 11 +++++++++++ + 4 files changed, 42 insertions(+), 1 deletion(-) + +diff --git a/racket/src/zuo/Makefile.in b/racket/src/zuo/Makefile.in +index 5d16e145bf..747b584c5c 100644 +--- a/racket/src/zuo/Makefile.in ++++ b/racket/src/zuo/Makefile.in +@@ -17,6 +17,11 @@ CPPFLAGS = @CPPFLAGS@ + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ + ++CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ ++LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ ++ + EMBED_LIBS = @EMBED_LIBS@ + + .PHONY: zuos-to-run-and-install +@@ -24,7 +29,7 @@ zuos-to-run-and-install: zuo + ./zuo . zuos-to-run-and-install + + zuo: $(srcdir)/zuo.c +- $(CC) $(CPPFLAGS) $(CFLAGS) -DZUO_LIB_PATH='"'"$(srcdir)/lib"'"' -o zuo $(srcdir)/zuo.c $(LDFLAGS) $(LIBS) ++ $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -DZUO_LIB_PATH='"'"$(srcdir)/lib"'"' -o zuo $(srcdir)/zuo.c $(LDFLAGS_FOR_BUILD) $(LIBS_FOR_BUILD) + + .PHONY: check + check: zuo +diff --git a/racket/src/zuo/README.md b/racket/src/zuo/README.md +index 17c88ee9ec..3aad504b7e 100644 +--- a/racket/src/zuo/README.md ++++ b/racket/src/zuo/README.md +@@ -84,6 +84,16 @@ A boot image is machine-independent, whether in a stand-alone file or + embedded in `.c` source. + + ++Cross Compiling ++--------------- ++ ++If you use `./configure --host=...` to cross compile, then you will ++also need to add something like `CC_FOR_BUILD=cc` as a `./configure` ++argument to specify the compiler for a `zuo` to use on the build ++machine. If necessary, you can also specify `CFLAGS_FOR_BUILD`, ++`LDFLAGS_FOR_BUILD`, and/or `LIBS_FOR_BUILD`. ++ ++ + Embedding Zuo in Another Application + ------------------------------------ + +diff --git a/racket/src/zuo/configure b/racket/src/zuo/configure +index 1fa34a3fe8..575ce07d96 100755 +--- a/racket/src/zuo/configure ++++ b/racket/src/zuo/configure +@@ -589,6 +589,10 @@ enable_embed="zuo" + ac_subst_vars='LTLIBOBJS + LIBOBJS + EMBED_LIBS ++LIBS_FOR_BUILD ++LDFLAGS_FOR_BUILD ++CFLAGS_FOR_BUILD ++CC_FOR_BUILD + OBJEXT + EXEEXT + ac_ct_CC +@@ -2584,6 +2588,17 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ++if test "${CC_FOR_BUILD}" = ""; then ++ CC_FOR_BUILD='$(CC) -O2' ++ CFLAGS_FOR_BUILD='$(CPPFLAGS) $(CFLAGS)' ++ LDFLAGS_FOR_BUILD='$(LDFLAGS)' ++ LIBS_FOR_BUILD='$(LIBS)' ++fi ++ ++ ++ ++ ++ + + { $as_echo "$as_me:${as_lineno-$LINENO}: zuo libraries to embed: \"${EMBED_LIBS}\"" >&5 + $as_echo "$as_me: zuo libraries to embed: \"${EMBED_LIBS}\"" >&6;} +diff --git a/racket/src/zuo/configure.ac b/racket/src/zuo/configure.ac +index 89b3c6391d..598ff79629 100644 +--- a/racket/src/zuo/configure.ac ++++ b/racket/src/zuo/configure.ac +@@ -25,6 +25,17 @@ AS_IF([test "x$enable_embed" = xno], + AC_PROG_MAKE_SET() + AC_PROG_CC + ++if test "${CC_FOR_BUILD}" = ""; then ++ CC_FOR_BUILD='$(CC) -O2' ++ CFLAGS_FOR_BUILD='$(CPPFLAGS) $(CFLAGS)' ++ LDFLAGS_FOR_BUILD='$(LDFLAGS)' ++ LIBS_FOR_BUILD='$(LIBS)' ++fi ++AC_SUBST(CC_FOR_BUILD) ++AC_SUBST(CFLAGS_FOR_BUILD) ++AC_SUBST(LDFLAGS_FOR_BUILD) ++AC_SUBST(LIBS_FOR_BUILD) ++ + AC_SUBST(EMBED_LIBS) + AC_MSG_NOTICE([zuo libraries to embed: "${EMBED_LIBS}"]) + +-- +2.32.0 + + +From f65194ea41eb472fbdd45d5f6c13eabe5e681704 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sat, 23 Jul 2022 17:47:03 -0600 +Subject: [PATCH 2/4] Zuo: sort hash keys + +Printing in a sorted order is helpful to make things more +deterministic independent of symbol inputs. Making `hash-keys` +produce a sorted list generalizes that determinism. + +(cherry picked from commit 4e7ffd3b365d01c5d0993c0b3fd24c9623962edf) +--- + racket/src/zuo/build.zuo | 5 ++- + racket/src/zuo/tests/hash.zuo | 8 ++-- + racket/src/zuo/zuo-doc/lang-zuo.scrbl | 18 +++++++-- + racket/src/zuo/zuo.c | 57 ++++++++++++++++++++++++++- + 4 files changed, 78 insertions(+), 10 deletions(-) + +diff --git a/racket/src/zuo/build.zuo b/racket/src/zuo/build.zuo +index c1b5e8ce66..129240120a 100644 +--- a/racket/src/zuo/build.zuo ++++ b/racket/src/zuo/build.zuo +@@ -47,7 +47,10 @@ + (target (at-dir (add-exe name)) + (lambda (path token) + (rule (list image_zuo.c +- (input-data-target 'config config) ++ (input-data-target 'config (cons ++ lib-path ++ (map (lambda (key) (hash-ref config key)) ++ '(CC CPPFLAGS CFLAGS LDFLAGS LIBS)))) + (quote-module-path)) + (lambda () + (define l (split-path path)) +diff --git a/racket/src/zuo/tests/hash.zuo b/racket/src/zuo/tests/hash.zuo +index a35741c730..0d3d7f3af6 100644 +--- a/racket/src/zuo/tests/hash.zuo ++++ b/racket/src/zuo/tests/hash.zuo +@@ -35,9 +35,7 @@ + + (check (hash-keys (hash)) '()) + (check (hash-keys (hash 'a 1)) '(a)) +-(check (let ([keys (hash-keys (hash 'a 1 'b 2))]) +- (or (equal? keys '(a b)) +- (equal? keys '(b a))))) ++(check (hash-keys (hash 'a 1 'b 2)) '(a b)) ; always in order + (check (length (hash-keys (hash 'a 1 'b 2 'c 3))) 3) + (check (length (hash-keys (hash 'a 1 'b 2 'a 3))) 2) + (check-arg-fail (hash-keys 0) "not a hash table") +@@ -50,3 +48,7 @@ + (check (hash-keys-subset? (hash 'a 1 'b 2) (hash 'b 1)) #f) + (check-arg-fail (hash-keys-subset? 0 (hash)) "not a hash table") + (check-arg-fail (hash-keys-subset? (hash) 0) "not a hash table") ++ ++;; print sorts keys alphabetically: ++(check (~a (hash 'a 1 'b 2)) "#hash((a . 1) (b . 2))") ++(check (~a (hash 'b 2 'a 1)) "#hash((a . 1) (b . 2))") +diff --git a/racket/src/zuo/zuo-doc/lang-zuo.scrbl b/racket/src/zuo/zuo-doc/lang-zuo.scrbl +index 94641d041e..4605e47471 100644 +--- a/racket/src/zuo/zuo-doc/lang-zuo.scrbl ++++ b/racket/src/zuo/zuo-doc/lang-zuo.scrbl +@@ -538,10 +538,20 @@ support to convert the textual form back into a hash table value. + + Analogous to @realracket*[hash? hash hash-ref hash-set hash-remove + hash-keys hash-count hash-keys-subset?] from @racketmodname[racket]. +-Besides being constrained to symbol keys, there is one additional +-difference: the third argument to @racket[hash-ref], when supplied, +-is always used as a value to return if a key is missing, as +-opposed to a failure thunk.} ++ ++Besides being constrained to symbol keys, there are two additional ++differences: ++ ++@itemlist[ ++ ++ @item{the third argument to @racket[hash-ref], when supplied, is ++ always used as a value to return if a key is missing, as ++ opposed to a failure thunk; and} ++ ++ @item{the @racket[hash-keys] function returns interned keys sorted ++ alphabetically.} ++ ++]} + + + @section{Procedures} +diff --git a/racket/src/zuo/zuo.c b/racket/src/zuo/zuo.c +index 2957d478af..88d5747326 100644 +--- a/racket/src/zuo/zuo.c ++++ b/racket/src/zuo/zuo.c +@@ -1298,6 +1298,59 @@ static zuo_t *zuo_trie_keys(zuo_t *trie_in, zuo_t *accum) { + return accum; + } + ++/*======================================================================*/ ++/* symbol-list sorting */ ++/*======================================================================*/ ++ ++/* merge sort used to make hash printing deterministic */ ++static zuo_t *zuo_symbol_list_sort(zuo_t *l_in) { ++ zuo_t *l, *left, *right, *first, *last; ++ zuo_uint_t len = 0, i; ++ ++ for (l = l_in, len = 0; l != z.o_null; l = _zuo_cdr(l)) ++ len++; ++ ++ if (len < 2) ++ return l_in; ++ ++ left = z.o_null; ++ for (l = l_in, i = len >> 1; i > 0; l = _zuo_cdr(l), i--) ++ left = zuo_cons(_zuo_car(l), left); ++ right = l; ++ ++ left = zuo_symbol_list_sort(left); ++ right = zuo_symbol_list_sort(right); ++ ++ first = last = z.o_null; ++ while ((left != z.o_null) && (right != z.o_null)) { ++ zuo_t *p; ++ ++ if (strcmp(ZUO_STRING_PTR(((zuo_symbol_t *)_zuo_car(left))->str), ++ ZUO_STRING_PTR(((zuo_symbol_t *)_zuo_car(right))->str)) ++ < 1) { ++ p = zuo_cons(_zuo_car(left), z.o_null); ++ left = _zuo_cdr(left); ++ } else { ++ p = zuo_cons(_zuo_car(right), z.o_null); ++ right = _zuo_cdr(right); ++ } ++ ++ if (first == z.o_null) ++ first = p; ++ else ++ ((zuo_pair_t *)last)->cdr = p; ++ last = p; ++ } ++ ++ ((zuo_pair_t *)last)->cdr = ((left != z.o_null) ? left : right); ++ ++ return first; ++} ++ ++static zuo_t *zuo_trie_sorted_keys(zuo_t *trie_in, zuo_t *accum) { ++ return zuo_symbol_list_sort(zuo_trie_keys(trie_in, accum)); ++} ++ + /*======================================================================*/ + /* terminal support */ + /*======================================================================*/ +@@ -1571,7 +1624,7 @@ static void zuo_out(zuo_out_t *out, zuo_t *obj, zuo_print_mode_t mode) { + out_string(out, "opaque"); + out_string(out, ">"); + } else if (obj->tag == zuo_trie_node_tag) { +- zuo_t *keys = zuo_trie_keys(obj, z.o_null); ++ zuo_t *keys = zuo_trie_sorted_keys(obj, z.o_null); + if (mode == zuo_print_mode) { + out_string(out, "(hash"); + if (keys != z.o_null) +@@ -2587,7 +2640,7 @@ static zuo_t *zuo_hash_remove(zuo_t *ht, zuo_t *sym) { + + static zuo_t *zuo_hash_keys(zuo_t *ht) { + check_hash("hash-keys", ht); +- return zuo_trie_keys(ht, z.o_null); ++ return zuo_trie_sorted_keys(ht, z.o_null); + } + + static zuo_t *zuo_hash_keys_subset_p(zuo_t *ht, zuo_t *ht2) { +-- +2.32.0 + + +From f2eecaa1dd875479d2cf51566223b3d0d7b9f738 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sat, 23 Jul 2022 18:06:41 -0600 +Subject: [PATCH 3/4] Zuo: check for nul characters in `string->symbol` + +(cherry picked from commit e20022ccfad40d0ba2e77aa75bc4f775018c781f) +--- + racket/src/zuo/tests/symbol.zuo | 3 +++ + racket/src/zuo/zuo-doc/lang-zuo.scrbl | 4 ++- + racket/src/zuo/zuo.c | 37 +++++++++++++++++---------- + 3 files changed, 29 insertions(+), 15 deletions(-) + +diff --git a/racket/src/zuo/tests/symbol.zuo b/racket/src/zuo/tests/symbol.zuo +index 7775aeeb04..5600a89755 100644 +--- a/racket/src/zuo/tests/symbol.zuo ++++ b/racket/src/zuo/tests/symbol.zuo +@@ -19,3 +19,6 @@ + (check (not (equal? 'apple (string->uninterned-symbol "apple")))) + (check-arg-fail (string->symbol 'apple) not-string) + (check-arg-fail (string->uninterned-symbol 'apple) not-string) ++ ++(check-arg-fail (string->symbol "apple\0spice") "without a nul character") ++(check (symbol? (string->uninterned-symbol "apple\0spice"))) +diff --git a/racket/src/zuo/zuo-doc/lang-zuo.scrbl b/racket/src/zuo/zuo-doc/lang-zuo.scrbl +index 4605e47471..07dd5815b0 100644 +--- a/racket/src/zuo/zuo-doc/lang-zuo.scrbl ++++ b/racket/src/zuo/zuo-doc/lang-zuo.scrbl +@@ -500,7 +500,9 @@ back into Zuo. + )]{ + + Analogous to @realracket*[symbol? symbol->string string->symbol +-string->uninterned-symbol] from @racketmodname[racket].} ++string->uninterned-symbol] from @racketmodname[racket], but ++@racket[string->symbol] accepts only strings that do not contain the ++null character.} + + + @section{Hash Tables (Persistent Maps)} +diff --git a/racket/src/zuo/zuo.c b/racket/src/zuo/zuo.c +index 88d5747326..17f161826d 100644 +--- a/racket/src/zuo/zuo.c ++++ b/racket/src/zuo/zuo.c +@@ -1323,7 +1323,7 @@ static zuo_t *zuo_symbol_list_sort(zuo_t *l_in) { + + first = last = z.o_null; + while ((left != z.o_null) && (right != z.o_null)) { +- zuo_t *p; ++ zuo_t *p, *s_left, *s_right; + + if (strcmp(ZUO_STRING_PTR(((zuo_symbol_t *)_zuo_car(left))->str), + ZUO_STRING_PTR(((zuo_symbol_t *)_zuo_car(right))->str)) +@@ -2573,8 +2573,28 @@ static zuo_t *zuo_substring(zuo_t *obj, zuo_t *start_i, zuo_t *end_i) { + return zuo_sized_string((const char *)&((zuo_string_t *)obj)->s[s_idx], e_idx - s_idx); + } + ++static int zuo_is_string_without_nul(zuo_t *obj) { ++ zuo_int_t i; ++ ++ if ((obj->tag != zuo_string_tag) ++ || ZUO_STRING_LEN(obj) == 0) ++ return 0; ++ ++ for (i = ZUO_STRING_LEN(obj); i--; ) { ++ if (((zuo_string_t *)obj)->s[i] == 0) ++ return 0; ++ } ++ ++ return 1; ++} ++ + static zuo_t *zuo_string_to_symbol(zuo_t *obj) { +- check_string("string->symbol", obj); ++ if (!zuo_is_string_without_nul(obj)) { ++ const char *who = "string->symbol"; ++ check_string(who, obj); ++ zuo_fail_arg(who, "string without a nul character", obj); ++ } ++ + return zuo_symbol_from_string(ZUO_STRING_PTR(obj), obj); + } + +@@ -3577,18 +3597,7 @@ static void *zuo_envvars_block(const char *who, zuo_t *envvars) + #endif + + static int zuo_is_path_string(zuo_t *obj) { +- zuo_int_t i; +- +- if ((obj->tag != zuo_string_tag) +- || ZUO_STRING_LEN(obj) == 0) +- return 0; +- +- for (i = ZUO_STRING_LEN(obj); i--; ) { +- if (((zuo_string_t *)obj)->s[i] == 0) +- return 0; +- } +- +- return 1; ++ return zuo_is_string_without_nul(obj); + } + + static zuo_t *zuo_path_string_p(zuo_t *obj) { +-- +2.32.0 + + +From de6618cb3819d25580e3cd400ea09c8cf4f673a9 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sat, 23 Jul 2022 19:50:46 -0600 +Subject: [PATCH 4/4] Zuo: CPPFLAGS_FOR_BUILD, too + +(cherry picked from commit cf82706c4b298f654a04c4bc8d98dff39b62a2ac) +--- + racket/src/zuo/Makefile.in | 3 ++- + racket/src/zuo/configure | 5 ++++- + racket/src/zuo/configure.ac | 4 +++- + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/racket/src/zuo/Makefile.in b/racket/src/zuo/Makefile.in +index 747b584c5c..0376c038a8 100644 +--- a/racket/src/zuo/Makefile.in ++++ b/racket/src/zuo/Makefile.in +@@ -19,6 +19,7 @@ LIBS = @LIBS@ + + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ + LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ + LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ + +@@ -29,7 +30,7 @@ zuos-to-run-and-install: zuo + ./zuo . zuos-to-run-and-install + + zuo: $(srcdir)/zuo.c +- $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -DZUO_LIB_PATH='"'"$(srcdir)/lib"'"' -o zuo $(srcdir)/zuo.c $(LDFLAGS_FOR_BUILD) $(LIBS_FOR_BUILD) ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) -DZUO_LIB_PATH='"'"$(srcdir)/lib"'"' -o zuo $(srcdir)/zuo.c $(LDFLAGS_FOR_BUILD) $(LIBS_FOR_BUILD) + + .PHONY: check + check: zuo +diff --git a/racket/src/zuo/configure b/racket/src/zuo/configure +index 575ce07d96..7ac453e3bc 100755 +--- a/racket/src/zuo/configure ++++ b/racket/src/zuo/configure +@@ -591,6 +591,7 @@ LIBOBJS + EMBED_LIBS + LIBS_FOR_BUILD + LDFLAGS_FOR_BUILD ++CPPFLAGS_FOR_BUILD + CFLAGS_FOR_BUILD + CC_FOR_BUILD + OBJEXT +@@ -2590,7 +2591,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "${CC_FOR_BUILD}" = ""; then + CC_FOR_BUILD='$(CC) -O2' +- CFLAGS_FOR_BUILD='$(CPPFLAGS) $(CFLAGS)' ++ CPPFLAGS_FOR_BUILD='$(CPPFLAGS)' ++ CFLAGS_FOR_BUILD='$(CFLAGS)' + LDFLAGS_FOR_BUILD='$(LDFLAGS)' + LIBS_FOR_BUILD='$(LIBS)' + fi +@@ -2600,6 +2602,7 @@ fi + + + ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: zuo libraries to embed: \"${EMBED_LIBS}\"" >&5 + $as_echo "$as_me: zuo libraries to embed: \"${EMBED_LIBS}\"" >&6;} + +diff --git a/racket/src/zuo/configure.ac b/racket/src/zuo/configure.ac +index 598ff79629..051ea0beb5 100644 +--- a/racket/src/zuo/configure.ac ++++ b/racket/src/zuo/configure.ac +@@ -27,12 +27,14 @@ AC_PROG_CC + + if test "${CC_FOR_BUILD}" = ""; then + CC_FOR_BUILD='$(CC) -O2' +- CFLAGS_FOR_BUILD='$(CPPFLAGS) $(CFLAGS)' ++ CPPFLAGS_FOR_BUILD='$(CPPFLAGS)' ++ CFLAGS_FOR_BUILD='$(CFLAGS)' + LDFLAGS_FOR_BUILD='$(LDFLAGS)' + LIBS_FOR_BUILD='$(LIBS)' + fi + AC_SUBST(CC_FOR_BUILD) + AC_SUBST(CFLAGS_FOR_BUILD) ++AC_SUBST(CPPFLAGS_FOR_BUILD) + AC_SUBST(LDFLAGS_FOR_BUILD) + AC_SUBST(LIBS_FOR_BUILD) + +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-zuo-bin-sh.patch b/gnu/packages/patches/racket-zuo-bin-sh.patch new file mode 100644 index 0000000000..bcdcb8e963 --- /dev/null +++ b/gnu/packages/patches/racket-zuo-bin-sh.patch @@ -0,0 +1,74 @@ +From 73d9b77a11b4516905caf579abb559736f715ea6 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 + +If: + + 1. The nonstandard but ubiquitous macro `_PATH_BSHELL` from + is defined; and + + 2. `zuo_process` is called with the exact path "/bin/sh"; and + + 3. The path specified by `_PATH_BSHELL` exists; + +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. +--- + racket/src/zuo/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 @@ + #include + #include + #ifdef ZUO_UNIX ++# include /* PATCHED for Guix */ + # include + # include + # include +@@ -5730,7 +5731,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"; +- zuo_t *command = _zuo_car(command_and_args); ++ /* BEGIN PATCH for Guix */ ++ zuo_t *_guix_orig_command = _zuo_car(command_and_args); ++ zuo_t *command; ++ /* END PATCH for Guix */ + 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) + void *env; + int as_child, exact_cmdline; + +- check_path_string(who, command); ++ /* BEGIN PATCH for Guix */ ++ check_path_string(who, _guix_orig_command); ++#if defined(_PATH_BSHELL) ++ command = ++ ((z.o_false == zuo_string_eql(_guix_orig_command, zuo_string("/bin/sh"))) ++ || (z.o_false == zuo_stat(zuo_string(_PATH_BSHELL), z.o_false, z.o_true))) ++ ? _guix_orig_command ++ : zuo_string(_PATH_BSHELL); ++#else ++ command = _guix_orig_command; ++#endif ++ /* END PATCH for Guix */ ++ + for (l = args; l->tag == zuo_pair_tag; l = _zuo_cdr(l)) { + zuo_t *a = _zuo_car(l); + if (a == z.o_null) { + +base-commit: 87eee6e2adb8c6bc11e60619c706fa6295096085 +-- +2.32.0 + diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 0f766e7850..70df5482fb 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -200,6 +200,7 @@ (define* (racket-vm-for-system #:optional racket-vm-bc)) (define %racket-version "8.5") ; Remember to update chez-scheme-for-racket! +(define %zuo-version "1.0") ; defined in racket/src/zuo/zuo.c (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin @@ -232,6 +233,54 @@ (define %racket-origin ;; Unbundle libffi. (delete-file-recursively "racket/src/bc/foreign/libffi"))))) + +(define-public zuo + (let ((revision #f)) + (package + (name "zuo") + (version (string-append %zuo-version + "-racket" + "8.6" + (if revision "-guix" "") + (or revision ""))) + (source + (origin + (inherit %racket-origin) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit "v8.6"))) + (sha256 + (base32 "1yi36nr7zrdwrnvpmliirxxjz4pyfyhkar6yvk3rapvmg4q2vmnk")) + (patches (append (origin-patches %racket-origin) + (search-patches "racket-backport-8.6-zuo.patch" + "racket-zuo-bin-sh.patch"))) + (file-name (git-file-name "racket" "8.6")))) + (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 +with files and running processes. It comes with a @command{make}-like +embedded DSL, which is used to build Racket itself. + +Zuo is a Racket variant in the sense that program files start with +@code{#lang}, and the module path after @code{#lang} determines the parsing +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))))) + + (define racket-vm-common-configure-flags #~`(,@(cond ((false-if-exception From patchwork Sat Aug 27 18:55:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42005 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 DC4BC27BBE9; Sat, 27 Aug 2022 19:58:35 +0100 (BST) 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=unavailable 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 9B0BF27BBEA for ; Sat, 27 Aug 2022 19:58:29 +0100 (BST) Received: from localhost ([::1]:53650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS10m-0004MP-PR for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10N-0004IH-2F for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10M-0001hg-Pj for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10M-0008Iv-MA for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 08/14] gnu: racket: Update to 8.6. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665131822 (code B ref 57050); Sat, 27 Aug 2022 18:58:02 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:31 +0000 Received: from localhost ([127.0.0.1]:57069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zo-0008H8-Js for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:31 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:41734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zF-0008Df-Fn for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:56:57 -0400 Received: by mail-vs1-f41.google.com with SMTP id k2so4666459vsk.8 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=dFokJX0s1m+1qxfOXzekmKo926uL1m2KwnI17zzvDdg=; b=cBmzlB4T1s74VjjGGyt1ugB5YCUAoHngLMDPU2lrU3Wmec9u2fbZn22R40pdIxcC23 VTczFUuXRRrOSYRA3xQO/lvKrpSf77Bih5xxdNP/RP28MhvfVxsdt7enHXGubjFRoYpK ielzED0Ah4Pce35LjJYqsyK0YmSkB6yVLdkZSDekA+NYg7BJPvyUdGvXD9XeEFy7U2e1 1/iuw55gjq2pRGlVBZ2REFE+0sB5gtkWQYl5o4HEroXVpchglcQj9kDJjN8krI0RWiQw umxC42MPalpbxSUXVVObKTdFT++HThDQbC9v3isSftM3fCEIMEnSpkb1C8FgS5WprK20 h4Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=dFokJX0s1m+1qxfOXzekmKo926uL1m2KwnI17zzvDdg=; b=c5nfT5bcU5uSGzEBvM/ATMZ1nSsjv5WG6goS9IUXiOKqb4ek6Av7VoQpUsdZh/POK8 ucyXzymFXjtBSMjHXEOusN5zlXx4ytWIKc3GPKgwnUTSd1YkfiTLNK3I+LzDHPinYTpZ VXvMjGqn58FMYtwtnFKfAOQBxH9uiQ0pmxcmDoNAWo1gp6oXcKDZyYBGItl6TkYdAq9q 4dAvwxTU2n1lmXLXCL+R6Axx8Yq670toIkqW3p8H17IjEFqWRlL/xxOtjSjFM15fLnWr /FzvG2o+sXyWrkMfajvaBjnh7GAyTZPoQaBAG1IwI9aJrc1AGgCDwMtK4PKi+VMbbaUJ RG9g== X-Gm-Message-State: ACgBeo26tnnbx8rmJOcmrNysBNatB6hrZ1QABV/LiABbTevJv/DA1QIh x6Ikjh9+7NM2Tj6iHdAH5gWkpo+EXArMXJJP X-Google-Smtp-Source: AA6agR7P+Kz4w+bdXoY4FKPD73GqzG/uDN4ko8VGZ2eTm2AdA9TWOEuq4rnvtDJIDqKogoO+Z5JS0w== X-Received: by 2002:a67:ab46:0:b0:38a:c3cf:a7d2 with SMTP id k6-20020a67ab46000000b0038ac3cfa7d2mr1490214vsh.84.1661626612487; Sat, 27 Aug 2022 11:56:52 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id c32-20020a0561023ca000b0038a9fbef45fsm592257vsv.11.2022.08.27.11.56.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:52 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:48 -0400 Message-Id: <75705f7ebdc1bbacbc79b98020533bb0a7417443.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches Also, update 'chez-scheme-for-racket' to 9.5.9.2. * gnu/packages/patches/racket-chez-scheme-bin-sh.patch: Refresh patch. * gnu/packages/patches/racket-backport-8.6-cross-install.patch, gnu/packages/patches/racket-backport-8.6-docindex-write.patch, gnu/packages/patches/racket-backport-8.6-hurd.patch: New patches. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/racket.scm (%racket-origin)[patches]: Use them and the patches for Zuo. (%racket-version): Update to 8.6. (zuo)[version]: Refer to '%racket-version'. [origin]: Use '%racket-origin'. (racket-vm-cgc)[native-inputs]: Add 'zuo'. [arguments]<#:make-flags>: Use 'zuo' from 'native-inputs'. (racket)[inputs]: Update checksums. * gnu/packages/chez.scm (target-chez-os): Handle Hurd and QNX. (%chez-features-table): Likewise. (chez-scheme-for-racket): Update to 9.5.9.2. [native-inputs]: Add 'zuo'. [arguments]<#:out-of-source?>: Use out-of-source build. <#:tests?>: Skip them due to ongoing problems. <#:configure-flags>: Add '--install-csug=' and '--installreleasenotes='. <#:make-flags>: Use 'zuo' from 'native-inputs'. Supply 'STEXLIB=' here, rather than in a phase. <#:phases>: Replace 'install-docs' using new 'make' target. --- gnu/packages/chez.scm | 52 +- .../racket-backport-8.6-cross-install.patch | 126 ++++ .../racket-backport-8.6-docindex-write.patch | 36 ++ .../patches/racket-backport-8.6-hurd.patch | 609 ++++++++++++++++++ .../patches/racket-chez-scheme-bin-sh.patch | 26 +- gnu/packages/racket.scm | 121 ++-- 6 files changed, 893 insertions(+), 77 deletions(-) create mode 100644 gnu/packages/patches/racket-backport-8.6-cross-install.patch create mode 100644 gnu/packages/patches/racket-backport-8.6-docindex-write.patch create mode 100644 gnu/packages/patches/racket-backport-8.6-hurd.patch diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index c627c4d842..b59398578a 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -115,7 +115,7 @@ (define* (target-chez-os #:optional (system (or (%current-target-system) ((target-linux? system) "le") ((target-hurd? system) - #f) + "gnu") ((target-mingw? system) "nt") ;; missing (guix utils) predicates @@ -131,6 +131,8 @@ (define* (target-chez-os #:optional (system (or (%current-target-system) ;; Nix says "x86_64-solaris", but accommodate "-solaris2" ((string-contains system "solaris") "s2") + ((string-suffix? "-qnx" system) + "qnx") ;; unknown (else #f))) @@ -167,6 +169,9 @@ (define %chez-features-table ("arm32" bootstrap-bootfiles) ("arm64" . #f) ("ppc32" threads)) + ;; Hurd + ("gnu" + ("i3" . #f)) ;; FreeBSD ("fb" ("i3" threads) ;; commented out @@ -192,6 +197,9 @@ (define %chez-features-table ("s2" ("i3" threads) ;; commented out ("a6" threads)) ;; commented out + ;; QNX + ("qnx" + ("i3" . #f)) ;; Windows ("nt" ("i3" threads bootstrap-bootfiles) @@ -433,7 +441,7 @@ (define-public chez-scheme-for-racket (package (inherit chez-scheme) (name "chez-scheme-for-racket") - (version "9.5.7.6") + (version "9.5.9.2") ;; The version should match `(scheme-fork-version-number)`. ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. ;; It will always be different than the upstream version! @@ -444,18 +452,52 @@ (define-public chez-scheme-for-racket (delete "libx11" "util-linux:lib"))) (native-inputs (modify-inputs (package-native-inputs chez-scheme) + (prepend zuo) (replace "chez-scheme-bootstrap-bootfiles" chez-scheme-for-racket-bootstrap-bootfiles))) (arguments (substitute-keyword-arguments (package-arguments chez-scheme) + ((#:out-of-source? _ #f) + #t) + ((#:tests? _ #t) + ;; FIXME: There have been some flaky test failures. Some have been + ;; fixed upstream post-release but have proven non-trivial to + ;; backport; at least one issue remains. Re-enable tests once + ;; https://github.com/racket/racket/issues/4359 is fixed. + #f) ((#:configure-flags cfg-flags #~'()) - #~(cons* "--disable-x11" - "--threads" ;; ok to potentially duplicate - #$cfg-flags)) + #~`("--disable-x11" + "--threads" ;; ok to potentially duplicate + ,@(let* ((chez+version (strip-store-file-name #$output)) + (doc-prefix (assoc-ref %outputs "doc")) + (doc-dir (string-append doc-prefix + "/share/doc/" + chez+version))) + (list (string-append "--installcsug=" + doc-dir + "/csug") + (string-append "--installreleasenotes=" + doc-dir + "/release_notes"))) + ,@#$cfg-flags)) + ((#:make-flags mk-flags #~'()) + #~(cons* (string-append "ZUO=" + #+(this-package-native-input "zuo") + "/bin/zuo") + (string-append "STEXLIB=" + #+(this-package-native-input "stex") + "/lib/stex") + #$mk-flags)) ((#:phases those-phases #~%standard-phases) #~(let* ((those-phases #$those-phases) (unpack (assoc-ref those-phases 'unpack))) (modify-phases those-phases + (replace 'install-docs + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke + "make" + "install-docs" + make-flags))) (replace 'unpack (lambda args (unpack #:source #$(or (package-source this-package) diff --git a/gnu/packages/patches/racket-backport-8.6-cross-install.patch b/gnu/packages/patches/racket-backport-8.6-cross-install.patch new file mode 100644 index 0000000000..2c4d8924ed --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.6-cross-install.patch @@ -0,0 +1,126 @@ +From fbe2094f56fb81c888076c781e90fb0abbc0cc07 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sat, 30 Jul 2022 07:06:55 -0600 +Subject: [PATCH 1/2] CS makefiles: fix Unix-style install for cross + compilation + +Closes #4377 + +(cherry picked from commit 053be470e7c5454cdf48e934f3254d2d916bbbc5) +--- + racket/src/cs/c/build.zuo | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/racket/src/cs/c/build.zuo b/racket/src/cs/c/build.zuo +index 8d3950bb27..d8b74c509d 100644 +--- a/racket/src/cs/c/build.zuo ++++ b/racket/src/cs/c/build.zuo +@@ -1016,10 +1016,9 @@ + (define (setup) + (call-with-dest-racket + (lambda (bindir dest-racket) +- (define copytree-racket (and cross? (config-bootstrap-racket))) ++ (define copytree-racket (and cross? (hash-ref (config-bootstrap-racket) 'racket))) + (maybe-copytree config dest-racket copytree-racket at-dir) +- (run-raco-setup config dest-racket +- (and cross? (hash-ref (config-bootstrap-racket) 'racket)) ++ (run-raco-setup config dest-racket copytree-racket + ;; this can be redundant if it's also supplied via `SETUP_MACHINE_FLAGS`, + ;; but redundant should be ok: + (list "-MCR" (~a (at-dir "compiled") ":") +-- +2.32.0 + + +From 85802f4d515e310e657928707800ad709a676e2a Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Mon, 15 Aug 2022 10:37:01 +0800 +Subject: [PATCH 2/2] configure: adjust cross-build assumption for a pb build + +Don't assume a cross build for a pb target on a platform that's only +supported via pb. + +(cherry picked from commit 70e484e885637c495be5481983dae2207fdd67bb) + +(Edited to remove unrelated tweak to comments in +"racket/src/expander/expand/require+provide.rkt".) +--- + racket/src/cs/c/configure | 15 +++++++++++---- + racket/src/cs/c/configure.ac | 15 +++++++++++---- + 2 files changed, 22 insertions(+), 8 deletions(-) + +diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure +index 454d79e11a..7e0fa5600d 100755 +--- a/racket/src/cs/c/configure ++++ b/racket/src/cs/c/configure +@@ -4679,6 +4679,11 @@ case "$MACH_HOST_CPU" in + ;; + esac + ++if test "${MACH}" = "" ; then ++ default_mach_was_empty=yes ++else ++ default_mach_was_empty=no ++fi + + if test "${enable_mach}" != "" ; then + MACH="${enable_mach}" +@@ -4701,13 +4706,15 @@ elif test "$MACH" = "" -o "$MACH_OS" = "" ; then + exit 1 + fi + +-# For a pb build where Racket is supplied, force cross-build +-# mode on the assumption that the host is not a pb build +-# (because it should be created with default configure options) ++# For a pb build where Racket is supplied and MACH was not originally ++# empty, force cross-build mode on the assumption that the host is not ++# a pb build (because it should be created with default configure options) + if test "${enable_pb}" = "yes" ; then + if test "${enable_racket}" != "" ; then + if test "${enable_target}" = "" ; then +- enable_target="${MACH}" ++ if test "${default_mach_was_empty}" = "no" ; then ++ enable_target="${MACH}" ++ fi + fi + fi + fi +diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac +index 5bce979c92..734c1e8feb 100644 +--- a/racket/src/cs/c/configure.ac ++++ b/racket/src/cs/c/configure.ac +@@ -415,6 +415,11 @@ case "$MACH_HOST_CPU" in + ;; + esac + ++if test "${MACH}" = "" ; then ++ default_mach_was_empty=yes ++else ++ default_mach_was_empty=no ++fi + + if test "${enable_mach}" != "" ; then + MACH="${enable_mach}" +@@ -437,13 +442,15 @@ elif test "$MACH" = "" -o "$MACH_OS" = "" ; then + exit 1 + fi + +-# For a pb build where Racket is supplied, force cross-build +-# mode on the assumption that the host is not a pb build +-# (because it should be created with default configure options) ++# For a pb build where Racket is supplied and MACH was not originally ++# empty, force cross-build mode on the assumption that the host is not ++# a pb build (because it should be created with default configure options) + if test "${enable_pb}" = "yes" ; then + if test "${enable_racket}" != "" ; then + if test "${enable_target}" = "" ; then +- enable_target="${MACH}" ++ if test "${default_mach_was_empty}" = "no" ; then ++ enable_target="${MACH}" ++ fi + fi + fi + fi +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-backport-8.6-docindex-write.patch b/gnu/packages/patches/racket-backport-8.6-docindex-write.patch new file mode 100644 index 0000000000..abe1984507 --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.6-docindex-write.patch @@ -0,0 +1,36 @@ +From 8b4d686a62fd66dedfc40ecdcf3698316993d614 Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Sun, 17 Jul 2022 22:51:44 -0400 +Subject: [PATCH] racket-index: set write permission when copying + `docindex.sqlite` + +Fixes https://github.com/racket/racket/issues/4357 + +(cherry picked from commit 55b6cbdca1f36a4f37bab1519c1b658717d3cad2) +--- + pkgs/racket-index/setup/scribble.rkt | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/pkgs/racket-index/setup/scribble.rkt b/pkgs/racket-index/setup/scribble.rkt +index 6694f0b793..e27a8fa348 100644 +--- a/pkgs/racket-index/setup/scribble.rkt ++++ b/pkgs/racket-index/setup/scribble.rkt +@@ -252,7 +252,14 @@ + (unless (file-exists? db-file) + (define-values (base name dir?) (split-path db-file)) + (make-directory* base) +- (when copy-from (copy-file copy-from db-file)) ++ (when copy-from ++ (copy-file copy-from db-file) ++ ;; we might not have write permissions for the previous layer: ++ ;; ensure that we do for the new file ++ (define orig-mode (file-or-directory-permissions db-file 'bits)) ++ (define writeable-mode (bitwise-ior user-write-bit orig-mode)) ++ (unless (= writeable-mode orig-mode) ++ (file-or-directory-permissions db-file writeable-mode))) + (doc-db-disconnect + (doc-db-file->connection db-file #t)))) + (when (or (ormap can-build*? main-docs) +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-backport-8.6-hurd.patch b/gnu/packages/patches/racket-backport-8.6-hurd.patch new file mode 100644 index 0000000000..d593b01e62 --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.6-hurd.patch @@ -0,0 +1,609 @@ +From f17b030fa2f902bb3666913d4a3cd6ba9c146d22 Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Wed, 3 Aug 2022 03:13:03 -0400 +Subject: [PATCH 1/3] Chez Scheme: Fix build on GNU/Hurd + +Mostly GNU/Hurd should take the same options as GNU/Linux. One +difference is that the Hurd does not define macros such as `PATH_MAX` or +`NOFILE`, because it avoids imposing arbitrary limits on such resources. +This patch provides alternatives for localized uses of those constants, +but it accepts the pervasive use of `PATH_MAX` in finding bootfiles for +now. See https://www.gnu.org/software/hurd/hurd/porting/guidelines.html. + +(cherry picked from commit 87eee6e2adb8c6bc11e60619c706fa6295096085) +--- + racket/src/ChezScheme/README.md | 1 + + racket/src/ChezScheme/c/number.c | 22 +++++++++---------- + racket/src/ChezScheme/c/prim5.c | 35 ++++++++++++++++++++++++++++-- + racket/src/ChezScheme/c/scheme.c | 34 +++++++++++++++++------------ + racket/src/ChezScheme/c/version.h | 7 ++++-- + racket/src/ChezScheme/configure | 17 ++++++++++----- + racket/src/ChezScheme/s/cmacros.ss | 1 + + racket/src/cs/c/configure | 14 ++++++++++-- + racket/src/cs/c/configure.ac | 14 ++++++++++-- + racket/src/cs/rumble/system.ss | 3 +++ + 10 files changed, 109 insertions(+), 39 deletions(-) + +diff --git a/racket/src/ChezScheme/README.md b/racket/src/ChezScheme/README.md +index a4a11a5eef..25231dd9bb 100644 +--- a/racket/src/ChezScheme/README.md ++++ b/racket/src/ChezScheme/README.md +@@ -13,6 +13,7 @@ Supported platforms (bytecode interpreter may work for others): + * OpenBSD: x86, x86_64, ARMv6, AArch64, PowerPC32 + * NetBSD: x86, x86_64, ARMv6, AArch64, PowerPC32 + * Solaris: x86, x86_64 ++ * GNU/Hurd: x86 + * Android: ARMv7, AArch64 + * iOS: AArch64 + * WebAssembly via Emscripten (bytecode interpreter only) +diff --git a/racket/src/ChezScheme/c/number.c b/racket/src/ChezScheme/c/number.c +index ede38cc626..e2bce0d2d3 100644 +--- a/racket/src/ChezScheme/c/number.c ++++ b/racket/src/ChezScheme/c/number.c +@@ -1041,15 +1041,15 @@ floating-point operations + + #ifdef IEEE_DOUBLE + /* exponent stored + 1024, hidden bit to left of decimal point */ +-#define bias 1023 +-#define bitstoright 52 +-#define m1mask 0xf +-#ifdef WIN32 +-#define hidden_bit 0x10000000000000 +-#else +-#define hidden_bit 0x10000000000000ULL +-#endif +-#ifdef LITTLE_ENDIAN_IEEE_DOUBLE ++# define bias 1023 ++# define bitstoright 52 ++# define m1mask 0xf ++# ifdef WIN32 ++# define hidden_bit 0x10000000000000 ++# else ++# define hidden_bit 0x10000000000000ULL ++# endif ++# ifdef LITTLE_ENDIAN_IEEE_DOUBLE + struct dblflt { + UINT m4: 16; + UINT m3: 16; +@@ -1058,7 +1058,7 @@ struct dblflt { + UINT e: 11; + UINT sign: 1; + }; +-#else ++# else + struct dblflt { + UINT sign: 1; + UINT e: 11; +@@ -1067,7 +1067,7 @@ struct dblflt { + UINT m3: 16; + UINT m4: 16; + }; +-#endif ++# endif + #endif + + double S_random_double(U32 m1, U32 m2, U32 m3, U32 m4, double scale) { +diff --git a/racket/src/ChezScheme/c/prim5.c b/racket/src/ChezScheme/c/prim5.c +index 124d1e049c..82bbf8d687 100644 +--- a/racket/src/ChezScheme/c/prim5.c ++++ b/racket/src/ChezScheme/c/prim5.c +@@ -23,6 +23,10 @@ + #include + #include + ++#if defined(__GNU__) /* Hurd */ ++#include ++#endif ++ + /* locally defined functions */ + static INT s_errno(void); + static IBOOL s_addr_in_heap(uptr x); +@@ -58,7 +62,7 @@ static void s_showalloc(IBOOL show_dump, const char *outfn); + static ptr s_system(const char *s); + static ptr s_process(char *s, IBOOL stderrp); + static I32 s_chdir(const char *inpath); +-#ifdef GETWD ++#if defined(GETWD) || defined(__GNU__) /* Hurd */ + static char *s_getwd(void); + #endif + static ptr s_set_code_byte(ptr p, ptr n, ptr x); +@@ -881,7 +885,18 @@ static ptr s_process(char *s, IBOOL stderrp) { + CLOSE(0); if (dup(tofds[0]) != 0) _exit(1); + CLOSE(1); if (dup(fromfds[1]) != 1) _exit(1); + CLOSE(2); if (dup(stderrp ? errfds[1] : 1) != 2) _exit(1); ++#ifndef __GNU__ /* Hurd */ + {INT i; for (i = 3; i < NOFILE; i++) (void)CLOSE(i);} ++#else /* __GNU__ Hurd: no NOFILE */ ++ { ++ INT i; ++ struct rlimit rlim; ++ getrlimit(RLIMIT_NOFILE, &rlim); ++ for (i = 3; i < rlim.rlim_cur; i++) { ++ (void)CLOSE(i); ++ } ++ } ++#endif /* __GNU__ Hurd */ + execl("/bin/sh", "/bin/sh", "-c", s, NULL); + _exit(1) /* only if execl fails */; + /*NOTREACHED*/ +@@ -927,6 +942,22 @@ static I32 s_chdir(const char *inpath) { + static char *s_getwd() { + return GETWD(TO_VOIDP(&BVIT(S_bytevector(PATH_MAX), 0))); + } ++#elif defined(__GNU__) /* Hurd: no PATH_MAX */ ++static char *s_getwd() { ++ char *path; ++ size_t len; ++ ptr bv; ++ path = getcwd(NULL, 0); ++ if (NULL == path) { ++ return NULL; ++ } else { ++ len = strlen(path); ++ bv = S_bytevector(len); ++ memcpy(TO_VOIDP(&BVIT(bv, 0)), path, len); ++ free(path); ++ return TO_VOIDP(&BVIT(bv, 0)); ++ } ++} + #endif /* GETWD */ + + static ptr s_set_code_byte(ptr p, ptr n, ptr x) { +@@ -1817,7 +1848,7 @@ void S_prim5_init(void) { + Sforeign_symbol("(cs)s_rational", (void *)S_rational); + Sforeign_symbol("(cs)sub", (void *)S_sub); + Sforeign_symbol("(cs)rem", (void *)S_rem); +-#ifdef GETWD ++#if defined(GETWD) || defined(__GNU__) /* Hurd */ + Sforeign_symbol("(cs)s_getwd", (void *)s_getwd); + #endif + Sforeign_symbol("(cs)s_chdir", (void *)s_chdir); +diff --git a/racket/src/ChezScheme/c/scheme.c b/racket/src/ChezScheme/c/scheme.c +index ed5564540b..0c40e3eaf0 100644 +--- a/racket/src/ChezScheme/c/scheme.c ++++ b/racket/src/ChezScheme/c/scheme.c +@@ -458,6 +458,12 @@ static IBOOL next_path(char *path, const char *name, const char *ext, const char + static const char *path_last(const char *path); + static char *get_defaultheapdirs(void); + ++#ifdef PATH_MAX ++# define BOOT_PATH_MAX PATH_MAX ++#else /* hack for Hurd: better to remove the restriction */ ++# define BOOT_PATH_MAX 4096 ++#endif ++ + static const char *path_last(const char *p) { + const char *s; + #ifdef WIN32 +@@ -483,7 +489,7 @@ static const char *path_last(const char *p) { + + static char *get_defaultheapdirs() { + char *result; +- wchar_t buf[PATH_MAX]; ++ wchar_t buf[BOOT_PATH_MAX]; + DWORD len = sizeof(buf); + if (ERROR_SUCCESS != RegGetValueW(HKEY_LOCAL_MACHINE, L"Software\\Chez Scheme\\csv" VERSION, L"HeapSearchPath", RRF_RT_REG_SZ, NULL, buf, &len)) + return DEFAULT_HEAP_PATH; +@@ -512,14 +518,14 @@ static char *get_defaultheapdirs() { + * leaving the full path with name affixed in path and *sp / *dsp pointing + * past the current entry. it returns 1 on success and 0 if at the end of + * the search path. path should be a pointer to an unoccupied buffer +- * PATH_MAX characters long. either or both of sp/dsp may be empty, ++ * BOOT_PATH_MAX characters long. either or both of sp/dsp may be empty, + * but neither may be null, i.e., (char *)0. */ + static IBOOL next_path(char *path, const char *name, const char *ext, + const char **sp, const char **dsp) { + char *p; + const char *s, *t; + +-#define setp(c) if (p >= path + PATH_MAX) { fprintf(stderr, "search path entry too long\n"); S_abnormal_exit(); } else *p++ = (c) ++#define setp(c) if (p >= path + BOOT_PATH_MAX) { fprintf(stderr, "search path entry too long\n"); S_abnormal_exit(); } else *p++ = (c) + for (;;) { + s = *sp; + p = path; +@@ -532,10 +538,10 @@ static IBOOL next_path(char *path, const char *name, const char *ext, + switch (*s) { + #ifdef WIN32 + case 'x': { +- wchar_t exepath[PATH_MAX]; DWORD n; ++ wchar_t exepath[BOOT_PATH_MAX]; DWORD n; + s += 1; +- n = GetModuleFileNameW(NULL, exepath, PATH_MAX); +- if (n == 0 || (n == PATH_MAX && GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { ++ n = GetModuleFileNameW(NULL, exepath, BOOT_PATH_MAX); ++ if (n == 0 || (n == BOOT_PATH_MAX && GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { + fprintf(stderr, "warning: executable path is too long; ignoring %%x\n"); + } else { + char *tstart; +@@ -608,7 +614,7 @@ typedef struct { + iptr len; /* 0 => unknown */ + iptr offset; + IBOOL need_check, close_after; +- char path[PATH_MAX]; ++ char path[BOOT_PATH_MAX]; + } boot_desc; + + #define MAX_BOOT_FILES 10 +@@ -695,14 +701,14 @@ static void finish_dependencies_header(int fd, const char *path, int c) { + static IBOOL find_boot(const char *name, const char *ext, IBOOL direct_pathp, + int fd, + IBOOL errorp) { +- char pathbuf[PATH_MAX], buf[PATH_MAX]; ++ char pathbuf[BOOT_PATH_MAX], buf[BOOT_PATH_MAX]; + uptr n = 0; + INT c; + const char *path; + char *expandedpath; + + if ((fd != -1) || direct_pathp || S_fixedpathp(name)) { +- if (strlen(name) >= PATH_MAX) { ++ if (strlen(name) >= BOOT_PATH_MAX) { + fprintf(stderr, "boot-file path is too long %s\n", name); + S_abnormal_exit(); + } +@@ -776,7 +782,7 @@ static IBOOL find_boot(const char *name, const char *ext, IBOOL direct_pathp, + if (boot_count == 0) { + for (;;) { + /* try to load heap or boot file this boot file requires */ +- if (get_string(fd, buf, PATH_MAX, &c) != 0) { ++ if (get_string(fd, buf, BOOT_PATH_MAX, &c) != 0) { + fprintf(stderr, "unexpected end of file on %s\n", path); + CLOSE(fd); + S_abnormal_exit(); +@@ -796,7 +802,7 @@ static IBOOL find_boot(const char *name, const char *ext, IBOOL direct_pathp, + c = get_u8(fd); + for (sep = " "; ; sep = "or ") { + if (c == ')') break; +- (void) get_string(fd, buf, PATH_MAX, &c); ++ (void) get_string(fd, buf, BOOT_PATH_MAX, &c); + fprintf(stderr, "%s%s.boot ", sep, buf); + } + fprintf(stderr, "required by %s\n", path); +@@ -1090,7 +1096,7 @@ extern void Sregister_boot_file_fd_region(const char *name, + int close_after) { + check_boot_file_state("Sregister_boot_file_fd"); + +- if (strlen(name) >= PATH_MAX) { ++ if (strlen(name) >= BOOT_PATH_MAX) { + fprintf(stderr, "boot-file path is too long %s\n", name); + S_abnormal_exit(); + } +@@ -1141,14 +1147,14 @@ extern void Sbuild_heap(const char *kernel, void (*custom_init)(void)) { + } + + name = path_last(kernel); +- if (strlen(name) >= PATH_MAX) { ++ if (strlen(name) >= BOOT_PATH_MAX) { + fprintf(stderr, "executable name too long: %s\n", name); + S_abnormal_exit(); + } + + #ifdef WIN32 + { /* strip off trailing .exe, if any */ +- static char buf[PATH_MAX]; ++ static char buf[BOOT_PATH_MAX]; + iptr n; + + n = strlen(name) - 4; +diff --git a/racket/src/ChezScheme/c/version.h b/racket/src/ChezScheme/c/version.h +index a79d12621b..61751a9fad 100644 +--- a/racket/src/ChezScheme/c/version.h ++++ b/racket/src/ChezScheme/c/version.h +@@ -80,7 +80,7 @@ FORCEINLINE void store_unaligned_uptr(uptr *addr, uptr val) { + /*****************************************/ + /* Operating systems */ + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__GNU__) /* Hurd */ + #define NOBLOCK O_NONBLOCK + #define LOAD_SHARED_OBJECT + #define USE_MMAP +@@ -91,7 +91,10 @@ FORCEINLINE void store_unaligned_uptr(uptr *addr, uptr val) { + #define GETPAGESIZE() getpagesize() + typedef char *memcpy_t; + #define MAKE_NAN(x) { x = 0.0; x = x / x; } +-#define GETWD(x) getcwd((x),PATH_MAX) ++#ifndef __GNU__ /* Hurd: no PATH_MAX */ ++/* n.b. don't test PATH_MAX directly: we have not yet included */ ++# define GETWD(x) getcwd((x),PATH_MAX) ++#endif + typedef int tputsputcchar; + #ifndef __ANDROID__ + # define LOCKF +diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure +index f64b639c3a..efdb6029cb 100755 +--- a/racket/src/ChezScheme/configure ++++ b/racket/src/ChezScheme/configure +@@ -102,6 +102,11 @@ case "${CONFIG_UNAME}" in + installprefix=/usr + installmansuffix=share/man + ;; ++ GNU) ++ unixsuffix=gnu # the Hurd ++ installprefix=/usr ++ installmansuffix=share/man ++ ;; + QNX) + if uname -a | egrep 'x86' > /dev/null 2>&1 ; then + m32=i3qnx +@@ -591,7 +596,7 @@ fi + + # Infer flags needed for threads: + case "${flagsm}" in +- *le|*fb|*ob|*nb) ++ *le|*gnu|*fb|*ob|*nb) + threadFlags="-D_REENTRANT -pthread" + threadLibs="-lpthread" + ;; +@@ -627,7 +632,7 @@ if [ "$cflagsset" = "no" ] ; then + a6*) + CFLAGS="-m64 ${optFlags}" + ;; +- i3le) ++ i3le) # intentionally not including i3gnu, which may not support sse2 + CFLAGS="-m32 -msse2 -mfpmath=sse ${optFlags}" + ;; + i3nt) +@@ -688,7 +693,7 @@ fi + # Add automatic linking flags, unless suppressed by --disable-auto-flags + if [ "$addflags" = "yes" ] ; then + case "${flagsm}" in +- *le) ++ *le|*gnu) + LDFLAGS="${LDFLAGS} -rdynamic" + ;; + *fb|*nb) +@@ -702,7 +707,7 @@ if [ "$addflags" = "yes" ] ; then + esac + + case "${flagsm}" in +- *le) ++ *le|*gnu) + LIBS="${LIBS} -lm -ldl ${ncursesLib} -lrt" + ;; + *fb|*ob) +@@ -749,7 +754,7 @@ exeSuffix= + + # compile flags for c/Mf-unix and mats/Mf-unix + case "${flagsmuni}" in +- *le) ++ *le|*gnu) + mdcflags="-fPIC -shared" + ;; + *fb|*ob) +@@ -781,7 +786,7 @@ case "${flagsmuni}" in + i3le) + mdldflags="-melf_i386" + ;; +- *le) ++ *le|*gnu) + ;; + i3nb) + mdldflags="-m elf_i386" +diff --git a/racket/src/ChezScheme/s/cmacros.ss b/racket/src/ChezScheme/s/cmacros.ss +index ff2b09217b..2e79a4d8de 100644 +--- a/racket/src/ChezScheme/s/cmacros.ss ++++ b/racket/src/ChezScheme/s/cmacros.ss +@@ -385,6 +385,7 @@ + i3fb ti3fb + i3ob ti3ob + i3osx ti3osx ++ i3gnu ti3gnu + a6le ta6le + a6osx ta6osx + a6ob ta6ob +diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure +index 454d79e11a..dab545c0b4 100755 +--- a/racket/src/cs/c/configure ++++ b/racket/src/cs/c/configure +@@ -4449,8 +4449,15 @@ case "$host_os" in + ;; + irix*) + ;; +- linux*) +- MACH_OS=le ++ linux*|gnu*) ++ case "$host_os" in ++ *linux*) ++ MACH_OS=le ++ ;; ++ *) ++ MACH_OS=gnu # Hurd ++ ;; ++ esac + case "$host_os" in + *linux-android*) + ;; +@@ -4730,6 +4737,9 @@ if test "${build_os}_${build_cpu}" != "${host_os}_${host_cpu}" ; then + linux*) + BUILD_OS=le + ;; ++ gnu*) # Hurd: must come after linux* ++ BUILD_OS=gnu ++ ;; + *mingw*) + BUILD_OS=nt + ;; +diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac +index 5bce979c92..43e7307b1b 100644 +--- a/racket/src/cs/c/configure.ac ++++ b/racket/src/cs/c/configure.ac +@@ -272,8 +272,15 @@ case "$host_os" in + ;; + irix*) + ;; +- linux*) +- MACH_OS=le ++ linux*|gnu*) ++ case "$host_os" in ++ linux*) ++ MACH_OS=le ++ ;; ++ *) ++ MACH_OS=gnu # Hurd ++ ;; ++ esac + case "$host_os" in + *linux-android*) + ;; +@@ -466,6 +473,9 @@ if test "${build_os}_${build_cpu}" != "${host_os}_${host_cpu}" ; then + linux*) + BUILD_OS=le + ;; ++ gnu*) # Hurd - must come after linux* ++ BUILD_OS=gnu ++ ;; + *mingw*) + BUILD_OS=nt + ;; +diff --git a/racket/src/cs/rumble/system.ss b/racket/src/cs/rumble/system.ss +index 2319cbe7a5..773eb79cf3 100644 +--- a/racket/src/cs/rumble/system.ss ++++ b/racket/src/cs/rumble/system.ss +@@ -48,6 +48,8 @@ + arm32le tarm32le arm64le tarm64le + ppc32le tppc32le) + 'linux] ++ [(i3gnu ti3gnu) ++ 'gnu-hurd] + [(a6fb ta6fb i3fb ti3fb + arm32fb tarm32fb arm64fb tarm64fb + ppc32fb tppc32fb) +@@ -85,6 +87,7 @@ + i3nb ti3nb + i3fb ti3fb + i3s2 ti3s2 ++ i3gnu ti3gnu + i3qnx) + 'i386] + [(arm32le tarm32le +-- +2.32.0 + + +From 8653294b771c741d320aba31e692b4f0ed0c702f Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Thu, 4 Aug 2022 20:18:09 -0400 +Subject: [PATCH 2/3] BC: Fix build on GNU/Hurd + +(cherry picked from commit 5c05496afd6159c2f9cd52e7f23389fdc6b55f43) +--- + racket/src/bc/configure | 2 +- + racket/src/bc/configure.ac | 2 +- + racket/src/bc/sconfig.h | 14 +++++++++----- + 3 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/racket/src/bc/configure b/racket/src/bc/configure +index 4ddb607b37..4ee346014d 100755 +--- a/racket/src/bc/configure ++++ b/racket/src/bc/configure +@@ -5018,7 +5018,7 @@ case "$host_os" in + X_PRE_LIBS="" + fi + ;; +- linux*) ++ linux*,gnu*) + LIBS="$LIBS -ldl -lm -lrt -rdynamic" + DYN_CFLAGS="-fPIC" + curses_portable_link="/usr/lib/${host_cpu}-${host_os}/libncurses.a /usr/lib/${host_cpu}-${host_os}/libtermcap.a" +diff --git a/racket/src/bc/configure.ac b/racket/src/bc/configure.ac +index deef8f3077..866851236e 100644 +--- a/racket/src/bc/configure.ac ++++ b/racket/src/bc/configure.ac +@@ -557,7 +557,7 @@ case "$host_os" in + X_PRE_LIBS="" + fi + ;; +- linux*) ++ linux*,gnu*) + LIBS="$LIBS -ldl -lm -lrt -rdynamic" + DYN_CFLAGS="-fPIC" + curses_portable_link="/usr/lib/${host_cpu}-${host_os}/libncurses.a /usr/lib/${host_cpu}-${host_os}/libtermcap.a" +diff --git a/racket/src/bc/sconfig.h b/racket/src/bc/sconfig.h +index 01ecb48158..8468942fcd 100644 +--- a/racket/src/bc/sconfig.h ++++ b/racket/src/bc/sconfig.h +@@ -79,12 +79,14 @@ + + #endif + +- /************** Linux with gcc ****************/ ++ /************** Linux (or Hurd) with gcc ****************/ + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__GNU__) + + # ifdef __ANDROID__ + # define SCHEME_OS "android" ++# elif defined(__GNU__) ++# define SCHEME_OS "gnu-hurd" + # else + # define SCHEME_OS "linux" + # endif +@@ -146,13 +148,15 @@ + # define USE_IEEE_FP_PREDS + # define USE_EXPLICT_FP_FORM_CHECK + +-# define LINUX_FIND_STACK_BASE ++# define LINUX_FIND_STACK_BASE /* also ok for Hurd */ + + # define FLAGS_ALREADY_SET + + #if defined(__i386__) +-# define MZ_USE_JIT_I386 +-# define MZ_JIT_USE_MPROTECT ++# ifndef __GNU__ /* Hurd */ ++# define MZ_USE_JIT_I386 ++# define MZ_JIT_USE_MPROTECT ++# endif + # ifndef MZ_NO_UNWIND_SUPPORT + # define MZ_USE_DWARF_LIBUNWIND + # endif +-- +2.32.0 + + +From 1b0cd08557f58506c96f0ddd855bd9051a45a2f1 Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Sat, 6 Aug 2022 22:48:40 -0400 +Subject: [PATCH 3/3] BC: repair configure script + +Hopefully this will fix the DrDr failures caused by 5c05496. + +Related to https://github.com/racket/racket/pull/4384 + +(cherry picked from commit c3dd01055ed7589a18136904510fe4db557d6e77) +--- + racket/src/bc/configure | 2 +- + racket/src/bc/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/racket/src/bc/configure b/racket/src/bc/configure +index 4ee346014d..b1c5175b84 100755 +--- a/racket/src/bc/configure ++++ b/racket/src/bc/configure +@@ -5018,7 +5018,7 @@ case "$host_os" in + X_PRE_LIBS="" + fi + ;; +- linux*,gnu*) ++ linux*|gnu*) + LIBS="$LIBS -ldl -lm -lrt -rdynamic" + DYN_CFLAGS="-fPIC" + curses_portable_link="/usr/lib/${host_cpu}-${host_os}/libncurses.a /usr/lib/${host_cpu}-${host_os}/libtermcap.a" +diff --git a/racket/src/bc/configure.ac b/racket/src/bc/configure.ac +index 866851236e..ecc3b0b579 100644 +--- a/racket/src/bc/configure.ac ++++ b/racket/src/bc/configure.ac +@@ -557,7 +557,7 @@ case "$host_os" in + X_PRE_LIBS="" + fi + ;; +- linux*,gnu*) ++ linux*|gnu*) + LIBS="$LIBS -ldl -lm -lrt -rdynamic" + DYN_CFLAGS="-fPIC" + curses_portable_link="/usr/lib/${host_cpu}-${host_os}/libncurses.a /usr/lib/${host_cpu}-${host_os}/libtermcap.a" +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-chez-scheme-bin-sh.patch b/gnu/packages/patches/racket-chez-scheme-bin-sh.patch index 65cf2f99f3..331b4f244b 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 e982b6687494bf071386c67be74e57a29cf4ce00 Mon Sep 17 00:00:00 2001 +From f86370295c5bb14d4bb93d0ccfa37a2b79f19f25 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 @@ -24,12 +24,12 @@ on `system` from the C library. 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/racket/src/ChezScheme/c/prim5.c b/racket/src/ChezScheme/c/prim5.c -index f5e3e345be..922421ca75 100644 +index 82bbf8d687..be8f603447 100644 --- a/racket/src/ChezScheme/c/prim5.c +++ b/racket/src/ChezScheme/c/prim5.c -@@ -22,6 +22,12 @@ - #include - #include +@@ -27,6 +27,12 @@ + #include + #endif +/* BEGIN PATCH for Guix */ +#ifndef WIN32 @@ -38,9 +38,9 @@ index f5e3e345be..922421ca75 100644 +/* END PATCH for Guix */ + /* locally defined functions */ - static INT s_errno PROTO((void)); - static IBOOL s_addr_in_heap PROTO((uptr x)); -@@ -856,6 +862,17 @@ static ptr s_process(s, stderrp) char *s; IBOOL stderrp; { + 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) { INT tofds[2], fromfds[2], errfds[2]; struct sigaction act, oint_act; @@ -58,10 +58,10 @@ index f5e3e345be..922421ca75 100644 if (pipe(tofds)) S_error("process","cannot open pipes"); if (pipe(fromfds)) { -@@ -881,7 +898,9 @@ static ptr s_process(s, stderrp) 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);} +@@ -897,7 +914,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 +70,7 @@ index f5e3e345be..922421ca75 100644 /*NOTREACHED*/ } else { -base-commit: 9d228d16fb99c274c964e5bef93e97333888769f +base-commit: 87eee6e2adb8c6bc11e60619c706fa6295096085 -- 2.32.0 diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 70df5482fb..349cf38e07 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -53,7 +53,7 @@ (define-module (gnu packages racket) #:use-module (gnu packages xorg) #:use-module ((guix licenses) #:prefix license:)) -;; Commentary: +;; COMMENTARY: ;; ;; Anatomy of Racket: ;; ------------------ @@ -72,14 +72,16 @@ (define-module (gnu packages racket) ;; ├── bc/ ;; ├── cs/ ;; ├── ChezScheme/ +;; ├── zuo/ ;; └── ... ;; ;; The 'racket/src/' directory contains the source of the runtime system, core ;; compiler, and primitives for the major Racket implementations: this layer -;; is called the ``Racket VM''. It is basically a normal autotools -;; project. (Even when Racket VM implementations use components implemented in -;; Racket, they are compiled in special modes to produce VM primitives.) -;; (There are or have been experimental Racket VM implementations elsewhere, +;; is called the ``Racket VM''. It is basically a normal Autoconf project, +;; except that the makefiles just run Zuo to do the real work. (Even when +;; Racket VM implementations use components implemented in Racket, they are +;; compiled in special modes to produce VM primitives.) (There are or have +;; been experimental Racket VM implementations elsewhere, ;; e.g. .) ;; ;; The 'racket/collects/' directory contains ``built in'' Racket libraries @@ -100,10 +102,10 @@ (define-module (gnu packages racket) ;; ;; The top-level 'Makefile' is more like a directory of scripts: it has ;; convienience targets for developing Racket, and it cooperates with the -;; 'distro-build' package to assemble custom Racket distributions. It is not -;; part of Racket source distributions: the root of a source distribution is -;; basically 'racket/src' with some extra package sources and configuration -;; added. +;; 'distro-build' package to assemble custom Racket distributions. (Again, +;; the makefile just delegates to Zuo.) It is not part of Racket source +;; distributions: the root of a source distribution is basically 'racket/src' +;; with some extra package sources and configuration added. ;; ;; A ''minimal Racket'' installation includes two packages: 'base', which is a ;; sort of bridge between the current ``built-in'' collections and the package @@ -129,12 +131,12 @@ (define-module (gnu packages racket) ;; output. The function 'racket-vm-for-system' returns the recomended Racket ;; VM package for a given system. ;; -;; The file 'racket.scm' builds on these packages to define 'racket-minimal' -;; and 'racket' packages. These use Racket's support for ``layered -;; installations'', which allow an immutable base layer to be extended with -;; additional packages. They use the layer configuration directly provide -;; ready-to-install FHS-like trees, rather than relying on the built in -;; ``Unix-style install'' mechanism. +;; We then define the packages 'racket-minimal' and +;; 'racket'. These use Racket's support for ``layered installations'', which +;; allow an immutable base layer to be extended with additional packages. +;; They use the layer configuration directly provide ready-to-install FHS-like +;; trees, rather than relying on the built in ``Unix-style install'' +;; mechanism. ;; ;; Bootstrapping Racket: ;; --------------------- @@ -177,16 +179,18 @@ (define-module (gnu packages racket) ;; However, other Racket subsystems implemented in Racket for Racket CS ;; use older C implementations for Racket BC, whereas the reader, expander, ;; and module system were completely replaced with the Racket implementation -;; as of Racket 7.0. +;; as of Racket 7.0. See also . ;; ;; For Racket BC, the compiled "linklet" s-expressions (primitive modules) ;; are embeded in C as a static string constant. Eventually, they are further ;; compiled by the C-implemented Racket BC bytecode and JIT compilers. -;; (On platforms where Racket BC's JIT is not supported, yet another compiler -;; instead compiles the linklets to C code, but this is not a bootstrapping -;; issue.) ;; -;; Code: +;; Zuo is notably *not* a problem for bootstrapping. The implementation is a +;; single hand-written C file designed to build with just `cc -o zuo zuo.c`, +;; even with very old or limited compilers. (We use the Autoconf support for +;; convienience.) +;; +;; CODE: (define* (racket-vm-for-system #:optional (system (or (%current-target-system) @@ -199,7 +203,7 @@ (define* (racket-vm-for-system #:optional racket-vm-cs racket-vm-bc)) -(define %racket-version "8.5") ; Remember to update chez-scheme-for-racket! +(define %racket-version "8.6") ; Remember to update chez-scheme-for-racket! (define %zuo-version "1.0") ; defined in racket/src/zuo/zuo.c (define %racket-commit (string-append "v" %racket-version)) @@ -210,10 +214,15 @@ (define %racket-origin (url "https://github.com/racket/racket") (commit %racket-commit))) (sha256 - (base32 "0f9zyhdvbh4xsndrqjzl85j5ziz0rmqi676g9s1lw3h3skq2636h")) + (base32 "1lw6h70dk8zqpl96zz0hmhn8vjcc0c7gw4prkfz2wid5bkq4mhg4")) (file-name (git-file-name "racket" %racket-version)) - (patches (search-patches "racket-chez-scheme-bin-sh.patch" - "racket-rktio-bin-sh.patch")) + (patches (search-patches "racket-backport-8.6-cross-install.patch" + "racket-backport-8.6-docindex-write.patch" + "racket-backport-8.6-hurd.patch" + "racket-backport-8.6-zuo.patch" + "racket-chez-scheme-bin-sh.patch" + "racket-rktio-bin-sh.patch" + "racket-zuo-bin-sh.patch")) (modules '((guix build utils))) (snippet #~(begin @@ -240,21 +249,10 @@ (define-public zuo (name "zuo") (version (string-append %zuo-version "-racket" - "8.6" + %racket-version (if revision "-guix" "") (or revision ""))) - (source - (origin - (inherit %racket-origin) - (uri (git-reference - (url "https://github.com/racket/racket") - (commit "v8.6"))) - (sha256 - (base32 "1yi36nr7zrdwrnvpmliirxxjz4pyfyhkar6yvk3rapvmg4q2vmnk")) - (patches (append (origin-patches %racket-origin) - (search-patches "racket-backport-8.6-zuo.patch" - "racket-zuo-bin-sh.patch"))) - (file-name (git-file-name "racket" "8.6")))) + (source %racket-origin) (outputs '("out" "debug")) (build-system gnu-build-system) (arguments @@ -314,7 +312,8 @@ (define-public racket-vm-cgc (source %racket-origin) (inputs (list ncurses ;; <- common to all variants (for #%terminal) libffi)) ;; <- only for BC variants - (native-inputs (list libtool)) ;; <- only for BC variants + (native-inputs (list zuo ;; <- for all variants + libtool)) ;; <- only for BC variants (outputs '("out" "debug")) (build-system gnu-build-system) (arguments @@ -322,6 +321,10 @@ (define-public racket-vm-cgc #:configure-flags #~(cons "--enable-cgcdefault" #$racket-vm-common-configure-flags) + #:make-flags + #~(list (string-append "ZUO=" + #+(this-package-native-input "zuo") + "/bin/zuo")) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main ;; distribution. @@ -681,25 +684,25 @@ (define-public racket "contract-profile" (base32 "1xm2z8g0dpv5d9h2sg680vx1a8ix9gbsdpxxb8qv1w7akp73paj3") '(("contract-profile" "."))) (simple-racket-origin - "data" (base32 "10iabgrk9alaggvksnyb0hdq7f1p30pq6pq2bcakvhzpxwiv1f55") + "data" (base32 "08sj4m0g0cp7gwb0nq90m770f0c21b7ydif7nljc8rxmcdprfisc") '("data" "data-doc" "data-enumerate-lib" "data-lib")) (simple-racket-origin "datalog" (base32 "0nf6cy4djpyhfvgpa6yn72apbz9s83gp0qg95pzjd0az4v6qwq1s") '(("datalog" "."))) (simple-racket-origin - "db" (base32 "1n02ja0yj3mjjhmz0yv04yfhyvrsznbljn8bjviyfxnm4xf9rcc5") + "db" (base32 "0jzsbfcdm3xj0g8xxw3ky2swrhiqqsq2aqa3r08m641dc981dmjq") '("db" "db-doc" "db-lib")) (simple-racket-origin - "deinprogramm" (base32 "0g8flr1qg3bcyhdinqhs4w7dyisaqyailbxrjgd2a7zlqmdyicfr") + "deinprogramm" (base32 "16ncs3ms3mmdavbk0mkhm2qi62vyyif9cch3sn1y64pij489x34v") '("deinprogramm" "deinprogramm-signature")) (simple-racket-origin "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0") '("distributed-places" "distributed-places-doc" "distributed-places-lib")) (simple-racket-origin - "draw" (base32 "1fpk85rs2crd63bxnmwj2pysisd62pxcqaip01si67dv1ri8ff92") + "draw" (base32 "00rq5y4ba6z1d6jh76kl8rwpxrlqqp81a875zyhk3k81i42635sm") '("draw" "draw-doc" "draw-lib")) (simple-racket-origin - "drracket" (base32 "0dipnz92c63zxys9z1kl5215rm7arc35g9r8bs8ivp96p75mljnz") + "drracket" (base32 "05d7wssi0ry13alb5hl3llpsg30dd0jhyfv5nb1nmg189fn42q62") '("drracket" "drracket-plugin-lib" "drracket-tool" @@ -716,7 +719,7 @@ (define-public racket "eopl" (base32 "1fmiixj6rxsgzwvgva8lvrvv0gl49v2405mp3s0i7ipis5c4n27s") '(("eopl" "."))) (simple-racket-origin - "errortrace" (base32 "14m7rhaxngj36070iw15am434hm438pfgmwjfsiqhsglz4pcxhip") + "errortrace" (base32 "0r5630bb2d6hk0fbi95fmyfja54nnwdfcj2zjba124pp6xkjyavx") '("errortrace" "errortrace-doc" "errortrace-lib")) (simple-racket-origin "expeditor" (base32 "0mjfwb4wzwsg5xj3k6cmik0va432n56rp5h7rxx1c2yy3prh1j7q") @@ -733,13 +736,13 @@ (define-public racket "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d") '(("games" "."))) (simple-racket-origin - "gui" (base32 "0r3ck4gxdhnzr1a1fi0f1i7gwfip7akq10qgcxza66pp57hnl0wx") + "gui" (base32 "18pcnx3wi8f32i2frm8bn9pi08n4y3c5jgqs4gy21w6f84dv401w") '("gui" "gui-doc" "gui-lib" "tex-table")) (simple-racket-origin "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5") '("gui-pkg-manager-lib")) (simple-racket-origin - "htdp" (base32 "19xqixrqbwdxph17w9jga19008j88harb5wgml4hpqj3x0apx9g3") + "htdp" (base32 "173xy6ks55npvwn6cykjs41s9qfb70hc2gfjiqvw91hdsbjykwir") '("htdp" "htdp-doc" "htdp-lib")) (simple-racket-origin "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x") @@ -763,7 +766,7 @@ (define-public racket "make" (base32 "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa") '(("make" "."))) (simple-racket-origin - "math" (base32 "02sqbnvxvmvslk33b44fx4v93zafcvhva0cx8z21jqbl5wp217ac") + "math" (base32 "00ld38in5jfshs1q4zf07w84cyv4yjr40kmw30pyd5wqgs2zq9ai") '("math" "math-doc" "math-lib")) (simple-racket-origin "mysterx" (base32 "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48") @@ -798,16 +801,16 @@ (define-public racket (git-file-name "stamourv-optimization-coach" %racket-version))) '(("optimization-coach" "."))) (simple-racket-origin - "option-contract" (base32 "026b7n5l0c3024nymshz8zp1yhn493rdzgpflzfd52hj7awafqhk") + "option-contract" (base32 "07cncg9pi15cm19k7rzv54vx83wq7y42i2m6bgzaqja1h8vnj2ww") '("option-contract" "option-contract-doc" "option-contract-lib")) (simple-racket-origin - "parser-tools" (base32 "08pvz4zramirzm3j64hbhjm0mmh5zfy37iv4s3vmq0rj49cr8fl3") + "parser-tools" (base32 "04ycihliikh0c47ivp09gayxiql9d9wpl216czic19cj6f7rmcnj") '("parser-tools" "parser-tools-doc" "parser-tools-lib")) (simple-racket-origin "pconvert" (base32 "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1") '("pconvert-lib")) (simple-racket-origin - "pict" (base32 "0v7a3l77swsbh80mnb9rakdwgw7s66ji0mall7qcqfwyg1b4zmlv") + "pict" (base32 "1n0v7kynkiin1v8igs9m8k8vfwjn5cswanhq2imp1pxzjvdyq6sx") '("pict" "pict-doc" "pict-lib")) (simple-racket-origin "pict-snip" (base32 "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x") @@ -861,7 +864,7 @@ (define-public racket "racklog" (base32 "0fbq0fpfb3l6h7h772dvkmlzlk2dnq5f8296xx1qxhhwypibqzr9") '(("racklog" "."))) (simple-racket-origin - "rackunit" (base32 "0vfwcddzrgrdv5awjka7m0jzqhqvfc5wlkih83a670y96496a83n") + "rackunit" (base32 "1gpz9sgnm8hrc0cb3rii0wzbcwp9mgy5k1amnxidy7gyzl7prn81") '("rackunit" "rackunit-doc" "rackunit-gui" @@ -874,10 +877,10 @@ (define-public racket "readline" (base32 "13kbcn2wchv82d709mw3r8n37bk8iwq0y4kpvm9dbzx0w2pxkfwn") '("readline" "readline-doc" "readline-lib")) (simple-racket-origin - "realm" (base32 "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi") + "realm" (base32 "0rlvwyd6rpyl0zda4a5p8dp346fvqzc8555dgfnrhliymkxb6x4g") '(("realm" "."))) (simple-racket-origin - "redex" (base32 "18rn8ddsqh1s7hdlb2cb9wxln63bz0wysjssaf9v92r712xnnv8i") + "redex" (base32 "06dhyqmin0qdm6b6sdvgzpy3pa4svlw42ld9k2h1dxcr852czil7") '("redex" "redex-benchmark" "redex-doc" @@ -892,7 +895,7 @@ (define-public racket "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x") '(("scheme-lib" "."))) (simple-racket-origin - "scribble" (base32 "0fbb7xgz95y90247hfc1a19v7ry8m6blvv4y8irdgzhjvik70zb3") + "scribble" (base32 "0a11kvcnzp04mp4xxq68rkl09jv00hv81k2nmwkmwpfx9b2acvd3") '("scribble" "scribble-doc" "scribble-html-lib" @@ -924,7 +927,7 @@ (define-public racket "snip" (base32 "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj") '("snip" "snip-lib")) (simple-racket-origin - "typed-racket" (base32 "0z6bagp6qiw0i3slhvq035y5hqgq664xw3bdlvdayad0bgbg0mdc") + "typed-racket" (base32 "03wsz647fi58brbg33fw1xavp100gzfvngdy8bk7bdc0jfg8a18l") '("source-syntax" "typed-racket" "typed-racket-compatibility" @@ -935,13 +938,13 @@ (define-public racket "srfi" (base32 "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn") '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib")) (simple-racket-origin - "string-constants" (base32 "0b1ji31pv6bjb0a2bh9sqp5abvf91gn2rai8r4c4nkar1fzfwfac") + "string-constants" (base32 "1kg3vxq2hcd0vl76brgpzdwbrb65a4nrrkc6hj4az5lfbbdvqz47") '("string-constants" "string-constants-doc" "string-constants-lib")) (simple-racket-origin - "swindle" (base32 "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67") + "swindle" (base32 "03n9ymjhrw45h7hxkw4nq8nidnvs9mfzb4228s2cjfaqbgqxvsyb") '(("swindle" "."))) (simple-racket-origin - "syntax-color" (base32 "17lb2403ymz6sflw4vs3gsh2y7kgsf0gn8sncsxjhi16rpj3a9vm") + "syntax-color" (base32 "02dcd4yvdnw35m3srvfd43csxffxw3j4rk6zi379b8dsvbbrjyq1") '("syntax-color" "syntax-color-doc" "syntax-color-lib")) (simple-racket-origin "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia") @@ -950,7 +953,7 @@ (define-public racket "unix-socket" (base32 "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y") '("unix-socket" "unix-socket-doc" "unix-socket-lib")) (simple-racket-origin - "web-server" (base32 "1g4x79ym3mgxv4f3z3z84j12355pf44pjlzlb7f0h6r0i7p0cbjd") + "web-server" (base32 "104lnzjykkd6f3gxpv7p14l94if6zac33nmb4sj5jxmd6r3fwcpf") '("web-server" "web-server-doc" "web-server-lib")) (simple-racket-origin "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b") From patchwork Sat Aug 27 18:55:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42007 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 206E727BBE9; Sat, 27 Aug 2022 19:58:59 +0100 (BST) 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=unavailable 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 7985227BBEA for ; Sat, 27 Aug 2022 19:58:58 +0100 (BST) Received: from localhost ([::1]:44856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11F-000527-K4 for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10N-0004Jh-Qk for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10N-0001hu-I8 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10N-0008JA-Ej for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 09/14] gnu: chez-scheme: Make bootfiles regular inputs. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665331845 (code B ref 57050); Sat, 27 Aug 2022 18:58:03 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:33 +0000 Received: from localhost ([127.0.0.1]:57075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zt-0008HS-2S for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:33 -0400 Received: from mail-vs1-f53.google.com ([209.85.217.53]:35493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zO-0008Ei-7l for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:06 -0400 Received: by mail-vs1-f53.google.com with SMTP id 67so4692381vsv.2 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=y3LQ8K3rzYxXt+MlIQWAr2vQTMgHelN8GYtEuAXdQcM=; b=Vpg1kVv2RsCkOOUO0vfSDWLRAHPx5MeoI8LkLnezS/0qTrbGpEMwY44tbRweLXALX+ m+WijpXL80yH2cunYfb9R+VmB8/E/9xPRlDVQJkDbbRkjd1gIHwbLUCkzOXaPCEuEE/0 EmUHJPwlRni86v6kRvJiIAMp/eXWz9zlOyTlCebtnJwjY41HVRzhzjOYfaigSh0FGKdr GfEc6egS7TlZPhuH9MutwOZCFbffbWM70Lqxtt1U1yJPfXj+VX31+bBsqrg+A9m+wOHF NbexCJs4Ovha2mFCQEA0RXBjsM1GapnI8tQFGFAr28rhJw+wKVB7WENvdil0MhXy674W yBuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=y3LQ8K3rzYxXt+MlIQWAr2vQTMgHelN8GYtEuAXdQcM=; b=b/bTtxpPI7bv2SdMnSFCWhE4vCU0rdj/tboemdORKElgJiNQe1sXWV362DjI/8zGu2 iOfGGi4TnRdqrtdT0jul9+dGkBKcOoEEWG8eCUS+TjHUfJSG1eVEh3+UjfQGrjnxYyPP ehepcPJ9Dja9sCEkaIxovTi5dwHCO55+Mj/qdp8mOwjz1HKtqEzhjb+dF5OWXP7yHYER NhOFZuzHsNLjHMy1vh/w/8Z5TlOwtGGd7Zzcmf6iOHboyG9W35kwPlMNJnJ1kqxQhU8N BrUmNDoA9948/bgmmCbxIDkZzWgfXhyJicztyfQEE01C9yvhkVBIT4eWsXP8woZ8Lvux Loiw== X-Gm-Message-State: ACgBeo3fX0Mt8W1vXyPGPK8+MMXejkv9q1mLNHF9AOCQCSS7sSdjO5Re s/87UIZs1u2IcNbOheaODAn1h5CT1sx/A6qg X-Google-Smtp-Source: AA6agR58yzC0hSDiKMv/fZL/R/Af9f73UEoEkqoLiuBIx4ZCKBpbnwpP9WOPipFgTuXiIBpLG+5HEA== X-Received: by 2002:a05:6102:3e1f:b0:388:9dab:9bef with SMTP id j31-20020a0561023e1f00b003889dab9befmr1364522vsv.38.1661626616720; Sat, 27 Aug 2022 11:56:56 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id g80-20020a1f9d53000000b00382d5e1b95esm737344vke.35.2022.08.27.11.56.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:56:56 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:49 -0400 Message-Id: <0f44a1c29bd332808927cc4bf679fd11dc88cf98.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (chez-scheme)[native-inputs]: Move 'chez-scheme-bootstrap-bootfiles' to ... [inputs]: ... this field. [arguments]<#:phases>: Update 'unpack-bootfiles' accordingly. (chez-scheme-for-racket)[native-inputs]: Move 'chez-scheme-for-racket-bootstrap-bootfiles' to ... [inputs]: ... this field. --- gnu/packages/chez.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index b59398578a..c87786c091 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -293,6 +293,7 @@ (define-public chez-scheme (build-system gnu-build-system) (inputs (list + chez-scheme-bootstrap-bootfiles `(,util-linux "lib") ;<-- libuuid zlib lz4 @@ -300,8 +301,7 @@ (define-public chez-scheme ;; for X11 clipboard support in expeditor: ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 libx11)) - (native-inputs (list chez-scheme-bootstrap-bootfiles - chez-nanopass-bootstrap + (native-inputs (list chez-nanopass-bootstrap stex-bootstrap)) (native-search-paths (list (search-path-specification @@ -338,7 +338,7 @@ (define-public chez-scheme (when (directory-exists? "boot") (delete-file-recursively "boot")) (copy-recursively - (search-input-directory (or native-inputs inputs) + (search-input-directory inputs "lib/chez-scheme-bootfiles") "boot"))) ;; NOTE: The custom Chez 'configure' script doesn't allow @@ -449,12 +449,12 @@ (define-public chez-scheme-for-racket (source #f) ; avoid problematic cycle with racket.scm (inputs (modify-inputs (package-inputs chez-scheme) - (delete "libx11" "util-linux:lib"))) + (delete "libx11" "util-linux:lib") + (replace "chez-scheme-bootstrap-bootfiles" + chez-scheme-for-racket-bootstrap-bootfiles))) (native-inputs (modify-inputs (package-native-inputs chez-scheme) - (prepend zuo) - (replace "chez-scheme-bootstrap-bootfiles" - chez-scheme-for-racket-bootstrap-bootfiles))) + (prepend zuo))) (arguments (substitute-keyword-arguments (package-arguments chez-scheme) ((#:out-of-source? _ #f) From patchwork Sat Aug 27 18:55:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42008 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 1A27227BBEA; Sat, 27 Aug 2022 19:59:00 +0100 (BST) 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=unavailable 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 7048127BBE9 for ; Sat, 27 Aug 2022 19:58:59 +0100 (BST) Received: from localhost ([::1]:44858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11G-00055W-Ju for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10O-0004KN-6y for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10N-0001i7-U5 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10N-0008JH-R6 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 10/14] gnu: chez-scheme-for-racket: Support cross-compilation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665431852 (code B ref 57050); Sat, 27 Aug 2022 18:58:03 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:34 +0000 Received: from localhost ([127.0.0.1]:57077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zt-0008Ha-Em for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:33 -0400 Received: from mail-vs1-f47.google.com ([209.85.217.47]:35491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zS-0008Ez-IL for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:07 -0400 Received: by mail-vs1-f47.google.com with SMTP id 67so4692469vsv.2 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=ooUpIt6v6GE6eFoJemQYYCCp1VZ+cCUGyFCLbJm82Ag=; b=ASCyFRuGkg7P7h7ErdubKW+AvLaaZfiFugJL/2BHQT/ClQrGxMrZUmYIEdC3d8LXat 8QdKVfDjVfd6lOPvWMd47CY2XY+ONHZEHQWg4cl4r9UxFIifF6zWGZ7aYJo60lmsQneA 35Cv7AHxy0fOYeD4VlW199M/GZAvBh8013kD2zZACNjfLF4R+/QVZv7WKdR66PwM6JAR 55YMXlH41ZBI5yYZedhtJzUxB1P/MauCJzJVkJ6jMH1lcXooTqm9W8xGlaGvc/emh8d4 8eGYMhGZ9vFUmtmHT/dxsCHfQo86LXiUQks4q/6VusODZi9MsGtHRzp84eV4DFvjSUZ2 cyOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=ooUpIt6v6GE6eFoJemQYYCCp1VZ+cCUGyFCLbJm82Ag=; b=vBU7ASGmQEdWAvy9i4AIdX9RTl2GiWWzbN6W7rXFW2LH4R6iIZCzE9cUAe6zE2s2ne QjTdPxYWzze2TTG6GQLrRgOEhAbDYPfj2kiJPzws/In5vz6nEDWR2+ZxtwO7BGq7oX60 +tYjU7h7baCID0J1OCV7DAj7RZbbe/CDfDe7bwE41s6B2z+7f0BTrdWNLOzibQrt6II7 N0sZT6UqcMZdP+OnwLxKHJRRMNQckeojV1vbOuyuMRG91aMOffvJKj2Z/Y+i7mg3jFKA E8scLOk6b9uYCmLAU/Q7aQXKySGSwU5rZ1Grxvumc9uTid0ePFv86NWXelegoWw41rIJ N8pQ== X-Gm-Message-State: ACgBeo2F9zywpef3sjUIpZUI6hGg1naGMxhQ2FscDHKFclpJdMvC1Uvv vKTDwH96Rahmx7ncFepgzqAzJkF/29otNQio X-Google-Smtp-Source: AA6agR68CEcAyQAS4/15apZHAXEjwXAKEHBjSN+HzMBwVNy1DWa4vHgz17NakQjDJWwv83AijXsAAQ== X-Received: by 2002:a05:6102:3f55:b0:390:c753:3565 with SMTP id l21-20020a0561023f5500b00390c7533565mr909851vsv.13.1661626620967; Sat, 27 Aug 2022 11:57:00 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id l124-20020a1ffe82000000b0037613541b27sm733728vki.39.2022.08.27.11.57.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:57:00 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:50 -0400 Message-Id: <66d68c8973ac72a28424697187cc936ee941c6d4.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (racket-cs-native-supported-system): Change to return the applicable machine type instead of '#t'. (chez-scheme-for-racket)[native-inputs]: When cross-compiling, add 'this-package'. [arguments]<#:configure-flags>: When cross-compiling, supply '-m=' and '--toolprefix='. <#:phases>: Work around cross-compilation issues in 'build' and 'install-docs'. (chez-scheme-for-racket-bootstrap-bootfiles): When cross-compiling, use 'zuo' and 'chez-scheme-for-racket' instead of 'racket-vm-bc'. [arguments]<#:phases>: Adapt 'build' phase for cross-compilation. --- gnu/packages/chez.scm | 85 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 15 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index c87786c091..26f653ea9d 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -235,14 +235,15 @@ (define* (racket-cs-native-supported-system? #:optional (system (or (%current-target-system) (%current-system)))) - "Can Racket's variant of Chez Scheme generate native code for SYSTEM? -Otherwise, SYSTEM can use only the ``portable bytecode'' backends." + "Can Racket's variant of Chez Scheme generate native code for SYSTEM? If +so, return the applicable machine type as a string. Otherwise, when SYSTEM +can use only the ``portable bytecode'' backends, return #f." (let ((chez-arch (target-chez-arch system)) (chez-os (target-chez-os system))) (and (and=> (assoc-ref %chez-features-table chez-os) ;; NOT assoc-ref: supported even if cdr is #f (cut assoc chez-arch <>)) - #t))) + (string-append "t" chez-arch chez-os)))) ;; ;; Chez Scheme: @@ -453,8 +454,12 @@ (define-public chez-scheme-for-racket (replace "chez-scheme-bootstrap-bootfiles" chez-scheme-for-racket-bootstrap-bootfiles))) (native-inputs - (modify-inputs (package-native-inputs chez-scheme) - (prepend zuo))) + (let ((native-inputs (modify-inputs (package-native-inputs chez-scheme) + (prepend zuo)))) + (if (%current-target-system) + (modify-inputs native-inputs + (prepend this-package)) + native-inputs))) (arguments (substitute-keyword-arguments (package-arguments chez-scheme) ((#:out-of-source? _ #f) @@ -468,6 +473,15 @@ (define-public chez-scheme-for-racket ((#:configure-flags cfg-flags #~'()) #~`("--disable-x11" "--threads" ;; ok to potentially duplicate + #$@(if (%current-target-system) + (list (string-append "-m=" + (racket-cs-native-supported-system?))) + '()) + #$@(if (%current-target-system) + (list (string-append "--toolprefix=" + (%current-target-system) + "-")) + '()) ,@(let* ((chez+version (strip-store-file-name #$output)) (doc-prefix (assoc-ref %outputs "doc")) (doc-dir (string-append doc-prefix @@ -490,18 +504,42 @@ (define-public chez-scheme-for-racket #$mk-flags)) ((#:phases those-phases #~%standard-phases) #~(let* ((those-phases #$those-phases) - (unpack (assoc-ref those-phases 'unpack))) + (gnu:unpack (assoc-ref those-phases 'unpack)) + (gnu:build (assoc-ref those-phases 'build))) (modify-phases those-phases + (replace 'build + ;; need to override target for cross-compilation + ;; https://racket.discourse.group/t/950/19 + (lambda* (#:key target (make-flags '()) (parallel-build? #t) + #:allow-other-keys) + (gnu:build #:make-flags (if target + (cons "kernel" make-flags) + make-flags) + #:parallel-build? parallel-build?))) (replace 'install-docs - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key native-inputs (make-flags '()) + #:allow-other-keys) + ;; The tests for 'native-inputs' are cross-compilation + ;; workarounds that would be better to address upstream: + ;; see . + (when native-inputs + (substitute* "Makefile" + (("install-docs: build \\$[(]ZUO[)]") + "install-docs: $(ZUO)"))) (apply invoke "make" "install-docs" - make-flags))) + (if native-inputs + (cons (string-append + "Scheme=" + (search-input-file native-inputs + "/bin/scheme")) + make-flags) + make-flags)))) (replace 'unpack (lambda args - (unpack #:source #$(or (package-source this-package) - (package-source racket-vm-bc))))) + (gnu:unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) (add-after 'unpack 'chdir (lambda args (chdir "racket/src/ChezScheme")))))))) @@ -583,8 +621,12 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (name "chez-scheme-for-racket-bootstrap-bootfiles") (version (package-version chez-scheme-for-racket)) (source #f) ; avoid problematic cycle with racket.scm - (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) - ;; TODO: cross compilation + (native-inputs + (cons* chez-nanopass-bootstrap + (if (%current-target-system) + (list zuo + chez-scheme-for-racket) + (list racket-vm-bc)))) (arguments (substitute-keyword-arguments (package-arguments chez-scheme-bootstrap-bootfiles) @@ -604,9 +646,22 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles #$unpack-nanopass+stex)) (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke (search-input-file (or native-inputs inputs) - "/opt/racket-vm/bin/racket") - "rktboot/main.rkt")))))))) + #$(cond + ((%current-target-system) + ;; cross-compiling + #~(invoke + (search-input-file (or native-inputs inputs) + "/bin/zuo") + "makefiles/boot.zuo" + (search-input-file (or native-inputs inputs) + "/bin/scheme") + #$(racket-cs-native-supported-system?))) + (else + ;; bootstrapping + #~(invoke + (search-input-file (or native-inputs inputs) + "/opt/racket-vm/bin/racket") + "rktboot/main.rkt")))))))))) (supported-systems (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") From patchwork Sat Aug 27 18:55:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42010 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 889E827BBEA; Sat, 27 Aug 2022 19:59:09 +0100 (BST) 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=unavailable 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 F22A827BBE9 for ; Sat, 27 Aug 2022 19:59:08 +0100 (BST) Received: from localhost ([::1]:42384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11Q-0005jN-5c for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10O-0004L7-Kx for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10O-0001iE-Bv for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10O-0008JO-8d for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 11/14] gnu: racket: Support cross-compiling the VM packages. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665431860 (code B ref 57050); Sat, 27 Aug 2022 18:58:04 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:34 +0000 Received: from localhost ([127.0.0.1]:57079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zu-0008Hh-1Z for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:34 -0400 Received: from mail-ua1-f54.google.com ([209.85.222.54]:34701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zW-0008GE-Tt for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:11 -0400 Received: by mail-ua1-f54.google.com with SMTP id s5so1696662uar.1 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=/nM7qIywAt/bOJqIUq/dp6+Lul98wutFn3ncNxCKjWA=; b=W8r32dilOFuvOcYmS32awotJ0e0O3YBLPPs6bKWhX4Aur8gLpIpwspRTwEuGkDxGpd WwdPXu3/5bppoWZqZmku5H7tYDtrV3K+an/+7XM3Par6I60oT1x9EX1Hwsi420bltu/k ufd+ELEokULUJzGH5DCVh2b9qJ7xGkUYmrY/JvQypfjvEPemn1pyhe+XF3/pTX49Ya3A Z3D49lqlqmlaKfHZhF8ovTvuPf4x6fXCwj2MNPgKgSkaM44VgJE3y8ZuLIlp9rhWthmR judamQu9J/6OyIANMnlBx2cNWIwC889G6iZ7/+6omWDYF0o1MwUxbIE+Q39kzZZnExkk i0xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=/nM7qIywAt/bOJqIUq/dp6+Lul98wutFn3ncNxCKjWA=; b=w7MS4cCCyZ3bDPOwVY8EfjiTO2iPOHxLWCHXOdnmZZjx+U5wrHfc7HTohXfdnuCmAB g+Ve3CXCk0J2oulY451PyyHO/e1Fk8+FVfd8HvnrmXTxsh5+G3iaytBk19nRaTRDJMKk laMiR7DlYQ/ouqTBl6JRpXVp9PsRMmcJT6If5B18ivMhFeXpiknPe4J6D/rLPA2CcyAD OzK6+w8zw+1fLmIgHgsr3IaDmatnlLRHrW8o//nnLUH89AGWVfU08PAvzXuFyNOTa/xz rou2dEqpBkJlSImB+C4oXAiBA+tytEEjQlxXCQlLgkB0d3kzQ7TfDTQHswpjcYFBh5lD B56Q== X-Gm-Message-State: ACgBeo3pl1wuKoqP8sCKsFLZeZqY0OE9RJcpWGXdGnhscFwE4qhfGeAc 7PaBiaLymnXB2yvh34+bt7PfXIBz7DGJfy30 X-Google-Smtp-Source: AA6agR6hQUq8w1+LP7yuQbrThtvfqvw2JEiXIVi4t0dZbeJBE1yP3iDivSZDT5TbGhxblKCnIO4MJQ== X-Received: by 2002:a9f:2f0c:0:b0:38c:6559:3c5d with SMTP id x12-20020a9f2f0c000000b0038c65593c5dmr1650877uaj.121.1661626625353; Sat, 27 Aug 2022 11:57:05 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id v21-20020ab07055000000b0039f2ed540fbsm805388ual.15.2022.08.27.11.57.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:57:05 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:51 -0400 Message-Id: <2db8cb32ba8b8ca5edd3f76334b0bda0a91d6d15.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches Cross-compilation works for 'racket-vm-cgc', 'racket-vm-bc', and 'racket-vm-cs'. These changes are not enough to cross-compile 'racket-minimal' or 'racket': that would require building and loading cross-compilation pluggins for 'racket-vm-cs', which will be much easier once we can build the package 'raco-cross'. * gnu/packages/racket.scm (racket-vm-cgc): Add 'this-package' when cross-compiling. (racket-vm-bc)[native-inputs]: Adjust accordingly. (racket-vm-cs)[native-inputs]: Use 'racket-vm-cs' instead of 'racket-vm-bc' when cross-compiling. Adapt to changes to 'racket-vm-cgc'. [arguments]<#:configure-flags>: Fix '--enable-scheme' for cross-compilation. --- gnu/packages/racket.scm | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 349cf38e07..4fcdd2f721 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -312,8 +312,11 @@ (define-public racket-vm-cgc (source %racket-origin) (inputs (list ncurses ;; <- common to all variants (for #%terminal) libffi)) ;; <- only for BC variants - (native-inputs (list zuo ;; <- for all variants - libtool)) ;; <- only for BC variants + (native-inputs (cons* zuo ;; <- for all variants + libtool ;; <- only for BC variants + (if (%current-target-system) + (list this-package) + '()))) (outputs '("out" "debug")) (build-system gnu-build-system) (arguments @@ -401,8 +404,10 @@ (define-public racket-vm-bc (inherit racket-vm-cgc) (name "racket-vm-bc") (native-inputs - (modify-inputs (package-native-inputs racket-vm-cgc) - (prepend racket-vm-cgc))) + (if (%current-target-system) + (package-native-inputs racket-vm-cgc) + (modify-inputs (package-native-inputs racket-vm-cgc) + (prepend racket-vm-cgc)))) (arguments (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) @@ -432,11 +437,17 @@ (define-public racket-vm-cs (prepend zlib lz4) (delete "libffi"))) (native-inputs - (modify-inputs (package-native-inputs racket-vm-cgc) - (delete "libtool") - (prepend chez-scheme-for-racket - chez-nanopass-bootstrap - racket-vm-bc))) + (let ((native-inputs (package-native-inputs racket-vm-cgc))) + (modify-inputs (if (%current-target-system) + (modify-inputs native-inputs + (delete "racket-vm-cgc")) + native-inputs) + (delete "libtool") + (prepend chez-scheme-for-racket + chez-nanopass-bootstrap + (if (%current-target-system) + racket-vm-cs + racket-vm-bc))))) (arguments (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:phases those-phases #~%standard-phases) @@ -450,7 +461,7 @@ (define-public racket-vm-cs "--enable-libz" "--enable-lz4" (string-append "--enable-scheme=" - #$(this-package-native-input + #+(this-package-native-input "chez-scheme-for-racket") "/bin/scheme") #$racket-vm-common-configure-flags)))) From patchwork Sat Aug 27 18:55:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42009 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 3A04C27BBEA; Sat, 27 Aug 2022 19:59:08 +0100 (BST) 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=unavailable 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 54BAE27BBE9 for ; Sat, 27 Aug 2022 19:59:07 +0100 (BST) Received: from localhost ([::1]:56062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11O-0005dY-Fz for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:59:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10P-0004OJ-P7 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10P-0001iU-GC for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10P-0008Je-4l for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 12/14] gnu: chez-scheme-for-racket: Support all systems. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665531875 (code B ref 57050); Sat, 27 Aug 2022 18:58:05 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:35 +0000 Received: from localhost ([127.0.0.1]:57083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zu-0008Hw-TE for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:35 -0400 Received: from mail-ua1-f51.google.com ([209.85.222.51]:39734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zb-0008GT-Iv for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:16 -0400 Received: by mail-ua1-f51.google.com with SMTP id i5so1679400uat.6 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=6zzoKv40bqMpLMAJ4GX3nZVkALszTkt3Y0AWxUTi/OY=; b=OCzbX3ltvN390Et8uGz9reor9+iuGxSJpH2dydVsUOxbBZu75OIaj4JFpmm5gTLcYj z6sdzXJhiumGoRP0Hso7MvfJVd3z+WS9BZ24yLxgkllr1H/0T+Ig/AgMQOTNdruesQAt 7nbG8n1N73a6hjY/Pam1W+XJK0xXMfcUaw9zgfER+Vt1vvJvLeruPQbiMD4voAtr1qkr nw744fCAa5oi79dAyTHXuXD4s79JMH0L3XNZr3M0DeuMYG4bHmsylSxw6OuOlKOmQ7s7 5Dn0n4JwCPmXq7wOkgL/5DdwoDzEKg0Zw2uUGt9muRwyFJiMO60ZSz90LLjCs9Jg2kGT tvgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=6zzoKv40bqMpLMAJ4GX3nZVkALszTkt3Y0AWxUTi/OY=; b=ufYXZ7KuZxWS5eTbKAwE5QOCa645RJmg4cp5eRTmWvFZIcHHsIg0OHATPnfgISENLU e8jo0FyrCer7oCpus32nTdQvdGFPB3NoPKdL7Syl2/357HVmH7429g/k2kmxZtXVFbIy 5yeBodduW1mUe5wKUOEyDjmMep5gfhfkZlwKt/GSbcPHW0nZMGt/Ybm0cuUnBF396jEi O7hWwt2QiQiQL/pHhKKh62PuCdKezgpkxqtnbD+lrOeqTca9s8PbQIY9klggieY3frU5 y5jzrQsdopMYjBOF+sie3MIq7fgSRGCjvnD3tV3DWO6h1bxb59gdcXX1aSLe+Be0rBhk +t6w== X-Gm-Message-State: ACgBeo11rGdsiZMjWhURNudpGanKWLU7URGlTDsx06ZKPEjTVNlSp7vd gpphLO77TMwnjqxClRhTy6fwv5a0HJMOAiW5 X-Google-Smtp-Source: AA6agR4zxW02s4lREo3KFrvIndLHLWCNP//cwYArSIed0fZLbVpBGzqGU6q0TtIjwLJt4cQjr5npvg== X-Received: by 2002:ab0:2713:0:b0:391:50f7:88b5 with SMTP id s19-20020ab02713000000b0039150f788b5mr1565000uao.109.1661626629772; Sat, 27 Aug 2022 11:57:09 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id x5-20020a67eb45000000b003909ba83c32sm599591vso.5.2022.08.27.11.57.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:57:09 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:52 -0400 Message-Id: X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches On systems for which Racket's variant of Chez Scheme cannot generate native code, it can use a 'pbarch' machine type: a variant of the ``portable bytecode'' backend specialized to word size and endianness. This allows Racket CS to replace Racket BC on those systems while maintaining comparable performance. (Racket BC lacks JIT support for those systems anyway.) It also lets us provide a Chez Scheme package on all systems Guix supports. This patch adds 'pbarch' support to both 'chez-scheme-for-racket' and 'racket-vm-cs', but it does not change the Racket VM implementation used for the 'racket' and 'racket-minimal' packages. * gnu/packages/chez.scm (nix-system->pbarch-machine-type): New variable. (chez-scheme-for-racket)[inputs]: Use 'libffi' for non-native systems. [arguments]<#:configure-flags>: Always supply '-m='. Add applicable flags for non-native systems. [supported-systems]: Use '%supported-systems'. [description]: Update. (chez-scheme-for-racket-bootstrap-bootfiles)[arguments]<#:phases>: Adapt 'build' phase for non-native systems. * gnu/packages/racket.scm (racket-vm-bc)[description]: Update. (racket-vm-cs)[description]: Likewise. [inputs]: Use 'libffi' for non-native systems. [arguments]<#:configure-flags>: Add applicable flags for non-native systems. --- gnu/packages/chez.scm | 76 ++++++++++++++++++++++++++++++----------- gnu/packages/racket.scm | 26 +++++++++----- 2 files changed, 74 insertions(+), 28 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 26f653ea9d..5d152b3db5 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -37,6 +37,7 @@ (define-module (gnu packages chez) #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) #:use-module (gnu packages netpbm) #:use-module (gnu packages racket) @@ -49,6 +50,7 @@ (define-module (gnu packages chez) #:use-module (srfi srfi-26) #:export (chez-scheme-for-system racket-cs-native-supported-system? + nix-system->pbarch-machine-type unpack-nanopass+stex)) ;; Commentary: @@ -231,6 +233,28 @@ (define* (chez-upstream-features-for-system #:optional (and=> (assoc-ref %chez-features-table chez-os) (cut assoc-ref <> chez-arch)))) +(define* (nix-system->pbarch-machine-type #:optional + (system + (or (%current-target-system) + (%current-system))) + #:key (threads? #t)) + "Return a string naming the pseudo–machine type used by Racket's variant of +Chez Scheme to represent the appropriate ``pbarch'' backend for SYSTEM: that +is, the ``portable bytecode'' backend specialized for SYSTEM's word size and +endianness. The result will name the threaded machine type unless THREADS? is +provided and is #f." + (string-append (if threads? + "t" + "") + "pb" + (if (target-64bit? system) + "64" + "32") + ;; missing (guix utils) predicate target-little-endian? + (if (target-ppc32? system) + "b" + "l"))) + (define* (racket-cs-native-supported-system? #:optional (system (or (%current-target-system) @@ -449,10 +473,14 @@ (define-public chez-scheme-for-racket ;; When updating, remember to also update %racket-version in racket.scm. (source #f) ; avoid problematic cycle with racket.scm (inputs - (modify-inputs (package-inputs chez-scheme) - (delete "libx11" "util-linux:lib") - (replace "chez-scheme-bootstrap-bootfiles" - chez-scheme-for-racket-bootstrap-bootfiles))) + (let ((inputs (modify-inputs (package-inputs chez-scheme) + (replace "chez-scheme-bootstrap-bootfiles" + chez-scheme-for-racket-bootstrap-bootfiles) + (delete "libx11" "util-linux:lib")))) + (if (racket-cs-native-supported-system?) + inputs + (modify-inputs inputs + (prepend libffi))))) (native-inputs (let ((native-inputs (modify-inputs (package-native-inputs chez-scheme) (prepend zuo)))) @@ -473,10 +501,16 @@ (define-public chez-scheme-for-racket ((#:configure-flags cfg-flags #~'()) #~`("--disable-x11" "--threads" ;; ok to potentially duplicate - #$@(if (%current-target-system) - (list (string-append "-m=" - (racket-cs-native-supported-system?))) - '()) + #$(string-append "-m=" (or (racket-cs-native-supported-system?) + (nix-system->pbarch-machine-type))) + ;; ^ could skip -m= for non-cross non-pbarch builds + #$@(if (racket-cs-native-supported-system?) + #~() + ;; not inferred on non-native platforms: see + ;; https://racket.discourse.group/t/950/9 + #~("--enable-libffi" + "CFLAGS=-g -O2 -D_REENTRANT -pthread" + "LIBS=-lm -ldl -lrt -lffi -lncurses")) #$@(if (%current-target-system) (list (string-append "--toolprefix=" (%current-target-system) @@ -543,10 +577,7 @@ (define-public chez-scheme-for-racket (add-after 'unpack 'chdir (lambda args (chdir "racket/src/ChezScheme")))))))) - ;; TODO: How to build pbarch/pbchunks for other systems? - ;; See https://racket.discourse.group/t/950 - (supported-systems (filter racket-cs-native-supported-system? - %supported-systems)) + (supported-systems %supported-systems) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, ;; but it's designed to be a friendly landing place for people @@ -559,13 +590,17 @@ (define-public chez-scheme-for-racket Main additions to Chez Scheme in the Racket variant: @itemize @bullet @item -AArch64 support +AArch64 code generation @item -Portable bytes (@code{pb}) support, which is mainly useful for bootstrapping -a build on any supported platform +Portable bytecode (@code{pb}) mode, which is mainly useful for bootstrapping a +build on any platform, but can also be used on platforms without native-code +generation, compiled via Emscripten, linked with @code{libffi}, or used with +bytecode partially compiled to C @item Unboxed floating-point arithmetic and flvectors @item +Faster multiplication and division for large exact numbers +@item Type reconstruction during optimization (especially for safe code) @item Continuation attachments @@ -576,8 +611,6 @@ (define-public chez-scheme-for-racket @item Ordered finalization, immobile (but collectable) objects, weak/ephemeron generic hash tables, and reference bytevectors -@item -Faster multiplication and division for large exact numbers @end itemize") (license asl2.0))) @@ -655,13 +688,18 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles "makefiles/boot.zuo" (search-input-file (or native-inputs inputs) "/bin/scheme") - #$(racket-cs-native-supported-system?))) + #$(or (racket-cs-native-supported-system?) + (nix-system->pbarch-machine-type)))) (else ;; bootstrapping #~(invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") - "rktboot/main.rkt")))))))))) + "rktboot/main.rkt" + #$@(if (racket-cs-native-supported-system?) + #~() + (let ((m (nix-system->pbarch-machine-type))) + #~("--machine" #$m))))))))))))) (supported-systems (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 4fcdd2f721..264b44b7fd 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -311,7 +311,7 @@ (define-public racket-vm-cgc (version %racket-version) (source %racket-origin) (inputs (list ncurses ;; <- common to all variants (for #%terminal) - libffi)) ;; <- only for BC variants + libffi)) ;; <- for BC and non-native CS variants (native-inputs (cons* zuo ;; <- for all variants libtool ;; <- only for BC variants (if (%current-target-system) @@ -417,10 +417,8 @@ (define-public racket-vm-bc (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written in C targeting architecture-independent bytecode, plus a JIT compiler on most -platforms. Racket BC has a different C API and supports a slightly different -set of architectures than the current default runtime system, Racket CS (based -on ``Chez Scheme''). It is the recommended implementation for architectures -that Racket CS doesn't support. +platforms. Racket BC has a different C API than the current default runtime +system, Racket CS (based on ``Chez Scheme''). This package is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Manager'').") @@ -433,9 +431,12 @@ (define-public racket-vm-cs (inherit racket-vm-bc) (name "racket-vm-cs") (inputs - (modify-inputs (package-inputs racket-vm-cgc) - (prepend zlib lz4) - (delete "libffi"))) + (let ((inputs (modify-inputs (package-inputs racket-vm-cgc) + (prepend zlib lz4)))) + (if (racket-cs-native-supported-system?) + (modify-inputs inputs + (delete "libffi")) + inputs))) (native-inputs (let ((native-inputs (package-native-inputs racket-vm-cgc))) (modify-inputs (if (%current-target-system) @@ -464,12 +465,19 @@ (define-public racket-vm-cs #+(this-package-native-input "chez-scheme-for-racket") "/bin/scheme") + #$@(if (racket-cs-native-supported-system?) + #~() + #~(#$(string-append "--enable-mach=" + (nix-system->pbarch-machine-type)) + "--enable-pb")) #$racket-vm-common-configure-flags)))) (synopsis "Racket CS implementation") (description "The Racket CS implementation, which uses ``Chez Scheme'' as its core compiler and runtime system, has been the default Racket VM implementation since Racket 8.0. It performs better than the Racket BC -implementation for most programs. +implementation for most programs. On systems for which Racket CS cannot +generate machine code, this package uses a variant of its ``portable +bytecode'' backend specialized for word size and endianness. Using the Racket VM packages directly is not recommended: instead, install the @code{racket-minimal} or @code{racket} packages.") From patchwork Sat Aug 27 18:55:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42006 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 D959F27BBEB; Sat, 27 Aug 2022 19:58:58 +0100 (BST) 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=unavailable 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 63E2427BBE9 for ; Sat, 27 Aug 2022 19:58:58 +0100 (BST) Received: from localhost ([::1]:44854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11F-000521-IK for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10P-0004MR-3Q for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10O-0001iK-QV for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10O-0008JX-MO for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 13/14] gnu: racket-vm-bc: Add workaround for ppc64le. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665531867 (code B ref 57050); Sat, 27 Aug 2022 18:58:04 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:35 +0000 Received: from localhost ([127.0.0.1]:57081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zu-0008Hp-HE for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:34 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:41734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0za-0008Df-FB for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:14 -0400 Received: by mail-vs1-f41.google.com with SMTP id k2so4666950vsk.8 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=YU4ih04xkhF5TGuDL+m5IHS3ZamHPV1zq/3MmOm+d5A=; b=PWEFotXkdrfuWG+K6BoZ13I/Z65Fz3dzeWy1iASoOYkkG2W0oK8Zw4qyflSHsvhWw2 MGQVOCHMAOtFpZj8VP1k1MWDG4+tcv/WyUZYE2IabhDzgDBDYMegn80swzQB5NpFygwn x5psf+GTyw8WlstTZgnLwhvh5Ivlv7R2lLywZOFAmfG1I8wo7qANiZsCu5cSFdRaUhEw N0VZbxDeWE6uATGXeO79FhnmLBcKlpHUPou/t21HsNglJNg5/g93sNVY3SwtqMyJNw/5 g3LCsNccP/h4/Jw3L3s9Ben+9el6AfvslhPo7GB+4q0OgKi/3MtcGnqmkQybAUR7/bSf Z2Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=YU4ih04xkhF5TGuDL+m5IHS3ZamHPV1zq/3MmOm+d5A=; b=YCbqAnrx3u6oJidwT+5d9OYFX3/629PojiX/nk8FA+Dn8+vRTJA/JO2N8TUYXuRRtz 3H9154+1vLIAhSzKllxbny0F3G22pEVwFR3UzQf9IflSNfm+rp0hcThKifHxa69PUzdW 7Ac/p1IrJHW81haUkcunJzaZDamfMxMAvC25sSk+9kSyHPULTEoCkZCuE/mwq2Yfp9j0 /SgzGAeIYZ/TRHwLlzfEJsQLHXLZgFDqKNuwe03JjSKBrJJipQ72I7rj8HTC0R+P6WxX RgAb3to9aGDY54H4au7GfIo5gekO7PAPOH3r78Z2eD8esPSMhowDkp/OeeDX9DKwFXak 4G9A== X-Gm-Message-State: ACgBeo36sr5YHbNSLlTzJFcPLR+J5HecIi5efXltVqKWWM0Qjk/E25EE xVwqca7CU+MK72PMURB1gy/Eq9jR5v9XjFiX X-Google-Smtp-Source: AA6agR5gJk1uDwYICbDwRMJYq/D1upoLUDOx8vMGyHKMBXcE7CdRC5M7De1ItUVND65CzmXFD239QA== X-Received: by 2002:a67:ef8c:0:b0:390:1f12:16c0 with SMTP id r12-20020a67ef8c000000b003901f1216c0mr1533639vsp.9.1661626634089; Sat, 27 Aug 2022 11:57:14 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id 196-20020a1f16cd000000b0039452821f2asm164852vkw.25.2022.08.27.11.57.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:57:13 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:53 -0400 Message-Id: <3b4d21a89901a434b1d37f53a0ad7f51a0e4adfa.1661626113.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches This is an attempt to avoid a problem with Racket BC on ppc64 reported in that was exposed by attempting to use Racket BC to bootstrap Chez Scheme. Thanks to Matthew Flatt for the workaround: . * gnu/packages/racket.scm (racket-vm-bc)[arguments]<#:configure-flags>: Increase the number of bytes that should be available on the stack for "safety" when checking for stack overflow. --- gnu/packages/racket.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 264b44b7fd..74052d47eb 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -412,7 +412,20 @@ (define-public racket-vm-bc (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" - #$racket-vm-common-configure-flags)))) + #$(cond + ((target-ppc64le?) + ;; Attempt to avoid a problem bootstrapping Chez Scheme: + ;; see + ;; and . + #~(map + (lambda (flag) + (if (string-prefix? "CPPFLAGS=" flag) + (string-append flag + " -DSTACK_SAFETY_MARGIN=2000000") + flag)) + #$racket-vm-common-configure-flags)) + (else + racket-vm-common-configure-flags)))))) (synopsis "Racket BC [3M] implementation") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written From patchwork Sat Aug 27 18:55:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42011 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 2B58127BBEA; Sat, 27 Aug 2022 19:59:28 +0100 (BST) 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=unavailable 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 97FDB27BBE9 for ; Sat, 27 Aug 2022 19:59:27 +0100 (BST) Received: from localhost ([::1]:42390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11i-00064v-PV for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:59:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10Q-0004Pe-6j for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10P-0001ie-S9 for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10P-0008Jl-Od for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 14/14] gnu: racket: Use Racket CS on all systems. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Aug 2022 18:58:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57050@debbugs.gnu.org Cc: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166162665631881 (code B ref 57050); Sat, 27 Aug 2022 18:58:05 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:36 +0000 Received: from localhost ([127.0.0.1]:57085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zv-0008I5-Nc for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:36 -0400 Received: from mail-ua1-f50.google.com ([209.85.222.50]:40725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zj-0008Gr-SI for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:24 -0400 Received: by mail-ua1-f50.google.com with SMTP id i11so1672915ual.7 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=K6VMqV4XxLH2WG0Se6j4cPrQ0FaxrHYwnuyjyKquvEM=; b=V4QX8hF46bjXO14oXoAUWqQAr49U+0+CTJkDag2agt+KfBWUJSGV5xa5S+xz/gD7K5 iSe/sJqgPrq//JmV+uxe87/jZKEQx9nVBrNdY/uBJnrGyP4Z7MmjRE8Z5hRNaGc3yCNN eZfkt+j6FMYYBQBuc+ygOkoShyr99tlIpsYUGPXhaOKaow80G9V9MlPNvBhClFuNxHHN c3ydhP/1B6GnhGJ8K7QmEsPJw3BcqzlSBNd/NP/xSdPEBnW/su80sM2VHR82XzRXDuRp iNOWNrbaPumvTQffio+gm05LVO0s6Hf3HZTnaW32vUPm2bZ0MARMhAUwIdQHqzJ3F90f QVzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=K6VMqV4XxLH2WG0Se6j4cPrQ0FaxrHYwnuyjyKquvEM=; b=hwxKZRqZf2WyBf/vGpU8kZ+nKeoh+W1HHWtW15KT21ZFM81dX4cPguX2RM6ugBC0zU +BY0ZqR1Mo6KX5gKRqnmVTT2up4EVhLjIRwqhEHOGo5vx1iG7CpBVEtJujhBnDfr0GUF PMFzPX/rCOiyfu3a2lsfRPAZTwVXxqtObbpcUp1diJtabDz4wdED8ZcAWb76SUDYDPeu uZ9KnlhvN80w8urfCa1qMBfpHqM+SfMautcSM7d3p2d9ehZKmkHA7tMuCH/4iELbXH88 CGZa6JfvMZ4GAMWGeHg6bGaLdAnzfDGr963D6pExXj3iLe9Pa1sb/01C+w1f9OFACK3L 7uFA== X-Gm-Message-State: ACgBeo0o0g5+u5iAZCrOan4MJ0K13FOCnW2w4v4wtF1Dyr8XL0ZOWXsS /GP7TtCmAU10ZZdDYV/k96NFwlI+pSyZxR9G X-Google-Smtp-Source: AA6agR72htVr9ckmvDuSCI3HT8IMI0lIHEnVvtfaHAYgKkBm4JD0Ol7iKF7i6YUL1nkRwRgd4XjZ7A== X-Received: by 2002:ab0:6685:0:b0:39f:6fb0:870a with SMTP id a5-20020ab06685000000b0039f6fb0870amr1560905uan.61.1661626638353; Sat, 27 Aug 2022 11:57:18 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id l191-20020a1f25c8000000b003793fcd6747sm738177vkl.13.2022.08.27.11.57.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:57:18 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:54 -0400 Message-Id: X-Mailer: git-send-email 2.32.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" X-getmail-retrieved-from-mailbox: Patches This patch uses the 'pbarch' support added to 'racket-vm-cs' to make it the default Racket VM implementation on all systems. * gnu/packages/racket.scm (racket-vm-for-system): Remove. (racket-minimal, racket)[inputs]: Replace '(racket-vm-for-system)' with 'racket-vm-cs'. --- gnu/packages/racket.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 74052d47eb..32ea866bff 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -128,10 +128,9 @@ (define-module (gnu packages racket) ;; This file defines the packages 'racket-vm-cgc', 'racket-vm-bc', and ;; 'racket-vm-cs'. All three are in-place builds of 'racket/src/' and ;; 'racket/collects/' and are installed to 'opt/racket-vm/' in the store -;; output. The function 'racket-vm-for-system' returns the recomended Racket -;; VM package for a given system. +;; output. ;; -;; We then define the packages 'racket-minimal' and +;; Using 'racket-vm-cs', we then define the packages 'racket-minimal' and ;; 'racket'. These use Racket's support for ``layered installations'', which ;; allow an immutable base layer to be extended with additional packages. ;; They use the layer configuration directly provide ready-to-install FHS-like @@ -192,17 +191,6 @@ (define-module (gnu packages racket) ;; ;; CODE: -(define* (racket-vm-for-system #:optional - (system (or (%current-target-system) - (%current-system)))) - "Return 'racket-vm-cs' if we are able to build it for SYSTEM; 'racket-vm-bc' -otherwise." - ;; Once we figure out the issues in https://racket.discourse.group/t/950, - ;; we can use 'racket-vm-cs' everywhere. - (if (racket-cs-native-supported-system? system) - racket-vm-cs - racket-vm-bc)) - (define %racket-version "8.6") ; Remember to update chez-scheme-for-racket! (define %zuo-version "1.0") ; defined in racket/src/zuo/zuo.c (define %racket-commit @@ -566,7 +554,7 @@ (define-public racket-minimal (inputs (list openssl sqlite - (racket-vm-for-system) + racket-vm-cs (racket-packages-origin "base" %racket-origin '(("base" "pkgs/base") @@ -684,7 +672,7 @@ (define-public racket unixodbc libedit ;; TODO reconsider in light of expeditor and readline-gpl racket-minimal ;; <-- TODO non-tethered layer - (racket-vm-for-system) + racket-vm-cs (simple-racket-origin "2d" (base32 "0fb5v6058ls08xw3zbmqyr2ym0psm119gl9ffgmhm9w8rs9i4dq7") '("2d" "2d-doc" "2d-lib"))