Bug 850291

Summary: RFE: Adding support for listing of extended attributes and new --xattrs-include/--xattrs-exclude options.
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: tarAssignee: Pavel Raiskup <praiskup>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: adilger.redhat, kdudka, ovasik, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-21 14:56:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Raiskup 2012-08-21 14:03:04 UTC
Hello,

I'm pushing to rawhide updated xattrs patch with:

  a) new options:

     --xattrs-include=MASK
     --xattrs-exclude=MASK

     see the info pages..

  b) possibility to list extended file attributes stored inside archive:

     $ tar --xattrs --selinux --acls --verbose -tf archive.tar
     drwxrwxr-x. praiskup/praiskup 0 2012-08-21 15:46 dir/
     -rw-rw-r--. praiskup/praiskup 0 2012-08-21 15:46 dir/file
     -rw-rw-r--+ praiskup/praiskup 0 2012-08-21 15:46 dir/acls
     #         ^
     # HERE !  ^ is the change

     $ tar --xattrs --selinux --acls --verbose --verbose -tf archive.tar
     drwxrwxr-x. praiskup/praiskup 0 2012-08-21 15:46 dir/
       s: unconfined_u:object_r:user_tmp_t:s0
     -rw-rw-r--. praiskup/praiskup 0 2012-08-21 15:46 dir/file
       s: unconfined_u:object_r:user_tmp_t:s0
       x: 4 user.test
     -rw-rw-r--+ praiskup/praiskup 0 2012-08-21 15:46 dir/acls
       s: unconfined_u:object_r:user_tmp_t:s0
       a: user::rw-,user:praiskup:---,group::rw-,mask::rw-,other::r--

   c) no default enabled domain outside 'user.*' for extract mode, everything
      you want to restore may be specified by --xattrs-include option.

   d) possibility to hide xattr write warning by --warning=no-xattr-write

   e) no double-setting of xattrs for regular files during extracting

   f) no infinite-loop when not covered attribute was restored from archive

   g) --no-xattrs --no-acls and --no-selinux are set by default for all modes

Any comment welcomed!

Pavel

Comment 1 Pavel Raiskup 2012-08-21 14:49:08 UTC
Relevant commit:

  http://lists.fedoraproject.org/pipermail/scm-commits/2012-August/848117.html

For best testing you may run:

  $ fedpkg clone -a tar
  $ cd !$ && fedpkg compile
  $ cd tests
  $ sudo ./testsuite -k xattrs # note -- full check requires root!

Relevant build:

  http://koji.fedoraproject.org/koji/taskinfo?taskID=4409969

Feel free to reopen this bug when you see any problem.

Pavel

Comment 2 Pavel Raiskup 2012-08-28 07:14:21 UTC
Some fixes in manual page are covered in newest tar-rawhide release:

  http://koji.fedoraproject.org/koji/buildinfo?buildID=349824