bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ODP: posix atime/ctime changes despite mtime being set


From: Piotr Łobacz
Subject: ODP: posix atime/ctime changes despite mtime being set
Date: Mon, 24 Jul 2023 18:20:50 +0000

Hi Sergey,
thx for quick response :D

I have also read the link you've given and there is this subsection:
Notice, that if you create an archive in POSIX format (see section GNU tar and 
POSIX tar) and the environment variable POSIXLY_CORRECT is set, then the two 
archives created using the same options on the same set of files will not be 
byte-to-byte equivalent even with the above option. This is because the posix 
default for extended header names includes the PID of the tar process, which is 
different at each run. To produce byte-to-byte equivalent archives in this 
case, either unset POSIXLY_CORRECT, or use the following option:

---pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,ctime:=0

, which I need to test but I suppouse that it should be without one - for 
pax-option

BR
Piotr

Od: Sergey Poznyakoff <gray@gnu.org.ua>
Wysłane: poniedziałek, 24 lipca 2023 18:43
Do: Piotr Łobacz <p.lobacz@welotec.com>
DW: bug-tar@gnu.org <bug-tar@gnu.org>
Temat: Re: posix atime/ctime changes despite mtime being set

Hi Piotr,

The --mtime option does not affect atime and ctime. If you want full
binary compatibility, use also the --pax-option option, e.g.:

  --pax-option 'atime:=0,ctime:=0'

or

  --pax-option 'delete=atime,delete=ctime'

See the end of subsection "Controlling Extended Header Keywords" of the
GNU tar manual for suggestions on how to create binary equivalent archives
in POSIX format.  It is available online at:

  https://www.gnu.org/software/tar/manual/html_node/PAX-keywords.html

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]