GNU tar xattrs result in: libarchive: Ignoring malformed pax extended attribute
This bug was originally reported by Tianon Gravi (tianon@debian.org) in Debian bug #900593:
First, thanks for diffoscope; it's the best. :)
The context for this bug is in [1]. The basic gist is that I need to
preserve extended attributes to get the proper capabilities on
"/bin/ping" inside a rootfs tarball, so I updated my GNU tar invocation
to include "--xattrs", "--acls", and "--selinux" (just for good
measure).
[1]: https://github.com/debuerreotype/debuerreotype/pull/38
After doing so, I did a quick "diffoscope" of the before/after (which
normally is indispensibly helpful in ensuring that my PR does exactly
what I expect it to and not a single thing more). I was expecting to
see something showing me that I've got some new extended attributes on
at least "/bin/ping" (and possibly other files), but instead got the
following:
| $ diffoscope travis/20170101/amd64/jessie/rootfs.tar.xz
output/20170101/amd64/jessie/rootfs.tar.xz
| 2018-06-01 17:22:24 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:24 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:24 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:25 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:25 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:26 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:26 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:26 W: libarchive: Ignoring malformed pax extended attribute
| 2018-06-01 17:22:26 W: libarchive: Ignoring malformed pax extended attribute
| |############################| 100%
Time: 0:00:10
| --- travis/20170101/amd64/jessie/rootfs.tar.xz
| +++ output/20170101/amd64/jessie/rootfs.tar.xz
| ├── rootfs.tar
| │ ├── filetype from file(1)
| │ │ @@ -1 +1 @@
| │ │ -POSIX tar archive (GNU)
| │ │ +POSIX tar archive
I've uploaded the two .tar.xz files in question to [2] in case you'd
like to reproduce. :)
[2]: https://people.debian.org/~tianon/diffoscope-gnu-tar-xattrs/
If there's something obvious I've missed, I apologize! I searched the
bugs and the list as much as I could, and couldn't find anything similar
(which was surprising -- I would've thought someone else would've run
into this long before me). O:>