From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 15 Mar 2024 05:06:50 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rkyqI-0077ne-00 for lore@lore.pengutronix.de; Fri, 15 Mar 2024 05:06:50 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rkyqH-0002by-6N; Fri, 15 Mar 2024 05:06:49 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rkypi-0001cp-8a; Fri, 15 Mar 2024 05:06:14 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rkyph-006Qqj-SN; Fri, 15 Mar 2024 05:06:13 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rkyph-0032hV-2h; Fri, 15 Mar 2024 05:06:13 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 15 Mar 2024 05:06:13 +0100 Message-Id: <20240315040613.725358-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240220101909.1090342-1-rhi@pengutronix.de> References: <20240220101909.1090342-1-rhi@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] image-rauc: improve error detection for hook script X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 1da289a90f19c4f5aa56cf76c2c7a73aae5f756f. Michael [sent from post-receive hook] On Fri, 15 Mar 2024 05:06:13 +0100, Roland Hieber wrote: > If config/images/rauc-hooks.sh is not found, genimage will instead try > to copy a file with an empty file name from the temporary build folder, > resulting in the less helpful error message about "cp: -r not specified; > omitting directory". Catch this case early and error out with a better > message. > > Signed-off-by: Roland Hieber > Message-Id: <20240220101909.1090342-1-rhi@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/rules/image-rauc.make b/rules/image-rauc.make > index def2ade1e237..a05c19f61de2 100644 > --- a/rules/image-rauc.make > +++ b/rules/image-rauc.make > @@ -41,6 +41,10 @@ IMAGE_RAUC_BUNDLE_FORMAT := "crypt" > endif > > ifdef PTXCONF_IMAGE_RAUC_HOOK > +ifndef IMAGE_RAUC_HOOK_FILE > +$(error IMAGE_RAUC_HOOK is enabled, but config/images/rauc-hooks.sh was not \ > + found in any component of PTXDIST_PATH) > +endif > IMAGE_RAUC_ENV_HOOK = \ > RAUC_HOOK_FILE="file hooks.sh { image = \\"$(IMAGE_RAUC_HOOK_FILE)\\" }" \ > RAUC_HOOK_MANIFEST="filename=hooks.sh"