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 <JPEWhacker@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Joshua Watt 2023-10-16 15:08:32 -06:00 committed by Bruce Ashfield
parent d8a2857633
commit e133bbf7bb

View File

@ -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