From patchwork Sat Oct 26 07:05:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gemmaro X-Patchwork-Id: 69468 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 949F827BBEA; Sat, 26 Oct 2024 08:08:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CBF8D27BBE2 for ; Sat, 26 Oct 2024 08:08:49 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4auW-0003k0-9F; Sat, 26 Oct 2024 03:08:32 -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 1t4auU-0003jo-FI for guix-patches@gnu.org; Sat, 26 Oct 2024 03:08:30 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4auT-0001bF-WA for guix-patches@gnu.org; Sat, 26 Oct 2024 03:08:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=4RRXTFDKgG8v/iMLjpkggwZNI9xDPtiVj3EDvLz11f4=; b=b2uiwaeSRiw6mrptu4UzQHmNsh4cSG508HE64onry3UtvvjkZ6XPUYWo6Rb6gGvNLC12tYc8lbRGBX6RXwloH2FK8staUZDy+8X1oq/BxOeYFAEGrhdX5+rmZiziwrq+D0dN5nSJczwtggFlW9kz6o74jTXWH/02cukx9fqQNB+UmoXD5FoorgiADcblX8qMYeCgYHg2xwy28IX9JZgpfFaSF1rBC/KeRiQKi789+RjJt1ZOwnFdQuIAQNkZqFfEuCZKYXk67W88oDToIY6+Uy47p2gA8irgof/es+jM4xtT7nc3EfbWYrJUEMHMr6qvSrkEtAlUPS2QlKte4l/ktQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4av0-0004Sn-Hg; Sat, 26 Oct 2024 03:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74025] [PATCH] gnu: ruby-puma: Update to 6.4.3-0.2482fac. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, guix-patches@gnu.org Resent-Date: Sat, 26 Oct 2024 07:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74025 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74025@debbugs.gnu.org Cc: gemmaro , Christopher Baines X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines Received: via spool by submit@debbugs.gnu.org id=B.172992648717072 (code B ref -1); Sat, 26 Oct 2024 07:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Oct 2024 07:08:07 +0000 Received: from localhost ([127.0.0.1]:40416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4au6-0004RB-Is for submit@debbugs.gnu.org; Sat, 26 Oct 2024 03:08:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:59694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4au4-0004R3-HF for submit@debbugs.gnu.org; Sat, 26 Oct 2024 03:08:05 -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 1t4atX-0003Yp-76 for guix-patches@gnu.org; Sat, 26 Oct 2024 03:07:31 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4atU-0001XE-Rw for guix-patches@gnu.org; Sat, 26 Oct 2024 03:07:30 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2e2dc61bc41so1989605a91.1 for ; Sat, 26 Oct 2024 00:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729926447; x=1730531247; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4RRXTFDKgG8v/iMLjpkggwZNI9xDPtiVj3EDvLz11f4=; b=BEMZCHLKHqw+j3sNZ5zZqsNacPOjSGrudJx22GOg/CbveSEBBzlylfmYd7DKrnaZF6 bM7hbeObNCU7/6DROsLkndTCp2zySxz06nmsC39Ij7Bb4UX82DV7QV8AHz3VVf98I0iV QtFQRW3xd17rUndru3NIHnR3kOuYuGic+P1JFCX/pY037pWJ1AO78lXi1pha7W7hjgWq FRMjNM3Q2a8wYKfpRb/HiAuKFkVicJjCgTzvADvhG8ppUlKP5f1s3vPqgMGrc8l8SoMj 4h3RuLAnbWphRXF4K0FHw5WSNG/8E+1XQayEUCmwbkuXcvrxiuco5GW75y5aDgUp2EL/ C8wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729926447; x=1730531247; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4RRXTFDKgG8v/iMLjpkggwZNI9xDPtiVj3EDvLz11f4=; b=AQviYmVLP60GzDi1S4b7rEO4jlFOJmnGQz1VHl75+ekl3WIGqdB0ZKA3A3tMdPbC34 19ub6I/X6BDw7hukp2Pugg7hbQt/iWB/0KDCrhdCw27WSnyjrs3gpZ/ygAHj/q5R/TW1 ytGZ30acB6kkNy9HjmY0C5KP0nKuUGtfTI7GRZw92m5/GqDD5tdYa9SN9194P9eophfz fI3VhySUNUdetc7SxjmIze3TKvnG9Eo8+p8fODpHOUbH7OeIK0ymIqbcbfvwylNOExTV 83oQAvHeRZMCvFMNWQJOAwJR+gWh/MkLPXJJrJQWdxSqpxg7z3dBP7mp2cayWlD9Eipm QUHw== X-Gm-Message-State: AOJu0Yy32tgLwS+o4jTsp7zBiAln1JQTn5/vPAhyhUupXNcYV3kD+MOO s9znpVu/B90c67CqN4uOSTOgsWOJv5HGQokKD7nTg3cbAvqgpBR/rhbvHHu2 X-Google-Smtp-Source: AGHT+IHA223PoBlOSce/oW70TDCpT2roHfj3QlI6qdGqVYKCjNNDPq21bwNC+Wi+985BlFH3b6de+Q== X-Received: by 2002:a17:90b:4f8c:b0:2e2:bd34:f23b with SMTP id 98e67ed59e1d1-2e8f10a8833mr2351405a91.32.1729926446861; Sat, 26 Oct 2024 00:07:26 -0700 (PDT) Received: from mac.gemmaro.name ([240f:74:d1f0:1:1883:f3d1:907f:a2e3]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e8e3555ad3sm2768867a91.1.2024.10.26.00.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2024 00:07:26 -0700 (PDT) From: gemmaro Date: Sat, 26 Oct 2024 16:05:40 +0900 Message-ID: <0c565a1a42d047d1a6be83e67899d1fa8df87d36.1729926340.git.gemmaro.dev@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=gemmaro.dev@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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: , 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-puma): Update to 6.4.3-0.2482fac. The build for the previous version was failling due to the certification expiration. [arguments]<#:phases>: Removed the use-rack-2 phase. Now uses Rack 3 instead. Added new skip tests to the disable-problematic-tests phase. [native-inputs]: Use ruby-rack-next (version 3) instead of ruby-rack. Add ruby-rackup for testing. Change-Id: I71a9ce0315c7d77aa30baf6a32867382afd85f67 --- gnu/packages/ruby.scm | 248 +++++++++++++++++++++--------------------- 1 file changed, 125 insertions(+), 123 deletions(-) base-commit: 808c02c01e87d6ded18492372543108e1f9154a9 diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 5af1bb1cef..8f3991a738 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -12635,133 +12635,135 @@ (define-public ruby-ttfunk (license %prawn-project-licenses))) (define-public ruby-puma - (package - (name "ruby-puma") - (version "6.3.0") - (source - (origin - (method git-fetch) ;for tests - (uri (git-reference - (url "https://github.com/puma/puma") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0qnayzgyr23w87jc849r00394hv1gw2rk9080nws43ilnycagzxq")))) - (build-system ruby-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-Gemfile - (lambda _ - (substitute* "Gemfile" - (("gem \"rake-compiler\".*") - "gem 'rake-compiler'\n")))) - (add-after 'unpack 'disable-rubocop - (lambda _ - (setenv "PUMA_NO_RUBOCOP" "1"))) - (add-after 'unpack 'use-rack-2 - (lambda _ - (setenv "PUMA_CI_RACK" "rack2") - (setenv "PUMA_CI_RACK_2" "1"))) - (add-before 'build 'increase-resource-limits - (lambda _ - ;; The test suite requires a higher number of open files. Try - ;; increasing the soft resource limit of max open files to 2048, - ;; or equal to the hard limit, whichever is lower. - (call-with-values (lambda () (getrlimit 'nofile)) - (lambda (soft hard) - (when (and soft (< soft 2048)) - (if hard - (setrlimit 'nofile (min hard 2048) hard) - (setrlimit 'nofile 2048 #f)) - (format - #t "increased maximum number of open files from ~d to ~d~%" - soft (if hard (min hard 2048) 2048))))))) - (add-before 'build 'fix-gemspec - (lambda _ - (substitute* "puma.gemspec" - (("`git ls-files -- bin docs ext lib tools`") - "`find bin docs ext lib tools -type f |sort`")))) - (delete 'check) ;moved after install - (add-after 'install 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "bundle" "exec" "rake" "test")))) - (add-after 'install 'delete-mkmf.log - (lambda _ - ;; Rubygems installs build log files that embed volatile file - ;; names (see: - ;; https://github.com/rubygems/rubygems/issues/6259). - (for-each delete-file (find-files #$output "^mkmf\\.log$")))) - (add-before 'check 'disable-problematic-tests - (lambda _ - (let-syntax ((skip-tests - (syntax-rules () - ((_ file test ...) - (substitute* file - (((string-append "def " test ".*") all) - (string-append - all " skip('fails on guix')\n")) ...))))) - ;; The test failures were reported at: - ;; https://github.com/puma/puma/issues/3093, but appear to be - ;; caused by the Guix build container, perhaps the lack of - ;; zombie process reaping (see: - ;; https://issues.guix.gnu.org/30948). - ;; All the tests in the 'test_worker_gem_independence.rb' - ;; module fail with "Expected false to be truthy.". - (delete-file "test/test_worker_gem_independence.rb") - (skip-tests "test/test_integration_ssl_session.rb" - ;; The TLS 1.2 test fails for unknown reasons. - "test_off_tls1_2") - (skip-tests "test/test_integration_cluster.rb" - "test_fork_worker_on_refork" - "test_hot_restart_does_not_drop_connections" - "test_culling_strategy_oldest_fork_worker" - "test_usr1_fork_worker") - (skip-tests "test/test_integration_pumactl.rb" - "test_refork_cluster")))) - (add-before 'check 'relax-test-case-timeout - (lambda _ - ;; The default value is 45 s and easily causes timeouts. - (setenv "TEST_CASE_TIMEOUT" "600"))) - (add-before 'check 'set-home - (lambda _ - ;; Some tests fail if the cannot write to HOME. - (setenv "HOME" "/tmp"))) - (add-before 'check 'set-paths - (lambda _ - ;; The test suite requires the 'puma' command to be on PATH. - (setenv "PATH" (string-append (getenv "PATH") ":" - #$output "/bin")) - (setenv "GEM_PATH" (string-append - (getenv "GEM_PATH") ":" - #$output "/lib/ruby/vendor_ruby"))))))) - (native-inputs - (list bundler - curl - ruby-json - ruby-localhost - ruby-m - ruby-minitest-proveit - ruby-minitest-retry - ruby-minitest-stub-const - ruby-rack - ruby-rake-compiler - ruby-webrick)) - (inputs - (list openssl - ruby-nio4r)) - (synopsis "Simple, concurrent HTTP server for Ruby/Rack") - (description - "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server + (let ((revision "0") + (commit "2482fac8cbb556cef4adda00399d1da40c7a4ccc")) + (package + (name "ruby-puma") + (version (git-version "6.4.3" revision commit)) + (source + (origin + (method git-fetch) ;for tests + (uri (git-reference + (url "https://github.com/puma/puma") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1f7skvdniqcv7mdqpmdxnwzn8ky2q6j92d3c6929fv4c1qfz6r41")))) + (build-system ruby-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-Gemfile + (lambda _ + (substitute* "Gemfile" + (("gem \"rake-compiler\".*") + "gem 'rake-compiler'\n")))) + (add-after 'unpack 'disable-rubocop + (lambda _ + (setenv "PUMA_NO_RUBOCOP" "1"))) + (add-before 'build 'increase-resource-limits + (lambda _ + ;; The test suite requires a higher number of open files. Try + ;; increasing the soft resource limit of max open files to 2048, + ;; or equal to the hard limit, whichever is lower. + (call-with-values (lambda () (getrlimit 'nofile)) + (lambda (soft hard) + (when (and soft (< soft 2048)) + (if hard + (setrlimit 'nofile (min hard 2048) hard) + (setrlimit 'nofile 2048 #f)) + (format + #t "increased maximum number of open files from ~d to ~d~%" + soft (if hard (min hard 2048) 2048))))))) + (add-before 'build 'fix-gemspec + (lambda _ + (substitute* "puma.gemspec" + (("`git ls-files -- bin docs ext lib tools`") + "`find bin docs ext lib tools -type f |sort`")))) + (delete 'check) ;moved after install + (add-after 'install 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "bundle" "exec" "rake" "test")))) + (add-after 'install 'delete-mkmf.log + (lambda _ + ;; Rubygems installs build log files that embed volatile file + ;; names (see: + ;; https://github.com/rubygems/rubygems/issues/6259). + (for-each delete-file (find-files #$output "^mkmf\\.log$")))) + (add-before 'check 'disable-problematic-tests + (lambda _ + (let-syntax ((skip-tests + (syntax-rules () + ((_ file test ...) + (substitute* file + (((string-append "def " test ".*") all) + (string-append + all " skip('fails on guix')\n")) ...))))) + ;; The test failures were reported at: + ;; https://github.com/puma/puma/issues/3093, but appear to be + ;; caused by the Guix build container, perhaps the lack of + ;; zombie process reaping (see: + ;; https://issues.guix.gnu.org/30948). + ;; All the tests in the 'test_worker_gem_independence.rb' + ;; module fail with "Expected false to be truthy.". + (delete-file "test/test_worker_gem_independence.rb") + (skip-tests "test/test_integration_ssl_session.rb" + ;; The TLS 1.2 test fails for unknown reasons. + "test_off_tls1_2") + (skip-tests "test/test_integration_cluster.rb" + "test_fork_worker_on_refork" + "test_hot_restart_does_not_drop_connections" + "test_culling_strategy_oldest_fork_worker" + "test_usr1_fork_worker") + (skip-tests "test/test_integration_pumactl.rb" + "test_refork_cluster") + (skip-tests "test/test_puma_server_ssl.rb" + "test_tls_v1_rejection" + "test_tls_v1_1_rejection")))) + (add-before 'check 'relax-test-case-timeout + (lambda _ + ;; The default value is 45 s and easily causes timeouts. + (setenv "TEST_CASE_TIMEOUT" "600"))) + (add-before 'check 'set-home + (lambda _ + ;; Some tests fail if the cannot write to HOME. + (setenv "HOME" "/tmp"))) + (add-before 'check 'set-paths + (lambda _ + ;; The test suite requires the 'puma' command to be on PATH. + (setenv "PATH" (string-append (getenv "PATH") ":" + #$output "/bin")) + (setenv "GEM_PATH" (string-append + (getenv "GEM_PATH") ":" + #$output "/lib/ruby/vendor_ruby"))))))) + (native-inputs + (list bundler + curl + ruby-json + ruby-localhost + ruby-m + ruby-minitest-proveit + ruby-minitest-retry + ruby-minitest-stub-const + ruby-rack-next + ruby-rackup + ruby-rake-compiler + ruby-webrick)) + (inputs + (list openssl + ruby-nio4r)) + (synopsis "Simple, concurrent HTTP server for Ruby/Rack") + (description + "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. In order to get the best throughput, it is highly recommended that you use a Ruby implementation with real threads like Rubinius or JRuby.") - (home-page "https://puma.io/") - (license license:expat))) + (home-page "https://puma.io/") + (license license:expat)))) (define-public ruby-hoe-git (package