All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: jan.kiszka@siemens.com, cip-dev@lists.cip-project.org
Subject: [cip-dev][isar-cip-core][PATCH 3/4] recipes-devtools/ovmf-binaries: Adapt to sbuild environment
Date: Fri, 29 Jul 2022 10:39:30 +0200	[thread overview]
Message-ID: <20220729083931.419731-4-Quirin.Gylstorff@siemens.com> (raw)
In-Reply-To: <20220729083931.419731-1-Quirin.Gylstorff@siemens.com>

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Due to sbuild we can no longer access the build chroot with all installed
packages.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../ovmf-binaries/files/control.tmpl           | 11 -----------
 recipes-devtools/ovmf-binaries/files/rules     | 17 +++++++++++++++++
 .../ovmf-binaries/ovmf-binaries_0.1.bb         | 18 +++++++++++-------
 3 files changed, 28 insertions(+), 18 deletions(-)
 delete mode 100644 recipes-devtools/ovmf-binaries/files/control.tmpl
 create mode 100644 recipes-devtools/ovmf-binaries/files/rules

diff --git a/recipes-devtools/ovmf-binaries/files/control.tmpl b/recipes-devtools/ovmf-binaries/files/control.tmpl
deleted file mode 100644
index 54641d6..0000000
--- a/recipes-devtools/ovmf-binaries/files/control.tmpl
+++ /dev/null
@@ -1,11 +0,0 @@
-Source: ${PN}
-Section: misc
-Priority: optional
-Standards-Version: 3.9.6
-Maintainer: ${MAINTAINER}
-Build-Depends: debhelper (>= 9), ${DEBIAN_BUILD_DEPENDS}
-
-Package: ${PN}
-Architecture: ${DPKG_ARCH}
-Depends: ${DEBIAN_DEPENDS}
-Description: ${DESCRIPTION}
diff --git a/recipes-devtools/ovmf-binaries/files/rules b/recipes-devtools/ovmf-binaries/files/rules
new file mode 100644
index 0000000..dcbef80
--- /dev/null
+++ b/recipes-devtools/ovmf-binaries/files/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+#
+# Copyright (c) Siemens AG, 2022
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# This file is subject to the terms and conditions of the MIT License.
+# See COPYING.MIT file in the top-level directory.
+#
+
+override_dh_auto_configure:
+	mkdir -p /home/builder/ovmf-binaries/image/var/share/
+	cp -r /usr/share/OVMF /home/builder/ovmf-binaries/image/var/share/
+
+%:
+	dh $@
diff --git a/recipes-devtools/ovmf-binaries/ovmf-binaries_0.1.bb b/recipes-devtools/ovmf-binaries/ovmf-binaries_0.1.bb
index 6524300..0f4592a 100644
--- a/recipes-devtools/ovmf-binaries/ovmf-binaries_0.1.bb
+++ b/recipes-devtools/ovmf-binaries/ovmf-binaries_0.1.bb
@@ -14,18 +14,22 @@ inherit dpkg-raw
 DESCRIPTION = "Copy the OVMF biniaries from the build changeroot to the deploy dir"
 
 # this is a empty debian package
-SRC_URI = "file://control.tmpl"
+SRC_URI = "file://rules"
 
 DEBIAN_BUILD_DEPENDS = "ovmf"
-TEMPLATE_FILES = "control.tmpl"
-TEMPLATE_VARS += "PN DEBIAN_DEPENDS MAINTAINER DESCRIPTION DPKG_ARCH DEBIAN_BUILD_DEPENDS"
 
 SSTATETASKS = ""
 
-do_extract_ovmf() {
+do_install() {
+     install -v -d ${D}/var/share
+     touch ${D}/var/share/test
+}
+
+do_deploy() {
     install -m 0755 -d ${DEPLOY_DIR_IMAGE}
-    cp -r ${BUILDCHROOT_DIR}/usr/share/OVMF ${DEPLOY_DIR_IMAGE}
-    chown $(id -u):$(id -g) ${DEPLOY_DIR_IMAGE}/OVMF
+    dpkg --extract ${WORKDIR}/${PN}_${PV}*.deb ${WORKDIR}
+    cp -r ${WORKDIR}/var/share/OVMF ${DEPLOY_DIR_IMAGE}
 }
+addtask do_deploy after do_dpkg_build before do_deploy_deb
+
 
-addtask do_extract_ovmf after do_install_builddeps before do_dpkg_build
-- 
2.35.1



  parent reply	other threads:[~2022-07-29  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29  8:39 [cip-dev][isar-cip-core][PATCH 0/4] Add support for ISAR with sbuild Quirin Gylstorff
2022-07-29  8:39 ` [cip-dev][isar-cip-core][PATCH 1/4] Update ISAR for sbuild integration Quirin Gylstorff
2022-07-29  8:39 ` [cip-dev][isar-cip-core][PATCH 2/4] scripts/deploy-cip-core.sh: Use dtb from deploy dir Quirin Gylstorff
2022-07-29  8:58   ` Jan Kiszka
2022-07-29  9:06     ` Gylstorff Quirin
2022-07-29  8:39 ` Quirin Gylstorff [this message]
2022-07-29  8:59   ` [cip-dev][isar-cip-core][PATCH 3/4] recipes-devtools/ovmf-binaries: Adapt to sbuild environment Jan Kiszka
2022-07-29  8:39 ` [cip-dev][isar-cip-core][PATCH 4/4] kas-cip: Add patch for linux-cip with CONFIG_MODULES=n Quirin Gylstorff
2022-07-29  9:00   ` 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=20220729083931.419731-4-Quirin.Gylstorff@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=jan.kiszka@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.