From patchwork Sun Mar 8 13:14:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Maja_K=C4=85dzio=C5=82ka?= X-Patchwork-Id: 20575 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 283AE27BBEA; Sun, 8 Mar 2020 13:14:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 96EFB27BBE4 for ; Sun, 8 Mar 2020 13:14:10 +0000 (GMT) Received: from localhost ([::1]:57802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAvkw-0000js-5m for patchwork@mira.cbaines.net; Sun, 08 Mar 2020 09:14:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51516) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAvkq-0000jl-44 for guix-patches@gnu.org; Sun, 08 Mar 2020 09:14:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAvko-0002XG-Qo for guix-patches@gnu.org; Sun, 08 Mar 2020 09:14:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAvko-0002X3-O9 for guix-patches@gnu.org; Sun, 08 Mar 2020 09:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAvko-0000KO-Is for guix-patches@gnu.org; Sun, 08 Mar 2020 09:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#39982] [PATCH] gnu: rust: Add 1.38 Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Mar 2020 13:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39982@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15836732011199 (code B ref -1); Sun, 08 Mar 2020 13:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Mar 2020 13:13:21 +0000 Received: from localhost ([127.0.0.1]:48003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAvk9-0000JH-Do for submit@debbugs.gnu.org; Sun, 08 Mar 2020 09:13:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:33585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAvk8-0000JA-2N for submit@debbugs.gnu.org; Sun, 08 Mar 2020 09:13:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51457) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAvk6-0000iE-QA for guix-patches@gnu.org; Sun, 08 Mar 2020 09:13:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAvk5-00022z-GG for guix-patches@gnu.org; Sun, 08 Mar 2020 09:13:18 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:41352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jAvk5-00021c-6e for guix-patches@gnu.org; Sun, 08 Mar 2020 09:13:17 -0400 Received: (qmail 19835 invoked by uid 1009); 8 Mar 2020 14:13:14 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25744. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.009607 secs); 08 Mar 2020 13:13:14 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 8 Mar 2020 14:13:14 +0100 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Date: Sun, 8 Mar 2020 14:14:03 +0100 Message-Id: <20200308131403.11680-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Qmailux-2.08st: added fake Content-Type header X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches All packages are still built with rustc 1.37, but users will see rustc 1.38 in their profiles, and packages that require newer compiler versions will be possible to add. * gnu/packages/rust.scm (rust-1.31): Factor out the patch-command-exec-tests phase to a separate procedure. (patch-command-exec-tests-phase): New procedure. (rust): Rename to rust-1.37, make rust an alias. (rust-1.38): New variable. --- gnu/packages/rust.scm | 74 ++++++++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 22 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index d0a64b134f..3efd76b156 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -909,9 +909,30 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (replace 'disable-amd64-avx-test (lambda _ (substitute* "src/test/ui/run-pass/issues/issue-44056.rs" - (("only-x86_64") "ignore-test")) + (("only-x86_64") "ignore-test")) #t))))))))) +(define (patch-command-exec-tests-phase test-path) + "The command-exec.rs test moves around between releases. We need to apply +a Guix-specific patch to it for each release. This function generates the phase +that applies said patch, parametrized by the test-path. This is done this way +because the phase is more complex than the equivalents for other tests that +move around." + `(lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils"))) + (substitute* ,test-path + ;; This test suite includes some tests that the stdlib's + ;; `Command` execution properly handles situations where + ;; the environment or PATH variable are empty, but this + ;; fails since we don't have `echo` available in the usual + ;; Linux directories. + ;; NB: the leading space is so we don't fail a tidy check + ;; for trailing whitespace, and the newlines are to ensure + ;; we don't exceed the 100 chars tidy check as well + ((" Command::new\\(\"echo\"\\)") + (string-append "\nCommand::new(\"" coreutils "/bin/echo\")\n"))) + #t))) + (define-public rust-1.31 (let ((base-rust (rust-bootstrapped-package rust-1.30 "1.31.1" @@ -923,26 +944,14 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" ((#:phases phases) `(modify-phases ,phases (add-after 'patch-tests 'patch-command-exec-tests - (lambda* (#:key inputs #:allow-other-keys) - (let ((coreutils (assoc-ref inputs "coreutils"))) - (substitute* "src/test/run-pass/command-exec.rs" - ;; This test suite includes some tests that the stdlib's - ;; `Command` execution properly handles situations where - ;; the environment or PATH variable are empty, but this - ;; fails since we don't have `echo` available in the usual - ;; Linux directories. - ;; NB: the leading space is so we don't fail a tidy check - ;; for trailing whitespace, and the newlines are to ensure - ;; we don't exceed the 100 chars tidy check as well - ((" Command::new\\(\"echo\"\\)") - (string-append "\nCommand::new(\"" coreutils "/bin/echo\")\n"))) - #t))) - ;; The test has been moved elsewhere. - (replace 'disable-amd64-avx-test - (lambda _ - (substitute* "src/test/ui/issues/issue-44056.rs" - (("only-x86_64") "ignore-test")) - #t)) + ,(patch-command-exec-tests-phase + "src/test/run-pass/command-exec.rs")) + ;; The test has been moved elsewhere. + (replace 'disable-amd64-avx-test + (lambda _ + (substitute* "src/test/ui/issues/issue-44056.rs" + (("only-x86_64") "ignore-test")) + #t)) (add-after 'patch-tests 'patch-process-docs-rev-cmd (lambda* _ ;; Disable some doc tests which depend on the "rev" command @@ -1084,7 +1093,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" `(modify-phases ,phases (delete 'patch-process-docs-rev-cmd)))))))) -(define-public rust +(define-public rust-1.37 (let ((base-rust (rust-bootstrapped-package rust-1.36 "1.37.0" "1hrqprybhkhs6d9b5pjskfnc5z9v2l2gync7nb39qjb5s0h703hj"))) @@ -1100,3 +1109,24 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (mkdir-p cargo-home) (setenv "CARGO_HOME" cargo-home) #t)))))))))) + +(define-public rust-1.38 + (let ((base-rust + (rust-bootstrapped-package rust-1.37 "1.38.0" + "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4"))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (replace 'patch-command-exec-tests + ,(patch-command-exec-tests-phase + "src/test/ui/command-exec.rs")) + (add-after 'patch-tests 'patch-command-uid-gid-test + (lambda _ + (substitute* "src/test/ui/command-uid-gid.rs" + (("/bin/sh") (which "sh")) + (("ignore-sgx") "ignore-sgx\n// ignore-tidy-linelength"))))))))))) + +(define-public rust rust-1.37)