meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [meta-virtualization][PATCH] classes/image-oci-umoci: Handle mutliple entrypoint arguments
Date: Thu, 12 Oct 2023 10:25:48 -0600	[thread overview]
Message-ID: <20231012162548.329780-1-JPEWhacker@gmail.com> (raw)

The entrypoint to a container is actually an array of the command with
arguments to run, not just as single scalar. To handle this in umoci,
the --config.entrypoint is passed multiple times in a single invocation,
so implement that in the image class

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 classes/image-oci-umoci.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc
index 58e4668..6c7f244 100644
--- a/classes/image-oci-umoci.inc
+++ b/classes/image-oci-umoci.inc
@@ -99,7 +99,7 @@ IMAGE_CMD:oci() {
 	bbnote "OCI: image subarch is set to: ${OCI_IMAGE_SUBARCH}, but umoci does not"
 	bbnote "     expose variants. use sloci instead if this is important"
     fi
-    umoci config --image $image_name:${OCI_IMAGE_TAG} --config.entrypoint ${OCI_IMAGE_ENTRYPOINT}
+    umoci config --image $image_name:${OCI_IMAGE_TAG} ${@" ".join("--config.entrypoint %s" % s for s in d.getVar("OCI_IMAGE_ENTRYPOINT").split())}
     if [ -n "${OCI_IMAGE_ENTRYPOINT_ARGS}" ]; then
 	umoci config --image $image_name:${OCI_IMAGE_TAG} --config.cmd "${OCI_IMAGE_ENTRYPOINT_ARGS}"
     fi
-- 
2.34.1



             reply	other threads:[~2023-10-12 16:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 16:25 Joshua Watt [this message]
2023-10-13 15:38 ` [meta-virtualization][PATCH v2] classes/image-oci-umoci: Handle mutliple entrypoint arguments Joshua Watt
2023-10-13 16:58   ` Bruce Ashfield
2023-10-13 19:32     ` Joshua Watt
2023-10-13 21:32       ` Bruce Ashfield
     [not found]       ` <178DC83238988A4B.8679@lists.yoctoproject.org>
2023-10-16 18:16         ` Bruce Ashfield

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=20231012162548.329780-1-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).