From: "Piotr Łobacz" <p.lobacz@welotec.com>
To: openembedded-core@lists.openembedded.org
Cc: "Piotr Łobacz" <p.lobacz@welotec.com>
Subject: [OE-Core][PATCH v11][master-next 2/5] package.bbclass: add support for ACLs and xattr
Date: Wed, 26 Jul 2023 11:22:25 +0200 [thread overview]
Message-ID: <20230726092228.1005306-2-p.lobacz@welotec.com> (raw)
In-Reply-To: <20230726092228.1005306-1-p.lobacz@welotec.com>
Extend `tar` command, with additional parameters, depending
on choosen package class and target distro features, in order
to support ACLs and xattr.
Currently only `package_ipk` supports fully ACLs and xattr.
Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
---
meta/classes-global/package.bbclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass
index e8055a9cdc..6e5d0dd4dc 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -342,8 +342,13 @@ python perform_packagecopy () {
# Start by package population by taking a copy of the installed
# files to operate on
- # Preserve sparse files and hard links
- cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
+ # Preserve sparse files, hard links, ACLs and extended attributes
+ # TODO: for the moment only ipk packages are supporting ACLs and extended attributes
+ # we need to add support for other package systems as well, but that doesn't bother
+ # tar from creating archives with acl and/or xattr support
+ acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
+ xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', '', d)
+ cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - -C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
# replace RPATHs for the nativesdk binaries, to make them relocatable
--
2.34.1
next prev parent reply other threads:[~2023-07-26 9:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 9:22 [OE-Core][PATCH v11][master-next 1/5] package_ipk.bbclass: add support for ACLs and xattr Piotr Łobacz
2023-07-26 9:22 ` Piotr Łobacz [this message]
2023-07-26 9:22 ` [OE-Core][PATCH v11][master-next 3/5] opkg-utils: add acl and xattr support Piotr Łobacz
2023-07-26 9:22 ` [OE-Core][PATCH v11][master-next 4/5] opkg: add options to enable support for acl and xattr Piotr Łobacz
2023-07-26 9:22 ` [OE-Core][PATCH v11][master-next 5/5] opkg: set locale from system environment variables Piotr Łobacz
2023-07-26 9:27 ` ODP: [OE-Core][PATCH v11][master-next 1/5] package_ipk.bbclass: add support for ACLs and xattr Piotr Łobacz
2023-07-27 14:18 ` Alexandre Belloni
2023-07-27 15:30 ` ODP: " Piotr Łobacz
2023-07-28 22:58 ` Piotr Łobacz
[not found] ` <17762A3A069807A3.31298@lists.openembedded.org>
2023-07-31 19:03 ` Piotr Łobacz
2023-07-31 19:09 ` Piotr Łobacz
2023-07-31 20:25 ` Joshua Watt
2023-07-31 21:19 ` Richard Purdie
2023-07-31 21:23 ` Piotr Łobacz
[not found] ` <177710C9CE043B33.12785@lists.openembedded.org>
2023-07-31 21:28 ` ODP: " Piotr Łobacz
2023-08-01 13:04 ` Martin Jansa
2023-08-01 13:27 ` ODP: " Piotr Łobacz
[not found] ` <1777455C95C57250.15736@lists.openembedded.org>
2023-08-01 15:16 ` Piotr Łobacz
2023-08-01 15:41 ` Richard Purdie
2023-08-01 16:00 ` ODP: " Piotr Łobacz
[not found] ` <17774DB8C4C2BE4F.15736@lists.openembedded.org>
2023-08-02 1:17 ` Piotr Łobacz
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=20230726092228.1005306-2-p.lobacz@welotec.com \
--to=p.lobacz@welotec.com \
--cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox