From unknown Tue Jun 17 22:25:06 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39982] [PATCH] gnu: rust: Add 1.38 Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 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?Q?K=C4=85dzio=C5=82ka?= 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 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.59.186.212 X-Spam-Score: -0.7 (/) 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.7 (-) 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) -- 2.25.1 From unknown Tue Jun 17 22:25:06 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39982] [PATCH 2/2] gnu: rust: Add 1.39 References: <20200308131403.11680-1-kuba@kadziolka.net> In-Reply-To: <20200308131403.11680-1-kuba@kadziolka.net> Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Mar 2020 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39982@debbugs.gnu.org Received: via spool by 39982-submit@debbugs.gnu.org id=B39982.158374450229658 (code B ref 39982); Mon, 09 Mar 2020 09:02:02 +0000 Received: (at 39982) by debbugs.gnu.org; 9 Mar 2020 09:01:42 +0000 Received: from localhost ([127.0.0.1]:49757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBEIA-0007iI-56 for submit@debbugs.gnu.org; Mon, 09 Mar 2020 05:01:42 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:56802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBEI7-0007i8-PZ for 39982@debbugs.gnu.org; Mon, 09 Mar 2020 05:01:40 -0400 Received: (qmail 20006 invoked by uid 1009); 9 Mar 2020 10:01:37 +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/25745. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.009673 secs); 09 Mar 2020 09:01:37 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 9 Mar 2020 10:01:37 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Date: Mon, 9 Mar 2020 10:02:18 +0100 Message-Id: <20200309090218.31768-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-Spam-Score: 0.0 (/) 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/rust.scm (rust-1.39): New variable. (%cargo-reference-hash): Add a comment explaining the role of the variable. --- I'm just gonna send all my Rust updates to this bug number... I just realized that I forgot to add the trailing #t to the phase in my last patch, this is now fixed as can be seen in the context for this patch. gnu/packages/rust.scm | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index e0106841c8..11522b933e 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -55,6 +55,32 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-26)) +;; This is the hash for the empty file, and the reason it's relevant is not +;; the most obvious. +;; +;; The root of the problem is that Cargo keeps track of a file called +;; Cargo.lock, that contains the hash of the tarball source of each dependency. +;; +;; However, tarball sources aren't handled well by Guix because of the need to +;; patch shebangs in any helper scripts. This is why we use Cargo's vendoring +;; capabilities, where instead of the tarball, a directory is provided in its +;; place. (In the case of rustc, the source code already ships with vendored +;; dependencies, but crates built with cargo-build-system undergo vendoring +;; during the build.) +;; +;; To preserve the advantages of checksumming, vendored dependencies contain +;; a file called .cargo-checksum.json, which contains the hash of the tarball, +;; as well as the list of files in it, with the hash of each file. +;; +;; The patch-cargo-checksums phase of cargo-build-system runs after +;; any Guix-specific patches to the vendored dependencies and regenerates the +;; .cargo-checksum.json files, but it's hard to know the tarball checksum that +;; should be written to the file - and taking care of any unhandled edge case +;; would require rebuilding everything that depends on rust. This is why we lie, +;; and say that the tarball has the hash of an empty file. It's not a problem +;; because cargo-build-system removes the Cargo.lock file. We can't do that +;; for rustc because of a quirk of its build system, so we modify the lock file +;; to substitute the hash. (define %cargo-reference-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") @@ -1130,4 +1156,24 @@ move around." (("ignore-sgx") "ignore-sgx\n// ignore-tidy-linelength")) #t))))))))) +(define-public rust-1.39 + (let ((base-rust + (rust-bootstrapped-package rust-1.38 "1.39.0" + "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl"))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (replace 'patch-cargo-checksums + ;; The Cargo.lock format changed. + (lambda* _ + (use-modules (guix build cargo-utils)) + (substitute* "Cargo.lock" + (("(checksum = )\".*\"" all name) + (string-append name "\"" ,%cargo-reference-hash "\""))) + (generate-all-checksums "vendor") + #t))))))))) + (define-public rust rust-1.37) -- 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 09 05:05:36 2020 Received: (at control) by debbugs.gnu.org; 9 Mar 2020 09:05:36 +0000 Received: from localhost ([127.0.0.1]:49782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBELw-0007pX-NU for submit@debbugs.gnu.org; Mon, 09 Mar 2020 05:05:36 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:60776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBELu-0007pO-I4 for control@debbugs.gnu.org; Mon, 09 Mar 2020 05:05:35 -0400 Received: (qmail 20828 invoked by uid 1009); 9 Mar 2020 10:05:33 +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/25745. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.022918 secs); 09 Mar 2020 09:05:33 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 9 Mar 2020 10:05:33 +0100 Date: Mon, 9 Mar 2020 10:06:25 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: control@debbugs.gnu.org Subject: retitle my rust updates Message-ID: <20200309090625.6yg4oacf5w32pllu@gravity> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xppqcuwxsgg7odnm" Content-Disposition: inline X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) --xppqcuwxsgg7odnm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline retitle 39982 [PATCH _/?] Add new rust versions --xppqcuwxsgg7odnm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5mBxAACgkQ4xWnWEYT FWTA4hAArfeqEKgWs9dGKPGWErUervZoocNcq9KVs770AoCfDvnl5Rh+3UiHsEaE 8hyL06VXSvoPgIfLiRi1WMZ0Zj3u134vD6dzQChJ6r2uEt18QUsktmvdTK/0AQ2k ULF/jhIhUbNiefuRVTzsr3vlLtwZLvv2BXEXa6P2EF//5xnSFuBo70FM3N+Tp9QD cchjGFE6EWidRGcIp2oS7AyGL256zMY+KjBMHetkp1fURXaILA2L1wALIMaho55C 6Jt25F3pN6g5w1BhlEJlP6AYZMT3pp+eBjOFFs4K/ZxusNQcxUUoTl6Zsd/5R3r/ oYQAm/uQCHPuubxFzSIXJ4RjX7rx6MvlSdyXg7bfFbrVzYb8mCiejLm++MotAF2R OBYn5XyXY5qo7C53Q5QDuFpb+1csfLR5LESinW3vVL6MnwzWgGoNgvGsHGE3UvhZ T/kyGwdKRLV+xZlsCRZw6nJOIxjiqtyvlgjP/UFa2OXa+kLedpnKqG975XRXeifW EzWKX4vw0SvWicPGRYhxcRboxyFVvGHNoqF1jvWrgje+sF1E3HK45DwjJqiNIE3v N178aZSYQLXTETSZck9BGdx/nscWrVj1bSqc5WqaTfAVk+KhSzo9hhBQ/UlutKkj WfmxhKnPkmloHvzBJHkcki2OJU9W/1inJlQW4ksLu473RbBD3ow= =1GNn -----END PGP SIGNATURE----- --xppqcuwxsgg7odnm-- From unknown Tue Jun 17 22:25:06 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Subject: bug#39982: closed (Done: Add new rust versions) Message-ID: References: <20200327133109.npil5rbeqzjuvhkf@gravity> <20200308131403.11680-1-kuba@kadziolka.net> X-Gnu-PR-Message: they-closed 39982 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39982@debbugs.gnu.org Date: Fri, 27 Mar 2020 13:32:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1585315921-15488-1" This is a multi-part message in MIME format... ------------=_1585315921-15488-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39982: [PATCH _/?] Add new rust versions which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39982@debbugs.gnu.org. --=20 39982: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39982 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1585315921-15488-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39982-done) by debbugs.gnu.org; 27 Mar 2020 13:31:16 +0000 Received: from localhost ([127.0.0.1]:60627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHp4t-00040o-6w for submit@debbugs.gnu.org; Fri, 27 Mar 2020 09:31:15 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:51696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHp4r-00040d-Oj for 39982-done@debbugs.gnu.org; Fri, 27 Mar 2020 09:31:14 -0400 Received: (qmail 31306 invoked by uid 1009); 27 Mar 2020 14:31:11 +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/25763. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.019536 secs); 27 Mar 2020 13:31:11 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 27 Mar 2020 14:31:11 +0100 Date: Fri, 27 Mar 2020 14:31:09 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: 39982-done@debbugs.gnu.org Subject: Done: Add new rust versions Message-ID: <20200327133109.npil5rbeqzjuvhkf@gravity> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uxutr76xewios2kt" Content-Disposition: inline X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39982-done 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 (-) --uxutr76xewios2kt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Pushed as commit 9483782a617c66b8e066ac7f1898e41f99eb8456 --uxutr76xewios2kt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5+AB0ACgkQ4xWnWEYT FWTbWw/+Jt1iPU/jJtNZ/CTdYTK8uKXNiSWAkc/91jlQccd2FMNtA4F2QXwd3ZWK VPlxboyMtJTAY51D9gLzedfgSd5SZjuQKiGi3tEpfofFPXnzBa3Tg5i3LC8OeiQd /PdsiWOHZpxu16EkS4dRou0rhxUKoCC/1eZ6ANWNT8BoIpGNvIiXBZD4LE0fHctZ re7InTAIgbNOa2s/gXHHSHIuwlAlUxjFwNRcJ7SXDJFrQijdQxZZ9FR3rukOhvwR mSmGeVzvGB5B4jk0cCSlaP8EeKrzGKVuafrauLsjsYAbn0dZ2/c3nSiCW92w2GY2 PYcAJ5cYX6STjLBeAHxxeQc4m3+KlE55/3GdH+2WS/LXuSC1FLcn0QFnqCntSZNz /0DbBlysKqM6Fqs0jIHtGbaiwd8b422wPXxYni6f9DsENJTdPsOOTZUFxAzQt+4O do9bDvlJKLCcy/TaG9t7nuZ5iDdqyO5f35OW5rGJC+G3kaXVpaKgBFaW59/Asxcj 92aN9Hnabj2IWrjJkO/5/5KWxVBv16KqEvTgJNtV0oQ/hlVuGulGbRi9a3kSRnMu rQxKwkfR3DZO6ZuftATAqiPi8wDfoHBa7ElBa8CZTQ7R1W8d5gGPBHj2lUnF+N2a 2BDdZNkMWDjgli0GaamohcFsQ3LoViBdjCt11D4c/emJwESRSCM= =93ve -----END PGP SIGNATURE----- --uxutr76xewios2kt-- ------------=_1585315921-15488-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 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: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: guix-patches@gnu.org Subject: [PATCH] gnu: rust: Add 1.38 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 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.59.186.212 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit 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.7 (-) 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) -- 2.25.1 ------------=_1585315921-15488-1--