From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 22 Oct 2024 10:27:44 +0200 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 1t3AEy-007OSf-1t for lore@lore.pengutronix.de; Tue, 22 Oct 2024 10:27:44 +0200 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 1t3AEy-0005jb-B2; Tue, 22 Oct 2024 10:27:44 +0200 Received: from mail.thorsis.com ([2003:a:e28:26e4::10]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t3AEq-0005jM-6h; Tue, 22 Oct 2024 10:27:36 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 941D6148AFBA; Tue, 22 Oct 2024 10:27:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1729585655; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=Me9d4Z6Ex5IriL/NTU+YWIkvLtqRZ4YmH78CPetW+14=; b=VHBixi8+MEk/Hs6rYtOrUPw59RidkBspNI3uvuhGj/ntabcer2am2JjsOtt0hlZelOgwZ3 VwUP0URRDE7LpAKWsh1ft9xu9XITzg83MG6kObCJG0eUMdWB0gkMpaLi+FBAdjs0+QtszK GUoiyQH8iZQPTAfWQEXJp1BMJ0wRyO4orzddWTBF9nI5wGMf4NHO5ioCCAQ9J1hctX8H8r KGpkKpkXmZ4VJoBZIjTXLinlBb7j4W51qPQK7bA4F8XRm1nHweGT8Ayk5fXZ17f2n65CaR izXacRM5Uy8rKRbyODnyglOIH1gfhUXXHPoy9M2eIjnGIU2ezLnMK0lOdlfo5w== From: Alexander Dahl To: ptxdist@pengutronix.de Date: Tue, 22 Oct 2024 10:27:30 +0200 Message-Id: <20241022082730.133421-1-ada@thorsis.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] ptxd_lib_template: image-fit: Add second replacement run 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 The @PACKAGE@ inside of $CODE_SIGNING_VARS was not replaced before, leading to output in the make rule like this: IMAGE_@PACKAGE@_SIGN_ROLE := # TODO: role name of the code signing provider, passed to cs_get_uri IMAGE_@PACKAGE@_KEY_NAME_HINT := # TODO: key-name-hint property in the signature node of the FIT image After a second replacement run on the already created rule, it looks like this now (for image fit package named 'foo'): IMAGE_FOO_SIGN_ROLE := # TODO: role name of the code signing provider, passed to cs_get_uri IMAGE_FOO_KEY_NAME_HINT := # TODO: key-name-hint property in the signature node of the FIT image Fixes: c9659e6c318f ("templates: add template for custom FIT images") Signed-off-by: Alexander Dahl --- scripts/lib/ptxd_lib_template.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh index cc512faa1..163f4c828 100644 --- a/scripts/lib/ptxd_lib_template.sh +++ b/scripts/lib/ptxd_lib_template.sh @@ -625,6 +625,10 @@ IMAGE_@PACKAGE@_KEY_NAME_HINT := # TODO: key-name-hint property in the signature ;; esac ptxd_template_write_platform_rules + # second replacement run for @PACKAGE@ nested in CODE_SIGNING_VARS + filename="${PTXDIST_PLATFORMCONFIGDIR}/rules/${class}${package_filename}.make" + tmpfile="$(mktemp "${PTXDIST_TEMPDIR}/template_new_image_fit.XXXXXXXX")" + ptxd_replace_magic "${filename}" > "${tmpfile}" && mv "${tmpfile}" "${filename}" } export -f ptxd_template_new_image_fit ptxd_template_help_list[${#ptxd_template_help_list[@]}]="image-fit" base-commit: 49049c01b0a932c74c77b64f1b42c85141fec8e4 -- 2.39.5