Bug#900410: mtools: please make the output reproducible (directory timestamps)

Chris Lamb lamby at debian.org
Wed May 30 11:50:07 BST 2018


Source: mtools
Version: 4.0.18-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps toolchain
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that mtools generates non-reproducible output.

This is because it uses the current time of day as a default
timestamp, such as when adding files to an existing file.

Patch attached that uses SOURCE_DATE_EPOCH [1].

 [0] https://reproducible-builds.org/
 [1] https://https://reproducible-builds.org/specs/source-date-epoch/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/direntry.c b/direntry.c
index c1d2ddd..284d0ae 100644
--- a/direntry.c
+++ b/direntry.c
@@ -24,6 +24,7 @@
 
 void initializeDirentry(direntry_t *entry, Stream_t *Dir)
 {
+	memset(entry, 0, sizeof(direntry_t));
 	entry->entry = -1;
 /*	entry->parent = getDirentry(Dir);*/
 	entry->Dir = Dir;


More information about the Reproducible-bugs mailing list