All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Piotr Łobacz" <p.lobacz@welotec.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-Core][PATCH v12 1/7] path.py: add support for ACLs and all additional attributes
Date: Sat, 12 Aug 2023 15:03:54 +0200	[thread overview]
Message-ID: <202308121303547b05aa57@mail.local> (raw)
In-Reply-To: <20230804084315.55768-1-p.lobacz@welotec.com>

Hello,

This went through the autobuilder fine until yesterday:

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/3349/steps/12/logs/stdio

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230811-vwiija9k/packages/diff-html/

On 04/08/2023 10:43:09+0200, Piotr Łobacz wrote:
> Extend `tar` command inside copytree() and copyhardlinktree() functions,
> with additional parameters, in order to support ACLs and xattr. The posix
> format doesn't need to be set in here, as GNU tar switches to it whenewer
> is uses --acls and/or --xattrs parameters.
> 
> Additionaly change preservation of additional attributes for `cp` command
> to all (meaning mode, ownership, timestamps etc.) not only xattrs, which
> were previously.
> 
> Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
> ---
>  meta/lib/oe/path.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
> index 0dc8f172d5..56e8e214ac 100644
> --- a/meta/lib/oe/path.py
> +++ b/meta/lib/oe/path.py
> @@ -92,7 +92,7 @@ def copytree(src, dst):
>      # This way we also preserve hardlinks between files in the tree.
>  
>      bb.utils.mkdirhier(dst)
> -    cmd = "tar --xattrs --xattrs-include='*' -cf - -S -C %s -p . | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dst)
> +    cmd = "tar --acls --xattrs --xattrs-include='*' -cf - -S -C %s -p . | tar --acls --xattrs --xattrs-include='*' -xf - -C %s" % (src, dst)
>      subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
>  
>  def copyhardlinktree(src, dst):
> @@ -119,7 +119,7 @@ def copyhardlinktree(src, dst):
>      if (canhard):
>          # Need to copy directories only with tar first since cp will error if two 
>          # writers try and create a directory at the same time
> -        cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -S -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xhf - -C %s" % (src, src, dst)
> +        cmd = "cd %s; find . -type d -print | tar --acls --xattrs --xattrs-include='*' -cf - -S -C %s -p --no-recursion --files-from - | tar --acls --xattrs --xattrs-include='*' -xhf - -C %s" % (src, src, dst)
>          subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
>          source = ''
>          if os.path.isdir(src):
> @@ -130,7 +130,7 @@ def copyhardlinktree(src, dst):
>          else:
>              source = src
>              s_dir = os.getcwd()
> -        cmd = 'cp -afl --preserve=xattr %s %s' % (source, os.path.realpath(dst))
> +        cmd = 'cp -afl --preserve=all %s %s' % (source, os.path.realpath(dst))
>          subprocess.check_output(cmd, shell=True, cwd=s_dir, stderr=subprocess.STDOUT)
>      else:
>          copytree(src, dst)
> -- 
> 2.34.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#185512): https://lists.openembedded.org/g/openembedded-core/message/185512
> Mute This Topic: https://lists.openembedded.org/mt/100542715/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  parent reply	other threads:[~2023-08-12 13:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  8:43 [OE-Core][PATCH v12 1/7] path.py: add support for ACLs and all additional attributes Piotr Łobacz
2023-08-04  8:43 ` [OE-Core][PATCH v12 2/7] package_ipk.bbclass: add support for ACLs and xattr Piotr Łobacz
2023-08-04  8:43 ` [OE-Core][PATCH v12 3/7] package.bbclass: " Piotr Łobacz
2023-08-04  8:43 ` [OE-Core][PATCH v12 4/7] sstate.bbclass: " Piotr Łobacz
2023-08-04  9:50   ` Jose Quaresma
2023-08-17 12:22     ` Piotr Łobacz
2023-08-24  7:08   ` Richard Purdie
2023-08-28  8:44     ` ODP: " Piotr Łobacz
     [not found]     ` <177F7F952788FCE3.29523@lists.openembedded.org>
2023-08-28  9:38       ` Piotr Łobacz
     [not found]       ` <177F82912A67A781.1521@lists.openembedded.org>
2023-08-28 10:17         ` Piotr Łobacz
2023-08-04  8:43 ` [OE-Core][PATCH v12 5/7] opkg-utils: add acl and xattr support Piotr Łobacz
2023-08-04  8:43 ` [OE-Core][PATCH v12 6/7] opkg: add options to enable support for acl and xattr Piotr Łobacz
2023-08-04  8:43 ` [OE-Core][PATCH v12 7/7] opkg: set locale from system environment variables Piotr Łobacz
2023-08-04  8:48 ` ODP: [OE-Core][PATCH v12 1/7] path.py: add support for ACLs and all additional attributes Piotr Łobacz
2023-08-12 13:03 ` Alexandre Belloni [this message]
2023-08-12 13:39   ` 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=202308121303547b05aa57@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=p.lobacz@welotec.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 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.