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


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

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.

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]