From patchwork Mon Mar 20 17:23:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 48392 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 244CF16F34; Mon, 20 Mar 2023 17:34:11 +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,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 24C0816F1F for ; Mon, 20 Mar 2023 17:34:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peJOX-0005sk-6F; Mon, 20 Mar 2023 13:34: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 1peJOV-0005rz-KU for guix-patches@gnu.org; Mon, 20 Mar 2023 13:34:03 -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 1peJOU-0001PY-UK for guix-patches@gnu.org; Mon, 20 Mar 2023 13:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peJOU-00051w-QK for guix-patches@gnu.org; Mon, 20 Mar 2023 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62196] [PATCH 197/223] gnu: jekyll: Update to 4.3.2 and enable tests. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 17:34:02 +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.167933359719258 (code B ref 62196); Mon, 20 Mar 2023 17:34:02 +0000 Received: (at 62196) by debbugs.gnu.org; 20 Mar 2023 17:33:17 +0000 Received: from localhost ([127.0.0.1]:56512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJNl-00050Y-18 for submit@debbugs.gnu.org; Mon, 20 Mar 2023 13:33:17 -0400 Received: from mail-yw1-f172.google.com ([209.85.128.172]:42766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJNj-00050K-Dv for 62196@debbugs.gnu.org; Mon, 20 Mar 2023 13:33:15 -0400 Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-544f7c176easo92403067b3.9 for <62196@debbugs.gnu.org>; Mon, 20 Mar 2023 10:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679333590; 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=6E6ITMjoG6u7mEOhRVHrMNA4YR5kjchAhIzt2Tps86M=; b=Oj6n6AwtOo8Tt7wZiPt1mJmNcPp1EDt+/4OnuQ+pqtRreZlLeku24Qnuv91dkpXoYu 3xgpuzPL3GwAfJgpuCIA+LrmJQ4f2W2rn/hqlqNqxmnPJHCd5XzA/Yt1+jegOm5egYI4 47jlA1UyGgH/Jo74peQu0t9d+CxS/9Ag8FaHghlG/lyKwZLN00NK7gk2KhEXuVrg4McA gtO8a1ADRupUTnhMs2AzB9B4YWdpNDwb88xuFjRGq8OpsBF41XWjWLBhutHsmgMr1nAj 2D7XfiFMeqKiWTZI+WfnLFMEI/C08ou7eB2YtPLDPfR1y0yTkk87/yyBQWMufx1JzRJU 29Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679333590; 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=6E6ITMjoG6u7mEOhRVHrMNA4YR5kjchAhIzt2Tps86M=; b=ydp4a6adslWVoU9LNaIkQDmCe3df4YACXIBUk0GVlU7xDGvNQS5IapFNGZO0bCN0x0 eppctTmPFaKKhZq/x55IDXp5jVmHXLa//wtAN1AEyG23ZWovdJRWnu+njCO08xid7l8D JTf5zr5VihWAZ97PQnUHnfKAZVZQtd8NEtOEVdziBVIVAZILVZYBXRBX5Wjb2jpo9cIz KVLHKoSzOjxUSsa/LpxoFStjmtpFHbyBUAMAp4aA9JTG/h/b9fGJdrB53TTjA9fWinqI RVcZcN5FeAd8oSbqWOiosfMifKVYzhaax1/8rL74/Mf7gnXKFsdkf4IINUbpoqdJZ5wd a0Hg== X-Gm-Message-State: AO0yUKVr47gdKgdVQCtPYTHqLSRoy/Mw+AbH/CeP3u62w7GgYRnpFo57 MpI2dSEJxvF/WPf1+h1O8sAr1TNPA/k= X-Google-Smtp-Source: AK7set+TAt/6gkjM9KSVVtRLv9XRkgzsgxik7eiwbEy+HOPy7jh0MnI4uS4gFECwzaIGe+/TLCHxcw== X-Received: by 2002:a05:6214:cc3:b0:56e:93de:59c6 with SMTP id 3-20020a0562140cc300b0056e93de59c6mr64772755qvx.37.1679333123048; Mon, 20 Mar 2023 10:25:23 -0700 (PDT) Received: from localhost.localdomain (dsl-10-128-46.b2b2c.ca. [72.10.128.46]) by smtp.gmail.com with ESMTPSA id i7-20020a378607000000b007422eee8058sm7769352qkd.125.2023.03.20.10.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 10:25:22 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 20 Mar 2023 13:23:23 -0400 Message-Id: <20230320172349.12752-96-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230320172349.12752-1-maxim.cournoyer@gmail.com> References: <20230320172349.12752-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 (jekyll): Update to 4.3.2. [arguments]: Enable tests. Add #:modules and #:test-target arguments. Delete fix-i18n phase. Add disable-problematic-tests and check override phases. [native-inputs]: New field. [propagated-inputs]: Add ruby-webrick. --- gnu/packages/ruby.scm | 92 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 82 insertions(+), 10 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 67a466e1ad..f19c02811f 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -13223,23 +13223,94 @@ (define-public ruby-terminal-table (define-public jekyll (package (name "jekyll") - (version "4.2.0") + (version "4.3.2") (source (origin - (method url-fetch) - (uri (rubygems-uri "jekyll" version)) + (method git-fetch) ;for tests + (uri (git-reference + (url "https://github.com/jekyll/jekyll") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0cqkh78jw8scrajyx5nla0vwm9fvp2qql3kdcvvplcq9mazy8snq")))) + "1d588d7zhp526r21f9mnm204m8qy0c8h3lq3ghyg6qp8mj6hnwj4")))) (build-system ruby-build-system) (arguments - (list #:tests? #f ;no rakefile, but a test subdirectory + (list #:modules '((guix build ruby-build-system) + (guix build utils) + (ice-9 ftw) + (srfi srfi-26)) + ;; The cucumber acceptance suite is not run as it depends on an old + ;; version (5). + #:test-target "spec" #:phases #~(modify-phases %standard-phases - (add-before 'build 'fix-i18n + (add-before 'check 'disable-problematic-tests + ;; TODO: Package the missing test inputs. (lambda _ - (substitute* ".gemspec" - (("~> 0.7") ">= 0.7") - (("~> 1.14") ">= 1.14"))))))) + (with-directory-excursion "test" + ;; Requires 'jekyll-coffeescript'. + (delete-file "test_coffeescript.rb") + ;; Requires 'tomlrb'. + (delete-file "test_configuration.rb") + (substitute* "test_filters.rb" + ;; The sassify tests fail due to white space + ;; differences (see: + ;; https://github.com/jekyll/jekyll/issues/9322). + ((".*s?ssify with simple string.*" all) + (string-append all + " skip('fails on guix')\n"))) + ;; Requires kramdown-syntax-coderay. + (delete-file "test_kramdown.rb") + ;; Requires 'test-theme', usually made available from the + ;; local checkout via Bundler (not used here). + (delete-file "test_layout_reader.rb") + ;; Requires a large amount of un-packaged dependencies. + (delete-file "test_plugin_manager.rb") + ;; Requires 'classifier-reborn'. + (delete-file "test_related_posts.rb") + ;; This one causes a test failure similar to the ones for + ;; sassify above. + (delete-file "test_sass.rb") + ;; This would require running the tests via 'bundle + ;; exec', but the Gemfile contains too many (extraneous) + ;; dependencies. + (delete-file "test_site.rb") + ;; Delete the theme tests, as they require 'test-theme', + ;; usually made available from the local checkout via the + ;; Gemfile/bundler (not used here). + (for-each delete-file + (scandir + "." (cut string-prefix? "test_theme" <>))) + ;; This one also relies on 'test-theme'. + (delete-file "test_liquid_renderer.rb") + ;; This test assumes internet connectivity, negate it, as + ;; there's no Internet in the build container. + (substitute* "test_utils.rb" + (("assert Utils::Internet\\.connected\\?") + "refute Utils::Internet.connected?")) + ;; These tests fail non-deterministically (see: + ;; https://github.com/jekyll/jekyll/issues/9323). + (delete-file "test_new_command.rb") + (delete-file "test_collections.rb")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Invoke the test scripts manually, as 'rake test' + ;; doesn't show any failure details, making debugging + ;; needlessly difficult. + (for-each (lambda (f) + (invoke "ruby" "-I" "test" f)) + (find-files "test" "^test_.*\\.rb$")))))))) + (native-inputs + (list bundler + ruby-httpclient + ruby-minitest-profile + ruby-minitest-reporters + ruby-nokogiri + ruby-rspec + ruby-rspec-mocks + ruby-shoulda + ruby-simplecov)) (propagated-inputs (list ruby-addressable ruby-colorator @@ -13254,7 +13325,8 @@ (define-public jekyll ruby-rouge ruby-safe-yaml ruby-sassc - ruby-terminal-table)) + ruby-terminal-table + ruby-webrick)) (home-page "https://jekyllrb.com/") (synopsis "Static site generator") (description "Jekyll is a simple, blog aware, static site generator.")