From 738de9ecdec45ebfeb999628742373b5f8253bd0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Dec 2021 12:40:03 -0800 Subject: Omit devmajor and devminor for non-special files * src/create.c (start_header): Leave the devmajor and devminor fields empty for files that are not character and block special devices, even when the archive format is pax, ustar or v7. This avoids generating irrelevant differences which helps with reproducible builds, and is more compatible with what Solaris 10 tar does. --- src/create.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/create.c b/src/create.c index 8ee63e1e..c88c248d 100644 --- a/src/create.c +++ b/src/create.c @@ -881,12 +881,6 @@ start_header (struct tar_stat_info *st) if (!MINOR_TO_CHARS (devminor, header->header.devminor)) return NULL; } - else if (archive_format != GNU_FORMAT && archive_format != OLDGNU_FORMAT) - { - if (!(MAJOR_TO_CHARS (0, header->header.devmajor) - && MINOR_TO_CHARS (0, header->header.devminor))) - return NULL; - } if (archive_format == POSIX_FORMAT) { -- cgit v1.2.1