summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-02-26 18:24:06 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-26 13:20:27 -0500
commit3dd635f613f7299d986a8ab6bc9f584370f8ed1d (patch)
tree676cc664c2d341b9d90e3372f980ac3e898535e3
parent1ff2a1b03cdf2df0f5093f286961d6b3150e0807 (diff)
downloadmeta-virtualization-scarthgap.tar.gz
image-oci-unmoci: preserve file modesscarthgap
Based on the following patch: Subject: [meta-virtualization][PATCH] image-oci-umoci: preserve file modes in rootfs From: "Florian Wickert" <FlorianWickert@gmail.com> cp does not preserve file modes by default. This will break sudo (among others) which needs the suid flag to do its work. This patch adds the --preserve=mode flag to the cp call to fix this. Signed-off-by: Florian Wickert <FlorianWickert@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--classes/image-oci-umoci.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc
index c77750fb..9bd154fb 100644
--- a/classes/image-oci-umoci.inc
+++ b/classes/image-oci-umoci.inc
@@ -50,7 +50,7 @@ IMAGE_CMD:oci() {
50 50
51 bbdebug 1 "OCI: populating rootfs" 51 bbdebug 1 "OCI: populating rootfs"
52 bbdebug 1 "OCI: cp -r ${IMAGE_ROOTFS}/* $image_bundle_name/rootfs/" 52 bbdebug 1 "OCI: cp -r ${IMAGE_ROOTFS}/* $image_bundle_name/rootfs/"
53 cp -r ${IMAGE_ROOTFS}/* $image_bundle_name/rootfs 53 cp -r -a --no-preserve=ownership ${IMAGE_ROOTFS}/* $image_bundle_name/rootfs
54 54
55 bbdebug 1 "OCI: umoci repack --image $image_name:${OCI_IMAGE_TAG} $image_bundle_name" 55 bbdebug 1 "OCI: umoci repack --image $image_name:${OCI_IMAGE_TAG} $image_bundle_name"
56 umoci repack --image $image_name:${OCI_IMAGE_TAG} $image_bundle_name 56 umoci repack --image $image_name:${OCI_IMAGE_TAG} $image_bundle_name