From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: Reproducible and deterministic builds for GNU Guix (and Nix) Date: Fri, 8 Apr 2016 21:46:21 +0200 Message-ID: <20160408194621.GA21757@thebird.nl> References: <20160408065934.GA18715@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: erlang-questions-bounces@erlang.org Sender: erlang-questions-bounces@erlang.org To: Joe Armstrong Cc: guix-devel@gnu.org, Leo Famulari , Erlang , Magnus Henoch List-Id: guix-devel.gnu.org 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.