From patchwork Thu Aug 25 08:54:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41937 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 EDBF627BBE9; Thu, 25 Aug 2022 09:56:37 +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 90EF727BBE9 for ; Thu, 25 Aug 2022 09:56:37 +0100 (BST) Received: from localhost ([::1]:34098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8fE-0000q9-C8 for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:56:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ei-0000kU-1a for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8eg-0002zo-OL for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8eg-0002Yy-Dz for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08:56: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.16614177229705 (code B ref 57050); Thu, 25 Aug 2022 08:56:02 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:22 +0000 Received: from localhost ([127.0.0.1]:48860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8e2-0002WS-9e for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:22 -0400 Received: from mail-vs1-f46.google.com ([209.85.217.46]:42729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8e1-0002WE-IU for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:21 -0400 Received: by mail-vs1-f46.google.com with SMTP id p6so19816735vsr.9 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:21 -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=FxIbfDZrY2N66lj1z41qsg/7eHZBWPB/6HCysfqnKix11N5SCHY+I5c/cC/1+rD1H9 ddmhniidfk1X8BVA9Yyr8968sudwI3Q07dXZh94FuD193PjFSE3eL56MAn/9ybhoa/Rc 45H/sWkYEYkk3adGZgOUUN4UdpyCJQjeKqNo47acspx+qyUbdDtY7U7nqaCqboODHY9l eXQUCxYg2DC8+c7Pi/LI3Xg9ObFdZFzLM5ZrGgAbkHlR4/rattDHCJ5hlpWgJP+fC8x9 rRz7H1YIVUFZ/C/FPKXwLUqOhMJFHBATi2Mi27mmFhf84FXc35+VpWtbCdwkWreUQjUY O94A== 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=eS141ldEq5Zzl5BLNVVcd9BAD4PBpwTmp2rfx52wBcaLRQWj9PhrN7qOdmjjAi9GEe G+muoQAtGrxn8BY85vSb3Cqx0tJ1ij1dp1WwxkATov7r0EsdBuGIsf/f2jbPTShyeSHd GbOc8cempYbtl/poUvcJl+RX56N1Gd5CQwZLztnSzdIX84bhJYPZW1rXrbt/rf5uZkXz agtoDZoIq/sgYk/4NXIY3Kh+1ojgfMY6gNb7dYexEjeu0mLR1YRst+7oQA9MoJ+hKMlP 78KDlm4d9xNSfntxn0a4c1pq6AUC3ZZlVZd64mZ2njU9J9jOw48LrUTpqalPZE2IsiOK 10Rw== X-Gm-Message-State: ACgBeo0hvYiUYmeCW8YUaRlfflbC84OWvJQboi223Z2agBARfOYS+UhC iltd6RHxXmybHQYbN7rroU4CVPnBShQUT91T X-Google-Smtp-Source: AA6agR6I1uk4JJR3hda93LqZ6hklhWeWmLGLLuB3nCYtzi6klqnuIP1DDO1Z0yndYmYjqqrNMSWK8w== X-Received: by 2002:a67:fb0b:0:b0:390:7390:3877 with SMTP id d11-20020a67fb0b000000b0039073903877mr1023675vsr.23.1661417715990; Thu, 25 Aug 2022 01:55:15 -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 o16-20020a67eed0000000b003866f107099sm14287534vsp.0.2022.08.25.01.55.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:15 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:03 -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/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 Thu Aug 25 08:54:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41938 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 7344A27BBE9; Thu, 25 Aug 2022 09:56:38 +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 E109C27BBEA for ; Thu, 25 Aug 2022 09:56:37 +0100 (BST) Received: from localhost ([::1]:34100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8fF-0000ro-2Q for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:56:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ei-0000kS-1a for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8eh-0002zp-4l for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8eh-0002Z5-1B for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08:56: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.16614177329736 (code B ref 57050); Thu, 25 Aug 2022 08:56:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:32 +0000 Received: from localhost ([127.0.0.1]:48865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eB-0002Ww-M2 for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:32 -0400 Received: from mail-vs1-f47.google.com ([209.85.217.47]:39808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8e6-0002WK-09 for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:26 -0400 Received: by mail-vs1-f47.google.com with SMTP id c3so20186357vsc.6 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:25 -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=aoNOE4CWlbkPDbXwcqkVbvcEh8xZNabO6cPZUKvBh7IoydOWEjcj/gikTQJRWvxpCW OKuZXYBlxIECfWlqIRacQajX+IiXafnVULVrld2NlQibyQNE2ZiKvIMlYUXnwndcSlN3 M2FNSgbd9LlJfzQzWZ187694I1L+VKbLzj/ehDbY8Myng8haUOcoEPwQ/eyvQkQePp8Y 0zfrJuoAczvIG9q83Unl4MaLuJZmf1LNLo5kYUkF8IcbTFVO5RKm+PtT/exsU7z+JEE0 YZoYpNj+KwczRUh8gX1IyYPJ2DaBLrx8ErS2k2Pr9fXRpljivwlsGaAdhbT5tCaIzQKw lwqQ== 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=yZc9ZluwhnNVbZrEfeSCyrVi/g5NtIg+B5rpmBDSB05WTL7qZkNobGp59UsUUGpH9p Q/4FP8hCKBv5tOqgXkOsrF04E6aYojXccBCUGtmFchg2M9qthTD7FWixp3A4dWI5RJ91 qZDzEBrNaBF2Hcq9G9hut1M6jifMwYApakeh1+aBCucWPAxyA7MYrkYQ/gFm63EZrDYn fWSC7ThcXqU5YsSivYWTOoRWkfljeJOfW2OftLPEIFlod1zv0S5wMM2eZyjcz71iJCKn Ne740XidhTb5cJjUG7e01MGJz22CXxJ8rQc7xAZ8NCSRitFaA6dcsX8/fSrzQctkxqBt 4wRg== X-Gm-Message-State: ACgBeo37/9OoWVgmOLqbsIhsLsWIyYsRPUjSLNYAcXZo9wVLN+Hk5qtt Ao4Dp/k1BK6RDAHDjkMke/qtZ1ByGt+5yaNs X-Google-Smtp-Source: AA6agR4Q374E4aSkULtGgtBKipPtvvSYklQr0LyfZdMye6jOmdTmks2Mtj0ardxZMqqKpL04rbBvUA== X-Received: by 2002:a05:6102:109:b0:390:2da8:2c64 with SMTP id z9-20020a056102010900b003902da82c64mr1039414vsq.70.1661417720399; Thu, 25 Aug 2022 01:55:20 -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 g4-20020ab039c4000000b0039eedc0e387sm11330370uaw.13.2022.08.25.01.55.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:20 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:04 -0400 Message-Id: <4f6b9cc1870adc84a421d101e4a4e6f4ea5102cd.1661416343.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 Thu Aug 25 08:54:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41939 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 E3AC727BBEA; Thu, 25 Aug 2022 09:56:57 +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 8BCE427BBEB for ; Thu, 25 Aug 2022 09:56:51 +0100 (BST) Received: from localhost ([::1]:51034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8fS-0001VL-MR for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:56:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ek-0000kW-9A for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59136) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8eh-0002zs-Ry for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8eh-0002ZL-OZ for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 03/14] etc: teams: Add racket team. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Aug 2022 08:56: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.16614177329749 (code B ref 57050); Thu, 25 Aug 2022 08:56:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:32 +0000 Received: from localhost ([127.0.0.1]:48869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eC-0002X6-Ea for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:32 -0400 Received: from mail-ua1-f50.google.com ([209.85.222.50]:43589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eA-0002Wa-7o for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:30 -0400 Received: by mail-ua1-f50.google.com with SMTP id z14so469710uam.10 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:30 -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=Yxx0ZFjXRE5MjfFuyDYEdTHEbWTZ1G9ar9E3wIlokM9oPTJv7a5wZYrnZ/sxc3r+Jj zQxFjyPXl0xihzVqiMsswxRMo2XXJAXl0vZxzkMk1Kv/c0QvpXNX+/JExMvG5lrdvqNH ng/gO8RfZiQfaXS97lKPhVraqbS+pncgzm+jh4wYYG0IMocTX6YK9FwG78Gcfo3JK1B+ WUO+uSUa7ZahYo3PcYF0jFW0dJZ+hnxM5usa8+Ndwoug1lFInHt97x+ll3Pa1YcRLEr8 pPuuN7oDIgos5Joe8EYTtGWV/jpDD6uNQorpXx/z+mSI+971Y33QE+StYt1GSt0UeNdE 2JCQ== 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=QpK2ZvK2qD252TONU0wzR8+uUFBkfvPysoBYMTFd0zKhpgtc6Yf/UuyZVZQBifFkXZ J9nZoThhQMdfvLw+SMAmdb0dtNGKXBKxBqIHHD1V0YinYFYwt2RTfHypHwnrWf8XJOGM 5uxNgQgONQc1F5sIYDEF2lsmYjDW+HpQ52Y50d6krlylzNlwr/r45T9L1Ps9feQPvsKo EDl8d/6QOEp7+eiCiAecHyMZ7hDIPmpBe0/L/ZutcU5Kdhtp/VzKE461ADbv9HTH1c8Q AewFyO0BDEuiTHPynhZex7bh9gvoAChbQh7Pe9+UqNbpbisT5hogsbp+GQLKLe51/oQo 38CQ== X-Gm-Message-State: ACgBeo2307pL0wIdz0KR/Z1IPcWgzC/edW23mUQ1WV3hheSan93haS8u KtMVzcJsU+NZA1Ax3YRYpDRQIroy6uMNUjtb X-Google-Smtp-Source: AA6agR44Jx8vnfl+GtpqkHal0Z/WDiJLJxu53NUAuN/jUy6lB+IKN+BhiMgJGB4bA/LFLaa+DRDXuQ== X-Received: by 2002:ab0:66d6:0:b0:398:609b:b34e with SMTP id d22-20020ab066d6000000b00398609bb34emr998865uaq.123.1661417724662; Thu, 25 Aug 2022 01:55:24 -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 l11-20020a1f250b000000b003846b127feasm15253871vkl.48.2022.08.25.01.55.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:24 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:05 -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 (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 Thu Aug 25 08:54:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41944 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 CBBEA27BBEA; Thu, 25 Aug 2022 10:16:26 +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 AEA4927BBE9 for ; Thu, 25 Aug 2022 10:16:22 +0100 (BST) Received: from localhost ([::1]:38916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8yL-00009u-PL for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:16:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ei-0000kV-24 for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8eh-0002zr-GL for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8eh-0002ZD-Cm for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08:56: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.16614177329743 (code B ref 57050); Thu, 25 Aug 2022 08:56:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:32 +0000 Received: from localhost ([127.0.0.1]:48867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eC-0002Wz-3Y for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:32 -0400 Received: from mail-vs1-f42.google.com ([209.85.217.42]:46696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8e9-0002VD-4Z for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:29 -0400 Received: by mail-vs1-f42.google.com with SMTP id d126so20181550vsd.13 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:29 -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=H3laopsnfBoAd27yF9lufScxies4LUN4coZT98ehqAOfscqAgQFmROuxl00NvMcruW EFO4olqBZIa/XAg3PWGNwzKQ8JFAgEiy1pDEVBRMvm26/ATCEDXzR688zgYNTYkequi4 KTcdf7vW7xdLgg8C9CEHuRscjHR7ECmMS+2BkMR843s1a5ensKKPosgGfLJY0qJPKmNS fce1KIhD78tyx/JM4N2xdKMK6HY2qrSTCssF2jLRb1kapVFkiYjHLRximV01a7lVmqk1 1X7VfLqmDWTvg2tGv4hNe7Izcv3dNX1SL52VNaltfIwrPlSGaVtyXcexjUTyNC5OG4LS uB5g== 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=pr6K7BeIjLyufwstPlinAYjMuCBxg10XDFzfcAOkk+d2nWm8EM0K3fK35UiUliS/90 ut15mKd20Y9fTMSbmFig6sqlmIkC5oWIySs7IMbMYnvTc3x+gOxSG8VI2Q57nfR/QYFa WVNygCmzgfFz24ok9d5wNOh40yWxx4pTb7X/W/oT5E0Yp55mUPUdfkQkYVyX6wY9+Q/u tTFpzJ4FSkv/jTS8QiJiXAKQXB2rHuk7wa/BnPI6zuD61a38CvB52afoiIW4j0Du8hRN FTL2/8Dt98ShgVQH0uyQ5EvYRY2lJWKsibnuYu2RTX745Y5TVRnU0m/QiNf+t/WAMeLk 0xhQ== X-Gm-Message-State: ACgBeo3vWL/zb2yl4//tY3kNnpMOF/DgBMAa7InjXfJWEbL7+pd/EgA0 9OvUqTLQwzHaRss6IbpkuRwKGSyO0039D+qi X-Google-Smtp-Source: AA6agR4dAuIKbUIIKsHYQALHrrw4L26OfrmtwjMJ2n7Sql/u8NRwBgREMqANmci+tQU3y9BFwbH9HQ== X-Received: by 2002:a67:d392:0:b0:390:99e6:1d8c with SMTP id b18-20020a67d392000000b0039099e61d8cmr1156731vsj.72.1661417728781; Thu, 25 Aug 2022 01:55:28 -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 c85-20020a1f1c58000000b003896e5fb3a5sm13550985vkc.24.2022.08.25.01.55.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:28 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:06 -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 Thu Aug 25 08:54:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41945 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 A9C0227BBEA; Thu, 25 Aug 2022 10:17:21 +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 CD4CD27BBE9 for ; Thu, 25 Aug 2022 10:17:20 +0100 (BST) Received: from localhost ([::1]:39624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8zE-0000sD-EH for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:17:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ek-0000kX-9n for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ei-000309-91 for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ei-0002ZS-4T for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08:56: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.16614177559813 (code B ref 57050); Thu, 25 Aug 2022 08:56:04 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:55 +0000 Received: from localhost ([127.0.0.1]:48876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eX-0002Xy-Sb for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:55 -0400 Received: from mail-vk1-f179.google.com ([209.85.221.179]:45577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eI-0002XJ-Nb for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:39 -0400 Received: by mail-vk1-f179.google.com with SMTP id t64so9861784vkb.12 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:38 -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=OtsFs2rdjiR2l4Q2retTZWWRdpjXx5L0kHc/tcdwu8AkSk+w2SJ4SwNXfPz4AvSxDC 7H+Hji4xStTushvvaSOdmktVSenAHC4jCHphqImr+vE9bIq1+2zdhFLaCuvalS0ppzJ0 c9TBPRue/3t36xwWc/O7DzFd1RbkbdXkCPyn97mn/C6fAG7xx7H1ijGDreqd8opKcB0u uJlIR8+qKtOIoDA7faJABXH/Ww8sequ6gqXIAoS3zgB/J6M+izxvUW/bPQRKqXloniFH ygE0OpwMs1hB+5s+2tMeRqAxXARsBjiFHlw/GFwQYIBRmCwXhbtL4ZpLURCzAK19nlye SVKA== 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=yRbINf/FEl9z0wIs+3bUtt3noqKEH6CXss2V0HrL4RLwlfmXHDbJyb/vUuTws2FhiU Mig5+0l01nHXoinuVzpjWw8Y+dT/k3BZ0adQ+xCoY4/O83WSqoNwsMZ5026OqVwFyl8W 51toA6GA5DUfFYIcaPKbN5LgH4/8ESnYp4kkfJwQm8CbLrWbcp4WBYYYpiwkTszFlV8e v1L3Whwb3i2E6E9RZMWt0rMTU42tprI6/lMjr36Frl8dfx1NDKNEW6bc70QCSS+6txTH CH7iwCNoT3xFiejgBBAPpiq6brIM1i8V+wbIK2M50TMMWwAzfiP/DyQJwfBKfiHQbgSD +QlA== X-Gm-Message-State: ACgBeo0/3Lliw52HSbncquEoYHSyezmLVZnbyrzd5qpfnw//crN1mrm/ H7ITyxzcTKSvjbvBdGj2D/0eb5GQmJP9Mun6 X-Google-Smtp-Source: AA6agR7ggJrtjnO1G8YCa5OPBPgBR48B54o6V7U42XXFG1AFjl8Uy4sB2MiXQESNPudeV6gikLGnPA== X-Received: by 2002:a1f:9002:0:b0:377:1433:93e9 with SMTP id s2-20020a1f9002000000b00377143393e9mr993845vkd.28.1661417733020; Thu, 25 Aug 2022 01:55:33 -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 f11-20020a67ee0b000000b003904a0d214esm9681238vsp.3.2022.08.25.01.55.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:32 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:07 -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 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 Thu Aug 25 08:54:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41940 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 44EF727BBEA; Thu, 25 Aug 2022 09:57:21 +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 539FE27BBE9 for ; Thu, 25 Aug 2022 09:57:20 +0100 (BST) Received: from localhost ([::1]:56068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8fu-00020I-H3 for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:57:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ek-0000kZ-Ab for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ei-00030A-Rs for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ei-0002Za-Me for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08:56: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.16614177569821 (code B ref 57050); Thu, 25 Aug 2022 08:56:04 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:56 +0000 Received: from localhost ([127.0.0.1]:48879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eZ-0002YE-O9 for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:56 -0400 Received: from mail-vs1-f51.google.com ([209.85.217.51]:34480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eM-0002XN-N2 for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:43 -0400 Received: by mail-vs1-f51.google.com with SMTP id q67so11459833vsa.1 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:42 -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=cut8mVkz4+4xl62yCiqEmrn2gUuH/lC421YRqGlhePY4VA2hdZJi5FYJ6WztQV+vA+ tem4Di+5h+3YbqjtwROTtiLE3ECj/13xgq8uvFZFUdyE8A9p3nYywotDA+JtvWZciNCo gZ812QTp+Q/+WjVjokzoxh4gQuVHFvtfcKTEpn5rCcsGZupsCh6B6tx7XApsIX2SjNHD 1JoBbU1iUrj/P8elbMIyaOauy8L05Gc6nPBJLTN1mQjhRbJfcLnAmTymIfyJupY+px7w Im2N0RwcBIqiLvm4WCMkGXH3d6b09D7Hk21YVVm6F/M4+xTk6/hUBIgOpK9Li0sc6w6y VBkA== 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=tpI5bSI2Dp777FnFnX4q+YvfAtL0ct4IzU6Iz2rJi4tcxWduwHrvkQTMxWYG8goieE w6NiGyPtvH3t1RSLgYDQMX+RnDAOEgeGO2pADenztOl1QCW8UxGq1MjKBCqGTNotrv0N s6UTcbuDlACa+pFhQDzAh/vRDsCvLtKVg2bDLaT0ozEObdKIqehy3rlKxz+4j0zEZqyh kE7aTobzZ7MaxqAFMXYU6mC/wAzrNAo6QOeLxkCKiUyiCrB0+ZL2xwD2SvyCaoBe1+J0 lO8jmtwWnszPiYEKm9ZsYL59s08kh1sCCvpeH1T2aJPIUueVLmfg5LOOFNoYTLwq3s+U cklA== X-Gm-Message-State: ACgBeo0DNmn5bMI0WGMqd6uvB3YFRO8JHkeQ+3VkDT+tuP3A1dU8UwO3 2sAKtYQiXTEmYX3+t4I8WVtNYNFJzWh8xaXG X-Google-Smtp-Source: AA6agR5jPhtWifFdynDXAx6mFfQxcr/zJifGJnWzJRZ2KeW4Gk8GEDxmAllvGDsiqhwXxwKKfljYzw== X-Received: by 2002:a05:6102:3c4:b0:388:d643:a5b3 with SMTP id n4-20020a05610203c400b00388d643a5b3mr1111506vsq.21.1661417737059; Thu, 25 Aug 2022 01:55:37 -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 l11-20020a1f250b000000b003846b127feasm15254181vkl.48.2022.08.25.01.55.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:36 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:08 -0400 Message-Id: <109112fc6b4d2b21f5a322a266d51194a00ea2de.1661416343.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 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 Thu Aug 25 08:54:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41951 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 7E3F127BBE9; Thu, 25 Aug 2022 10:38:46 +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 4A6D727BBEA for ; Thu, 25 Aug 2022 10:38:44 +0100 (BST) Received: from localhost ([::1]:47104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR9Jz-0003bT-DT for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:38:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ek-0000kY-9u for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ej-00030B-7K for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ej-0002Zm-4j for guix-patches@gnu.org; Thu, 25 Aug 2022 04:56:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 07/14] gnu: Add Zuo. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Aug 2022 08:56: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.16614177589833 (code B ref 57050); Thu, 25 Aug 2022 08:56:05 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:55:58 +0000 Received: from localhost ([127.0.0.1]:48881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8ea-0002YL-FG for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:57 -0400 Received: from mail-ua1-f46.google.com ([209.85.222.46]:36724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eR-0002XZ-9g for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:51 -0400 Received: by mail-ua1-f46.google.com with SMTP id b23so1587991uaq.3 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:47 -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=Xe5qEGkckqRTP9IqvVYwsLyl9uJt7RlYUBOhloeta44=; b=ddn1I4hMboS6AqJ0cEYflgz4fas8GfNbVGPbA6e4aliK0+DoRCVOBZWIUlSgb57sCL WSF81WTdUMeOdU7mHhIfcFsZThRctLdcS2Sb6dQ5VfoB5qifC/4jHYg9nEH6NTiGa7QQ 4LA+xEIyk0E9KRcU8Q/iqUYbPOwhyWHK1f+5jMQohH1oXbnPS/LUUwzDsRlfTcycHMi+ /ISdcP3o4dc7IfOcbZc0JaejyNkR7UVHr/Rwm2coKyzDRDh8qOHiU4QWZGhhHjUKukGK wZKyMMhVmBGHfVNGB1v/pTuQM3yO6p0NgMsvs9IXKixC4KCHEqTHeg8yaqCe9W1/vnN3 kdPQ== 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=Xe5qEGkckqRTP9IqvVYwsLyl9uJt7RlYUBOhloeta44=; b=ZGFVXR7gw7uzmBhtIjloPi0stE5ACIwcvCz0S6NW9yXafYWn+dkvW4b4NVgPqAzJeI qm55eo/VmG6vVxZBKDktX/uA5aeHzTNcZrLgLEMHOAht3I4AenafAfl4+OpTi6k5Fl+4 9xTx+bjuC6Go3Re8xuOnC/WEv1x0ZhibDRW/7uFMgF1q9tN+iqb4Z8UYebmm8hvwORXB y/AGAiOyW9KPaDgoxLfH6OOJF0OsT2yx2vwC0Eu7rB42bRB/D7YUHVOrV6FL4LM34Gs+ 4VwUqTQfuLCPpcJ6JmVRVdAsx3rxVkvnXIZehKwEZssr/oQetxj634pINNS/QSrTjOP6 24sw== X-Gm-Message-State: ACgBeo37i2p11+TDuq6eHS14okMf05kL7fbgCvRPcOhsv5VrNyCgcAfU 9Uavy6iKLb9fcMQ117nnLT+SBvkzLrdpWApZ X-Google-Smtp-Source: AA6agR7sX0bzCAJk08ghUztlusNQTgjLENMvMdUb2DlEkIWICa2CXbRpXwVhgpJ9ZCYDtSFCI3FnIA== X-Received: by 2002:ab0:3347:0:b0:39f:419b:433d with SMTP id h7-20020ab03347000000b0039f419b433dmr1051162uap.2.1661417741346; Thu, 25 Aug 2022 01:55:41 -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 ba6-20020a056102282600b0038855ac0416sm14265205vsb.7.2022.08.25.01.55.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:41 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:09 -0400 Message-Id: <3231fd55699bd60448e5aaa3ca8ddf9fbea085c6.1661416343.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/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 | 51 ++ 4 files changed, 608 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..6433897981 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,56 @@ (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 "You should use Racket to write scripts. But what if you +need something much smaller than Racket for some reason—or what if you're +trying to script a build of Racket itself? Zuo (作) is a tiny Racket with +primitives for dealing with files and running processes, and it comes with a +@command{make}-like embedded DSL. + +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 Thu Aug 25 08:54:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41946 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 DBFBE27BBEA; Thu, 25 Aug 2022 10:18: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 D66F227BBE9 for ; Thu, 25 Aug 2022 10:18:25 +0100 (BST) Received: from localhost ([::1]:44982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR90J-0001Zh-6q for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:18:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ff-00024V-KE for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8fe-0003CE-Hs for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8fe-0002cG-DF for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 08/14] gnu: racket: Update to 8.6. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Aug 2022 08: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.16614177809961 (code B ref 57050); Thu, 25 Aug 2022 08:57:02 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:20 +0000 Received: from localhost ([127.0.0.1]:48895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8ew-0002aY-0c for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:20 -0400 Received: from mail-vs1-f48.google.com ([209.85.217.48]:35678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eV-0002Xm-Te for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:54 -0400 Received: by mail-vs1-f48.google.com with SMTP id 67so20186490vsv.2 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:51 -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=xB18k89Hd+VOETZ9em1JoUU1S38ksE9K6sf7RMjE53U=; b=QHxC/QhuGyu9sFi9J87L3J60bUYDPTUbbmzAyjt1bXJjHa5CiJNewAHdc9EN7xbXAd Ix8rEBQoLB5fAjPlc6Zw0E4WSqD3zxYjJ+BItWjipHWUEVK2fm58hlP/xh8NRz5kDAGW a0UlLB6lwYFx+fLDxJ6AXaYgaEc5YylebpabKGPzvdwwGRjanUMet8PW2NwqU2Ago387 ruKvaOYd6NJDtvEzvnPJSzSnnn8Mtysmt+W7lBZALnQUDnhq54LfPdJ5LobS81bT38hu vv/1Y2kst9ZtILD34J3FJ26k1ia0AuW5MZ5vjd1YovlMY5P/I+fwMQPWmoguZIr2xlQC NY+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=xB18k89Hd+VOETZ9em1JoUU1S38ksE9K6sf7RMjE53U=; b=bPkZDdFuISx67gQUxTzLkeTAY4jW4hvjxpwmSPPF7PiXGvbjANm7cZf2sA+wF/WYTc 5glHqcxpbYFB8cllAPAwyBnnEBpQNsjOzqmK+h6DchvX0wAPkGDyTp7pZ7cqNnFAEWqL bUm0PnFMYEQbs/aKnic+URh9M/goj157N8Y0SA4CxA4Jf1iCQDQin0JXNczUx1kBvoKn Eiw8kLf/M+FUg4Y4sCVQ38DuXDoiitJ5CjpMY6iQdwX+/mgVm8mAiibd8wvPfoGc0MYg OUPamRlEtGDoMGHZHJpDR1Tt4U0Daa2L0ny7I2xp9gGoJMBnb7h7+3lC/VWC2JnweKa3 F3bw== X-Gm-Message-State: ACgBeo0aSbIsEmWilKwFuybRPK52m4NynEI0bnWxqTUlxunO9LC3IZ1Q g6ITR4OTzJiT/Z5XLarYjiChPCQOM5lQdaOS X-Google-Smtp-Source: AA6agR5hbFngJWT6bNlErR8TfsG+ShfgDbaOUf5GecNqDFqfUrUV4zJGPVUerJA84mksisaIqwEGuw== X-Received: by 2002:a67:a246:0:b0:371:73d9:7316 with SMTP id t6-20020a67a246000000b0037173d97316mr1093980vsh.38.1661417745620; Thu, 25 Aug 2022 01:55:45 -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 z20-20020ab06294000000b00384ca77a9e8sm15929298uao.27.2022.08.25.01.55.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:45 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:10 -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 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 6433897981..efabdd16f3 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 @@ -316,7 +314,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 @@ -324,6 +323,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. @@ -683,25 +686,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" @@ -718,7 +721,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") @@ -735,13 +738,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") @@ -765,7 +768,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") @@ -800,16 +803,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") @@ -863,7 +866,7 @@ (define-public racket "racklog" (base32 "0fbq0fpfb3l6h7h772dvkmlzlk2dnq5f8296xx1qxhhwypibqzr9") '(("racklog" "."))) (simple-racket-origin - "rackunit" (base32 "0vfwcddzrgrdv5awjka7m0jzqhqvfc5wlkih83a670y96496a83n") + "rackunit" (base32 "1gpz9sgnm8hrc0cb3rii0wzbcwp9mgy5k1amnxidy7gyzl7prn81") '("rackunit" "rackunit-doc" "rackunit-gui" @@ -876,10 +879,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" @@ -894,7 +897,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" @@ -926,7 +929,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" @@ -937,13 +940,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") @@ -952,7 +955,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 Thu Aug 25 08:54:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41941 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 7593F27BBEA; Thu, 25 Aug 2022 09:58:01 +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 EAB3027BBE9 for ; Thu, 25 Aug 2022 09:58:00 +0100 (BST) Received: from localhost ([::1]:38992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8ga-0002Sn-4b for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:58:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ff-00024W-KE for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ff-0003CG-7g for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ff-0002cT-4i for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08: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.16614177999999 (code B ref 57050); Thu, 25 Aug 2022 08:57:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:39 +0000 Received: from localhost ([127.0.0.1]:48899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fA-0002aw-6B for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:39 -0400 Received: from mail-vs1-f42.google.com ([209.85.217.42]:46696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eU-0002VD-5R for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:57 -0400 Received: by mail-vs1-f42.google.com with SMTP id d126so20182264vsd.13 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:50 -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=Xtdzt5ROAjQu+ZZ7r2btRrLBo52cUaJfZnaq9PiQf6OLyhLGWgP3DDMoiW+hz6GZmp uIWDKHCiQf8amISDvp1IGGZDgZQdtwHmplDWzsN7s2xgcmr7w5Xg3BzgHKw5GFvGPsvV XyMXGpjr1Qr/wgxIbR3el6qkrLipP6d5WTyoXJy1DyUD2R1w58i/bf6NiEFA1mfvU0cd M6KjkxDyZxKT1p8xjoVEs2yJcrI9huWkp+2Lcjpa2Y7KW6Q6FE2y2T7W0HCKgEK7wLcl bYuhYtezZhoRxI29bMrVZ/eiJlTz7SVF70+qBsBJUu0QgD+0shTAbGeifzgARhcaDBf+ 8Q2A== 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=LPI6GjnUuOZ6KP6m6160uFiSntNf4VLJ/thpUXGe70JDxllIpAB13oGvINMCgy44vS DdcJekU3CJL6f27dcG2WVVw5VwQKmhQoW4O4GwKL7EF2h3lWaZ9FtUZhRv/3+B9sW8mW HQz/Gk65lPdOnjTzA8gUfduLe3UspUUGNcUFgBX47c9R6IPL089VCI3igN+rhk2DuD3k Aqb9htyFoHY61fWGWnU/DXNoTdauTH/nPcrJLWA9hHLlj0UOlKDkQLRTynqzjDcoNVnX fzt1K4HfCZ5bBhO7KEXvQITKw2WVQs+NJs8Oe2PEKDgTG7ekYZAj3rcWL8uSmzwda1Ps BmpA== X-Gm-Message-State: ACgBeo3QraVg0Hyu6/4GcZRCHd/tXrFbNWiADYSNL5bqKB8tL8ztuqkm XnAk87BfkuWiD/AcgKnwDVYC6QFGnJ2usneO X-Google-Smtp-Source: AA6agR7KMLRuRJU4QEgqrPV8VHtUAJ9BPgmZLDhlXMJDMXoui7XPta3e0t32nqyWTa5027Q1GXe3xg== X-Received: by 2002:a67:f145:0:b0:390:2b5b:dd69 with SMTP id t5-20020a67f145000000b003902b5bdd69mr962122vsm.19.1661417749828; Thu, 25 Aug 2022 01:55:49 -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 t124-20020a1faa82000000b003743e7c87c5sm15447563vke.5.2022.08.25.01.55.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:49 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:11 -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/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 Thu Aug 25 08:54:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41943 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 7793127BBEA; Thu, 25 Aug 2022 09:58:43 +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 C327827BBE9 for ; Thu, 25 Aug 2022 09:58:42 +0100 (BST) Received: from localhost ([::1]:38834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8hF-0003fG-Uw for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:58:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8fg-00025a-6k for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ff-0003CZ-TA for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8fe-0002cN-Pc for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08: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.16614177929982 (code B ref 57050); Thu, 25 Aug 2022 08:57:02 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:32 +0000 Received: from localhost ([127.0.0.1]:48897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8ey-0002ac-Gv for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:31 -0400 Received: from mail-vs1-f47.google.com ([209.85.217.47]:39808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eY-0002WK-Jj for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:55:55 -0400 Received: by mail-vs1-f47.google.com with SMTP id c3so20187368vsc.6 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:55:54 -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=TuFID0IIJ2v+TUorPD9gEOXmf1iru3OlaoabwCuatXyGJoKt8lFw+eYnnSsOJuFTBN lzBSi1jfofeLaebt73zxMIK4ZZKA7zGJqj2IN8Iki+pCuD57Pnsrl3RzicAIxF2oEwH1 1/ZgEVB25I3Gj8If5GlMnmjc6VujkJE/c7PhnqYeyafRgQbEZ+dRpQtPQZWNmLozHcci stznldaf0xAN0TZ1DqLagLh0bKF2fTBC2FZRqbjCsknkV5xSQDr27sdFD4WjdLaW62D8 gvtxufiZLyZ2DtzD+57kgk9kLxiSTF7zjUoGNkrU0i60rQep/HfPoLfqlGYgCfaqmY71 0VmA== 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=6yLGPKSxWAPGTVCEg2X8eL2FN0/XZIDNRbSJj8/mYuxIh+TpeXqZVZpjuuKYi1J6x1 iu262tKMh2RR/a4YD1apzUrHhA51jW6cJ/FDNq1mo2tefKx6AVZbeYyqRo9g8RfmUinc AFxUp7YdjPcD0UEbNPdgRNOS2M7guFKlTO3PwXkVqY6mqjbc4R9wgxIdGTJO8ab1PtLs Mp19JMrcjr3ve73m9G2zdWumKx5aS4x7AeH5kzDgLbtJIPA++7iqoqHKJ4YH6OgrOIyl nbWRlodb0F8EnIm23/vBd2DUgJt7vQtIDRrNV4t1b3LvlPFLwRwrs6Qi4uKIUbGhsqW6 KORA== X-Gm-Message-State: ACgBeo3G83ERVE8maStpfynhP8QDaMTWgkHP9wRiGaHG5aHny4aJuVz0 i3VFfg3y/HeZ8T8vK7cN7LzM6G6EQ4MfRQ4f X-Google-Smtp-Source: AA6agR5DtuAv0AxZLu0kDkeEEG3/3Vc2LU6pxmnTHPSp34bn6ZWqaL66GCzMUNLP8TXPOv1GWwf1MQ== X-Received: by 2002:a67:fb82:0:b0:390:8bb4:69c7 with SMTP id n2-20020a67fb82000000b003908bb469c7mr1058178vsr.33.1661417754168; Thu, 25 Aug 2022 01:55:54 -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 v12-20020a67ff8c000000b0038712af0dbesm13917365vsq.22.2022.08.25.01.55.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:53 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:12 -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/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 Thu Aug 25 08:54:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41942 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 D7E6527BBEA; Thu, 25 Aug 2022 09:58:31 +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 598F227BBE9 for ; Thu, 25 Aug 2022 09:58:31 +0100 (BST) Received: from localhost ([::1]:48274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8h4-00033F-HY for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 04:58:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ff-00024s-Sf for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ff-0003CP-Jv for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ff-0002cb-GN for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08: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.166141780010006 (code B ref 57050); Thu, 25 Aug 2022 08:57:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:40 +0000 Received: from localhost ([127.0.0.1]:48901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fH-0002bE-FA for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:39 -0400 Received: from mail-vs1-f44.google.com ([209.85.217.44]:43966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8ei-0002Yg-3h for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:04 -0400 Received: by mail-vs1-f44.google.com with SMTP id w188so12148056vsb.10 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:56:04 -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=1veCoxHFoj5iPTmAArR9EFGJLAT1FoM0LJuQpEwFjoU=; b=aM/Z/A7WE8SZkAuWkxswJJdu2rFzKj6ICkaoHGG1fITVESCPI1XlSwWWCjb2bqSqU4 Mn0IRRVn1QADBZ+YC8M26rL8D9KHNfXkukxZa9OKQF0UB6ZzE5c1ozGk/KoUQG6xnYBN c9Sn4s3gaMDNEjJiLZ1q0sNKNhAa/l9nQa0J8bwz/X0Lv0oj5TpgeBPbz84ZejOdYmfy JmLICN0q/sfUMerCnaYaz8wcfDZ73JzyfB8NjOQluNAEvz/OXKKvGLzgMKhVFlG4C/N/ Pzmdzar3oO9M0kWnlhoAumX5NUC4FUH6lIm1B4CRhUfQh64sSKZdxpQHiIeFKCuUDVYq 0bFw== 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=1veCoxHFoj5iPTmAArR9EFGJLAT1FoM0LJuQpEwFjoU=; b=RMkNA3k0flYQj5ePkAw7Xskx7+74Y1afTZe1i6K3DLFUOjwmRWC/CMb+TZdeVWKDR2 iNNP2n9E6RkMmskOWClSDaPFtK+dHV4EI6ORprL/E0+Ltla71oBaszSBw30pv0QdqUdI pR4jJC+tvp4XmZrCTKhXUVlIY83MEJtWWYbKujCCJ5ESMmyynoO6mPoxIMobiZhykcGf GYxPnqnm1NZUsjZgKfFk3GtBwDCuds6be5gpVbn40i7OUSFPgSekHiKOrvDrObC7hHSq OxhIMc1AV+va7ABuqc7/AceryomO5BFs6ckw7E8OrVSnTHDqvd3HdmKt04ortPb8eSiu s+SA== X-Gm-Message-State: ACgBeo3hrmlGLu3LZu+rF0hF47SHeCJyuVo5dPsyc2LUVnMxPwgoNAYr ey8QlY8PmXS/hl9A0It6MpTWX5GmxIu68zQI X-Google-Smtp-Source: AA6agR4Zeag3n99hGw7PRV+k8tUFGqzdVXUwpjYGHEHGseE0Woe/a7vuK2ZwfgvkWqHcaD8y8BWkkw== X-Received: by 2002:a67:d905:0:b0:390:57db:659d with SMTP id t5-20020a67d905000000b0039057db659dmr1106638vsj.31.1661417758559; Thu, 25 Aug 2022 01:55:58 -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 x203-20020a1f31d4000000b00378ceed8f5bsm15658282vkx.53.2022.08.25.01.55.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:58 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:13 -0400 Message-Id: <4b5de88c4a2cd08dd601b6adbbe7389a9c611785.1661416343.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 efabdd16f3..90e5e88be5 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -314,8 +314,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 @@ -403,8 +406,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 _ '()) @@ -434,11 +439,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) @@ -452,7 +463,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 Thu Aug 25 08:54:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41947 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 723EF27BBE9; Thu, 25 Aug 2022 10:19:37 +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 7C61127BBEA for ; Thu, 25 Aug 2022 10:19:36 +0100 (BST) Received: from localhost ([::1]:56432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR91T-0002IM-IP for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:19:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8fg-00025c-83 for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ff-0003Cb-Vn for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ff-0002ci-SB for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 12/14] gnu: chez-scheme-for-racket: Suport all systems. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Aug 2022 08: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.166141780010014 (code B ref 57050); Thu, 25 Aug 2022 08:57:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:40 +0000 Received: from localhost ([127.0.0.1]:48903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fH-0002bL-SH for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:40 -0400 Received: from mail-ua1-f45.google.com ([209.85.222.45]:38695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8em-0002ZJ-LX for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:09 -0400 Received: by mail-ua1-f45.google.com with SMTP id ay32so7133142uab.5 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:56:08 -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=46tkcNT77x5bsdBKdEOHMenRNTNCdM9cEcm+UWlJ4YI=; b=DUKCNsZpqrWdyldvx+cFn9Usp26+ExWzfMvGjPB8ZFRtnQHVTC1HWytzvQ3g2Auzxx KXfOZKNLaduPgjoyfa/UCNOep3p7bxAGK78Xq4Rm3kbU9m/o+T+6eWpXnBbzTPSOydJX U+vQqVR4nRzepbzq1TIQDybjsqlSOp3BXoloROc2dAIGfkBZsRRMZK2zIo0AHr2Vm4TW 6u67+Vb7p/ERRxVO1L4v4OLuNXpWXkI/SBfr2I2w7Gq76ClpcDWFCHirPa/6rURNpmYe TQys+LlIbrZtZtfSujS6EqAsZXo/Mr9hpvCIc51cOFR5/O7a2ZfhfacpDd53BOFnth6L qLuQ== 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=46tkcNT77x5bsdBKdEOHMenRNTNCdM9cEcm+UWlJ4YI=; b=Wz2ysAj+R34Moc9/bc3eL19+OTMLlAi5HRc8jJWFA7lefJt3jswxFCrFRTS9Y75v0j e7V20wJ+lG97/8LSiXJFPLlx6j8vS51/mwpS4pP000fXljCd9Lwd0+RyBbkfwG+BWv56 Gjx190ZCY3tEY7PTL6IRpj/FPp3MC4uphPbdJZ5b8DolPUTP+p86c29aFTz11ElZ9f2V v7Fk7RReXoyCU3PGqQZOJL7R6z3eiH43j6I30t2PKuVOp5iNQkch3Pg6RAUVYsTqWdpF RlyonT9pJbQKvs+gpGZukm/ziFzgcRocgodbkMFIW6eWfflOGTukRJCNVZx0H0++9wDU foPw== X-Gm-Message-State: ACgBeo1PMTSDX1NgPqhc9aipqDleYhFYeTlOGH3p1c80osbHKS1mGGtz GqUxFKXdia9aFa7+Cx0B/qDblDj7OheMb28v X-Google-Smtp-Source: AA6agR5Jx76yw0C5NIS14mZ0A9i84jDLCddhbTMzRQWmnqxXiHL4wzR5hf2z+/JtiiitGvk4d1yviw== X-Received: by 2002:ab0:53c5:0:b0:390:fff3:1494 with SMTP id l5-20020ab053c5000000b00390fff31494mr1033745uaa.28.1661417763055; Thu, 25 Aug 2022 01:56:03 -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 b17-20020a0561023a1100b0038f2a3601basm14157068vsu.20.2022.08.25.01.56.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:56:02 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:14 -0400 Message-Id: <7c5ee85372e4682282dc6a543c99a3620abf2cd5.1661416343.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 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 90e5e88be5..2fecae31f8 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -313,7 +313,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) @@ -419,10 +419,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'').") @@ -435,9 +433,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) @@ -466,12 +467,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 Thu Aug 25 08:54:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41952 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 E69CA27BBEA; Thu, 25 Aug 2022 10:39: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 9E95927BBE9 for ; Thu, 25 Aug 2022 10:39:47 +0100 (BST) Received: from localhost ([::1]:48730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR9L0-00047h-LY for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:39:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8fg-00025v-Kl for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8fg-0003Co-Bx for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8fg-0002cq-8p for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08: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.166141780110020 (code B ref 57050); Thu, 25 Aug 2022 08:57:04 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:41 +0000 Received: from localhost ([127.0.0.1]:48905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fI-0002bT-Ke for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:40 -0400 Received: from mail-vs1-f49.google.com ([209.85.217.49]:40944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eq-0002a7-U8 for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:13 -0400 Received: by mail-vs1-f49.google.com with SMTP id 190so11954507vsz.7 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:56:12 -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=G3Udd8q2pPdVXnUiG2PI9Ez693+l9WyOcyiY89bDjNM=; b=IeHFyeEDXqrKZm6PF1NdoXbPXD0TTxBY13dlBqVLM3LnUDKdftsMIRV/Lua67e1t4k WQ/Nk1KYEVIlMnSiW1V/m85U6uHzPTtUEjan8VTUzDESOg65b3D4qyAw0faRJx5s4VWQ RcIwAv1kC6SEyXAUfeLxLtq2nYKoH5kzniE3OQcEiSlz/4ui6REEo0MSVOH6iI09sK4L kM9oT3yaWmexK4Z/Hc6EZZatgiH6KRWKziC2U7aeI/rhMpk0zb+yw3mo2UfjYO+NGvFP Xk15NWNhSKrpl1c5Vz7fZ/9D2DuPtMSh1VrFEQdGpNCjVBOyvHJUlWP+6wM/ORUBlvuW xrww== 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=G3Udd8q2pPdVXnUiG2PI9Ez693+l9WyOcyiY89bDjNM=; b=5SdaSG2IkUKT1iU6duBFVSQf36TwM9cqUKbia8xakK5LCmS5M+zOSOhIOK/IL5qhIp t3bL/cPfj5KmjPuT/YIKAaKgeAPWRccXgNNEZvawx7rJNcUJoUA7/fYdzDrRD1KzFwk6 hCIBQ6D0c2zvsvKPr9z2rNAfQG61XbSkPUrhjazzHafmjzf6v2tjPUzUfcDybEcCK5nV GkAXjZJBC7fOdbAwfOySYlOOBRLqkVscYk05v3SwvAcVZa6VWEqV+TU4WAzH+ukq4Y6k ouUxkKOCxnx0hBpXKBMGVzS/tWkZnsJGtGgX5U22GadKlHWMfx9aWt1471zaU4HTxQXO ChUw== X-Gm-Message-State: ACgBeo18k1HDdWb6uxnVZvYTnda8FLAvNAiKJ0kcsuJu1qI+MUhgTR+/ ZZs7m7VaGhCnr5/MuslOPNRIb5qOkyAqxE+K X-Google-Smtp-Source: AA6agR5PI/Z2ElJiEZxhnTD3jLiXmHVgrD4ERNXkmCpW0AnWV+uthihRMxF0PV70OgBHPeOfMq30mQ== X-Received: by 2002:a67:d611:0:b0:390:1d18:284 with SMTP id n17-20020a67d611000000b003901d180284mr1178692vsj.6.1661417767408; Thu, 25 Aug 2022 01:56:07 -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 h25-20020a05612200d900b0037cf5f15a71sm15446503vkc.1.2022.08.25.01.56.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:56:07 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:15 -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 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 2fecae31f8..2d6bebf10e 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -414,7 +414,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 Thu Aug 25 08:54:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41949 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 C285327BBEA; Thu, 25 Aug 2022 10:20:04 +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 4242027BBE9 for ; Thu, 25 Aug 2022 10:20:04 +0100 (BST) Received: from localhost ([::1]:44346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR91v-0002uh-DF for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:20:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8fg-00025w-Vn for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8fg-0003Ct-NW for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8fg-0002cy-KK for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 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: Thu, 25 Aug 2022 08: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.166141782110049 (code B ref 57050); Thu, 25 Aug 2022 08:57:04 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:57:01 +0000 Received: from localhost ([127.0.0.1]:48907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fd-0002c0-2v for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:57:01 -0400 Received: from mail-ua1-f46.google.com ([209.85.222.46]:33682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8ev-0002aI-Bl for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:17 -0400 Received: by mail-ua1-f46.google.com with SMTP id x12so7713780uaf.0 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:56:17 -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=qcG8nUWE2bT+aW0ZpsFpRuuOBnS9NUTQSy0PurD9LSQ=; b=M4wpXOnifbfdmhaiuPqBguelP91h78p/lSFLgn5QJyi1IidfAgLgvhBnUYrYE7ZSDr WgDCZCgfeCNbY1b99rhsaOZmJ/NOeLi5XRs7oMfXQeuMa15eNARFeCaYAdKfNvPkUd/8 7iZOhavrZ93IH4QgMfGRgT6h8akUItHp3kgS+D6XtVXp2ZSgEe/PwlxmRA/EKGKRnig2 g+LehReWseEICN3WSuK3cKfGDdxrIT0bL7apKeTJJV+P7JoyJuHs2iHiO4B4hSq6uaIB Mw4jdpKk4aBiv8+KpkTce2aH2YQat+/pjRBXAu5veMb+ACPQcVossc0X53aBIwIeEvLk SuRg== 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=qcG8nUWE2bT+aW0ZpsFpRuuOBnS9NUTQSy0PurD9LSQ=; b=kJ5nRvlvjJSuz6Y+z9rLS9f3fdAua0PDtbXP3hZr4u4FPkBtBB6wI9ubcpAbpYfMmM gP+QE21RwTKmRwqpYq3DORKdLmiutLLXiI0QYkQMEkYDlbvgGlE7HyypommqLCR5D3FN rNuPF+RnTJsOm4CHRszQtmhK5wbbSjSYi3gtVbWFKbhIbhokWalJdS715Dxcy73qngfs eZh7yPXvdSJqWoJFezuJj3YWtnP4zTXwH0PH7AataQWWGSYEfObKUV5Zm7jO49Q+MR5A lz7g1cZG1yvM8wdLFRwQlXT1NfBLKkcKW/3v0Gbcyv56iXcGDJxbhcmL1jXNCoynsnE5 /2ww== X-Gm-Message-State: ACgBeo28Jmg39dGPXUFbrDFVOQypWa/7lLpwmCc4ktFuIIGHSy4u7ZPu MG1mhHMFodXcv1hBpdK06I/H6CFZb7v2VQz6 X-Google-Smtp-Source: AA6agR7srd2ipHnE9XdHQMiZf66xqbKpCz/cD4odkJ7Wy6PclttrEXFwSVGAq4P7EvXwseLwLEw5XQ== X-Received: by 2002:ab0:c19:0:b0:381:cadf:91b3 with SMTP id a25-20020ab00c19000000b00381cadf91b3mr989389uak.93.1661417771946; Thu, 25 Aug 2022 01:56:11 -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 y3-20020ab07843000000b0038467d003e3sm15276777uaq.38.2022.08.25.01.56.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:56:11 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:16 -0400 Message-Id: <9b429caf1d9cd6574debcb11065b957874d2a31a.1661416343.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 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 2d6bebf10e..16ad6eef8f 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 @@ -568,7 +556,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") @@ -686,7 +674,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"))