Hi! I'm trying to generate a reproducible archive of a directory contianing a number of files using tar 1.34; there are just directories and files, no device nodes or stuff like that. That archive (with a completely bit-identical tree to be archived) is once generated on an ext4 filesystem, and once within a Docker container (so there is an overlay filesystem in place.)
It boils down to a call like this:
tar --sort=name
\
--mtime="@${SOURCE_DATE_EPOCH:-$(date +%s)}"
\
--owner=0
\
--group=0
\
--numeric-owner
\
--format=pax
\
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime,delete=devmajor,delete=devminor
\
-cf - "${basename_dir}"
| \
gzip -n9 > "${artifacts_dir}/${tarball_filename}"
(The "delete=devmajor,delete=devminor" part was a test.) However, I
face an issue: With ext4, a devmajor / devminor is placed into the
archive, set to "0000000". With the overlayfs, the fields are filled
with 0x00 bytes. The "delete=devmajor,delete=devminor" was a test to
get rid of that data, but this didn't work.
Do you have any suggestion for me to get rid of the
devmajor/devminor content in the headers? Or should my approach in
theory work and it's a small bug that it doesn't remove the "0000000"?
Thanks,
Jan-Benedict Glaw
--
signature.asc
Description: PGP signature
