From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: AdrianF <adrian.freihofer@siemens.com>
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-oe][scarthgap][PATCH 1/1] image-oci-unmoci: preserve file modes
Date: Thu, 26 Feb 2026 13:20:49 -0500 [thread overview]
Message-ID: <aaCPAYgmFjUAFc0D@gmail.com> (raw)
In-Reply-To: <20260226172529.2551136-2-adrian.freihofer@siemens.com>
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 <bruce.ashfield@gmail.com>
>
> 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>
> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
> ---
> 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
>
parent reply other threads:[~2026-02-26 18:21 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260226172529.2551136-2-adrian.freihofer@siemens.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaCPAYgmFjUAFc0D@gmail.com \
--to=bruce.ashfield@gmail.com \
--cc=adrian.freihofer@siemens.com \
--cc=meta-virtualization@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.