Skip to content

Commit

Permalink
Use rust birthday for HeaderMode::Deterministic timestamp (#262)
Browse files Browse the repository at this point in the history
As described in rust-lang/crates.io#3859, the current arbitrary
timestamp of 123456789 leads to Debian packages being auto-rejected due
to the old timestamp.  This happens for any timestamps before 1975.

Instead of 123456789, use another, more recent arbitrary timestamp --
the timestamp of the first commit for what would become Rust.

graydon/rust-prehistory@b0fd440
  • Loading branch information
jamessan authored Aug 23, 2021
1 parent a746675 commit 60c6bd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,9 @@ impl Header {
//
// We just need things to be deterministic here so just pick
// something that isn't zero. This time, chosen after careful
// deliberation, corresponds to Nov 29, 1973.
self.set_mtime(123456789);
// deliberation, corresponds to Jul 23, 2006 -- the date of the
// first commit for what would become Rust.
self.set_mtime(1153704088);

self.set_uid(0);
self.set_gid(0);
Expand Down

0 comments on commit 60c6bd8

Please sign in to comment.