summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2018-03-11 18:30:04 -0400
committerMike Frysinger <vapier@gentoo.org>2018-03-11 18:36:28 -0400
commit1088728d5541b66d6e572a431ac15d1013f8fc7d (patch)
tree69a468e7b2c9368fe7c2e36a4749cabd48663bdc /sys-apps/sed
parentsys-apps/sed: update bootstrap logic #650052 (diff)
downloadgentoo-1088728d5541b66d6e572a431ac15d1013f8fc7d.tar.gz
gentoo-1088728d5541b66d6e572a431ac15d1013f8fc7d.tar.bz2
gentoo-1088728d5541b66d6e572a431ac15d1013f8fc7d.zip
sys-apps/sed: use bootstrap logic with USE=forced-sandbox #650052
The build system runs sed scripts that use r (read) commands, so if the system version had sandbox enabled, we won't be able to rebuild sed. Use the existing bootstrap logic so people can enable/disable this flag on the fly w/out wedging their systems. Bug: https://bugs.gentoo.org/650052
Diffstat (limited to 'sys-apps/sed')
-rw-r--r--sys-apps/sed/metadata.xml6
-rw-r--r--sys-apps/sed/sed-4.4-r1.ebuild4
2 files changed, 7 insertions, 3 deletions
diff --git a/sys-apps/sed/metadata.xml b/sys-apps/sed/metadata.xml
index ea2a7bdbf75c..504b6a5e4649 100644
--- a/sys-apps/sed/metadata.xml
+++ b/sys-apps/sed/metadata.xml
@@ -9,6 +9,10 @@
<remote-id type="sourceforge">sed</remote-id>
</upstream>
<use>
- <flag name="forced-sandbox">Always enable --sandbox mode for simpler/secure runtime (disables e/r/w commands)</flag>
+ <flag name="forced-sandbox">
+ Always enable --sandbox mode for simpler/secure runtime (disables e/r/w commands).
+ Note: This may break many configure scripts, so it should be avoided on dev systems
+ (and generally used on binpkg/final systems only).
+ </flag>
</use>
</pkgmetadata>
diff --git a/sys-apps/sed/sed-4.4-r1.ebuild b/sys-apps/sed/sed-4.4-r1.ebuild
index 194b1b193692..39c3d130eacf 100644
--- a/sys-apps/sed/sed-4.4-r1.ebuild
+++ b/sys-apps/sed/sed-4.4-r1.ebuild
@@ -21,8 +21,8 @@ DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
src_bootstrap_sed() {
- # make sure system-sed works #40786
- if ! type -p sed > /dev/null ; then
+ # make sure system-sed works #40786 #650052
+ if ! type -p sed > /dev/null || has_version 'sys-apps/sed[forced-sandbox]' ; then
mkdir -p "${T}/bootstrap"
printf '#!/bin/sh\nexec busybox sed "$@"\n' > "${T}/bootstrap/sed" || die
chmod a+rx "${T}/bootstrap/sed"