Skip to content

remove randomness from reprotest

For several variations, reprotest selects a random value, which can make it difficult to debug reproducibility issues when it depends on that exact issue, and can end up with misleading results with reprotest if the particular randomly chosen thing does not trigger the reproducibility issue.

In short, running reprotest twice on the same machine, with the same source, in the same build environment should not get different results because of something reprotest picked randomly!

A few things I noticed at a quick glance:

fileordering:

disorderfs --shuffle-dirents=yes (should probably be reverse, which guarantees a difference more systematically)

https://salsa.debian.org/reproducible-builds/reprotest/-/blob/0.7.22/reprotest/build.py#L273

number of CPUs uses "shuf":

https://salsa.debian.org/reproducible-builds/reprotest/-/blob/0.7.22/reprotest/build.py#L346

locales (fixed in git 610e6cae):

https://salsa.debian.org/reproducible-builds/reprotest/-/blob/0.7.22/reprotest/build.py#L372

time (should always be set to ensure different month, day and year, at least now+397 days or something similar)

https://salsa.debian.org/reproducible-builds/reprotest/-/blob/0.7.22/reprotest/build.py#L411

user/group:

https://salsa.debian.org/reproducible-builds/reprotest/-/blob/0.7.22/reprotest/build.py#L485