From patchwork Sun Mar 19 23:06:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Sims" X-Patchwork-Id: 48133 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1CB3B16F28; Sun, 19 Mar 2023 23:08:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6928616E9E for ; Sun, 19 Mar 2023 23:08:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pe28C-0008Cq-3U; Sun, 19 Mar 2023 19:08:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pe28A-0008Cg-G5 for guix-patches@gnu.org; Sun, 19 Mar 2023 19:08:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pe28A-0004UN-7L for guix-patches@gnu.org; Sun, 19 Mar 2023 19:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pe28A-0004Oq-0E for guix-patches@gnu.org; Sun, 19 Mar 2023 19:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62282] [PATCH] gnu: gerbil: Upgrade to 0.17.0. Resent-From: "J. Sims" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Mar 2023 23:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62282 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62282@debbugs.gnu.org Cc: "glv@posteo.net" , "jgart@dismail.de" X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.167926723316851 (code B ref -1); Sun, 19 Mar 2023 23:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Mar 2023 23:07:13 +0000 Received: from localhost ([127.0.0.1]:52955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pe27M-0004Ni-Af for submit@debbugs.gnu.org; Sun, 19 Mar 2023 19:07:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:35784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pe27K-0004NY-7M for submit@debbugs.gnu.org; Sun, 19 Mar 2023 19:07:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pe27J-00083l-UU for guix-patches@gnu.org; Sun, 19 Mar 2023 19:07:09 -0400 Received: from mail-4325.protonmail.ch ([185.70.43.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pe27H-0004PC-EV for guix-patches@gnu.org; Sun, 19 Mar 2023 19:07:09 -0400 Date: Sun, 19 Mar 2023 23:06:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1679267221; x=1679526421; bh=bQaoovvqY4y/wc/9e2BEujPBl/MoQ3W9eWs7nnEvYDw=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=tfBjpXouuKNBQDmyfHiWmhVg/XlukwzqZV1nnlMmAVWDOZECVrghfqTuMRTy4xgMY 9ZQltOL5DiRfIdgu1h3RdygUYEusFPiVRewiNWU0p9U9MZKh8C99lNn1LTj7XViRgr 0O6DNqBcCrOJpYkBb85Oz3whFjKHe0Te/qj+yKZS9n/iu540NOuCY9DrsnhxYZcLQc 1k8LzFeKQwP9gH2DkWhhS0EVo4mcWlIHH3PI/p1EJHbzvGXKA7JfGiB+AKUjMCIqF6 c6XEZVZ5nmam1usKU5tl2LKKWm5FI8CAwQiZgm3wBmqDtGvgF93x55n5Cw3h8gUxCA cfogij/9u7BiQ== Message-ID: Feedback-ID: 12133992:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.25; envelope-from=jtsims@protonmail.com; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: "J. Sims" X-ACL-Warn: , "J. Sims via Guix-patches" X-Patchwork-Original-From: "J. Sims via Guix-patches" via From: "J. Sims" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, Attached is a patch to upgrade Gerbil to the latest version. In addition, it fixes a few issues: * switch build code to use g-expressions * use the `#:tests?' argument of `arguments' instead of deleting the `check' phase * run `guix style' * fix issue with missing version file during build Honestly, I'm not sure I fixed the latter issue in the most idiomatic way. I simply printed the appropriate s-expression to the appropriate file using Guile's `format'. If anyone has advice for a cleaner/more robust way to handle that, please let me know. Note that I initially tried to fix the version file issue by ignoring the build instructions in the Gerbil guide and instead using the autotools build infrastructure whose artifacts can be seen in the top-level directory of the Gerbil repository. This ran into a different issue, and in the process of diagnosing it, I realized that the build infrastructure in question was written specifically for the previous version. There being no good reason to solve that problem over this one, and realizing that proper versioning would complicate the use of that system even more than solving the missing version file issue, I elected to pursue the route I did. This is far too much information for a git commit message, but I did feel it worth mentioning somewhere. Thanks, Juli From 08f88a578060bdd6017f1ab00dea9c882e11f12d Mon Sep 17 00:00:00 2001 From: Juliana Sims Date: Sun, 19 Mar 2023 18:27:14 -0400 Subject: [PATCH] gnu: gerbil: Upgrade to 0.17.0. * gnu/packages/scheme.scm (gerbil): Upgrade to 0.17.0. --- gnu/packages/scheme.scm | 177 +++++++++++++++++++++------------------- 1 file changed, 91 insertions(+), 86 deletions(-) diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index e6a9ef1db0..30550b0d8f 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -1113,94 +1113,99 @@ (define-public cl-airship-scheme (define-public gerbil (package (name "gerbil") - (version "0.16") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/vyzo/gerbil") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'bootstrap) - (add-before 'configure 'chdir - (lambda _ - (chdir "src") - #t)) - (replace 'configure - (lambda* (#:key outputs inputs #:allow-other-keys) - (invoke "chmod" "755" "-R" ".") - ;; Otherwise fails when editing an r--r--r-- file. - (invoke "gsi-script" "configure" - "--prefix" (assoc-ref outputs "out") - "--with-gambit" (assoc-ref inputs "gambit-c")))) - (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs - (lambda _ - ;; Some .ss files refer to gxi using /usr/bin/env gxi - ;; and 'patch-generated-file-shebangs can't fix that - ;; because gxi has not been compiled yet. - ;; We know where gxi is going to end up so we - ;; Doctor Who our fix here before the problem - ;; happens towards the end of the build.sh script. - (let ((abs-srcdir (getcwd))) - (for-each - (lambda (f) - (substitute* f - (("#!/usr/bin/env gxi") - (string-append "#!" abs-srcdir "/../bin/gxi")))) - '("./gerbil/gxc" - "./lang/build.ss" - "./misc/http-perf/build.ss" - "./misc/rpc-perf/build.ss" - "./misc/scripts/docsnarf.ss" - "./misc/scripts/docstub.ss" - "./misc/scripts/docsyms.ss" - "./r7rs-large/build.ss" - "./release.ss" - "./std/build.ss" - "./std/run-tests.ss" - "./std/web/fastcgi-test.ss" - "./std/web/rack-test.ss" - "./tools/build.ss" - "./tutorial/httpd/build.ss" - "./tutorial/kvstore/build.ss" - "./tutorial/lang/build.ss" - "./tutorial/proxy/build-static.ss" - "./tutorial/proxy/build.ss"))) - #t)) - (replace - 'build - (lambda* - (#:key inputs #:allow-other-keys) - (setenv "HOME" (getcwd)) - (invoke - ;; The build script needs a tty or it'll crash on an ioctl - ;; trying to find the width of the terminal it's running on. - ;; Calling in script prevents that. - "script" - "-qefc" - "./build.sh"))) - (delete 'check) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib"))) - (mkdir-p bin) - (mkdir-p lib) - (copy-recursively "../bin" bin) - (copy-recursively "../lib" lib))))))) - (native-inputs - (list coreutils util-linux)) - (propagated-inputs - (list gambit-c zlib openssl sqlite)) + (version "0.17.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vyzo/gerbil") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0c0nspm659ybgmqlppdv7sxzll4hwkvcp9qmcsip6d0kz0p8r9c3")))) (build-system gnu-build-system) + (arguments + (list #:phases #~(modify-phases %standard-phases + (delete 'bootstrap) + (add-before 'configure 'chdir + (lambda _ + (chdir "src"))) + (replace 'configure + (lambda _ + (invoke "chmod" "755" "-R" ".") + ;; Otherwise fails when editing an r--r--r-- file. + (invoke "gsi-script" + "configure" + "--prefix" + #$output + "--with-gambit" + #$gambit-c))) + (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs + (lambda _ + ;; Some .ss files refer to gxi using /usr/bin/env gxi + ;; and 'patch-generated-file-shebangs can't fix that + ;; because gxi has not been compiled yet. + ;; We know where gxi is going to end up so we + ;; Doctor Who our fix here before the problem + ;; happens towards the end of the build.sh script. + (let ((abs-srcdir (getcwd))) + (for-each (lambda (f) + (substitute* f + (("#!/usr/bin/env gxi") + (string-append "#!" abs-srcdir + "/../bin/gxi")))) + '("./gerbil/gxc" "./lang/build.ss" + "./misc/http-perf/build.ss" + "./misc/rpc-perf/build.ss" + "./misc/scripts/docsnarf.ss" + "./misc/scripts/docstub.ss" + "./misc/scripts/docsyms.ss" + "./r7rs-large/build.ss" + "./release.ss" + "./std/build.ss" + "./std/run-tests.ss" + "./std/web/fastcgi-test.ss" + "./std/web/rack-test.ss" + "./tools/build.ss" + "./tutorial/httpd/build.ss" + "./tutorial/kvstore/build.ss" + "./tutorial/lang/build.ss" + "./tutorial/proxy/build-static.ss" + "./tutorial/proxy/build.ss"))))) + (add-after 'configure 'create-gx-version.scm + (lambda _ + (call-with-output-file (format #f + "~a/gerbil/runtime/gx-version.scm" + (getcwd)) + (lambda (p) + (format p + "(define (gerbil-version-string) \"v~s\")" + #$(version-major+minor version)))))) + (replace 'build + (lambda _ + (setenv "HOME" + (getcwd)) + (invoke + ;; The build script needs a tty or it'll crash on an ioctl + ;; trying to find the width of the terminal it's running on. + ;; Calling in script prevents that. + "script" + "-qefc" + "./build.sh"))) + (replace 'install + (lambda _ + (let* ((bin (string-append #$output "/bin")) + (lib (string-append #$output "/lib"))) + (mkdir-p bin) + (mkdir-p lib) + (copy-recursively "../bin" bin) + (copy-recursively "../lib" lib))))) + #:tests? #f)) + (native-inputs (list coreutils gambit-c util-linux)) + (propagated-inputs (list gambit-c zlib openssl sqlite)) (synopsis "Meta-dialect of Scheme with post-modern features") - (description "Gerbil is an opinionated dialect of Scheme designed for Systems + (description + "Gerbil is an opinionated dialect of Scheme designed for Systems Programming, with a state of the art macro and module system on top of the Gambit runtime. The macro system is based on quote-syntax, and provides the full meta-syntactic tower with a native implementation of syntax-case. It also provides a full-blown module base-commit: 80d31a7478fa736802c106765662e0b33e2f472e -- 2.39.2