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 825541EEDD; Fri, 19 Sep 2025 07:46:28 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 92FD51EE5F; Fri, 19 Sep 2025 07:46:25 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) by atuin.qyliss.net (Postfix) with ESMTPS id A3D7B1EE5E for ; Fri, 19 Sep 2025 07:46:23 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 62DF4EC0252; Fri, 19 Sep 2025 03:46:21 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Fri, 19 Sep 2025 03:46:21 -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=fm3; t=1758267981; x=1758354381; bh=bxwmv120o+ 515OloopYFDQGRrgP8ad7aRW8zT+yKe1o=; b=Q/wV6yHjrv1Pg/awqvMXdON8mZ WiFczWs51tCLn7RXPUYdNLeVdFwzHbknfgR3XJaDgXnZ8XHaKYxOF0TYQhiq5RWe W3Pxe+s8q85qkhejlIEs2U5nG74sCYsATmak8gf9MgE8us0d+8vY7iATnEI2KzMr qrT9W2/C605+OoDXafEMPyqmXEtYK1YVIqHhUgaGLu6nNokkzC3boUr9qM/RKhRl 7qKUsyuqSD/hWUVYpbP+A8WMDR0hTU7VNWABW9w0TYlxcvXOaTvnMk5ByyY/ZFJx nFTQW6nyInQRLUIGYIcLw8QR450yOgUNSTAyTch2i8C9Q4oqhOLAN3ommR0A== 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=fm1; t= 1758267981; x=1758354381; bh=bxwmv120o+515OloopYFDQGRrgP8ad7aRW8 zT+yKe1o=; b=MokJ25TFm+7WR6PxObBTfNLIrO1ZupsVwsqj78EVrutcUqPLLOv fe+4m2n8XTntbZRlh9D4bW76Rb8EVt6wO5etR2lbcOBbT9NmmEehrCmQPksVlKhu gK+X2PYKrMlZWnRDwQB7OkbyFX4Kt4G2k2PhrrIvHJIywHNqoWhlSDuNIZpIUdJP Fp40UYySkgF3rQSz0U+/7vsl9Nbv+UWOmD3JdU47Z2hn2y0/ridbCHXBY0Ng8VYY pvzLg7/oe7XeggEpesQQ4+s43YX7yJfdoZ+zSTWvFwN1iRY+87W24g76DRAyxRdX noaB4EEa7vVyDO499fkmbzIyjHkdiYkfbNQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegkeeihecutefuodetggdotefrod 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; Fri, 19 Sep 2025 03:46:20 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id DB4C91F87874; Fri, 19 Sep 2025 09:46:18 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v3 1/4] Do not ignore errors from tar In-Reply-To: References: <20250911-genfiles-v3-0-d8709081dc5c@gmail.com> <20250911-genfiles-v3-1-d8709081dc5c@gmail.com> <87ms6txptr.fsf@alyssa.is> Date: Fri, 19 Sep 2025 09:46:11 +0200 Message-ID: <871po228cc.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: EOIEGN2YUHAVT24FE52MGVCLSUS2GB53 X-Message-ID-Hash: EOIEGN2YUHAVT24FE52MGVCLSUS2GB53 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 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 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..2288ae4d22ca817ba9fe8eb= fc42326fe38b27c27 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaM0KQwAKCRBbRZGEIw/w oi+cAP4uGN07dwboFM63tUSeWEBD2jTNonC2cRVx3Zej1VAQaAEAuHtqdA6ZjONb l9NRCuVFIG5ZREAOK9x5nSktor1s8gU= =1nWK -----END PGP SIGNATURE----- --=-=-=--