unsquashfs not preserving file capabilities

From: Prasad Koya
Date: Wed Oct 07 2015 - 10:28:08 EST


Hi

Not sure if there is a mailing list for squashfs-tools.

I'm not seeing xattrs after unsquashing. This is how we are using:

1. Install all of our RPMs with some root dir (rpm --root xyz)

2. mksquashfs of xyz. (-comp xz -Xbcj x86).

3. To update an rpm in image, we first unsquash the fs made in step 2
with unsquashfs. Say this is dir xyz2, then do 'rpm --root xyz2 -U
changed.rpm'

Right after unsquashing in step 3, I don't see capabilities on, say, ping.


after first mksquashfs ie., installing all RPMs fresh:

bash% getfattr -n security.capability rootfs/usr/bin/ping
# file: usr/bin/ping
security.capability=0sAQAAAgAwAAAAAAAAAAAAAAAAAAA=

bash% getcap rootfs/usr/bin/ping
usr/bin/ping = cap_net_admin,cap_net_raw+ep


after unsquashfs:

bash% getfattr -n security.capability
/tmp/extracted/unsquashed/usr/bin/ping
/tmp/extracted/unsquashed/usr/bin/ping: security.capability: No such attribute

bash% getcap /tmp/extracted/unsquashed/usr/bin/ping
bash%

I explicitly specify '-xattrs' for both mksquashfs and unsquashfs. Is
this known issue?

thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/