4

Simple example:

tar cf <archive_name> <file_name>
md5sum <archive_name>
touch <file_name>
tar cf <archive_name> <file_name>
md5sum <archive_name>

Results of md5sum are different.

How to avoid this?

  • 1
    Interesting, since tar does it's best to keep things as they are. I found this https://wiki.debian.org/ReproducibleBuilds/TimestampsInTarball which might help but I can't test since the option is not available in Mac OS X and I don't have access to a Linux box right away. – tgo Mar 08 '15 at 06:32

1 Answers1

3

Only different modify times (not access or change) cause this issue. As workaround: use --mtime to override file modify times with one predefined timestamp.