From c89d797a41ed9a81debfd4eaafd9e5ea7ac984b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 4 Apr 2024 13:26:27 +0200 Subject: [PATCH] makedist: Reset tar timestamps to the commit date (#13879) This change should make the underlying `.tar` archive fully reproducible (given identical tool versions). --- scripts/dev/makedist | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dev/makedist b/scripts/dev/makedist index 8e53f1d73a8..ffdf5369076 100755 --- a/scripts/dev/makedist +++ b/scripts/dev/makedist @@ -167,8 +167,9 @@ else fi # Reset the modification and access times of all files to be packaged. -echo "makedist: Resetting the modification and access times of package files." -touch -c NEWS +commitDate="$(git log -1 --format=%cI $treeish)" +echo "makedist: Resetting the modification and access times of package files to $commitDate" +touch -c -d"$commitDate" NEWS find . -exec touch -r NEWS -c {} \; cd ..