From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 20 13:25:17 2023 Received: (at 62196) by debbugs.gnu.org; 20 Mar 2023 17:25:17 +0000 Received: from localhost ([127.0.0.1]:56033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJG1-0003le-1n for submit@debbugs.gnu.org; Mon, 20 Mar 2023 13:25:17 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:39610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJ8Z-0003Kb-MO for 62196@debbugs.gnu.org; Mon, 20 Mar 2023 13:17:36 -0400 Received: by mail-qt1-f178.google.com with SMTP id i24so13953445qtm.6 for <62196@debbugs.gnu.org>; Mon, 20 Mar 2023 10:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679332650; 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=4XL1WD9HmIJyxZ6Yppuq0vqmkna9UNPKOr3Db3axThg=; b=hTceClJnJw8iG0uPKory9lbYvLY3XgAz0ADRUHUnTTun/BYtAzP9RZYj9HfJ9LjM1l Tz3mQLoStZSUibrtP0FxR2Cdc2lYcJYb9nm/LbN57MH7RKp0Qlnf0xPp1EoJLJHoyX26 5h1WRZgG0GxTti2pDom9A8Ls/Zngmv9rdyXLgdehod5VH/s7eOTlIu/QC1fCkFbiwFkj 6H+67cJXDe8NJ35CHq1DA6w2BJ4tsfvBE3efmTkmqUMlw2RRPoao5E/4AGQ+Nx0mXhvJ EhkqOnHms/52EFTXvwozgHQF9r+m2M0v0kPC5w+Ife0D5MjW0qlTpQcLVoSsVMaN50mz Zp5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679332650; 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=4XL1WD9HmIJyxZ6Yppuq0vqmkna9UNPKOr3Db3axThg=; b=CHKOUxHirfOzTeH37FYtRvNpK0vCuo+OVftaXY6/OzuFeaZNyD1PTuqsAy6ZT/WZR7 aA43xqIvofJ2wcRB6wYU7Y29PuSFZHZB8ebwsd5PidoQQVPKl3B1g2VCp3NqztXfJM48 tOyPc2lPFeuWPdsLZ/SfwdI9c4t0DQfLyYJf5VLXPh3ra++aqEJPEtbOckSthypEwo5Y uZ37QpyvQ1NPAaQQ+zN5Dlk7+Oy1Lzqkg0LGtoeV1sGEedhY+u80EhrVnB4YjJNOXg3i WLn+lgcGjaml3jOJpdFaRtFEc7YNWrYhmCpZ1uRDIuIn9R+JZGoEcvxvRUZdAJgktJEL y0QA== X-Gm-Message-State: AO0yUKWIIrldRVcujfpOdtNQjCxTBHln2K3xL0OrZeGPGaakEUGagNQe BoAnFnZEcxIdmt1JQUhvQZJl3HTp7J8= X-Google-Smtp-Source: AK7set9GubOMrCNHr/Wzhx5WgGMusILtBsHUjWc/rcg01G9cYhJW5nUyCGdqq2aZ2bY/l/gVnJp8iw== X-Received: by 2002:ac8:570c:0:b0:3e0:b48d:70e2 with SMTP id 12-20020ac8570c000000b003e0b48d70e2mr7689888qtw.46.1679332649967; Mon, 20 Mar 2023 10:17:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 10:17:29 -0700 (PDT) From: Maxim Cournoyer To: 62196@debbugs.gnu.org Subject: [PATCH 056/223] gnu: ruby-activesupport: Update to 7.0.4.3. Date: Mon, 20 Mar 2023 13:13:48 -0400 Message-Id: <20230320171635.11184-56-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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62196 Cc: Maxim Cournoyer 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 (-) * gnu/packages/ruby.scm (ruby-activesupport): Move to... * gnu/packages/rails.scm (ruby-activesupport): ... here. (%ruby-rails-version, ruby-rails-monorepo): New variables. (ruby-activesupport): Update to 7.0.4.3. [arguments]: Use gexps. Add the delete-gemfiles, chdir, check-setup and delete-problematic-tests phases. Delete check phase override. [native-inputs]: New field. [propagated-inputs]: Remove ruby-zeitwerk. Replace ruby-minitest with ruby-minitest-5.15. [home-page]: Update URL. --- gnu/packages/protobuf.scm | 1 + gnu/packages/rails.scm | 84 +++++++++++++++++++++++++++++++++++++++ gnu/packages/ruby.scm | 33 --------------- 3 files changed, 85 insertions(+), 33 deletions(-) diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm index 82c5b7b5f8..a746b7de9c 100644 --- a/gnu/packages/protobuf.scm +++ b/gnu/packages/protobuf.scm @@ -49,6 +49,7 @@ (define-module (gnu packages protobuf) #:use-module (gnu packages python-check) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rpc) + #:use-module (gnu packages rails) #:use-module (gnu packages ruby) #:use-module (srfi srfi-1)) diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm index 8f5bda4638..3af90bc913 100644 --- a/gnu/packages/rails.scm +++ b/gnu/packages/rails.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016 Matthew Jordan ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2021, 2022 Efraim Flashner +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,10 +25,93 @@ (define-module (gnu packages rails) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix packages) + #:use-module (gnu packages base) + #:use-module (gnu packages databases) #:use-module (gnu packages node) #:use-module (gnu packages ruby) #:use-module (guix build-system ruby)) +(define %ruby-rails-version "7.0.4.3") + +(define ruby-rails-monorepo + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rails/rails") + (commit (string-append "v" %ruby-rails-version)))) + (file-name (git-file-name "ruby-rails" %ruby-rails-version)) + (sha256 + (base32 + "0f5f8r8wdmdmbyl07b0z555arai4ys2j8dj3fy0mq63y9bfhcqqk")))) + +(define-public ruby-activesupport + (package + (name "ruby-activesupport") + (version %ruby-rails-version) + (source ruby-rails-monorepo) + (build-system ruby-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'delete-gemfiles + (lambda _ + (delete-file "Gemfile") + (delete-file "Gemfile.lock"))) + (add-after 'delete-gemfiles 'chdir + (lambda _ + (chdir "activesupport"))) + (add-before 'check 'check-setup + (lambda* (#:key native-inputs inputs #:allow-other-keys) + ;; Multiple tests require to set the timezone. + (setenv "TZDIR" (search-input-directory (or native-inputs inputs) + "share/zoneinfo")) + ;; The test suite requires a memcached and a redis server. + (invoke "memcached" "-d") + (invoke "redis-server" "--daemonize" "yes"))) + (add-before 'check 'delete-problematic-tests + (lambda _ + ;; These tests fail non-deterministically. + (substitute* "test/cache/behaviors.rb" + ((".*behaviors/cache_store_behavior.*") + "") + ((".*behaviors/encoded_key_cache_behavior.*") + "")) + (delete-file "test/evented_file_update_checker_test.rb") + ;; These tests require cache_store_behavior, disabled above. + (delete-file "test/cache/stores/file_store_test.rb") + (delete-file "test/cache/stores/mem_cache_store_test.rb") + (delete-file "test/cache/stores/memory_store_test.rb") + (delete-file "test/cache/stores/redis_cache_store_test.rb")))))) + (native-inputs + (list memcached + redis + ruby-builder + ruby-connection-pool + ruby-dalli + ruby-hiredis + ruby-libxml + ruby-listen + ruby-rack + ruby-redis + ruby-rexml + tzdata-for-tests)) + (propagated-inputs + (list ruby-concurrent + ruby-i18n + ;; This is sub-optimal, but apparently necessary (see: + ;; https://github.com/rails/rails/commit/ + ;; 9766eb4a833c26c64012230b96dd1157ebb8e8a2). + ruby-minitest-5.15 + ruby-tzinfo + ruby-tzinfo-data)) + (synopsis "Ruby on Rails utility library") + (description "ActiveSupport is a toolkit of support libraries and Ruby +core extensions extracted from the Rails framework. It includes support for +multibyte strings, internationalization, time zones, and testing.") + (home-page "https://rubyonrails.org/") + (license license:expat))) + (define-public ruby-spring (package (name "ruby-spring") diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 132a06bc57..92b384d646 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -6547,39 +6547,6 @@ (define-public ruby-loofah documents and fragments. It's built on top of Nokogiri and libxml2.") (license license:expat))) -(define-public ruby-activesupport - (package - (name "ruby-activesupport") - (version "6.1.3") - (source - (origin - (method url-fetch) - (uri (rubygems-uri "activesupport" version)) - (sha256 - (base32 - "00a4db64g8w5yyk6hzak2nqrmdfvyh5zc9cvnm9gglwbi87ss28h")))) - (build-system ruby-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - ;; There are no tests, instead attempt to load the library. - (invoke "ruby" "-Ilib" "-r" "active_support")))))) - (propagated-inputs - (list ruby-concurrent - ruby-i18n - ruby-minitest - ruby-tzinfo - ruby-tzinfo-data - ruby-zeitwerk)) - (synopsis "Ruby on Rails utility library") - (description "ActiveSupport is a toolkit of support libraries and Ruby -core extensions extracted from the Rails framework. It includes support for -multibyte strings, internationalization, time zones, and testing.") - (home-page "https://www.rubyonrails.org") - (license license:expat))) - (define-public ruby-crass (package (name "ruby-crass") -- 2.39.1