From: Henning Schild <henning.schild@siemens.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>
Cc: isar-users@googlegroups.com,
Adriaan Schmidt <adriaan.schmidt@siemens.com>,
clara.kowalsky@siemens.com
Subject: Re: [PATCH v3 1/1] replace custom OVA logic with imagetype logic
Date: Wed, 7 Jun 2023 14:02:23 +0200 [thread overview]
Message-ID: <20230607140223.5d375f2c@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20230210084044.714348-1-felix.moessbauer@siemens.com>
Am Fri, 10 Feb 2023 08:40:44 +0000
schrieb Felix Moessbauer <felix.moessbauer@siemens.com>:
> This patch refactors the imagetypes_vm class for virtualbox and vmware
> images. The existing manual implementation does not work anymore when
> referencing ova config files across layers. Instead, we now use the
> imagetypes logic, which avoids the problematic changes of
> FILESEXTRAPATHS and SRC_URI.
>
> Acked-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> Changes since v2:
>
> - removed API-CHANGELOG-ENTRY as recommended by reviewer
>
> Changes since v1:
>
> - append with += to IMAGER_INSTALL:ova
>
> Note:
>
> The following pattern does NOT work: IMAGER_INSTALL:append:ova.
> The reason is that we unconditionally append to the variable in
> the machine config. This pattern is known as not supported.
>
> Felix
>
> .../images/virtualbox}/vm-img-virtualbox.ovf.tmpl | 0
> .../recipes-core/images/vmware}/vm-img-vmware.ovf.tmpl | 0
> meta/classes/imagetypes_vm.bbclass | 9
Why that rename actually? This is an API change for downstream layers
who do not overwrite OVF_TEMPLATE_FILE but only have meta not meta-isar.
I think it should be moved back to meta so other projects do not have
to include meta-isar as a layer.
Henning
> +++------ 3 files changed, 3 insertions(+), 6 deletions(-)
> rename {meta/classes/vm-img =>
> meta-isar/recipes-core/images/virtualbox}/vm-img-virtualbox.ovf.tmpl
> (100%) rename {meta/classes/vm-img =>
> meta-isar/recipes-core/images/vmware}/vm-img-vmware.ovf.tmpl (100%)
>
> diff --git a/meta/classes/vm-img/vm-img-virtualbox.ovf.tmpl
> b/meta-isar/recipes-core/images/virtualbox/vm-img-virtualbox.ovf.tmpl
> similarity index 100% rename from
> meta/classes/vm-img/vm-img-virtualbox.ovf.tmpl rename to
> meta-isar/recipes-core/images/virtualbox/vm-img-virtualbox.ovf.tmpl
> diff --git a/meta/classes/vm-img/vm-img-vmware.ovf.tmpl
> b/meta-isar/recipes-core/images/vmware/vm-img-vmware.ovf.tmpl
> similarity index 100% rename from
> meta/classes/vm-img/vm-img-vmware.ovf.tmpl rename to
> meta-isar/recipes-core/images/vmware/vm-img-vmware.ovf.tmpl diff
> --git a/meta/classes/imagetypes_vm.bbclass
> b/meta/classes/imagetypes_vm.bbclass index 81ef866f..41f2af06 100644
> --- a/meta/classes/imagetypes_vm.bbclass +++
> b/meta/classes/imagetypes_vm.bbclass @@ -6,11 +6,8 @@
> inherit buildchroot
>
> -USING_OVA = "${@bb.utils.contains('IMAGE_BASETYPES', 'ova', '1',
> '0', d)}" -
> -FILESEXTRAPATHS:prepend := "${LAYERDIR_core}/classes/vm-img:"
> OVF_TEMPLATE_FILE ?= "vm-img-virtualbox.ovf.tmpl"
> -SRC_URI += "${@'file://${OVF_TEMPLATE_FILE}' if
> d.getVar('USING_OVA') == '1' else ''}" +IMAGE_SRC_URI:ova =
> "file://${OVF_TEMPLATE_FILE}"
> IMAGE_TYPEDEP:ova = "wic"
> IMAGER_INSTALL:ova += "qemu-utils gawk uuid-runtime"
> @@ -67,8 +64,8 @@ OVA_VARS = "OVA_NAME OVA_MEMORY OVA_NUMBER_OF_CPU
> OVA_VRAM \ OVA_FIRMWARE OVA_ACPI OVA_3D_ACCEL \
> OVA_SHA_ALG VIRTUAL_MACHINE_IMAGE_FILE"
>
> -TEMPLATE_FILES += "${@'${OVF_TEMPLATE_FILE}' if
> d.getVar('USING_OVA') == '1' else ''}" -TEMPLATE_VARS += "${OVA_VARS}"
> +IMAGE_TEMPLATE_FILES:ova = "${OVF_TEMPLATE_FILE}"
> +IMAGE_TEMPLATE_VARS:ova = "${OVA_VARS}"
>
> do_image_ova[prefuncs] += "convert_wic"
> IMAGE_CMD:ova() {
prev parent reply other threads:[~2023-06-07 12:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 8:40 Felix Moessbauer
2023-02-10 9:29 ` Henning Schild
2023-02-16 4:42 ` Uladzimir Bely
2023-06-07 12:02 ` Henning Schild [this message]
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=20230607140223.5d375f2c@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=adriaan.schmidt@siemens.com \
--cc=clara.kowalsky@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox