From c3dcad735f350145abc6da96b09e47812d7de487 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 10 Jul 2026 17:21:59 +0100 Subject: [PATCH] nginx.eclass: avoid heredoc in global scope A heredoc may cause the use of a temporary file with < EAPI 9 and even then still with >= EAPI 9 if the input is large. This becomes a problem if sandboxing is applied to metadata generation. Closes: https://bugs.gentoo.org/978940 Signed-off-by: Sam James --- eclass/nginx.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/nginx.eclass b/eclass/nginx.eclass index c77cbcf64eb20..1212d296173b1 100644 --- a/eclass/nginx.eclass +++ b/eclass/nginx.eclass @@ -376,7 +376,8 @@ _ngx_set_mod_required_use() { if has "${mod}" "${_NGX_MODULES[@]#+}"; then result='' # Feed comma-delimited dependencies into the dep_list array. - IFS=, read -ra dep_list <<< "${_NGX_DEP_TABLE[${mod}]}" + mapfile -td ',' dep_list < <(printf %s "${_NGX_DEP_TABLE[${mod}]}") + for dep in "${dep_list[@]}"; do has "${dep}" "${_NGX_MODULES[@]#+}" && result+=" nginx_modules_${dep}"