[erlang-questions] Reproducible and deterministic builds for GNU Guix (and Nix)

Pjotr Prins pjotr.public12@REDACTED
Fri Apr 8 21:46:21 CEST 2016


On Fri, Apr 08, 2016 at 05:06:49PM +0200, Joe Armstrong wrote:
> For your purposes I can write a script to call erlc and strip out the
> parts that make compilation reproducible. In the long term we should
> discuss this, figure out what the correct thing to do is, and then do it.

On the Erlang mailing list there is a discussion about removing time
stamps and creating a compile time switch for that. That would do, or
a post-processing script/hack would work for the time being - we can
easily incorporate that. The sooner we can do reproducible builds, the
sooner we can have Erlang and Elixir in Guix :)

BTW, having a SHA value inside beam/object files may sound useful, but
in the context of GNU Guix, and Nix, compiled files are immutable -
i.e. we guarantee they can not be modified (well, there may be a way
by overriding ro permissions, but that would mean a built in SHA can
also be changed). I guess you need it for hot reloading, but can't you
calculate the SHA on the fly for that? You'd need to open beam files
anyway to get the value(s) and they will be loaded by the OS unless
they are very large (> 8Mb).  I'd go by file stamps and if different
do a checksum. It only has to happen once for the original file.  

Pj.




More information about the erlang-questions mailing list