Remove timestamps from "phar".
authorVagrant Cascadian <vagrant@reproducible-builds.org>
Tue, 25 Apr 2023 18:20:24 +0000 (11:20 -0700)
committerOndřej Surý <ondrej@debian.org>
Fri, 27 Sep 2024 03:52:57 +0000 (05:52 +0200)
Thanks to Jelle van der Waa!

https://gist.github.com/jelly/96847934239aac19c512c54ca65d6baa

Gbp-Pq: Name 0046-Remove-timestamps-from-phar.patch

ext/phar/phar.c
ext/phar/util.c

index b774f22e2d5657ba96e41713bbd336eec680f1ab..441a422b5f600e74131cfb9e0c6c90ade6555bd4 100644 (file)
@@ -3002,7 +3002,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
                        4: metadata-len
                        +: metadata
                */
-               mytime = time(NULL);
+               mytime = 0;
                phar_set_32(entry_buffer, entry->uncompressed_filesize);
                phar_set_32(entry_buffer+4, mytime);
                phar_set_32(entry_buffer+8, entry->compressed_filesize);
index 352819bc9348bbebb472e86649fb4d398ab33192..7974398277dacde25fe7af3240e7699f9e4f10d6 100644 (file)
@@ -574,7 +574,7 @@ phar_entry_data *phar_get_or_create_entry_data(char *fname, size_t fname_len, ch
 
        phar_add_virtual_dirs(phar, path, path_len);
        etemp.is_modified = 1;
-       etemp.timestamp = time(0);
+       etemp.timestamp = 0;
        etemp.is_crc_checked = 1;
        etemp.phar = phar;
        etemp.filename = estrndup(path, path_len);