all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Pjotr Prins <pjotr.public12@thebird.nl>Pjotr Prins
	<pjotr.public12@thebird.nl>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Testing isolated builds
Date: Wed, 20 Sep 2017 17:49:05 +0200	[thread overview]
Message-ID: <877ewtbcb2.fsf@fastmail.com> (raw)
In-Reply-To: <20170920151751.GA5396@thebird.nl>

[-- Attachment #1: Type: text/plain, Size: 2004 bytes --]

Pjotr Prins <pjotr.public12@thebird.nl> writes:

> 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.

IIRC the main difference between `guix environment -C` and the build
container is that /bin/sh is present in the former.  Maybe grep for it?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2017-09-20 15:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 12:18 Testing isolated builds Pjotr Prins
2017-09-20 15:17 ` Pjotr Prins
2017-09-20 15:49   ` Marius Bakke [this message]
2017-09-20 15:37 ` Marius Bakke
2017-09-20 15:54 ` Hartmut Goebel
2017-09-20 15:56 ` Testing isolated builds (now w/ attachment) Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ewtbcb2.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.