Control: tag -1 + pending

Hi Ben,

Quoting Benjamin Drung (2019-12-19 14:52:58)
> When specifying a tarball as output format, the extended attributes are lost.
> This leads to programs like ping fail to run as normal user.
> 
> ```
> mmdebstrap --include=iputils-ping buster buster.tar
> mkdir root
> sudo tar --xattrs --xattrs-include='*' -C root -xf buster.tar
> getcap root/bin/ping
> ```
> 
> Therefore the attached patch will preserve the extended attributes when
> generating the tarball. Then getcap will show:
> 
> ```
> root/bin/ping = cap_net_raw+ep
> ```

I agree, the created tarball should contain extended attributes. I had already
applied the patch you sent me in another mail before this bug report to my
local git but only now I realized that it's not working.

Indeed one also needs to add --xattrs-include='*' to the tar invocation when
creating and extracting a tarball with extended attributes even though the tar
documentation says:

>  By default, when `--xattr' is used, all names are stored in the archive (or
>  extracted, if using `--extract').

So the patch is actually a bit bigger. I now added a test case because
apparently all of this is easy to get wrong and added documentation that the
user should add --xattr --xattrs-include='*' when extracting the tarball. Also
the tar-in command in guestfish had to receive an xattrs:true.

No worries, I already took care of it.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to