summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2025-01-17 19:09:57 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2025-01-17 19:17:10 +0000
commit57fe8d036440625153bf26258248adcdd20855c6 (patch)
tree6d16a3590723cc793c2554a5f7b89430c423776e
parent3763a3a9a61a3a20941341b2a45a651943c8a429 (diff)
downloadmeta-virtualization-57fe8d036440625153bf26258248adcdd20855c6.tar.gz
image-oci-unmoci: preserve file modes
Based on the following patch: Subject: [meta-virtualization][PATCH] image-oci-umoci: preserve file modes in rootfs From: "Florian Wickert via lists.yoctoproject.org" <FlorianWickert=gmail.com@lists.yoctoproject.org> 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>
-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