Hello list,
On 12/04/2022 08:44, Roland Clobus wrote:
> I'll follow-up soon with an updated patch.
As discussed, I've updated the patch.
For Lua-based TeX binaries, only when FORCE_SOURCE_DATE=1 and
SOURCE_DATE_EPOCH are set, this will initialise the Lua seed to the
value of SOURCE_DATE_EPOCH instead of a random value.
With this patch, the .fmt files can be generated bit-for-bit identical.
Regarding the patch:
* This patch is intended only for Lua 5.3 that is embedded in
texlive-binaries
* A re-definition of `luai_makeseed` is unfortunately not sufficient for
Lua 5.3, for 5.4.4 and later it would be. [1]
* I've added no validation for the content of SOURCE_DATE_EPOCH:
** 1) That happens in other code locations already
** 2) Even if the value would be incorrect, the Lua seed will still be
de-randomized
* Do you want some comment lines?
* The sorting from by previous patch is no longer required. Only
lstate.c needs to be modified.
With kind regards,
Roland Clobus
PS: If you later intend to upgrade to another version of Lua, the fixed
seed value can help you in automated tests to see different behaviour
due to the upgrade.
[1]
https://github.com/lua/lua/commit/97e394ba1805fbe394a5704de660403901559e54
Thank you very much for your patch, I will check it this weekend.
--
luigi