* bug#56893: rust-vergen inserts build timestamps, possible irreproducibility source
@ 2022-08-02 16:57 Maxime Devos
2022-08-02 17:14 ` Maxime Devos
0 siblings, 1 reply; 2+ messages in thread
From: Maxime Devos @ 2022-08-02 16:57 UTC (permalink / raw)
To: 56893
[-- Attachment #1.1.1: Type: text/plain, Size: 1085 bytes --]
While fixing build failures in antioxidant, I noticed that rust-vergen
is a potential source of irreproducibility -- the README.md contains the
following:
> ## Documentation
> [Documentation](https://docs.rs/vergen)
>
> ## Generate Compile Time Information
> `vergen`, when used in conjunction with cargo [build scripts], will
> generate environment variables to use with the `env!` macro. Below
> is a list of the supported variables.
>
> Key | Sample Value
> --------------------------|----------------------------------------
> VERGEN_BUILD_TIMESTAMP |2018-08-09T15:15:57.282334589+00:000
> VERGEN_BUILD_DATE |2018-08-09
> VERGEN_SHA |75b390dc6c05a6a4aa2791cc7b3934591803bc22
> VERGEN_SHA_SHORT |75b390d
> VERGEN_COMMIT_DATE |2018-08-08
> VERGEN_TARGET_TRIPLE |x86_64-unknown-linux-gnu
> VERGEN_SEMVER |v3.0.0
> VERGEN_SEMVER_LIGHTWEIGHT |v3.0.0
I'll try patching out the timestamps with 1970-...
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#56893: rust-vergen inserts build timestamps, possible irreproducibility source
2022-08-02 16:57 bug#56893: rust-vergen inserts build timestamps, possible irreproducibility source Maxime Devos
@ 2022-08-02 17:14 ` Maxime Devos
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Devos @ 2022-08-02 17:14 UTC (permalink / raw)
To: 56893
[-- Attachment #1.1.1: Type: text/plain, Size: 852 bytes --]
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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-02 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 16:57 bug#56893: rust-vergen inserts build timestamps, possible irreproducibility source Maxime Devos
2022-08-02 17:14 ` Maxime Devos
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.