diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-26 18:24:06 +0100 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-26 13:20:27 -0500 |
| commit | 3dd635f613f7299d986a8ab6bc9f584370f8ed1d (patch) | |
| tree | 676cc664c2d341b9d90e3372f980ac3e898535e3 | |
| parent | 1ff2a1b03cdf2df0f5093f286961d6b3150e0807 (diff) | |
| download | meta-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.inc | 2 |
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 |
