From: "'Isaac True' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Matthias Beckert <matthias.beckert@elektrobit.com>,
Isaac True <itrue@emlix.com>
Subject: [PATCH] imagetypes_container: add PATH variable to container config
Date: Tue, 7 Oct 2025 09:07:54 +0200 [thread overview]
Message-ID: <20251007070753.1010939-2-itrue@emlix.com> (raw)
From: Matthias Beckert <matthias.beckert@elektrobit.com>
Without a PATH variable as part of the container config, certain
tools[1] used in Github Actions may break PATH.
[1] https://github.com/actions/runner/issues/3210
Co-authored-by: Isaac True <itrue@emlix.com>
Signed-off-by: Isaac True <itrue@emlix.com>
---
meta/classes/imagetypes_container.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/imagetypes_container.bbclass b/meta/classes/imagetypes_container.bbclass
index 60b65bd8..ea15decf 100644
--- a/meta/classes/imagetypes_container.bbclass
+++ b/meta/classes/imagetypes_container.bbclass
@@ -13,6 +13,7 @@ CONTAINER_IMAGE_NAME ?= "${PN}-${DISTRO}-${DISTRO_ARCH}"
CONTAINER_IMAGE_TAG ?= "${PV}-${PR}"
CONTAINER_IMAGE_CMD ?= "/bin/dash"
CONTAINER_IMAGE_ENTRYPOINT ?= ""
+CONTAINER_IMAGE_PATH ?= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
python() {
if not bb.utils.to_boolean(d.getVar('USING_CONTAINER')):
@@ -30,6 +31,7 @@ do_containerize() {
local entrypoint="${CONTAINER_IMAGE_ENTRYPOINT}"
local empty_tag="empty"
local tag="${CONTAINER_IMAGE_TAG}"
+ local path="${CONTAINER_IMAGE_PATH}"
local oci_img_dir="${WORKDIR}/oci-image"
local rootfs="${IMAGE_ROOTFS}"
@@ -46,6 +48,10 @@ do_containerize() {
sudo umoci config --image "${oci_img_dir}:${empty_tag}" \
--config.entrypoint="${entrypoint}"
fi
+ if [ -n "${path}" ]; then
+ sudo umoci config --image "${oci_img_dir}:${empty_tag}" \
+ --config.env="PATH=${path}"
+ fi
sudo umoci unpack --image "${oci_img_dir}:${empty_tag}" \
"${oci_img_dir}_unpacked"
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251007070753.1010939-2-itrue%40emlix.com.
next reply other threads:[~2025-10-07 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 7:07 'Isaac True' via isar-users [this message]
2025-10-07 8:01 ` 'MOESSBAUER, Felix' via isar-users
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=20251007070753.1010939-2-itrue@emlix.com \
--to=isar-users@googlegroups.com \
--cc=itrue@emlix.com \
--cc=matthias.beckert@elektrobit.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