From e133bbf7bb71387763a7b0c2df9c25e12a9e05c0 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Mon, 16 Oct 2023 15:08:32 -0600 Subject: classes/image-oci-umoci: Allow labels to have spaces Quote the label argument passed to umoci to allow it to correctly handle spaces. Note that this requires that OCI_IMAGE_LABELS have the argument quoted with single quotes, as in: OCI_IMAGE_LABELS = "org.opencontainers.image.description='${SUMMARY}'" Signed-off-by: Joshua Watt Signed-off-by: Bruce Ashfield --- classes/image-oci-umoci.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc index 70254c41..9ece0404 100644 --- a/classes/image-oci-umoci.inc +++ b/classes/image-oci-umoci.inc @@ -58,8 +58,8 @@ IMAGE_CMD:oci() { bbdebug 1 "OCI: configuring image" if [ -n "${OCI_IMAGE_LABELS}" ]; then for l in ${OCI_IMAGE_LABELS}; do - bbdebug 1 "OCI: umoci config --image $image_name:${OCI_IMAGE_TAG} --config.label $l" - umoci config --image $image_name:${OCI_IMAGE_TAG} --config.label $l + bbdebug 1 "OCI: umoci config --image $image_name:${OCI_IMAGE_TAG} --config.label \"$l\"" + umoci config --image $image_name:${OCI_IMAGE_TAG} --config.label "$l" done fi if [ -n "${OCI_IMAGE_ENV_VARS}" ]; then -- cgit v1.2.3-54-g00ecf