satis icon indicating copy to clipboard operation
satis copied to clipboard

Files mtime changes when TMPDIR is on another partition

Open boldhedgehog opened this issue 9 years ago • 3 comments

Hi,

We've faced a bug with files mtime was changed in ZIP archives to current system time. First Composer and Satis download packages, then unpack them via TMPDIR, then pack them back to the archive dist directory.

When TMPDIR is located on another partition, PHP move function copies the file (which is obvious), and it changes the modification time. This leads to different SHA1 hash compared to the original package, and it is new every time we perform purge/build sequence.

The workaround for this was to set TMPDIR environment variable for satis build command to a location on the same partition.

I'm not sure the code should be changed to also copy the file attributes, but perhaps this nuance should be mentioned in the documentation.

boldhedgehog avatar Jul 08 '16 07:07 boldhedgehog

Yeah I am not sure if I should mark this as a bug, or just consider it a shortcoming of the features/functionality provided by PHP, and accept that some things just are the way they are. As far as documentation goes, there virtually is none for Satis.

alcohol avatar Jul 12 '16 08:07 alcohol

It would be appreciated by others facing this issue, if you would add this either to the documentation or FAQ.

boldhedgehog avatar Aug 12 '16 14:08 boldhedgehog

We have neither.

alcohol avatar Aug 15 '16 06:08 alcohol