GNU bug report logs - #33066
[PATCH 0/2] Workaround rust reproducibility issues

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Nikolai Merinov <nikolai.merinov@HIDDEN>; Keywords: patch; dated Tue, 16 Oct 2018 18:12:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 19 Oct 2018 20:59:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 19 16:59:03 2018
Received: from localhost ([127.0.0.1]:59828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDbrD-0003i1-Oy
	for submit <at> debbugs.gnu.org; Fri, 19 Oct 2018 16:59:03 -0400
Received: from mail-lf1-f44.google.com ([209.85.167.44]:40983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gDbrB-0003hm-9B
 for 33066 <at> debbugs.gnu.org; Fri, 19 Oct 2018 16:58:54 -0400
Received: by mail-lf1-f44.google.com with SMTP id q39-v6so26207706lfi.8
 for <33066 <at> debbugs.gnu.org>; Fri, 19 Oct 2018 13:58:53 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=9ERK8DVeFyW2AtkjHq0Y5T88WfsZ5uYUuIP36VMXvww=;
 b=d58tJ1MTNRwEiXJnXqouqK6xnl2kWBT+8PNSDuRhfxY6hG3bYQ9863mv/iE2FA9Xql
 Q+8Eq4qeDEP+Iw66dkTp5hX8FPhdVMdrtvxky7DR5i32t3AbyWRWHWnT4t/V1w0Fk8Wt
 Hyb71/4tZ0V0PHymy9T3CmUDR0fFJopllFkcT47Cj5u+NEhmlqmIv/NKcL34RwEXuy2U
 Iz3C9kl/VxQv1WLEoGDh9skE53W/rFd5plBCv5SrGi7YklDDqQSMyhRpoaXXRYoKsqP3
 ttdITCmnoqxMXahe9RF+eYN1zc3zllv2T9B/WSsKsp3i82X0ADMoX7UiNL2A+hpM9Pti
 Qkew==
X-Gm-Message-State: ABuFfoigX7m9ZVAb4H8b8ElfXi32vnxsbIjTpLJ2GtkzLSIhFPS9aDwJ
 YXbYwW3kr1TzWi5+ZyZCmJvFZFXR
X-Google-Smtp-Source: ACcGV616kepVCDzrVCgQCm8Lf41nSPFQw+v0/EJvr8YjMW1mRW0RgE9o2HpF11Jsso07CuqyZMKplA==
X-Received: by 2002:a19:945b:: with SMTP id w88mr3862630lfd.15.1539982727086; 
 Fri, 19 Oct 2018 13:58:47 -0700 (PDT)
Received: from libremnd ([2a02:2698:1825:4d78:802c:2b3b:b7d4:22c5])
 by smtp.gmail.com with ESMTPSA id i10-v6sm5306762ljb.23.2018.10.19.13.58.45
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 19 Oct 2018 13:58:46 -0700 (PDT)
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#33066] [PATCHv3] gnu: rust: workaround rust 1.25-27
 reproducibility issues
References: <877eihu5hx.fsf@HIDDEN> <875zy1u5ec.fsf@HIDDEN>
 <20181017131406.01c3b011@HIDDEN>
 <87y3atsouq.fsf@HIDDEN>
Date: Sat, 20 Oct 2018 01:58:43 +0500
In-Reply-To: <87y3atsouq.fsf@HIDDEN> (Nikolai Merinov's message of
 "Sat, 20 Oct 2018 00:44:45 +0500")
Message-ID: <87sh11slfg.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 33066
Cc: 33066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--=-=-=
Content-Type: text/plain

Hi,

Sorry, ignore my previous mail. There was wrong patch
export. Re-attached patches.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-gnu-rust-workaround-rust-1.25-27-reproducibility-iss.patch

From 6e593ffb8c1d9ecf4a1ed5e131a5c352a76fe986 Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
Date: Tue, 16 Oct 2018 02:32:11 +0500
Subject: [PATCH 1/2] gnu: rust: workaround rust 1.25-27 reproducibility issues
To: guix-patches@HIDDEN

* gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add new patch file.
* gnu/packages/rust.scm (rust-1.19): Use system libssh2 library
during cargo build. Note: libgit2 still bundled, because cargo
tests assume specific libgit2 minor release.
(rust-1.23): Inherit native-inputs from previous package.
(rust-1.25): Switch back to llvm 3.9.1 as workaround for
https://github.com/rust-lang/rust/issues/50556 issue.
(rust-1.27): Apply changes from
https://github.com/rust-lang-nursery/mdBook/pull/692 to make
generation of "searchindex.js" files reproducible. Disable cargo
test that required llvm 6.
---
 gnu/local.mk                                  |  1 +
 ...ible-builds-by-forcing-window.search.patch | 28 +++++++++++++
 gnu/packages/rust.scm                         | 41 ++++++++-----------
 3 files changed, 47 insertions(+), 23 deletions(-)
 create mode 100644 gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1fa2eaba3..8695ce472 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1130,6 +1130,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/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
new file mode 100644
index 000000000..b4ae3a4b8
--- /dev/null
+++ b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch
@@ -0,0 +1,28 @@
+From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
+From: Tim Ryan <id@HIDDEN>
+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 <https://github.com/rust-lang-nursery/mdBook/pull/692>
+---
+ 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<String> {
+         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))
+-- 
+2.19.0
+
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 40633854a..cd2a8fb9a 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -480,7 +480,8 @@ test = { path = \"../libtest\" }
      `(("jemalloc" ,jemalloc-4.5.0)
        ("llvm" ,llvm-3.9.1)
        ("openssl" ,openssl)
-       ("libcurl" ,curl))) ; For "cargo"
+       ("libssh2" ,libssh2) ; For "cargo"
+       ("libcurl" ,curl)))  ; For "cargo"
 
     ;; rustc invokes gcc, so we need to set its search paths accordingly.
     ;; Note: duplicate its value here to cope with circular dependencies among
@@ -649,18 +650,11 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
     (name "rust")
     (version "1.23.0")
     (source (rust-source version "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l"))
+    ;; Use rust-bootstrap@HIDDEN package to build rust 1.23
     (native-inputs
-     `(("bison" ,bison) ; For the tests
-       ("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" ,rust-bootstrap)
-       ("cargo-bootstrap" ,rust-bootstrap "cargo")
-       ("pkg-config" ,pkg-config) ; For "cargo"
-       ("which" ,which)))
+     (alist-replace "cargo-bootstrap" (list rust-bootstrap "cargo")
+                    (alist-replace "rustc-bootstrap" (list rust-bootstrap)
+                                   (package-native-inputs rust-1.20))))
     (arguments
      (substitute-keyword-arguments (package-arguments rust-1.20)
        ((#:phases phases)
@@ -692,6 +686,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
                  #t)))))))))
 
+;;; Rust 1.25 release support work with llvm 6, but builds with llvm 6 is
+;;; not determenistic due to https://github.com/rust-lang/rust/issues/50556
+;;; Keep using llvm 3.9.1 until builds become determenistic
 (define-public rust-1.25
   (let ((base-rust
          (rust-bootstrapped-package rust-1.24 "1.25.0"
@@ -699,10 +696,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
           #:patches '("rust-1.25-accept-more-detailed-gdb-lines.patch"))))
     (package
       (inherit base-rust)
-      (inputs
-       ;; Use LLVM 6.0
-       (alist-replace "llvm" (list llvm)
-                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -713,14 +706,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    ;; This test wants to update the crate index.
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t))
-             (add-after 'configure 'enable-codegen-tests
-               (lambda _
-                 (substitute* "config.toml"
-                   (("codegen-tests = false") ""))
-                 #t))
              ;; FIXME: Re-enable this test if it's indeed supposed to work.
              ;; See <https://github.com/rust-lang/rust/issues/54178>.
-             (add-after 'enable-codegen-tests 'disable-nil-enum-test
+             (add-after 'configure 'disable-nil-enum-test
                (lambda _
                  (substitute* "src/test/debuginfo/nil-enum.rs"
                    (("ignore-lldb") "ignore-gdb"))
@@ -795,7 +783,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                                     #:patches
                                     '("rust-coresimd-doctest.patch"
                                       "rust-bootstrap-stage0-test.patch"
-                                      "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+                                      "rust-1.25-accept-more-detailed-gdb-lines.patch"
+                                      "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch"))))
     (package
       (inherit base-rust)
       (arguments
@@ -808,4 +797,10 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  ;; `prefix' directory should exist before `install' call
                  (mkdir-p (assoc-ref outputs "out"))
                  (mkdir-p (assoc-ref outputs "cargo"))
+                 #t))
+             (add-after 'patch-cargo-tests 'disable-thinlto-test
+               (lambda* _
+                 ;; thinlto required llvm 6.0 for work
+                 (substitute* "src/tools/cargo/tests/testsuite/path.rs"
+                   (("fn thin_lto_works") "#[ignore]\nfn thin_lto_works"))
                  #t)))))))))
-- 
2.19.0


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0002-gnu-rust-add-rust-1.28-and-rust-1.29-packages.patch

From 4eb82de9971c13323e7b0195f9f178282039ba35 Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
Date: Tue, 16 Oct 2018 02:37:41 +0500
Subject: [PATCH 2/2] gnu: rust: add rust 1.28 and rust 1.29 packages
To: guix-patches@HIDDEN

* gnu/packages/rust.scm (rust-1.27): rename "rust" to "rust-1.27"
(rust-1.28): Use llvm-6.0 finally. Disable test that broken on x86_64 machines
without "avx". Enable codegen tests. Enable cargo test for thinlto.
(rust): Package for rust 1.29.2.
---
 gnu/packages/rust.scm | 46 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index cd2a8fb9a..aafa3704b 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -776,7 +776,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t)))))))))
 
-(define-public rust
+(define-public rust-1.27
   (let ((base-rust
          (rust-bootstrapped-package rust-1.26 "1.27.2"
                                     "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs"
@@ -804,3 +804,47 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  (substitute* "src/tools/cargo/tests/testsuite/path.rs"
                    (("fn thin_lto_works") "#[ignore]\nfn thin_lto_works"))
                  #t)))))))))
+
+(define-public rust-1.28
+  (let ((base-rust
+         (rust-bootstrapped-package 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-mdbook-support-reproducible-builds-by-forcing-window.search.patch"))))
+    (package
+      (inherit base-rust)
+      (inputs
+       ;; Use LLVM 6.0
+       (alist-replace "llvm" (list llvm)
+                      (package-inputs base-rust)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'configure 'enable-codegen-tests
+               ;; codegen tests should pass with llvm 6
+               (lambda* _
+                 (substitute* "config.toml"
+                   (("codegen-tests = false") ""))
+                 #t))
+             (add-after 'patch-tests 'disable-amd64-avx-test
+               ;; This test will fail on x86_64 machines without avx
+               (lambda* _
+                 (substitute* "src/test/run-pass/issue-44056.rs"
+                   (("only-x86_64") "ignore-test"))
+                 #t))
+             ;; thinlto test should pass with llvm 6
+             (delete 'disable-thinlto-test))))))))
+
+(define-public rust
+  (let ((base-rust
+         (rust-bootstrapped-package rust-1.28 "1.29.2"
+                                    "1jb787080z754caa2w3w1amsygs4qlzj9rs1vy64firfmabfg22h"
+                                    #:patches
+                                    '("rust-1.25-accept-more-detailed-gdb-lines.patch"
+                                      "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch"))))
+    (package
+      (inherit base-rust))))
-- 
2.19.0


--=-=-=
Content-Type: text/plain


Regards,
Nikolai

Nikolai Merinov <nikolai.merinov@HIDDEN> writes:

> Hi Danny,
>
> I fixed patches according to your comments. Also I updated rust 1.29.1
> to 1.29.2 and fixed test issue in 1.27: as I mentioned before I tested
> reproducibility of each package previously only in private my private
> repo where I disabled `check` phase for 1.25 and 1.27. I have pretty
> slow machine, but currently I already checked reproducibility with
> suggested patches for 1.23-1.26 releases. 1.27-1.29 in progress.
>
> Both updated patches attached.
>
> Danny Milosavljevic <dannym@HIDDEN> writes:
>
>> Hi Nikolai,
>>
>> On Tue, 16 Oct 2018 02:32:11 +0500
>> Nikolai Merinov <nikolai.merinov@HIDDEN> wrote:
>>
>>> * gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch:
>>
>> Nitpick: No big "S" (file names are easier to find if they are all lower case).
>>
> Fixed.
>
>>> patch that make "searchindex.js" reproducible in rust 1.27 and newer.
>>
>> "New file".
> Fixed.
>
>>
>>> * gnu/local.mk (dist_patch_DATA): Add new patch file.
>>> * gnu/packages/rust.scm (rust-1.19): Use system libssh2 library
>>
>> Hmm, I'm not sure about doing this in the same commit.
>> Is it also related to reproducibility?
>
> Looks like it should not, but still I started investigation with
> non-reproducible "libssh2" and "libgit2" rust libraries I made libssh2
> related changes at very beginning and never tested wihtout it. I not
> sure that it's good idea to remove it now.
>
>>
>>> during cargo build. Note: libgit2 still builded as part of cargo build,
>>> because cargo tests assume specific libgit2 minor release.
>>
>> What does this mean?  Does it mean "bundled"?
> Yes. Rust used bundled sources for "libgit2-sys" rust library (used by cargo).
>
>>
>>> (rust-1.23): inherit native-inputs from previous package.
>>
>> Ok.
>>
>>> (rust-1.25): switch back to llvm 3.9.1 as workaround for
>>> https://github.com/rust-lang/rust/issues/50556 issue.
>>
>> Please add the reasoning as a comment inside the source code instead.
> Added comment for rust-1.25 package.
>
>>
>>> (rust-1.27): apply patch to make "searchindex.js" files reproducible.
>>
>> Maybe add "[source]".
> I repharase this comment and added source URL to patch file itself.
>
>>
>>> -             (add-after 'configure 'enable-codegen-tests
>>> -               (lambda _
>>> -                 (substitute* "config.toml"
>>> -                   (("codegen-tests = false") ""))
>>> -                 #t))
>>
>> I think I had reproducibility problems when enabling codegen tests and
>> parallel tests.  Is that not the case anymore?
> Neither me nor Joe Hillenbrand in
> https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00292.html got
> reproducibility issues with this tests.
>>
>>>               ;; FIXME: Re-enable this test if it's indeed supposed to work.
>>>               ;; See <https://github.com/rust-lang/rust/issues/54178>.
>>
>> Note to myself: I think the issue comments indicate that the newer gdb output
>> is better - so we should create a patch similar to
>> rust-1.25-accept-more-detailed-gdb-lines.patch to accept the newer output.

--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 19 Oct 2018 19:45:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 19 15:45:09 2018
Received: from localhost ([127.0.0.1]:59791 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDahg-0008FZ-0R
	for submit <at> debbugs.gnu.org; Fri, 19 Oct 2018 15:45:09 -0400
Received: from mail-lj1-f193.google.com ([209.85.208.193]:46996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gDahd-0008FJ-3R
 for 33066 <at> debbugs.gnu.org; Fri, 19 Oct 2018 15:44:58 -0400
Received: by mail-lj1-f193.google.com with SMTP id x3-v6so31818402lji.13
 for <33066 <at> debbugs.gnu.org>; Fri, 19 Oct 2018 12:44:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=+xSFzFUrojJzi85lV9HWrlVycOnygqhWtG07HVN4sFE=;
 b=nr7smmoHgq4b9pRSzhUK3ZFdMlSlckRFH0xTJI0gcnCLi9P5Zb7cBlWxWaMEHr9AfW
 AwZomEP9XeegC6cxo62xF4HDCBsgFQBovnYPyuHK7KChcCQNpFr1k+QqouM08z8Nx8Eb
 +0TBiOASHCuH5Y85F1K3Y097xsWMCs+yg01YI7X1E05KgpndSjl7m0+hkCWck6fw9iVP
 PdEV6fgmGR+FFX/J+j/xB3cg5JG/2zYnAhDE7Qbh8uv1zC9FxzyM4Vff5OC/xDzw8GAM
 bAtfFDqCxD/662wzRH3kQw+8Kbas7261HGXi6IDF2WqYU6M6HqfFhpj8EGYJzfg5nWa/
 ypZw==
X-Gm-Message-State: ABuFfogLQ2a1y3NITadvDdILfLZ2dvhNC6f8snEiOr3K6fSBfmMy5aGc
 nRIt7OROA0CXsYn10UmHmfQeQ9FN
X-Google-Smtp-Source: ACcGV60uvjJFxy8gp48tfTdHsKjG+EC+XxUSQ2zlzclAcYmS4BbObjB+rmSDwSoI/1DrkLxlh0L2qQ==
X-Received: by 2002:a2e:7f14:: with SMTP id
 a20-v6mr23173514ljd.148.1539978290789; 
 Fri, 19 Oct 2018 12:44:50 -0700 (PDT)
Received: from libremnd ([2a02:2698:1825:4d78:802c:2b3b:b7d4:22c5])
 by smtp.gmail.com with ESMTPSA id r13-v6sm5322533ljc.64.2018.10.19.12.44.49
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 19 Oct 2018 12:44:49 -0700 (PDT)
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#33066] [PATCH 1/2] gnu: rust: workaround rust 1.25-27
 reproducibility issues
References: <877eihu5hx.fsf@HIDDEN> <875zy1u5ec.fsf@HIDDEN>
 <20181017131406.01c3b011@HIDDEN>
Date: Sat, 20 Oct 2018 00:44:45 +0500
In-Reply-To: <20181017131406.01c3b011@HIDDEN> (Danny Milosavljevic's
 message of "Wed, 17 Oct 2018 13:14:06 +0200")
Message-ID: <87y3atsouq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 33066
Cc: 33066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--=-=-=
Content-Type: text/plain

Hi Danny,

I fixed patches according to your comments. Also I updated rust 1.29.1
to 1.29.2 and fixed test issue in 1.27: as I mentioned before I tested
reproducibility of each package previously only in private my private
repo where I disabled `check` phase for 1.25 and 1.27. I have pretty
slow machine, but currently I already checked reproducibility with
suggested patches for 1.23-1.26 releases. 1.27-1.29 in progress.

Both updated patches attached.

Danny Milosavljevic <dannym@HIDDEN> writes:

> Hi Nikolai,
>
> On Tue, 16 Oct 2018 02:32:11 +0500
> Nikolai Merinov <nikolai.merinov@HIDDEN> wrote:
>
>> * gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch:
>
> Nitpick: No big "S" (file names are easier to find if they are all lower case).
>
Fixed.

>> patch that make "searchindex.js" reproducible in rust 1.27 and newer.
>
> "New file".
Fixed.

>
>> * gnu/local.mk (dist_patch_DATA): Add new patch file.
>> * gnu/packages/rust.scm (rust-1.19): Use system libssh2 library
>
> Hmm, I'm not sure about doing this in the same commit.
> Is it also related to reproducibility?

Looks like it should not, but still I started investigation with
non-reproducible "libssh2" and "libgit2" rust libraries I made libssh2
related changes at very beginning and never tested wihtout it. I not
sure that it's good idea to remove it now.

>
>> during cargo build. Note: libgit2 still builded as part of cargo build,
>> because cargo tests assume specific libgit2 minor release.
>
> What does this mean?  Does it mean "bundled"?
Yes. Rust used bundled sources for "libgit2-sys" rust library (used by cargo).

>
>> (rust-1.23): inherit native-inputs from previous package.
>
> Ok.
>
>> (rust-1.25): switch back to llvm 3.9.1 as workaround for
>> https://github.com/rust-lang/rust/issues/50556 issue.
>
> Please add the reasoning as a comment inside the source code instead.
Added comment for rust-1.25 package.

>
>> (rust-1.27): apply patch to make "searchindex.js" files reproducible.
>
> Maybe add "[source]".
I repharase this comment and added source URL to patch file itself.

>
>> -             (add-after 'configure 'enable-codegen-tests
>> -               (lambda _
>> -                 (substitute* "config.toml"
>> -                   (("codegen-tests = false") ""))
>> -                 #t))
>
> I think I had reproducibility problems when enabling codegen tests and
> parallel tests.  Is that not the case anymore?
Neither me nor Joe Hillenbrand in
https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00292.html got
reproducibility issues with this tests.
>
>>               ;; FIXME: Re-enable this test if it's indeed supposed to work.
>>               ;; See <https://github.com/rust-lang/rust/issues/54178>.
>
> Note to myself: I think the issue comments indicate that the newer gdb output
> is better - so we should create a patch similar to
> rust-1.25-accept-more-detailed-gdb-lines.patch to accept the newer output.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-gnu-rust-workaround-rust-1.25-27-reproducibility-iss.patch
Content-Description: make rust 1.25-1.27 reproducible

From 253286c455a32007f28eeff965f4b33e07856f58 Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
Date: Tue, 16 Oct 2018 02:32:11 +0500
Subject: [PATCH 1/2] gnu: rust: workaround rust 1.25-27 reproducibility issues
To: guix-patches@HIDDEN

* gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add new patch file.
* gnu/packages/rust.scm (rust-1.19): Use system libssh2 library
during cargo build. Note: libgit2 still bundled, because cargo
tests assume specific libgit2 minor release.
(rust-1.23): Inherit native-inputs from previous package.
(rust-1.25): Switch back to llvm 3.9.1 as workaround for
https://github.com/rust-lang/rust/issues/50556 issue.
(rust-1.27): Apply changes from
https://github.com/rust-lang-nursery/mdBook/pull/692 to make
generation of "searchindex.js" files reproducible. Disable cargo
test that required llvm 6.
---
 gnu/local.mk                                  |  1 +
 ...ible-builds-by-forcing-window.search.patch | 28 +++++++++++++
 gnu/packages/rust.scm                         | 41 ++++++++-----------
 3 files changed, 47 insertions(+), 23 deletions(-)
 create mode 100644 gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1fa2eaba3..8695ce472 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1130,6 +1130,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/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
new file mode 100644
index 000000000..b4ae3a4b8
--- /dev/null
+++ b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch
@@ -0,0 +1,28 @@
+From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
+From: Tim Ryan <id@HIDDEN>
+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 <https://github.com/rust-lang-nursery/mdBook/pull/692>
+---
+ 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<String> {
+         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))
+-- 
+2.19.0
+
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 40633854a..190dbcc3a 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -480,7 +480,8 @@ test = { path = \"../libtest\" }
      `(("jemalloc" ,jemalloc-4.5.0)
        ("llvm" ,llvm-3.9.1)
        ("openssl" ,openssl)
-       ("libcurl" ,curl))) ; For "cargo"
+       ("libssh2" ,libssh2) ; For "cargo"
+       ("libcurl" ,curl)))  ; For "cargo"
 
     ;; rustc invokes gcc, so we need to set its search paths accordingly.
     ;; Note: duplicate its value here to cope with circular dependencies among
@@ -649,18 +650,11 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
     (name "rust")
     (version "1.23.0")
     (source (rust-source version "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l"))
+    ;; Use rust-bootstrap@HIDDEN package to build rust 1.23
     (native-inputs
-     `(("bison" ,bison) ; For the tests
-       ("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" ,rust-bootstrap)
-       ("cargo-bootstrap" ,rust-bootstrap "cargo")
-       ("pkg-config" ,pkg-config) ; For "cargo"
-       ("which" ,which)))
+     (alist-replace "cargo-bootstrap" (list rust-bootstrap "cargo")
+                    (alist-replace "rustc-bootstrap" (list rust-bootstrap)
+                                   (package-native-inputs rust-1.20))))
     (arguments
      (substitute-keyword-arguments (package-arguments rust-1.20)
        ((#:phases phases)
@@ -692,6 +686,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
                  #t)))))))))
 
+;;; Rust 1.25 release support work with llvm 6, but builds with llvm 6 is
+;;; not determenistic due to https://github.com/rust-lang/rust/issues/50556
+;;; Keep using llvm 3.9.1 until builds become determenistic
 (define-public rust-1.25
   (let ((base-rust
          (rust-bootstrapped-package rust-1.24 "1.25.0"
@@ -699,10 +696,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
           #:patches '("rust-1.25-accept-more-detailed-gdb-lines.patch"))))
     (package
       (inherit base-rust)
-      (inputs
-       ;; Use LLVM 6.0
-       (alist-replace "llvm" (list llvm)
-                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -713,14 +706,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    ;; This test wants to update the crate index.
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t))
-             (add-after 'configure 'enable-codegen-tests
-               (lambda _
-                 (substitute* "config.toml"
-                   (("codegen-tests = false") ""))
-                 #t))
              ;; FIXME: Re-enable this test if it's indeed supposed to work.
              ;; See <https://github.com/rust-lang/rust/issues/54178>.
-             (add-after 'enable-codegen-tests 'disable-nil-enum-test
+             (add-after 'configure 'disable-nil-enum-test
                (lambda _
                  (substitute* "src/test/debuginfo/nil-enum.rs"
                    (("ignore-lldb") "ignore-gdb"))
@@ -795,7 +783,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                                     #:patches
                                     '("rust-coresimd-doctest.patch"
                                       "rust-bootstrap-stage0-test.patch"
-                                      "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+                                      "rust-1.25-accept-more-detailed-gdb-lines.patch"
+                                      "rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch"))))
     (package
       (inherit base-rust)
       (arguments
@@ -808,4 +797,10 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  ;; `prefix' directory should exist before `install' call
                  (mkdir-p (assoc-ref outputs "out"))
                  (mkdir-p (assoc-ref outputs "cargo"))
+                 #t))
+             (add-after 'patch-cargo-tests 'disable-thinlto-test
+               (lambda* _
+                 ;; thinlto required llvm 6.0 for work
+                 (substitute* "src/tools/cargo/tests/testsuite/path.rs"
+                   (("fn thin_lto_works") "#[ignore]\nfn thin_lto_works"))
                  #t)))))))))
-- 
2.19.0


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0002-gnu-rust-add-rust-1.28-and-rust-1.29-packages.patch
Content-Description: Add rust 1.28-1.29 packages

From 9cf7f62414c5e714d7bb0cc2874d91f561e418df Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
Date: Tue, 16 Oct 2018 02:37:41 +0500
Subject: [PATCH 2/2] gnu: rust: add rust 1.28 and rust 1.29 packages
To: guix-patches@HIDDEN

* gnu/packages/rust.scm (rust-1.27): rename "rust" to "rust-1.27"
(rust-1.28): Use llvm-6.0 finally. Disable test that broken on x86_64 machines
without "avx". Enable codegen tests. Enable cargo test for thinlto.
(rust): Package for rust 1.29.2.
---
 gnu/packages/rust.scm | 46 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 190dbcc3a..a0e891249 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -776,7 +776,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t)))))))))
 
-(define-public rust
+(define-public rust-1.27
   (let ((base-rust
          (rust-bootstrapped-package rust-1.26 "1.27.2"
                                     "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs"
@@ -804,3 +804,47 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  (substitute* "src/tools/cargo/tests/testsuite/path.rs"
                    (("fn thin_lto_works") "#[ignore]\nfn thin_lto_works"))
                  #t)))))))))
+
+(define-public rust-1.28
+  (let ((base-rust
+         (rust-bootstrapped-package 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-mdbook-Support-reproducible-builds-by-forcing-window.search.patch"))))
+    (package
+      (inherit base-rust)
+      (inputs
+       ;; Use LLVM 6.0
+       (alist-replace "llvm" (list llvm)
+                      (package-inputs base-rust)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'configure 'enable-codegen-tests
+               ;; codegen tests should pass with llvm 6
+               (lambda* _
+                 (substitute* "config.toml"
+                   (("codegen-tests = false") ""))
+                 #t))
+             (add-after 'patch-tests 'disable-amd64-avx-test
+               ;; This test will fail on x86_64 machines without avx
+               (lambda* _
+                 (substitute* "src/test/run-pass/issue-44056.rs"
+                   (("only-x86_64") "ignore-test"))
+                 #t))
+             ;; thinlto test should pass with llvm 6
+             (delete 'disable-thinlto-test))))))))
+
+(define-public rust
+  (let ((base-rust
+         (rust-bootstrapped-package rust-1.28 "1.29.2"
+                                    "1jb787080z754caa2w3w1amsygs4qlzj9rs1vy64firfmabfg22h"
+                                    #:patches
+                                    '("rust-1.25-accept-more-detailed-gdb-lines.patch"
+                                      "rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch"))))
+    (package
+      (inherit base-rust))))
-- 
2.19.0


--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 17 Oct 2018 14:14:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 17 10:14:52 2018
Received: from localhost ([127.0.0.1]:55465 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCmb6-0002mA-5c
	for submit <at> debbugs.gnu.org; Wed, 17 Oct 2018 10:14:52 -0400
Received: from mail-pf1-f195.google.com ([209.85.210.195]:37494)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joehillen@HIDDEN>) id 1gCmb4-0002lt-3I
 for 33066 <at> debbugs.gnu.org; Wed, 17 Oct 2018 10:14:50 -0400
Received: by mail-pf1-f195.google.com with SMTP id j23-v6so13268335pfi.4
 for <33066 <at> debbugs.gnu.org>; Wed, 17 Oct 2018 07:14:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=zmX5kWTiZQqMeVAxQt5n3L0l0kW8NXd5PDCRoZ0Hw4k=;
 b=UTXOtPZB5y+46MtYK9B6ywjoKjJM0hsq6uz7mBXflGaqNj0bc3XwNsgojK35vUMJ0B
 MEcAXHvCuqXFCt+fnZpI/EyHvloaK2TUQdZrOwg5cnvqksV8hFpq8XP3js6cK1hObxfN
 QJ+/nldnsKnUzL9fC6djCK8mM0KtA1OKMru1imgRbzerxFDFQFKYKWqw3fpkAD4bMzB9
 /0Un3zlNwBJ33XPAZTF/6lzVrdGFXJBEx8L5hkpfFtjfMvcmgCRC6h1bzlXGL6ZYy1zE
 BZBZCM8yBe8idhAsh4XHbAGasegU62/nggZwGP+TIgA1XMJHPhT6Z3nLTROcOXN5AjH3
 8saA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=zmX5kWTiZQqMeVAxQt5n3L0l0kW8NXd5PDCRoZ0Hw4k=;
 b=V9wN+pIY1xgo/s4bWemHv6ufbq6LYrz9xvIFiyG+jtFS3pNvR/07QueKvd2YbfmJtQ
 d48pdmsjal1DMURt0OZYDxIWqyOirQh+VpMu45qBgNNH54He3Yog1B0t9btyy9NCEQnp
 3+kMi4hqw1Gl1hj5dmWDWPs/2lS+5PYmO6b9E+CEAz5qYxUxHqvLq87Njwcjxy7Ss2eK
 fP4Mc7P60uBexFhfI/L0AaghxqqwrmLFIOKiYwHtY1nxA7jODeOP2wNhUvzhDYT8iu16
 ow7ZPGi2npR32fQ/3i89o3EsaJvull++eqZiQK8GnVpKuR93wlKl3Kzef0RVGVYWAFPi
 BExw==
X-Gm-Message-State: ABuFfojeu7mCjQnF4AATJl+g2RMuDk7XfA3puNMCf1gjaEl13MVNSQNS
 Jl+dMXiJa6ApISeq087Rx2jbxNPIj6l+2s7YEaxflw==
X-Google-Smtp-Source: ACcGV61Tqyx00K4RhlVkEDkC2GEulsg8/eeWEpXYNBgaIYl0+Qo6NQnX1BtV/Qml6xoWyisPWVYmefw5ec5coajOZMY=
X-Received: by 2002:a63:ae4d:: with SMTP id
 e13-v6mr24793396pgp.315.1539785683644; 
 Wed, 17 Oct 2018 07:14:43 -0700 (PDT)
MIME-Version: 1.0
References: <877eihu5hx.fsf@HIDDEN> <874ldlu5dm.fsf@HIDDEN>
In-Reply-To: <874ldlu5dm.fsf@HIDDEN>
From: Joe Hillenbrand <joehillen@HIDDEN>
Date: Wed, 17 Oct 2018 07:14:06 -0700
Message-ID: <CANJQ5C5MtvxS6aDwLFLCPhqwajJ=VEUyPjpoaY_0-mPPc-sE6w@HIDDEN>
Subject: Re: [bug#33066] [PATCH 2/2] gnu: rust: add rust 1.28 and rust 1.29
 packages
To: nikolai.merinov@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33066
Cc: 33066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Oct 16, 2018 at 11:50 AM Nikolai Merinov
<nikolai.merinov@HIDDEN> wrote:
>
> +(define-public rust
> +  (let ((base-rust
> +         (rust-bootstrapped-package rust-1.28 "1.29.1"

The latest version is now 1.29.2




Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 17 Oct 2018 11:15:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 17 07:15:41 2018
Received: from localhost ([127.0.0.1]:54437 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCjnh-00047d-60
	for submit <at> debbugs.gnu.org; Wed, 17 Oct 2018 07:15:41 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:46630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gCjne-00047U-Vk
 for 33066 <at> debbugs.gnu.org; Wed, 17 Oct 2018 07:15:39 -0400
Received: from localhost (unknown [46.125.250.66])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 2F2C733614FC;
 Wed, 17 Oct 2018 13:15:38 +0200 (CEST)
Date: Wed, 17 Oct 2018 13:15:36 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: Nikolai Merinov <nikolai.merinov@HIDDEN>
Subject: Re: [bug#33066] [PATCH 2/2] gnu: rust: add rust 1.28 and rust 1.29
 packages
Message-ID: <20181017131536.3eb2f38c@HIDDEN>
In-Reply-To: <874ldlu5dm.fsf@HIDDEN>
References: <877eihu5hx.fsf@HIDDEN>
	<874ldlu5dm.fsf@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/TRtBXCKtqai9I60g0yX2mqb"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33066
Cc: 33066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/TRtBXCKtqai9I60g0yX2mqb
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

> +             (add-after 'patch-tests 'disable-amd64-avx-test
> +               ;; This test will fail on x86_64 machines without avx
> +               (lambda* _
> +                 (substitute* "src/test/run-pass/issue-44056.rs"
> +                   (("only-x86_64") "ignore-test")))))))))))

Please return #t.

Otherwise ok!

--Sig_/TRtBXCKtqai9I60g0yX2mqb
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvHGdgACgkQ5xo1VCww
uqUaVAf/dezyd8WhOgW6r8sqgB2DLx+0UVH2ZIfYNF240Xqw9XAl4BM0uIscAiKq
x5Y2N7GUZ+jIqlMjDyLTKE+e24vBbm9vRxqYEbG4fQxdt6iys0ro1CqVrw63j6ro
uzw/WOC67NOgzifk9zQV9phawuNfwrBdJWk4vAq7uM93+rJR/I7QDtplq2m4OiYo
f9vyyshHO0nSXFTrPERA64qW/M4fxXNV54V/k84kyipm+cmLh6YrbxK+2JENWxzc
y5wKndxxy6/9//PSrTfXJMHM8moH3XQU5tkELItW1dYIUBDnOdQtDToubc4f7sak
aED5ExtFMuDepTu/SBVwjXl9JueVWg==
=TnV5
-----END PGP SIGNATURE-----

--Sig_/TRtBXCKtqai9I60g0yX2mqb--




Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 17 Oct 2018 11:14:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 17 07:14:15 2018
Received: from localhost ([127.0.0.1]:54430 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCjmI-00044A-1b
	for submit <at> debbugs.gnu.org; Wed, 17 Oct 2018 07:14:15 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:46398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gCjmG-000441-Sz
 for 33066 <at> debbugs.gnu.org; Wed, 17 Oct 2018 07:14:13 -0400
Received: from localhost (unknown [46.125.250.66])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 4382233614FC;
 Wed, 17 Oct 2018 13:14:11 +0200 (CEST)
Date: Wed, 17 Oct 2018 13:14:06 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: Nikolai Merinov <nikolai.merinov@HIDDEN>
Subject: Re: [bug#33066] [PATCH 1/2] gnu: rust: workaround rust 1.25-27
 reproducibility issues
Message-ID: <20181017131406.01c3b011@HIDDEN>
In-Reply-To: <875zy1u5ec.fsf@HIDDEN>
References: <877eihu5hx.fsf@HIDDEN>
	<875zy1u5ec.fsf@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/gmTG850wN2pLILrIHUqgQfL"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33066
Cc: 33066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/gmTG850wN2pLILrIHUqgQfL
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi Nikolai,

On Tue, 16 Oct 2018 02:32:11 +0500
Nikolai Merinov <nikolai.merinov@HIDDEN> wrote:

> * gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing=
-window.search.patch:

Nitpick: No big "S" (file names are easier to find if they are all lower ca=
se).

> patch that make "searchindex.js" reproducible in rust 1.27 and newer.

"New file".

> * gnu/local.mk (dist_patch_DATA): Add new patch file.
> * gnu/packages/rust.scm (rust-1.19): Use system libssh2 library

Hmm, I'm not sure about doing this in the same commit.
Is it also related to reproducibility?

> during cargo build. Note: libgit2 still builded as part of cargo build,
> because cargo tests assume specific libgit2 minor release.

What does this mean?  Does it mean "bundled"?

> (rust-1.23): inherit native-inputs from previous package.

Ok.

> (rust-1.25): switch back to llvm 3.9.1 as workaround for
> https://github.com/rust-lang/rust/issues/50556 issue.

Please add the reasoning as a comment inside the source code instead.

> (rust-1.27): apply patch to make "searchindex.js" files reproducible.

Maybe add "[source]".

> -             (add-after 'configure 'enable-codegen-tests
> -               (lambda _
> -                 (substitute* "config.toml"
> -                   (("codegen-tests =3D false") ""))
> -                 #t))

I think I had reproducibility problems when enabling codegen tests and
parallel tests.  Is that not the case anymore?

>               ;; FIXME: Re-enable this test if it's indeed supposed to wo=
rk.
>               ;; See <https://github.com/rust-lang/rust/issues/54178>.

Note to myself: I think the issue comments indicate that the newer gdb outp=
ut
is better - so we should create a patch similar to
rust-1.25-accept-more-detailed-gdb-lines.patch to accept the newer output.

--Sig_/gmTG850wN2pLILrIHUqgQfL
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvHGX4ACgkQ5xo1VCww
uqUBhQf9HbQqdFlnetu0WXtD6gxK8iYsoeKzhb+kgK/TKHDS6/IIVz2oMVF25D9w
/D38a65UsEwR6Eh16twZDWw2Kz4ubVPxhLWUixHUJLp/SXqXocVP9KpSNkgRE3nu
1r52AkZKjrglC/OGMUFWrf1ZvitCLDD+Qd4wcIIGkkOeSSjpJFB27QadcbdabCIN
sDa5/kMty3xVS38/0JALCdOnslyRqcaFIoBMhP/1hFEXfLU8whAD12WWQ6ydnwvq
qTdkj0nch62ICVoMEQy8CCrZNl1JsBNCxNdHI33hiJfG9jLjiMYEQ9eVbux0KPfy
gLKHu/DlKcfQ43C2Yqf3RYviGI75EA==
=802C
-----END PGP SIGNATURE-----

--Sig_/gmTG850wN2pLILrIHUqgQfL--




Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 16 Oct 2018 18:13:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 16 14:13:35 2018
Received: from localhost ([127.0.0.1]:53915 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCTqY-0006NT-UY
	for submit <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:13:35 -0400
Received: from mail-lj1-f196.google.com ([209.85.208.196]:44962)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gCTqW-0006NE-VU
 for 33066 <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:13:33 -0400
Received: by mail-lj1-f196.google.com with SMTP id v6-v6so21793690ljc.11
 for <33066 <at> debbugs.gnu.org>; Tue, 16 Oct 2018 11:13:32 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=2Q5cCbjW32ohwTM/MfpdaXh/OmkzQa0g/9haR1/i1Ck=;
 b=sxPxr41U/z3tFg1Q5YE5g5cgpc3QCwWNWK4etg93xeXAg277K5epmcI4gEayXfor2t
 z0yrmjt/RUH3bXbtBkCrRx1uNgMl+ZuL3ZXA5+K3dpl+bsE3CWhTmUJf7zqs/inMppW2
 KxO3wmmeFuxNGBBiGm3Ao9C5bPR8TSG3VppLQh3T2lVNDc1mqdJXaABqamhEq4MbfDri
 BcgUPUVHV81KQGf5XdflLgz0hojDEU699pVTAO17xK1CDHxLGCJO89mPk96y+qwqYHCu
 DQwM/jBfXzelKX/pyRGEwLMKKFMXK75lsFNZ9uB1Wa0fyIGWVX688LsQnnRfHO0FUliB
 glXg==
X-Gm-Message-State: ABuFfoiqmLqRdEWyLngtaxIrV6uVrHJzJg7rotN1wYx1Azp/yFu4IY9q
 KYx8e+8ZOY/GX0kpGlVJgEqPiCM8
X-Google-Smtp-Source: ACcGV60TcmN4aaYJX2E0QpnxY3M1KLTbJOMzF0axa6Oqe1d4wgCBbcZC7YqO77T80MDS8PsS6WvzKA==
X-Received: by 2002:a2e:900c:: with SMTP id
 h12-v6mr15689025ljg.121.1539713606942; 
 Tue, 16 Oct 2018 11:13:26 -0700 (PDT)
Received: from libremnd ([2a02:2698:1825:4d78:802c:2b3b:b7d4:22c5])
 by smtp.gmail.com with ESMTPSA id t200-v6sm3144974lff.77.2018.10.16.11.13.25
 for <33066 <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 16 Oct 2018 11:13:26 -0700 (PDT)
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
To: 33066 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: rust: add rust 1.28 and rust 1.29 packages
Date: Tue, 16 Oct 2018 02:37:41 +0500
Message-ID: <874ldlu5dm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * gnu/packages/rust.scm (rust-1.27): rename "rust" to
 "rust-1.27"
 (rust-1.28): Use llvm-6.0 finally. Disable test that broken on x86_64 machines
 without "avx". Disable test that required network support. (rust): Package
 for rust 1.29.1. --- gnu/packages/rust.scm | 44
 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-) [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.8 DATE_IN_PAST_12_24     Date: is 12 to 24 hours before Received: date
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.208.196 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.208.196 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (nikolay.d.merinov[at]gmail.com)
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
 domains are different
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
 freemail headers are different
X-Debbugs-Envelope-To: 33066
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

* gnu/packages/rust.scm (rust-1.27): rename "rust" to "rust-1.27"
(rust-1.28): Use llvm-6.0 finally. Disable test that broken on x86_64 machines
without "avx". Disable test that required network support.
(rust): Package for rust 1.29.1.
---
 gnu/packages/rust.scm | 44 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index cbfbdccf1..d61b431e8 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -773,7 +773,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t)))))))))
 
-(define-public rust
+(define-public rust-1.27
   (let ((base-rust
          (rust-bootstrapped-package rust-1.26 "1.27.2"
                                     "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs"
@@ -795,3 +795,45 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  (mkdir-p (assoc-ref outputs "out"))
                  (mkdir-p (assoc-ref outputs "cargo"))
                  #t)))))))))
+
+(define-public rust-1.28
+  (let ((base-rust
+         (rust-bootstrapped-package 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-mdbook-Support-reproducible-builds-by-forcing-window.search.patch"))))
+    (package
+      (inherit base-rust)
+      (inputs
+       ;; Use LLVM 6.0
+       (alist-replace "llvm" (list llvm)
+                      (package-inputs base-rust)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'configure 'enable-codegen-tests
+               ;; codegen tests should work fine with llvm 6
+               (lambda* _
+                 (substitute* "config.toml"
+                   (("codegen-tests = false") ""))
+                 #t))
+             (add-after 'patch-tests 'disable-amd64-avx-test
+               ;; This test will fail on x86_64 machines without avx
+               (lambda* _
+                 (substitute* "src/test/run-pass/issue-44056.rs"
+                   (("only-x86_64") "ignore-test")))))))))))
+
+
+(define-public rust
+  (let ((base-rust
+         (rust-bootstrapped-package rust-1.28 "1.29.1"
+                                    "0jd3c57x3yndizns4pb68nh25si47agfmrdvf9nwwsyfcs5p5c7i"
+                                    #:patches
+                                    '("rust-1.25-accept-more-detailed-gdb-lines.patch"
+                                      "rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch"))))
+    (package
+      (inherit base-rust))))
-- 
2.19.0





Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at 33066 <at> debbugs.gnu.org:


Received: (at 33066) by debbugs.gnu.org; 16 Oct 2018 18:13:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 16 14:13:08 2018
Received: from localhost ([127.0.0.1]:53912 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCTq8-0006Me-F0
	for submit <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:13:08 -0400
Received: from mail-lf1-f68.google.com ([209.85.167.68]:36859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gCTq7-0006MH-71
 for 33066 <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:13:07 -0400
Received: by mail-lf1-f68.google.com with SMTP id d4-v6so17743371lfa.3
 for <33066 <at> debbugs.gnu.org>; Tue, 16 Oct 2018 11:13:07 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=4SvyABZkHBEBFPTL7oirzWrJY1wto/FWWSGDPCLCuH0=;
 b=rDAVsQjx6U4BNPglvZN2HLhZOQmacwR5Gb4qVBmm0ShXCp0HZNP5BqVslx//4nlfNJ
 ERj2sBw8xbehegVJTNdvZ2mZv9CJmeedXQCLvUki93KMgOlnWpv8bzHrxf0qiZyhm4Mk
 vtzTqHb/qMeaWWn0wxSSzhw58eZY8VSJkSRuxpYX9YQCpvjsRITFSyaTzHdBgaR60J+/
 UpOuUT44imFvtCh91tEYgEHPdeTKK8o4ZnOPCzBhFXht1BtONPSDB9giNIcaGF9bsU+2
 fSyNoqS4Xj9RtJGXjIaiXekonv/Vy/O8Eh8HPlEnxfK/MqFbjAiE0i7Y+1roQiEiqR4i
 YxYQ==
X-Gm-Message-State: ABuFfoiWVzPjboxTR5q1MdjcgUxzAeo9c6weOEHSBaW7MqBZ6w5lnCRC
 7H1+TsEey0j5vGLhI4CcSSFH3+Ig
X-Google-Smtp-Source: ACcGV63RG3U8MGFIzOSa+SamOwtmegpN6eW+exN7+hCWsh143eBsFbqvTAoWNnstk5JUUWFcRg8YNA==
X-Received: by 2002:a19:2b11:: with SMTP id
 r17-v6mr13119077lfr.128.1539713581097; 
 Tue, 16 Oct 2018 11:13:01 -0700 (PDT)
Received: from libremnd ([2a02:2698:1825:4d78:802c:2b3b:b7d4:22c5])
 by smtp.gmail.com with ESMTPSA id 12-v6sm3353395ljj.82.2018.10.16.11.13.00
 for <33066 <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 16 Oct 2018 11:13:00 -0700 (PDT)
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
To: 33066 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: rust: workaround rust 1.25-27 reproducibility issues
Date: Tue, 16 Oct 2018 02:32:11 +0500
Message-ID: <875zy1u5ec.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details. Content preview: *
 gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch:
 patch that make "searchindex.js" reproducible in rust 1.27 and newer. *
 gnu/local.mk
 (dist_patch_DATA): Add new patch file. * gnu/packages/rust.scm (rust-1.19):
 Use system libssh2 library during cargo build. Note: libgit2 still builded
 as part of cargo build, because cargo tests assume specific libgit2 minor
 release. (rust-1.23): inherit native-inputs from previous package.
 (rust-1.25): switch back to llvm 3.9.1 as workaround for
 https://github.com/rust-lang/rust/issues/50556
 issue. (rust-1.27): apply patch to make "searchindex.js" files reproducible.
 --- gnu/local.mk | 1 + ...ible-builds-by-forcing-window.search.patch | 28
 ++++++++++++++++ gnu/packages/rust.scm | 32 ++++++ 3 files changed,
 38 insertions(+), 23 deletions(-) create mode 100644
 gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch
 [...] Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.8 DATE_IN_PAST_12_24     Date: is 12 to 24 hours before Received: date
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (nikolay.d.merinov[at]gmail.com)
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
 domains are different
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.167.68 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.167.68 listed in wl.mailspike.net]
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
 freemail headers are different
X-Debbugs-Envelope-To: 33066
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

* gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch:
patch that make "searchindex.js" reproducible in rust 1.27 and newer.
* gnu/local.mk (dist_patch_DATA): Add new patch file.
* gnu/packages/rust.scm (rust-1.19): Use system libssh2 library
during cargo build. Note: libgit2 still builded as part of cargo build,
because cargo tests assume specific libgit2 minor release.
(rust-1.23): inherit native-inputs from previous package.
(rust-1.25): switch back to llvm 3.9.1 as workaround for
https://github.com/rust-lang/rust/issues/50556 issue.
(rust-1.27): apply patch to make "searchindex.js" files reproducible.
---
 gnu/local.mk                                  |  1 +
 ...ible-builds-by-forcing-window.search.patch | 28 ++++++++++++++++
 gnu/packages/rust.scm                         | 32 ++++++-------------
 3 files changed, 38 insertions(+), 23 deletions(-)
 create mode 100644 gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1fa2eaba3..2150cbf13 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1130,6 +1130,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/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
new file mode 100644
index 000000000..916662cbc
--- /dev/null
+++ b/gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch
@@ -0,0 +1,28 @@
+From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
+From: Tim Ryan <id@HIDDEN>
+Date: Mon, 14 May 2018 06:22:21 -0400
+Subject: [PATCH] Support reproducible builds by forcing window.search to use
+ stable key ordering. (#692)
+
+---
+ 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<String> {
+         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))
+-- 
+2.19.0
+
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 40633854a..cbfbdccf1 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -480,7 +480,8 @@ test = { path = \"../libtest\" }
      `(("jemalloc" ,jemalloc-4.5.0)
        ("llvm" ,llvm-3.9.1)
        ("openssl" ,openssl)
-       ("libcurl" ,curl))) ; For "cargo"
+       ("libssh2" ,libssh2) ; For "cargo"
+       ("libcurl" ,curl)))  ; For "cargo"
 
     ;; rustc invokes gcc, so we need to set its search paths accordingly.
     ;; Note: duplicate its value here to cope with circular dependencies among
@@ -649,18 +650,11 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
     (name "rust")
     (version "1.23.0")
     (source (rust-source version "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l"))
+    ;; Use rust-bootstrap@HIDDEN package to build rust 1.23
     (native-inputs
-     `(("bison" ,bison) ; For the tests
-       ("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" ,rust-bootstrap)
-       ("cargo-bootstrap" ,rust-bootstrap "cargo")
-       ("pkg-config" ,pkg-config) ; For "cargo"
-       ("which" ,which)))
+     (alist-replace "cargo-bootstrap" (list rust-bootstrap "cargo")
+                    (alist-replace "rustc-bootstrap" (list rust-bootstrap)
+                                   (package-native-inputs rust-1.20))))
     (arguments
      (substitute-keyword-arguments (package-arguments rust-1.20)
        ((#:phases phases)
@@ -699,10 +693,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
           #:patches '("rust-1.25-accept-more-detailed-gdb-lines.patch"))))
     (package
       (inherit base-rust)
-      (inputs
-       ;; Use LLVM 6.0
-       (alist-replace "llvm" (list llvm)
-                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -713,14 +703,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    ;; This test wants to update the crate index.
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t))
-             (add-after 'configure 'enable-codegen-tests
-               (lambda _
-                 (substitute* "config.toml"
-                   (("codegen-tests = false") ""))
-                 #t))
              ;; FIXME: Re-enable this test if it's indeed supposed to work.
              ;; See <https://github.com/rust-lang/rust/issues/54178>.
-             (add-after 'enable-codegen-tests 'disable-nil-enum-test
+             (add-after 'configure 'disable-nil-enum-test
                (lambda _
                  (substitute* "src/test/debuginfo/nil-enum.rs"
                    (("ignore-lldb") "ignore-gdb"))
@@ -795,7 +780,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                                     #:patches
                                     '("rust-coresimd-doctest.patch"
                                       "rust-bootstrap-stage0-test.patch"
-                                      "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+                                      "rust-1.25-accept-more-detailed-gdb-lines.patch"
+                                      "rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch"))))
     (package
       (inherit base-rust)
       (arguments
-- 
2.19.0





Information forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Oct 2018 18:11:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 16 14:11:09 2018
Received: from localhost ([127.0.0.1]:53907 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCToD-0006Il-1Q
	for submit <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:11:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gCToA-0006IM-LP
 for submit <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:11:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gCTo4-0002SD-Ki
 for submit <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:11:01 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55157)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <nikolay.d.merinov@HIDDEN>)
 id 1gCTo4-0002S6-H2
 for submit <at> debbugs.gnu.org; Tue, 16 Oct 2018 14:11:00 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38780)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gCTo3-0006zo-G0
 for guix-patches@HIDDEN; Tue, 16 Oct 2018 14:11:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <nikolay.d.merinov@HIDDEN>) id 1gCTnz-0002Jv-DT
 for guix-patches@HIDDEN; Tue, 16 Oct 2018 14:10:59 -0400
Received: from mail-lj1-f195.google.com ([209.85.208.195]:39615)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <nikolay.d.merinov@HIDDEN>)
 id 1gCTnz-0002H5-5I
 for guix-patches@HIDDEN; Tue, 16 Oct 2018 14:10:55 -0400
Received: by mail-lj1-f195.google.com with SMTP id p1-v6so21812752ljg.6
 for <guix-patches@HIDDEN>; Tue, 16 Oct 2018 11:10:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=I62VwJCjgmRS5zRBxhDOWlhjzbg3ovchJKNWYUoL0Rc=;
 b=MiTmOzJIM82iT47jPfnDAZDKKwStH15mA7hjYeQEXjzPHnEbETZcCEjIa7ccOkwth5
 0SvNeYVOB4FkNFpju9FrboE9a3x8cOKIadXrBU3g3/+ZuXoRtnvVh7qQDEyVKk1Ps9Mu
 2SYdfvVht6DuQlznGhBm/TqJTtNvciu4EZM606LEBsSn9RgN8ViGs6REY1moiJqeU09T
 ZRm5j7lYHAC0cDEkoCSz2BPtdld6cLOYDc2BwqWQt5n4SIYSvN62Vx1keUK87PAFm96m
 fNWUbGD68sVUY2deKmMkxry1bPkSLWkfrAPODgkTL/7Tb1nn6iS940Ri+Ptf/j7OvOws
 xhPA==
X-Gm-Message-State: ABuFfog1dvYWqwgZXCcWxZg+xBgkOuTb4AwAdeq7yaHfKZWwwPhF6c2u
 UaI+7JwI6eaUvf4dY+oZjliZWjci
X-Google-Smtp-Source: ACcGV63mAMlklIlE78ihL5/5psfUc/FTC+oR2utZVJhHJTnO0EE4+5g1zP9GoCQ0J9OGzYrvCv4bZw==
X-Received: by 2002:a2e:4751:: with SMTP id
 u78-v6mr14419027lja.72.1539713453592; 
 Tue, 16 Oct 2018 11:10:53 -0700 (PDT)
Received: from libremnd ([2a02:2698:1825:4d78:802c:2b3b:b7d4:22c5])
 by smtp.gmail.com with ESMTPSA id 9-v6sm3376808lju.61.2018.10.16.11.10.52
 for <guix-patches@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 16 Oct 2018 11:10:52 -0700 (PDT)
From: Nikolai Merinov <nikolai.merinov@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/2] Workaround rust reproducibility issues
Date: Tue, 16 Oct 2018 23:00:14 +0500
Message-ID: <877eihu5hx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.5 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.5 (----)

Hi,

I prepared patches for Rust packages.

First patch move rust 1.25-1.27 packages back to llvm 3.9.1. I spend much time
tring to find root of non-reproducibility in this releases, but I did not
succeeded. So as easiest solution I suggest just keep old LLVM for this
packages. Drawback of this solution is impossibility to use
"#[target_feature]" will not work for this releases.

Second patch have new 1.28.0, 1.29.1 rust packages. They was reproducible in
my local tests with llvm 6.0.1, so this packages was switched to new LLVM.

Please, note: I tested packages with suggested changes only from
https://github.com/mnd/guix-mnd-pkgs/ repository. Full build chain
reproducibility test with exactly submitted patches currently in progress on
my laptop, but it can take another one or two days.

Regards,
Nikolai

Nikolai Merinov (2):
  gnu: rust: workaround rust 1.25-27 reproducibility issues
  gnu: rust: add rust 1.28 and rust 1.29 packages

 gnu/local.mk                                  |  1 +
 ...ible-builds-by-forcing-window.search.patch | 28 +++++++
 gnu/packages/rust.scm                         | 76 +++++++++++++------
 3 files changed, 81 insertions(+), 24 deletions(-)
 create mode 100644 gnu/packages/patches/rust-mdbook-Support-reproducible-builds-by-forcing-window.search.patch

-- 
2.19.0





Acknowledgement sent to Nikolai Merinov <nikolai.merinov@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#33066; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 19 Oct 2018 21:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.