Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Sebastian Bergmann
Am 29.11.2023 um 08:12 schrieb Derick Rethans: Not really, as a hash doesn't directly tell me the date/time, and neither would it help in dev branches / checkouts where the latest changes haven't been comiited yet. I do not see how date/time help with seeing what was compiled. -- PHP

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Derick Rethans
On 29 November 2023 00:48:28 GMT, Matthew Weier O'Phinney wrote: >On Tue, Nov 28, 2023, 5:28 PM Derick Rethans wrote: > >> On 28 November 2023 17:28:18 GMT, Sebastian Bergmann >> wrote: >> >> >While we could probably replace __DATE__ and __TIME__ with >> SOURCE_DATE_EPOCH [3] [4], I cannot

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Sebastian Bergmann
Am 28.11.2023 um 19:40 schrieb Ilija Tovilo: At least for core, enabled-by-default extensions, __DATE__ and __TIME__ seem to be the only variables. I can get reproducible builds by setting SOURCE_DATE_EPOCH. Confirmed: I can get reproducible builds, too, by using CLANG and setting

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Sebastian Bergmann
Am 29.11.2023 um 07:23 schrieb Sebastian Bergmann: SOURCE_DATE_EPOCH=$(git log -1 --pretty=%cI) should do the trick. What I meant to write was SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct), of course. Sorry for the noise. -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Sebastian Bergmann
Am 29.11.2023 um 01:54 schrieb Marco Pivetta: Also, refs have a timestamp :-) SOURCE_DATE_EPOCH=$(git log -1 --pretty=%cI) should do the trick. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Marco Pivetta
On Wed, 29 Nov 2023 at 01:48, Matthew Weier O'Phinney < mweierophin...@gmail.com> wrote: > On Tue, Nov 28, 2023, 5:28 PM Derick Rethans wrote: > > > On 28 November 2023 17:28:18 GMT, Sebastian Bergmann > > wrote: > > > > >While we could probably replace __DATE__ and __TIME__ with > >

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Matthew Weier O'Phinney
On Tue, Nov 28, 2023, 5:28 PM Derick Rethans wrote: > On 28 November 2023 17:28:18 GMT, Sebastian Bergmann > wrote: > > >While we could probably replace __DATE__ and __TIME__ with > SOURCE_DATE_EPOCH [3] [4], I cannot help but wonder whether having the date > and time when the executable was

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Derick Rethans
On 28 November 2023 17:28:18 GMT, Sebastian Bergmann wrote: >While we could probably replace __DATE__ and __TIME__ with SOURCE_DATE_EPOCH >[3] [4], I cannot help but wonder whether having the date and time when the >executable was built in the executable is actually useful. How attached are we

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Marco Pivetta
On Tue, 28 Nov 2023 at 19:40, Ilija Tovilo wrote: > That said, I wouldn't object to removing the date either. > Wishful thinking, but perhaps a GIT ref of some sort would be a good replacement too, if the working copy is clean. I wouldn't put too much weight on it, but that would certainly

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Ilija Tovilo
Hi Sebastian On Tue, Nov 28, 2023 at 6:28 PM Sebastian Bergmann wrote: > > I recently watched a video [1] that once again brought the topic of > reproducible builds [2] to my attention. > ... > I have not yet checked whether usage of the __DATE__ and __TIME__ macros > is the only thing that

[PHP-DEV] Reproducible Builds

2023-11-28 Thread Sebastian Bergmann
I recently watched a video [1] that once again brought the topic of reproducible builds [2] to my attention. I believe that reproducible builds are becoming more and more important and that the build of the PHP interpreter/runtime should become reproducible. Right now, compiling the same