From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: Testing isolated builds Date: Wed, 20 Sep 2017 17:17:51 +0200 Message-ID: <20170920151751.GA5396@thebird.nl> References: <20170920121801.GA4332@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dugmN-0007Dp-S8 for guix-devel@gnu.org; Wed, 20 Sep 2017 11:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dugmJ-0003XO-IH for guix-devel@gnu.org; Wed, 20 Sep 2017 11:19:11 -0400 Received: from mail.thebird.nl ([95.154.246.10]:58701) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dugmJ-0003Vw-Ap for guix-devel@gnu.org; Wed, 20 Sep 2017 11:19:07 -0400 Content-Disposition: inline In-Reply-To: <20170920121801.GA4332@thebird.nl> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pjotr Prins Cc: guix-devel On Wed, Sep 20, 2017 at 02:18:01PM +0200, Pjotr Prins wrote: > I am facing some issues try to upgrade Elixir. The problem is that the > build fails on tests, but when I build by hand inside > /tmp/guix-build-elixir-1.5.1.drv-0/ the build passes. > > Is there an easy way to create a similarly restricted environment when > doing a build outside Guix? I.e., no $HOME, no /tmp access, no > network? Any hints on an approach? When I build with Guix I get an error test/elixir/kernel/dialyzer_test.exs:95 ** (File.CopyError) could not copy from "/tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tmp/dialyzer/Elixir.Dialyzer.ForBooleanCheck.beam" to "/tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tmp/dialyzer/line95/Elixir.Dialyzer.ForBooleanCheck.beam": no such file or directory code: copy_beam! context, Dialyzer.ForBooleanCheck stacktrace: (elixir) lib/file.ex:631: File.cp!/3 test/elixir/kernel/dialyzer_test.exs:96: (test) When I try: ./pre-inst-env guix environment erlang -C --ad-hoc erlang vim make \ glibc-utf8-locales git --pure \ --share=/tmp/guix-build-elixir-1.5.1.drv-12 That gives me a clean environment, but now all effing tests pass! The Guix build environment does not create /tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tmp for some reason. Because when then test fails it does not exist. The Elixir.Dialyzer.ForBooleanCheck.beam is never created. It is weird. Could it be file permissions? I think mkdir_p would throw a descriptive error if it fails. If no one has an idea here I'll try and plug in informative errors. But it is a royal pain I can't reproduce the error in guix environment. Pj. --