From: Mike Frysinger Date: Sun, 11 Mar 2018 22:30:04 +0000 (-0400) Subject: sys-apps/sed: use bootstrap logic with USE=forced-sandbox #650052 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1088728d5541b66d6e572a431ac15d1013f8fc7d;p=gentoo.git 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 --- 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 @@ sed - Always enable --sandbox mode for simpler/secure runtime (disables e/r/w commands) + + 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). + 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"