All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: cip-dev@lists.cip-project.org
Cc: Sai <Sai.Sathujoda@toshiba-tsip.com>,
	dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp,
	quirin.gylstorff@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [isar-cip-core][PATCH 2/5] initramfs-*-hook: Avoid open-coding IMAGE_FULLNAME
Date: Thu,  2 Mar 2023 21:30:51 +0100	[thread overview]
Message-ID: <4c5c5cddd691665c3ad06ea0740a7a98371fff2c.1677789054.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1677789054.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

We can't pull IMAGE_FULLNAME from the image class as this is a dpkg
class, but we should account for potential global changes to this
variable like done by kas/opt/test.yml. This will ensure that we stay
in sync with the generator in image_uuid.bbclass.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../initramfs-abrootfs-hook/initramfs-abrootfs-hook_0.1.bb  | 6 +++++-
 .../initramfs-verity-hook/initramfs-verity-hook_0.1.bb      | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/recipes-initramfs/initramfs-abrootfs-hook/initramfs-abrootfs-hook_0.1.bb b/recipes-initramfs/initramfs-abrootfs-hook/initramfs-abrootfs-hook_0.1.bb
index 8b1536f3..17c60da4 100644
--- a/recipes-initramfs/initramfs-abrootfs-hook/initramfs-abrootfs-hook_0.1.bb
+++ b/recipes-initramfs/initramfs-abrootfs-hook/initramfs-abrootfs-hook_0.1.bb
@@ -20,7 +20,11 @@ SRC_URI += "file://abrootfs.hook \
 
 ABROOTFS_IMAGE_RECIPE ?= "cip-core-image"
 
-IMAGE_UUID_ENV_FILE = "${DEPLOY_DIR_IMAGE}/${ABROOTFS_IMAGE_RECIPE}-${DISTRO}-${MACHINE}.uuid.env"
+# This is defined in image.bbclass which cannot be used in a package recipe.
+# However, we need to use IMAGE_FULLNAME to pick up any extensions of it.
+IMAGE_FULLNAME ??= "${ABROOTFS_IMAGE_RECIPE}-${DISTRO}-${MACHINE}"
+
+IMAGE_UUID_ENV_FILE = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.uuid.env"
 
 do_install[depends] += "${ABROOTFS_IMAGE_RECIPE}:do_generate_image_uuid"
 do_install[cleandirs] += " \
diff --git a/recipes-initramfs/initramfs-verity-hook/initramfs-verity-hook_0.1.bb b/recipes-initramfs/initramfs-verity-hook/initramfs-verity-hook_0.1.bb
index 59989081..3fc63ed2 100644
--- a/recipes-initramfs/initramfs-verity-hook/initramfs-verity-hook_0.1.bb
+++ b/recipes-initramfs/initramfs-verity-hook/initramfs-verity-hook_0.1.bb
@@ -27,7 +27,11 @@ DEBIAN_CONFLICTS = "initramfs-abrootfs-hook"
 
 VERITY_IMAGE_RECIPE ?= "cip-core-image"
 
-VERITY_ENV_FILE = "${DEPLOY_DIR_IMAGE}/${VERITY_IMAGE_RECIPE}-${DISTRO}-${MACHINE}.verity.env"
+# This is defined in image.bbclass which cannot be used in a package recipe.
+# However, we need to use IMAGE_FULLNAME to pick up any extensions of it.
+IMAGE_FULLNAME ??= "${VERITY_IMAGE_RECIPE}-${DISTRO}-${MACHINE}"
+
+VERITY_ENV_FILE = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.verity.env"
 
 do_install[depends] += "${VERITY_IMAGE_RECIPE}:do_image_verity"
 do_install[cleandirs] += " \
-- 
2.35.3



  parent reply	other threads:[~2023-03-02 20:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 20:30 [isar-cip-core][PATCH 0/5] Enable feature combinations of test and security extensions Jan Kiszka
2023-03-02 20:30 ` [isar-cip-core][PATCH 1/5] swupdate: Avoid open-coding IMAGE_FULLNAME Jan Kiszka
2023-03-02 20:30 ` Jan Kiszka [this message]
2023-03-02 20:30 ` [isar-cip-core][PATCH 3/5] start-qemu: Add support for booting test-extended images Jan Kiszka
2023-03-02 20:30 ` [isar-cip-core][PATCH 4/5] cip-core-image-security: Add support for SWUpdate Jan Kiszka
2023-03-02 20:30 ` [isar-cip-core][PATCH 5/5] security-customizations: Fix password hint Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c5c5cddd691665c3ad06ea0740a7a98371fff2c.1677789054.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=Sai.Sathujoda@toshiba-tsip.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=dinesh.kumar@toshiba-tsip.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=kazuhiro3.hayashi@toshiba.co.jp \
    --cc=quirin.gylstorff@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.