From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7010760649199321088 X-Received: by 2002:a05:6512:2354:: with SMTP id p20mr9534334lfu.214.1632319914517; Wed, 22 Sep 2021 07:11:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:5d3:: with SMTP id 202ls537666ljf.4.gmail; Wed, 22 Sep 2021 07:11:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWfcMOXxK+tps3ob/higNIRaiIakR7JRzuS9b0A3oAP8iwWpA8pFXwbHR2vstjGT9mDr1G X-Received: by 2002:a2e:bf24:: with SMTP id c36mr31557529ljr.348.1632319913510; Wed, 22 Sep 2021 07:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632319913; cv=none; d=google.com; s=arc-20160816; b=UcmgdfW69YOh+mzB7tEFqnj0toUHtT8pZQVtJlHsgqh5I+NqSie0Q0JWyT3TBM63wq sRTGE48bcrrshqCS4svcdmFjL1GCJluqOE4AXpvLgYQK9mNNP14YXiP6cThSDm3hPNmf B3NK3j1cqh2IHRQLJLEvIG0XOsr3Ouq49nacag6lO2wwWZCEDNJByITu93AU5+Yr9c5Q iIXlkzTUUP/n2sqtayU5OzQjI+xQwSbanLakbE9gen/5xsqPTEx8PJuEm6232Gcg1bZ1 dw3u45kzlKECpt5rMcX1Z9as9oxFmzTG6n75CD1kp48pDJOKHPbbA1KIRGlXwCVvsgzV Ed+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=83aS+t9CkdqbqZpbzWSSdGySDeNh8WeDVU+Hv1QtBN0=; b=csyhZ5dZIMoU4RBFh3WxQvhCoyZRdXT3lmHDNqK26xun4SX5dqOdHyYkd2QUEIHQAM 1UthN3qLcLe8ff2OC233F4hNe+rTqkTdcCmPeyiA21Uk0B46i/MmdyLVO59nIOJ60G7z KsD3nqfnspuYY9hPfHC2RABJkYN6e8z/lGYqCfUpxeyb34sQeIMSnggUtaYodBJiYDj/ u1/3HGM4pTLl3fIZyfIbEco/Bxj7EroWXUouviQs2Nx8M2TEY/moFzkPqerb8rxbF3lf +kVaxD8Q0tvDVDHoTF2Uhda/o4HyplIyweA6jHRhEGwT3Xq2Brv8XHYLTQ2GDYL/aVmb FyRQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id f20si117639ljn.4.2021.09.22.07.11.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Sep 2021 07:11:53 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 18MEBqh8026897 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 22 Sep 2021 16:11:52 +0200 Received: from localhost.localdomain ([167.87.35.234]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 18MEBqi9013583; Wed, 22 Sep 2021 16:11:52 +0200 From: Henning Schild To: isar-users@googlegroups.com Cc: "Q . Gylstorff" , Henning Schild Subject: [PATCH 1/7] vm-img: move template out of package into SRC_URI file Date: Wed, 22 Sep 2021 16:11:41 +0200 Message-Id: <20210922141147.4696-2-henning.schild@siemens.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210922141147.4696-1-henning.schild@siemens.com> References: <20210922141147.4696-1-henning.schild@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: q0VqxF6SkgP6 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 --- 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