From 01cef16f8594956a06824751f5f2a0be8b823627 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Nov 2018 14:27:55 +0100 Subject: gnu: rust: Don't depend on 'git'. * gnu/packages/rust.scm (rust-1.19)[inputs]: Remove GIT. (rust-1.20)[arguments]: Disable Cargo tests that require git. (rust-1.26)[arguments]: Likewise. --- gnu/packages/rust.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gnu/packages/rust.scm') diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index a56faad079..8618c37761 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -41,7 +41,6 @@ #:use-module (gnu packages python) #:use-module (gnu packages ssh) #:use-module (gnu packages tls) - #:use-module (gnu packages version-control) #:use-module (gnu packages) #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) @@ -387,7 +386,6 @@ test = { path = \"../libtest\" } ("cmake" ,cmake) ("flex" ,flex) ; For the tests ("gdb" ,gdb) ; For the tests - ("git" ,git) ("procps" ,procps) ; For the tests ("python-2" ,python-2) ("rustc-bootstrap" ,mrustc) @@ -446,6 +444,13 @@ safety and thread safety guarantees.") ;; i686-linux. (substitute* "src/tools/cargo/tests/test.rs" (("fn cargo_test_env") "#[ignore]\nfn cargo_test_env")) + + ;; These tests pull in a dependency on "git", which changes + ;; too frequently take part in the Rust toolchain. + (substitute* "src/tools/cargo/tests/new.rs" + (("fn author_prefers_cargo") "#[ignore]\nfn author_prefers_cargo") + (("fn finds_author_git") "#[ignore]\nfn finds_author_git") + (("fn finds_local_author_git") "#[ignore]\nfn finds_local_author_git")) #t)) (add-after 'patch-cargo-tests 'ignore-glibc-2.27-incompatible-test ;; https://github.com/rust-lang/rust/issues/47863 @@ -678,6 +683,12 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" ;; i686-linux. (substitute* "src/tools/cargo/tests/testsuite/test.rs" (("fn cargo_test_env") "#[ignore]\nfn cargo_test_env")) + + ;; Avoid dependency on "git". + (substitute* "src/tools/cargo/tests/testsuite/new.rs" + (("fn author_prefers_cargo") "#[ignore]\nfn author_prefers_cargo") + (("fn finds_author_git") "#[ignore]\nfn finds_author_git") + (("fn finds_local_author_git") "#[ignore]\nfn finds_local_author_git")) #t)) (add-after 'patch-cargo-tests 'disable-cargo-test-for-nightly-channel (lambda* _ -- cgit v1.2.3 From f2c99fe52b73bfe81acad825214de952234f82bc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Nov 2018 13:14:22 +0100 Subject: gnu: rust: Shorten patch file name. This file name was too long to fit in a tar archive. * gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch: Rename to... * gnu/packages/patches/rust-reproducible-builds.patch: ... this. * gnu/packages/rust.scm (rust-1.27, rust): Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 2 +- ...roducible-builds-by-forcing-window.search.patch | 25 ---------------------- .../patches/rust-reproducible-builds.patch | 25 ++++++++++++++++++++++ gnu/packages/rust.scm | 4 ++-- 4 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch create mode 100644 gnu/packages/patches/rust-reproducible-builds.patch (limited to 'gnu/packages/rust.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 250c773992..32b561472e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1141,7 +1141,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ - %D%/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch \ + %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ diff --git a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch deleted file mode 100644 index ef7bf53b5d..0000000000 --- a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 -From: Tim Ryan -Date: Mon, 14 May 2018 06:22:21 -0400 -Subject: [PATCH] Support reproducible builds by forcing window.search to use - stable key ordering. (#692) -See ---- - src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -index d49772f8b..1ee66a511 100644 ---- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -+++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { - searchoptions, - index, - }; -+ -+ // By converting to serde_json::Value as an intermediary, we use a -+ // BTreeMap internally and can force a stable ordering of map keys. -+ let json_contents = serde_json::to_value(&json_contents)?; - let json_contents = serde_json::to_string(&json_contents)?; - - Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/patches/rust-reproducible-builds.patch b/gnu/packages/patches/rust-reproducible-builds.patch new file mode 100644 index 0000000000..ef7bf53b5d --- /dev/null +++ b/gnu/packages/patches/rust-reproducible-builds.patch @@ -0,0 +1,25 @@ +From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 +From: Tim Ryan +Date: Mon, 14 May 2018 06:22:21 -0400 +Subject: [PATCH] Support reproducible builds by forcing window.search to use + stable key ordering. (#692) +See +--- + src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +index d49772f8b..1ee66a511 100644 +--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { + searchoptions, + index, + }; ++ ++ // By converting to serde_json::Value as an intermediary, we use a ++ // BTreeMap internally and can force a stable ordering of map keys. ++ let json_contents = serde_json::to_value(&json_contents)?; + let json_contents = serde_json::to_string(&json_contents)?; + + Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 8618c37761..1d9e629a22 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -713,7 +713,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-lines.patch" - "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) + "rust-reproducible-builds.patch")))) (package (inherit base-rust) (arguments @@ -742,7 +742,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-lines.patch" - "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) + "rust-reproducible-builds.patch")))) (package (inherit base-rust) (inputs -- cgit v1.2.3 From 8cddb0d6363d13f74de5409ef29b7913228f49b9 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sun, 2 Dec 2018 14:13:48 +0100 Subject: gnu: rust: Remove flaky test. * gnu/packages/rust.scm (rust-1.22)[arguments]<#:phases>[remove-flaky-test]: New phase. --- gnu/packages/rust.scm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'gnu/packages/rust.scm') diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 1d9e629a22..ef40431733 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -576,8 +576,20 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" #t))))))))) (define-public rust-1.22 - (rust-bootstrapped-package rust-1.21 "1.22.1" - "1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb")) + (let ((base-rust (rust-bootstrapped-package rust-1.21 "1.22.1" + "1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb"))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'remove-flaky-test + (lambda _ + ;; See . + (when (file-exists? "src/test/run-make/issue-26092") + (delete-file-recursively "src/test/run-make/issue-26092")) + #t))))))))) (define-public rust-1.23 (let ((base-rust (rust-bootstrapped-package rust-1.22 "1.23.0" -- cgit v1.2.3