GNU bug report logs -
#56893
rust-vergen inserts build timestamps, possible irreproducibility source
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 02-08-2022 20:41, Geert Stappers wrote:
> Date: Tue, 2 Aug 2022 19:18:46 +0200, From: Maxime Devos
>> In Guix, I've noticed that rust-vergen embeds build timestamps. There is also
>> a work-around available: <https://issues.guix.gnu.org/56893#1>.
>
>
> Thanks for reporting the FTBR.
>
> Please update the workaround, so it looks more
> like https://en.wikipedia.org/wiki/Diff#Unified_format
> and can be absured by https://en.wikipedia.org/wiki/Patch_(Unix)
>
>
> Just telling the filename that needs modification would be a great help.
Oops, I did not send the full work-around, here it is:
> (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;")
> (("\\bUtc::now\\(\\)") "Utc.timestamp(0, 0)"))))))
(Should hopefully be clearer now!)
The important thing here is replacing all instances of Utc::now()
(across all Rust source files of rust-vergen) by Utc.timestamp(0, 0),
the rest is just adding the required imports -- I have not made a list
of all file names. If you want a list, try "grep -rF Utc::now" or such.
I do not intend to update the workaround, it works fine in Guix and
frankly porting it to whatever format Debian likes is Debian's concern,
not Guix', I'm just sharing our workaround as a courtesy to another distro.
Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
This bug report was last modified 2 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.