From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 06 Feb 2024 12:42:00 +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 1rXJpv-005cW5-0o for lore@lore.pengutronix.de; Tue, 06 Feb 2024 12:42:00 +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 1rXJpw-0003oJ-8H; Tue, 06 Feb 2024 12:42:00 +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 1rXJpY-0003np-2H; Tue, 06 Feb 2024 12:41:36 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.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 1rXJpX-004oaK-ET; Tue, 06 Feb 2024 12:41:35 +0100 Received: from rhi by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rXJpX-00EDYQ-1A; Tue, 06 Feb 2024 12:41:35 +0100 Date: Tue, 6 Feb 2024 12:41:35 +0100 From: Roland Hieber To: Alexander Dahl Message-ID: <20240206114135.onulp52e3yk2hhap@pengutronix.de> References: <20240202151209.2535721-1-ada@thorsis.com> <20240202151209.2535721-6-ada@thorsis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240202151209.2535721-6-ada@thorsis.com> Subject: Re: [ptxdist] [PATCH 5/5] image-rauc: Fix quotation marks / whitespace handling 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: Enrico Jorns , AVazquez , ptxdist@pengutronix.de, Bastian Krause 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 On Fri, Feb 02, 2024 at 04:12:09PM +0100, Alexander Dahl wrote: > If you had set > PTXCONF_IMAGE_RAUC_DESCRIPTION="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}" > like DistroKit-2023.12.0 does, target update.raucb failed with > 'command not found' because of wrong quoting and interpreting parts of > PTXCONF_IMAGE_RAUC_DESCRIPTION as command. > > Signed-off-by: Alexander Dahl Huh. Strange, I never got such an error all the times I built the DistroKit update.raucb. I guess the bundle description in DistroKit is unfortunate enough; this is in the output of 'ptxdist -v image update.raucb': RAUC_BUNDLE_DESCRIPTION=""Pengutronix" "DistroKit"" … and bash interprets that as an empty string, a plain word, a quoted space, another plain word, and another empty string, and concatenates that into RAUC_BUNDLE_DESCRIPTION as expected. I guess if your bundle description contains any special chars like '(' or '$', bash starts interpreting those as bash syntax instead of plain words, which could lead to the error you see. Anyway, your patch gives me the correct results. Reviewed-by: Roland Hieber > --- > rules/image-rauc.make | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rules/image-rauc.make b/rules/image-rauc.make > index e267e78c6..def2ade1e 100644 > --- a/rules/image-rauc.make > +++ b/rules/image-rauc.make > @@ -56,7 +56,7 @@ IMAGE_RAUC_ENV = \ > RAUC_BUNDLE_FORMAT=$(IMAGE_RAUC_BUNDLE_FORMAT) \ > RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_RAUC_BUNDLE_VERSION))" \ > RAUC_BUNDLE_BUILD=$(call ptx/sh, date +%FT%T%z) \ > - RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \ > + RAUC_BUNDLE_DESCRIPTION="$(call remove_quotes, $(PTXCONF_IMAGE_RAUC_DESCRIPTION))" \ > $(IMAGE_RAUC_ENV_HOOK) \ > RAUC_KEY="$(shell cs_get_uri update)" \ > RAUC_CERT="$(shell cs_get_uri update)" \ > -- > 2.39.2 > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |