From patchwork Mon Mar 20 17:14:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 48285 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 D943216F1F; Mon, 20 Mar 2023 17:28:21 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 6DC7E16F2D for ; Mon, 20 Mar 2023 17:28:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peJGv-0004N2-FQ; Mon, 20 Mar 2023 13:26:13 -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 1peJGt-0004KI-3L for guix-patches@gnu.org; Mon, 20 Mar 2023 13:26:11 -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 1peJGs-0005PJ-RR for guix-patches@gnu.org; Mon, 20 Mar 2023 13:26:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peJGs-0003zF-N3 for guix-patches@gnu.org; Mon, 20 Mar 2023 13:26:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62196] [PATCH 075/223] gnu: ruby-rack: Update to 2.2.6.3. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 17:26:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62196 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62196@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 62196-submit@debbugs.gnu.org id=B62196.167933312314605 (code B ref 62196); Mon, 20 Mar 2023 17:26:10 +0000 Received: (at 62196) by debbugs.gnu.org; 20 Mar 2023 17:25:23 +0000 Received: from localhost ([127.0.0.1]:56058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJG6-0003nO-JP for submit@debbugs.gnu.org; Mon, 20 Mar 2023 13:25:22 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:33416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJ8l-0003Ju-Hm for 62196@debbugs.gnu.org; Mon, 20 Mar 2023 13:17:47 -0400 Received: by mail-qt1-f175.google.com with SMTP id n2so14002770qtp.0 for <62196@debbugs.gnu.org>; Mon, 20 Mar 2023 10:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679332667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SHpF+KgiJDdntknYf2LZYWHEl40jmtjVRG9eiQsc3uk=; b=b3yG4NX83g2RipXi+yiuY7fR8eiR0dBkNYbMO9a6flAd/70elOKErXhjXRJ2GCh8KB LO4+fwBIiBbfgnULt2ksywA8380pLU3KRjw/qpAF6hAsAp/MnPjiTZKOTsOycwvw5j// L6mjfjWtgfhwennCvtzBLGt6ZkXKr4P7hYgR84OnvaTJoTyLxUL0D8D/z83VphbFcPak tylfWiVaiHofhdpL0MFZV0qd3y2ItBskbv/I5xZvvceebEXy+hOF/UsAsPDZLnFvBSAI HX9VHNZp0x9VHT1sSeUKEcFI8mdL9HXD1ulQzUhZnF5RxuFnWM48M34twEzDbDzawRcT 3FPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679332667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SHpF+KgiJDdntknYf2LZYWHEl40jmtjVRG9eiQsc3uk=; b=tBa0wtHSymKcdGDv2LVhb6pkrJ2/1Ba1i0MjZ4UBo//McAWC1vd1kT9g6jhzjF5IH/ xQVO3sP8rubZ/9QV9R+UuQPzUEC4tHxWmqC3KZDhlJo6lOjLD+xxUBqQmf/KAUGgudVa ngJihQ3x3mmfiixRgPB/1DxwgCgy/12QILRpezQaQyxrz4KLbAxE9QTPVZDN/nv1Wy5H Nxwt+6XyojqZ2wyyi5jn6QsVQKIqIT0VVh6zLFXp9Dq78Mx26rt/e7EFhS9oZ+thO6x4 Mz233TJVKJ2HClrSkag+Hy16cUgDQ1xzY/M7b/xNO3hHaSdIJXPrWH0rKlDprKXbT33X 9Peg== X-Gm-Message-State: AO0yUKVcYf732TaCYTdfDHSyQTKqyeNNQLVdItf45RbKM6GkkAdmQH/0 QSlFE8iKbhO5yTYeSiKzNXB2k3U3Uk8= X-Google-Smtp-Source: AK7set/FcxO+R/78YxWFTdjYAPBFFzlBKme8N0w9ufLkQdwQrPqFZavMjRsJt2ilLg3mi/MmXQ/q+A== X-Received: by 2002:a05:622a:24e:b0:3dd:57f8:3214 with SMTP id c14-20020a05622a024e00b003dd57f83214mr13029812qtx.18.1679332666955; Mon, 20 Mar 2023 10:17:46 -0700 (PDT) Received: from localhost.localdomain (dsl-10-128-46.b2b2c.ca. [72.10.128.46]) by smtp.gmail.com with ESMTPSA id p17-20020a374211000000b007428e743508sm7673809qka.70.2023.03.20.10.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 10:17:46 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 20 Mar 2023 13:14:07 -0400 Message-Id: <20230320171635.11184-75-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230320171635.11184-1-maxim.cournoyer@gmail.com> References: <20230320171635.11184-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ruby.scm (ruby-rack): Update to 2.2.6.3. [source]: Move snippet to... [arguments]: ... the fix-test phase. Use gexps and delete trailing #t. --- gnu/packages/ruby.scm | 68 ++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 7cf4d34ebf..29c4ae8bf8 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7115,50 +7115,46 @@ (define-public ruby-racc (define-public ruby-rack (package (name "ruby-rack") - (version "2.2.3") + ;; Do not upgrade to version 3, as Rails doesn't support it yet. + (version "2.2.6.3") (source (origin - (method git-fetch) - ;; Download from GitHub so that the snippet can be applied and tests run. + (method git-fetch) ;for tests (uri (git-reference - (url "https://github.com/rack/rack") - (commit version))) + (url "https://github.com/rack/rack") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1qrm5z5v586738bnkr9188dvz0s25nryw6sgvx18jjlkizayw1g4")) - ;; Ignore test which fails inside the build environment but works - ;; outside. - (modules '((guix build utils))) - (snippet - '(begin (substitute* "test/spec_files.rb" - (("res.body.must_equal expected_body") "")) - #t)))) + "19n33q0v15qjh7kbp2painyzyqg16kkf0mp68vcnlswghmmjcyzq")))) (build-system ruby-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'check 'fix-tests - (lambda _ - ;; A few of the tests use the length of a file on disk for - ;; Content-Length and Content-Range headers. However, this file - ;; has a shebang in it which an earlier phase patches, growing - ;; the file size from 193 to 239 bytes when the store prefix is - ;; "/gnu/store". - (let ((size-diff (- (string-length (which "ruby")) - (string-length "/usr/bin/env ruby")))) - (substitute* '("test/spec_files.rb") - (("208" bytes) - (number->string (+ (string->number bytes) size-diff))) - (("bytes(.)22-33" all delimiter) - (string-append "bytes" - delimiter - (number->string (+ 22 size-diff)) - "-" - (number->string (+ 33 size-diff)))))) - #t))))) - (native-inputs - (list ruby-minitest ruby-minitest-global-expectations)) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'fix-tests + (lambda _ + ;; This test fails in the build environment (and passes outside + ;; of it). + (substitute* "test/spec_files.rb" + (("res.body.must_equal expected_body") "")) + ;; A few of the tests use the length of a file on disk for + ;; Content-Length and Content-Range headers. However, this file + ;; has a shebang in it which an earlier phase patches, growing + ;; the file size from 193 to 239 bytes when the store prefix is + ;; "/gnu/store". + (let ((size-diff (- (string-length (which "ruby")) + (string-length "/usr/bin/env ruby")))) + (substitute* '("test/spec_files.rb") + (("208" bytes) + (number->string (+ (string->number bytes) size-diff))) + (("bytes(.)22-33" all delimiter) + (string-append "bytes" + delimiter + (number->string (+ 22 size-diff)) + "-" + (number->string (+ 33 size-diff))))))))))) + (native-inputs (list ruby-minitest ruby-minitest-global-expectations)) (synopsis "Unified web application interface for Ruby") (description "Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses,