public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v3 1/7] vm-img: move template out of package into SRC_URI file
@ 2021-12-15  9:39 Henning Schild
  2021-12-15  9:39 ` [PATCH v3 2/7] vm-img: use two different ovf templates for vmware/virtualbox Henning Schild
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Henning Schild @ 2021-12-15  9:39 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

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 b230af247357..79f3b7e45e83 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:"
+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 1d474cd5d8d7..000000000000
--- 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
-}
-- 
2.32.0


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

end of thread, other threads:[~2021-12-15 15:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  9:39 [PATCH v3 1/7] vm-img: move template out of package into SRC_URI file Henning Schild
2021-12-15  9:39 ` [PATCH v3 2/7] vm-img: use two different ovf templates for vmware/virtualbox Henning Schild
2021-12-15  9:39 ` [PATCH v3 3/7] vm-img: shorten code by using variables we have Henning Schild
2021-12-15  9:39 ` [PATCH v3 4/7] vm-img: drop not used variables Henning Schild
2021-12-15  9:39 ` [PATCH v3 5/7] vm-img: set vmware machine type to 64bit in our template Henning Schild
2021-12-15  9:39 ` [PATCH v3 6/7] vm-img: make use of isars template class for most of the tmpl variables Henning Schild
2021-12-15  9:39 ` [PATCH v3 7/7] meta-isar: switch virtualbox test from buster to bullseye Henning Schild
2021-12-15 13:16 ` [PATCH v3 1/7] vm-img: move template out of package into SRC_URI file Anton Mikanovich
2021-12-15 14:25   ` Henning Schild
2021-12-15 15:07     ` Anton Mikanovich

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