commit:     8b2c35ac92ac6644a09d897c1616ed3753396bff
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 23 18:03:38 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Jun 23 18:03:38 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=8b2c35ac

sci-mathematics/petsc: Avoid a sandbox violation, bug #548498

Package-Manager: portage-2.2.18

 sci-mathematics/petsc/ChangeLog          | 4 ++++
 sci-mathematics/petsc/petsc-3.5.3.ebuild | 7 +++++++
 sci-mathematics/petsc/petsc-3.6.0.ebuild | 7 +++++++
 3 files changed, 18 insertions(+)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index 858b694..1f8dcbb 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  23 Jun 2015; Matthias Maier <[email protected]> petsc-3.5.3.ebuild,
+  petsc-3.6.0.ebuild:
+  sci-mathematics/petsc: Avoid a sandbox violation, bug #548498
+
 *petsc-3.6.0 (23 Jun 2015)
 
   23 Jun 2015; Matthias Maier <[email protected]>

diff --git a/sci-mathematics/petsc/petsc-3.5.3.ebuild 
b/sci-mathematics/petsc/petsc-3.5.3.ebuild
index 09e5bfb..c7f0269 100644
--- a/sci-mathematics/petsc/petsc-3.5.3.ebuild
+++ b/sci-mathematics/petsc/petsc-3.5.3.ebuild
@@ -74,6 +74,13 @@ src_prepare() {
 }
 
 src_configure() {
+       # bug 548498
+       # PETSc runs mpi processes during configure that result in a sandbox
+       # violation by trying to open /proc/mtrr rw. This is not easy to
+       # mitigate because it happens in libpciaccess.so called by libhwloc.so,
+       # which is used by libmpi.so.
+       addpredict /proc/mtrr
+
        # petsc uses --with-blah=1 and --with-blah=0 to en/disable options
        petsc_enable() {
                use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"

diff --git a/sci-mathematics/petsc/petsc-3.6.0.ebuild 
b/sci-mathematics/petsc/petsc-3.6.0.ebuild
index 6c96de3..d7ee394 100644
--- a/sci-mathematics/petsc/petsc-3.6.0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.6.0.ebuild
@@ -77,6 +77,13 @@ src_prepare() {
 }
 
 src_configure() {
+       # bug 548498
+       # PETSc runs mpi processes during configure that result in a sandbox
+       # violation by trying to open /proc/mtrr rw. This is not easy to
+       # mitigate because it happens in libpciaccess.so called by libhwloc.so,
+       # which is used by libmpi.so.
+       addpredict /proc/mtrr
+
        # petsc uses --with-blah=1 and --with-blah=0 to en/disable options
        petsc_enable() {
                use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"

Reply via email to