makedist: Reset tar timestamps to the commit date (#13879)

This change should make the underlying `.tar` archive fully reproducible (given
identical tool versions).
This commit is contained in:
Tim Düsterhus 2024-04-04 13:26:27 +02:00 committed by GitHub
parent e7462bff19
commit c89d797a41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 ..