bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56893: rust-vergen inserts build timestamps, possible irreproducibil


From: Maxime Devos
Subject: bug#56893: rust-vergen inserts build timestamps, possible irreproducibility source
Date: Tue, 2 Aug 2022 19:14:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

The following phase works around the issue for me (for antioxidant) -- this makes "guix build --check" pass (at least for antioxidant):

+    ;; TODO: SOURCE_DATE_EPOCH support would be nice.  Also maybe better fit for a snippet?
+    ;;
+    ;; Make the rust-vergen reproducible and avoid causing irreproducibility
+    ;; in dependents.
+    ("rust-vergen"
+     ,#~((add-after 'unpack 'remove-timestamp-irreproducibility
+       (lambda _
+         (substitute* (find-files "." "\\.rs$")
+           (("^extern crate chrono;") "extern crate chrono; use chrono::Utc; use chrono::TimeZone;") +           (("^use chrono::Utc;") "use chrono::Utc; use chrono::TimeZone;")

Should also work for cargo-build-system, but untested.

Greetings,
Maxime

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]