From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 29 17:53:48 2021 Received: (at submit) by debbugs.gnu.org; 29 Jun 2021 21:53:48 +0000 Received: from localhost ([127.0.0.1]:55837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLfv-0003PJ-Rv for submit@debbugs.gnu.org; Tue, 29 Jun 2021 17:53:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:44684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLfu-0003PC-PR for submit@debbugs.gnu.org; Tue, 29 Jun 2021 17:53:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLfs-000712-SR for guix-patches@gnu.org; Tue, 29 Jun 2021 17:53:46 -0400 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:35344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyLfp-0003ek-DI for guix-patches@gnu.org; Tue, 29 Jun 2021 17:53:43 -0400 Received: by mail-qt1-x829.google.com with SMTP id g12so17292654qtb.2 for ; Tue, 29 Jun 2021 14:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H60ivWbnEmHs+cVs0uIqFcRwtiWxEOeSK57FBgETisU=; b=gIs/UrzLUFwb385cTKMRfZyi2+4bP7+sd1s9FslxNywGs/QuX694Kb4eSu9h1+yOzY 3aBCzoU3j8nCTYJdhrsnCYjolgYWxQ+kX1DcfUVHMD2R878GXj3Q3zwltP/qF92gJr8P 9p23FKyn6IJ7rXSelYHC2GtNUgnh02CH9mtEfnFH7lJCI1HVeDTCI93fxL7Ug0I0A08P l2AfpGdKa7xZZPpa5O0DMRWGt4STg2TbQJph+6WTYkKlHIsiK/qXBEtiENRDNZbCKk3r VYnxx4S2txznG4yV7vRTbFh/HWQnh+7YhKrPI63I+W72OM+ZZTjEPQNMX1HW3rH5hY/Q JGcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H60ivWbnEmHs+cVs0uIqFcRwtiWxEOeSK57FBgETisU=; b=PlWZvPs7iFssoHUQs+P4riRnYQLMNWneqyaibzkj8Bm2GWev1CR4mgg3nG8SsVwFC9 6PaJtXv/bU8nsCsYQxLuMhTVVRm7XhYV9k7B2MBzSdJt04swa13YEUM1my6nOqMALKzt 2H9K5SbojEo9Rlr1kf2J89asoK6dI3jEv+B+RZtAooX/0hTGK0AJdnExD/uvxkZYyyWB fqSt5eI30V1AaOhDmsLWvWzwgAI8C/CMFKNY+ZDm2fy+RsL4URZTk0W2Yil6TKLQCkkV tofI2YS7V8Afu146BLTPST/cFRSWgymT0CF1rDD0tWZnLYk2BxLmD2Cn0cwZ8PUhPnH4 F/9Q== X-Gm-Message-State: AOAM530HvPoOW4JvvUCBFebt3u5/CdVC+eT7UEOcR+jiWqQppU2Lq/TD X/0F3uC4oTClM1BySt2Xp+1OxzarSdaS1Ka/r0A= X-Google-Smtp-Source: ABdhPJwNv/oMZukTgKMWvk8QT7gihXVqKlXUTn0a7v/e6+VAyF0Ce+UViFeP1RJ5YE2T5NmpKlsUbA== X-Received: by 2002:a05:622a:13d2:: with SMTP id p18mr4888262qtk.224.1625003619737; Tue, 29 Jun 2021 14:53:39 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id 202sm11157911qki.83.2021.06.29.14.53.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 14:53:39 -0700 (PDT) From: Philip McGrath To: guix-patches@gnu.org Subject: [PATCH 0/4] gnu: racket: Add racket-next. Bootstrap from C. Date: Tue, 29 Jun 2021 17:52:55 -0400 Message-Id: <20210629215255.3110238-1-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: neutral client-ip=2607:f8b0:4864:20::829; envelope-from=philip@philipmcgrath.com; helo=mail-qt1-x829.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) This patch series packages adds `racket-next` and `racket-next-minimal` packages for Racket 8.1.900 (the first release candidate for Racket 8.2, scheduled for late July). Beyond the release, having a development package will be useful for Guix users who contribute to Racket or help test the latest features. In particular, these patches make use of improvements since the 8.1 release in Racket's support for layered and tethered instalations to make some improvements to Guix's Racket packaging. We can now unbundle `racket-next-minimal` from `racket-next` by installing the main distribution as a layer on top of minimal Racket, rather than duplicating the core runtime system in both packages. This improvement facilitates changing the source of `racket-next-minimal` to use the upstream Git repository, further unbundling main-distribution packages developed in that repository, and bootstrapping Racket from C. (One remaining bootstrapping limitation is discussed in comments added in the patch.) The same features seem like the most promising path toward adding support for Racket packages to Guix more generally. -Philip Philip McGrath (4): gnu: racket: Fix lib-search-dirs configuration. gnu: racket: Add racket-next and racket-next-minimal. gnu: racket-next: Unbundle racket-next-minimal. gnu: racket-next-minimal: Bootstrap from C. gnu/local.mk | 1 + .../racket-next-minimal-sh-via-rktio.patch | 87 +++ gnu/packages/racket.scm | 525 +++++++++++++++++- 3 files changed, 611 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/racket-next-minimal-sh-via-rktio.patch -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 29 17:58:12 2021 Received: (at 49280) by debbugs.gnu.org; 29 Jun 2021 21:58:12 +0000 Received: from localhost ([127.0.0.1]:55842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLjy-0003VL-FL for submit@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:12 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:36385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLjx-0003V9-8n for 49280@debbugs.gnu.org; Tue, 29 Jun 2021 17:57:57 -0400 Received: by mail-qk1-f182.google.com with SMTP id l16so331690qkp.3 for <49280@debbugs.gnu.org>; Tue, 29 Jun 2021 14:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=scvuB0ls4IJeLELhueJ0PXnz9ECPNlyceDR9WnwEzYs=; b=LXap1xp0kR5WB+AeZaBBrJcLt0Y3aFCIAYa21iUkrQ+4OKxKSjkJOZDBwHSNtex6gk e3tzDNwloakss/S7zbZQ1w8yaZpvT/WFG7Vlc0SzqYTu6RcyTWTOTtpekC3E/5uAbfGS EB7cd7ecjJGNUhTRcdR13FVA4k2G2ENh3+3mGsLXL2n1oWmFdvbpce+tUsxMDFrINWTf VaYk8TsTIJczkvqfX82c/i3OHUisdaNoDinJDM+GnmI7BPzXOlP7YNBIT7rujRB1UOE6 Gmtzle1ciQMN79OQPCM5nPzpo9ayMixYv+RFjDn20Ozm59TITCyF4Rf+6fxIXHeikRPL HGOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=scvuB0ls4IJeLELhueJ0PXnz9ECPNlyceDR9WnwEzYs=; b=JPuCAgqoRHIxI26Ghflsky8anTOzxYykWwryx2aycfDiwPWG61czKHaccCq6j0gUbd os50ZPPqkZbvJRsU6Wk58XXRjvrjgKsDdYNpACMNZ0iXFaudncUwolf3NLTu74z/0LDg mXHfOvA9QccPYpWPsWdW2B3wYCJ0tB8V+OiSMFhKL/TqpLJFS+uUIVf+BQbapfEHHfe1 EOCoRTimwQ9X6Jyv5/1fvHf250loIP9yLQ5eG+8HZD+9dUn/Lf+5Vib/xucss5cR+cwv k5W8Be9R9UiQeKD+ezxsowMbzzUaPz1TaW579G7hcy/mIp+B8aWfmodAXHTqmCzC5J6V gG2A== X-Gm-Message-State: AOAM530RCoI6TJnnablQ5Vq9fSiFLWVHXcPbJlNziVEG0a5tBXE7atq1 Rr/WTi73zaBUUUuo+DHGR6kzg9brmEPAsn8S35k= X-Google-Smtp-Source: ABdhPJygLUt6OR77iPFVlnPNpPHx0mxxU9bTeDIlzIR6xgEdubBTaJ2oRZED9/f7znW+Sft6rhWH6g== X-Received: by 2002:a37:65c3:: with SMTP id z186mr23544760qkb.481.1625003871677; Tue, 29 Jun 2021 14:57:51 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id y63sm12670913qke.16.2021.06.29.14.57.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 14:57:51 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH 1/4] gnu: racket: Fix lib-search-dirs configuration. Date: Tue, 29 Jun 2021 17:57:39 -0400 Message-Id: <20210629215742.3112654-1-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629215255.3110238-1-philip@philipmcgrath.com> References: <20210629215255.3110238-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) When a config.rktd file doesn't contain an entry for `lib-search-dirs`, the default is equivalent to `'(#f)`, not `'()`. * gnu/packages/racket.scm (racket)[#:arguments]: Fix patch-config.rktd-lib-search-dirs phase. --- gnu/packages/racket.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 2d606071fe..d0cfed7292 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -125,7 +125,7 @@ 'lib-search-dirs (lambda (dirs) (append dirs extra-lib-search-dirs)) - null) + '(#f)) #:exists 'truncate/replace file))) "--" -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 29 17:58:12 2021 Received: (at 49280) by debbugs.gnu.org; 29 Jun 2021 21:58:12 +0000 Received: from localhost ([127.0.0.1]:55846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLkC-0003W7-Aw for submit@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:12 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:44933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLk4-0003VO-MQ for 49280@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:05 -0400 Received: by mail-qv1-f53.google.com with SMTP id dj3so481qvb.11 for <49280@debbugs.gnu.org>; Tue, 29 Jun 2021 14:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QY6Y7nfoQZZes0BD72N5Qc65u6NOoEB5vOh/5fMqWUg=; b=eIHMqy+Gsg9wB2Do6otvLAdy1IBy98ScnJnrTRONJn6tO/gtJ3fPHocJ0jYOXG14Wh 90A7yHwlCsbCf7bQGV9Jf8I8/nT6GlWM12IRpXdh8mQkr7BKYzsbf1JJgHEvcm42gP24 Cr/AQecKO9wnDBF9iHKTYToTW9kQipQVYmsiS0yrJTwguAC27sJwZw3ibpZzMowGZtii HqrySV91z4ZWXLtYvK7ObEYPRT4axnoEMKifRt8/XncalVGFTpWZoftu2xe4OXDGlWeo hEoc14J7+1NBNKTlyXHWbPFxICwaAv/sR4WuZq5xLWAoZc1OzZHC5Miva+Tx8CngzGz0 DwDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QY6Y7nfoQZZes0BD72N5Qc65u6NOoEB5vOh/5fMqWUg=; b=DWWkk9O/6i0NOnBrSKNlQSaSoM573SslN3tidvU7XAgHUr+EZpFH+jqAxu6Ex3LRgw upmac5TougknNoGutc1CLlvYcxnkxJLykfOMGMmTdRr9ASXZFBwnHc/x7aelVyNEjGfp G6jZTaJYDc9RZjYx4b9zvrvItWCboFYJwYSfIz5svsQ76HeUZHJYcWGh4ts6+LWGL/IP Q+kG9F39KekhZyliIl+yE6+vQ6L9tZBCiwrkCJwpy85VZfjsxULj99PgSE6dqSGni1SB Kk8Pk9GYsXpaHnB3mCUs9si6ZqoP8sPba2LbzXGvHj0bnM76tgXaYygTumNpio/gmt5u XMIw== X-Gm-Message-State: AOAM530OA/yQ65uagYvIJGLY017Xqp8nSHh10+diT8zv1zIVaJY+ovdy UPDBthz536NhS8NbhnWrEqf3txhnFec0mrRYbM0= X-Google-Smtp-Source: ABdhPJx0jL5pOd1CjF5WcH1jHm0bWm/OVKoXxfRP44iSEZ5DX3h5vWF2Q8660gwBxmcwbRnXlqyfUg== X-Received: by 2002:a0c:fe01:: with SMTP id x1mr33399966qvr.46.1625003879069; Tue, 29 Jun 2021 14:57:59 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id b25sm628338qkk.111.2021.06.29.14.57.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 14:57:58 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH 2/4] gnu: racket: Add racket-next and racket-next-minimal. Date: Tue, 29 Jun 2021 17:57:40 -0400 Message-Id: <20210629215742.3112654-2-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629215742.3112654-1-philip@philipmcgrath.com> References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * gnu/packages/racket.scm (racket-next-minimal,racket-next): New variables. --- gnu/packages/racket.scm | 62 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index d0cfed7292..363f19825b 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -23,6 +23,7 @@ #:use-module ((guix licenses) #:select (asl2.0 expat lgpl3+)) #:use-module (guix packages) + #:use-module (guix base16) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) @@ -45,6 +46,36 @@ #:use-module (gnu packages tls) #:use-module (gnu packages xorg)) +;; Commentary: +;; +;; Preliminary guidelines on naming things: +;; - `racket` is the main package. It corresponds to `racket-minimal` +;; with the Racket-level package "main-distribution" installed. +;; - `racket-minimal` is Racket runtime system and core libraries: +;; just enough to implement the package system and install the rest. +;; Upstream refers to this as "minimal Racket". +;; - `racket-pkg-` should probably be the prefix for Racket packages +;; available as Guix packages, once we're able to build those. +;; More specifically, it should correspond +;; to packages registered in the catalog at https://pkgs.rackat-lang.org. +;; This is a social convention to manage the namespace, not a technical +;; limitation: Racket can use other catalogs (e.g. for pre-built packages +;; or packages pinned to specific versions), unregistered package source +;; urls, or purely local packages. But we also need a convention to +;; manage the namespace, so we should use this one. In practice, +;; all generally useful libre Racket packages are registered there. +;; We probably will need a clever encoding scheme to deal with the fact +;; that Racket package names can contain [A-Za-z_-], i.e. including "_", +;; which is not allowed in Guix package names. +;; - `racket-next` is a development version of `racket`, following either +;; the upstrean Git HEAD or the release candidate, when one exists. +;; - `racket-next-` is the prefix for other development packages, +;; including `racket-next-minimal`. When we can build Racket packages +;; individually, we will need `racket-next-pkg-` for the packages +;; that make up `racket-next`. +;; +;; Code: + (define %installer-mirrors ;; Source: @@ -211,3 +242,34 @@ languages to complete language implementations. The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) + +(define %pre-release-installers + "https://pre-release.racket-lang.org/installers/") + +(define-public racket-next-minimal + (package + (inherit racket-minimal) + (name "racket-next-minimal") + (version "8.1.900") + (source + (origin + (inherit (package-source racket-minimal)) + (sha256 + (base32 + "0dm849wvlaxpfgz2qmgy2kwdslyi515rxn1m1yff38lagbn21vxq")) + (uri (string-append %pre-release-installers + "racket-minimal-src.tgz")))))) + +(define-public racket-next + (package + (inherit racket) + (name "racket-next") + (version (package-version racket-next-minimal)) + (source + (origin + (inherit (package-source racket)) + (sha256 + (base32 + "0ysvzgm0lx4b1p4k9balvcbvh2kapbfx91c9ls80ba062cd8y5qv")) + (uri (string-append %pre-release-installers + "racket-src.tgz")))))) -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 29 17:58:13 2021 Received: (at 49280) by debbugs.gnu.org; 29 Jun 2021 21:58:13 +0000 Received: from localhost ([127.0.0.1]:55848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLkC-0003WG-Pq for submit@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:13 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:46695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLk9-0003Vm-9p for 49280@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:10 -0400 Received: by mail-qk1-f175.google.com with SMTP id 19so270959qky.13 for <49280@debbugs.gnu.org>; Tue, 29 Jun 2021 14:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IdMXqcY4irBQmjsXrAWEILFEReRTthOkRQS35Rw9i1g=; b=VaEdUjmqvesLB5+vqr1R+vnKabITECC0+ROWV6GHY1TXuKNarMAheSg82qoOFPPmVs XmSY7Pn5SH+yKhjxZbha/PG6ToZmwvRk0vrUOV74RQs4zkPTY/9+I9HIZcoAQ9WCenOl CBGx3HtpDpcmlX3dND8g5csSjnUMEEzf37/yyZDMv/hSzY+YrylAFFhShfxMMCCcEqFt 67nhOUGD9WAnP02pYSGXMKGGvaKuGkexFL0KlZwPJsLwVUCbt+9qXOptT/uRmzqZXDyB azuoxGLUJVYsh6pI/8ccQzwH6jCEVJeKNT14eWCwl/eKnGOIk81+zvafZBOitOPAgcEQ QCDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IdMXqcY4irBQmjsXrAWEILFEReRTthOkRQS35Rw9i1g=; b=GyQLUWgyylX7f34Vh8r82wVGKzeefqRDpcv0vY7hlehs5dsP4MLC51ON/1pVeyS2PA YkDpm/cfFaTB/aQGNu+GUqRutii4zoZExbFlYqtnp+tR9AI5pw1PSIpihYJTtl56UgHE LJpcvdreVzP72cyvPLPL1LZ30NcSEQj+sLX5zh7m8JPRCwtPhCcT6CoKDvk0aTUCUsWm wSDVmhvX19t0GQHr42s/pPHjmOx6U1JB/8kGSDoK/r8GEySnxahBqZsKPkM5CZxK8p7n XUL4gcEUF/LabaX/h8+lGhW7X92ZLEMU0HhVkmjh7dEO2prPpXEfkZHzLxL1ZdZmOeS4 LgAg== X-Gm-Message-State: AOAM532wJbk2d4sNH9pgpX/Xhn8ZN+NpXXLcLgCf2sM2expYElIZLqXe EKGGyBZaAi2Ekx4/ypdayHrTIqS6mIuGCDchxyg= X-Google-Smtp-Source: ABdhPJzWRxiRLRQjz9w54FLsxKh8Q46V1Wmuqo0Lj9jAPV+zwStEijIeGgVsFeH1igujvufGHKghdg== X-Received: by 2002:a05:620a:6d5:: with SMTP id 21mr16847686qky.138.1625003883650; Tue, 29 Jun 2021 14:58:03 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id o21sm12850175qkp.51.2021.06.29.14.58.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 14:58:03 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH 3/4] gnu: racket-next: Unbundle racket-next-minimal. Date: Tue, 29 Jun 2021 17:57:41 -0400 Message-Id: <20210629215742.3112654-3-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629215742.3112654-1-philip@philipmcgrath.com> References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This takes advantage of improvements since the Racket 8.1 release in support for layered and tethered installation. * gnu/packages/racket.scm (extend-layer): New private variable. This is a script for configuring a new config-tethered layer chaining to an existing Racket installation. * gnu/packages/racket.scm (racket-next)[source](snippet): Unbundle `racket-next-minimal`. [inputs]: Stop inheriting from `racket`. Remove inputs that properly beling to `racket-next-minimal`. [native-inputs]: Add `racket-next-minimal` and `extend-layer`. [arguments]: Stop inheriting from `racket`. Add phase 'unpack-packages to move the sources and links file into place. Replace 'configure phase using `extend-layer`. Replace 'build phase using `raco setup`. Delete 'install phase. --- gnu/packages/racket.scm | 202 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 201 insertions(+), 1 deletion(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 363f19825b..cf0240be5c 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -272,4 +272,204 @@ languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) (base32 "0ysvzgm0lx4b1p4k9balvcbvh2kapbfx91c9ls80ba062cd8y5qv")) (uri (string-append %pre-release-installers - "racket-src.tgz")))))) + "racket-src.tgz")) + (snippet + (with-imported-modules '((guix build utils) + (ice-9 match) + (ice-9 regex)) + #~(begin + (use-modules (guix build utils) + (ice-9 match) + (ice-9 regex)) + ;; unbundle minimal Racket + (for-each delete-file-recursively + '("collects" + "doc" + "etc" + "README" + "src")) + ;; unbundle package sources included elsewhere + (define (substitute/delete file pattern) + (substitute + file + (list (cons pattern + (lambda (line matches) + ;; must match exactly once + (match matches + ((m) + (string-append (match:prefix m) + (match:suffix m))))))))) + (define (unbundle-pkg pkg) + (define quoted-pkg (regexp-quote pkg)) + (with-directory-excursion "share" + (substitute/delete + "links.rktd" + (string-append + "[(][^()]+[(]#\"pkgs\" #\"" + quoted-pkg + "\"[)][)]")) + (with-directory-excursion "pkgs" + (substitute/delete + "pkgs.rktd" + (string-append + "[(]\"" + quoted-pkg + "\" \\. #s[(]" + "(pkg-info|[(]sc-pkg-info pkg-info 3[)])" + " [(][^()]+[)] [^()]+[)][)]")) + (delete-file-recursively pkg)))) + (unbundle-pkg "racket-lib")))))) + (inputs + `(("cairo" ,cairo) + ("fontconfig" ,fontconfig) + ("glib" ,glib) + ("glu" ,glu) + ("gmp" ,gmp) + ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg + ("libjpeg" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libx11" ,libx11) + ("mesa" ,mesa) + ("mpfr" ,mpfr) + ("pango" ,pango) + ("unixodbc" ,unixodbc) + ("libedit" ,libedit))) + (native-inputs + `(("racket" ,racket-next-minimal) + ("extend-layer" ,extend-layer))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'unpack-packages + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let ((racket (assoc-ref (or native-inputs inputs) "racket")) + (prefix (assoc-ref outputs "out"))) + (mkdir-p (string-append prefix "/share/racket/pkgs")) + (copy-recursively + "share/links.rktd" + (string-append prefix "/share/racket/links.rktd")) + (copy-recursively + "share/pkgs" + (string-append prefix "/share/racket/pkgs")) + #t))) + (replace 'configure + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let ((racket (assoc-ref (or native-inputs inputs) "racket")) + (prefix (assoc-ref outputs "out"))) + (apply invoke + (string-append racket "/bin/racket") + (assoc-ref inputs "extend-layer") + racket + prefix + (map + (lambda (lib) + (string-append (assoc-ref inputs lib) "/lib")) + '("cairo" + "fontconfig" + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit"))) + #t))) + (replace 'build + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (invoke (string-append (assoc-ref (or native-inputs inputs) + "racket") + "/bin/racket") + "--config" + (string-append (assoc-ref outputs "out") + "/etc/racket") + "-l" + "raco" + "setup") + #t)) + ;; we still don't have these: + (delete 'install)) + #:tests? #f)))) + +(define extend-layer + (scheme-file + "extend-layer.rkt" + `(module + extend-layer racket/base + (require racket/cmdline + racket/match + racket/file + racket/list + racket/pretty) + (define config-file-pth + "etc/racket/config.rktd") + (define (build-path-string . args) + (path->string (apply build-path args))) + (define rx:racket + ;; Guile's reader doesn't support #rx"racket" + (regexp "racket")) + (command-line + #:args (parent-layer prefix . lib-dir*) + (let* ([config + (for/fold + ([config (file->value (build-path parent-layer + config-file-pth))]) + ([spec (in-list + '((lib-dir lib-search-dirs "lib/racket") + (share-dir share-search-dirs "share/racket") + (links-file + links-search-files + "share/racket/links.rktd") + (pkgs-dir pkgs-search-dirs "share/racket/pkgs") + (bin-dir bin-search-dirs "bin") + (man-dir man-search-dirs "share/man") + (doc-dir doc-search-dirs "share/doc/racket") + (include-dir + include-search-dirs + "include/racket")))]) + (match-define (list main-key search-key pth) spec) + (hash-set* + config + main-key + (build-path-string prefix pth) + search-key + (list* #f + (hash-ref config + main-key + (build-path-string parent-layer pth)) + (filter values (hash-ref config search-key null)))))] + [config + (hash-set config + 'apps-dir + (build-path-string prefix "share/applications"))] + [config + ;; place new foreign lib-search-dirs before old + ;; foreign dirs, but after Racket layers + (let-values + ([(rkt extra) + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + (hash-ref config 'lib-search-dirs))]) + (hash-set config + 'lib-search-dirs + (append rkt + lib-dir* + extra)))] + [bin-dir + (hash-ref config 'bin-dir)] + [config + (hash-set* config + 'config-tethered-console-bin-dir bin-dir + 'config-tethered-gui-bin-dir bin-dir)] + [new-config-pth + (build-path prefix config-file-pth)]) + (make-parent-directory* new-config-pth) + (call-with-output-file* + new-config-pth + (lambda (out) + (pretty-write config out)))))))) -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 29 17:58:17 2021 Received: (at 49280) by debbugs.gnu.org; 29 Jun 2021 21:58:17 +0000 Received: from localhost ([127.0.0.1]:55851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLkG-0003Wa-9Q for submit@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:17 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]:37811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyLkD-0003Vv-83 for 49280@debbugs.gnu.org; Tue, 29 Jun 2021 17:58:14 -0400 Received: by mail-qk1-f174.google.com with SMTP id z3so325639qkl.4 for <49280@debbugs.gnu.org>; Tue, 29 Jun 2021 14:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KJqHB3IouE86/cSOeFf5g7VR9FXYvEPEZYQlU4ol4oQ=; b=eM0YXhKtsmLOrVbMpusDN40AEQOCwm8beh0fJaZzS/zl8BgbXjSmmMkhI2C+CPFnwC nkuVXvvbDANg1/+tHspoC1XvknqTsuJ3kovZP67R4IzkFLFF4xIqbtKIpZ4KU24rFYkg AR74jjLXVG8An2fTaZqu8GWSRMc0TJak+b7uYSB6npvtgNNRDym0tfA3appCwjUoEAV/ tD3Yu4u6wLfKDO6xXf5JrNHxTllHRD3rYseNaDHgADoXRitGY+0nNSMtTpt0BBtrKUJC f0qpiquzvImFormxdb1pO4ZM7H/0vJ5nT1G/clr7tySe8kUFUrPAb3GFaeAUy72Yh41b 3M2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KJqHB3IouE86/cSOeFf5g7VR9FXYvEPEZYQlU4ol4oQ=; b=JD9sJxmwTSyjPRTjJinmW12FNx36o5FGmAIHXRkqv2DywApSdLmWaJa9zpRrJwLFEO 7oGHqWXe4RxBKojUlMO+HqX2W0PMhTRnHm7nQAx38MB43FoQsomJRCSRid7S1Ow5sPUn JpRIXJYMpTfCsMWkVE+hGSNLbj6pZUT+YqBkE8fWB2+3xhXLy50vW5KaKRwnnxW2dQ26 4zvs6c2+CPD0Ty9uJmAXAPeM+VFcy0MwZv/rvQb4szKopzjtteMg2X6fQUJA+ZkP/Kgr G93VKViY6fd7FSsxu/4Y5rIVJ1RwyfwDTxOhzbeRzhJR/UI4jyRwKctuLGnm0PvEDris +t6w== X-Gm-Message-State: AOAM533QMZsconc19v7gDT75GdwEKai+Wspr3ncbpzsUXeGVm87ULkHO hP+ZN3fY9Llk4MteZIecobPfoejpTWX1U+7spZY= X-Google-Smtp-Source: ABdhPJw6ZQr1Di7CQQfye9l0IyK+9T4qLb84/hzT6E+GT/fSL4gp+IA7VA0jaQAZxeUAqelYdzOZYA== X-Received: by 2002:a37:59c7:: with SMTP id n190mr32832441qkb.146.1625003887495; Tue, 29 Jun 2021 14:58:07 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id t11sm3995529qtq.75.2021.06.29.14.58.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 14:58:07 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH 4/4] gnu: racket-next-minimal: Bootstrap from C. Date: Tue, 29 Jun 2021 17:57:42 -0400 Message-Id: <20210629215742.3112654-4-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210629215742.3112654-1-philip@philipmcgrath.com> References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This commit bootstraps the Racket compiler and runtime system from source, including Racket CS as well as both variants of Racket BC. (One remaining limitation is discussed in comments added to gnu/pa [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: download.racket-lang.org] 0.6 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: download.racket-lang.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.222.174 listed in list.dnswl.org] 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.222.174 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.4 (/) This commit bootstraps the Racket compiler and runtime system from source, including Racket CS as well as both variants of Racket BC. (One remaining limitation is discussed in comments added to gnu/packages/racket.scm.) In the process, it moves to building minimal Racket from the Git repository, rather than the packaged source tarballs. The Git repository is slightly better as the ``corresponding source'': 1. A few packages especially closely tied to the Racket core implementation (like "compiler-lib", "base", and "racket-doc") are developed in the same Git repository. Having them use the same Guix origin, too, will help to keep them in sync. 2. The top-level Makefile in the Git repository is an important ``script[] used to control compilation and installation.'' In particular, it cooperates with the "distro-build" package to create the source tarballs and installers for a Racket distribution. (Racket supports a notion of custom distributions.) 3. It is ``the preferred form ... for making modifications'' to the core Racket implementation. Racket releases are tagged in the Git repository (e.g. "v8.1"). At the beginning of each release cycle, a branch is created to stabalize a version for extra testing. Active development happens on the "master" branch. * gnu/packages/racket-next-minimal-sh-via-rktio.patch: New file, coppied from racket-sh-via-rktio.patch to accomodate an extra directory layer. When racket-next-minimal becomes racket-minimal, this version will be the only one needed. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/local/racket.scm (cfg-flag:sh-for-rktio, cfg-flag:enable-lt, cfg-flag:enable-racket, unpack-nanopass+stex, %main-repo-main-distribution-pkgs): New private variables. * gnu/local/racket.scm (racket-next-minimal)[source]: Use Git. [source](snippet): Unbundle nanopass, stex, and libffi. [inputs]: List explicitly. [native-inputs]: Use racket-next-bootstrap-bootfiles, plus its dependencies (for Chez, plus a Racket for bootstrappig). [arguments]: Revise extensively. * gnu/local/racket.scm (racket-next-minimal-bc-3m, racket-next-minimal-bc-cgc): New packages, hidden at least for now. (racket-next-bootstrap-chez-bootfiles): Another new package, but this one is especially likely to stay hidden. * gnu/local/racket.scm (racket-next)[origin](snippet): Unbundle packages developed in the main Git repository, but leave their links.rktd and pkgs.rktd entries in place. [native-inputs]: Add the main Racket Git repository. [arguments](#:phases): Adjust 'unpack-packages to also unpack package sources from the main Racket Git repository. --- gnu/local.mk | 1 + .../racket-next-minimal-sh-via-rktio.patch | 87 +++++ gnu/packages/racket.scm | 357 +++++++++++++++--- 3 files changed, 396 insertions(+), 49 deletions(-) create mode 100644 gnu/packages/patches/racket-next-minimal-sh-via-rktio.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6b9202cba1..4ca35cf56a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1671,6 +1671,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-next-minimal-sh-via-rktio.patch \ %D%/packages/patches/racket-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch \ diff --git a/gnu/packages/patches/racket-next-minimal-sh-via-rktio.patch b/gnu/packages/patches/racket-next-minimal-sh-via-rktio.patch new file mode 100644 index 0000000000..6bc2ee8331 --- /dev/null +++ b/gnu/packages/patches/racket-next-minimal-sh-via-rktio.patch @@ -0,0 +1,87 @@ +From 3574b567c486d264d680a37586436c3b5a8cb978 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 + +Racket provides the functions `system` and `process`, +which execute shell commands using `sh` (or `cmd` on Windows). +Racket assumes that `sh` can be found at "/bin/sh", +which is not necessarily true on Guix. + +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 + + 2. `rktio_process` is called with the exact path "/bin/sh"; and + + 3. The path specified by `GUIX_RKTIO_PATCH_BIN_SH` does exists; + +then `rktio_process` will execute the file specified +by `GUIX_RKTIO_PATCH_BIN_SH` 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. +--- + racket/src/rktio/rktio_process.c | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/racket/src/rktio/rktio_process.c b/racket/src/rktio/rktio_process.c +index 89202436c0..465ebdd5c5 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) + /*========================================================================*/ + + rktio_process_result_t *rktio_process(rktio_t *rktio, +- const char *command, int argc, rktio_const_string_t *argv, ++ /* PATCHED for Guix (next line) */ ++ const char *_guix_orig_command, int argc, rktio_const_string_t *argv, + rktio_fd_t *stdout_fd, rktio_fd_t *stdin_fd, rktio_fd_t *stderr_fd, + rktio_process_t *group_proc, + const char *current_directory, rktio_envvars_t *envvars, + int flags) + { ++ const char *command; /* PATCHED for Guix */ + 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, + 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: */ ++ 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) ++ : _guix_orig_command; ++# undef GUIX_AS_a_STR ++# undef GUIX_AS_a_STR_HELPER ++#else ++ command = _guix_orig_command; ++#endif ++/* END PATCH for Guix */ ++ + /* avoid compiler warnings: */ + to_subprocess[0] = -1; + to_subprocess[1] = -1; +-- +2.21.1 (Apple Git-122.3) + diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index cf0240be5c..4e2d498364 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -32,7 +32,9 @@ #:use-module (srfi srfi-1) #: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) #:use-module (gnu packages fontutils) @@ -41,6 +43,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages libedit) + #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) @@ -49,6 +52,7 @@ ;; Commentary: ;; ;; Preliminary guidelines on naming things: +;; ;; - `racket` is the main package. It corresponds to `racket-minimal` ;; with the Racket-level package "main-distribution" installed. ;; - `racket-minimal` is Racket runtime system and core libraries: @@ -74,6 +78,49 @@ ;; individually, we will need `racket-next-pkg-` for the packages ;; that make up `racket-next`. ;; +;; Here's how bootstrapping minimal Racket works: +;; +;; - Racket BC [CGC] can be built with only a C compiler (except for +;; one caveat discussed below). +;; - Racket BC [3M] needs an existing Racket to run "xform", +;; which transforms its own C source code to add additional annotations +;; for the precise garbage collector. +;; - Racket CS needs (bootfiles for) Racket's fork of Chez Scheme. +;; It also needs an existing Racket to compile Racket-implemented +;; parts of the runtime system to R6RS libraries. +;; - Chez Scheme also needs bootfiles for itself, but Racket can simulate +;; enough of Chez Scheme to load Racket's fork of the Chez Scheme compiler +;; purely from source into Racket and apply the compiler to itself, +;; producing the needed bootfiles (albeit very slowly). +;; Any variant of Racket since version 7.1 can run the simulation. +;; +;; So, we build CGC to build 3M to build bootfiles and CS. +;; +;; One remaining bootstrapping limitation is that Racket's reader, module +;; system, and macro expander are implemented in Racket. For Racket CS, +;; they are compiled to R6RS libraries as discussed above. This note from the +;; README file applies to all such subsystems: +;; +;; The Racket version must be practically the same as the current Racket +;; verson, although it can be the Racket BC implementation (instead of +;; the Racket CS implementation). +;; +;; Unlike Chez Scheme boot files, the files generated in "schemified" +;; are human-readable and -editable Scheme code. That provides a way +;; out of bootstrapping black holes, even without BC. +;; +;; 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. +;; +;; 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: @@ -200,7 +247,6 @@ DrRacket IDE, are not included.") ;; https://download.racket-lang.org/license.html (license (list lgpl3+ asl2.0 expat)))) - (define-public racket (package (inherit racket-minimal) @@ -243,8 +289,35 @@ The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) -(define %pre-release-installers - "https://pre-release.racket-lang.org/installers/") + +(define cfg-flag:sh-for-rktio + `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" + (assoc-ref %build-inputs "sh") + "/bin/sh")) +(define cfg-flag:enable-lt + `(string-append "--enable-lt=" + (assoc-ref %build-inputs "libtool") + "/bin/libtool")) +(define cfg-flag:enable-racket + `(let ((racket (assoc-ref %build-inputs "racket"))) + (string-append "--enable-racket=" + racket + "/bin/racket"))) + +(define unpack-nanopass+stex + ;; Copied from chez-scheme. + ;; TODO: Eventually, we should refactor Chez Scheme + ;; enough to share more directly, so that we can make + ;; Racket's version of Chez avalable as a Guix package, + ;; e.g. for architectures not supported upstream. + ;; For now, we let Racket drive the Chez build process + ;; other than this step. + `(for-each (lambda (dep) + (define src + (assoc-ref (or native-inputs inputs) dep)) + (copy-recursively src dep + #:keep-mtime? #t)) + '("nanopass" "stex"))) (define-public racket-next-minimal (package @@ -253,12 +326,214 @@ languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) (version "8.1.900") (source (origin - (inherit (package-source racket-minimal)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit "0874b76de4f147ada46607857d8acf8445a1073d"))) (sha256 (base32 - "0dm849wvlaxpfgz2qmgy2kwdslyi515rxn1m1yff38lagbn21vxq")) - (uri (string-append %pre-release-installers - "racket-minimal-src.tgz")))))) + "0gy6rwyrpaij5k5pcyiif821b4vffqiaxg1vpg4iykw2c5ypfp43")) + (file-name + (git-file-name name version)) + (patches + (search-patches + "racket-next-minimal-sh-via-rktio.patch")) + (snippet + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + ;; unbundle Chez submodules + (with-directory-excursion "racket/src/ChezScheme" + #$(origin-snippet (package-source chez-scheme))) + ;; unbundle libffi + (for-each + delete-file-recursively + '("racket/src/bc/foreign/libffi"))))))) + (inputs + `(;; common to all racket-minimal variants: + ("openssl" ,openssl) + ("sqlite" ,sqlite) + ("sh" ,bash-minimal) + ;; only for CS + ("zlib" ,zlib) + ("zlib:static" ,zlib "static") + ("lz4" ,lz4) + ("lz4:static" ,lz4 "static"))) + (native-inputs + `(("bootfiles" ,racket-next-bootstrap-chez-bootfiles) + ,@(package-native-inputs racket-next-bootstrap-chez-bootfiles))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--enable-csonly" + "--enable-libz" + "--enable-liblz4" + ,cfg-flag:enable-racket + ,cfg-flag:sh-for-rktio) + #:out-of-source? #true + #:tests? #f ;; not yet + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + ,unpack-nanopass+stex))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (string-append (assoc-ref inputs "bootfiles") "/boot") + "boot")))) + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (format #t + "#hash((lib-search-dirs . ~s))\n" + (cons #f + (map (lambda (lib) + (string-append (assoc-ref inputs lib) + "/lib")) + '("openssl" + "sqlite")))))) + #t)) + (replace 'configure + (let ((inner (assq-ref %standard-phases 'configure))) + (lambda args + (chdir "racket/src") + (apply inner args)))) + (add-after 'install 'remove-pkgs-directory + ;; otherwise, e.g., `raco pkg show` will try and fail to + ;; create a lock file + (lambda* (#:key outputs #:allow-other-keys) + ;; rmdir because we want an error if it isn't empty + (rmdir (string-append (assoc-ref outputs "out") + "/share/racket/pkgs")) + #t))))) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list asl2.0 expat)))) + +(define-public racket-next-minimal-bc-3m + (hidden-package + (package/inherit racket-next-minimal + (name "racket-next-minimal-bc-3m") + (inputs + `(("libffi" ,libffi) ;; <- only for BC variants + ,@(filter (match-lambda + ((label . _) + (not (member label + '("zlib" "zlib:static" + "lz4" "lz4:static"))))) + (package-inputs racket-next-minimal)))) + (native-inputs + `(("libtool" ,libtool) + ("racket" ,(if (%current-target-system) + racket-next-minimal + racket-next-minimal-bc-cgc)))) + (arguments + (substitute-keyword-arguments (package-arguments racket-next-minimal) + ((#:configure-flags _ '()) + `(list "--enable-bconly" + ,cfg-flag:enable-racket + ,cfg-flag:enable-lt + ,cfg-flag:sh-for-rktio)) + ((#:phases usual-phases) + `(modify-phases ,usual-phases + (delete 'unpack-nanopass+stex) + (delete 'unpack-bootfiles))))) + (synopsis "Minimal Racket with the BC [3M] runtime system") + (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 than the newer runtune system (Racket CS) supports a slightly different set of architectures than the current runtime system, Racket CS (based on ``Chez Scheme''). + +This packackage is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Manager'').")))) + +(define-public racket-next-minimal-bc-cgc + (package/inherit racket-next-minimal-bc-3m + (name "racket-next-minimal-bc-cgc") + (native-inputs + (filter (match-lambda + (("racket" . _) + #f) + (_ + #t)) + (package-native-inputs racket-next-minimal-bc-3m))) + (arguments + (substitute-keyword-arguments (package-arguments racket-next-minimal-bc-3m) + ((#:configure-flags _ '()) + `(list "--enable-cgcdefault" + ,cfg-flag:enable-lt + ,cfg-flag:sh-for-rktio)))) + (synopsis "Old Racket implemetation used for bootstapping") + (description "This variant of the Racket BC (``before Chez'' or ``bytecode'') implementation is not recommended for general use. It uses CGC (a ``Conservative Garbage Collector''), which was succeeded as default in PLT Scheme version 370 (which translates to 3.7 in the current versioning scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the Racket CS implementation. + +Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector."))) + +(define-public racket-next-bootstrap-chez-bootfiles + (hidden-package + (package/inherit racket-next-minimal + (name "racket-next-bootstrap-chez-bootfiles") + (inputs `()) + (native-inputs + `(("racket" ,(if (%current-target-system) + racket-next-minimal + racket-next-minimal-bc-3m)) + ("stex" ,@(assoc-ref (package-native-inputs chez-scheme) "stex")) + ("nanopass" ,@(assoc-ref (package-native-inputs chez-scheme) + "nanopass")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + ,unpack-nanopass+stex))) + (delete 'configure) + (delete 'patch-generated-file-shebangs) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (invoke (string-append (assoc-ref inputs "racket") + "/bin/racket") + "rktboot/main.rkt" + "--dest" (assoc-ref outputs "out"))) + #t)) + (delete 'check) + (delete 'install)))) + (synopsis "Chez Scheme bootfiles bootstrapped by Racket") + (description "Chez Scheme is a self-hosting compiler: building it requires ``bootfiles'' containing the Scheme-implemented portions compiled for the current platform. (Chez can then cross-compile bootfiles for all other supported platforms.) + +The Racket package ``cs-bootstrap'' (part of the main Racket Git repository) implements enough of a Chez Scheme simulation to load the Chez Scheme compiler purely from source into Racket and apply the compiler to itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as long as using an existing Chez Scheme, but ``cs-bootstap'' supports Racket 7.1 and later, including the Racket BC variant. + +Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and ``cs-bootstrap'' does not currently support building upstream Chez Scheme.") + (license (package-license chez-scheme))))) + + +(define %pre-release-installers + "https://pre-release.racket-lang.org/installers/") + +(define %main-repo-main-distribution-pkgs + ;; These are the packages developed in the main Racket Git repository + ;; that are part of the main distribution. + '("at-exp-lib" + "base" + "compiler-lib" + ;; NOT "compiler-test" + "compiler" + "net-doc" + "net-lib" + ;; NOT "net-test" + "net" + ;; NOT "plt-services" + ;; NOT "racket-benchmarks" + ;; NOT "racket-build-guide" + "racket-doc" + "racket-index" + "racket-lib" + ;; NOT "racket-test-core" + ;; NOT "racket-test-extra" + ;; NOT "racket-test" + "zo-lib")) (define-public racket-next (package @@ -289,36 +564,10 @@ languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) "README" "src")) ;; unbundle package sources included elsewhere - (define (substitute/delete file pattern) - (substitute - file - (list (cons pattern - (lambda (line matches) - ;; must match exactly once - (match matches - ((m) - (string-append (match:prefix m) - (match:suffix m))))))))) - (define (unbundle-pkg pkg) - (define quoted-pkg (regexp-quote pkg)) - (with-directory-excursion "share" - (substitute/delete - "links.rktd" - (string-append - "[(][^()]+[(]#\"pkgs\" #\"" - quoted-pkg - "\"[)][)]")) - (with-directory-excursion "pkgs" - (substitute/delete - "pkgs.rktd" - (string-append - "[(]\"" - quoted-pkg - "\" \\. #s[(]" - "(pkg-info|[(]sc-pkg-info pkg-info 3[)])" - " [(][^()]+[)] [^()]+[)][)]")) - (delete-file-recursively pkg)))) - (unbundle-pkg "racket-lib")))))) + (with-directory-excursion "share/pkgs" + (for-each delete-file-recursively + '#+%main-repo-main-distribution-pkgs)) + #t))))) (inputs `(("cairo" ,cairo) ("fontconfig" ,fontconfig) @@ -336,22 +585,32 @@ languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) ("libedit" ,libedit))) (native-inputs `(("racket" ,racket-next-minimal) - ("extend-layer" ,extend-layer))) + ("extend-layer" ,extend-layer) + ("main-repo" ,(package-source racket-next-minimal)))) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'unpack-packages - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out"))) - (mkdir-p (string-append prefix "/share/racket/pkgs")) - (copy-recursively - "share/links.rktd" - (string-append prefix "/share/racket/links.rktd")) - (copy-recursively - "share/pkgs" - (string-append prefix "/share/racket/pkgs")) - #t))) + (let ((unpack (assoc-ref %standard-phases 'unpack))) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let* ((racket (assoc-ref (or native-inputs inputs) "racket")) + (prefix (assoc-ref outputs "out")) + (pkgs-dir (string-append prefix "/share/racket/pkgs"))) + (mkdir-p pkgs-dir) + (copy-recursively + "share/links.rktd" + (string-append prefix "/share/racket/links.rktd")) + (copy-recursively "share/pkgs" pkgs-dir) + ;; NOTE: unpack changes the working directory + (unpack #:source (assoc-ref (or native-inputs inputs) + "main-repo")) + (for-each (lambda (pkg) + (define dest (string-append pkgs-dir "/" pkg)) + (mkdir-p dest) + (copy-recursively (string-append "pkgs/" pkg) + dest)) + ',%main-repo-main-distribution-pkgs) + #t)))) (replace 'configure (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let ((racket (assoc-ref (or native-inputs inputs) "racket")) -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 17:25:52 2021 Received: (at 49280) by debbugs.gnu.org; 8 Jul 2021 21:25:52 +0000 Received: from localhost ([127.0.0.1]:57742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1bWp-0007kC-UX for submit@debbugs.gnu.org; Thu, 08 Jul 2021 17:25:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1bWn-0007jy-Fn for 49280@debbugs.gnu.org; Thu, 08 Jul 2021 17:25:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53204) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1bWi-0004de-5Q; Thu, 08 Jul 2021 17:25:44 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42858 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1bWh-00083U-Tt; Thu, 08 Jul 2021 17:25:44 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philip McGrath Subject: Re: bug#49280: [PATCH 0/4] gnu: racket: Add racket-next. Bootstrap from C. References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-2-philip@philipmcgrath.com> Date: Thu, 08 Jul 2021 23:25:42 +0200 In-Reply-To: <20210629215742.3112654-2-philip@philipmcgrath.com> (Philip McGrath's message of "Tue, 29 Jun 2021 17:57:40 -0400") Message-ID: <87lf6gjy5l.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Philip McGrath skribis: > * gnu/packages/racket.scm (racket-next-minimal,racket-next): New variable= s. [...] > +++ b/gnu/packages/racket.scm > @@ -23,6 +23,7 @@ > #:use-module ((guix licenses) > #:select (asl2.0 expat lgpl3+)) > #:use-module (guix packages) > + #:use-module (guix base16) Leftover? > +;; Preliminary guidelines on naming things: > +;; - `racket` is the main package. It corresponds to `racket-minimal` > +;; with the Racket-level package "main-distribution" installed. > +;; - `racket-minimal` is Racket runtime system and core libraries: > +;; just enough to implement the package system and install the rest. > +;; Upstream refers to this as "minimal Racket". Note that these two names match existing conventions in Guix. I=E2=80=99d suggest moving the bits about the package contents/features nex= t to the definition of =E2=80=98racket=E2=80=99 and =E2=80=98racket-minimal=E2= =80=99. > +;; - `racket-pkg-` should probably be the prefix for Racket packages > +;; available as Guix packages, once we're able to build those. > +;; More specifically, it should correspond > +;; to packages registered in the catalog at https://pkgs.rackat-lang= .org. > +;; This is a social convention to manage the namespace, not a techni= cal > +;; limitation: Racket can use other catalogs (e.g. for pre-built pac= kages > +;; or packages pinned to specific versions), unregistered package so= urce > +;; urls, or purely local packages. But we also need a convention to > +;; manage the namespace, so we should use this one. In practice, > +;; all generally useful libre Racket packages are registered there. > +;; We probably will need a clever encoding scheme to deal with the f= act > +;; that Racket package names can contain [A-Za-z_-], i.e. including = "_", > +;; which is not allowed in Guix package names. For this there=E2=80=99s already a documented convention (info "(guix) Pack= age Naming"), although part of it is undocumented. The prefix would rather be =E2=80=9Cracket-=E2=80=9D to match what we do with other packages=E2=80= =93=E2=80=9Cghc-=E2=80=9D, =E2=80=9Cocaml-=E2=80=9D, =E2=80=9Cguile-=E2=80=9D, and so forth. > +;; - `racket-next` is a development version of `racket`, following eit= her > +;; the upstrean Git HEAD or the release candidate, when one exists. > +;; - `racket-next-` is the prefix for other development packages, > +;; including `racket-next-minimal`. When we can build Racket packages > +;; individually, we will need `racket-next-pkg-` for the packages > +;; that make up `racket-next`. These two are also conventional and don=E2=80=99t need to be documented here IMO. > +(define %pre-release-installers > + "https://pre-release.racket-lang.org/installers/") > + > +(define-public racket-next-minimal > + (package > + (inherit racket-minimal) > + (name "racket-next-minimal") > + (version "8.1.900") > + (source > + (origin > + (inherit (package-source racket-minimal)) > + (sha256 > + (base32 > + "0dm849wvlaxpfgz2qmgy2kwdslyi515rxn1m1yff38lagbn21vxq")) > + (uri (string-append %pre-release-installers > + "racket-minimal-src.tgz")))))) > + > +(define-public racket-next > + (package > + (inherit racket) > + (name "racket-next") > + (version (package-version racket-next-minimal)) > + (source > + (origin > + (inherit (package-source racket)) > + (sha256 > + (base32 > + "0ysvzgm0lx4b1p4k9balvcbvh2kapbfx91c9ls80ba062cd8y5qv")) > + (uri (string-append %pre-release-installers > + "racket-src.tgz")))))) Do I get it right that *-src.tgz are not versioned? That they=E2=80=99re updated in place regularly? In that case, we cannot refer to them in a package definition since the hash is bound to become stale. What we could do is refer to, say, . However, I suspect this file would vanish fairly quickly from the web site, which is not okay either. I=E2=80=99m not sure what a good solution would be. WDYT? It may be that =E2=80=98--with-source=3Dhttps://pre-release.racket-lang.org/installers/rac= ket-src.tgz=E2=80=99 would do the job for those who=E2=80=99re into that. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 17:43:51 2021 Received: (at 49280) by debbugs.gnu.org; 8 Jul 2021 21:43:51 +0000 Received: from localhost ([127.0.0.1]:57772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1boE-0008Dk-G2 for submit@debbugs.gnu.org; Thu, 08 Jul 2021 17:43:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1boB-0008DU-7u for 49280@debbugs.gnu.org; Thu, 08 Jul 2021 17:43:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53424) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1bo5-0001XV-RY; Thu, 08 Jul 2021 17:43:41 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42860 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1bo5-0003qb-Jy; Thu, 08 Jul 2021 17:43:41 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philip McGrath Subject: Re: bug#49280: [PATCH 0/4] gnu: racket: Add racket-next. Bootstrap from C. References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-4-philip@philipmcgrath.com> Date: Thu, 08 Jul 2021 23:43:39 +0200 In-Reply-To: <20210629215742.3112654-4-philip@philipmcgrath.com> (Philip McGrath's message of "Tue, 29 Jun 2021 17:57:42 -0400") Message-ID: <87eec8jxbo.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Philip McGrath skribis: > This commit bootstraps the Racket compiler and runtime system from source, > including Racket CS as well as both variants of Racket BC. (One remaining > limitation is discussed in comments added to gnu/packages/racket.scm.) > > In the process, it moves to building minimal Racket from the Git reposito= ry, > rather than the packaged source tarballs. The Git repository is slightly > better as the ``corresponding source'': > > 1. A few packages especially closely tied to the Racket core implementat= ion > (like "compiler-lib", "base", and "racket-doc") are developed in the > same Git repository. Having them use the same Guix origin, too, will > help to keep them in sync. > > 2. The top-level Makefile in the Git repository is an important > ``script[] used to control compilation and installation.'' > In particular, it cooperates with the "distro-build" package to > create the source tarballs and installers for a Racket distribution. > (Racket supports a notion of custom distributions.) > > 3. It is ``the preferred form ... for making modifications'' to the core > Racket implementation. > > Racket releases are tagged in the Git repository (e.g. "v8.1"). At the > beginning of each release cycle, a branch is created to stabalize a versi= on > for extra testing. Active development happens on the "master" branch. > > * gnu/packages/racket-next-minimal-sh-via-rktio.patch: New file, coppied > from racket-sh-via-rktio.patch to accomodate an extra directory layer. > When racket-next-minimal becomes racket-minimal, this version will be > the only one needed. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/local/racket.scm (cfg-flag:sh-for-rktio, cfg-flag:enable-lt, > cfg-flag:enable-racket, unpack-nanopass+stex, > %main-repo-main-distribution-pkgs): New private variables. > * gnu/local/racket.scm (racket-next-minimal)[source]: Use Git. > [source](snippet): Unbundle nanopass, stex, and libffi. > [inputs]: List explicitly. > [native-inputs]: Use racket-next-bootstrap-bootfiles, plus its > dependencies (for Chez, plus a Racket for bootstrappig). > [arguments]: Revise extensively. > * gnu/local/racket.scm (racket-next-minimal-bc-3m, > racket-next-minimal-bc-cgc): New packages, hidden at least for now. > (racket-next-bootstrap-chez-bootfiles): Another new package, but this one > is especially likely to stay hidden. > * gnu/local/racket.scm (racket-next)[origin](snippet): Unbundle packages > developed in the main Git repository, but leave their links.rktd and > pkgs.rktd entries in place. > [native-inputs]: Add the main Racket Git repository. > [arguments](#:phases): Adjust 'unpack-packages to also unpack package > sources from the main Racket Git repository. Exciting! [...] > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/racket/racket") > + (commit "0874b76de4f147ada46607857d8acf8445a1073d"))) > (sha256 > (base32 > - "0dm849wvlaxpfgz2qmgy2kwdslyi515rxn1m1yff38lagbn21vxq")) > - (uri (string-append %pre-release-installers > - "racket-minimal-src.tgz")))))) > + "0gy6rwyrpaij5k5pcyiif821b4vffqiaxg1vpg4iykw2c5ypfp43")) > + (file-name > + (git-file-name name version)) > + (patches > + (search-patches > + "racket-next-minimal-sh-via-rktio.patch")) Please keep these on a single line, as in: (file-name (git-file-name name version)) > + (replace 'configure > + (let ((inner (assq-ref %standard-phases 'configure))) > + (lambda args > + (chdir "racket/src") > + (apply inner args)))) I=E2=80=99d find it clearer like this: (add-before 'configure 'change-directory (lambda _ (chdir "racket/src"))) > + (add-after 'install 'remove-pkgs-directory > + ;; otherwise, e.g., `raco pkg show` will try and fail to > + ;; create a lock file > + (lambda* (#:key outputs #:allow-other-keys) > + ;; rmdir because we want an error if it isn't empty > + (rmdir (string-append (assoc-ref outputs "out") > + "/share/racket/pkgs")) > + #t))))) Please write full sentences with a bit more context (=E2=80=9CRemove package directory, otherwise =E2=80=98raco pkg show=E2=80=99 =E2=80=A6=E2=80=9D). > +(define-public racket-next-minimal-bc-3m > + (hidden-package > + (package/inherit racket-next-minimal > + (name "racket-next-minimal-bc-3m") This is =E2=80=9C-next=E2=80=9D because it=E2=80=99s targeting 8.1, which i= s not released yet, right? Since it=E2=80=99s only used for bootstrapping, perhaps use =E2=80=98define= =E2=80=99 instead of =E2=80=98define-public=E2=80=99 and remove the call to =E2=80=98hidden-pack= age=E2=80=99. It should also be (package (inherit =E2=80=A6) =E2=80=A6) rather than (pack= age/inherit =E2=80=A6). The latter is only useful when defining variants of a package = (same version, same code) where the same security updates would apply. > + (inputs > + `(("libffi" ,libffi) ;; <- only for BC variants > + ,@(filter (match-lambda > + ((label . _) > + (not (member label > + '("zlib" "zlib:static" > + "lz4" "lz4:static"))))) > + (package-inputs racket-next-minimal)))) Please use this more common idiom: ,@(fold alist-delete (package-inputs racket-next-minimal) '("zlib" =E2=80= =A6)) (It matters notably because =E2=80=98guix style=E2=80=99 recognizes it: .) > + (synopsis "Minimal Racket with the BC [3M] runtime system") > + (description "The Racket BC (``before Chez'' or ``bytecode'') imple= mentation 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 than the newer runtune system (R= acket CS) supports a slightly different set of architectures than the curre= nt runtime system, Racket CS (based on ``Chez Scheme''). > + > +This packackage is the normal implementation of Racket BC with a precise= garbage collector, 3M (``Moving Memory Mana ^ Typo here, and lines too long (here and in other places). :-) Please also check what =E2=80=98guix lint=E2=80=99 thinks! > +(define-public racket-next-minimal-bc-cgc > + (package/inherit racket-next-minimal-bc-3m > + (name "racket-next-minimal-bc-cgc") > + (native-inputs > + (filter (match-lambda > + (("racket" . _) > + #f) > + (_ > + #t)) > + (package-native-inputs racket-next-minimal-bc-3m))) Rather: (alist-delete "racket" (package-native-inputs racket-next-minimal-b= c-3m)) > + (license (package-license chez-scheme))))) You cannot do that since here since potentially we could end up with circular top-level references from these two modules. Instead, restate what the license is. Thanks for all this! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 18 17:36:06 2021 Received: (at 49280) by debbugs.gnu.org; 18 Jul 2021 21:36:06 +0000 Received: from localhost ([127.0.0.1]:57534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5ESD-0001JP-R2 for submit@debbugs.gnu.org; Sun, 18 Jul 2021 17:36:06 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:33768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5ESC-0001Iv-B1 for 49280@debbugs.gnu.org; Sun, 18 Jul 2021 17:36:04 -0400 Received: by mail-qk1-f178.google.com with SMTP id 23so14874317qke.0 for <49280@debbugs.gnu.org>; Sun, 18 Jul 2021 14:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3V6+ktDyKbzbZxhpPTJTR09o/LWtiVUK6TWiorfjXPQ=; b=QDXUls7Y9HLndgfzIebGOamzAGA5CctftwAvUn3idZmMKviUft64Cy8SuPbgg6lM9k Std7J1fMubVFoHhtBVqmtUsx9tHjS7ftrNkbM05IWUkQjq5Ro3RX76xrUIr6MiZ+IQwM fd7KtS9OOkx/48u5iYSKGysHE23JiRa3E0RcazkCdiCRSFoD/EKlGGJbbQQk3Px/Bowv mmSIPZSHKEf7ZWEPMacXpjzEt/an9m4qRrrzlwkoy42UuHa+HVtz2GFuqNK12kX9nZKE uoPfTqPXW1phQoGguJaiBeknhMejYN815YwDGW98ttuUW91PEJPyWtbGHC8pnYjXdiek jIjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3V6+ktDyKbzbZxhpPTJTR09o/LWtiVUK6TWiorfjXPQ=; b=M6hrhgP/Un24bqYx8D99bv11lzHWPiykIIzDuzhq6eYyIFydFtiyBbdOES+1AIdd8N WKG9WMzow/a2rvH4oAze2wBy+ZChEXJIVMlDH8kgiUNS2mtKtmYxNAIh6mXG+eQ4KAYc 7AtUfzzio6yREayXw0+X+4WnYj4iaVLQDjnRefP5R28h2uLEVLleoG0wTO+ODlkb0HqM 7HkRkWLvj6/TtC5EWEchSAallK6lypkIWtKj31HnHLRfH0tX2uxm8Wx/AFqq7PEgLoIt CXymkeGKq7iSu4byzcFT5w2n/5r/UW3HYQcashzPQQD84uiQ8RMdqSiN+iXeqLY7BOAf 9YeQ== X-Gm-Message-State: AOAM533OpIqrmI+UZ5a1voXbya02khLPP5uxxsStcSFz6e3kLCto1Q0W qBr9x6Hzlu4pq0K/CMxfZfb1EAydUWeQ3LgJiuw= X-Google-Smtp-Source: ABdhPJz3uD9iydIuqQZkng4FQAhTbogQ8by/jNO6WeGJTYx2/j1eEq7sjnXKcG8J4Aq2eJV7E/M6sg== X-Received: by 2002:a37:f506:: with SMTP id l6mr21271976qkk.468.1626644158549; Sun, 18 Jul 2021 14:35:58 -0700 (PDT) Received: from Sapientia.local (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id o186sm7330658qke.44.2021.07.18.14.35.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Jul 2021 14:35:58 -0700 (PDT) Subject: Re: bug#49280: [PATCH 0/4] gnu: racket: Add racket-next. Bootstrap from C. To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-2-philip@philipmcgrath.com> <87lf6gjy5l.fsf_-_@gnu.org> From: Philip McGrath Message-ID: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> Date: Sun, 18 Jul 2021 17:35:56 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <87lf6gjy5l.fsf_-_@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi! I've been mostly offline for a bit, and Racket 8.2 was released today (a little ahead of schedule), so I will rework this patch series to just update to 8.2 and not deal with adding "-next" variants for now. I'll respond to here, though, to keep the discussion together. On 7/8/21 5:25 PM, Ludovic Courtès wrote: > Philip McGrath skribis: > >> * gnu/packages/racket.scm (racket-next-minimal,racket-next): New variables. > > [...] > >> +++ b/gnu/packages/racket.scm >> @@ -23,6 +23,7 @@ >> #:use-module ((guix licenses) >> #:select (asl2.0 expat lgpl3+)) >> #:use-module (guix packages) >> + #:use-module (guix base16) > > Leftover? Yes, thanks! >> +;; - `racket-pkg-` should probably be the prefix for Racket packages >> +;; available as Guix packages, once we're able to build those. >> +;; More specifically, it should correspond >> +;; to packages registered in the catalog at https://pkgs.rackat-lang.org. >> +;; This is a social convention to manage the namespace, not a technical >> +;; limitation: Racket can use other catalogs (e.g. for pre-built packages >> +;; or packages pinned to specific versions), unregistered package source >> +;; urls, or purely local packages. But we also need a convention to >> +;; manage the namespace, so we should use this one. In practice, >> +;; all generally useful libre Racket packages are registered there. >> +;; We probably will need a clever encoding scheme to deal with the fact >> +;; that Racket package names can contain [A-Za-z_-], i.e. including "_", >> +;; which is not allowed in Guix package names. > > For this there’s already a documented convention (info "(guix) Package > Naming"), although part of it is undocumented. The prefix would rather > be “racket-” to match what we do with other packages–“ghc-”, “ocaml-”, > “guile-”, and so forth. I wrote these as statements in the hope of eliciting any disagreement :) The problem I see with using just “racket-” as the prefix is the potential for collisions, especially because Racket uses a lot of the namespace: for example, "_" is a useful example package for testing package issues, and I maintain the "_-exp" package. There don't seem to be Racket packages named "minimal" or "next" right now, but they seem reasonably likely to be used in the future, and Guix likewise may want to add packages that don't correspond directly to a single Racket-level package. (In fact, I think this may be necessary to build Racket packages with mutually recursive dependencies.) Other Racket package names that I think might be less confusing if prefixed with “racket-pkg-” include "base", "racket-lib", "unstable", "profile", "make", "data", "images", "compiler", "compatibility", "pkg-build", and "main-distribution". But we don't need to resolve this now, and maybe actually implementing that support will clarify what issues really do or don't exist. I will just remove this whole comment for now, since I don't need to make a choice between "racket-next-minimal" and "racket-minimal-next". >> +(define %pre-release-installers >> + "https://pre-release.racket-lang.org/installers/") >> + >> +(define-public racket-next-minimal >> + (package >> + (inherit racket-minimal) >> + (name "racket-next-minimal") >> + (version "8.1.900") >> + (source >> + (origin >> + (inherit (package-source racket-minimal)) >> + (sha256 >> + (base32 >> + "0dm849wvlaxpfgz2qmgy2kwdslyi515rxn1m1yff38lagbn21vxq")) >> + (uri (string-append %pre-release-installers >> + "racket-minimal-src.tgz")))))) >> + >> +(define-public racket-next >> + (package >> + (inherit racket) >> + (name "racket-next") >> + (version (package-version racket-next-minimal)) >> + (source >> + (origin >> + (inherit (package-source racket)) >> + (sha256 >> + (base32 >> + "0ysvzgm0lx4b1p4k9balvcbvh2kapbfx91c9ls80ba062cd8y5qv")) >> + (uri (string-append %pre-release-installers >> + "racket-src.tgz")))))) > > Do I get it right that *-src.tgz are not versioned? That they’re > updated in place regularly? > > In that case, we cannot refer to them in a package definition since the > hash is bound to become stale. > > What we could do is refer to, say, > . > However, I suspect this file would vanish fairly quickly from the web > site, which is not okay either. > > I’m not sure what a good solution would be. WDYT? > > It may be that > ‘--with-source=https://pre-release.racket-lang.org/installers/racket-src.tgz’ > would do the job for those who’re into that. This is also a good catch! For now, I will avoid the problem by just not dealing with "-next" variants. For posterity: while working on this patch series before the release, I faced a similar issue, because the "snapshot" builds explicitly are not retained indefinitely. As a work-around, I based my work on snapshots from Northwestern University (as opposed to the University of Utah), because they retain one snapshot per week for a few months. For the longer term, rather than using the tarballs directly, I used them to produce patch files, which I checked into Guix. Since minimal Racket could be build from Git, I could restrict the patch to main-distribution Racket package sources, which kept the size manageable. Something analogous would probably work for release candidates, but the right long-term solution is for Guix to be able to build Racket packages directly, so we don't have to rely on particular snapshot bundles. On 7/8/21 5:43 PM, Ludovic Courtès wrote: > I’d find it clearer like this: > > (add-before 'configure 'change-directory > (lambda _ > (chdir "racket/src"))) Ah, that's nice. > >> + (add-after 'install 'remove-pkgs-directory >> + ;; otherwise, e.g., `raco pkg show` will try and fail to >> + ;; create a lock file >> + (lambda* (#:key outputs #:allow-other-keys) >> + ;; rmdir because we want an error if it isn't empty >> + (rmdir (string-append (assoc-ref outputs "out") >> + "/share/racket/pkgs")) >> + #t))))) > > Please write full sentences with a bit more context (“Remove package > directory, otherwise ‘raco pkg show’ …”). Will do. >> +(define-public racket-next-minimal-bc-3m >> + (hidden-package >> + (package/inherit racket-next-minimal >> + (name "racket-next-minimal-bc-3m") > > This is “-next” because it’s targeting 8.1, which is not released yet, > right? Correct, but 8.2 (8.1 was released in May). Now that it's been released, the name would be "racket-minimal-bc-3m". > Since it’s only used for bootstrapping, perhaps use ‘define’ instead of > ‘define-public’ and remove the call to ‘hidden-package’. In addition to bootstrapping, there are three reasons I know of to want Racket BC: 1. The BC and CS implementations have different C APIs, so some low-level code may support BC but not CS. But this isn't usually a good reason. Racket packages should support both implementations. Embedding applications ideally would also be portable: if it's only feasible to support one implementation, it should be CS. 2. Comparing the BC and CS implementations can be useful for testing and debugging, both for packages that use the FFI and when hacking on the Racket runtime system itself. 3. Most importantly, BC supports some architectures that CS does not. In particular, Racket CS does not (yet) support ppc64le, which Racket BC does support. The recommendation to packagers, and what Debian does, is to explicitly use BC on platforms without CS support: https://github.com/racket/racket/issues/3773#issuecomment-832935403 I'm not sure what the most idiomatic way to do this is in Guix. (Just for the record, Racket CS also supports platforms which Racket BC supports only partially---without the JIT, places, or futures---or does not support at all. One motivation of Racket CS was to make porting easier in general.) > > It should also be (package (inherit …) …) rather than (package/inherit > …). The latter is only useful when defining variants of a package (same > version, same code) where the same security updates would apply. I don't think I understand this very well. Setting aside “-next”-related issues, a given commit in the Racket source repository will be used to build CGC, 3M, and CS (the default) variants with the same version---at least in the Racket senses of “version” and “variant”. It's possible that there could be a VM-specific security issue, but usually a bug in Racket, security-related or otherwise, will affect all three variants. >> + (inputs >> + `(("libffi" ,libffi) ;; <- only for BC variants >> + ,@(filter (match-lambda >> + ((label . _) >> + (not (member label >> + '("zlib" "zlib:static" >> + "lz4" "lz4:static"))))) >> + (package-inputs racket-next-minimal)))) > > Please use this more common idiom: > > ,@(fold alist-delete (package-inputs racket-next-minimal) '("zlib" …)) Thanks, I was looking for something like `alist-delete` but didn't find it. >> +This packackage is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Mana > ^ > Typo here, and lines too long (here and in other places). :-) Thanks, usually I have Emacs set up to catch that. >> + (license (package-license chez-scheme))))) > > You cannot do that since here since potentially we could end up with > circular top-level references from these two modules. > > Instead, restate what the license is. Ok, I'd been lulled into complacency by the implicitly thunked fields. - Philip From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 02:32:17 2021 Received: (at 49280) by debbugs.gnu.org; 19 Jul 2021 06:32:17 +0000 Received: from localhost ([127.0.0.1]:57895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Mp7-0005gi-4a for submit@debbugs.gnu.org; Mon, 19 Jul 2021 02:32:17 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:46773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Mp5-0005gU-44 for 49280@debbugs.gnu.org; Mon, 19 Jul 2021 02:32:15 -0400 Received: by mail-qk1-f170.google.com with SMTP id k4so4773152qkj.13 for <49280@debbugs.gnu.org>; Sun, 18 Jul 2021 23:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vMsKNo2za+eT1rGqIPuUYMvhQu0c3btldwMi9wUHMMw=; b=AIups6S+ItHcXaktFB4qcgYo5w9Iegr030n5PNj2Gs+rk4f/zDmL14tX9JbJOqajNx c3W7QSFx409a1Ci5R7s9e8THhoC5c6CGyU80eYbet49t+y///GooIvdYsZJHQuPNewPg Kn0mEaSAR2jgfX/Mt09/ePUneUcU6Wu3P0BgnQGjAwQwBCzBeWW2HFHrNsY/A3ezHlS1 QzWmHKV0qQams1YRGi4NVf0WpxtZC5lIBsWZYIgHPktQtpgiWWNs0WoqH30WqvcbHeWN cb8xEeg3OX3w0MPdVKc+86xZUEoyRKnKfXgEKr4eK5cs8M03J+LhS7+hhGDYxyCr6iLU SD3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vMsKNo2za+eT1rGqIPuUYMvhQu0c3btldwMi9wUHMMw=; b=TvCQvxFDv2bMJPyD/5dn530Rg2ewlkWRig6S6McfV4KEDqFultyCYh2zCGb/0mU0X7 UNuZQe907Oe166DbFbs+uqEekfIFOObnTA6UF7CYjPuoc5r1BIegrotRUXrpbs0j/LhX f6etUyxJG6hMPiIm3jmY7nBGBdUbXH5LOdKNobpbDMW7x1z9kpeWggz9vZHHhWTmSn7p b1blUS5GsusbI/fxnVoN9Cd95Duk/LrufR2211GVmsuTAShkM0tvEziyFLIG+KaH/Cmq Gdb6CMZn0zDo+E67ZIVrdPxeH3e2tIRGz5MfF8TiArvX7Mon04Zec5b3aM6WynPt9Cip D+og== X-Gm-Message-State: AOAM531IsLHrw4vcAv6E+V2mDCVNR0l0k6DbsuJQCKK8h7OE73lC6iHg OSoR5beTeqLfv4Q6x9GOOd56+UlRinTI0dMQERw= X-Google-Smtp-Source: ABdhPJzvwsz/DP+u25yOmDjKDhy+7/zUAMiVw0XnjdqYMKjfgCejGdnJPMoKW6kfs2vpCjFdK3rqEg== X-Received: by 2002:a37:5d46:: with SMTP id r67mr22797494qkb.12.1626676329180; Sun, 18 Jul 2021 23:32:09 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id b25sm7603573qkk.111.2021.07.18.23.32.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Jul 2021 23:32:08 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH v2 1/3] gnu: racket: Update to 8.2. Date: Mon, 19 Jul 2021 02:31:41 -0400 Message-Id: <20210719063143.788661-1-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * gnu/packages/racket.scm (racket-minimal, racket): Update to 8.2. * gnu/packages/racket.scm (racket-minimal)[#:arguments]: Fix patch-config.rktd-lib-search-dirs phase. When a config.rktd file doesn't contain an entry for `lib-search-dirs`, the default is equivalent to `'(#f)`, not `'()`. --- gnu/packages/racket.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 2d606071fe..6b2a011d51 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -64,14 +64,14 @@ (define-public racket-minimal (package (name "racket-minimal") - (version "8.1") ; note: remember to also update racket! + (version "8.2") ; note: remember to also update racket! (source (origin (method url-fetch) (uri (map (lambda (base) (string-append base version "/racket-minimal-src.tgz")) %installer-mirrors)) - (sha256 "04zzqybpxss50n1jrwwq98539gw0y0ygpw9civl2sq3s4ww7m8l3") + (sha256 "13qfg56w554vdj5iwa8lpacy83s7bzhhyr44pjns68mkhj69ring") (patches (search-patches "racket-sh-via-rktio.patch")))) (home-page "https://racket-lang.org") @@ -125,7 +125,7 @@ 'lib-search-dirs (lambda (dirs) (append dirs extra-lib-search-dirs)) - null) + '(#f)) #:exists 'truncate/replace file))) "--" @@ -183,7 +183,7 @@ DrRacket IDE, are not included.") %installer-mirrors)) (sha256 (base32 - "0xdqwrwm604bbnr97h75dps2ixxz2svlw0fn0f674bn04dcfd60f")))) + "10sgzsraxzxp1k2y2wvz8rcjwvhbcd6k72l9lyqr34yazlwfdz26")))) (inputs `(;; sqlite and libraries for `racket/draw' are needed to build the doc. ("cairo" ,cairo) -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 02:32:26 2021 Received: (at 49280) by debbugs.gnu.org; 19 Jul 2021 06:32:26 +0000 Received: from localhost ([127.0.0.1]:57898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5MpF-0005h5-F8 for submit@debbugs.gnu.org; Mon, 19 Jul 2021 02:32:26 -0400 Received: from mail-qk1-f176.google.com ([209.85.222.176]:36684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5MpE-0005gr-7v for 49280@debbugs.gnu.org; Mon, 19 Jul 2021 02:32:24 -0400 Received: by mail-qk1-f176.google.com with SMTP id t185so15743036qkd.3 for <49280@debbugs.gnu.org>; Sun, 18 Jul 2021 23:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iW96FL7EK4CBlOJb96kjN+A4Q+pp07i4Dk2TCCho+sM=; b=A3cs/nm+hxqcIA9InS3HYf0y7csyqKWjBErTGuM9Xii9hKhrJXbBiB8QaIKSIcg7jJ 8nuLAH2GDQ6M7S4xbEUmQUckS9Nn5SbZGIbRCDhftn1JoKbTTJKBZt7KgyDtSV+Fzg5f ohnjWZzEb2ycCcLaduB3z4RjdaIe7koEBWOa+DdK0g1zw1L8R8WF6FtadJUQtp8d3fTM D6qrV/HUV3lPWAD6EF5j57MbofsJmC6gpKMPe8EVJIVwjy95IOiwTjss8CJ6/ljzsnGV tRVpu0Ut1ewaHYvWqpEA0qfrl1uovkieNiaqkW9iLGi5JcCDm7jl1MT6tgNMyGmjrFcX CIfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iW96FL7EK4CBlOJb96kjN+A4Q+pp07i4Dk2TCCho+sM=; b=ohBm40mlfbNSCDpq2cvoUZvFRfG5dlMkpB0A91VPR6RLbwanPCmEJ3MNRkTPueSaeM tuStt9imDYbIRz9Noi/jLjSIIQk+FqLaH4GITmJG1ofsIEJOTYacN6iAl5W1L+x8VfLw sAWKZ2ZFztkHk23V4Y8xdGnsFHOQ+PD5khaJUUd3CYt4wxceOApnJK/M3nqLlvHQLX5z 2BF5miqPYdWbhFdRgDMTPzmV75T7B8Iw2ncjtZpcEfk54hk34peJ5qjEXRSRTJ0cNko6 RuK0S/1hNp/L0xlTEDBRcI7CLdvK4CZp4+aabMg9tpp7Bb4H0NF4LUzdpyxu4N9OfGpQ sXmA== X-Gm-Message-State: AOAM532N4lMEqA4bta/7VijQIInYhGqCCC724exPx2ZF/MteGgg9tsHN BzbJCgTmGnxqKzZbTOfDn/HYTQTPeJCksiMI67s= X-Google-Smtp-Source: ABdhPJy5XIuikGlq0UDxErv6Vq0OXCFZ49041o3XSxO8YAJjo4sUfdCPTi7WIbUUKE0PBWfaztkuCQ== X-Received: by 2002:a37:66d3:: with SMTP id a202mr10561862qkc.262.1626676338605; Sun, 18 Jul 2021 23:32:18 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id o27sm3590621qkk.124.2021.07.18.23.32.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Jul 2021 23:32:18 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH v2 2/3] gnu: racket: Unbundle racket-minimal. Date: Mon, 19 Jul 2021 02:31:42 -0400 Message-Id: <20210719063143.788661-2-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210719063143.788661-1-philip@philipmcgrath.com> References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This change takes advantage of improved support for layered and tethered installations in Racket 8.2. * gnu/packages/racket.scm (extend-layer): New private variable. This is a script for configuring a new config-tethered layer chaining to an existing Racket installation. * gnu/packages/racket.scm (racket)[source](snippet): Unbundle `racket-minimal`. [inputs]: Remove inputs that properly belong to `racket-minimal`. [native-inputs]: Add `racket-minimal` and `extend-layer`. [arguments]: Stop inheriting from `racket-minimal`. Add phase 'unpack-packages to move the sources and links file into place. Replace 'configure phase using `extend-layer`. Replace 'build phase using `raco setup`. Delete 'install phase. * gnu/packages/patches/racket-sh-via-rktio.patch: Rename to ... * gnu/packages/patches/racket-minimal-sh-via-rktio.patch: ... this file to placate `guix lint`. * gnu/local.mk (dist_patch_DATA): Update accordingly. * gnu/packages/racket.scm (racket-minimal)[source]: Likewise. --- gnu/local.mk | 2 +- ...atch => racket-minimal-sh-via-rktio.patch} | 0 gnu/packages/racket.scm | 196 +++++++++++++++++- 3 files changed, 191 insertions(+), 7 deletions(-) rename gnu/packages/patches/{racket-sh-via-rktio.patch => racket-minimal-sh-via-rktio.patch} (100%) diff --git a/gnu/local.mk b/gnu/local.mk index 62a5e41a46..93c022d1b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1673,7 +1673,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-sh-via-rktio.patch \ + %D%/packages/patches/racket-minimal-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch \ %D%/packages/patches/rnp-add-version.cmake.patch \ diff --git a/gnu/packages/patches/racket-sh-via-rktio.patch b/gnu/packages/patches/racket-minimal-sh-via-rktio.patch similarity index 100% rename from gnu/packages/patches/racket-sh-via-rktio.patch rename to gnu/packages/patches/racket-minimal-sh-via-rktio.patch diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 6b2a011d51..c095de42b3 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -73,7 +73,7 @@ %installer-mirrors)) (sha256 "13qfg56w554vdj5iwa8lpacy83s7bzhhyr44pjns68mkhj69ring") (patches (search-patches - "racket-sh-via-rktio.patch")))) + "racket-minimal-sh-via-rktio.patch")))) (home-page "https://racket-lang.org") (synopsis "Racket without bundled packages such as DrRacket") (inputs @@ -183,10 +183,55 @@ DrRacket IDE, are not included.") %installer-mirrors)) (sha256 (base32 - "10sgzsraxzxp1k2y2wvz8rcjwvhbcd6k72l9lyqr34yazlwfdz26")))) + "10sgzsraxzxp1k2y2wvz8rcjwvhbcd6k72l9lyqr34yazlwfdz26")) + (snippet + (with-imported-modules '((guix build utils) + (ice-9 match) + (ice-9 regex)) + #~(begin + (use-modules (guix build utils) + (ice-9 match) + (ice-9 regex)) + ;; unbundle minimal Racket + (for-each delete-file-recursively + '("collects" + "doc" + "etc" + "README" + "src")) + ;; unbundle package sources included elsewhere + (define (substitute/delete file pattern) + (substitute + file + (list (cons pattern + (lambda (line matches) + ;; must match exactly once + (match matches + ((m) + (string-append (match:prefix m) + (match:suffix m))))))))) + (define (unbundle-pkg pkg) + (define quoted-pkg (regexp-quote pkg)) + (with-directory-excursion "share" + (substitute/delete + "links.rktd" + (string-append + "[(][^()]+[(]#\"pkgs\" #\"" + quoted-pkg + "\"[)][)]")) + (with-directory-excursion "pkgs" + (substitute/delete + "pkgs.rktd" + (string-append + "[(]\"" + quoted-pkg + "\" \\. #s[(]" + "(pkg-info|[(]sc-pkg-info pkg-info 3[)])" + " [(][^()]+[)] [^()]+[)][)]")) + (delete-file-recursively pkg)))) + (unbundle-pkg "racket-lib")))))) (inputs - `(;; sqlite and libraries for `racket/draw' are needed to build the doc. - ("cairo" ,cairo) + `(("cairo" ,cairo) ("fontconfig" ,fontconfig) ("glib" ,glib) ("glu" ,glu) @@ -199,8 +244,67 @@ DrRacket IDE, are not included.") ("mpfr" ,mpfr) ("pango" ,pango) ("unixodbc" ,unixodbc) - ("libedit" ,libedit) - ,@(package-inputs racket-minimal))) + ("libedit" ,libedit))) + (native-inputs + `(("racket" ,racket-minimal) + ("extend-layer" ,extend-layer))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'unpack-packages + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let ((racket (assoc-ref (or native-inputs inputs) "racket")) + (prefix (assoc-ref outputs "out"))) + (mkdir-p (string-append prefix "/share/racket/pkgs")) + (copy-recursively + "share/links.rktd" + (string-append prefix "/share/racket/links.rktd")) + (copy-recursively + "share/pkgs" + (string-append prefix "/share/racket/pkgs")) + #t))) + (replace 'configure + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let ((racket (assoc-ref (or native-inputs inputs) "racket")) + (prefix (assoc-ref outputs "out"))) + (apply invoke + (string-append racket "/bin/racket") + (assoc-ref inputs "extend-layer") + racket + prefix + (map + (lambda (lib) + (string-append (assoc-ref inputs lib) "/lib")) + '("cairo" + "fontconfig" + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit"))) + #t))) + (replace 'build + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (invoke (string-append (assoc-ref (or native-inputs inputs) + "racket") + "/bin/racket") + "--config" + (string-append (assoc-ref outputs "out") + "/etc/racket") + "-l" + "raco" + "setup") + #t)) + (delete 'install)) + ;; we still don't have these: + #:tests? #f)) (synopsis "A programmable programming language in the Scheme family") (description "Racket is a general-purpose programming language in the Scheme family, @@ -211,3 +315,83 @@ languages to complete language implementations. The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) + + +(define extend-layer + (scheme-file + "extend-layer.rkt" + `(module + extend-layer racket/base + (require racket/cmdline + racket/match + racket/file + racket/list + racket/pretty) + (define config-file-pth + "etc/racket/config.rktd") + (define (build-path-string . args) + (path->string (apply build-path args))) + (define rx:racket + ;; Guile's reader doesn't support #rx"racket" + (regexp "racket")) + (command-line + #:args (parent-layer prefix . lib-dir*) + (let* ([config + (for/fold + ([config (file->value (build-path parent-layer + config-file-pth))]) + ([spec (in-list + '((lib-dir lib-search-dirs "lib/racket") + (share-dir share-search-dirs "share/racket") + (links-file + links-search-files + "share/racket/links.rktd") + (pkgs-dir pkgs-search-dirs "share/racket/pkgs") + (bin-dir bin-search-dirs "bin") + (man-dir man-search-dirs "share/man") + (doc-dir doc-search-dirs "share/doc/racket") + (include-dir + include-search-dirs + "include/racket")))]) + (match-define (list main-key search-key pth) spec) + (hash-set* + config + main-key + (build-path-string prefix pth) + search-key + (list* #f + (hash-ref config + main-key + (build-path-string parent-layer pth)) + (filter values (hash-ref config search-key null)))))] + [config + (hash-set config + 'apps-dir + (build-path-string prefix "share/applications"))] + [config + ;; place new foreign lib-search-dirs before old + ;; foreign dirs, but after Racket layers + (let-values + ([(rkt extra) + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + (hash-ref config 'lib-search-dirs))]) + (hash-set config + 'lib-search-dirs + (append rkt + lib-dir* + extra)))] + [bin-dir + (hash-ref config 'bin-dir)] + [config + (hash-set* config + 'config-tethered-console-bin-dir bin-dir + 'config-tethered-gui-bin-dir bin-dir)] + [new-config-pth + (build-path prefix config-file-pth)]) + (make-parent-directory* new-config-pth) + (call-with-output-file* + new-config-pth + (lambda (out) + (pretty-write config out)))))))) -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 02:32:37 2021 Received: (at 49280) by debbugs.gnu.org; 19 Jul 2021 06:32:37 +0000 Received: from localhost ([127.0.0.1]:57901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5MpL-0005hM-2r for submit@debbugs.gnu.org; Mon, 19 Jul 2021 02:32:36 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:46790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5MpH-0005gv-Qc for 49280@debbugs.gnu.org; Mon, 19 Jul 2021 02:32:29 -0400 Received: by mail-qk1-f173.google.com with SMTP id k4so4773499qkj.13 for <49280@debbugs.gnu.org>; Sun, 18 Jul 2021 23:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1WqOxOGkqa3KOCsUbo3GPku8ondikjN87V0Z1yKWg4A=; b=PaSKZFU6zDu+Pgv+DOHbqMr0Am4Oxm6lDd79ZKjV8uwV3emx4OHc/1iIrrJ9UXdohP H7CGJjr42gGL4KG6jmIljHGUkcWOMkaSqilIT4DZNzhBtK9YZmt5MwKbplwUfttq8cSE OvsVYcxzMhncwIZuYbQ6ywNs9piMNuQ4rPhOJJbuOfcLXX/Boeg89dz/ofy5a+1Y3Sce 0wB4oyQ37YOCtUT3fZlrRRjKB0OLJcZebyqfNZhQQKxGsroa5uxYLg1rxpubpsZy1SX2 4jgfQDyUZt3Fz/EQN5NfH1cFnMBiTH8lbwnEfIYlW8s2HYMZIymFprfTtv3IeTN0KbdI 2f2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1WqOxOGkqa3KOCsUbo3GPku8ondikjN87V0Z1yKWg4A=; b=hEUKYhelpyAq2Qa4Kz+3i948Jl4nXJ4iXHgeSxDD6d8aXkEDaXnbFc8sEeSLnny/fk HHCRlQYrey8cEhBSKvzrb9Mmpamfb4HNbh4JnbQg/7BROHmuuhrADOIBGDalMxVXFxUi xzr8eNevJBbfRSBDewjTY2t2Qtc4fSVVkiloVX6EwkwkHyWE3huQKDoPko2wSAmJxwDS gSYVVbxPOZLS/ce37h/njM1E4Ukw15niOx5De2FrVtFkGI254Dli/J5MOZJW0H7r8xCX aBkbsp2ZwjRR0OSab6r5Gis4vr87fgQ6afN3SlXuhYHa1aXYSZcTD7M3nqkbIAqKT/6b ieUQ== X-Gm-Message-State: AOAM532etQUSilEyqG6MKKHYpiHpJOKuThozPjSRr7sBjWNoIvavIcZ0 6NcqmLUPmhWk63PvewlhgzSsk4c9N/vQnxXcjeA= X-Google-Smtp-Source: ABdhPJx8KU42ieT20jndHICgNk+3aRAZUFwWB/9G/K4iUhQWDOkAlgcst1qJe7OJpeMhE79V3OFKig== X-Received: by 2002:ae9:dd46:: with SMTP id r67mr21879339qkf.380.1626676342057; Sun, 18 Jul 2021 23:32:22 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id m23sm6143092qtq.53.2021.07.18.23.32.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Jul 2021 23:32:21 -0700 (PDT) From: Philip McGrath To: 49280@debbugs.gnu.org Subject: [PATCH v2 3/3] gnu: racket-minimal: Bootstrap from C. Date: Mon, 19 Jul 2021 02:31:43 -0400 Message-Id: <20210719063143.788661-3-philip@philipmcgrath.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210719063143.788661-1-philip@philipmcgrath.com> References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 49280 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This commit bootstraps the Racket compiler and runtime system from source, including Racket CS as well as both variants of Racket BC. (One remaining limitation is discussed in comments added to gnu/packages/racket.scm.) In the process, it moves to building minimal Racket from the Git repository, rather than the packaged source tarballs. The Git repository is slightly better as the ``corresponding source'': 1. A few packages especially closely tied to the Racket core implementation (like "compiler-lib", "base", and "racket-doc") are developed in the same Git repository. Having them use the same Guix origin, too, will help to keep them in sync. 2. The top-level Makefile in the Git repository is an important ``script[] used to control compilation and installation.'' In particular, it cooperates with the "distro-build" package to create the source tarballs and installers for a Racket distribution. (Racket supports a notion of custom distributions.) 3. It is ``the preferred form ... for making modifications'' to the core Racket implementation. Racket releases are tagged in the Git repository (e.g. "v8.1"). At the beginning of each release cycle, a branch is created to stabilizer a version for extra testing. Active development happens on the "master" branch. * gnu/packages/racket-minimal-sh-via-rktio.patch: Adjust for extra directory layer. * gnu/local/racket.scm (cfg-flag:sh-for-rktio, cfg-flag:enable-lt, cfg-flag:enable-racket, unpack-nanopass+stex, %main-repo-main-distribution-pkgs): New private variables. * gnu/local/racket.scm (racket-minimal)[source]: Use Git. [source](snippet): Unbundle nanopass, stex, and libffi. [native-inputs]: Use racket-bootstrap-chez-bootfiles, plus its dependencies (for Chez, plus a Racket for bootstrap pig). [arguments]: Revise extensively. * gnu/local/racket.scm (racket-minimal-bc-3m, racket-minimal-bc-cgc): New packages, hidden at least for now. (racket-bootstrap-chez-bootfiles): Another new package, but this one is especially likely to stay hidden. * gnu/local/racket.scm (racket)[origin](snippet): Unbundle packages developed in the main Git repository, but leave their links.rktd and pkgs.rktd entries in place. [native-inputs]: Add the main Racket Git repository. [arguments](#:phases): Adjust 'unpack-packages to also unpack package sources from the main Racket Git repository. --- .../patches/racket-minimal-sh-via-rktio.patch | 8 +- gnu/packages/racket.scm | 488 +++++++++++++----- 2 files changed, 359 insertions(+), 137 deletions(-) diff --git a/gnu/packages/patches/racket-minimal-sh-via-rktio.patch b/gnu/packages/patches/racket-minimal-sh-via-rktio.patch index b4fefd1514..6bc2ee8331 100644 --- a/gnu/packages/patches/racket-minimal-sh-via-rktio.patch +++ b/gnu/packages/patches/racket-minimal-sh-via-rktio.patch @@ -35,13 +35,13 @@ making this change at the C level is both: 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. --- - src/rktio/rktio_process.c | 21 ++++++++++++++++++++- + racket/src/rktio/rktio_process.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) -diff --git a/src/rktio/rktio_process.c b/src/rktio/rktio_process.c +diff --git a/racket/src/rktio/rktio_process.c b/racket/src/rktio/rktio_process.c index 89202436c0..465ebdd5c5 100644 ---- a/src/rktio/rktio_process.c -+++ b/src/rktio/rktio_process.c +--- 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) /*========================================================================*/ diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index c095de42b3..0349b77704 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -31,7 +31,9 @@ #:use-module (srfi srfi-1) #: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) #:use-module (gnu packages fontutils) @@ -40,25 +42,87 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages libedit) + #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages xorg)) +;; Commentary: +;; +;; Here's how bootstrapping minimal Racket works: +;; +;; - Racket BC [CGC] can be built with only a C compiler (except for +;; one caveat discussed below). +;; - Racket BC [3M] needs an existing Racket to run "xform", +;; which transforms its own C source code to add additional annotations +;; for the precise garbage collector. +;; - Racket CS needs (bootfiles for) Racket's fork of Chez Scheme. +;; It also needs an existing Racket to compile Racket-implemented +;; parts of the runtime system to R6RS libraries. +;; - Chez Scheme also needs bootfiles for itself, but Racket can simulate +;; enough of Chez Scheme to load Racket's fork of the Chez Scheme compiler +;; purely from source into Racket and apply the compiler to itself, +;; producing the needed bootfiles (albeit very slowly). +;; Any variant of Racket since version 7.1 can run the simulation. +;; +;; So, we build CGC to build 3M to build bootfiles and CS. +;; +;; One remaining bootstrapping limitation is that Racket's reader, module +;; system, and macro expander are implemented in Racket. For Racket CS, +;; they are compiled to R6RS libraries as discussed above. This note from the +;; README file applies to all such subsystems: +;; +;; The Racket version must be practically the same as the current Racket +;; verson, although it can be the Racket BC implementation (instead of +;; the Racket CS implementation). +;; +;; Unlike Chez Scheme boot files, the files generated in "schemified" +;; are human-readable and -editable Scheme code. That provides a way +;; out of bootstrapping black holes, even without BC. +;; +;; 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. +;; +;; 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: -(define %installer-mirrors - ;; Source: - ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58 - ;; Matthew Flatt says: "note that many are commented out" - ;; INVARIANT: End with a trailing "/"! - '("https://mirror.racket-lang.org/installers/" - "https://www.cs.utah.edu/plt/installers/" - "https://plt.cs.northwestern.edu/racket-mirror/" - "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/" - ;; Universität Tübingen is using a self-signed HTTPS certificate: - "http://mirror.informatik.uni-tuebingen.de/mirror/racket/" - "https://racket.infogroep.be/" - )) +(define cfg-flag:sh-for-rktio + `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" + (assoc-ref %build-inputs "sh") + "/bin/sh")) +(define cfg-flag:enable-lt + `(string-append "--enable-lt=" + (assoc-ref %build-inputs "libtool") + "/bin/libtool")) +(define cfg-flag:enable-racket + `(let ((racket (assoc-ref %build-inputs "racket"))) + (string-append "--enable-racket=" + racket + "/bin/racket"))) + +(define unpack-nanopass+stex + ;; Copied from chez-scheme. + ;; TODO: Eventually, we should refactor Chez Scheme + ;; enough to share more directly, so that we can make + ;; Racket's version of Chez avalable as a Guix package, + ;; e.g. for architectures not supported upstream. + ;; For now, we let Racket drive the Chez build process + ;; other than this step. + `(for-each (lambda (dep) + (define src + (assoc-ref (or native-inputs inputs) dep)) + (copy-recursively src dep + #:keep-mtime? #t)) + '("nanopass" "stex"))) (define-public racket-minimal @@ -67,96 +131,113 @@ (version "8.2") ; note: remember to also update racket! (source (origin - (method url-fetch) - (uri (map (lambda (base) - (string-append base version "/racket-minimal-src.tgz")) - %installer-mirrors)) - (sha256 "13qfg56w554vdj5iwa8lpacy83s7bzhhyr44pjns68mkhj69ring") - (patches (search-patches - "racket-minimal-sh-via-rktio.patch")))) - (home-page "https://racket-lang.org") - (synopsis "Racket without bundled packages such as DrRacket") + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit (string-append "v" version)))) + (sha256 + "061bhiyjlvazph0dj9i3i3x2q5z53rp8h5cjwg3frjimkr45lncn") + (file-name (git-file-name name version)) + (patches (search-patches "racket-minimal-sh-via-rktio.patch")) + (snippet + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + ;; unbundle Chez submodules + (with-directory-excursion "racket/src/ChezScheme" + #$(origin-snippet (package-source chez-scheme))) + ;; unbundle libffi + (for-each + delete-file-recursively + '("racket/src/bc/foreign/libffi"))))))) (inputs - `(("openssl" ,openssl) + `(;; common to all racket-minimal variants: + ("openssl" ,openssl) ("sqlite" ,sqlite) ("sh" ,bash-minimal) + ;; only for CS ("zlib" ,zlib) ("zlib:static" ,zlib "static") ("lz4" ,lz4) ("lz4:static" ,lz4 "static"))) + (native-inputs + `(("bootfiles" ,racket-bootstrap-chez-bootfiles) + ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) (build-system gnu-build-system) (arguments `(#:configure-flags - `(,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" - (assoc-ref %build-inputs "sh") - "/bin/sh") - "--enable-libz" - "--enable-liblz4") - #:modules - ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1)) + (list "--enable-csonly" + "--enable-libz" + "--enable-liblz4" + ,cfg-flag:enable-racket + ,cfg-flag:sh-for-rktio) + #:out-of-source? #true + ;; Tests are in packages like racket-test-core and + ;; main-distribution-test that aren't part of the main distribution. + #:tests? #f + #:modules ((ice-9 match) + (guix build gnu-build-system) + (guix build utils)) #:phases (modify-phases %standard-phases - (add-before 'configure 'pre-configure-minimal + (add-after 'unpack 'unpack-nanopass+stex + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + ,unpack-nanopass+stex) + #t)) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (string-append (assoc-ref inputs "bootfiles") "/boot") + "boot")) + #t)) + (add-before 'configure 'initialize-config.rktd (lambda* (#:key inputs #:allow-other-keys) - (chdir "src") + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((lib-search-dirs + . (#f ,@(map (lambda (lib) + (string-append (assoc-ref inputs lib) + "/lib")) + '("openssl" + "sqlite")))) + (catalogs + . (,(string-append + "https://download.racket-lang.org/releases/" + ,version + "/catalog/") + #f)))))) #t)) - (add-after 'build 'patch-config.rktd-lib-search-dirs - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; We do this between the `build` and `install` phases - ;; so that we have racket to read and write the hash table, - ;; but it comes before `raco setup`, when foreign libraries - ;; are needed to build the documentation. - (define out (assoc-ref outputs "out")) - (apply invoke - "./cs/c/racketcs" - "-e" - ,(format #f - "~s" - '(let* ((args - (vector->list - (current-command-line-arguments))) - (file (car args)) - (extra-lib-search-dirs (cdr args))) - (write-to-file - (hash-update - (file->value file) - 'lib-search-dirs - (lambda (dirs) - (append dirs extra-lib-search-dirs)) - '(#f)) - #:exists 'truncate/replace - file))) - "--" - "../etc/config.rktd" - (filter-map (lambda (lib) - (cond - ((assoc-ref inputs lib) - => (lambda (pth) - (string-append pth "/lib"))) - (else - #f))) - '("cairo" - "fontconfig" - "glib" - "glu" - "gmp" - "gtk+" - "libjpeg" - "libpng" - "libx11" - "mesa" - "mpfr" - "openssl" - "pango" - "sqlite" - "unixodbc" - "libedit"))) - #t))) - ;; Tests are in packages like racket-test-core and - ;; main-distribution-test that aren't part of the main distribution. - #:tests? #f)) + (add-before 'configure 'change-directory + (lambda _ + (chdir "racket/src") + #t)) + (add-after 'install 'remove-pkgs-directory + ;; If the configured pkgs-dir exists, "pkgs.rktd" does not + ;; exist, and a lock file does not exist, commands like + ;; `raco pkg show` will try to create a lock file and fail + ;; due to the read-only store. + ;; Arguably this may be a bug in `pkg/private/lock`: + ;; see . + ;; As a workaround, remove the directory. + (lambda* (#:key outputs #:allow-other-keys) + ;; rmdir because we want an error if it isn't empty + (rmdir (string-append (assoc-ref outputs "out") + "/share/racket/pkgs")) + #t))))) + (home-page "https://racket-lang.org") + (synopsis "Racket without bundled packages such as DrRacket") (description "Racket is a general-purpose programming language in the Scheme family, with a large set of libraries and a compiler based on Chez Scheme. Racket is @@ -167,7 +248,164 @@ The ``minimal Racket'' distribution includes just enough of Racket for you to use @command{raco pkg} to install more. Bundled packages, such as the DrRacket IDE, are not included.") ;; https://download.racket-lang.org/license.html - (license (list lgpl3+ asl2.0 expat)))) + ;; The LGPL components are only used by Racket BC. + (license (list asl2.0 expat)))) + + +(define-public racket-minimal-bc-3m + (hidden-package + (package + (inherit racket-minimal) + (name "racket-minimal-bc-3m") + (inputs + `(("libffi" ,libffi) ;; <- only for BC variants + ,@(fold alist-delete + (package-inputs racket-minimal) + '("zlib" "zlib:static" "lz4" "lz4:static")))) + (native-inputs + `(("libtool" ,libtool) + ("racket" ,(if (%current-target-system) + racket-minimal + racket-minimal-bc-cgc)))) + (arguments + (substitute-keyword-arguments (package-arguments racket-minimal) + ((#:configure-flags _ '()) + `(list "--enable-bconly" + ,cfg-flag:enable-racket + ,cfg-flag:enable-lt + ,cfg-flag:sh-for-rktio)) + ((#:phases usual-phases) + `(modify-phases ,usual-phases + (delete 'unpack-nanopass+stex) + (delete 'unpack-bootfiles))))) + (synopsis "Minimal Racket with the BC [3M] runtime system") + (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''). + +This package is the normal implementation of Racket BC with a precise garbage +collector, 3M (``Moving Memory Manager'').") + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list lgpl3+ asl2.0 expat))))) + + +(define-public racket-minimal-bc-cgc + (package + (inherit racket-minimal-bc-3m) + (name "racket-minimal-bc-cgc") + (native-inputs + (alist-delete "racket" (package-native-inputs racket-minimal-bc-3m))) + (arguments + (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) + ((#:configure-flags _ '()) + `(list "--enable-cgcdefault" + ,cfg-flag:enable-lt + ,cfg-flag:sh-for-rktio)))) + (synopsis "Old Racket implementation used for bootstrapping") + (description "This variant of the Racket BC (``before Chez'' or +``bytecode'') implementation is not recommended for general use. It uses +CGC (a ``Conservative Garbage Collector''), which was succeeded as default in +PLT Scheme version 370 (which translates to 3.7 in the current versioning +scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the +Racket CS implementation. + +Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may +also be used for embedding applications without the annotations needed in C +code to use the 3M garbage collector."))) + + +(define-public racket-bootstrap-chez-bootfiles + (hidden-package + (package + (inherit racket-minimal) + (name "racket-bootstrap-chez-bootfiles") + (inputs `()) + (native-inputs + `(("racket" ,(if (%current-target-system) + racket-minimal + racket-minimal-bc-3m)) + ("stex" ,@(assoc-ref (package-native-inputs chez-scheme) "stex")) + ("nanopass" ,@(assoc-ref (package-native-inputs chez-scheme) + "nanopass")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + ,unpack-nanopass+stex) + #t)) + (delete 'configure) + (delete 'patch-generated-file-shebangs) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (invoke (string-append (assoc-ref inputs "racket") + "/bin/racket") + "rktboot/main.rkt" + "--dest" (assoc-ref outputs "out"))) + #t)) + (delete 'check) + (delete 'install)))) + (synopsis "Chez Scheme bootfiles bootstrapped by Racket") + (description "Chez Scheme is a self-hosting compiler: building it +requires ``bootfiles'' containing the Scheme-implemented portions compiled for +the current platform. (Chez can then cross-compile bootfiles for all other +supported platforms.) + +The Racket package @code{cs-bootstrap} (part of the main Racket Git +repository) implements enough of a Chez Scheme simulation to load the Chez +Scheme compiler purely from source into Racket and apply the compiler to +itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as +long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket +7.1 and later, including the Racket BC variant. + +Note that the generated bootfiles are specific to Racket's fork of Chez +Scheme, and @code{cs-bootstrap} does not currently support building upstream +Chez Scheme.") + (license (list asl2.0))))) + + +(define %installer-mirrors + ;; Source: + ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58 + ;; Matthew Flatt says: "note that many are commented out" + ;; INVARIANT: End with a trailing "/"! + '("https://mirror.racket-lang.org/installers/" + "https://www.cs.utah.edu/plt/installers/" + "https://plt.cs.northwestern.edu/racket-mirror/" + "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/" + ;; Universität Tübingen is using a self-signed HTTPS certificate: + "http://mirror.informatik.uni-tuebingen.de/mirror/racket/" + "https://racket.infogroep.be/" + )) + +(define %main-repo-main-distribution-pkgs + ;; These are the packages developed in the main Racket Git repository + ;; that are part of the main distribution. + '("at-exp-lib" + "base" + "compiler-lib" + ;; NOT "compiler-test" + "compiler" + "net-doc" + "net-lib" + ;; NOT "net-test" + "net" + ;; NOT "plt-services" + ;; NOT "racket-benchmarks" + ;; NOT "racket-build-guide" + "racket-doc" + "racket-index" + "racket-lib" + ;; NOT "racket-test-core" + ;; NOT "racket-test-extra" + ;; NOT "racket-test" + "zo-lib")) (define-public racket @@ -177,7 +415,7 @@ DrRacket IDE, are not included.") (version (package-version racket-minimal)) ; needed for origin uri to work (source (origin - (inherit (package-source racket-minimal)) + (method url-fetch) (uri (map (lambda (base) (string-append base version "/racket-src.tgz")) %installer-mirrors)) @@ -200,36 +438,10 @@ DrRacket IDE, are not included.") "README" "src")) ;; unbundle package sources included elsewhere - (define (substitute/delete file pattern) - (substitute - file - (list (cons pattern - (lambda (line matches) - ;; must match exactly once - (match matches - ((m) - (string-append (match:prefix m) - (match:suffix m))))))))) - (define (unbundle-pkg pkg) - (define quoted-pkg (regexp-quote pkg)) - (with-directory-excursion "share" - (substitute/delete - "links.rktd" - (string-append - "[(][^()]+[(]#\"pkgs\" #\"" - quoted-pkg - "\"[)][)]")) - (with-directory-excursion "pkgs" - (substitute/delete - "pkgs.rktd" - (string-append - "[(]\"" - quoted-pkg - "\" \\. #s[(]" - "(pkg-info|[(]sc-pkg-info pkg-info 3[)])" - " [(][^()]+[)] [^()]+[)][)]")) - (delete-file-recursively pkg)))) - (unbundle-pkg "racket-lib")))))) + (with-directory-excursion "share/pkgs" + (for-each delete-file-recursively + '#+%main-repo-main-distribution-pkgs)) + #t))))) (inputs `(("cairo" ,cairo) ("fontconfig" ,fontconfig) @@ -247,22 +459,32 @@ DrRacket IDE, are not included.") ("libedit" ,libedit))) (native-inputs `(("racket" ,racket-minimal) - ("extend-layer" ,extend-layer))) + ("extend-layer" ,extend-layer) + ("main-repo" ,(package-source racket-minimal)))) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'unpack-packages - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out"))) - (mkdir-p (string-append prefix "/share/racket/pkgs")) - (copy-recursively - "share/links.rktd" - (string-append prefix "/share/racket/links.rktd")) - (copy-recursively - "share/pkgs" - (string-append prefix "/share/racket/pkgs")) - #t))) + (let ((unpack (assoc-ref %standard-phases 'unpack))) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let* ((racket (assoc-ref (or native-inputs inputs) "racket")) + (prefix (assoc-ref outputs "out")) + (pkgs-dir (string-append prefix "/share/racket/pkgs"))) + (mkdir-p pkgs-dir) + (copy-recursively + "share/links.rktd" + (string-append prefix "/share/racket/links.rktd")) + (copy-recursively "share/pkgs" pkgs-dir) + ;; NOTE: unpack changes the working directory + (unpack #:source (assoc-ref (or native-inputs inputs) + "main-repo")) + (for-each (lambda (pkg) + (define dest (string-append pkgs-dir "/" pkg)) + (mkdir-p dest) + (copy-recursively (string-append "pkgs/" pkg) + dest)) + ',%main-repo-main-distribution-pkgs) + #t)))) (replace 'configure (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let ((racket (assoc-ref (or native-inputs inputs) "racket")) -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 03:11:50 2021 Received: (at control) by debbugs.gnu.org; 19 Jul 2021 07:11:50 +0000 Received: from localhost ([127.0.0.1]:57941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5NRO-0006cQ-IH for submit@debbugs.gnu.org; Mon, 19 Jul 2021 03:11:50 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:47064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5NRN-0006cA-AR for control@debbugs.gnu.org; Mon, 19 Jul 2021 03:11:49 -0400 Received: by mail-qk1-f179.google.com with SMTP id k4so4845929qkj.13 for ; Mon, 19 Jul 2021 00:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=CBF7/8Ajt1YAyKlExEIrn1J5I++wdgsinUlw16Yld4E=; b=IpSifWSvkAIFiE5GL7h/knjRjXShfQ26Aybw5gv5m7/YpXxXTIzipUOgNFOxy1b4kX EwDLTgpx7PfKA28sUd+CSj3On+8XUqLqhkGgM1656YyetLbLQtfNIF9QbD+vacCQxAs/ OalwzpBhxzG6vT9lxV5tbI+JfqhFigyksRrfqfi6MAzZ5h86jcHcWFhqDtqylLMusecO /v98nbLXTw2UVEbyYtLIPLNpTB79DRNEo5igcKCsBB6OleEeb41GsDe7Vmg1ZdNoAGT1 LNWajl8oMSNeH1E3bjEWCEbaoBzTPS4HWRoCo8xTKHXz/kfY0qkrEi6WnNVDtGODUjj1 EC5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=CBF7/8Ajt1YAyKlExEIrn1J5I++wdgsinUlw16Yld4E=; b=LT3z/WgfO5zfFmRwdz43u7KYJxW1e1mfaj9BfJHx4VzsVcSOk9OmNEzzk27xZQXTiE EegZ6bYSyySoj7VZe+eSX6VlcRU03JPbRU5wEzIXvi4q1INAyTxZumLokwwL4dgy9Jag KUq6CTosG1jLbUNm20ZKbywvaMLINix+M2T1Bng2q9vLBGRfivJWd1qLYnUSlfaKCvpX sC0g7jfkIq5bRO/mq8UyFwwzjBm3a6ybgtwfXrxmJNo9qsbksaMt5BnPnXypE1m8pRqc w0gQ3n7QE02oSNiWStebPgA2MZHcbJOP+kAb/P7jpE9FiDYW6B/OakZ6lZ+R3XNmucyI M6nA== X-Gm-Message-State: AOAM532tIEA5V6A8Qa4K6VqlClvijRJokP2fu6W3AxALXmHa9rqGndlH MW+xRUOAQOBASkW/Qu4eVn+l/snfVLsbTNkJIhE= X-Google-Smtp-Source: ABdhPJzjxKmptFqKjSMgXP0S6sX1JRQbQSlqpPkWRcrR6lj4uLxLhyXj/PvC6KqdrfSBdCogoZ8H5Q== X-Received: by 2002:a05:620a:22e4:: with SMTP id p4mr22074280qki.131.1626678703758; Mon, 19 Jul 2021 00:11:43 -0700 (PDT) Received: from Sapientia.local (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id n124sm118579qkf.119.2021.07.19.00.11.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 00:11:43 -0700 (PDT) To: control@debbugs.gnu.org From: Philip McGrath Subject: control message for bug #49280 Message-ID: <029bdf73-9a3f-0529-286b-1b0234d77254@philipmcgrath.com> Date: Mon, 19 Jul 2021 03:11:42 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) retitle 49280 [PATCH v2 0/3] gnu: racket: Update to 8.2. Bootstrap from C. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 14:48:28 2021 Received: (at 49280) by debbugs.gnu.org; 19 Jul 2021 18:48:28 +0000 Received: from localhost ([127.0.0.1]:60326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5YJY-0004Lt-55 for submit@debbugs.gnu.org; Mon, 19 Jul 2021 14:48:28 -0400 Received: from mail-qk1-f176.google.com ([209.85.222.176]:44649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5YJX-0004Lh-6e for 49280@debbugs.gnu.org; Mon, 19 Jul 2021 14:48:27 -0400 Received: by mail-qk1-f176.google.com with SMTP id a80so6340295qkg.11 for <49280@debbugs.gnu.org>; Mon, 19 Jul 2021 11:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=p5k85MZxeh+6cEyrM1xe2To1vNBWvpIvxpiBghTjpnY=; b=eYSwS7GZapVki3Sdl0y4ULdryZDZOJklPD/g1tTu1RmSyDVXkT6DHPhG0kFabAsy07 qWzwXnTdB9HB7PnViSfd8/zvKMCUrO2jXO6Hv0IVEYMKeulfoTqGONwZ4Zd9IiTLfH2H 9ROyzJIGBd4rd2OFo9Ela8+2UhZ5+txdal+BfPyCeJMBRi5wwar9q/FWYuGIGLwIzrYy fHAKmj6gFyRxjVhMqjzBF8v8hBx+U3CxEVHgbQsHYSd7ypWFwkteNCXecJZmzzVZsCjy lre213zFXvOYngUmfrvj5UuYOf9A2oMJHlst37OwD4Zcz/ucMZz5JlIZwl073gsyWzrn nxxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=p5k85MZxeh+6cEyrM1xe2To1vNBWvpIvxpiBghTjpnY=; b=B3jzPv6mYM9qaA08DVN0Aym1JWftgYHC0oSVmlLbqUrB35zdgN7nc7bg8VYhUDOsAR evMkHEFXkLy5vh+Uxo1Jt86Ik0UqdRrwvkp0bPIi6iCX2Xujcw7kwNr5vfftD+uZ/zsD iOLp2HcmpPMKtQ8vZ9ENkMSki8sVgV1DlSZVgX5OBQ/hbK9g00CXExwaRr0UuSqm06P1 BhQLeeLG+C3na2sBOOb+Imelqhi517pZ4ZSTcnUZFbGZIkD8Htr2y0XSstvffr1IWYxq EjsHbQepTk+xg7jM1wHa77j4dCgyXnSNO6Co2Kf2ajqXHNes2vy7IfkCIGjUe5HXIWUR GiNQ== X-Gm-Message-State: AOAM5304QH67gBSohxJEiKbWo3eWSO5n/Owxh/rAC+2WZP5snqh+zTaL //GCqG2aCznyVxeR/Vo8rIg8bA== X-Google-Smtp-Source: ABdhPJzJt2kVw+AZiTzifSHghMEsiHna+q66NxnsGsw+2ixlpnXHSFfnQix7YofmOkzruKYOAXHErQ== X-Received: by 2002:a05:620a:d49:: with SMTP id o9mr24850278qkl.378.1626720501641; Mon, 19 Jul 2021 11:48:21 -0700 (PDT) Received: from Sapientia.local (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id j2sm6645472qki.93.2021.07.19.11.48.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 11:48:21 -0700 (PDT) Subject: Re: [PATCH v2 3/3] gnu: racket-minimal: Bootstrap from C. To: 49280@debbugs.gnu.org References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <20210719063143.788661-3-philip@philipmcgrath.com> From: Philip McGrath Message-ID: Date: Mon, 19 Jul 2021 14:48:20 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210719063143.788661-3-philip@philipmcgrath.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 49280 Cc: =?UTF-8?Q?Ludovic_Court=c3=a8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) The Racket maintainers have just disclosed that Racket 8.2 fixes a security vulnerability, CVE-2021-32773. Official advisory: https://github.com/racket/racket/security/advisories/GHSA-cgrw-p7p7-937c Mailing-list thread: https://groups.google.com/g/racket-users/c/BNVybdBZ8wk/m/xJK5_nkDAgAJ -Philip From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 15:46:11 2021 Received: (at 49280) by debbugs.gnu.org; 19 Jul 2021 19:46:11 +0000 Received: from localhost ([127.0.0.1]:60374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5ZDP-0005jB-5i for submit@debbugs.gnu.org; Mon, 19 Jul 2021 15:46:11 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:41121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5ZDM-0005j2-Mi for 49280@debbugs.gnu.org; Mon, 19 Jul 2021 15:46:10 -0400 Received: from nijino.local (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GTC594K28z1LLyW; Mon, 19 Jul 2021 21:46:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GTC594K28z1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1626723965; bh=YByQStAgMCoLuOXIkKnbkksGaKjVvlXTgTOKat3PaoI=; h=Subject:From:To:Date:In-Reply-To:References:From; b=AVH4H7RTQSBurtVXomD66dAvfjnpIARnxcA2fxSPXBDDngl0C5bl9ukuJCZyzJQX4 GaU4tCGVF/gXxmHfjjHiSPrCImcc+K3oVnFYQze9vjTuvIcPdY9B3p0Qyr13VHZ6lG 53O7xNJa+z/r9dhzWl2ZVDVmO4j9KGo+DMbnoCAM= Message-ID: <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> Subject: Re: [PATCH v2 1/3] gnu: racket: Update to 8.2. From: Leo Prikler To: Philip McGrath , 49280@debbugs.gnu.org Date: Mon, 19 Jul 2021 21:46:04 +0200 In-Reply-To: <20210719063143.788661-1-philip@philipmcgrath.com> References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Am Montag, den 19.07.2021, 02:31 -0400 schrieb Philip McGrath: > * gnu/packages/racket.scm (racket-minimal, racket): Update to 8.2. > * gnu/packages/racket.scm (racket-minimal)[#:arguments]: Fix > patch-config.rktd-lib-search-dirs phase. When a config.rktd file > doesn't contain an entry for `lib-search-dirs`, the default is > equivalent to `'(#f)`, not `'()`. What is the point of this value? Can we use a (sequence of) string(s) in its stead? > --- > gnu/packages/racket.scm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm > index 2d606071fe..6b2a011d51 100644 > --- a/gnu/packages/racket.scm > +++ b/gnu/packages/racket.scm > @@ -64,14 +64,14 @@ > (define-public racket-minimal > (package > (name "racket-minimal") > - (version "8.1") ; note: remember to also update > racket! > + (version "8.2") ; note: remember to also update > racket! > (source > (origin > (method url-fetch) > (uri (map (lambda (base) > (string-append base version "/racket-minimal- > src.tgz")) > %installer-mirrors)) > - (sha256 > "04zzqybpxss50n1jrwwq98539gw0y0ygpw9civl2sq3s4ww7m8l3") > + (sha256 > "13qfg56w554vdj5iwa8lpacy83s7bzhhyr44pjns68mkhj69ring") > (patches (search-patches > "racket-sh-via-rktio.patch")))) > (home-page "https://racket-lang.org") > @@ -125,7 +125,7 @@ > 'lib-search-dirs > (lambda (dirs) > (append dirs extra-lib-search- > dirs)) > - null) > + '(#f)) > #:exists 'truncate/replace > file))) > "--" > @@ -183,7 +183,7 @@ DrRacket IDE, are not included.") > %installer-mirrors)) > (sha256 > (base32 > - "0xdqwrwm604bbnr97h75dps2ixxz2svlw0fn0f674bn04dcfd60f")))) > + "10sgzsraxzxp1k2y2wvz8rcjwvhbcd6k72l9lyqr34yazlwfdz26")))) > (inputs > `(;; sqlite and libraries for `racket/draw' are needed to build > the doc. > ("cairo" ,cairo) Otherwise LGTM. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 17:47:03 2021 Received: (at 49280) by debbugs.gnu.org; 19 Jul 2021 21:47:03 +0000 Received: from localhost ([127.0.0.1]:60533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5b6M-0001pF-P5 for submit@debbugs.gnu.org; Mon, 19 Jul 2021 17:47:03 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:46737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5b6L-0001kH-La for 49280@debbugs.gnu.org; Mon, 19 Jul 2021 17:47:02 -0400 Received: by mail-qt1-f172.google.com with SMTP id d15so14040434qte.13 for <49280@debbugs.gnu.org>; Mon, 19 Jul 2021 14:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=3nsmzQWFTZm2hxwzyLj8wF5uOu86qlNJ10tz5oXgaXU=; b=c0n7bgJ4IC/k1efZdMkGxM1PL2qH3/aiovaqk9mh76vCcUk0GhD8FHYibx2ifo5om9 ekBr8FEVvGwpdf0bvP1RbxOA2jo4blsbH54N2/1JxpfBsmyT+3JKEad1dSsUzLqPobzG ikDNouwLtHrVa/sULMT9DiUkBWxB5AZownS1KSBw0obD5w7ZiWSnNedxbgAAkjW+kcWV Lx6BwcK7glf+5Vag7JiHpNmd4ix4/YbOl9ucoOb10VdaluaKzS1MRL2eQQXGm8p2ceyK j7p0gJ83nzCrXbqWidHkiKUmR1K4ASZJIMNnmVko80ivI1Dx0REKIVoEEkr51XmqZTRt dXCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3nsmzQWFTZm2hxwzyLj8wF5uOu86qlNJ10tz5oXgaXU=; b=ohghKx1+6dTjl2Mox4MJLTktH/whR/U0uizGg2GD9kLHwTLdZX4sE1YpbTVOK1DwjY jflpnHB/wTNXS0HY/QDgrpLMKyWZM1IwnWWWzSE82/01LWbl76JMTJJhkXa+v9aQpbqE 3mfSj9fMKGyxAb6L3rew4WYn072IIFZZqszYat9BP5n5sMjrhgtjnJ30UTLnzxl/Kt6w lDWlFzin5qBTplIEkgsgTVVdKC17uDwWmSJgqE0teBHPLUGi5nNh5nKg4pLY+s0Of56p EnQ9jbnH0hdWINz1vputsygJ3Uj3h4fphmyZPAAQAEBB/eug/ywVt3Hc1K2GXK08uIVF wq/w== X-Gm-Message-State: AOAM531+S1OTk+xxJJCzCbe1UsXl1tGYh07+0983FTZYLKmPRqDsYoKM fJOinyk2WPTKB7x3njKACGU6YAaqCZcwPcbYH8c= X-Google-Smtp-Source: ABdhPJwRKQfq7yV9avkAVqvmwbi5+jN35FxOtekRstMHbosyZdnGTSV6t2J32jaB8mUeQEgPJWVwLQ== X-Received: by 2002:ac8:7f8c:: with SMTP id z12mr3116895qtj.224.1626731215876; Mon, 19 Jul 2021 14:46:55 -0700 (PDT) Received: from Sapientia.local (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id q3sm8594893qkn.14.2021.07.19.14.46.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 14:46:55 -0700 (PDT) Subject: Re: [PATCH v2 1/3] gnu: racket: Update to 8.2. To: Leo Prikler , 49280@debbugs.gnu.org References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> From: Philip McGrath Message-ID: Date: Mon, 19 Jul 2021 17:46:54 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 49280 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi, On 7/19/21 3:46 PM, Leo Prikler wrote: > Am Montag, den 19.07.2021, 02:31 -0400 schrieb Philip McGrath: >> * gnu/packages/racket.scm (racket-minimal, racket): Update to 8.2. >> * gnu/packages/racket.scm (racket-minimal)[#:arguments]: Fix >> patch-config.rktd-lib-search-dirs phase. When a config.rktd file >> doesn't contain an entry for `lib-search-dirs`, the default is >> equivalent to `'(#f)`, not `'()`. > What is the point of this value? Can we use a (sequence of) string(s) > in its stead? As you'd probably guess, `lib-search-dirs` and other `-search-dirs` "config.rktd" entries specify search paths. The `#f` value is used to specify the point at which the default search path should be spliced into the list: a configuration file can ignore the default altogether or exercise fine-grained control over the search order. Using `#f` also helps to maintain something closer to a single point of control, rather than hard-code the same string constants in several places. Most importantly, the default value is not always a constant: for example, command-line flags and Racket parameters control whether user-specific paths are included. (For `lib-search-dirs` in particular, it's also worth noting that these are Racket-specific search directories: it does not control the use of OS-level defaults for e.g. `dlopen`.) The problems with omitting `#f` from `lib-search-dirs` were not very noticeable until the patch to start using layered and tethered installations. For a more obvious example, if `catalogs` is `'()`, `raco pkg` won't consult any package catalogs, whereas `'(#f)` will cause it to use the default catalogs. The documentation for these configuration options is here: https://docs.racket-lang.org/raco/config-file.html#(idx._(gentag._70._(lib._scribblings%2Fraco%2Fraco..scrbl))) (As of this writing, the docs on the website are still at 8.1---the whole package catalog is rebuilt after a new Racket release, which takes a little while to finish. You could alternatively apply this patch and run `lynx "file://"$(./pre-inst-env guix build racket)"/share/doc/racket/raco/config-file.html#(idx._(gentag._70._(lib._scribblings%2Fraco%2Fraco..scrbl)))"`.) -Philip From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 05:41:13 2021 Received: (at 49280) by debbugs.gnu.org; 20 Jul 2021 09:41:13 +0000 Received: from localhost ([127.0.0.1]:32808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5mFV-0002by-7P for submit@debbugs.gnu.org; Tue, 20 Jul 2021 05:41:13 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:29078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5mFS-0002bm-NO for 49280@debbugs.gnu.org; Tue, 20 Jul 2021 05:41:12 -0400 Received: from [10.0.0.4] (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GTYcd6PLwz3wmN; Tue, 20 Jul 2021 11:41:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1626774066; bh=Ug9sQzVfEUIIthzC8lEEchsizCrp8C/BQN+2ZNpA3Ng=; h=Subject:From:To:Date:In-Reply-To:References; b=f1zDxE7YMwb45eZFD23jjfniNaUkB4iGgzl/uV32+TVZxbQR8usVbWohswLMMZJhX /Lh2D31QD5K7WjNlmD6s86naysgu5y0iKKZpgA2bbNlwVXSOY2vS8SHxw2pJPwmIW5 E3PC24xwzL7YcalvN4p8kaQPHiLsPr3j/iJmqXtk= Message-ID: <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> Subject: Re: [PATCH v2 1/3] gnu: racket: Update to 8.2. From: Leo Prikler To: Philip McGrath , 49280@debbugs.gnu.org Date: Tue, 20 Jul 2021 11:40:40 +0200 In-Reply-To: References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Am Montag, den 19.07.2021, 17:46 -0400 schrieb Philip McGrath: > Hi, > > On 7/19/21 3:46 PM, Leo Prikler wrote: > > Am Montag, den 19.07.2021, 02:31 -0400 schrieb Philip McGrath: > > > * gnu/packages/racket.scm (racket-minimal, racket): Update to > > > 8.2. > > > * gnu/packages/racket.scm (racket-minimal)[#:arguments]: Fix > > > patch-config.rktd-lib-search-dirs phase. When a config.rktd file > > > doesn't contain an entry for `lib-search-dirs`, the default is > > > equivalent to `'(#f)`, not `'()`. > > What is the point of this value? Can we use a (sequence of) > > string(s) > > in its stead? > > As you'd probably guess, `lib-search-dirs` and other `-search-dirs` > "config.rktd" entries specify search paths. The `#f` value is used > to > specify the point at which the default search path should be spliced > into the list: a configuration file can ignore the default altogether > or > exercise fine-grained control over the search order. Using `#f` also > helps to maintain something closer to a single point of control, > rather > than hard-code the same string constants in several places. Okay, but for this specific config, we could still splice #f ourselves (particularly to also get full store paths), or can we not thanks to the non-constant nature of #f? > Most importantly, the default value is not always a constant: for > example, command-line flags and Racket parameters control whether > user-specific paths are included. How exactly would this play out? Would for example one version of #f contain all of the user-installed packages in ~/.guix-profile whereas the other would only contain racket's own path? > (For `lib-search-dirs` in particular, it's also worth noting that > these are Racket-specific search directories: it does not control the > use of OS-level defaults for e.g. `dlopen`.) Perhaps a confusing naming scheme, but okay. > The problems with omitting `#f` from `lib-search-dirs` were not very > noticeable until the patch to start using layered and tethered > installations. For a more obvious example, if `catalogs` is `'()`, > `raco pkg` won't consult any package catalogs, whereas `'(#f)` will > cause it to use the default catalogs. Okay, but `catalogs` is not `lib-search-dirs`, is it? I'd assume `'(#f)` is roughly equivalent to `'("default")` or `'("@spam@" "@ham@" "@eggs@")` for some configure-time constant spam, ham and eggs. Or does the command-line flag variability apply to catalogs as well? > The documentation for these configuration options is here: > https://docs.racket-lang.org/raco/config-file.html#(idx._(gentag._70._(lib._scribblings%2Fraco%2Fraco..scrbl))) > > (As of this writing, the docs on the website are still at 8.1---the > whole package catalog is rebuilt after a new Racket release, which > takes a little while to finish. You could alternatively apply this > patch and run `lynx "file://"$(./pre-inst-env guix build > racket)"/share/doc/racket/raco/config- > file.html#(idx._(gentag._70._(lib._scribblings%2Fraco%2Fraco..scrbl)) > )"`.) I think more important than the semantics of the configuration file is the purpose of this particular thing. Is it a template from which other stuff is derived? In that case, we might want to use #f as you did. Is it instead used to build stuff in the racket package? Then we'd need to substitute it imo. Regards From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 25 04:22:14 2021 Received: (at 49280) by debbugs.gnu.org; 25 Jul 2021 08:22:14 +0000 Received: from localhost ([127.0.0.1]:47548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ZOn-0002XO-Hr for submit@debbugs.gnu.org; Sun, 25 Jul 2021 04:22:14 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:40870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ZOk-0002X9-KF for 49280@debbugs.gnu.org; Sun, 25 Jul 2021 04:22:12 -0400 Received: by mail-qk1-f181.google.com with SMTP id z24so5815841qkz.7 for <49280@debbugs.gnu.org>; Sun, 25 Jul 2021 01:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=1kMBcXXsoyitCHX/SZGDFirMPRY01EfvFy4w2YMcRXk=; b=FpDI9e8B2l6TctfTfByEpBa1GyLjI8mpGCzlUgbgx8EsjFgyGBci1DEcK+ZE7/56Ff Ugt05zvECJY7Fl1pjZOFqSL2N8ARihDEp8xBEKLOGiDkk7N2VcArOvfGo3rx6ughCmo2 nFCBzLu3Kn++ohg/5+1Iagx52q9pf0SjJsVmpfAWffVlnDOakrLQGyZD1QHQdTBYu7uW 3jMXP8mR3Dq8LimYWN1F6y6XBDLaE0DcO4R2UU+1DD0CLi4jmDok6YiaMgU1Pd4gGuDN cUQBPLPzmEo/uohCkdfl4uJaajScnfXhiBLx5hn0n3aTlckFjHtTvQQ2Pf5fMWUIZG5x mJ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1kMBcXXsoyitCHX/SZGDFirMPRY01EfvFy4w2YMcRXk=; b=lEPRqsCjRwhE1mwrWRyvendwlnTy4O5KJ0adDLO2owxJLkgrYwwOx/JDWQIkKe/YI1 pIehgh9supFox52M6TxwdxQnSo98/n7ws5JGUddZs50DlLBxWkBQqHdPR0SCTg84YOS8 m4EgY3vsgJkxtAtvz1wRALnqMAfmR4iAtPEv8zbqJ9zoPYeng8teMsYRiLhciDDS4Tly XbHXabbPvm8OihQv25+TzXEMZay7AfCIzfZtmtoNNXeR0BdcsvqobOb5fly3d6tfIg3V yd8s3isfmIQ+6XNFkukVrvU5DkEIZpqJzN1/CPtHC5SIqOEva1Pdjt9ZFKBluvtaoYj/ UvHg== X-Gm-Message-State: AOAM5323ph4mtl8SqzBYmkXeuydGrlYYkv3P2mgBliJWtuPeQ5Unf+n9 9fP4bhck+eoiGTVHpA7LM5KcJQx2B6NmeOqHUaE= X-Google-Smtp-Source: ABdhPJxv0Z1fjLSU/nwz2bl76Ov9T48ZJgaPKiz/7+yqc7Qh0rxFgfWyfbvBjUpVO96PUX8xOZrssQ== X-Received: by 2002:a37:a147:: with SMTP id k68mr820032qke.196.1627201324895; Sun, 25 Jul 2021 01:22:04 -0700 (PDT) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id l11sm17439414qke.23.2021.07.25.01.22.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jul 2021 01:22:04 -0700 (PDT) From: Philip McGrath Subject: Re: [PATCH v2 1/3] gnu: racket: Update to 8.2. To: Leo Prikler , 49280@debbugs.gnu.org References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> Message-ID: <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> Date: Sun, 25 Jul 2021 04:22:03 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 49280 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) On 7/20/21 5:40 AM, Leo Prikler wrote: > Am Montag, den 19.07.2021, 17:46 -0400 schrieb Philip McGrath: >> As you'd probably guess, `lib-search-dirs` and other `-search-dirs` >> "config.rktd" entries specify search paths. The `#f` value is used >> to >> specify the point at which the default search path should be spliced >> into the list: a configuration file can ignore the default altogether >> or >> exercise fine-grained control over the search order. Using `#f` also >> helps to maintain something closer to a single point of control, >> rather >> than hard-code the same string constants in several places. > Okay, but for this specific config, we could still splice #f ourselves > (particularly to also get full store paths), or can we not thanks to > the non-constant nature of #f? > >> Most importantly, the default value is not always a constant: for >> example, command-line flags and Racket parameters control whether >> user-specific paths are included. > How exactly would this play out? Would for example one version of #f > contain all of the user-installed packages in ~/.guix-profile whereas > the other would only contain racket's own path? > >> (For `lib-search-dirs` in particular, it's also worth noting that >> these are Racket-specific search directories: it does not control the >> use of OS-level defaults for e.g. `dlopen`.) > Perhaps a confusing naming scheme, but okay. The short answer is that I don't think including #f is causing any problems, whereas trying not to include it seems likely to cause a variety of problems. I'll try to explain more clearly. It might be more useful to look at the second patch in the series, which uses the "extend-layer.rkt" script to generate a "config.rkt" file for the `racket` package, and especially the third patch, which replaces this code completely for the `racket-minimal` package: On 7/19/21 2:31 AM, Philip McGrath wrote: > + (add-before 'configure 'initialize-config.rktd > (lambda* (#:key inputs #:allow-other-keys) > - (chdir "src") > + (define (write-racket-hash alist) > + ;; inside must use dotted pair notation > + (display "#hash(") > + (for-each (match-lambda > + ((k . v) > + (format #t "(~s . ~s)" k v))) > + alist) > + (display ")\n")) > + (mkdir-p "racket/etc") > + (with-output-to-file "racket/etc/config.rktd" > + (lambda () > + (write-racket-hash > + `((lib-search-dirs > + . (#f ,@(map (lambda (lib) > + (string-append (assoc-ref inputs lib) > + "/lib")) > + '("openssl" > + "sqlite")))) > + (catalogs > + . (,(string-append > + "https://download.racket-lang.org/releases/" > + ,version > + "/catalog/") > + #f)))))) > #t)) This code creates a template "config.rktd" file used in the build process: the distributed source tarballs contain such a template already, which is why we didn't need explicitly configure `catalogs` to add the release-pinned package catalog until this change. It is added before the `#f` so that the release catalog is checked before the default catalogs (which point to the latest sources). For `lib-search-dirs`, on the other hand, we want Racket-specific library paths to be tried first, and indeed for layers of a Racket installation to be searched in order, so `#f` is at the head of the list. The Racket build process extends the template "config.rktd" file based on build options like the `--prefix` passed to `configure`. For example, it configures `lib-dir` to "lib/racket" within the store output directory. (It would be incorrect to set those values in the template "config.rktd" file because it is used in the build process before installation.) The `#f` entry in `lib-search-dirs` is usually replaced by a user-specific path like "/home/philip/.local/share/racket/8.1/lib" and the installation-wide path specified by the `lib-dir` key, unless one or both are changed. Omitting the `#f` entry means that neither of paths are ever included. I don't know of any real-life circumstance in which one would want such a "config.rktd" file. In particular, missing `#f` entries creates problems for layered installations, which use these search paths to find earlier layers. There are some other configuration possibilities we may want to explore as Guix's support for Racket packages improves, such as "addon" tethering and customizing the "installation name" or "build stamp". However, this patch series does not attempt to change how Guix's Racket packages work, other than correcting the error I introduced in . Racket installed via Guix has the same behavior in this respect as Racket installed via Debian or other package managers, and that's a way of using Racket I think Guix will want to continue to support. -Philip From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 25 09:04:21 2021 Received: (at 49280) by debbugs.gnu.org; 25 Jul 2021 13:04:21 +0000 Received: from localhost ([127.0.0.1]:47793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7dnj-0003ZY-GO for submit@debbugs.gnu.org; Sun, 25 Jul 2021 09:04:21 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:53034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7dnd-0003ZK-M6 for 49280@debbugs.gnu.org; Sun, 25 Jul 2021 09:04:13 -0400 Received: from [10.0.0.4] (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GXjtT58Pqz1LLyW; Sun, 25 Jul 2021 15:04:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GXjtT58Pqz1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1627218241; bh=fyCVX6nJ9DpIb4eub5iCvIyLKNy7pJoIuVzwrJJMmvQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=oMetHYE2h6ArobJmmjzM4b/tkcd50r741KSEMVcb+frKFVR74UK7men6Y48V4QkN1 uZtTKikYSfkPTU/cpnyvT+2atcgtJcRjs34TuzPt05TqlYCUnX0B63pHoZHZJfrJny W84ZNc2SsTquN/y6I7GUPkAM8L8xvVLcJeJUkJn8= Message-ID: <45fc43e2ceba9e6a711fe1bb99320875f2b45f44.camel@student.tugraz.at> Subject: Re: [PATCH v2 1/3] gnu: racket: Update to 8.2. From: Leo Prikler To: Philip McGrath , 49280@debbugs.gnu.org Date: Sun, 25 Jul 2021 15:03:35 +0200 In-Reply-To: <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Philip, Am Sonntag, den 25.07.2021, 04:22 -0400 schrieb Philip McGrath: > The short answer is that I don't think including #f is causing any > problems, whereas trying not to include it seems likely to cause a > variety of problems. That short explanation imo doesn't adequately summarize the long one. Rest assured, the long explanation gives us a good reason to use #f as you did, it's just that the way to reach this point of understanding appears a bit of a long one. > I'll try to explain more clearly. > > It might be more useful to look at the second patch in the series, > which > uses the "extend-layer.rkt" script to generate a "config.rkt" file > for > the `racket` package, and especially the third patch, which replaces > this code completely for the `racket-minimal` package: > > On 7/19/21 2:31 AM, Philip McGrath wrote: > > + (add-before 'configure 'initialize-config.rktd > > (lambda* (#:key inputs #:allow-other-keys) > > - (chdir "src") > > + (define (write-racket-hash alist) > > + ;; inside must use dotted pair notation > > + (display "#hash(") > > + (for-each (match-lambda > > + ((k . v) > > + (format #t "(~s . ~s)" k v))) > > + alist) > > + (display ")\n")) > > + (mkdir-p "racket/etc") > > + (with-output-to-file "racket/etc/config.rktd" > > + (lambda () > > + (write-racket-hash > > + `((lib-search-dirs > > + . (#f ,@(map (lambda (lib) > > + (string-append (assoc-ref > > inputs > lib) > > + "/lib")) > > + '("openssl" > > + "sqlite")))) > > + (catalogs > > + . (,(string-append > > + " > > https://download.racket-lang.org/releases/" > > + ,version > > + "/catalog/") > > + #f)))))) > > #t)) This is perhaps a somewhat noobish question, but why must we use dotted pair notation here? To me personally, reading '(a . (b c)) is confusing as it could more clearly be written as '(a b c). Is this a Racket convention? > This code creates a template "config.rktd" file used in the build > process: the distributed source tarballs contain such a template > already, which is why we didn't need explicitly configure `catalogs` > to add the release-pinned package catalog until this change. It is > added before the `#f` so that the release catalog is checked before > the default catalogs (which point to the latest sources). For > `lib-search-dirs`, on the other hand, we want Racket-specific > library paths to be tried first, and indeed for layers of a Racket > installation to be searched in order, so `#f` is at the head of the > list. > > The Racket build process extends the template "config.rktd" file > based on build options like the `--prefix` passed to `configure`. For > example, it configures `lib-dir` to "lib/racket" within the store > output directory. (It would be incorrect to set those values in the > template "config.rktd" file because it is used in the build process > before installation.) > > The `#f` entry in `lib-search-dirs` is usually replaced by a > user-specific path like "/home/philip/.local/share/racket/8.1/lib" > and the installation-wide path specified by the `lib-dir` key, unless > one or both are changed. Omitting the `#f` entry means that neither > of paths are ever included. I don't know of any real-life > circumstance in which one would want such a "config.rktd" file. In > particular, missing `#f` entries creates problems for layered > installations, which use these search paths to find earlier layers. > > There are some other configuration possibilities we may want to > explore as Guix's support for Racket packages improves, such as > "addon" tethering and customizing the "installation name" or "build > stamp". However, this patch series does not attempt to change how > Guix's Racket packages work, other than correcting the error I > introduced in ;. Racket installed > via Guix has the same behavior in this respect as Racket installed > via Debian or other package managers, and that's a way of using > Racket I think Guix will want to continue to support. To attempt a better summary: Specifying `#f' will allow Racket to search for user-specific libraries etc. (in $XDG_DATA_HOME/racket/$RACKET_VERSION) in addition to "system-specific" libraries stored in $HOME/.guix-profile, am I correct? If so, then yes, doing that is absolutely fine (you could compare it to how Emacs users can still install stuff via ELPA). Regards, From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 25 14:04:44 2021 Received: (at 49280) by debbugs.gnu.org; 25 Jul 2021 18:04:44 +0000 Received: from localhost ([127.0.0.1]:49351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7iUW-0002p0-2d for submit@debbugs.gnu.org; Sun, 25 Jul 2021 14:04:44 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:38648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7iUU-0002ol-DR for 49280@debbugs.gnu.org; Sun, 25 Jul 2021 14:04:43 -0400 Received: by mail-qt1-f178.google.com with SMTP id h10so5469264qth.5 for <49280@debbugs.gnu.org>; Sun, 25 Jul 2021 11:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=iJFM6kngEE4zGv4axQ8kWzLIHlq/EI9vRkoZ+nDl3/U=; b=SYYsD9t5GZIUQMn2kkC5zq6HIwpiS7zqcavVbKyPwEFZ9oQOUyGX8yiooLsqIzG1Gy 5tckbaGUlg8ygufomIiOEWrtjoXqX8+Ma0ksplrFXL8j0IIU1dLXLKhiuJjyhPLhRQQC hRnLWw0GMVR7btbDbVcYDQtcIFtrilj0zEBwoVpuLwsX/AdqHDJV8oVK/1cocLLpKxOv BARcmLOWrSEA7kZ3FOy/SmVJ5YISTavuCZYkafJBrX9LS0LSDh1/5S4pDQ/Pm1aoy0rc yaq0Y3xqbIwi8cGO07Jbed2AJCP+p1OP7B4sRX5g+NADClBQbdmBgoRi5ancd2FuYsll U0hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iJFM6kngEE4zGv4axQ8kWzLIHlq/EI9vRkoZ+nDl3/U=; b=n/o73mkGq7yp2t1aSMBgK/mg98t/zLpxxvv2RtMQSdg2VR6w0IDHBbyh9CLOQWXbiR gADqTkkomgcVDdwPYnWmxciG+SKtdMmfIxsg7j6M61N+o6HAGEboc3yye6+d956hLIS0 IY6PDnOom6kMQygmO7Vix/KZonzXAoPi7x5IdUgdFqVjnImqiJ4dcj9+3ne5+zuKsJd9 mAYSbKYH4zKnLr4MOmtH3BJSTCGl9FdWQVomsVmsYph1ORJ9NnQgmFSqvEua81uQPkIk nbU8AT84LJUJjVo+ThzMTkPPYG94fSt5rddJsfbIco0qw3uPKyHr5ncTV4r6vcTf28BD wbyg== X-Gm-Message-State: AOAM532QCIinM6K1qRDiK21gCSMurbZHQFpqSZuqDKxJmZDC+ntRQ4Vh UCpzSiNnjYK39/UJu2H4bQY7VHso6ZLlzoaBlb8= X-Google-Smtp-Source: ABdhPJxsR61mv0b6QGob3MDJg3HkqaAFkyu53nWZnxc68LWXuZRcrXOkBxRpKf8AnFg7vvOPAI57vA== X-Received: by 2002:a05:622a:44b:: with SMTP id o11mr7925981qtx.271.1627236276973; Sun, 25 Jul 2021 11:04:36 -0700 (PDT) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id c1sm2613204qtj.36.2021.07.25.11.04.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jul 2021 11:04:36 -0700 (PDT) Subject: Re: [PATCH v2 1/3] gnu: racket: Update to 8.2. To: Leo Prikler , 49280@debbugs.gnu.org, =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> <45fc43e2ceba9e6a711fe1bb99320875f2b45f44.camel@student.tugraz.at> From: Philip McGrath Message-ID: Date: Sun, 25 Jul 2021 14:04:35 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <45fc43e2ceba9e6a711fe1bb99320875f2b45f44.camel@student.tugraz.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 49280 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi, On 7/25/21 9:03 AM, Leo Prikler wrote: >> On 7/19/21 2:31 AM, Philip McGrath wrote: >>> + (add-before 'configure 'initialize-config.rktd >>> (lambda* (#:key inputs #:allow-other-keys) >>> - (chdir "src") >>> + (define (write-racket-hash alist) >>> + ;; inside must use dotted pair notation >>> + (display "#hash(") >>> + (for-each (match-lambda >>> + ((k . v) >>> + (format #t "(~s . ~s)" k v))) >>> + alist) >>> + (display ")\n")) >>> + (mkdir-p "racket/etc") >>> + (with-output-to-file "racket/etc/config.rktd" >>> + (lambda () >>> + (write-racket-hash >>> + `((lib-search-dirs >>> + . (#f ,@(map (lambda (lib) >>> + (string-append (assoc-ref >>> inputs >> lib) >>> + "/lib")) >>> + '("openssl" >>> + "sqlite")))) >>> + (catalogs >>> + . (,(string-append >>> + " >>> https://download.racket-lang.org/releases/" >>> + ,version >>> + "/catalog/") >>> + #f)))))) >>> #t)) > This is perhaps a somewhat noobish question, but why must we use dotted > pair notation here? To me personally, reading '(a . (b c)) is > confusing as it could more clearly be written as '(a b c). Is this a > Racket convention? Yes, the Racket reader requires that hash table literals use dotted pair notation, e.g. #hash((a . (b c))(d . 2)). (Additionally, hand-written Racket would often use square brackets for the key–value pairs.) I think it's ultimately for historical reasons, but there are various subtleties: under `quasiquote`, for example, the value position can contain `unquote`, but the key position cannot. Of course, that doesn't necessarily mean the Guile code must use dotted pairs, but, at least as a Racketeer, I found writing these s-expressions with a bit of a "Racket accent" helped me to remember that this code is generating Racket. > To attempt a better summary: Specifying `#f' will allow Racket to > search for user-specific libraries etc. (in > $XDG_DATA_HOME/racket/$RACKET_VERSION) in addition to "system-specific" > libraries stored in $HOME/.guix-profile, am I correct? > > If so, then yes, doing that is absolutely fine (you could compare it to > how Emacs users can still install stuff via ELPA). Yes, that's a much better summary. (Pedantically, the user-specific path could be different, depending on the configured installation name and other things.) The other issue is that I believe *not* specifying `#f` for `racket-minimal` would break the build of `racket` starting in the second patch, when the main distribution becomes a layer chaining to `racket-minimal`. At least, it broke some examples of layered installation I tried, which is how I figured out I'd done the wrong thing in . If that were the only issue, there might be some other workaround, but it's worth bearing in mind, particularly because the problems caused by buggy "config.rktd" files can be subtle and easy to miss. -Philip From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 17:23:03 2021 Received: (at 49280) by debbugs.gnu.org; 30 Jul 2021 21:23:03 +0000 Received: from localhost ([127.0.0.1]:32844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9ZyB-0001f7-H2 for submit@debbugs.gnu.org; Fri, 30 Jul 2021 17:23:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Zy9-0001eT-W6 for 49280@debbugs.gnu.org; Fri, 30 Jul 2021 17:23:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59340) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9Zy4-0001A0-IV; Fri, 30 Jul 2021 17:22:56 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45340 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9Zy4-0003Cc-BD; Fri, 30 Jul 2021 17:22:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philip McGrath Subject: Re: bug#49280: [PATCH v2 0/3] gnu: racket: Update to 8.2. Bootstrap from C. References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-2-philip@philipmcgrath.com> <87lf6gjy5l.fsf_-_@gnu.org> <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> Date: Fri, 30 Jul 2021 23:22:54 +0200 In-Reply-To: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> (Philip McGrath's message of "Sun, 18 Jul 2021 17:35:56 -0400") Message-ID: <87zgu3xzrl.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Philip, Sorry for the delay and thanks for the explanations! Comments/answers follow. Philip McGrath skribis: > On 7/8/21 5:25 PM, Ludovic Court=C3=A8s wrote: >> Philip McGrath skribis: >>=20 >>> * gnu/packages/racket.scm (racket-next-minimal,racket-next): New variab= les. [...] >> For this there=E2=80=99s already a documented convention (info "(guix) >> Package >> Naming"), although part of it is undocumented. The prefix would rather >> be =E2=80=9Cracket-=E2=80=9D to match what we do with other packages=E2= =80=93=E2=80=9Cghc-=E2=80=9D, =E2=80=9Cocaml-=E2=80=9D, >> =E2=80=9Cguile-=E2=80=9D, and so forth. > > I wrote these as statements in the hope of eliciting any disagreement :) > > The problem I see with using just =E2=80=9Cracket-=E2=80=9D as the prefix= is the > potential for collisions, especially because Racket uses a lot of the=20 > namespace: for example, "_" is a useful example package for testing > package issues, and I maintain the "_-exp" package. There don't seem > to be Racket packages named "minimal" or "next" right now, but they > seem reasonably likely to be used in the future, and Guix likewise may > want to add packages that don't correspond directly to a single > Racket-level package. (In fact, I think this may be necessary to build > Racket packages with mutually recursive dependencies.) Other Racket > package names that I think might be less confusing if prefixed with=20 > =E2=80=9Cracket-pkg-=E2=80=9D include "base", "racket-lib", "unstable", "= profile", > "make", "data", "images", "compiler", "compatibility", "pkg-build", > and "main-distribution". I would not worry too much about name collisions. After all, we have 18K packages and a great potential for collisions already. :-) We can deal with a hypothetical =E2=80=9Cnext=E2=80=9D Racket package when = it comes into existence. > But we don't need to resolve this now, and maybe actually implementing > that support will clarify what issues really do or don't exist. I will=20 > just remove this whole comment for now, since I don't need to make a > choice between "racket-next-minimal" and "racket-minimal-next". Either way is fine with me. :-) > In addition to bootstrapping, there are three reasons I know of to > want Racket BC: > > 1. The BC and CS implementations have different C APIs, so some > low-level code may support BC but not CS. But this isn't usually a > good reason. Racket packages should support both implementations. > Embedding applications ideally would also be portable: if it's > only feasible to support one implementation, it should be CS. > > 2. Comparing the BC and CS implementations can be useful for testing > and debugging, both for packages that use the FFI and when hacking > on the Racket runtime system itself. > > 3. Most importantly, BC supports some architectures that CS does not. > > In particular, Racket CS does not (yet) support ppc64le, which Racket > BC does support. The recommendation to packagers, and what Debian > does, is > to explicitly use BC on platforms without CS support: > https://github.com/racket/racket/issues/3773#issuecomment-832935403 > > I'm not sure what the most idiomatic way to do this is in Guix. Once we have a =E2=80=98racket-build-system=E2=80=99, it could pick the rig= ht Racket as a function of the target system. Otherwise we could do a trick of the sort we have for =E2=80=98pkg-config= =E2=80=99, but I=E2=80=99d rather avoid that. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 17:31:30 2021 Received: (at 49280) by debbugs.gnu.org; 30 Jul 2021 21:31:30 +0000 Received: from localhost ([127.0.0.1]:32848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9a6M-0001rv-GK for submit@debbugs.gnu.org; Fri, 30 Jul 2021 17:31:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9a6J-0001rf-Nc for 49280@debbugs.gnu.org; Fri, 30 Jul 2021 17:31:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59488) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9a6E-0006m8-3S; Fri, 30 Jul 2021 17:31:22 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45342 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9a6D-0008Nr-NO; Fri, 30 Jul 2021 17:31:21 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philip McGrath Subject: References to unversioned source tarballs References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-2-philip@philipmcgrath.com> <87lf6gjy5l.fsf_-_@gnu.org> <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> Date: Fri, 30 Jul 2021 23:31:20 +0200 In-Reply-To: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> (Philip McGrath's message of "Sun, 18 Jul 2021 17:35:56 -0400") Message-ID: <87tukbxzdj.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip McGrath skribis: >>> + (uri (string-append %pre-release-installers >>> + "racket-src.tgz")))))) >> Do I get it right that *-src.tgz are not versioned? That they=E2=80=99re >> updated in place regularly? >> In that case, we cannot refer to them in a package definition since >> the >> hash is bound to become stale. >> What we could do is refer to, say, >> . >> However, I suspect this file would vanish fairly quickly from the web >> site, which is not okay either. >> I=E2=80=99m not sure what a good solution would be. WDYT? [...] > For now, I will avoid the problem by just not dealing with "-next" varian= ts. I just realized that the problem already exists right now, with =E2=80=98ra= cket=E2=80=99 and =E2=80=98racket-minimal=E2=80=99 referring to =E2=80=98racket-src.tgz= =E2=80=99. I think we should fix it after this series, possibly by using =E2=80=98git-fetch=E2=80=99 instead. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 17:33:54 2021 Received: (at 49280) by debbugs.gnu.org; 30 Jul 2021 21:33:54 +0000 Received: from localhost ([127.0.0.1]:32853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9a8f-0001vF-U0 for submit@debbugs.gnu.org; Fri, 30 Jul 2021 17:33:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9a8e-0001v4-Qh for 49280@debbugs.gnu.org; Fri, 30 Jul 2021 17:33:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59532) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9a8Z-0008S9-K5; Fri, 30 Jul 2021 17:33:47 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45344 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9a8Z-0004qP-Ca; Fri, 30 Jul 2021 17:33:47 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philip McGrath Subject: Re: bug#49280: [PATCH v2 0/3] gnu: racket: Update to 8.2. Bootstrap from C. References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <20210719063143.788661-2-philip@philipmcgrath.com> Date: Fri, 30 Jul 2021 23:33:46 +0200 In-Reply-To: <20210719063143.788661-2-philip@philipmcgrath.com> (Philip McGrath's message of "Mon, 19 Jul 2021 02:31:42 -0400") Message-ID: <87o8ajxz9h.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip McGrath skribis: > + (snippet > + (with-imported-modules '((guix build utils) > + (ice-9 match) > + (ice-9 regex)) > + #~(begin > + (use-modules (guix build utils) > + (ice-9 match) > + (ice-9 regex)) This leads to this warning: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build racket -n gnu/packages/racket.scm:429:10: warning: importing modules (ice-9 match) (i= ce-9 regex) from the host --8<---------------cut here---------------end--------------->8--- In fact, we can omit =E2=80=98with-imported-modules=E2=80=99 altogether bec= ause (guix build utils) happens to already be available. I=E2=80=99ll try with this change. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 18:08:46 2021 Received: (at 49280) by debbugs.gnu.org; 30 Jul 2021 22:08:46 +0000 Received: from localhost ([127.0.0.1]:32882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9agP-0002jh-RV for submit@debbugs.gnu.org; Fri, 30 Jul 2021 18:08:46 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:35360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9agK-0002jO-Iw for 49280@debbugs.gnu.org; Fri, 30 Jul 2021 18:08:45 -0400 Received: by mail-qt1-f172.google.com with SMTP id a12so7519271qtb.2 for <49280@debbugs.gnu.org>; Fri, 30 Jul 2021 15:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YmZ2Vgu1YwTNmHE67zJa0twRHUFLcio1ngAsHmZUv/k=; b=RVmlCeGdJ+aG09l4VekeoH4+xjt1Hmhw/1Cj+NTaRgCl6dyZrV3moabtXzkyZTy29e /D12jYGymM1GXGsrwWlsDtzaFQpshm2+jAr9S6fwWviOlAL0rVK3+XXaDG/GlKx2WnYC 8MOJPCi254EeruYwuudUi1ls7DK1uAnpTaaFRSkS0jYNOOpa11XjJvXgiN1gjtxopJri OkP2eZsckFIvYnFelZBkSdCEzB1PzHwfL2ucuQ5prf2xeOnUro9kIDqX0f7TX2wVFRTV 6qngAxR1ZKQ/pDs618SKXSAD7YaHbZBNJgLTxcBkIhSh73MKStggGV/VwZ3nl6ldRSit Oa7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YmZ2Vgu1YwTNmHE67zJa0twRHUFLcio1ngAsHmZUv/k=; b=JPa42KZgYqF9nFXHIU5tDCeygeJF8IrvuwmS8qisZV6DWRR81vx3IkHHmOywCPd1YJ OW9TMtTaQFo5TTAjs+CeCvfgcJdhUzTB+cbGb8esMA4B4JqZrYH2AjCk884R7B84/HFw //LMnBsQtdPyNufLO5B4fFAVonuNBK5zRg2P9LNGAYYTvDTZ7B89O+u74jfL2MgNbiXA 0leCyrdpOpd1U63yj3lC1N6VTGloykcF39v0DR6pDdtzWxkgYWA650mZB0TvE/DWEjGP dNm1Y7xVACGeS3LxZ/u/vbXKhMn79F/U+owv0JlBzzbZPgLBc7zylBeynQKxsDnuU3eP CYvg== X-Gm-Message-State: AOAM532in8dhXEqexTQGXfvlcCnFK0SaIhuDh4ddU4r6ahGXr/h6JK10 GU/hNuZdXduSXKs4LHJZpYbTWyvnWoGpkmaPWjo= X-Google-Smtp-Source: ABdhPJwHL7etq7BsN7UqYnKQcGUpX7/yS6EsQaWe36QZmj3L8ojJVfyXSv7uyTCiRRB8Knsd6dtoCQ== X-Received: by 2002:ac8:4a8c:: with SMTP id l12mr4325722qtq.68.1627682915042; Fri, 30 Jul 2021 15:08:35 -0700 (PDT) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id e10sm1633461qkg.18.2021.07.30.15.08.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jul 2021 15:08:34 -0700 (PDT) Subject: Re: References to unversioned source tarballs To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-2-philip@philipmcgrath.com> <87lf6gjy5l.fsf_-_@gnu.org> <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <87tukbxzdj.fsf_-_@gnu.org> From: Philip McGrath Message-ID: <964f5db2-7167-bfac-f129-898328416309@philipmcgrath.com> Date: Fri, 30 Jul 2021 18:08:33 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87tukbxzdj.fsf_-_@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 7/30/21 5:31 PM, Ludovic Courtès wrote: > Philip McGrath skribis: > >>>> + (uri (string-append %pre-release-installers >>>> + "racket-src.tgz")))))) >>> Do I get it righ [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: docs.racket-lang.org] 0.6 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: docs.racket-lang.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.160.172 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.160.172 listed in wl.mailspike.net] 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -0.1 NICE_REPLY_A Looks like a legit reply (A) X-Debbugs-Envelope-To: 49280 Cc: 49280@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) On 7/30/21 5:31 PM, Ludovic Courtès wrote: > Philip McGrath skribis: > >>>> + (uri (string-append %pre-release-installers >>>> + "racket-src.tgz")))))) >>> Do I get it right that *-src.tgz are not versioned? That they’re >>> updated in place regularly? >>> In that case, we cannot refer to them in a package definition since >>> the >>> hash is bound to become stale. >>> What we could do is refer to, say, >>> . >>> However, I suspect this file would vanish fairly quickly from the web >>> site, which is not okay either. >>> I’m not sure what a good solution would be. WDYT? > > [...] > >> For now, I will avoid the problem by just not dealing with "-next" variants. > > I just realized that the problem already exists right now, with ‘racket’ > and ‘racket-minimal’ referring to ‘racket-src.tgz’. > > I think we should fix it after this series, possibly by using > ‘git-fetch’ instead. I think it is actually ok, because the the URIs are formed by: ``` (uri (map (lambda (base) (string-append base version "/racket-src.tgz")) %installer-mirrors)) ``` so the version is present as a path element, just not in the file name, e.g. . These are definitely stable URLs relied on by a variety of tools, e.g. for CI. An equivalent tarball is also available at (and likewise for the other mirrors), but most tools prefer the "versionless path" URLs so that code manipulating the downloaded artifacts doesn't have to deal with version numbers. (Download sites like these are created by the "distro-build" Racket package and have a well-known structure, though the documentation is not all in one place. A good place to start would be , which is generated from the same Scribble source that generates "build.md" in the main Racket Git repository.) -Philip From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 19:05:38 2021 Received: (at 49280-done) by debbugs.gnu.org; 30 Jul 2021 23:05:38 +0000 Received: from localhost ([127.0.0.1]:32902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9bZS-00043v-GK for submit@debbugs.gnu.org; Fri, 30 Jul 2021 19:05:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9bZR-00043i-7O for 49280-done@debbugs.gnu.org; Fri, 30 Jul 2021 19:05:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:32858) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9bZL-0001F8-Kb; Fri, 30 Jul 2021 19:05:31 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45346 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9bZK-0002cN-Mr; Fri, 30 Jul 2021 19:05:31 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Philip McGrath Subject: Re: bug#49280: [PATCH v2 0/3] gnu: racket: Update to 8.2. Bootstrap from C. References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> Date: Sat, 31 Jul 2021 01:05:26 +0200 In-Reply-To: <20210719063143.788661-1-philip@philipmcgrath.com> (Philip McGrath's message of "Mon, 19 Jul 2021 02:31:41 -0400") Message-ID: <87k0l7xv0p.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49280-done Cc: 49280-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Finally pushed this second series, minus =E2=80=98with-imported-modules=E2= =80=99. db2c7e70ad gnu: racket-minimal: Bootstrap from C. 65bad4d036 gnu: racket: Unbundle racket-minimal. 1ae95ebcdd gnu: racket: Update to 8.2. Thank you! Ludo=E2=80=99. From unknown Sat Aug 16 21:19:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 28 Aug 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator