Demi Marie Obenour writes: > On 9/17/25 07:48, Alyssa Ross wrote: >> Demi Marie Obenour writes: >> >>> These would be ignored due to a missing -o pipefail in the shell script. >>> As a result, listing nonexistent s6-rc-compile inputs would cause a >>> broken image to be successfully built. >>> >>> Reported-by: Alyssa Ross >>> Link: https://spectrum-os.org/lists/archives/spectrum-devel/87segu879h.fsf@alyssa.is >>> Signed-off-by: Demi Marie Obenour >>> --- >>> host/rootfs/Makefile | 4 ++-- >>> img/app/Makefile | 4 ++-- >>> vm/sys/net/Makefile | 4 ++-- >>> 3 files changed, 6 insertions(+), 6 deletions(-) >>> >>> diff --git a/host/rootfs/Makefile b/host/rootfs/Makefile >>> index e96458dba06ae31129b115b2b649962f8d88187a..2288ae4d22ca817ba9fe8ebfc42326fe38b27c27 100644 >>> --- a/host/rootfs/Makefile >>> +++ b/host/rootfs/Makefile >>> @@ -169,8 +169,8 @@ build/etc/s6-rc: $(S6_RC_FILES) >>> mkdir -p $$(dirname $@) >>> rm -rf $@ >>> >>> - dir=$$(mktemp -d) && \ >>> - tar -c $(S6_RC_FILES) | tar -C $$dir -x --strip-components 2 && \ >>> + set -uo pipefail; dir=$$(mktemp -d) || exit; \ >>> + { tar -c $(S6_RC_FILES) | tar -C $$dir -x --strip-components 2; } && \ >>> s6-rc-compile $@ $$dir; \ >>> exit=$$?; rm -r $$dir; exit $$exit >>> >> >> What do the additional { } do? > Cause s6-rc-compile to be skipped if either tar command fails. Ah, like a subshell without creating a subshell! I haven't seen that before. Probably there are lots of places where I'm needlessly using subshells, then.