When writing a header with no format explicitly specified, the first
thing archive/tar 1.10 does is round the header's ModTime field,
possibly up, which confuses our change-detection logic when we later go
to check if the result of untarring the archive matches the source
content. Truncate the timestamp before that can happen.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When we know we're going to extract the contents of a tar archive as
part of a copying process, set the desired format in the tar header to
PAX so that we get subsecond precision in timestamps, so that the
timestamps on the copies that we create aren't rounded off.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>