From 3fc0f9688375c9c95e94d57a253af5a887571569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20J=C3=B6rns?= Date: Sun, 26 May 2024 20:34:14 +0200 Subject: [PATCH] follow WORKDIR -> UNPACKDIR transition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adapts to the oe-core rework to enforce a separate directory for unpacking local sources (UNPACKDIR) instead of polluting WORKDIR directly. Follows the preliminary guideline from: https://lists.openembedded.org/g/openembedded-architecture/message/2007 Signed-off-by: Enrico Jörns --- recipes-core/rauc/rauc-conf.bb | 11 +++++++---- recipes-core/rauc/rauc-target.inc | 4 ++-- recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/recipes-core/rauc/rauc-conf.bb b/recipes-core/rauc/rauc-conf.bb index 85673e06..10d80608 100644 --- a/recipes-core/rauc/rauc-conf.bb +++ b/recipes-core/rauc/rauc-conf.bb @@ -15,19 +15,22 @@ SRC_URI = " \ ${RAUC_KEYRING_URI} \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install () { # Create rauc config dir # Warn if system configuration was not overwritten - if ! grep -q "^[^#]" ${WORKDIR}/system.conf; then + if ! grep -q "^[^#]" ${UNPACKDIR}/system.conf; then bbwarn "Please overwrite example system.conf with a project specific one!" fi install -d ${D}${sysconfdir}/rauc - install -m 0644 ${WORKDIR}/system.conf ${D}${sysconfdir}/rauc/ + install -m 0644 ${UNPACKDIR}/system.conf ${D}${sysconfdir}/rauc/ # Warn if CA file was not overwritten - if ! grep -q "^[^#]" ${WORKDIR}/${RAUC_KEYRING_FILE}; then + if ! grep -q "^[^#]" ${UNPACKDIR}/${RAUC_KEYRING_FILE}; then bbwarn "Please overwrite example ca.cert.pem with a project specific one, or set the RAUC_KEYRING_FILE variable with your file!" fi install -d ${D}${sysconfdir}/rauc - install -m 0644 ${WORKDIR}/${RAUC_KEYRING_FILE} ${D}${sysconfdir}/rauc/ + install -m 0644 ${UNPACKDIR}/${RAUC_KEYRING_FILE} ${D}${sysconfdir}/rauc/ } diff --git a/recipes-core/rauc/rauc-target.inc b/recipes-core/rauc/rauc-target.inc index 4b50fb9b..74f92267 100644 --- a/recipes-core/rauc/rauc-target.inc +++ b/recipes-core/rauc/rauc-target.inc @@ -22,11 +22,11 @@ do_install () { meson_do_install install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/rauc-mark-good.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/rauc-mark-good.service ${D}${systemd_unitdir}/system/ sed -i -e 's!@BINDIR@!${bindir}!g' ${D}${systemd_unitdir}/system/*.service install -d "${D}${sysconfdir}/init.d" - install -m 755 "${WORKDIR}/rauc-mark-good.init" "${D}${sysconfdir}/init.d/rauc-mark-good" + install -m 755 "${UNPACKDIR}/rauc-mark-good.init" "${D}${sysconfdir}/init.d/rauc-mark-good" } PACKAGES =+ "${PN}-mark-good" diff --git a/recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb b/recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb index 953b7e1c..599cb01c 100644 --- a/recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb +++ b/recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb @@ -28,7 +28,7 @@ do_install:append() { install -d ${D}${sysconfdir}/${BPN}/ install -m 0644 ${S}/rauc_hawkbit/config.cfg ${D}${sysconfdir}/${BPN}/config.cfg install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/rauc-hawkbit.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/rauc-hawkbit.service ${D}${systemd_unitdir}/system/ sed -i -e 's!@BINDIR@!${bindir}!g' -e 's!@SYSCONFDIR@!${sysconfdir}!g' \ ${D}${systemd_unitdir}/system/rauc-hawkbit.service }