* [bug#35538] [PATCH] gnu: rust: Improve reproducibility and lower source sizes
@ 2019-05-03 7:05 Ivan Petkov
2019-05-09 22:17 ` Ivan Petkov
0 siblings, 1 reply; 3+ messages in thread
From: Ivan Petkov @ 2019-05-03 7:05 UTC (permalink / raw)
To: 35538; +Cc: Chris Marusich
[-- Attachment #1: Type: text/plain, Size: 3217 bytes --]
Hi Guix!
I've prepared several patches to improve the rust builds. These changes will
require a full bootstrap, as well as rebuilding icecat, so it may be worthwhile
to merge this into staging first.
The changes include:
* Update the `generate-checksums` function in cargo-utils to not require a
directory parameter (sha256sum can't support directories. We were previously
passing in "/dev/null" as an argument, so now that's assumed internally)
* Delete the install logs and manifests generated as part of the build since
the ordering of their contents can be nondeterministic
* Updated all source definitions to delete extra files/tools that are already
present in guix (e.g. deleting any llvm/clang/jemalloc sources). See below
for a reduction in the source derivations
* Updated rust to 1.34.1
Previous source derivation sizes:
/gnu/store/qm2cbc1kxg3i8vibjb2rfxypbfnviqhh-rustc-1.20.0-src.tar.xz 17.9
/gnu/store/c714ii1ansv460anmb9xvicsmavqbkj9-rustc-1.21.0-src.tar.xz 19.4
/gnu/store/k6lc7d7gha3rimcqkiigyrkybqmpk98m-rustc-1.22.1-src.tar.xz 20.8
/gnu/store/zypwd03gw2hzb5z41ndv6fjv6dij7inq-rustc-1.23.0-src.tar.xz 23.5
/gnu/store/cj4yhkrxby93dx1fmiqidsb126pm6xq4-rustc-1.24.1-src.tar.xz 27.7
/gnu/store/fgmrf2k7lrv1y3s9xarv4x5axx0a435k-rustc-1.25.0-src.tar.xz 49.6
/gnu/store/yx98f8mr0wfp6i0la9i09d8n3wiwmg33-rustc-1.26.2-src.tar.xz 48.1
/gnu/store/mra5gy26shx2rgwcyj2cdm1iicss1q51-rustc-1.27.2-src.tar.xz 49.0
/gnu/store/mnznljlfz2py11mzk7l221zc06dsgzjf-rustc-1.28.0-src.tar.xz 49.6
/gnu/store/0r1lx29kf92xvw9f5f5ppsfg4nx9msq2-rustc-1.29.2-src.tar.xz 54.2
/gnu/store/d4g67ykzrp1jy95fgyakfqfrcxlci27j-rustc-1.30.1-src.tar.xz 84.4
/gnu/store/3pcmbdnhr0ifi9acr9zkhv6qakd7zanv-rustc-1.31.1-src.tar.xz 85.3
/gnu/store/6sx4y10n3sv1j0w2c7gjc7xrdp4znsa1-rustc-1.32.0-src.tar.xz 89.6
/gnu/store/ngs326mhbay1c3kgqkwd9ii9zmd36rhm-rustc-1.33.0-src.tar.xz 90.0
/gnu/store/42minb2xm8hhn1rrqkk52fyiids5r8nz-rustc-1.34.0-src.tar.xz 35.3
New source derivation sizes:
/gnu/store/czbyvvxwzzd5v5dqbl66p6p25abbjpjb-rustc-1.20.0-src.tar.xz 17.6
/gnu/store/kqrm7sp394x1jnwmv4nal72zz1k03c4d-rustc-1.21.0-src.tar.xz 19.1
/gnu/store/i8fmqj6vwp7bjq7ngmmrwpwc996cf2qn-rustc-1.22.1-src.tar.xz 20.5
/gnu/store/4d9pq03yndgcm86r0rg0cm10p1w041hq-rustc-1.23.0-src.tar.xz 23.2
/gnu/store/k4xdymq32j0gl3r891b1frri4kaqm5wk-rustc-1.24.1-src.tar.xz 27.3
/gnu/store/5s0fbcb5k1y5g945a0pmf59yrqcvw5zg-rustc-1.25.0-src.tar.xz 29.2
/gnu/store/ljcsx3h88xi9bflc9r8krxmqrsw0fn22-rustc-1.26.2-src.tar.xz 27.7
/gnu/store/p9r9qvzpvn977m5zlsbdpaa4kxh6jpih-rustc-1.27.2-src.tar.xz 28.7
/gnu/store/94j66fjaqxx2mj2gcrwx85a1pd7ysm0c-rustc-1.28.0-src.tar.xz 29.2
/gnu/store/nryvkxj9jzv2khiip3da178w5xyamavi-rustc-1.29.2-src.tar.xz 33.8
/gnu/store/6x0cf6m1bw0in8fn5c33n3pb3y7gyk0b-rustc-1.30.1-src.tar.xz 33.8
/gnu/store/k8i6bf0c5dzm34dnfx7qq7wq5hgccfnz-rustc-1.31.1-src.tar.xz 34.7
/gnu/store/0bqbl8jpirdi4g84hylcxj6i500mr93b-rustc-1.32.0-src.tar.xz 35.1
/gnu/store/3hfni09gy7d7n0gnc12s7zfa0lr7c0ff-rustc-1.33.0-src.tar.xz 35.5
/gnu/store/zamc7lhcsjn0hkfs93796xgpbmkccfam-rustc-1.34.1-src.tar.xz 35.3
Thanks,
—Ivan
[-- Attachment #2: 0001-build-cargo-utils-remove-src-name-parameter.patch --]
[-- Type: application/octet-stream, Size: 5484 bytes --]
From 713f7467298d7e00f5a02a764ff9613985e2304c Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Sat, 27 Apr 2019 21:39:48 -0700
Subject: [PATCH 1/4] build/cargo-utils: remove src-name parameter
* gnu/packages/gnuzilla.scm: (icecat)['patch-cargo-checksums]: Remove
null-file variable.
* gnu/packages/rust.scm: (%cargo-reference-project-file): Remove it.
* gnu/packages/rust.scm: (rust-1.19): Remove reference to
%cargo-reference-project-file
* guix/build/cargo-utils.scm: (generate-checksums): Remove src-name
parameter.
---
gnu/packages/gnuzilla.scm | 5 ++---
gnu/packages/rust.scm | 5 ++---
guix/build/cargo-build-system.scm | 2 +-
guix/build/cargo-utils.scm | 11 ++++++-----
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index afebc82cf1..ae46c3c820 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -832,8 +832,7 @@ from forcing GEXP-PROMISE."
(add-after 'patch-source-shebangs 'patch-cargo-checksums
(lambda _
(use-modules (guix build cargo-utils))
- (let ((null-file "/dev/null")
- (null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
+ (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
(substitute* '("Cargo.lock" "servo/Cargo.lock")
(("(\"checksum .* = )\".*\"" all name)
(string-append name "\"" null-hash "\"")))
@@ -844,7 +843,7 @@ from forcing GEXP-PROMISE."
(display (string-append
"patch-cargo-checksums: generate-checksums for "
dir "\n"))
- (generate-checksums dir null-file)))
+ (generate-checksums dir)))
(find-files "third_party/rust" ".cargo-checksum.json")))
#t))
(add-before 'configure 'augment-CPLUS_INCLUDE_PATH
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 61fc0d46ac..27388d307e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -55,7 +55,6 @@
#:use-module (ice-9 match)
#:use-module (srfi srfi-26))
-(define %cargo-reference-project-file "/dev/null")
(define %cargo-reference-hash
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
@@ -320,7 +319,7 @@ test = { path = \"../libtest\" }
(display (string-append
"patch-cargo-checksums: generate-checksums for "
dir "\n"))
- (generate-checksums dir ,%cargo-reference-project-file)))
+ (generate-checksums dir)))
(find-files "src/vendor" ".cargo-checksum.json"))
#t))
;; This phase is overridden by newer versions.
@@ -973,7 +972,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(display (string-append
"patch-cargo-checksums: generate-checksums for "
dir "\n"))
- (generate-checksums dir ,%cargo-reference-project-file)))
+ (generate-checksums dir)))
(find-files "vendor" ".cargo-checksum.json"))
#t))
(add-after 'enable-codegen-tests 'override-jemalloc
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index b68a1f90d2..9f44bd6ee9 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -131,7 +131,7 @@ directory = '" port)
;; to store paths.
(copy-recursively "." rsrc)
(touch (string-append rsrc "/.cargo-ok"))
- (generate-checksums rsrc "/dev/null")
+ (generate-checksums rsrc)
(install-file "Cargo.toml" rsrc)
#t))
diff --git a/guix/build/cargo-utils.scm b/guix/build/cargo-utils.scm
index 6af572e611..79e5440378 100644
--- a/guix/build/cargo-utils.scm
+++ b/guix/build/cargo-utils.scm
@@ -41,12 +41,10 @@
(close-pipe port)
result)))
-(define (generate-checksums dir-name src-name)
+(define (generate-checksums dir-name)
"Given DIR-NAME, a store directory, checksum all the files in it one
by one and put the result into the file \".cargo-checksum.json\" in
-the same directory. Also includes the checksum of an extra file
-SRC-NAME as if it was part of the directory DIR-NAME with name
-\"package\"."
+the same directory."
(let* ((file-names (find-files dir-name "."))
(dir-prefix-name (string-append dir-name "/"))
(dir-prefix-name-len (string-length dir-prefix-name))
@@ -62,6 +60,9 @@ SRC-NAME as if it was part of the directory DIR-NAME with name
(write file-relative-name port)
(display ":" port)
(write (file-sha256 file-name) port))) file-names))
+ ;; NB: cargo requires the "package" field in order to check if the Cargo.lock
+ ;; file needs to be regenerated when the value changes. However, it doesn't
+ ;; appear to care what the value is to begin with...
(display "},\"package\":" port)
- (write (file-sha256 src-name) port)
+ (write (file-sha256 "/dev/null") port)
(display "}" port)))))
--
2.21.0
[-- Attachment #3: 0002-gnu-rust-delete-install-logs-and-manifests.patch --]
[-- Type: application/octet-stream, Size: 1909 bytes --]
From 5324cb911c631724e9a77f4d2c896b24e0737243 Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Thu, 2 May 2019 03:38:13 -0700
Subject: [PATCH 2/4] gnu: rust: delete install logs and manifests
* gnu/packages/rust.scm: (rust-1.20)[arguments]: Add delete-install-logs
phase.
---
gnu/packages/rust.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 27388d307e..becb804f18 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -597,6 +597,24 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(("prefix = \"[^\"]*\"")
(string-append "prefix = \"" (assoc-ref outputs "cargo") "\"")))
(invoke "./x.py" "install" "cargo")))
+ (add-after 'install 'delete-install-logs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (define (delete-manifest-file out-path file)
+ (delete-file (string-append out-path "/lib/rustlib/" file)))
+
+ (let ((out (assoc-ref outputs "out"))
+ (cargo-out (assoc-ref outputs "cargo")))
+ (for-each
+ (lambda (file) (delete-manifest-file out file))
+ '("install.log"
+ "manifest-rust-docs"
+ "manifest-rust-std-x86_64-unknown-linux-gnu"
+ "manifest-rustc"))
+ (for-each
+ (lambda (file) (delete-manifest-file cargo-out file))
+ '("install.log"
+ "manifest-cargo"))
+ #t)))
(add-after 'install 'wrap-rustc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
--
2.21.0
[-- Attachment #4: 0003-gnu-rust-make-source-derivations-smaller.patch --]
[-- Type: application/octet-stream, Size: 18311 bytes --]
From a26042b6b69d5e5cf3b55859a8fbf3add3ebc7c9 Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Thu, 2 May 2019 04:11:06 -0700
Subject: [PATCH 3/4] gnu: rust: make source derivations smaller
* gnu/packages/rust.scm: (rust-source-pre-1.32): Remove it.
(rust-bootstrapped-package-pre-1.32): Remove it.
(rust-bootstrapped-package): Remove optional keys, and return an origin.
(rust-uri): New variable.
(mrustc): Change native-input "rust" to use source of rust-1.19.
(rust-1.19)[source]: Define package source.
(rust-1.20): Use rust-bootstrapped-package
(rust-1.21): Likewise.
(rust-1.22): Likewise.
(rust-1.23): Likewise.
(rust-1.24): Likewise.
(rust-1.25): Likewise.
(rust-1.26): Likewise.
(rust-1.27): Likewise.
(rust-1.28): Likewise.
(rust-1.29): Likewise.
(rust-1.30): Likewise.
(rust-1.31): Likewise.
(rust-1.32): Likewise.
(rust-1.33): Likewise.
(rust-1.34): Likewise.
---
gnu/packages/rust.scm | 230 ++++++++++++++++++++++--------------------
1 file changed, 121 insertions(+), 109 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index becb804f18..5f0ddd8797 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -68,63 +68,20 @@
("mips64el-linux" "mips64el-unknown-linux-gnuabi64")
(_ (nix-system->gnu-triplet system))))
-\f
-(define* (rust-source-pre-1.32 version hash
- #:key
- (patches '())
- (patch-flags '("-p1")))
- (origin
- (method url-fetch)
- (uri (string-append "https://static.rust-lang.org/dist/"
- "rustc-" version "-src.tar.gz"))
- (sha256 (base32 hash))
- (modules '((guix build utils)))
- (snippet '(begin (delete-file-recursively "src/llvm") #t))
- (patches (map search-patch patches))
- (patch-flags patch-flags)))
+(define* (rust-uri version #:key (dist "static"))
+ (string-append "https://" dist ".rust-lang.org/dist/"
+ "rustc-" version "-src.tar.gz"))
-(define* (rust-bootstrapped-package-pre-1.32 base-rust version checksum
- #:key
- (patches '())
- (patch-flags '("-p1")))
- "Bootstrap rust VERSION with source checksum CHECKSUM patched with PATCHES using BASE-RUST.
-Specific to rust versions before 1.32."
+(define* (rust-bootstrapped-package base-rust version checksum)
+ "Bootstrap rust VERSION with source checksum CHECKSUM using BASE-RUST."
(package
(inherit base-rust)
(version version)
(source
- (rust-source-pre-1.32 version checksum #:patches patches #:patch-flags patch-flags))
- (native-inputs
- (alist-replace "cargo-bootstrap" (list base-rust "cargo")
- (alist-replace "rustc-bootstrap" (list base-rust)
- (package-native-inputs base-rust))))))
-
-(define* (rust-source version hash
- #:key
- (patches '())
- (patch-flags '("-p1")))
- (origin
- (method url-fetch)
- (uri (string-append "https://static.rust-lang.org/dist/"
- "rustc-" version "-src.tar.gz"))
- (sha256 (base32 hash))
- (modules '((guix build utils)))
- (snippet '(begin (delete-file-recursively "src/llvm")
- (delete-file-recursively "vendor/jemalloc-sys/jemalloc")
- #t))
- (patches (map search-patch patches))
- (patch-flags patch-flags)))
-
-(define* (rust-bootstrapped-package base-rust version checksum
- #:key
- (patches '())
- (patch-flags '("-p1")))
- "Bootstrap rust VERSION with source checksum CHECKSUM patched with PATCHES using BASE-RUST."
- (package
- (inherit base-rust)
- (version version)
- (source
- (rust-source version checksum #:patches patches #:patch-flags patch-flags))
+ (origin
+ (inherit (package-source base-rust))
+ (uri (rust-uri version))
+ (sha256 (base32 checksum))))
(native-inputs
(alist-replace "cargo-bootstrap" (list base-rust "cargo")
(alist-replace "rustc-bootstrap" (list base-rust)
@@ -154,8 +111,7 @@ Specific to rust versions before 1.32."
`(("bison" ,bison)
("flex" ,flex)
;; Required for the libstd sources.
- ("rustc"
- ,(rust-source-pre-1.32 "1.19.0" "0l8c14qsf42rmkqy92ahij4vf356dbyspxcips1aswpvad81y8qm"))))
+ ("rustc" ,(package-source rust-1.19))))
(arguments
`(#:test-target "local_tests"
#:make-flags (list (string-append "LLVM_CONFIG="
@@ -228,8 +184,14 @@ safety and thread safety guarantees.")
(package
(name "rust")
(version "1.19.0")
- (source (rust-source-pre-1.32 version "0l8c14qsf42rmkqy92ahij4vf356dbyspxcips1aswpvad81y8qm"
- #:patches '("rust-1.19-mrustc.patch")))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rust-uri "1.19.0"))
+ (sha256 (base32 "0l8c14qsf42rmkqy92ahij4vf356dbyspxcips1aswpvad81y8qm"))
+ (modules '((guix build utils)))
+ (snippet '(begin (delete-file-recursively "src/llvm") #t))
+ (patches (map search-patch '("rust-1.19-mrustc.patch")))))
(outputs '("out" "cargo"))
(properties '((timeout . 72000) ;20 hours
(max-silent-time . 18000))) ;5 hours (for armel)
@@ -464,10 +426,18 @@ safety and thread safety guarantees.")
(define-public rust-1.20
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.19 "1.20.0"
+ (rust-bootstrapped-package rust-1.19 "1.20.0"
"0542y4rnzlsrricai130mqyxl8r6rd991frb4qsnwb27yigqg91a")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (snippet '(begin
+ (delete-file-recursively "src/jemalloc")
+ (delete-file-recursively "src/llvm")
+ #t))
+ (patches '())))
(outputs '("out" "doc" "cargo"))
;; Since rust-1.19 is local, it's quite probable that Hydra
;; will build rust-1.19 only as a dependency of rust-1.20.
@@ -627,7 +597,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
#t))))))))))
(define-public rust-1.21
- (let ((base-rust (rust-bootstrapped-package-pre-1.32 rust-1.20 "1.21.0"
+ (let ((base-rust (rust-bootstrapped-package rust-1.20 "1.21.0"
"1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp")))
(package
(inherit base-rust)
@@ -643,7 +613,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
#t)))))))))
(define-public rust-1.22
- (let ((base-rust (rust-bootstrapped-package-pre-1.32 rust-1.21 "1.22.1"
+ (let ((base-rust (rust-bootstrapped-package rust-1.21 "1.22.1"
"1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb")))
(package
(inherit base-rust)
@@ -659,7 +629,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
#t)))))))))
(define-public rust-1.23
- (let ((base-rust (rust-bootstrapped-package-pre-1.32 rust-1.22 "1.23.0"
+ (let ((base-rust (rust-bootstrapped-package rust-1.22 "1.23.0"
"14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l")))
(package
(inherit base-rust)
@@ -678,7 +648,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.24
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.23 "1.24.1"
+ (rust-bootstrapped-package rust-1.23 "1.24.1"
"1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y")))
(package
(inherit base-rust)
@@ -700,11 +670,20 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
;;; Keep using llvm 3.9.1 until builds become determenistic
(define-public rust-1.25
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.24 "1.25.0"
- "0baxjr99311lvwdq0s38bipbnj72pn6fgbk6lcq7j555xq53mxpf"
- #:patches '("rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+ (rust-bootstrapped-package rust-1.24 "1.25.0"
+ "0baxjr99311lvwdq0s38bipbnj72pn6fgbk6lcq7j555xq53mxpf")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (snippet '(begin
+ (delete-file-recursively "src/jemalloc")
+ (delete-file-recursively "src/llvm")
+ (delete-file-recursively "src/llvm-emscripten")
+ #t))
+ (patches (map search-patch
+ '("rust-1.25-accept-more-detailed-gdb-lines.patch")))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
@@ -731,12 +710,16 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.26
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.25 "1.26.2"
- "0047ais0fvmqvngqkdsxgrzhb0kljg8wy85b01kbbjc88hqcz7pv"
- #:patches '("rust-coresimd-doctest.patch"
- "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+ (rust-bootstrapped-package rust-1.25 "1.26.2"
+ "0047ais0fvmqvngqkdsxgrzhb0kljg8wy85b01kbbjc88hqcz7pv")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches (map search-patch
+ '("rust-coresimd-doctest.patch"
+ "rust-1.25-accept-more-detailed-gdb-lines.patch")))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
@@ -796,15 +779,17 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.27
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.26 "1.27.2"
- "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs"
- #:patches
- '("rust-coresimd-doctest.patch"
- "rust-bootstrap-stage0-test.patch"
- "rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-reproducible-builds.patch"))))
+ (rust-bootstrapped-package rust-1.26 "1.27.2"
+ "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches (map search-patch '("rust-coresimd-doctest.patch"
+ "rust-bootstrap-stage0-test.patch"
+ "rust-1.25-accept-more-detailed-gdb-lines.patch"
+ "rust-reproducible-builds.patch")))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
@@ -825,15 +810,17 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.28
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.27 "1.28.0"
- "11k4rn77bca2rikykkk9fmprrgjswd4x4kaq7fia08vgkir82nhx"
- #:patches
- '("rust-coresimd-doctest.patch"
- "rust-bootstrap-stage0-test.patch"
- "rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-reproducible-builds.patch"))))
+ (rust-bootstrapped-package rust-1.27 "1.28.0"
+ "11k4rn77bca2rikykkk9fmprrgjswd4x4kaq7fia08vgkir82nhx")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches (map search-patch '("rust-coresimd-doctest.patch"
+ "rust-bootstrap-stage0-test.patch"
+ "rust-1.25-accept-more-detailed-gdb-lines.patch"
+ "rust-reproducible-builds.patch")))))
(inputs
;; Use LLVM 6.0
(alist-replace "llvm" (list llvm-6)
@@ -859,24 +846,35 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.29
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.28 "1.29.2"
- "1jb787080z754caa2w3w1amsygs4qlzj9rs1vy64firfmabfg22h"
- #:patches
- '("rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-reproducible-builds.patch"))))
+ (rust-bootstrapped-package rust-1.28 "1.29.2"
+ "1jb787080z754caa2w3w1amsygs4qlzj9rs1vy64firfmabfg22h")))
(package
- (inherit base-rust))))
+ (inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches (map search-patch '("rust-1.25-accept-more-detailed-gdb-lines.patch"
+ "rust-reproducible-builds.patch"))))))))
(define-public rust-1.30
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.29 "1.30.1"
- "0aavdc1lqv0cjzbqwl5n59yd0bqdlhn0zas61ljf38yrvc18k8rn"
- #:patches
- '("rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-1.30-gdb-llvm.patch"
- "rust-reproducible-builds.patch"))))
+ (rust-bootstrapped-package rust-1.29 "1.30.1"
+ "0aavdc1lqv0cjzbqwl5n59yd0bqdlhn0zas61ljf38yrvc18k8rn")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (snippet '(begin
+ (delete-file-recursively "src/jemalloc")
+ (delete-file-recursively "src/llvm")
+ (delete-file-recursively "src/llvm-emscripten")
+ (delete-file-recursively "src/tools/clang")
+ (delete-file-recursively "src/tools/lldb")
+ #t))
+ (patches (map search-patch '("rust-1.25-accept-more-detailed-gdb-lines.patch"
+ "rust-1.30-gdb-llvm.patch"
+ "rust-reproducible-builds.patch")))))
(inputs
;; Use LLVM 7.0
(alist-replace "llvm" (list llvm)
@@ -916,14 +914,16 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.31
(let ((base-rust
- (rust-bootstrapped-package-pre-1.32 rust-1.30 "1.31.1"
- "0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli"
- #:patches
- '("rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-1.30-gdb-llvm.patch"
- "rust-reproducible-builds.patch"))))
+ (rust-bootstrapped-package rust-1.30 "1.31.1"
+ "0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches (map search-patch '("rust-1.25-accept-more-detailed-gdb-lines.patch"
+ "rust-1.30-gdb-llvm.patch"
+ "rust-reproducible-builds.patch")))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
@@ -960,13 +960,22 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.32
(let ((base-rust
(rust-bootstrapped-package rust-1.31 "1.32.0"
- "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac"
- #:patches '("rust-reproducible-builds.patch")
- ;; the vendor directory has moved to the root of
- ;; the tarball, so we have to strip an extra prefix
- #:patch-flags '("-p2"))))
+ "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (snippet '(begin (delete-file-recursively "src/llvm")
+ (delete-file-recursively "src/llvm-emscripten")
+ (delete-file-recursively "src/tools/clang")
+ (delete-file-recursively "src/tools/lldb")
+ (delete-file-recursively "vendor/jemalloc-sys/jemalloc")
+ #t))
+ (patches (map search-patch '("rust-reproducible-builds.patch")))
+ ;; the vendor directory has moved to the root of
+ ;; the tarball, so we have to strip an extra prefix
+ (patch-flags '("-p2"))))
(inputs
;; Downgrade to LLVM 6, all LTO tests appear to fail with LLVM 7.0.1
(alist-replace "llvm" (list llvm-6)
@@ -1013,10 +1022,14 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust-1.33
(let ((base-rust
(rust-bootstrapped-package rust-1.32 "1.33.0"
- "152x91mg7bz4ygligwjb05fgm1blwy2i70s2j03zc9jiwvbsh0as"
- #:patches '())))
+ "152x91mg7bz4ygligwjb05fgm1blwy2i70s2j03zc9jiwvbsh0as")))
(package
(inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches '())
+ (patch-flags '("-p1"))))
(inputs
;; Upgrade to jemalloc@5.1.0
(alist-replace "jemalloc" (list jemalloc)
@@ -1038,8 +1051,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust
(let ((base-rust
(rust-bootstrapped-package rust-1.33 "1.34.0"
- "0n8z1wngkxab1rvixqg6w8b727hzpnm9wp9h8iy3mpbrzp7mmj3s"
- #:patches '())))
+ "0n8z1wngkxab1rvixqg6w8b727hzpnm9wp9h8iy3mpbrzp7mmj3s")))
(package
(inherit base-rust)
(source
--
2.21.0
[-- Attachment #5: 0004-gnu-rust-Update-to-1.34.1.patch --]
[-- Type: application/octet-stream, Size: 952 bytes --]
From 9e84f36d9b8e585c1036ea397e42861b9a08a218 Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Thu, 2 May 2019 04:21:26 -0700
Subject: [PATCH 4/4] gnu: rust: Update to 1.34.1
* gnu/packages/rust.scm (rust): Update to 1.34.1
---
gnu/packages/rust.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 5f0ddd8797..3f5ec590a9 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1050,8 +1050,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(define-public rust
(let ((base-rust
- (rust-bootstrapped-package rust-1.33 "1.34.0"
- "0n8z1wngkxab1rvixqg6w8b727hzpnm9wp9h8iy3mpbrzp7mmj3s")))
+ (rust-bootstrapped-package rust-1.33 "1.34.1"
+ "19s09k7y5j6g3y4d2rk6kg9pvq6ml94c49w6b72dmq8p9lk8bixh")))
(package
(inherit base-rust)
(source
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#35538] [PATCH] gnu: rust: Improve reproducibility and lower source sizes
2019-05-03 7:05 [bug#35538] [PATCH] gnu: rust: Improve reproducibility and lower source sizes Ivan Petkov
@ 2019-05-09 22:17 ` Ivan Petkov
2019-05-10 0:16 ` bug#35538: " Danny Milosavljevic
0 siblings, 1 reply; 3+ messages in thread
From: Ivan Petkov @ 2019-05-09 22:17 UTC (permalink / raw)
To: 35538; +Cc: Chris Marusich
Friendly ping if anyone can take a look!
Thanks,
—Ivan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#35538: [PATCH] gnu: rust: Improve reproducibility and lower source sizes
2019-05-09 22:17 ` Ivan Petkov
@ 2019-05-10 0:16 ` Danny Milosavljevic
0 siblings, 0 replies; 3+ messages in thread
From: Danny Milosavljevic @ 2019-05-10 0:16 UTC (permalink / raw)
To: Ivan Petkov; +Cc: 35538-done, Chris Marusich
[-- Attachment #1: Type: text/plain, Size: 167 bytes --]
Thanks!
Looks good to me, so I've adjusted a few commit messages and then pushed
to guix master.
(Icecat had no current substitute on the build machines anyway)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-10 0:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-03 7:05 [bug#35538] [PATCH] gnu: rust: Improve reproducibility and lower source sizes Ivan Petkov
2019-05-09 22:17 ` Ivan Petkov
2019-05-10 0:16 ` bug#35538: " Danny Milosavljevic
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).