[freeciv/freeciv] 8ceeb5: tolua: Generate deterministic code

freeciv-commits <[email protected]>
Newsgroups gmane.games.freeciv.devel
Message-ID <freeciv/freeciv/push/refs/heads/main/[email protected]>
  Branch: refs/heads/main
  Home:   https://github.com/freeciv/freeciv
  Commit: 8ceeb5570bf2714ca9ee1d0f0e2e20a5f58ea436
      https://github.com/freeciv/freeciv/commit/8ceeb5570bf2714ca9ee1d0f0e2e20a5f58ea436
  Author: Bernhard M. Wiedemann <[email protected]>
  Date:   2026-08-19 (Wed, 19 Aug 2026)

  Changed paths:
    M dependencies/tolua-5.2/Makefile.am
    A dependencies/tolua-5.2/patch/08-gen-code-deterministic.patch
    M dependencies/tolua-5.2/src/bin/lua/package.lua
    M dependencies/tolua-5.2/src/bin/toluabind.c

  Log Message:
  -----------
  tolua: Generate deterministic code

Lua 5.2 and later seed their string hash function randomly,
so the pairs() iteration order over the usertype and collect
tables changes with every tolua run. tolua_reg_types() listed
usertypes in that varying order, making generated code and
freeciv binaries built from it differ between builds.

Sort the tables before writing them out, and drop the timestamp
from generated header files.

This change makes the freeciv package build reproducibly.

See https://reproducible-builds.org/ for why this matters.

See RM #2122

Signed-off-by: Bernhard M. Wiedemann <[email protected]>



To unsubscribe from these emails, change your notification settings at https://github.com/freeciv/freeciv/settings/notifications
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.