From: Jan Kiszka <jan.kiszka@siemens.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
isar-users@googlegroups.com
Cc: adriaan.schmidt@siemens.com
Subject: Re: [PATCH 1/1] fix xattrs of rootfs when using sstate cache
Date: Fri, 14 Apr 2023 10:22:57 +0200 [thread overview]
Message-ID: <2a2d1059-47dc-34b1-686e-47672e3fa02f@siemens.com> (raw)
In-Reply-To: <20230414024121.29031-1-felix.moessbauer@siemens.com>
On 14.04.23 04:41, 'Felix Moessbauer' via isar-users wrote:
> When creating the sstate cache artifact, the extended file attributes
> need to be stored in the tar archive as well. Otherwise, capabilities on
> files are lost when the artifact from the cache is used.
>
> Note, that for tar versions shipped with debian bullseye and bookworm,
> despite of the documentation, both --xattrs and --xattrs-include='*' is
> required to store all extended attributes.
Are we already demanding >= bullseye as build env? Or is buster still
supported?
Jan
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/classes/rootfs.bbclass | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 784793b5..22449d71 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -327,6 +327,8 @@ SSTATETASKS += "do_rootfs_install"
> SSTATECREATEFUNCS += "rootfs_install_sstate_prepare"
> SSTATEPOSTINSTFUNCS += "rootfs_install_sstate_finalize"
>
> +SSTATE_TAR_ATTR_FLAGS ?= "--xattrs --xattrs-include='*'"
> +
> # the rootfs is owned by root, so we need some sudoing to pack and unpack
> rootfs_install_sstate_prepare() {
> # this runs in SSTATE_BUILDDIR, which will be deleted automatically
> @@ -335,7 +337,7 @@ rootfs_install_sstate_prepare() {
> mkdir -p ${WORKDIR}/mnt/rootfs
> sudo mount --bind ${WORKDIR}/rootfs ${WORKDIR}/mnt/rootfs -o ro
> lopts="--one-file-system --exclude=var/cache/apt/archives"
> - sudo tar -C ${WORKDIR}/mnt -cpSf rootfs.tar $lopts rootfs
> + sudo tar -C ${WORKDIR}/mnt -cpSf rootfs.tar $lopts ${SSTATE_TAR_ATTR_FLAGS} rootfs
> sudo umount ${WORKDIR}/mnt/rootfs
> sudo chown $(id -u):$(id -g) rootfs.tar
> }
> @@ -346,7 +348,7 @@ rootfs_install_sstate_finalize() {
> # - after building the rootfs, the tar won't be there, but we also don't need to unpack
> # - after restoring from cache, there will be a tar which we unpack and then delete
> if [ -f rootfs.tar ]; then
> - sudo tar -C ${WORKDIR} -xpf rootfs.tar
> + sudo tar -C ${WORKDIR} -xpf rootfs.tar ${SSTATE_TAR_ATTR_FLAGS}
> rm rootfs.tar
> fi
> }
--
Siemens AG, Technology
Competence Center Embedded Linux
next prev parent reply other threads:[~2023-04-14 8:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 2:41 Felix Moessbauer
2023-04-14 8:22 ` Jan Kiszka [this message]
2023-04-14 8:33 ` Moessbauer, Felix
2023-04-19 5:59 ` AW: " Coulon, David
2023-05-03 14:48 ` Anton Mikanovich
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=2a2d1059-47dc-34b1-686e-47672e3fa02f@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=adriaan.schmidt@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox