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 CEDFC13A01; Wed, 17 Sep 2025 11:48:38 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 914D613971; Wed, 17 Sep 2025 11:48:35 +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-a6-smtp.messagingengine.com (fhigh-a6-smtp.messagingengine.com [103.168.172.157]) by atuin.qyliss.net (Postfix) with ESMTPS id 05B271396F for ; Wed, 17 Sep 2025 11:48:34 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4BDAE140003D; Wed, 17 Sep 2025 07:48:33 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 17 Sep 2025 07:48:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=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=1758109713; x=1758196113; bh=s/eqPHhGHR 0gF0+j1UZmGF1ewUmFic+DPwlaXfbk8Xo=; b=gVVkm8JW4K5nks+109UTk5VDhy 6vk1/nfW0A92KwUx9VGIx4cigT676hhHJS43dYeKfiyd3wFYVDSSCOWpTGQEwLhY iC7f1nkL8MkRf3WknWMfYEVnBmthsNz2agvG8OgPn+L6FY0ok4h5Vp/AiUAXnLJT VAl2RSkadgbg4g/U4LQfMAH2mhZ/uw9gVILUqJGg6yOh6mlLxZ1pWoJ/i3S3y2aK 13B7fxKkgEswsB87q+TzGXdVg0hNddY8rUyiibeUc+Ces4Jh0VaDlZi7HsTU7Q/n Tc61llhzfTC/lwI3/zJquUAhNRIC8mYMdKTKExF9ztIctdz0SeLr2be2yWLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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= 1758109713; x=1758196113; bh=s/eqPHhGHR0gF0+j1UZmGF1ewUmFic+DPwl aXfbk8Xo=; b=nqEmJgGionxxU3lVThNdYknlyigeTD0M+5faW7T4ADt4ZU4Ec+k V9zg9ayBabrAykAP0zee9QINAOtsw9c7B3ZI4Nu9EMn2yjlFWDhycM9gzKvijQS0 AKipQM91Fq8i/jYEviDPi2a0PScFvBfZ1Secs0SEMt8p3SRcCocDo7bXcqhm9PM+ Mq2GvjBcpbdK4cH0VpLCkHMASl+kTD3tAwHOueqYgV45ZQYhYFn32COKOgcUf7pa NyRzXNB8sHlLeXw+G/o6JJX6Dg6opJ5BmVv6iT3I31g339/bYKbUxOAydCD6Y+Hp 6KovHDgbma+w80HJeMm+QAH/W7DCoXHKegg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegfeefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvffujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcutfho shhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeduffeiueeltd ehveehfeeiteevveffhfdvudethfeivdfgheeitdeffeelvefgudenucffohhmrghinhep shhpvggtthhruhhmqdhoshdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrdhishdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggvmhhiohgsvghnohhurhesgh hmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlsehsphgvtghtrhhumhdqohhsrdho rhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Sep 2025 07:48:32 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 008A51F5104A; Wed, 17 Sep 2025 13:48:16 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour , Spectrum OS Development Subject: Re: [PATCH v3 1/4] Do not ignore errors from tar In-Reply-To: <20250911-genfiles-v3-1-d8709081dc5c@gmail.com> References: <20250911-genfiles-v3-0-d8709081dc5c@gmail.com> <20250911-genfiles-v3-1-d8709081dc5c@gmail.com> Date: Wed, 17 Sep 2025 13:48:16 +0200 Message-ID: <87ms6txptr.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: JAS6372R4Q2KELKXXCK4YKLAT2CCLQPI X-Message-ID-Hash: JAS6372R4Q2KELKXXCK4YKLAT2CCLQPI 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 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: > 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.fs= f@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..2288ae4d22ca817ba9fe8ebfc= 42326fe38b27c27 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 What do the additional { } do? > diff --git a/img/app/Makefile b/img/app/Makefile > index 9665a6b7158f2d8b183831202a4559ae06d53d16..73db07cc4c781d9c41cdf41a6= 214298aae8de58a 100644 > --- a/img/app/Makefile > +++ b/img/app/Makefile > @@ -117,8 +117,8 @@ build/etc/s6-rc: $(VM_S6_RC_FILES) > mkdir -p $$(dirname $@) > rm -rf $@ >=20=20 > - dir=3D$$(mktemp -d) && \ > - tar -c $(VM_S6_RC_FILES) | tar -C $$dir -x --strip-components 2 && \ > + set -uo pipefail; dir=3D$$(mktemp -d) || exit; \ > + { tar -c $(VM_S6_RC_FILES) | tar -C $$dir -x --strip-components 2; = } && \ > s6-rc-compile $@ $$dir; \ > exit=3D$$?; rm -r $$dir; exit $$exit >=20=20 > diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile > index 755b145175199aa97049dbd7feadc0e76230cf30..88ae20de79cd21b06263837f9= 0310e8800b3d4e2 100644 > --- a/vm/sys/net/Makefile > +++ b/vm/sys/net/Makefile > @@ -82,8 +82,8 @@ build/etc/s6-rc: $(VM_S6_RC_FILES) > mkdir -p $$(dirname $@) > rm -rf $@ >=20=20 > - dir=3D$$(mktemp -d) && \ > - tar -c $(VM_S6_RC_FILES) | tar -C $$dir -x --strip-components 2 && \ > + set -uo pipefail; dir=3D$$(mktemp -d) || exit; \ > + { tar -c $(VM_S6_RC_FILES) | tar -C $$dir -x --strip-components 2; = } && \ > s6-rc-compile $@ $$dir; \ > exit=3D$$?; rm -r $$dir; exit $$exit >=20=20 > > --=20 > 2.51.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaMqgAAAKCRBbRZGEIw/w omfbAQCzcs+zZYTX0MKpF0A0YwQuTiUlvVVg1/zdHM+1qFB22QEAy020/h70PzQy xgb8st41pWUXUOW//jfkfT0oPf2JDAo= =x0QS -----END PGP SIGNATURE----- --=-=-=--