GNU bug report logs - #50015
Rust packages are not reproducible

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 11 Aug 2021 21:16:01 UTC

Severity: normal

Full log


Message #20 received at 50015 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 50015 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#50015: Rust packages are not reproducible
Date: Wed, 04 Oct 2023 11:05:01 -0400
Hi Efraim,

Efraim Flashner <efraim <at> flashner.co.il> writes:

> On Tue, Oct 03, 2023 at 11:30:15PM -0400, Maxim Cournoyer wrote:
>> Hello,
>> 
>> Ludovic Courtès <ludo <at> gnu.org> writes:
>> 
>> > Hello!
>> >
>> > Efraim Flashner <efraim <at> flashner.co.il> skribis:
>> >
>> >> I tried patching this a couple of ways, but it looks like the best
>> >> option is going to be a 'patch-and-repack phase after 'install. the
>> >> .crate file is really a gzip tarball, and I suspect that each time we
>> >> run 'cargo <something>' the timestamp gets updated.
>> >
>> > So that ‘Cargo.toml’ file is not something taken from the build tree?
>> > In that case we could reset the timestamp before the tarball is
>> > created.  But otherwise yeah, patch’n’repack.
>> 
>> A better solution would be to have cargo honor SOURCE_DATE_EPOCH,
>> perhaps?  They'd probably accept such an improvement upstream.
>
> That'd be an interesting idea, having 'cargo package' set the timestamp
> of all the files to SOURCE_DATE_EPOCH.  I guess I can look into how
> feasible that would be and if they'd be likely to accept a change like
> that.
>
> I have a local patch which unpacks, resets the timestamp and repacks the
> crate. I'll definitely push it to the rust-team branch before the next
> merge.
>
> With it I introduced an issue where the 'package phase would repack all
> the crates, not just the current one, and ran into our
> underscore-to-dash naming convention causing issues with how I'm reusing
> the filename to work on the crate. I'll fix that, probably by only
> repacking the current crate instead of all crates in the environment.

From past interactions with Rust developers (via their web-based chat
system), I could get some change merged rather easily.  If you are
motivated to fix it cleanly I encourage you to pursue that way!

-- 
Thanks,
Maxim




This bug report was last modified 1 year and 296 days ago.

Previous Next


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