From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 852807F93; Tue, 30 Sep 2025 13:00:01 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id EF5C17EDF; Tue, 30 Sep 2025 12:59:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) by atuin.qyliss.net (Postfix) with ESMTPS id AB12B7EDB for ; Tue, 30 Sep 2025 12:59:56 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id D9FDA1400230; Tue, 30 Sep 2025 08:59:54 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 30 Sep 2025 08:59:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1759237194; x=1759323594; bh=q0Hbqe1S2Z 8+IGYQX1QAScCk6+yfAL/UlOxp8douCBM=; b=bdmfCKzOMgYEyrbHrOevOvKkYt OMtxbGmxZ2+Bp4+Hbj3x0Jk0h8/FWdahSUu/frObfgxy5hKvC2kbx0tPjaKxq7NP wYQkElD5Lw9u4LCky4gBpNpLrZUejDzF9kF54zSn7xQOYQ73441GDDGAMdYigCuq HPGcsa8AfLVnFsPSd6UjoLgskVAlilClX9yp7UhryNPg4fQG85z94RREb3Mcd3rv 8+w9/4qbExLNZuoRlRyz0IBSz+4wbSe6GIWjemap5xMFTWq5uA3KISV0rCVo7ZIM XEdC6bhiqfMU6GN4pueOgTQawtG+/W4Hp4+9Ugx+W+cW+bj53SlYa+yNYK5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1759237194; x=1759323594; bh=q0Hbqe1S2Z8+IGYQX1QAScCk6+yfAL/UlOx p8douCBM=; b=Jy3rgny6c3LwowbMECrKgeeCYJUJ6NS2WbAzQS9nWAwgmebTHEd tHM3gQrmkCSQyVVVTk2SMduMtQsdjvf6mEBCo0RAcOpzaLzCuKElDvfUivJLwasK toQyy13Ubexj+49Z8H43PD/lEVBL3povH/AkwjcJyWLHh/5oJsg7vvfGLwtbhR7D Qj6ItIBs3YaIvwKM+bMhxgKDlm5SjA31oMT29fMNHOHXS1QtfeP7fFupJ/L/X/xL V+YI/iJ7DYxD787udsW14Fa1Y4sw6pAnQe8RPyFMqYKc3G2qJHVGCBnlEtIYXS+O 32+kChggz6dShT/yitrRk3KY2mFNVrjZRfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdektdelfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepveejieekhe ffueehjeevtdekleelhfehhfelgeffieeiuddvueeifeetkeelffdvnecuffhomhgrihhn pehsphgvtghtrhhumhdqohhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthho pedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghmihhosggvnhhouhhrse hgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhruhhmqdhoshdr ohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Sep 2025 08:59:54 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id BDD215D1C3FD; Tue, 30 Sep 2025 14:59:52 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v3 1/4] Do not ignore errors from tar In-Reply-To: <871po228cc.fsf@alyssa.is> References: <20250911-genfiles-v3-0-d8709081dc5c@gmail.com> <20250911-genfiles-v3-1-d8709081dc5c@gmail.com> <87ms6txptr.fsf@alyssa.is> <871po228cc.fsf@alyssa.is> Date: Tue, 30 Sep 2025 14:59:51 +0200 Message-ID: <874iskt7so.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: HX2BQZBWZPWWSV2A2ES7KY5VL6BIZZGH X-Message-ID-Hash: HX2BQZBWZPWWSV2A2ES7KY5VL6BIZZGH X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Alyssa Ross writes: > Demi Marie Obenour writes: > >> On 9/17/25 07:48, Alyssa Ross wrote: >>> Demi Marie Obenour writes: >>>=20 >>>> These would be ignored due to a missing -o pipefail in the shell scrip= t. >>>> 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..2288ae4d22ca817ba9fe8e= bfc42326fe38b27c27 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 $@ >>>>=20=20 >>>> - dir=3D$$(mktemp -d) && \ >>>> - tar -c $(S6_RC_FILES) | tar -C $$dir -x --strip-components 2 && \ >>>> + set -uo pipefail; dir=3D$$(mktemp -d) || exit; \ >>>> + { tar -c $(S6_RC_FILES) | tar -C $$dir -x --strip-components 2; = } && \ >>>> s6-rc-compile $@ $$dir; \ >>>> exit=3D$$?; rm -r $$dir; exit $$exit >>>>=20=20 >>>=20 >>> 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. Fixed the ones I could find in https://spectrum-os.org/git/spectrum/commit/?id=3D7ce3a09b48a53ec4c23edf713= b9c3b1ee2de3339 :) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaNvURwAKCRBbRZGEIw/w oqnbAPwOx/0vviuAy/kqEHxyOTwPWi94JFMzt6xy2QHG2Cq7sQEA8onWuZc5Iq70 7l1GprrJOSL5dVDIIH6p0/coI8D8AwI= =0K1v -----END PGP SIGNATURE----- --=-=-=--