[GRASS-dev] [GRASS GIS] #3042: Patches to make the build reproducible (fileordering, randomness)
GRASS GIS
trac at osgeo.org
Tue May 31 10:40:13 PDT 2016
#3042: Patches to make the build reproducible (fileordering, randomness)
--------------------------+-------------------------
Reporter: sebastic | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 7.0.5
Component: Compiling | Version: 7.0.4
Resolution: | Keywords:
CPU: Unspecified | Platform: Linux
--------------------------+-------------------------
Comment (by glynn):
Replying to [ticket:3042 sebastic]:
> 2) Randomness issue: html/colortables/random.png is built using a
pseudo-random generator seeded with build-time value. See patch `04
-srand48_auto-from-SOURCE_DATE_EPOCH.patch` that uses the [https
://reproducible-builds.org/specs/source-date-epoch/ SOURCE_DATE_EPOCH]
environment variable (when set) to set a seed from last `debian/changelog`
entry date.
While I agree with the idea, G_srand48_auto() shouldn't be using this
variable directly, but something more appropriate, e.g. GRASS_RANDOM_SEED
(or GRASS_RND_SEED, which is what r.mapcalc used prior to the RNG
changes).
Debian can then set that variable from $SOURCE_DATE_EPOCH as part of their
build process.
In theory, modules which use randomness should be providing a command-line
option to get the seed, with G_srand48_auto() only being used if the user
specifically wants a non-deterministic seed. But that probably isn't going
to happen in the foreseeable future.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3042#comment:3>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list