tar --xattr and --xattr-include=* should be defaults

Bug #1785291 reported by Steve Langasek on 2018-08-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU tar
tar (Ubuntu)

Bug Description

As discussed at https://lists.ubuntu.com/archives/ubuntu-devel/2018-August/040407.html ff, as of Ubuntu 18.04 an Ubuntu root filesystem uses xattrs for storing filesystem capabilities. We should therefore have defaults for our tar that preserve these attributes without needing to pass additional commandline options.

Currently when creating a tarball you must pass the non-default option --xattrs and when extracting a tarball you must pass the non-default option --xattrs-include=*.

The latter is particularly awkward, and Colin Watson found some version of tar documentation that suggests --xattrs-include=* should never be needed, only --xattrs. But that doesn't appear in the version of tar(1) in bionic, and in practice --xattrs-include=* is definitely required.

Ideally we want this changed in upstream tar as well since we can't rely on users using the Ubuntu build of tar to unpack their Ubuntu filesystems; but even without this we should change the default in Ubuntu to take the sharp edges off for our users where possible.

tags: added: id-5b6498323341a64e58025645
Changed in tar (Ubuntu):
importance: Undecided → High
status: New → Triaged
Brian Murray (brian-murray) wrote :

I've discussed the issue regarding extraction of xattrs with upstream developers of tar and discovered that only user.* extended attributes are extracted by default due to cross platform compatibility concerns[1]. Based on that discussion and the small number of programs utilizing extended attributes it was decided to not pursue making xattrs the default.

[1] https://lists.gnu.org/archive/html/bug-tar/2019-06/msg00002.html

Changed in tar (Ubuntu):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.