Hi again, this worked for me big thx to you Sergey.

BR
Piotr
________________________________
Od: bug-tar-bounces+p.lobacz=welotec....@gnu.org 
<bug-tar-bounces+p.lobacz=welotec....@gnu.org> w imieniu użytkownika Piotr 
Łobacz <p.lob...@welotec.com>
Wysłane: poniedziałek, 24 lipca 2023 20:20
Do: Sergey Poznyakoff <g...@gnu.org.ua>
DW: bug-tar@gnu.org <bug-tar@gnu.org>
Temat: ODP: posix atime/ctime changes despite mtime being set

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 <g...@gnu.org.ua>
Wysłane: poniedziałek, 24 lipca 2023 18:43
Do: Piotr Łobacz <p.lob...@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://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gnu.org%2Fsoftware%2Ftar%2Fmanual%2Fhtml_node%2FPAX-keywords.html&data=05%7C01%7Cp.lobacz%40welotec.com%7C770c8ef0bbea4fc5522a08db8c72d0b9%7C25111a7f1d5a4c51a4ca7f8e44011b39%7C0%7C0%7C638258196987082996%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PwG5wCUJAQeC2fCGGg%2F%2BkG9iS1Q6vbuJCeuKTOADZW0%3D&reserved=0<https://www.gnu.org/software/tar/manual/html_node/PAX-keywords.html>

Regards,
Sergey

Reply via email to