]> dgit.raspbian.org Git - php8.4.git/commitdiff
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>
Thu, 24 Sep 2026 17:16:18 +0000 (19:16 +0200)
Thanks to Jelle van der Waa!

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

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

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

index fc21692db2c168c843076b5f4afc0ac6079db1c2..e290c2be33d30873cb8b0a3f0c4c6b759a1c00f6 100644 (file)
@@ -2945,7 +2945,7 @@ int phar_flush_ex(phar_archive_data *phar, zend_string *user_stub, bool is_defau
                        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 f4de9922f899e71ae4e6f57c1a9538bdc339b1c8..a2393eba8b3c00d63b4880076d88aff5dde826ad 100644 (file)
@@ -730,7 +730,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);