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
<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>
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"