commit:     e5a9c9adc17b23caef553261234630cbad4fccff
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 20 07:46:16 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Feb 20 07:46:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5a9c9ad

app-editors/emacs-vcs: Disable the sandbox only when dumping.

Note that unsetting LD_PRELOAD will have an effect only for
>=sys-apps/sandbox-2.13.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-editors/emacs-vcs/emacs-vcs-26.0.90.ebuild      | 12 ++++++++++--
 app-editors/emacs-vcs/emacs-vcs-26.0.91.ebuild      | 12 ++++++++++--
 app-editors/emacs-vcs/emacs-vcs-26.0.9999-r1.ebuild | 12 ++++++++++--
 app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild    | 12 ++++++++++--
 4 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/app-editors/emacs-vcs/emacs-vcs-26.0.90.ebuild 
b/app-editors/emacs-vcs/emacs-vcs-26.0.90.ebuild
index 2153ada2274..b332683366c 100644
--- a/app-editors/emacs-vcs/emacs-vcs-26.0.90.ebuild
+++ b/app-editors/emacs-vcs/emacs-vcs-26.0.90.ebuild
@@ -273,8 +273,16 @@ src_configure() {
 }
 
 src_compile() {
-       export SANDBOX_ON=0                     # for the unbelievers, see Bug 
#131505
-       emake
+       # Disable sandbox when dumping. For the unbelievers, see bug #131505
+       cat >src/temacs-wrapper <<-'EOF' || die
+               #!/bin/bash
+               export SANDBOX_ON=0
+               unset LD_PRELOAD
+               exec ./temacs "$@"
+       EOF
+       chmod +x src/temacs-wrapper || die
+
+       emake RUN_TEMACS="./temacs-wrapper"
 }
 
 src_install () {

diff --git a/app-editors/emacs-vcs/emacs-vcs-26.0.91.ebuild 
b/app-editors/emacs-vcs/emacs-vcs-26.0.91.ebuild
index 2153ada2274..b332683366c 100644
--- a/app-editors/emacs-vcs/emacs-vcs-26.0.91.ebuild
+++ b/app-editors/emacs-vcs/emacs-vcs-26.0.91.ebuild
@@ -273,8 +273,16 @@ src_configure() {
 }
 
 src_compile() {
-       export SANDBOX_ON=0                     # for the unbelievers, see Bug 
#131505
-       emake
+       # Disable sandbox when dumping. For the unbelievers, see bug #131505
+       cat >src/temacs-wrapper <<-'EOF' || die
+               #!/bin/bash
+               export SANDBOX_ON=0
+               unset LD_PRELOAD
+               exec ./temacs "$@"
+       EOF
+       chmod +x src/temacs-wrapper || die
+
+       emake RUN_TEMACS="./temacs-wrapper"
 }
 
 src_install () {

diff --git a/app-editors/emacs-vcs/emacs-vcs-26.0.9999-r1.ebuild 
b/app-editors/emacs-vcs/emacs-vcs-26.0.9999-r1.ebuild
index 2153ada2274..b332683366c 100644
--- a/app-editors/emacs-vcs/emacs-vcs-26.0.9999-r1.ebuild
+++ b/app-editors/emacs-vcs/emacs-vcs-26.0.9999-r1.ebuild
@@ -273,8 +273,16 @@ src_configure() {
 }
 
 src_compile() {
-       export SANDBOX_ON=0                     # for the unbelievers, see Bug 
#131505
-       emake
+       # Disable sandbox when dumping. For the unbelievers, see bug #131505
+       cat >src/temacs-wrapper <<-'EOF' || die
+               #!/bin/bash
+               export SANDBOX_ON=0
+               unset LD_PRELOAD
+               exec ./temacs "$@"
+       EOF
+       chmod +x src/temacs-wrapper || die
+
+       emake RUN_TEMACS="./temacs-wrapper"
 }
 
 src_install () {

diff --git a/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild 
b/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild
index e2c11b5e4c5..9cf901fe95f 100644
--- a/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild
+++ b/app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild
@@ -273,8 +273,16 @@ src_configure() {
 }
 
 src_compile() {
-       export SANDBOX_ON=0                     # for the unbelievers, see Bug 
#131505
-       emake
+       # Disable sandbox when dumping. For the unbelievers, see bug #131505
+       cat >src/temacs-wrapper <<-'EOF' || die
+               #!/bin/bash
+               export SANDBOX_ON=0
+               unset LD_PRELOAD
+               exec ./temacs "$@"
+       EOF
+       chmod +x src/temacs-wrapper || die
+
+       emake RUN_TEMACS="./temacs-wrapper"
 }
 
 src_install () {

Reply via email to