Project

General

Profile

Actions

Bug #2122

closed

reproducible builds (lua)

Added by Bernhard M. Wiedemann 24 days ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
08/06/2026
Due date:
% Done:

0%

Estimated time:

Description

While working on reproducible builds for openSUSE, I found that
our freeciv-3.2.5 package varied between builds from parts generated by tolua.

I attached a fix for main that allows bit-identical builds. Please review/merge.


Files


Related issues 1 (0 open1 closed)

Blocks Bug #2133: toluabind.c compile failure because of nullptrClosedMarko Lindqvist08/13/2026

Actions
Actions #1

Updated by Marko Lindqvist 24 days ago

  • Category set to General
  • Target version set to 3.2.6
Actions #2

Updated by Marko Lindqvist 23 days ago

Do you have any idea of the root cause - why isn't the order (->tolua) deterministic and requires such "fixing"?

Actions #3

Updated by Bernhard M. Wiedemann 23 days ago

In lua and most other hash implementations, there is a random seed used for the hash indexing to mitigate an attack that sends elements crafted specifically to all hash into the same bucket which would DoS the software. The downside is that iteration order becomes as random as the seed.

So we need to sort when iterating to get stable ordering out.

And there was a date added.

Updated by Marko Lindqvist 22 days ago

- Backported to S3_3 & S3_2
- On all branches, did an additional round of building tolua + generating toluabind.c with it, so that the generated file comes from the updated version (and tolua of that branch)

Actions #5

Updated by Marko Lindqvist 17 days ago

  • Blocks Bug #2133: toluabind.c compile failure because of nullptr added
Actions #6

Updated by Marko Lindqvist 16 days ago

Marko Lindqvist wrote in #note-4:

did an additional round of building tolua + generating toluabind.c with it

And that breaks some CI jobs with this patch, because of #2133.

I think we need to go with Bernhard's original patch in main.

Actions #7

Updated by Marko Lindqvist 11 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF