Package: mtools
Version: 4.0.33-1+really4.0.32-1
Severity: wishlist
User: [email protected]
Usertags: timestamps toolchain
X-Debbugs-Cc: [email protected]
Hi,
I came across timestamp differences in FAT filesystem images while
trying to build debian-installer with debrepro (among many other
things), and tracked it down to mmd/mcopy calls. Here's a short reproducer:
export SOURCE_DATE_EPOCH="$(date "+%s")"
imgprep() {
[ -f "$1" ] && rm "$1"
mkfs.msdos --invariant -v -i deb00001 -C "$1" 512
mmd -i "$1" ::foo
mcopy -i "$1" "$2" ::bar
}
dd if=/dev/random of=rand.img bs=512 count=200
TZ=UTC imgprep first.img rand.img
TZ=UTC-3 imgprep second.img rand.img
diffoscope first.img second.img
which shows an exact 3-hour difference in timestamps for me. AFAICT,
SOURCE_DATE_EPOCH is meant to be in UTC, so embedded timestamps and the
two files should be the same regardless of TZ or system timezone.