diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2013-07-02 02:04:18 +0000 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2013-07-02 02:04:18 +0000 |
commit | 6571ac0a20646ecaabb2ab6e3577f49704532dd5 (patch) | |
tree | 3776c29e2fe4de4a9dd73c3667d7b03b7fbb1354 /sys-cluster/openmpi | |
parent | revbump; migrate -> distutils-r1 (diff) | |
download | gentoo-2-6571ac0a20646ecaabb2ab6e3577f49704532dd5.tar.gz gentoo-2-6571ac0a20646ecaabb2ab6e3577f49704532dd5.tar.bz2 gentoo-2-6571ac0a20646ecaabb2ab6e3577f49704532dd5.zip |
Do not override malloc when in a sandbox environment. Resolves #462602.
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 4D7043C9)
Diffstat (limited to 'sys-cluster/openmpi')
-rw-r--r-- | sys-cluster/openmpi/ChangeLog | 9 | ||||
-rw-r--r-- | sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch | 42 | ||||
-rw-r--r-- | sys-cluster/openmpi/openmpi-1.6.4-r1.ebuild (renamed from sys-cluster/openmpi/openmpi-1.6.4.ebuild) | 6 |
3 files changed, 52 insertions, 5 deletions
diff --git a/sys-cluster/openmpi/ChangeLog b/sys-cluster/openmpi/ChangeLog index 9f65aeec11d3..444501817fd6 100644 --- a/sys-cluster/openmpi/ChangeLog +++ b/sys-cluster/openmpi/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/openmpi # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/ChangeLog,v 1.118 2013/04/05 18:11:44 jsbronder Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/ChangeLog,v 1.119 2013/07/02 02:04:18 jsbronder Exp $ + +*openmpi-1.6.4-r1 (02 Jul 2013) + + 02 Jul 2013; Justin Bronder <jsbronder@gentoo.org> -openmpi-1.6.4.ebuild, + +openmpi-1.6.4-r1.ebuild, + +files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch: + Do not override malloc when in a sandbox environment. Resolves #462602. 05 Apr 2013; Justin Bronder <jsbronder@gentoo.org> openmpi-1.6.4.ebuild: Export FAKEROOTKEY in src_test to workaround hang in sandbox. See #462602. diff --git a/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch new file mode 100644 index 000000000000..5683c81b44c7 --- /dev/null +++ b/sys-cluster/openmpi/files/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch @@ -0,0 +1,42 @@ +From 094de74dc5e518a931c495692143ea3282553674 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 1 Jul 2013 20:37:17 -0400 +Subject: [PATCH] hooks: disable malloc override inside of Gentoo sandbox + +As described in the comments in the source, Gentoo's own version of +fakeroot, sandbox, also runs into hangs when malloc is overridden. +Sandbox environments can easily be detected by looking for SANDBOX_PID +in the environment. When detected, employ the same fix used for +fakeroot. + +See https://bugs.gentoo.org/show_bug.cgi?id=462602 +--- + opal/mca/memory/linux/hooks.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c +index 6a1646f..ce91e76 100644 +--- a/opal/mca/memory/linux/hooks.c ++++ b/opal/mca/memory/linux/hooks.c +@@ -747,9 +747,16 @@ static void opal_memory_linux_malloc_init_hook(void) + "fakeroot" build environment that allocates memory during + stat() (see http://bugs.debian.org/531522). It may not be + necessary any more since we're using access(), not stat(). But +- we'll leave the check, anyway. */ ++ we'll leave the check, anyway. ++ ++ This is also an issue when using Gentoo's version of 'fakeroot', ++ sandbox v2.5. Sandbox environments can also be detected fairly ++ easily by looking for SANDBOX_PID. ++ */ ++ + if (getenv("FAKEROOTKEY") != NULL || +- getenv("FAKED_MODE") != NULL) { ++ getenv("FAKED_MODE") != NULL || ++ getenv("SANDBOX_PID") != NULL ) { + return; + } + +-- +1.8.1.5 + diff --git a/sys-cluster/openmpi/openmpi-1.6.4.ebuild b/sys-cluster/openmpi/openmpi-1.6.4-r1.ebuild index 52e6815eb895..aa6503360b18 100644 --- a/sys-cluster/openmpi/openmpi-1.6.4.ebuild +++ b/sys-cluster/openmpi/openmpi-1.6.4-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/openmpi-1.6.4.ebuild,v 1.2 2013/04/05 18:11:44 jsbronder Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/openmpi-1.6.4-r1.ebuild,v 1.1 2013/07/02 02:04:18 jsbronder Exp $ EAPI=5 @@ -96,6 +96,7 @@ src_prepare() { echo 'oob_tcp_listen_mode = listen_thread' \ >> opal/etc/openmpi-mca-params.conf fi + epatch "${FILESDIR}"/hooks-disable-malloc-override-inside-of-Gentoo-sandb.patch } src_configure() { @@ -155,8 +156,5 @@ src_install () { src_test() { # Doesn't work with the default src_test as the dry run (-n) fails. - - # Do not override malloc during build. Works around #462602 - export FAKEROOTKEY=1 emake -j1 check || die "emake check failed" } |