From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: Testing isolated builds Date: Wed, 20 Sep 2017 17:49:05 +0200 Message-ID: <877ewtbcb2.fsf@fastmail.com> References: <20170920121801.GA4332@thebird.nl> <20170920151751.GA5396@thebird.nl> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duhFR-0006wc-8e for guix-devel@gnu.org; Wed, 20 Sep 2017 11:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duhFM-0003hQ-2f for guix-devel@gnu.org; Wed, 20 Sep 2017 11:49:13 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35253) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duhFL-0003gz-Vk for guix-devel@gnu.org; Wed, 20 Sep 2017 11:49:08 -0400 In-Reply-To: <20170920151751.GA5396@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 Pjotr Prins Cc: guix-devel --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Pjotr Prins 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. >>=20 >> 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=20 > > 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.ForBooleanCh= eck.beam" to "/tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tm= p/dialyzer/line95/Elixir.Dialyzer.ForBooleanCheck.beam": no such file or di= rectory > 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=3D/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 r= eason. > Because when then test fails it does not exist. The Elixir.Dialyzer.ForBo= oleanCheck.beam is never created. > > It is weird. > > Could it be file permissions? I think mkdir_p would throw a descriptive e= rror if it fails.=20 > > If no one has an idea here I'll try and plug in informative errors. But i= t 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? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlnCjfEACgkQoqBt8qM6 VPpJfQf/RVUDovbUBn7j9a7gsdop7FPntvBiIobnWTFdWZP2lAgWJ695CbNVBTx4 gorfjC8u3dbmceDuKrYnZqae9Twwmi3LaRYHoZlxR4h5cajYZMRSLDvbes/ZiYfV hpgIvaFdmWokFpaVzpGgWvtgsHh6zMcw1dyyuICXlid6LbqiCcUvWZTzxw9vBU9T A5vQBIQg+zRpHrrAyQ9IZpaZ/CWtAMEYcOKyug1FQ26bS6T8e5lMyrvVuZRSKGZN TyMAXyVLzDN0wfTpzg0Y4AbBKUHlVY5Xk/++NE/CIUsvIugTW4xoo42gNqTecXTB g0TSYX+LkEZdw9tzRySNt3+ukXsbpw== =g9Jx -----END PGP SIGNATURE----- --=-=-=--