mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] ptxd_lib_template: image-fit: Fix nested replacement
@ 2024-10-23  6:06 Alexander Dahl
  2024-10-30  8:00 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Dahl @ 2024-10-23  6:06 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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

Using shell variables before assignement, 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 <ada@thorsis.com>
---

Notes:
    v2:
    - use shell variables to set $CODE_SIGNING_VARS to avoid second
      replacement run
    - reword commit message accordingly
    
    v1:
    - Link: https://lore.ptxdist.org/ptxdist/20241022082730.133421-1-ada@thorsis.com/T/#u

 scripts/lib/ptxd_lib_template.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
index cc512faa1..ce20ae705 100644
--- a/scripts/lib/ptxd_lib_template.sh
+++ b/scripts/lib/ptxd_lib_template.sh
@@ -615,8 +615,8 @@ ptxd_template_new_image_fit() {
 	    export select_CODE_SIGNING="select CODE_SIGNING
 	"
 	    export CODE_SIGNING_VARS="
-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
+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
 "
 	;;
 	*)

base-commit: 49049c01b0a932c74c77b64f1b42c85141fec8e4
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] ptxd_lib_template: image-fit: Fix nested replacement
  2024-10-23  6:06 [ptxdist] [PATCH v2] ptxd_lib_template: image-fit: Fix nested replacement Alexander Dahl
@ 2024-10-30  8:00 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-10-30  8:00 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

Thanks, applied as b67947db5769533df662efaf52fcde3ecbcea8fe.

Michael

[sent from post-receive hook]

On Wed, 30 Oct 2024 09:00:40 +0100, Alexander Dahl <ada@thorsis.com> wrote:
> 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
> 
> Using shell variables before assignement, 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 <ada@thorsis.com>
> Message-Id: <20241023060628.8357-1-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
> index cc512faa1821..ce20ae705bc6 100644
> --- a/scripts/lib/ptxd_lib_template.sh
> +++ b/scripts/lib/ptxd_lib_template.sh
> @@ -615,8 +615,8 @@ ptxd_template_new_image_fit() {
>  	    export select_CODE_SIGNING="select CODE_SIGNING
>  	"
>  	    export CODE_SIGNING_VARS="
> -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
> +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
>  "
>  	;;
>  	*)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-30  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-23  6:06 [ptxdist] [PATCH v2] ptxd_lib_template: image-fit: Fix nested replacement Alexander Dahl
2024-10-30  8:00 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox