merged.

Bruce

In message: [meta-oe][scarthgap][PATCH 1/1] image-oci-unmoci: preserve file 
modes
on 26/02/2026 AdrianF wrote:

> From: Bruce Ashfield <[email protected]>
> 
> Based on the following patch:
> 
>    Subject: [meta-virtualization][PATCH] image-oci-umoci: preserve file modes 
> in rootfs
>    From: "Florian Wickert via lists.yoctoproject.org" 
> <[email protected]>
> 
>    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 <[email protected]>
> 
> Signed-off-by: Bruce Ashfield <[email protected]>
> Signed-off-by: Adrian Freihofer <[email protected]>
> ---
>  classes/image-oci-umoci.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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() {
>  
>      bbdebug 1 "OCI: populating rootfs"
>      bbdebug 1 "OCI: cp -r ${IMAGE_ROOTFS}/* $image_bundle_name/rootfs/"
> -    cp -r ${IMAGE_ROOTFS}/* $image_bundle_name/rootfs
> +    cp -r -a --no-preserve=ownership ${IMAGE_ROOTFS}/* 
> $image_bundle_name/rootfs
>  
>      bbdebug 1 "OCI: umoci repack --image $image_name:${OCI_IMAGE_TAG} 
> $image_bundle_name"
>      umoci repack --image $image_name:${OCI_IMAGE_TAG} $image_bundle_name
> -- 
> 2.53.0
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9611): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9611
Mute This Topic: https://lists.yoctoproject.org/mt/118017144/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to