bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] [PATCH] Bugfix - fix xattr exclude/include for archive cre


From: Ian McLeod
Subject: Re: [Bug-tar] [PATCH] Bugfix - fix xattr exclude/include for archive create
Date: Mon, 30 May 2016 17:23:33 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

Hey Pavel,

On 05/30/2016 02:10 AM, Pavel Raiskup wrote:
Hi Ian,

On Sunday 29 of May 2016 16:20:00 Ian McLeod wrote:
* src/xattrs.c (xattrs_xattrs_get): apply exclude/include mask when
   fetching extended attributes

This makes archive create behavior consistent with the documentation.
Without this change xattr include/exclude options are accepted when
creating an archive but are silently ignored.
Good catch, exclude/include is ignored during archive creation.

Could you please post smaller patch just having the important part:

+                  if (!xattrs_masked_out(attr, true /* archiving */))
+                    xheader_xattr_add (st, attr, val, aret);

(+ one prototype above).  And could you please add one new testcase for
--xattrs-{exclude,include}?

Done.

Note that the added test only exercises exclude. As best I can tell, --xattrs-include can never actually be meaningful when doing a create. Any --xattrs-include implies --xattrs which, for create, starts with a default of saving all xattrs. It's the ability to selectively _exclude_ that is fixed by this patch, and this is genuinely useful for some use cases. In my case, I need this to work to prune certain xattrs when generating tar files for Docker base image creation.

Thanks!
Pavel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]