From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] gnu: python-2: update to 2.7.10. Date: Tue, 18 Aug 2015 12:48:15 -0500 Message-ID: References: <20150731180512.GA9619@debian> <87h9nwpqaq.fsf@gnu.org> <87y4h85zx1.fsf@dvorsak.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRkzq-00051n-AD for guix-devel@gnu.org; Tue, 18 Aug 2015 13:48:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRkzm-0002ch-7d for guix-devel@gnu.org; Tue, 18 Aug 2015 13:48:26 -0400 Received: from smtp3.openmailbox.org ([62.4.1.37]:60949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRkzl-0002cW-Up for guix-devel@gnu.org; Tue, 18 Aug 2015 13:48:22 -0400 In-Reply-To: <87y4h85zx1.fsf@dvorsak.fr> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Eric Dvorsak Cc: guix-devel@gnu.org, guix-devel-bounces+ericbavier=openmailbox.org@gnu.org On 2015-08-18 11:23, Eric Dvorsak wrote: > Ludovic Court=C3=A8s writes: >=20 >> eric@dvorsak.fr skribis: >>=20 >>> Altough the tests are still failing, I ran them after the build=20 >>> failed >>> with : >>>=20 >>> guix build -K >>> cd tmp/nix-build-* >>> env -i $(which bash) >>> source environment-variables >>>=20 >>> And they all passed except for some skips and a module that failed >>> trying to write to a dir without permissions. >>>=20 >>> Maybe there is a fix to do to enable the tests, the problem might be >>> coming from the OS module. They fail because of an OSError exception, >>> so I wonder if it could be because the module doesn't work withing=20 >>> the >>> chroot. >>=20 >> Wild guess: Could it be because Python=E2=80=99s bindings for =E2=80=98= popen=E2=80=99 or >> something like that refer to /bin/sh, which is unavailable in the >> chroot, leading to ENOENT? Could you =E2=80=98grep -r /bin/sh=E2=80=99= in the source? >>=20 >> Thanks, >> Ludo=E2=80=99. >=20 > Ag Results for `/bin/sh': >=20 > plat-freebsd4/regen:1:#! /bin/sh > plat-aix3/regen:1:#! /bin/sh > plat-beos5/regen:1:#! /bin/sh > plat-os2emx/regen:1:#! /bin/sh > distutils/tests/test_install_scripts.py:57: > write_script("shell.sh", ("#!/bin/sh\n" > distutils/tests/test_build_scripts.py:68: > ("#!/bin/sh\n" > distutils/tests/test_spawn.py:35: self.write_file(exe, > '#!/bin/sh\nexit 1') > distutils/tests/test_spawn.py:47: self.write_file(exe, > '#!/bin/sh\nexit 0') > test/test__osx_support.py:47: f.write("#!/bin/sh\n/bin/echo=20 > OK\n") > test/test__osx_support.py:59: f.write("#!/bin/sh\n/bin/echo > ExpectedOutput\n") > test/test__osx_support.py:150: > f.write("#!/bin/sh\n/bin/echo " + c_output) > test/test__osx_support.py:206: f.write("#!/bin/sh\nexit=20 > 255") > test/test_os.py:365: if os.path.exists("/bin/sh"): > test/test_os.py:367: with os.popen("/bin/sh -c 'echo > $HELLO'") as popen: > test/test_subprocess.py:862: os.write(f, "#!/bin/sh\n") > test/test_subprocess.py:906: os.write(f, "#!/bin/sh\n") > test/test_subprocess.py:925: sh =3D '/bin/sh' > test/test_subprocess.py:927: # Test will fail if /bin/sh is > a symlink to csh. > plat-irix5/regen:1:#! /bin/sh > plat-generic/regen:1:#! /bin/sh > plat-linux2/regen:1:#! /bin/sh > plat-netbsd1/regen:1:#! /bin/sh > ctypes/macholib/fetch_macholib:1:#!/bin/sh > plat-atheos/regen:1:#! /bin/sh > plat-aix4/regen:1:#! /bin/sh > plat-irix6/regen:1:#! /bin/sh > plat-freebsd6/regen:1:#! /bin/sh > plat-next3/regen:1:#! /bin/sh > plat-freebsd5/regen:1:#! /bin/sh >> This one ? >> popen2.py:84: cmd =3D ['/bin/sh', '-c', cmd] > plat-freebsd7/regen:1:#! /bin/sh > plat-darwin/regen:1:#! /bin/sh > subprocess.py:161:/bin/sh implicitly. This means that all characters, > including shell > subprocess.py:226:Replacing /bin/sh shell backquote > subprocess.py:559: >>> check_output(["/bin/sh", "-c", > subprocess.py:1209: args =3D ["/bin/sh", "-c"] + args > pipes.py:36:second likewise for the output. The command must be valid=20 > /bin/sh > pipes.py:262:# Reliably quote a string as a single argument for /bin/sh > plat-freebsd8/regen:1:#! /bin/sh > plat-sunos5/regen:1:#! /bin/sh > plat-unixware7/regen:1:#! /bin/sh >=20 >=20 > Here is the def : >=20 > def _run_child(self, cmd): > if isinstance(cmd, basestring): > cmd =3D ['/bin/sh', '-c', cmd] > os.closerange(3, MAXFD) > try: > os.execvp(cmd[0], cmd) > finally: > os._exit(1) >=20 >=20 > What should be done to fix this ? The python recipe already substitutes references to "/bin/sh" in=20 Lib/subprocess.py and Lib/popen2.py in the 'patch-lib-shells' phase. It=20 looks like some of the test files themselves need to be patched,=20 however. --=20 `~Eric