From: Anton Mikanovich <amikan@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH v5 1/7] vm-img: move template out of package into SRC_URI file
Date: Fri, 17 Dec 2021 17:36:13 +0300 [thread overview]
Message-ID: <0997b379-44f0-7744-70ee-f522d04596e5@ilbers.de> (raw)
In-Reply-To: <20211217151257.5cc3c63a@md1za8fc.ad001.siemens.net>
Oh, it looks like I've send v3, not v4. Let me resend.
17.12.2021 17:12, Henning Schild wrote:
> Am Thu, 16 Dec 2021 19:45:56 +0300
> schrieb Anton Mikanovich <amikan@ilbers.de>:
>
>> From: Henning Schild <henning.schild@siemens.com>
>>
>> Instead of placing just one static template into a file coming via a
>> package, fetch that template file. That allows a choice in template
>> files, or any kind of modification in layers. Where people might not
>> find our template to be sufficient.
>>
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>> meta/classes/vm-img.bbclass | 8 +++++---
>> .../vm-img}/vm-template.ovf.tmpl | 0
>> .../vm-template/vm-template_0.1.bb | 16
>> ---------------- 3 files changed, 5 insertions(+), 19 deletions(-)
>> rename meta/{recipes-devtools/vm-template/files =>
>> classes/vm-img}/vm-template.ovf.tmpl (100%) delete mode 100644
>> meta/recipes-devtools/vm-template/vm-template_0.1.bb
>>
>> diff --git a/meta/classes/vm-img.bbclass b/meta/classes/vm-img.bbclass
>> index b230af2..79f3b7e 100644
>> --- a/meta/classes/vm-img.bbclass
>> +++ b/meta/classes/vm-img.bbclass
>> @@ -7,8 +7,10 @@
>> inherit buildchroot
>> inherit wic-img
>>
>> -IMAGER_BUILD_DEPS += "vm-template"
>> -IMAGER_INSTALL += "qemu-utils gawk uuid-runtime vm-template"
>> +FILESPATH_prepend := "${LAYERDIR_core}/classes/vm-img:"
> This is not only style ... but a fix not mentioned in the cover letter
>
> How about that? So we stay with FILESEXTRAPATHS but do not use
> ${FILE_DIRNAME} as i had in v4.
>
> FILESEXTRAPATHS_prepend := "${LAYERDIR_core}/classes/vm-img:"
>
> Henning
>
>> +SRC_URI += "file://vm-template.ovf.tmpl"
>> +
>> +IMAGER_INSTALL += "qemu-utils gawk uuid-runtime"
>>
>> # virtual machine disk settings
>> SOURCE_IMAGE_FILE ?= "${IMAGE_FULLNAME}.wic.img"
>> @@ -100,7 +102,7 @@ do_create_ova() {
>> export DISK_UUID=$(uuidgen)
>> export VM_UUID=$(uuidgen)
>> # create ovf
>> - cat /usr/share/vm-template/vm-template.ovf.tmpl | envsubst >
>> ${PP_DEPLOY}/${OVA_NAME}.ovf
>> + cat ${PP_WORK}/vm-template.ovf.tmpl | envsubst >
>> ${PP_DEPLOY}/${OVA_NAME}.ovf tar -cvf ${PP_DEPLOY}/${OVA_NAME}.ova -C
>> ${PP_DEPLOY} ${OVA_NAME}.ovf
>> # VirtualBox needs here a manifest file. VMware does accept
>> that format. diff --git
>> a/meta/recipes-devtools/vm-template/files/vm-template.ovf.tmpl
>> b/meta/classes/vm-img/vm-template.ovf.tmpl similarity index 100%
>> rename from
>> meta/recipes-devtools/vm-template/files/vm-template.ovf.tmpl rename
>> to meta/classes/vm-img/vm-template.ovf.tmpl diff --git
>> a/meta/recipes-devtools/vm-template/vm-template_0.1.bb
>> b/meta/recipes-devtools/vm-template/vm-template_0.1.bb deleted file
>> mode 100644 index 1d474cd..0000000 ---
>> a/meta/recipes-devtools/vm-template/vm-template_0.1.bb +++ /dev/null
>> @@ -1,16 +0,0 @@ -# This software is a part of ISAR.
>> -#
>> -# Copyright (c) Siemens AG, 2020
>> -#
>> -# SPDX-License-Identifier: MIT
>> -
>> -inherit dpkg-raw
>> -
>> -SRC_URI += "file://vm-template.ovf.tmpl"
>> -
>> -do_install() {
>> - TARGET=${D}/usr/share/vm-template
>> - install -m 0755 -d ${TARGET}
>> - install -m 0740 ${WORKDIR}/vm-template.ovf.tmpl \
>> - ${TARGET}/vm-template.ovf.tmpl
>> -}
--
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
next prev parent reply other threads:[~2021-12-17 14:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 16:45 [PATCH v5 0/7] vm-img improvements and fixes Anton Mikanovich
2021-12-16 16:45 ` [PATCH v5 1/7] vm-img: move template out of package into SRC_URI file Anton Mikanovich
2021-12-17 14:12 ` Henning Schild
2021-12-17 14:36 ` Anton Mikanovich [this message]
2021-12-16 16:45 ` [PATCH v5 2/7] vm-img: use two different ovf templates for vmware/virtualbox Anton Mikanovich
2021-12-16 16:45 ` [PATCH v5 3/7] vm-img: shorten code by using variables we have Anton Mikanovich
2021-12-16 16:45 ` [PATCH v5 4/7] vm-img: drop not used variables Anton Mikanovich
2021-12-16 16:46 ` [PATCH v5 5/7] vm-img: set vmware machine type to 64bit in our template Anton Mikanovich
2021-12-16 16:46 ` [PATCH v5 6/7] vm-img: make use of isars template class for most of the tmpl variables Anton Mikanovich
2021-12-16 16:46 ` [PATCH v5 7/7] meta-isar: switch virtualbox test from buster to bullseye Anton Mikanovich
2021-12-16 20:25 ` [PATCH v5 0/7] vm-img improvements and fixes Henning Schild
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=0997b379-44f0-7744-70ee-f522d04596e5@ilbers.de \
--to=amikan@ilbers.de \
--cc=henning.schild@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